BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4eb67cdf
Commit
4eb67cdf
authored
Feb 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues can be dragged & dropped into empty milestone lists
This is also possible with MRs. Also fixed an issue where MRs weren't sortable Fixes #13668
parent
7c809985
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
milestone.js.coffee
app/assets/javascripts/milestone.js.coffee
+21
-9
No files found.
app/assets/javascripts/milestone.js.coffee
View file @
4eb67cdf
...
...
@@ -62,6 +62,11 @@ class @Milestone
dataType
:
"json"
constructor
:
->
oldMouseStart
=
$
.
ui
.
sortable
.
prototype
.
_mouseStart
$
.
ui
.
sortable
.
prototype
.
_mouseStart
=
(
event
,
overrideHandle
,
noActivation
)
->
this
.
_trigger
"beforeStart"
,
event
,
this
.
_uiHash
()
oldMouseStart
.
apply
this
,
[
event
,
overrideHandle
,
noActivation
]
@
bindIssuesSorting
()
@
bindMergeRequestSorting
()
@
bindTabsSwitching
...
...
@@ -71,6 +76,10 @@ class @Milestone
connectWith
:
".issues-sortable-list"
,
dropOnEmpty
:
true
,
items
:
"li:not(.ui-sort-disabled)"
,
beforeStart
:
(
event
,
ui
)
->
$
(
".issues-sortable-list"
).
css
"min-height"
,
ui
.
item
.
outerHeight
()
stop
:
(
event
,
ui
)
->
$
(
".issues-sortable-list"
).
css
"min-height"
,
"0px"
update
:
(
event
,
ui
)
->
data
=
$
(
this
).
sortable
(
"serialize"
)
Milestone
.
sortIssues
(
data
)
...
...
@@ -96,10 +105,22 @@ class @Milestone
).
disableSelection
()
bindMergeRequestSorting
:
->
$
(
'a[data-toggle="tab"]'
).
on
'show.bs.tab'
,
(
e
)
->
currentTabClass
=
$
(
e
.
target
).
data
(
'show'
)
previousTabClass
=
$
(
e
.
relatedTarget
).
data
(
'show'
)
$
(
previousTabClass
).
hide
()
$
(
currentTabClass
).
removeClass
(
'hidden'
)
$
(
currentTabClass
).
show
()
$
(
"#merge_requests-list-unassigned, #merge_requests-list-ongoing, #merge_requests-list-closed"
).
sortable
(
connectWith
:
".merge_requests-sortable-list"
,
dropOnEmpty
:
true
,
items
:
"li:not(.ui-sort-disabled)"
,
beforeStart
:
(
event
,
ui
)
->
$
(
".merge_requests-sortable-list"
).
css
"min-height"
,
ui
.
item
.
outerHeight
()
stop
:
(
event
,
ui
)
->
$
(
".merge_requests-sortable-list"
).
css
"min-height"
,
"0px"
update
:
(
event
,
ui
)
->
data
=
$
(
this
).
sortable
(
"serialize"
)
Milestone
.
sortMergeRequests
(
data
)
...
...
@@ -123,12 +144,3 @@ class @Milestone
Milestone
.
updateMergeRequest
(
ui
.
item
,
merge_request_url
,
data
)
).
disableSelection
()
bindMergeRequestSorting
:
->
$
(
'a[data-toggle="tab"]'
).
on
'show.bs.tab'
,
(
e
)
->
currentTabClass
=
$
(
e
.
target
).
data
(
'show'
)
previousTabClass
=
$
(
e
.
relatedTarget
).
data
(
'show'
)
$
(
previousTabClass
).
hide
()
$
(
currentTabClass
).
removeClass
(
'hidden'
)
$
(
currentTabClass
).
show
()
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