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
1
Merge Requests
1
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
nexedi
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
Hide 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';
import
{
sprintf
,
__
}
from
'
./locale
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
DropdownUtils
from
'
./filtered_search/dropdown_utils
'
;
import
CreateLabelDropdown
from
'
./create_label
'
;
import
flash
from
'
./flash
'
;
import
ModalStore
from
'
./boards/stores/modal_store
'
;
...
...
@@ -171,23 +170,7 @@ export default class LabelsSelect {
axios
.
get
(
labelUrl
)
.
then
(
res
=>
{
let
data
=
_
.
chain
(
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
();
let
data
=
res
.
data
;
if
(
$dropdown
.
hasClass
(
'
js-extra-options
'
))
{
var
extraData
=
[];
if
(
showNo
)
{
...
...
@@ -272,15 +255,8 @@ export default class LabelsSelect {
selectedClass
.
push
(
'
dropdown-clear-active
'
);
}
}
if
(
label
.
duplicate
)
{
color
=
DropdownUtils
.
duplicateLabelColor
(
label
.
color
);
}
else
{
if
(
label
.
color
!=
null
)
{
[
color
]
=
label
.
color
;
}
}
if
(
color
)
{
colorEl
=
"
<span class='dropdown-label-box' style='background:
"
+
color
+
"
'></span>
"
;
if
(
label
.
color
)
{
colorEl
=
"
<span class='dropdown-label-box' style='background:
"
+
label
.
color
+
"
'></span>
"
;
}
else
{
colorEl
=
''
;
}
...
...
@@ -435,7 +411,7 @@ export default class LabelsSelect {
new
ListLabel
({
id
:
label
.
id
,
title
:
label
.
title
,
color
:
label
.
color
[
0
]
,
color
:
label
.
color
,
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