Changeset 1182


Ignore:
Timestamp:
12/05/08 11:02:26 (3 years ago)
Author:
MichaelDaum
Message:

Item4912:Item6023: massive rewrite

  • added workaround for Item6023 (moving a topic destroys its twikiform)
  • categories can be importend from another web now (virtual categories)
  • added support for custon breadcrumbs for virtual categories
  • categories and tag coulds can be filtered using tags and categories respectively
  • fixed caching problems when using persistent perl
  • improved jquery.tagselector using jquery.autocomplete
  • using RenderPlugin as a REST backend for the category browser
  • reverting partial de-twikification breaking stuff all over the place, i.e. ACLs
  • fixes to make this plugin compatible to Foswiki
  • improved form usability
  • using jquery.chilli to syntax hilight TML
  • added custon natskin editors to allow dedicated compatibility with patternskin versions
  • added ajax category browser for sidebar navigation
  • added example intranet taxonomy
  • replacing html input buttons with %BUTTON{}% tag of JQueryPlugin
Location:
trunk/ClassificationPlugin
Files:
5 added
63 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategorizedTopic.txt

    r1178 r1182  
    1 %META:TOPICINFO{author="ProjectContributor" date="1202207995" format="1.1" version="$Rev$"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1228410891" format="1.1" reprev="1.2" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicType"}% 
    33---+!! %TOPIC% 
     
    2020---++ Create a new topic %IFDEFINED{"%CAT%" then="in <nop>%CAT%'" glue="off"}% 
    2121%STARTSECTION{"factory"}% 
    22 <div class="twikiPageForm"> 
     22%TWISTY{link="%BUTTON{"%IF{"defined 'LABEL'" then="%LABEL%" else="Create topic"}%" icon="add"}%%CLEAR%"}% 
     23 
     24<div class="twikiFormSteps"> 
    2325<form action="%SCRIPTURLPATH{"edit"}%/%BASEWEB%/" method="post"> 
    2426<input type="hidden" name="topicparent" value="%BASEWEB%.%BASETOPIC%" /> 
     
    3032<input type="hidden" name="Summary" value="" /> 
    3133<input type="hidden" name="Category" value="%IFDEFINED{"%CAT%" then="%CAT%" else="TopCategory"}%" /> 
    32 <table> 
    33 <tr> 
    34   <th class="foswikiFirstCol">Name:</th> 
    35   <td><input class="twikiInputField" type="text" name="topic" size="40" /></td> 
    36 </tr> 
    37 <tr> 
    38   <th class="foswikiFirstCol">&nbsp;</th> 
    39   <td style="padding-top:1em"> 
    40     <input type="submit" class="twikiSubmit natOkButton" value="Submit" /> 
    41     <input type="reset" class="foswikiButton natCancelButton" value="Reset" /> 
    42   </td> 
    43 </tr> 
    44 </table> 
     34<div class="twikiFormStep"> 
     35  <h3>Name:</h3> 
     36  <input class="twikiInputField" type="text" name="topic" size="40" /> 
     37</div> 
     38<div class="twikiFormStep twikiFormButtons twikiFormLast"> 
     39    %BUTTON{"%MAKETEXT{"Submit"}%" type="submit" icon="tick"}% 
     40    %CLEAR% 
     41</div> 
    4542</form> 
    46 </div>%ENDSECTION{"factory"}% 
     43</div> 
     44%ENDTWISTY% 
     45%ENDSECTION{"factory"}% 
    4746%STOPINCLUDE% 
    4847 
     
    5756 
    5857%META:FORM{name="Applications.TopicType"}% 
    59 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
     58%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
    6059%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    6160%META:FIELD{name="Inheritance" attributes="" title="Inheritance" value="ApplicationTopic"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategorizedTopicRenderIndexItem.txt

    r482 r1182  
    1717 
    1818---++ Implementation 
    19 <verbatim> 
    20 %STARTINCLUDE%<!-- ClassifiedTopicRenderIndexItem --> 
     19<verbatim class="tml"> 
     20%STARTINCLUDE%<!-- CategorizedTopicRenderIndexItem --> 
    2121%~~ DBQUERY{topic="%OBJECT%" 
    22 ~~~   format="<div class='clsIndexItem clsTopicItem clsCategorizedTopicItem'>[[$web.$topic][$expand(TopicTitle or topic)]] 
    23 *~~     &nbsp;$percntREDDOT{$web.$topic}$percnt 
     22~~~   format="<div class='clsIndexItem clsTopicItem clsCategorizedTopicItem'>[[$web.$topic][$expand(topictitle)]]  
     23~~~     $percntREDDOT{\"$web.$topic\"}$percnt 
    2424~~~     <div class='clsTopicInfo'>$expand(Summary and ', ') 
    25 ~~~      <span class='clsAuthorDateInfo'>last modified $formatTime(info.date) 
    26 ~~~        by $percntSPACEOUT{$expand(info.author)}$percnt</div> 
    27 ~~~     </span></div> 
     25~~~      <span class='clsAuthorDateInfo'> 
     26~~~        by $percntGETTOPICTITLE{\" 
     27~~~             $percntUSERINFO{\"$expand(info.author)\" 
     28~~~               format=\"$wikiusername\" 
     29~~~             }$percnt\" 
     30~~~           }$percnt, 
     31~~~           $formatTime(info.date) 
     32~~~     </span></div></div> 
    2833~~~   " 
    2934~~~ }% 
    30 <!-- //ClassifiedTopicRenderIndexItem -->%STOPINCLUDE% 
     35<!-- //CategorizedTopicRenderIndexItem -->%STOPINCLUDE% 
    3136</verbatim> 
    3237 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategorizedTopicViewTemplate.txt

    r1178 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"textcontent"}%<div class="foswikiTopic"> 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 %TEXT% 
    7 </div>%TMPL:END% %{ 
    8 %RED%Note, this is only a view template.%ENDCOLOR% 
    9  
    10 See also: TopicView 
    11 }% 
     4%TMPL:DEF{"beforetext"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" />%TMPL:END%  
    125%TMPL:DEF{"form"}%%TMPL:END% 
    136 
    147%META:FORM{name="Applications.ApplicationTopic"}% 
    158%META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
     9%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="CategorizedTopicViewTemplate"}% 
    1610%META:FIELD{name="Summary" attributes="" title="Summary" value="Display a categorized topic"}% 
    1711%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/Category.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1214469138" format="1.1" reprev="1.6" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicType"}% 
    3 ---+!! [[%WEB%.%TOPIC%][%TOPICTITLE%]] 
     3---+!! [[%BASEWEB%.%BASETOPIC%][%TOPICTITLE%]] 
    44%FORMFIELD{"Summary"}% 
    55 
     
    1616Categories themselves are CategorizedTopics thus implementing a hierarchy. 
    1717 
    18 See also: See CategorizedTopic, ClassifiedTopic, TaggedTopic, CategoryTemplate 
     18See also: See CategorizedTopic, ClassifiedTopic, TaggedTopic, CategoryTemplate, CategoryViewTemplate, CategoryEditTemplate 
    1919%ENDSECTION{name="documentation" type="section"}% 
    2020 
     
    2727 
    2828%STARTINCLUDE%<!-- category --> 
    29 %IFDEFINEDTHEN{"%URLPARAM{"name"}%" glue="off"}% 
     29%IFDEFINEDTHEN{"%URLPARAM{"catname"}%" glue="off"}% 
    3030~~~ <div class="clsTopicInfo"> 
    3131~~~ <noautolink> 
    3232%~~ CATINFO$nop{ 
    33 ~~~   cat="%URLPARAM{"name"}%" 
     33~~~   cat="%URLPARAM{"catname"}%" 
    3434~~~   format="<h1>$link  
    3535~~~     $percntIFDEFINED{\"$summary\" 
     
    4343~~~ </div> 
    4444<hr class="clsTopicInfoSep" /> 
    45 %$nopDBCALL{"Applications.ClassificationApp.RenderCategory" CAT="%URLPARAM{"name"}%"}% 
    46 %ELSEDEFINED% 
    47 ---+!! %TOPIC% 
    48 %FORMFIELD{"Summary"}% 
     45%$nopDBCALL{"Applications.ClassificationApp.RenderCategory" CAT="%URLPARAM{"catname"}%"}% 
     46%ELSEDEFINED%<!-- else category --> 
     47%$nopDBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    4948%$nopDBCALL{"Applications.ClassificationApp.RenderCategoryFactory"}% 
    5049%FIDEFINED% 
    51 <!-- category -->%STOPINCLUDE% 
     50<!-- //category -->%STOPINCLUDE% 
    5251 
    5352---++ %TOPIC% form 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategoryEditTemplate.txt

    r482 r1182  
    55%TMPL:DEF{"contenttitle"}%<!-- contenttitle --> 
    66%IFDEFINEDTHEN{"%IFEXISTS{"%WEB%.%TOPIC%"}%" as="1"}% 
    7 <h1>[[%WEB%.%TOPIC%][%WEBLINK{format="$web"}%.%TOPIC%]] (%MAKETEXT{"edit category"}%)</h1> 
     7<h1 class="patternTemplateTitle">%TOPIC% (%MAKETEXT{"edit category"}%)</h1> 
    88%ELSEDEFINED% 
    9 <h1><nop>%WEBLINK{format="$web"}%.%TOPIC% (%MAKETEXT{"new classified topic"}%)</h1> 
     9<h1 class="patternTemplateTitle"><nop>%TOPIC% (%MAKETEXT{"new classified topic"}%)</h1> 
    1010%FIDEFINED% 
    1111<!-- //contenttitle -->%TMPL:END% 
    12 %TMPL:DEF{"topicinfo"}%<!-- topicinfo --> 
     12%TMPL:DEF{"topicmeta"}%<!-- topicmeta --> 
    1313<literal> 
    1414<div class="natEditTopicInfo"> 
     
    2525</div> 
    2626</literal> 
    27 <!-- //topicinfo -->%TMPL:END% 
     27<!-- //topicmeta -->%TMPL:END% 
    2828%TMPL:DEF{"formfields"}%<!-- formfields --> 
    2929%TAB{"Categories" after="fixHeightOfPane()"}% 
     
    5252    %DBCALL{"Applications.ClassificationApp.RenderIconSelector" 
    5353      VALUE="%URLPARAM{"Icon" default="%FORMFIELD{topic="%BASEWEB%.%BASETOPIC%" "Icon"}%"}%" 
     54      SOURCE="%CLASSIFICATIONPLUGIN_ICONSET%" 
    5455    }% 
    5556  </td> 
     
    5960 
    6061%META:FORM{name="Applications.ApplicationTopic"}% 
    61 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
    62 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
     62%META:FIELD{name="TopicType" title="TopicType" value="TopicView"}% 
     63%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="CategoryEditTemplate"}% 
    6364%META:FIELD{name="Summary" attributes="" title="Summary" value="Editor for category topics, <nop>NatSkin version"}% 
    6465%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategoryRenderIndexItem.txt

    r482 r1182  
    1717 
    1818---++ Implementation 
    19 <verbatim> 
     19<verbatim class="tml"> 
    2020%STARTINCLUDE%<!-- CategoryRenderIndexItem --> 
    2121%~~ CATINFO{cat="%DBQUERY{topic="%OBJECT%" format="$topic"}%" 
     
    2727~~~       $link 
    2828~~~       $percntIFDEFINED{\"$leafs\" as=\"0\" then=\"\" else=\"&nbsp;($leafs)\"}$percnt 
    29 *~~       &nbsp;$percntREDDOT{$web.$topic}$percnt 
    3029~~~       <div class='clsTopicInfo'>$summary</div> 
    31 ~~~       <div class='clsSubCategories'>$children&nbsp;$more</div> 
     30~~~       <div class='clsSubCategories'>$children $more</div> 
    3231*~~     </div> 
    3332~~~  " 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/CategoryViewTemplate.txt

    r1178 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"textcontent"}%<div class="foswikiTopic"> 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 <hr class="clsTopicInfoSep" /> 
    7 %TEXT%  
    8 </div>%TMPL:END% 
     4%TMPL:DEF{"beforetext"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" />%TMPL:END% 
    95%TMPL:DEF{"form"}%%TMPL:END% 
    10 %TMPL:DEF{"attachments"}%%TMPL:END% 
    116 
    127%META:FORM{name="Applications.ApplicationTopic"}% 
    138%META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
     9%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="CategoryViewTemplate"}% 
    1410%META:FIELD{name="Summary" attributes="" title="Summary" value="View for Categories"}% 
    1511%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/ClassifiedTopic.txt

    r1178 r1182  
    1 %META:TOPICINFO{author="ProjectContributor" date="1207038788" format="1.1" version="$Rev$"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1228410698" format="1.1" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicType"}% 
    33---+!! %TOPIC% 
     
    2020<h2>Create a new topic %IFDEFINED{"%URLPARAM{"cat" default="%CAT%"}%" then=" in '[[%BASEWEB%.$test]]'" glue="off"}%</h2> 
    2121%STARTSECTION{"factory"}%<!-- factory --> 
    22 <style type="text/css"> 
    23 .twikiPageForm .foswikiFirstCol { 
    24   width:8em; 
    25 } 
    26 .twikiPageForm .twikiInputField, 
    27 .twikiPageForm .twikiSelectField { 
    28   width:25em; 
    29 } 
    30 </style> 
    31 <div class="twikiPageForm"> 
     22%TWISTY{link="%BUTTON{"%IF{"defined 'LABEL'" then="%LABEL%" else="Create topic"}%" icon="add"}%%CLEAR%"}% 
     23 
    3224<form action="%SCRIPTURLPATH{"edit"}%/%BASEWEB%/" method="post"> 
    3325<input type="hidden" name="topicparent" value="%BASEWEB%.%HOMETOPIC%" /> 
     
    3931<input type="hidden" name="Summary" value="" /> 
    4032<input type="hidden" name="Tag" value="" /> 
    41 <table> 
    42 <tr> 
    43   <th class="foswikiFirstCol">%IFDEFINED{"%LABEL%" then="$test" else="Name"}%:</th> 
    44   <td><input class="twikiInputField" type="text" name="topic" size="40" /> 
    45   &nbsp;%TOGGLE{target=".toggleMe" text="Advanced Options"}% 
    46   </td> 
    47 </tr> 
    48 <tr class="toggleMe" style="display:none"> 
    49   <th class="foswikiFirstCol"> 
    50     <div>Category:</div> 
    51   </th> 
    52   <td> 
    53     <div> 
    54       <select class="twikiSelectField" name="Category"> 
    55         <option value='' %IFDEFINED{"%URLPARAM{"cat" default="%CAT%"}%" as="" then=" selected"}%>ALL</option> 
     33<div class="twikiFormSteps"> 
     34  <div class="twikiFormStep"> 
     35    <h3>Name:</h3> 
     36    <input class="twikiInputField" type="text" name="topic" size="40" /> 
     37    %TWISTYBUTTON{showlink="Show advanced options" hidelink="Hide advanced options" id="advancedopts"}% 
     38  </div> 
     39  %TWISTYTOGGLE{id="advancedopts"}% 
     40  <div class="twikiFormStep"> 
     41    <h3>Category:</h3> 
     42    <select class="twikiSelectField" name="Category"> 
     43      <option value='' %IFDEFINED{"%URLPARAM{"cat" default="%CAT%"}%" as="" then=" selected"}%>ALL</option> 
    5644%~~     HIERARCHY{ 
    5745~~~       web="%BASEWEB%" 
     
    6452~~~         }$percnt>$indent $title</option>$n$children" 
    6553~~~     }% 
    66       </select>  
    67     </div> 
    68   </td> 
    69 </tr> 
    70 <tr class="toggleMe" style="display:none"> 
    71   <th class="foswikiFirstCol"> 
    72     <div>Template:</div> 
    73   </th> 
    74   <td><div> 
     54    </select>  
     55  </div> 
     56  <div class="twikiFormStep"> 
     57    <h3>Template:</h3> 
    7558    <select class="twikiSelectField" name="templatetopic"> 
    7659      <option value="Applications.ClassificationApp.ClassifiedTopicTemplate">DEFAULT</option> 
     
    8568~~~   }% 
    8669    </select> 
    87     </div> 
    88   </td> 
    89 </tr> 
    90 <tr> 
    91   <th class="foswikiFirstCol">&nbsp;</th> 
    92   <td> 
    93     <input type="submit" class="twikiSubmit natOkButton" value="Submit" /> 
    94     <input type="reset" class="foswikiButton natAltButton" value="Reset" /> 
    95     <input type="button" class="foswikiButton natCancelButton" value="Cancel" onclick="window.location.href='%SCRIPTURLPATH{"view"}%/%BASEWEB%/%HOMETOPIC%';" /> 
    96   </td> 
    97 </tr> 
    98 </table> 
     70  </div> 
     71  %ENDTWISTYTOGGLE% 
     72  <div class="twikiFormStep twikiFormButtons twikiFormLast"> 
     73    %BUTTON{"%MAKETEXT{"Submit"}%" type="submit" icon="tick"}% 
     74    %CLEAR% 
     75  </div> 
     76</div> 
    9977</form>  
    100 </div> 
     78%ENDTWISTY% 
    10179<!-- //factory -->%ENDSECTION{"factory"}% 
    10280<!-- //classified topic -->%STOPINCLUDE% 
     
    11290 
    11391%META:FORM{name="Applications.TopicType"}% 
    114 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
     92%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
    11593%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    11694%META:FIELD{name="Inheritance" attributes="" title="Inheritance" value="CategorizedTopic, TaggedTopic"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/ClassifiedTopicEditTemplate.txt

    r1090 r1182  
    55%TMPL:DEF{"contenttitle"}%<!-- contenttitle --> 
    66%IFDEFINEDTHEN{"%IFEXISTS{"%WEB%.%TOPIC%"}%" as="1"}% 
    7 <h1>[[%WEB%.%TOPIC%][%WEBLINK{format="$web"}%.%TOPIC%]] (%MAKETEXT{"edit classified topic"}%)</h1> 
     7<h1 class="patternTemplateTitle">%TOPIC% (%MAKETEXT{"edit classified topic"}%)</h1> 
    88%ELSEDEFINED% 
    9 <h1><nop>%WEBLINK{format="$web"}%.%TOPIC% (%MAKETEXT{"new classified topic"}%)</h1> 
     9<h1 class="patternTemplateTitle"><nop>%TOPIC% (%MAKETEXT{"new classified topic"}%)</h1> 
    1010%FIDEFINED% 
    1111<!-- //contenttitle -->%TMPL:END% 
    12 %TMPL:DEF{"topicinfo"}%<!-- topicinfo --> 
     12%TMPL:DEF{"topicmeta"}%<!-- topicmeta --> 
    1313<literal> 
    14   <table cellspacing="0" cellpadding="0" class="twikiTable"> 
     14  <table> 
    1515  <tr> 
    16     <th class="foswikiFirstCol">Title:</th> 
     16    <th class="twikiFirstCol">Title:</th> 
    1717    <td><input class="twikiInputField" type="text" name="TopicTitle" size="80" value="%URLPARAM{"TopicTitle" default="%TOPICTITLE%"}%"/></td> 
    1818  </tr> 
    1919  <tr> 
    20     <th class="foswikiFirstCol">Summary:</th> 
     20    <th class="twikiFirstCol">Summary:</th> 
    2121    <td><input class="twikiInputField" type="text" name="Summary" size="80" value="%URLPARAM{"Summary" default="%FORMFIELD{topic="%BASEWEB%.%BASETOPIC%" "Summary"}%"}%" /></td> 
    2222  </tr> 
    2323  </table> 
    24   <hr /> 
    2524</literal> 
    26 <!-- //topicinfo -->%TMPL:END% 
     25<!-- //topicmeta -->%TMPL:END% 
    2726%TMPL:DEF{"formfields"}%<!-- formfields --> 
    2827%TAB{"Categories" after="fixHeightOfPane()"}% 
     
    4342 
    4443%META:FORM{name="Applications.ApplicationTopic"}% 
    45 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
    46 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
     44%META:FIELD{name="TopicType" title="TopicType" value="TopicView"}% 
     45%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="ClassifiedTopicEditTemplate"}% 
    4746%META:FIELD{name="Summary" attributes="" title="Summary" value="Editor for classified topics, <nop>NatSkin version"}% 
    4847%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/ClassifiedTopicRenderIndexItem.txt

    r482 r1182  
    1 %META:TOPICINFO{author="ProjectContributor" date="1206371854" format="1.1" reprev="1.1" version="$Rev$"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1227786459" format="1.1" reprev="1.2" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicFunction"}% 
    33---+!! Function: %TOPIC% 
     
    1717 
    1818---++ Implementation 
    19 <verbatim> 
     19<verbatim class="tml"> 
    2020%STARTINCLUDE%<!-- ClassifiedTopicRenderIndexItem --> 
    2121%~~ DBQUERY{topic="%OBJECT%" 
    22 ~~~   format="<div class='clsIndexItem clsTopicItem clsCassifiedTopicItem'>[[$web.$topic][$expand(TopicTitle or topic)]] 
    23 *~~     &nbsp;$percntREDDOT{$web.$topic}$percnt 
     22~~~   format="<div class='clsIndexItem clsTopicItem clsCassifiedTopicItem'>[[$web.$topic][$expand(topictitle)]] 
     23~~~     $percntREDDOT{\"$web.$topic\"}$percnt 
    2424~~~     <div class='clsTopicInfo'>$expand(Summary and ', ') 
    25 ~~~      <span class='clsAuthorDateInfo'>last modified $formatTime(info.date) 
    26 ~~~        by $percntSPACEOUT{$expand(info.author)}$percnt</div> 
    27 ~~~     </span></div> 
     25~~~      <span class='clsAuthorDateInfo'> 
     26~~~        by $percntGETTOPICTITLE{\" 
     27~~~             $percntUSERINFO{\"$expand(info.author)\" 
     28~~~               format=\"$wikiusername\" 
     29~~~             }$percnt\" 
     30~~~           }$percnt, 
     31~~~           $formatTime(info.date) 
     32~~~     </span></div></div> 
    2833~~~   " 
    2934~~~ }% 
     
    5055 
    5156%META:FORM{name="Applications.ApplicationTopic"}% 
    52 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicFunction"}% 
     57%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicFunction"}% 
    5358%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    5459%META:FIELD{name="Summary" attributes="" title="Summary" value="Render a summary for a ClassifiedTopic in a category index"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/ClassifiedTopicViewTemplate.txt

    r1178 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"textcontent"}%<div class="foswikiTopic"> 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 <hr class="clsTopicInfoSep" /> 
    7 %TEXT% 
    8 </div>%TMPL:END% %{ 
    9 %RED%Note, this is only a view template.%ENDCOLOR% 
    10  
    11 See also: TopicView 
    12 }% 
     4%TMPL:DEF{"beforetext"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" />%TMPL:END% 
    135%TMPL:DEF{"form"}%%TMPL:END% 
    146 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/IconSet.txt

    r482 r1182  
    66 
    77%META:FORM{name="Applications.ApplicationTopic"}% 
    8 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="ApplicationTopic"}% 
     8%META:FIELD{name="TopicType" title="TopicType" value="ApplicationTopic"}% 
    99%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="IconSet"}% 
    1010%META:FIELD{name="Summary" attributes="" title="Summary" value=""}% 
     
    133133%META:FILEATTACHMENT{name="ipod_cast.png" attachment="ipod_cast.png" attr="h" comment="" date="1214251645" path="ipod_cast.png" size="711" stream="ipod_cast.png" tmpFilename="/var/tmp/CGItemp54156" user="ProjectContributor" version="1"}% 
    134134%META:FILEATTACHMENT{name="presentation.png" attachment="presentation.png" attr="h" comment="" date="1214252360" path="presentation.png" size="715" stream="presentation.png" tmpFilename="/var/tmp/CGItemp53974" user="ProjectContributor" version="1"}% 
     135%META:FILEATTACHMENT{name="pencil.png" attachment="pencil.png" attr="h" comment="" date="1221736546" path="pencil.png" size="450" stream="IO::File=GLOB(0xab3c9bc)" tmpFilename="" user="ProjectContributor" version="1"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinCategorizedTopicViewTemplate.txt

    r482 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"content"}% 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 <hr class="clsTopicInfoSep" /> 
     4%TMPL:DEF{"content"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" /> 
    75%TEXT% 
    86%TMPL:END% %{ 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinCategoryEditTemplate.txt

    r482 r1182  
    1010%FIDEFINED% 
    1111<!-- //contenttitle -->%TMPL:END% 
    12 %TMPL:DEF{"topicinfo"}%<!-- topicinfo --> 
     12%TMPL:DEF{"topicmeta"}%<!-- topicmeta --> 
    1313<literal> 
    1414<div class="natEditTopicInfo"> 
     
    2525</div> 
    2626</literal> 
    27 <!-- //topicinfo -->%TMPL:END% 
     27<!-- //topicmeta -->%TMPL:END% 
    2828%TMPL:DEF{"formfields"}%<!-- formfields --> 
    2929%TAB{"Categories" after="fixHeightOfPane()"}% 
     30<literal> 
    3031<div class="natTopicEditForm"> 
    3132  %DBCALL{"Applications.ClassificationApp.RenderEditCategoryBrowser" 
     
    3435  }% 
    3536</div> 
     37</literal> 
    3638%ENDTAB% 
    3739<!-- //formfields -->%TMPL:END% 
    3840%TMPL:DEF{"settings"}%<!-- settings --> 
    3941<div class="natSubmitOptions"> 
     42<literal> 
    4043<table> 
    4144<tr> 
     
    5255    %DBCALL{"Applications.ClassificationApp.RenderIconSelector" 
    5356      VALUE="%URLPARAM{"Icon" default="%FORMFIELD{topic="%BASEWEB%.%BASETOPIC%" "Icon"}%"}%" 
     57      SOURCE="%CLASSIFICATIONPLUGIN_ICONSET%" 
    5458    }% 
    5559  </td> 
    5660</tr> 
    5761</table> 
     62</literal> 
    5863</div>%TMPL:END% 
    5964 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinCategoryViewTemplate.txt

    r482 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"content"}% 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 <hr class="clsTopicInfoSep" /> 
     4%TMPL:DEF{"content"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" /> 
    75%TEXT%  
    86%TMPL:END% 
     
    108%META:FORM{name="Applications.ApplicationTopic"}% 
    119%META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
     10%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="NatSkinCategoryViewTemplate"}% 
    1211%META:FIELD{name="Summary" attributes="" title="Summary" value="View for Categories, <nop>NatSkin version"}% 
    1312%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinClassifiedTopicEditTemplate.txt

    r482 r1182  
    1010%FIDEFINED% 
    1111<!-- //contenttitle -->%TMPL:END% 
    12 %TMPL:DEF{"topicinfo"}%<!-- topicinfo --> 
     12%TMPL:DEF{"topicmeta"}%<!-- topicmeta --> 
    1313<literal> 
    1414<div class="natEditTopicInfo"> 
     
    2525</div> 
    2626</literal> 
    27 <!-- //topicinfo -->%TMPL:END% 
     27<!-- //topicmeta -->%TMPL:END% 
    2828%TMPL:DEF{"formfields"}%<!-- formfields --> 
    2929%TAB{"Categories" after="fixHeightOfPane()"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinClassifiedTopicViewTemplate.txt

    r482 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"content"}% 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 <hr class="clsTopicInfoSep" /> 
     4%TMPL:DEF{"content"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" /> 
    75%TEXT% 
    86%TMPL:END% %{ 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/NatSkinSearchViewTemplate.txt

    r482 r1182  
    2626 
    2727%META:FORM{name="Applications.ApplicationTopic"}% 
    28 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicView"}% 
    29 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
     28%META:FIELD{name="TopicType" title="TopicType" value="TopicView"}% 
     29%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="NatSkinSearchViewTemplate"}% 
    3030%META:FIELD{name="Summary" attributes="" title="Summary" value="View for natsearch"}% 
    31 %META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="BusinessWarehouseApp"}% 
     31%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/OrgChart.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1214237774" format="1.1" reprev="1.3" version="$Rev$"}% 
    22%META:TOPICPARENT{name="BusinessStructure"}% 
     3 
     4   * from <nop>IntranetDirectory to <nop>IntranetDirectory =  
     5     %DISTANCE{from="IntranetDirectory" to="IntranetDirectory"}% ... 
     6     should be 0 
     7 
     8   * from <nop>IntranetDirectory to <nop>BusinessStructure =  
     9     %DISTANCE{from="IntranetDirectory" to="BusinessStructure"}% ... 
     10     should be 2 
     11 
     12   * from <nop>BusinessStructure to <nop>IntranetDirectory =  
     13     %DISTANCE{from="BusinessStructure" to="IntranetDirectory"}% ... 
     14     should be -2 
     15 
     16   * from <nop>IntranetDirectory to <nop>%TOPIC% =  
     17     %DISTANCE{from="IntranetDirectory" to="%TOPIC%"}% ... 
     18     should be 3 
     19 
     20   * from <nop>%TOPIC% to <nop>IntranetDirectory =  
     21     %DISTANCE{from="%TOPIC%" to="IntranetDirectory"}% ... 
     22     should be -3 
     23 
     24   * from <nop>TestCategory8 to <nop>%TOPIC% =  
     25     %DISTANCE{from="TestCategory8" to="%TOPIC%"}% ... 
     26     should be 1 
     27 
     28   * from <nop>%TOPIC% to <nop>TestCategory8 =  
     29     %DISTANCE{from="%TOPIC%" to="TestCategory8"}% ... 
     30     should be -1 
     31 
     32   * from <nop>%TOPIC% to <nop>%TOPIC% =  
     33     %DISTANCE{from="%TOPIC%" to="%TOPIC%"}% ... 
     34     should be 0 
     35 
     36   * from <nop>%TOPIC% to <nop>TestTopic =  
     37     '%DISTANCE{from="%TOPIC%" to="TestTopic"}%' ... 
     38     should be '' 
     39 
     40   * from TestTopic0 to %TOPIC% =  
     41     %DISTANCE{from="TestTopic0" to="%TOPIC%"}% ... 
     42     should be  
     43 
    344 
    445 
     
    849%META:FIELD{name="Summary" attributes="" title="Summary" value="This is a test topic with a nop  in it"}% 
    950%META:FIELD{name="Category" attributes="" title="Category" value="BusinessStructure, TestCategory8"}% 
    10 %META:TOPICMOVED{by="micha" date="1214237774" from="Applications/ClassificationApp.TestCategorizedTopic1" to="Applications/ClassificationApp.OrgChart"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderAllCategories.txt

    r482 r1182  
    1818 
    1919---++ Implementation 
    20 <verbatim> 
     20<verbatim class="tml"> 
    2121%STARTINCLUDE%<!-- render all categories --> 
    2222<noautolink> 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderCategory.txt

    r672 r1182  
    1313---+++++ Parameters 
    1414   * CAT: category to be rendered, defaults to BASETOPIC 
     15   * KEYWORDS: keywords to filter for 
     16   * TAG: tags to be searching for in this category 
     17   * FORM: display the search form on or of, defaults to on 
    1518 
    1619%ENDSECTION{name="documentation" type="section"}% 
    1720 
    1821---++ Implementation 
    19 <verbatim> 
     22<verbatim class="tml"> 
    2023%STARTINCLUDE%<!-- rendercategory --> 
    2124<noautolink> 
     25~~~ <form id="filterForm" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%"  
     26~~~   style="%IFDEFINED{"%FORM%" as="off" then="display:none"}%"> 
     27~~~ <input type="hidden" name="catname" value="%URLPARAM{"catname"}%" /> 
     28~~~ <div class="clsFilterForm twikiFormSteps">  
     29~~~   <div class="twikiFormStep"> 
     30~~~     <h4>Search</h4> 
     31~~~     <input type="text" name="search" value="%URLPARAM{"search" default="%IFDEFINED{"%KEYWORDS%"}%"}%" size="20" class="twikiInputField" /> 
     32~~~   </div> 
     33~~~   <div class="twikiFormStep"> 
     34~~~     <h4>Tag</h4> 
     35~~~     <select name="tag" style="max-width:20em" onchange="this.form.submit()"> 
     36~~~       <option value='' %URLPARAM{"tag" default="%IFDEFINED{"%TAG%"}%" as="" then=" selected"}%>ALL</option> 
     37%~~       CATINFO{cat="%IFDEFINED{"%CAT%" then="%CAT%" else="%BASETOPIC%"}%" 
     38~~~         format=" 
     39*~~           $percntFORMATLIST{\"$tags\" 
     40~~~             format=\"<option$dollarmarker>$1</option>\" 
     41~~~             selection=\"%URLPARAM{"tag" default="%IFDEFINED{"%TAG%"}%"}%\" 
     42~~~           }$percnt" 
     43~~~       }% 
     44~~~     </select>  
     45~~~   </div> 
     46~~~   <input type="submit" style="display:none" /> 
     47~~~   <br clear="both" /> 
     48~~~ </div> 
     49~~~ </form> 
    2250%~~ MAKEINDEX{" 
    2351*~~ 
     
    3159*~~   " 
    3260~~~   cols="%IFDEFINED{"%CLASSIFICATIONPLUGIN_NRCOLS%" then="$test" else="3"}%" 
    33 ~~~   header="<h2>Categories</h2> 
    34 ~~~     There  
    35 ~~~     $percntIFDEFINED{\"$count\" as=\"1\"  
    36 ~~~       then=\" is one subcategory \" 
    37 ~~~       else=\" are $count subcategories \" 
    38 ~~~     }$percnt in this category." 
    3961~~~   split="\n" 
    4062~~~   pattern="(.*);(.*);(.*)" 
     63~~~   sort="nocase" 
    4164~~~   format="$percntDBCALL{\"$3.$2->RenderIndexItem\"}$percnt" 
    4265~~~ }% 
    43  
    4466%~~ MAKEINDEX{" 
    4567*~~ 
    4668%~~    DBQUERY{ 
    4769~~~      "!(TopicType=~'\bCategory\b') AND  
    48 ~~~        ('%IFDEFINED{"%CAT%" then="%CAT%" else="%BASETOPIC%"}%' DISTANCE topic) = 1" 
     70~~~        ('%IFDEFINED{"%CAT%" then="%CAT%" else="%BASETOPIC%"}%' DISTANCE topic) = 1 
     71~~~        %FORMATLIST{"%URLPARAM{"tag" default="%IFDEFINED{"%TAG%"}%"}%"  
     72~~~          header="AND"  
     73~~~          format=" Tag=~'\b$1\b' " 
     74~~~          separator="AND" 
     75~~~        }% 
     76~~~        %FORMATLIST{"%URLPARAM{"search" default="%IFDEFINED{"%KEYWORDS%"}%"}%" 
     77~~~          header="AND"  
     78~~~          format=" uc(all) =~ uc('$1') " 
     79~~~          separator="AND" 
     80~~~        }% 
     81~~~      " 
    4982~~~      web="%BASEWEB%" 
    5083~~~      hidenull="on" 
     
    5487*~~   " 
    5588~~~   cols="%IFDEFINED{"%CLASSIFICATIONPLUGIN_NRCOLS%" then="$test" else="3"}%" 
    56 ~~~   header="<h2>Topics in $percntTOPICTITLE$percnt</h2> 
    57 ~~~     There 
    58 ~~~     $percntIFDEFINED{\"$count\" as=\"1\"  
    59 ~~~       then=\" is one topic \" 
    60 ~~~       else=\" are $count topics \" 
    61 ~~~     }$percnt in this category." 
    6289~~~   split="\n" 
    6390~~~   pattern="(.*);(.*);(.*)" 
     91~~~   sort="nocase" 
    6492~~~   format="$percntDBCALL{\"$3.$2->RenderIndexItem\"}$percnt" 
    6593~~~ }% 
     
    6997 
    7098---++ Toolbar  
    71 <verbatim> 
     99<verbatim class="tml"> 
    72100%STARTSECTION{"toolbar"}%<!-- toolbar --> 
    73101<div class="toolbar"> 
     
    83111~~~   title="Create a new topic in %CATINFO{cat="%BASEWEB%.%BASETOPIC%" format="<nop>$title"}%" 
    84112~~~ }%   
    85 %IFDEFINEDTHEN{"%IFACCESS{"%MAINWEB%.AdminGroup" type="change"}%" as="1"}% 
     113%IFDEFINEDTHEN{"%IFACCESS{"%MAINWEB%.TWikiAdminGroupGroup" type="change"}%" as="1"}% 
    86114%BUTTON{"Manage" href="%SCRIPTURLPATH{view}%/%BASEWEB%/Category" title="Manage categories"}%   
    87115%BUTTON{"Browse" href="%SCRIPTURLPATH{view}%/%BASEWEB%/CategoryBrowser" title="Browse the hierarchy"}%   
     
    110138 
    111139%META:FORM{name="Applications.ApplicationTopic"}% 
    112 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicFunction"}% 
     140%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicFunction"}% 
    113141%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="RenderCategory"}% 
    114142%META:FIELD{name="Summary" attributes="" title="Summary" value="Render tools to handle categories"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderCategoryBrowser.txt

    r1090 r1182  
    1919 
    2020---++ Implementation 
    21 <verbatim> 
     21<verbatim class="tml"> 
    2222%STARTINCLUDE%<div class="clsBrowser"> 
    2323~~~ <noautolink> 
     
    3838~~~          title=\"$summary\"> 
    3939~~~         <img src='$icon' alt='$percntENCODE{$title}$percnt'/> 
    40 ~~~         $title</a> 
     40~~~         <noautolink>$title</noautolink></a> 
    4141~~~       $percntIFDEFINED{\"$cyclic\" as=\"1\"  
    42 ~~~         then=\" <span class='foswikiAlert'>C</span>\" 
     42~~~         then=\" <span class='twikiAlert'>C</span>\" 
    4343~~~       }$percnt 
    4444~~~     $percntIFDEFINED{\"$leafs \" as=\"0 \" then=\" \" else=\" ($leafs)\"}$percnt 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderCategoryFactory.txt

    r1178 r1182  
    1818 
    1919---++ Implementation 
    20 <verbatim> 
     20<verbatim class="tml"> 
    2121%STARTINCLUDE%<!-- render category factory --> 
    2222---++ Create a new category 
     
    3434<table> 
    3535<tr> 
    36   <th class="foswikiFirstCol">Title:</th> 
     36  <th class="twikiFirstCol">Title:</th> 
    3737  <td><input class="twikiInputField" type="text" id="title" name="TopicTitle" size="60" onblur="wikify('title','topic', 'Category')" onkeyup="wikify('title','topic', 'Category')" value="%URLPARAM{"TopicTitle"}%" /></td> 
    3838</tr> 
    3939<tr> 
    40   <th class="foswikiFirstCol">Topic:</th> 
     40  <th class="twikiFirstCol">Topic:</th> 
    4141  <td><input class="twikiInputField" type="text" id="topic" name="topic" size="60" value="%URLPARAM{"topic"}%" /></td> 
    4242</tr> 
    4343<tr> 
    44   <th class="foswikiFirstCol">Summary:</th> 
     44  <th class="twikiFirstCol">Summary:</th> 
    4545  <td><input class="twikiInputField" type="text" name="Summary" size="60" value="%URLPARAM{"Summary"}%"/></td> 
    4646</tr> 
    4747<tr> 
    48   <th class="foswikiFirstCol" valign="top">Parent:</th> 
     48  <th class="twikiFirstCol" valign="top">Parent:</th> 
    4949  <td> 
    5050%~~ DBCALL{"Applications.ClassificationApp.RenderEditCategoryBrowser"  
     
    5757</tr> 
    5858<tr> 
    59   <th class="foswikiFirstCol" valign="top">Icon: 
     59  <th class="twikiFirstCol" valign="top">Icon: 
    6060    %TWISTYBUTTON{showimg="%ICONURLPATH{plus}%" hideimg="%ICONURLPATH{minus}%" id="icons" link=""}% 
    6161  </th> 
    6262  <td> 
    6363    %TWISTYTOGGLE{id="icons"}% 
    64       %DBCALL{"Applications.ClassificationApp.RenderIconSelector" BUTTONS="off" VALUE="%URLPARAM{"Icon"}%"}% 
     64      %DBCALL{"Applications.ClassificationApp.RenderIconSelector" BUTTONS="off" VALUE="%URLPARAM{"Icon"}%" SOURCE="%CLASSIFICATIONPLUGIN_ICONSET%"}% 
    6565    %ENDTWISTYTOGGLE% 
    6666  </td> 
    6767</tr> 
    6868<tr style="padding-top:1em"> 
    69   <th class="foswikiFirstCol">&nbsp;</th> 
     69  <th class="twikiFirstCol">&nbsp;</th> 
    7070  <td style="padding-top:1em"> 
    7171    <input type="submit" class="twikiSubmit natOkButton" value="Submit" />&nbsp; 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderClassifiedTopicView.txt

    r482 r1182  
    1818 
    1919---++ Implementation 
    20 <verbatim> 
    21 %STARTINCLUDE% 
     20<verbatim class="tml"> 
     21%STARTINCLUDE%<!-- renderclassifiedtopicview --> 
    2222~~~ <div class="clsTopicInfo"> 
    2323~~~ <noautolink> 
     
    2828~~~ }%]] 
    2929~~~ </h1> 
    30 ~~~ </noautolink> 
    3130~~~ <div class="clsTagInfo"> 
    3231%~~ IFDEFINED{ 
     
    3534~~~   else="$percntTAGINFO{header=\"Tagged \"}$percnt" 
    3635~~~ }% 
     36~~~ </noautolink> 
    3737~~~ </div> 
    3838~~~ </div> 
    39 ~~~ %STOPINCLUDE% 
     39<!-- //renderclassifiedtopicview-->%STOPINCLUDE% 
    4040</verbatim> 
    4141 
     
    6060%META:FORM{name="Applications.ApplicationTopic"}% 
    6161%META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicFunction"}% 
    62 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
     62%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="RenderClassifiedTopicView"}% 
    6363%META:FIELD{name="Summary" attributes="" title="Summary" value="Renders the TopicView of a ClassifiedTopic"}% 
    6464%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderEditCategoryBrowser.txt

    r1178 r1182  
    2323 
    2424---++ Implementation 
    25 <verbatim> 
     25<verbatim class="tml"> 
    2626%STARTINCLUDE%<div id="clsCatSelector_%NAME%"><noautolink> 
    2727~~~ <input type="hidden" size="75" name="%NAME%" id="%NAME%" value="%IFDEFINED{"%VALUE%"}%" /> 
     
    5959~~~            title='$percntENCODE{$summary}$percnt'> 
    6060~~~         <img src='$icon' alt='$percntENCODE{$title}$percnt'/> 
    61 ~~~         $title</a> 
     61~~~         <noautolink>$title</noautolink></a> 
    6262~~~         $percntIFDEFINED{\"$subcats\" as=\"0\"  
    6363~~~           then=\"\" else=\"<ul><li><span class='placeholder'>&nbsp;</span></li></ul>\" 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderEditTagCloud.txt

    r1178 r1182  
    2323 
    2424---++ Implementation 
    25 <verbatim> 
     25<verbatim class="tml"> 
    2626%STARTINCLUDE%<!-- render edit tag cloud --> 
     27~~~ <link rel="stylesheet" href="%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/jquery.autocomplete.css" type="text/css" media="all" /> 
     28~~~ <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/jquery.autocomplete.js"></script> 
    2729~~~ <script type="text/javascript" src="%PUBURLPATH%/%SYSTEMWEB%/ClassificationPlugin/jquery.tagselector.js"></script> 
    2830~~~ <script type="text/javascript"> 
     
    4547~~~ </div> 
    4648~~~ </td></tr></table> 
    47 ~~~ <div class="clsTagCloud"> 
    4849%~~ TAGCLOUD{ 
    4950~~~   "$percntDBQUERY{\"TopicType=~'\b(Tagged|Classified)Topic\b' 
     
    5859~~~    split="," 
    5960~~~    group=" <strong>$group</strong> " 
     61~~~    header="<div class='clsTagCloud'>" 
     62~~~    footer="</div>" 
    6063~~~    format="<span  
    6164~~~      style=\"font-size:$weight%;\"> 
     
    6669~~~         title=\"$count\">$term</a></span>" 
    6770~~~  }% 
    68 ~~~ </div> 
    6971~~~ </noautolink> 
    7072~~~ </div>%STOPINCLUDE% 
     
    7375 
    7476<!-- disabled  
    75 <verbatim> 
     77<verbatim class="tml"> 
    7678%~~   TAGCOOCCURRENCE{ 
    7779~~~     web="%IFDEFINED{"%THEWEB%" then="$test" else="%BASEWEB%"}%" 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderHierarchyAsJSON.txt

    r1090 r1182  
    1717   * root: top category inside the hierarchy to start extracting information from, defaults to !TopCategory 
    1818   * depth: number of levels to extract, defaults to 2 
    19    * format: one of "browser" or "editor", defaults to "browser" 
     19   * format: one of "browser", "sidebar", or "editor", defaults to "browser" 
    2020 
    2121%ENDSECTION{name="documentation" type="section"}% 
    2222 
    2323---++ Implementation 
    24 <verbatim> 
     24<verbatim class="tml"> 
    2525%STARTINCLUDE% 
    2626*~~ [ 
     
    5050 
    5151---++ Browser format 
    52 <verbatim> 
     52<verbatim class="tml"> 
    5353%STARTSECTION{"browser"}% 
    5454*~~  <a href='$url'  
     
    5858~~~  </a> 
    5959~~~  $percntIFDEFINED{\"$cyclic\" as=\"1\"  
    60 ~~~    then=\" <span class='foswikiAlert'>C</span>\" 
     60~~~    then=\" <span class='twikiAlert'>C</span>\" 
    6161~~~  }$percnt 
    6262~~~  $percntIFDEFINED{\"$leafs\" as=\"0\" 
     
    6868</verbatim> 
    6969 
     70---++ Sidebar format 
     71<verbatim class="tml"> 
     72%STARTSECTION{"sidebar"}% 
     73*~~  <table cellspacing='0' cellpadding='0'><tr> 
     74*~~    <td valign='top'><img class='clsCategoryIcon' src='$icon' alt='$percntENCODE{$title}$percnt' /></td> 
     75*~~    <td valign='top'><a href='$url' title='$percntENCODE{$summary}$percnt'><noautolink>$title</noautolink></a></td> 
     76*~~  </tr></table> 
     77*~~ 
     78%ENDSECTION{"sidebar"}% 
     79</verbatim> 
     80 
    7081---++ Editor format 
    71 <verbatim> 
     82<verbatim class="tml"> 
    7283%STARTSECTION{"editor"}% 
    7384*~~  <a href='javascript:void(0)' 
     
    8091~~~     > 
    8192~~~     <img src='$icon' alt='$percntENCODE{$title}$percnt' /> 
    82 ~~~    $title</a> 
     93~~~    <noautolink>$title</noautolink></a> 
    8394*~~ 
    8495%ENDSECTION{"editor"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderIconSelector.txt

    r1178 r1182  
    2727 
    2828---++ Implementation 
    29 <verbatim> 
     29<verbatim class="tml"> 
    3030%STARTINCLUDE%<!-- render photo selector --> 
    3131~~~  <div class="clsIconSelector"> 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderTaggedTopicView.txt

    r482 r1182  
    1818 
    1919---++ Implementation 
    20 <verbatim> 
     20<verbatim class="tml"> 
    2121%STARTINCLUDE%<!-- --> 
    2222---+!! <nop>%BASETOPIC% 
     
    2727~~~      Tagged  
    2828~~~      $percntFORMATLIST{\"$formfield(Tag)\" 
    29 ~~~        format=\"<a href=\\"%SCRIPTURLPATH{"view"}%/$web/WebTagCloud?search=$1\\">$1</a>\" 
     29~~~        format=\"<a href=\\"%SCRIPTURLPATH{"view"}%/$web/WebTagCloud?tag=$1\\">$1</a>\" 
    3030~~~      }$percnt 
    3131~~~    $percntFIDEFINED$percnt 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderWebClassSearch.txt

    r1178 r1182  
    1 %META:TOPICINFO{author="ProjectContributor" date="1200331240" format="1.1" reprev="1.2" version="$Rev$"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1228423025" format="1.1" reprev="1.2" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicFunction"}% 
    33---+!! Function: %TOPIC% 
     
    2121 
    2222---++ Implementation 
    23 <verbatim> 
     23<verbatim class="tml"> 
    2424%STARTINCLUDE%<!-- render web class search --> 
    25 <div class="twikiPageForm"> 
     25<div class="twikiFormSteps"> 
     26<h2>Search for a topic</h2> 
    2627<form action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%#results" DISmethod="post"> 
    2728<input type="hidden" name="trigger" value="on" /> 
    2829<input type="hidden" name="refresh" value="on" /> 
    29 <table> 
    30 <tr> 
    31    <th>Text:</th> 
    32    <td><input class="twikiInputField" type="text" name="qtext" size="50" value="%IFDEFINED{"%QTEXT%"}%" /> 
    33 </tr> 
    34 <tr> 
    35    <th>Tags:</th> 
    36    <td><input class="twikiInputField" type="text" name="qtags" size="50" value="%IFDEFINED{"%QTAGS%"}%" />  
    37 </tr> 
    38 <tr> 
    39    <th>Categories:</th> 
    40    <td><input class="twikiInputField" type="text" name="qcats" size="50" value="%IFDEFINED{"%QCATS%"}%" /> 
    41 </tr> 
    42 <tr> 
    43   <th>&nbsp;</th> 
    44   <td><input type="submit" value="Ok" class="twikiSubmit natOkButton" />&nbsp; 
    45       <input type="button" value="Reset" class="foswikiButton natCancelButton" onclick="window.location.href= '%SCRIPTURLPATH{view}%/%BASEWEB%/%BASETOPIC%';" />&nbsp; 
    46       <label><input type="checkbox" value="on" name="searchallwebs" %IFDEFINED{"%SEARCHALLWEBS%" as="on" then=" checked "}% /> search in all webs</label> 
    47              <input type="hidden" name="searchallwebs" value="off" /> 
    48 </tr> 
    49 </table> 
     30<div class="twikiFormStep"> 
     31  <h3>Text:</h3> 
     32  <input class="twikiInputField" type="text" name="qtext" size="50" value="%IFDEFINED{"%QTEXT%"}%" /> 
     33</div> 
     34<div class="twikiFormStep"> 
     35  <h3>Tags:</h3> 
     36  <input class="twikiInputField" type="text" name="qtags" size="50" value="%IFDEFINED{"%QTAGS%"}%" />  
     37</div> 
     38<div class="twikiFormStep"> 
     39  <h3>Categories:</h3> 
     40  <input class="twikiInputField" type="text" name="qcats" size="50" value="%IFDEFINED{"%QCATS%"}%" /> 
     41</div> 
     42<div class="twikiFormStep"> 
     43  <h3>Options:</h3> 
     44  <label><input type="checkbox" value="on" name="searchallwebs" %IFDEFINED{"%SEARCHALLWEBS%" as="on" then=" checked "}% /> search in all webs</label> 
     45  <input type="hidden" name="searchallwebs" value="off" /> 
     46</div> 
     47<div class="twikiFormStep twikiFormButton twikiFormLast"> 
     48  %BUTTON{"Search" icon="find" type="submit"}% 
     49  %CLEAR% 
     50</div> 
    5051</form> 
    5152</div> 
     
    8182~~~     header=\" 
    8283~~~       <h2>Results in $1</h2> 
    83 ~~~       *Found <span class='foswikiAlert'> $dollarcount </span> topic(s)* %BR% 
     84~~~       *Found <span class='twikiAlert'> $dollarcount </span> topic(s)* %BR% 
    8485~~~       <noautolink><div class='clsHitList'> $n 
    8586~~~       | *Nr* | *Topic* | *Summary* | *Changed* | *By* |$n 
     
    118119 
    119120%META:FORM{name="Applications.ApplicationTopic"}% 
    120 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicFunction"}% 
     121%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicFunction"}% 
    121122%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    122123%META:FIELD{name="Summary" attributes="" title="Summary" value="Render a search tool for ClassifiedTopics"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderWebTagCloud.txt

    r482 r1182  
    99 
    1010---+++++ Parameters 
    11    * QUERY: comma separated list of tags to be searched for in the archive 
     11   * TAG: comma separated list of tags to be searched for in the archive 
     12   * CAT: restrict tag cloud to this category; displays all tags of all categories if unspecified 
     13   * KEYWORDS: keywords to filter for 
    1214   * MIN: minimum frequency of a tags to be shown 
    1315   * TAGCLOUDTOPIC: topic where to jump to when a tag is clicked, defaults to BASETOPIC 
    1416   * RECENCY: limit search for tags on most recently changed topics 
    15    * CAT: restrict tag cloud to this category; displays all tags of all categories if unspecified 
    1617   * CATTITLE: title of the category filter, defaults to 'Category' 
    1718   * TOPCAT: optional top category to display the category filter for 
    1819   * EXCLUDECAT: optionally exclude a category category from filter, defaults to <nop>TopCategory 
    1920   * SHOWFILTER: toggle the filter form, defaults to hidden 
     21   * FROMCOLOR: start color for most significant tags, this must be a set of three integers specifying RGB, 
     22                fades over to TOCOLOR, defaults to "194,199,204" 
     23   * TOCOLOR: end color for least significant tags, defaults to "0,102,204" 
    2024 
    2125%ENDSECTION{name="documentation" type="section"}% 
    2226 
    2327---++ Implementation 
    24 <verbatim> 
    25 %STARTINCLUDE% 
     28<verbatim class="tml"> 
     29%STARTINCLUDE%<!-- renderwebtagcloud --> 
    2630<noautolink> 
    2731<script type="text/javascript"> 
     
    2933  var form = document.getElementById('tagCloudForm'); 
    3034  var newTags = new Array(); 
    31   var allTags = form.search.value.split(/\s*,\s*/); 
     35  var allTags = form.tag.value.split(/\s*,\s*/); 
    3236  var found = 0; 
    3337  for (var i = 0; i < allTags.length; i++) { 
     
    4145    } 
    4246  } 
    43   if (!found) { 
     47  if (!found && clickedTag) { 
    4448    newTags.push(clickedTag); 
    4549  } 
    46   form.search.value = newTags.join(","); 
     50  form.tag.value = newTags.join(", "); 
    4751  form.submit(); 
    4852} 
    4953</script> 
    5054~~~ <form id="tagCloudForm" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%IFDEFINED{"%TAGCLOUDTOPIC%" then="$test" else="%BASETOPIC%"}%"> 
    51 ~~~   <input type="hidden" name="search" value="%URLPARAM{"search"}%" /> 
     55~~~   <input type="hidden" name="tag" value="%IFDEFINED{"%TAG%"}%" /> 
    5256%~~ IFDEFINEDTHEN{"%SHOWFILTER%" as="on"}% 
    53 %~~ $nopTWISTY{ 
    54 ~~~   link="&nbsp;Filter"  
    55 ~~~   firststart="hide"  
    56 ~~~   remember="on" 
    57 ~~~   prefix="<h3>"  
    58 ~~~   suffix="</h3>"  
    59 ~~~   showimgleft="%ICONURLPATH{plus}%" 
    60 ~~~   hideimgleft="%ICONURLPATH{minus}%" 
    61 ~~~ }% 
    62 ~~~ <div class="twikiPageForm">  
    63 ~~~   <table class="twikiTable" style="width:auto"><tr> 
    64 ~~~     <th>%IFDEFINED{"%CATTITLE%" then="%CATTITLE%" else="Category"}%:</th> 
    65 ~~~     <td> 
    66 ~~~       <select name="cat" style="max-width:20em"> 
    67 ~~~         <option value='' %IFDEFINED{"%CAT%" as="" then=" selected"}%>ALL</option> 
    68 %~~         HIERARCHY$nop{ 
    69 ~~~           web="%BASEWEB%" 
    70 ~~~           top="%IFDEFINED{"%TOPCAT%" then="%TOPCAT%" else="TopCategory"}%" 
    71 ~~~           exclude="%IFDEFINED{"%EXCLUDECAT%" then="%EXCLUDECAT%" else="TopCategory"}%" 
    72 ~~~           indent="&nbsp;" 
    73 ~~~           format="<option value='$topic'  
    74 ~~~             $percntIFDEFINED{\"%CAT%\" as=\"$topic\"  
    75 ~~~               then=\" selected\" 
    76 ~~~             }$percnt>$indent $title</option>$n$children" 
    77 ~~~         }% 
    78 ~~~       </select>  
    79 ~~~     </td> 
    80 ~~~     <td>&nbsp; 
    81 ~~~     <input type="submit" class="natOkButton" value="OK" /> 
    82 ~~~     <input type="button" class="natCancelButton" value="Cancel" onclick="window.location.href='%SCRIPTURL{"view"}%/%BASEWEB%/%BASETOPIC%';" /> 
    83 ~~~     </td> 
    84 ~~~   </tr> 
    85 ~~~   </table> 
     57~~~ <div class="clsFilterForm twikiFormSteps">  
     58~~~   <div class="twikiFormStep"> 
     59~~~     <h4>Search</h4> 
     60~~~     <input type="text" name="search" value="%KEYWORDS%" size="20" class="twikiInputField" /> 
     61~~~   </div> 
     62~~~   <div class="twikiFormStep"> 
     63~~~     <h4>Category</h4> 
     64~~~     <select name="cat" style="max-width:20em" onchange="submitTagCloud()"> 
     65~~~       <option value='' %IFDEFINED{"%CAT%" as="" then=" selected"}%>ALL</option> 
     66%~~       HIERARCHY$nop{ 
     67~~~         web="%BASEWEB%" 
     68~~~         top="%IFDEFINED{"%TOPCAT%" then="%TOPCAT%" else="TopCategory"}%" 
     69~~~         exclude="%IFDEFINED{"%EXCLUDECAT%" then="%EXCLUDECAT%" else="TopCategory"}%" 
     70~~~         tags="%IFDEFINED{"%TAG%"}%" 
     71~~~         unique="on" 
     72~~~         format="<option value='$topic'  
     73~~~           $percntIFDEFINED{\"%CAT%\" as=\"$topic\"  
     74~~~             then=\" selected\" 
     75~~~           }$percnt>$indent $title</option>$n$children" 
     76~~~       }% 
     77~~~     </select>  
     78~~~   </div> 
     79~~~   <input type="submit" style="display:none" /> 
     80~~~   <br clear="both" /> 
    8681~~~ </div> 
    87 %~~ $nopENDTWISTY% 
    8882%~~ FIDEFINED% 
    8983%~~ TAGCLOUD{ 
    9084~~~   "$percntDBQUERY{ 
    9185~~~     \"TopicType=~'\b(Tagged|Classified)Topic\b' 
    92 ~~~       $percntFORMATLIST{\"%IFDEFINED{"%QUERY%"}%\"  
    93 ~~~         header=\"AND\"  
    94 ~~~         format=\" Tag=~'\b$1\b' \" 
    95 ~~~         separator=\"AND\" 
    96 ~~~       }$percnt 
     86~~~       %FORMATLIST{"%IFDEFINED{"%TAG%"}%"  
     87~~~         header="AND"  
     88~~~         format=" Tag=~'\b$1\b' " 
     89~~~         separator="AND" 
     90~~~       }% 
     91~~~       %FORMATLIST{"%IFDEFINED{"%KEYWORDS%"}%"  
     92~~~         header="AND"  
     93~~~         format=" lc(all)=~ lc('$1') " 
     94~~~         separator="AND" 
     95~~~       }% 
    9796~~~       %IFDEFINED{"%CAT%" then=" AND topic ISA '%CAT%'"}% 
    9897~~~     \" 
     
    111110~~~   format="<a rel=\"nofollow\" name=\"$term\" 
    112111~~~        style=\"font-size:$weight%; 
    113 ~~~                color:$fadeRGB(194,199,204,0,102,204);\" 
     112~~~                color:$fadeRGB( 
     113*~~                  %IFDEFINED{"%FROMCOLOR%" then="$test" else="194,199,204"}%, 
     114*~~                  %IFDEFINED{"%TOCOLOR%" then="$test" else="0,102,204"}% 
     115*~~                );\" 
    114116~~~        href=\"javascript:submitTagCloud('$term')\" 
    115 ~~~        $percntIFDEFINED{\"%QUERY%\" 
     117~~~        $percntIFDEFINED{\"%TAG%\" 
    116118~~~          as=\".*\b$term\b.*\" 
    117119~~~          then=\"class=\\"current\\"\" 
     
    123125~~~ }% 
    124126~~~ </form> 
    125 %IFDEFINEDTHEN{"%QUERY%" glue="off"}% 
     127%IFDEFINEDTHEN{"%TAG%%KEYWORDS%"}% 
    126128<a name="results"></a> 
    127129%~~   $nopDBCALL{"Applications.ClassificationApp.RenderWebTagCloudHitList" 
    128130~~~     QUERY=" 
    129 *~~       %$nopFORMATLIST{"%QUERY%"  
     131*~~       %$nopFORMATLIST{"%TAG%"  
    130132~~~         header="AND"  
    131133~~~         format=" Tag=~'\b$1\b' " 
     
    133135~~~       }% 
    134136~~~     %IFDEFINED{"%CAT%" then=" AND topic ISA '%CAT%'"}% 
     137~~~     %FORMATLIST{"%IFDEFINED{"%KEYWORDS%"}%"  
     138~~~       header="AND"  
     139~~~       format=" lc(all)=~ lc('$1') " 
     140~~~       separator="AND" 
     141~~~     }% 
    135142~~~     " 
    136 ~~~     PARAMS="search=%QUERY%;cat=%CAT%;recency=%RECENCY%;min=%MIN%" 
    137 ~~~     HILITE="Tag" 
    138143~~~   }% 
    139144%FIDEFINED% 
    140145~~~ </noautolink> 
    141 %STOPINCLUDE% 
     146<!-- //renderwebtagcloud -->%STOPINCLUDE% 
    142147</verbatim> 
    143148 
     
    146151<div class="alt"> 
    147152%DBCALL{"%TOPIC%"  
    148   QUERY="%URLPARAM{"search"}%"  
     153  TAG="%URLPARAM{"tag"}%"  
     154  TAG="%URLPARAM{"search"}%"  
    149155  CAT="%URLPARAM{"cat"}%"  
    150156  RECENCY="%URLPARAM{"recency"}%" 
    151157  MIN="%URLPARAM{"min"}%" 
     158  FROMCOLOR="255,0,0" 
     159  TOCOLOR="0,0,255" 
    152160}% 
    153161</div> 
     
    157165---++ Copyright 
    158166<div style="text-align:justify;margin:1em;"> 
    159 &copy; 2007 Michael Daum http://wikiring.de 
     167&copy; 20072-2008 Michael Daum http://michaeldaumconsulting.com 
    160168 
    161169%DBCALL{"Applications.GnuGeneralPublicLicense" section="notice"}% 
     
    165173 
    166174%META:FORM{name="Applications.ApplicationTopic"}% 
    167 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicFunction"}% 
     175%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicFunction"}% 
     176%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="RenderWebTagCloud"}% 
    168177%META:FIELD{name="Summary" attributes="" title="Summary" value="Render a tool to list all classified topics in this web"}% 
    169178%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="ClassificationApp"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/RenderWebTagCloudHitList.txt

    r482 r1182  
    1414   * SKIP 
    1515   * LIMIT 
    16    * PARAMS 
    17    * HILITE 
    1816 
    1917---+++++ Css 
     
    2220 
    2321---++ Implementation 
    24 <verbatim> 
    25 %STARTINCLUDE% 
    26 *~~ 
    27 <noautolink> 
     22<verbatim class="tml"> 
     23%STARTINCLUDE%<!-- rendertagcloudhitlist --> 
     24*~~ <noautolink> 
    2825%~~ MAKEINDEX{" 
    2926%~~   DBQUERY{"TopicType=~'\b(Tagged|Classified)Topic\b' %QUERY%" 
     
    3431~~~   }%" 
    3532~~~   cols="%IFDEFINED{"%CLASSIFICATIONPLUGIN_NRCOLS%" then="$test" else="3"}%" 
    36 ~~~   header="<h2 >Found $count topic(s)</h2>" 
     33~~~   header="<span class='twikiAlert'>$count</span> topic(s) found" 
    3734~~~   split="\n" 
    3835~~~   pattern="(.*);(.*);(.*)" 
     
    4037~~~ " 
    4138~~~ }% 
    42 %STOPINCLUDE% 
     39~~~ </noautolink> 
     40<!-- //rendertagcloudhitlist-->%STOPINCLUDE% 
    4341</verbatim> 
    44  
    45 ---++ Old Implementation 
    46 <verbatim> 
    47 %STARTSECTION{"oldimpl"}% 
    48 *~~ 
    49 %~~ DBQUERY{"TopicType=~'\b(Tagged|Classified)Topic\b' %QUERY%" 
    50 ~~~    web="%BASEWEB%" 
    51 ~~~    sort="modified"  
    52 ~~~    limit="%IFDEFINED{"%LIMIT%" then="$test"}%"  
    53 ~~~    reverse="on"  
    54 ~~~    skip="%IFDEFINED{"%SKIP%" then="$test"}%" 
    55 ~~~    header="<noautolink><div class=\"clsHitList\"> $n 
    56 ~~~      | *Nr* | *Topic* | *Summary* | *Changed* | *By* |$n 
    57 ~~~      $percntTABLE{tablewidth=\"100%\"}$percnt$n" 
    58 ~~~    format=" 
    59 ~~~      | $index  
    60 ~~~      | <a href=\"%SCRIPTURLPATH{"view"}%/$web/$topic\"  
    61 ~~~         %IFDEFINEDTHEN{"%HILITE%" glue="off"}% 
    62 ~~~           title=\"$expand(%HILITE%)\" 
    63 ~~~           onmouseover=\"hiliteElements('$expand(%HILITE%)','hilite');\" 
    64 ~~~           onmouseout=\"hiliteElements('%URLPARAM{"search"}%','current');\" 
    65 ~~~         %FIDEFINED% 
    66 ~~~         >$expand(TopicTitle or topic)</a> 
    67 ~~~      | $flatten($expand(Summary or Text or 'no description')) 
    68 ~~~      | <span style=\"white-space:nowrap\">$formatTime(info.date)</span> 
    69 ~~~      | [[%MAINWEB%.$expand(info.author)][$expand(info.author)]]   
    70 ~~~      |" 
    71 ~~~    footer="$n 
    72 ~~~      $percntIFDEFINEDTHEN{\"%LIMIT%\" glue=\"off\"}$percnt 
    73 ~~~        $percntDBCALL$nop{\"Applications.RenderPageNavigation\"  
    74 ~~~          SKIP=\"%IFDEFINED{"%SKIP%" then="$test"}%\"  
    75 ~~~          MAX=\"$count\" 
    76 ~~~          LIMIT=\"%IFDEFINED{"%LIMIT%" then="$test"}%\" 
    77 ~~~          PARAMS=\"%PARAMS%\" 
    78 ~~~        }$percnt 
    79 ~~~      $percntFIDEFINED$percnt 
    80 ~~~      </div></noautolink>" 
    81 ~~~ }% 
    82 ~~~ 
    83 %ENDSECTION{"oldimpl"}% 
    84 </verbatim> 
    85  
    86 <!-- interrupt glue --> 
    8742 
    8843---++ Test 
    8944<div class="alt"> 
    90 %DBCALL{"%TOPIC%" QUERY="%URLPARAM{"search"}%" LIMIT="%URLPARAM{"limit" default="2"}%" SKIP="%URLPARAM{"skip"}%"}% 
     45%DBCALL{"%TOPIC%" LIMIT="%URLPARAM{"limit" default="2"}%" SKIP="%URLPARAM{"skip"}%"}% 
    9146</div> 
    9247 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TWikiForm.txt

    r604 r1182  
    1212%META:FORM{name="Applications.TopicStub"}% 
    1313%META:FIELD{name="TopicType" attributes="" title="TopicType" value="TopicStub, TopicType"}% 
    14 %META:FIELD{name="Summary" attributes="" title="Summary" value="Tool to create DataForms"}% 
     14%META:FIELD{name="Summary" attributes="" title="Summary" value="Tool to create TWikiForms"}% 
    1515%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="TWikiWorkbench"}% 
    1616%META:FIELD{name="Target" attributes="" title="Target" value="Applications.TWikiForm"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TaggedTopic.txt

    r1178 r1182  
    1 %META:TOPICINFO{author="ProjectContributor" date="1202208170" format="1.1" version="$Rev$"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1228410990" format="1.1" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TopicType"}% 
    33---+!! %TOPIC% 
     
    2020---+++ Create a new topic  
    2121%STARTSECTION{"factory"}% 
    22 <div class="twikiPageForm"> 
     22%TWISTY{link="%BUTTON{"%IF{"defined 'LABEL'" then="%LABEL%" else="Create topic"}%" icon="add"}%%CLEAR%"}% 
     23 
     24<div class="twikiFormSteps"> 
    2325<form action="%SCRIPTURLPATH{"edit"}%/%BASEWEB%/" method="post"> 
    2426<input type="hidden" name="topicparent" value="%BASEWEB%.%BASETOPIC%" /> 
     
    3032<input type="hidden" name="Summary" value="" /> 
    3133<input type="hidden" name="Tag" value="" /> 
    32 <table> 
    33 <tr> 
    34   <th class="foswikiFirstCol">Name:</th> 
    35   <td><input class="twikiInputField" type="text" name="topic" size="40" /></td> 
    36 </tr> 
    37 <tr> 
    38   <th class="foswikiFirstCol">&nbsp;</th> 
    39   <td style="padding-top:1em"> 
    40     <input type="submit" class="twikiSubmit natOkButton" value="Submit" /> 
    41     <input type="reset" class="foswikiButton natCancelButton" value="Reset" /> 
    42   </td> 
    43 </tr> 
    44 </table> 
     34<div class="twikiFormStep"> 
     35  <h3>Name:</h3> 
     36  <input class="twikiInputField" type="text" name="topic" size="40" /> 
     37</div> 
     38<div class="twikiFormStep twikiFormButtons twikiFormLast"> 
     39    %BUTTON{"%MAKETEXT{"Submit"}%" type="submit" icon="tick"}% 
     40    %CLEAR% 
     41</div> 
    4542</form> 
    4643</div> 
     44%ENDTWISTY% 
    4745%ENDSECTION{"factory"}% 
    4846%STOPINCLUDE% 
     
    7573 
    7674%META:FORM{name="Applications.TopicType"}% 
    77 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
     75%META:FIELD{name="TopicType" title="TopicType" value="DocuTopic, TopicType, TWikiForm"}% 
    7876%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    7977%META:FIELD{name="Inheritance" attributes="" title="Inheritance" value="ApplicationTopic"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TaggedTopicViewTemplate.txt

    r482 r1182  
    22%META:TOPICPARENT{name="TopicView"}% 
    33%TMPL:INCLUDE{"view"}% 
    4 %TMPL:DEF{"simpleheader"}% 
    5 %DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}% 
    6 %TMPL:END%  
     4%TMPL:DEF{"beforetext"}%%DBCALL{"Applications.ClassificationApp.RenderClassifiedTopicView"}%<hr class="clsTopicInfoSep" />%TMPL:END%  
    75%TMPL:DEF{"form"}%%TMPL:END% 
    86 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestCategorizedTopic1.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1204297462" format="1.1" version="$Rev$"}% 
    22%META:TOPICPARENT{name="TestCategory3"}% 
    3 -- Main.MichaelDaum - 27 Oct 2006 
    43 
    5 %META:FORM{name="Applications.ClassificationApp.CategorizedTopic"}% 
    6 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="CategorizedTopic"}% 
    7 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
    8 %META:FIELD{name="Summary" attributes="" title="Summary" value="This is a test topic with a nop  in it"}% 
    9 %META:FIELD{name="Category" attributes="" title="Category" value="TestCategory3, TestCategory8, TestCategory4"}% 
     4 
     5%META:FORM{name="Applications.ClassificationApp.ClassifiedTopic"}% 
     6%META:FIELD{name="TopicType" title="TopicType" value="ClassifiedTopic, CategorizedTopic, TaggedTopic"}% 
     7%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestCategorizedTopic1"}% 
     8%META:FIELD{name="Summary" attributes="" title="Summary" value="This is a test topic"}% 
     9%META:FIELD{name="Tag" attributes="" title="Tag" value="test, topic"}% 
     10%META:FIELD{name="Category" attributes="" title="Category" value="TestCategory5, TestCategory16"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestCategory.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1213044787" format="1.1" version="$Rev$"}% 
    2 %META:TOPICPARENT{}% 
     2%META:TOPICPARENT{name="IntranetDirectory"}% 
    33%DBCALL{"Applications.ClassificationApp.RenderCategory"}% 
    44 
     
    1111%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestCategory"}% 
    1212%META:FIELD{name="Summary" attributes="" title="Summary" value=""}% 
    13 %META:FIELD{name="Category" attributes="" title="Category" value="TopCategory"}% 
     13%META:FIELD{name="Category" attributes="" title="Category" value=""}% 
     14%META:FIELD{name="Icon" attributes="" title="Icon" value=""}% 
     15%META:FIELD{name="ImportedCategory" attributes="" title="<nop>ImportedCategory" value=""}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestCategory16.txt

    r482 r1182  
    55%META:FORM{name="Applications.ClassificationApp.Category"}% 
    66%META:FIELD{name="TopicType" attributes="" title="TopicType" value="Category, CategorizedTopic"}% 
    7 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}% 
     7%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestCategory16"}% 
    88%META:FIELD{name="Summary" attributes="" title="Summary" value="yet another test"}% 
    99%META:FIELD{name="Category" attributes="" title="Category" value="TopCategory"}% 
     10%META:FIELD{name="Icon" attributes="" title="Icon" value=""}% 
     11%META:FIELD{name="ImportedCategory" attributes="" title="<nop>ImportedCategory" value=""}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestCategory6.txt

    r482 r1182  
    44 
    55%META:FORM{name="Applications.ClassificationApp.Category"}% 
    6 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="Category, CategorizedTopic"}% 
    7 %META:FIELD{name="Summary" attributes="" title="Summary" value=""}% 
     6%META:FIELD{name="TopicType" title="TopicType" value="Category, CategorizedTopic"}% 
     7%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestCategory6"}% 
     8%META:FIELD{name="Summary" attributes="" title="Summary" value="blabla"}% 
    89%META:FIELD{name="Category" attributes="" title="Category" value="TestCategory5"}% 
     10%META:FIELD{name="Icon" attributes="" title="Icon" value=""}% 
     11%META:FIELD{name="ImportedCategory" attributes="" title="<nop>ImportedCategory" value=""}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestTopic0.txt

    r482 r1182  
    1111 
    1212%META:FORM{name="Applications.ClassificationApp.ClassifiedTopic"}% 
    13 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="ClassifiedTopic, CategorizedTopic, TaggedTopic"}% 
    14 %META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestTopic0"}% 
     13%META:FIELD{name="TopicType" title="TopicType" value="ClassifiedTopic, CategorizedTopic, TaggedTopic"}% 
     14%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="Foo"}% 
    1515%META:FIELD{name="Summary" attributes="" title="Summary" value="foo bar"}% 
    16 %META:FIELD{name="Tag" attributes="" title="Tag" value="client, fat, foo, sql"}% 
    17 %META:FIELD{name="Category" attributes="" title="Category" value="PlansAndPresentations, TestCategory11"}% 
     16%META:FIELD{name="Tag" attributes="" title="Tag" value="fertig, festival, freak"}% 
     17%META:FIELD{name="Category" attributes="" title="Category" value="PlansAndPresentations"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/TestTopic1.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1214239169" format="1.1" version="$Rev$"}% 
    22%META:TOPICPARENT{name="CorporateCategory"}% 
     3<verbatim> 
    34   * ISA{IntranetDirectory}: %ISA{cat="IntranetDirectory"}% 
    45   * ISA{CorporateCategory}: %ISA{cat="CorporateCategory"}% 
     
    1112   * DISTANCE{from="TestCategory8" to="FinanceAndPlaning"}: %DISTANCE{from="TestCategory8" to="FinanceAndPlaning" abs="off"}% 
    1213   * DISTANCE{from="FinanceAndPlaning" to="TestCategory8"}: %DISTANCE{from="FinanceAndPlaning" to="TestCategory8" abs="off"}% 
    13  
     14</verbatim> 
    1415 
    1516 
     
    1819 
    1920%META:FORM{name="Applications.ClassificationApp.ClassifiedTopic"}% 
    20 %META:FIELD{name="TopicType" attributes="" title="TopicType" value="ClassifiedTopic, TaggedTopic, CategorizedTopic"}% 
     21%META:FIELD{name="TopicType" title="TopicType" value="ClassifiedTopic, CategorizedTopic, TaggedTopic"}% 
     22%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="TestTopic1"}% 
    2123%META:FIELD{name="Summary" attributes="" title="Summary" value=""}% 
    2224%META:FIELD{name="Tag" attributes="" title="Tag" value="test, topic"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebChanges.txt

    r482 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1212998697" format="1.1" version="$Rev$"}% 
    22%META:TOPICPARENT{}% 
    3 ---+!! %TOPIC% 
    4 %FORMFIELD{"Summary"}% 
    5 %DBCALL{"Applications.RenderWebChanges"  
    6   SKIP="%URLPARAM{"skip" default=" 0"}%" 
    7   LIMIT="%URLPARAM{"limit" default="10"}%" 
    8 }% 
     3%INCLUDE{"%SYSTEMWEB%.%TOPIC%"}% 
    94 
    105<!-- 
    116   * Set VIEW_TEMPLATE = Applications.HiddenFormView 
     7   * Set STYLETOPICACTIONS = off 
    128--> 
    139 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebLeftBar.txt

    r764 r1182  
    99%STARTINCLUDE% <!-- --> 
    1010%INCLUDE{"%IF{"context can_login" then="%SYSTEMWEB%.WebLeftBarLogin" else="<nop>"}%" warn="off"}% 
     11<b>Categories</b> 
     12%DBCALL{"Applications.ClassificationApp.RenderSideBar"}% 
    1113<b>Tools</b> 
    1214%DBCALL{"Applications.RenderSideBar"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebLinks.txt

    r482 r1182  
    44%FORMFIELD{"Summary"}% 
    55 
    6 %STARTINCLUDE%%DBCALL{"Applications.RenderSideBar"}%%STOPINCLUDE% 
    7  
     6%STARTINCLUDE%<!-- classificationapp.weblinks --> 
     7%DBCALL{"Applications.ClassificationApp.RenderSideBar"}% 
     8<h2 >TopicTypes</h2> 
     9%DBCALL{"Applications.RenderSideBar"}% 
     10<!-- //classificationapp.weblinks -->%STOPINCLUDE% 
    811 
    912%META:FORM{name="Applications.ApplicationTopic"}% 
    10 %META:FIELD{name="TopicType" attributes="M" title="TopicType" value="WebTool"}% 
     13%META:FIELD{name="TopicType" attributes="" title="TopicType" value="WebTool"}% 
     14%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value="WebLinks"}% 
    1115%META:FIELD{name="Summary" attributes="" title="Summary" value="Navigation for the NatSkin WebSideBar"}% 
    1216%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="TWikiWorkbench"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebNotify.txt

    r664 r1182  
    1414Examples: 
    1515 
    16    * %MAINWEB%.WikiGuest 
    17    * %MAINWEB%.WikiGuest - example@your.company 
     16   * %MAINWEB%.TWikiGuest 
     17   * %MAINWEB%.TWikiGuest - example@your.company 
    1818 
    1919<!-- 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebPreferences.txt

    r672 r1182  
    2222   * Set #DENYWEBVIEW = 
    2323   * Set #ALLOWWEBVIEW =  
    24    * Set DENYWEBCHANGE = %MAINWEB%.WikiGuest 
    25    * Set ALLOWWEBCHANGE = %MAINWEB%.AdminGroup 
    26    * Set ALLOWTOPICCHANGE = %MAINWEB%.AdminGroup 
     24   * Set DENYWEBCHANGE = %MAINWEB%.TWikiGuest 
     25   * Set ALLOWWEBCHANGE = %MAINWEB%.TWikiAdminGroupGroup 
     26   * Set ALLOWTOPICCHANGE = %MAINWEB%.TWikiAdminGroupGroup 
    2727 
    2828---+++ Application Pointer 
     
    3131   * Set WEBDB = TWiki::Plugins::DBCachePlugin::WebDB 
    3232   * Set CLASSIFICATIONPLUGIN_AUTOREPARENT  = 1 
     33   * Set THISBREADCRUMBS = %CATINFO{cat="%URLPARAM{"catname" default="%BASEWEB%.%BASETOPIC%"}%" header="$percntBREADCRUMBS{recurse=\"topicoff\" separator=\"<span class='natSep'>&nbsp;&#187; </span>\"}$percnt<span class='natSep'>&nbsp;&#187; </span>" format="$breadcrumb" separator="<span class='natSep'>&nbsp;&#187; </span>"}% 
    3334 
    3435TopicFunctions to generate html page header information: 
     
    4344 
    4445---+++ Misc 
    45 Definition of DataForms: 
    46    * Set WEBFORMS = Applications.TWikiTopic, Applications.TopicStub 
     46Definition of TWikiForms: 
     47   * Set WEBFORMS = Applications.ClassificationApp.Category, Applications.ClassificationApp.ClassifiedTopic, Applications.ClassificationApp.CategorizedTopic, Applications.ClassificationApp.TaggedTopic 
    4748   * Set FINALPREFERENCES = ATTACHFILESIZELIMIT, WIKIWEBMASTER, WEBCOPYRIGHT, WEBTOPICLIST, DENYWEBVIEW, ALLOWWEBVIEW, DENYWEBCHANGE, ALLOWWEBCHANGE, WEBDB 
    4849 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebStatistics.txt

    r555 r1182  
    55| *Month:* | *Topic <br /> views:* | *Topic <br /> saves:* | *File <br /> uploads:* | *Most popular <br /> topic views:* | *Top contributors for <br /> topic save and uploads:* | 
    66| <!--statDate--> | <!--statViews--> | <!--statSaves--> | <!--statUploads--> | <!--statTopViews--> | <!--statTopContributors--> | 
     7| Sep 2008 |  16 |  2 |  1 | &nbsp;&nbsp;6 [[WebHome]]<br />&nbsp;&nbsp;5 [[IconSet]]<br />&nbsp;&nbsp;3 [[RenderCategory]]<br />&nbsp;&nbsp;1 [[TopicFunction]]<br />&nbsp;&nbsp;1 [[BusinessStructure]] | &nbsp;&nbsp;3 Main.MichaelDaum | 
    78| Apr 2008 |  0 |  0 |  0 |  |  | 
    89| Mar 2008 |  52 |  6 |  0 | &nbsp;15 [[Category]]<br />&nbsp;&nbsp;7 [[RenderCategory]]<br />&nbsp;&nbsp;6 [[WebHome]]<br />&nbsp;&nbsp;6 [[TopicType]]<br />&nbsp;&nbsp;3 [[ClassifiedTopic]]<br />&nbsp;&nbsp;3 [[WebTagCloud]]<br />&nbsp;&nbsp;3 [[RenderClassifiedTopicView]]<br />&nbsp;&nbsp;2 [[NatSkinClassifiedTopicViewTemplate]]<br />&nbsp;&nbsp;2 [[TaggedTopic]]<br />&nbsp;&nbsp;1 [[WebClassSearch]]<br />&nbsp;&nbsp;1 [[CategorizedTopic]] | &nbsp;&nbsp;6 Main.MichaelDaum | 
     
    1112 
    1213__Notes:__ 
    13         * Do not edit this topic, it is updated automatically. (You can also <a href="%SCRIPTURLPATH{"statistics"}%/%BASEWEB%">force</a> an update) 
     14        * Do not edit this topic, it is updated automatically. (You can also <a href="%SCRIPTURLPATH{"statistics"}%/%WEB%/%TOPIC%">force</a> an update) 
    1415        * %SYSTEMWEB%.CompleteDocumentation tells you how to enable the automatic updates of the statistics. 
    1516        * Suggestion: You could archive this topic once a year and delete the previous year's statistics from the table. 
    1617 
    1718%META:FORM{name="Applications.ApplicationTopic"}% 
    18 %META:FIELD{name="TopicType" attributes="M" title="TopicType" value="WebTool"}% 
     19%META:FIELD{name="TopicType" title="TopicType" value="WebTool"}% 
    1920%META:FIELD{name="Summary" attributes="" title="Summary" value="Statistics"}% 
    2021%META:FIELD{name="TWikiApplication" attributes="" title="TWikiApplication" value="TWikiWorkbench"}% 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebTagCloud.txt

    r482 r1182  
    1111%STARTINCLUDE%<!-- applications.classificationapp.webtagcloud --> 
    1212%~~ DBCALL{"Applications.ClassificationApp.RenderWebTagCloud"  
    13 ~~~   QUERY="%URLPARAM{"search"}%"  
     13~~~   KEYWORDS="%URLPARAM{"search"}%"  
     14~~~   TAG="%URLPARAM{"tag"}%"  
    1415~~~   CAT="%URLPARAM{"cat"}%"  
    1516~~~   TOPCAT="%URLPARAM{"topcat" default="%TOPCAT%"}%" 
    1617~~~   EXCLUDECAT="%URLPARAM{"excludecat" default="%EXCLUDECAT%"}%" 
    1718~~~   RECENCY="%URLPARAM{"recency"}%" 
    18 ~~~   MIN="%URLPARAM{"min"}%" 
    19 ~~~   MIN="%MIN%" 
     19~~~   MIN="%URLPARAM{"min" default="%MIN%"}%" 
    2020~~~   CATTITLE="%CATTITLE%" 
    2121~~~   SHOWFILTER="on" 
  • trunk/ClassificationPlugin/data/Applications/ClassificationApp/WebTopicViewTemplate.txt

    r1090 r1182  
    11%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev$"}% 
    22%STARTSECTION{name="message"}% 
    3 ---+ <span class="foswikiAlert">Warning: this page does not exist.</span> 
     3---+ <span class="twikiAlert">Warning: this page does not exist.</span> 
    44 
    55 
  • trunk/ClassificationPlugin/data/TWiki/ClassificationPlugin.txt

    r878 r1182  
    1414<tr> 
    1515  <td><img src="%ATTACHURLPATH%/wikiringlogo40x40.png"></td> 
    16   <td><a href="http://wikiring.de" title="Make your Wiki ring!" style="text-decoration:none"> 
     16  <td><a href="http://wikiring.com" title="Make your Wiki ring!" style="text-decoration:none"> 
    1717      Powered by <br /> <nop>WikiRing Consultants </a> 
    1818  </td> 
     
    2323The ClassificationPlugin is a building block for <nop>TWikiApplications in need of 
    2424tagging and hierarchies. The contained <nop>ClassificationApp is a basic 
    25 categorization and tagging solution for TWiki based on DataForms. 
     25categorization and tagging solution for TWiki based on TWikiForms. 
    2626 
    2727 
  • trunk/ClassificationPlugin/data/_ClassificationTemplate/WebLinks.txt

    r482 r1182  
    33---+ WebLinks for the %WEB% web 
    44 
    5 %STARTINCLUDE%<!-- --> 
     5%STARTINCLUDE%<!-- weblinks --> 
    66   * [[ClassifiedTopic][%MAKETEXT{"New Topic"}%]] 
    77   * [[Category][Categories]] 
     
    1212   * [[WebNotify][%MAKETEXT{"Notifications"}%]] 
    1313   * [[WebStatistics][%MAKETEXT{"Statistics"}%]] 
    14 %IFDEFINEDTHEN{"%IFACCESS{"%BASEWEB%.WebPreferences" type="change"}%" as="1"}% 
    15    * [[WebPreferences][%MAKETEXT{"Preferences"}%]] 
    16 %FIDEFINED%  
    1714%~~ TAGRELATEDTOPICS{"%BASETOPIC%"  
    1815~~~   header="<h2><a name=\"related\">Related Topics</a></h2>$n"  
     
    2219~~~   separator="$n" 
    2320~~~ }% 
    24 <!-- -->%STOPINCLUDE% 
     21<!-- //weblinks -->%STOPINCLUDE% 
  • trunk/ClassificationPlugin/data/_ClassificationTemplate/WebNotify.txt

    r664 r1182  
    55%MAKETEXT{"This is a subscription service to be automatically notified by e-mail when topics change in this [_1] web. This is a convenient service, so you do not have to come back and check all the time if something has changed. To subscribe, please add a bullet with your [_2] in alphabetical order to this list:" args="*<nop>%WEB%*,%SYSTEMWEB%.WikiName"}% 
    66 
    7    * Main.WikiGuest - example@your.company 
     7   * Main.TWikiGuest - example@your.company 
    88 
    99 
  • trunk/ClassificationPlugin/data/_ClassificationTemplate/WebPreferences.txt

    r672 r1182  
    3030*Web*: 
    3131   * #Set DENYWEBVIEW =  
    32    * Set ALLOWWEBVIEW = %MAINWEB%.AdminGroup 
     32   * Set ALLOWWEBVIEW = %MAINWEB%.TWikiAdminGroupGroup 
    3333   * #Set DENYWEBCHANGE =  
    34    * Set ALLOWWEBCHANGE = %MAINWEB%.AdminGroup 
     34   * Set ALLOWWEBCHANGE = %MAINWEB%.TWikiAdminGroupGroup 
    3535   * #Set DENYWEBRENAME =  
    36    * Set ALLOWWEBRENAME = %MAINWEB%.AdminGroup 
     36   * Set ALLOWWEBRENAME = %MAINWEB%.TWikiAdminGroupGroup 
    3737 
    3838*Topic* 
    39    * Set ALLOWTOPICCHANGE = %MAINWEB%.AdminGroup 
    40    * Set ALLOWTOPICRENAME = %MAINWEB%.AdminGroup 
     39   * Set ALLOWTOPICCHANGE = %MAINWEB%.TWikiAdminGroupGroup 
     40   * Set ALLOWTOPICRENAME = %MAINWEB%.TWikiAdminGroupGroup 
    4141 
    4242---++ Finalization 
  • trunk/ClassificationPlugin/data/_ClassificationTemplate/WebStatistics.txt

    r555 r1182  
    77 
    88__Notes:__ 
    9         * Do not edit this topic, it is updated automatically. (You can also <a href="%SCRIPTURLPATH{statistics}%/%WEB%">force</a> an update) 
     9        * Do not edit this topic, it is updated automatically. (You can also <a href="%SCRIPTURLPATH{statistics}%/%WEB%/%TOPIC%">force</a> an update) 
    1010        * %SYSTEMWEB%.CompleteDocumentation tells you how to enable the automatic updates of the statistics. 
    1111        * Suggestion: You could archive this topic once a year and delete the previous year's statistics from the table. 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin.pm

    r1050 r1182  
    1919use vars qw(  
    2020  $VERSION $RELEASE $NO_PREFS_IN_TOPIC $SHORTDESCRIPTION 
    21   $doneHeader $doneInit $baseTopic $baseWeb 
     21  $doneHeader $doneInit $baseTopic $baseWeb $header 
    2222); 
    2323 
     
    2626$NO_PREFS_IN_TOPIC = 1; 
    2727$SHORTDESCRIPTION = 'A topic classification plugin and application'; 
     28   
     29$header = <<'HERE'; 
     30<link rel="stylesheet" href="%PUBURL%/%SYSTEMWEB%/ClassificationPlugin/styles.css" type="text/css" media="all" /> 
     31<script type="text/javascript" src="%PUBURL%/%SYSTEMWEB%/ClassificationPlugin/classification.js"></script> 
     32HERE 
     33   
    2834 
    2935############################################################################### 
     
    6874############################################################################### 
    6975sub commonTagsHandler { 
    70  
    7176  return if $doneHeader; 
    72  
    73   my $link =  
    74     '<link rel="stylesheet" '. 
    75     'href="%PUBURL%/%SYSTEMWEB%/ClassificationPlugin/styles.css" '. 
    76     'type="text/css" media="all" />' . "\n" . 
    77     '<script type="text/javascript" ' . 
    78     'src="%PUBURL%/%SYSTEMWEB%/ClassificationPlugin/classification.js">' . 
    79     '</script>'; 
    80    
    81   if ($_[0] =~ s/<head>(.*?[\r\n]+)/<head>$1$link\n/o) { 
    82     $doneHeader = 1; 
    83   } 
     77  $doneHeader = 1 if $_[0] =~ s/<head>(.*?[\r\n]+)/<head>$1$header/o; 
    8478} 
    8579 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/Access.pm

    r1050 r1182  
    1818use TWiki::Plugins::ClassificationPlugin; 
    1919 
    20 use constant  DEBUG => 1; # toggle m 
     20use constant  DEBUG => 0; # toggle m 
    2121 
    2222use constant NO_CATACL => 0; 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/Category.pm

    r1050 r1182  
    5858  my $this = shift; 
    5959 
    60   #writeDebug("purging category cache for $this->{name}"); 
     60  writeDebug("purging category cache for $this->{name}"); 
    6161  undef $this->{_topics}; 
     62  undef $this->{_tags}; 
    6263  undef $this->{_prefs}; 
    6364  undef $this->{_subsumes}; 
     
    7576  my $this = shift; 
    7677 
    77   $this->purgeCache(); 
    7878  undef $this->{icon}; 
    7979  undef $this->{parents}; 
     
    8686  my $this = shift; 
    8787 
    88   #writeDebug("init category $this->{name}"); 
     88  writeDebug("init category $this->{name}"); 
    8989  foreach my $name (keys %{$this->{parents}}) { 
    9090    my $parent = $this->{parents}{$name}; 
     
    255255  unless (defined($this->{_topics})) { 
    256256 
    257     writeDebug("refreshing _topics in $this->{name}"); 
     257    #writeDebug("refreshing _topics in $this->{name}"); 
    258258 
    259259    my $hierarchy = $this->{hierarchy}; 
     
    289289 
    290290############################################################################### 
     291sub getTagsOfTopics { 
     292  my $this = shift; 
     293 
     294  unless (defined($this->{_tags})) { 
     295    writeDebug("gathering tags in category $this->{name}"); 
     296    my %tags; 
     297    my $hierarchy = $this->{hierarchy}; 
     298    my $db = TWiki::Plugins::DBCachePlugin::Core::getDB($hierarchy->{web}); 
     299    foreach my $topic ($this->getTopics()) { 
     300      my $topicObj = $db->fastget($topic); 
     301      next unless $topicObj; 
     302      my $form = $topicObj->fastget("form"); 
     303      next unless $form; 
     304      $form = $topicObj->fastget($form); 
     305      next unless $form; 
     306      my $tags = $form->fastget('Tag'); 
     307      next unless $tags; 
     308      foreach my $tag (split(/\s*,\s*/, $tags)) { 
     309        $tags{$tag}++; 
     310      } 
     311    } 
     312    %{$this->{_tags}} = %tags; 
     313  } 
     314 
     315  return keys %{$this->{_tags}}; 
     316} 
     317 
     318############################################################################### 
    291319# register a subcategory 
    292320sub addChild { 
     
    307335sub setSummary { 
    308336  my ($this, $summary) = @_; 
    309   $summary = TWiki::urlDecode($summary); 
     337  $summary = urlDecode($summary); 
    310338  $this->{summary} = $summary; 
    311339  $this->{gotUpdate} = 1; 
     
    316344sub setTitle { 
    317345  my ($this, $title) = @_; 
    318   $title = TWiki::urlDecode($title); 
     346  $title = urlDecode($title); 
    319347  $this->{title} = $title; 
    320348  $this->{gotUpdate} = 1; 
     
    408436  $seen ||= {}; 
    409437 
    410   #writeDebug("called importCategories($impCats)"); 
    411438  #writeDebug("already seen=".join(',', sort keys %$seen)); 
    412439 
     
    418445    $impWeb =~ s/\//\./go; 
    419446    next unless TWiki::Func::webExists($impWeb); 
     447 
     448    # prevent deep recursion importing from the same web 
     449    next if $thisWeb eq $impWeb; 
    420450 
    421451    # SMELL: prevent deep recursion of two webs importing each other's categories 
     
    430460      my $name = $impChild->{name}; 
    431461      next if $name eq 'BottomCategory'; 
    432  
    433462      next if $seen->{$name}; 
    434463      $seen->{$name} = 1; 
     464      next if TWiki::Func::topicExists($thisWeb, $name); 
     465 
    435466      #writeDebug("importing category $name from $impChild->{hierarchy}->{web}"); 
    436467      my %parents = map {$_->{name}=>1} $impChild->getParents(); 
     
    451482 
    452483  $this->{gotUpdate} = 1; 
    453   #writeDebug("done importCategories()"); 
    454484} 
    455485 
     
    476506  my $icon = $this->{icon} || 'folder.gif'; 
    477507 
     508  my $pubUrlPath = $TWiki::cfg{PubUrlPath} || $Foswiki::cfg{PubUrlPath}; 
     509 
    478510  return  
    479     $TWiki::cfg{PubUrlPath}. 
     511    $pubUrlPath. 
    480512    '/Applications/ClassificationApp/IconSet/'. 
    481513    $icon; 
     
    487519  my $this = shift; 
    488520 
    489   return "<a href='".$this->getUrl()."'>$this->{title}</a>"; 
     521  return "<a href='".$this->getUrl()."'><noautolink>$this->{title}</noautolink></a>"; 
    490522} 
    491523 
     
    497529  if ($hierWeb ne $this->{origWeb}) { 
    498530    return TWiki::Func::getScriptUrl($hierWeb,  
    499       'Category', 'view', name=>$this->{name}); 
     531      'Category', 'view', catname=>$this->{name}); 
    500532  } 
    501533 
     
    533565 
    534566############################################################################### 
    535 sub toHTML { 
     567sub traverse { 
    536568  my ($this, $params, $nrCalls, $index, $nrSiblings, $seen, $depth) = @_; 
    537569 
     
    548580 
    549581  #return '' unless $this->checkAccessPermission(); 
     582  $$nrCalls++; 
    550583 
    551584  my $header = $params->{header} || ''; 
     
    557590    unless defined $format; 
    558591 
    559   #writeDebug("toHTML() nrCalls=$$nrCalls, name=$this->{name}"); 
    560592 
    561593  # format sub-categories 
    562   my @children = sort {$a->{name} cmp $b->{name}} $this->getChildren(); 
    563   my $nrChildren = @children-1; 
     594  my @children =  
     595    map {$this->{children}{$_}} 
     596    grep {!/^BottomCategory$/} 
     597    sort {$a cmp $b}  
     598    keys %{$this->{children}}; 
     599  my $nrChildren = @children; 
    564600  my $childIndex = 1; 
    565601  my @subResult; 
     602 
     603  #writeDebug("traverse() nrCalls=$$nrCalls, depth=$depth, name=$this->{name} nrChildren=$nrChildren"); 
     604  #writeDebug("children=".join(', ', @children)); 
    566605 
    567606  my $open = $params->{open}; 
     
    569608  if ($open) { 
    570609    $doChildren = 0; 
    571     foreach my $opener (split(/\s*,\s*/, $open)) { 
    572       if ($this->{hierarchy}->subsumes($this, $opener)) { 
    573         $doChildren = 1; 
    574         last; 
     610    if ($nrChildren) { 
     611      foreach my $opener (split(/\s*,\s*/, $open)) { 
     612        #writeDebug("checking at $this->{name} opener '$opener'"); 
     613        if ($this->subsumes($opener)) { 
     614          $doChildren = 1; 
     615          last; 
     616        } 
    575617      } 
    576618    } 
     
    578620 
    579621  if ($doChildren) { 
     622    #writeDebug("doing children"); 
    580623    foreach my $child (@children) { 
    581624      next if $child->{name} eq 'BottomCategory'; 
    582       my $childResult = $child->toHTML($params, $nrCalls, $childIndex, $nrChildren, $seen, $depth+1); 
     625      my $childResult = $child->traverse($params, $nrCalls, $childIndex, $nrChildren, $seen, $depth+1); 
    583626      push @subResult, $childResult if $childResult; 
    584627      $childIndex++; 
     628    } 
     629  } else { 
     630    #writeDebug("not decending at $this->{name}"); 
     631    if ($nrChildren) { 
     632      my $placeholder = $params->{placeholder}; 
     633      push @subResult, $placeholder if $placeholder; 
    585634    } 
    586635  } 
     
    592641  } 
    593642 
    594   $seen->{$this} = 0; 
     643  my $unique = $params->{unique} || 'off'; 
     644  $seen->{$this} = 0 unless $unique eq 'on'; 
    595645 
    596646  my $minDepth = $params->{mindepth}; 
     
    615665 
    616666  my $nrTopics = scalar(keys %{$this->{_topics}}); 
    617   my $nrSubcats = scalar(grep !/^BottomCategory$/, keys %{$this->{children}}); 
    618667  my $isCyclic = 0; 
    619668  $isCyclic = $this->isCyclic() if $format =~ /\$cyclic/; 
     
    624673  my $iconUrl = $this->getIconUrl(); 
    625674 
     675  my $tags = ''; 
     676  if ($header =~ /\$tags/ || 
     677      $footer =~ /\$tags/ || 
     678      $format =~ /\$tags/) { 
     679    writeDebug("getting tags"); 
     680    my @tags = $this->getTagsOfTopics(); 
     681    $tags = join(', ', @tags); 
     682  } 
    626683 
    627684  if ($subResult) { 
     
    633690      'summary'=>$this->{summary}, 
    634691      'title'=>$this->{title}, 
    635       'children'=>$subResult, 
    636692      'siblings'=>$nrSiblings, 
    637693      'count'=>$nrTopics, 
    638694      'index'=>$index, 
    639       'subcats'=>$nrSubcats, 
    640       'call'=>$$nrCalls++, 
     695      'subcats'=>$nrChildren, 
     696      'call'=>$$nrCalls, 
    641697      'leafs'=>$nrLeafs, 
    642698      'cyclic'=>$isCyclic, 
     
    645701      'indent'=>$indent, 
    646702      'icon'=>$iconUrl, 
     703      'tags'=>$tags, 
    647704    ); 
    648705    $footer = TWiki::Plugins::ClassificationPlugin::Core::expandVariables($footer, 
     
    653710      'summary'=>$this->{summary}, 
    654711      'title'=>$this->{title}, 
    655       'children'=>$subResult, 
    656712      'siblings'=>$nrSiblings, 
    657713      'count'=>$nrTopics, 
    658714      'index'=>$index, 
    659       'subcats'=>$nrSubcats, 
    660       'call'=>$$nrCalls++, 
     715      'subcats'=>$nrChildren, 
     716      'call'=>$$nrCalls, 
    661717      'leafs'=>$nrLeafs, 
    662718      'cyclic'=>$isCyclic, 
     
    665721      'indent'=>$indent, 
    666722      'icon'=>$iconUrl, 
     723      'tags'=>$tags, 
    667724    ); 
    668725    $subResult = $header.$subResult.$footer; 
     726  } 
     727 
     728  my $tagFilter = $params->{tags}; 
     729  if ($tagFilter) { 
     730    writeDebug("tagFilter=$tagFilter"); 
     731    $this->getTagsOfTopics(); 
     732    foreach my $tag (split(/\s*,\s*/, $tagFilter)) { 
     733      return $subResult unless defined $this->{_tags}{$tag}; 
     734    } 
    669735  } 
    670736 
     
    684750    'count'=>$nrTopics, 
    685751    'index'=>$index, 
    686     'subcats'=>$nrSubcats, 
    687     'call'=>$$nrCalls++, 
     752    'subcats'=>$nrChildren, 
     753    'call'=>$$nrCalls, 
    688754    'leafs'=>$nrLeafs, 
    689755    'cyclic'=>$isCyclic, 
     
    692758    'indent'=>$indent, 
    693759    'icon'=>$iconUrl, 
     760    'tags'=>$tags, 
    694761  ); 
    695762} 
    696763 
     764############################################################################### 
     765# from TWiki.pm 
     766sub urlDecode { 
     767    my $text = shift; 
     768 
     769    $text =~ s/%([\da-f]{2})/chr(hex($1))/gei; 
     770 
     771    return $text; 
     772} 
     773 
    6977741; 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/Core.pm

    r1050 r1182  
    11# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/ 
    22# 
    3 # Copyright (C) 2006-2007 Michael Daum http://michaeldaumconsulting.com 
     3# Copyright (C) 2006-2008 Michael Daum http://michaeldaumconsulting.com 
    44#  
    55# This program is free software; you can redistribute it and/or 
     
    1717use strict; 
    1818 
    19 use vars qw(%hierarchies $baseWeb $baseTopic); 
     19use vars qw(%hierarchies %timeStamps $baseWeb $baseTopic  
     20  $purgeMode 
     21  @touchedCats 
     22); 
    2023 
    2124use constant DEBUG => 0; # toggle me 
     25use constant FIXFORMFIELDS => 1; # work around a but in TWiki <= 4.2.3  
    2226 
    2327############################################################################### 
     
    3034  ($baseWeb, $baseTopic) = @_; 
    3135 
    32   %hierarchies = (); 
     36  $purgeMode = 0; 
     37  @touchedCats = (); 
     38 
     39  #%hierarchies = (); 
     40  #%timeStamps = (); 
    3341} 
    3442 
     
    3644sub finish { 
    3745 
     46  writeDebug("called finish()"); 
    3847  foreach my $hierarchy (values %hierarchies) { 
    3948    next unless defined $hierarchy; 
    4049    $hierarchy->finish(); 
    41     undef $hierarchies{$hierarchy->{web}}; 
    42   } 
     50    #undef $hierarchies{$hierarchy->{web}}; 
     51    #undef $timeStamps{$hierarchy->{web}}; 
     52  } 
     53  writeDebug("done finish()"); 
    4354} 
    4455 
     
    296307 
    297308  my $hierarchy = getHierarchy($thisWeb); 
    298   return $hierarchy->toHTML($params); 
     309  return $hierarchy->traverse($params); 
    299310} 
    300311 
     
    518529 
    519530  my $hierarchy = getHierarchy($thisWeb); 
     531  #writeDebug("thisWeb=$thisWeb, thisTopic=$thisTopic"); 
    520532  return '' unless $hierarchy; 
    521533 
     
    532544 
    533545  my @categories = keys %$categories; 
    534   #@categories = grep (!/^(TopCategory|BottomCategory)$/, @categories); 
     546  #writeDebug("categories=".join(', ', @categories)); 
    535547  return '' unless @categories; 
    536548   
     
    542554    } 
    543555    my $category = $hierarchy->getCategory($catName); 
    544     unless ($category) { 
    545       writeDebug("Woops: there's no category '$catName' ... found in $thisTopic"); 
    546       next; 
    547     } 
    548  
     556    next unless $category; 
     557    #writeDebug("found $category"); 
    549558 
    550559    # skip catinfo from another branch of the hierarchy 
     
    554563 
    555564    my $parents = ''; 
     565    my @parents; 
     566    if ($line =~ /\$parent/) { 
     567      @parents = sort {uc($a->{title}) cmp uc($b->{title})} $category->getParents(); 
     568    } 
    556569    if ($line =~ /\$parents?\b/) { 
    557570      my @links = (); 
    558       foreach my $parent ($category->getParents()) { 
     571      foreach my $parent (@parents) { 
    559572        push @links, $parent->getLink(); 
    560573      } 
    561       $parents = join(', ', @links); 
     574      $parents = join($theSep, @links); 
    562575    } 
    563576 
     
    565578    if ($line =~ /\$parents?names?/) { 
    566579      my @names = (); 
    567       foreach my $parent ($category->getParents()) { 
     580      foreach my $parent (@parents) { 
    568581        push @names, $parent->{name}; 
    569582      } 
    570       $parentsName = join(', ', @names); 
     583      $parentsName = join($theSep, @names); 
    571584    } 
    572585 
     
    574587    if ($line =~ /\$parents?title/) { 
    575588      my @titles = (); 
    576       foreach my $parent ($category->getParents()) { 
     589      foreach my $parent (@parents) { 
    577590        push @titles, $parent->{title}; 
    578591      } 
    579       $parentsTitle = join(', ', @titles); 
     592      $parentsTitle = join($theSep, @titles); 
    580593    } 
    581594 
     
    583596    if ($line =~ /\$parents?links?/) { 
    584597      my @links = (); 
    585       foreach my $parent ($category->getParents()) { 
     598      foreach my $parent (@parents) { 
    586599        push @links, $parent->getLink(); 
    587600      } 
    588       $parentLinks = join(', ', @links); 
     601      $parentLinks = join($theSep, @links); 
    589602    } 
    590603 
     
    592605    if ($line =~ /\$parents?urls?/) { 
    593606      my @urls = (); 
    594       foreach my $parent ($category->getParents()) { 
     607      foreach my $parent (@parents) { 
    595608        push @urls, $parent->getUrl(); 
    596609      } 
    597       $parentUrls = join(', ', @urls); 
     610      $parentUrls = join($theSep, @urls); 
     611    } 
     612 
     613    my $breadCrumbs = ''; 
     614    if ($line =~ /\$breadcrumbs?/) { 
     615      my @breadCrumbs = (); 
     616      my $parent = $category; 
     617      my %seen = (); 
     618      while ($parent) { 
     619        last if $seen{$parent}; 
     620        $seen{$parent} = 1; 
     621        push @breadCrumbs, $parent->getLink(); 
     622        my @parents = $parent->getParents(); 
     623        last unless @parents; 
     624        $parent = shift @parents; 
     625        last if $parent eq $parent->{hierarchy}{_top}; 
     626      } 
     627      $breadCrumbs = join($theSep, reverse @breadCrumbs); 
    598628    } 
    599629 
     
    601631    my $moreChildren = ''; 
    602632    if ($line =~ /\$children/) { 
    603       @children = $category->getChildren(); 
    604       @children = grep {$_->{name} ne 'BottomCategory'}  
    605         @children; 
     633      @children = sort {uc($a->{title}) cmp uc($b->{title})} $category->getChildren(); 
     634      @children = grep {$_->{name} ne 'BottomCategory'} @children; 
    606635 
    607636      if ($theHideNull eq 'on') { 
     
    630659        push @links, $child->getLink(); 
    631660      } 
    632       $children = join(', ', @links); 
     661      $children = join($theSep, @links); 
    633662    } 
    634663 
     
    639668        push @names, $child->{name}; 
    640669      } 
    641       $childrenName = join(', ', @names); 
     670      $childrenName = join($theSep, @names); 
    642671    } 
    643672 
     
    648677        push @titles, $child->{title}; 
    649678      } 
    650       $childrenTitle = join(', ', @titles); 
     679      $childrenTitle = join($theSep, @titles); 
    651680    } 
    652681 
     
    657686        push @links, $child->getLink(); 
    658687      } 
    659       $childrenLinks = join(', ', @links); 
     688      $childrenLinks = join($theSep, @links); 
    660689    } 
    661690 
     
    666695        push @urls, $child->getUrl(); 
    667696      } 
    668       $childrenUrls = join(', ', @urls); 
    669     } 
     697      $childrenUrls = join($theSep, @urls); 
     698    } 
     699 
     700    my $tags = ''; 
     701    if ($line =~ /\$tags/) { 
     702      $tags = join($theSep, sort $category->getTagsOfTopics()); 
     703    } 
     704 
    670705 
    671706    my $isCyclic = 0; 
     
    697732    $line =~ s/\$cyclic/$isCyclic/g; 
    698733    $line =~ s/\$leafs/$countLeafs/g; 
    699  
     734    $line =~ s/\$breadcrumbs?/$breadCrumbs/g; 
    700735    $line =~ s/\$children?name/$childrenName/g; 
    701736    $line =~ s/\$children?title/$childrenTitle/g; 
     
    704739    $line =~ s/\$children?/$children/g; 
    705740    $line =~ s/\$icon/$iconUrl/g; 
     741    $line =~ s/\$tags/$tags/g; 
    706742    push @result, $line; 
    707743  } 
     
    751787    $tag =~ s/\s+$//go; 
    752788    my $line = $theFormat; 
    753     my $url = TWiki::Func::getScriptUrl($thisWeb, "WebTagCloud", "view", search=>$tag); 
    754     my $link = "<a href='$url'>$tag</a>"; 
     789    my $url = TWiki::Func::getScriptUrl($thisWeb, "WebTagCloud", "view", tag=>$tag); 
     790    my $link = "<a href='$url'><noautolink>$tag</noautolink></a>"; 
    755791    $line =~ s/\$url/$url/g; 
    756792    $line =~ s/\$link/$link/g; 
     
    773809 
    774810  writeDebug("beforeSaveHandler($web, $topic)"); 
     811 
    775812  my $doAutoReparent = TWiki::Func::getPreferencesFlag('CLASSIFICATIONPLUGIN_AUTOREPARENT', $web); 
    776813  $doAutoReparent = 1 unless defined $doAutoReparent; 
     
    779816    my $session = $TWiki::Plugins::SESSION; 
    780817    $meta = new TWiki::Meta($session, $web, $topic, $text); 
     818    writeDebug("creating a new meta object"); 
     819  } 
     820 
     821  # There's a serious bug in all TWiki's that it rewrites all of the 
     822  # topic text - including the meta data - if a topic gets moved to 
     823  # a different web. In an attempt to keep linking WikiWords intact, 
     824  # it rewrites the TWikiForm, i.e. the names and titles of the 
     825  # formfields. This however breaks mostly every code that relies 
     826  # on the formfields to be named like they where in the beginning. 
     827  # AFAICS, there's no case where renaming the formfield names is 
     828  # desired. 
     829  # 
     830  # What we do here is to loop pre-process the topic being saved right here 
     831  # and remove any leading webname from the those formfields 
     832  # playing a central role in this plugin, TopicType and Category. 
     833  #  
     834  if (FIXFORMFIELDS) { 
     835    #if (DEBUG) { 
     836    #  use Data::Dumper; 
     837    #  $Data::Dumper::Maxdepth = 3; 
     838    #  writeDebug("BEFORE FIXFORMFIELDS"); 
     839    #  writeDebug(Dumper($meta)); 
     840    #} 
     841 
     842    foreach my $field ($meta->find('FIELD')) { 
     843      my $name = $field->{name}; 
     844      my $title = $field->{title}; 
     845      if ($field->{name} =~ /TopicType|Category/) { 
     846        $field->{name} =~ s/^.*[\.\/](.*?)$/$1/; 
     847        $field->{title} =~ s/^.*[\.\/](.*?)$/$1/; 
     848        writeDebug("APPLYING FIX for formfield $name"); 
     849      } 
     850    } 
     851 
     852    #if (DEBUG) { 
     853    #  use Data::Dumper; 
     854    #  $Data::Dumper::Maxdepth = 3; 
     855    #  writeDebug("AFTER FIXFORMFIELDS"); 
     856    #  writeDebug(Dumper($meta)); 
     857    #} 
     858  } 
     859 
     860  my $trashWeb = $Foswiki::cfg{TrashWebName} || $TWiki::cfg{TrashWebName}; 
     861  if ($web eq $trashWeb) { 
     862    writeDebug("detected a move from $baseWeb to trash"); 
     863    $web = $baseWeb;# operations are on the baseWeb 
    781864  } 
    782865 
     
    786869  $topicType = $topicType->{value}; 
    787870 
     871  # fix topic type depending on the form 
     872  my $formName = $meta->getFormName(); 
     873  my @topicType = split(/\s*,\s*/, $topicType); 
     874  my %newTopicType = map {$_ => 1} @topicType; 
     875 
     876  if ($formName =~ /^Applications[\.\/]ClassificationApp[\.\/]Category$/ &&  
     877    !($topicType =~ /\bCategory\b/ && $topicType =~ /\bCategorizedTopic\b/)) { 
     878    $newTopicType{Category} = 1; 
     879    $newTopicType{CategorizedTopic} = 1; 
     880  }  
     881  elsif ($formName =~ /^Applications[\.\/]ClassificationApp[\.\/]CategorizedTopic$/ &&  
     882    $topicType !~ /\bCategorizedTopic\b/) { 
     883    %newTopicType = map {$_ => 1} split(/\s*,\s*/, $topicType); 
     884    $newTopicType{CategorizedTopic} = 1; 
     885  } 
     886  elsif ($formName =~ /^Applications[\.\/]ClassificationApp[\.\/]TaggedTopic$/ &&  
     887    $topicType !~ /\bTaggedTopic\b/) { 
     888    %newTopicType = map {$_ => 1} split(/\s*,\s*/, $topicType); 
     889    $newTopicType{TaggedTopic} = 1; 
     890  } 
     891  elsif ($formName =~ /^Applications[\.\/]ClassificationApp[\.\/]ClassifiedTopic$/ &&  
     892    !($topicType =~ /\bClassifiedTopic\b/ && $topicType =~ /\bCategorizedTopic\b/ && $topicType =~ /\bTaggedTopic\b/)) { 
     893    %newTopicType = map {$_ => 1} split(/\s*,\s*/, $topicType); 
     894    $newTopicType{CategorizedTopic} = 1; 
     895    $newTopicType{ClassifiedTopic} = 1; 
     896    $newTopicType{TaggedTopic} = 1; 
     897  } 
     898  if ($formName !~ /^Applications[\.\/]TopicStub$/) { 
     899    delete $newTopicType{TopicStub}; 
     900  } 
     901  if (keys %newTopicType) { 
     902    my @newTopicType; 
     903    foreach my $item (@topicType) { 
     904      next unless defined $newTopicType{$item}; 
     905      push @newTopicType, $item; 
     906      delete $newTopicType{$item}; 
     907    } 
     908    foreach my $item (keys %newTopicType) { 
     909      push @newTopicType, $item; 
     910    } 
     911    my $newTopicType = join(', ', @newTopicType); 
     912    $meta->putKeyed('FIELD', {name =>'TopicType', title=>'TopicType', value=>$newTopicType}); 
     913  } 
     914 
     915  # get categories of this topic, 
     916  # must get it from current meta data 
     917 
     918  return unless $topicType =~ /ClassifiedTopic|CategorizedTopic|Category|TaggedTopic/; 
     919 
     920  my $hierarchy = getHierarchy($web); 
     921  my $catFields = $hierarchy->getCatFields(split(/\s*,\s*/,$topicType)); 
     922 
     923  # get new categories from meta data 
     924  my %newCats; 
     925  foreach my $field (@$catFields) { 
     926    my $cats = $meta->get('FIELD',$field); 
     927    next unless $cats; 
     928 
     929    my $title = $cats->{title}; 
     930    $cats = $cats->{value}; 
     931    next unless $cats; 
     932 
     933    # assigning TopCategory only empties the cat field 
     934    if ($cats eq 'TopCategory') { 
     935      writeDebug("found TopCategory assignment"); 
     936      $meta->putKeyed('FIELD', {name =>$field, title=>$title, value=>''}); 
     937      next; 
     938    } 
     939 
     940    foreach my $cat (split(/\s*,\s*/,$cats)) { 
     941      $cat =~ s/^\s+//go; 
     942      $cat =~ s/\s+$//go; 
     943      $newCats{$cat} = 1; 
     944    } 
     945  } 
     946 
     947  # get old categories from store  
     948  my $db = TWiki::Plugins::DBCachePlugin::Core::getDB($web); 
     949  my $topicObj = $db->fastget($topic); 
     950  my %oldCats; 
     951  if (!$topicObj) { 
     952    $purgeMode = 2; # new topic 
     953  } else { 
     954    my $form = $topicObj->fastget("form"); 
     955 
     956    if (!$form) { 
     957      $purgeMode = 2; # new form 
     958    } else { 
     959      $form = $topicObj->fastget($form); 
     960       
     961      foreach my $field (@$catFields) { 
     962        my $cats = $form->fastget($field); 
     963        next unless $cats; 
     964        foreach my $cat (split(/\s*,\s*/,$cats)) { 
     965          $cat =~ s/^\s+//go; 
     966          $cat =~ s/\s+$//go; 
     967          $oldCats{$cat} = 1; 
     968        } 
     969      } 
     970    } 
     971  } 
     972 
     973  # set the new parent topic 
    788974  if ($doAutoReparent) { 
    789  
    790     # get categories of this topic, 
    791     # must get it from current meta data 
    792     return unless $topicType =~ /ClassifiedTopic|CategorizedTopic|Category/; 
    793  
    794     my @allCats; 
    795     my $hierarchy = getHierarchy($web); 
    796     my $catFields = $hierarchy->getCatFields(split(/\s*,\s*/,$topicType)); 
    797  
    798     # get categories from meta data 
    799     foreach my $field (@$catFields) { 
    800       my $cats = $meta->get('FIELD',$field); 
    801       next unless $cats; 
    802       $cats = $cats->{value}; 
    803       next unless $cats; 
    804       foreach my $cat (split(/\s*,\s*/,$cats)) { 
    805         $cat =~ s/^\s+//go; 
    806         $cat =~ s/\s+$//go; 
    807         push @allCats, $cat; 
    808       } 
    809     } 
    810  
    811     # set the new parent topic 
    812     if (@allCats) { 
    813       @allCats = sort @allCats; 
    814       my $firstCat = shift @allCats; 
    815       # TODO: check if the firstCat exists and only then set the parent 
    816       # don't autoset to HomeTopic if TopCategory 
    817       $firstCat = $TWiki::cfg{HomeTopic} if $firstCat eq 'TopCategory'; 
    818       $meta->remove('TOPICPARENT'); 
    819       $meta->putKeyed('TOPICPARENT', {name=>$firstCat}); 
    820  
    821     } else { 
    822       #$meta->putKeyed('TOPICPARENT', {name=>''}); 
    823     } 
     975    writeDebug("autoreparenting"); 
     976    my $newParentCat; 
     977    foreach my $cat (sort keys %newCats) { 
     978      if ($cat ne 'TopCategory') { 
     979        $newParentCat = $cat; 
     980        last; 
     981      } 
     982    } 
     983    my $homeTopicName = $Foswiki::cfg{HomeTopicName} || $TWiki::cfg{HomeTopicName}; 
     984    $newParentCat = $homeTopicName unless defined $newParentCat; 
     985    writeDebug("newParentCat=$newParentCat"); 
     986    $meta->remove('TOPICPARENT'); 
     987    $meta->putKeyed('TOPICPARENT', {name=>$newParentCat}); 
    824988  } else { 
    825989    writeDebug("not autoreparenting"); 
    826990  } 
    827991 
    828   # cache invalidation 
    829   my $mode = 0; 
    830   $mode = 1 if $topicType =~ /\bTaggedTopic\b/; 
    831   $mode = 2 if $topicType =~ /\bCategorizedTopic\b/; 
    832   $mode = 3 if $topicType =~ /\bClassifiedTopic\b/; 
    833   $mode = 4 if $topicType =~ /\bCategory\b/; 
     992  # get touched categories 
     993  my %touchedCats; 
     994  foreach my $cat (keys %oldCats) { 
     995    $touchedCats{$cat} = 1; 
     996  } 
     997  foreach my $cat (keys %newCats) { 
     998    $touchedCats{$cat} = 1; 
     999  } 
     1000  $touchedCats{$topic} = 1 if $topicType =~ /\bCategory\b/; 
     1001 
     1002  @touchedCats = keys %touchedCats; #remember  
     1003 
     1004  # cache invalidation: compute the purgeMode to be executed after save 
     1005  $purgeMode = 1 if $topicType =~ /\bTaggedTopic\b/; 
     1006  $purgeMode = 2 if $topicType =~ /\bCategorizedTopic\b/; 
     1007  $purgeMode = 3 if $topicType =~ /\bClassifiedTopic\b/; 
     1008  $purgeMode = 4 if $topicType =~ /\bCategory\b/; 
    8341009 
    8351010  # try even harder if it missing the CategorizedTopic TopicType but 
    8361011  # still uses categories 
    837   if ($mode < 2) {  
     1012  if ($purgeMode < 2) {  
    8381013    my $hierarchy = getHierarchy($web);  
    8391014    my $catFields = $hierarchy->getCatFields(split(/\s*,\s*/,$topicType)); 
    8401015    if ($catFields && @$catFields) { 
    841       $mode = ($mode < 1)?2:3; 
    842     } 
    843   } 
    844  
    845   writeDebug("mode=$mode"); 
    846  
    847   if ($mode) { 
    848     my $hierarchy; 
    849  
    850     $hierarchy = getHierarchy($web); 
    851     $hierarchy->purgeCache($mode); 
    852 #    $hierarchy->init(); 
    853   } 
     1016      $purgeMode = ($purgeMode < 1)?2:3; 
     1017    } 
     1018  } 
     1019 
     1020  writeDebug("purgeMode=$purgeMode"); 
     1021  writeDebug("touchedCats=".join(',', @touchedCats)); 
    8541022} 
    8551023 
     
    8571025sub afterSaveHandler { 
    8581026  #my ($text, $topic, $web, $meta) = @_; 
     1027  my $topic = $_[1]; 
     1028  my $web = $_[2]; 
     1029 
     1030  writeDebug("afterSaveHandler($web, $topic)"); 
     1031 
     1032  my $trashWeb = $Foswiki::cfg{TrashWebName} || $TWiki::cfg{TrashWebName}; 
     1033  if ($web eq $trashWeb) { 
     1034    writeDebug("detected a move from $baseWeb to trash"); 
     1035    $web = $baseWeb;# operations are on the baseWeb 
     1036  } 
     1037  
     1038  if ($purgeMode) { 
     1039    writeDebug("purging hierarchy $web"); 
     1040    my $hierarchy; 
     1041 
     1042    $hierarchy = getHierarchy($web); 
     1043    $hierarchy->purgeCache($purgeMode, \@touchedCats); 
     1044  } 
    8591045 
    8601046  finish(); # not called by modifyHeaderHandler 
     
    9441130} 
    9451131 
     1132################################################################################ 
     1133sub getCacheFile { 
     1134  my $web = shift; 
     1135 
     1136  $web =~ s/^\s+//go; 
     1137  $web =~ s/\s+$//go; 
     1138  $web =~ s/[\/\.]/_/go; 
     1139 
     1140  return TWiki::Func::getWorkArea("ClassificationPlugin").'/'.$web.'.hierarchy'; 
     1141} 
     1142 
     1143############################################################################### 
     1144sub getModificationTime { 
     1145  my $web = shift; 
     1146 
     1147  my $cacheFile = getCacheFile($web); 
     1148  my @stat = stat($cacheFile); 
     1149 
     1150  return $stat[9] || $stat[10] || 0; 
     1151} 
     1152 
     1153############################################################################### 
     1154sub isUpToDate { 
     1155  my $web = shift; 
     1156 
     1157  return 0 if !$timeStamps{$web} || $timeStamps{$web} < getModificationTime($web); 
     1158  return 1; 
     1159} 
    9461160 
    9471161############################################################################### 
     
    9511165  my $web = shift; 
    9521166 
    953   unless (defined $hierarchies{$web}) { 
     1167  $web =~ s/\//\./go; 
     1168  unless (isUpToDate($web)) { 
     1169    writeDebug("constructing hierarchy for $web"); 
    9541170    require TWiki::Plugins::ClassificationPlugin::Hierarchy; 
    9551171    $hierarchies{$web} = new TWiki::Plugins::ClassificationPlugin::Hierarchy($web); 
     1172    $timeStamps{$web} = time(); 
     1173    writeDebug("DONE constructing hierarchy for $web"); 
    9561174  } 
    9571175 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/Hierarchy.pm

    r1090 r1182  
    2121require TWiki::Prefs; 
    2222 
    23 use constant OBJECTVERSION => 0.49; 
     23use constant OBJECTVERSION => 0.51; 
    2424use constant DEBUG => 0; # toggle me 
    2525 
     
    3434 
    3535################################################################################ 
    36 # static 
    37 sub getCacheFile { 
    38   my $web = shift; 
    39  
    40   $web =~ s/^\s+//go; 
    41   $web =~ s/\s+$//go; 
    42   $web =~ s/[\/\.]/_/go; 
    43  
    44   return TWiki::Func::getWorkArea("ClassificationPlugin").'/'.$web.'.hierarchy'; 
    45 } 
    46  
    47 ################################################################################ 
    4836# constructor 
    4937sub new { 
     
    5442  #writeDebug("new hierarchy for web $web"); 
    5543  my $this; 
    56   my $cacheFile = getCacheFile($web); 
     44  my $cacheFile = TWiki::Plugins::ClassificationPlugin::Core::getCacheFile($web); 
    5745   
    5846  my $session = $TWiki::Plugins::SESSION; 
    5947  my $refresh = ''; 
    60   $refresh = $session->{cgiQuery}->param('refresh') || '' if defined $session; 
     48  my $query = TWiki::Func::getCgiQuery(); 
     49  $refresh = $query->param('refresh') || '' if defined $session; 
    6150  $refresh = $refresh eq 'on'?1:0; 
    6251 
     
    9584  my $this = shift; 
    9685 
     86  writeDebug("called finish()"); 
    9787  my $gotUpdate = $this->{gotUpdate}; 
    9888  $this->{gotUpdate} = 0; 
    9989 
    100   foreach my $cat ($this->getCategories()) { 
    101     $gotUpdate ||= $cat->{gotUpdate}; 
    102     $cat->{gotUpdate} = 0; 
    103   } 
    104  
     90  if (defined($this->{_categories})) { 
     91    foreach my $cat ($this->getCategories()) { 
     92      $gotUpdate ||= $cat->{gotUpdate}; 
     93      $cat->{gotUpdate} = 0; 
     94    } 
     95  } 
     96 
     97  writeDebug("gotUpdate=$gotUpdate"); 
    10598  if ($gotUpdate) { 
    10699    writeDebug("saving hierarchy $this->{web}"); 
    107     my $cacheFile = getCacheFile($this->{web}); 
     100    my $cacheFile = TWiki::Plugins::ClassificationPlugin::Core::getCacheFile($this->{web}); 
     101 
     102    # SMELL: don't cache the prefs for now 
     103    undef $this->{_prefs};  
     104 
     105    #if (DEBUG) { 
     106    #  use Data::Dumper; 
     107    #  writeDebug(Dumper($this)); 
     108    #} 
     109 
    108110    Storable::lock_store($this, $cacheFile); 
    109111  } 
     112  writeDebug("done finish()"); 
    110113 
    111114} 
     
    119122# mode = 5 -> clear all 
    120123sub purgeCache { 
    121   my ($this, $mode) = @_; 
     124  my ($this, $mode, $touchedCats) = @_; 
    122125 
    123126  return unless $mode; 
     
    130133 
    131134  if ($mode > 1) { # categorized and classified topics 
     135    foreach my $catName (@$touchedCats) { 
     136      my $cat = $this->getCategory($catName); 
     137      $cat->purgeCache() if $cat; 
     138    } 
     139  }  
     140 
     141  if ($mode > 3) { # category topics 
     142    # nuke all categories 
    132143    foreach my $cat (values %{$this->{_categories}}) { 
    133144      $cat->purgeCache() if $cat; 
    134145    } 
    135   }  
    136  
    137   if ($mode > 3) { # category topics 
    138146    undef $this->{_categories}; 
    139147    undef $this->{_distance}; 
     
    142150    undef $this->{_bottom}; 
    143151    undef $this->{_aclAttribute}; 
     152    $this->{idCounter} = 0; 
    144153  } 
    145154 
     
    153162 
    154163################################################################################ 
    155 # destructor 
    156 sub DESTROY { 
    157   my $this = shift; 
    158  
    159   $this->purgeCache(5); 
    160 } 
    161  
    162 ################################################################################ 
    163164sub init { 
    164165  my $this = shift; 
    165166 
    166167  # be anal 
    167   die "recursive call to Hierarchy::init" if $insideInit{$this->{web}}; 
     168  die "recursive call to Hierarchy::init for $this->{web}" if $insideInit{$this->{web}}; 
    168169  $insideInit{$this->{web}} = 1; 
    169170 
    170   writeDebug("called Hierarchy::init for $this->{web}"); 
     171  writeDebug("called Hierarchy::init for $this->{web} ... EXPENSIVE"); 
    171172  my $session = $TWiki::Plugins::SESSION; 
    172173  $this->{_prefs} = new TWiki::Prefs($session); 
     
    212213      $cat->setIcon($form->fastget("Icon")); 
    213214 
     215      #writeDebug("$topicName has got title '$title'"); 
     216 
    214217      # import foregin categories 
    215218      $cat->importCategories($form->fastget("ImportedCategory"), $seenImport); 
     
    217220  } 
    218221 
    219   #writeDebug("checking for default categories"); 
     222  writeDebug("checking for default categories"); 
    220223  # every hierarchy has one top node 
    221224  my $topCat =  
     
    317320 
    318321  writeDebug("finit"); 
     322  #my $loops = 0; 
    319323  my $maxId = $this->{idCounter}-1; 
    320324  for my $id1 (0..$maxId) { 
     
    328332        $distance[$id1][$id2] = -$dist if defined $dist; 
    329333      } 
    330     } 
    331   } 
    332  
     334      #$loops++; 
     335    } 
     336  } 
     337 
     338  #writeDebug("maxId=$maxId, loops=$loops"); 
    333339  writeDebug("done computeDistance() Wallace-Kollias"); 
    334  
    335   if (0) { 
    336     my $oldDistance = $this->DISABLED_computeDistance(); 
    337     foreach my $catName1 (sort $this->getCategoryNames()) { 
    338       my $cat1 = $this->{_categories}{$catName1}; 
    339       my $catId1 = $cat1->{id}; 
    340       foreach my $catName2 (sort $this->getCategoryNames()) { 
    341         my $cat2 = $this->{_categories}{$catName2}; 
    342         my $catId2 = $cat2->{id}; 
    343         my $dist =  $distance[$catId1][$catId2]; 
    344         my $oldDist = $$oldDistance[$catId1][$catId2]; 
    345         if (defined($dist)) { 
    346           if (defined($oldDist)) { 
    347             if ($oldDist == $dist) { 
    348               #writeDebug("distance($ancestors{$id1}->{name},$ancestors{$id2}->{name}) = $dist ... OK"); 
    349             } else { 
    350               writeDebug("distance($catName1,$catName2) = $dist != $oldDist"); 
    351             } 
    352           } else { 
    353             writeDebug("distance($catName1,$catName2) = $dist ... but NO OLD"); 
    354           } 
    355         } else { 
    356           if (defined($oldDist)) { 
    357             writeDebug("distance($catName1,$catName2) = $oldDist ... but NO NEW"); 
    358           } 
    359         } 
    360       } 
    361     } 
    362   } 
    363340 
    364341  $this->{_distance} = \@distance; 
    365342  $this->{gotUpdate} = 1; 
    366343 
    367   return \@distance; 
    368 } 
    369  
    370 ################################################################################ 
    371 # computes the distance between all categories using a modified floyd-warshall 
    372 # algorithm for transitive closures 
    373 sub DISABLED_computeDistance { 
    374   my $this = shift; 
    375  
    376   writeDebug("called computeDistance_FLOYD_WARSHALL()"); 
    377  
    378   # init matrix 
    379   my $totalIterations = 0; 
    380   my $effectiveIteratons = 0; 
    381  
    382   my @distance; 
    383   my $bottomId = $this->{_bottom}->{id}; 
    384  
    385  
    386   writeDebug("init"); 
    387   for my $cat ($this->getCategories()) { 
    388     my $id = $cat->{id}; 
    389     $distance[$id][$id] = 0; # diagonal 
    390  
    391     my @children = $cat->getChildren(); 
    392     if (@children) { 
    393       foreach my $child (@children) { 
    394         $distance[$id][$child->{id}] = 1; # direct contectedness 
    395       } 
    396     } else { 
    397       unless ($id == $bottomId) { # bottom 
    398         $distance[$id][$bottomId] = 1; # leaf nodes 
    399       } 
    400     } 
    401   } 
    402  
    403   # floyd-warshall algorithm for transitive closure 
    404   # used to computing min- and max distances, reused in 
    405   # subsumption and partof relations 
    406   my $maxId = $this->{idCounter}-1; 
    407   writeDebug("propagate"); 
    408   writeDebug("maxId=$maxId"); 
    409   foreach my $catIId (0..$maxId) { 
    410  
    411     foreach my $catJId (0..$maxId) { 
    412       next if $catIId == $catJId; # skip current row 
    413  
    414       my $distIJ = $distance[$catIId][$catJId]; 
    415  
    416       foreach my $catKId (0..$maxId) { 
    417         $totalIterations++; 
    418         next if $catKId == $catIId || $catKId == $catJId; # skip current row 
    419  
    420         my $distIK = $distance[$catIId][$catKId]; 
    421         next unless $distIK; 
    422  
    423         my $distKJ = $distance[$catKId][$catJId]; 
    424         next unless $distKJ; 
    425  
    426         my $minSum = $distIK+$distKJ; 
    427         $distance[$catIId][$catJId] = $minSum if !$distIJ || $distIJ > $minSum; 
    428         $effectiveIteratons++; 
    429       } 
    430     } 
    431   } 
    432  
    433   # fill other half of the matrix, the reverse relation, 
    434   # we are using qubic memory already anyway 
    435   writeDebug("finit"); 
    436   for my $id1 (0..$maxId) { 
    437     for my $id2 (0..$maxId) { 
    438       next if $id1 == $id2; 
    439       my $dist = $distance[$id1][$id2]; 
    440       next unless $dist; 
    441       $distance[$id2][$id1] = -$dist; 
    442     } 
    443   } 
    444  
    445   $this->{_distance} = \@distance; 
    446   $this->{gotUpdate} = 1; 
    447  
    448   writeDebug("totalIterations=$totalIterations, effectiveIteratons=$effectiveIteratons"); 
    449   writeDebug("done computeDistance"); 
    450    
    451344  return \@distance; 
    452345} 
     
    471364 
    472365  # check topic1 
    473   my $extraDistance = 0; 
    474366  my $catObj = $this->getCategory($topic1); 
     367  my $firstIsTopic; 
    475368  if ($catObj) { # known category 
     369    $firstIsTopic = 0; 
    476370    $catSet1{$topic1} = $catObj->{id}; 
    477371  } else { 
     372    $firstIsTopic = 1; 
    478373    my $cats = $this->getCategoriesOfTopic($topic1); 
    479374    return undef unless $cats; # no categories, no distance 
     
    482377      $catSet1{$name} = $catObj->{id} if $catObj; 
    483378    } 
    484     $extraDistance++; # going to its categories is one extra step 
    485379  } 
    486380 
    487381  # check topic2 
     382  my $secondIsTopic; 
    488383  $catObj = $this->getCategory($topic2); 
    489384  if ($catObj) { # known category 
     385    $secondIsTopic = 0; 
    490386    $catSet2{$topic2} = $catObj->{id}; 
    491387  } else { 
     388    $secondIsTopic = 1; 
    492389    my $cats = $this->getCategoriesOfTopic($topic2); 
    493390    return undef unless $cats; # no categories, no distance 
     
    496393      $catSet2{$name} = $catObj->{id} if $catObj 
    497394    } 
    498     $extraDistance++; # going to its categories is one extra step 
    499   } 
     395  } 
     396  return 0 if  
     397    $firstIsTopic == 1 && 
     398    $secondIsTopic == 1 && 
     399    $topic1 eq $topic2; 
    500400 
    501401  if (DEBUG) { 
     
    518418  return undef unless defined($min); 
    519419 
    520   $min += $extraDistance; 
    521   #writeDebug("min=$min"); 
     420  $min = abs($min) + 2 if $firstIsTopic && $secondIsTopic; 
     421  $min-- if $firstIsTopic; 
     422  $min++ if $secondIsTopic; 
    522423 
    523424  return $min; 
     
    749650 
    750651  my $result = $this->catDistance($cat1, $cat2); 
    751   return (defined($result) && $result > 0)?1:0; 
     652  return (defined($result) && $result >= 0)?1:0; 
    752653} 
    753654 
     
    1021922    # try id 
    1022923    if ($name =~ /^\d+/) { 
    1023       foreach my $cat (keys %{$this->{_categories}}) { 
    1024         last if $cat->{id} == $name; 
     924      foreach my $cat (values %{$this->{_categories}}) { 
     925        last if $cat->{id} eq $name; 
    1025926      } 
    1026927    } 
     
    1043944# static 
    1044945sub inlineError { 
    1045   return '<span class="foswikiAlert">' . $_[0] . '</span>' ; 
     946  return '<span class="twikiAlert">' . $_[0] . '</span>' ; 
    1046947} 
    1047948 
    1048949############################################################################### 
    1049 sub toHTML { 
     950sub traverse { 
    1050951  my ($this, $params) = @_; 
    1051952 
    1052   #writeDebug("called toHTML for hierarchy in '$this->{web}'"); 
     953  #writeDebug("called traverse for hierarchy in '$this->{web}'"); 
    1053954 
    1054955  my $nrCalls = 0; 
     
    1064965    next unless $cat; 
    1065966    #writeDebug("found category ".$cat->{name}); 
    1066     my $catResult =  $cat->toHTML($params, \$nrCalls); 
     967    my $catResult =  $cat->traverse($params, \$nrCalls); 
    1067968    push @result, $catResult if $catResult 
    1068969  } 
     
    1082983  ); 
    1083984 
    1084   #writeDebug("done toHTML"); 
     985  #writeDebug("done traverse"); 
    1085986  return TWiki::Func::expandCommonVariables($header.$result.$footer); 
    1086987} 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/MANIFEST

    r64 r1182  
    99data/Applications/ClassificationApp/BusinessStructure.txt 0644 
    1010data/Applications/ClassificationApp/CampainManagementCategory.txt 0644 
     11data/Applications/ClassificationApp/CategorizedTopicEditTemplate.txt 0644 
    1112data/Applications/ClassificationApp/CategorizedTopicRenderIndexItem.txt 0644 
    1213data/Applications/ClassificationApp/CategorizedTopicTemplate.txt 0644 
     14data/Applications/ClassificationApp/CategorizedTopic.txt 0644 
    1315data/Applications/ClassificationApp/CategorizedTopicViewTemplate.txt 0644 
    14 data/Applications/ClassificationApp/CategorizedTopic.txt 0644 
    1516data/Applications/ClassificationApp/CategoryBrowser.txt 0644 
    1617data/Applications/ClassificationApp/CategoryEditTemplate.txt 0644 
    1718data/Applications/ClassificationApp/CategoryRenderIndexItem.txt 0644 
    1819data/Applications/ClassificationApp/CategoryTemplate.txt 0644 
     20data/Applications/ClassificationApp/Category.txt 0644 
    1921data/Applications/ClassificationApp/CategoryViewTemplate.txt 0644 
    20 data/Applications/ClassificationApp/Category.txt 0644 
    2122data/Applications/ClassificationApp/ChannelManagementCategory.txt 0644 
    2223data/Applications/ClassificationApp/ClassificationApp.txt 0644 
     
    2425data/Applications/ClassificationApp/ClassifiedTopicRenderIndexItem.txt 0644 
    2526data/Applications/ClassificationApp/ClassifiedTopicTemplate.txt 0644 
     27data/Applications/ClassificationApp/ClassifiedTopic.txt 0644 
    2628data/Applications/ClassificationApp/ClassifiedTopicViewTemplate.txt 0644 
    27 data/Applications/ClassificationApp/ClassifiedTopic.txt 0644 
    2829data/Applications/ClassificationApp/CompetitionCategory.txt 0644 
    2930data/Applications/ClassificationApp/ContactsCategory.txt 0644 
     
    3233data/Applications/ClassificationApp/DepartmentsCategory.txt 0644 
    3334data/Applications/ClassificationApp/DevelopmentForum.txt 0644 
     35data/Applications/ClassificationApp/DocumentationForum.txt 0644 
    3436data/Applications/ClassificationApp/DocuTopic.txt 0644 
    35 data/Applications/ClassificationApp/DocumentationForum.txt 0644 
    3637data/Applications/ClassificationApp/EmployeeDirectoryCategory.txt 0644 
    3738data/Applications/ClassificationApp/EventsForum.txt 0644 
     
    5051data/Applications/ClassificationApp/HRPoliciesCategory.txt 0644 
    5152data/Applications/ClassificationApp/HumanResourcesCategory.txt 0644 
    52 data/Applications/ClassificationApp/ITCategory.txt 0644 
    53 data/Applications/ClassificationApp/ITHelpDeskCategory.txt 0644 
    54 data/Applications/ClassificationApp/ITPoliciesCategory.txt 0644 
    5553data/Applications/ClassificationApp/IconSet.txt 0644 
    5654data/Applications/ClassificationApp/IndustryCategory.txt 0644 
    5755data/Applications/ClassificationApp/InstallationForum.txt 0644 
    5856data/Applications/ClassificationApp/IntranetDirectory.txt 0644 
     57data/Applications/ClassificationApp/ITCategory.txt 0644 
     58data/Applications/ClassificationApp/ITHelpDeskCategory.txt 0644 
     59data/Applications/ClassificationApp/ITPoliciesCategory.txt 0644 
     60data/Applications/ClassificationApp/.kinoupdate 0644 
    5961data/Applications/ClassificationApp/KnowledgeBaseCategory.txt 0644 
    6062data/Applications/ClassificationApp/LegalCategory.txt 0644 
     
    6567data/Applications/ClassificationApp/MeetingRoomReservationCategory.txt 0644 
    6668data/Applications/ClassificationApp/MigrationAndConversionForum.txt 0644 
     69data/Applications/ClassificationApp/NatSkinCategorizedTopicEditTemplate.txt 0644 
    6770data/Applications/ClassificationApp/NatSkinCategorizedTopicViewTemplate.txt 0644 
    6871data/Applications/ClassificationApp/NatSkinCategoryEditTemplate.txt 0644 
     
    7174data/Applications/ClassificationApp/NatSkinClassifiedTopicViewTemplate.txt 0644 
    7275data/Applications/ClassificationApp/NatSkinSearchViewTemplate.txt 0644 
     76data/Applications/ClassificationApp/NatSkinTaggedTopicEditTemplate.txt 0644 
    7377data/Applications/ClassificationApp/NatSkinTaggedTopicViewTemplate.txt 0644 
    7478data/Applications/ClassificationApp/NewsAndAnnouncementsCategory.txt 0644 
     
    9397data/Applications/ClassificationApp/RenderHierarchyAsJSON.txt 0644 
    9498data/Applications/ClassificationApp/RenderIconSelector.txt 0644 
     99data/Applications/ClassificationApp/RenderSideBar.txt 0644 
    95100data/Applications/ClassificationApp/RenderTaggedTopicView.txt 0644 
    96101data/Applications/ClassificationApp/RenderWebClassSearch.txt 0644 
     
    106111data/Applications/ClassificationApp/StarterKitCategory.txt 0644 
    107112data/Applications/ClassificationApp/SupportForum.txt 0644 
    108 data/Applications/ClassificationApp/TWikiApplication.txt 0644 
    109 data/Applications/ClassificationApp/TWikiFormAttribute.txt 0644 
    110 data/Applications/ClassificationApp/TWikiForm.txt 0644 
    111 data/Applications/ClassificationApp/TWikiTopic.txt 0644 
     113data/Applications/ClassificationApp/TaggedTopicEditTemplate.txt 0644 
    112114data/Applications/ClassificationApp/TaggedTopicTemplate.txt 0644 
     115data/Applications/ClassificationApp/TaggedTopic.txt 0644 
    113116data/Applications/ClassificationApp/TaggedTopicViewTemplate.txt 0644 
    114 data/Applications/ClassificationApp/TaggedTopic.txt 0644 
    115117data/Applications/ClassificationApp/TestCategorizedTopic1.txt 0644 
    116118data/Applications/ClassificationApp/TestCategory0.txt 0644 
     
    143145data/Applications/ClassificationApp/TrainingCategory.txt 0644 
    144146data/Applications/ClassificationApp/TravelingCategory.txt 0644 
     147data/Applications/ClassificationApp/TWikiApplication.txt 0644 
     148data/Applications/ClassificationApp/TWikiFormAttribute.txt 0644 
     149data/Applications/ClassificationApp/TWikiForm.txt 0644 
     150data/Applications/ClassificationApp/TWikiTopic.txt 0644 
    145151data/Applications/ClassificationApp/UpgradingForum.txt 0644 
    146152data/Applications/ClassificationApp/WebAtom.txt 0644 
     
    166172data/_ClassificationTemplate/Category.txt 0644 
    167173data/_ClassificationTemplate/ClassifiedTopic.txt 0644 
    168 data/_ClassificationTemplate/TWikiTopic.txt 0644 
    169174data/_ClassificationTemplate/TaggedTopic.txt 0644 
    170175data/_ClassificationTemplate/TopCategory.txt 0644 
     
    172177data/_ClassificationTemplate/TopicTemplate.txt 0644 
    173178data/_ClassificationTemplate/TopicType.txt 0644 
     179data/_ClassificationTemplate/TWikiTopic.txt 0644 
    174180data/_ClassificationTemplate/WebAtom.txt 0644 
    175181data/_ClassificationTemplate/WebChanges.txt 0644 
     
    318324pub/Applications/ClassificationApp/IconSet/wrench_orange.png 0644 
    319325pub/Applications/ClassificationApp/IconSet/wrench.png 0644 
     326pub/TWiki/ClassificationPlugin/aqua-pill-18.gif 0644 
     327pub/TWiki/ClassificationPlugin/classification.js 0644 
    320328pub/TWiki/ClassificationPlugin/FormDotPm-4_1_2.patch 0644 
    321 pub/TWiki/ClassificationPlugin/classification.js 0644 
    322329pub/TWiki/ClassificationPlugin/jquery.tagselector.js 0644 
    323330pub/TWiki/ClassificationPlugin/styles.css 0644 
  • trunk/ClassificationPlugin/lib/TWiki/Plugins/ClassificationPlugin/build.pl

    r1065 r1182  
    66} 
    77 
    8 use TWiki::Contrib::Build; 
     8use Foswiki::Contrib::Build; 
    99 
    1010# Create the build object 
    11 $build = new TWiki::Contrib::Build( 'ClassificationPlugin' ); 
     11$build = new Foswiki::Contrib::Build( 'ClassificationPlugin' ); 
    1212 
    1313# Build the target on the command line, or the default target 
  • trunk/ClassificationPlugin/pub/TWiki/ClassificationPlugin/jquery.tagselector.js

    r64 r1182  
    11/* 
    2  * jQuery TagSelector plugin 1.0 
     2 * jQuery TagSelector plugin 1.1 
    33 * 
    44 * Copyright (c) 2008 Michael Daum http://michaeldaumconsulting.com 
     
    3838 
    3939      var initialTags; 
    40       var doneHandleKeys = false; 
    41  
    42       // key handler ********************************************************* 
    43       function handleKeys(ev) { 
    44         writeDebug("called handleKey(), event type="+ev.type+" keyCode="+ev.keyCode); 
    45  
    46         // key press 
    47         if (ev.type == 'keypress') { 
    48           if (ev.keyCode == 9) { 
    49             handleTabKey(); 
    50             return false; // suppress default actions 
    51           } else if (ev.keyCode == 13) { 
    52             handleReturnKey(); 
    53             return false; // suppress default actions 
    54           } 
    55           return true; 
    56         } 
    57  
    58         doneHandleKeys = false; 
    59         window.setTimeout(function() { 
    60           _handleKeysJob(ev.keyCode) 
    61         }, 100); 
    62  
    63         if (ev.keyCode == 9 || ev.keyCode == 13) { 
    64           //writeDebug("suppressing default action"); 
    65           return false; // suppress default actions 
    66         } else { 
    67           return true; 
    68         } 
    69       } 
    70  
    71       // update selection, called by key handler 
    72       function _handleKeysJob(keyCode) { 
    73         if (doneHandleKeys) { 
    74           return; 
    75         } 
    76         doneHandleKeys = true; 
    77         //writeDebug("called _handleKeysJob()"); 
    78         // key up 
    79         //writeDebug("keyCode="+keyCode); 
    80         switch(keyCode) { 
    81           case 37: // arrow keys 
    82           case 38: 
    83           case 39: 
    84           case 40:  
    85             return; 
    86           case 224: 
    87           case 17: 
    88           case 16: 
    89           case 18:  
    90             return; 
    91           case 46: // delete 
    92           case 8: // backspace 
    93           case 9: // tab 
    94           case 13: // return 
    95           case 27: 
    96           case 32: // space 
    97         } 
    98         $("a", $tagCloud).removeClass('typed current'); 
    99         var selection = $input.val(); 
    100         //writeDebug("selection="+selection); 
    101         var tmpValues = selection.split(/\s*,\s*/); 
    102         var values = new Array(); 
    103         for (var i = 0; i < tmpValues.length; i++) { 
    104           values.push(tmpValues[i].replace(/([^0-9A-Za-z_])/, '\\$1')); 
    105         } 
    106         var filter = "a#"+values.join(",a#"); 
    107         //writeDebug("filter="+filter); 
    108         $(filter, $tagCloud).addClass("current"); 
    109  
    110         var last = tmpValues[tmpValues.length-1]; 
    111         if (last.match(/^ *$/)) { 
    112           return; 
    113         } 
    114         $("a[id^="+last+"]", $tagCloud).each(function() { 
    115           var id = $(this).attr('id'); 
    116           if (selection.indexOf(id) < 0) { 
    117             $(this).addClass("typed"); 
    118           } 
    119         }); 
    120       } 
    121  
    122       // tab handler ********************************************************* 
    123       function handleTabKey() { 
    124         //writeDebug("called handleTabKey()"); 
    125         var elem = $input.get(0); 
    126         elem.focus(); 
    127  
    128         var currentTags = $input.val(); 
    129         //writeDebug("currentTags="+currentTags); 
    130         var values = currentTags.split(/\s*,\s*/); 
    131         var last = values.pop(); 
    132         var startPos = elem.selectionStart; 
    133         var endPos = elem.selectionEnd; 
    134         var origLast = last; 
    135  
    136         if (last.match(/^ *$/)) { 
    137           //writeDebug("no last"); 
    138           return; 
    139         } 
    140          
    141         if (startPos != endPos) { 
    142           last = last.substring(0, last.length-endPos+startPos); 
    143           //writeDebug("substracted selection, last="+last); 
    144         } 
    145  
    146         // find all matching tags 
    147         var matchedTags = new Array(); 
    148         currentTags = values.join(", "); 
    149         $("a[id^="+last+"]", $tagCloud).each(function() { 
    150           var id = $(this).attr('id'); 
    151           if (currentTags.indexOf(id) < 0) { 
    152             matchedTags.push(id); 
    153           } 
    154         }); 
    155         //writeDebug("matchedTags="+matchedTags); 
    156  
    157         // decide which tag to use 
    158         if (matchedTags.length == 0) { 
    159           //writeDebug("no matched tags"); 
    160           return; 
    161         } 
    162         if (matchedTags.length == 1) { 
    163           values.push(matchedTags[0]); 
    164           setTags(values, false); 
    165           startPos = endPos = $input.val().length; 
    166         } else { 
    167           setTags(values); 
    168  
    169           currentTags = $input.val(); 
    170           var nextTag = matchedTags[0]; 
    171           var state = 0; 
    172           for (var i = 0; i < matchedTags.length; i++) { 
    173             if (matchedTags[i] == origLast) { 
    174               state = 1; 
    175             } else { 
    176               if (state == 1) { 
    177                 nextTag = matchedTags[i]; 
    178                 break; 
    179               } 
    180             } 
    181           } 
    182           //writeDebug("nextTag="+nextTag); 
    183           startPos = currentTags.length+last.length; 
    184           endPos = currentTags.length+nextTag.length; 
    185           if (currentTags.length > 0) { 
    186             startPos += 2; 
    187             endPos += 2; 
    188           } 
    189           //writeDebug("1 - startPos="+startPos+" endPos="+endPos) 
    190  
    191           if (currentTags.match(/^ *$/)) { 
    192             currentTags = nextTag; 
    193           } else { 
    194             currentTags += ", "+nextTag; 
    195           } 
    196           $input.val(currentTags); 
    197         } 
    198  
    199         // set cursor and selection 
    200         if (typeof(elem.setSelectionRange) == 'function') { 
    201           elem.setSelectionRange(startPos, endPos); 
    202           //writeDebug("using setSelectionRange"); 
    203         } else if (document.selection) { // IE 
    204           //writeDebug("found document.selection"); 
    205         } else { // standard browsers 
    206           elem.selectionStart = startPos; 
    207           elem.selectionEnd = endPos; 
    208         } 
    209         var startPos = elem.selectionStart; 
    210         var endPos = elem.selectionEnd; 
    211         //writeDebug("2 - startPos="+startPos+" endPos="+endPos) 
    212       } 
    213        
    214       // return handler ****************************************************** 
    215       function handleReturnKey() { 
    216         //writeDebug("called handleReturnKey()"); 
    217         var currentTags = $input.val(); 
    218         var values = currentTags.split(/\s*,\s*/); 
    219         var newValues = new Object(); 
    220  
    221         // remove dupplicates 
    222         for (var i = 0; i < values.length; i++) { 
    223           newValues[values[i]] = 1; 
    224         } 
    225         values = new Array(); 
    226         for (var key in newValues) { 
    227           values.push(key); 
    228         } 
    229         $input.val(values.sort().join(", ")); 
    230  
    231         var elem = $input.get(0); 
    232         elem.focus(); 
    233  
    234         // set cursor 
    235         var length = $input.val().length; 
    236         if (typeof(elem.setSelectionRange) == 'function') { 
    237           elem.setSelectionRange(length, length); 
    238           //writeDebug("using setSelectionRange"); 
    239         } else if (document.selection) { // IE 
    240           //writeDebug("found document.selection"); 
    241         } else { // browsers that don't have setSelectionRange 
    242           elem.selectionStart = length; 
    243           elem.selectionEnd = length; 
    244         } 
    245       } 
    24640 
    24741      // toggle a tag in the input field and the cloud *********************** 
     
    29488        var filter = "#"+tmpValues.join(",#"); 
    29589        //writeDebug("filter="+filter); 
    296         $(filter, $tagCloud).addClass("current"); 
     90        $tagCloud.find(filter).addClass("current"); 
    29791        if (doSort) { 
    29892          values = values.sort(); 
     
    316110        // events  
    317111        writeDebug("called init()"); 
    318         $input.keyup(handleKeys).keypress(handleKeys); 
     112        var tags = []; 
     113        $this.find('.clsTagCloud a').each(function() { 
     114          tags.push([$(this).text(),$(this).attr('title')]); 
     115        }); 
     116        writeDebug("tags = "+tags); 
     117        $input.autocomplete( 
     118          tags, 
     119          { 
     120            multiple: true, 
     121            autoFill: true, 
     122            formatItem: function(tag, i, total) { 
     123              return '<table width="100%"><tr><td align="left">'+tag[0]+'</td><td align="right">'+tag[1]+'</td></tr></table>'; 
     124            }, 
     125            formatMatch: function(tag, i, total) { 
     126              return tag[0]; 
     127            } 
     128          } 
     129        ).result(function(event, data, formatted) { 
     130          $tagCloud.find("#"+formatted).addClass("current"); 
     131        }); 
    319132        $(thisOpt.clearButton, $this).click(function() { 
    320133          clearSelection(); 
  • trunk/ClassificationPlugin/pub/TWiki/ClassificationPlugin/styles.css

    r1178 r1182  
    11.clsTopicInfo { 
    2   color:gray; 
     2  color:#808080; 
    33} 
    44.clsTopicInfoSep { 
     
    77} 
    88.clsBrowser a { 
    9   text-decoration:none; 
     9  text-decoration:none !important; 
    1010} 
    11 .clsBrowser a.foswikiCurrentTopicLink { 
     11.clsBrowser a.twikiCurrentTopicLink { 
    1212  color:red; 
    1313} 
     
    4343  margin-bottom:5px; 
    4444} 
     45.clsBrowser ul li a:hover, 
     46.clsBrowser ul li a { 
     47  background-image:none; 
     48  padding:0px; 
     49} 
     50.clsSideBar.clsBrowser { 
     51  border:0px; 
     52  padding:0px; 
     53  margin-bottom:0px; 
     54} 
     55 
     56.clsIconSelector label { 
     57  padding:0px; 
     58} 
    4559.clsTagSelector table td, 
    4660.clsTagSelector table th { 
     
    5064  margin:5px 0px; 
    5165  width:auto !important; 
    52 } 
    53 .clsButtonBox 
    54 .aquaPillSelected, 
    55 .aquaPill { 
    56   background-repeat:no-repeat; 
    57   background-image:url('aqua-pill-18.gif'); 
    58   background-position:left top; 
    59   text-decoration:none !important; 
    60   font-size:11px; 
    61   line-height:18px; 
    62   height:18px; 
    63   float:left; 
    64   vertical-align:middle; 
    65 } 
    66 .aquaPillSelected span, 
    67 .aquaPill span { 
    68   color:white; 
    69   font-weight:bold; 
    70   margin:0px 0px 0px 10px; 
    71   padding:0px 10px 0px 0px; 
    72   background-image:url('aqua-pill-18.gif'); 
    73   background-repeat:no-repeat; 
    74   background-position:right top; 
    75   font-size:11px; 
    76   line-height:18px; 
    77   line-height:18px; 
    78   height:18px; 
    79   float:left; 
    80   vertical-align:middle; 
    81 } 
    82 .aquaPill:hover, 
    83 .aquaPillSelected:hover { 
    84   text-decoration:none; 
    85   color:white; 
    86 } 
    87 .aquaPill:hover, 
    88 .aquaPillSelected { 
    89   background-image:url('aqua-pill-18.gif') !important; 
    90   background-position:left bottom !important; 
    91 } 
    92 .aquaPill:hover span, 
    93 .aquaPillSelected span { 
    94   background-position:right bottom; 
    9566} 
    9667#clsNewCategory, #clsNewTopic { 
     
    10475  background:pink; 
    10576} 
    106 .clsCategoryFactory .foswikiFirstCol { 
     77.clsCategoryFactory .twikiFirstCol { 
    10778  width:100px; 
    10879} 
     
    11283  margin:1em 0px; 
    11384} 
     85.fltMakeIndexWrapper table { 
     86  width:100%; 
     87} 
     88.fltMakeIndexWrapper a { 
     89  text-decoration:none; 
     90} 
    11491.fltMakeIndexWrapper h3 { 
    115   margin:0px !important; 
     92  border:0px; 
     93  margin:0px; 
     94  padding:0px; 
     95  font-size:110%; 
    11696} 
    11797.fltMakeIndexWrapper ul { 
    118   margin:0px; 
    119   padding-top:0px; 
    120   padding-bottom:0px; 
     98  margin:0em 0em 1.0em 0em; 
     99  padding:0em; 
     100  list-style-type:none; 
    121101} 
    122102.fltMakeIndexWrapper li { 
    123   padding:7px 0px 0px 0px; 
    124   margin:0px 0px 3px 0px; 
     103  padding:0.5em 0em 0.5em 0em; 
     104  margin:0em 0em 0.5em 0em; 
    125105  border-bottom:1px solid #eeeeee; 
     106  min-height:16px; 
    126107} 
    127108.fltMakeIndexWrapper .clsTopicInfo { 
    128   color:gray; 
     109  color:#808080; 
    129110  margin:0px; 
    130111} 
     
    137118 
    138119.fltMakeIndexWrapper .clsSubCategories { 
     120  display:inline; 
    139121  margin-top:0.2em; 
    140122  margin-bottom:0.2em; 
     
    142124.fltMakeIndexWrapper .clsSubCategories a, 
    143125.fltMakeIndexWrapper .clsSubCategories { 
    144   color:gray; 
     126  color:#808080; 
     127} 
     128.fltAnchors { 
     129  margin:1.5em 0em 0em; 
     130  /* 
     131  text-align:center; 
     132  border-bottom:1px solid #eeeeee; 
     133  */ 
     134} 
     135.fltMakeIndexWrapper .fltAnchors a { 
     136  /*text-decoration:none;*/ 
     137  padding:2px 4px; 
     138  margin:0px; 
     139} 
     140.clsIndexItem { 
     141  min-height:16px; 
    145142} 
    146143.clsTopicItem { 
    147   padding-left:18px; 
     144  padding-left:20px; 
    148145  background-image:url(../../Applications/ClassificationApp/IconSet/text.png);  
    149146  background-repeat:no-repeat; 
    150147} 
    151148.clsCategoryItem { 
    152   padding-left:18px; 
     149  padding-left:20px; 
    153150  background-image:url(../../Applications/ClassificationApp/IconSet/folder.gif); 
    154151  background-repeat:no-repeat; 
     
    171168} 
    172169 
     170 
     171.clsCategoryIcon { 
     172  margin:0px 5px 0px 3px; 
     173} 
     174.clsFilterForm.twikiFormSteps { 
     175  border-width:1px 0px; 
     176  margin:1.5em 0em 0em; 
     177} 
     178.clsFilterForm .twikiFormStep { 
     179  float:left; 
     180  border:0px; 
     181  margin:0.5em 2em 0.5em 0.5em; 
     182} 
     183.clsFilterForm .twikiFormStep h3, 
     184.clsFilterForm .twikiFormStep h4 { 
     185  display:inline; 
     186  font-weight:bold; 
     187  text-decoration:none; 
     188  border:0px; 
     189  font-style:normal; 
     190} 
    173191/* pattern skin tweaks */ 
    174 .foswikiTopic h1 a, 
    175 .foswikiTopic h2 a, 
    176 .foswikiTopic h3 a, 
    177 .foswikiTopic h4 a, 
    178 .foswikiTopic h5 a, 
    179 .foswikiTopic h6 a { 
    180   text-decoration:none; 
     192#patternMainContents h1 a, 
     193#patternMainContents h2 a, 
     194#patternMainContents h3 a, 
     195#patternMainContents h4 a, 
     196#patternMainContents h5 a, 
     197#patternMainContents h6 a { 
     198  text-decoration:none !important; 
    181199} 
Note: See TracChangeset for help on using the changeset viewer.