Commit 6804c4a2 authored by Julia Radzhabova's avatar Julia Radzhabova

[DE] Disable language button in the status bar until languages are loaded.

parent 24ad7e79
......@@ -150,7 +150,8 @@ define([
this.btnDocLanguage = new Common.UI.Button({
el: $('#btn-doc-lang',this.el),
hint: this.tipSetDocLang,
hintAnchor: 'top'
hintAnchor: 'top',
disabled: true
});
this.btnSetSpelling = new Common.UI.Button({
......@@ -203,7 +204,8 @@ define([
this.btnLanguage = new Common.UI.Button({
el: panelLang,
hint: this.tipSetLang,
hintAnchor: 'top-left'
hintAnchor: 'top-left',
disabled: true
});
this.btnLanguage.cmpEl.on({
'show.bs.dropdown': function () {
......@@ -465,6 +467,10 @@ define([
}, this);
this.langMenu.doLayout();
if (this.langMenu.items.length>0) {
this.btnLanguage.setDisabled(false);
this.btnDocLanguage.setDisabled(false);
}
},
setLanguage: function(info) {
......@@ -493,8 +499,9 @@ define([
},
SetDisabled: function(disable) {
this.btnLanguage.setDisabled(disable);
this.btnDocLanguage.setDisabled(disable);
var langs = this.langMenu.items.length>0;
this.btnLanguage.setDisabled(disable || !langs);
this.btnDocLanguage.setDisabled(disable || !langs);
if (disable) {
this.state.changespanel = this.mnuChangesPanel.checked;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment