Commit 71b82e74 authored by Julia Radzhabova's avatar Julia Radzhabova

Commenting in view mode: set autosave to true.

parent 4f30ea4f
......@@ -313,11 +313,13 @@ define([
case '0': this.api.SetFontRenderingMode(3); break;
}
value = Common.localStorage.getItem("de-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
if (this.mode.isEdit) {
value = Common.localStorage.getItem("de-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
value = Common.localStorage.getItem("de-settings-spellcheck");
this.api.asc_setSpellCheck(value===null || parseInt(value) == 1);
value = Common.localStorage.getItem("de-settings-spellcheck");
this.api.asc_setSpellCheck(value===null || parseInt(value) == 1);
}
value = Common.localStorage.getItem("de-settings-showsnaplines");
this.api.put_ShowSnapLines(value===null || parseInt(value) == 1);
......
......@@ -812,6 +812,7 @@ define([
} else if (!me.appOptions.isEdit && me.appOptions.canComments) {
me._state.fastCoauth = true;
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
me.api.asc_setAutoSaveGap(1);
} else {
me._state.fastCoauth = false;
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
......
......@@ -232,9 +232,6 @@ define([
var value = Common.localStorage.getItem("pe-settings-inputmode");
this.api.SetTextBoxInputMode(parseInt(value) == 1);
value = Common.localStorage.getItem("pe-settings-spellcheck");
this.api.asc_setSpellCheck(parseInt(value) == 1);
/** coauthoring begin **/
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
value = Common.localStorage.getItem("pe-settings-coauthmode");
......@@ -242,8 +239,13 @@ define([
}
/** coauthoring end **/
value = Common.localStorage.getItem("pe-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
if (this.mode.isEdit) {
value = Common.localStorage.getItem("pe-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
value = Common.localStorage.getItem("pe-settings-spellcheck");
this.api.asc_setSpellCheck(parseInt(value) == 1);
}
value = Common.localStorage.getItem("pe-settings-showsnaplines");
this.api.put_ShowSnapLines(value===null || parseInt(value) == 1);
......
......@@ -587,8 +587,10 @@ define([
value = 0; // use customization.autosave only when pe-settings-coauthmode and pe-settings-autosave are null
}
me._state.fastCoauth = (value===null || parseInt(value) == 1);
} else
} else {
me._state.fastCoauth = (!me.appOptions.isEdit && me.appOptions.canComments);
me._state.fastCoauth && me.api.asc_setAutoSaveGap(1);
}
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
/** coauthoring end **/
......
......@@ -266,8 +266,10 @@ define([
}
/** coauthoring end **/
value = Common.localStorage.getItem("sse-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
if (this.mode.isEdit) {
value = Common.localStorage.getItem("sse-settings-autosave");
this.api.asc_setAutoSaveGap(parseInt(value));
}
value = Common.localStorage.getItem("sse-settings-func-locale");
if (value) value = SSE.Views.FormulaLang.get(value);
......
......@@ -556,8 +556,10 @@ define([
value = 0; // use customization.autosave only when sse-settings-coauthmode and sse-settings-autosave are null
}
this._state.fastCoauth = (value===null || parseInt(value) == 1);
} else
} else {
this._state.fastCoauth = (!this.appOptions.isEdit && this.appOptions.canComments);
this._state.fastCoauth && this.api.asc_setAutoSaveGap(1);
}
this.api.asc_SetFastCollaborative(this._state.fastCoauth);
/** coauthoring end **/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment