ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject [2/5] ambari git commit: AMBARI-10251. Admin View: clicking outside of change user status confirmation should revert toggle (alexantonenko)
Date Fri, 27 Mar 2015 19:52:06 GMT
AMBARI-10251. Admin View: clicking outside of change user status confirmation should revert
toggle (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 77ccdf256fabb64a50380987cfe8ed0866322e36
Parents: 59c2485
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Fri Mar 27 19:43:08 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Fri Mar 27 21:51:59 2015 +0200

----------------------------------------------------------------------
 .../admin-web/app/scripts/services/ConfirmationModal.js   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/77ccdf25/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ConfirmationModal.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ConfirmationModal.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ConfirmationModal.js
index bb52601..0e96fbe 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ConfirmationModal.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/ConfirmationModal.js
@@ -41,9 +41,17 @@ angular.module('ambariAdminConsole')
 					$scope.cancel = function() {
 						$modalInstance.dismiss();
 						deferred.reject();
-					}
+					};
 				}]
 			});
+
+      modalInstance.result.then(function() {
+        // Gets triggered on close
+      }, function() {
+        // Gets triggered on dismiss
+        deferred.reject();
+      });
+
 			return deferred.promise;
 		}
 	};


Mime
View raw message