source: main/trunk/model-sites-dev/heritage-nz/collect/reports-2019/transform/pages/classifier.xsl@ 33021

Last change on this file since 33021 was 33021, checked in by davidb, 2 years ago

mine-type not allowing XML to be diffed

File size: 7.2 KB
Line 
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; positionXX: absolute; width: 345px; height: 436px; border: none; ">
34 <gsf:comment>filler</gsf:comment>
35 </iframe>
36 </xsl:if>
37 <table id="classifiernodelist">
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="float: right; position:relative; width: 483px; height: 610px;">
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="floatXX:right; positionXXXX: absolute; 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; leftXX: -57.48px; topXX: -4.65867px;">
144
145 <iframe id="largeHASH-iframe" src="sites/{$site_name}/collect/{$collName}/iframe/nz-territorial-authorities-v06-large.svg"
146 style="floatXX:right; positionXXXX: absolute; 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 $("#zoomOptions input").prop("checked", false);
171 $("#zoomOptions").css("display", "");
172 //}
173
174 _imageZoomEnabled = true;
175
176 aZoomer.mouseenter(function (e) {
177 $('#moverHASH').css("display","block");
178 //console.log("**** mouseenter: pageX = " + e.pageX + "," + "PageY = " + e.pageY);
179 $(aZoomer).trigger('mousemove',[e.pageX, e.pageY]);
180
181 //mme = $.Event('mousemove');
182 //mme.pageX = e.pageX;
183 //mme.pageY = e.pageY;
184
185 //$(document).trigger(e);
186 //$('#moverHASH').fadeIn();
187 } );
188 //aZoomer.mouseout(function (e) { console.log("Mouse out") } );
189
190
191
192 </xsl:text>
193 </script>
194
195</div>
196 </xsl:if>
197
198 <table id="classifiernodelist">
199 <xsl:for-each select='classifierNode'>
200 <xsl:call-template name="processNodeChildren">
201 <xsl:with-param name='collName' select='$collName'/>
202 <xsl:with-param name='serviceName' select='$serviceName'/>
203 </xsl:call-template>
204 </xsl:for-each>
205 </table>
206 </div>
207 </xsl:otherwise>
208 </xsl:choose>
209 </xsl:template>
210
211
212</xsl:stylesheet>
213
Note: See TracBrowser for help on using the repository browser.