From 41df3738986b3c30d8c840d3c828c2badefaf647 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Thu, 8 Oct 2020 00:24:49 +0300 Subject: [PATCH] * disable "edit note" task menu item --- src/includes/mytinytodo.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/includes/mytinytodo.js b/src/includes/mytinytodo.js index 21273b0..471a662 100644 --- a/src/includes/mytinytodo.js +++ b/src/includes/mytinytodo.js @@ -483,8 +483,8 @@ var mytinytodo = window.mytinytodo = _mtt = { items: '> :not(.task-completed)', cancel: 'span,input,a,textarea', delay: 150, - start: sortStart, - update: orderChanged, + start: tasklistSortStart, + update: tasklistSortUpdated, placeholder: 'mtt-task-placeholder', cursor: 'grabbing' }); @@ -497,6 +497,7 @@ var mytinytodo = window.mytinytodo = _mtt = { cancel: 'input', distance: 0 }); + $('#cmenu_note').hide(); } $("#lists ul").sortable({delay:150, update:listOrderChanged}); @@ -584,6 +585,8 @@ var mytinytodo = window.mytinytodo = _mtt = { window.onpopstate = historyOnPopState; this.addAction('listSelected', historyListSelected); } + + this.doAction( 'init' ); return this; }, @@ -964,7 +967,7 @@ function loadTasks(opts) function prepareTaskStr(item, noteExp) { - return '
  • ' + prepareTaskBlocks(item) + "
  • \n"; }; @@ -1685,13 +1688,13 @@ function submitFullTask(form) }; -function sortStart(event,ui) +function tasklistSortStart(event, ui) { // remember initial order before sorting sortOrder = $(this).sortable('toArray'); }; -function orderChanged(event,ui) +function tasklistSortUpdated(event, ui) { if(!ui.item[0]) return; var itemId = ui.item[0].id;