diff --git a/apps/common/main/lib/view/Protection.js b/apps/common/main/lib/view/Protection.js index f9b22360a..3e160a629 100644 --- a/apps/common/main/lib/view/Protection.js +++ b/apps/common/main/lib/view/Protection.js @@ -78,6 +78,9 @@ define([ }); }); + this.btnPwd.on('click', function (b, e) { + !b.pressed && me.fireEvent('protect:password', [b, 'delete']); + }); this.btnPwd.menu.on('item:click', function (menu, item, e) { me.fireEvent('protect:password', [menu, item.value]); }); @@ -132,6 +135,8 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-ic-protect', caption: this.txtEncrypt, + split: true, + enableToggle: true, menu: true, visible: false, dataHint : '1', @@ -172,7 +177,7 @@ define([ if ( config.canProtect) { if ( config.isPasswordSupport) { me.btnAddPwd.updateHint(me.hintAddPwd); - me.btnPwd.updateHint(me.hintPwd); + me.btnPwd.updateHint([me.hintDelPwd, me.hintPwd]); me.btnPwd.setMenu( new Common.UI.Menu({ @@ -342,6 +347,7 @@ define([ } }, this); this.btnPwd.setVisible(hasPassword); + this.btnPwd.toggle(hasPassword, true); }, txtEncrypt: 'Encrypt', @@ -353,7 +359,8 @@ define([ txtDeletePwd: 'Delete password', txtAddPwd: 'Add password', txtInvisibleSignature: 'Add digital signature', - txtSignatureLine: 'Add Signature line' + txtSignatureLine: 'Add Signature line', + hintDelPwd: 'Delete password' } }()), Common.Views.Protection || {})); }); \ No newline at end of file diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less index 1f98dfd8b..192d29eba 100644 --- a/apps/common/main/resources/less/buttons.less +++ b/apps/common/main/resources/less/buttons.less @@ -215,6 +215,12 @@ &.split { > .inner-box-icon { .box-shadow(none); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + > .inner-box-caption { + border-top-left-radius: 0; + border-top-right-radius: 0; } } } @@ -232,7 +238,7 @@ .inner-box-caption { line-height: 18px; - padding: 1px 3px; + padding: 1px 4px 1px 3px; display: flex; //align-items: center; align-items: start; diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index ae8282275..35f727803 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -362,6 +362,7 @@ "Common.Views.Plugins.textStart": "Start", "Common.Views.Plugins.textStop": "Stop", "Common.Views.Protection.hintAddPwd": "Encrypt with password", + "Common.Views.Protection.hintDelPwd": "Delete password", "Common.Views.Protection.hintPwd": "Change or delete password", "Common.Views.Protection.hintSignature": "Add digital signature or signature line", "Common.Views.Protection.txtAddPwd": "Add password", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ee672b11b..70e423a64 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -464,6 +464,7 @@ "Common.Views.Plugins.textStart": "Start", "Common.Views.Plugins.textStop": "Stop", "Common.Views.Protection.hintAddPwd": "Encrypt with password", + "Common.Views.Protection.hintDelPwd": "Delete password", "Common.Views.Protection.hintPwd": "Change or delete password", "Common.Views.Protection.hintSignature": "Add digital signature or signature line", "Common.Views.Protection.txtAddPwd": "Add password", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 6e8c543e8..bfda66b47 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -310,6 +310,7 @@ "Common.Views.Plugins.textStart": "Start", "Common.Views.Plugins.textStop": "Stop", "Common.Views.Protection.hintAddPwd": "Encrypt with password", + "Common.Views.Protection.hintDelPwd": "Delete password", "Common.Views.Protection.hintPwd": "Change or delete password", "Common.Views.Protection.hintSignature": "Add digital signature or signature line", "Common.Views.Protection.txtAddPwd": "Add password",