Changeset 25837
- Timestamp:
- 2012-06-27T14:35:15+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl
r25824 r25837 256 256 </script> 257 257 </xsl:when> 258 259 260 261 </xsl:when>262 <xsl:otherwise> <!-- display the standard greenstone document -->263 <xsl:call-template name="documentContent"/>264 </xsl:otherwise>265 </xsl:choose>266 </xsl:template>258 <xsl:when test="@docType='simple'"> 259 <xsl:call-template name="documentHeading"/><br/> 260 <xsl:call-template name="documentContent"/> 261 </xsl:when> 262 <xsl:otherwise> <!-- display the standard greenstone document --> 263 <xsl:call-template name="documentContent"/> 264 </xsl:otherwise> 265 </xsl:choose> 266 </xsl:template> 267 267 <xsl:template name="documentContent"> 268 269 270 271 272 273 274 275 268 <xsl:choose> 269 <xsl:when test="@docType='simple'"> 270 <xsl:call-template name="documentNodeText"/> 271 </xsl:when> 272 <xsl:otherwise> 273 <xsl:call-template name="wrappedDocument"/> 274 </xsl:otherwise> 275 </xsl:choose> 276 276 </xsl:template> 277 277 278 278 <xsl:template name="wrappedDocument"> 279 <xsl:choose> 280 <xsl:when test="/page/pageRequest/paramList/param[@name = 'alb']/@value = '1' or (string-length(/page/pageRequest/paramList/param[@name = 'd']/@value) > 0 and (/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or not(util:contains(/page/pageResponse/document/@selectedNode, '.'))))"> 281 <div id="gs-document"> 282 <xsl:call-template name="documentPre"/> 283 <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** --> 284 <xsl:for-each select="documentNode"> 285 <xsl:call-template name="wrapDocumentNodes"/> 286 </xsl:for-each> 287 288 </div> 289 </div> 290 </xsl:when> 291 <xsl:otherwise> 292 <div id="gs-document"> 293 <div id="tocLoadingImage" style="text-align:center;"> 294 <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text> 295 </div> 296 </div> 297 <script type="text/javascript"> 298 <xsl:text disable-output-escaping="yes"> 299 $(window).load(function() 279 <xsl:choose> 280 <xsl:when test="/page/pageRequest/paramList/param[@name = 'alb']/@value = '1' or (string-length(/page/pageRequest/paramList/param[@name = 'd']/@value) > 0 and (/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or not(util:contains(/page/pageResponse/document/@selectedNode, '.'))))"> 281 <div id="gs-document"> 282 <xsl:call-template name="documentPre"/> 283 <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** --> 284 <xsl:for-each select="documentNode"> 285 <xsl:call-template name="wrapDocumentNodes"/> 286 </xsl:for-each> 287 </div> 288 </div> 289 </xsl:when> 290 <xsl:otherwise> 291 <div id="gs-document"> 292 <div id="tocLoadingImage" style="text-align:center;"> 293 <img src="{util:getInterfaceText($interface_name, /page/@lang, 'loading_image')}"/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.loading')"/><xsl:text>...</xsl:text> 294 </div> 295 </div> 296 <script type="text/javascript"> 297 <xsl:text disable-output-escaping="yes"> 298 $(window).load(function() 299 { 300 loadTopLevelPage(function() 301 { 302 //Don't focus the section until the table of contents is loaded 303 var tocCheck = function() 300 304 { 301 loadTopLevelPage(function()305 if(gs.variables.tocLoaded) 302 306 { 303 //Don't focus the section until the table of contents is loaded 304 var tocCheck = function() 305 { 306 if(gs.variables.tocLoaded) 307 { 308 focusSection("</xsl:text><xsl:value-of select="/page/pageResponse/document/@selectedNode"/><xsl:text disable-output-escaping="yes">"); 309 } 310 else 311 { 312 setTimeout(tocCheck, 500); 313 } 314 } 315 tocCheck(); 316 }); 317 }); 318 </xsl:text> 319 </script> 320 </xsl:otherwise> 307 focusSection("</xsl:text><xsl:value-of select="/page/pageResponse/document/@selectedNode"/><xsl:text disable-output-escaping="yes">"); 308 } 309 else 310 { 311 setTimeout(tocCheck, 500); 312 } 313 } 314 tocCheck(); 315 }); 316 }); 317 </xsl:text> 318 </script> 319 </xsl:otherwise> 321 320 </xsl:choose> 322 321 … … 456 455 </xsl:choose> 457 456 </xsl:template> 457 458 458 <xsl:template name="documentHeading"> 459 <b><gsf:metadata name="Title"/></b><br/> 460 </xsl:template> 459 <b><gsf:metadata name="Title"/></b><br/> 460 </xsl:template> 461 461 462 <!-- The default template for displaying the document node text --> 462 463 <!-- equivalent to gsf:text --> 463 464 <xsl:template name="documentNodeText"> 464 465 <!-- Hides the "This document has no text." message --> 465 466 <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable> 466 <xsl:if test="not($noText = '1')"> 467 468 <!-- Section text --> 469 <xsl:for-each select="nodeContent"> 470 <xsl:for-each select="node()"> 471 <xsl:choose> 472 <xsl:when test="not(name())"> 467 <xsl:if test="not($noText = '1')"> 468 <!-- Section text --> 469 <xsl:for-each select="nodeContent"> 470 <xsl:for-each select="node()"> 471 <xsl:choose> 472 <xsl:when test="not(name())"> 473 473 <xsl:value-of select="." disable-output-escaping="yes"/> 474 475 </xsl:when>476 <xsl:when test="name() = 'annotation'">477 < xsl:call-template name="displayAnnotation"/>478 </xsl:when>479 <xsl:otherwise>480 < xsl:apply-templates/>481 </xsl: otherwise>482 </xsl: choose>474 </xsl:when> 475 <xsl:when test="name() = 'annotation'"> 476 <xsl:call-template name="displayAnnotation"/> 477 </xsl:when> 478 <xsl:otherwise> 479 <xsl:apply-templates/> 480 </xsl:otherwise> 481 </xsl:choose> 482 </xsl:for-each> 483 483 </xsl:for-each> 484 </xsl: for-each> </xsl:if><xsl:text> </xsl:text>484 </xsl:if><xsl:text> </xsl:text> 485 485 </xsl:template> 486 486 … … 538 538 <div style="background:#BBFFBB; padding: 5px; margin:0px auto; width:890px;"> 539 539 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.maps.nearby_docs')"/> 540 <img id="nearbyDocumentsToggle" s rc="interfaces/oran/images/expand.png">540 <img id="nearbyDocumentsToggle" style="margin-left:5px;" src="interfaces/{$interface_name}/images/expand.png"> 541 541 <xsl:attribute name="onclick"> 542 542 <xsl:text>performDistanceSearch('</xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.