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
63ac5f1f
Commit
63ac5f1f
authored
Oct 09, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify and clarify some assignments
parent
855966c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
app/assets/javascripts/boards/components/labels_select.vue
app/assets/javascripts/boards/components/labels_select.vue
+4
-8
app/assets/javascripts/boards/components/milestone_select.vue
...assets/javascripts/boards/components/milestone_select.vue
+7
-4
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+2
-1
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+1
-3
No files found.
app/assets/javascripts/boards/components/labels_select.vue
View file @
63ac5f1f
...
...
@@ -41,14 +41,10 @@ export default {
},
methods
:
{
labelStyle
(
label
)
{
let
style
=
''
;
if
(
label
.
textColor
)
{
style
+=
`color:
${
label
.
textColor
}
;`
}
if
(
label
.
color
)
{
style
+=
`background-color:
${
label
.
color
}
;`
}
return
style
;
return
{
color
:
label
.
textColor
,
backgroundColor
:
label
.
color
,
};
},
},
};
...
...
app/assets/javascripts/boards/components/milestone_select.vue
View file @
63ac5f1f
...
...
@@ -46,14 +46,17 @@ export default {
},
methods
:
{
selectMilestone
(
milestone
)
{
let
id
=
milestone
.
id
;
// swap the IDs of 'Any' and 'No' milestone to what backend requires
if
(
milestone
.
title
===
ANY_MILESTONE
)
{
milestone
.
id
=
-
1
;
id
=
-
1
;
}
else
if
(
milestone
.
title
===
NO_MILESTONE
)
{
milestone
.
id
=
0
;
id
=
0
;
}
this
.
$set
(
this
.
board
,
'
milestone_id
'
,
milestone
.
id
);
this
.
$set
(
this
.
board
,
'
milestone
'
,
milestone
);
this
.
board
.
milestone
=
{
...
milestone
,
id
,
};
},
},
mounted
()
{
...
...
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
63ac5f1f
...
...
@@ -48,13 +48,14 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
.
map
(
assignee
=>
assignee
.
id
)
.
filter
(
id
=>
id
!==
board
.
assignee_id
);
if
(
assigneeIds
.
length
===
0
)
{
// for backend to explicitly set No Assignee
assigneeIds
=
[
'
0
'
];
}
const
data
=
{
issue
:
{
label_ids
:
labelIds
,
assignee_ids
:
assigneeIds
assignee_ids
:
assigneeIds
,
},
};
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
63ac5f1f
...
...
@@ -60,11 +60,9 @@ gl.issueBoards.BoardsStore = {
this
.
boardConfig
.
id
=
board
.
id
;
this
.
boardConfig
.
name
=
board
.
name
;
this
.
boardConfig
.
milestone
=
board
.
milestone
;
this
.
boardConfig
.
milestone_id
=
board
.
milestone_id
;
this
.
boardConfig
.
weight
=
board
.
weight
;
this
.
boardConfig
.
labels
=
board
.
labels
||
[];
this
.
boardConfig
.
assignee_id
=
board
.
assignee_id
;
this
.
boardConfig
.
assignee
=
board
.
assignee
||
{};
this
.
boardConfig
.
weight
=
board
.
weight
;
},
addList
(
listObj
,
defaultAvatar
)
{
const
list
=
new
List
(
listObj
,
defaultAvatar
);
...
...
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