Author: nathangray
New Revision: 55067
URL: http://svn.stylite.de/viewvc/egroupware?rev=55067&view=rev
Log:
Fix some issues causing problems with existing taglists:
- Some account widgets were not finding accounts through selectbox
- Setting a single value was causing an error
Modified:
trunk/etemplate/js/et2_widget_taglist.js
— trunk/etemplate/js/et2_widget_taglist.js (original)
+++ trunk/etemplate/js/et2_widget_taglist.js Thu Feb 18 17:29:24 2016
@@ -39,7 +39,7 @@
“select_options”: {
“type”: “any”,
“name”: “Select options”,
-
"default": null, //[{id: "a", label: "Alpha"},{id:"b", label: "Beta"}],
-
"default": {}, //[{id: "a", label: "Alpha"},{id:"b", label: "Beta"}],
"description": "Internaly used to hold the select options."
},
@@ -171,8 +171,8 @@
this.taglist_options = jQuery.extend( {
// magisuggest can NOT work setting an empty autocomplete url, it will then call page url!
// --> setting an empty options list instead
-
data: this.options.select_options && !jQuery.isEmptyObject(this.options.select_options) ?
-
this.options.select_options || {} : this.options.autocomplete_url,
-
data: this.options.autocomplete_url ? this.options.autocomplete_url :
-
this.options.select_options || {},
dataUrlParams: this.options.autocomplete_params,
method: 'GET',
displayField: "label",
@@ -215,16 +215,6 @@
// Bind keyup so we can start ajax search when we like
.on(‘keyup.start_search’, jQuery.proxy(this._keyup, this));
-
// Unbind change handler of widget's ancestor to stop it from bubbling
-
// taglist has its own onchange
-
$j(this.getDOMNode()).unbind('change.et2_inputWidget');
-
-
// onChange
-
if(this.options.onchange && typeof this.onchange === 'function')
-
{
-
this.$taglist.on("selectionchange", this.onchange);
-
}
-
// onClick - pass more than baseWidget, so unbind it to avoid double callback
if(typeof this.onclick == 'function')
{
@@ -403,7 +393,9 @@
*/
set_value: function(value)
{
-
var values = jQuery.isArray(value) ? jQuery.extend([],value) : [value];
-
this.options.value = values;
-
if(this.taglist == null) return;
if(!value)
@@ -412,7 +404,6 @@
return;
}
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs