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 26, 2024
1 parent 82389cf commit a614425
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion resources/js/humhub.mail.ConversationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,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 client.confirmUnload(module.text('warn.onBeforeUnload'));
return client.confirmUnload();
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/humhub.mail.messenger.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,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 client.confirmUnload(module.text('warn.onBeforeUnload'));
return client.confirmUnload();
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/humhub.mail.messenger.bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/js/humhub.mail.notification.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions widgets/ConversationView.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ class ConversationView extends JsWidget
*/
public $messageId;

public function init()
{
parent::init();

$this->view->registerJsConfig([
'mail.ConversationView' => [
'text' => [
'warn.onBeforeUnload' => Yii::t('base', 'Unsaved changes will be lost. Do you want to proceed?'),
],
],
]);
}

public function getData()
{
return [
Expand Down

0 comments on commit a614425

Please sign in to comment.