mirror of
https://github.com/wekan/wekan.git
synced 2026-01-03 16:18:49 +01:00
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.
This commit is contained in:
parent
c1287248a6
commit
981ed546f1
4 changed files with 11 additions and 52 deletions
|
|
@ -57,11 +57,8 @@ BlazeComponent.extendComponent({
|
|||
// Disable sorting if the current user is not a board member
|
||||
self.autorun(() => {
|
||||
const $itemsDom = $(self.itemsDom);
|
||||
if ($itemsDom.data('sortable')) {
|
||||
$(self.itemsDom).sortable('option', 'disabled', !userIsMember());
|
||||
}
|
||||
if ($itemsDom.data('sortable')) {
|
||||
$(self.itemsDom).sortable('option', 'disabled', Utils.isMiniScreen());
|
||||
if ($itemsDom.data('uiSortable')) {
|
||||
$(self.itemsDom).sortable('option', 'disabled', !userIsMember() || Utils.isMiniScreen());
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue