Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 8eeb439a5 -> e5812a7e9


IGNITE-843: Added "Add" link for empty table.


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

Branch: refs/heads/ignite-843
Commit: e5812a7e93657911609400f96ef2a128fa978111
Parents: 8eeb439
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Mon Aug 17 14:39:20 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Mon Aug 17 14:39:20 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/public/stylesheets/style.scss   |  8 +++---
 .../src/main/js/views/includes/controls.jade    | 26 ++++++++++++--------
 2 files changed, 20 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5812a7e/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 28a3de7..bcb3599 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
@@ -867,6 +867,10 @@ button .caret, .btn .caret {
     padding-right: 5px;
 }
 
+.group-section {
+    margin-top: 25px;
+}
+
 .group {
     border-radius: 5px;
     border: thin dotted lightgrey;
@@ -903,10 +907,6 @@ button .caret, .btn .caret {
     margin: 0 10px 10px 10px;
 }
 
-.group-content-empty {
-    padding-top: 10px;
-}
-
 .tooltip.right .tooltip-arrow {
     border-right-color: $ignite-red;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e5812a7e/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 b989a53..b2ab734 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
@@ -91,7 +91,8 @@ mixin table-pair(header, tblMdl, keyFld, valFld, 
keyPlaceholder, valPlaceholder,
             label #{header}:
             +group-tip('field.tip')
             +group-btn-add('tableNewItem(field)', 'field.addTip')
-        .group-content-empty(ng-if='!((#{tblMdl} && #{tblMdl}.length > 0) || 
tableNewItemActive(field))')
+        .group-content(ng-if='!((#{tblMdl} && #{tblMdl}.length > 0) || 
tableNewItemActive(field))')
+            a(ng-click='tableNewItem(field)') Add
         .group-content(ng-show='(#{tblMdl} && #{tblMdl}.length > 0) || 
tableNewItemActive(field)')
             table.col-sm-12.links-edit(id='{{::field.model}}' st-table=tblMdl)
                 tbody
@@ -150,13 +151,14 @@ mixin details-row
                 +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}}')&attributes(detailCommon)
-        .section(ng-switch-when='table-simple')&attributes(detailCommon)
+        .group-section(ng-switch-when='table-simple')&attributes(detailCommon)
             .col-sm-12.group(id='{{::detail.model}}')
                 .group-legend
                     label {{::detail.label}}:
                     +group-tip('detail.tableTip')
                     +group-btn-add('tableNewItem(detail)', 'detail.addTip')
-                .group-content-empty(ng-show='!((#{detailMdl} && 
#{detailMdl}.length > 0) || tableNewItemActive(detail))')
+                .group-content(ng-show='!((#{detailMdl} && #{detailMdl}.length 
> 0) || tableNewItemActive(detail))')
+                    a(ng-click='tableNewItem(detail)') Add
                 .group-content(ng-show='(#{detailMdl} && #{detailMdl}.length > 
0) || tableNewItemActive(detail)')
                     table.col-sm-12.links-edit-details(st-table='#{detailMdl}')
                         tbody
@@ -319,13 +321,14 @@ mixin form-row-custom(lblClasses, fieldClasses, 
dataSource)
             .col-sm-7.panel-details(ng-show='(#{expanded} || !field.settings) 
&& #{fieldMdl}')
                 .details-row(ng-repeat='detail in 
field.details[#{fieldMdl}].fields')
                     +details-row
-        .section(ng-switch-when='table-simple' 
ng-hide=fieldHide)&attributes(fieldCommon)
+        .group-section(ng-switch-when='table-simple' 
ng-hide=fieldHide)&attributes(fieldCommon)
             .col-sm-7.group
                 .group-legend
                     label {{::field.label}}:
                     +group-tip('field.tableTip')
                     +group-btn-add('tableNewItem(field)', 'field.addTip')
-                .group-content-empty(ng-show='!((#{fieldMdl} && 
#{fieldMdl}.length > 0) || tableNewItemActive(field))')
+                .group-content(ng-show='!((#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field))')
+                    a(ng-click='tableNewItem(field)') Add
                 .group-content(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field)')
                     table.col-sm-12.links-edit(id='{{::field.model}}' 
st-table='#{fieldMdl}')
                         tbody
@@ -347,18 +350,20 @@ mixin form-row-custom(lblClasses, fieldClasses, 
dataSource)
                                     +btn-save('tableSimpleSaveVisible(field, 
-1)', 'tableSimpleSave(tableSimpleValid, backupItem, field, -1)')
                                     .input-tip
                                         
input.form-control(id='new{{::field.focusId}}' type='text' 
ng-model='field.newValue' placeholder='{{::field.placeholder}}' 
on-enter='tableSimpleSaveVisible(field, -1) && 
tableSimpleSave(tableSimpleValid, backupItem, field, -1)' 
on-escape='tableReset()')
-        .section(ng-switch-when='indexedTypes')
+        .group-section(ng-switch-when='indexedTypes')
             +table-pair('Index key-value type pairs', fieldMdl, 'keyClass', 
'valueClass', 'Key class full name', 'Value class full name', true, true)
         div(ng-switch-when='queryFieldsFirst' ng-hide=fieldHide)
             +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 
'Field name', 'Field class full name', false, true)
-        .section(ng-switch-when='queryFields' ng-hide=fieldHide)
+        .group-section(ng-switch-when='queryFields' ng-hide=fieldHide)
             +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 
'Field name', 'Field class full name', false, true)
-        .section(ng-switch-when='table-db-fields' ng-hide=fieldHide)
+        .group-section(ng-switch-when='table-db-fields' ng-hide=fieldHide)
             .col-sm-7.group
                 .group-legend
                     label {{::field.label}}:
                     +group-tip('field.tip')
                     +group-btn-add('tableNewItem(field)', 'field.addTip')
+                .group-content(ng-show='!((#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field))')
+                    a(ng-click='tableNewItem(field)') Add
                 .group-content(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field)')
                     table.col-sm-12.links-edit(st-table=fieldMdl)
                         tbody
@@ -373,13 +378,14 @@ mixin form-row-custom(lblClasses, fieldClasses, 
dataSource)
                             tr
                                 
td.col-sm-12(ng-init='newDatabaseType="INTEGER"; newJavaType="Integer"')
                                     +table-db-field-edit('new', 
'{{::field.focusId}}', '-1')
-        .section(ng-switch-when='table-query-groups' ng-hide=fieldHide)
+        .group-section(ng-switch-when='table-query-groups' ng-hide=fieldHide)
             .col-sm-7.group
                 .group-legend
                     label {{::field.label}}:
                     +group-tip('field.tip')
                     +group-btn-add('tableNewItem(field)', 'field.addTip')
-                .group-content-empty(ng-show='!((#{fieldMdl} && 
#{fieldMdl}.length > 0) || tableNewItemActive(field))')
+                .group-content(ng-show='!((#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field))')
+                    a(ng-click='tableNewItem(field)') Add
                 .group-content(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 
0) || tableNewItemActive(field)')
                     table.links-edit.col-sm-12(st-table=fieldMdl 
ng-init='newDirection = false')
                         tbody

Reply via email to