Commit 9654b098 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Milestone drag-n-drop with 3 columns

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent eeef2c73
...@@ -15,7 +15,7 @@ class Milestone ...@@ -15,7 +15,7 @@ class Milestone
@bindSorting() @bindSorting()
bindSorting: -> bindSorting: ->
$("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed, #issues-list-reopened").sortable( $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed").sortable(
connectWith: ".issues-sortable-list", connectWith: ".issues-sortable-list",
dropOnEmpty: true, dropOnEmpty: true,
receive: (event, ui) -> receive: (event, ui) ->
...@@ -30,8 +30,9 @@ class Milestone ...@@ -30,8 +30,9 @@ class Milestone
"issue[assignee_id]=" "issue[assignee_id]="
when 'closed' when 'closed'
"issue[state_event]=close" "issue[state_event]=close"
when 'reopened'
"issue[state_event]=reopen" if $(ui.sender).data('state') == "closed"
data += "&issue[state_event]=reopen"
Milestone.updateIssue(ui.item, issue_url, data) Milestone.updateIssue(ui.item, issue_url, data)
......
...@@ -75,14 +75,12 @@ ...@@ -75,14 +75,12 @@
.tab-content .tab-content
.tab-pane.active#tab-issues .tab-pane.active#tab-issues
.row .row
.col-md-3 .col-md-4
= render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.only_opened.unassigned, id: 'unassigned') = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
.col-md-3 .col-md-4
= render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.only_opened.assigned, id: 'ongoing') = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing')
.col-md-3 .col-md-4
= render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')
.col-md-3
= render('issues', title: 'Reopened Issues (reopened)', issues: @issues.only_reopened, id: 'reopened')
.tab-pane#tab-merge-requests .tab-pane#tab-merge-requests
.row .row
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment