Repository: ignite Updated Branches: refs/heads/ignite-wc-644 [created] cbdd4e962
WC-644 Web Console: Refactored modal for snapshot schedule creation. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cbdd4e96 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cbdd4e96 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cbdd4e96 Branch: refs/heads/ignite-wc-644 Commit: cbdd4e962dc433bef7472e273b73df05d875f1da Parents: d632eb6 Author: Alexey Kuznetsov <akuznet...@apache.org> Authored: Thu Aug 2 18:53:41 2018 +0700 Committer: Alexey Kuznetsov <akuznet...@apache.org> Committed: Thu Aug 2 18:53:41 2018 +0700 ---------------------------------------------------------------------- .../app/primitives/form-field/checkbox.pug | 2 +- .../app/primitives/form-field/index.scss | 44 ++++++++++++++++++++ .../app/primitives/form-field/number.pug | 5 ++- 3 files changed, 48 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/cbdd4e96/modules/web-console/frontend/app/primitives/form-field/checkbox.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/primitives/form-field/checkbox.pug b/modules/web-console/frontend/app/primitives/form-field/checkbox.pug index 09596d4..b498cbd 100644 --- a/modules/web-console/frontend/app/primitives/form-field/checkbox.pug +++ b/modules/web-console/frontend/app/primitives/form-field/checkbox.pug @@ -15,7 +15,7 @@ limitations under the License. mixin form-field__checkbox({ label, model, name, disabled, required, tip }) - .form-field.form-field__checkbox + .form-field.form-field__checkbox(id=`{{ ${name} }}Field`) +form-field__label({ label, name, required }) +form-field__tooltip({ title: tip, options: tipOpts }) http://git-wip-us.apache.org/repos/asf/ignite/blob/cbdd4e96/modules/web-console/frontend/app/primitives/form-field/index.scss ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/primitives/form-field/index.scss b/modules/web-console/frontend/app/primitives/form-field/index.scss index 83dd55d..1dd4fd3 100644 --- a/modules/web-console/frontend/app/primitives/form-field/index.scss +++ b/modules/web-console/frontend/app/primitives/form-field/index.scss @@ -215,6 +215,7 @@ box-sizing: border-box; width: 100%; max-width: initial; + min-width: 0px; height: 36px; padding: 9px 10px; margin-right: 0; @@ -241,6 +242,13 @@ } } + &--postfix::after { + content: attr(data-postfix); + display: inline-flex; + place-self: center; + margin-left: 10px; + } + // Added right offset to appearance of input for invalid password & > input[type='email'].ng-invalid.ng-touched, & > input[type='text'].ng-invalid.ng-touched, @@ -261,6 +269,8 @@ right: 0; bottom: 0; + display: flex; + [ng-message] { // TODO: remove after replace all fields to new overflow: visible !important; @@ -268,6 +278,12 @@ } } + &__control--postfix + &__errors::after { + content: attr(data-postfix); + margin-left: 10px; + visibility: hidden; + } + &__error { z-index: 2; position: relative; @@ -328,6 +344,7 @@ width: auto; height: auto; margin: 0; + border-radius: 0; } } @@ -382,3 +399,30 @@ height: 36px; } } + +.form-fieldset { + padding: 10px; + + border: 1px solid hsla(0,0%,77%,.5); + border-radius: 4px; + + legend { + width: auto; + margin: 0 -5px; + padding: 0 5px; + + border: 0; + + color: #393939; + font-size: 14px; + line-height: 1.42857; + } + + legend + * { + margin-top: 0 !important; + } + + & > *:last-child { + margin-bottom: 0 !important; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/cbdd4e96/modules/web-console/frontend/app/primitives/form-field/number.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/primitives/form-field/number.pug b/modules/web-console/frontend/app/primitives/form-field/number.pug index e5f1454..11f8e22 100644 --- a/modules/web-console/frontend/app/primitives/form-field/number.pug +++ b/modules/web-console/frontend/app/primitives/form-field/number.pug @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. -mixin form-field__number({ label, model, name, disabled, required, placeholder, tip, min, max, step }) +mixin form-field__number({ label, model, name, disabled, required, placeholder, tip, min, max, step, postfix }) -var errLbl = label.substring(0, label.length - 1) .form-field +form-field__label({ label, name, required }) +form-field__tooltip({ title: tip, options: tipOpts }) - .form-field__control + .form-field__control(class=postfix && 'form-field__control--postfix' data-postfix=postfix) - attributes.type = 'number' - attributes.min = min ? min : '0' - attributes.max = max ? max : '{{ Number.MAX_VALUE }}' @@ -29,6 +29,7 @@ mixin form-field__number({ label, model, name, disabled, required, placeholder, +form-field__input({ name, model, disabled, required, placeholder })(attributes=attributes) .form-field__errors( + data-postfix=postfix ng-messages=`(${form}[${name}].$dirty || ${form}[${name}].$touched || ${form}[${name}].$submitted) && ${form}[${name}].$invalid ? ${form}[${name}].$error : {}` ) if block