Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
f1a70ce7
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
f1a70ce7
编写于
6月 22, 2018
作者:
F
Filipa Lacerda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moves list_dropdown and footer components to a .vue file
上级
510e45fd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
88 addition
and
82 deletion
+88
-82
app/assets/javascripts/boards/components/modal/footer.vue
app/assets/javascripts/boards/components/modal/footer.vue
+30
-26
app/assets/javascripts/boards/components/modal/index.js
app/assets/javascripts/boards/components/modal/index.js
+2
-2
app/assets/javascripts/boards/components/modal/lists_dropdown.js
...ets/javascripts/boards/components/modal/lists_dropdown.js
+0
-54
app/assets/javascripts/boards/components/modal/lists_dropdown.vue
...ts/javascripts/boards/components/modal/lists_dropdown.vue
+56
-0
未找到文件。
app/assets/javascripts/boards/components/modal/footer.
js
→
app/assets/javascripts/boards/components/modal/footer.
vue
浏览文件 @
f1a70ce7
import
Vue
from
'
vue
'
;
<
script
>
import
Flash
from
'
../../../flash
'
;
import
{
__
}
from
'
../../../locale
'
;
import
'
./lists_dropdown
'
;
import
ListsDropdown
from
'
./lists_dropdown.vue
'
;
import
{
pluralize
}
from
'
../../../lib/utils/text_utility
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
import
modalMixin
from
'
../../mixins/modal_mixins
'
;
gl
.
issueBoards
.
ModalFooter
=
Vue
.
extend
(
{
export
default
{
components
:
{
'
lists-dropdown
'
:
gl
.
issueBoards
.
ModalFooter
ListsDropdown
,
ListsDropdown
,
},
mixins
:
[
modalMixin
],
data
()
{
...
...
@@ -55,28 +55,32 @@ gl.issueBoards.ModalFooter = Vue.extend({
this
.
toggleModal
(
false
);
},
},
template
:
`
<footer
class="form-actions add-issues-footer">
<div class="float-left">
<button
class="btn btn-success"
type="button"
:disabled="submitDisabled"
@click="addIssues">
{{ submitText }}
</button>
<span class="inline add-issues-footer-to-list">
to list
</span>
<lists-dropdown></lists-dropdown>
</div>
};
</
script
>
<
template
>
<footer
class=
"form-actions add-issues-footer"
>
<div
class=
"float-left"
>
<button
class="btn btn-default float-right"
:disabled=
"submitDisabled"
class=
"btn btn-success"
type=
"button"
@click="toggleModal(false)">
Cancel
@
click=
"addIssues"
>
{{
submitText
}}
</button>
</footer>
`
,
});
<span
class=
"inline add-issues-footer-to-list"
>
to list
</span>
<lists-dropdown/>
</div>
<button
class=
"btn btn-default float-right"
type=
"button"
@
click=
"toggleModal(false)"
>
Cancel
</button>
</footer>
</
template
>
app/assets/javascripts/boards/components/modal/index.js
浏览文件 @
f1a70ce7
...
...
@@ -5,7 +5,7 @@ import queryData from '~/boards/utils/query_data';
import
loadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
import
'
./header
'
;
import
'
./list
'
;
import
'
./footer
'
;
import
ModalFooter
from
'
./footer.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
...
...
@@ -14,7 +14,7 @@ gl.issueBoards.IssuesModal = Vue.extend({
EmptyState
,
'
modal-header
'
:
gl
.
issueBoards
.
ModalHeader
,
'
modal-list
'
:
gl
.
issueBoards
.
ModalList
,
'
modal-footer
'
:
gl
.
issueBoards
.
ModalFooter
,
ModalFooter
,
loadingIcon
,
},
props
:
{
...
...
app/assets/javascripts/boards/components/modal/lists_dropdown.js
已删除
100644 → 0
浏览文件 @
510e45fd
import
Vue
from
'
vue
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
gl
.
issueBoards
.
ModalFooterListsDropdown
=
Vue
.
extend
({
data
()
{
return
{
modal
:
ModalStore
.
store
,
state
:
gl
.
issueBoards
.
BoardsStore
.
state
,
};
},
computed
:
{
selected
()
{
return
this
.
modal
.
selectedList
||
this
.
state
.
lists
[
1
];
},
},
destroyed
()
{
this
.
modal
.
selectedList
=
null
;
},
template
:
`
<div class="dropdown inline">
<button
class="dropdown-menu-toggle"
type="button"
data-toggle="dropdown"
aria-expanded="false">
<span
class="dropdown-label-box"
:style="{ backgroundColor: selected.label.color }">
</span>
{{ selected.title }}
<i class="fa fa-chevron-down"></i>
</button>
<div class="dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up">
<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.prevent="modal.selectedList = list">
<span
class="dropdown-label-box"
:style="{ backgroundColor: list.label.color }">
</span>
{{ list.title }}
</a>
</li>
</ul>
</div>
</div>
`
,
});
app/assets/javascripts/boards/components/modal/lists_dropdown.vue
0 → 100644
浏览文件 @
f1a70ce7
<
script
>
import
ModalStore
from
'
../../stores/modal_store
'
;
export
default
{
data
()
{
return
{
modal
:
ModalStore
.
store
,
state
:
gl
.
issueBoards
.
BoardsStore
.
state
,
};
},
computed
:
{
selected
()
{
return
this
.
modal
.
selectedList
||
this
.
state
.
lists
[
1
];
},
},
destroyed
()
{
this
.
modal
.
selectedList
=
null
;
},
};
</
script
>
<
template
>
<div
class=
"dropdown inline"
>
<button
class=
"dropdown-menu-toggle"
type=
"button"
data-toggle=
"dropdown"
aria-expanded=
"false"
>
<span
:style=
"
{ backgroundColor: selected.label.color }"
class="dropdown-label-box">
</span>
{{
selected
.
title
}}
<i
class=
"fa fa-chevron-down"
></i>
</button>
<div
class=
"dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up"
>
<ul>
<li
v-for=
"(list, i) in state.lists"
v-if=
"list.type == 'label'"
:key=
"i"
>
<a
:class=
"
{ 'is-active': list.id == selected.id }"
href="#"
role="button"
@click.prevent="modal.selectedList = list">
<span
:style=
"
{ backgroundColor: list.label.color }"
class="dropdown-label-box">
</span>
{{
list
.
title
}}
</a>
</li>
</ul>
</div>
</div>
</
template
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录