- Timestamp:
- 2019-05-14T14:00:33+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/heritage-nz/transform/pages/classifier.xsl
r32796 r33074 10 10 11 11 12 <!-- set page title --> 13 <xsl:template name="pageTitle"><gslib:collectionNameLinked/><gslib:rightArrow/><gslib:serviceName/></xsl:template> 14 15 16 <!-- the page content --> 17 <xsl:template match="/page/pageResponse"> 18 <xsl:call-template name="classifierPre"/> 19 20 <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script> 21 <script type="text/javascript">$(window).load(openStoredClassifiers);</script> 22 23 <!-- **** Customized **** --> 24 <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable> 25 <xsl:variable name="floatRightWidth"> 26 <xsl:choose> 27 <xsl:when test="$clName = 'CL4'">20</xsl:when> 28 <xsl:otherwise>20</xsl:otherwise> <!-- used to be 30 --> 29 </xsl:choose> 30 </xsl:variable> 31 <xsl:variable name="floatLeftWidth"> 32 <xsl:choose> 33 <xsl:when test="$clName = 'CL4'">58</xsl:when> 34 <xsl:otherwise>77</xsl:otherwise> <!-- used to be 67 --> 35 </xsl:choose> 36 </xsl:variable> 37 38 <!-- **** Customized **** --> 39 <div id="float-anchor" style="width: {$floatRightWidth}%; min-width:180px; float:right; margin: 0 0 10px 20px;"> 40 41 <!-- this right sidebar --> 42 <div id="rightSidebar"> 43 <xsl:comment>Filler needed for div</xsl:comment> 44 <xsl:if test="$berryBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))"> 45 <xsl:if test="$berryBasketOn"> 46 <xsl:call-template name="viewOptions"/> 47 <!-- show the berry basket if it's turned on --> 48 <div class="tableOfContentsContainer" style="position:relative; z-index: 2;"> <!-- **** --> 49 <gslib:berryBasket/> 50 <xsl:text> </xsl:text> 51 </div> 52 </xsl:if> 53 54 <xsl:if test="$documentBasketOn"> 55 <gslib:documentBasket/> 56 <xsl:text> </xsl:text> 57 </xsl:if> 58 </xsl:if> 59 </div> 60 </div> 61 62 <!-- 63 show the clasifier results - 64 you can change the appearance of the results by editing 65 the two templates at the bottom of this file 66 --> 67 <!-- **** Customized **** --> 68 <div id="results" style="width: {$floatLeftWidth}%"> 69 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable> 70 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable> 71 72 <xsl:call-template name="classifierResultsPre"/> 73 74 <xsl:apply-templates select="classifier"> 75 <xsl:with-param name="collName" select="$collName"/> 76 <xsl:with-param name="serviceName" select="$serviceName"/> 77 </xsl:apply-templates> 78 </div> 79 80 <div class="clear"><xsl:text> </xsl:text></div> 81 </xsl:template> 82 83 84 85 <xsl:template name="viewOptions"> 86 87 <div id="viewAndZoomOptions" class="ui-state-default ui-corner-all"> 88 <ul id="viewOptions"> 89 90 <!-- Zoom on/off button --> 91 92 <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false'"> 93 94 <!-- **** Customized **** --> 95 <xsl:variable name="clName"><xsl:value-of select="classifier/@name"/></xsl:variable> 96 <xsl:if test="$clName = 'CL4'"> 97 <li id="zoomOptions" style="display:none;"> 98 <!-- 99 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute> 100 --> 101 <xsl:attribute name="title">Enable/disable Zoom feature over map</xsl:attribute> 102 <img id="zoomToggleImage"> 103 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'zoom_image')"/></xsl:attribute> 104 </img> 105 106 <input id="zoomToggle" type="checkbox" checked="checked"/> 107 <script type="text/javascript"> 108 <xsl:text disable-output-escaping="yes"> 109 $("#zoomToggle").change(function() 110 { 111 //console.log("**** zoomToggle.change()"); 112 _imageZoomEnabled = $("#zoomToggle").prop("checked"); 113 //console.log("**** imageZoomEnable now = " + _imageZoomEnabled); 114 }); 115 116 $("#zoomToggleImage").click(function() 117 { 118 //console.log("**** zoomToggle.click()"); 119 $("#zoomToggle").prop("checked", !$("#zoomToggle").prop("checked")); 120 _imageZoomEnabled = $("#zoomToggle").prop("checked"); 121 //console.log("**** imageZoomEnable now = " + _imageZoomEnabled); 122 }); 123 </xsl:text> 124 </script> 125 </li> 126 </xsl:if> 127 </xsl:if> 128 129 130 <!-- Floating TOC on/off button --> 131 <li id="floatingTOCOptions"> 132 <!-- 133 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute> 134 --> 135 <xsl:attribute name="title">Fix the berry basket to the right side of the screen</xsl:attribute> 136 <img id="floatTOCToggleImage"> 137 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_toc_image')"/></xsl:attribute> 138 </img> 139 140 <input id="floatTOCToggle" type="checkbox"/> 141 <script type="text/javascript"> 142 <xsl:text disable-output-escaping="yes"> 143 $("#floatTOCToggle").prop("checked", false); 144 $("#floatTOCToggle").click(function() 145 { 146 floatMenu($("#floatTOCToggle").prop("checked")); 147 }); 148 149 $("#floatTOCToggleImage").click(function() 150 { 151 $("#floatTOCToggle").prop("checked", !$("#floatTOCToggle").prop("checked")) 152 floatMenu($("#floatTOCToggle").prop("checked")); 153 }); 154 </xsl:text> 155 </script> 156 </li> 157 <xsl:if test="/page/pageRequest/paramList/param[@name='ftoc']/@value = '1'"> 158 <script type="text/javascript"> 159 <xsl:text disable-output-escaping="yes"> 160 $(window).load(function() 161 { 162 $("#floatTOCToggle").prop("checked", true); 163 floatMenu(true); 164 }); 165 </xsl:text> 166 </script> 167 </xsl:if> 168 </ul> 169 <div style="clear:both;"><xsl:text> </xsl:text></div> 170 </div> 171 </xsl:template> 172 173 174 175 12 176 <xsl:template match="classifier"> 13 177 <xsl:param name="collName"/> 14 178 <xsl:param name="serviceName"/> 15 179 <div id="classifiers"> 16 <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable> 180 <!-- **** Customized **** --> 181 <xsl:variable name="clName"><xsl:value-of select="@name"/></xsl:variable> 17 182 <xsl:choose> 18 183 <xsl:when test="@childType = 'HList'"> … … 23 188 </xsl:when> 24 189 <xsl:otherwise> 190 <!-- **** Customized **** --> 25 191 <div style="position: relative"> 26 <xsl:if test="$cl _name = 'CL4'">192 <xsl:if test="$clName = 'CL4'"> 27 193 <!-- 28 194 width="1380.2666" … … 30 196 --> 31 197 <iframe src="interfaces/{$interface_name}/iframe/nz-territories.svg" 32 style="float:right; positionXX: absolute;width: 345px; height: 436px; border: none; ">198 style="float:right; width: 345px; height: 436px; border: none; "> 33 199 <gsf:comment>filler</gsf:comment> 34 200 </iframe>
Note:
See TracChangeset
for help on using the changeset viewer.