Commit 9654b098c6478e7c17bc8c848f9284daa26ead76
1 parent
eeef2c73
Exists in
spb-stable
and in
2 other branches
Milestone drag-n-drop with 3 columns
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
9 additions
and
10 deletions
Show diff stats
app/assets/javascripts/milestone.js.coffee
@@ -15,7 +15,7 @@ class Milestone | @@ -15,7 +15,7 @@ class Milestone | ||
15 | @bindSorting() | 15 | @bindSorting() |
16 | 16 | ||
17 | bindSorting: -> | 17 | bindSorting: -> |
18 | - $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed, #issues-list-reopened").sortable( | 18 | + $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed").sortable( |
19 | connectWith: ".issues-sortable-list", | 19 | connectWith: ".issues-sortable-list", |
20 | dropOnEmpty: true, | 20 | dropOnEmpty: true, |
21 | receive: (event, ui) -> | 21 | receive: (event, ui) -> |
@@ -30,8 +30,9 @@ class Milestone | @@ -30,8 +30,9 @@ class Milestone | ||
30 | "issue[assignee_id]=" | 30 | "issue[assignee_id]=" |
31 | when 'closed' | 31 | when 'closed' |
32 | "issue[state_event]=close" | 32 | "issue[state_event]=close" |
33 | - when 'reopened' | ||
34 | - "issue[state_event]=reopen" | 33 | + |
34 | + if $(ui.sender).data('state') == "closed" | ||
35 | + data += "&issue[state_event]=reopen" | ||
35 | 36 | ||
36 | Milestone.updateIssue(ui.item, issue_url, data) | 37 | Milestone.updateIssue(ui.item, issue_url, data) |
37 | 38 |
app/views/projects/milestones/show.html.haml
@@ -75,14 +75,12 @@ | @@ -75,14 +75,12 @@ | ||
75 | .tab-content | 75 | .tab-content |
76 | .tab-pane.active#tab-issues | 76 | .tab-pane.active#tab-issues |
77 | .row | 77 | .row |
78 | - .col-md-3 | ||
79 | - = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.only_opened.unassigned, id: 'unassigned') | ||
80 | - .col-md-3 | ||
81 | - = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.only_opened.assigned, id: 'ongoing') | ||
82 | - .col-md-3 | 78 | + .col-md-4 |
79 | + = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned') | ||
80 | + .col-md-4 | ||
81 | + = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing') | ||
82 | + .col-md-4 | ||
83 | = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') | 83 | = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') |
84 | - .col-md-3 | ||
85 | - = render('issues', title: 'Reopened Issues (reopened)', issues: @issues.only_reopened, id: 'reopened') | ||
86 | 84 | ||
87 | .tab-pane#tab-merge-requests | 85 | .tab-pane#tab-merge-requests |
88 | .row | 86 | .row |