You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/06/23 17:04:03 UTC
ambari git commit: AMBARI-12091 Error-popup appears only first time.
(atkach)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 f39f37930 -> 651cecfaf
AMBARI-12091 Error-popup appears only first time. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/651cecfa
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/651cecfa
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/651cecfa
Branch: refs/heads/branch-2.1
Commit: 651cecfaf9424dcec410c8d587c7077b77b6e29d
Parents: f39f379
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Tue Jun 23 17:30:31 2015 +0300
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Tue Jun 23 18:03:51 2015 +0300
----------------------------------------------------------------------
.../resources/ui/app/mixins/ajax_error_handler.js | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/651cecfa/contrib/views/slider/src/main/resources/ui/app/mixins/ajax_error_handler.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mixins/ajax_error_handler.js b/contrib/views/slider/src/main/resources/ui/app/mixins/ajax_error_handler.js
index 1afb191..90614b5 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mixins/ajax_error_handler.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mixins/ajax_error_handler.js
@@ -43,6 +43,7 @@ App.AjaxErrorHandler = Ember.Mixin.create({
* @showErrorPopup {boolean}
*/
defaultErrorHandler: function (jqXHR, url, method, showErrorPopup) {
+ var self = this;
method = method || 'GET';
var context = this.get('isController') ? this : (this.get('isView') && this.get('controller'));
try {
@@ -65,20 +66,17 @@ App.AjaxErrorHandler = Ember.Mixin.create({
api: Em.I18n.t('ajax.apiInfo').format(method, url),
statusCode: Em.I18n.t('ajax.statusCode').format(jqXHR.status),
message: message,
- showMessage: !!message
+ showMessage: !!message,
+ willDestroyElement: function () {
+ self.set('errorPopupShown', false);
+ }
}),
[
- Ember.Object.create({title: Em.I18n.t('ok'), clicked: "errorPopupClose", dismiss: 'modal', type:'success'})
+ Ember.Object.create({title: Em.I18n.t('ok'), dismiss: 'modal', type: 'success'})
],
context
);
this.set('errorPopupShown', true);
}
- },
- actions: {
-
- errorPopupClose: function () {
- this.set('errorPopupShown', false);
- }
}
});
\ No newline at end of file