Warning: Can't use blame annotator:
svn blame failed on /main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/transform/pages/classifier.xsl: ("Cannot calculate blame information for binary file 'file:///greenstone/projects/greenstone/svn-repo/main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/transform/pages/classifier.xsl'", 195004)

root/main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/transform/pages/classifier.xsl @ 33075

Revision 33075, 7.2 KB (checked in by davidb, 5 months ago)

Changes to provided customized layout requested by Heritage NZ, including searching and browsing on About page in text, and berry baskets

RevLine 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4        xmlns:java="http://xml.apache.org/xslt/java"
5        xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6        xmlns:gslib="http://www.greenstone.org/skinning"
7        xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8        extension-element-prefixes="java util"
9        exclude-result-prefixes="java util gsf">
10 
11
12  <xsl:template match="classifier">
13    <xsl:param name="collName"/>
14    <xsl:param name="serviceName"/>
15    <div id="classifiers">
16      <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
17      <xsl:choose>
18    <xsl:when test="@childType = 'HList'">
19      <xsl:call-template name="HList">
20        <xsl:with-param name='collName' select='$collName'/>
21        <xsl:with-param name='serviceName' select='$serviceName'/>
22      </xsl:call-template>
23    </xsl:when>
24    <xsl:otherwise>
25      <div style="position: relative">
26        <xsl:if test="$cl_name = 'CL4'">         
27          <!--
28          width="1380.2666"
29          height="1746.2094"
30          -->
31         
32          <iframe src="sites/{$site_name}/collect/{$collName}/iframe/nz-territorial-authorities-v06.svg"
33              style="float:right; width: 345px; height: 436px; border: none; ">
34        <gsf:comment>filler</gsf:comment>
35          </iframe>
36        </xsl:if>       
37        <table id="classifiernodelist" style="position:relative;"> <!-- **** -->
38          <xsl:text> </xsl:text>
39          <xsl:call-template name="processNodeChildren">
40        <xsl:with-param name='collName' select='$collName'/>
41        <xsl:with-param name='serviceName' select='$serviceName'/>
42          </xsl:call-template>
43        </table>
44      </div>
45    </xsl:otherwise>
46      </xsl:choose>
47    </div>
48  </xsl:template>
49 
50
51
52  <xsl:template name="HList">
53    <xsl:param name="collName"/>
54    <xsl:param name="serviceName"/>
55    <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageRequest/paramList/param[@name = 'cl']/@value"/></xsl:variable>
56    <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>
57
58    <ul class="horizontalContainer">
59      <xsl:for-each select='classifierNode'>
60    <li>
61      <xsl:attribute name="class">
62        <xsl:if test="starts-with($selectedNode, @nodeID) or (not(contains($selectedNode, '.')) and @nodeID = concat($selectedNode, '.1'))">selectedHorizontalClassifierNode </xsl:if>
63        <xsl:text>horizontalClassifierNode</xsl:text>
64      </xsl:attribute>
65      <xsl:apply-templates select='.'>
66        <xsl:with-param name='collName' select='$collName'/>
67        <xsl:with-param name='serviceName' select='$serviceName'/>
68      </xsl:apply-templates>
69    </li>
70      </xsl:for-each>
71    </ul>
72    <xsl:choose>
73      <!-- if the children are HLists-->
74      <xsl:when test="classifierNode[@childType = 'HList']">
75    <xsl:for-each select='classifierNode'><!-- there should be only one-->
76      <xsl:call-template name="HList">
77        <xsl:with-param name='collName' select='$collName'/>
78        <xsl:with-param name='serviceName' select='$serviceName'/>
79      </xsl:call-template>
80    </xsl:for-each>
81    </xsl:when>
82    <xsl:otherwise>
83      <div style="position: relative">
84        <xsl:if test="$cl_name = 'CL4'">         
85
86<!--
87          <ul>
88
89        <li id="zoomOptions" style="display:none;">
90          <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute>
91          <img id="zoomToggleImage">
92            <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'zoom_image')"/></xsl:attribute>
93          </img>
94          <input id="zoomToggle" type="checkbox"/>
95          <script type="text/javascript">
96            <xsl:text disable-output-escaping="yes">
97
98              $("#zoomToggle").change(function()
99              {
100                _imageZoomEnabled = $("#zoomToggle").prop("checked");
101            if (_imageZoomEnabled) {
102              $('#moverHASH').css("display","block");
103            }
104              });
105             
106              $("#zoomToggleImage").click(function()
107              {
108                $("#zoomToggle").prop("checked", !$("#zoomToggle").prop("checked"));
109                _imageZoomEnabled = $("#zoomToggle").prop("checked");
110              });
111            </xsl:text>
112          </script>
113        </li>
114          </ul>
115
116-->
117          <!--
118          width="1380.2666"
119          height="1746.2094"
120          -->
121<!--
122          <iframe src="sites/{$site_name}/collect/{$collName}/iframe/nz-territorial-authorities-v06.svg"
123              style="float:right; positionXX: absolute; width: 483px; height: 610px; border: none; ">
124        <gsf:comment>filler</gsf:comment>
125          </iframe>
126-->
127
128
129
130<div>
131              <div class="zoomImage" id="wrapHASH" style="position:absolute; width: 483px; height: 610px; right: -450px; top: 100px; ">
132        <div id="smallHASH" style="position: relative; width: 483px; height: 610px;">
133          <iframe src="sites/{$site_name}/collect/{$collName}/iframe/nz-territorial-authorities-v06.svg"
134              style="width: 483px; height: 610px; border: none; ">
135            <xsl:comment>filler</xsl:comment>
136          </iframe>
137        </div> 
138        <div id="moverHASH" style="border: 1px solid #820404; position: absolute; top: -61.7667px; left: -20.5px; width: 498px; height: 498px; overflow: hidden; z-index: 100; background: #f5f3e5; none repeat scroll 0% 0%; display: none;">
139                  <div id="overlayHASH" style="width: 500px; height: 500px; position: absolute; top: 0; left: 0; z-index: 200;">
140            <xsl:comment>filler</xsl:comment>
141          </div>
142         
143                  <div id="largeHASH" style="position: relative; width: 1380px; height:1744px; left: 600px; top: 100px;">
144
145            <iframe id="largeHASH-iframe" src="sites/{$site_name}/collect/{$collName}/iframe/nz-territorial-authorities-v06-large.svg"
146                style="width: 1380px; height: 1744px; border: none; ">
147              <xsl:comment>filler</xsl:comment>
148            </iframe>
149                  </div>
150        </div>
151          </div>
152
153        <script type="text/javascript">
154          <xsl:text disable-output-escaping="yes">
155          //{
156          //var bigHeight = 690;
157          //var smallHeight = 436;
158
159          var multiplier = 2;
160
161          var aZoomer = $("#wrapHASH").anythingZoomer({
162            smallArea: "#smallHASH",
163            largeArea: "#largeHASH",
164            zoomPort: "#overlayHASH",
165            mover: "#moverHASH",
166            expansionSize:50, 
167            speedMultiplier:3
168          });
169
170
171          $("#zoomOptions input").prop("checked", true);
172          $("#zoomOptions").css("display", "block");
173          _imageZoomEnabled = true;
174
175          aZoomer.mouseenter(function (e) {
176             if (!_imageZoomEnabled) { return false }
177
178         $('#moverHASH').css("display","block");
179             //console.log("**** mouseenter: pageX = " + e.pageX + "," + "PageY = " + e.pageY);
180             $(aZoomer).trigger('mousemove',[e.pageX, e.pageY]);
181
182         //mme = $.Event('mousemove');
183         //mme.pageX = e.pageX;
184         //mme.pageY = e.pageY;
185
186         //$(document).trigger(e);
187         //$('#moverHASH').fadeIn();
188          } );
189          //aZoomer.mouseout(function (e) { console.log("Mouse out") } );
190               
191                   
192
193          </xsl:text>
194        </script>
195
196</div>
197        </xsl:if>
198       
199        <table id="classifiernodelist" style="position:relative;"> <!-- **** -->
200          <xsl:for-each select='classifierNode'>
201        <xsl:call-template name="processNodeChildren">
202          <xsl:with-param name='collName' select='$collName'/>
203          <xsl:with-param name='serviceName' select='$serviceName'/>
204        </xsl:call-template>
205          </xsl:for-each>
206        </table>
207      </div>
208    </xsl:otherwise>
209    </xsl:choose>
210  </xsl:template>   
211
212
213</xsl:stylesheet>
214
Note: See TracBrowser for help on using the browser.