diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index f7c9dcd1ee..6afe4f9247 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -95,6 +95,12 @@ var et2_taglist = et2_selectbox.extend( "width": { default: "100%" }, + "maxSelection": { + "name": "max Selection", + "type": "integer", + "default": null, + "description": "The maximum number of items the user can select if multiple selection is allowed." + }, // Selectbox attributes that are not applicable "multiple": { ignore: true}, "rows": { ignore: true}, @@ -152,7 +158,8 @@ var et2_taglist = et2_selectbox.extend( disabled: this.options.disabled || this.options.readonly, editable: !(this.options.disabled || this.options.readonly), selectionRenderer: this.options.tagRenderer || this.selectionRenderer, - renderer: this.options.listRenderer || null + renderer: this.options.listRenderer || null, + maxSelection: this.options.maxSelection }); // Display / hide a loading icon while fetching @@ -257,4 +264,4 @@ et2_register_widget(et2_taglist, ["taglist"]); // Require css // TODO: merge into etemplate2.css with all other widgets when done -if(typeof egw != 'undefined') egw(window).includeCSS(egw.webserverUrl + "/phpgwapi/js/jquery/magicsuggest/src/magicsuggest-1.3.0.css"); \ No newline at end of file +if(typeof egw != 'undefined') egw(window).includeCSS(egw.webserverUrl + "/phpgwapi/js/jquery/magicsuggest/src/magicsuggest-1.3.0.css");