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
6f5b993b
Commit
6f5b993b
authored
Mar 31, 2014
by
David Stutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added example for select all performance.
parent
8d803bd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
index-2-3.html
index-2-3.html
+17
-0
index.html
index.html
+17
-0
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+1
-1
No files found.
index-2-3.html
View file @
6f5b993b
...
...
@@ -193,6 +193,15 @@
$
(
'
#example41
'
).
multiselect
({
includeSelectAllOption
:
true
});
for
(
var
i
=
1
;
i
<
1000
;
i
++
)
{
$
(
'
#example45
'
).
append
(
'
<option value="
'
+
i
+
'
">Option
'
+
i
+
'
</option>
'
);
}
$
(
'
#example45
'
).
multiselect
({
includeSelectAllOption
:
true
,
maxHeight
:
150
});
});
</script>
<p>
...
...
@@ -267,6 +276,14 @@
The 'Select all' option automatically repsonds to the selection of the user. In particular, it responds to the initial state of the select.
</td>
</tr>
<tr>
<td>
<select
id=
"example45"
multiple=
"multiple"
></select>
</td>
<td>
Test the performance of the 'Select all' option with 999 options.
</td>
</tr>
<tr>
<td>
<select
id=
"example3"
multiple=
"multiple"
>
...
...
index.html
View file @
6f5b993b
...
...
@@ -203,6 +203,15 @@
alert
(
'
Dropdown hidden ...
'
);
}
});
for
(
var
i
=
1
;
i
<
1000
;
i
++
)
{
$
(
'
#example45
'
).
append
(
'
<option value="
'
+
i
+
'
">Option
'
+
i
+
'
</option>
'
);
}
$
(
'
#example45
'
).
multiselect
({
includeSelectAllOption
:
true
,
maxHeight
:
150
});
});
</script>
<p>
...
...
@@ -277,6 +286,14 @@
The 'Select all' option automatically repsonds to the selection of the user. In particular, it responds to the initial state of the select.
</td>
</tr>
<tr>
<td>
<select
id=
"example45"
multiple=
"multiple"
></select>
</td>
<td>
Test the performance of the 'Select all' option with 999 options.
</td>
</tr>
<tr>
<td>
<select
id=
"example3"
multiple=
"multiple"
>
...
...
js/bootstrap-multiselect.js
View file @
6f5b993b
...
...
@@ -346,9 +346,9 @@
if
(
isSelectAllOption
)
{
var
values
=
[];
// Select the visible checkboxes except the "select-all" and possible divider.
var
availableInputs
=
$
(
'
li input[value!="
'
+
this
.
options
.
selectAllValue
+
'
"][data-role!="divider"]
'
,
this
.
$ul
).
filter
(
'
:visible
'
);
for
(
var
i
=
0
,
j
=
availableInputs
.
length
;
i
<
j
;
i
++
)
{
values
.
push
(
availableInputs
[
i
].
value
);
}
...
...
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