ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [07/34] incubator-ignite git commit: IGNITE-843 Use select instead of dropdown (select could be focused and respond to enter/esc).
Date Mon, 10 Aug 2015 16:00:49 GMT
IGNITE-843 Use select instead of dropdown (select could be focused and respond to enter/esc).


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

Branch: refs/heads/ignite-1201
Commit: 675a0cf05b30af31d50757769972d867a501e872
Parents: 25fbb61
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Aug 5 22:59:29 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Aug 5 22:59:29 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/clusters-controller.js        |  6 ++++--
 .../src/main/js/controllers/metadata-controller.js        |  2 ++
 .../src/main/js/controllers/models/caches.json            |  4 ++--
 .../src/main/js/controllers/models/metadata.json          |  3 +--
 .../src/main/js/public/stylesheets/style.scss             |  4 ++++
 .../src/main/js/views/configuration/clusters.jade         |  6 +++---
 .../src/main/js/views/configuration/metadata.jade         |  4 ++--
 .../src/main/js/views/includes/controls.jade              | 10 +++++-----
 8 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/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 64588d8..62fab5b 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
@@ -37,6 +37,8 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$commo
             {value: {discovery: {kind: 'Vm', Vm: {addresses: ['127.0.0.1:47500..47510']}}},
label: 'local'}
         ];
 
+        $scope.template = $scope.templates[0].value;
+
         $scope.discoveries = [
             {value: 'Vm', label: 'static IPs'},
             {value: 'Multicast', label: 'multicast'},
@@ -192,7 +194,7 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$commo
 
             $scope.selectedItem = undefined;
 
-            $scope.backupItem = angular.copy($scope.create.template);
+            $scope.backupItem = angular.copy($scope.template);
             $scope.backupItem.caches = [];
             $scope.backupItem.space = $scope.spaces[0]._id;
         };
@@ -312,4 +314,4 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$commo
             );
         };
     }]
-);
\ No newline at end of file
+);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/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 c85fb73..be616f8 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
@@ -61,6 +61,8 @@ controlCenterModule.controller('metadataController', [
                 {value: 'h2', label: 'H2 database'}
             ];
 
+            $scope.rdbms = 'oracle';
+
             $scope.jdbcTypes = [
                 {value: 'BIT', label: 'BIT'},
                 {value: 'BOOLEAN', label: 'BOOLEAN'},

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/modules/control-center-web/src/main/js/controllers/models/caches.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/caches.json b/modules/control-center-web/src/main/js/controllers/models/caches.json
index 31648e0..09f668e 100644
--- a/modules/control-center-web/src/main/js/controllers/models/caches.json
+++ b/modules/control-center-web/src/main/js/controllers/models/caches.json
@@ -27,7 +27,7 @@
     },
     {
       "label": "Mode",
-      "type": "dropdown",
+      "type": "select",
       "model": "mode",
       "placeholder": "PARTITIONED",
       "items": "modes",
@@ -42,7 +42,7 @@
     },
     {
       "label": "Atomicity",
-      "type": "dropdown",
+      "type": "select",
       "model": "atomicityMode",
       "placeholder": "ATOMIC",
       "items": "atomicities",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index d986b93..8e2b5b5 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -34,7 +34,7 @@
     },
     {
       "label": "Metadata for",
-      "type": "dropdown",
+      "type": "select",
       "model": "kind",
       "items": "kinds",
       "tip": [
@@ -204,7 +204,6 @@
       "label": "Database type",
       "type": "select",
       "model": "rdbms",
-      "placeholder": "Choose database",
       "items": "databases",
       "tip": [
         "Select database type to connect for loading tables metadata."

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index d1e1c2e..c5eba0c 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -688,6 +688,10 @@ button .caret, .btn .caret {
     }
 }
 
+.line-control {
+    width: auto;
+}
+
 .theme-line .panel-heading {
     padding: 10px 10px;
     margin: 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/modules/control-center-web/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/clusters.jade b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
index e295df1..c9e4397 100644
--- a/modules/control-center-web/src/main/js/views/configuration/clusters.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
@@ -38,8 +38,8 @@ block content
         .padding-top-dflt
             button.btn.btn-primary(event-focus='click' event-focus-id='defaultFocusId' ng-click='createItem()')
&nbspAdd cluster
             label(style='margin-left: 10px; margin-right: 10px') Use template:
-            button.btn.btn-default.base-control(ng-init='create.template = templates[0].value'
ng-model='create.template' data-template='/select' data-placeholder='Choose cluster template'
bs-options='item.value as item.label for item in templates' bs-select)
-            i.tiplabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
+            select.form-control.line-control(ng-model='template' ng-options='item.value as
item.label for item in templates')
+            i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
         hr
         form.form-horizontal(name='inputForm' ng-if='backupItem' novalidate)
             div(bs-collapse data-start-collapsed='false')
@@ -78,4 +78,4 @@ block content
             div
                 button.btn.btn-primary(ng-disabled='inputForm.$invalid' ng-click='saveItem()')
Save
                 button.btn.btn-primary(ng-show='backupItem._id' ng-disabled='inputForm.$invalid'
ng-click='saveItemAs()') Copy
-                button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove
\ No newline at end of file
+                button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index f49602d..0c90085 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -38,8 +38,8 @@ block content
         .padding-top-dflt
             button.btn.btn-primary(event-focus='click' event-focus-id='defaultFocusId' ng-click='panels.activePanel
= [0]; createItem()') &nbspAdd metadata
             label(style='margin-left: 6px; margin-right: 10px') For:
-            button.btn.btn-default(ng-model='template' data-template='/select' data-placeholder='Choose
metadata type' bs-options='item.value as item.label for item in templates' bs-select)
-            i.tiplabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
+            select.form-control.line-control(ng-model='template' ng-options='item.value as
item.label for item in templates')
+            i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
         hr
         .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple='true')
             .panel.panel-default(ng-show='selectedItem || backupItem')

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/675a0cf0/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 d6bad13..fccafac 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
@@ -189,6 +189,7 @@ mixin table-db-field-edit(databaseName, databaseType, javaName, javaType,
focusI
 
 mixin table-group-item-edit(fieldName, className, direction, index)
     -var focusIdNext = fieldName + 'Next'
+    -var focusIdNext2 = fieldName + 'Next2'
     -var args = fieldName + ', ' + className
     -var btnVisible = 'tableGroupItemSaveVisible(' + args + ')'
     -var btnSave = 'tableGroupItemSave(' + args + ', ' + direction + ', groupIndex, ' + index
+')'
@@ -201,11 +202,11 @@ mixin table-group-item-edit(fieldName, className, direction, index)
     .col-sm-5
         label.fieldSep /
         .input-tip
-            input.form-control(id=focusIdNext type='text' ng-model=className placeholder='Class
name' bs-typeahead retain-selection data-min-length='1' bs-options='javaClass for javaClass
in javaBuildInClasses' on-enter=btnVisibleAndSave on-escape='tableReset()')
+            input.form-control(id=focusIdNext enter-focus-next enter-focus-next-id=focusIdNext2
type='text' ng-model=className placeholder='Class name' bs-typeahead retain-selection data-min-length='1'
bs-options='javaClass for javaClass in javaBuildInClasses' on-escape='tableReset()')
     .col-sm-3
         +btn-save(btnVisible, btnSave)
         .input-tip
-            button.form-control(ng-model=direction bs-select data-placeholder='Sort' bs-options='item.value
as item.label for item in {{sortDirections}}')
+            select.form-control(id=focusIdNext2 ng-model=direction ng-options='item.value
as item.label for item in {{sortDirections}}' on-enter=btnVisibleAndSave on-escape='tableReset()')
 
 mixin form-row
     +form-row-custom(['col-sm-2'], ['col-sm-4'])
@@ -257,7 +258,6 @@ mixin form-row-custom(lblClasses, fieldClasses)
                 +tipField('field.tip')
                 .input-tip
                     select.form-control(ng-options='item.value as item.label for item in
{{field.items}}')&attributes(fieldCommon)
-                        option(value='') {{::field.placeholder}}
         div(ng-switch-when='dropdown' ng-hide=fieldHide)
             label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
             div(class=fieldClasses)
@@ -352,7 +352,7 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                             .col-sm-12(ng-show='!tableEditing(field, $index)')
                                                 a.labelFormField(event-focus='click' event-focus-id='curGroupName'
ng-click='curGroup = tableStartEdit(backupItem, field, $index); curGroupName = curGroup.name;
curFields = curGroup.fields') {{$index + 1}}) {{group.name}}
                                                 +btn-remove('tableRemove(backupItem, field,
$index)', 'field.removeTip')
-                                                +btn-add('tableGroupNewItem($index)', 'field.addItemTip',
'newGroupItemId')
+                                                +btn-add('tableGroupNewItem($index)', 'field.addItemTip',
'newFieldName')
                                             div(ng-if='tableEditing(field, $index)')
                                                 label.labelField {{$index + 1}})
                                                 +btn-save('tableGroupSaveVisible(curGroupName)',
'tableGroupSave(curGroupName, $index)')
@@ -364,7 +364,7 @@ mixin form-row-custom(lblClasses, fieldClasses)
                                                         tr(ng-repeat='groupItem in group.fields')
                                                             td
                                                                 div(ng-show='!tableGroupItemEditing(groupIndex,
$index)')
-                                                                    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"}}
+                                                                    a.labelFormField(event-focus='click'
event-focus-id='curFieldName' 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)')
                                                                     +table-group-item-edit('curFieldName',
'curClassName', 'curDirection', '$index')


Mime
View raw message