Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
41dfce15
Commit
41dfce15
authored
13 years ago
by
Marvin Thomas Rabe
Browse files
Options
Downloads
Patches
Plain Diff
problem with previous selected groups fixed
parent
5a408047
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/js/multiselect.js
+6
-6
6 additions, 6 deletions
core/js/multiselect.js
with
6 additions
and
6 deletions
core/js/multiselect.js
+
6
−
6
View file @
41dfce15
...
...
@@ -43,25 +43,25 @@
});
button
.
addClass
(
'
active
'
);
event
.
stopPropagation
();
var
options
=
$
(
this
).
parent
().
next
().
children
().
map
(
function
(){
return
$
(
this
).
val
()});
var
options
=
$
(
this
).
parent
().
next
().
children
().
map
(
function
(){
return
$
(
this
).
val
()
;
});
var
list
=
$
(
'
<ul class="multiselectoptions"/>
'
).
hide
().
appendTo
(
$
(
this
).
parent
());
function
createItem
(
item
,
checked
){
var
id
=
'
ms
'
+
multiSelectId
+
'
-option-
'
+
item
;
var
input
=
$
(
'
<input id="
'
+
id
+
'
" type="checkbox"/>
'
);
var
label
=
$
(
'
<label for="
'
+
id
+
'
">
'
+
item
+
'
</label>
'
);
if
(
settings
.
checked
.
indexOf
(
item
)
!=-
1
||
checked
){
input
.
attr
(
'
checked
'
,
'
checked
'
);
input
.
attr
(
'
checked
'
,
true
);
}
if
(
checked
){
settings
.
checked
.
push
(
item
);
}
input
.
change
(
function
(){
var
groupname
=
$
(
this
).
next
().
text
();
if
(
$
(
this
).
attr
(
'
checked
'
)){
if
(
$
(
this
).
is
(
'
:
checked
'
)){
settings
.
checked
.
push
(
groupname
);
if
(
settings
.
oncheck
){
if
(
settings
.
oncheck
(
groupname
)
===
false
){
$
(
this
).
removeA
ttr
(
'
checked
'
);
$
(
this
).
a
ttr
(
'
checked
'
,
false
);
return
;
}
}
...
...
@@ -70,7 +70,7 @@
settings
.
checked
.
splice
(
index
,
1
);
if
(
settings
.
onuncheck
){
if
(
settings
.
onuncheck
(
groupname
)
===
false
){
$
(
this
).
attr
(
'
checked
'
,
'
checked
'
);
$
(
this
).
attr
(
'
checked
'
,
true
);
return
;
}
}
...
...
@@ -81,7 +81,7 @@
}
else
{
button
.
children
(
'
span
'
).
first
().
text
(
settings
.
title
);
}
var
newOuterWidth
=
Math
.
max
((
button
.
outerWidth
()
-
2
),
settings
.
minOuterWidth
)
+
'
px
'
var
newOuterWidth
=
Math
.
max
((
button
.
outerWidth
()
-
2
),
settings
.
minOuterWidth
)
+
'
px
'
;
var
newWidth
=
Math
.
max
(
button
.
width
(),
settings
.
minWidth
);
button
.
css
(
'
height
'
,
button
.
height
());
button
.
css
(
'
white-space
'
,
'
nowrap
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment