summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-09-19 01:12:04 +0300
committerLauri Ojansivu <x@xet7.org>2019-09-19 01:12:04 +0300
commit55a2473d813c6e6687de393bda1ccc0c21f9ebcc (patch)
tree4cd96ee0c363153c6733454b91dea3185a11e76d /client/components/lists/list.js
parentba754cfaea9a467e18b2b4b4bcbaafaaac442677 (diff)
parent03d7fc02ecc90690e1282d417f35b7e4561af066 (diff)
downloadwekan-55a2473d813c6e6687de393bda1ccc0c21f9ebcc.tar.gz
wekan-55a2473d813c6e6687de393bda1ccc0c21f9ebcc.tar.bz2
wekan-55a2473d813c6e6687de393bda1ccc0c21f9ebcc.zip
Merge branch 'feature-drag-handle'
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r--client/components/lists/list.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index c2b39be9..b7b8b2e0 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -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;