From ece1062b8b1aa62004c2be417116f4bc22d14369 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Oct 2013 10:23:37 +0000 Subject: [PATCH] fixed not translated empty_label in selectAccount or nextmatchAccountFilter: they always get translated independent of no_lang attribute --- etemplate/js/et2_widget_selectAccount.js | 18 +++++++++--------- etemplate/js/et2_widget_selectbox.js | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/etemplate/js/et2_widget_selectAccount.js b/etemplate/js/et2_widget_selectAccount.js index 2aa4cc52b2..61b9617d0d 100644 --- a/etemplate/js/et2_widget_selectAccount.js +++ b/etemplate/js/et2_widget_selectAccount.js @@ -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"], diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index 742b786ac3..71cfaf43fd 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -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