Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
97fbb3d1
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,发现更多精彩内容 >>
提交
97fbb3d1
编写于
1月 25, 2017
作者:
P
Phil Hughes
提交者:
Fatih Acet
2月 03, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added selectable list before adding issues
Adds issues to list on frontend - need to push to backend
上级
e786ba98
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
100 addition
and
8 deletion
+100
-8
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+6
-0
app/assets/javascripts/boards/components/modal/footer.js.es6
app/assets/javascripts/boards/components/modal/footer.js.es6
+24
-7
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
...javascripts/boards/components/modal/lists_dropdown.js.es6
+61
-0
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+2
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+7
-0
未找到文件。
app/assets/javascripts/boards/boards_bundle.js.es6
浏览文件 @
97fbb3d1
...
...
@@ -71,6 +71,12 @@ $(() => {
Store.addBlankState();
this.loading = false;
if (this.state.lists.length > 0) {
Store.modal.selectedList = this.state.lists[0];
}
Store.modal.showAddIssuesModal = true;
});
}
});
...
...
app/assets/javascripts/boards/components/modal/footer.js.es6
浏览文件 @
97fbb3d1
//= require ./lists_dropdown
/* global Vue */
(() => {
const Store = gl.issueBoards.BoardsStore;
...
...
@@ -31,18 +32,34 @@
addIssues() {
const issueIds = this.store.issues.filter(issue => issue.selected).map(issue => issue.id);
issueIds.forEach((id) => {
const issue = this.store.issues.filter(issue => issue.id == id)[0];
this.store.selectedList.addIssue(issue);
this.store.selectedList.issuesSize += 1;
});
this.disabled = true;
this.hideModal();
},
},
components: {
'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
},
template: `
<footer class="form-actions add-issues-footer">
<div class="pull-left">
<button
class="btn btn-success pull-left
"
class="btn btn-success
"
type="button"
:disabled="submitDisabled"
@click="addIssues">
{{ submitText }}
</button>
<span class="add-issues-footer-to-list">
to list
</span>
<lists-dropdown></lists-dropdown>
</div>
<button
class="btn btn-default pull-right"
type="button"
...
...
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
0 → 100644
浏览文件 @
97fbb3d1
/* global Vue */
(() => {
const Store = gl.issueBoards.BoardsStore;
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.ModalFooterListsDropdown = Vue.extend({
data() {
return {
modal: Store.modal,
state: Store.state,
}
},
computed: {
selected() {
return this.modal.selectedList;
},
},
methods: {
selectList(list) {
this.modal.selectedList = list;
},
},
template: `
<div class="dropdown inline">
<button
class="dropdown-menu-toggle"
type="button"
data-toggle="dropdown"
aria-expanded="false">
{{ selected.title }}
<span
class="dropdown-label-box pull-right"
:style="{ backgroundColor: selected.label.color }">
</span>
<i class="fa fa-chevron-down"></i>
</button>
<div class="dropdown-menu dropdown-menu-selectable">
<ul>
<li
v-for="list in state.lists"
v-if="list.type == 'label'">
<a
href="#"
role="button"
:class="{ 'is-active': list.id == selected.id }"
@click="selectList(list)">
<span
class="dropdown-label-box"
:style="{ backgroundColor: list.label.color }">
</span>
{{ list.title }}
</a>
</li>
</ul>
</div>
</div>
`,
});
})();
app/assets/javascripts/boards/stores/boards_store.js.es6
浏览文件 @
97fbb3d1
...
...
@@ -14,8 +14,9 @@
},
modal: {
issues: [],
showAddIssuesModal:
tru
e,
showAddIssuesModal:
fals
e,
activeTab: 'all',
selectedList: {}
},
moving: {
issue: {},
...
...
app/assets/stylesheets/pages/boards.scss
浏览文件 @
97fbb3d1
...
...
@@ -427,6 +427,13 @@
padding-right
:
15px
;
}
.add-issues-footer-to-list
{
display
:
inline-block
;
padding-left
:
6px
;
padding-right
:
6px
;
line-height
:
34px
;
}
.add-issues-list-columns
{
width
:
100%
;
padding-top
:
3px
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录