123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: HTS
- (C) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xsl:import href="../../common/render-outputs.xslt"/>
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/">
- <script type="text/javascript">
- _THIS_.addEventListener('fragment.unload','_THIS_unload', false);
- _THIS_.addEventListener('fragment.load','_THIS_init', false);
- /**
- * Just pass it on.
- */
- function _THIS_unload(evt){
- var _THIS_distList = new Array();
- var _THIS_children = _THIS_.getChildren();
- var i, l = _THIS_children.length;
- for (i = 0; i < l; i++) {
- _THIS_distList[i] = _THIS_children[i].id;
- }
- //do not bubble.
- evt.bubbles = false;
- _F_Event.distribute(_THIS_distList,evt);
- }
- function _THIS_init(evt) {
- //Distribute to children. Pass it down further.
- //Parent is explicitly passing the event here,
- //so cascade it further down.
- var _THIS_distList = new Array();
- var _THIS_children = _THIS_.getChildren();
- var i, l = _THIS_children.length;
- for (i = 0; i < l; i++) {
- _THIS_distList[i] = _THIS_children[i].id;
- }
- _F_Event.distribute(_THIS_distList,evt);
- }
- </script>
- <xsl:choose>
- <xsl:when test="/root/input[@name='dep']/queryResponse/*[local-name()='approveOutput']">
- <xsl:apply-templates select="/root/input[@name='dep']/queryResponse/*[local-name()='approveOutput']"/>
- </xsl:when>
- <xsl:when test="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='preview']/*[local-name()='tsePreview']/*[local-name()='agentPreview']">
- <xsl:apply-templates select="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='preview']/*[local-name()='tsePreview']/*[local-name()='agentPreview']"/>
- </xsl:when>
- <xsl:when test="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='taskLinksList' or local-name()='linksList']">
- <xsl:call-template name="renderTaskLinks"/>
- </xsl:when>
- <xsl:when test="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='contextURL']">
- <xsl:call-template name="renderTM1Div"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="renderTaskLinks">
- <xsl:variable name="description"><xsl:value-of select="./link/display"/></xsl:variable>
- <xsl:call-template name="renderUI">
- <xsl:with-param name="path" select="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='preview']/*[local-name()='tsePreview']/*[local-name()='agentPreview']"/>
- </xsl:call-template>
- <!--div tabindex="0" class="viewer" id="_THIS_viewercontent">_THIS?frag-subfragment=viewer/THIS_</div-->
- </xsl:template>
- <xsl:template name="renderTM1Div">
- <xsl:variable name="url"><xsl:value-of select="/root/input/queryResponse/*[local-name()='planningTask']/*[local-name()='contextURL']"/></xsl:variable>
-
- <script type="text/javascript">
- function openDialog() {
- var dlg = new ui_dialog("TM1Contributor", PFM.JS.IDS_JS_DETAILS, ui_dialog.style.BTN_OK | ui_dialog.style.CENTER | ui_dialog.style.RESIZABLE, -1, -1, 800, 600);
-
- dlg.processCommand = function(cmd) {
- if ((cmd == ui_dialog.button.OK)) {
- //alert("ok");
- }
- this.destroy();
- return true;
- };
- var markup = "<iframe height=\"100%\" width=\"100%\" src=\"<xsl:value-of select="$url"/>\" ></iframe>";
- dlg.setContent(markup);
- dlg.show();
- }
- </script>
- <a href="#" onclick="javascript:openDialog();">Visit IBM Cognos TM1 Contributor</a>
- </xsl:template>
- </xsl:stylesheet>
|