diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 2c838d9db..0c1ec666e 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -124,7 +124,8 @@ help: true, compactHeader: false, toolbarNoTabs: false, - toolbarHideFileName: false + toolbarHideFileName: false, + reviewDisplay: 'original' }, plugins: { autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'], diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index c569405a5..d1cef5bfe 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -671,7 +671,13 @@ define([ }); } else if (config.canViewReview) { config.canViewReview = me.api.asc_HaveRevisionsChanges(true); // check revisions from all users - config.canViewReview && me.turnDisplayMode(config.isRestrictedEdit ? 'markup' : Common.localStorage.getItem(me.view.appPrefix + "review-mode") || 'original'); // load display mode only in viewer + if (config.canViewReview) { + var val = Common.localStorage.getItem(me.view.appPrefix + "review-mode"); + if (val===null) + val = me.appConfig.customization && /^(original|final|markup)$/i.test(me.appConfig.customization.reviewDisplay) ? me.appConfig.customization.reviewDisplay.toLocaleLowerCase() : 'original'; + me.turnDisplayMode(config.isRestrictedEdit ? 'markup' : val); // load display mode only in viewer + me.view.turnDisplayMode(config.isRestrictedEdit ? 'markup' : val); + } } if (me.view && me.view.btnChat) { diff --git a/apps/common/main/lib/view/About.js b/apps/common/main/lib/view/About.js index 068e6bb3c..4a50978b3 100644 --- a/apps/common/main/lib/view/About.js +++ b/apps/common/main/lib/view/About.js @@ -90,7 +90,7 @@ define([ '', '', '', - '<% print(publisherurl.replace(/https?:\\/{2}/, "")) %>', + '<% print(publisherurl.replace(/https?:\\/{2}/, "").replace(/\\/$/,"")) %>', '', '', '', @@ -143,7 +143,7 @@ define([ '', '', '', - '', + '', '', '', '' @@ -156,7 +156,7 @@ define([ el.html(this.template({ publishername: '{{PUBLISHER_NAME}}', publisheraddr: '{{PUBLISHER_ADDRESS}}', - publisherurl: /^(?:https?:\/{2})?(\S+)/.exec('{{PUBLISHER_URL}}')[1], + publisherurl: '{{PUBLISHER_URL}}', supportemail: '{{SUPPORT_EMAIL}}', phonenum: '{{PUBLISHER_PHONE}}', scope: this diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index 3492b3820..2325f1b31 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -209,13 +209,49 @@ define([ caption: this.txtNext }); - if (!this.appConfig.isRestrictedEdit) // hide Display mode option for fillForms and commenting mode + if (!this.appConfig.isRestrictedEdit) {// hide Display mode option for fillForms and commenting mode + var menuTemplate = _.template('
<%= caption %>
' + + '<% if (options.description !== null) { %>' + + '<% } %>
'); + this.btnReviewView = new Common.UI.Button({ cls: 'btn-toolbar x-huge icon-top', iconCls: 'btn-ic-reviewview', caption: this.txtView, - menu: true + menu: new Common.UI.Menu({ + cls: 'ppm-toolbar', + items: [ + { + caption: this.txtMarkupCap, + checkable: true, + toggleGroup: 'menuReviewView', + checked: true, + value: 'markup', + template: menuTemplate, + description: this.txtMarkup + }, + { + caption: this.txtFinalCap, + checkable: true, + toggleGroup: 'menuReviewView', + checked: false, + template: menuTemplate, + description: this.txtFinal, + value: 'final' + }, + { + caption: this.txtOriginalCap, + checkable: true, + toggleGroup: 'menuReviewView', + checked: false, + template: menuTemplate, + description: this.txtOriginal, + value: 'original' + } + ] + }) }); + } } if (!!this.appConfig.sharingSettingsUrl && this.appConfig.sharingSettingsUrl.length && this._readonlyRights!==true) { @@ -319,41 +355,7 @@ define([ me.btnPrev.updateHint(me.hintPrev); me.btnNext.updateHint(me.hintNext); - me.btnReviewView && me.btnReviewView.setMenu( - new Common.UI.Menu({ - cls: 'ppm-toolbar', - items: [ - { - caption: me.txtMarkupCap, - checkable: true, - toggleGroup: 'menuReviewView', - checked: true, - value: 'markup', - template: menuTemplate, - description: me.txtMarkup - }, - { - caption: me.txtFinalCap, - checkable: true, - toggleGroup: 'menuReviewView', - checked: false, - template: menuTemplate, - description: me.txtFinal, - value: 'final' - }, - { - caption: me.txtOriginalCap, - checkable: true, - toggleGroup: 'menuReviewView', - checked: false, - template: menuTemplate, - description: me.txtOriginal, - value: 'original' - } - ] - })); me.btnReviewView && me.btnReviewView.updateHint(me.tipReviewView); - !me.appConfig.canReview && me.turnDisplayMode(Common.localStorage.getItem(me.appPrefix + "review-mode") || 'original'); } me.btnSharing && me.btnSharing.updateHint(me.tipSharing); me.btnHistory && me.btnHistory.updateHint(me.tipHistory); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index eb2633084..d4f560f53 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1095,7 +1095,7 @@ define([ primary: 'contact', callback: function(btn) { if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -1189,10 +1189,6 @@ define([ this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) appHeader.setBranding(this.editorConfig.customization); - else if (typeof this.editorConfig.customization == 'object') { - this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs = - this.editorConfig.customization.toolbarHideFileName = false; - } this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index deed7d300..07e8f817d 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -660,7 +660,7 @@ define([ text: me.textContactUs, bold: true, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }, { text: me.textClose }] diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 15323c5d0..cc8c8df46 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -839,7 +839,7 @@ define([ primary: 'contact', callback: function(btn) { if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -910,10 +910,6 @@ define([ this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) appHeader.setBranding(this.editorConfig.customization); - else if (typeof this.editorConfig.customization == 'object') { - this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs = - this.editorConfig.customization.toolbarHideFileName = false; - } this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index c3ca9ef5c..cf0603d52 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -608,7 +608,7 @@ define([ text: me.textContactUs, bold: true, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }, { text: me.textClose }] diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 454f6a729..6f957c497 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -853,7 +853,7 @@ define([ primary: 'contact', callback: function(btn) { if (btn == 'contact') - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }); } @@ -912,10 +912,6 @@ define([ this.appOptions.canBranding = params.asc_getCustomization(); if (this.appOptions.canBranding) this.headerView.setBranding(this.editorConfig.customization); - else if (typeof this.editorConfig.customization == 'object') { - this.editorConfig.customization.compactHeader = this.editorConfig.customization.toolbarNoTabs = - this.editorConfig.customization.toolbarHideFileName = false; - } this.appOptions.canRename && this.headerView.setCanRename(true); } else diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 6bff89d52..f77652414 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -623,7 +623,7 @@ define([ text: me.textContactUs, bold: true, onClick: function() { - window.open('mailto:sales@onlyoffice.com', "_blank"); + window.open('mailto:{{SALES_EMAIL}}', "_blank"); } }, { text: me.textClose }]