Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
af8fb46f
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,发现更多精彩内容 >>
提交
af8fb46f
编写于
1月 12, 2018
作者:
S
Simon Knox
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dynamic imports for projects:e/f/i
上级
16e89580
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
120 addition
and
29 deletion
+120
-29
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+31
-29
app/assets/javascripts/pages/projects/edit/index.js
app/assets/javascripts/pages/projects/edit/index.js
+8
-0
app/assets/javascripts/pages/projects/find_file/show/index.js
...assets/javascripts/pages/projects/find_file/show/index.js
+12
-0
app/assets/javascripts/pages/projects/forks/new/index.js
app/assets/javascripts/pages/projects/forks/new/index.js
+3
-0
app/assets/javascripts/pages/projects/imports/show/index.js
app/assets/javascripts/pages/projects/imports/show/index.js
+3
-0
app/assets/javascripts/pages/projects/issues/edit/index.js
app/assets/javascripts/pages/projects/issues/edit/index.js
+16
-0
app/assets/javascripts/pages/projects/issues/index/index.js
app/assets/javascripts/pages/projects/issues/index/index.js
+18
-0
app/assets/javascripts/pages/projects/issues/new/index.js
app/assets/javascripts/pages/projects/issues/new/index.js
+16
-0
app/assets/javascripts/pages/projects/issues/show/index.js
app/assets/javascripts/pages/projects/issues/show/index.js
+13
-0
未找到文件。
app/assets/javascripts/dispatcher.js
浏览文件 @
af8fb46f
...
...
@@ -18,7 +18,6 @@ import projectAvatar from './project_avatar';
import
MergeRequest
from
'
./merge_request
'
;
import
Compare
from
'
./compare
'
;
import
initCompareAutocomplete
from
'
./compare_autocomplete
'
;
import
ProjectFindFile
from
'
./project_find_file
'
;
import
ProjectNew
from
'
./project_new
'
;
import
projectImport
from
'
./project_import
'
;
import
Labels
from
'
./labels
'
;
...
...
@@ -33,7 +32,6 @@ import SecretValues from './behaviors/secret_values';
import
DeleteModal
from
'
./branches/branches_delete_modal
'
;
import
Group
from
'
./group
'
;
import
ProjectsList
from
'
./projects_list
'
;
import
setupProjectEdit
from
'
./project_edit
'
;
import
MiniPipelineGraph
from
'
./mini_pipeline_graph_dropdown
'
;
import
BlobLinePermalinkUpdater
from
'
./blob/blob_line_permalink_updater
'
;
import
BlobForkSuggestion
from
'
./blob/blob_fork_suggestion
'
;
...
...
@@ -63,7 +61,6 @@ import GlFieldErrors from './gl_field_errors';
import
GLForm
from
'
./gl_form
'
;
import
Shortcuts
from
'
./shortcuts
'
;
import
ShortcutsNavigation
from
'
./shortcuts_navigation
'
;
import
ShortcutsFindFile
from
'
./shortcuts_find_file
'
;
import
ShortcutsIssuable
from
'
./shortcuts_issuable
'
;
import
U2FAuthenticate
from
'
./u2f/authenticate
'
;
import
Members
from
'
./members
'
;
...
...
@@ -153,22 +150,26 @@ import Activities from './activities';
shortcut_handler
=
true
;
break
;
case
'
projects:merge_requests:index
'
:
case
'
projects:issues:index
'
:
if
(
filteredSearchEnabled
)
{
const
filteredSearchManager
=
new
gl
.
FilteredSearchManager
(
page
===
'
projects:issues:index
'
?
'
issues
'
:
'
merge_requests
'
);
const
filteredSearchManager
=
new
gl
.
FilteredSearchManager
(
'
merge_requests
'
);
filteredSearchManager
.
setup
();
}
const
pagePrefix
=
page
===
'
projects:merge_requests:index
'
?
'
merge_request_
'
:
'
issue_
'
;
new
IssuableIndex
(
pagePrefix
);
new
IssuableIndex
(
'
merge_request_
'
);
shortcut_handler
=
new
ShortcutsNavigation
();
new
UsersSelect
();
break
;
case
'
projects:issues:index
'
:
import
(
'
./pages/projects/issues/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:issues:show
'
:
new
Issue
();
shortcut_handler
=
new
ShortcutsIssuable
();
new
ZenMode
(
);
initIssuableSidebar
()
;
import
(
'
./pages/projects/issues/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
dashboard:milestones:index
'
:
import
(
'
./pages/dashboard/milestones/index
'
)
...
...
@@ -252,13 +253,16 @@ import Activities from './activities';
new
DeleteModal
();
break
;
case
'
projects:issues:new
'
:
import
(
'
./pages/projects/issues/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:issues:edit
'
:
shortcut_handler
=
new
ShortcutsNavigation
();
new
GLForm
(
$
(
'
.issue-form
'
),
true
);
new
IssuableForm
(
$
(
'
.issue-form
'
));
new
LabelsSelect
();
new
MilestoneSelect
();
new
IssuableTemplateSelectors
();
import
(
'
./pages/projects/issues/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:merge_requests:creations:new
'
:
const
mrNewCompareNode
=
document
.
querySelector
(
'
.js-merge-request-new-compare
'
);
...
...
@@ -376,12 +380,14 @@ import Activities from './activities';
});
break
;
case
'
projects:edit
'
:
setupProjectEdit
();
// Initialize expandable settings panels
initSettingsPanels
(
);
import
(
'
./pages/projects/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:imports:show
'
:
projectImport
();
import
(
'
./pages/projects/imports/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:pipelines:new
'
:
case
'
projects:pipelines:create
'
:
...
...
@@ -450,13 +456,9 @@ import Activities from './activities';
});
break
;
case
'
projects:find_file:show
'
:
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
projectFindFile
=
new
ProjectFindFile
(
$
(
"
.file-finder-holder
"
),
{
url
:
findElement
.
dataset
.
fileFindUrl
,
treeUrl
:
findElement
.
dataset
.
findTreeUrl
,
blobUrlTemplate
:
findElement
.
dataset
.
blobUrlTemplate
,
});
new
ShortcutsFindFile
(
projectFindFile
);
import
(
'
./pages/projects/find_file/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:blob:show
'
:
...
...
@@ -493,7 +495,7 @@ import Activities from './activities';
shortcut_handler
=
true
;
break
;
case
'
projects:forks:new
'
:
import
(
/* webpackChunkName: 'project_fork' */
'
./project_fork
'
)
import
(
'
./pages/projects/forks/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
...
...
app/assets/javascripts/pages/projects/edit/index.js
0 → 100644
浏览文件 @
af8fb46f
import
initSettingsPanels
from
'
~/settings_panels
'
;
import
setupProjectEdit
from
'
~/project_edit
'
;
export
default
()
=>
{
setupProjectEdit
();
// Initialize expandable settings panels
initSettingsPanels
();
};
app/assets/javascripts/pages/projects/find_file/show/index.js
0 → 100644
浏览文件 @
af8fb46f
import
ProjectFindFile
from
'
~/project_find_file
'
;
import
ShortcutsFindFile
from
'
~/shortcuts_find_file
'
;
export
default
()
=>
{
const
findElement
=
document
.
querySelector
(
'
.js-file-finder
'
);
const
projectFindFile
=
new
ProjectFindFile
(
$
(
'
.file-finder-holder
'
),
{
url
:
findElement
.
dataset
.
fileFindUrl
,
treeUrl
:
findElement
.
dataset
.
findTreeUrl
,
blobUrlTemplate
:
findElement
.
dataset
.
blobUrlTemplate
,
});
new
ShortcutsFindFile
(
projectFindFile
);
// eslint-disable-line no-new
};
app/assets/javascripts/pages/projects/forks/new/index.js
0 → 100644
浏览文件 @
af8fb46f
import
projectFork
from
'
~/project_fork
'
;
export
default
projectFork
;
app/assets/javascripts/pages/projects/imports/show/index.js
0 → 100644
浏览文件 @
af8fb46f
import
projectImport
from
'
~/project_import
'
;
export
default
projectImport
;
app/assets/javascripts/pages/projects/issues/edit/index.js
0 → 100644
浏览文件 @
af8fb46f
/* eslint-disable no-new */
import
GLForm
from
'
~/gl_form
'
;
import
IssuableForm
from
'
~/issuable_form
'
;
import
LabelsSelect
from
'
~/labels_select
'
;
import
MilestoneSelect
from
'
~/milestone_select
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
IssuableTemplateSelectors
from
'
~/templates/issuable_template_selectors
'
;
export
default
()
=>
{
new
ShortcutsNavigation
();
new
GLForm
(
$
(
'
.issue-form
'
),
true
);
new
IssuableForm
(
$
(
'
.issue-form
'
));
new
LabelsSelect
();
new
MilestoneSelect
();
new
IssuableTemplateSelectors
();
};
app/assets/javascripts/pages/projects/issues/index/index.js
0 → 100644
浏览文件 @
af8fb46f
/* eslint-disable no-new */
import
IssuableIndex
from
'
~/issuable_index
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
UsersSelect
from
'
~/users_select
'
;
export
default
()
=>
{
const
filteredSearchEnabled
=
gl
.
FilteredSearchManager
&&
document
.
querySelector
(
'
.filtered-search
'
);
if
(
filteredSearchEnabled
)
{
const
filteredSearchManager
=
new
gl
.
FilteredSearchManager
(
'
issues
'
);
filteredSearchManager
.
setup
();
}
new
IssuableIndex
(
'
issue_
'
);
// eslint-disable no-new
new
ShortcutsNavigation
();
new
UsersSelect
();
// eslint-disable no-new
};
app/assets/javascripts/pages/projects/issues/new/index.js
0 → 100644
浏览文件 @
af8fb46f
/* eslint-disable no-new */
import
GLForm
from
'
~/gl_form
'
;
import
IssuableForm
from
'
~/issuable_form
'
;
import
LabelsSelect
from
'
~/labels_select
'
;
import
MilestoneSelect
from
'
~/milestone_select
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
IssuableTemplateSelectors
from
'
~/templates/issuable_template_selectors
'
;
export
default
()
=>
{
new
ShortcutsNavigation
();
new
GLForm
(
$
(
'
.issue-form
'
),
true
);
new
IssuableForm
(
$
(
'
.issue-form
'
));
new
LabelsSelect
();
new
MilestoneSelect
();
new
IssuableTemplateSelectors
();
};
app/assets/javascripts/pages/projects/issues/show/index.js
0 → 100644
浏览文件 @
af8fb46f
/* eslint-disable no-new */
import
initIssuableSidebar
from
'
~/init_issuable_sidebar
'
;
import
Issue
from
'
~/issuable_index
'
;
import
ShortcutsIssuable
from
'
~/shortcuts_issuable
'
;
import
ZenMode
from
'
~/zen_mode
'
;
export
default
()
=>
{
new
Issue
();
new
ShortcutsIssuable
();
new
ZenMode
();
initIssuableSidebar
();
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录