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
a3d55db9
Commit
a3d55db9
authored
Apr 29, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update task list behavior for Issues
parent
18baf550
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
app/assets/javascripts/issue.js.coffee
app/assets/javascripts/issue.js.coffee
+23
-4
app/views/projects/issues/_issue_context.html.haml
app/views/projects/issues/_issue_context.html.haml
+1
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+3
-1
No files found.
app/assets/javascripts/issue.js.coffee
View file @
a3d55db9
...
@@ -6,11 +6,11 @@ class @Issue
...
@@ -6,11 +6,11 @@ class @Issue
$
(
".context .inline-update"
).
on
"change"
,
"#issue_assignee_id"
,
->
$
(
".context .inline-update"
).
on
"change"
,
"#issue_assignee_id"
,
->
$
(
this
).
submit
()
$
(
this
).
submit
()
if
$
(
"a.btn-close"
).
length
# Prevent duplicate event bindings
$
(
"li.task-list-item input:checkbox"
).
prop
(
"disabled"
,
false
)
@
disableTaskList
(
)
$
(
'.task-list-item input:checkbox'
).
off
(
'change'
)
if
$
(
"a.btn-close"
).
length
$
(
'.task-list-item input:checkbox'
).
change
(
'issue'
,
updateTaskState
)
@
initTaskList
(
)
$
(
'.issue-details'
).
waitForImages
->
$
(
'.issue-details'
).
waitForImages
->
$
(
'.issuable-affix'
).
affix
offset
:
$
(
'.issuable-affix'
).
affix
offset
:
...
@@ -22,3 +22,22 @@ class @Issue
...
@@ -22,3 +22,22 @@ class @Issue
$
(
@
).
width
(
$
(
@
).
outerWidth
())
$
(
@
).
width
(
$
(
@
).
outerWidth
())
.
on
'affixed-top.bs.affix affixed-bottom.bs.affix'
,
->
.
on
'affixed-top.bs.affix affixed-bottom.bs.affix'
,
->
$
(
@
).
width
(
''
)
$
(
@
).
width
(
''
)
initTaskList
:
->
$
(
'.issue-details .js-task-list-container'
).
taskList
(
'enable'
)
$
(
document
).
on
'tasklist:changed'
,
'.issue-details .js-task-list-container'
,
@
updateTaskList
disableTaskList
:
->
$
(
'.issue-details .js-task-list-container'
).
taskList
(
'disable'
)
$
(
document
).
off
'tasklist:changed'
,
'.issue-details .js-task-list-container'
# TODO (rspeicher): Make the issue description inline-editable like a note so
# that we can re-use its form here
updateTaskList
:
->
patchData
=
{}
patchData
[
'issue'
]
=
{
'description'
:
$
(
'.js-task-list-field'
,
this
).
val
()}
$
.
ajax
type
:
'PATCH'
url
:
$
(
'form.js-issue-update'
).
attr
(
'action'
)
data
:
patchData
app/views/projects/issues/_issue_context.html.haml
View file @
a3d55db9
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@issue
],
remote:
true
,
html:
{
class:
'edit-issue inline-update'
}
do
|
f
|
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@issue
],
remote:
true
,
html:
{
class:
'edit-issue inline-update
js-issue-update
'
}
do
|
f
|
%div
.prepend-top-20
%div
.prepend-top-20
.issuable-context-title
.issuable-context-title
%label
%label
...
...
app/views/projects/issues/show.html.haml
View file @
a3d55db9
...
@@ -31,10 +31,12 @@
...
@@ -31,10 +31,12 @@
=
gfm
escape_once
(
@issue
.
title
)
=
gfm
escape_once
(
@issue
.
title
)
%div
%div
-
if
@issue
.
description
.
present?
-
if
@issue
.
description
.
present?
.description
.description
.js-task-list-container
.wiki
.wiki
=
preserve
do
=
preserve
do
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
=
markdown
(
@issue
.
description
,
parse_tasks:
true
)
%textarea
.hidden.js-task-list-field
=
@issue
.
description
%hr
%hr
.issue-discussion
.issue-discussion
...
...
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