Fix read-only selectboxes not being translated

This commit is contained in:
Nathan Gray 2013-06-25 14:37:24 +00:00
parent aa221a4e77
commit e0b576e822

View File

@ -719,6 +719,19 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM],
set_select_options: function(_options) {
for (var key in _options)
{
// Translate the options
if(!this.options.no_lang)
{
if (typeof _options[key] === 'object')
{
if(_options[key]["label"]) _options[key]["label"] = this.egw().lang(_options[key]["label"]);
if(_options[key]["title"]) _options[key]["title"] = this.egw().lang(_options[key]["title"]);
}
else
{
_options[key] = this.egw().lang(_options[key]);
}
}
this.optionValues[key] = _options[key];
}
},