123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?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:include href="taskWizardPage0.xslt"/>
- <xsl:include href="taskWizardPage1.xslt"/>
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
-
- <!-- global vars -->
- <xsl:variable name="stateParams" select="/root/state/param"/>
- <xsl:variable name="nextPage" select="/root/state/param[@name='currentPage']"/>
- <xsl:variable name="enableBackButton" select="/root/state/param[@name='enableBackButton']"/>
- <xsl:variable name="enableNextButton" select="/root/state/param[@name='enableNextButton']"/>
- <xsl:variable name="enableFinishButton" select="/root/state/param[@name='enableFinishButton']"/>
- <xsl:template match="/">
-
- <script language="javascript">
- // enable logging?
- _F_config.enableLog = false;
-
- var currentForm = '_THIS_form0';//this needs to be changed by the server. We really need this as the form id, so that we can submit the correct form.
- function _THIS_update() {
- //examples:
- // _THIS_.retrieve("update=owner&value="+searchPath);
- // _THIS_.retrieve("update="+inputVar+"&value="+input);
- }
-
- function _THIS_handleButton(buttonName)
- {
- document.getElementById('_THIS_form0').navAction.value = buttonName;
- document.getElementById('_THIS_form0').submit();
- }
-
- function _THIS_processNextButton()
- {
- //TODO remove this
- }
-
- </script>
- <div id="_THIS_div0" class="scrollFrame">
- <form name="_THIS_form0" id="_THIS_form0" action="_THIS?/THIS_">
- <input type="hidden" name="navAction" value="next"/><!-- each page will need one of these at the mo.. -->
-
- <!-- test stuff
- <div> test <xsl:value-of select="/root/state/param[@name='navAction']" />
- <xsl:for-each select="$stateParams">
- <br/>
- <xsl:value-of select="@name"/>
- =<xsl:value-of select="."/>
- </xsl:for-each>
- </div>
- -->
- <table class="taskView" cellpadding="0" width="100%" cellspacing="0">
-
- <!-- in here, I want to display the pages -->
- <tr>
- <td valign="top">
- <!-- do the page change logic here at the mo... -->
- <xsl:choose>
- <xsl:when test="/root/state/param[@name='currentPage']='page0'">
- <xsl:call-template name="page0"/>
- </xsl:when>
- <xsl:when test="/root/state/param[@name='currentPage']='page1'">
- <xsl:call-template name="page1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="page0"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
-
- <!-- nav buttons -->
- <tr>
- <table border="0" cellpadding="1" cellspacing="0" class="dialogButtonBar">
-
- <tr>
- <td width="3" valign="middle">
- <img width="3" src="/cognos8/ps/images/space.gif"/>
- </td>
- <td valign="middle">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <xsl:call-template name="displayNavButton">
- <xsl:with-param name="buttonName"><xts:string id="IDS_FRAG_CANCEL_BUTTON_NAME"/></xsl:with-param>
- <xsl:with-param name="isEnabled">true</xsl:with-param>
- </xsl:call-template>
- </td>
- <td>
- <img height="1" width="10" src="/cognos8/ps/images/space.gif"/>
- </td>
- <td>
- <xsl:call-template name="displayNavButton">
- <xsl:with-param name="buttonName"><xts:string id="IDS_FRAG_BACK_BUTTON_NAME"/></xsl:with-param>
- <xsl:with-param name="isEnabled"><xsl:value-of select="$enableBackButton" /></xsl:with-param>
- </xsl:call-template>
- </td>
- <td>
- <img height="1" width="10" src="/cognos8/ps/images/space.gif"/>
- </td>
- <td>
- <xsl:call-template name="displayNavButton">
- <xsl:with-param name="buttonName"><xts:string id="IDS_FRAG_NEXT_BUTTON_NAME"/></xsl:with-param>
- <xsl:with-param name="isEnabled"><xsl:value-of select="$enableNextButton" /></xsl:with-param>
- </xsl:call-template>
- </td>
- <td>
- <img height="1" width="10" src="/cognos8/ps/images/space.gif"/>
- </td>
- <td>
- <xsl:call-template name="displayNavButton">
- <xsl:with-param name="buttonName"><xts:string id="IDS_FRAG_FINISH_BUTTON_NAME"/></xsl:with-param>
- <xsl:with-param name="isEnabled">false</xsl:with-param>
- </xsl:call-template>
-
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </tr>
- </table>
- </form>
- </div>
- </xsl:template>
- <xsl:template name="displayNavButton">
- <xsl:param name="buttonName"/>
- <xsl:param name="isEnabled"/>
- <xsl:choose>
- <xsl:when test="$isEnabled = 'true'">
- <table cellpadding="0" cellspacing="0" onmouseover="this.className = 'commandButtonOver'" onmouseout="this.className = 'commandButton'" onmousedown="this.className = 'commandButtonDown'" class="commandButton">
- <tr>
- <td valign="middle" align="center" nowrap="nowrap" id="btnAnchorIE">
- <img height="1" border="0" width="70" src="/cognos8/ps/images/space.gif"/>
- <br/>
-
-
- <a onClick="javascript:_THIS_processNextButton();" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" href="javascript:_THIS_handleButton('{$buttonName}')"><xsl:value-of select="$buttonName" /></a>
- <!--
- <xsl:element name="a">
- <xsl:attribute name="href">javascript:handleButton('<xsl:value-of select="$buttonName" />')</xsl:attribute>
- <xsl:attribute name="onmouseout">window.status='';return true;</xsl:attribute>
- <xsl:attribute name="onmouseover">window.status='';return true;</xsl:attribute>
- <xsl:attribute name="onclick">javascript:processNextButton();</xsl:attribute>
- <xsl:value-of select="$buttonName" />
- </xsl:element>
- -->
- </td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <table cellpadding="0" cellspacing="0" class="commandButtonInactive" style="padding-right:10px; padding-left:10px; padding-top:2px; padding-bottom:3px;">
- <tr>
- <td valign="middle" align="center" nowrap="nowrap" id="btnAnchorIE">
- <img height="1" border="0" width="50" src="/cognos8/ps/images/space.gif"/>
- <br/><xsl:value-of select="$buttonName" /></td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
|