diff --git a/apps/pdfeditor/main/app/controller/DocumentHolder.js b/apps/pdfeditor/main/app/controller/DocumentHolder.js index aab9753aa3..8cb0eb3059 100644 --- a/apps/pdfeditor/main/app/controller/DocumentHolder.js +++ b/apps/pdfeditor/main/app/controller/DocumentHolder.js @@ -2805,7 +2805,7 @@ define([ // annotation text bar documentHolder.btnCopy.on('click', _.bind(this.onCutCopyPaste, this, {value: 'copy', isFromBar: true})); documentHolder.btnAddComment.on('click', _.bind(this.addComment, this, {isFromBar: true})); - if (me.mode.isPDFAnnotate && me.mode.canPDFEdit || me.mode.isPDFEdit) + if (me.mode.isEditTextSupport && (me.mode.isPDFAnnotate && me.mode.canPDFEdit || me.mode.isPDFEdit)) documentHolder.btnEditText.on('click', _.bind(this.editText, this)); else documentHolder.btnEditText.cmpEl.parent().hide().prev('.separator').hide(); diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index b95f31a42b..0619855f85 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -1320,6 +1320,7 @@ define([ this.appOptions.isBeta = params.asc_getIsBeta(); this.appOptions.isSignatureSupport= false;//this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && (this.permissions.protect!==false); this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false) && !this.appOptions.isForm; + this.appOptions.isEditTextSupport = this.appOptions.isEdit && this.api.asc_isSupportFeature("ooxml"); this.appOptions.canProtect = (this.permissions.protect!==false); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); this.appOptions.canSubmitForms = this.appOptions.canLicense && (typeof (this.editorConfig.customization) == 'object') && !!this.editorConfig.customization.submitForm && !this.appOptions.isOffline; diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 168150c315..2f7d14cc6b 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -1298,7 +1298,7 @@ define([ $host = $(toolbar.$layout); if (this.mode.isPDFEdit && this._state.initEditing) { Array.prototype.push.apply(me.toolbar.lockControls, toolbar.applyLayoutPDFEdit(this.mode)); - toolbar.rendererComponentsPDFEdit($host); + toolbar.rendererComponentsPDFEdit($host, this.mode); setTimeout(function(){ toolbar.createDelayedElementsPDFEdit(); diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 190003de12..5e059f8144 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -1244,12 +1244,12 @@ define([ _injectComponent('#slot-btn-form-save', this.btnSaveForm); }, - rendererComponentsPDFEdit: function($host) { + rendererComponentsPDFEdit: function($host, mode) { var _injectComponent = function (id, cmp) { Common.Utils.injectComponent($host.findById(id), cmp); }; - _injectComponent('#slot-btn-edittext', this.btnEditText); + mode.isEditTextSupport ? _injectComponent('#slot-btn-edittext', this.btnEditText) : $host.findById('#slot-btn-edittext').parents('.group').hide().next('.separator').hide(); _injectComponent('#slot-field-fontname', this.cmbFontName); _injectComponent('#slot-field-fontsize', this.cmbFontSize); _injectComponent('#slot-btn-text-underline', this.btnTextUnderline); @@ -1319,7 +1319,7 @@ define([ this.rendererComponentsCommon($host); if (mode.isEdit) { this.rendererComponentsAnnotate($host); - mode.isPDFEdit && this.rendererComponentsPDFEdit($host); + mode.isPDFEdit && this.rendererComponentsPDFEdit($host, mode); $host.find(mode.isPDFEdit ? '.annotate' : '.pdfedit').addClass('hidden'); } else if (mode.isRestrictedEdit) this.rendererComponentsRestrictedEdit($host);