Skip to content

Commit

Permalink
Missing "Not Saved" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gevorgmansuryan committed Jul 24, 2024
1 parent 0660d32 commit 26f7a2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"version": "3.2.2",
"humhub": {
"minVersion": "1.16"
"minVersion": "1.16.2"
},
"homepage": "https://github.com/humhub/mail",
"authors": [
Expand Down
6 changes: 1 addition & 5 deletions resources/js/humhub.mail.ConversationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ humhub.module('mail.ConversationView', function (module, require, $) {
this.setActiveMessageId(Widget.instance('#inbox').getFirstMessageId());
}

window.onbeforeunload = function() {
return this.onbeforeunloadCheck();
}

this.reload();

this.$.on('mouseenter', '.mail-conversation-entry', function () {
Expand All @@ -38,7 +34,7 @@ humhub.module('mail.ConversationView', function (module, require, $) {
ConversationView.prototype.onbeforeunloadCheck = function () {
var replyRichtext = this.getReplyRichtext();
if (replyRichtext && $(replyRichtext.$[0]).closest('form').find('textarea').val().trim().length) {
return confirm(module.text('warn.onBeforeUnload'));
return client.confirmUnload(module.text('warn.onBeforeUnload'));
}

return true;
Expand Down
6 changes: 1 addition & 5 deletions resources/js/humhub.mail.messenger.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ humhub.module('mail.ConversationView', function (module, require, $) {
this.setActiveMessageId(Widget.instance('#inbox').getFirstMessageId());
}

window.onbeforeunload = function() {
return this.onbeforeunloadCheck();
}

this.reload();

this.$.on('mouseenter', '.mail-conversation-entry', function () {
Expand All @@ -38,7 +34,7 @@ humhub.module('mail.ConversationView', function (module, require, $) {
ConversationView.prototype.onbeforeunloadCheck = function () {
var replyRichtext = this.getReplyRichtext();
if (replyRichtext && $(replyRichtext.$[0]).closest('form').find('textarea').val().trim().length) {
return confirm(module.text('warn.onBeforeUnload'));
return client.confirmUnload(module.text('warn.onBeforeUnload'));
}

return true;
Expand Down
Loading

0 comments on commit 26f7a2d

Please sign in to comment.