view.xslt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!--
  2. Licensed Materials - Property of IBM
  3. IBM Cognos Products: Viewer
  4. (C) Copyright IBM Corp. 2001, 2011
  5. US Government Users Restricted Rights - Use, duplication or
  6. disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:encodingUtils="com.cognos.portal.utils.EncodingUtils" exclude-result-prefixes="xts encodingUtils">
  9. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  10. <xsl:template match="/">
  11. <xsl:variable name="customs" select="/root/customs/param"/>
  12. <xsl:variable name="interactions" select="/root/interactions/param"/>
  13. <xsl:variable name="reportSpec">
  14. <xsl:value-of select="$interactions[@name='ui.spec']"/>
  15. </xsl:variable>
  16. <xsl:variable name="selectionId">
  17. <xsl:choose>
  18. <xsl:when test="$interactions[@name='obj_id']">
  19. <xsl:value-of select="$interactions[@name='obj_id']"/>
  20. </xsl:when>
  21. <xsl:when test="$customs[@name='navSelectionId']">
  22. <xsl:value-of select="$customs[@name='navSelectionId']"/>
  23. </xsl:when>
  24. </xsl:choose>
  25. </xsl:variable>
  26. <script type="text/javascript">
  27. function _THIS_cancelReportViewerFragmentTitleChange(evt)
  28. {
  29. if (evt.eventPhase == evt.AT_TARGET){
  30. evt.stopPropagation();
  31. }
  32. }
  33. _THIS_.addEventListener("fragment.title.change", "_THIS_cancelReportViewerFragmentTitleChange", false);
  34. _THIS_.addEventListener("*", fragment.prototype.proxyEvent, false);
  35. </script>
  36. <table id="_THIS_default" border="0" cellspacing="0" cellpadding="0" width="100%">
  37. <xsl:if test="string($selectionId) != '' or string($reportSpec) != ''">
  38. <xsl:attribute name="style">display: none</xsl:attribute>
  39. </xsl:if>
  40. <tr>
  41. <td class="portlet-font" align="center" valign="middle" height="100">
  42. <xts:string id="IDS_VEW_READY_FOR_REQUESTS"/>
  43. </td>
  44. </tr>
  45. </table>
  46. <div id="_THIS_rvCanvascontent">
  47. <xsl:choose>
  48. <xsl:when test="string($selectionId) = '' and string($reportSpec) = ''">
  49. <xsl:attribute name="style">display: none</xsl:attribute>
  50. </xsl:when>
  51. <xsl:otherwise>
  52. <xsl:attribute name="style">height: 100%</xsl:attribute>
  53. </xsl:otherwise>
  54. </xsl:choose>
  55. <xsl:text>_THIS?frag-subfragment=rvCanvas&amp;frag-id=rvCanvas/THIS_</xsl:text>
  56. </div>
  57. </xsl:template>
  58. </xsl:stylesheet>