[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({
|
(new DE.Views.WatermarkSettingsDialog({
|
||||||
props: me.api.asc_GetWatermarkProps(),
|
props: me.api.asc_GetWatermarkProps(),
|
||||||
api: me.api,
|
api: me.api,
|
||||||
|
lang: me.mode.lang,
|
||||||
fontStore: me.fontstore,
|
fontStore: me.fontstore,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
|
|
|
@ -111,11 +111,14 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
||||||
this.textControls = [];
|
this.textControls = [];
|
||||||
this.imageControls = [];
|
this.imageControls = [];
|
||||||
this.fontName = 'Arial';
|
this.fontName = 'Arial';
|
||||||
this.lang = {value: 'en', displayValue: 'English'};
|
|
||||||
this.text = '';
|
this.text = '';
|
||||||
this.isAutoColor = false;
|
this.isAutoColor = false;
|
||||||
this.isImageLoaded = 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);
|
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -430,8 +433,11 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
||||||
});
|
});
|
||||||
if (data.length) {
|
if (data.length) {
|
||||||
me.cmbLang.setData(data);
|
me.cmbLang.setData(data);
|
||||||
me.cmbLang.setValue(me.lang.displayValue);
|
var res = me.loadWMText(me.lang.value);
|
||||||
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.cmbLang.setDisabled(!me.radioText.getValue());
|
||||||
me.text && me.cmbText.setValue(me.text);
|
me.text && me.cmbText.setValue(me.text);
|
||||||
} else
|
} else
|
||||||
|
@ -477,6 +483,7 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template',
|
||||||
this.cmbText.setData(data);
|
this.cmbText.setData(data);
|
||||||
this.cmbText.setValue(data[0].value);
|
this.cmbText.setValue(data[0].value);
|
||||||
}
|
}
|
||||||
|
return item ? item.get('displayValue') : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
insertFromUrl: function() {
|
insertFromUrl: function() {
|
||||||
|
|
Loading…
Reference in a new issue