diff options
author | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 10:13:11 +0800 |
---|---|---|
committer | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 10:13:11 +0800 |
commit | c3458855bdb52c976ee6689ad5a0d4e92e96f2e3 (patch) | |
tree | d9dbbcc3087b5bfc520710b5f5624a3f4e2b78e6 /client/components/lists/list.js | |
parent | 444848876759173ad80203129250d2f0311f30fc (diff) | |
parent | cfcc73724fcd394150d1b815d0a7a4c466e216b5 (diff) | |
download | wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.tar.gz wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.tar.bz2 wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.zip |
Merge branch 'master' into lib-change
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r-- | client/components/lists/list.js | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js index 8574caf7..839304f8 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -1,6 +1,6 @@ import { Cookies } from 'meteor/ostrio:cookies'; const cookies = new Cookies(); -const { calculateIndex, enableClickOnTouch } = Utils; +const { calculateIndex } = Utils; BlazeComponent.extendComponent({ // Proxy @@ -114,9 +114,6 @@ BlazeComponent.extendComponent({ }, }); - // ugly touch event hotfix - enableClickOnTouch(itemsSelector); - this.autorun(() => { let showDesktopDragHandles = false; currentUser = Meteor.user(); @@ -129,7 +126,7 @@ BlazeComponent.extendComponent({ showDesktopDragHandles = false; } - if (!Utils.isMiniScreen() && showDesktopDragHandles) { + if (Utils.isMiniScreen() || showDesktopDragHandles) { $cards.sortable({ handle: '.handle', }); @@ -139,27 +136,16 @@ BlazeComponent.extendComponent({ }); } - if ($cards.data('sortable')) { + if ($cards.data('uiSortable') || $cards.data('sortable')) { $cards.sortable( 'option', 'disabled', - // Disable drag-dropping when user is not member/is miniscreen + // Disable drag-dropping when user is not member !userIsMember(), // Not disable drag-dropping while in multi-selection mode // MultiSelection.isActive() || !userIsMember(), ); } - - if ($cards.data('sortable')) { - $cards.sortable( - 'option', - 'disabled', - // Disable drag-dropping when user is not member/is miniscreen - Utils.isMiniScreen(), - // Not disable drag-dropping while in multi-selection mode - // MultiSelection.isActive() || !userIsMember(), - ); - } }); // We want to re-run this function any time a card is added. |