Author: ralfbecker
New Revision: 55404
URL: http://svn.stylite.de/viewvc/egroupware?rev=55404&view=rev
Log:
allow to dynamic change autocomplete_params and make minChars a widget attribute
Modified:
trunk/etemplate/js/et2_widget_taglist.js
— trunk/etemplate/js/et2_widget_taglist.js (original)
+++ trunk/etemplate/js/et2_widget_taglist.js Tue Mar 15 22:57:43 2016
@@ -121,6 +121,12 @@
type: “string”,
default: null,
description: “group results by given JSON attribute”
-
},
-
minChars: {
-
name: "chars to start query",
-
type: "integer",
-
default: 3,
-
description: "minimum number of characters before expanding the combo"
}
},
@@ -233,7 +239,8 @@
width: this.options.width, // propagate width
highlight: false, // otherwise renderer have to return strings
selectFirst: true,
-
groupBy: this.options.groupBy && typeof this.options.groupBy == 'string' ? this.options.groupBy : null,
-
minChars: parseInt(this.options.minChars) ? parseInt(this.options.minChars) : 0
}, this.lib_options);
if(this.options.height) {
@@ -278,8 +285,10 @@
// Bind keyup so we can start ajax search when we like
.on(‘keyup.start_search’, jQuery.proxy(this._keyup, this))
.on(‘blur’, jQuery.proxy(function() {
-
if (this.div) {
-
this.div.removeClass('ui-state-active');
-
this.resize();
-
}
}, this))
// Hide tooltip when you're editing, it can get annoying otherwise
.on('focus', function() {
@@ -513,6 +522,21 @@
this.taglist.setData(function(query) {
return widget._data.call(widget,query);
});
-
}
- },
-
- /**
-
- Set autocomplete parameters
-
-
- */
- set_autocomplete_params: function(_params)
- {
-
if (this.options.autocomplate_params != _params)
-
{
-
this.options.autocomplate_params = _params;
-
-
if (this.taglist) this.taglist.setDataUrlParams(_params);
}
},
@@ -727,7 +751,7 @@
label: v
};
}
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs