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
e3464a54
Commit
e3464a54
authored
Dec 02, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove .js format for MergeRequest controller
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4e878ad9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
16 deletions
+11
-16
app/assets/javascripts/merge_requests.js.coffee
app/assets/javascripts/merge_requests.js.coffee
+4
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+7
-4
app/views/projects/merge_requests/commits.js.haml
app/views/projects/merge_requests/commits.js.haml
+0
-4
app/views/projects/merge_requests/diffs.js.haml
app/views/projects/merge_requests/diffs.js.haml
+0
-2
app/views/projects/merge_requests/show.js.haml
app/views/projects/merge_requests/show.js.haml
+0
-2
No files found.
app/assets/javascripts/merge_requests.js.coffee
View file @
e3464a54
...
@@ -21,7 +21,7 @@ class MergeRequest
...
@@ -21,7 +21,7 @@ class MergeRequest
this
.
initMergeWidget
()
this
.
initMergeWidget
()
this
.
$
(
'.show-all-commits'
).
on
'click'
,
=>
this
.
$
(
'.show-all-commits'
).
on
'click'
,
=>
this
.
showAllCommits
()
this
.
showAllCommits
()
modal
=
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
modal
=
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
# Local jQuery finder
# Local jQuery finder
...
@@ -83,12 +83,12 @@ class MergeRequest
...
@@ -83,12 +83,12 @@ class MergeRequest
url
:
this
.
$
(
'.nav-tabs .diffs-tab a'
).
attr
(
'href'
)
url
:
this
.
$
(
'.nav-tabs .diffs-tab a'
).
attr
(
'href'
)
beforeSend
:
=>
beforeSend
:
=>
this
.
$
(
'.status'
).
addClass
'loading'
this
.
$
(
'.status'
).
addClass
'loading'
complete
:
=>
complete
:
=>
@
diffs_loaded
=
true
@
diffs_loaded
=
true
this
.
$
(
'.status'
).
removeClass
'loading'
this
.
$
(
'.status'
).
removeClass
'loading'
success
:
(
data
)
=>
dataType
:
'script'
this
.
$
(
".diffs"
).
html
(
data
.
html
)
dataType
:
'json'
showAllCommits
:
->
showAllCommits
:
->
this
.
$
(
'.first-commits'
).
remove
()
this
.
$
(
'.first-commits'
).
remove
()
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
e3464a54
...
@@ -2,8 +2,8 @@ require 'gitlab/satellite/satellite'
...
@@ -2,8 +2,8 @@ require 'gitlab/satellite/satellite'
class
Projects::MergeRequestsController
<
Projects
::
ApplicationController
class
Projects::MergeRequestsController
<
Projects
::
ApplicationController
before_filter
:module_enabled
before_filter
:module_enabled
before_filter
:merge_request
,
only:
[
:edit
,
:update
,
:show
,
:
commits
,
:
diffs
,
:automerge
,
:automerge_check
,
:ci_status
]
before_filter
:merge_request
,
only:
[
:edit
,
:update
,
:show
,
:diffs
,
:automerge
,
:automerge_check
,
:ci_status
]
before_filter
:closes_issues
,
only:
[
:edit
,
:update
,
:show
,
:
commits
,
:
diffs
]
before_filter
:closes_issues
,
only:
[
:edit
,
:update
,
:show
,
:diffs
]
before_filter
:validates_merge_request
,
only:
[
:show
,
:diffs
]
before_filter
:validates_merge_request
,
only:
[
:show
,
:diffs
]
before_filter
:define_show_vars
,
only:
[
:show
,
:diffs
]
before_filter
:define_show_vars
,
only:
[
:show
,
:diffs
]
...
@@ -26,8 +26,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -26,8 +26,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def
show
def
show
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
format
.
html
format
.
js
format
.
diff
{
render
text:
@merge_request
.
to_diff
(
current_user
)
}
format
.
diff
{
render
text:
@merge_request
.
to_diff
(
current_user
)
}
format
.
patch
{
render
text:
@merge_request
.
to_patch
(
current_user
)
}
format
.
patch
{
render
text:
@merge_request
.
to_patch
(
current_user
)
}
end
end
...
@@ -44,6 +42,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -44,6 +42,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
diff_line_count
=
Commit
::
diff_line_count
(
@merge_request
.
diffs
)
diff_line_count
=
Commit
::
diff_line_count
(
@merge_request
.
diffs
)
@suppress_diff
=
Commit
::
diff_suppress?
(
@merge_request
.
diffs
,
diff_line_count
)
&&
!
params
[
:force_show_diff
]
@suppress_diff
=
Commit
::
diff_suppress?
(
@merge_request
.
diffs
,
diff_line_count
)
&&
!
params
[
:force_show_diff
]
@force_suppress_diff
=
Commit
::
diff_force_suppress?
(
@merge_request
.
diffs
,
diff_line_count
)
@force_suppress_diff
=
Commit
::
diff_force_suppress?
(
@merge_request
.
diffs
,
diff_line_count
)
respond_to
do
|
format
|
format
.
html
format
.
json
{
render
json:
{
html:
view_to_html_string
(
"projects/merge_requests/show/_diffs"
)
}
}
end
end
end
def
new
def
new
...
...
app/views/projects/merge_requests/commits.js.haml
deleted
100644 → 0
View file @
4e878ad9
:plain
merge_request.$(".commits").html("
#{
escape_javascript
(
render
(
partial:
"commits"
))
}
");
app/views/projects/merge_requests/diffs.js.haml
deleted
100644 → 0
View file @
4e878ad9
:plain
merge_request.$(".diffs").html("
#{
escape_javascript
(
render
(
partial:
"projects/merge_requests/show/diffs"
))
}
");
app/views/projects/merge_requests/show.js.haml
deleted
100644 → 0
View file @
4e878ad9
:plain
merge_request.$(".notes").html("
#{
escape_javascript
(
render
"notes/notes_with_form"
)
}
");
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