From 0c402aedc254ca85864008f54d5d4b2545b605d0 Mon Sep 17 00:00:00 2001 From: eduard13 Date: Wed, 12 Jun 2019 19:27:31 +0300 Subject: [PATCH 1/4] Calling the always action on opening and closing the modal. --- app/code/Magento/Ui/view/base/web/js/modal/alert.js | 1 - app/code/Magento/Ui/view/base/web/js/modal/confirm.js | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/alert.js b/app/code/Magento/Ui/view/base/web/js/modal/alert.js index 911d0e02578d2..4741f26ba2574 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/alert.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/alert.js @@ -43,7 +43,6 @@ define([ * Close modal window. */ closeModal: function () { - this.options.actions.always(); this.element.bind('alertclosed', _.bind(this._remove, this)); return this._super(); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/confirm.js b/app/code/Magento/Ui/view/base/web/js/modal/confirm.js index eceab940d1141..08a6fe2dc07c3 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/confirm.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/confirm.js @@ -80,6 +80,8 @@ define([ * Open modal window. */ openModal: function () { + this.options.actions.always(); + return this._super(); }, From 10c89f7cab704d239ad666a01d0538bcfdfd812f Mon Sep 17 00:00:00 2001 From: eduard13 Date: Thu, 13 Jun 2019 15:10:36 +0300 Subject: [PATCH 2/4] Revert "Calling the always action on opening and closing the modal." This reverts commit 0c402aedc254ca85864008f54d5d4b2545b605d0. --- app/code/Magento/Ui/view/base/web/js/modal/alert.js | 1 + app/code/Magento/Ui/view/base/web/js/modal/confirm.js | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/alert.js b/app/code/Magento/Ui/view/base/web/js/modal/alert.js index 4741f26ba2574..911d0e02578d2 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/alert.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/alert.js @@ -43,6 +43,7 @@ define([ * Close modal window. */ closeModal: function () { + this.options.actions.always(); this.element.bind('alertclosed', _.bind(this._remove, this)); return this._super(); diff --git a/app/code/Magento/Ui/view/base/web/js/modal/confirm.js b/app/code/Magento/Ui/view/base/web/js/modal/confirm.js index 08a6fe2dc07c3..eceab940d1141 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/confirm.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/confirm.js @@ -80,8 +80,6 @@ define([ * Open modal window. */ openModal: function () { - this.options.actions.always(); - return this._super(); }, From 07590d9ed581b4f760bdd66135d5ca2a93704cf4 Mon Sep 17 00:00:00 2001 From: eduard13 Date: Thu, 13 Jun 2019 16:16:54 +0300 Subject: [PATCH 3/4] Calling the always action on creating the widget. --- app/code/Magento/Ui/view/base/web/js/modal/alert.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/alert.js b/app/code/Magento/Ui/view/base/web/js/modal/alert.js index 911d0e02578d2..07b7230bd126f 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/alert.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/alert.js @@ -39,6 +39,14 @@ define([ }] }, + /** + * Create widget. + */ + _create: function () { + this.options.actions.always(); + this._super(); + }, + /** * Close modal window. */ From 92adfeb2ebf9e2d27dc715ef4dcad8deddd2a4ad Mon Sep 17 00:00:00 2001 From: eduard13 Date: Tue, 18 Jun 2019 11:54:52 +0300 Subject: [PATCH 4/4] Removing the always calling on closeModal --- app/code/Magento/Ui/view/base/web/js/modal/alert.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Ui/view/base/web/js/modal/alert.js b/app/code/Magento/Ui/view/base/web/js/modal/alert.js index 07b7230bd126f..b63294e3d8750 100644 --- a/app/code/Magento/Ui/view/base/web/js/modal/alert.js +++ b/app/code/Magento/Ui/view/base/web/js/modal/alert.js @@ -51,7 +51,6 @@ define([ * Close modal window. */ closeModal: function () { - this.options.actions.always(); this.element.bind('alertclosed', _.bind(this._remove, this)); return this._super();