r3 - 22 Feb 2006 - 08:42:37 GMT - TWikiContributorYou are here: Bernstein > TWiki Web > TwistyContrib

TwistyContrib

Summary

This contrib packages in a convenient way the Javascript library and the CSS file needed to implement TWisty Sections.

See the attached file for a demo and an example of usage.

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:

<style type="text/css" media="all">
@import url("%PUBURLPATH%/TWiki/TwistyContrib/twist.css");
</style>

<script type="text/javascript" src="%PUBURLPATH%/TWiki/TwistyContrib/twist.js"></script>

It's recommended to use the TWiki:Plugins.TwistyPlugin, as it eases the deployment and use of this contrib.

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 file for an idea on how to register an eventmanager for the onload event without overwriting the previous one.

This Contrib should work in all versions of TWiki. It has been tested against TWiki:Codev.CairoRelease and TWiki:Codev.DakarRelease.

Customization

Skins can customize the color of the twisty placeholder by modifiying the .twistyPlaceholder style.

Settings

  • Set SHORTDESCRIPTION = Twisty section javascript library to open/close content dynamically
  • Set STUB = TWiki::Contrib::TwistyContrib

Installation Instructions

  • Download the ZIP file from the Plugin web (see below)
  • Unzip TwistyContrib.zip in your ($TWIKI_ROOT) directory. Content:
    File: Description:
    data/TWiki/TwistyContrib.txt  
    lib/TWiki/Contrib/TwistyContrib.pm  
    pub/TWiki/TwistyContrib/toggle-optm-jsoff-sep.html  
    pub/TWiki/TwistyContrib/twist.css  
    pub/TWiki/TwistyContrib/twist.js  

  • Optionally, run TwistyContrib_installer to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
  • Alternatively, manually make sure the dependencies listed in the table below are resolved. None

Demo & Text

If the contrib is properly installed (and Javascript is enabled in your browser!), then you should see some folding sections below. Look at /twiki/bin/view/TWiki.TwistyContrib?raw=on to see how it's done.


Click on the button above to fold this section.

Expand... Hamlet is without question the most famous play in the English language... Collapse...

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.

More... Hide more

For more Shakespeare plays, see Wikipedia:WilliamShakespeare

Contrib Info

Authors: Javascript created by TWiki:Main.SamHasler, Contrib packaged by TWiki:Main.RafaelAlvarez
Copyright ©: 2005 Sam Hasler and Rafael Alvarez
License: GPL
Dependencies: None
12 Sep 2005 1.000 First Version
Home: http://TWiki.org/cgi-bin/view/Plugins/TwistyContrib
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TwistyContribDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/TwistyContribAppraisal

Related Topics: TWikiPreferences

-- TWiki:Main.SamHasler - 12 Sep 2005

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elsecss twist.css manage 0.5 K 25 Jun 2006 - 16:19 TWikiContributors Style Sheet
htmlhtml toggle-optm-jsoff-sep.html manage 1.7 K 25 Jun 2006 - 16:19 TWikiContributors Example of usage
jsjs twist.js manage 4.5 K 25 Jun 2006 - 16:19 TWikiContributors Javscript library
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
The Bernstein Website
Copyright © by the contributing authors.
Bernstein - The Memory of Paper http://www.bernstein.oeaw.ac.at
Ideas, requests, problems regarding Bernstein? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TwistyContrib
This site is powered by the TWiki collaboration platform