ChecklistPlugin creates simple checklists.
It handles the tags %CLI% (CheckList Item), %CHECKLIST%, %CHECKLISTSTART%, %CHECKLISTEND%
and depends on the TWiki:Plugins.SmiliesPlugin (see Plugin Info).
A %CLI% tag creates a image button and a simple click on it changes the state of the image button.
The default states are 'todo' (represented by a image button) and 'done' (represented by a image button).
If you put a bullet list or a ordered list between %CHECKLISTSTART% and %CHECKLISTEND% every bullet/ordered list item gets a checklist item.
Every state change will be saved to a topic with name <YourTopicName>ChecklistItemState. It is possible to
define states (default: todo and done) and matching icons. You can also put more than one checklist into a topic.
Just type a %CLI% (CheckList Item) into a topic to create a single checklist item. A simple mouse click on it will change
the state of this item. If the last state is reached the item state falls back to the first state.
If you put a bullet or ordered list between %CHECKLISTSTART% and %CHECKLISTEND% every bullet/ordered list item gets a checklist item.
To modify the states or state icons you can set it with %CHECKLISTSTART% or %CHECKLIST% tag. This tags can also be used to create "reset" buttons and state legends.
All tags can be used with attributes documented in the Attributes section.
To create a link to the checklist item state topic you can put the following forced link on your checklist topic:
Example 6: Create multiple lists with tables and hard linked item states to allow add/insert/remove items: The %EDITTABLE% and %CHECKLISTSTART% tag have to stay in the same line.
%EDITTABLE{changerows="on" format="|label,0,#%SERVERTIME{$year$month$day$hour$min$sec}%|text,50|"}%%CHECKLISTSTART{name="list1"}%
| *STATUS<br/>(click to change)* | *Item* |
| #2007Feb07093710 | testitem |
%CHECKLISTEND%
%EDITTABLE{changerows="on" format="|label,0,#%SERVERTIME{$year$month$day$hour$min$sec}%|text,50|"}%%CHECKLISTSTART{name="list2"}%
| *STATUS<br/>(click to change)* | *Item* |
| #2007Feb07093712 | second |
%CHECKLISTEND%
Hint: You can use multiple %CHECKLIST% tags to create more than one reset button or legend at any position of your checklist topic.
%CHECKLISTSTART{showlegend="on" reset=":-I Reset"}%
1 first step
1 next step
%CHECKLISTEND%
first step
next step
( - todo - done ) Reset
Example 8: Create a button to set all states in a checklist to done:
the reset button was clicked
Hint: You can use multiple %CHECKLIST% tags to create more than one reset button.
1 first step %CLI%
1 next step %CLI%
%CHECKLIST{reset=":ok: set all done @done"}%
first step
next step
set all done
Example 9: Insert new items in an existing checklist without state lost:
first step and second step was clicked before new items (first new inserted item and second new inserted item) were added
Hint: You can put a <whitespace>#<ID> instead of %CLI{id="<ID>"}% into a bullet or ordered list item to add/insert a checklist item with own id. This works only between %CHECKLISTSTART%...%CHECKLISTEND%.
%CHECKLISTSTART%
1 first step
1 first new inserted item #MyFirstInsertedItem
1 second step
1 second new inserted item %CLI{id="MySecondInsertedItem"}%
%CHECKLISTEND%
first step
first new inserted item
next step
second new inserted item
Attributes
Usage:
%CLI{attribute1="value1" attribute2="value2" ...}%
or %CHECKLIST{attribute1="value1" attribute2="value2" ...}%
or %CHECKLISTSTART{attribute1="value1" attribute2="value2" ...}%
Examples:
enables/disables link anchors (default: yes); if enabled a state change will scroll your topic to the clicked checklist item; useful for long checklists (useless if useajax is on)
anchors="yes"
clipos
%CLI% %CHECKLISTSTART%
determines the position of the checklist item icon (default: right); if you use another value than "left" the checklist item icon will be appended to a ordered or bullet list item
clipos="left"
descr
%CLI%
a description for a checklist item used in the [[%TOPIC%ChecklistItemState]] topic; you can use it as a default option (without descr), e.g: %CLI{"my description"}%
descr=""
descrcharlimit
%CLI% %CHECKLIST% %CHECKLISTSTART%
character limit for a description (useful if no description was given and therefore it is stripped from the text before and after a checklist item)
descrcharlimit="100"
id
%CLI%
unique id of a checklist item (default: autogenerated); useful and recommended if you insert new checklist items in an existing checklist with states
id="myfirstownid"
name
%CLI% %CHECKLIST% %CHECKLISTSTART%
a naming context (default: _default) - useful and recommended if you define more than one checklist on a topic ( if you use it in %CHECKLIST% you must use it in all related %CLI% tags too)
name="mychecklist1"
notify
%CLI% %CHECKLIST% %CHECKLISTSTART%
enables/disables mail notification if a item state was changed
notify="off"
pos
%CHECKLISTSTART%
defines the reset button and legend position (default: bottom); if you use another value than "top" the button position falls back to default
pos="bottom"
reset
%CHECKLIST% %CHECKLISTSTART%
it enables a reset image button with a given text or icon (default: undefined); if you put a @<state> into the reset value, you can reset a checklist to the given <state>, e.g: reset="@done :ok: set all done"; if you put a @STATESEL into the reset value you get a state selection popup with all states
reset="Reset all @STATESEL"
showlegend
%CHECKLIST% %CHECKLISTSTART%
if you set it to "on" a states legend with icons will be displayed (default: off), e.g: ( - todo - done)
showlegend="off"
states
%CLI% %CHECKLIST% %CHECKLISTSTART%
all known states (default: todo¦done; a list separated by a '¦')
states="todo¦done"
stateicons
%CLI% %CHECKLIST% %CHECKLISTSTART%
icons for all states separated by a '¦' (default: :-I¦:ok:); if you use common variables like %Y% in stateicons you have to use the <nop> tag after the first %, e.g: %<nop>Y%
stateicons=":-I¦:ok:"
statesel
%CLI% %CHECKLIST% %CHECKLISTSTART%
enables/disables state selection popup (default: off)
statesel="on"
statetopic
%CLI% %CHECKLIST% %CHECKLISTSTART%
set the checklist item state topic (default: <YourTopicName>ChecklistItemState)
statetopic="MyItemStateTopic"
static
%CLI% %CHECKLIST% %CHECKLISTSTART%
allow/disallow state changes of checklist items (useful if you create summary pages of some items of different checklists)
static="off"
template
%CLI% %CHECKLIST% %CHECKLISTSTART%
template name (see Plugin settings / Templates )
template="patchday"
text
%CLI%
text will be attached to the item and will be clickable
text="my first step"
tooltip
%CLI% %CHECKLIST% %CHECKLISTSTART%
sets the tooltip of the state icons (substituted variables: %STATE% - current state; %NEXTSTATE% - next state; %STATEICON% - state icon; %NEXTSTATEICON% - next state icon; %STATES% - comma separated list of all states; %STATECOUNT% - number of states; %LEGEND% - a legend of all states and state icons)
tooltip="%STATE%"
tooltipbgcolor
%CLI% %CHECKLIST% %CHECKLISTSTART%
tooltip background color (statesel popup background color is also effected)
tooltipbgcolor="%WEBBGCOLOR%"
tooltipfixleft
%CLI% %CHECKLIST% %CHECKLISTSTART%
offset to fix horizontal tooltip position
tooltipfixleft="-163"
tooltipfixtop
%CLI% %CHECKLIST% %CHECKLISTSTART%
offset to fix vertical tooltip position
tooltipfixtop="0"
useajax
%CLI% %CHECKLIST% %CHECKLISTSTART%
enables/disables JavaScript/AJAX based item state changes (default: on)
Setup states and icons (defaults: todo¦done and :-I¦:ok:; remove # for setup):
# Set STATES = todo|doing|done
# Set STATEICONS = :-(|:-I|:ok:
Enables 'reset' button (default: disabled with undefined value; value is a text or icon):
# Set RESET = [Reset all]
Enables/Disables state legend (default: off)
# Set SHOWLEGEND = on
Enables/Disables link anchors (default: on)
# Set ANCHORS = off
Set unknown parameter message (default: %RED% Sorry, some parameters are unknown: %UNKNOWNPARAMSLIST% %ENDCOLOR% <br/> Allowed parameters are (see TWiki.ChecklistPlugin topic for more details): %KNOWNPARAMSLIST% )
# Set UNKNOWNPARAMSMSG = Following parameter(s) is/are unknown: %UNKNOWNPARAMSLIST%
Enables/Disables mail notification (default: off; old bevavior: on)
# Set NOTIFY = on
Enables/Disables AJAX feature (JavaScript based item state changes):
# Set USEAJAX = off
Sets the icon state tooltip:
# Set TOOLTIP = Click me to change my state '%STATE%' to '%NEXTSTATE'.
Sets offsets to fix horizontal/vertical tooltip position:
# Set TOOLTIPFIXLEFT = 0
# Set TOOLTIPFIXTOP = 0
Enables/Disables state selection popup (default: off):
# Set STATESEL = on
Templates
Templates allows you to setup all plugin attributes bounded to a template name. Only uppercase letters are allowed for a template name.
Syntax: Set TEMPLATE_template name_attribute name = attribute value
Template Usage: %CLI{template="template name"}% (the same for %CHECKLISTSTART%, %CHECKLIST%).
Examples:
Default
Set TEMPLATE_DEFAULT_STATEICONS = :-I|:-)
Set TEMPLATE_DEFAULT_STATES = todo|done
Patchday
Set TEMPLATE_PATCHDAY_STATEICONS = :no:|:yes:|:skull:|%Y%
Set TEMPLATE_PATCHDAY_STATES = notpatched|patched|reboot|done
Set TEMPLATE_PATCHDAY_CLIPOS = left
Set TEMPLATE_PATCHDAY_TOOLTIP = Click me to change my state %STATE% %STATEICON% to %NEXTSTATE% %NEXTSTATEICON%. There are %STATECOUNT% states (%STATES%). %LEGEND%
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Download the ZIP file from the Plugin web (see below)
if you upgrade this plugin it is a good idea to backup your old plugin setups, e.g.: cp data/TWiki/ChecklistPlugin.txt data/TWiki/ChecklistPluginOld.txt
Unzip ChecklistPlugin.zip in your twiki installation directory. Content:
TWiki:Main.DanielRohde: improved AJAX performance; added new feature (state selection for reset button); fixed %TOC% bug reported by TWiki:Main.HelenJohnstone; fixed some minor and major bugs (mod_perl, description stripping, static feature, 'text' icons); removed useforms feature
v1.021 (31 Jan 2007)
TWiki:Main.DanielRohde: fixed some major bugs (mod_perl, plugin preferences); improved performance (AJAX); fixed minor IE caching bug (AJAX related); added new attributes (tooltip, descr, template, statesel) requested by TWiki:Main.KeithHelfrich; fixed installation instructions bug reported by TWiki:Main.KeithHelfrich
TWiki:Main.DanielRohde: added unknown parameter handling (new attribute: unknownparamsmsg); added 'set to a given state' feature; changed reset behavior; fixed typos
v1.003 (1 Nov 2005)
TWiki:Main.DanielRohde: added attributes (showlegend, anchors); fixed states bug (illegal characters in states option); improved documentation (thanx TWiki:Main.PeterThoeny); fixed typos; fixed some minor bugs