mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Drag handles. In Progress.
This commit is contained in:
parent
ddd00a27a9
commit
03d7fc02ec
15 changed files with 151 additions and 18 deletions
|
|
@ -31,7 +31,13 @@ BlazeComponent.extendComponent({
|
|||
const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)';
|
||||
const $cards = this.$('.js-minicards');
|
||||
|
||||
if (window.matchMedia('(max-width: 1199px)').matches) {
|
||||
if (Utils.isMiniScreen) {
|
||||
$('.js-minicards').sortable({
|
||||
handle: '.handle',
|
||||
});
|
||||
}
|
||||
|
||||
if (!Utils.isMiniScreen && showDesktopDragHandles) {
|
||||
$('.js-minicards').sortable({
|
||||
handle: '.handle',
|
||||
});
|
||||
|
|
@ -155,6 +161,12 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}).register('list');
|
||||
|
||||
Template.list.helpers({
|
||||
showDesktopDragHandles() {
|
||||
return Meteor.user().hasShowDesktopDragHandles();
|
||||
},
|
||||
});
|
||||
|
||||
Template.miniList.events({
|
||||
'click .js-select-list'() {
|
||||
const listId = this._id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue