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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3bfb4be6
Commit
3bfb4be6
authored
Dec 21, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create sortableConfig
parent
2cc7e560
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
app/assets/javascripts/boards/mixins/sortable_default_options.js
...ets/javascripts/boards/mixins/sortable_default_options.js
+6
-8
app/assets/javascripts/issuable/related_issues/components/related_issues_block.vue
...suable/related_issues/components/related_issues_block.vue
+2
-6
No files found.
app/assets/javascripts/boards/mixins/sortable_default_options.js
View file @
3bfb4be6
/* eslint-disable no-unused-vars, no-mixed-operators, comma-dangle */
/* global DocumentTouch */
import
sortableConfig
from
'
~/sortable_config
'
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
...
...
@@ -18,19 +20,15 @@ gl.issueBoards.onEnd = () => {
gl
.
issueBoards
.
touchEnabled
=
(
'
ontouchstart
'
in
window
)
||
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
;
gl
.
issueBoards
.
getBoardSortableDefaultOptions
=
(
obj
)
=>
{
const
defaultSortOptions
=
{
animation
:
200
,
forceFallback
:
true
,
fallbackClass
:
'
is-dragging
'
,
fallbackOnBody
:
true
,
ghostClass
:
'
is-ghost
'
,
const
defaultSortOptions
=
Object
.
assign
({},
sortableConfig
,
{
filter
:
'
.board-delete, .btn
'
,
delay
:
gl
.
issueBoards
.
touchEnabled
?
100
:
0
,
scrollSensitivity
:
gl
.
issueBoards
.
touchEnabled
?
60
:
100
,
scrollSpeed
:
20
,
onStart
:
gl
.
issueBoards
.
onStart
,
onEnd
:
gl
.
issueBoards
.
onEnd
}
;
onEnd
:
gl
.
issueBoards
.
onEnd
,
}
)
Object
.
keys
(
obj
).
forEach
((
key
)
=>
{
defaultSortOptions
[
key
]
=
obj
[
key
];
});
return
defaultSortOptions
;
...
...
app/assets/javascripts/issuable/related_issues/components/related_issues_block.vue
View file @
3bfb4be6
...
...
@@ -2,6 +2,7 @@
import
Sortable
from
'
vendor/Sortable
'
;
import
loadingIcon
from
'
~/vue_shared/components/loading_icon.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
sortableConfig
from
'
~/sortable_config
'
;
import
eventHub
from
'
../event_hub
'
;
import
issueItem
from
'
./issue_item.vue
'
;
import
addIssuableForm
from
'
./add_issuable_form.vue
'
;
...
...
@@ -111,12 +112,7 @@ export default {
},
mounted
()
{
if
(
this
.
canReorder
)
{
this
.
sortable
=
Sortable
.
create
(
this
.
$refs
.
list
,
{
animation
:
200
,
forceFallback
:
true
,
fallbackClass
:
'
is-dragging
'
,
fallbackOnBody
:
true
,
ghostClass
:
'
is-ghost
'
,
this
.
sortable
=
Sortable
.
create
(
this
.
$refs
.
list
,
Object
.
assign
({},
sortableConfig
,
{
onStart
:
this
.
addDraggingCursor
,
onEnd
:
this
.
reordered
,
});
...
...
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