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
Tatuya Kamada
gitlab-ce
Commits
43dcc957
Commit
43dcc957
authored
Apr 27, 2012
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Task #735 Automerge should not be checked on every load of MR show page
parent
28cb4313
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
app/assets/javascripts/merge_requests.js
app/assets/javascripts/merge_requests.js
+12
-4
app/views/merge_requests/show.html.haml
app/views/merge_requests/show.html.haml
+2
-0
No files found.
app/assets/javascripts/merge_requests.js
View file @
43dcc957
...
...
@@ -5,12 +5,13 @@ var MergeRequest = {
init
:
function
(
opts
)
{
this
.
opts
=
opts
;
var
self
=
this
;
self
.
opts
=
opts
;
if
(
$
(
"
.automerge_widget
"
).
length
){
self
.
showState
(
self
.
opts
.
current_state
);
if
(
$
(
"
.automerge_widget
"
).
length
&&
self
.
opts
.
check_enable
){
$
.
get
(
opts
.
url_to_automerge_check
,
function
(
data
){
$
(
"
.automerge_widget
"
).
hide
();
$
(
"
.automerge_widget.
"
+
data
.
state
).
show
();
self
.
showState
(
data
.
state
);
},
"
json
"
);
}
...
...
@@ -35,6 +36,13 @@ var MergeRequest = {
});
},
showState
:
function
(
state
){
$
(
"
.automerge_widget
"
).
hide
();
$
(
"
.automerge_widget.
"
+
state
).
show
();
},
loadDiff
:
function
()
{
$
(
"
.dashboard-loader
"
).
show
();
...
...
app/views/merge_requests/show.html.haml
View file @
43dcc957
...
...
@@ -101,6 +101,8 @@
$
(
function
(){
MergeRequest
.
init
({
url_to_automerge_check
:
"
#{
automerge_check_project_merge_request_path
(
@project
,
@merge_request
)
}
"
,
check_enable
:
#{
@merge_request
.
state
==
MergeRequest
::
UNCHECKED
?
"true"
:
"false"
}
,
current_state
:
"
#{
@merge_request
.
human_state
}
"
});
$
(
"
.accept_merge_request
"
).
live
(
"
ajax:beforeSend
"
,
function
()
{
...
...
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