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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
ce29e5cd
Commit
ce29e5cd
authored
9 years ago
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update task list behavior for Merge Requests
parent
92249756
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+23
-4
app/views/projects/merge_requests/show/_context.html.haml
app/views/projects/merge_requests/show/_context.html.haml
+1
-1
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+3
-1
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
ce29e5cd
...
@@ -17,8 +17,11 @@ class @MergeRequest
...
@@ -17,8 +17,11 @@ class @MergeRequest
disableButtonIfEmptyField
'#commit_message'
,
'.accept_merge_request'
disableButtonIfEmptyField
'#commit_message'
,
'.accept_merge_request'
# Prevent duplicate event bindings
@
disableTaskList
()
if
$
(
"a.btn-close"
).
length
if
$
(
"a.btn-close"
).
length
$
(
"li.task-list-item input:checkbox"
).
prop
(
"disabled"
,
false
)
@
initTaskList
(
)
$
(
'.merge-request-details'
).
waitForImages
->
$
(
'.merge-request-details'
).
waitForImages
->
$
(
'.issuable-affix'
).
affix
offset
:
$
(
'.issuable-affix'
).
affix
offset
:
...
@@ -77,9 +80,6 @@ class @MergeRequest
...
@@ -77,9 +80,6 @@ class @MergeRequest
this
.
$
(
'.remove_source_branch_in_progress'
).
hide
()
this
.
$
(
'.remove_source_branch_in_progress'
).
hide
()
this
.
$
(
'.remove_source_branch_widget.failed'
).
show
()
this
.
$
(
'.remove_source_branch_widget.failed'
).
show
()
$
(
'.task-list-item input:checkbox'
).
off
(
'change'
)
$
(
'.task-list-item input:checkbox'
).
change
(
'merge_request'
,
updateTaskState
)
activateTab
:
(
action
)
->
activateTab
:
(
action
)
->
this
.
$
(
'.merge-request-tabs li'
).
removeClass
'active'
this
.
$
(
'.merge-request-tabs li'
).
removeClass
'active'
this
.
$
(
'.tab-content'
).
hide
()
this
.
$
(
'.tab-content'
).
hide
()
...
@@ -156,3 +156,22 @@ class @MergeRequest
...
@@ -156,3 +156,22 @@ class @MergeRequest
else
else
setTimeout
(
merge_request
.
mergeInProgress
,
3000
)
setTimeout
(
merge_request
.
mergeInProgress
,
3000
)
dataType
:
'json'
dataType
:
'json'
initTaskList
:
->
$
(
'.merge-request-details .js-task-list-container'
).
taskList
(
'enable'
)
$
(
document
).
on
'tasklist:changed'
,
'.merge-request-details .js-task-list-container'
,
@
updateTaskList
disableTaskList
:
->
$
(
'.merge-request-details .js-task-list-container'
).
taskList
(
'disable'
)
$
(
document
).
off
'tasklist:changed'
,
'.merge-request-details .js-task-list-container'
# TODO (rspeicher): Make the merge request description inline-editable like a
# note so that we can re-use its form here
updateTaskList
:
->
patchData
=
{}
patchData
[
'merge_request'
]
=
{
'description'
:
$
(
'.js-task-list-field'
,
this
).
val
()}
$
.
ajax
type
:
'PATCH'
url
:
$
(
'form.js-merge-request-update'
).
attr
(
'action'
)
data
:
patchData
This diff is collapsed.
Click to expand it.
app/views/projects/merge_requests/show/_context.html.haml
View file @
ce29e5cd
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@merge_request
],
remote:
true
,
html:
{
class:
'edit-merge_request inline-update'
}
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@merge_request
],
remote:
true
,
html:
{
class:
'edit-merge_request inline-update
js-merge-request-update
'
}
do
|
f
|
%div
.prepend-top-20
%div
.prepend-top-20
.issuable-context-title
.issuable-context-title
%label
%label
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
ce29e5cd
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
%div
%div
-
if
@merge_request
.
description
.
present?
-
if
@merge_request
.
description
.
present?
.description
.description
.js-task-list-container
.wiki
.wiki
=
preserve
do
=
preserve
do
=
markdown
(
@merge_request
.
description
,
parse_tasks:
true
)
=
markdown
(
@merge_request
.
description
,
parse_tasks:
true
)
%textarea
.hidden.js-task-list-field
=
@merge_request
.
description
This diff is collapsed.
Click to expand it.
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