Refactoring contex menu for signature.
This commit is contained in:
parent
64ae0da22b
commit
dbc71821ae
|
@ -204,13 +204,6 @@ define([
|
||||||
|
|
||||||
win.show();
|
win.show();
|
||||||
|
|
||||||
// var props = new AscCommon.asc_CSignatureLine();
|
|
||||||
// props.asc_setSigner1("s1");
|
|
||||||
// props.asc_setSigner2("s2");
|
|
||||||
// props.asc_setEmail('email');
|
|
||||||
// props.asc_setInstructions('instructions');
|
|
||||||
// props.asc_setShowDate(true);
|
|
||||||
|
|
||||||
if (guid)
|
if (guid)
|
||||||
win.setSettings(this.api.asc_getSignatureSetup(guid));
|
win.setSettings(this.api.asc_getSignatureSetup(guid));
|
||||||
},
|
},
|
||||||
|
|
|
@ -1822,8 +1822,8 @@ define([
|
||||||
this.viewModeMenu = new Common.UI.Menu({
|
this.viewModeMenu = new Common.UI.Menu({
|
||||||
initMenu: function (value) {
|
initMenu: function (value) {
|
||||||
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties())),
|
var isInChart = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ChartProperties())),
|
||||||
signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.get_SignatureGuid() : undefined,
|
signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.asc_getSignatureId() : undefined,
|
||||||
signProps = (signGuid) ? me.api.asc_getLineInfo(signGuid) : null,
|
signProps = (signGuid) ? me.api.asc_getSignatureSetup(signGuid) : null,
|
||||||
isInSign = !!signProps && me._canProtect,
|
isInSign = !!signProps && me._canProtect,
|
||||||
canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled;
|
canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled;
|
||||||
|
|
||||||
|
@ -1840,7 +1840,7 @@ define([
|
||||||
|
|
||||||
if (isInSign) {
|
if (isInSign) {
|
||||||
menuSignatureViewSign.cmpEl.attr('data-value', signGuid); // sign
|
menuSignatureViewSign.cmpEl.attr('data-value', signGuid); // sign
|
||||||
menuSignatureDetails.cmpEl.attr('data-value', signProps.asc_getCertificateId()); // view certificate
|
menuSignatureDetails.cmpEl.attr('data-value', signProps.asc_getId()); // view certificate
|
||||||
menuSignatureViewSetup.cmpEl.attr('data-value', signGuid); // view signature settings
|
menuSignatureViewSetup.cmpEl.attr('data-value', signGuid); // view signature settings
|
||||||
menuSignatureRemove.cmpEl.attr('data-value', signGuid);
|
menuSignatureRemove.cmpEl.attr('data-value', signGuid);
|
||||||
}
|
}
|
||||||
|
@ -2267,7 +2267,7 @@ define([
|
||||||
menuImgCut.setDisabled(islocked || !cancopy);
|
menuImgCut.setDisabled(islocked || !cancopy);
|
||||||
menuImgPaste.setDisabled(islocked);
|
menuImgPaste.setDisabled(islocked);
|
||||||
|
|
||||||
var signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.get_SignatureGuid() : undefined,
|
var signGuid = (value.imgProps && value.imgProps.value && me.mode.canProtect) ? value.imgProps.value.asc_getSignatureId() : undefined,
|
||||||
isInSign = (signGuid !== undefined);
|
isInSign = (signGuid !== undefined);
|
||||||
menuSignatureEditSign.setVisible(isInSign);
|
menuSignatureEditSign.setVisible(isInSign);
|
||||||
menuSignatureEditSetup.setVisible(isInSign);
|
menuSignatureEditSetup.setVisible(isInSign);
|
||||||
|
|
|
@ -1298,7 +1298,7 @@ define([
|
||||||
isimagemenu = true;
|
isimagemenu = true;
|
||||||
}
|
}
|
||||||
if (this.permissions.canProtect)
|
if (this.permissions.canProtect)
|
||||||
signGuid = elValue.get_SignatureGuid();
|
signGuid = elValue.asc_getSignatureId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1523,12 +1523,12 @@ define([
|
||||||
var selectedObjects = this.api.asc_getGraphicObjectProps();
|
var selectedObjects = this.api.asc_getGraphicObjectProps();
|
||||||
for (var i = 0; i < selectedObjects.length; i++) {
|
for (var i = 0; i < selectedObjects.length; i++) {
|
||||||
if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
|
if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
|
||||||
signGuid = selectedObjects[i].asc_getObjectValue().get_SignatureGuid();
|
signGuid = selectedObjects[i].asc_getObjectValue().asc_getSignatureId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var signProps = (signGuid) ? this.api.asc_getLineInfo(signGuid) : null,
|
var signProps = (signGuid) ? this.api.asc_getSignatureSetup(signGuid) : null,
|
||||||
isInSign = !!signProps && this._canProtect,
|
isInSign = !!signProps && this._canProtect,
|
||||||
canComment = iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled;
|
canComment = iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments && !this._isDisabled;
|
||||||
|
|
||||||
|
@ -1545,7 +1545,7 @@ define([
|
||||||
|
|
||||||
if (isInSign) {
|
if (isInSign) {
|
||||||
documentHolder.menuSignatureViewSign.cmpEl.attr('data-value', signGuid); // sign
|
documentHolder.menuSignatureViewSign.cmpEl.attr('data-value', signGuid); // sign
|
||||||
documentHolder.menuSignatureDetails.cmpEl.attr('data-value', signProps.asc_getCertificateId()); // view certificate
|
documentHolder.menuSignatureDetails.cmpEl.attr('data-value', signProps.asc_getId()); // view certificate
|
||||||
documentHolder.menuSignatureViewSetup.cmpEl.attr('data-value', signGuid); // view signature settings
|
documentHolder.menuSignatureViewSetup.cmpEl.attr('data-value', signGuid); // view signature settings
|
||||||
documentHolder.menuSignatureRemove.cmpEl.attr('data-value', signGuid);
|
documentHolder.menuSignatureRemove.cmpEl.attr('data-value', signGuid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue