- Timestamp:
- 2024-05-03T20:06:35+12:00 (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl
r38991 r38992 148 148 </xsl:template> 149 149 150 <xsl:template name="get-collage-settings">151 <!-- Creates gsf variables (which sets XSL and JavaScript vars) for any user configured152 Collage Classifier options coming through collectionConfig and then buildConfig,153 so that JavaScript can pass them to the webswing instance on starting it up. -->154 <xsl:choose>155 <xsl:when test="option[@name='geometry']/@value">156 <gsf:variable name="collagewidth">157 <xsl:value-of select="substring-before(option[@name='geometry']/@value, 'x')" />158 </gsf:variable>159 <gsf:variable name="collageheight">160 <xsl:value-of select="substring-after(option[@name='geometry']/@value, 'x')" />161 </gsf:variable>162 </xsl:when>163 </xsl:choose>164 165 <xsl:choose>166 <xsl:when test="option[@name='verbosity']/@value">167 <gsf:variable name="verbosity">168 <xsl:value-of select="option[@name='verbosity']/@value"/>169 </gsf:variable>170 </xsl:when>171 </xsl:choose>172 <xsl:choose>173 <xsl:when test="option[@name='imageMustNotHave']/@value">174 <gsf:variable name="imageMustNotHave">175 <xsl:value-of select="option[@name='imageMustNotHave']/@value"/>176 </gsf:variable>177 </xsl:when>178 </xsl:choose>179 <xsl:choose>180 <xsl:when test="option[@name='imageType']/@value">181 <gsf:variable name="imageType">182 <xsl:value-of select="option[@name='imageType']/@value"/>183 </gsf:variable>184 </xsl:when>185 </xsl:choose>186 <xsl:choose>187 <xsl:when test="option[@name='maxDepth']/@value">188 <gsf:variable name="maxDepth">189 <xsl:value-of select="option[@name='maxDepth']/@value"/>190 </gsf:variable>191 </xsl:when>192 </xsl:choose>193 <xsl:choose>194 <xsl:when test="option[@name='maxDisplay']/@value">195 <gsf:variable name="maxDisplay">196 <xsl:value-of select="option[@name='maxDisplay']/@value"/>197 </gsf:variable>198 </xsl:when>199 </xsl:choose>200 <xsl:choose>201 <xsl:when test="option[@name='refreshDelay']/@value">202 <gsf:variable name="refreshDelay">203 <xsl:value-of select="option[@name='refreshDelay']/@value"/>204 </gsf:variable>205 </xsl:when>206 </xsl:choose>207 <xsl:choose>208 <xsl:when test="option[@name='isJava2']/@value">209 <gsf:variable name="isJava2">210 <xsl:value-of select="option[@name='isJava2']/@value"/>211 </gsf:variable>212 </xsl:when>213 </xsl:choose>214 <xsl:choose>215 <xsl:when test="option[@name='bgcolor']/@value">216 <gsf:variable name="bgcolor">217 <xsl:value-of select="option[@name='bgcolor']/@value"/>218 </gsf:variable>219 </xsl:when>220 </xsl:choose>221 222 <!--223 Defaults to fall back on when there is no user customisation224 can be manually adjusted here. -->225 <!--226 <xsl:call-template name="set-collage-gsfvar-if-exists">227 <xsl:with-param name="varName">imageMustNotHave</xsl:with-param>228 </xsl:call-template>229 <xsl:call-template name="set-collage-gsfvar-if-exists">230 <xsl:with-param name="varName">imageType</xsl:with-param>231 </xsl:call-template>232 <xsl:call-template name="set-collage-gsfvar-if-exists">233 <xsl:with-param name="varName">verbosity</xsl:with-param>234 </xsl:call-template>235 <xsl:call-template name="set-collage-gsfvar-if-exists">236 <xsl:with-param name="varName">maxDepth</xsl:with-param>237 </xsl:call-template>238 <xsl:call-template name="set-collage-gsfvar-if-exists">239 <xsl:with-param name="varName">maxDisplay</xsl:with-param>240 </xsl:call-template>241 <xsl:call-template name="set-collage-gsfvar-if-exists">242 <xsl:with-param name="varName">refreshDelay</xsl:with-param>243 </xsl:call-template>244 <xsl:call-template name="set-collage-gsfvar-if-exists">245 <xsl:with-param name="varName">isJava2</xsl:with-param>246 </xsl:call-template>247 <xsl:call-template name="set-collage-gsfvar-if-exists">248 <xsl:with-param name="varName">bgcolor</xsl:with-param>249 </xsl:call-template>250 -->251 </xsl:template>252 253 <!-- https://our.umbraco.com/forum/developers/xslt/9274-Return-Value-from-a-Template -->254 <xsl:template name="set-collage-gsfvar-if-exists">255 <xsl:param name="varName" />256 <!--<xsl:value-of select="$varName"/>-->257 <xsl:choose>258 <xsl:when test="option[@name=$varName]/@value">259 <gsf:variable name="$varName">260 <!--<xsl:attribute name="name"><xsl:value-of select="$varName" /></xsl:attribute>-->261 <xsl:value-of select="option[@name=$varName]/@value"/>262 </gsf:variable>263 </xsl:when>264 </xsl:choose>265 </xsl:template>266 267 150 <xsl:template name="Collage_javascript_deprecated"> 268 151 <script type="text/javascript" src="interfaces/{$interface_name}/js/collage_scripts.js"><xsl:text> </xsl:text></script>
Note:
See TracChangeset
for help on using the changeset viewer.