mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
allow to set a limit of selected entries
This commit is contained in:
parent
bd63529096
commit
0a37e675bd
@ -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");
|
||||
if(typeof egw != 'undefined') egw(window).includeCSS(egw.webserverUrl + "/phpgwapi/js/jquery/magicsuggest/src/magicsuggest-1.3.0.css");
|
||||
|
Loading…
Reference in New Issue
Block a user