diff --git a/fhem/CHANGED b/fhem/CHANGED index fe86109ed..54273321a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. - change: 98_todoist: removed Attribute "sortTasks" / better commandref + better move in widget (not delete and add) - change: 93_DbLog: change datetime pattern in valueFn of addCacheLine Forum: #107285 - change: 98_todoist: reorder tasks - widget reorder diff --git a/fhem/FHEM/98_todoist.pm b/fhem/FHEM/98_todoist.pm index 990c69465..3e6aa2581 100644 --- a/fhem/FHEM/98_todoist.pm +++ b/fhem/FHEM/98_todoist.pm @@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse "; ####################### # Global variables -my $version = "1.3.1"; +my $version = "1.3.2"; my $srandUsed; @@ -2136,14 +2136,14 @@ sub todoist_Html(;$$$) { $ret .= "\n". " \n". - "
\n". + "
{PID}."\">\n". (!$FW_hiddenroom{detail}?"{'gotodetail'}."\" href=\"/fhem?detail=".$name."\">":""). AttrVal($name,"alias",$name). (!$FW_hiddenroom{detail}?"":""). "
\n". " \n". "\n"; - $ret .= "\n"; + $ret .= "
{PID}."\">\n"; } @@ -2166,7 +2166,7 @@ sub todoist_Html(;$$$) { - $ret .= "\n". + $ret .= "{PID}."\" data-line-id=\"".$_."\" class=\"sortit todoist_data ".$eo."\">\n". "
\n". "
\n". " {'check'}."\" class=\"todoist_checkbox_".$name."\" type=\"checkbox\" id=\"check_".$_."\" data-id=\"".$_."\" />\n". @@ -2333,12 +2333,13 @@ sub todoist_genUUID() { set <DEVICE> updateTask ID:12345678 dueDate=2017-01-15 priority=1
set <DEVICE> updateTask 1 dueDate=übermorgen
set <DEVICE> updateTask TITLE:Brot dueDate=übermorgen

-
  • moveTask - move a task to another parent or project. +
  • moveTask - move a task to another parent, section or project. Expects Task-ID or todoist-Task-ID as parameter

    Possible additional parameters are:
    • parentID=todoist-ID of the new parent task.
    • projectID=todoist-ID of the receiving project.
    • +
    • sectionID=todoist-ID of the receiving section.


  • completeTask - completes a task. Needs number of task (reading 'Task_NUMBER'), the title (TITLE:<TITLE>) or the todoist-Task-ID (ID:<ID>) as parameter

    diff --git a/fhem/www/pgm2/todoist.js b/fhem/www/pgm2/todoist.js index d269c1d71..c5aaff46d 100644 --- a/fhem/www/pgm2/todoist.js +++ b/fhem/www/pgm2/todoist.js @@ -322,7 +322,7 @@ if (typeof todoist_checkVar === 'undefined') { var nameHT = tid.split("_"); var lastVal = nameHT.pop(); // Get last element var nameH = nameHT.join("_"); - todoist_sendCommand('set ' + nameH + ' deleteTask ID:'+ id); + //todoist_sendCommand('set ' + nameH + ' deleteTask ID:'+ id); }, over: function (event,ui) { var width = ui.item.innerWidth(); @@ -343,10 +343,12 @@ if (typeof todoist_checkVar === 'undefined') { receive: function (event,ui) { var parent = ui.item.parent().parent(); var id = ui.item.attr('data-line-id'); + var nameF = ui.item.data('project-name'); var tid = parent.attr('id'); var nameR = tid.split(/_(.+)/)[1]; + var pid = parent.data('project-id'); var value = ui.item.find('span').html(); - todoist_sendCommand('set '+ nameR +' addTask ' + value); + todoist_sendCommand('set '+ nameF +' moveTask ID:' + id + ' projectID=' + pid); ui.item.attr('data-remove','1'); } }).disableSelection();