Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6CBCA1821C for ; Thu, 16 Jul 2015 20:47:56 +0000 (UTC) Received: (qmail 49740 invoked by uid 500); 16 Jul 2015 20:47:56 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 49710 invoked by uid 500); 16 Jul 2015 20:47:56 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 49701 invoked by uid 99); 16 Jul 2015 20:47:56 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 20:47:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D85A41A7185 for ; Thu, 16 Jul 2015 20:47:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id dJszKJiktCKV for ; Thu, 16 Jul 2015 20:47:49 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 7050D25073 for ; Thu, 16 Jul 2015 20:47:42 +0000 (UTC) Received: (qmail 49452 invoked by uid 99); 16 Jul 2015 20:47:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 20:47:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0FD4DE6834; Thu, 16 Jul 2015 20:47:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sevdokimov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 16 Jul 2015 20:47:48 -0000 Message-Id: In-Reply-To: <7a3b1fd09b0542aeb5705376b9ae5df7@git.apache.org> References: <7a3b1fd09b0542aeb5705376b9ae5df7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Fri Jul 17 01:10:09 2015 +0700 Committer: AKuznetsov 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')