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
4888cde8
Commit
4888cde8
authored
May 25, 2015
by
aqwsez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update collapsibleOptGroups.js
parent
c4f9d619
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
collapsibleOptGroups.js
dist/js/collapsibleOptGroups.js
+29
-4
No files found.
dist/js/collapsibleOptGroups.js
View file @
4888cde8
...
@@ -20,6 +20,33 @@
...
@@ -20,6 +20,33 @@
};
};
}());
}());
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
createOptgroup
=
(
function
()
{
var
cached_function
=
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
createOptgroup
;
return
function
()
{
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
);
var
t
=
args
[
0
];
if
(
this
.
options
.
enableCollapsibleOptGroups
&&
this
.
options
.
multiple
)
{
var
n
=
e
(
t
).
attr
(
"
label
"
);
var
v
=
e
(
t
).
attr
(
"
value
"
);
var
r
=
e
(
'
<li class="multiselect-item multiselect-group"><a href="javascript:void(0);"><input type="checkbox" value="
'
+
v
+
'
"/><b>
'
+
n
+
'
<b class="caret"></b></b></a></li>
'
);
if
(
this
.
options
.
enableClickableOptGroups
)
{
r
.
addClass
(
"
multiselect-group-clickable
"
)
}
this
.
$ul
.
append
(
r
);
if
(
e
(
t
).
is
(
"
:disabled
"
))
{
r
.
addClass
(
"
disabled
"
)
}
e
(
"
option
"
,
t
).
each
(
e
.
proxy
(
function
(
e
,
t
)
{
this
.
createOptionValue
(
t
)
},
this
))
}
else
{
cached_function
.
apply
(
this
,
arguments
);
}
};
}());
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
buildDropdownOptions
=
(
function
()
{
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
buildDropdownOptions
=
(
function
()
{
var
cached_function
=
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
buildDropdownOptions
;
var
cached_function
=
jQuery
.
fn
.
multiselect
.
Constructor
.
prototype
.
buildDropdownOptions
;
...
@@ -27,10 +54,8 @@
...
@@ -27,10 +54,8 @@
cached_function
.
apply
(
this
,
arguments
);
cached_function
.
apply
(
this
,
arguments
);
if
(
this
.
options
.
enableCollapsibleOptGroups
&&
this
.
options
.
multiple
)
{
if
(
this
.
options
.
enableCollapsibleOptGroups
&&
this
.
options
.
multiple
)
{
e
(
"
li.multiselect-group
"
,
this
.
$ul
).
each
(
function
()
{
var
name
=
$
(
"
label
"
,
this
).
html
();
e
(
"
li.multiselect-group input
"
,
this
.
$ul
).
off
();
$
(
this
).
html
(
'
<a href="javascript:void(0);"><input type="checkbox" value="
'
+
name
+
'
"/><b>
'
+
name
+
'
<b class="caret"></b></b></a>
'
);
});
e
(
"
li.multiselect-group
"
,
this
.
$ul
).
siblings
().
not
(
"
li.multiselect-group, li.multiselect-all
"
,
this
.
$ul
).
each
(
function
()
{
e
(
"
li.multiselect-group
"
,
this
.
$ul
).
siblings
().
not
(
"
li.multiselect-group, li.multiselect-all
"
,
this
.
$ul
).
each
(
function
()
{
$
(
this
).
toggleClass
(
'
hidden
'
,
true
);
$
(
this
).
toggleClass
(
'
hidden
'
,
true
);
});
});
...
...
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