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
5db0b473
Commit
5db0b473
authored
May 25, 2015
by
davidstutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#539, #531 example and code update.
parent
861bddce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
35 deletions
+44
-35
bootstrap-multiselect.js
dist/js/bootstrap-multiselect.js
+7
-4
index.html
index.html
+37
-31
No files found.
dist/js/bootstrap-multiselect.js
View file @
5db0b473
...
@@ -211,9 +211,11 @@
...
@@ -211,9 +211,11 @@
}
}
else
{
else
{
var
selected
=
''
;
var
selected
=
''
;
var
delimiter
=
this
.
delimiterText
;
options
.
each
(
function
()
{
options
.
each
(
function
()
{
var
label
=
(
$
(
this
).
attr
(
'
label
'
)
!==
undefined
)
?
$
(
this
).
attr
(
'
label
'
)
:
$
(
this
).
text
();
var
label
=
(
$
(
this
).
attr
(
'
label
'
)
!==
undefined
)
?
$
(
this
).
attr
(
'
label
'
)
:
$
(
this
).
text
();
selected
+=
label
+
'
,
'
;
selected
+=
label
+
delimiter
;
});
});
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
...
@@ -232,10 +234,11 @@
...
@@ -232,10 +234,11 @@
}
}
else
{
else
{
var
selected
=
''
;
var
selected
=
''
;
var
delimiter
=
this
.
delimiter
;
var
delimiter
=
this
.
delimiterText
;
options
.
each
(
function
()
{
options
.
each
(
function
()
{
var
label
=
(
$
(
this
).
attr
(
'
label
'
)
!==
undefined
)
?
$
(
this
).
attr
(
'
label
'
)
:
$
(
this
).
text
();
var
label
=
(
$
(
this
).
attr
(
'
label
'
)
!==
undefined
)
?
$
(
this
).
attr
(
'
label
'
)
:
$
(
this
).
text
();
selected
+=
label
+
'
,
'
;
selected
+=
label
+
delimiter
;
});
});
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
return
selected
.
substr
(
0
,
selected
.
length
-
2
);
}
}
...
@@ -328,7 +331,7 @@
...
@@ -328,7 +331,7 @@
allSelectedText
:
'
All selected
'
,
allSelectedText
:
'
All selected
'
,
numberDisplayed
:
3
,
numberDisplayed
:
3
,
disableIfEmpty
:
false
,
disableIfEmpty
:
false
,
delimiter
:
'
,
'
,
delimiter
Text
:
'
,
'
,
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 @
5db0b473
...
@@ -454,37 +454,6 @@
...
@@ -454,37 +454,6 @@
</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>
...
@@ -1388,6 +1357,43 @@
...
@@ -1388,6 +1357,43 @@
});
});
});
});
<
/script
>
<
/script
>
</pre>
</div>
</td>
</tr>
<tr>
<td><code>
delimiterText
</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-delimiterText
'
).
multiselect
({
delimiterText
:
'
;
'
});
});
</script>
<select
id=
"example-delimiterText"
multiple=
"multiple"
>
<option
value=
"1"
>
Option 1
</option>
<option
value=
"2"
selected=
"selected"
>
Option 2
</option>
<option
value=
"3"
selected=
"selected"
>
Option 3
</option>
<option
value=
"4"
>
Option 4
</option>
<option
value=
"5"
>
Option 5
</option>
<option
value=
"6"
>
Option 6
</option>
</select>
</div>
<div
class=
"highlight"
>
<pre
class=
"prettyprint linenums"
>
<
script type=
"
text/javascript
">
$(document).ready(function() {
$('#example-delimiterText').multiselect({
delimiterText '; '
});
});
<
/script
>
</pre>
</pre>
</div>
</div>
</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