Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c30a9013
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c30a9013
编写于
7月 28, 2016
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changes names to lists
Fixed some bugs introduced when moving to es6
上级
8e041957
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
20 deletion
+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
未找到文件。
app/assets/javascripts/boards/boards_bundle.js.es6
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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"
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录