fixed not translated empty_label in selectAccount or nextmatchAccountFilter: they always get translated independent of no_lang attribute

This commit is contained in:
Ralf Becker 2013-10-10 10:23:37 +00:00
parent e0954288dd
commit ece1062b8b
2 changed files with 12 additions and 12 deletions

View File

@ -83,11 +83,11 @@ var et2_selectAccount = et2_selectbox.extend(
// Reference to object with dialog
this.dialog = null;
this._super.apply(this, arguments);
this._super.call(this, _parent, _attrs);
},
destroy: function() {
this._super.apply(this, arguments);
this._super.apply(this, arguments);
},
/**
@ -105,8 +105,8 @@ var et2_selectAccount = et2_selectbox.extend(
/**
* Single selection - override to add search button
*/
createInputWidget: function() {
createInputWidget: function()
{
this._super.apply(this, arguments);
var type = this.egw().preference('account_selection', 'common');
@ -616,11 +616,11 @@ var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM],
{
attributes: {
"empty_label": {
"name": "Empty label",
"type": "string",
"default": "",
"description": "Textual label for first row, eg: 'All' or 'None'. ID will be ''"
},
"name": "Empty label",
"type": "string",
"default": "",
"description": "Textual label for first row, eg: 'All' or 'None'. ID will be ''",
},
},
legacyOptions: ["empty_label"],

View File

@ -110,7 +110,7 @@ var et2_selectbox = et2_inputWidget.extend(
{
if(isNaN(this.options.rows))
{
this.options.empty_label = this.egw().lang(this.options.rows);
this.options.empty_label = this.options.rows;
this.options.rows = 1;
}
else
@ -559,10 +559,10 @@ var et2_selectbox = et2_inputWidget.extend(
{
this.multiOptions.empty();
}
// Re-add empty, it's usually not there
// Re-add empty, it's usually not there (empty_label get's allways translated, independent of no_lang!)
if(this.options.empty_label)
{
this._appendOptionElement('', this.options.no_lang ? this.options.empty_label : this.egw().lang(this.options.empty_label));
this._appendOptionElement('', this.egw().lang(this.options.empty_label));
}
// Add the select_options