You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2017/01/23 13:22:22 UTC

ambari git commit: AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk cacb1cccf -> aaa99316f


AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aaa99316
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aaa99316
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aaa99316

Branch: refs/heads/trunk
Commit: aaa99316f42b5f7633bb8b2ace3d2557c73a5500
Parents: cacb1cc
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Jan 23 13:31:45 2017 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Jan 23 15:07:04 2017 +0200

----------------------------------------------------------------------
 ambari-web/app/views/common/modal_popups/alert_popup.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aaa99316/ambari-web/app/views/common/modal_popups/alert_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/alert_popup.js b/ambari-web/app/views/common/modal_popups/alert_popup.js
index 413d33c..3364fcb 100644
--- a/ambari-web/app/views/common/modal_popups/alert_popup.js
+++ b/ambari-web/app/views/common/modal_popups/alert_popup.js
@@ -23,19 +23,19 @@ var App = require('app');
  *
  * @param {String} header - header of the popup
  * @param {String} body - body of the popup
- * @param {Function} primary - function to call upon clicking the OK button
+ * @param {Function} callback - function to call upon clicking the OK button, clicking "x" or pressing "Esc"
  * @return {*}
  */
-App.showAlertPopup = function (header, body, primary) {
+App.showAlertPopup = function (header, body, callback) {
   return App.ModalPopup.show({
     primary: Em.I18n.t('ok'),
     secondary: null,
     header: header,
     body: body,
-    onPrimary: function () {
-      this.hide();
-      if (primary) {
-        primary();
+    hide: function () {
+      this._super();
+      if (callback) {
+        callback();
       }
     }
   });