[SSE] Fix formula help

This commit is contained in:
Julia Radzhabova 2020-04-22 17:58:16 +03:00
parent 5fb329c853
commit 29ccd1e6d7
2 changed files with 8 additions and 4 deletions

View file

@ -226,9 +226,7 @@ define([
onSendFunctionWizardInfo: function(props) {
if (props) {
// show formula settings
console.log('show formula settings');
var me = this;
var name = props.asc_getName(),
descrarr = this.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")),
funcprops = {

View file

@ -328,19 +328,25 @@ define([
this.helpUrl = null;
return;
}
var lang = Common.Utils.InternalSettings.get("sse-settings-func-help");
if (!lang)
lang = (this.lang) ? this.lang.split(/[\-\_]/)[0] : 'en';
var me = this,
lang = (this.lang) ? this.lang.split(/[\-\_]/)[0] : 'en',
name = '/Functions/' + this.funcprops.origin.toLocaleLowerCase().replace(/\./g, '-') + '.htm',
url = 'resources/help/' + lang + name;
fetch(url).then(function(response){
if ( response.ok ) {
Common.Utils.InternalSettings.set("sse-settings-func-help", lang);
me.helpUrl = url;
me.showHelp();
} else {
url = 'resources/help/en' + name;
lang = 'en';
url = 'resources/help/' + lang + name;
fetch(url).then(function(response){
if ( response.ok ) {
Common.Utils.InternalSettings.set("sse-settings-func-help", lang);
me.helpUrl = url;
me.showHelp();
} else {