diff options
author | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-18 23:38:41 +0300 |
---|---|---|
committer | Nicu Tofan <nicu.tofan@gmail.com> | 2018-06-26 14:32:47 +0300 |
commit | 5f20e56721cd23ef6b65138f1b2aa074d7f830c6 (patch) | |
tree | 11da9dd384f47a07aacd53120be07338cfa76734 /client/components/cards/subtasks.js | |
parent | d59583915cca24d53a11251c54ca7caf6b5edb4e (diff) | |
download | wekan-5f20e56721cd23ef6b65138f1b2aa074d7f830c6.tar.gz wekan-5f20e56721cd23ef6b65138f1b2aa074d7f830c6.tar.bz2 wekan-5f20e56721cd23ef6b65138f1b2aa074d7f830c6.zip |
Remove leftovers from checklist conversion
Diffstat (limited to 'client/components/cards/subtasks.js')
-rw-r--r-- | client/components/cards/subtasks.js | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js index a611ae26..e65ef518 100644 --- a/client/components/cards/subtasks.js +++ b/client/components/cards/subtasks.js @@ -1,43 +1,3 @@ -const { calculateIndexData } = Utils; - -function initSorting(items) { - items.sortable({ - tolerance: 'pointer', - helper: 'clone', - items: '.js-subtasks-item:not(.placeholder)', - connectWith: '.js-subtasks-items', - appendTo: '.board-canvas', - distance: 7, - placeholder: 'subtasks-item placeholder', - scroll: false, - start(evt, ui) { - ui.placeholder.height(ui.helper.height()); - EscapeActions.executeUpTo('popup-close'); - }, - stop(evt, ui) { - const parent = ui.item.parents('.js-subtasks-items'); - const subtasksId = Blaze.getData(parent.get(0)).subtasks._id; - let prevItem = ui.item.prev('.js-subtasks-item').get(0); - if (prevItem) { - prevItem = Blaze.getData(prevItem).item; - } - let nextItem = ui.item.next('.js-subtasks-item').get(0); - if (nextItem) { - nextItem = Blaze.getData(nextItem).item; - } - const nItems = 1; - const sortIndex = calculateIndexData(prevItem, nextItem, nItems); - const subtasksDomElement = ui.item.get(0); - const subtasksData = Blaze.getData(subtasksDomElement); - const subtasksItem = subtasksData.item; - - items.sortable('cancel'); - - subtasksItem.move(subtasksId, sortIndex.base); - }, - }); -} - BlazeComponent.extendComponent({ canModifyCard() { return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); @@ -151,16 +111,5 @@ Template.subtaskItemDetail.helpers({ }); BlazeComponent.extendComponent({ - toggleItem() { - const subtasks = this.currentData().subtasks; - const item = this.currentData().item; - if (subtasks && item && item._id) { - item.toggleItem(); - } - }, - events() { - return [{ - 'click .js-subtasks-item .check-box': this.toggleItem, - }]; - }, + // ... }).register('subtaskItemDetail'); |