Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
16afcb55
Commit
16afcb55
authored
Nov 21, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable duplicate label merging in other dropdowns
parent
212eb1bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
28 deletions
+4
-28
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+4
-28
No files found.
app/assets/javascripts/labels_select.js
View file @
16afcb55
...
@@ -7,7 +7,6 @@ import _ from 'underscore';
...
@@ -7,7 +7,6 @@ import _ from 'underscore';
import
{
sprintf
,
__
}
from
'
./locale
'
;
import
{
sprintf
,
__
}
from
'
./locale
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
import
CreateLabelDropdown
from
'
./create_label
'
;
import
CreateLabelDropdown
from
'
./create_label
'
;
import
flash
from
'
./flash
'
;
import
flash
from
'
./flash
'
;
import
ModalStore
from
'
./boards/stores/modal_store
'
;
import
ModalStore
from
'
./boards/stores/modal_store
'
;
...
@@ -171,23 +170,7 @@ export default class LabelsSelect {
...
@@ -171,23 +170,7 @@ export default class LabelsSelect {
axios
axios
.
get
(
labelUrl
)
.
get
(
labelUrl
)
.
then
(
res
=>
{
.
then
(
res
=>
{
let
data
=
_
.
chain
(
res
.
data
)
let
data
=
res
.
data
;
.
groupBy
(
function
(
label
)
{
return
label
.
title
;
})
.
map
(
function
(
label
)
{
var
color
;
color
=
_
.
map
(
label
,
function
(
dup
)
{
return
dup
.
color
;
});
return
{
id
:
label
[
0
].
id
,
title
:
label
[
0
].
title
,
color
:
color
,
duplicate
:
color
.
length
>
1
,
};
})
.
value
();
if
(
$dropdown
.
hasClass
(
'
js-extra-options
'
))
{
if
(
$dropdown
.
hasClass
(
'
js-extra-options
'
))
{
var
extraData
=
[];
var
extraData
=
[];
if
(
showNo
)
{
if
(
showNo
)
{
...
@@ -272,15 +255,8 @@ export default class LabelsSelect {
...
@@ -272,15 +255,8 @@ export default class LabelsSelect {
selectedClass
.
push
(
'
dropdown-clear-active
'
);
selectedClass
.
push
(
'
dropdown-clear-active
'
);
}
}
}
}
if
(
label
.
duplicate
)
{
if
(
label
.
color
)
{
color
=
DropdownUtils
.
duplicateLabelColor
(
label
.
color
);
colorEl
=
"
<span class='dropdown-label-box' style='background:
"
+
label
.
color
+
"
'></span>
"
;
}
else
{
if
(
label
.
color
!=
null
)
{
[
color
]
=
label
.
color
;
}
}
if
(
color
)
{
colorEl
=
"
<span class='dropdown-label-box' style='background:
"
+
color
+
"
'></span>
"
;
}
else
{
}
else
{
colorEl
=
''
;
colorEl
=
''
;
}
}
...
@@ -435,7 +411,7 @@ export default class LabelsSelect {
...
@@ -435,7 +411,7 @@ export default class LabelsSelect {
new
ListLabel
({
new
ListLabel
({
id
:
label
.
id
,
id
:
label
.
id
,
title
:
label
.
title
,
title
:
label
.
title
,
color
:
label
.
color
[
0
]
,
color
:
label
.
color
,
textColor
:
'
#fff
'
,
textColor
:
'
#fff
'
,
}),
}),
);
);
...
...
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