From 11642060556fc9d19ef109ee3ebb38cbb5bc0118 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 20 May 2022 00:01:09 +0300 Subject: [PATCH] Fix Bug 56735 --- .../forms/resources/img/icon-menu-sprite.svg | 22 +++++++++++++- apps/common/forms/resources/less/common.less | 29 +++++++++---------- apps/common/main/lib/component/InputField.js | 8 +++-- apps/common/main/lib/view/OpenDialog.js | 2 ++ .../app/controller/ApplicationController.js | 1 + 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/apps/common/forms/resources/img/icon-menu-sprite.svg b/apps/common/forms/resources/img/icon-menu-sprite.svg index 5ce3f5827..ffd9929f8 100644 --- a/apps/common/forms/resources/img/icon-menu-sprite.svg +++ b/apps/common/forms/resources/img/icon-menu-sprite.svg @@ -1,4 +1,4 @@ - + @@ -184,5 +184,25 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index dbfb92bcd..c49c2dfc8 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -439,7 +439,7 @@ .svg-icon { background: data-uri('../../../../common/forms/resources/img/icon-menu-sprite.svg') no-repeat; - background-size: @icon-width*24 @icon-height*2; + background-size: @icon-width*27 @icon-height*2; &.download { background-position: -@icon-width 0; @@ -531,6 +531,18 @@ background-position: -@icon-width*23 0; background-position: -@icon-width*23 @icon-normal-top; } + &.search { + background-position: -@icon-width*24 0; + background-position: -@icon-width*24 @icon-normal-top; + } + &.btn-sheet-view { + background-position: -@icon-width*25 0; + background-position: -@icon-width*25 @icon-normal-top; + } + &.hide-password { + background-position: -@icon-width*26 0; + background-position: -@icon-width*26 @icon-normal-top; + } } .btn { @@ -669,19 +681,4 @@ .font-size-large { .fontsize(@font-size-large); -} - -.input-field-btn { - .select-button { - display: none; - } - - .input-error { - &:before { - right: 3px; - } - } - input { - padding-right: 0; - } } \ No newline at end of file diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 2c4ab717e..f1cf1bc52 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -566,7 +566,8 @@ define([ validateOnBlur: true, disabled: false, editable: true, - iconCls: 'toolbar__icon btn-sheet-view', + showCls: 'toolbar__icon btn-sheet-view', + hideCls: 'toolbar__icon hide-password', btnHint: '', repeatInput: null, showPwdOnClick: true @@ -575,6 +576,7 @@ define([ initialize : function(options) { options = options || {}; options.btnHint = options.btnHint || this.textHintShowPwd; + options.iconCls = options.showCls || this.options.showCls; Common.UI.InputFieldBtn.prototype.initialize.call(this, options); @@ -617,7 +619,7 @@ define([ passwordShow: function (e) { if (this.disabled) return; - this._button.setIconCls('toolbar__icon hide-password'); + this._button.setIconCls(this.options.hideCls); this.type = 'text'; this._input.attr('type', this.type); @@ -636,7 +638,7 @@ define([ }, passwordHide: function (e) { - this._button.setIconCls('toolbar__icon btn-sheet-view'); + this._button.setIconCls(this.options.showCls); this.type = 'password'; (this._input.val() !== '') && this._input.attr('type', this.type); diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 962cbf60f..ad039555a 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -205,6 +205,8 @@ define([ this.inputPwd = new Common.UI.InputFieldBtnPassword({ el: $('#id-password-txt'), type: 'password', + showCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' btn-sheet-view', + hideCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' hide-password', validateOnBlur: false, showPwdOnClick: true, validation : function(value) { diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 1fb1061d6..fde1f1150 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -802,6 +802,7 @@ define([ warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline) && (typeof advOptions == 'string'), warningMsg: advOptions, validatePwd: !!me._isDRM, + iconType: 'svg', handler: function (result, value) { me.isShowOpenDialog = false; if (result == 'ok') {