ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-2599 Show unsaved changes dialog on clone.
Date Tue, 09 Feb 2016 11:13:17 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 dcb0450f4 -> cfa793bde


IGNITE-2599 Show unsaved changes dialog on clone.


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

Branch: refs/heads/ignite-843-rc2
Commit: cfa793bdef9cbc2eeb1cd8a6261417f86655558c
Parents: dcb0450
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Feb 9 18:13:01 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Feb 9 18:13:01 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js              | 7 +++++--
 .../src/main/js/controllers/domains-controller.js             | 7 +++++--
 .../src/main/js/controllers/igfs-controller.js                | 7 +++++--
 3 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cfa793bd/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 2f00dad..006704c 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -621,8 +621,8 @@ consoleModule.controller('cachesController', [
 
         // Save cache with new name.
         $scope.cloneItem = function () {
-            if ($scope.tableReset(true)) {
-                if (validate($scope.backupItem))
+            function cloneItem() {
+                if ($scope.tableReset(true) && validate($scope.backupItem)) {
                     $clone.confirm($scope.backupItem.name, _cacheNames()).then(function (newName)
{
                         var item = angular.copy($scope.backupItem);
 
@@ -633,7 +633,10 @@ consoleModule.controller('cachesController', [
 
                         save(item);
                     });
+                }
             }
+
+            $common.confirmUnsavedChanges($scope.ui.isDirty(), cloneItem);
         };
 
         // Remove cache from db.

http://git-wip-us.apache.org/repos/asf/ignite/blob/cfa793bd/modules/control-center-web/src/main/js/controllers/domains-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/domains-controller.js b/modules/control-center-web/src/main/js/controllers/domains-controller.js
index 36dc602..a6624bf 100644
--- a/modules/control-center-web/src/main/js/controllers/domains-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/domains-controller.js
@@ -1380,8 +1380,8 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
 
         // Save domain model with new name.
         $scope.cloneItem = function () {
-            if ($scope.tableReset(true)) {
-                if (validate($scope.backupItem))
+            function cloneItem() {
+                if ($scope.tableReset(true) && validate($scope.backupItem)) {
                     $clone.confirm($scope.backupItem.valueType, _domainNames()).then(function
(newName) {
                         var item = angular.copy($scope.backupItem);
 
@@ -1391,7 +1391,10 @@ consoleModule.controller('domainsController', function ($filter, $http,
$timeout
 
                         save(item);
                     });
+                }
             }
+
+            $common.confirmUnsavedChanges($scope.ui.isDirty(), cloneItem);
         };
 
         // Remove domain model from db.

http://git-wip-us.apache.org/repos/asf/ignite/blob/cfa793bd/modules/control-center-web/src/main/js/controllers/igfs-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/igfs-controller.js b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
index 5372886..0af5fc2 100644
--- a/modules/control-center-web/src/main/js/controllers/igfs-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/igfs-controller.js
@@ -359,8 +359,8 @@ consoleModule.controller('igfsController', [
 
             // Save IGFS with new name.
             $scope.cloneItem = function () {
-                if ($scope.tableReset(true)) {
-                    if (validate($scope.backupItem))
+                function cloneItem() {
+                    if ($scope.tableReset(true) && validate($scope.backupItem)) {
                         $clone.confirm($scope.backupItem.name).then(function (newName) {
                             var item = angular.copy($scope.backupItem);
 
@@ -369,7 +369,10 @@ consoleModule.controller('igfsController', [
 
                             save(item);
                         });
+                    }
                 }
+
+                $common.confirmUnsavedChanges($scope.ui.isDirty(), cloneItem);
             };
 
             // Remove IGFS from db.


Mime
View raw message