bannerView.xslt 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: HTS
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or 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:frag="http://developer.cognos.com/schemas/cps/logic/fragment/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/" xmlns:nui="http://developer.cognos.com/schemas/cps/logic/nav/ui/1/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" xmlns:layout="http://developer.cognos.com/common/layout" xmlns:valerr="http://developer.cognos.com/validation/errrormessages/1/" xmlns:java="java:com.cognos.portal.utils.CCLLocaleUtils" exclude-result-prefixes="xts xtsext ui nui nav">
  9. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  10. <xsl:template match="/">
  11. <script type="text/javascript">
  12. _THIS_.addEventListener("fragment.refresh", "_THIS_refreshAll");
  13. _THIS_.addEventListener("fragment.load", "_THIS_init");
  14. function _THIS_refreshAll(evt) {
  15. var _THIS_utils = new hts_utils(_THIS_);
  16. _THIS_utils.refreshCurrentTab('poolTaskList');
  17. }
  18. function createPlanningBanner() {
  19. hts_productMode.setMode(hts_productMode.PLANNING);
  20. /*
  21. * Create a progress pane that consists of a title
  22. */
  23. var container = document.createElement('div');
  24. <xsl:variable name="productName" select="/root/*[local-name()='input' and @name='custom']/*[local-name()='custom']/*[local-name()='param' and @name='displayText']"/>
  25. <xsl:variable name="userName" select="/root/*[local-name()='input' and @name='settings']/*[local-name()='settings']/*[local-name()='param' and @name='user']"/>
  26. <xsl:variable name="skin" select="/root/*[local-name()='input' and @name='settings']/*[local-name()='settings']/*[local-name()='param' and @name='skin']"/>
  27. //BANNER
  28. document.title = '<xsl:value-of select="xtsext:javascriptencode(string($productName))"/>';
  29. var progressBanner = dojo.byId("dojoBanner");
  30. var bannerParams = {
  31. pmpWebRoot: "../../../pmpsvc",
  32. helpPage: "rightsProgress",
  33. userName: '<xsl:value-of select="xtsext:javascriptencode(string($userName))"/>',
  34. skinName: '<xsl:value-of select="xtsext:javascriptencode(string($skin))"/>'
  35. };
  36. var banner = new common.widgets.BannerWidget(bannerParams, progressBanner);
  37. banner.setBackPage("applications.jsp");
  38. //if (this.securityMode == "CAM") {
  39. banner.showContainer("preferences", true);
  40. //}
  41. dojo.connect(banner, "onRefresh", this, function(){
  42. window.location.reload();
  43. });
  44. /**var deferred = common.ProgressDialog.show(
  45. {title: this.getMessages().getMessage('progressTitle'), showCancel: true});
  46. deferred.addCallback(this, function(result){
  47. if('CANCEL' == result){
  48. //if cancelled, will go back to the portal page
  49. this.goBack()
  50. }
  51. });*/
  52. return container;
  53. }
  54. function _THIS_init () {
  55. //We are running in Planning mode so hide the links.
  56. if (hts_productMode &amp;&amp; hts_productMode.getMode() == hts_productMode.PLANNING) {
  57. dojo.registerModulePath("common", "../../pmpjs/common");
  58. parent.handleLogon = function(href, frag) {
  59. window.location.href = _F_Config.webContent + "/applications.jsp";
  60. };
  61. dojo.require("common.widgets.BannerWidget");
  62. dojo.addOnLoad( function() {
  63. dojo.attr("_THIS_bannercontent","style",{display:"none"});
  64. createPlanningBanner();
  65. // every element in the page with the class "blueButton" assigned
  66. dojo.query(".headerTitle").forEach(function(node, index, arr){
  67. node.style.backgroundColor="transparent";
  68. //dojo.attr(node,"backgroundColor","inherit");
  69. //dojo.style(node,{backgroundColor:"inherit"});
  70. //node.style.removeProperty("background-color");
  71. //dojo.style(node, "padding","0px");
  72. });
  73. dojo.query(".mainHeader1").forEach(function(node, index, arr){
  74. //alert("main header 1 found");
  75. //dojo.style(node, "backgroundColor","");
  76. dojo.style(node, "borderBottom","0px");
  77. dojo.style(node, "borderTop","0px");
  78. dojo.style(node, "borderLeft","0px");
  79. dojo.style(node, "padding","0px");
  80. });
  81. });
  82. }
  83. }
  84. </script>
  85. <div id="_THIS_bannercontent">
  86. _THIS?frag-subfragment=banner/THIS_
  87. </div>
  88. <div style="font-size: 130%">
  89. <div id="dojoBanner" ></div>
  90. </div>
  91. </xsl:template>
  92. </xsl:stylesheet>