summaryrefslogtreecommitdiffstats
path: root/client/components/lists
diff options
context:
space:
mode:
authorMarc Hartmayer <hello@hartmayer.com>2020-04-23 00:54:39 +0200
committerMarc Hartmayer <hello@hartmayer.com>2020-04-23 02:55:33 +0200
commit981ed546f1cae45ad8b92b393ee29c1a26277f32 (patch)
treed14a2bd2ff6798c98c373589e8d87edd912174b0 /client/components/lists
parentc1287248a6a4975133790deab6747530e5ece3cb (diff)
downloadwekan-981ed546f1cae45ad8b92b393ee29c1a26277f32.tar.gz
wekan-981ed546f1cae45ad8b92b393ee29c1a26277f32.tar.bz2
wekan-981ed546f1cae45ad8b92b393ee29c1a26277f32.zip
Newer versions of jQuery sortable use `uiSortable` key
Newer versions of jQuery sortable use `uiSortable` as key to store the data. Let's adapt the code. While at it, refactor the code.
Diffstat (limited to 'client/components/lists')
-rw-r--r--client/components/lists/list.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 8574caf7..7ce520dc 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -139,23 +139,12 @@ BlazeComponent.extendComponent({
});
}
- if ($cards.data('sortable')) {
+ if ($cards.data('uiSortable')) {
$cards.sortable(
'option',
'disabled',
// Disable drag-dropping when user is not member/is miniscreen
- !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(),
+ !userIsMember() || Utils.isMiniScreen(),
// Not disable drag-dropping while in multi-selection mode
// MultiSelection.isActive() || !userIsMember(),
);