Repository: ignite Updated Branches: refs/heads/master f77edc143 -> 4ab870c28
IGNITE-4727 modal tooltip fixed Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4ab870c2 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4ab870c2 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4ab870c2 Branch: refs/heads/master Commit: 4ab870c282ddc7ae11419774a02880907e1c64cd Parents: f77edc1 Author: Dmitriy Shabalin <[email protected]> Authored: Fri Mar 31 16:06:01 2017 +0700 Committer: Andrey Novikov <[email protected]> Committed: Fri Mar 31 16:06:01 2017 +0700 ---------------------------------------------------------------------- .../helpers/jade/form/form-field-checkbox.pug | 14 ++++++++++- .../helpers/jade/form/form-field-datalist.pug | 2 +- .../helpers/jade/form/form-field-dropdown.pug | 3 +-- .../app/helpers/jade/form/form-field-number.pug | 3 +-- .../helpers/jade/form/form-field-password.pug | 2 +- .../app/helpers/jade/form/form-field-text.pug | 3 +-- .../frontend/app/helpers/jade/mixins.pug | 1 + .../frontend/app/primitives/tooltip/index.pug | 25 ++++++++++++++++++++ .../views/configuration/domains-import.tpl.pug | 6 +++++ 9 files changed, 50 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug index 68a2dd2..fe7f912 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug @@ -15,6 +15,17 @@ limitations under the License. mixin form-field-checkbox(label, model, name, disabled, required, tip) + //- TODO: Need to use common tooltip. + mixin tooltip-checkbox(title, options) + if title + i.tipLabel.icon-help( + bs-tooltip='' + + data-title=title + data-container=options && options.container || false + data-placement=options && options.placement || false + ) + div.checkbox.col-xs-12.col-sm-12.col-md-12 label(id=`{{ ${name} }}Label`) .input-tip @@ -35,4 +46,5 @@ mixin form-field-checkbox(label, model, name, disabled, required, tip) data-ignite-form-panel-field='' ) span #{label} - i.tipLabel.icon-help(bs-tooltip='' data-title=tip) + + +tooltip-checkbox(tip, tipOpts) http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug index e4b71af..6da1255 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug @@ -40,7 +40,7 @@ mixin form-field-datalist(label, model, name, disabled, required, placeholder, o .ignite-form-field +ignite-form-field__label(label, name, required) .ignite-form-field__control - i.tipField.fa.icon-help(bs-tooltip='' data-title=tip) + +tooltip(tip, tipOpts) +form-field-feedback(name, 'required', errLbl + ' could not be empty!') http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug index d7bd0fd..2f13d69 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug @@ -41,8 +41,7 @@ mixin ignite-form-field-dropdown(label, model, name, disabled, required, multipl .ignite-form-field +ignite-form-field__label(label, name, required) .ignite-form-field__control - if tip - i.tipField.icon-help(bs-tooltip='' data-title=tip) + +tooltip(tip, tipOpts) if block block http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug index dd41849..0b8bce7 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug @@ -38,8 +38,7 @@ mixin ignite-form-field-number(label, model, name, disabled, required, placehold .ignite-form-field +ignite-form-field__label(label, name, required) .ignite-form-field__control - if tip - i.tipField.icon-help(bs-tooltip='' data-title=tip) + +tooltip(tip, tipOpts) +form-field-feedback(name, 'required', 'This field could not be empty') +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0) http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug index a12982f..a567e77 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug @@ -36,7 +36,7 @@ mixin ignite-form-field-password(label, model, name, disabled, required, placeho .ignite-form-field +ignite-form-field__label(label, name, required) .ignite-form-field__control - i.tipField.icon-help(bs-tooltip='' data-title=tip) + +tooltip(tip, tipOpts) if block block http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug index 76ea6e6..bac455f 100644 --- a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug +++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug @@ -52,8 +52,7 @@ mixin ignite-form-field-text(label, model, name, disabled, required, placeholder .ignite-form-field +ignite-form-field__label(label, name, required) .ignite-form-field__control - if tip - i.tipField.icon-help(bs-tooltip='' data-title=tip) + +tooltip(tip, tipOpts) if block block http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/helpers/jade/mixins.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/helpers/jade/mixins.pug b/modules/web-console/frontend/app/helpers/jade/mixins.pug index db175a2..bf49fa9 100644 --- a/modules/web-console/frontend/app/helpers/jade/mixins.pug +++ b/modules/web-console/frontend/app/helpers/jade/mixins.pug @@ -15,6 +15,7 @@ limitations under the License. include ./form +include ../../primitives/tooltip/index //- Mixin for advanced options toggle. mixin advanced-options-toggle(click, cond, showMessage, hideMessage) http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/app/primitives/tooltip/index.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/primitives/tooltip/index.pug b/modules/web-console/frontend/app/primitives/tooltip/index.pug new file mode 100644 index 0000000..de1b116 --- /dev/null +++ b/modules/web-console/frontend/app/primitives/tooltip/index.pug @@ -0,0 +1,25 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +mixin tooltip(title, options) + if title + i.tipField.icon-help( + bs-tooltip='' + + data-title=title + data-container=options && options.container || false + data-placement=options && options.placement || false + ) http://git-wip-us.apache.org/repos/asf/ignite/blob/4ab870c2/modules/web-console/frontend/views/configuration/domains-import.tpl.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug index baaa2d3..04de07a 100644 --- a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug +++ b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug @@ -24,6 +24,9 @@ mixin td-ellipses-lbl(w, lbl) label #{lbl} .modal.modal-domain-import.center(role='dialog') + - var tipOpts = {}; + - tipOpts.container = '.modal-content' + - tipOpts.placement = 'top' .modal-dialog.domains-import-dialog .modal-content(ignite-loading='importDomainFromDb' ignite-loading-text='{{importDomain.loadingOptions.text}}') #errors-container.modal-header.header @@ -75,7 +78,10 @@ mixin td-ellipses-lbl(w, lbl) .settings-row.settings-row_small-label +password('Password:', 'selectedPreset.password', '"jdbcPassword"', false, '', 'Password for connecting to database<br>Note, password would not be saved in preferences for security reasons')(ignite-on-enter='importDomainNext()') .settings-row + - tipOpts.placement = 'auto' +checkbox('Tables only', 'selectedPreset.tablesOnly', '"tablesOnly"', 'If selected, then only tables metadata will be parsed<br>Otherwise table and view metadata will be parsed') + - tipOpts.placement = 'top' + .import-domain-model-wizard-page(ng-show='importDomain.action == "schemas"') table.table.metadata(st-table='importDomain.displayedSchemas' st-safe-src='importDomain.schemas') thead
