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/07/30 10:03:26 UTC

[1/2] incubator-ignite git commit: # ignite-843 Fixed focus in tables.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 779825515 -> 86fb3d720


# ignite-843 Fixed focus in tables.


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

Branch: refs/heads/ignite-843
Commit: 865ad01081003914de12929996d10144ee79b9c1
Parents: 7798255
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 30 15:01:14 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 30 15:01:14 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/views/includes/controls.jade    | 105 ++++++++++---------
 1 file changed, 57 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/865ad010/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index e9fe71b..8363066 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -52,18 +52,23 @@ mixin btn-up(show, click)
 mixin btn-down(show, click)
     i.tipField.fa.fa-arrow-down(ng-show=show ng-click=click bs-tooltip data-title='Move item down')
 
-mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, focusId)
-    .col-sm-6(style='float: right')
-        if valueJavaBuildInTypes
-            input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
-        else
-            input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder ng-escape='tableReset()')
-    label.fieldSep /
-    .input-tip
-        if keyJavaBuildInTypes
-            input.form-control(id=focusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
-        else
-            input.form-control(id=focusId type='text' ng-model=keyModel placeholder=keyPlaceholder ng-escape='tableReset()')
+mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, focusId, index)
+    .col-sm-6
+        label.fieldSep /
+        .input-tip
+            if keyJavaBuildInTypes
+                input.form-control(id=focusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
+            else
+                input.form-control(id=focusId type='text' ng-model=keyModel placeholder=keyPlaceholder ng-escape='tableReset()')
+    .col-sm-6
+        -var arg = keyModel + ', ' + valModel
+
+        +btn-save('tablePairSaveVisible(' + arg + ')', 'tablePairSave(tablePairValid, backupItem, field, '+ arg +', ' + index + ')')
+        .input-tip
+            if valueJavaBuildInTypes
+                input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
+            else
+                input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder ng-escape='tableReset()')
 
 mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes)
     .col-sm-6
@@ -79,14 +84,11 @@ mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder,
                                 a.labelFormField(event-focus='click' event-focus-id='{{::field.focusCurItemId}}' ng-click='curPair = tableStartEdit(backupItem, field, $index); curKey = curPair.#{keyFld}; curValue = curPair.#{valFld}') {{$index + 1}}) {{item.#{keyFld}}} / {{item.#{valFld}}}
                                 +btn-remove('tableRemove(backupItem, field, $index)', 'field.removeTip')
                             div(ng-if='tableEditing(field, $index)')
-                                label.labelField {{$index + 1}})
-                                +btn-save('tablePairSaveVisible(curKey, curValue)', 'tablePairSave(tablePairValid, backupItem, field, curKey, curValue, $index)')
-                                +table-pair-edit('curKey', 'curValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, '{{::field.focusCurItemId}}')
+                                +table-pair-edit('curKey', 'curValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, '{{::field.focusCurItemId}}', '$index')
                 tfoot(ng-show='tableNewItemActive(field)')
                     tr
                         td.col-sm-12
-                            +btn-save('tablePairSaveVisible(newKey, newValue)', 'tablePairSave(tablePairValid, backupItem, field, newKey, newValue, -1)')
-                            +table-pair-edit('newKey', 'newValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, '{{::field.focusNewItemId}}')
+                            +table-pair-edit('newKey', 'newValue', keyPlaceholder, valPlaceholder, keyJavaBuildInTypes, valueJavaBuildInTypes, '{{::field.focusNewItemId}}', '-1')
 
 mixin details-row
     - var lblDetailClasses = ['col-sm-4', 'details-label']
@@ -155,28 +157,41 @@ mixin details-row
                 input.form-control(name='{{detail.model}}' type='text' ng-model='newValue' ng-focus='tableNewItem(detail)' placeholder='{{::detail.placeholder}}')&attributes(customValidators)
                 +ico-exclamation('{{detail.model}}', 'ipaddress', 'Invalid address, see help for format description.')
 
-mixin table-db-field-edit(databaseName, databaseType, javaName, javaType)
-    div(style='width: 22%; float: right')
-        button.form-control(ng-model=javaType bs-select data-placeholder='Java type' bs-options='item.value as item.label for item in {{javaTypes}}')
-    label.fieldSep /
-    div(style='width: 20%; float: right')
-        input.form-control(type='text' ng-model=javaName placeholder='Java name' ng-escape='tableReset()')
-    label.fieldSep /
-    div(style='width: 22%; float: right')
-        button.form-control(ng-model=databaseType bs-select data-placeholder='JDBC type' bs-options='item.value as item.label for item in {{jdbcTypes}}')
-    label.fieldSep /
-    .input-tip
-        input.form-control(type='text' ng-model=databaseName placeholder='DB name' ng-escape='tableReset()')
+mixin table-db-field-edit(databaseName, databaseType, javaName, javaType, index)
+    .col-sm-3
+        label.fieldSep /
+        .input-tip
+            input.form-control(type='text' ng-model=databaseName placeholder='DB name' ng-escape='tableReset()')
+    .col-sm-3
+        label.fieldSep /
+        .input-tip
+            button.form-control(ng-model=databaseType bs-select data-placeholder='JDBC type' bs-options='item.value as item.label for item in {{jdbcTypes}}')
+    .col-sm-3
+        label.fieldSep /
+        .input-tip
+            input.form-control(type='text' ng-model=javaName placeholder='Java name' ng-escape='tableReset()')
+    .col-sm-3
+        - var args = databaseName + ', ' + databaseType + ', ' + javaName + ', ' + javaType
 
-mixin table-group-item-edit(fieldName, className, direction, focusId)
-    div(style='width: 15%; float: right')
-        button.form-control(ng-model=direction bs-select data-placeholder='Sort' bs-options='item.value as item.label for item in {{sortDirections}}')
-    label.fieldSep /
-    div(style='width: 38%; float: right')
-        input.form-control(type='text' ng-model=className placeholder='Class name' bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
-    label.fieldSep /
-    .input-tip
-        input.form-control(id=focusId type='text' ng-model=fieldName placeholder='Field name' ng-escape='tableReset()')
+        +btn-save('tableDbFieldSaveVisible(' + args + ')', 'tableDbFieldSave(field, ' + args + ', ' + index +')')
+        .input-tip
+            button.form-control(ng-model=javaType bs-select data-placeholder='Java type' bs-options='item.value as item.label for item in {{javaTypes}}')
+
+mixin table-group-item-edit(fieldName, className, direction, focusId, index)
+    .col-sm-4
+        label.fieldSep /
+        .input-tip
+            input.form-control(id=focusId type='text' ng-model=fieldName placeholder='Field name' ng-escape='tableReset()')
+    .col-sm-5
+        label.fieldSep /
+        .input-tip
+            input.form-control(type='text' ng-model=className placeholder='Class name' bs-typeahead data-min-length='1' bs-options='javaType for javaType in javaBuildInTypes' ng-escape='tableReset()')
+    .col-sm-3
+        - var args = fieldName + ', ' + className
+
+        +btn-save('tableGroupItemSaveVisible(' + args + ')', 'tableGroupItemSave(' + args + ', ' + direction + ', groupIndex, ' + index +')')
+        .input-tip
+            button.form-control(ng-model=direction bs-select data-placeholder='Sort' bs-options='item.value as item.label for item in {{sortDirections}}')
 
 mixin form-row
     +form-row-custom(['col-sm-2'], ['col-sm-4'])
@@ -295,14 +310,11 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                             a.labelFormField(ng-click='curField = tableStartEdit(backupItem, field, $index); curDatabaseName = curField.databaseName; curDatabaseType = curField.databaseType; curJavaName = curField.javaName; curJavaType = curField.javaType') {{$index + 1}}) {{item.databaseName}} / {{item.databaseType}} / {{item.javaName}} / {{item.javaType}}
                                             +btn-remove('tableRemove(backupItem, field, $index)', 'field.removeTip')
                                         div(ng-if='tableEditing(field, $index)')
-                                            label.labelField {{$index + 1}})
-                                            +btn-save('tableDbFieldSaveVisible(curDatabaseName, curDatabaseType, curJavaName, curJavaType)', 'tableDbFieldSave(field, curDatabaseName, curDatabaseType, curJavaName, curJavaType, $index)')
-                                            +table-db-field-edit('curDatabaseName', 'curDatabaseType', 'curJavaName', 'curJavaType')
+                                            +table-db-field-edit('curDatabaseName', 'curDatabaseType', 'curJavaName', 'curJavaType', '$index')
                             tfoot(ng-show='tableNewItemActive(field)')
                                 tr
                                     td.col-sm-12
-                                        +btn-save('tableDbFieldSaveVisible(newDatabaseName, newDatabaseType, newJavaName, newJavaType)', 'tableDbFieldSave(field, newDatabaseName, newDatabaseType, newJavaName, newJavaType, -1)')
-                                        +table-db-field-edit('newDatabaseName', 'newDatabaseType', 'newJavaName', 'newJavaType')
+                                        +table-db-field-edit('newDatabaseName', 'newDatabaseType', 'newJavaName', 'newJavaType', '-1')
         div(ng-switch-when='queryGroups' ng-hide=fieldHide)
             .col-sm-6
                 label.table-header {{::field.label}}:
@@ -334,14 +346,11 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                                                     a.labelFormField(event-focus='click' event-focus-id='curGroupItemId' ng-click='curGroupItem = tableGroupItemStartEdit(groupIndex, $index); curFieldName = curGroupItem.name; curClassName = curGroupItem.className; curDirection = curGroupItem.direction') {{$index + 1}}) {{groupItem.name}} / {{groupItem.className}} / {{groupItem.direction ? "DESC" : "ASC"}}
                                                                     +btn-remove('tableRemoveGroupItem(group, $index)', 'field.removeItemTip')
                                                                 div(ng-if='tableGroupItemEditing(groupIndex, $index)')
-                                                                    label.labelField {{$index + 1}})
-                                                                    +btn-save('tableGroupItemSaveVisible(curFieldName, curClassName)', 'tableGroupItemSave(curFieldName, curClassName, curDirection, groupIndex, $index)')
-                                                                    +table-group-item-edit('curFieldName', 'curClassName', 'curDirection', 'curGroupItemId')
+                                                                    +table-group-item-edit('curFieldName', 'curClassName', 'curDirection', 'curGroupItemId', '$index')
                                                     tfoot(ng-if='tableGroupNewItemActive(groupIndex)')
                                                         tr.col-sm-12(style='padding-left: 18px')
                                                             td
-                                                                +btn-save('tableGroupItemSaveVisible(newFieldName, newClassName)', 'tableGroupItemSave(newFieldName, newClassName, newDirection, groupIndex, -1)')
-                                                                +table-group-item-edit('newFieldName', 'newClassName', 'newDirection', 'newGroupItemId')
+                                                                +table-group-item-edit('newFieldName', 'newClassName', 'newDirection', 'newGroupItemId', '-1')
                             tfoot(ng-show='tableNewItemActive(field)')
                                 tr
                                     td.col-sm-12


[2/2] incubator-ignite git commit: # ignite-843 Remove selection on createItem.

Posted by an...@apache.org.
# ignite-843 Remove selection on createItem.


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

Branch: refs/heads/ignite-843
Commit: 86fb3d720cced1ab2f04f7b5264bc5de406a84a3
Parents: 865ad01
Author: Andrey <an...@gridgain.com>
Authored: Thu Jul 30 15:04:36 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Thu Jul 30 15:04:36 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/caches-controller.js                   | 2 ++
 .../src/main/js/controllers/clusters-controller.js                 | 2 ++
 .../src/main/js/controllers/metadata-controller.js                 | 2 ++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/86fb3d72/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 e995233..c103650 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
@@ -227,6 +227,8 @@ controlCenterModule.controller('cachesController', ['$scope', '$http', '$common'
         $scope.createItem = function () {
             $table.tableReset();
 
+            $scope.selectedItem = undefined;
+
             $scope.backupItem = {mode: 'PARTITIONED', atomicityMode: 'ATOMIC', readFromBackup: true, copyOnRead: true};
             $scope.backupItem.queryMetadata = [];
             $scope.backupItem.spaceMetadata = [];

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/86fb3d72/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 0b18868..1bc6633 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
@@ -185,6 +185,8 @@ controlCenterModule.controller('clustersController', ['$scope', '$http', '$commo
         $scope.createItem = function () {
             $table.tableReset();
 
+            $scope.selectedItem = undefined;
+
             $scope.backupItem = angular.copy($scope.create.template);
             $scope.backupItem.caches = [];
             $scope.backupItem.space = $scope.spaces[0]._id;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/86fb3d72/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index c8fad8d..da543e2 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -328,6 +328,8 @@ controlCenterModule.controller('metadataController', ['$scope', '$http', '$commo
         $scope.createItem = function () {
             $table.tableReset();
 
+            $scope.selectedItem = undefined;
+
             $scope.backupItem = angular.copy($scope.template);
             $scope.backupItem.space = $scope.spaces[0]._id;
         };