off
CLASSIFICATIONPLUGIN_NRCOLS which itself defaults to 3
%STARTINCLUDE%<noautolink><div class='clsMakeIndexWrapper'>
%IF{"'%SHOWFILTER{default="off"}%'='on'"
then="$percntDBCALL{\"%WEB%.%TOPIC%\" section=\"filter\"}$percnt"
}%<!-- -->
%MAKEINDEX{
"%HIERARCHY{
web="%BASEWEB%"
top="%CAT{default="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%"
exclude="%CAT{default="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%%IF{"defined EXCLUDE" then="|%EXCLUDE%"}%"
depth="2"
sort="on"
format="($title);$topic;$origweb$n"
}%"
cols="%COLS{default="%CLASSIFICATIONPLUGIN_NRCOLS{default="3"}%"}%"
split="\n"
pattern="\((.*)\);(.*);(.*)"
sort="off"
%IF{"'%SHOWGROUPS{default="off"}%'!='on'" then="group=\"\""}%
format="$percntDBCALL{
\"$percntIF{\"istopic '%BASEWEB%.$2'\"
then=\"%BASEWEB%.$2->RenderCategoryItem\"
else=\"Applications.ClassificationApp.CategoryRenderCategoryItem\"
}$percnt\"
TITLE=\"$1\"
OBJECT=\"$2\"
}$percnt"
}%<!-- -->
%IF{"'%SHOWTOPICS{default="%IF{"'%CAT{default="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%'='TopCategory'" then="off" else="on"}%"}%'='on'"
then="$percntDBCALL{\"%WEB%.%TOPIC%\"
section=\"topicindex\"
TAG=\"%TAG%\"
KEYWORDS=\"%KEYWORDS%\"
}$percnt"
}%<!-- -->
</div></noautolink>
<!-- -->%STOPINCLUDE%
%STARTSECTION{"topicindex"}%
%MAKEINDEX{
"%DBQUERY{
"!(TopicType=~'\bCategory\b') AND
('%IF{"defined CAT" then="%CAT%" else="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%' DISTANCE topic) = 1
%FORMATLIST{"%URLPARAM{"tag" default="%IF{"defined TAG" then="%TAG%"}%"}%"
header="AND"
format=" Tag=~'\b$1\b' "
separator="AND"
}%
%FORMATLIST{"%URLPARAM{"search" default="%KEYWORDS{default=""}%"}%"
header="AND"
format=" uc(all) =~ uc('$1') "
separator="AND"
}%
"
web="%THEWEB{default="%BASEWEB%"}%"
hidenull="on"
format="($expand(TopicTitle or topic));$topic;$web"
separator="$n"
}%"
cols="%COLS{default="%CLASSIFICATIONPLUGIN_NRCOLS{default=""}%"}%"
split="\n"
pattern="\((.*)\);(.*);(.*)"
sort="nocase"
%IF{"'%SHOWGROUPS{default="off"}%'!='on'" then="group=\"\""}%
%IF{"'%SHOWHEADER%'='on'" then="header=\"$anchors\""}%
format="$percntDBCALL{\"$3.$2->RenderIndexItem\"}$percnt"
}%%ENDSECTION{"topicindex"}%%
%STARTSECTION{"toolbar"}%<!-- -->
<div class="toolbar">
%BUTTON{"New Topic" href="%SCRIPTURLPATH{view}%/%BASEWEB%/ClassifiedTopic?cat=%URLPARAM{"catname" default="%BASETOPIC%"}%%IF{
"defined TEMPLATE"
then=";tmpl=%TEMPLATE%"
else="$percntIF{\"istopic '%BASEWEB%.%URLPARAM{"catname" default="%BASETOPIC%"}%Template'\"
then=\";tmpl=%BASEWEB%.%URLPARAM{"catname" default="%BASETOPIC%"}%Template\"
else=\"\"
}$percnt"
}%"
title="Create a new topic in %CATINFO{cat="%BASEWEB%.%URLPARAM{"catname" default="%BASETOPIC%"}%" format="<nop>$title"}%"
}%
%IF{"'%USERSWEB%.AdminGroup' allows 'change'"
then="%BUTTON{"Manage" href="%SCRIPTURLPATH{view}%/%BASEWEB%/Category" title="Manage categories"}%
%BUTTON{"Browse" href="%SCRIPTURLPATH{view}%/%BASEWEB%/CategoryBrowser" title="Browse the hierarchy"}%"
}%
</div>
%CLEAR%%ENDSECTION{"toolbar"}%
%STARTSECTION{"filter"}%<p> *%TRANSLATE{"Filter"}%:* <input type="search" incremental="true" size="50" class="clsFilter foswikiInputField" /></p>
%ADDTOZONE{"script"
id="%TOPIC%"
requires="JQUERYPLUGIN"
text="<script src='%PUBURLPATH%/Applications/ClassificationApp/RenderCategory/filter.js'></script>"
}%%ENDSECTION{"filter"}%
%STARTATTACH{"filter.js" hidecontent="on"}%
"use strict";
(function($) {
$(".clsMakeIndexWrapper").livequery(function() {
var $container = $(this),
$input = $container.find(".clsFilter"),
timer;
function updateCategoryIndex(val) {
$container.find(".fltMakeIndexItem").each(function() {
var $this = $(this),
text = $this.text(),
regex = new RegExp(val, "i");
if (regex.test(text)) {
$this.fadeOut();
} else {
if (!$this.is(":visible")) {
$this.fadeIn();
}
}
});
}
$input.on("search", function(ev) {
var $this = $(this),
val = $this.val();
if (typeof(timer) == 'undefined') {
window.clearTimeout(timer);
}
timer = window.setTimeout(function() {
updateCategoryIndex(val);
timer = undefined;
}, 250);
});
});
})(jQuery);
%ENDATTACH%
Filter:
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.