Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e13a8ef4
Commit
e13a8ef4
authored
Jan 12, 2018
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispatcher changes for projects:commit* views
parent
16e89580
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
24 deletions
+59
-24
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+14
-24
app/assets/javascripts/pages/projects/commit/pipelines/index.js
...sets/javascripts/pages/projects/commit/pipelines/index.js
+8
-0
app/assets/javascripts/pages/projects/commit/show/index.js
app/assets/javascripts/pages/projects/commit/show/index.js
+20
-0
app/assets/javascripts/pages/projects/commits/show/index.js
app/assets/javascripts/pages/projects/commits/show/index.js
+9
-0
app/assets/javascripts/pages/projects/compare/show/index.js
app/assets/javascripts/pages/projects/compare/show/index.js
+8
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
e13a8ef4
...
...
@@ -26,7 +26,6 @@ import LabelManager from './label_manager';
import
Sidebar
from
'
./right_sidebar
'
;
import
IssuableTemplateSelectors
from
'
./templates/issuable_template_selectors
'
;
import
Flash
from
'
./flash
'
;
import
CommitsList
from
'
./commits
'
;
import
Issue
from
'
./issue
'
;
import
BindInOut
from
'
./behaviors/bind_in_out
'
;
import
SecretValues
from
'
./behaviors/secret_values
'
;
...
...
@@ -34,7 +33,6 @@ 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
'
;
import
UserCallout
from
'
./user_callout
'
;
...
...
@@ -54,8 +52,6 @@ import PerformanceBar from './performance_bar';
import
initNotes
from
'
./init_notes
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
import
initProjectVisibilitySelector
from
'
./project_visibility
'
;
import
GpgBadges
from
'
./gpg_badges
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
import
NewGroupChild
from
'
./groups/new_group_child
'
;
import
{
ajaxGet
,
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
AjaxLoadingSpinner
from
'
./ajax_loading_spinner
'
;
...
...
@@ -239,9 +235,9 @@ import Activities from './activities';
new
GLForm
(
$
(
'
.milestone-form
'
),
false
);
break
;
case
'
projects:compare:show
'
:
new
Diff
();
const
paddingTop
=
16
;
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
paddingTop
);
import
(
'
./pages/projects/compare/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:branches:new
'
:
case
'
projects:branches:create
'
:
...
...
@@ -332,22 +328,15 @@ import Activities from './activities';
.
catch
(
fail
);
break
;
case
'
projects:commit:show
'
:
new
Diff
();
new
ZenMode
();
shortcut_handler
=
new
ShortcutsNavigation
();
new
MiniPipelineGraph
({
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
initNotes
();
const
stickyBarPaddingTop
=
16
;
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
stickyBarPaddingTop
);
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
import
(
'
./pages/projects/commit/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:commit:pipelines
'
:
new
MiniPipelineGraph
({
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
import
(
'
./pages/projects/commit/pipelines
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:activity
'
:
import
(
'
./pages/projects/activity
'
)
...
...
@@ -356,9 +345,10 @@ import Activities from './activities';
shortcut_handler
=
true
;
break
;
case
'
projects:commits:show
'
:
CommitsList
.
init
(
document
.
querySelector
(
'
.js-project-commits-show
'
).
dataset
.
commitsLimit
);
shortcut_handler
=
new
ShortcutsNavigation
();
GpgBadges
.
fetch
();
import
(
'
./pages/projects/commits/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:show
'
:
shortcut_handler
=
new
ShortcutsNavigation
();
...
...
app/assets/javascripts/pages/projects/commit/pipelines/index.js
0 → 100644
View file @
e13a8ef4
import
MiniPipelineGraph
from
'
~/mini_pipeline_graph_dropdown
'
;
export
default
()
=>
{
new
MiniPipelineGraph
({
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
};
app/assets/javascripts/pages/projects/commit/show/index.js
0 → 100644
View file @
e13a8ef4
/* eslint-disable no-new */
import
Diff
from
'
~/diff
'
;
import
ZenMode
from
'
~/zen_mode
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
MiniPipelineGraph
from
'
~/mini_pipeline_graph_dropdown
'
;
import
initNotes
from
'
~/init_notes
'
;
import
initChangesDropdown
from
'
~/init_changes_dropdown
'
;
export
default
()
=>
{
new
Diff
();
new
ZenMode
();
new
ShortcutsNavigation
();
new
MiniPipelineGraph
({
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
initNotes
();
const
stickyBarPaddingTop
=
16
;
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
stickyBarPaddingTop
);
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
};
app/assets/javascripts/pages/projects/commits/show/index.js
0 → 100644
View file @
e13a8ef4
import
CommitsList
from
'
~/commits
'
;
import
GpgBadges
from
'
~/gpg_badges
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
export
default
()
=>
{
CommitsList
.
init
(
document
.
querySelector
(
'
.js-project-commits-show
'
).
dataset
.
commitsLimit
);
new
ShortcutsNavigation
();
// eslint-disable-line no-new
GpgBadges
.
fetch
();
};
app/assets/javascripts/pages/projects/compare/show/index.js
0 → 100644
View file @
e13a8ef4
import
Diff
from
'
~/diff
'
;
import
initChangesDropdown
from
'
~/init_changes_dropdown
'
;
export
default
()
=>
{
new
Diff
();
// eslint-disable-line no-new
const
paddingTop
=
16
;
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
paddingTop
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment