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
Léo-Paul Géneau
gitlab-ce
Commits
fa8b228f
Commit
fa8b228f
authored
Jan 12, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restores merge request coffee file
parent
906de20f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+0
-49
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
fa8b228f
...
...
@@ -22,7 +22,6 @@ class @MergeRequest
if
$
(
"a.btn-close"
).
length
@
initTaskList
()
@
initMergeRequestBtnEventListeners
()
# Local jQuery finder
$
:
(
selector
)
->
...
...
@@ -36,54 +35,6 @@ class @MergeRequest
# Show the first tab (Commits)
$
(
'.merge-request-tabs a[data-toggle="tab"]:first'
).
tab
(
'show'
)
initMergeRequestBtnEventListeners
:
->
_this
=
@
mergeRequestFailMessage
=
'Unable to update this merge request at this time.'
$
(
'a.btn-close, a.btn-reopen'
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
e
.
stopImmediatePropagation
()
$this
=
$
(
this
)
isClose
=
$this
.
hasClass
(
'btn-close'
)
shouldSubmit
=
$this
.
hasClass
(
'btn-comment'
)
if
shouldSubmit
_this
.
submitNoteForm
(
$this
.
closest
(
'form'
))
$this
.
prop
(
'disabled'
,
true
)
url
=
$this
.
attr
(
'href'
)
$
.
ajax
type
:
'PUT'
,
url
:
url
,
error
:
(
jqXHR
,
textStatus
,
errorThrown
)
->
mergeRequestStatus
=
if
isClose
then
'close'
else
'open'
new
Flash
(
mergeRequestFailMessage
,
'alert'
)
success
:
(
data
,
textStatus
,
jqXHR
)
->
if
data
.
saved
if
isClose
$
(
'a.btn-close'
).
addClass
(
'hidden'
)
$
(
'a.issuable-edit'
).
addClass
(
'hidden'
)
$
(
'a.btn-reopen'
).
removeClass
(
'hidden'
)
$
(
'div.status-box-closed'
).
removeClass
(
'hidden'
)
$
(
'div.status-box-open'
).
addClass
(
'hidden'
)
$
(
'div.mr-state-widget-closed'
).
removeClass
(
'hidden'
)
$
(
'div.mr-state-widget-opened'
).
addClass
(
'hidden'
)
else
$
(
'a.btn-reopen'
).
addClass
(
'hidden'
)
$
(
'a.issuable-edit'
).
removeClass
(
'hidden'
)
$
(
'a.btn-close'
).
removeClass
(
'hidden'
)
$
(
'div.status-box-closed'
).
addClass
(
'hidden'
)
$
(
'div.status-box-open'
).
removeClass
(
'hidden'
)
$
(
'div.mr-state-widget-closed'
).
addClass
(
'hidden'
)
$
(
'div.mr-state-widget-opened'
).
removeClass
(
'hidden'
)
else
new
Flash
(
mergeRequestFailMessage
,
'alert'
)
$this
.
prop
(
'disabled'
,
false
)
submitNoteForm
:
(
form
)
=>
noteText
=
form
.
find
(
"textarea.js-note-text"
).
val
()
if
noteText
.
trim
().
length
>
0
form
.
submit
()
showAllCommits
:
->
this
.
$
(
'.first-commits'
).
remove
()
this
.
$
(
'.all-commits'
).
removeClass
'hide'
...
...
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