You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/07/16 22:47:48 UTC
[8/9] incubator-ignite git commit: IGNITE-843: Implemented more
compact table-simple and table-pair layout.
IGNITE-843: Implemented more compact table-simple and table-pair layout.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9cabdf6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9cabdf6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9cabdf6f
Branch: refs/heads/ignite-1121
Commit: 9cabdf6f24f5e8028cfc04d48f58d8edff28da33
Parents: 95f826f
Author: AKuznetsov <ak...@gridgain.com>
Authored: Fri Jul 17 01:10:09 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Fri Jul 17 01:10:09 2015 +0700
----------------------------------------------------------------------
.../nodejs/views/includes/controls.jade | 52 +++++++-------------
1 file changed, 17 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9cabdf6f/modules/web-control-center/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/controls.jade b/modules/web-control-center/nodejs/views/includes/controls.jade
index f99d5dd..302e7a3 100644
--- a/modules/web-control-center/nodejs/views/includes/controls.jade
+++ b/modules/web-control-center/nodejs/views/includes/controls.jade
@@ -26,9 +26,10 @@ mixin exclamation(mdl, err, msg)
i.fa.fa-exclamation-triangle.form-control-feedback(ng-show='inputForm["#{mdl}"].$error.#{err}' bs-tooltip data-title='#{msg}' type='button')
mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
- div
+ .col-sm-6
label.table-header #{header}:
+tipLabel('field.tip')
+ button.btn.btn-primary.fieldButton(ng-click='field.editIdx = -2') Add
table.links-edit.col-sm-12(st-table=tblMdl ng-show='#{tblMdl}.length > 0')
tbody
tr.col-sm-12(ng-repeat='item in #{tblMdl}')
@@ -44,11 +45,13 @@ mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
input.form-control.table-form-control(type='text' ng-model='curKey' placeholder=keyPlaceholder)
label /
input.form-control.table-form-control(type='text' ng-model='curValue' placeholder=valPlaceholder)
- .col-sm-6
- input.form-control(type='text' ng-model='newKey' ng-focus='field.editIdx = -1' placeholder=keyPlaceholder)
- .settings-row
- input.form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -1' placeholder=valPlaceholder)
- button.btn.btn-primary.fieldButton(ng-disabled='!newKey || !newValue' ng-click='field.editIdx = -1; tablePairAdd(field, newKey, newValue)') Add
+ .settings-row(ng-show='field.editIdx < -1')
+ .col-sm-6
+ i.tipField.fa.fa-floppy-o(ng-click='field.editIdx = tablePairAdd(field, newKey, newValue)')
+ .input-tip
+ input.form-control.table-form-control(type='text' ng-model='newKey' ng-focus='field.editIdx = -2' placeholder=keyPlaceholder)
+ label /
+ input.form-control.table-form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -2' placeholder=valPlaceholder)
mixin details-row
@@ -183,9 +186,10 @@ mixin form-row-custom(lblClasses, fieldClasses)
.details-row(ng-repeat='detail in field.details[#{fieldMdl}].fields')
+details-row
div(ng-switch-when='table-simple' ng-hide=fieldHide)&attributes(fieldCommon)
- div
+ .col-sm-6
label.table-header {{field.label}}:
+tipLabel('field.tableTip')
+ button.btn.btn-primary.fieldButton(ng-click='field.editIdx = -2;') Add
table.links-edit.col-sm-12(st-table='#{fieldMdl}' ng-show='#{fieldMdl}.length > 0')
tbody
tr.col-sm-12(ng-repeat='item in #{fieldMdl} track by $index')
@@ -201,36 +205,14 @@ mixin form-row-custom(lblClasses, fieldClasses)
td.col-sm-1(ng-if='field.reordering')
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; #{fieldMdl} ? #{fieldMdl}.push(newValue) : #{fieldMdl} = [newValue];') Add
- +tipField('field.tip')
- .input-tip
- input.form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -1' placeholder='{{field.placeholder}}')
+ .settings-row(ng-show='field.editIdx < -1')
+ .col-sm-6
+ i.tipField.fa.fa-floppy-o(ng-click='field.editIdx = -1; #{fieldMdl} ? #{fieldMdl}.push(newValue) : #{fieldMdl} = [newValue];')
+ .input-tip
+ input.form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -2' placeholder='{{field.placeholder}}')
div(ng-switch-when='fieldsMetadata' ng-hide=fieldHide)
+table-pair('{{field.label}}', fieldMdl, 'name', 'className', 'Field name', 'Field class full name')
div(ng-switch-when='groupsMetadata' ng-hide=fieldHide)&attributes(fieldCommon)
- div
- label.table-header {{field.label}}:
- +tipLabel('field.tableTip')
- table.links-edit.col-sm-12(st-table='#{fieldMdl}' ng-show='#{fieldMdl}.length > 0')
- tbody
- tr.col-sm-12(ng-repeat='item in #{fieldMdl} track by $index')
- td.col-sm-6
- div(ng-show='field.editIdx != {{$index}}')
- a(ng-click='field.editIdx = $index; curValue = #{fieldMdl}[$index]') {{$index + 1}}) {{item | compact}}
- i.tipField.fa.fa-remove(ng-click='field.editIdx = -1; #{fieldMdl}.splice($index, 1)')
- div(ng-show='field.editIdx == {{$index}}')
- label.labelField {{$index + 1}})
- i.tipField.fa.fa-floppy-o(ng-click='#{fieldMdl}[$index] = curValue ? curValue : #{fieldMdl}[$index]; field.editIdx = curValue ? -1 : field.editIdx')
- .input-tip
- input.form-control(type='text' ng-model='curValue' placeholder='{{field.placeholder}}')
- td.col-sm-1(ng-if='field.reordering')
- 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; #{fieldMdl} ? #{fieldMdl}.push(newValue) : #{fieldMdl} = [newValue];') Add
- +tipField('field.tip')
- .input-tip
- input.form-control(type='text' ng-model='newValue' ng-focus='field.editIdx = -1' placeholder='{{field.placeholder}}')
+ label.table-header {{field.label}}:
div(ng-switch-when='indexedTypes')
+table-pair('Index key-value type pairs', fieldMdl, 'keyClass', 'valueClass', 'Key class full name', 'Value class full name')