From 25403d1c5537645cb79b0584cd3e14a43fd5a7b0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 9 Oct 2017 13:32:19 +0300 Subject: [PATCH] [DE] Set initial state for Co-editing mode menu in the toolbar. --- apps/common/main/lib/view/ReviewChanges.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index d4a7c543f..4a5b12f95 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -693,6 +693,7 @@ define([ me.btnSetSpelling.updateHint(me.tipSetSpelling); me.btnSharing && me.btnSharing.updateHint(me.tipSharing); + if (me.btnCoAuthMode) { me.btnCoAuthMode.setMenu( new Common.UI.Menu({ @@ -715,6 +716,13 @@ define([ ] })); me.btnCoAuthMode.updateHint(me.tipCoAuthMode); + + var value = Common.localStorage.getItem("de-settings-coauthmode"); + if (value===null && !Common.localStorage.itemExists("de-settings-autosave") && + config.customization && config.customization.autosave===false) { + value = 0; // use customization.autosave only when de-settings-coauthmode and de-settings-autosave are null + } + me.turnCoAuthMode((value===null || parseInt(value) == 1) && !(config.isDesktopApp && config.isOffline) && config.canCoAuthoring); } setEvents.call(me);