[DE] Set interface language as default for watermark
This commit is contained in:
parent
92ad1e4d4e
commit
822968c6ad
|
@ -1951,6 +1951,7 @@ define([
|
|||
(new DE.Views.WatermarkSettingsDialog({
|
||||
props: me.api.asc_GetWatermarkProps(),
|
||||
api: me.api,
|
||||
lang: me.mode.lang,
|
||||
fontStore: me.fontstore,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
|
|
|
@ -111,11 +111,14 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
|||
this.textControls = [];
|
||||
this.imageControls = [];
|
||||
this.fontName = 'Arial';
|
||||
this.lang = {value: 'en', displayValue: 'English'};
|
||||
this.text = '';
|
||||
this.isAutoColor = false;
|
||||
this.isImageLoaded = false;
|
||||
|
||||
var lang = options.lang || 'en',
|
||||
val = Common.util.LanguageInfo.getLocalLanguageCode(lang);
|
||||
this.lang = val ? {value: lang, displayValue: Common.util.LanguageInfo.getLocalLanguageName(val)[1], default: true} : {value: 'en', displayValue: 'English', default: true};
|
||||
|
||||
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
||||
|
@ -430,8 +433,11 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
|||
});
|
||||
if (data.length) {
|
||||
me.cmbLang.setData(data);
|
||||
me.cmbLang.setValue(me.lang.displayValue);
|
||||
me.loadWMText(me.lang.value);
|
||||
var res = me.loadWMText(me.lang.value);
|
||||
if (res && me.lang.default)
|
||||
me.cmbLang.setValue(res);
|
||||
else
|
||||
me.cmbLang.setValue(me.lang.displayValue);
|
||||
me.cmbLang.setDisabled(!me.radioText.getValue());
|
||||
me.text && me.cmbText.setValue(me.text);
|
||||
} else
|
||||
|
@ -477,6 +483,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
|||
this.cmbText.setData(data);
|
||||
this.cmbText.setValue(data[0].value);
|
||||
}
|
||||
return item ? item.get('displayValue') : null;
|
||||
},
|
||||
|
||||
insertFromUrl: function() {
|
||||
|
|
Loading…
Reference in a new issue