diff options
Diffstat (limited to 'src/components/TaskBody.vue')
-rw-r--r-- | src/components/TaskBody.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/TaskBody.vue b/src/components/TaskBody.vue index 41101ba5..82e03bda 100644 --- a/src/components/TaskBody.vue +++ b/src/components/TaskBody.vue @@ -25,7 +25,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. :task-id="task.uri" :class="{done: task.completed, readOnly: task.calendar.readOnly}" :data-priority="[task.priority]" - class="task-item"> + class="task-item" + @dragstart="dragStart($event)"> <div :task-id="task.uri" :class="{active: isTaskOpen()}" class="task-body reactive" @@ -308,6 +309,17 @@ export default { overdue: overdue, /** + * Set task uri in the data transfer object + * so we can get it when dropped on an + * app-navigation-item + * + * @param {Object} e The drag event + */ + dragStart(e) { + e.dataTransfer.setData('text/plain', this.task.uri) + }, + + /** * Checks if one of the tasks sub(sub-...)tasks matches the search query * * @param {Task} task The task to search in |