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
Kazuhiko Shiozaki
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
Hide 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
...
@@ -210,7 +210,7 @@ $ ->
...
@@ -210,7 +210,7 @@ $ ->
$this
=
$
(
this
)
$this
=
$
(
this
)
$this
.
attr
'value'
,
$this
.
val
()
$this
.
attr
'value'
,
$this
.
val
()
return
return
$
(
document
)
$
(
document
)
.
off
'keyup'
,
'input[type="search"]'
.
off
'keyup'
,
'input[type="search"]'
.
on
'keyup'
,
'input[type="search"]'
,
(
e
)
->
.
on
'keyup'
,
'input[type="search"]'
,
(
e
)
->
...
@@ -225,16 +225,6 @@ $ ->
...
@@ -225,16 +225,6 @@ $ ->
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$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
)
$
(
document
)
.
off
'click'
,
'aside .gutter-toggle'
.
off
'click'
,
'aside .gutter-toggle'
.
on
'click'
,
'aside .gutter-toggle'
,
(
e
)
->
.
on
'click'
,
'aside .gutter-toggle'
,
(
e
)
->
...
@@ -263,7 +253,7 @@ $ ->
...
@@ -263,7 +253,7 @@ $ ->
$
(
'.page-with-sidebar'
)
$
(
'.page-with-sidebar'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-expanded'
)
$
.
cookie
(
"collapsed_gutter"
,
$
.
cookie
(
"collapsed_gutter"
,
$
(
'.right-sidebar'
)
$
(
'.right-sidebar'
)
.
hasClass
(
'right-sidebar-collapsed'
),
{
path
:
'/'
})
.
hasClass
(
'right-sidebar-collapsed'
),
{
path
:
'/'
})
...
...
app/assets/javascripts/merge_request_tabs.js.coffee
View file @
4d23af75
...
@@ -70,6 +70,7 @@ class @MergeRequestTabs
...
@@ -70,6 +70,7 @@ class @MergeRequestTabs
@
loadCommits
(
$target
.
attr
(
'href'
))
@
loadCommits
(
$target
.
attr
(
'href'
))
else
if
action
==
'diffs'
else
if
action
==
'diffs'
@
loadDiff
(
$target
.
attr
(
'href'
))
@
loadDiff
(
$target
.
attr
(
'href'
))
@
shrinkView
()
else
if
action
==
'builds'
else
if
action
==
'builds'
@
loadBuilds
(
$target
.
attr
(
'href'
))
@
loadBuilds
(
$target
.
attr
(
'href'
))
...
@@ -185,3 +186,10 @@ class @MergeRequestTabs
...
@@ -185,3 +186,10 @@ class @MergeRequestTabs
expandViewContainer
:
->
expandViewContainer
:
->
$
(
'.container-fluid'
).
removeClass
(
'container-limited'
)
$
(
'.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