From b136d22c3a631c72a0cc58f054f2f2bae309b3f7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 17 Nov 2015 20:09:19 +0000 Subject: [PATCH] Make sure to open correct dialog, even if multiple option gets changed after creation. --- etemplate/js/et2_widget_selectAccount.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectAccount.js b/etemplate/js/et2_widget_selectAccount.js index a26eae28b4..4f384085bb 100644 --- a/etemplate/js/et2_widget_selectAccount.js +++ b/etemplate/js/et2_widget_selectAccount.js @@ -130,7 +130,16 @@ var et2_selectAccount = et2_selectbox.extend( { var button = jQuery(document.createElement("span")) .addClass("et2_clickable") - .click(this, this.options.multiple ? this._open_multi_search : this._open_search) + .click(this, jQuery.proxy(function(e) { + if(this.options.multiple) + { + this._open_multi_search(e); + } + else + { + this._open_search(e); + } + },this)) .attr("title", egw.lang("popup with search")) .append('');