1 # <a name="%TOPIC%"></a><a name=" %TOPIC%"></a> %TOPIC%
5 <li><a href="#Summary"> Summary</a></li>
6 <li><a href="#Customization"> Customization</a></li>
7 <li><a href="#Settings"> Settings</a></li>
8 <li><a href="#Installation Instructions"> Installation Instructions</a></li>
9 <li><a href="#Demo Text"> Demo & Text</a></li>
10 <li><a href="#Contrib Info"> Contrib Info</a></li>
14 ## <a name="Summary"></a> Summary
16 This contrib packages in a convenient way the Javascript library and the CSS file needed to implement TWisty Sections.
18 See the [attached file](http://www.dementia.org/twiki//view/toggle-optm-jsoff-sep.html) for a demo and an example of usage.
20 To use the libraries, you must place the following scriplet either in the head section of the page (by modifying the [[TWikiSkins]]) or putting it somewhere in the topic:
22 <style type="text/css" media="all">
23 @import url("%PUBURLPATH%/TWiki/TwistyContrib/twist.css");
26 <script type="text/javascript" src="%PUBURLPATH%/TWiki/TwistyContrib/twist.js"></script>
28 It's recommended to use the TWiki:Plugins.TwistyPlugin, as it eases the deployment and use of this contrib.
30 %RED%Caution: If the previous scriplet is put in the HEAD section of the page or the TWiki:Plugins.TwistyPlugin is used, it won't work if the `<body onload="">` manager is set by the skin. Check the [twist.js](http://www.dementia.org/twiki//view/twist.js) file for an idea on how to register an eventmanager for the onload event without overwriting the previous one.%ENDCOLOR%
32 This Contrib should work in all versions of TWiki. It has been tested against TWiki:Codev.CairoRelease and TWiki:Codev.DakarRelease.
34 ## <a name="Customization"></a> Customization
36 Skins can customize the color of the twisty placeholder by modifiying the `.twistyPlaceholder` style.
38 ## <a name="Settings"></a> Settings
40 - Set SHORTDESCRIPTION = Twisty section javascript library to open/close content dynamically
41 - Set STUB = TWiki::Contrib::TwistyContrib
43 ## <a name="Installation Instructions"></a> Installation Instructions
45 - Download the ZIP file from the Plugin web (see below)
46 - Unzip <code>**%TOPIC%.zip**</code> in your ($TWIKI\_ROOT) directory. Content: <table border="1" cellpadding="0" cellspacing="0">
48 <th bgcolor="#99CCCC"><strong> File: </strong></th>
49 <th bgcolor="#99CCCC"><strong> Description: </strong></th>
52 <td><code><b>data/TWiki/TwistyContrib.txt</b></code></td>
56 <td><code><b>lib/TWiki/Contrib/TwistyContrib.pm</b></code></td>
60 <td><code><b>pub/TWiki/TwistyContrib/toggle-optm-jsoff-sep.html</b></code></td>
64 <td><code><b>pub/TWiki/TwistyContrib/twist.css</b></code></td>
68 <td><code><b>pub/TWiki/TwistyContrib/twist.js</b></code></td>
73 - Optionally, run <code>**%TOPIC%\_installer**</code> to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
74 - Alternatively, manually make sure the dependencies listed in the table below are resolved. None
76 ## <a name="Demo Text"></a> Demo & Text
78 If the contrib is properly installed (and Javascript is enabled in your browser!), then you should see some folding sections below. Look at [[http://www.dementia.org/twiki/view/%WEB%.%TOPIC%?raw=on|%WEB%.%TOPIC%?raw=on]] to see how it's done.
82 <button> Unfold </button>
86 <button> Fold </button>
88 <hr /> Click on the button above to fold this section. <hr />
91 <span> [Expand...](#) <span>Hamlet is without question the most famous play in the English language...</span> </span> <span> [Collapse...](#) </span>
93 <div id="no_1toggle"> Hamlet is without question the most famous play in the English language. Probably written in 1601 or 1602, the tragedy is a milestone in Shakespeare's dramatic development; the playwright achieved artistic maturity in this work through his brilliant depiction of the hero's struggle with two opposing forces: moral integrity and the need to avenge his father's murder. <p><span id="no_2show"> <a href="#">More...</a> </span> <span id="no_2hide"> <a href="#">Hide more</a> </span></p>
98 <div id="no_2toggle"> For more Shakespeare plays, see Wikipedia:WilliamShakespeare </div>
100 ## <a name="Contrib Info"></a> Contrib Info
102 <table border="1" cellpadding="0" cellspacing="0">
105 <td> Javascript created by TWiki:Main.SamHasler, Contrib packaged by TWiki:Main.RafaelAlvarez </td>
108 <td> Copyright ©: </td>
109 <td> 2005 Sam Hasler and Rafael Alvarez </td>
113 <td><a href="http://www.gnu.org/copyleft/gpl.html" target="_top">GPL</a></td>
116 <td> Dependencies: </td>
120 <td align="right"> 12 Sep 2005 </td>
121 <td> 1.000 First Version </td>
124 <td align="right"> Home: </td>
125 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
128 <td align="right"> Feedback: </td>
129 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
132 <td align="right"> Appraisal: </td>
133 <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal</a></td>
137 **_Related Topics:_** [[TWikiPreferences]]
139 -- TWiki:Main.SamHasler - 12 Sep 2005