ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: # GG-843 Add empty select placeholder.
Date Tue, 15 Sep 2015 03:39:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 c557f8300 -> 4d48d0d01


# GG-843 Add empty select placeholder.


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

Branch: refs/heads/ignite-843
Commit: 4d48d0d019edd2acb90fd8d8a21fe2df2decf456
Parents: c557f83
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Sep 15 10:40:50 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Sep 15 10:40:50 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/models/caches.json          |  2 ++
 .../src/main/js/controllers/models/clusters.json        |  1 +
 .../src/main/js/controllers/models/metadata.json        |  1 +
 .../src/main/js/views/includes/controls.jade            | 12 +++++++-----
 4 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4d48d0d0/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 e8a8c23..00ef5c9 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
@@ -36,6 +36,7 @@
           "type": "dropdown-multiple",
           "model": "clusters",
           "placeholder": "Choose clusters",
+          "placeholderEmpty": "No clusters installed",
           "items": "clusters",
           "tip": [
             "Select clusters to start in cluster or add a new cluster."
@@ -51,6 +52,7 @@
           "type": "dropdown-multiple",
           "model": "metadatas",
           "placeholder": "Choose metadata",
+          "placeholderEmpty": "No metadata installed",
           "items": "metadatas",
           "tip": [
             "Select cache type metadata to describe types in cache."

http://git-wip-us.apache.org/repos/asf/ignite/blob/4d48d0d0/modules/control-center-web/src/main/js/controllers/models/clusters.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/clusters.json b/modules/control-center-web/src/main/js/controllers/models/clusters.json
index fb254aa..3165544 100644
--- a/modules/control-center-web/src/main/js/controllers/models/clusters.json
+++ b/modules/control-center-web/src/main/js/controllers/models/clusters.json
@@ -34,6 +34,7 @@
           "type": "dropdown-multiple",
           "model": "caches",
           "placeholder": "Choose caches",
+          "placeholderEmpty": "No caches installed",
           "items": "caches",
           "tip": [
             "Select caches to start in cluster or add a new cache."

http://git-wip-us.apache.org/repos/asf/ignite/blob/4d48d0d0/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 32a1124..483369f 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
@@ -30,6 +30,7 @@
           "type": "dropdown-multiple",
           "model": "caches",
           "placeholder": "Choose caches",
+          "placeholderEmpty": "No caches installed",
           "items": "caches",
           "tip": [
             "Select caches to associate database with cache."

http://git-wip-us.apache.org/repos/asf/ignite/blob/4d48d0d0/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 0d3ab82..64ac3cd 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
@@ -114,6 +114,7 @@ mixin details-row
     - var detailMdl = 'getModel(backupItem, detail)[detail.model]';
     - var detailCommon = {'ng-model': detailMdl, 'ng-required': 'detail.required'};
     - var detailDisabled = '{{detail.disabled}}'
+    - var dropdownPlaceholder = {'ng-class': '{placeholder: !' + detailMdl + ' || ' + detailMdl
+ '.length == 0}'}
 
     - var customValidators = {'ng-attr-ipaddress': '{{detail.ipaddress}}'}
 
@@ -145,13 +146,13 @@ mixin details-row
             .col-sm-8
                 +tipField('detail.tip')
                 .input-tip
-                    button.form-control(id='{{::detail.id}}' bs-select data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' ng-class='{placeholder:
#{detailMdl}.length == 0}' tabindex='0')&attributes(detailCommon)
+                    button.form-control(id='{{::detail.id}}' bs-select data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' tabindex='0')&attributes(detailCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-multiple')
             label(class=lblDetailClasses ng-class='{required: detail.required}') {{::detail.label}}:
             .col-sm-8
                 +tipField('detail.tip')
                 .input-tip
-                    button.form-control(bs-select data-multiple='1' data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' ng-class='{placeholder:
#{detailMdl}.length == 0}' tabindex='-1')&attributes(detailCommon)
+                    button.form-control(bs-select data-multiple='1' data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' tabindex='-1')&attributes(detailCommon)&attributes(dropdownPlaceholder)
         .group-section(ng-switch-when='table-simple')&attributes(detailCommon)
             .col-sm-12.group(id='{{::detail.model}}')
                 .group-legend
@@ -263,6 +264,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
     - var fieldRequiredClass = '{true: "required"}[field.required || required(field)]'
     - var fieldHide = '{{field.hide}}'
     - var fieldDisabled = '{{field.disabled}}'
+    - var dropdownPlaceholder = {'ng-class': '{placeholder: !' + fieldMdl + ' || ' + fieldMdl
+ '.length == 0}'}
 
     div(ng-switch='field.type')
         div(ng-switch-when='label')
@@ -304,7 +306,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' ng-attr-data-container='{{::field.container}}' ng-class='{placeholder: #{fieldMdl}.length
== 0}' tabindex='0')&attributes(fieldCommon)
+                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' ng-attr-data-container='{{::field.container}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-multiple' ng-hide=fieldHide)
             dic(class=lblClasses)
                 label(ng-class=fieldRequiredClass) {{::field.label}}:
@@ -312,7 +314,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled='{{field.items}}.length
== 0' data-multiple='1' data-placeholder='{{::field.placeholder}}' bs-options='item.value
as item.label for item in {{field.items}}' ng-class='{placeholder: #{fieldMdl}.length == 0}'
tabindex='-1')&attributes(fieldCommon)
+                    button.form-control(id='{{::field.id}}' bs-select ng-disabled='{{field.items}}.length
== 0' data-multiple='1' data-placeholder='{{::$eval(field.items).length == 0 ? field.placeholderEmpty
|| field.placeholder : field.placeholder}}' bs-options='item.value as item.label for item
in {{field.items}}' tabindex='-1')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-details' ng-hide=fieldHide)
             - var expanded = 'field.details[' + fieldMdl + '].expanded'
 
@@ -320,7 +322,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' ng-class='{placeholder: #{fieldMdl}.length == 0}' tabindex='0')&attributes(fieldCommon)
+                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
             a.customize(ng-if='#{fieldMdl} && field.settings && field.details[#{fieldMdl}].fields.length
> 0' ng-click='#{expanded} = !#{expanded}') {{#{expanded} ? 'Hide settings' : 'Show settings'}}
             .col-sm-12.panel-details(ng-show='(#{expanded} || !field.settings) &&
#{fieldMdl}')
                 .details-row(ng-repeat='detail in field.details[#{fieldMdl}].fields')


Mime
View raw message