mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-28 15:08:46 +00:00
Add draggable task management example
This commit is contained in:
parent
de6c9aff9d
commit
7cb54f32c6
@ -67,9 +67,9 @@ tags: $:/tags/Macro
|
|||||||
</$set>
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define list-tagged-draggable(tag,emptyMessage,itemTemplate,elementTag:"div")
|
\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div")
|
||||||
<$set name="tag" value="""$tag$""">
|
<$set name="tag" value="""$tag$""">
|
||||||
<$list filter="[<tag>tagging[]]" emptyMessage=<<__emptyMessage__>>>
|
<$list filter="[<tag>tagging[]$subFilter$]" emptyMessage=<<__emptyMessage__>>>
|
||||||
<$elementTag$ class="tc-menu-list-item">
|
<$elementTag$ class="tc-menu-list-item">
|
||||||
<$droppable actions=<<list-tagged-draggable-drop-actions>>>
|
<$droppable actions=<<list-tagged-draggable-drop-actions>>>
|
||||||
<$elementTag$ class="tc-droppable-placeholder">
|
<$elementTag$ class="tc-droppable-placeholder">
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
created: 20130825213300000
|
created: 20130825213300000
|
||||||
modified: 20140919161411400
|
modified: 20180307153530187
|
||||||
tags: Learning
|
tags: Learning
|
||||||
title: TaskManagementExample
|
title: TaskManagementExample
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
TiddlyWiki5 can be used as a simple task management system without further customisation. The idea is that tasks be tagged `task`, with those that are completed also tagged `done`. In this way it is straightforward to generate task lists.
|
TiddlyWiki5 can be used as a simple task management system without further customisation. The idea is that tasks be tagged `task`, with those that are completed also tagged `done`. In this way it is straightforward to generate task lists.
|
||||||
|
|
||||||
|
<<.tip """There is [[an enhanced version of this demo|TaskManagementExample (Draggable)]] that adds the ability to drag and drop the tasks to re-order them.""">>
|
||||||
|
|
||||||
! Outstanding tasks
|
! Outstanding tasks
|
||||||
|
|
||||||
<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
|
<$list filter="[!has[draft.of]tag[task]!tag[done]sort[created]]">
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
created: 20180307153530187
|
||||||
|
modified: 20180307153530187
|
||||||
|
tags: Learning
|
||||||
|
title: TaskManagementExample (Draggable)
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
This is a version of the TaskManagementDemo enhanced with the ability to drag and drop the task list to re-order them.
|
||||||
|
|
||||||
|
! Outstanding tasks
|
||||||
|
|
||||||
|
//Drag the tasks to re-order them//
|
||||||
|
|
||||||
|
<<list-tagged-draggable tag:"task" subFilter:"!has[draft.of]!tag[done]" itemTemplate:"TaskManagementExampleDraggableTemplate" emptyMessage:"You don't have any active tasks">>
|
||||||
|
|
||||||
|
! Completed tasks
|
||||||
|
|
||||||
|
//(Listed in reverse order of completion)//
|
||||||
|
|
||||||
|
<$list filter="[!has[draft.of]tag[task]tag[done]sort[created]]">
|
||||||
|
<div>
|
||||||
|
<$checkbox tag="done"> ~~<$link to={{!!title}}><$view field="title"/></$link>~~</$checkbox>
|
||||||
|
</div>
|
||||||
|
</$list>
|
@ -0,0 +1,7 @@
|
|||||||
|
created: 20180307153530187
|
||||||
|
modified: 20180307153530187
|
||||||
|
tags: Learning
|
||||||
|
title: TaskManagementExampleDraggableTemplate
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
<$checkbox tag="done"> <$link to={{!!title}}><$view field="title"/></$link></$checkbox>
|
@ -11,6 +11,8 @@ The <<.def list-tagged-draggable>> [[macro|Macros]] renders the tiddlers with a
|
|||||||
|
|
||||||
;tag
|
;tag
|
||||||
: The title of the tag
|
: The title of the tag
|
||||||
|
;subFilter
|
||||||
|
: An optional subfilter to filter out unwanted items (eg `!tag[done]`)
|
||||||
;itemTemplate
|
;itemTemplate
|
||||||
: Optional title of a tiddler to use as the template for rendering list items
|
: Optional title of a tiddler to use as the template for rendering list items
|
||||||
;emptyMessage
|
;emptyMessage
|
||||||
|
Loading…
Reference in New Issue
Block a user