edit.xslt 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cpscrn
  5. (C) Copyright IBM Corp. 2005, 2011
  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. <!-- $Header: //cpscrn/main/templates/cps4/portlets/utility/portlet-impl/html/edit.xslt#1 $ -->
  13. <!-- $DateTime: 2008/10/22 11:12:04 $ -->
  14. <!-- $Change: 25109 $ -->
  15. <xsl:stylesheet version="1.0"
  16. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  17. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  18. xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
  19. xmlns:uix="http://developer.cognos.com/schemas/cps/logic/ui-ext/1/"
  20. xmlns:utml="http://developer.cognos.com/schemas/cps/logic/form/1/"
  21. xmlns:trustedSession="java:com.cognos.portal.utils.TrustedSessionHelper"
  22. exclude-result-prefixes="xts ui uix utml">
  23. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  24. <!-- declare global variables... -->
  25. <utml:variables/>
  26. <!-- create portal variable: $ui-consumer-info -->
  27. <ui:consumer/>
  28. <ui:property name="html-use-title" select="'html_use_title'"/>
  29. <ui:property name="html-url" select="'url'"/>
  30. <ui:property name="html-height" select="'html_height'"/>
  31. <ui:property name="channel" select="'channel'"/>
  32. <xsl:template match="/">
  33. <script language="javascript">
  34. function wsrp_rewrite_validate() {
  35. var cForm = document.wsrp_rewrite_form;
  36. if ( !wsrp_rewrite_isValidURL(cForm.p_url.value, cForm.p_channel.value=='') ) {
  37. window.alert("<xts:string id="IDS_UTI_ERR_INVALID_URL" encode="javascript"/>");
  38. cForm.p_url.focus();
  39. return false;
  40. } else if ( !wsrp_rewrite_isValidChannel(cForm.p_channel.value, false) ) {
  41. window.alert("<xts:string id="IDS_UTI_ERR_INVALID_CHANNEL_NAME" encode="javascript"/>");
  42. cForm.p_channel.focus();
  43. return false;
  44. } else if (!wsrp_rewrite_isValidBoundary(cForm.p_html_height.value,1,2000, true) ) {
  45. window.alert("<xts:string id="IDS_UTI_ERR_NUMBER_BETWEEN" encode="javascript"><xts:param name="min">1</xts:param><xts:param name="max">2000</xts:param></xts:string>");
  46. cForm.p_html_height.focus();
  47. return false;
  48. }
  49. return true;
  50. }
  51. </script>
  52. <uix:script-isValidURL/>
  53. <uix:script-isValidChannel/>
  54. <uix:script-isValidBoundary/>
  55. <ui:about/>
  56. <ui:help/>
  57. <utml:form name="wsrp_rewrite_form" method="post" utml:maintainPrevNavState="true">
  58. <utml:input type="hidden" name="cps-authToken" utml:update="false">
  59. <utml:value>
  60. <xsl:value-of select="trustedSession:staticGenerateAuthToken(string(/root/cookies/cookie[@name='usersessionid']))"/>
  61. </utml:value>
  62. </utml:input>
  63. <ui:page>
  64. <ui:page-description><xts:string id="IDS_UTI_HTM_DESC"/></ui:page-description>
  65. <ui:page-section>
  66. <ui:page-sub-section-group>
  67. <ui:page-sub-section>
  68. <ui:page-sub-section-title><xts:string id="IDS_PRO_UIX_LABEL_TITLE"/></ui:page-sub-section-title>
  69. <ui:page-sub-section-content>
  70. <utml:radio-group name="p_html_use_title">
  71. <utml:default-value>
  72. <xsl:value-of select="$html-use-title"/>
  73. </utml:default-value>
  74. <table border="0" cellspacing="0" cellpadding="1">
  75. <tr>
  76. <td valign="top">
  77. <utml:input type="radio" value="false" class="portlet-form-field"/>
  78. </td>
  79. <td class="portlet-form-field"><xts:string id="IDS_UTI_COM_LABEL_USE_URL"/></td>
  80. </tr>
  81. <tr>
  82. <td valign="top">
  83. <utml:input type="radio" value="true" class="portlet-form-field"/>
  84. </td>
  85. <td><xts:string id="IDS_UTI_COM_LABEL_TYPE_TITLE"/></td>
  86. </tr>
  87. <tr>
  88. <td valign="top" rowspan="2">
  89. <br/>
  90. </td>
  91. <td>
  92. <uix:title onfocus="wsrp_rewrite_form.p_html_use_title[1].checked = true;"/>
  93. </td>
  94. </tr>
  95. </table>
  96. </utml:radio-group>
  97. </ui:page-sub-section-content>
  98. </ui:page-sub-section>
  99. <ui:page-sub-section>
  100. <ui:page-sub-section-title><xts:string id="IDS_UTI_HTM_LABEL_HTML_CONTENT"/></ui:page-sub-section-title>
  101. <ui:page-sub-section-content>
  102. <table border="0" cellspacing="0" cellpadding="1">
  103. <tr>
  104. <td class="portlet-msg-info"><xts:string id="IDS_UTI_HTM_LABEL_URL"/></td>
  105. </tr>
  106. <tr>
  107. <td>
  108. <utml:input name="p_url" type="text" size="100" class="portlet-form-input-field" stttype="url">
  109. <utml:value>
  110. <xsl:value-of select="$html-url"/>
  111. </utml:value>
  112. </utml:input>
  113. </td>
  114. </tr>
  115. </table>
  116. </ui:page-sub-section-content>
  117. </ui:page-sub-section>
  118. <ui:page-sub-section tailing-space="false">
  119. <ui:page-sub-section-title><xts:string id="IDS_UTI_COM_LABEL_CHANNEL_NAME"/></ui:page-sub-section-title>
  120. <ui:page-sub-section-content>
  121. <table border="0" cellspacing="0" cellpadding="1">
  122. <tr>
  123. <td class="portlet-msg-info"><xts:string id="IDS_UTI_COM_DESC_CHANNEL"/></td>
  124. </tr>
  125. <tr>
  126. <td>
  127. <utml:input name="p_channel" type="text" size="20" class="portlet-form-input-field">
  128. <utml:value>
  129. <xsl:value-of select="$channel"/>
  130. </utml:value>
  131. </utml:input>
  132. </td>
  133. </tr>
  134. </table>
  135. </ui:page-sub-section-content>
  136. </ui:page-sub-section>
  137. </ui:page-sub-section-group>
  138. </ui:page-section>
  139. <ui:page-section>
  140. <ui:page-section-divider><xts:string id="IDS_UTI_COM_GROUP_VIEWING_OPTIONS"/></ui:page-section-divider>
  141. <ui:page-sub-section-group>
  142. <ui:page-sub-section>
  143. <ui:page-sub-section-title><xts:string id="IDS_UTI_HTM_LABEL_HEIGHT"/></ui:page-sub-section-title>
  144. <ui:page-sub-section-content>
  145. <table border="0" cellspacing="0" cellpadding="1">
  146. <tr>
  147. <td>
  148. <utml:input name="p_html_height" type="text" size="10" class="portlet-form-input-field">
  149. <utml:value>
  150. <xsl:value-of select="$html-height"/>
  151. </utml:value>
  152. </utml:input>
  153. </td>
  154. </tr>
  155. </table>
  156. </ui:page-sub-section-content>
  157. </ui:page-sub-section>
  158. </ui:page-sub-section-group>
  159. </ui:page-section>
  160. </ui:page>
  161. </utml:form>
  162. </xsl:template>
  163. </xsl:stylesheet>