From 289556cee30b4d8b0937303869624c7635a6e192 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Thu, 7 Oct 2021 06:24:47 +0300 Subject: [PATCH 01/10] Fix Bug 49948 --- apps/common/main/lib/component/InputField.js | 102 +++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 8ea0d65a0..bb6857785 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -541,4 +541,106 @@ define([ } } })()); + + Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend((function() { + return { + options : { + id : null, + cls : '', + style : '', + value : '', + name : '', + validation : null, + allowBlank : true, + placeHolder : '', + blankError : null, + spellcheck : false, + maskExp : '', + validateOnChange: false, + validateOnBlur: true, + disabled: false, + editable: true, + iconCls: 'btn-select-range', + btnHint: '' + }, + render : function(parentEl) { + + + if (!this.rendered) { + this.cmpEl = $(this.template({ + id : this.id, + cls : this.cls, + style : this.style, + value : this.value, + type : 'password', + name : this.name, + placeHolder : this.placeHolder, + spellcheck : this.spellcheck, + iconCls : this.options.iconCls, + scope : this + })); + + if (parentEl) { + this.setElement(parentEl, false); + parentEl.html(this.cmpEl); + } else { + this.$el.html(this.cmpEl); + } + } else { + this.cmpEl = this.$el; + } + + if (!this.rendered) { + var el = this.cmpEl; + + this._button = this.cmpEl.find('button'); + var button = new Common.UI.Button({ + el: this._button, + hint: this.options.btnHint || '' + }); + button.on('click', _.bind(this.onButtonClick, this)); + this._button.on('mousedown', _.bind(this.onMouseDown, this)); + + this._input = this.cmpEl.find('input').addBack().filter('input'); + if (this.editable) { + this._input.on('blur', _.bind(this.onInputChanged, this)); + this._input.on('keypress', _.bind(this.onKeyPress, this)); + this._input.on('keydown', _.bind(this.onKeyDown, this)); + this._input.on('keyup', _.bind(this.onKeyUp, this)); + if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); + if (this.maxLength) this._input.attr('maxlength', this.maxLength); + } + + + this.setEditable(this.editable); + + if (this.disabled) + this.setDisabled(this.disabled); + + if (this._input.closest('.asc-window').length>0) + var onModalClose = function() { + var errorTip = el.find('.input-error').data('bs.tooltip'); + if (errorTip) errorTip.tip().remove(); + Common.NotificationCenter.off({'modal:close': onModalClose}); + }; + Common.NotificationCenter.on({'modal:close': onModalClose}); + } + this.rendered = true; + + return this; + }, + + onMouseDown: function (e) { + if ((this._input.val() == '')||(this.disabled)) return; + this._button.on('mouseup', _.bind(this.onMouseUp,this)); + this._input.attr('type', 'text'); + }, + + onMouseUp: function (e) { + this._input.attr('type', 'password'); + this._button.off('mouseup', this.onMouseUp); + } + + } + })()); }); \ No newline at end of file From 6f16a2329d95a7c3c46822ff77e49f8e41f8726c Mon Sep 17 00:00:00 2001 From: OVSharova Date: Thu, 7 Oct 2021 11:52:41 +0300 Subject: [PATCH 02/10] Bug 49948 --- apps/common/main/lib/component/InputField.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index bb6857785..a855c7f44 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -593,13 +593,13 @@ define([ if (!this.rendered) { var el = this.cmpEl; - this._button = this.cmpEl.find('button'); - var button = new Common.UI.Button({ + this._btnElm = this.cmpEl.find('button'); + this._button = new Common.UI.Button({ el: this._button, hint: this.options.btnHint || '' }); - button.on('click', _.bind(this.onButtonClick, this)); - this._button.on('mousedown', _.bind(this.onMouseDown, this)); + this._button.on('click', _.bind(this.onButtonClick, this)); + this._btnElm.on('mousedown', _.bind(this.onMouseDown, this)); this._input = this.cmpEl.find('input').addBack().filter('input'); if (this.editable) { @@ -632,13 +632,13 @@ define([ onMouseDown: function (e) { if ((this._input.val() == '')||(this.disabled)) return; - this._button.on('mouseup', _.bind(this.onMouseUp,this)); + this._btnElm.on('mouseup', _.bind(this.onMouseUp,this)); this._input.attr('type', 'text'); }, onMouseUp: function (e) { this._input.attr('type', 'password'); - this._button.off('mouseup', this.onMouseUp); + this._btnElm.off('mouseup', this.onMouseUp); } } From c251fc32d20635ca8dcfede0d8d5498092dfa24c Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 8 Oct 2021 01:22:20 +0300 Subject: [PATCH 03/10] add icons --- .../img/toolbar/1.25x/btn-sheet-view.png | Bin 0 -> 428 bytes .../resources/img/toolbar/1.25x/hide-password.png | Bin 0 -> 349 bytes .../resources/img/toolbar/1.5x/btn-sheet-view.png | Bin 0 -> 498 bytes .../resources/img/toolbar/1.5x/hide-password.png | Bin 0 -> 400 bytes .../img/toolbar/1.75x/btn-sheet-view.png | Bin 0 -> 576 bytes .../resources/img/toolbar/1.75x/hide-password.png | Bin 0 -> 478 bytes .../resources/img/toolbar/1x/btn-sheet-view.png | Bin 0 -> 372 bytes .../resources/img/toolbar/1x/hide-password.png | Bin 0 -> 302 bytes .../resources/img/toolbar/2x/btn-sheet-view.png | Bin 0 -> 729 bytes .../resources/img/toolbar/2x/hide-password.png | Bin 0 -> 550 bytes 10 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-sheet-view.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/hide-password.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-sheet-view.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/hide-password.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-sheet-view.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/hide-password.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-sheet-view.png create mode 100644 apps/common/main/resources/img/toolbar/1x/hide-password.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-sheet-view.png create mode 100644 apps/common/main/resources/img/toolbar/2x/hide-password.png diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1.25x/btn-sheet-view.png new file mode 100644 index 0000000000000000000000000000000000000000..5511d5fc01ba3ee6ebe3a5c0d0a5c2b746cee9e6 GIT binary patch literal 428 zcmV;d0aN~oP)X1^@s6b5wmq00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yP1V-ox8G)MSp}G!g{;A*mlb#|BfoB{Dkzp8yVSE?I zimb$%SOw489$21EQc7{G$V#lK%uHwxEWb9#4}DJHpLM6%d}RHyE_giN+K>V1y36hXJk}op?zLS#GjYK-ZMhN;2;vZ z(rdRJ+L7j~_{^;}h=i`<;5)Qy6{d3V){=M_?fpl>kpwiT#8CSGk#IHv!!QiPSmOb7 WRDTrpThMm^0000X1^@s6b5wmq0003bNklaYxB;J%LSdB^BWyiYt-;kyR0avmV265G{Htr$=lI zlK|18r)+M+%M%ERwT*5zec{%UM-a_AlA$rUak6xHCXYLqw>+RHIj(GIa vw9J{381jx`$5o_s*uCmMR8>_~)&J=W_={TsFX3+X00000NkvXXu0mjfA9<6J literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-sheet-view.png b/apps/common/main/resources/img/toolbar/1.5x/btn-sheet-view.png new file mode 100644 index 0000000000000000000000000000000000000000..ded320d0f2e9a4f051f724a448deca32e80641a5 GIT binary patch literal 498 zcmeAS@N?(olHy`uVBq!ia0vp^Hb5-L!3HD?X4LuvDb50q$YKTtZeb8+WSBKa0w~B> z9OUlAuQ}DY_tNB&8tTy+S!l|DL>snWJ0-gKWa$#$MMe zf?LJk^UKVxU|=da;ArL*D(hmiKrAfer*Qq_1%j(2q?fMZQ}Scpuwl`u`9GxDdoAAm zSnL-hJx|LM)f=;xkiPRuWJczY@s1 z9{0MUY5&~iZKsy0E|>4kv)m?QqU7Vh>GPiG>At7Ce@wWReAX69k0W$m|GT;?_vk{s3Hp-19yx|Cjoq5v%p$#eNzKU_M@#1I iT$P-^7!rVP-22(B*F>*)7I7CCMGT&2A3;aOOy|Br9UM1H8 z?6damEvShOj|=S6_U$bwe0|yvPb$(}SkXu~z;;EtRy&vtd(N%)W3Qvl}e>j{f3^vy~8|+bxvFW0000AxXSkpy*6FlKa#8lb)2wHnNQ| z2a#bIhG7_nVHp3Iit;(IPOMkfoBThB?MrlHeNbUS2%B=Ls;YP{SJuetSPkoCkq9`l zYOxREUj%N-l{KOLcMn(IPRf~OqKNY~yRA?u^x5l&*w>9QhxIia`qF|R1(@NZ? zm@QxmFeOdG=4mQCuzJ>6@fqbh44DQOZmFNK4ibyj>3|8Opj^rC8-8geh6@QuxN zv=h1O$)eO0MpPYHcUvWF@xeCr|UpFkZEWXTdy=`Q2gU`?aBq)zF)D2 z6=~pl@01A_a6<7bc9oSFG&4IFfNrAWUa`mBaxblbI5FAa&dMG3ihWS}(kuR6o2IQe z(svA!Of@F8fJ^TfuQVpLfSW*wGQ*H8G`=iddgcV;%F+o zrMz=YN9E2jZOA*vbm7V8m?amQ4|*8WW#_Sz98FUL`zZcJ-~umUKIom7Qy@DD&1l4q zDap!Z&$kk&Y5G1n(%hVH(M|Lz|BHf0XiF~qy;M9G!!QiPFbu;m{tQ1ACL37)IdF^s O0000f<3a|?2hg6jIOSfJCbd_^ouPhQeBUXQ0_>!`K@1U zK|yt8i=}735~fS6QXIZ-GeGItuW!>ORw<||`TlS$vcQn3(GGyDh0?Nzg!jH~A6Z8r zYh&?=qc*jt5Gp4qp!k$go7z**w54)_28<+8XCBEl*4+z6lBjczWLZzv)qn{|f-*rN zyzdoY0^m?4D1`UDc00xTf@UQ581vd5v)LCkBNs6)*q8E6)q& z<@;ThKHzo#LUu*R<+?8B<0X9u)VI!Tx8#zzZmu?Oihq{jlj!~4mx5RSJ)65r-e!K~ z{a4?kKC0|#jEmVUxL-RG#Jr~!wx&3I4{tfo)s@eW-ne2^!;@V+t8hp13cWagTe~ HDWM4ffBTVe literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/hide-password.png b/apps/common/main/resources/img/toolbar/1x/hide-password.png new file mode 100644 index 0000000000000000000000000000000000000000..e717460dc85391726ea70369518b6c830bbf995d GIT binary patch literal 302 zcmV+}0nz@6P)Nkle*Tm+}di9A)$kOM$6`L5vfB!nRcfUxcgPF#;q5dmSVC~LS=0CtiiAZ!_B4JYZK z0)X$ts*4VHV`dlt_)e_4=5P)m zqc9MKpRWQ+*b>q~)PYN|JMeV?9k>LS;Ol_93b<52I&eBrv_TqVV8u_snN0SZ*-31k zJmT^62cRg5q9}@@D2k#eKZ_lfles#$dU9p_=gePwbM@cXKUaV7V63&1`?uTe9@;f30hFfeqlqc@qLR zZ{*35x+!*!4LLDX2mM0cY{Z<_UKq5(}jtZ&kAb>Hoy2T`wKA}24T<}7Fo z1%xJnDa|B&@∾W2`*yWdnNh2^2L`A+%}96S|-oDybcJDwtSe0sclqTJnUh zwlcZUCW}m5)ITQ7S=WRn!}#heL1?Fj-De^U`2 zi}%~a>o?4YFy4o+?BCrGJ|}cxC=S&{Xp=?1y~YqeCv;UJffu1o7X9|(A0@?kEP);(vQc=e{grGP-irHH;rVNE{{*6Fa<(`# zfU_4}Ux()a2p>hxCTEK?WB(*;!h1N=1XgHcO?d9*AI`LWudx=qdjQVh-ha&w5m_y5 z0fK@vxc5=m`G~BUwmnHvgD4Y;HLuGEuO}($uj3xDEATw@T>cFt>gE&R&cIW-I;M1& literal 0 HcmV?d00001 From 0bd8cf3fc95683ca56ae7b1d594f74e89cf95d6e Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 8 Oct 2021 02:53:44 +0300 Subject: [PATCH 04/10] InputFieldBtnPassword --- apps/common/main/lib/component/InputField.js | 150 ++++++++++-------- apps/common/main/lib/view/OpenDialog.js | 2 +- apps/common/main/lib/view/PasswordDialog.js | 19 ++- .../main/app/view/ProtectDialog.js | 18 ++- 4 files changed, 110 insertions(+), 79 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index a855c7f44..be85272b2 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -560,85 +560,111 @@ define([ validateOnBlur: true, disabled: false, editable: true, - iconCls: 'btn-select-range', - btnHint: '' + iconCls: 'hide-password', + btnHint: '', + repeatInput: null, + showPwdOnClick: false }, - render : function(parentEl) { + render : function(parentEl) { - if (!this.rendered) { - this.cmpEl = $(this.template({ - id : this.id, - cls : this.cls, - style : this.style, - value : this.value, - type : 'password', - name : this.name, - placeHolder : this.placeHolder, - spellcheck : this.spellcheck, - iconCls : this.options.iconCls, - scope : this - })); + if (!this.rendered) { + this.cmpEl = $(this.template({ + id : this.id, + cls : this.cls, + style : this.style, + value : this.value, + type : 'password', + name : this.name, + placeHolder : this.placeHolder, + spellcheck : this.spellcheck, + iconCls : 'hide-password', + scope : this + })); - if (parentEl) { - this.setElement(parentEl, false); - parentEl.html(this.cmpEl); + if (parentEl) { + this.setElement(parentEl, false); + parentEl.html(this.cmpEl); + } else { + this.$el.html(this.cmpEl); + } } else { - this.$el.html(this.cmpEl); - } - } else { - this.cmpEl = this.$el; - } - - if (!this.rendered) { - var el = this.cmpEl; - - this._btnElm = this.cmpEl.find('button'); - this._button = new Common.UI.Button({ - el: this._button, - hint: this.options.btnHint || '' - }); - this._button.on('click', _.bind(this.onButtonClick, this)); - this._btnElm.on('mousedown', _.bind(this.onMouseDown, this)); - - this._input = this.cmpEl.find('input').addBack().filter('input'); - if (this.editable) { - this._input.on('blur', _.bind(this.onInputChanged, this)); - this._input.on('keypress', _.bind(this.onKeyPress, this)); - this._input.on('keydown', _.bind(this.onKeyDown, this)); - this._input.on('keyup', _.bind(this.onKeyUp, this)); - if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); - if (this.maxLength) this._input.attr('maxlength', this.maxLength); + this.cmpEl = this.$el; } + if (!this.rendered) { + var el = this.cmpEl; - this.setEditable(this.editable); + this._btnElm = this.cmpEl.find('button'); + this._button = new Common.UI.Button({ + el: this._btnElm, + hint: this.options.btnHint || '' + }); + this._button.setIconCls('hide-password'); + this._button.on('click', _.bind(this.onButtonClick, this)); + if(this.options.showPwdOnClick) + this._button.on('click', _.bind(this.passwordShow, this)); + else + this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); - if (this.disabled) - this.setDisabled(this.disabled); + this._input = this.cmpEl.find('input').addBack().filter('input'); + if (this.editable) { + this._input.on('blur', _.bind(this.onInputChanged, this)); + this._input.on('keypress', _.bind(this.onKeyPress, this)); + this._input.on('keydown', _.bind(this.onKeyDown, this)); + this._input.on('keyup', _.bind(this.onKeyUp, this)); + if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); + if (this.maxLength) this._input.attr('maxlength', this.maxLength); + } - if (this._input.closest('.asc-window').length>0) - var onModalClose = function() { - var errorTip = el.find('.input-error').data('bs.tooltip'); - if (errorTip) errorTip.tip().remove(); - Common.NotificationCenter.off({'modal:close': onModalClose}); - }; - Common.NotificationCenter.on({'modal:close': onModalClose}); - } - this.rendered = true; - return this; + this.setEditable(this.editable); + + if (this.disabled) + this.setDisabled(this.disabled); + + if (this._input.closest('.asc-window').length>0) + var onModalClose = function() { + var errorTip = el.find('.input-error').data('bs.tooltip'); + if (errorTip) errorTip.tip().remove(); + Common.NotificationCenter.off({'modal:close': onModalClose}); + }; + Common.NotificationCenter.on({'modal:close': onModalClose}); + } + this.rendered = true; + + return this; }, - onMouseDown: function (e) { - if ((this._input.val() == '')||(this.disabled)) return; - this._btnElm.on('mouseup', _.bind(this.onMouseUp,this)); + passwordShow: function (e) { + if (this.disabled) return; + this._button.setIconCls('btn-sheet-view'); this._input.attr('type', 'text'); + if(this.options.repeatInput) + this.options.repeatInput.attr('type', 'text'); + + if(this.options.showPwdOnClick) + { + this._button.off('click', _.bind(this.passwordShow, this)); + this._button.on('click', _.bind(this.passwordHide, this)); + } + else + this._btnElm.on('mouseup', _.bind(this.passwordHide,this)); }, - onMouseUp: function (e) { + passwordHide: function (e) { + this._button.setIconCls('hide-password'); this._input.attr('type', 'password'); - this._btnElm.off('mouseup', this.onMouseUp); + if(this.options.repeatInput) + this.options.repeatInput.attr('type', 'password'); + + if(this.options.showPwdOnClick) + { + this._button.off('click', _.bind(this.passwordHide, this)); + this._button.on('click', _.bind(this.passwordShow, this)); + } + else + this._btnElm.off('mouseup', this.passwordHide); } } diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index e8e4bfa62..c3c569053 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -200,7 +200,7 @@ define([ this.previewInner = this.previewScrolled.find('div:first-child'); if (this.type == Common.Utils.importTextType.DRM) { - this.inputPwd = new Common.UI.InputField({ + this.inputPwd = new Common.UI.InputFieldBtnPassword({ el: $('#id-password-txt'), type: 'password', validateOnBlur: false, diff --git a/apps/common/main/lib/view/PasswordDialog.js b/apps/common/main/lib/view/PasswordDialog.js index 862446e9c..4687cb341 100644 --- a/apps/common/main/lib/view/PasswordDialog.js +++ b/apps/common/main/lib/view/PasswordDialog.js @@ -93,14 +93,7 @@ define([ if (this.$window) { var me = this; this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); - this.inputPwd = new Common.UI.InputField({ - el: $('#id-password-txt'), - type: 'password', - allowBlank : false, - style : 'width: 100%;', - maxLength: 255, - validateOnBlur: false - }); + this.repeatPwd = new Common.UI.InputField({ el: $('#id-repeat-txt'), type: 'password', @@ -112,6 +105,16 @@ define([ return me.txtIncorrectPwd; } }); + this.inputPwd = new Common.UI.InputFieldBtnPassword({ + el: $('#id-password-txt'), + type: 'password', + allowBlank : false, + style : 'width: 100%;', + maxLength: 255, + validateOnBlur: false, + repeatInput: this.repeatPwd._input, + showPwdOnClick: true + }); } }, diff --git a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js index 970d26f82..4b856c9f3 100644 --- a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js @@ -111,14 +111,7 @@ define([ var me = this; this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); - this.inputPwd = new Common.UI.InputField({ - el: $('#id-password-txt'), - type: 'password', - allowBlank : true, - style : 'width: 100%;', - maxLength: 255, - validateOnBlur: false - }); + this.repeatPwd = new Common.UI.InputField({ el: $('#id-repeat-txt'), type: 'password', @@ -130,6 +123,15 @@ define([ return me.txtIncorrectPwd; } }); + this.inputPwd = new Common.UI.InputFieldBtnPassword({ + el: $('#id-password-txt'), + type: 'password', + allowBlank : true, + style : 'width: 100%;', + maxLength: 255, + validateOnBlur: false, + repeatInput: this.repeatPwd._input + }); if (this.type == 'sheet') { this.optionsList = new Common.UI.ListView({ From 65171005ae1d2763a75367498751289a99f1a0e0 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 8 Oct 2021 03:25:06 +0300 Subject: [PATCH 05/10] Fix Bug 49948 --- apps/common/main/lib/component/InputField.js | 114 +++--------------- apps/common/main/lib/view/OpenDialog.js | 3 +- apps/common/main/lib/view/PasswordDialog.js | 5 +- .../main/app/view/ProtectDialog.js | 5 +- 4 files changed, 24 insertions(+), 103 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index be85272b2..9ba1d34e7 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -430,7 +430,10 @@ define([ disabled: false, editable: true, iconCls: 'btn-select-range', - btnHint: '' + btnHint: '', + repeatInput: null, + showPwdOnClick: false, + btnForPwdShow : false }, template: _.template([ @@ -485,6 +488,16 @@ define([ hint: this.options.btnHint || '' }); this._button.on('click', _.bind(this.onButtonClick, this)); + if((this.type == 'password')&&(this.options.btnForPwdShow)) + { + this._btnElm = this._button.$el; + this._button.setIconCls('hide-password'); + + if(this.options.showPwdOnClick) + this._button.on('click', _.bind(this.passwordShow, this)); + else + this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); + } this._input = this.cmpEl.find('input').addBack().filter('input'); @@ -538,108 +551,13 @@ define([ if (!this.rendered) return; this._button.updateHint(this.options.hint); - } - } - })()); - - Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend((function() { - return { - options : { - id : null, - cls : '', - style : '', - value : '', - name : '', - validation : null, - allowBlank : true, - placeHolder : '', - blankError : null, - spellcheck : false, - maskExp : '', - validateOnChange: false, - validateOnBlur: true, - disabled: false, - editable: true, - iconCls: 'hide-password', - btnHint: '', - repeatInput: null, - showPwdOnClick: false - }, - - render : function(parentEl) { - - if (!this.rendered) { - this.cmpEl = $(this.template({ - id : this.id, - cls : this.cls, - style : this.style, - value : this.value, - type : 'password', - name : this.name, - placeHolder : this.placeHolder, - spellcheck : this.spellcheck, - iconCls : 'hide-password', - scope : this - })); - - if (parentEl) { - this.setElement(parentEl, false); - parentEl.html(this.cmpEl); - } else { - this.$el.html(this.cmpEl); - } - } else { - this.cmpEl = this.$el; - } - - if (!this.rendered) { - var el = this.cmpEl; - - this._btnElm = this.cmpEl.find('button'); - this._button = new Common.UI.Button({ - el: this._btnElm, - hint: this.options.btnHint || '' - }); - this._button.setIconCls('hide-password'); - this._button.on('click', _.bind(this.onButtonClick, this)); - if(this.options.showPwdOnClick) - this._button.on('click', _.bind(this.passwordShow, this)); - else - this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); - - this._input = this.cmpEl.find('input').addBack().filter('input'); - if (this.editable) { - this._input.on('blur', _.bind(this.onInputChanged, this)); - this._input.on('keypress', _.bind(this.onKeyPress, this)); - this._input.on('keydown', _.bind(this.onKeyDown, this)); - this._input.on('keyup', _.bind(this.onKeyUp, this)); - if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); - if (this.maxLength) this._input.attr('maxlength', this.maxLength); - } - - - this.setEditable(this.editable); - - if (this.disabled) - this.setDisabled(this.disabled); - - if (this._input.closest('.asc-window').length>0) - var onModalClose = function() { - var errorTip = el.find('.input-error').data('bs.tooltip'); - if (errorTip) errorTip.tip().remove(); - Common.NotificationCenter.off({'modal:close': onModalClose}); - }; - Common.NotificationCenter.on({'modal:close': onModalClose}); - } - this.rendered = true; - - return this; }, passwordShow: function (e) { if (this.disabled) return; this._button.setIconCls('btn-sheet-view'); this._input.attr('type', 'text'); + if(this.options.repeatInput) this.options.repeatInput.attr('type', 'text'); @@ -655,6 +573,7 @@ define([ passwordHide: function (e) { this._button.setIconCls('hide-password'); this._input.attr('type', 'password'); + if(this.options.repeatInput) this.options.repeatInput.attr('type', 'password'); @@ -666,7 +585,6 @@ define([ else this._btnElm.off('mouseup', this.passwordHide); } - } })()); }); \ No newline at end of file diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index c3c569053..0f55a114c 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -200,10 +200,11 @@ define([ this.previewInner = this.previewScrolled.find('div:first-child'); if (this.type == Common.Utils.importTextType.DRM) { - this.inputPwd = new Common.UI.InputFieldBtnPassword({ + this.inputPwd = new Common.UI.InputFieldBtn({ el: $('#id-password-txt'), type: 'password', validateOnBlur: false, + btnForPwdShow: true, validation : function(value) { return me.txtIncorrectPwd; } diff --git a/apps/common/main/lib/view/PasswordDialog.js b/apps/common/main/lib/view/PasswordDialog.js index 4687cb341..f84ba2d0b 100644 --- a/apps/common/main/lib/view/PasswordDialog.js +++ b/apps/common/main/lib/view/PasswordDialog.js @@ -105,7 +105,7 @@ define([ return me.txtIncorrectPwd; } }); - this.inputPwd = new Common.UI.InputFieldBtnPassword({ + this.inputPwd = new Common.UI.InputFieldBtn({ el: $('#id-password-txt'), type: 'password', allowBlank : false, @@ -113,7 +113,8 @@ define([ maxLength: 255, validateOnBlur: false, repeatInput: this.repeatPwd._input, - showPwdOnClick: true + showPwdOnClick: true, + btnForPwdShow: true }); } }, diff --git a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js index 4b856c9f3..55c0db139 100644 --- a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js @@ -123,14 +123,15 @@ define([ return me.txtIncorrectPwd; } }); - this.inputPwd = new Common.UI.InputFieldBtnPassword({ + this.inputPwd = new Common.UI.InputFieldBtn({ el: $('#id-password-txt'), type: 'password', allowBlank : true, style : 'width: 100%;', maxLength: 255, validateOnBlur: false, - repeatInput: this.repeatPwd._input + repeatInput: this.repeatPwd._input, + btnForPwdShow: true }); if (this.type == 'sheet') { From 63232779e904a5d8aacb5a789ae5e2b1308c255c Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 8 Oct 2021 15:24:41 +0300 Subject: [PATCH 06/10] Fix Bug 49948 --- apps/common/main/lib/component/InputField.js | 93 +++++++++++++------ apps/common/main/lib/view/PasswordDialog.js | 2 +- .../main/app/view/ProtectDialog.js | 3 +- 3 files changed, 66 insertions(+), 32 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 9ba1d34e7..0fc082aa4 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -191,6 +191,7 @@ define([ }, checkPasswordType: function(){ + if(this.type == 'text') return; if (this._input.val() !== '') { (this._input.attr('type') !== 'password') && this._input.attr('type', 'password'); } else { @@ -439,7 +440,7 @@ define([ template: _.template([ '
', ' Date: Fri, 8 Oct 2021 15:27:27 +0300 Subject: [PATCH 07/10] Fix Bug --- apps/common/main/lib/component/InputField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 0fc082aa4..feace90e2 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -488,7 +488,7 @@ define([ el: this.cmpEl.find('button'), hint: this.options.btnHint || '' }); - (this.type === 'text') && this._button.on('click', _.bind(this.onButtonClick, this)); + this._button.on('click', _.bind(this.onButtonClick, this)); this._input = this.cmpEl.find('input').addBack().filter('input'); From 18c637cae3d1fdbfb3ba0ce3e65787936d2fe86c Mon Sep 17 00:00:00 2001 From: OVSharova Date: Sun, 10 Oct 2021 11:11:20 +0300 Subject: [PATCH 08/10] Fix Bug 49948 --- apps/common/main/lib/component/InputField.js | 149 ++++++++++++++---- apps/common/main/lib/view/OpenDialog.js | 4 +- apps/common/main/lib/view/PasswordDialog.js | 6 +- .../main/app/view/ProtectDialog.js | 5 +- 4 files changed, 120 insertions(+), 44 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index feace90e2..08894d125 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -431,10 +431,7 @@ define([ disabled: false, editable: true, iconCls: 'btn-select-range', - btnHint: '', - repeatInput: null, - showPwdOnClick: false, - btnForPwdShow : false + btnHint: '' }, template: _.template([ @@ -500,21 +497,6 @@ define([ if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); if (this.maxLength) this._input.attr('maxlength', this.maxLength); } - if((this.type == 'password')&&(this.options.btnForPwdShow)) - { - this.hidePwd = true; - this.repeatInput= this.options.repeatInput; - this.currentType = 'password'; - this._btnElm = this._button.$el; - this._button.setIconCls('btn-sheet-view'); - this._input.on('input', _.bind(this.checkPasswordType, this)); - this._button.updateHint(this.textHintShowPwd); - if(this.options.showPwdOnClick) - this._button.on('click', _.bind(this.passwordClick, this)); - else - this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); - } - this.setEditable(this.editable); @@ -559,16 +541,113 @@ define([ if (!this.rendered) return; this._button.updateHint(this.options.hint); - }, + } + } + })()); - checkPasswordType: function(){ - if (this._input.val() != '') { - (this._input.attr('type') !== this.currentType) && this._input.attr('type', this.currentType); + Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend((function() { + return { + options: { + id: null, + cls: '', + style: '', + value: '', + name: '', + validation: null, + allowBlank: true, + placeHolder: '', + blankError: null, + spellcheck: false, + maskExp: '', + validateOnChange: false, + validateOnBlur: true, + disabled: false, + editable: true, + iconCls: 'btn-select-range', + btnHint: '', + repeatInput: null, + showPwdOnClick: true + }, + render: function (parentEl) { + var me = this; + + if (!me.rendered) { + this.cmpEl = $(this.template({ + id : this.id, + cls : this.cls, + style : this.style, + value : this.value, + type : 'password', + name : this.name, + placeHolder : this.placeHolder, + spellcheck : this.spellcheck, + iconCls : this.options.iconCls, + scope : me + })); + + if (parentEl) { + this.setElement(parentEl, false); + parentEl.html(this.cmpEl); + } else { + this.$el.html(this.cmpEl); + } } else { - this._input.attr('type', 'text'); + this.cmpEl = this.$el; } - }, + if (!me.rendered) { + var el = this.cmpEl; + + this._button = new Common.UI.Button({ + el: this.cmpEl.find('button'), + hint: this.options.btnHint || '' + }); + this._button.on('click', _.bind(this.onButtonClick, this)); + + this._input = this.cmpEl.find('input').addBack().filter('input'); + + if (this.editable) { + this._input.on('blur', _.bind(this.onInputChanged, this)); + this._input.on('keypress', _.bind(this.onKeyPress, this)); + this._input.on('keydown', _.bind(this.onKeyDown, this)); + this._input.on('keyup', _.bind(this.onKeyUp, this)); + if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); + if (this.maxLength) this._input.attr('maxlength', this.maxLength); + } + + this.hidePwd = true; + this.repeatInput= this.options.repeatInput; + this._btnElm = this._button.$el; + this._button.setIconCls('btn-sheet-view'); + this._input.on('input', _.bind(this.checkPasswordType, this)); + this._button.updateHint(this.textHintShowPwd); + if(this.options.showPwdOnClick) + this._button.on('click', _.bind(this.passwordClick, this)); + else + this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); + + + + this.setEditable(this.editable); + + if (this.disabled) + this.setDisabled(this.disabled); + + if (this._input.closest('.asc-window').length>0) + var onModalClose = function() { + var errorTip = el.find('.input-error').data('bs.tooltip'); + if (errorTip) errorTip.tip().remove(); + Common.NotificationCenter.off({'modal:close': onModalClose}); + }; + Common.NotificationCenter.on({'modal:close': onModalClose}); + } + + me.rendered = true; + if (me.value) + me.setValue(me.value); + + return this; + }, passwordClick: function (e) { @@ -585,12 +664,12 @@ define([ passwordShow: function (e) { if (this.disabled) return; this._button.setIconCls('hide-password'); - this.currentType = 'text'; + this.type = 'text'; - this._input.attr('type', this.currentType); + this._input.attr('type', this.type); if(this.repeatInput) { - this.repeatInput.type = this.currentType; - this.repeatInput._input.attr('type', this.currentType); + this.repeatInput.type = this.type; + this.repeatInput._input.attr('type', this.type); } if(this.options.showPwdOnClick) { @@ -602,12 +681,12 @@ define([ passwordHide: function (e) { this._button.setIconCls('btn-sheet-view'); - this.currentType = 'password'; + this.type = 'password'; - (this._input.val() !== '') && this._input.attr('type', this.currentType); + (this._input.val() !== '') && this._input.attr('type', this.type); if(this.repeatInput) { - this.repeatInput.type = this.currentType; - (this.repeatInput._input.val() !== '') && this.repeatInput._input.attr('type', this.currentType); + this.repeatInput.type = this.type; + (this.repeatInput._input.val() !== '') && this.repeatInput._input.attr('type', this.type); } if(this.options.showPwdOnClick) { @@ -616,8 +695,8 @@ define([ else this._btnElm.off('mouseup', this.passwordHide); }, - textHintShowPwd: 'show password', - textHintHidePwd: 'hide password' + textHintShowPwd: 'Show password', + textHintHidePwd: 'Hide password' } })()); }); \ No newline at end of file diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 0f55a114c..3864aaebb 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -200,11 +200,11 @@ define([ this.previewInner = this.previewScrolled.find('div:first-child'); if (this.type == Common.Utils.importTextType.DRM) { - this.inputPwd = new Common.UI.InputFieldBtn({ + this.inputPwd = new Common.UI.InputFieldBtnPassword({ el: $('#id-password-txt'), type: 'password', validateOnBlur: false, - btnForPwdShow: true, + showPwdOnClick: false, validation : function(value) { return me.txtIncorrectPwd; } diff --git a/apps/common/main/lib/view/PasswordDialog.js b/apps/common/main/lib/view/PasswordDialog.js index 52db23ce8..e30b36921 100644 --- a/apps/common/main/lib/view/PasswordDialog.js +++ b/apps/common/main/lib/view/PasswordDialog.js @@ -105,16 +105,14 @@ define([ return me.txtIncorrectPwd; } }); - this.inputPwd = new Common.UI.InputFieldBtn({ + this.inputPwd = new Common.UI.InputFieldBtnPassword({ el: $('#id-password-txt'), type: 'password', allowBlank : false, style : 'width: 100%;', maxLength: 255, validateOnBlur: false, - repeatInput: this.repeatPwd, - showPwdOnClick: true, - btnForPwdShow: true + repeatInput: this.repeatPwd }); } }, diff --git a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js index b8961f36d..0238e59b5 100644 --- a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js @@ -124,15 +124,14 @@ define([ } }); - this.inputPwd = new Common.UI.InputFieldBtn({ + this.inputPwd = new Common.UI.InputFieldBtnPassword({ el: $('#id-password-txt'), type: 'password', allowBlank : true, style : 'width: 100%;', maxLength: 255, validateOnBlur: false, - repeatInput: this.repeatPwd, - btnForPwdShow: true + repeatInput: this.repeatPwd }); if (this.type == 'sheet') { From eecfd0a5ff6c399b014d54d10e18bb161bba27aa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 11 Oct 2021 13:05:49 +0300 Subject: [PATCH 09/10] Refactoring input for password --- apps/common/main/lib/component/InputField.js | 100 ++++--------------- apps/spreadsheeteditor/main/locale/ru.json | 2 + 2 files changed, 24 insertions(+), 78 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 08894d125..51c77c548 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -483,6 +483,7 @@ define([ this._button = new Common.UI.Button({ el: this.cmpEl.find('button'), + iconCls: this.options.iconCls, hint: this.options.btnHint || '' }); this._button.on('click', _.bind(this.onButtonClick, this)); @@ -545,7 +546,7 @@ define([ } })()); - Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend((function() { + Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend(_.extend((function() { return { options: { id: null, @@ -563,88 +564,31 @@ define([ validateOnBlur: true, disabled: false, editable: true, - iconCls: 'btn-select-range', + iconCls: 'btn-sheet-view', btnHint: '', repeatInput: null, showPwdOnClick: true }, + + initialize : function(options) { + options = options || {}; + options.btnHint = options.btnHint || this.textHintShowPwd; + + Common.UI.InputFieldBtn.prototype.initialize.call(this, options); + + this.hidePwd = true; + this.repeatInput= this.options.repeatInput; + }, + render: function (parentEl) { - var me = this; + Common.UI.InputFieldBtn.prototype.render.call(this, parentEl); - if (!me.rendered) { - this.cmpEl = $(this.template({ - id : this.id, - cls : this.cls, - style : this.style, - value : this.value, - type : 'password', - name : this.name, - placeHolder : this.placeHolder, - spellcheck : this.spellcheck, - iconCls : this.options.iconCls, - scope : me - })); - - if (parentEl) { - this.setElement(parentEl, false); - parentEl.html(this.cmpEl); - } else { - this.$el.html(this.cmpEl); - } - } else { - this.cmpEl = this.$el; - } - - if (!me.rendered) { - var el = this.cmpEl; - - this._button = new Common.UI.Button({ - el: this.cmpEl.find('button'), - hint: this.options.btnHint || '' - }); - this._button.on('click', _.bind(this.onButtonClick, this)); - - this._input = this.cmpEl.find('input').addBack().filter('input'); - - if (this.editable) { - this._input.on('blur', _.bind(this.onInputChanged, this)); - this._input.on('keypress', _.bind(this.onKeyPress, this)); - this._input.on('keydown', _.bind(this.onKeyDown, this)); - this._input.on('keyup', _.bind(this.onKeyUp, this)); - if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this)); - if (this.maxLength) this._input.attr('maxlength', this.maxLength); - } - - this.hidePwd = true; - this.repeatInput= this.options.repeatInput; - this._btnElm = this._button.$el; - this._button.setIconCls('btn-sheet-view'); - this._input.on('input', _.bind(this.checkPasswordType, this)); - this._button.updateHint(this.textHintShowPwd); - if(this.options.showPwdOnClick) - this._button.on('click', _.bind(this.passwordClick, this)); - else - this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); - - - - this.setEditable(this.editable); - - if (this.disabled) - this.setDisabled(this.disabled); - - if (this._input.closest('.asc-window').length>0) - var onModalClose = function() { - var errorTip = el.find('.input-error').data('bs.tooltip'); - if (errorTip) errorTip.tip().remove(); - Common.NotificationCenter.off({'modal:close': onModalClose}); - }; - Common.NotificationCenter.on({'modal:close': onModalClose}); - } - - me.rendered = true; - if (me.value) - me.setValue(me.value); + this._btnElm = this._button.$el; + this._input.on('input', _.bind(this.checkPasswordType, this)); + if(this.options.showPwdOnClick) + this._button.on('click', _.bind(this.passwordClick, this)); + else + this._btnElm.on('mousedown', _.bind(this.passwordShow, this)); return this; }, @@ -698,5 +642,5 @@ define([ textHintShowPwd: 'Show password', textHintHidePwd: 'Hide password' } - })()); + })(), Common.UI.InputFieldBtnPassword || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 3dfc56406..e8c14e46e 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -114,6 +114,8 @@ "Common.UI.ExtendedColorDialog.textNew": "Новый", "Common.UI.ExtendedColorDialog.textRGBErr": "Введено некорректное значение.
Пожалуйста, введите числовое значение от 0 до 255.", "Common.UI.HSBColorPicker.textNoColor": "Без цвета", + "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Показать пароль", + "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Скрыть пароль", "Common.UI.SearchDialog.textHighlight": "Выделить результаты", "Common.UI.SearchDialog.textMatchCase": "С учетом регистра", "Common.UI.SearchDialog.textReplaceDef": "Введите текст для замены", From 4037e506bec9d5f94f0413773311eeee413482b3 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Mon, 11 Oct 2021 16:04:00 +0300 Subject: [PATCH 10/10] Add hints to local --- apps/common/main/lib/component/InputField.js | 10 +++++++--- apps/common/main/lib/view/OpenDialog.js | 2 +- apps/documenteditor/main/locale/en.json | 2 ++ apps/presentationeditor/main/locale/en.json | 2 ++ apps/spreadsheeteditor/main/app/view/ProtectDialog.js | 3 ++- apps/spreadsheeteditor/main/locale/en.json | 2 ++ 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 51c77c548..2ba3f7653 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -619,8 +619,10 @@ define([ if(this.options.showPwdOnClick) { this._button.updateHint(this.textHintHidePwd); } - else - this._btnElm.on('mouseup', _.bind(this.passwordHide,this)); + else { + this._btnElm.on('mouseup', _.bind(this.passwordHide, this)); + this._btnElm.on('mouseout', _.bind(this.passwordHide, this)); + } }, passwordHide: function (e) { @@ -636,8 +638,10 @@ define([ if(this.options.showPwdOnClick) { this._button.updateHint(this.textHintShowPwd); } - else + else { this._btnElm.off('mouseup', this.passwordHide); + this._btnElm.off('mouseout', this.passwordHide); + } }, textHintShowPwd: 'Show password', textHintHidePwd: 'Hide password' diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index 3864aaebb..0934a73d9 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -204,7 +204,7 @@ define([ el: $('#id-password-txt'), type: 'password', validateOnBlur: false, - showPwdOnClick: false, + showPwdOnClick: true, validation : function(value) { return me.txtIncorrectPwd; } diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 2371d9ada..cef0f0004 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -168,6 +168,8 @@ "Common.UI.ExtendedColorDialog.textNew": "New", "Common.UI.ExtendedColorDialog.textRGBErr": "The entered value is incorrect.
Please enter a numeric value between 0 and 255.", "Common.UI.HSBColorPicker.textNoColor": "No Color", + "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Hide password", + "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Show password", "Common.UI.SearchDialog.textHighlight": "Highlight results", "Common.UI.SearchDialog.textMatchCase": "Case sensitive", "Common.UI.SearchDialog.textReplaceDef": "Enter the replacement text", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ff9853868..2939555b6 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -61,6 +61,8 @@ "Common.UI.ExtendedColorDialog.textNew": "New", "Common.UI.ExtendedColorDialog.textRGBErr": "The entered value is incorrect.
Please enter a numeric value between 0 and 255.", "Common.UI.HSBColorPicker.textNoColor": "No Color", + "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Hide password", + "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Show password", "Common.UI.SearchDialog.textHighlight": "Highlight results", "Common.UI.SearchDialog.textMatchCase": "Case sensitive", "Common.UI.SearchDialog.textReplaceDef": "Enter the replacement text", diff --git a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js index 0238e59b5..379502991 100644 --- a/apps/spreadsheeteditor/main/app/view/ProtectDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ProtectDialog.js @@ -131,7 +131,8 @@ define([ style : 'width: 100%;', maxLength: 255, validateOnBlur: false, - repeatInput: this.repeatPwd + repeatInput: this.repeatPwd, + showPwdOnClick: true }); if (this.type == 'sheet') { diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 92834a8e1..916f80f86 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -114,6 +114,8 @@ "Common.UI.ExtendedColorDialog.textNew": "New", "Common.UI.ExtendedColorDialog.textRGBErr": "The entered value is incorrect.
Please enter a numeric value between 0 and 255.", "Common.UI.HSBColorPicker.textNoColor": "No Color", + "Common.UI.InputFieldBtnPassword.textHintHidePwd": "Hide password", + "Common.UI.InputFieldBtnPassword.textHintShowPwd": "Show password", "Common.UI.SearchDialog.textHighlight": "Highlight results", "Common.UI.SearchDialog.textMatchCase": "Case sensitive", "Common.UI.SearchDialog.textReplaceDef": "Enter the replacement text",