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
64ca843f
Commit
64ca843f
authored
Aug 07, 2014
by
David Stutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#351.
parent
842149b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
bootstrap-multiselect.js
js/bootstrap-multiselect.js
+9
-11
No files found.
js/bootstrap-multiselect.js
View file @
64ca843f
...
...
@@ -9,15 +9,6 @@
!
function
(
$
)
{
"
use strict
"
;
// jshint ;_;
if
(
Array
.
prototype
.
forEach
===
null
||
Array
.
prototype
.
forEach
===
undefined
)
{
Array
.
prototype
.
forEach
=
function
(
func
)
{
var
index
;
for
(
index
=
0
;
index
<
this
.
length
;
++
index
)
{
func
(
this
[
index
]);
}
};
}
if
(
typeof
ko
!==
'
undefined
'
&&
ko
.
bindingHandlers
&&
!
ko
.
bindingHandlers
.
multiselect
)
{
ko
.
bindingHandlers
.
multiselect
=
{
...
...
@@ -35,7 +26,7 @@
// Subscribe to the selectedOptions: ko.observableArray
listOfSelectedItems
.
subscribe
(
function
(
changes
)
{
var
addedArray
=
[],
deletedArray
=
[];
changes
.
forEach
(
function
(
change
)
{
forEach
(
changes
,
function
(
change
)
{
switch
(
change
.
status
)
{
case
'
added
'
:
addedArray
.
push
(
change
.
value
);
...
...
@@ -82,6 +73,13 @@
return
ko
.
isObservable
(
obj
)
&&
!
(
obj
.
destroyAll
===
undefined
);
}
function
forEach
(
array
,
callback
)
{
var
index
;
for
(
index
=
0
;
index
<
array
.
length
;
++
index
)
{
callback
(
array
[
index
]);
}
}
/**
* Constructor to create a new multiselect using the given select.
*
...
...
@@ -941,7 +939,7 @@
groupCounter
++
;
optionDOM
+=
'
<optgroup label="
'
+
(
option
.
title
||
'
Group
'
+
groupCounter
)
+
'
">
'
;
option
.
children
.
forEach
(
function
(
subOption
)
{
forEach
(
option
.
children
,
function
(
subOption
)
{
optionDOM
+=
'
<option value="
'
+
subOption
.
value
+
'
">
'
+
(
subOption
.
label
||
subOption
.
value
)
+
'
</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