diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 0fb975416..6d6d824de 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -326,12 +326,8 @@ define([ }, onCreateNew: function(menu, type) { - if (this.mode.nativeApp === true) { - this.api.OpenNewDocument(type == 'blank' ? '' : type); - } else { - var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank"); - if (newDocumentPage) newDocumentPage.focus(); - } + var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank"); + if (newDocumentPage) newDocumentPage.focus(); if (menu) { menu.hide(); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index af1a7cf67..0404e63ab 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -233,10 +233,9 @@ define([ this.editorConfig.user = this.appOptions.user = Common.Utils.fillUserInfo(this.editorConfig.user, this.editorConfig.lang, this.textAnonymous); - this.appOptions.nativeApp = this.editorConfig.nativeApp === true; this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop'; this.appOptions.canCreateNew = !_.isEmpty(this.editorConfig.createUrl) && !this.appOptions.isDesktopApp; - this.appOptions.canOpenRecent = this.editorConfig.nativeApp !== true && this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; + this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; this.appOptions.templates = this.editorConfig.templates; this.appOptions.recent = this.editorConfig.recent; this.appOptions.createUrl = this.editorConfig.createUrl; @@ -249,7 +248,7 @@ define([ this.appOptions.customization = this.editorConfig.customization; this.appOptions.canBackToFolder = (this.editorConfig.canBackToFolder!==false) && (typeof (this.editorConfig.customization) == 'object') && (typeof (this.editorConfig.customization.goback) == 'object') && !_.isEmpty(this.editorConfig.customization.goback.url); - this.appOptions.canBack = this.editorConfig.nativeApp !== true && this.appOptions.canBackToFolder === true; + this.appOptions.canBack = this.appOptions.canBackToFolder === true; this.appOptions.canPlugins = false; this.plugins = this.editorConfig.plugins; @@ -1028,8 +1027,8 @@ define([ } var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType); - this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string'); - this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false && (!type || typeof type[1] !== 'string'); + this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string'); + this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string'); this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; @@ -1074,10 +1073,6 @@ define([ // headerView.setVisible(!this.appOptions.nativeApp && !value && !this.appOptions.isDesktopApp); // } - if (this.appOptions.nativeApp) { - $('body').removeClass('safari'); - } - viewport && viewport.setMode(this.appOptions); statusbarView && statusbarView.setMode(this.appOptions); diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 546dd7323..244855e0e 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -186,8 +186,6 @@ define([ * UI Events */ - toolbar.btnNewDocument.on('click', _.bind(this.onNewDocument, this)); - toolbar.btnOpenDocument.on('click', _.bind(this.onOpenDocument, this)); toolbar.btnPrint.on('click', _.bind(this.onPrint, this)); toolbar.btnSave.on('click', _.bind(this.onSave, this)); toolbar.btnUndo.on('click', _.bind(this.onUndo, this)); @@ -2695,7 +2693,7 @@ define([ toolbar.btnHide.setDisabled(disable); if(disable) { mask = $("