From 24a3478b25feb126e66ee702f26dd190c6d3e346 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 10 Mar 2016 18:00:24 +0000 Subject: [PATCH] When taglist is single, expand on click anywhere in the widget (except x) --- etemplate/js/et2_widget_taglist.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index bd4be71ac2..a5804fd69e 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -593,7 +593,14 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR this._multiple = multiple === true ? true : false; this.div.toggleClass('et2_taglist_single', !this._multiple) .toggleClass('et2_taglist_toggle', this.options.multiple === 'toggle') - .removeClass('ui-state-hover'); + .removeClass('ui-state-hover') + .off('click.single'); + if(this._multiple == false) + { + this.div.on('click.single', jQuery.proxy(function() { + this.taglist.expand(); + },this)); + } this.taglist.setMaxSelection(this._multiple ? this.options.maxSelection : 1); if(!this._multiple && this.taglist.getValue().length > 1) {