You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/06/26 10:18:10 UTC
[3/4] incubator-ignite git commit: # ignite-843 cleanup js.
# ignite-843 cleanup js.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/109b1adc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/109b1adc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/109b1adc
Branch: refs/heads/ignite-843
Commit: 109b1adcd0f17e767d53e5d94d6695ab5fc43def
Parents: 2df288f
Author: Andrey <an...@gridgain.com>
Authored: Fri Jun 26 15:17:36 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jun 26 15:17:36 2015 +0700
----------------------------------------------------------------------
.../public/javascripts/controllers/caches.js | 2 --
.../public/javascripts/controllers/clusters.js | 2 --
.../public/javascripts/controllers/common.js | 24 --------------------
.../nodejs/views/includes/controls.jade | 2 +-
4 files changed, 1 insertion(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/109b1adc/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
index 4a58fe3..b6ea393 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/caches.js
@@ -16,8 +16,6 @@
*/
configuratorModule.controller('cachesController', ['$scope', '$alert', '$http', 'commonFunctions', function ($scope, $alert, $http, commonFunctions) {
- $scope.addSimpleItem = commonFunctions.addSimpleItem;
- $scope.addDetailSimpleItem = commonFunctions.addDetailSimpleItem;
$scope.swapSimpleItems = commonFunctions.swapSimpleItems;
$scope.joinTip = commonFunctions.joinTip;
$scope.getFldMdl = commonFunctions.getFldMdl;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/109b1adc/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
index 89af516..3f29cfd 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/clusters.js
@@ -16,8 +16,6 @@
*/
configuratorModule.controller('clustersController', ['$scope', '$alert', '$http', 'commonFunctions', function($scope, $alert, $http, commonFunctions) {
- $scope.addSimpleItem = commonFunctions.addSimpleItem;
- $scope.addDetailSimpleItem = commonFunctions.addDetailSimpleItem;
$scope.swapSimpleItems = commonFunctions.swapSimpleItems;
$scope.joinTip = commonFunctions.joinTip;
$scope.getFldMdl = commonFunctions.getFldMdl;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/109b1adc/modules/webconfig/nodejs/public/javascripts/controllers/common.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/public/javascripts/controllers/common.js b/modules/webconfig/nodejs/public/javascripts/controllers/common.js
index 0284d51..7cf8d19 100644
--- a/modules/webconfig/nodejs/public/javascripts/controllers/common.js
+++ b/modules/webconfig/nodejs/public/javascripts/controllers/common.js
@@ -19,30 +19,6 @@ var configuratorModule = angular.module('ignite-web-configurator', ['smart-table
configuratorModule.service('commonFunctions', function() {
return {
- addSimpleItem: function(backupItem, mdl, item) {
- if (backupItem[mdl])
- backupItem[mdl].push(item);
- else
- backupItem[mdl] = [item];
- },
- addDetailSimpleItem: function(backupItem, field, detailMdl, item) {
- var fldGrp = field.group;
- var fldMdl = field.model;
- var master = backupItem[fldGrp][backupItem[fldGrp][fldMdl]];
-
- if (!master) {
- backupItem[fldGrp][backupItem[fldGrp][fldMdl]] = {};
-
- master = backupItem[fldGrp][backupItem[fldGrp][fldMdl]];
- }
-
- var detailRows = master[detailMdl];
-
- if (detailRows)
- detailRows.push(item);
- else
- master[detailMdl] = [item];
- },
swapSimpleItems: function(a, ix1, ix2) {
var tmp = a[ix1];
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/109b1adc/modules/webconfig/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/views/includes/controls.jade b/modules/webconfig/nodejs/views/includes/controls.jade
index b3c4812..1880fc1 100644
--- a/modules/webconfig/nodejs/views/includes/controls.jade
+++ b/modules/webconfig/nodejs/views/includes/controls.jade
@@ -160,7 +160,7 @@ mixin form-row
i.fa.fa-arrow-up(ng-show='$index > 0' ng-click='swapSimpleItems(fieldMdl, $index, $index - 1); field.editIdx = -1;')
i.fa.fa-arrow-down(ng-show='$index < fieldMdl.length - 1' ng-click='swapSimpleItems(fieldMdl, $index, $index + 1); field.editIdx = -1;')
.col-sm-6
- button.btn.btn-primary.fieldButton(ng-disabled='!newValue || fieldMdl.indexOf(newValue) >= 0' ng-click='field.editIdx = -1; addSimpleItem(backupItem, field.model, newValue)') Add
+ button.btn.btn-primary.fieldButton(ng-disabled='!newValue || fieldMdl.indexOf(newValue) >= 0' ng-click='field.editIdx = -1; fieldMdl ? fieldMdl.push(newValue) : fieldMdl = [newValue]; setFldMdl(backupItem, field.model, fieldMdl);') Add
+tipField('field.tip')
.input-tip
input.form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -1' placeholder='{{field.placeholder}}')