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
269aee79
Commit
269aee79
authored
Apr 17, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let Bootstrap's tab JS handle history
Closes #2219
parent
e1099f97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+0
-8
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+3
-3
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
269aee79
...
@@ -58,14 +58,6 @@ class @MergeRequest
...
@@ -58,14 +58,6 @@ class @MergeRequest
,
'json'
,
'json'
bindEvents
:
->
bindEvents
:
->
this
.
$
(
'.merge-request-tabs'
).
on
'click'
,
'a'
,
(
event
)
=>
a
=
$
(
event
.
currentTarget
)
href
=
a
.
attr
(
'href'
)
History
.
replaceState
{
path
:
href
},
document
.
title
,
href
event
.
preventDefault
()
this
.
$
(
'.merge-request-tabs'
).
on
'click'
,
'li'
,
(
event
)
=>
this
.
$
(
'.merge-request-tabs'
).
on
'click'
,
'li'
,
(
event
)
=>
this
.
activateTab
(
$
(
event
.
currentTarget
).
data
(
'action'
))
this
.
activateTab
(
$
(
event
.
currentTarget
).
data
(
'action'
))
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
269aee79
...
@@ -36,17 +36,17 @@
...
@@ -36,17 +36,17 @@
-
if
@commits
.
present?
-
if
@commits
.
present?
%ul
.nav.nav-tabs.merge-request-tabs
%ul
.nav.nav-tabs.merge-request-tabs
%li
.notes-tab
{
data:
{
action:
'notes'
}}
%li
.notes-tab
{
data:
{
action:
'notes'
,
toggle:
'tab'
}}
=
link_to
merge_request_path
(
@merge_request
)
do
=
link_to
merge_request_path
(
@merge_request
)
do
%i
.fa.fa-comments
%i
.fa.fa-comments
Discussion
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%li
.commits-tab
{
data:
{
action:
'commits'
}}
%li
.commits-tab
{
data:
{
action:
'commits'
,
toggle:
'tab'
}}
=
link_to
merge_request_path
(
@merge_request
),
title:
'Commits'
do
=
link_to
merge_request_path
(
@merge_request
),
title:
'Commits'
do
%i
.fa.fa-history
%i
.fa.fa-history
Commits
Commits
%span
.badge
=
@commits
.
size
%span
.badge
=
@commits
.
size
%li
.diffs-tab
{
data:
{
action:
'diffs'
}}
%li
.diffs-tab
{
data:
{
action:
'diffs'
,
toggle:
'tab'
}}
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
do
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
do
%i
.fa.fa-list-alt
%i
.fa.fa-list-alt
Changes
Changes
...
...
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