123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!-- Content Request =========================================================== -->
- <xts:block id="getContent" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <xsl:variable name="query-values" select="/root/env/param"/>
- <xsl:template match="/">
- <!-- Either unpack the list or retrieve the jobSteps -->
- <xts:sequence>
- <xts:append>
- <xsl:choose>
- <xsl:when test="$query-values[@name = 'jobSteps']">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap',string( $query-values[@name = 'jobSteps'] )), true() )" disable-output-escaping="yes"/>
- </xsl:when>
- <!-- not steps defined yet. -->
- <xsl:otherwise>
- <steps>
- <queryResponse xmlns="http://developer.cognos.com/schemas/xts-cm/1/"/>
- </steps>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getContent">
- <!-- get the ContentManager logic sheet -->
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:st="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/specializetabs/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:x="x"
- exclude-result-prefixes="xsl cm cml df dp pf bus utml xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'modify_sequence.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <xsl:variable name="stepsCount" select="count(/root/steps/cm:queryResponse/cm:jobStepDefinition[not(x:deleted)])"/>
- <xsl:variable name="inWizard" select="key('env-param', 'm_new_class') != ''"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$product_name">
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <pf:help context="HID_SCHEDULE_MULTIPLE"/>
- <!-- Help system -->
- <script language="javascript">
-
- var stepsOptionList = new Array();
- <xsl:for-each select="steps/cm:queryResponse/cm:jobStepDefinition[not(x:deleted)]/cm:stepObject/*">
- <xsl:variable name="pathStr">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </xsl:variable>
- <xsl:variable name="displayStr">
- <xts:string id="IDS_MODIFY_STEPS_SEQUENCE_OPTIONS">
- <xts:param name="obj_name">
- <xsl:value-of select="cm:defaultName"/>
- </xts:param>
- <xts:param name="obj_path">
- <xsl:value-of select="normalize-space($pathStr)"/>
- </xts:param>
- </xts:string>
- </xsl:variable>
- stepsOptionList[<xsl:value-of select="(position() - 1)"/>] = new Array("<xsl:value-of select="$stepsCount - (position() - 1)"/>", "<xsl:value-of select="xtsext:javascriptencode(normalize-space(string($displayStr)))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(parent::*/parent::*/x:guid))"/>", "", "<xsl:value-of select="xtsext:javascriptencode(string(cm:defaultName))"/>", "");
- </xsl:for-each>
-
- //set all the values to zero
- function resetToZero(what, sortArray)
- {
- sortList(what, sortArray, 'a4');
-
- for (var i=0; i < what.options.length; i++)
- {
- sortArray[what[i].value][0] = 0;
- what[i].selected = false;
- }
- }
-
- //this will set the values for steps selectbox
- function setValues()
- {
- var selectList = document.pform.entriesSortOrder;
- var sortArray = stepsOptionList;
- if (selectList)
- {
- for (var i=0; i < selectList.options.length; i++)
- {
- positionInArray = selectList[i].value;
- dispSeq = i+1;
- selectList[i].value = dispSeq + ',' + sortArray[positionInArray][2];
- selectList[i].selected = true;
- }
- }
- }
-
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <utml:input name="modifySequence" type="hidden" value="true"/>
- <!-- dialog header -->
- <dp:header>
- <!-- header titles-->
- <dp:title>
- <xsl:variable name="object-name">
- <xsl:choose>
- <xsl:when test="$inWizard">
- <xts:string id="IDS_ADDENTRIES_TITLE_NEW_JOB"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('env-param', 'm_name')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:string id="IDS_MODIFY_STEPS_SEQUENCE_TITLE">
- <xts:param name="obj_name">
- <span>
- <xsl:if test="not($inWizard)">
- <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
- </xsl:if>
- <xsl:value-of select="xtsext:enforceBTD($object-name, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </span>
- </xts:param>
- </xts:string>
- </dp:title>
- </dp:header>
- <lyt:layout style="1" border="no">
- <lyt:section>
- <xsl:if test="steps/cm:queryResponse/cm:jobStepDefinition[not(x:deleted)]">
- <dp:list title="IDS_PROP_JOB_STEPS_LABEL" for="ctrl_entriesSortOrder">
- <dp:text width="100%">
- <cf:sortList name="entriesSortOrder" form="pform" array="stepsOptionList" size="15" id="ctrl_entriesSortOrder">
- <cf:initContent>
- <xsl:for-each select="steps/cm:queryResponse/cm:jobStepDefinition[not(x:deleted)]/cm:stepObject/*">
- <xsl:variable name="pathStr">
- <cf:do-the-path-link>
- <cf:param name="familytree">cm:ancestors</cf:param>
- <cf:param name="familymember">cm:defaultName</cf:param>
- <cf:param name="onlyAncestors">true</cf:param>
- </cf:do-the-path-link>
- </xsl:variable>
- <utml:option>
- <xsl:attribute name="value"><xsl:value-of select="(position() - 1)"/></xsl:attribute>
- <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
- <xts:string id="IDS_MODIFY_STEPS_SEQUENCE_OPTIONS">
- <xts:param name="obj_name">
- <xsl:value-of select="xtsext:enforceBTD(cm:defaultName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- <xts:param name="obj_path">
- <xsl:value-of select="normalize-space($pathStr)"/>
- </xts:param>
- </xts:string>
- <xsl:text/>
- </utml:option>
- </xsl:for-each>
- </cf:initContent>
- </cf:sortList>
- </dp:text>
- </dp:list>
- </xsl:if>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_OK" utml:validate="false" df:style="stack-down-save" onclick="javascript:setValues()"/>
- <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug'] = '1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- debug logic sheet -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <!-- add any debug templates -->
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|