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
65845247
Commit
65845247
authored
Aug 18, 2016
by
Ruben Davila
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'ce/8-11-stable' into 8-11-stable-ee
parents
f92ea290
6ab44d17
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+4
-1
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+1
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-1
app/views/projects/merge_requests/_new_submit.html.haml
app/views/projects/merge_requests/_new_submit.html.haml
+4
-7
spec/features/merge_requests/create_new_mr_spec.rb
spec/features/merge_requests/create_new_mr_spec.rb
+6
-6
No files found.
app/assets/javascripts/merge_request_tabs.js
View file @
65845247
...
...
@@ -15,6 +15,7 @@
function
MergeRequestTabs
(
opts
)
{
this
.
opts
=
opts
!=
null
?
opts
:
{};
this
.
opts
.
setUrl
=
this
.
opts
.
setUrl
!==
undefined
?
this
.
opts
.
setUrl
:
true
;
this
.
setCurrentAction
=
bind
(
this
.
setCurrentAction
,
this
);
this
.
tabShown
=
bind
(
this
.
tabShown
,
this
);
this
.
showTab
=
bind
(
this
.
showTab
,
this
);
...
...
@@ -58,7 +59,9 @@
}
else
{
this
.
expandView
();
}
return
this
.
setCurrentAction
(
action
);
if
(
this
.
opts
.
setUrl
)
{
this
.
setCurrentAction
(
action
);
}
};
MergeRequestTabs
.
prototype
.
scrollToElement
=
function
(
container
)
{
...
...
app/controllers/projects/application_controller.rb
View file @
65845247
...
...
@@ -83,6 +83,7 @@ class Projects::ApplicationController < ApplicationController
end
def
apply_diff_view_cookie!
@show_changes_tab
=
params
[
:view
].
present?
cookies
.
permanent
[
:diff_view
]
=
params
.
delete
(
:view
)
if
params
[
:view
].
present?
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
65845247
...
...
@@ -217,7 +217,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@base_commit
=
@merge_request
.
diff_base_commit
@diffs
=
@merge_request
.
diffs
(
diff_options
)
if
@merge_request
.
compare
@diff_notes_disabled
=
true
@pipeline
=
@merge_request
.
pipeline
@statuses
=
@pipeline
.
statuses
.
relevant
if
@pipeline
...
...
app/views/projects/merge_requests/_new_submit.html.haml
View file @
65845247
...
...
@@ -20,7 +20,7 @@
.mr-compare.merge-request
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
%li
.commits-tab
=
link_to
url_for
(
params
),
data:
{
target:
'div#commits'
,
action:
'
commits
'
,
toggle:
'tab'
}
do
=
link_to
url_for
(
params
),
data:
{
target:
'div#commits'
,
action:
'
new
'
,
toggle:
'tab'
}
do
Commits
%span
.badge
=
@commits
.
size
-
if
@pipeline
...
...
@@ -52,11 +52,8 @@
$
(
'
#merge_request_assignee_id
'
).
val
(
"
#{
current_user
.
id
}
"
).
trigger
(
"
change
"
);
e
.
preventDefault
();
});
:javascript
var
merge_request
merge_request
=
new
MergeRequest
({
action
:
'
new
'
,
diffs_loaded
:
true
,
commits_loaded
:
true
var
merge_request
=
new
MergeRequest
({
action
:
"
#{
(
@show_changes_tab
?
'diffs'
:
'new'
)
}
"
,
setUrl
:
false
});
spec/features/merge_requests/create_new_mr_spec.rb
View file @
65845247
...
...
@@ -78,14 +78,14 @@ feature 'Create New Merge Request', feature: true, js: true do
click_link
'Changes'
expect
(
page
.
find_link
(
'Inline'
)[
:class
]).
to
match
(
/\bactive\b/
)
expect
(
page
.
find_link
(
'Side-by-side'
)[
:class
]).
not_to
match
(
/\bactive\b/
)
expect
(
page
).
to
have_css
(
'a.btn.active'
,
text:
'Inline'
)
expect
(
page
).
not_to
have_css
(
'a.btn.active'
,
text:
'Side-by-side'
)
click_link
'Side-by-side'
click_link
'Changes'
expect
(
page
.
find_link
(
'Inline'
)[
:class
]).
not_to
match
(
/\bactive\b/
)
e
xpect
(
page
.
find_link
(
'Side-by-side'
)[
:class
]).
to
match
(
/\bactive\b/
)
within
'.merge-request'
do
expect
(
page
).
not_to
have_css
(
'a.btn.active'
,
text:
'Inline'
)
expect
(
page
).
to
have_css
(
'a.btn.active'
,
text:
'Side-by-side'
)
e
nd
end
end
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