mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 22:58:48 +01:00
Make it compatible with newer and older versions of jQuery sortable
While at it, fix comments and prettify it.
This commit is contained in:
parent
7cf8487f57
commit
6d1cdebfe2
4 changed files with 11 additions and 7 deletions
|
|
@ -54,11 +54,15 @@ BlazeComponent.extendComponent({
|
|||
return Meteor.user() && Meteor.user().isBoardMember();
|
||||
}
|
||||
|
||||
// Disable sorting if the current user is not a board member
|
||||
// Disable sorting if the current user is not a board member or is a miniscreen
|
||||
self.autorun(() => {
|
||||
const $itemsDom = $(self.itemsDom);
|
||||
if ($itemsDom.data('uiSortable')) {
|
||||
$(self.itemsDom).sortable('option', 'disabled', !userIsMember() || Utils.isMiniScreen());
|
||||
if ($itemsDom.data('uiSortable') || $itemsDom.data('sortable')) {
|
||||
$(self.itemsDom).sortable(
|
||||
'option',
|
||||
'disabled',
|
||||
!userIsMember() || Utils.isMiniScreen(),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue