From 3dc3027773e1a9df503db8e702a1c110f0bee3c7 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 13 Jun 2019 17:16:46 +0300 Subject: [PATCH] [SSE mobile] Add R1C1 Reference Style --- .../mobile/app/controller/Main.js | 6 ++++++ .../mobile/app/controller/Settings.js | 12 ++++++++++++ .../mobile/app/template/Settings.template | 17 +++++++++++++++++ .../mobile/app/view/Settings.js | 3 ++- apps/spreadsheeteditor/mobile/locale/en.json | 1 + 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 6bff89d52..553b20f43 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -558,6 +558,12 @@ define([ uiApp.closeModal('.document-menu.modal-in'); }); + //R1C1 reference style + value = Common.localStorage.getBool('sse-settings-r1c1'); + if(value !== undefined) { + this.api.asc_setR1C1Mode(value); + } + $(document).on('contextmenu', _.bind(me.onContextMenu, me)); Common.Gateway.documentReady(); }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 3ef1c0f97..cd8b508c6 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -485,6 +485,18 @@ define([ var $pageLang = $('#language-formula'); $pageLang.find('.item-title').text(item.displayValue); $pageLang.find('.item-example').text(item.exampleValue); + + value = Common.localStorage.getBool('sse-settings-r1c1'); + var $r1c1Style = $('.page[data-page=settings-application-view] #r1-c1-style input'); + $r1c1Style.prop('checked',value); + $r1c1Style.single('change', _.bind(me.clickR1C1Style, me)); + }, + + clickR1C1Style: function(e) { + var $target = $(e.currentTarget), + checked = $target.prop('checked'); + Common.localStorage.setBool('sse-settings-r1c1', checked); + this.api.asc_setR1C1Mode(checked); }, unitMeasurementChange: function (e) { diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index 476d744cd..fbc5ee2ed 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -430,6 +430,23 @@ +
+ +
diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index 21de71fb8..b52e0f1cf 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -343,7 +343,8 @@ define([ textRight: 'Right', textCollaboration: 'Collaboration', textFormulaLanguage: 'Formula Language', - textExample: 'Example' + textExample: 'Example', + textR1C1Style: 'R1C1 Reference Style' } })(), SSE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index b21985ce2..c344b2319 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -549,6 +549,7 @@ "SSE.Views.Settings.textFormulaLanguage": "Formula Language", "SSE.Views.Settings.textExample": "Example", "SSE.Views.Settings.textCollaboration": "Collaboration", + "SSE.Views.Settings.textR1C1Style": "R1C1 Reference Style", "SSE.Views.Toolbar.textBack": "Back", "SSE.Views.Collaboration.textCollaboration": "Collaboration", "SSE.Views.Collaboration.textСomments": "Сomments",