[SSE] Fix formula help
This commit is contained in:
parent
5fb329c853
commit
29ccd1e6d7
|
@ -226,9 +226,7 @@ define([
|
||||||
onSendFunctionWizardInfo: function(props) {
|
onSendFunctionWizardInfo: function(props) {
|
||||||
if (props) {
|
if (props) {
|
||||||
// show formula settings
|
// show formula settings
|
||||||
console.log('show formula settings');
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
var name = props.asc_getName(),
|
var name = props.asc_getName(),
|
||||||
descrarr = this.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")),
|
descrarr = this.getDescription(Common.Utils.InternalSettings.get("sse-settings-func-locale")),
|
||||||
funcprops = {
|
funcprops = {
|
||||||
|
|
|
@ -328,19 +328,25 @@ define([
|
||||||
this.helpUrl = null;
|
this.helpUrl = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var lang = Common.Utils.InternalSettings.get("sse-settings-func-help");
|
||||||
|
if (!lang)
|
||||||
|
lang = (this.lang) ? this.lang.split(/[\-\_]/)[0] : 'en';
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
lang = (this.lang) ? this.lang.split(/[\-\_]/)[0] : 'en',
|
|
||||||
name = '/Functions/' + this.funcprops.origin.toLocaleLowerCase().replace(/\./g, '-') + '.htm',
|
name = '/Functions/' + this.funcprops.origin.toLocaleLowerCase().replace(/\./g, '-') + '.htm',
|
||||||
url = 'resources/help/' + lang + name;
|
url = 'resources/help/' + lang + name;
|
||||||
|
|
||||||
fetch(url).then(function(response){
|
fetch(url).then(function(response){
|
||||||
if ( response.ok ) {
|
if ( response.ok ) {
|
||||||
|
Common.Utils.InternalSettings.set("sse-settings-func-help", lang);
|
||||||
me.helpUrl = url;
|
me.helpUrl = url;
|
||||||
me.showHelp();
|
me.showHelp();
|
||||||
} else {
|
} else {
|
||||||
url = 'resources/help/en' + name;
|
lang = 'en';
|
||||||
|
url = 'resources/help/' + lang + name;
|
||||||
fetch(url).then(function(response){
|
fetch(url).then(function(response){
|
||||||
if ( response.ok ) {
|
if ( response.ok ) {
|
||||||
|
Common.Utils.InternalSettings.set("sse-settings-func-help", lang);
|
||||||
me.helpUrl = url;
|
me.helpUrl = url;
|
||||||
me.showHelp();
|
me.showHelp();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue