Signature refactoring.
This commit is contained in:
parent
16c1af8a2b
commit
26aa0afc45
|
@ -119,14 +119,14 @@ define([
|
||||||
if ( this.appConfig.isDesktopApp && this.appConfig.isOffline ) {
|
if ( this.appConfig.isDesktopApp && this.appConfig.isOffline ) {
|
||||||
this.btnAddPwd = new Common.UI.Button({
|
this.btnAddPwd = new Common.UI.Button({
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
iconCls: 'review-prev',
|
iconCls: 'btn-ic-protect',
|
||||||
caption: this.txtEncrypt
|
caption: this.txtEncrypt
|
||||||
});
|
});
|
||||||
this.btnsAddPwd.push(this.btnAddPwd);
|
this.btnsAddPwd.push(this.btnAddPwd);
|
||||||
|
|
||||||
this.btnPwd = new Common.UI.Button({
|
this.btnPwd = new Common.UI.Button({
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
iconCls: 'btn-ic-reviewview',
|
iconCls: 'btn-ic-protect',
|
||||||
caption: this.txtEncrypt,
|
caption: this.txtEncrypt,
|
||||||
menu: true,
|
menu: true,
|
||||||
visible: false
|
visible: false
|
||||||
|
@ -135,7 +135,7 @@ define([
|
||||||
if (this.appConfig.canProtect) {
|
if (this.appConfig.canProtect) {
|
||||||
this.btnSignature = new Common.UI.Button({
|
this.btnSignature = new Common.UI.Button({
|
||||||
cls: 'btn-toolbar x-huge icon-top',
|
cls: 'btn-toolbar x-huge icon-top',
|
||||||
iconCls: 'btn-ic-reviewview',
|
iconCls: 'btn-ic-signature',
|
||||||
caption: this.txtSignature,
|
caption: this.txtSignature,
|
||||||
menu: (this.appPrefix !== 'pe-')
|
menu: (this.appPrefix !== 'pe-')
|
||||||
});
|
});
|
||||||
|
|
|
@ -275,6 +275,8 @@
|
||||||
.button-normal-icon(~'x-huge .btn-ic-docspell', 12, @toolbar-big-icon-size);
|
.button-normal-icon(~'x-huge .btn-ic-docspell', 12, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(~'x-huge .btn-ic-review', 13, @toolbar-big-icon-size);
|
.button-normal-icon(~'x-huge .btn-ic-review', 13, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(~'x-huge .btn-ic-reviewview', 30, @toolbar-big-icon-size);
|
.button-normal-icon(~'x-huge .btn-ic-reviewview', 30, @toolbar-big-icon-size);
|
||||||
|
.button-normal-icon(~'x-huge .btn-ic-protect', 35, @toolbar-big-icon-size);
|
||||||
|
.button-normal-icon(~'x-huge .btn-ic-signature', 36, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(review-save, 14, @toolbar-big-icon-size);
|
.button-normal-icon(review-save, 14, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(review-deny, 15, @toolbar-big-icon-size);
|
.button-normal-icon(review-deny, 15, @toolbar-big-icon-size);
|
||||||
.button-normal-icon(review-next, 16, @toolbar-big-icon-size);
|
.button-normal-icon(review-next, 16, @toolbar-big-icon-size);
|
||||||
|
|
|
@ -2268,7 +2268,7 @@ define([
|
||||||
menuImgPaste.setDisabled(islocked);
|
menuImgPaste.setDisabled(islocked);
|
||||||
|
|
||||||
var signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.asc_getSignatureId() : undefined,
|
var signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.asc_getSignatureId() : undefined,
|
||||||
isInSign = (signGuid !== undefined);
|
isInSign = !!signGuid;
|
||||||
menuSignatureEditSign.setVisible(isInSign);
|
menuSignatureEditSign.setVisible(isInSign);
|
||||||
menuSignatureEditSetup.setVisible(isInSign);
|
menuSignatureEditSetup.setVisible(isInSign);
|
||||||
menuEditSignSeparator.setVisible(isInSign);
|
menuEditSignSeparator.setVisible(isInSign);
|
||||||
|
@ -3345,7 +3345,7 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onSignatureClick: function(menu, item) {
|
onSignatureClick: function(item) {
|
||||||
var datavalue = item.cmpEl.attr('data-value');
|
var datavalue = item.cmpEl.attr('data-value');
|
||||||
switch (item.value) {
|
switch (item.value) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -3355,7 +3355,7 @@ define([
|
||||||
this.api.asc_ViewCertificate(datavalue); //certificate id
|
this.api.asc_ViewCertificate(datavalue); //certificate id
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Common.NotificationCenter.trigger('protect:signature', 'visible', !this._isDisabled, datavalue);//guid, can edit settings for requested signature
|
Common.NotificationCenter.trigger('protect:signature', 'visible', this._isDisabled, datavalue);//guid, can edit settings for requested signature
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.api.asc_RemoveSignature(datavalue); //guid
|
this.api.asc_RemoveSignature(datavalue); //guid
|
||||||
|
|
|
@ -1313,7 +1313,7 @@ define([
|
||||||
documentHolder.mnuImgAdvanced.setVisible(isimagemenu && !isshapemenu && !ischartmenu);
|
documentHolder.mnuImgAdvanced.setVisible(isimagemenu && !isshapemenu && !ischartmenu);
|
||||||
documentHolder.mnuImgAdvanced.setDisabled(isObjLocked);
|
documentHolder.mnuImgAdvanced.setDisabled(isObjLocked);
|
||||||
|
|
||||||
var isInSign = (signGuid !== undefined);
|
var isInSign = !!signGuid;
|
||||||
documentHolder.menuSignatureEditSign.setVisible(isInSign);
|
documentHolder.menuSignatureEditSign.setVisible(isInSign);
|
||||||
documentHolder.menuSignatureEditSetup.setVisible(isInSign);
|
documentHolder.menuSignatureEditSetup.setVisible(isInSign);
|
||||||
documentHolder.menuEditSignSeparator.setVisible(isInSign);
|
documentHolder.menuEditSignSeparator.setVisible(isInSign);
|
||||||
|
@ -2487,7 +2487,7 @@ define([
|
||||||
_conf && view.paraBulletsPicker.selectRecord(_conf.rec, true);
|
_conf && view.paraBulletsPicker.selectRecord(_conf.rec, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSignatureClick: function(menu, item) {
|
onSignatureClick: function(item) {
|
||||||
var datavalue = item.cmpEl.attr('data-value');
|
var datavalue = item.cmpEl.attr('data-value');
|
||||||
switch (item.value) {
|
switch (item.value) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -2497,7 +2497,7 @@ define([
|
||||||
this.api.asc_ViewCertificate(datavalue); //certificate id
|
this.api.asc_ViewCertificate(datavalue); //certificate id
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Common.NotificationCenter.trigger('protect:signature', 'visible', !this._isDisabled, datavalue);//guid, can edit settings for requested signature
|
Common.NotificationCenter.trigger('protect:signature', 'visible', this._isDisabled, datavalue);//guid, can edit settings for requested signature
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.api.asc_RemoveSignature(datavalue); //guid
|
this.api.asc_RemoveSignature(datavalue); //guid
|
||||||
|
|
Loading…
Reference in a new issue