PDFOptions.xts 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: qs
  5. (C) Copyright IBM Corp. 2001, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
  13. <xts:block id="getContent" mode="interpret" processor="XSLT" type="exec">
  14. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  15. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  16. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  17. <xsl:template match="/">
  18. <xts:sequence>
  19. <xts:append>
  20. <xts:request outputHeader="true" asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/">
  21. <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  22. <SOAP-ENV:Header>
  23. <xsl:copy-of select="/root/header/*"/>
  24. </SOAP-ENV:Header>
  25. <SOAP-ENV:Body>
  26. <bus:query xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  27. <search>/configuration/pageDefinition</search>
  28. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:propEnum[]">
  29. <item xsi:type="">defaultName</item>
  30. <item xsi:type="">width</item>
  31. <item xsi:type="">height</item>
  32. <item xsi:type="">unit</item>
  33. </properties>
  34. </bus:query>
  35. </SOAP-ENV:Body>
  36. </SOAP-ENV:Envelope>
  37. </xts:request>
  38. </xts:append>
  39. </xts:sequence>
  40. </xsl:template>
  41. </xsl:stylesheet>
  42. </xts:block>
  43. <xts:block id="page" type="exec" mode="output" processor="XSLT" mimeType="text/html" dependency="getContent">
  44. <!-- get the debug logic sheet -->
  45. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  46. <!-- get the new theme stuff -->
  47. <xts:logicsheet path="logicsheets/portal.xsl"/>
  48. <xts:logicsheet path="qs/logicsheets/dialogIncludes.xsl"/>
  49. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  50. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  51. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  52. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  53. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  54. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  55. <!-- apply the form logic -->
  56. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  57. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" xmlns:qsdialog="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts lyt pf dp df cp cf dbg qsdialog xtsext">
  58. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  59. <!-- add any theme variables -->
  60. <df:variables/>
  61. <pf:variables/>
  62. <!-- start the output -->
  63. <xsl:template match="/root">
  64. <dp:page>
  65. <dp:script>
  66. <qsdialog:headerIncludes dlgSize="250" featureName="PDFOptions"/>
  67. <script type="text/javascript">
  68. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/PDFOptions.js</xsl:attribute>
  69. <xsl:text/>//<xsl:text/>
  70. </script>
  71. </dp:script>
  72. <form style="margin:0px" name="f" method="POST" onsubmit="return false;">
  73. <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
  74. <tr>
  75. <td width="100%" height="0%" colspan="2">
  76. <!-- dialog header -->
  77. <dp:header help="false">
  78. <!-- header titles -->
  79. <dp:title>
  80. <xts:string id="PDF_OPTIONS_TITLE"/>
  81. </dp:title>
  82. <!-- close link for the header -->
  83. <dp:close>
  84. <a href="javascript:goDialogManager.getWindowManager().hideDialogFrame()">
  85. <dp:closeMarker/>
  86. </a>
  87. </dp:close>
  88. <!-- description (hint text) -->
  89. <dp:description>
  90. <xts:string id="PDF_OPTIONS_DESCRIPTION"/>
  91. </dp:description>
  92. </dp:header>
  93. </td>
  94. </tr>
  95. <tr>
  96. <td width="50%" height="100%" valign="top">
  97. <!-- layout -->
  98. <lyt:layout style="1" border="no" title="PDF_OPTIONS_ORIENTATION_LABEL">
  99. <lyt:section>
  100. <dp:choice>
  101. <dp:section1>
  102. <input type="radio" name="pdf_radio" value="portrait"/>
  103. </dp:section1>
  104. <dp:section2>
  105. <xts:string id="PDF_OPTIONS_PORTRAIT_LABEL"/>
  106. </dp:section2>
  107. <dp:section1>
  108. <input type="radio" name="pdf_radio" value="none"/>
  109. </dp:section1>
  110. <dp:section2>
  111. <xts:string id="PDF_OPTIONS_LANDSCAPE_LABEL"/>
  112. </dp:section2>
  113. </dp:choice>
  114. </lyt:section>
  115. </lyt:layout>
  116. <lyt:layout style="2" title="PDF_OPTIONS_PAPER_SIZE_LABEL">
  117. <lyt:section>
  118. <select name="paperSize">
  119. <xsl:for-each select="/root/*/queryResult/item">
  120. <option>
  121. <xsl:attribute name="value"><xsl:value-of select="defaultName/value"/></xsl:attribute>
  122. <xsl:value-of select="defaultName/value"/>
  123. </option>
  124. </xsl:for-each>
  125. </select>
  126. </lyt:section>
  127. </lyt:layout>
  128. </td>
  129. <td width="50%" height="100%" valign="top">
  130. <!-- layout -->
  131. <lyt:layout style="1" border="no" title="PDF_OPTIONS_PAGE_SCALING_LABEL">
  132. <lyt:section>
  133. <dp:choice>
  134. <dp:section1>
  135. <input type="checkbox" name="pageScaleBox" checked="true"/>
  136. </dp:section1>
  137. <dp:section2>
  138. <div style="padding:3px;">
  139. <xts:string id="PDF_OPTIONS_SHRINK_TO_FIT_LABEL"/>
  140. </div>
  141. </dp:section2>
  142. </dp:choice>
  143. </lyt:section>
  144. </lyt:layout>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td width="100%" height="0%" colspan="2">
  149. <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
  150. <qsdialog:defaultButtons/>
  151. </td>
  152. </tr>
  153. <!-- <dbg:dumpxml select="/"/> -->
  154. </table>
  155. </form>
  156. </dp:page>
  157. </xsl:template>
  158. </xsl:stylesheet>
  159. </xts:block>
  160. </xts:morphlet>