Skip to content

Commit

Permalink
Merge pull request '[SSE] For Bug 72019' (#177) from fix/bug-72019 in…
Browse files Browse the repository at this point in the history
…to release/v8.3.0
  • Loading branch information
Julia Radzhabova committed Dec 13, 2024
2 parents 21b724f + 946794e commit 24ebe0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions apps/spreadsheeteditor/main/app/controller/FormulaDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ define([
return this;
},

setApi: function (api) {
setApi: function (api, loadTranslations) {
this.api = api;

if (this.formulasGroups) {
Common.Utils.InternalSettings.set("sse-settings-func-last", Common.localStorage.getItem("sse-settings-func-last"));
this.reloadTranslations(Common.localStorage.getItem("sse-settings-func-locale") || this.appOptions.lang, true);
this.reloadTranslations(Common.localStorage.getItem("sse-settings-func-locale") || this.appOptions.lang, true, loadTranslations);

if (!this.mode.isEdit) return;
if (!this.mode.isEdit || loadTranslations) return;

var me = this;

Expand Down Expand Up @@ -176,7 +176,7 @@ define([
this.appOptions.lang = data.config.lang;
},

reloadTranslations: function (lang, suppressEvent) {
reloadTranslations: function (lang, suppressEvent, loadTranslations) {
this.formulasLoaded = false;

lang = (lang || 'en').toLowerCase();
Expand Down Expand Up @@ -206,7 +206,7 @@ define([
});
}

if (!this.mode.isEdit) return;
if (!this.mode.isEdit || loadTranslations) return;

if (me.langDescJson[lang])
me.loadingFormulas(me.langDescJson[lang], suppressEvent);
Expand Down
9 changes: 5 additions & 4 deletions apps/spreadsheeteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,7 @@ define([
me.onDocumentModifiedChanged(me.api.asc_isDocumentModified());

var formulasDlgController = application.getController('FormulaDialog');
if (formulasDlgController) {
formulasDlgController.setMode(me.appOptions).setApi(me.api);
}
formulasDlgController && formulasDlgController.setApi(me.api);
if (me.needToUpdateVersion)
toolbarController.onApiCoAuthoringDisconnect();

Expand All @@ -1137,7 +1135,7 @@ define([
}, 50);
} else {
var formulasDlgController = application.getController('FormulaDialog');
formulasDlgController && formulasDlgController.setMode(me.appOptions).setApi(me.api);
formulasDlgController && formulasDlgController.setApi(me.api);
documentHolderView.createDelayedElementsViewer();
Common.Utils.injectSvgIcons();
Common.NotificationCenter.trigger('document:ready', 'main');
Expand Down Expand Up @@ -1655,6 +1653,9 @@ define([

var celleditorController = this.getApplication().getController('CellEditor');
celleditorController && celleditorController.setApi(this.api).setMode(this.appOptions);

var formulasDlgController = this.getApplication().getController('FormulaDialog');
formulasDlgController && formulasDlgController.setMode(this.appOptions).setApi(this.api, true);
},

applyModeEditorElements: function(prevmode) {
Expand Down

0 comments on commit 24ebe0c

Please sign in to comment.