mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 05:06:35 +00:00
98_todoist: better move to other project in widget
git-svn-id: https://svn.fhem.de/fhem/trunk@20970 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3dce8d1c7c
commit
8ff0b19927
@ -1,6 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
- change: 98_todoist: removed Attribute "sortTasks" / better commandref
|
- 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
|
- change: 93_DbLog: change datetime pattern in valueFn of addCacheLine
|
||||||
Forum: #107285
|
Forum: #107285
|
||||||
- change: 98_todoist: reorder tasks - widget reorder
|
- change: 98_todoist: reorder tasks - widget reorder
|
||||||
|
@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse ";
|
|||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Global variables
|
# Global variables
|
||||||
my $version = "1.3.1";
|
my $version = "1.3.2";
|
||||||
|
|
||||||
my $srandUsed;
|
my $srandUsed;
|
||||||
|
|
||||||
@ -2136,14 +2136,14 @@ sub todoist_Html(;$$$) {
|
|||||||
|
|
||||||
$ret .= "<tr class=\"devTypeTr\">\n".
|
$ret .= "<tr class=\"devTypeTr\">\n".
|
||||||
" <td colspan=\"3\">\n".
|
" <td colspan=\"3\">\n".
|
||||||
" <div class=\"todoist_devType todoist_devType_".$name." col_header\">\n".
|
" <div class=\"todoist_devType todoist_devType_".$name." col_header\" data-id=\"".$hash->{PID}."\">\n".
|
||||||
(!$FW_hiddenroom{detail}?"<a title=\"".$todoist_tt->{'gotodetail'}."\" href=\"/fhem?detail=".$name."\">":"").
|
(!$FW_hiddenroom{detail}?"<a title=\"".$todoist_tt->{'gotodetail'}."\" href=\"/fhem?detail=".$name."\">":"").
|
||||||
AttrVal($name,"alias",$name).
|
AttrVal($name,"alias",$name).
|
||||||
(!$FW_hiddenroom{detail}?"</a>":"").
|
(!$FW_hiddenroom{detail}?"</a>":"").
|
||||||
" </div>\n".
|
" </div>\n".
|
||||||
" </td>\n".
|
" </td>\n".
|
||||||
"</tr>\n";
|
"</tr>\n";
|
||||||
$ret .= "<tr><td colspan=\"3\"><table class=\"block wide sortable\" id=\"todoistTable_".$name."\">\n";
|
$ret .= "<tr><td colspan=\"3\"><table class=\"block wide sortable\" id=\"todoistTable_".$name."\" data-project-name=\"".$name."\" data-project-id=\"".$hash->{PID}."\">\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2166,7 +2166,7 @@ sub todoist_Html(;$$$) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ret .= "<tr id=\"".$name."_".$_."\" data-data=\"true\" data-line-id=\"".$_."\" class=\"sortit todoist_data ".$eo."\">\n".
|
$ret .= "<tr id=\"".$name."_".$_."\" data-data=\"true\" data-project-name=\"".$name."\" data-project-id=\"".$hash->{PID}."\" data-line-id=\"".$_."\" class=\"sortit todoist_data ".$eo."\">\n".
|
||||||
" <td class=\"col1 todoist_col1\">\n".
|
" <td class=\"col1 todoist_col1\">\n".
|
||||||
" <div class=\"todoist_move\"></div>\n".
|
" <div class=\"todoist_move\"></div>\n".
|
||||||
" <input title=\"".$todoist_tt->{'check'}."\" class=\"todoist_checkbox_".$name."\" type=\"checkbox\" id=\"check_".$_."\" data-id=\"".$_."\" />\n".
|
" <input title=\"".$todoist_tt->{'check'}."\" class=\"todoist_checkbox_".$name."\" type=\"checkbox\" id=\"check_".$_."\" data-id=\"".$_."\" />\n".
|
||||||
@ -2333,12 +2333,13 @@ sub todoist_genUUID() {
|
|||||||
<code>set <DEVICE> updateTask ID:12345678 dueDate=2017-01-15 priority=1</code><br />
|
<code>set <DEVICE> updateTask ID:12345678 dueDate=2017-01-15 priority=1</code><br />
|
||||||
<code>set <DEVICE> updateTask 1 dueDate=übermorgen</code><br />
|
<code>set <DEVICE> updateTask 1 dueDate=übermorgen</code><br />
|
||||||
<code>set <DEVICE> updateTask TITLE:Brot dueDate=übermorgen</code><br /><br /></li>
|
<code>set <DEVICE> updateTask TITLE:Brot dueDate=übermorgen</code><br /><br /></li>
|
||||||
<li><b>moveTask</b> - move a task to another parent or project.
|
<li><b>moveTask</b> - move a task to another parent, section or project.
|
||||||
Expects Task-ID or todoist-Task-ID as parameter<br /><br />
|
Expects Task-ID or todoist-Task-ID as parameter<br /><br />
|
||||||
Possible additional parameters are:<br />
|
Possible additional parameters are:<br />
|
||||||
<ul>
|
<ul>
|
||||||
<li>parentID=todoist-ID of the new parent task.</li>
|
<li>parentID=todoist-ID of the new parent task.</li>
|
||||||
<li>projectID=todoist-ID of the receiving project.</li>
|
<li>projectID=todoist-ID of the receiving project.</li>
|
||||||
|
<li>sectionID=todoist-ID of the receiving section.</li>
|
||||||
</ul><br /><br /></li>
|
</ul><br /><br /></li>
|
||||||
<li><b>completeTask</b> - completes a task. Needs number of task (reading 'Task_NUMBER'), the title (TITLE:<TITLE>) or the
|
<li><b>completeTask</b> - completes a task. Needs number of task (reading 'Task_NUMBER'), the title (TITLE:<TITLE>) or the
|
||||||
todoist-Task-ID (ID:<ID>) as parameter<br /><br />
|
todoist-Task-ID (ID:<ID>) as parameter<br /><br />
|
||||||
|
@ -322,7 +322,7 @@ if (typeof todoist_checkVar === 'undefined') {
|
|||||||
var nameHT = tid.split("_");
|
var nameHT = tid.split("_");
|
||||||
var lastVal = nameHT.pop(); // Get last element
|
var lastVal = nameHT.pop(); // Get last element
|
||||||
var nameH = nameHT.join("_");
|
var nameH = nameHT.join("_");
|
||||||
todoist_sendCommand('set ' + nameH + ' deleteTask ID:'+ id);
|
//todoist_sendCommand('set ' + nameH + ' deleteTask ID:'+ id);
|
||||||
},
|
},
|
||||||
over: function (event,ui) {
|
over: function (event,ui) {
|
||||||
var width = ui.item.innerWidth();
|
var width = ui.item.innerWidth();
|
||||||
@ -343,10 +343,12 @@ if (typeof todoist_checkVar === 'undefined') {
|
|||||||
receive: function (event,ui) {
|
receive: function (event,ui) {
|
||||||
var parent = ui.item.parent().parent();
|
var parent = ui.item.parent().parent();
|
||||||
var id = ui.item.attr('data-line-id');
|
var id = ui.item.attr('data-line-id');
|
||||||
|
var nameF = ui.item.data('project-name');
|
||||||
var tid = parent.attr('id');
|
var tid = parent.attr('id');
|
||||||
var nameR = tid.split(/_(.+)/)[1];
|
var nameR = tid.split(/_(.+)/)[1];
|
||||||
|
var pid = parent.data('project-id');
|
||||||
var value = ui.item.find('span').html();
|
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');
|
ui.item.attr('data-remove','1');
|
||||||
}
|
}
|
||||||
}).disableSelection();
|
}).disableSelection();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user