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
48d2aa74
Commit
48d2aa74
authored
Mar 04, 2014
by
Phil Freo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
includeSelectAllDivider option
parent
8ce6b52f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
index.html
index.html
+18
-0
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+3
-0
No files found.
index.html
View file @
48d2aa74
...
...
@@ -800,6 +800,24 @@
includeSelectAllOption: true
});
});
<
/script
>
</pre>
</td>
</tr>
<tr>
<td><code>
includeSelectAllDivider
</code></td>
<td>
If set to
<code>
true
</code>
(along with
<code>
includeSelectAllOption
</code>
) a divider will be placed below the 'Select all' option.
</td>
<td>
<pre
class=
"prettyprint linenums"
>
<
script type=
"
text/javascript
">
$(document).ready(function() {
$(
'
.multiselect
'
).multiselect({
includeSelectAllOption: true,
includeSelectAllDivider: true
});
});
<
/script
>
</pre>
</td>
...
...
js/bootstrap-multiselect.js
View file @
48d2aa74
...
...
@@ -532,6 +532,9 @@
// If options.includeSelectAllOption === true, add the include all checkbox.
if
(
this
.
options
.
includeSelectAllOption
&&
this
.
options
.
multiple
&&
!
alreadyHasSelectAll
)
{
if
(
this
.
options
.
includeSelectAllDivider
)
{
this
.
$select
.
prepend
(
'
<option value="" disabled="disabled" data-role="divider">
'
);
}
this
.
$select
.
prepend
(
'
<option value="
'
+
this
.
options
.
selectAllValue
+
'
">
'
+
this
.
options
.
selectAllText
+
'
</option>
'
);
}
},
...
...
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