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
d3e9b9df
Commit
d3e9b9df
authored
May 14, 2015
by
Kuiyu CHANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added delimiter option to control the delimiter character for mouse-over display of selected items
parent
c8351a6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+3
-1
index.html
index.html
+31
-0
No files found.
dist/js/bootstrap-multiselect.js
View file @
d3e9b9df
...
@@ -223,8 +223,9 @@
...
@@ -223,8 +223,9 @@
}
}
else
{
else
{
var
selected
=
''
;
var
selected
=
''
;
var
delimiter
=
this
.
delimiter
;
options
.
each
(
function
()
{
options
.
each
(
function
()
{
selected
+=
$
(
this
).
text
()
+
'
,
'
;
selected
+=
$
(
this
).
text
()
+
delimiter
;
});
});
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
}
}
...
@@ -317,6 +318,7 @@
...
@@ -317,6 +318,7 @@
allSelectedText
:
'
All selected
'
,
allSelectedText
:
'
All selected
'
,
numberDisplayed
:
3
,
numberDisplayed
:
3
,
disableIfEmpty
:
false
,
disableIfEmpty
:
false
,
delimiter
:
'
,
'
,
templates
:
{
templates
:
{
button
:
'
<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>
'
,
button
:
'
<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>
'
,
ul
:
'
<ul class="multiselect-container dropdown-menu"></ul>
'
,
ul
:
'
<ul class="multiselect-container dropdown-menu"></ul>
'
,
...
...
index.html
View file @
d3e9b9df
...
@@ -453,6 +453,37 @@
...
@@ -453,6 +453,37 @@
</pre>
</pre>
</td>
</td>
</tr>
</tr>
<tr>
<td><code>
delimiter
</code></td>
<td>
<p>
Sets the separator for the list of selected items for mouse-over. Defaults to ', '. Set to '\n' for a neater display.
</p>
<div
class=
"example"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#example-delimiter
'
).
multiselect
({
delimiter
:
'
\n
'
});
});
</script>
<select
id=
"example-delimiter"
multiple=
"multiple"
></select>
</div>
<div
class=
"highlight"
>
<pre
class=
"prettyprint linenums"
>
<
script type=
"
text/javascript
">
$(document).ready(function() {
$('#example-delimiter').multiselect({
delimiter: '\n'
});
});
<
/script
>
</pre>
</div>
</td>
</tr>
<tr>
<tr>
<td><code>
disableIfEmpty
</code></td>
<td><code>
disableIfEmpty
</code></td>
<td>
<td>
...
...
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