edit.xslt 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  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, 2014
  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/nav/portlet-impl/viewer/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:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  19. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  20. xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
  21. xmlns:uix="http://developer.cognos.com/schemas/cps/logic/ui-ext/1/"
  22. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  23. xmlns:utml="http://developer.cognos.com/schemas/cps/logic/form/1/"
  24. xmlns:trustedSession="java:com.cognos.portal.utils.TrustedSessionHelper"
  25. exclude-result-prefixes="xts xtsext ui uix nav utml">
  26. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  27. <!-- declare global variables... -->
  28. <utml:variables/>
  29. <!-- create portal variable: $ui-consumer-info-->
  30. <ui:consumer/>
  31. <xsl:variable name="path-root" select="/root/portlet/consumer/layout/path/start"/>
  32. <xsl:variable name="path-separator" select="/root/portlet/consumer/layout/path/separator"/>
  33. <xsl:variable name="portlet-op" select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Body/*[1]"/>
  34. <xsl:variable name="portlet-registration-params" select="$portlet-op/wsrp:registrationContext/wsrp:registrationState/param"/>
  35. <xsl:variable name="consumerAgent" select="$portlet-registration-params[@name='consumerAgent']"/>
  36. <xsl:variable name="item" select="/root/SOAP-ENV:Envelope/SOAP-ENV:Body/nav:getItemResponse/nav:item | /root/SOAP-ENV:Envelope/SOAP-ENV:Body/nav:getItemResponse/nav:shortcut"/>
  37. <xsl:variable name="folder-id">
  38. <xsl:choose>
  39. <xsl:when test="$item/nav:parentId">
  40. <xsl:value-of select="$item/nav:parentId"/>
  41. </xsl:when>
  42. <xsl:otherwise>rootDefault</xsl:otherwise>
  43. </xsl:choose>
  44. </xsl:variable>
  45. <xsl:variable name="display-id-dep">
  46. <xsl:if test="$item/nav:deploymentId">
  47. <xsl:value-of select="$item/nav:deploymentId"/>
  48. </xsl:if>
  49. </xsl:variable>
  50. <xsl:variable name="display-id">
  51. <xsl:if test="$item/nav:id">
  52. <xsl:value-of select="$item/nav:id"/>
  53. </xsl:if>
  54. </xsl:variable>
  55. <ui:property name="use-title" select="'use_title'"/>
  56. <ui:property name="channel" select="'channel'"/>
  57. <ui:property name="display-action" select="'display_action'"/>
  58. <ui:property name="view-action" select="'view_action'"/>
  59. <ui:property name="display-settings-norm" select="'display_settings_norm'"/>
  60. <ui:property name="display-settings-max" select="'display_settings_max'"/>
  61. <ui:property name="viewer-resize" select="'viewer_resize'"/>
  62. <ui:property name="display-width" select="'display_width'"/>
  63. <ui:property name="display-height" select="'display_height'"/>
  64. <ui:property name="session-id" select="'session_id'"/>
  65. <ui:property name="publish-spec" select="'publish_spec'"/>
  66. <ui:property name="publish-no-prompt" select="'publish_no_prompt'"/>
  67. <ui:property name="discussion-spec" select="'discussion_spec'"/>
  68. <!-- CW hide property -->
  69. <xsl:variable name="cw-hide-value">
  70. <xsl:choose>
  71. <xsl:when test="key('utml-key-params','p_cw_hide') ">
  72. <xsl:value-of select="key('utml-key-params','p_cw_hide') "/>
  73. </xsl:when>
  74. <xsl:otherwise>
  75. <xsl:call-template name="ui-get-property">
  76. <xsl:with-param name="property-name" select="'cw_hide'"/>
  77. <xsl:with-param name="property-default" select="'banner,sidebar'"/>
  78. </xsl:call-template>
  79. </xsl:otherwise>
  80. </xsl:choose>
  81. </xsl:variable>
  82. <xsl:template match="/">
  83. <script language="javascript">
  84. function wsrp_rewrite_chooseReport(cmd) {
  85. var cForm = document.wsrp_rewrite_form;
  86. <utml:form-submit
  87. utml:formName="wsrp_rewrite_form"
  88. utml:targetPage="listreports"
  89. utml:operation="push"
  90. utml:validate="false"/>
  91. }
  92. function wsrp_rewrite_validate() {
  93. var msg1 = "<xts:string id="IDS_NAV_ERR_INVALID_CHANNEL_NAME" encode="javascript"/>";
  94. var msg2 = "<xts:string id="IDS_NAV_ERR_NUMBER_BETWEEN" encode="javascript"><xts:param name="min">1</xts:param><xts:param name="max">2000</xts:param></xts:string>";
  95. var cForm = document.wsrp_rewrite_form;
  96. if ( !wsrp_rewrite_isValidChannel(cForm.p_channel.value, false) ) {
  97. window.alert(msg1);
  98. cForm.p_channel.focus();
  99. return false;
  100. }
  101. if ( !wsrp_rewrite_isValidBoundary(cForm.p_display_height.value,1,2000, true) ) {
  102. window.alert(msg2);
  103. cForm.p_display_height.focus();
  104. return false;
  105. }
  106. if ( !wsrp_rewrite_isValidBoundary(cForm.p_display_width.value,1,2000, true) ) {
  107. window.alert(msg2);
  108. cForm.p_display_width.focus();
  109. return false;
  110. }
  111. return true;
  112. }
  113. function wsrp_rewrite_setup_norm()
  114. {
  115. var cForm = document.wsrp_rewrite_form;
  116. var v = cForm.tmp_toolbar_norm.checked ? cForm.tmp_toolbar_norm.value : "";
  117. cForm.p_display_settings_norm.value = v;
  118. }
  119. function wsrp_rewrite_setup_max()
  120. {
  121. var cForm = document.wsrp_rewrite_form;
  122. var v = cForm.tmp_toolbar_max.checked ? cForm.tmp_toolbar_max.value : "";
  123. cForm.p_display_settings_max.value = v;
  124. }
  125. <xsl:if test="$consumerAgent = 'liferay'">
  126. function wsrp_rewrite_viewer_resize()
  127. {
  128. var cForm = document.wsrp_rewrite_form;
  129. var v = cForm.tmp_viewer_resize.checked ? cForm.tmp_viewer_resize.value : "";
  130. cForm.p_viewer_resize.value = v;
  131. }
  132. </xsl:if>
  133. function wsrp_rewrite_selectViewAction(){
  134. document.getElementById("wsrp_rewrite_radio_view_action").checked=true;
  135. }
  136. function wsrp_rewrite_setup_cw_hide(){
  137. var cForm = document.wsrp_rewrite_form;
  138. var v = cForm.tmp_cs_banner_hide.checked ? (cForm.tmp_cs_banner_hide.value + ',') : "";
  139. v += cForm.tmp_cs_tabs_hide.checked ? (cForm.tmp_cs_tabs_hide.value + ',') : "";
  140. v += cForm.tmp_cs_ga_hide.checked ? (cForm.tmp_cs_ga_hide.value + ',') : "";
  141. v += cForm.tmp_cs_sidebar_hide.checked ? (cForm.tmp_cs_sidebar_hide.value + ',') : "";
  142. v += cForm.tmp_cs_collaboration_hide.checked ? (cForm.tmp_cs_collaboration_hide.value + ',') : "";
  143. cForm.p_cw_hide.value = v;
  144. }
  145. </script>
  146. <uix:script-isValidChannel/>
  147. <uix:script-isValidBoundary/>
  148. <ui:about/>
  149. <ui:help/>
  150. <xsl:variable name="editRegion"><xts:string id="IDS_PRO_UIX_EDITMODE_REGION_TITLE_VIEWER" encode="html"/></xsl:variable>
  151. <div role="region" aria-label="{$editRegion}">
  152. <utml:form name="wsrp_rewrite_form" action="wsrp_rewrite?wsrp-urlType=blockingAction/wsrp_rewrite" method="post" utml:maintainPrevNavState="true">
  153. <utml:input type="hidden" name="cps-authToken" utml:update="false">
  154. <utml:value>
  155. <xsl:value-of select="trustedSession:staticGenerateAuthToken(string(/root/cookies/cookie[@name='usersessionid']))"/>
  156. </utml:value>
  157. </utml:input>
  158. <utml:input type="hidden" name="p_display_settings_norm">
  159. <utml:value>
  160. <xsl:value-of select="$display-settings-norm"/>
  161. </utml:value>
  162. </utml:input>
  163. <utml:input type="hidden" name="p_display_settings_max">
  164. <utml:value>
  165. <xsl:value-of select="$display-settings-max"/>
  166. </utml:value>
  167. </utml:input>
  168. <utml:input type="hidden" name="p_display_id_dep" utml:update="false">
  169. <utml:value>
  170. <xsl:value-of select="$display-id-dep"/>
  171. </utml:value>
  172. </utml:input>
  173. <utml:input type="hidden" name="p_session_id" utml:update="true">
  174. <utml:value>
  175. <xsl:value-of select="$session-id"/>
  176. </utml:value>
  177. </utml:input>
  178. <utml:input type="hidden" name="tmp_folder_id" utml:update="false">
  179. <utml:value>
  180. <xsl:value-of select="$folder-id"/>
  181. </utml:value>
  182. </utml:input>
  183. <ui:page>
  184. <ui:page-description><xts:string id="IDS_NAV_EDT_DESC_VIEWER"/></ui:page-description>
  185. <ui:page-section>
  186. <ui:page-sub-section-group>
  187. <xsl:if test="/root/portlet/consumer/supportTitle = 'true'">
  188. <ui:page-sub-section>
  189. <ui:page-sub-section-title><xts:string id="IDS_PRO_UIX_LABEL_TITLE"/></ui:page-sub-section-title>
  190. <ui:page-sub-section-content>
  191. <utml:radio-group name="p_use_title">
  192. <utml:default-value>
  193. <xsl:value-of select="$use-title"/>
  194. </utml:default-value>
  195. <xsl:variable name="rglable"><xts:string id="IDS_PRO_UIX_LABEL_TITLE" encode="html"/></xsl:variable>
  196. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  197. <tbody role="radiogroup" aria-label="{$rglable}">
  198. <tr>
  199. <td valign="top">
  200. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_USE_ENTRY" type="radio" value="false" class="portlet-form-field"/>
  201. </td>
  202. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_USE_ENTRY"><xts:string id="IDS_NAV_EDT_LABEL_USE_ENTRY"/></label></td>
  203. </tr>
  204. <tr>
  205. <td valign="top">
  206. <utml:input id="wsrp_rewrite_IDS_PRO_UIX_LABEL_TYPE_TITLE" type="radio" value="true" class="portlet-form-field"/>
  207. </td>
  208. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_PRO_UIX_LABEL_TYPE_TITLE"><xts:string id="IDS_PRO_UIX_LABEL_TYPE_TITLE"/></label></td>
  209. </tr>
  210. <tr>
  211. <td valign="top" rowspan="2">
  212. <br/>
  213. </td>
  214. <td>
  215. <uix:title onfocus="wsrp_rewrite_form.p_use_title[1].checked = true;"/>
  216. </td>
  217. </tr>
  218. </tbody>
  219. </table>
  220. </utml:radio-group>
  221. </ui:page-sub-section-content>
  222. </ui:page-sub-section>
  223. </xsl:if>
  224. <ui:page-sub-section>
  225. <ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_ENTRY"/></ui:page-sub-section-title>
  226. <ui:page-sub-section-content>
  227. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  228. <tr>
  229. <td class="portlet-form-field">
  230. <utml:input type="hidden" name="p_display_id">
  231. <utml:value>
  232. <xsl:value-of select="$display-id"/>
  233. </utml:value>
  234. </utml:input>
  235. <xsl:choose>
  236. <xsl:when test="/root/errorResponse">
  237. <xsl:text/><xts:string id="IDS_NAV_EDT_LABEL_REPORT_DELETED"/><xsl:text/>
  238. <div class="portlet-msg-error">
  239. <font color="red">
  240. <xsl:value-of select="/root/errorResponse/message"/>
  241. </font>
  242. </div>
  243. </xsl:when>
  244. <xsl:when test="$display-id = '' or not($item)">
  245. <xsl:text/><xts:string id="IDS_NAV_EDT_LABEL_NO_REPORT_SELECTED"/><xsl:text/>
  246. </xsl:when>
  247. <xsl:otherwise>
  248. <table border="0" cellpadding="3" cellspacing="0" role="presentation">
  249. <tr>
  250. <td>
  251. <img border="0" width="16" height="16" src="{ $item/nav:imgURL }" alt="{ $item/nav:screenTip }" title="{ $item/nav:screenTip }">
  252. <xsl:if test="$item/nav:hidden = 'true'">
  253. <ui:add-hidden-opacity-style/>
  254. </xsl:if>
  255. </img>
  256. </td>
  257. <td class="portlet-form-field">
  258. <xsl:value-of select="$path-root"/>
  259. <xsl:apply-templates select="$item/nav:fullPath"/>
  260. <xsl:value-of select="$item/nav:name"/>
  261. </td>
  262. </tr>
  263. </table>
  264. </xsl:otherwise>
  265. </xsl:choose>
  266. </td>
  267. </tr>
  268. <tr>
  269. <td class="portlet-form-field">
  270. <a xsl:use-attribute-sets="anchor" href="javascript:wsrp_rewrite_chooseReport();"><xts:string id="IDS_NAV_EDT_LINK_SELECT_REPORT"/></a>
  271. </td>
  272. </tr>
  273. </table>
  274. </ui:page-sub-section-content>
  275. </ui:page-sub-section>
  276. <ui:page-sub-section tailing-space="false">
  277. <ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_CHANNEL_NAME"/></ui:page-sub-section-title>
  278. <ui:page-sub-section-content>
  279. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  280. <tr>
  281. <td class="portlet-msg-info"><label for="wsrp_rewrite_p_channel" ><xts:string id="IDS_NAV_EDT_DESC_CHANNEL_NAME"/></label></td>
  282. </tr>
  283. <tr>
  284. <td>
  285. <utml:input id="wsrp_rewrite_p_channel" class="portlet-form-input-field" type="text" size="20" name="p_channel">
  286. <utml:value>
  287. <xsl:value-of select="$channel"/>
  288. </utml:value>
  289. </utml:input>
  290. </td>
  291. </tr>
  292. </table>
  293. </ui:page-sub-section-content>
  294. </ui:page-sub-section>
  295. </ui:page-sub-section-group>
  296. </ui:page-section>
  297. <ui:page-section>
  298. <ui:page-section-divider><xts:string id="IDS_NAV_EDT_GROUP_REPORT_OPTIONS"/></ui:page-section-divider>
  299. <ui:page-sub-section-group>
  300. <ui:page-sub-section>
  301. <ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_PORTLET_ACTION"/></ui:page-sub-section-title>
  302. <ui:page-sub-section-content>
  303. <xsl:variable name="view-only" select="$item/nav:type='document'"/>
  304. <xsl:variable name="display-action-value">
  305. <xsl:choose>
  306. <xsl:when test="key('utml-key-params','p_display_action') ">
  307. <xsl:value-of select="key('utml-key-params','p_display_action') "/>
  308. </xsl:when>
  309. <xsl:otherwise>
  310. <xsl:value-of select="$display-action"/>
  311. </xsl:otherwise>
  312. </xsl:choose>
  313. </xsl:variable>
  314. <xsl:variable name="view-action-value">
  315. <xsl:choose>
  316. <xsl:when test="key('utml-key-params','p_view_action') ">
  317. <xsl:value-of select="key('utml-key-params','p_view_action') "/>
  318. </xsl:when>
  319. <xsl:otherwise>
  320. <xsl:value-of select="$view-action"/>
  321. </xsl:otherwise>
  322. </xsl:choose>
  323. </xsl:variable>
  324. <utml:radio-group name="p_display_action" utml:update="false">
  325. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  326. <xsl:variable name="rgl"><xts:string id="IDS_NAV_EDT_LABEL_PORTLET_ACTION" encode="html"/></xsl:variable>
  327. <tbody role="radiogroup" aria-label="{$rgl}">
  328. <tr>
  329. <td>
  330. <utml:input type="radio" aria-labelledby="wsrp_rewrite_IDS_NAV_EDT_ACTION_SHOW_RUN" value="prompt">
  331. <xsl:choose>
  332. <xsl:when test="$view-only">
  333. <xsl:attribute name="disabled">disabled</xsl:attribute>
  334. </xsl:when>
  335. <xsl:when test="$display-action-value = 'prompt'">
  336. <xsl:attribute name="checked">checked</xsl:attribute>
  337. </xsl:when>
  338. </xsl:choose>
  339. </utml:input>
  340. </td>
  341. <td class="portlet-form-field" id="wsrp_rewrite_IDS_NAV_EDT_ACTION_SHOW_RUN"><xts:string id="IDS_NAV_EDT_ACTION_SHOW_RUN"/></td>
  342. </tr>
  343. <tr>
  344. <td>
  345. <utml:input type="radio" aria-labelledby="wsrp_rewrite_IDS_NAV_EDT_ACTION_RUN" value="run">
  346. <xsl:choose>
  347. <xsl:when test="$view-only">
  348. <xsl:attribute name="disabled">disabled</xsl:attribute>
  349. </xsl:when>
  350. <xsl:when test="$display-action-value = 'run'">
  351. <xsl:attribute name="checked">checked</xsl:attribute>
  352. </xsl:when>
  353. </xsl:choose>
  354. </utml:input>
  355. </td>
  356. <td class="portlet-form-field" id="wsrp_rewrite_IDS_NAV_EDT_ACTION_RUN"><xts:string id="IDS_NAV_EDT_ACTION_RUN"/></td>
  357. </tr>
  358. <tr>
  359. <td>
  360. <utml:input aria-labelledby="wsrp_rewrite_IDS_NAV_EDT_ACTION_VIEW" type="radio" value="view" id="wsrp_rewrite_radio_view_action">
  361. <xsl:if test="$view-only or $display-action-value = 'view'">
  362. <xsl:attribute name="checked">checked</xsl:attribute>
  363. </xsl:if>
  364. </utml:input>
  365. </td>
  366. <td class="portlet-form-field" id="wsrp_rewrite_IDS_NAV_EDT_ACTION_VIEW"><xts:string id="IDS_NAV_EDT_ACTION_VIEW"/></td>
  367. </tr>
  368. </tbody>
  369. <tbody>
  370. <tr>
  371. <td></td>
  372. <td>
  373. <ui:page-sub-section-group>
  374. <ui:page-sub-section>
  375. <ui:page-sub-section-title><label for="wsrp_rewrite_IDS_NAV_EDT_ACTION_VIEW_NO_OUTPUT_LABEL"><xts:string id="IDS_NAV_EDT_ACTION_VIEW_NO_OUTPUT_LABEL"/></label></ui:page-sub-section-title>
  376. <ui:page-sub-section-content>
  377. <utml:select id="wsrp_rewrite_IDS_NAV_EDT_ACTION_VIEW_NO_OUTPUT_LABEL" name="p_view_action" size="1" onchange="wsrp_rewrite_selectViewAction()" class="portlet-form-field">
  378. <utml:default-value>
  379. <xsl:value-of select="$view-action-value"/>
  380. </utml:default-value>
  381. <utml:option value="run">
  382. <xts:string id="IDS_NAV_EDT_ACTION_RUN"/>
  383. </utml:option>
  384. <utml:option value="prompt">
  385. <xts:string id="IDS_NAV_EDT_ACTION_SHOW_RUN"/>
  386. </utml:option>
  387. </utml:select>
  388. </ui:page-sub-section-content>
  389. </ui:page-sub-section>
  390. </ui:page-sub-section-group>
  391. </td>
  392. </tr>
  393. </tbody>
  394. </table>
  395. </utml:radio-group>
  396. </ui:page-sub-section-content>
  397. </ui:page-sub-section>
  398. <ui:page-sub-section tailing-space="false">
  399. <ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_SHOW_TOOLBAR"/></ui:page-sub-section-title>
  400. <ui:page-sub-section-content>
  401. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  402. <tr>
  403. <td class="portlet-form-field">
  404. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_NORMAL" name="tmp_toolbar_norm" type="checkbox" value="t" onclick="wsrp_rewrite_setup_norm()">
  405. <xsl:if test="contains( $display-settings-norm, 't')">
  406. <xsl:attribute name="checked"/>
  407. </xsl:if>
  408. </utml:input>
  409. </td>
  410. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_NORMAL"><xts:string id="IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_NORMAL"/></label></td>
  411. </tr>
  412. <tr>
  413. <td class="portlet-form-field">
  414. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_MAXIMIZED" name="tmp_toolbar_max" type="checkbox" value="t" onclick="wsrp_rewrite_setup_max()">
  415. <xsl:if test="contains( $display-settings-max, 't')">
  416. <xsl:attribute name="checked"/>
  417. </xsl:if>
  418. </utml:input>
  419. </td>
  420. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_MAXIMIZED"><xts:string id="IDS_NAV_EDT_LABEL_SHOW_TOOLBAR_MAXIMIZED"/></label></td>
  421. </tr>
  422. </table>
  423. </ui:page-sub-section-content>
  424. </ui:page-sub-section>
  425. </ui:page-sub-section-group>
  426. </ui:page-section>
  427. <ui:page-section>
  428. <ui:page-section-divider><xts:string id="IDS_NAV_EDT_GROUP_WORKSPACE_OPTIONS"/></ui:page-section-divider>
  429. <ui:page-sub-section-group>
  430. <ui:page-sub-section tailing-space="false">
  431. <ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_OPTIONS"/></ui:page-sub-section-title>
  432. <ui:page-sub-section-content>
  433. <utml:input name="p_cw_hide" type="hidden">
  434. <utml:value>
  435. <xsl:value-of select="$cw-hide-value"/>
  436. </utml:value>
  437. </utml:input>
  438. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  439. <tr>
  440. <td class="portlet-form-field">
  441. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_BANNER" name="tmp_cs_banner_hide" type="checkbox" value="banner" onclick="wsrp_rewrite_setup_cw_hide()">
  442. <xsl:if test="contains( $cw-hide-value, 'banner')">
  443. <xsl:attribute name="checked"/>
  444. </xsl:if>
  445. </utml:input>
  446. </td>
  447. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_BANNER"><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_BANNER"/></label></td>
  448. </tr>
  449. <tr>
  450. <td class="portlet-form-field">
  451. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_TABS" name="tmp_cs_tabs_hide" type="checkbox" value="tabs" onclick="wsrp_rewrite_setup_cw_hide()">
  452. <xsl:if test="contains( $cw-hide-value, 'tabs')">
  453. <xsl:attribute name="checked"/>
  454. </xsl:if>
  455. </utml:input>
  456. </td>
  457. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_TABS"><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_TABS"/></label></td>
  458. </tr>
  459. <tr>
  460. <td class="portlet-form-field">
  461. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_GLOBALAREA" name="tmp_cs_ga_hide" type="checkbox" value="globalarea" onclick="wsrp_rewrite_setup_cw_hide()">
  462. <xsl:if test="contains( $cw-hide-value, 'globalarea')">
  463. <xsl:attribute name="checked"/>
  464. </xsl:if>
  465. </utml:input>
  466. </td>
  467. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_GLOBALAREA"><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_GLOBALAREA"/></label></td>
  468. </tr>
  469. <tr>
  470. <td class="portlet-form-field">
  471. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_SIDEBAR" name="tmp_cs_sidebar_hide" type="checkbox" value="sidebar" onclick="wsrp_rewrite_setup_cw_hide()">
  472. <xsl:if test="contains( $cw-hide-value, 'sidebar')">
  473. <xsl:attribute name="checked"/>
  474. </xsl:if>
  475. </utml:input>
  476. </td>
  477. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_SIDEBAR"><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_SIDEBAR"/></label></td>
  478. </tr>
  479. <tr>
  480. <td class="portlet-form-field">
  481. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_COLLABORATION" name="tmp_cs_collaboration_hide" type="checkbox" value="collaboration" onclick="wsrp_rewrite_setup_cw_hide()">
  482. <xsl:if test="contains( $cw-hide-value, 'collaboration')">
  483. <xsl:attribute name="checked"/>
  484. </xsl:if>
  485. </utml:input>
  486. </td>
  487. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_COLLABORATION"><xts:string id="IDS_NAV_EDT_LABEL_WORKSPACE_HIDE_COLLABORATION"/></label></td>
  488. </tr>
  489. </table>
  490. </ui:page-sub-section-content>
  491. </ui:page-sub-section>
  492. </ui:page-sub-section-group>
  493. </ui:page-section>
  494. <xsl:if test="$consumerAgent = 'sharepoint'">
  495. <script language="javascript" src="{$ui-webcontent}cps4/cpsweb/cpsweb.js"/>
  496. <script language="javascript" src="{$ui-webcontent}cps4/cpsweb/sp/collaboration.js"/>
  497. <script language="javascript">
  498. var wsrp_rewrite_messages = {
  499. 'IDS_SP_ERROR_LABEL' :'<xts:string id="IDS_SP_ERROR_LABEL" encode="javascript"/>',
  500. 'IDS_SP_DOCUMENT_NAME_LABEL' :'<xts:string id="IDS_SP_DOCUMENT_NAME_LABEL" encode="javascript"/>',
  501. 'IDS_SP_DOCUMENT_NAME_TOOLTIP' :'<xts:string id="IDS_SP_DOCUMENT_NAME_TOOLTIP" encode="javascript"/>',
  502. 'IDS_SP_OK' :'<xts:string id="IDS_SP_OK" encode="javascript"/>',
  503. 'IDS_SP_CANCEL' :'<xts:string id="IDS_SP_CANCEL" encode="javascript"/>',
  504. 'IDS_SP_OBJECT_TYPE_SITE' :'<xts:string id="IDS_SP_OBJECT_TYPE_SITE" encode="javascript"/>',
  505. 'IDS_SP_OBJECT_TYPE_FOLDER' :'<xts:string id="IDS_SP_OBJECT_TYPE_FOLDER" encode="javascript"/>',
  506. 'IDS_SP_OBJECT_TYPE_DOCUMENT_LIBRARY' :'<xts:string id="IDS_SP_OBJECT_TYPE_DOCUMENT_LIBRARY" encode="javascript"/>',
  507. 'IDS_SP_OBJECT_TYPE_DISCUSSION_LIST' :'<xts:string id="IDS_SP_OBJECT_TYPE_DISCUSSION_LIST" encode="javascript"/>',
  508. 'IDS_SP_EDT_SELECT_DLG_DISCUSSION_TITLE' :'<xts:string id="IDS_SP_EDT_SELECT_DLG_DISCUSSION_TITLE" encode="javascript"/>',
  509. 'IDS_SP_EDT_SELECT_DLG_LOCATION_TITLE' :'<xts:string id="IDS_SP_EDT_SELECT_DLG_LOCATION_TITLE" encode="javascript"/>',
  510. 'IDS_SP_MENU_RUN_PUBLISH' :'<xts:string id="IDS_SP_MENU_RUN_PUBLISH" encode="javascript"/>',
  511. 'IDS_SP_MENU_VERSIONS' :'<xts:string id="IDS_SP_MENU_VERSIONS" encode="javascript"/>',
  512. 'IDS_SP_RUNNING_REPORT' :'<xts:string id="IDS_SP_RUNNING_REPORT" encode="javascript"/>',
  513. 'IDS_SP_CANNOT_RUN_REPORT' :'<xts:string id="IDS_SP_CANNOT_RUN_REPORT" encode="javascript"/>',
  514. 'IDS_SP_DOCUMENT_PUBLISHED': '<xts:string id="IDS_SP_DOCUMENT_PUBLISHED" encode="javascript"><xts:param name="doc">$1</xts:param><xts:param name="doclib">$2</xts:param></xts:string>',
  515. 'IDS_SP_DISCUSSION_STARTED' :'<xts:string id="IDS_SP_DISCUSSION_STARTED" encode="javascript"/>',
  516. 'IDS_SP_DISCUSSION_BODY' :'<xts:string id="IDS_SP_DISCUSSION_BODY" encode="javascript"><xts:param name="title">$1</xts:param></xts:string>',
  517. 'IDS_SP_VIEW_DOCUMENT_ALT' :'<xts:string id="IDS_SP_VIEW_DOCUMENT_ALT" encode="javascript"/>',
  518. 'IDS_SP_VIEW_DOCUMENT_LIBRARY_ALT' :'<xts:string id="IDS_SP_VIEW_DOCUMENT_LIBRARY_ALT" encode="javascript"/>',
  519. 'IDS_SP_MENU_DISCUSS_START' :'<xts:string id="IDS_SP_MENU_DISCUSS_START" encode="javascript"/>',
  520. 'IDS_SP_MENU_DISCUSS_SHOW_RELATED' :'<xts:string id="IDS_SP_MENU_DISCUSS_SHOW_RELATED" encode="javascript"/>',
  521. 'IDS_SP_DOCUMENT_PUBLISH_EXISTS':'<xts:string id="IDS_SP_DOCUMENT_PUBLISH_EXISTS" encode="javascript"><xts:param name="doc">$1</xts:param></xts:string>',
  522. 'IDS_SP_ERROR_CLEAR':'<xts:string id="IDS_SP_ERROR_CLEAR" encode="javascript"></xts:string>'
  523. };
  524. function wsrp_rewrite_updateSelection(id, name, image, imageTitle) {
  525. document.getElementById(id).innerHTML = name;
  526. if (image){
  527. document.getElementById(id + '_image').innerHTML = '&lt;img src="'+image+'" title="'+imageTitle+'" alt="'+imageTitle+'"/>';
  528. }else{
  529. document.getElementById(id + '_image').innerHTML = '';
  530. }
  531. }
  532. function wsrp_rewrite_createSelectionDlg(id, specInput, listType, isHideListFolders){
  533. var dlg= new com_ibm_cognos_cps.sp.SelectDialog({
  534. title: '<xts:string id="IDS_SP_EDT_SELECT_DLG_LOCATION_TITLE" encode="javascript"/>',
  535. height:350,
  536. width: 500,
  537. canSelectReadOnly: true,
  538. messages: wsrp_rewrite_messages,
  539. okCallback: function(data){
  540. specInput.value = data.selectionSpec;
  541. if (specInput.value != '') {
  542. var cForm = document.wsrp_rewrite_form;
  543. if (!cForm &amp;&amp; !cForm.p_publish_no_prompt) {
  544. cForm.p_publish_no_prompt.disabled = false;
  545. }
  546. }
  547. wsrp_rewrite_updateSelection(id, data.fullName, data.image, data.typeLabel);
  548. },
  549. objectTree: new com_ibm_cognos_cps.sp.ObjectTree( {
  550. listType: listType,
  551. allowNoWriteItems: true,
  552. autoErrorRecovery: true,
  553. isShowRootWeb: true,
  554. isHideListFolders: isHideListFolders,
  555. selectionSpec:specInput.value
  556. })
  557. });
  558. dlg.initialize(function(){
  559. if (!dlg.objectTree.error){
  560. document.getElementById(id + '_select').style.display = '';
  561. if (specInput.value !== ''){
  562. // the object tree will try to revert to a location that the use has permission.. The UI should show the original settings.
  563. var selection = dlg.ignoredSelection ? dlg.ignoredSelection : dlg.selection;
  564. wsrp_rewrite_updateSelection(id, selection.fullName, selection.image, selection.typeLabel);
  565. }else {
  566. wsrp_rewrite_updateSelection(id, '<xts:string id="IDS_NAV_EDT_LABEL_NO_REPORT_SELECTED" encode="javascript"/>');
  567. }
  568. }else {
  569. wsrp_rewrite_updateSelection(id, '<xts:string id="IDS_NAV_EDT_LABEL_NO_REPORT_SELECTED" encode="javascript"/>');
  570. }
  571. });
  572. return dlg;
  573. }
  574. function wsrp_rewrite_chooseDiscussionLocation() {
  575. wsrp_rewrite_discussion_dlg.show();
  576. }
  577. function wsrp_rewrite_choosePublishLocation() {
  578. wsrp_rewrite_publish_dlg.show();
  579. }
  580. // Delay the loading until the SP form rewrite is complete (after page load)
  581. function _wsrp_loadSPSolution(){
  582. var loadCollaborationSection = function(count){
  583. document.getElementById('wsrp_collaboration_section').style.display='';
  584. var cForm = document.wsrp_rewrite_form;
  585. // Wait until the form is initialized
  586. if (!cForm &amp;&amp; !cForm.p_publish_spec){
  587. if (count &lt; 10){
  588. setTimeout(function() {
  589. loadCollaborationSection(count+1);
  590. }, 500);
  591. return;
  592. } else {
  593. return;
  594. }
  595. }
  596. window.wsrp_rewrite_publish_dlg = wsrp_rewrite_createSelectionDlg(
  597. 'wsrp_rewrite_publish_selection',
  598. cForm.p_publish_spec,
  599. SP.ListTemplateType.documentLibrary,
  600. false);
  601. window.wsrp_rewrite_discussion_dlg = wsrp_rewrite_createSelectionDlg(
  602. 'wsrp_rewrite_discussion_selection',
  603. cForm.p_discussion_spec,
  604. SP.ListTemplateType.discussionBoard,
  605. true);
  606. }
  607. com_ibm_cognos_cps.sp.executeWhenLoaded( function(){
  608. loadCollaborationSection(1);
  609. });
  610. }
  611. if (window.attachEvent) {
  612. window.attachEvent("onload", _wsrp_loadSPSolution);
  613. } else if (window.addEventListener) {
  614. window.addEventListener("load", _wsrp_loadSPSolution, null);
  615. }
  616. </script>
  617. <div id="wsrp_collaboration_section" style="display:none">
  618. <ui:page-section>
  619. <ui:page-section-divider><xts:string id="IDS_SP_EDT_GROUP_COLLABORATION_OPTIONS"/></ui:page-section-divider>
  620. <ui:page-section-desc><div style="padding:5px"><xts:string id="IDS_SP_EDT_GROUP_COLLABORATION_DESCRIPTION"/></div></ui:page-section-desc>
  621. <ui:page-sub-section-group>
  622. <ui:page-sub-section>
  623. <ui:page-sub-section-title><xts:string id="IDS_SP_EDT_DOCUMENT_LIBRARY"/></ui:page-sub-section-title>
  624. <ui:page-sub-section-content>
  625. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  626. <tr>
  627. <td class="portlet-form-field">
  628. <utml:input type="hidden" name="p_publish_spec">
  629. <utml:value>
  630. <xsl:value-of select="$publish-spec"/>
  631. </utml:value>
  632. </utml:input>
  633. <table border="0" cellpadding="3" cellspacing="0" role="presentation">
  634. <tr>
  635. <td id="wsrp_rewrite_publish_selection_image">
  636. <img src="{$ui-webcontent}cps4/portlets/nav/images/action_busy.gif">
  637. <xsl:attribute name="title"><xts:string id="IDS_NAV_EDT_LOADING"/></xsl:attribute>
  638. <xsl:attribute name="alt"><xts:string id="IDS_NAV_EDT_LOADING"/></xsl:attribute>
  639. </img>
  640. </td>
  641. <td class="portlet-form-field">
  642. <div id="wsrp_rewrite_publish_selection"><xts:string id="IDS_NAV_EDT_LOADING"/></div>
  643. </td>
  644. </tr>
  645. </table>
  646. </td>
  647. </tr>
  648. <tr>
  649. <td class="portlet-form-field">
  650. <a xsl:use-attribute-sets="anchor" style="display:none" id="wsrp_rewrite_publish_selection_select" href="javascript:wsrp_rewrite_choosePublishLocation();"><xts:string id="IDS_NAV_EDT_LINK_SELECT_REPORT"/></a>
  651. </td>
  652. </tr>
  653. </table>
  654. </ui:page-sub-section-content>
  655. </ui:page-sub-section>
  656. <ui:page-sub-section>
  657. <ui:page-sub-section-content>
  658. <table role="presentation">
  659. <tr>
  660. <td>
  661. <utml:input type="checkbox" name="p_publish_no_prompt" value="true">
  662. <xsl:if test="$publish-no-prompt = 'true'">
  663. <xsl:attribute name="checked"/>
  664. </xsl:if>
  665. <xsl:if test="$publish-spec = ''">
  666. <xsl:attribute name="disabled"/>
  667. </xsl:if>
  668. </utml:input>
  669. </td>
  670. <td>
  671. <xts:string id="IDS_SP_EDT_PUBLISH_NO_PROMPT"/>
  672. </td>
  673. </tr>
  674. </table>
  675. </ui:page-sub-section-content>
  676. </ui:page-sub-section>
  677. <ui:page-sub-section>
  678. <ui:page-sub-section-title><xts:string id="IDS_SP_EDT_DOCUMENT_DISCUSSION"/></ui:page-sub-section-title>
  679. <ui:page-sub-section-content>
  680. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  681. <tr>
  682. <td class="portlet-form-field">
  683. <utml:input type="hidden" name="p_discussion_spec">
  684. <utml:value>
  685. <xsl:value-of select="$discussion-spec"/>
  686. </utml:value>
  687. </utml:input>
  688. <table border="0" cellpadding="3" cellspacing="0" role="presentation">
  689. <tr>
  690. <td id="wsrp_rewrite_discussion_selection_image">
  691. <img src="{$ui-webcontent}cps4/portlets/nav/images/action_busy.gif">
  692. <xsl:attribute name="title"><xts:string id="IDS_NAV_EDT_LOADING"/></xsl:attribute>
  693. <xsl:attribute name="alt"><xts:string id="IDS_NAV_EDT_LOADING"/></xsl:attribute>
  694. </img>
  695. </td>
  696. <td class="portlet-form-field">
  697. <div id="wsrp_rewrite_discussion_selection"><xts:string id="IDS_NAV_EDT_LOADING"/></div>
  698. </td>
  699. </tr>
  700. </table>
  701. </td>
  702. </tr>
  703. <tr>
  704. <td class="portlet-form-field">
  705. <a xsl:use-attribute-sets="anchor" style="display:none" id="wsrp_rewrite_discussion_selection_select" href="javascript:wsrp_rewrite_chooseDiscussionLocation();"><xts:string id="IDS_NAV_EDT_LINK_SELECT_REPORT"/></a>
  706. </td>
  707. </tr>
  708. </table>
  709. </ui:page-sub-section-content>
  710. </ui:page-sub-section>
  711. </ui:page-sub-section-group>
  712. </ui:page-section>
  713. </div>
  714. </xsl:if>
  715. <ui:page-section>
  716. <ui:page-section-divider><xts:string id="IDS_NAV_COM_GROUP_VIEWING_OPTIONS"/></ui:page-section-divider>
  717. <ui:page-sub-section-group>
  718. <ui:page-sub-section>
  719. <ui:page-sub-section-title><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_WIDTH"><xts:string id="IDS_NAV_EDT_LABEL_WIDTH"/></label></ui:page-sub-section-title>
  720. <ui:page-sub-section-content>
  721. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  722. <tr>
  723. <td>
  724. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_WIDTH" class="portlet-form-input-field" type="text" size="10" name="p_display_width">
  725. <utml:value>
  726. <xsl:value-of select="$display-width"/>
  727. </utml:value>
  728. </utml:input>
  729. </td>
  730. </tr>
  731. </table>
  732. </ui:page-sub-section-content>
  733. </ui:page-sub-section>
  734. <ui:page-sub-section>
  735. <ui:page-sub-section-title><label for="wsrp_rewrite_p_display_height"><xts:string id="IDS_NAV_EDT_LABEL_HEIGHT"/></label></ui:page-sub-section-title>
  736. <ui:page-sub-section-content>
  737. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  738. <tr>
  739. <td>
  740. <utml:input id="wsrp_rewrite_p_display_height" class="portlet-form-input-field" type="text" size="10" name="p_display_height">
  741. <utml:value>
  742. <xsl:value-of select="$display-height"/>
  743. </utml:value>
  744. </utml:input>
  745. </td>
  746. </tr>
  747. </table>
  748. </ui:page-sub-section-content>
  749. </ui:page-sub-section>
  750. <!-- Chart resize option for the viewer running in Liferay portal -->
  751. <xsl:if test="$consumerAgent = 'liferay'">
  752. <ui:page-sub-section>
  753. <!--<ui:page-sub-section-title><xts:string id="IDS_NAV_EDT_LABEL_VIEWER_RESIZE"/></ui:page-sub-section-title>-->
  754. <ui:page-sub-section-content>
  755. <utml:input type="hidden" name="p_viewer_resize">
  756. <utml:value>
  757. <xsl:value-of select="$viewer-resize"/>
  758. </utml:value>
  759. </utml:input>
  760. <table border="0" cellspacing="0" cellpadding="1" role="presentation">
  761. <tr>
  762. <td class="portlet-form-field">
  763. <utml:input id="wsrp_rewrite_IDS_NAV_EDT_LABEL_VIEWER_RESIZE_ENABLE" name="tmp_viewer_resize" type="checkbox" value="t" onclick="wsrp_rewrite_viewer_resize()">
  764. <xsl:if test="contains( $viewer-resize, 't')">
  765. <xsl:attribute name="checked"/>
  766. </xsl:if>
  767. </utml:input>
  768. </td>
  769. <td class="portlet-form-field"><label for="wsrp_rewrite_IDS_NAV_EDT_LABEL_VIEWER_RESIZE_ENABLE"></label><xts:string id="IDS_NAV_EDT_LABEL_VIEWER_RESIZE_ENABLE"/></td>
  770. </tr>
  771. </table>
  772. </ui:page-sub-section-content>
  773. </ui:page-sub-section>
  774. </xsl:if>
  775. <!-- SAP-HACK-START -->
  776. <ui:admin-settings/>
  777. <!-- SAP-HACK-END -->
  778. </ui:page-sub-section-group>
  779. </ui:page-section>
  780. </ui:page>
  781. </utml:form>
  782. </div>
  783. </xsl:template>
  784. <xsl:template match="nav:pathStep">
  785. <xsl:value-of select="nav:name"/>
  786. <xsl:value-of select="$path-separator"/>
  787. <xsl:apply-templates select="nav:pathStep"/>
  788. </xsl:template>
  789. </xsl:stylesheet>