[SSE] support for R1C1 reference style

This commit is contained in:
Maxim Kadushkin 2018-11-14 18:11:36 +03:00
parent 3375421cb7
commit 790ab4a726
5 changed files with 26 additions and 1 deletions

View file

@ -285,6 +285,10 @@ define([
value = resolved = true;
(value) ? this.api.asc_showComments(resolved) : this.api.asc_hideComments();
value = Common.localStorage.getBool("sse-settings-r1c1");
Common.Utils.InternalSettings.set("sse-settings-r1c1", value);
this.api.asc_setR1C1Mode(value);
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
value = Common.localStorage.getBool("sse-settings-coauthmode", true);
Common.Utils.InternalSettings.set("sse-settings-coauthmode", value);

View file

@ -329,6 +329,10 @@ define([
}
if (value) this.api.asc_setLocalization(value);
value = Common.localStorage.getBool("sse-settings-r1c1");
Common.Utils.InternalSettings.set("sse-settings-r1c1", value);
this.api.asc_setR1C1Mode(value);
if (this.appOptions.location == 'us' || this.appOptions.location == 'ca')
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);

View file

@ -453,6 +453,10 @@ define([
'<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>',
'<td class="right"><span id="fms-chb-forcesave" /></td>',
'</tr>','<tr class="divider forcesave"></tr>',
'<tr>',
'<td class="left"><label><%= scope.textRefStyle %></label></td>',
'<td class="right"><div id="fms-chb-r1c1-style"/></td>',
'</tr>','<tr class="divider"></tr>',
'<tr class="coauth changes">',
'<td class="left"><label><%= scope.strCoAuthMode %></label></td>',
'<td class="right">',
@ -513,6 +517,11 @@ define([
labelText: this.strResolvedComment
});
this.chR1C1Style = new Common.UI.CheckBox({
el: $('#fms-chb-r1c1-style'),
labelText: this.strR1C1
});
this.cmbCoAuthMode = new Common.UI.ComboBox({
el : $('#fms-cmb-coauth-mode'),
style : 'width: 160px;',
@ -694,6 +703,7 @@ define([
/** coauthoring begin **/
this.chLiveComment.setValue(Common.Utils.InternalSettings.get("sse-settings-livecomment"));
this.chResolvedComment.setValue(Common.Utils.InternalSettings.get("sse-settings-resolvedcomment"));
this.chR1C1Style.setValue(Common.Utils.InternalSettings.get("sse-settings-r1c1"));
var fast_coauth = Common.Utils.InternalSettings.get("sse-settings-coauthmode");
item = this.cmbCoAuthMode.store.findWhere({value: fast_coauth ? 1 : 0});
@ -745,6 +755,7 @@ define([
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring)
Common.localStorage.setItem("sse-settings-coauthmode", this.cmbCoAuthMode.getValue());
/** coauthoring end **/
Common.localStorage.setItem("sse-settings-r1c1", this.chR1C1Style.isChecked() ? 1 : 0);
Common.localStorage.setItem("sse-settings-fontrender", this.cmbFontRender.getValue());
Common.localStorage.setItem("sse-settings-unit", this.cmbUnit.getValue());
Common.localStorage.setItem("sse-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
@ -829,7 +840,9 @@ define([
txtInch: 'Inch',
textForceSave: 'Save to Server',
strForcesave: 'Always save to server (otherwise save to server on document close)',
strResolvedComment: 'Turn on display of the resolved comments'
strResolvedComment: 'Turn on display of the resolved comments',
textRefStyle: 'Reference Style',
strR1C1: 'Turn on R1C1 style'
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({

View file

@ -1322,6 +1322,8 @@
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.textRefStyle": "Reference Style",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strR1C1": "Turn on R1C1 style",
"SSE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning",
"SSE.Views.FileMenuPanels.ProtectDoc.strEncrypt": "With password",
"SSE.Views.FileMenuPanels.ProtectDoc.strProtect": "Protect Spreadsheet",

View file

@ -1322,6 +1322,8 @@
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Пункт",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Русский",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "как Windows",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.textRefStyle": "Стиль ссылок",
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strR1C1": "Включить стиль R1C1",
"SSE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Внимание",
"SSE.Views.FileMenuPanels.ProtectDoc.strEncrypt": "C помощью пароля",
"SSE.Views.FileMenuPanels.ProtectDoc.strProtect": "Защитить электронную таблицу",