mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +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": {
|
"width": {
|
||||||
default: "100%"
|
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
|
// Selectbox attributes that are not applicable
|
||||||
"multiple": { ignore: true},
|
"multiple": { ignore: true},
|
||||||
"rows": { ignore: true},
|
"rows": { ignore: true},
|
||||||
@ -152,7 +158,8 @@ var et2_taglist = et2_selectbox.extend(
|
|||||||
disabled: this.options.disabled || this.options.readonly,
|
disabled: this.options.disabled || this.options.readonly,
|
||||||
editable: !(this.options.disabled || this.options.readonly),
|
editable: !(this.options.disabled || this.options.readonly),
|
||||||
selectionRenderer: this.options.tagRenderer || this.selectionRenderer,
|
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
|
// Display / hide a loading icon while fetching
|
||||||
@ -257,4 +264,4 @@ et2_register_widget(et2_taglist, ["taglist"]);
|
|||||||
|
|
||||||
// Require css
|
// Require css
|
||||||
// TODO: merge into etemplate2.css with all other widgets when done
|
// 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