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
Boxiang Sun
gitlab-ce
Commits
7e41eca3
Commit
7e41eca3
authored
Jun 05, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'milestone-mr-dragging' into 'master'
Milestone merge request dragging This is part of #1207.
parents
9bd1afd7
336d50d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
19 deletions
+56
-19
app/assets/javascripts/milestone.js.coffee
app/assets/javascripts/milestone.js.coffee
+39
-2
app/views/projects/milestones/_merge_request.html.haml
app/views/projects/milestones/_merge_request.html.haml
+5
-5
app/views/projects/milestones/_merge_requests.html.haml
app/views/projects/milestones/_merge_requests.html.haml
+6
-0
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+6
-12
No files found.
app/assets/javascripts/milestone.js.coffee
View file @
7e41eca3
...
...
@@ -11,10 +11,23 @@ class Milestone
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
@
updateMergeRequest
:
(
li
,
merge_request_url
,
data
)
->
$
.
ajax
type
:
"PUT"
url
:
merge_request_url
data
:
data
success
:
(
data
)
->
if
data
.
saved
==
true
$
(
li
).
effect
'highlight'
else
new
Flash
(
"Issue update failed"
,
'alert'
)
dataType
:
"json"
constructor
:
->
@
bindSorting
()
@
bindIssuesSorting
()
@
bindMergeRequestSorting
()
bindSorting
:
->
bind
Issues
Sorting
:
->
$
(
"#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed"
).
sortable
(
connectWith
:
".issues-sortable-list"
,
dropOnEmpty
:
true
,
...
...
@@ -38,4 +51,28 @@ class Milestone
).
disableSelection
()
bindMergeRequestSorting
:
->
$
(
"#merge_requests-list-unassigned, #merge_requests-list-ongoing, #merge_requests-list-closed"
).
sortable
(
connectWith
:
".merge_requests-sortable-list"
,
dropOnEmpty
:
true
,
receive
:
(
event
,
ui
)
->
new_state
=
$
(
this
).
data
(
'state'
)
merge_request_id
=
ui
.
item
.
data
(
'iid'
)
merge_request_url
=
ui
.
item
.
data
(
'url'
)
data
=
switch
new_state
when
'ongoing'
"merge_request[assignee_id]="
+
gon
.
current_user_id
when
'unassigned'
"merge_request[assignee_id]="
when
'closed'
"merge_request[state_event]=close"
if
$
(
ui
.
sender
).
data
(
'state'
)
==
"closed"
data
+=
"&merge_request[state_event]=reopen"
Milestone
.
updateMergeRequest
(
ui
.
item
,
merge_request_url
,
data
)
).
disableSelection
()
@
Milestone
=
Milestone
app/views/projects/milestones/_merge_request.html.haml
View file @
7e41eca3
%li
=
link_to
[
@project
,
merge_request
]
do
%span
.label.label-info
##{merge_request.iid}
–
=
link_to_gfm
truncate
(
merge_request
.
title
,
length:
60
),
[
@project
,
merge_request
]
%li
{
class:
'mr-row'
,
'data-iid'
=>
merge_request
.
iid
,
'data-url'
=>
project_merge_request_path
(
@project
,
merge_request
)
}
%span
.str-truncated
=
link_to
[
@project
,
merge_request
]
do
%span
.cgray
##{merge_request.iid}
=
link_to_gfm
truncate
(
merge_request
.
title
,
length:
60
),
[
@project
,
merge_request
]
app/views/projects/milestones/_merge_requests.html.haml
0 → 100644
View file @
7e41eca3
.panel.panel-default
.panel-heading
=
title
%ul
{
class:
"well-list merge_requests-sortable-list"
,
id:
"merge_requests-list-#{id}"
,
"data-state"
=>
id
}
-
merge_requests
.
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
%li
.light
Drag and drop available
app/views/projects/milestones/show.html.haml
View file @
7e41eca3
...
...
@@ -84,18 +84,12 @@
.tab-pane
#tab-merge-requests
.row
.col-md-6
.panel.panel-default
.panel-heading
Open
%ul
.well-list
-
@merge_requests
.
opened
.
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
.col-md-6
.panel.panel-default
.panel-heading
Closed
%ul
.well-list
-
@merge_requests
.
closed
.
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
.col-md-4
=
render
(
'merge_requests'
,
title:
'Work in progress (open and unassigned)'
,
merge_requests:
@merge_requests
.
opened
.
unassigned
,
id:
'unassigned'
)
.col-md-4
=
render
(
'merge_requests'
,
title:
'Assigned (open and assigned)'
,
merge_requests:
@merge_requests
.
opened
.
assigned
,
id:
'ongoing'
)
.col-md-4
=
render
(
'merge_requests'
,
title:
'Declined (closed)'
,
merge_requests:
@merge_requests
.
closed
,
id:
'closed'
)
.tab-pane
#tab-participants
%ul
.bordered-list
...
...
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