You are here:
Foswiki
>
Applications/ClassificationApp Web
>
TopicType
>
TopicFunction
>
RenderSideBar
E
dit
A
ttach
Tags:
create new tag
,
view all tags
%TOC{depth="2"}% ---++ Documentation %STARTSECTION{name="documentation" type="section"}% This function displays part of the hierarchy a topic is situated in. It tries to provide a sense of "location" for the topic based on the way it is classified. TODO: what do we display for topics that are not categorized? %ENDSECTION{name="documentation" type="section"}% ---++ Implementation <verbatim class="tml"> %STARTINCLUDE%<div class="clsSideBar clsBrowser" id="clsSideBarCategoryBrowser" style="display:none"> %HIERARCHY{ web="%BASEWEB%" open="$percntIF{ \"$percntDISTANCE{ from=\"$name\" to=\"%URLPARAM{"catname" default="%BASETOPIC%"}%\" undef=\"-1\" }$percnt >= 0\" then=\"$name\" }$percnt, %TOP{default="TopCategory"}%" placeholder="<li><span class='placeholder'> </span></li>" top="%TOP{default="TopCategory"}%" exclude="%TOP{default="TopCategory"}%" header="<ul>" footer="</ul>" format="<li id=\"$name\" class=\"$percntIF{\"'$subcats'!='0'\" then=\"hasChildren\"}$percnt\"> <a style='background-image:url($icon);' class='clsCategoryLink $percntIF{ \"( $percntISA{ \"%BASETOPIC%\" cat=\"$name\" }$percnt = 1 and $percntDISTANCE{ from=\"$name\" to=\"%BASETOPIC%\" undef=\"-1\" }$percnt = 1 ) or $percntDISTANCE{ from=\"$name\" to=\"%URLPARAM{"catname" default="%BASETOPIC%"}%\" undef=\"-1\" }$percnt = 0 \" then=\"current\" }$percnt' href=\"$url\" title=\"$percntENCODE{$summary}$percnt\"><noautolink>$title</noautolink> </a>$children</li>" }%</div>%JQREQUIRE{"treeview"}% <literal> <script> jQuery(function ($) { $("#clsSideBarCategoryBrowser > ul").each(function() { var $this = $(this); $this.find("li ul").parent().addClass("open collapsable"); $this.find(".placeholder").parent().parent().parent().removeClass("open collapsable"); $this.find(".hasChildren.open").removeClass("hasChildren"); $this.treeview({ url: "%SCRIPTURL{"rest"}%/RenderPlugin/tag?name=DBCALL;param=Applications.ClassificationApp.RenderHierarchyAsJSON;t=%GMTIME{"$epoch"}%;depth=2;format=sidebar;topic=%BASEWEB%.%BASETOPIC%", animated: 'fast' }).parent().show(); $this.find(".open").removeClass("expandable"). find(".open-hitarea.expandable-hitarea").removeClass("expandable-hitarea").addClass("collapsable-hitarea"); }); }); </script> </literal>%STOPINCLUDE% </verbatim> ---++ Test %DBCALL{"%TOPIC%"}% %DBCALL{"Applications.RenderFunctionCallers"}% ---++ Copyright © 2008-2013 Michael Daum http://michaeldaumconsulting.com %DBCALL{"Applications.GnuGeneralPublicLicense" section="notice"}%
ApplicationTopic
edit
TopicType
DocuTopic
,
TopicFunction
TopicTitle
Summary
Render tools to handle categories
WikiApplication
ClassificationApp
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 07 Jan 2013,
ProjectContributor
Applications/ClassificationApp
Warning: Can't find topic Applications/ClassificationApp.WebLeftBarExample
Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.