Merge branch 'feature/live-viewer' into develop

Refactoring advanced settings
This commit is contained in:
Julia Radzhabova 2022-04-06 16:16:39 +03:00
commit 35d5c7b1f8
14 changed files with 142 additions and 19 deletions

View file

@ -219,8 +219,9 @@
uiTheme: 'theme-dark' // set interface theme: id or default-dark/default-light
},
coEditing: {
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true
change: true, // can change co-authoring mode
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
// for viewer: 'strict' is default, offline viewer; 'fast' - live viewer, show changes from other users
change: true, // can change co-authoring mode. true - default for editor, false - default for viewer
},
plugins: {
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],

View file

@ -302,7 +302,7 @@ div {
"uiTheme": queryParams.thm==="1" ? "default-light" : (queryParams.thm==="2" ? "default-dark" : undefined)
},
"coEditing": {
"mode": "fast",
"mode": userAuth.mode !== "view" ? "fast" : "strict",
"change": false
},
"wopi": {

View file

@ -458,6 +458,10 @@ define([
default: value = (fast_coauth) ? Asc.c_oAscCollaborativeMarksShowType.None : Asc.c_oAscCollaborativeMarksShowType.LastChanges;
}
this.api.SetCollaborativeMarksShowType(value);
} else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
fast_coauth = Common.localStorage.getBool("de-settings-view-coauthmode", false);
Common.Utils.InternalSettings.set("de-settings-coauthmode", fast_coauth);
this.api.asc_SetFastCollaborative(fast_coauth);
}
value = Common.localStorage.getBool("de-settings-livecomment", true);

View file

@ -473,6 +473,9 @@ define([
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
docInfo.asc_putIsEnabledMacroses(!!enable);
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
@ -1544,7 +1547,9 @@ define([
Common.NotificationCenter.on('comments:cleardummy', _.bind(this.onClearDummyComment, this));
Common.NotificationCenter.on('comments:showdummy', _.bind(this.onShowDummyComment, this));
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
// change = true by default in editor, change = false by default in viewer
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
this.loadCoAuthSettings();
this.applyModeCommonElements();
@ -1591,6 +1596,16 @@ define([
Common.Utils.InternalSettings.set((fastCoauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict", value);
} else if (!this.appOptions.isEdit && this.appOptions.isRestrictedEdit) {
fastCoauth = true;
} else if (!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && !this.appOptions.isOffline) { // viewer
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'strict' by default
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
} else {
value = Common.localStorage.getItem("de-settings-view-coauthmode");
if (value===null) {
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
}
}
fastCoauth = (parseInt(value) == 1);
} else {
fastCoauth = false;
autosave = 0;

View file

@ -293,7 +293,7 @@ define([
'<td colspan="2"><div id="fms-rb-show-track-tooltips"></div></td>',
'</tr>',
'<tr class ="divider-subgroup view-review"></tr>',
'<tr class="comments">',
'<tr class="coauth changes-show">',
'<td colspan="2" class="subgroup-name"><label><%= scope.strShowChanges %></label></td>',
'</tr>',
'<tr class="coauth changes-show">',
@ -305,6 +305,10 @@ define([
'<tr class="coauth changes-show">',
'<td colspan="2"><div id="fms-rb-show-changes-last"></div></td>',
'</tr>','<tr class="divider coauth changes-show"></tr>',
'<tr class="live-viewer">',
'<td colspan="2"><div id="fms-chb-live-viewer"></div></td>',
'</tr>',
'<tr class="divider live-viewer"></tr>',
'<tr class="comments">',
'<td colspan="2"><div id="fms-chb-live-comment"></div></td>',
'</tr>',
@ -577,6 +581,14 @@ define([
/** coauthoring end **/
this.chLiveViewer = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-live-viewer'),
labelText: this.strShowOthersChanges,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
var itemsTemplate =
_.template([
'<% _.each(items, function(item) { %>',
@ -743,6 +755,7 @@ define([
$('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.live-viewer', this.el)[!mode.isEdit && !mode.isRestrictedEdit && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.view-review', this.el)[mode.canViewReview ? 'show' : 'hide']();
$('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide']();
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
@ -777,6 +790,8 @@ define([
this.rbCoAuthModeStrict.setValue(!fast_coauth);
this.fillShowChanges(fast_coauth);
this.chLiveViewer.setValue(Common.Utils.InternalSettings.get("de-settings-coauthmode"));
value = Common.Utils.InternalSettings.get((fast_coauth) ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict");
this.rbShowChangesNone.setValue(value=='none');
@ -853,13 +868,15 @@ define([
this.mode.canChangeCoAuthoring && Common.localStorage.setItem("de-settings-coauthmode", this.rbCoAuthModeFast.getValue() ? 1 : 0 );
Common.localStorage.setItem(this.rbCoAuthModeFast.getValue() ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict",
this.rbShowChangesNone.getValue()?'none':this.rbShowChangesLast.getValue()?'last':'all');
} else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
Common.localStorage.setItem("de-settings-view-coauthmode", this.chLiveViewer.isChecked() ? 1 : 0);
}
/** coauthoring end **/
Common.localStorage.setItem("de-settings-fontrender", this.cmbFontRender.getValue());
var item = this.cmbFontRender.store.findWhere({value: 'custom'});
Common.localStorage.setItem("de-settings-cachemode", item && !item.get('checked') ? 0 : 1);
Common.localStorage.setItem("de-settings-unit", this.cmbUnit.getValue());
if (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("de-settings-coauthmode"))
if (this.mode.isEdit && (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("de-settings-coauthmode")))
Common.localStorage.setItem("de-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
if (this.mode.canForcesave)
Common.localStorage.setItem("de-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
@ -927,7 +944,7 @@ define([
strZoom: 'Default Zoom Value',
/** coauthoring begin **/
strShowChanges: 'Realtime Collaboration Changes',
strShowChanges: 'Real-time Collaboration Changes',
txtAll: 'View All',
txtNone: 'View Nothing',
txtLast: 'View Last',
@ -984,7 +1001,8 @@ define([
txtFastTip: 'Real-time co-editing. All changes are saved automatically',
txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make',
strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE',
strIgnoreWordsWithNumbers: 'Ignore words with numbers'
strIgnoreWordsWithNumbers: 'Ignore words with numbers',
strShowOthersChanges: 'Show changes from other users'
}, DE.Views.FileMenuPanels.Settings || {}));
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -132,7 +132,10 @@ class MainController extends Component {
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
let enable = !this.editorConfig.customization || (this.editorConfig.customization.macros !== false);
docInfo.asc_putIsEnabledMacroses(!!enable);
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins !== false);

View file

@ -349,6 +349,10 @@ define([
Common.Utils.InternalSettings.set("pe-settings-coauthmode", fast_coauth);
this.api.asc_SetFastCollaborative(fast_coauth);
}
} else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
fast_coauth = Common.localStorage.getBool("pe-settings-view-coauthmode", false);
Common.Utils.InternalSettings.set("pe-settings-coauthmode", fast_coauth);
this.api.asc_SetFastCollaborative(fast_coauth);
}
/** coauthoring end **/

View file

@ -429,7 +429,10 @@ define([
docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys);
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
docInfo.asc_putIsEnabledMacroses(!!enable);
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
@ -1191,7 +1194,9 @@ define([
this.appOptions.canBrandingExt && this.editorConfig.customization && Common.UI.LayoutManager.init(this.editorConfig.customization.layout);
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
// change = true by default in editor, change = false by default in viewer
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
this.loadCoAuthSettings();
this.applyModeCommonElements();
@ -1233,6 +1238,16 @@ define([
fastCoauth = (value===null || parseInt(value) == 1);
} else if (!this.appOptions.isEdit && this.appOptions.isRestrictedEdit) {
fastCoauth = true;
} else if (!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && !this.appOptions.isOffline) { // viewer
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'strict' by default
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
} else {
value = Common.localStorage.getItem("pe-settings-view-coauthmode");
if (value===null) {
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
}
}
fastCoauth = (parseInt(value) == 1);
} else {
fastCoauth = false;
autosave = 0;

View file

@ -234,6 +234,13 @@ define([
'</div></td>',
'</tr>',
'<tr class ="coauth changes divider-group"></tr>',
'<tr class="live-viewer">',
'<td colspan="2" class="group-name"><label><%= scope.txtCollaboration %></label></td>',
'</tr>',
'<tr class="live-viewer">',
'<td colspan="2"><div id="fms-chb-live-viewer"></div></td>',
'</tr>',
'<tr class ="live-viewer divider-group"></tr>',
'<tr class="edit">',
'<td colspan="2" class="group-name"><label><%= scope.txtProofing %></label></td>',
'</tr>',
@ -392,6 +399,14 @@ define([
});
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
this.chLiveViewer = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-live-viewer'),
labelText: this.strShowOthersChanges,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.chAutosave = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-autosave'),
labelText: this.textAutoSave,
@ -578,6 +593,7 @@ define([
/** coauthoring begin **/
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
/** coauthoring end **/
$('tr.live-viewer', this.el)[!mode.isEdit && !mode.isRestrictedEdit && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
$('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide']();
@ -610,6 +626,7 @@ define([
this.rbCoAuthModeFast.setValue(fast_coauth);
this.rbCoAuthModeStrict.setValue(!fast_coauth);
/** coauthoring end **/
this.chLiveViewer.setValue(Common.Utils.InternalSettings.get("pe-settings-coauthmode"));
value = Common.Utils.InternalSettings.get("pe-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
@ -666,13 +683,15 @@ define([
/** coauthoring begin **/
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring && this.mode.canChangeCoAuthoring) {
Common.localStorage.setItem("pe-settings-coauthmode", this.rbCoAuthModeFast.getValue());
} else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
Common.localStorage.setItem("pe-settings-view-coauthmode", this.chLiveViewer.isChecked() ? 1 : 0);
}
/** coauthoring end **/
Common.localStorage.setItem("pe-settings-fontrender", this.cmbFontRender.getValue());
var item = this.cmbFontRender.store.findWhere({value: 'custom'});
Common.localStorage.setItem("pe-settings-cachemode", item && !item.get('checked') ? 0 : 1);
Common.localStorage.setItem("pe-settings-unit", this.cmbUnit.getValue());
if (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("pe-settings-coauthmode"))
if (this.mode.isEdit && (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("pe-settings-coauthmode")))
Common.localStorage.setItem("pe-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
if (this.mode.canForcesave)
Common.localStorage.setItem("pe-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
@ -757,7 +776,8 @@ define([
txtFastTip: 'Real-time co-editing. All changes are saved automatically',
txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make',
strIgnoreWordsInUPPERCASE: 'Ignore words in UPPERCASE',
strIgnoreWordsWithNumbers: 'Ignore words with numbers'
strIgnoreWordsWithNumbers: 'Ignore words with numbers',
strShowOthersChanges: 'Show changes from other users'
}, PE.Views.FileMenuPanels.Settings || {}));
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -124,6 +124,9 @@ class MainController extends Component {
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
let enable = !this.editorConfig.customization || (this.editorConfig.customization.macros !== false);
docInfo.asc_putIsEnabledMacroses(!!enable);
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins !== false);

View file

@ -449,6 +449,10 @@ define([
Common.Utils.InternalSettings.set("sse-settings-coauthmode", fast_coauth);
this.api.asc_SetFastCollaborative(fast_coauth);
}
} else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
fast_coauth = Common.localStorage.getBool("sse-settings-view-coauthmode", false);
Common.Utils.InternalSettings.set("sse-settings-coauthmode", fast_coauth);
this.api.asc_SetFastCollaborative(fast_coauth);
}
/** coauthoring end **/

View file

@ -504,6 +504,9 @@ define([
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
docInfo.asc_putIsEnabledMacroses(!!enable);
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
@ -1279,8 +1282,10 @@ define([
this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false);
this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments;
// change = true by default in editor, change = false by default in viewer
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.appOptions.canCoAuthoring &&
!(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
!(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge && !this.appOptions.isEditOle) {
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
@ -1337,6 +1342,16 @@ define([
fastCoauth = (value===null || parseInt(value) == 1);
} else if (!this.appOptions.isEdit && this.appOptions.isRestrictedEdit) {
fastCoauth = true;
} else if (!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && !this.appOptions.isOffline) { // viewer
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'strict' by default
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
} else {
value = Common.localStorage.getItem("sse-settings-view-coauthmode");
if (value===null) {
value = this.editorConfig.coEditing && this.editorConfig.coEditing.mode==='fast' ? 1 : 0;
}
}
fastCoauth = (parseInt(value) == 1);
} else {
fastCoauth = false;
autosave = 0;

View file

@ -189,7 +189,7 @@ define([
template: _.template([
'<div>',
'<div class="flex-settings">',
'<table class="main" style="margin: 10px 18px auto;"><tbody>',
'<table class="main" style="margin: 10px 14px auto;"><tbody>',
'<tr class="editsave">',
'<td class="group-name top" colspan="2"><label><%= scope.txtEditingSaving %></label></td>',
'</tr>',
@ -206,7 +206,7 @@ define([
'<tr class="collaboration" >',
'<td class="group-name" colspan="2"><label><%= scope.txtCollaboration %></label></td>',
'</tr>',
'<tr class="collaboration">',
'<tr class="coauth changes">',
'<td class="subgroup-name" colspan="2"><label><%= scope.strCoAuthMode %></label></td>',
'</tr>',
'<tr class="coauth changes">',
@ -224,6 +224,10 @@ define([
'</div></td>',
'</div></tr>',
'<tr class ="divider coauth changes"></tr>',
'<tr class="live-viewer">',
'<td colspan="2"><div id="fms-chb-live-viewer"></div></td>',
'</tr>',
'<tr class="divider live-viewer"></tr>',
'<tr class="comments">',
'<td colspan="2"><div id="fms-chb-live-comment"></div></td>',
'</tr>',
@ -380,6 +384,14 @@ define([
this.rbCoAuthModeStrict.$el.parent().on('click', function (){me.rbCoAuthModeStrict.setValue(true);});
/** coauthoring end **/
this.chLiveViewer = new Common.UI.CheckBox({
el: $markup.findById('#fms-chb-live-viewer'),
labelText: this.strShowOthersChanges,
dataHint: '2',
dataHintDirection: 'left',
dataHintOffset: 'small'
});
this.cmbZoom = new Common.UI.ComboBox({
el : $markup.findById('#fms-cmb-zoom'),
style : 'width: 160px;',
@ -744,6 +756,7 @@ define([
$('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide']();
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.live-viewer', this.el)[!mode.isEdit && !mode.isRestrictedEdit && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide']();
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
if ( !Common.UI.Themes.available() ) {
@ -771,6 +784,7 @@ define([
this.rbCoAuthModeFast.setValue(fast_coauth);
this.rbCoAuthModeStrict.setValue(!fast_coauth);
/** coauthoring end **/
this.chLiveViewer.setValue(Common.Utils.InternalSettings.get("sse-settings-coauthmode"));
value = Common.Utils.InternalSettings.get("sse-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
@ -897,13 +911,16 @@ define([
Common.localStorage.setItem("sse-settings-resolvedcomment", this.chResolvedComment.isChecked() ? 1 : 0);
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring && this.mode.canChangeCoAuthoring)
Common.localStorage.setItem("sse-settings-coauthmode", this.rbCoAuthModeFast.getValue()? 1 : 0);
else if (!this.mode.isEdit && !this.mode.isRestrictedEdit && !this.mode.isOffline && this.mode.canChangeCoAuthoring) { // viewer
Common.localStorage.setItem("sse-settings-view-coauthmode", this.chLiveViewer.isChecked() ? 1 : 0);
}
/** coauthoring end **/
Common.localStorage.setItem("sse-settings-r1c1", this.chR1C1Style.isChecked() ? 1 : 0);
Common.localStorage.setItem("sse-settings-fontrender", this.cmbFontRender.getValue());
var item = this.cmbFontRender.store.findWhere({value: 'custom'});
Common.localStorage.setItem("sse-settings-cachemode", item && !item.get('checked') ? 0 : 1);
Common.localStorage.setItem("sse-settings-unit", this.cmbUnit.getValue());
if (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("sse-settings-coauthmode"))
if (this.mode.isEdit && (this.mode.canChangeCoAuthoring || !Common.Utils.InternalSettings.get("sse-settings-coauthmode")))
Common.localStorage.setItem("sse-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
if (this.mode.canForcesave)
Common.localStorage.setItem("sse-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0);
@ -1119,11 +1136,12 @@ define([
strIgnoreWordsWithNumbers: 'Ignore words with numbers',
txtAutoCorrect: 'AutoCorrect options...',
txtFastTip: 'Real-time co-editing. All changes are saved automatically',
txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make'
txtStrictTip: 'Use the \'Save\' button to sync the changes you and others make',
strShowOthersChanges: 'Show changes from other users'
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
el: '#panel-recentfiles',
menu: undefined,

View file

@ -171,6 +171,9 @@ class MainController extends Component {
docInfo.put_Lang(this.editorConfig.lang);
docInfo.put_Mode(this.editorConfig.mode);
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
const appOptions = this.props.storeAppOptions;
let enable = !appOptions.customization || (appOptions.customization.macros !== false);
docInfo.asc_putIsEnabledMacroses(!!enable);