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
Jérome Perrin
gitlab-ce
Commits
f1242c17
Commit
f1242c17
authored
Aug 05, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created default sortable options to be shared between the lists & the cards
Added full vue.js source
parent
a3831192
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10098 additions
and
31 deletions
+10098
-31
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+1
-0
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+5
-15
app/assets/javascripts/boards/components/board_list.js.es6
app/assets/javascripts/boards/components/board_list.js.es6
+4
-13
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
...javascripts/boards/mixins/sortable_default_options.js.es6
+20
-0
vendor/assets/javascripts/vue.js
vendor/assets/javascripts/vue.js
+10068
-3
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
f1242c17
...
...
@@ -4,6 +4,7 @@
//= require_tree ./models
//= require_tree ./stores
//= require_tree ./services
//= require_tree ./mixins
//= require_tree ./components
$(function () {
...
...
app/assets/javascripts/boards/components/board.js.es6
View file @
f1242c17
...
...
@@ -30,7 +30,7 @@
getFilterData: function () {
const queryData = this.board.canSearch() ? { search: this.query } : {};
return _.extend(
this.filters, queryData
);
return _.extend(
queryData, this.filters
);
}
},
computed: {
...
...
@@ -39,27 +39,17 @@
}
},
ready: function () {
Sortable.create(this.$el.parentNode,
{
const options = _.extend(
{
group: 'boards',
animation: 150,
draggable: '.is-draggable',
handle: '.js-board-handle',
filter: '.board-delete',
forceFallback: true,
fallbackClass: 'is-dragging',
ghostClass: 'is-ghost',
scrollSensitivity: 150,
scrollSpeed: 50,
onUpdate: function (e) {
BoardsStore.moveList(e.oldIndex, e.newIndex);
},
onStart: function () {
document.body.classList.add('is-dragging');
},
onEnd: function () {
document.body.classList.remove('is-dragging');
}
});
}, gl.boardSortableDefaultOptions);
Sortable.create(this.$el.parentNode, options);
}
});
...
...
app/assets/javascripts/boards/components/board_list.js.es6
View file @
f1242c17
...
...
@@ -35,29 +35,20 @@
},
},
ready: function () {
Sortable.create(this.$els.list,
{
const options = _.extend(
{
sort: false,
group: 'issues',
disabled: this.disabled,
scrollSensitivity: 150,
scrollSpeed: 50,
forceFallback: true,
fallbackClass: 'is-dragging',
ghostClass: 'is-ghost',
onAdd: function (e) {
const fromListId = parseInt(e.from.getAttribute('data-board')),
toListId = parseInt(e.to.getAttribute('data-board')),
issueId = parseInt(e.item.getAttribute('data-issue'));
BoardsStore.moveCardToList(fromListId, toListId, issueId);
},
onStart: function () {
document.body.classList.add('is-dragging');
},
onEnd: function () {
document.body.classList.remove('is-dragging');
}
});
}, gl.boardSortableDefaultOptions);
Sortable.create(this.$els.list, options);
// Scroll event on list to load more
this.$els.list.onscroll = () => {
...
...
app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
0 → 100644
View file @
f1242c17
(function (w) {
if (!window.gl) {
window.gl = {};
}
gl.boardSortableDefaultOptions = {
animation: 150,
forceFallback: true,
fallbackClass: 'is-dragging',
ghostClass: 'is-ghost',
scrollSensitivity: 150,
scrollSpeed: 50,
onStart: function () {
document.body.classList.add('is-dragging');
},
onEnd: function () {
document.body.classList.remove('is-dragging');
}
};
})(window);
vendor/assets/javascripts/vue.js
View file @
f1242c17
This diff is collapsed.
Click to expand it.
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