Set encrypt button pressed when file is protected
This commit is contained in:
parent
3dcf0f6f4f
commit
9debf2511e
|
@ -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) {
|
this.btnPwd.menu.on('item:click', function (menu, item, e) {
|
||||||
me.fireEvent('protect:password', [menu, item.value]);
|
me.fireEvent('protect:password', [menu, item.value]);
|
||||||
});
|
});
|
||||||
|
@ -132,6 +135,8 @@ define([
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
iconCls: 'toolbar__icon btn-ic-protect',
|
iconCls: 'toolbar__icon btn-ic-protect',
|
||||||
caption: this.txtEncrypt,
|
caption: this.txtEncrypt,
|
||||||
|
split: true,
|
||||||
|
enableToggle: true,
|
||||||
menu: true,
|
menu: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
dataHint : '1',
|
dataHint : '1',
|
||||||
|
@ -172,7 +177,7 @@ define([
|
||||||
if ( config.canProtect) {
|
if ( config.canProtect) {
|
||||||
if ( config.isPasswordSupport) {
|
if ( config.isPasswordSupport) {
|
||||||
me.btnAddPwd.updateHint(me.hintAddPwd);
|
me.btnAddPwd.updateHint(me.hintAddPwd);
|
||||||
me.btnPwd.updateHint(me.hintPwd);
|
me.btnPwd.updateHint([me.hintDelPwd, me.hintPwd]);
|
||||||
|
|
||||||
me.btnPwd.setMenu(
|
me.btnPwd.setMenu(
|
||||||
new Common.UI.Menu({
|
new Common.UI.Menu({
|
||||||
|
@ -342,6 +347,7 @@ define([
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
this.btnPwd.setVisible(hasPassword);
|
this.btnPwd.setVisible(hasPassword);
|
||||||
|
this.btnPwd.toggle(hasPassword, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
txtEncrypt: 'Encrypt',
|
txtEncrypt: 'Encrypt',
|
||||||
|
@ -353,7 +359,8 @@ define([
|
||||||
txtDeletePwd: 'Delete password',
|
txtDeletePwd: 'Delete password',
|
||||||
txtAddPwd: 'Add password',
|
txtAddPwd: 'Add password',
|
||||||
txtInvisibleSignature: 'Add digital signature',
|
txtInvisibleSignature: 'Add digital signature',
|
||||||
txtSignatureLine: 'Add Signature line'
|
txtSignatureLine: 'Add Signature line',
|
||||||
|
hintDelPwd: 'Delete password'
|
||||||
}
|
}
|
||||||
}()), Common.Views.Protection || {}));
|
}()), Common.Views.Protection || {}));
|
||||||
});
|
});
|
|
@ -215,6 +215,12 @@
|
||||||
&.split {
|
&.split {
|
||||||
> .inner-box-icon {
|
> .inner-box-icon {
|
||||||
.box-shadow(none);
|
.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 {
|
.inner-box-caption {
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
padding: 1px 3px;
|
padding: 1px 4px 1px 3px;
|
||||||
display: flex;
|
display: flex;
|
||||||
//align-items: center;
|
//align-items: center;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
|
|
|
@ -362,6 +362,7 @@
|
||||||
"Common.Views.Plugins.textStart": "Start",
|
"Common.Views.Plugins.textStart": "Start",
|
||||||
"Common.Views.Plugins.textStop": "Stop",
|
"Common.Views.Plugins.textStop": "Stop",
|
||||||
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
||||||
|
"Common.Views.Protection.hintDelPwd": "Delete password",
|
||||||
"Common.Views.Protection.hintPwd": "Change or delete password",
|
"Common.Views.Protection.hintPwd": "Change or delete password",
|
||||||
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
||||||
"Common.Views.Protection.txtAddPwd": "Add password",
|
"Common.Views.Protection.txtAddPwd": "Add password",
|
||||||
|
|
|
@ -464,6 +464,7 @@
|
||||||
"Common.Views.Plugins.textStart": "Start",
|
"Common.Views.Plugins.textStart": "Start",
|
||||||
"Common.Views.Plugins.textStop": "Stop",
|
"Common.Views.Plugins.textStop": "Stop",
|
||||||
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
||||||
|
"Common.Views.Protection.hintDelPwd": "Delete password",
|
||||||
"Common.Views.Protection.hintPwd": "Change or delete password",
|
"Common.Views.Protection.hintPwd": "Change or delete password",
|
||||||
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
||||||
"Common.Views.Protection.txtAddPwd": "Add password",
|
"Common.Views.Protection.txtAddPwd": "Add password",
|
||||||
|
|
|
@ -310,6 +310,7 @@
|
||||||
"Common.Views.Plugins.textStart": "Start",
|
"Common.Views.Plugins.textStart": "Start",
|
||||||
"Common.Views.Plugins.textStop": "Stop",
|
"Common.Views.Plugins.textStop": "Stop",
|
||||||
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
"Common.Views.Protection.hintAddPwd": "Encrypt with password",
|
||||||
|
"Common.Views.Protection.hintDelPwd": "Delete password",
|
||||||
"Common.Views.Protection.hintPwd": "Change or delete password",
|
"Common.Views.Protection.hintPwd": "Change or delete password",
|
||||||
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
"Common.Views.Protection.hintSignature": "Add digital signature or signature line",
|
||||||
"Common.Views.Protection.txtAddPwd": "Add password",
|
"Common.Views.Protection.txtAddPwd": "Add password",
|
||||||
|
|
Loading…
Reference in a new issue