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
c30a9013
Commit
c30a9013
authored
Jul 28, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes names to lists
Fixed some bugs introduced when moving to es6
parent
8e041957
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
20 deletions
+16
-20
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+1
-1
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+1
-1
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+11
-11
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+3
-7
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
c30a9013
...
...
@@ -17,7 +17,7 @@ $(function () {
service.all()
.then((resp) => {
resp.data.forEach((board) => {
BoardsStore.state.
board
s.push(board);
BoardsStore.state.
list
s.push(board);
});
});
}
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
c30a9013
...
...
@@ -15,7 +15,7 @@
},
computed: {
isPreset: function () {
typeof this.board.id !== 'number';
return
typeof this.board.id !== 'number';
}
},
ready: function () {
...
...
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
c30a9013
((w) => {
w.BoardsStore = {
state: {
board
s: [],
list
s: [],
done: {},
filters: {
author: {},
...
...
@@ -10,18 +10,18 @@
}
},
removeBoard: (id) => {
BoardsStore.state.
boards = _.reject(BoardsStore.state.board
s, (board) => {
BoardsStore.state.
lists = _.reject(BoardsStore.state.list
s, (board) => {
return board.id === id;
});
},
moveBoard: (oldIndex, newIndex) => {
const boardFrom = _.find(BoardsStore.state.
board
s, (board) => {
const boardFrom = _.find(BoardsStore.state.
list
s, (board) => {
return board.index === oldIndex;
});
service.updateBoard(boardFrom.id, newIndex);
const boardTo = _.find(BoardsStore.state.
board
s, (board) => {
const boardTo = _.find(BoardsStore.state.
list
s, (board) => {
return board.index === newIndex;
});
...
...
@@ -33,10 +33,10 @@
}
},
moveCardToBoard: (boardFromId, boardToId, issueId, toIndex) => {
const boardFrom = _.find(BoardsStore.state.
board
s, (board) => {
const boardFrom = _.find(BoardsStore.state.
list
s, (board) => {
return board.id === boardFromId;
});
const boardTo = _.find(BoardsStore.state.
board
s, (board) => {
const boardTo = _.find(BoardsStore.state.
list
s, (board) => {
return board.id === boardToId;
});
let issue = _.find(boardFrom.issues, (issue) => {
...
...
@@ -53,7 +53,7 @@
});
// Add to new boards issues if it doesn't already exist
if (issueTo
!== null
) {
if (issueTo) {
issue = issueTo;
} else {
boardTo.issues.splice(toIndex, 0, issue);
...
...
@@ -71,7 +71,7 @@
return label.title === boardTo.title;
});
if (
foundLabel === nul
l) {
if (
!foundLabe
l) {
issue.labels.push(boardTo.label);
}
}
...
...
@@ -79,7 +79,7 @@
},
removeIssueFromBoards: (issue, boards) => {
const boardLabels = _.map(boards, (board) => {
return board.
label.
title;
return board.title;
});
boards.issues = _.each(boards, (board) => {
...
...
@@ -98,11 +98,11 @@
});
},
getBoardsForIssue: (issue) => {
_.filter(BoardsStore.state.board
s, (board) => {
return _.filter(BoardsStore.state.list
s, (board) => {
const foundIssue = _.find(board.issues, (boardIssue) => {
return issue.id === boardIssue.id;
});
return foundIssue
!== null
;
return foundIssue;
});
},
clearDone: () => {
...
...
app/views/projects/boards/components/_board.html.haml
View file @
c30a9013
%board
{
"inline-template"
=>
true
,
"v-cloak"
=>
true
,
"v-for"
=>
"board in state.
board
s | orderBy 'index'"
,
":board"
=>
"board"
}
%board
{
"inline-template"
=>
true
,
"v-cloak"
=>
true
,
"v-for"
=>
"board in state.
list
s | orderBy 'index'"
,
":board"
=>
"board"
}
.board
{
":class"
=>
"{ 'is-draggable': !isPreset }"
}
.board-inner
%header
.board-inner-container.board-header
{
":class"
=>
"{ 'has-border': board.label }"
,
":style"
=>
"{ borderTopColor: board.label.backgroundColor }"
}
...
...
@@ -7,16 +7,12 @@
%span
.pull-right
{{ board.issues.length }}
%board-delete
{
"inline-template"
=>
true
,
"v-if"
=>
"!isPreset"
,
":board-id"
=>
"board.id"
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete board"
,
data:
{
placement:
"bottom"
},
"@click"
=>
"deleteBoard"
}
%span
.sr-only
Delete board
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete board"
,
"aria-label"
=>
"Delete board"
,
data:
{
placement:
"bottom"
},
"@click"
=>
"deleteBoard"
}
=
icon
(
"trash"
)
.board-inner-container.board-search-container
{
"v-if"
=>
"board.search"
}
%input
.form-control
{
type:
"text"
,
placeholder:
"Search issues"
,
"v-model"
=>
"query"
}
=
icon
(
"search"
,
class:
"board-search-icon"
,
"v-show"
=>
"!query"
)
%button
.board-search-clear-btn
{
type:
"button"
,
role:
"button"
,
"@click"
=>
"clearSearch"
,
"v-show"
=>
"query"
}
%span
.sr-only
Clear search
%button
.board-search-clear-btn
{
type:
"button"
,
role:
"button"
,
"aria-label"
=>
"Clear search"
,
"@click"
=>
"clearSearch"
,
"v-show"
=>
"query"
}
=
icon
(
"times"
,
class:
"board-search-clear"
)
%board-list
{
"inline-template"
=>
true
,
":board-id"
=>
"board.id"
,
":issues"
=>
"board.issues"
,
":disabled"
=>
"#{current_user.nil?}"
,
":query"
=>
"query"
,
":filters"
=>
"filters"
}
%ul
.board-list
{
"v-el:list"
=>
true
,
":data-board"
=>
"boardId"
}
...
...
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