[DE] Set initial state for Co-editing mode menu in the toolbar.

This commit is contained in:
Julia Radzhabova 2017-10-09 13:32:19 +03:00
parent 32267aa6ab
commit 25403d1c55

View file

@ -693,6 +693,7 @@ define([
me.btnSetSpelling.updateHint(me.tipSetSpelling); me.btnSetSpelling.updateHint(me.tipSetSpelling);
me.btnSharing && me.btnSharing.updateHint(me.tipSharing); me.btnSharing && me.btnSharing.updateHint(me.tipSharing);
if (me.btnCoAuthMode) { if (me.btnCoAuthMode) {
me.btnCoAuthMode.setMenu( me.btnCoAuthMode.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
@ -715,6 +716,13 @@ define([
] ]
})); }));
me.btnCoAuthMode.updateHint(me.tipCoAuthMode); 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); setEvents.call(me);