source: gs3-extensions/jquery-ui-extra/trunk/README.txt@ 37161

Last change on this file since 37161 was 34841, checked in by davidb, 3 years ago

Some notes on how to use this extension in a collection/interface

File size: 1.3 KB
Line 
1# Add into a header block:
2
3 <!-- Bespoke jquery-ui extension for turnstyle open/close blocks -->
4 <gsf:style src="ext/jquery-ui-extra/turnstyle-block.css"/>
5 <gsf:script src="ext/jquery-ui-extra/turnstyle-block.js"/>
6
7# For example, in your collectionConfig.xml, in the format-block for <display>
8# if using turnstyles on the document page
9#
10# If using, for example, on the About page, then adding the lines into
11# the appropriate 'additionalHeader' template rule in header.xsl
12# would be the way to go
13
14 <display>
15 <format>
16 <!-- .... -->
17
18 <xsl:template name="additionalHeaderContent">
19 <gsf:style src="ext/jquery-ui-extra/turnstyle-block.css"/>
20 <gsf:script src="ext/jquery-ui-extra/turnstyle-block.js"/>
21 </xsl:template>
22
23 </format>
24 </display
25
26
27# An example of an HTML using the turnstyle feature is:
28
29 <div id="myblock-turnstyle">
30 <div style="background-image: none; background-color: rgb(80%,80%,20%);">
31 My Block: Heading
32 </div>
33
34 <div class="documenttext" style="display: none;">
35 <p>
36 Sample text ...
37 </p>
38 </div>
39 </div>
40
41 <script>
42 <xsl:text disable-output-escaping="yes">
43 $(function(){
44 transformToTurnstyleBlock("myblock");
45 });
46 </xsl:text>
47 </script>
48
Note: See TracBrowser for help on using the repository browser.