Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4bdbccfc
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,发现更多精彩内容 >>
提交
4bdbccfc
编写于
4月 07, 2017
作者:
M
Mike Greiling
提交者:
Alfredo Sumaran
4月 07, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove Vue from main bundle and disable production warnings
上级
3ded903d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
24 deletion
+17
-24
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+4
-0
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
+5
-7
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+1
-4
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+2
-4
app/assets/javascripts/subscription.js
app/assets/javascripts/subscription.js
+1
-4
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+3
-5
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+1
-0
未找到文件。
app/assets/javascripts/boards/boards_bundle.js
浏览文件 @
4bdbccfc
...
...
@@ -38,6 +38,10 @@ $(() => {
Store
.
create
();
// hack to allow sidebar scripts like milestone_select manipulate the BoardsStore
gl
.
issueBoards
.
boardStoreIssueSet
=
(...
args
)
=>
Vue
.
set
(
Store
.
detail
.
issue
,
...
args
);
gl
.
issueBoards
.
boardStoreIssueDelete
=
(...
args
)
=>
Vue
.
delete
(
Store
.
detail
.
issue
,
...
args
);
gl
.
IssueBoardsApp
=
new
Vue
({
el
:
$boardApp
,
components
:
{
...
...
app/assets/javascripts/commit/pipelines/pipelines_bundle.js
浏览文件 @
4bdbccfc
...
...
@@ -12,20 +12,18 @@ Vue.use(VueResource);
* Renders Pipelines table in pipelines tab in the commits show view.
*/
// export for use in merge_request_tabs.js (TODO: remove this hack)
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
CommitPipelinesTable
=
CommitPipelinesTable
;
$
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
gl
.
commits
=
gl
.
commits
||
{};
gl
.
commits
.
pipelines
=
gl
.
commits
.
pipelines
||
{};
if
(
gl
.
commits
.
PipelinesTableBundle
)
{
document
.
querySelector
(
'
#commit-pipeline-table-view
'
).
removeChild
(
this
.
pipelinesTableBundle
.
$el
);
gl
.
commits
.
PipelinesTableBundle
.
$destroy
(
true
);
}
const
pipelineTableViewEl
=
document
.
querySelector
(
'
#commit-pipeline-table-view
'
);
if
(
pipelineTableViewEl
&&
pipelineTableViewEl
.
dataset
.
disableInitialization
===
undefined
)
{
gl
.
commits
.
pipelines
.
PipelinesTableBundle
=
new
CommitPipelinesTable
().
$mount
();
document
.
querySelector
(
'
#commit-pipeline-table-view
'
)
.
appendChild
(
gl
.
commits
.
pipelines
.
PipelinesTableBundle
.
$el
);
pipelineTableViewEl
.
appendChild
(
gl
.
commits
.
pipelines
.
PipelinesTableBundle
.
$el
);
}
});
app/assets/javascripts/merge_request_tabs.js
浏览文件 @
4bdbccfc
...
...
@@ -3,9 +3,6 @@
/* global Flash */
import
Cookies
from
'
js-cookie
'
;
import
CommitPipelinesTable
from
'
./commit/pipelines/pipelines_table
'
;
import
'
./breakpoints
'
;
import
'
./flash
'
;
...
...
@@ -234,7 +231,7 @@ import './flash';
}
mountPipelinesView
()
{
this
.
commitPipelinesTable
=
new
CommitPipelinesTable
().
$mount
();
this
.
commitPipelinesTable
=
new
gl
.
CommitPipelinesTable
().
$mount
();
// $mount(el) replaces the el with the new rendered component. We need it in order to mount
// it everytime this tab is clicked - https://vuejs.org/v2/api/#vm-mount
document
.
querySelector
(
'
#commit-pipeline-table-view
'
)
...
...
app/assets/javascripts/milestone_select.js
浏览文件 @
4bdbccfc
...
...
@@ -2,8 +2,6 @@
/* global Issuable */
/* global ListMilestone */
import
Vue
from
'
vue
'
;
(
function
()
{
this
.
MilestoneSelect
=
(
function
()
{
function
MilestoneSelect
(
currentProject
,
els
)
{
...
...
@@ -151,12 +149,12 @@ import Vue from 'vue';
return
$dropdown
.
closest
(
'
form
'
).
submit
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
if
(
selected
.
id
!==
-
1
)
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
milestone
'
,
new
ListMilestone
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
milestone
'
,
new
ListMilestone
({
id
:
selected
.
id
,
title
:
selected
.
name
}));
}
else
{
Vue
.
delete
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
milestone
'
);
gl
.
issueBoards
.
boardStoreIssueDelete
(
'
milestone
'
);
}
$dropdown
.
trigger
(
'
loading.gl.dropdown
'
);
...
...
app/assets/javascripts/subscription.js
浏览文件 @
4bdbccfc
import
Vue
from
'
vue
'
;
(()
=>
{
class
Subscription
{
constructor
(
containerElm
)
{
...
...
@@ -29,8 +27,7 @@ import Vue from 'vue';
// hack to allow this to work with the issue boards Vue object
if
(
document
.
querySelector
(
'
html
'
).
classList
.
contains
(
'
issue-boards-page
'
))
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
gl
.
issueBoards
.
boardStoreIssueSet
(
'
subscribed
'
,
!
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
.
subscribed
,
);
...
...
app/assets/javascripts/users_select.js
浏览文件 @
4bdbccfc
...
...
@@ -2,8 +2,6 @@
/* global Issuable */
/* global ListUser */
import
Vue
from
'
vue
'
;
(
function
()
{
var
bind
=
function
(
fn
,
me
)
{
return
function
()
{
return
fn
.
apply
(
me
,
arguments
);
};
},
slice
=
[].
slice
;
...
...
@@ -74,7 +72,7 @@ import Vue from 'vue';
e
.
preventDefault
();
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
,
new
ListUser
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
assignee
'
,
new
ListUser
({
id
:
_this
.
currentUser
.
id
,
username
:
_this
.
currentUser
.
username
,
name
:
_this
.
currentUser
.
name
,
...
...
@@ -225,14 +223,14 @@ import Vue from 'vue';
return
$dropdown
.
closest
(
'
form
'
).
submit
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-issue-board-sidebar
'
))
{
if
(
user
.
id
)
{
Vue
.
set
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
,
new
ListUser
({
gl
.
issueBoards
.
boardStoreIssueSet
(
'
assignee
'
,
new
ListUser
({
id
:
user
.
id
,
username
:
user
.
username
,
name
:
user
.
name
,
avatar_url
:
user
.
avatar_url
}));
}
else
{
Vue
.
delete
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
,
'
assignee
'
);
gl
.
issueBoards
.
boardStoreIssueDelete
(
'
assignee
'
);
}
updateIssueBoardsIssue
();
...
...
spec/javascripts/merge_request_tabs_spec.js
浏览文件 @
4bdbccfc
/* eslint-disable no-var, comma-dangle, object-shorthand */
require
(
'
~/merge_request_tabs
'
);
require
(
'
~/commit/pipelines/pipelines_bundle.js
'
);
require
(
'
~/breakpoints
'
);
require
(
'
~/lib/utils/common_utils
'
);
require
(
'
~/diff
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录