Renders a hierarchical browser for categories during edit
Documentation
Parameters
- THEWEB: the web where to look for classes, defaults to BASEWEB
- NAME: name of the formfield to render the browser for
- VALUE: list of pre-selected categories
- TOP: node from where to start the category, defaults to 'TopCategory'
- EXCLUDE: filter to exclude categories
- BUTTONS: on or off, defaults to on
Css
Implementation
%STARTINCLUDE%<div id="clsCatSelector_%NAME%"><noautolink>
~~~ <input type="hidden" size="75" name="%NAME%" id="%NAME%" value="%IFDEFINED{"%VALUE%"}%" />
~~~ <div class="clsBrowser jqTreeview">
%~~ HIERARCHY{
~~~ web="%IFDEFINED{"%THEWEB%" then="$test" else="%BASEWEB%"}%"
~~~ top="%IFDEFINED{"%TOP%" then="$test" else="TopCategory"}%"
~~~ %IFDEFINED{"%EXCLUDE%" then="exclude=\"$test\"" glue="off"}%
~~~ header="<ul>"
~~~ footer="</ul>"
~~~ format="<li class=\"
~~~ $percntIFDEFINED{
~~~ \"$percntSUBSUMES{\"$name\" web=\"%BASEWEB%\" cat=\"%VALUE%\"}$percnt\"
~~~ as=\"1\"
~~~ then=\"open\"
~~~ else=\"closed\"
~~~ }$percnt\">
*~~ <a href=\"javascript:void(0)\"
~~~ onclick=\"this.blur(); toggleValue('%NAME%','$name', 'clsCatSelector_%NAME%');\"
~~~ id=\"$name\"
~~~ $percntIFDEFINED{\"%VALUE%\" as=\".*\b$name\b.*\" glue=\"off\"
~~~ then=\"class=\\"current\\"\"
~~~ }$percnt
~~~ title=\"$summary\">
*~~ $title</a>
~~~ $children</li>"
~~~ }%
~~~ </noautolink>
~~~ </div>
~~~ %IFDEFINEDTHEN{"%BUTTONS%" as="off"}%%ELSEDEFINED%
~~~ <div class="clsButtonBox">
~~~ <input class="twikiButton natCancelButton" type="button" value="Clear"
~~~ onclick="clsClearSelection('%NAME%', 'clsCatSelector_%NAME%')" />
~~~ <input class="twikiButton natAltButton" type="button" value="Reset"
~~~ onclick="clsSetSelection('%NAME%', 'clsCatSelector_%NAME%', '%IFDEFINED{"%VALUE%"}%')" />
~~~ </div>
~~~ %FIDEFINED%
~~~ </div>
~~~ %STOPINCLUDE%
Test
Calls to 'RenderEditCategoryBrowser'
Copyright
© 2007 Michael Daum
http://wikiring.de
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read the
LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.