Use api.asc_isSignaturesSupport() function for signature supporting.

This commit is contained in:
Julia Radzhabova 2017-09-18 10:44:27 +03:00
parent 1575fc014f
commit 0987210cb6
9 changed files with 12 additions and 9 deletions

View file

@ -999,6 +999,7 @@ define([
this.appOptions.forcesave = this.appOptions.canForcesave;
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
this.appOptions.isTrial = params.asc_getTrial();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
if ( this.appOptions.isLightVersion ) {
this.appOptions.canUseHistory =

View file

@ -240,7 +240,7 @@ define([
applyMode: function() {
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.canProtect) ?'show':'hide']();
this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
this.miNew[this.mode.canCreateNew?'show':'hide']();
@ -277,7 +277,7 @@ define([
}
}
if (this.mode.isDesktopApp) {
if (this.mode.canProtect) {
// this.$el.find('#fm-btn-back').hide();
this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);

View file

@ -195,7 +195,7 @@ define([
this.mergeSettings = new DE.Views.MailMergeSettings();
}
if (mode && mode.isDesktopApp) {
if (mode && mode.canProtect) {
this.btnSignature = new Common.UI.Button({
hint: this.txtSignatureSettings,
asctype: Common.Utils.documentSettingsType.Signature,

View file

@ -778,6 +778,7 @@ define([
this.appOptions.forcesave = this.appOptions.canForcesave;
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
this.appOptions.isTrial = params.asc_getTrial();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';

View file

@ -234,7 +234,7 @@ define([
applyMode: function() {
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.canProtect) ?'show':'hide']();
this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
this.miNew[this.mode.canCreateNew?'show':'hide']();
@ -271,7 +271,7 @@ define([
}
}
if (this.mode.isDesktopApp) {
if (this.mode.canProtect) {
this.$el.find('#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider').hide();
this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);

View file

@ -179,7 +179,7 @@ define([
this.shapeSettings = new PE.Views.ShapeSettings();
this.textartSettings = new PE.Views.TextArtSettings();
if (mode && mode.isDesktopApp) {
if (mode && mode.canProtect) {
this.btnSignature = new Common.UI.Button({
hint: this.txtSignatureSettings,
asctype: Common.Utils.documentSettingsType.Signature,

View file

@ -799,6 +799,7 @@ define([
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canRename = !!this.permissions.rename;
this.appOptions.isTrial = params.asc_getTrial();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding)

View file

@ -223,7 +223,7 @@ define([
applyMode: function() {
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.isDesktopApp) ?'show':'hide']();
this.items[7][(this.mode.canProtect) ?'show':'hide']();
this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
this.miRecent[this.mode.canOpenRecent?'show':'hide']();
this.miNew[this.mode.canCreateNew?'show':'hide']();
@ -262,7 +262,7 @@ define([
}
}
if (this.mode.isDesktopApp) {
if (this.mode.canProtect) {
this.panels['protect'] = (new SSE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);
}

View file

@ -167,7 +167,7 @@ define([
this.textartSettings = new SSE.Views.TextArtSettings();
this.tableSettings = new SSE.Views.TableSettings();
if (mode && mode.isDesktopApp) {
if (mode && mode.canProtect) {
this.btnSignature = new Common.UI.Button({
hint: this.txtSignatureSettings,
asctype: Common.Utils.documentSettingsType.Signature,