Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap-multiselect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap-multiselect
Commits
47f6453b
Commit
47f6453b
authored
Jul 15, 2013
by
Tim Schlechter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow setting the none-selected and n-selected display text in the default buttonText function
parent
26e4348e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+5
-3
No files found.
js/bootstrap-multiselect.js
View file @
47f6453b
...
...
@@ -85,11 +85,11 @@
// If more than 3 options are selected, the number of selected options is printed.
buttonText
:
function
(
options
,
select
)
{
if
(
options
.
length
==
0
)
{
return
'
None selected
<b class="caret"></b>
'
;
return
this
.
nonSelectedText
+
'
<b class="caret"></b>
'
;
}
else
if
(
options
.
length
>
3
)
{
return
options
.
length
+
'
selected
<b class="caret"></b>
'
;
return
options
.
length
+
'
'
+
this
.
nSelectedText
+
'
<b class="caret"></b>
'
;
}
else
{
var
selected
=
''
;
...
...
@@ -121,7 +121,9 @@
filterPlaceholder
:
'
Search
'
,
// possible options: 'text', 'value', 'both'
filterBehavior
:
'
text
'
,
preventInputChangeEvent
:
false
preventInputChangeEvent
:
false
,
nonSelectedText
:
'
None selected
'
,
nSelectedText
:
'
selected
'
},
constructor
:
Multiselect
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment