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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
4d23af75
Commit
4d23af75
authored
Feb 24, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move script inside of MergeRequestTabs class
parent
a4e522a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+2
-12
app/assets/javascripts/merge_request_tabs.js.coffee
app/assets/javascripts/merge_request_tabs.js.coffee
+8
-0
No files found.
app/assets/javascripts/application.js.coffee
View file @
4d23af75
...
...
@@ -225,16 +225,6 @@ $ ->
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$
(
document
)
.
off
'shown.bs.tab'
,
'.merge-request-tabs a[data-toggle="tab"]'
.
on
'shown.bs.tab'
,
'.merge-request-tabs a[data-toggle="tab"]'
,
(
e
)
->
action
=
$
(
e
.
target
).
attr
(
"data-action"
)
if
action
is
'diffs'
$gutterIcon
=
$
(
'.gutter-toggle'
).
find
(
'i'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$
(
document
)
.
off
'click'
,
'aside .gutter-toggle'
.
on
'click'
,
'aside .gutter-toggle'
,
(
e
)
->
...
...
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
4d23af75
...
...
@@ -70,6 +70,7 @@ class @MergeRequestTabs
@
loadCommits
(
$target
.
attr
(
'href'
))
else
if
action
==
'diffs'
@
loadDiff
(
$target
.
attr
(
'href'
))
@
shrinkView
()
else
if
action
==
'builds'
@
loadBuilds
(
$target
.
attr
(
'href'
))
...
...
@@ -185,3 +186,10 @@ class @MergeRequestTabs
expandViewContainer
:
->
$
(
'.container-fluid'
).
removeClass
(
'container-limited'
)
shrinkView
:
->
$gutterIcon
=
$
(
'.gutter-toggle i'
)
# Only when sidebar is collapsed
if
$gutterIcon
.
is
(
'.fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
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