ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-2482 Fix unsaved changes.
Date Thu, 28 Jan 2016 07:59:15 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 a9c71fa5a -> 84d5b6664


IGNITE-2482 Fix unsaved changes.


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

Branch: refs/heads/ignite-843-rc2
Commit: 84d5b6664e5968b5bde47be591565fc988f0380a
Parents: a9c71fa
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Jan 28 14:58:59 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Jan 28 14:58:59 2016 +0700

----------------------------------------------------------------------
 .../clusters/general/discovery/vm.jade          |  4 ++--
 .../main/js/controllers/clusters-controller.js  | 20 ++++++++++++--------
 2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/84d5b666/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/vm.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/vm.jade
b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/vm.jade
index bd28469..5b76f97 100644
--- a/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/vm.jade
+++ b/modules/control-center-web/src/main/js/app/modules/states/configuration/clusters/general/discovery/vm.jade
@@ -51,8 +51,8 @@ div
                     ng-click='#{addresses}.splice(#{addresses}.indexOf(model), 1)'
                 )
 
-                ignite-form-field-down(ng-if='!$last' data-ng-model='model' data-models='#{addresses}')
-                ignite-form-field-up(ng-if='!$first' data-ng-model='model' data-models='#{addresses}')
+                ignite-form-field-down(ng-if='!$last' ng-hide='___.edit' data-ng-model='model'
data-models='#{addresses}')
+                ignite-form-field-up(ng-if='!$first' ng-hide='___.edit' data-ng-model='model'
data-models='#{addresses}')
                 
                 span(ng-hide='___.edit')
                     a.labelFormField(ng-click='___.edit = true') {{ model }}

http://git-wip-us.apache.org/repos/asf/ignite/blob/84d5b666/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 21135b2..fb14309 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -724,17 +724,21 @@ consoleModule.controller('clustersController', function ($http, $timeout,
$scope
 
         // Copy cluster with new name.
         $scope.cloneItem = function () {
-            if ($scope.tableReset(true)) {
-                if (validate($scope.backupItem))
-                    $clone.confirm($scope.backupItem.name, _clusterNames()).then(function
(newName) {
-                        var item = angular.copy($scope.backupItem);
+            function cloneItem() {
+                if ($scope.tableReset(true)) {
+                    if (validate($scope.backupItem))
+                        $clone.confirm($scope.backupItem.name, _clusterNames()).then(function
(newName) {
+                            var item = angular.copy($scope.backupItem);
 
-                        delete item._id;
-                        item.name = newName;
+                            delete item._id;
+                            item.name = newName;
 
-                        save(item);
-                    });
+                            save(item);
+                        });
+                }
             }
+
+            $common.confirmUnsavedChanges($scope.backupItem && $scope.ui.inputForm.$dirty,
cloneItem);
         };
 
         // Remove cluster from db.


Mime
View raw message