Drag handles for checklist #3240

This commit is contained in:
Martin Filser 2020-11-11 00:10:28 +01:00
parent 167d9d34eb
commit fd41e8ba45
5 changed files with 32 additions and 1 deletions

View file

@ -190,6 +190,23 @@ Utils = {
//return false;
},
// returns if desktop drag handles are enabled
isShowDesktopDragHandles() {
let currentUser = Meteor.user();
if (currentUser) {
return (currentUser.profile || {}).showDesktopDragHandles;
} else if (cookies.has('showDesktopDragHandles')) {
return true;
} else {
return false;
}
},
// returns if mini screen or desktop drag handles
isMiniScreenOrShowDesktopDragHandles() {
return this.isMiniScreen() || this.isShowDesktopDragHandles()
},
calculateIndexData(prevData, nextData, nItems = 1) {
let base, increment;
// If we drop the card to an empty column