From dc96d4b59d52e74a30b7a091a49e71f1b6bd3e76 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 14 Feb 2017 13:13:48 +0300 Subject: [PATCH 1/2] Enable chat and comments for opensource version. --- apps/documenteditor/main/app/controller/Main.js | 4 ++-- apps/presentationeditor/main/app/controller/Main.js | 4 ++-- apps/spreadsheeteditor/main/app/controller/Main.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 2f55ba92e..5a1eb8608 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -998,8 +998,8 @@ define([ this.appOptions.canHistoryRestore= this.editorConfig.canHistoryRestore && !!this.permissions.changeHistory; this.appOptions.canUseMailMerge= this.appOptions.canLicense && this.appOptions.canEdit && !this.appOptions.isDesktopApp; this.appOptions.canSendEmailAddresses = this.appOptions.canLicense && this.editorConfig.canSendEmailAddresses && this.appOptions.canEdit && this.appOptions.canCoAuthoring; - this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); - this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); + this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); + this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit; this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canRename = !!this.permissions.rename; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 0ad390839..88673ed5c 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -769,8 +769,8 @@ define([ this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this.appOptions.canDownload = !this.appOptions.nativeApp && this.permissions.download !== false; this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); - this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); - this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); + this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); + this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canRename = !!this.permissions.rename; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 088ba7d10..c96cab58c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -787,8 +787,8 @@ define([ /** coauthoring begin **/ this.appOptions.canCoAuthoring = !this.appOptions.isLightVersion; /** coauthoring end **/ - this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); - this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); + this.appOptions.canComments = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); + this.appOptions.canChat = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit) && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canRename = !!this.permissions.rename; this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); From b353fd4b42e571776f7ece8c8591dd2ebf9e792d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 17 Feb 2017 17:42:48 +0300 Subject: [PATCH 2/2] [Embedded] toolbarDocked = 'top' by default. --- apps/documenteditor/embed/js/ApplicationController.js | 8 ++++---- apps/presentationeditor/embed/js/ApplicationController.js | 8 ++++---- apps/spreadsheeteditor/embed/js/ApplicationController.js | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index b8fb4c006..5b569ee6f 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -65,14 +65,14 @@ var ApplicationController = new(function(){ common.controller.modals.init(embedConfig); // Docked toolbar - if (embedConfig.toolbarDocked === 'top') { - $('#toolbar').addClass('top'); - $('#editor_sdk').addClass('top'); - } else { + if (embedConfig.toolbarDocked === 'bottom') { $('#toolbar').addClass('bottom'); $('#editor_sdk').addClass('bottom'); $('#box-tools').removeClass('dropdown').addClass('dropup'); ttOffset[1] = -40; + } else { + $('#toolbar').addClass('top'); + $('#editor_sdk').addClass('top'); } if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url)) { diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 2a718c69e..3ba940d5a 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -66,14 +66,14 @@ var ApplicationController = new(function(){ common.controller.modals.init(embedConfig); // Docked toolbar - if (embedConfig.toolbarDocked === 'top') { - $('#toolbar').addClass('top'); - $('#editor_sdk').addClass('top'); - } else { + if (embedConfig.toolbarDocked === 'bottom') { $('#toolbar').addClass('bottom'); $('#editor_sdk').addClass('bottom'); $('#box-tools').removeClass('dropdown').addClass('dropup'); ttOffset[1] = -40; + } else { + $('#toolbar').addClass('top'); + $('#editor_sdk').addClass('top'); } if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url)) { diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 30924a817..8906bee2b 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -72,14 +72,14 @@ var ApplicationController = new(function(){ $('#id-btn-close').hide(); // Docked toolbar - if (embedConfig.toolbarDocked === 'top') { - $('#toolbar').addClass('top'); - $('.viewer').addClass('top'); - } else { + if (embedConfig.toolbarDocked === 'bottom') { $('#toolbar').addClass('bottom'); $('.viewer').addClass('bottom'); $('#box-tools').removeClass('dropdown').addClass('dropup'); ttOffset[1] = -40; + } else { + $('#toolbar').addClass('top'); + $('.viewer').addClass('top'); } }