From fa658a11cdc653630e596cf347520ad1e0494730 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 23 May 2019 12:29:30 +0300 Subject: [PATCH 01/33] [DE mobile] Fix template --- apps/documenteditor/mobile/app/template/Settings.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 004ca88ff..5f694a4c6 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -217,9 +217,9 @@
<%= scope.textFormat %>
-
+ -
+
diff --git a/apps/spreadsheeteditor/mobile/app/view/Search.js b/apps/spreadsheeteditor/mobile/app/view/Search.js index b10a29840..776daedc7 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Search.js +++ b/apps/spreadsheeteditor/mobile/app/view/Search.js @@ -155,6 +155,13 @@ define([ me.fireEvent('searchbar:render', me); me.fireEvent('searchbar:show', me); + if(Common.SharedSettings.get('search-highlight-res') === undefined) { + Common.SharedSettings.set('search-highlight-res', true); + } + if (Common.SharedSettings.get('search-highlight-res')) { + this.fireEvent('search:highlight', [this, true]); + } + searchBar = $$('.searchbar.document'); _.defer(function() { @@ -188,6 +195,8 @@ define([ uiApp.hideNavbar(searchBar); }, 10); } + + this.fireEvent('search:highlight', [this, false]); }, textFind: 'Find', @@ -199,7 +208,8 @@ define([ textMatchCell: 'Match Cell', textSearchIn: 'Search In', textWorkbook: 'Workbook', - textSheet: 'Sheet' + textSheet: 'Sheet', + textHighlightRes: 'Highlight results' } })(), SSE.Views.Search || {})) }); \ No newline at end of file From 98fa231d51dbfdddf396bffb179af2ef494d644f Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 6 Jun 2019 14:55:35 +0300 Subject: [PATCH 25/33] [PE mobile] [SSE mobile] Hide Settings in view mode --- apps/presentationeditor/mobile/app/view/Settings.js | 1 + apps/spreadsheeteditor/mobile/app/view/Settings.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index ec5d3c355..d9d893ab1 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -121,6 +121,7 @@ define([ $layour.find('#settings-readermode').hide(); $layour.find('#settings-search .item-title').text(this.textFindAndReplace) } else { + $layour.find('#settings-application').hide(); $layour.find('#settings-spellcheck').hide(); $layour.find('#settings-presentation-setup').hide(); $layour.find('#settings-readermode input:checkbox') diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index db1f22a37..ca0684bf9 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -129,6 +129,8 @@ define([ if (isEdit) { $layout.find('#settings-search .item-title').text(this.textFindAndReplace) } else { + $layout.find('#settings-spreadsheet').hide(); + $layout.find('#settings-application').hide(); } if (!canDownload) $layout.find('#settings-download').hide(); if (!canAbout) $layout.find('#settings-about').hide(); From 5a009e4c90589a797c394c8feaaf0cd6331fcc1e Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 7 Jun 2019 10:29:43 +0300 Subject: [PATCH 26/33] [DE mobile] [PE mobile] [SSE mobile] Hide Collaboration when no edit users --- .../mobile/app/controller/Main.js | 8 ++++++-- .../mobile/app/controller/Settings.js | 4 ++++ .../mobile/app/controller/Toolbar.js | 17 +++++++++++++++++ .../mobile/app/template/Settings.template | 2 +- .../mobile/app/template/Toolbar.template | 2 +- .../mobile/app/controller/Main.js | 8 ++++++-- .../mobile/app/controller/Settings.js | 5 +++++ .../mobile/app/controller/Toolbar.js | 17 +++++++++++++++++ .../mobile/app/template/Settings.template | 2 +- .../mobile/app/template/Toolbar.template | 2 +- .../mobile/app/controller/Main.js | 8 ++++++-- .../mobile/app/controller/Settings.js | 5 +++++ .../mobile/app/controller/Toolbar.js | 17 +++++++++++++++++ .../mobile/app/template/Settings.template | 2 +- .../mobile/app/template/Toolbar.template | 2 +- 15 files changed, 89 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 8e7d4837d..deed7d300 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -761,6 +761,8 @@ define([ if (me.api) { me.api.asc_registerCallback('asc_onSendThemeColors', _.bind(me.onSendThemeColors, me)); me.api.asc_registerCallback('asc_onDownloadUrl', _.bind(me.onDownloadUrl, me)); + me.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); + me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); } }, @@ -778,8 +780,6 @@ define([ /** coauthoring begin **/ me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); - me.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); - me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me)); /** coauthoring end **/ if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) { @@ -795,6 +795,10 @@ define([ } }, + returnUserCount: function() { + return this._state.usersCount; + }, + onExternalMessage: function(msg) { if (msg && msg.msg) { msg.msg = (msg.msg).toString(); diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index bf6192291..be2f7dcc9 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -253,6 +253,10 @@ define([ if(_stateDisplayMode == "Final" || _stateDisplayMode == "Original") { $('#settings-document').addClass('disabled'); } + var _userCount = DE.getController('Main').returnUserCount(); + if (_userCount > 0) { + $('#settings-collaboration').show(); + } } }, diff --git a/apps/documenteditor/mobile/app/controller/Toolbar.js b/apps/documenteditor/mobile/app/controller/Toolbar.js index aaaaae553..1c32ee6c4 100644 --- a/apps/documenteditor/mobile/app/controller/Toolbar.js +++ b/apps/documenteditor/mobile/app/controller/Toolbar.js @@ -81,6 +81,8 @@ define([ this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo')); this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this)); + this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this)) + this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.displayCollaboration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); }, @@ -192,6 +194,21 @@ define([ DE.getController('Settings').hideModal(); }, + displayCollaboration: function(users) { + if(users !== undefined) { + var length = 0; + _.each(users, function (item) { + if (!item.asc_getView()) + length++; + }); + if (length > 0) { + $('#toolbar-collaboration').show(); + } else { + $('#toolbar-collaboration').hide(); + } + } + }, + dlgLeaveTitleText : 'You leave the application', dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.', leaveButtonText : 'Leave this Page', diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 6cda2f06c..45a321b3d 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -57,7 +57,7 @@ <% } %> <% if(phone) {%>
  • -
    +
  • -
    +
  • -
    +
  • +
    <%= scope.textSearchBy %>
    +
    +
      +
    • + +
    • +
    • + +
    • +
    +
    • diff --git a/apps/spreadsheeteditor/mobile/app/view/Search.js b/apps/spreadsheeteditor/mobile/app/view/Search.js index 776daedc7..43cd7a7a8 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Search.js +++ b/apps/spreadsheeteditor/mobile/app/view/Search.js @@ -161,6 +161,9 @@ define([ if (Common.SharedSettings.get('search-highlight-res')) { this.fireEvent('search:highlight', [this, true]); } + if(Common.SharedSettings.get('search-by') === undefined) { + Common.SharedSettings.set('search-by', 'rows'); + } searchBar = $$('.searchbar.document'); @@ -209,7 +212,10 @@ define([ textSearchIn: 'Search In', textWorkbook: 'Workbook', textSheet: 'Sheet', - textHighlightRes: 'Highlight results' + textHighlightRes: 'Highlight results', + textByColumns: 'By columns', + textByRows: 'By rows', + textSearchBy: 'Search' } })(), SSE.Views.Search || {})) }); \ No newline at end of file From 304baedd80f2a0ae3a1d4e572b4921c0990faee6 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 7 Jun 2019 15:58:30 +0300 Subject: [PATCH 28/33] [SSE mobile] Add Look in formulas/values --- .../mobile/app/controller/Search.js | 27 +++++++++++++------ .../mobile/app/template/Search.template | 23 ++++++++++++++++ .../mobile/app/view/Search.js | 8 +++++- 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Search.js b/apps/spreadsheeteditor/mobile/app/controller/Search.js index 643091769..7415bf69d 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Search.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Search.js @@ -171,13 +171,15 @@ define([ isMatchCell = Common.SharedSettings.get('search-match-cell') === true, isHighlightRes = Common.SharedSettings.get('search-highlight-res') === true, searchBy = Common.SharedSettings.get('search-by') === 'rows' ? 'rows' : 'columns', + lookIn = Common.SharedSettings.get('look-in') === 'formulas' ? 'formulas' : 'values', $pageSettings = $('.page[data-page=search-settings]'), $inputType = $pageSettings.find('input[name=search-type]'), $inputSearchIn = $pageSettings.find('input[name=search-in]'), $inputSearchBy = $pageSettings.find('input[name=search-by]'), $inputMatchCase = $pageSettings.find('#search-match-case input:checkbox'), $inputMatchCell = $pageSettings.find('#search-match-cell input:checkbox'), - $inputHighlightResults = $pageSettings.find('#search-highlight-res input:checkbox'); + $inputHighlightResults = $pageSettings.find('#search-highlight-res input:checkbox'), + $inputLookIn = $pageSettings.find('input[name=look-in]'); $inputType.val([isReplace ? 'replace' : 'search']); $inputSearchIn.val([searchIn]); @@ -185,11 +187,13 @@ define([ $inputMatchCell.prop('checked', isMatchCell); $inputHighlightResults.prop('checked', isHighlightRes); $inputSearchBy.val([searchBy]); + $inputLookIn.val([lookIn]); // init events $inputType.single('change', _.bind(me.onTypeChange, me)); $inputSearchIn.single('change', _.bind(me.onSearchInChange, me)); $inputSearchBy.single('change', _.bind(me.onSearchByChange, me)); + $inputLookIn.single('change', _.bind(me.onLookInChange, me)); $inputMatchCase.single('change', _.bind(me.onMatchCaseClick, me)); $inputMatchCell.single('change', _.bind(me.onMatchCellClick, me)); $inputHighlightResults.single('change', _.bind(me.onHighlightResultsClick, me)); @@ -254,7 +258,7 @@ define([ me.onQueryReplace(me.searchBar.query, me.replaceBar.query); setTimeout(function () { me.onQuerySearch(me.searchBar.query, 'next'); - }, 10); + }, 20); }, onReplaceAll: function (e) { @@ -283,7 +287,8 @@ define([ var matchCase = Common.SharedSettings.get('search-match-case') || false, matchCell = Common.SharedSettings.get('search-match-cell') || false, lookInSheet = Common.SharedSettings.get('search-in') === 'sheet', - searchBy = Common.SharedSettings.get('search-by') === 'rows'; + searchBy = Common.SharedSettings.get('search-by') === 'rows', + lookIn = Common.SharedSettings.get('look-in') === 'formulas'; if (query && query.length) { var options = new Asc.asc_CFindOptions(); @@ -293,7 +298,7 @@ define([ options.asc_setIsWholeCell(matchCell); options.asc_setScanOnOnlySheet(lookInSheet); options.asc_setScanByRows(searchBy); - // options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); + options.asc_setLookIn(lookIn ? Asc.c_oAscFindLookIn.Formulas : Asc.c_oAscFindLookIn.Value); if (!this.api.asc_findText(options)) { var me = this; @@ -313,7 +318,8 @@ define([ var matchCase = Common.SharedSettings.get('search-match-case') || false, matchCell = Common.SharedSettings.get('search-match-cell') || false, lookInSheet = Common.SharedSettings.get('search-in') === 'sheet', - searchBy = Common.SharedSettings.get('search-by') === 'rows'; + searchBy = Common.SharedSettings.get('search-by') === 'rows', + lookIn = Common.SharedSettings.get('look-in') === 'formulas'; if (search && search.length) { this.api.isReplaceAll = false; @@ -325,7 +331,7 @@ define([ options.asc_setIsWholeCell(matchCell); options.asc_setScanOnOnlySheet(lookInSheet); options.asc_setScanByRows(searchBy); - // options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); + options.asc_setLookIn(lookIn ? Asc.c_oAscFindLookIn.Formulas : Asc.c_oAscFindLookIn.Value); options.asc_setIsReplaceAll(false); this.api.asc_replaceText(options); @@ -336,7 +342,8 @@ define([ var matchCase = Common.SharedSettings.get('search-match-case') || false, matchCell = Common.SharedSettings.get('search-match-cell') || false, lookInSheet = Common.SharedSettings.get('search-in') === 'sheet', - searchBy = Common.SharedSettings.get('search-by') === 'rows'; + searchBy = Common.SharedSettings.get('search-by') === 'rows', + lookIn = Common.SharedSettings.get('look-in') === 'formulas'; if (search && search.length) { this.api.isReplaceAll = true; @@ -348,7 +355,7 @@ define([ options.asc_setIsWholeCell(matchCell); options.asc_setScanOnOnlySheet(lookInSheet); options.asc_setScanByRows(searchBy); - // options.asc_setLookIn(this.dlgSearch.menuLookin.menu.items[0].checked?Asc.c_oAscFindLookIn.Formulas:Asc.c_oAscFindLookIn.Value); + options.asc_setLookIn(lookIn ? Asc.c_oAscFindLookIn.Formulas : Asc.c_oAscFindLookIn.Value); options.asc_setIsReplaceAll(true); this.api.asc_replaceText(options); @@ -371,6 +378,10 @@ define([ Common.SharedSettings.set('search-by', $(e.currentTarget).val()); }, + onLookInChange: function(e) { + Common.SharedSettings.set('look-in', $(e.currentTarget).val()); + }, + onMatchCaseClick: function (e) { Common.SharedSettings.set('search-match-case', $(e.currentTarget).is(':checked')); }, diff --git a/apps/spreadsheeteditor/mobile/app/template/Search.template b/apps/spreadsheeteditor/mobile/app/template/Search.template index aebc29a04..9b3d5df5c 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Search.template +++ b/apps/spreadsheeteditor/mobile/app/template/Search.template @@ -118,6 +118,29 @@
    +
    <%= scope.textLookIn %>
    +
    +
      +
    • + +
    • +
    • + +
    • +
    +
    • diff --git a/apps/spreadsheeteditor/mobile/app/view/Search.js b/apps/spreadsheeteditor/mobile/app/view/Search.js index 43cd7a7a8..f28ea18d5 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Search.js +++ b/apps/spreadsheeteditor/mobile/app/view/Search.js @@ -164,6 +164,9 @@ define([ if(Common.SharedSettings.get('search-by') === undefined) { Common.SharedSettings.set('search-by', 'rows'); } + if(Common.SharedSettings.get('look-in') === undefined) { + Common.SharedSettings.set('look-in', 'formulas'); + } searchBar = $$('.searchbar.document'); @@ -215,7 +218,10 @@ define([ textHighlightRes: 'Highlight results', textByColumns: 'By columns', textByRows: 'By rows', - textSearchBy: 'Search' + textSearchBy: 'Search', + textLookIn: 'Look In', + textFormulas: 'Formulas', + textValues: 'Values' } })(), SSE.Views.Search || {})) }); \ No newline at end of file From 744bef6f69f28d6796b5bed72b58759ab83670a6 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 11 Jun 2019 13:22:34 +0300 Subject: [PATCH 29/33] [SSE mobile] Add Formula Language --- .../mobile/app/controller/Settings.js | 39 +++++++- .../mobile/app/controller/add/AddFunction.js | 9 +- .../mobile/app/template/Settings.template | 37 +++++++- .../mobile/app/view/Settings.js | 41 ++++++++- .../mobile/app/view/add/AddFunction.js | 91 ++++++++++++++++--- 5 files changed, 199 insertions(+), 18 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index c2985e259..3ef1c0f97 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -76,7 +76,17 @@ define([ { caption: 'A2', subtitle: Common.Utils.String.format('42{0} x 59,4{0}', txtCm), value: [420, 594] }, { caption: 'A6', subtitle: Common.Utils.String.format('10,5{0} x 14,8{0}', txtCm), value: [105, 148] } ], - _metricText = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric()) + _metricText = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric()), + _dataLang = [ + { value: 'en', displayValue: 'English', exampleValue: ' SUM; MIN; MAX; COUNT' }, + { value: 'de', displayValue: 'Deutsch', exampleValue: ' SUMME; MIN; MAX; ANZAHL' }, + { value: 'es', displayValue: 'Spanish', exampleValue: ' SUMA; MIN; MAX; CALCULAR' }, + { value: 'fr', displayValue: 'French', exampleValue: ' SOMME; MIN; MAX; NB' }, + { value: 'it', displayValue: 'Italian', exampleValue: ' SOMMA; MIN; MAX; CONTA.NUMERI' }, + { value: 'ru', displayValue: 'Russian', exampleValue: ' СУММ; МИН; МАКС; СЧЁТ' }, + { value: 'pl', displayValue: 'Polish', exampleValue: ' SUMA; MIN; MAX; ILE.LICZB' } + ], + _indexLang = 0; var mm2Cm = function(mm) { return parseFloat((mm/10.).toFixed(2)); @@ -205,6 +215,8 @@ define([ me.initSpreadsheetPageSize(); } else if ('#margins-view' == pageId) { me.initSpreadsheetMargins(); + } else if ('#language-formula-view' == pageId) { + me.initFormulaLang(); } else { var _userCount = SSE.getController('Main').returnUserCount(); if (_userCount > 0) { @@ -213,6 +225,21 @@ define([ } }, + initFormulaLang: function() { + var value = Common.localStorage.getItem('sse-settings-func-lang'); + var item = _.findWhere(_dataLang, {value: value}); + this.getView('Settings').renderFormLang(item ? _dataLang.indexOf(item) : 0, _dataLang); + $('.page[data-page=language-formula-view] input:radio[name=language-formula]').single('change', _.bind(this.onFormulaLangChange, this)); + Common.Utils.addScrollIfNeed('.page[data-page=language-formula-view]', '.page[data-page=language-formula-view] .page-content'); + }, + + onFormulaLangChange: function(e) { + var langValue = $(e.currentTarget).val(); + Common.localStorage.setItem("sse-settings-func-lang", langValue); + this.initPageApplicationSettings(); + SSE.getController('AddFunction').onDocumentReady(); + }, + onCollaboration: function() { SSE.getController('Collaboration').showModal(); }, @@ -448,6 +475,16 @@ define([ var value = Common.localStorage.getItem('se-mobile-settings-unit'); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric(); $unitMeasurement.val([value]); + + //init formula language + value = Common.localStorage.getItem('sse-settings-func-lang'); + var item = _.findWhere(_dataLang, {value: value}); + if(!item) { + item = _dataLang[0]; + } + var $pageLang = $('#language-formula'); + $pageLang.find('.item-title').text(item.displayValue); + $pageLang.find('.item-example').text(item.exampleValue); }, unitMeasurementChange: function (e) { diff --git a/apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js b/apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js index 4efe4024d..6dfa007d8 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js +++ b/apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js @@ -86,7 +86,8 @@ define([ var me = this; _.defer(function () { - var editorLang = SSE.getController("Main").editorConfig.lang; + var editorLang = Common.localStorage.getItem('sse-settings-func-lang'); + editorLang = (editorLang ? editorLang : 'en').split(/[\-\_]/)[0].toLowerCase(); var localizationFunctions = function(data) { @@ -105,8 +106,8 @@ define([ fillFunctions: function() { var me = this, - functions = {}, - editorLang = SSE.getController("Main").editorConfig.lang; + functions = {}; + var editorLang = Common.localStorage.getItem('sse-settings-func-lang'); editorLang = (editorLang ? editorLang : 'en').split(/[\-\_]/)[0].toLowerCase(); @@ -141,7 +142,7 @@ define([ } } - view.setFunctions(functions); + view.setFunctions(functions, editorLang); view.render(); }; diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index 1faba16e0..476d744cd 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -414,7 +414,22 @@
    -
    + +
    <%= scope.textFormulaLanguage %>
    + @@ -641,4 +656,24 @@ + + + +
    + +
    +
    +
    +
    +
      +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index ca0684bf9..21de71fb8 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -168,6 +168,11 @@ define([ showSetApp: function() { this.showPage('#settings-application-view'); + $('#language-formula').single('click', _.bind(this.showFormulaLanguage, this)); + }, + + showFormulaLanguage: function () { + this.showPage('#language-formula-view'); }, showColorSchemes: function () { @@ -261,6 +266,38 @@ define([ $list.html(items.join('')); }, + renderFormLang: function(indexLang, languages) { + var $pageLang = $('.page[data-page=language-formula-view]'), + $list = $pageLang.find('ul'), + items = [], + textEx = this.textExample; + + _.each(languages, function (lang, index) { + items.push(_.template([ + '
  • ', + '', + '
  • ' + ].join(''))({ + android: Framework7.prototype.device.android, + item: lang, + index: index, + selectIndex: indexLang, + textExamp: textEx + })); + }); + + $list.html(items.join('')); + }, + unknownText: 'Unknown', textFindAndReplace: 'Find and Replace', textSettings: 'Settings', @@ -304,7 +341,9 @@ define([ textLeft: 'Left', textBottom: 'Bottom', textRight: 'Right', - textCollaboration: 'Collaboration' + textCollaboration: 'Collaboration', + textFormulaLanguage: 'Formula Language', + textExample: 'Example' } })(), SSE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js b/apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js index d4777f34d..412b74035 100644 --- a/apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js +++ b/apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js @@ -109,17 +109,35 @@ define([ quickFunction.caption = me.functions[quickFunction.type].caption }); } + var lang = me.lang; + + this.translatTable = {}; + + var name = '', translate = '', + descriptions = ['DateAndTime', 'Engineering', 'Financial', 'Information', 'Logical', 'LookupAndReference', 'Mathematic', 'Statistical', 'TextAndData' ]; + for (var i=0; i').append(_.template(me.template)({ @@ -134,8 +152,9 @@ define([ return this; }, - setFunctions: function (arr) { + setFunctions: function (arr, lang) { this.functions = arr; + this.lang = lang; }, rootLayout: function () { @@ -202,7 +221,57 @@ define([ sCatLookupAndReference: 'Lookup and Reference', sCatMathematic: 'Math and trigonometry', sCatStatistical: 'Statistical', - sCatTextAndData: 'Text and data' + sCatTextAndData: 'Text and data', + + sCatDateAndTime_ru: 'Дата и время', + sCatEngineering_ru: 'Инженерные', + sCatFinancial_ru: 'Финансовые', + sCatInformation_ru: 'Информационные', + sCatLogical_ru: 'Логические', + sCatLookupAndReference_ru: 'Поиск и ссылки', + sCatMathematic_ru: 'Математические', + sCatStatistical_ru: 'Статистические', + sCatTextAndData_ru: 'Текст и данные', + + sCatLogical_es: 'Lógico', + sCatDateAndTime_es: 'Fecha y hora', + sCatEngineering_es: 'Ingenería', + sCatFinancial_es: 'Financial', + sCatInformation_es: 'Información', + sCatLookupAndReference_es: 'Búsqueda y referencia', + sCatMathematic_es: 'Matemáticas y trigonometría', + sCatStatistical_es: 'Estadístico', + sCatTextAndData_es: 'Texto y datos', + + sCatLogical_fr: 'Logique', + sCatDateAndTime_fr: 'Date et heure', + sCatEngineering_fr: 'Ingénierie', + sCatFinancial_fr: 'Financier', + sCatInformation_fr: 'Information', + sCatLookupAndReference_fr: 'Recherche et référence', + sCatMathematic_fr: 'Maths et trigonométrie', + sCatStatistical_fr: 'Statistiques', + sCatTextAndData_fr: 'Texte et données', + + sCatLogical_pl: 'Logiczny', + sCatDateAndTime_pl: 'Data i czas', + sCatEngineering_pl: 'Inżyniera', + sCatFinancial_pl: 'Finansowe', + sCatInformation_pl: 'Informacja', + sCatLookupAndReference_pl: 'Wyszukiwanie i odniesienie', + sCatMathematic_pl: 'Matematyczne i trygonometryczne', + sCatStatistical_pl: 'Statystyczny', + sCatTextAndData_pl: 'Tekst i data', + + sCatDateAndTime_de: 'Datum und Uhrzeit', + sCatEngineering_de: 'Konstruktion', + sCatFinancial_de: 'Finanzmathematik', + sCatInformation_de: 'Information', + sCatLogical_de: 'Logisch', + sCatLookupAndReference_de: 'Suchen und Bezüge', + sCatMathematic_de: 'Mathematik und Trigonometrie', + sCatStatistical_de: 'Statistik', + sCatTextAndData_de: 'Text und Daten' } })(), SSE.Views.AddFunction || {})); From 251bba4a577e2cc254c574824a694418f01dcd73 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 11 Jun 2019 15:11:35 +0300 Subject: [PATCH 30/33] [SSE mobile] Fix Bug 41759 --- .../mobile/app/controller/Search.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Search.js b/apps/spreadsheeteditor/mobile/app/controller/Search.js index 7415bf69d..cd36d1c10 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Search.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Search.js @@ -197,6 +197,12 @@ define([ $inputMatchCase.single('change', _.bind(me.onMatchCaseClick, me)); $inputMatchCell.single('change', _.bind(me.onMatchCellClick, me)); $inputHighlightResults.single('change', _.bind(me.onHighlightResultsClick, me)); + + if (isReplace) { + Common.SharedSettings.set('look-in', 'formulas'); + $('input[name=look-in]').val(['formulas']); + $('input[name=look-in]:eq(1)').parent().addClass('disabled'); + } }, onSearchbarShow: function(bar) { @@ -368,6 +374,14 @@ define([ Common.SharedSettings.set('search-is-replace', isReplace); $('.searchbar.document').toggleClass('replace', isReplace); + + if (isReplace) { + Common.SharedSettings.set('look-in', 'formulas'); + $('input[name=look-in]').val(['formulas']); + $('input[name=look-in]:eq(1)').parent().addClass('disabled'); + } else { + $('input[name=look-in]:eq(1)').parent().removeClass('disabled'); + } }, onSearchInChange: function (e) { From 67c4f08637b448acf913fd805b354526a049acd3 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 11 Jun 2019 15:19:16 +0300 Subject: [PATCH 31/33] [SSE mobile] Fix replace --- apps/spreadsheeteditor/mobile/app/controller/Search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Search.js b/apps/spreadsheeteditor/mobile/app/controller/Search.js index cd36d1c10..0fc5f8e5a 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Search.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Search.js @@ -261,7 +261,7 @@ define([ onReplace: function (btn) { var me = this; - me.onQueryReplace(me.searchBar.query, me.replaceBar.query); + me.onQueryReplace(me.searchBar.query, me.replaceBar.query ? me.replaceBar.query : ""); setTimeout(function () { me.onQuerySearch(me.searchBar.query, 'next'); }, 20); From 0c02e3de0ff20599c1de5aa0613d4b59f8bfffb0 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 13 Jun 2019 10:58:23 +0300 Subject: [PATCH 32/33] [SSE mobile] Fix onReplace --- apps/spreadsheeteditor/mobile/app/controller/Search.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Search.js b/apps/spreadsheeteditor/mobile/app/controller/Search.js index 0fc5f8e5a..ddbcbf1f5 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Search.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Search.js @@ -89,6 +89,7 @@ define([ setApi: function(api) { this.api = api; + this.api.asc_registerCallback('asc_onRenameCellTextEnd', _.bind(this.onReplaceNext, this)); }, setMode: function (mode) { @@ -262,9 +263,10 @@ define([ onReplace: function (btn) { var me = this; me.onQueryReplace(me.searchBar.query, me.replaceBar.query ? me.replaceBar.query : ""); - setTimeout(function () { - me.onQuerySearch(me.searchBar.query, 'next'); - }, 20); + }, + + onReplaceNext: function() { + this.onQuerySearch(this.searchBar.query, 'next'); }, onReplaceAll: function (e) { From 23eab461e0faef67d6b094f067ee7c08cc4ae79e Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 13 Jun 2019 11:23:37 +0300 Subject: [PATCH 33/33] Add translations --- apps/documenteditor/mobile/locale/en.json | 4 +++- apps/presentationeditor/mobile/locale/en.json | 8 +++++++- apps/spreadsheeteditor/mobile/locale/en.json | 17 ++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index b78d2efde..adc775d36 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -241,6 +241,7 @@ "DE.Controllers.Collaboration.textParaMoveTo": "Moved:", "DE.Controllers.Collaboration.textParaMoveFromUp": "Moved Up:", "DE.Controllers.Collaboration.textParaMoveFromDown": "Moved Down:", + "DE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.", "DE.Views.AddImage.textAddress": "Address", "DE.Views.AddImage.textBack": "Back", "DE.Views.AddImage.textFromLibrary": "Picture from Library", @@ -496,5 +497,6 @@ "DE.Views.Collaboration.textMarkup": "Markup", "DE.Views.Collaboration.textFinal": "Final", "DE.Views.Collaboration.textOriginal": "Original", - "DE.Views.Collaboration.textChange": "Review Change" + "DE.Views.Collaboration.textChange": "Review Change", + "DE.Views.Collaboration.textEditUsers": "Users" } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index b54f6ec84..43260e8f6 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -226,6 +226,7 @@ "PE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application", "PE.Controllers.Toolbar.leaveButtonText": "Leave this Page", "PE.Controllers.Toolbar.stayButtonText": "Stay on this Page", + "PE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.", "PE.Views.AddImage.textAddress": "Address", "PE.Views.AddImage.textBack": "Back", "PE.Views.AddImage.textFromLibrary": "Picture from Library", @@ -474,5 +475,10 @@ "PE.Views.Settings.textPresentSettings": "Presentation Settings", "PE.Views.Settings.textColorSchemes": "Color Schemes", "PE.Views.Settings.unknownText": "Unknown", - "PE.Views.Toolbar.textBack": "Back" + "PE.Views.Settings.textCollaboration": "Collaboration", + "PE.Views.Toolbar.textBack": "Back", + "PE.Views.Collaboration.textCollaboration": "Collaboration", + "PE.Views.Collaboration.textСomments": "Сomments", + "PE.Views.Collaboration.textBack": "Back", + "PE.Views.Collaboration.textEditUsers": "Users" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 624165a21..108c5c6d6 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -299,6 +299,7 @@ "SSE.Controllers.Toolbar.dlgLeaveTitleText": "You leave the application", "SSE.Controllers.Toolbar.leaveButtonText": "Leave this Page", "SSE.Controllers.Toolbar.stayButtonText": "Stay on this Page", + "SSE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.", "SSE.Views.AddFunction.sCatDateAndTime": "Date and time", "SSE.Views.AddFunction.sCatEngineering": "Engineering", "SSE.Views.AddFunction.sCatFinancial": "Financial", @@ -494,6 +495,13 @@ "SSE.Views.Search.textSearchIn": "Search In", "SSE.Views.Search.textSheet": "Sheet", "SSE.Views.Search.textWorkbook": "Workbook", + "SSE.Views.Search.textLookIn": "Look In", + "SSE.Views.Search.textFormulas": "Formulas", + "SSE.Views.Search.textValues": "Values", + "SSE.Views.Search.textByColumns": "By columns", + "SSE.Views.Search.textByRows": "By rows", + "SSE.Views.Search.textSearchBy": "Search", + "SSE.Views.Search.textHighlightRes": "Highlight results", "SSE.Views.Settings.textAbout": "About", "SSE.Views.Settings.textAddress": "address", "SSE.Views.Settings.textAuthor": "Author", @@ -537,5 +545,12 @@ "SSE.Views.Settings.textBottom": "Bottom", "SSE.Views.Settings.textRight": "Right", "SSE.Views.Settings.unknownText": "Unknown", - "SSE.Views.Toolbar.textBack": "Back" + "SSE.Views.Settings.textFormulaLanguage": "Formula Language", + "SSE.Views.Settings.textExample": "Example", + "SSE.Views.Settings.textCollaboration": "Collaboration", + "SSE.Views.Toolbar.textBack": "Back", + "SSE.Views.Collaboration.textCollaboration": "Collaboration", + "SSE.Views.Collaboration.textСomments": "Сomments", + "SSE.Views.Collaboration.textBack": "Back", + "SSE.Views.Collaboration.textEditUsers": "Users" } \ No newline at end of file