12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2017
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt"/>
- <!--
- ===============================================================================================
- restore_state - have been called from powerPlayService so we have to restore the state and extract the new prompt parameters
- ===============================================================================================
- -->
- <xts:block id="restore_state" processor="XSLT" dependency="formlogic_init" type="exec" condition=".[ /root/env/param[@name='opaque'] or /root/env/param[@name='ccstate']]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- exclude-result-prefixes="xsl pf xtsext xsi SOAP-ENC">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- save the value of this environment variable while we restore the <env> node -->
- <xsl:variable name="saved_parameters" select="key('env-param','m_parameter')"/>
- <xsl:variable name="saved_parameters_exists" select="boolean(key('env-param','m_parameter'))"/>
- <xsl:variable name="saved_m" select="key('env-param', 'm')"/>
- <xsl:variable name="saved_m_exists" select="boolean(key('env-param', 'm'))"/>
-
- <!-- restore the saved state -->
- <xts:replace select="/root/env">
- <env>
- <xts:transform name="XMLDecode">
- <xsl:choose>
- <!-- ccstate is returned from powerPlay when the user presses Cancel so unpack the state that is returned from ccstate -->
- <xsl:when test="/root/env/param[@name='ccstate']">
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','ccstate')))), true())"/>
- </xsl:when>
- <!-- opaque is returned from powerPlay when the user presses OK. -->
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','opaque')))), true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:transform>
- </env>
- </xts:replace>
-
- <!-- the saved environment might have an invalid value for m - so replace it -->
- <xsl:if test="$saved_m_exists">
- <xts:delete select="/root/env/param[@name='m']"/>
- <xts:append select="/root/env">
- <param name="m">
- <xsl:value-of select="$saved_m"/>
- </param>
- </xts:append>
- </xsl:if>
-
- <!-- restore the environment variable that was saved prior to restoring the <env> node -->
- <xsl:if test="$saved_parameters_exists">
- <xts:delete select="/root/env/param[@name='m_parameter']"/>
- <xts:append select="/root/env">
- <param name="m_parameter">
- <xsl:value-of select="$saved_parameters"/>
- </param>
- </xts:append>
- </xsl:if>
-
- <!-- clear some environment parameters from the restored state -->
- <xts:delete select="/root/env/param[@name='controller_state']"/>
- <xts:delete select="/root/env/param[@name='parameterDescription']"/> <!-- force generation of new parameter description -->
- <xts:delete select="/root/env/param[@name='cleared_prompts']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- create the user capabilities structure
- ===============================================================================================
- -->
- <xts:block id="buildCapabilities" dependency="restore_state" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- pf:variables defines the user capabilities variables for Cognos 8 (amongst other useful things). Interested in these :
- userCanUseSched
- userCanUseAGS
- userCanUseCST
- userCanUseIndexSearch
- -->
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <userCapabilities>
- <value>
- <xsl:if test="$userCanUseSched">
- <item>
- <userCapability>canUseScheduling</userCapability>
- </item>
- </xsl:if>
- <xsl:if test="$userCanUseAGS">
- <item>
- <userCapability>canUseEventStudio</userCapability>
- </item>
- </xsl:if>
- <xsl:if test="$userCanUseCST">
- <item>
- <userCapability>canUseContentStoreTool</userCapability>
- </item>
- </xsl:if>
- <xsl:if test="$userCanUseIndexSearch">
- <item>
- <userCapability>canUseIndexSearch</userCapability>
- </item>
- </xsl:if>
- <xsl:if test="$hasMetricsManagerAdministrationCapability">
- <item>
- <userCapability>canUseMetricsManagerAdministration</userCapability>
- </item>
- </xsl:if>
- <xsl:if test="$userCanUsePlanningAdministration">
- <item>
- <userCapability>canUsePlanningAdministration</userCapability>
- </item>
- </xsl:if>
- </value>
- </userCapabilities>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- decode the agent items
- ===============================================================================================
- -->
- <xts:block id="decode_agent_definition" dependency="buildCapabilities" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'agent_definition_blob']">
- <!-- decode the agent items -->
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_dialogadapter001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- <!-- get rid of the blob for the time being -->
- <xts:delete select="/root/env/param[@name = 'agent_definition_blob']"/>
- <xts:delete select="/root/env/param[@name='showAlert']" mandatory="false"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- create an empty agent item -->
- <xts:append select="/root">
- <agent_definition>
- <sequencing>parallel</sequencing>
- <allowNotification>false</allowNotification>
- <notificationList/>
- <condition/>
- <schedule/>
- <deletedItems/>
- <items/>
- <agentOptions>
- <!-- create new default agent options-->
- <xts:transform src="transforms/portal/options/buildOptions.xslt" processor="XSLT">
- <root>
- <xts:transform src="transforms/portal/options/buildOptionItems.xslt" processor="XSLT">
- <root>
- <xts:transform name="XML" src="portal/options.xml"/>
- <optionType>runOptions</optionType>
- <optionType>powerPlay8Options</optionType> -->
- <env>
- <param name="m_ro_saveOutput">true</param>
- <param name="save_how">report</param>
- <param name="m_ro_prompt">false</param>
- <param name="m_ppro_prompt">false</param>
- <param name="m_pp8ro_prompt">false</param>
- </env>
- <genDefaults>false</genDefaults>
- </root>
- </xts:transform>
- </root>
- </xts:transform>
- </agentOptions>
- </agent_definition>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getPageData - create the request parameters for the content page
- ===============================================================================================
- -->
- <xts:block id="getPageData" dependency="decode_agent_definition" path="ags/navigator.xslt" processor="XSLT" type="exec"/>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="callControllerTemplateResults" path="/ags/callResultTemplate.xslt" dependency="getPageData" condition=".[(/root/env/param[@name='prevTabID']!=/root/env/param[@name='tabSelectedID']) or (/root/env/param[@name='agentItemOp']='remove') or (/root/env/param[@name='agentItemOp']='undo')]" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="handleControllerTemplateResults" path="/ags/handleResultTemplate.xslt" dependency="callControllerTemplateResults" condition=".[(/root/env/param[@name='prevTabID']!=/root/env/param[@name='tabSelectedID']) or (/root/env/param[@name='agentItemOp']='remove') or (/root/env/param[@name='agentItemOp']='undo')]" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- Add additional info after task submission such as email has attachment or report has prompts
- ===============================================================================================
- -->
- <xts:block id="addTaskAdditionalInfo" type="exec" dependency="handleControllerTemplateResults" processor="XSLT" mandatory="false" condition=".[(/root/env/param[@name='prevTabID']!=/root/env/param[@name='tabSelectedID']) and (/root/env/param[@name='agentItemOp']!='remove') and (/root/env/param[@name='agentItemOp']!='undo')]">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xts xsl xtsext pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- include the serialization code -->
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="prevTabID">
- <xsl:value-of select="/root/env/param[@name='prevTabID']"/>
- </xsl:variable>
- <xts:sequence>
- <!-- delete prev. info if found -->
- <xsl:if test="/root/agent_definition/items/item[id=$prevTabID]/type='message' or /root/agent_definition/items/item[id=$prevTabID]/type='report'">
- <xts:delete select="/root/agent_definition/items/item[id='{$prevTabID}']/addInfo" mandatory="false"/>
- </xsl:if>
- <!-- add additional information to the agent item -->
- <xsl:if test="/root/agent_definition/items/item[id=$prevTabID]/type='message' and /root/morphletResponse/hasAttachment='true'">
- <xts:append select="/root/agent_definition/items/item[id='{$prevTabID}']">
- <addInfo>hasAttachment</addInfo>
- </xts:append>
- </xsl:if>
- <xsl:if test="/root/agent_definition/items/item[id=$prevTabID]/type='report' and /root/env/param[@name='has_prompts']='true'">
- <xts:append select="/root/agent_definition/items/item[id='{$prevTabID}']">
- <addInfo>hasPrompts</addInfo>
- </xts:append>
- </xsl:if>
- <!-- clean env -->
- <xsl:if test="/root/agent_definition/items/item[id=$prevTabID]/type='report'">
- <xts:delete select="/root/env/param[@name='has_prompts']" />
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- Correct the task name if required ... the agent task action names which are now not specified by
- user and are taken from task property
- for Email it is subject, report .. report name, webservice - operation name, SQL - proc name etc.
- thus in order to avoid duplicate names we need to manage these names and we do it by putting a
- sequence number at the end of task name
- ===============================================================================================
- -->
- <xts:block id="manageTaskNameBlock" path="/ags/manageTaskName.xslt" dependency="addTaskAdditionalInfo" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Save the agent action info. The encoded contents will be stored in /root/env/param[@name='<action>']. where the action is
- the contents of /root/env/param[@name='prevTabID'] which can be schedule/message/agent/job/report.
-
- Once the individual elements have been saved into the environment they will be removed.
- ===============================================================================================
- -->
- <xts:block id="storePreviousTab" path="/ags/storeTabTemplate.xslt" dependency="manageTaskNameBlock" mandatory="false" condition=".[(/root/env/param[@name='prevTabID'] != /root/env/param[@name='tabSelectedID']) or (/root/env/param[@name='agentItemOp']='remove') or (/root/env/param[@name='agentItemOp']='undo')]" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ================================================================================
- add a new item into the tasks if we wanted to
- ===============================================================================================
- -->
- <xts:block id="add_new_task" type="exec" dependency="storePreviousTab" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='newTaskType']!='']">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xts xsl xtsext pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- include the serialization code -->
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="newTaskType">
- <xsl:value-of select="/root/env/param[@name='newTaskType']"/>
- </xsl:variable>
- <xsl:variable name="task_guid">
- <xsl:value-of select="xtsext:generateGUID()"/>
- </xsl:variable>
- <xsl:variable name="task_id">
- <xsl:value-of select="concat('AgentTask-', string($task_guid))"/>
- </xsl:variable>
- <xsl:variable name="task_name">
- <xsl:call-template name="buildTaskName">
- <!-- should this be localized - it's going to show up in the UI -->
- <xsl:with-param name="baseName">
- <xsl:choose>
- <!-- any extraneous new lines gotten included in string here removed beow by normalize-space()-->
- <xsl:when test="$newTaskType='url'">
- <xts:string id="AGS_URL_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='web'">
- <xts:string id="AGS_WEB_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='sql'">
- <xts:string id="AGS_SQL_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='message'">
- <xts:string id="AGS_EMAIL_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='report'">
- <xts:string id="AGS_REPORT_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='job'">
- <xts:string id="AGS_JOB_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='agent'">
- <xts:string id="AGS_AGENT_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='import'">
- <xts:string id="AGS_IMPORT_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='export'">
- <xts:string id="AGS_EXPORT_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='index'">
- <xts:string id="AGS_INDEX_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='content'">
- <xts:string id="AGS_CONTENT_MANAGEMENT_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='metric'">
- <xts:string id="AGS_METRIC_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='planningMacro'">
- <xts:string id="AGS_PLANNING_MACRO_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='migration'">
- <xts:string id="AGS_MIGRATION_WTASK"/>
- </xsl:when>
- <xsl:when test="$newTaskType='approval'">
- <xts:string id="AGS_APPROVAL_REQUEST"/>
- </xsl:when>
- <xsl:when test="$newTaskType='notification'">
- <xts:string id="AGS_NOTIFICATION_REQUEST"/>
- </xsl:when>
- <!-- space to add any other changes -->
- <xsl:otherwise>
- <xsl:value-of select="$newTaskType"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="suffix">
- <xsl:text>0</xsl:text>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="$newTaskType != ''">
- <xts:sequence>
- <xts:append select="/root/agent_definition/items">
- <item>
- <id>
- <xsl:value-of select="$task_id"/>
- </id>
- <type>
- <xsl:value-of select="$newTaskType"/>
- </type>
- <name>
- <xsl:value-of select="$task_name"/>
- </name>
- <!-- New task filter is not set yet-->
- <taskLevelFilter/>
- <runCondition>runOnSuccess</runCondition>
- <!-- add in the default suppression when creating the item -->
- <xsl:if test="/root/agent_definition/suppressionSet != ''">
- <suppression>
- <param name="Filter_new">new</param>
- <param name="Filter_changed">changed</param>
- <param name="Filter_unchanged">unchanged</param>
- </suppression>
- </xsl:if>
- </item>
- </xts:append>
- <!-- create the parameter for the task -->
- <xts:append select="/root/env">
- <param name="taskName">
- <xsl:value-of select="$task_name"/>
- </param>
- </xts:append>
- <!-- we also want to create a blob for the entry and update the task name to a default value -->
- <xsl:variable name="serialized_task">
- <xsl:call-template name="serialize-xml">
- <!-- hopefully - this will pick up on the appended item and put it in there too -->
- <xsl:with-param name="node-set" select="/root/env/param[@name=$task_name]"/>
- </xsl:call-template>
- </xsl:variable>
- <!-- build the task blob -->
- <xts:append select="/root/env">
- <param name="{$task_id}">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_addnewtask_settemplateid_dialogadapter002'), xtsext:web64encode( string( $serialized_task ), true()))"/>
- </param>
- </xts:append>
- <xsl:if test="/root/env/param[@name='tabSelectedID'] = /root/env/param[@name='newTaskType']">
- <xts:delete select="/root/env/param[@name='tabSelectedID']"/>
- <xts:append select="/root/env">
- <param name="tabSelectedID">
- <xsl:value-of select="$task_id"/>
- </param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- <!-- mini template to generate a unique task name -->
- <xsl:template name="buildTaskName">
- <xsl:param name="baseName"/>
- <xsl:param name="suffix"/>
- <!-- build the task name we want -->
- <xsl:variable name="taskName">
- <xsl:value-of select="normalize-space($baseName)"/>
- <xsl:if test="number($suffix) != 0">
- <!-- append the suffix -->
- <xsl:value-of select="$suffix"/>
- </xsl:if>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="/root/agent_definition/items/item[./name=$taskName]">
- <xsl:call-template name="buildTaskName">
- <xsl:with-param name="baseName">
- <xsl:value-of select="normalize-space($baseName)"/>
- </xsl:with-param>
- <xsl:with-param name="suffix">
- <xsl:value-of select="string(number($suffix)+1)"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$taskName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- generate default email
- ===============================================================================================
- -->
- <xts:block id="generateDefaultEmail" dependency="add_new_task" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='newTaskType']='message']">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xts xsl xtsext dlgctrl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- get the number of agent items that we're going to be dealing with -->
- <xsl:template match="/">
- <xts:sequence>
- <dlgctrl:XTS2Request>
- <dlgctrl:target>/ags/email_options_ags.xts</dlgctrl:target>
- <dlgctrl:stackName>email_options</dlgctrl:stackName>
- <dlgctrl:requestState>email|genDefault</dlgctrl:requestState>
- <dlgctrl:resultNode>messageDefaults</dlgctrl:resultNode>
- </dlgctrl:XTS2Request>
- <xts:delete select="/root/messageDefaults/options/value/item/name[.='subject']/.." mandatory="false"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- generateDefaultEmail2
- ===============================================================================================
- -->
- <xts:block id="generateDefaultEmail2" dependency="generateDefaultEmail" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='newTaskType']='message']">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xts xsl xtsext dlgctrl pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- get the number of agent items that we're going to be dealing with -->
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/messageDefaults"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="options">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_generateDefaultEmail2_settemplateid_dialogadapter612'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- Do any agent items operations
- ===============================================================================================
- -->
- <xts:block id="agent_definition_ops" dependency="generateDefaultEmail2" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='agentItemOp']!='']">
- <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xts xsl xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- get the number of agent items that we're going to be dealing with -->
- <xsl:variable name="num_agent_items" select="count(/root/agent_definition/items/item)"/>
- <xsl:variable name="agentItemOp" select="/root/env/param[@name = 'agentItemOp']"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- do what we have to do -->
- <xsl:choose>
- <!-- DO THE SHUFFLE OPERATION -->
- <xsl:when test="$agentItemOp = 'shuffle'">
- <xsl:variable name="id1" select="/root/env/param[@name='itemSelected']"/>
- <xsl:variable name="id2" select="/root/env/param[@name='itemNewLocation']"/>
- <!-- swap the nodes id1 and id2 -->
- <xsl:variable name="tempNode">
- <xsl:copy-of select="/root/agent_definition/items/item[./id=$id1]"/>
- </xsl:variable>
- <!-- delete it now -->
- <xts:delete select="/root/agent_definition/items/item[./id='{$id1}']"/>
- <!-- insert it before id2 -->
- <xts:insert select="/root/agent_definition/items/item[./id='{$id2}']" mandatory="true">
- <xsl:copy-of select="$tempNode"/>
- </xts:insert>
- </xsl:when>
- <xsl:when test="$agentItemOp = 'remove'">
- <xsl:variable name="delTab" select="/root/env/param[@name='tabSelectedID']"/>
- <xsl:choose>
- <xsl:when test="$delTab = 'AgentTask-condition'">
- <xts:delete select="/root/agent_definition/condition"/>
- <xts:delete select="/root/env/param[@name='Summary_condition']"/>
- </xsl:when>
- <xsl:when test="$delTab = 'AgentTask-schedule'">
- <xts:delete select="/root/agent_definition/schedule"/>
- <xts:delete select="/root/env/param[@name = '{$delTab}']"/>
- <!--
- delete schedule's massive params from ENV
- -->
- <xts:delete select="/root/env/param[starts-with(@name,'m_sp') or starts-with(@name,'p_sche') or
- @name='sub_type' or
- @name='scheduleParameters' or
- starts-with(@name,'txtDate')
- or starts-with(@name,'AMPM') or
- contains(@name,'stime')
- ]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="/root/agent_definition/items/item">
- <xsl:if test="./id = $delTab">
- <xts:append select="/root/agent_definition/deletedItems">
- <item>
- <position><xsl:value-of select="position()"/></position>
- <params>
- <xsl:value-of select="/root/env/param[@name = $delTab]"/>
- </params>
- <xsl:copy-of select="./*"/>
- </item>
- </xts:append>
- <!-- delete the item in the list -->
- <xts:delete select="/root/agent_definition/items/item[./id = '{$delTab}']"/>
- <!-- delete the associated data blob -->
- <xts:delete select="/root/env/param[@name = '{$delTab}']"/>
- <xsl:variable name="prevTabID" select="/root/env/param[@name='prevTabID']"/>
- <xts:update select="/root/env/param[@name='tabSelectedID']">
- <param name="tabSelectedID">
- <xsl:choose>
- <xsl:when test="$prevTabID ='' or $prevTabID =$delTab or $prevTabID ='AgentTask-schedule'">AgentTask-condition</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$prevTabID"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:update>
- </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$agentItemOp = 'undo'">
- <xsl:if test="/root/agent_definition/deletedItems/item">
- <xsl:variable name="restoreTab" select="/root/agent_definition/deletedItems/item[last()]"/>
- <xsl:variable name="restoreTabId" select="$restoreTab/id"/>
- <xsl:choose>
- <xsl:when test="number($restoreTab/position) > count(/root/agent_definition/items/item)">
- <xts:append select="/root/agent_definition/items">
- <item>
- <xsl:copy-of select="$restoreTab/*[not(local-name()='position' or local-name()='params')] "/>
- </item>
- </xts:append>
- </xsl:when>
- <xsl:otherwise>
- <xts:insert select="/root/agent_definition/items/item[number('{$restoreTab/position}')]">
- <item>
- <xsl:copy-of select="$restoreTab/*[not(local-name()='position' or local-name()='params')] "/>
- </item>
- </xts:insert>
- </xsl:otherwise>
- </xsl:choose>
- <!--/xts:append-->
- <!-- restore the associated data blob -->
- <xts:append select="/root/env">
- <param name="{$restoreTabId}">
- <xsl:value-of select="$restoreTab/params"/>
- </param>
- </xts:append>
- <!-- delete the deleted item from the list -->
- <xts:delete select="/root/agent_definition/deletedItems/item[./id = '{$restoreTabId}']"/>
- <xts:update select="/root/env/param[@name='tabSelectedID']">
- <param name="tabSelectedID">
- <xsl:value-of select="$restoreTabId"/>
- </param>
- </xts:update>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- <!-- get rid of the agent item op -->
- <xts:delete select="/root/env/param[@name = 'agentItemOp']"/>
- </xts:sequence>
- <xts:sequence>
- <xts:append>
- <!-- log to IPF-->
- <log>
- <xts:function name="ipflog">
- <xts:param name="indication">Audit.RTUsage</xts:param>
- <xts:param name="level">3</xts:param>
- <xts:param name="logData"><parameters><item name="user"><![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/session/param[@name ='e_user']))"/>]]></item><item name="agentpath"><![CDATA[<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name ='m_path']))"/>]]></item></parameters></xts:param>
- <xts:param name="operation">DELETE</xts:param>
- <xts:param name="objectPath">
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </xts:param>
- <xts:param name="objectType">AGENTTASKDEFINITION</xts:param>
- <xts:param name="status">Success</xts:param>
- <xts:param name="errorMessage">N/A</xts:param>
- </xts:function>
- </log>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- restore the variables for the tab we are going to
- ===============================================================================================
- -->
- <xts:block id="restoreCurrentTab" type="exec" dependency="agent_definition_ops" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='prevTabID'] != /root/env/param[@name='tabSelectedID']]">
- <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xts xsl xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- decode data for the current page, if available -->
- <xsl:variable name="currentTab">
- <xsl:value-of select="/root/env/param[@name ='tabSelectedID']"/>
- </xsl:variable>
- <!-- test if there is encoded tab information-->
- <xsl:if test="/root/env/param[@name=$currentTab] != ''">
- <xts:append select="/root/env">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name ='tabSelectedID'] = 'AgentTask-condition'">
- <param name="AgentTask-condition">
- <xsl:value-of select="/root/env/param[@name=$currentTab]"/>
- </param>
- </xsl:when>
- <xsl:when test="/root/env/param[@name ='tabSelectedID'] = 'AgentTask-schedule'">
- <param name="scheduleParameters">
- <xsl:value-of select="/root/env/param[@name=$currentTab]"/>
- </param>
- </xsl:when>
- <xsl:otherwise>
- <!-- decode the tab information into the environment, this must be unwrapped using the cafaction command because each agent task blob is signed. A signed block will have a prefix 'CAFS'.
- If the cafaction command is not called here and CAF is enabled the web64decode will be ignored and the blob will not be expanded. -->
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_settemplatename_restorecurrenttab_settemplateid_dialogadapter001',string(/root/env/param[@name =$currentTab])), true())" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- <xts:delete select="/root/navigator"/>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getPageData - create the request parameters for the content page
- ===============================================================================================
- -->
- <xts:block id="getPageData2" dependency="restoreCurrentTab" path="ags/navigator.xslt" processor="XSLT" type="exec"/>
- <!--
- ===============================================================================================
- decodeReportTasks- if the next page is of type 'message' then expand each report task. A temporary <reportTask>...</reportTask>
- structure is created that holds information that is passed into the email options page as a correctly formatted <req-params:param/>
- See the 'setMessageRequestParams' block for more details
- ==============================================================================================
- -->
- <xts:block id="decodeReportTasks" type="exec" processor="XSLT" dependency="getPageData2" condition=".[/root/agent_definition/items/item[type='report'] and (/root/agent_definition/items/item[type='message'] or /root/agent_definition/items/item[type='notification'] or /root/agent_definition/items/item[type='approval'])]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xtsext xts xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="currentSelectedTaskId" select="/root/env/param[@name='tabSelectedID']"/>
- <xsl:variable name="currentSelectedTaskType" select="/root/agent_definition/items/item[id=$currentSelectedTaskId]/type"/>
- <xsl:if test="$currentSelectedTaskType='message' or $currentSelectedTaskType='notification' or $currentSelectedTaskType='approval'">
- <xts:sequence>
- <xts:append select="/root">
- <xsl:for-each select="/root/agent_definition/items/item[type='report']">
- <xsl:variable name="taskID" select="./id"/>
- <reportTask id="{$taskID}">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/env/param[@name=$taskID])), true())"/>
- </xts:transform>
- </reportTask>
- </xsl:for-each>
- </xts:append>
- </xts:sequence>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- setMessageRequestParams- create the message request parameter for each report task - this now applies to
- notification and approval tasks too
- ==============================================================================================
- -->
- <xts:block id="setMessageRequestParams" type="exec" processor="XSLT" dependency="decodeReportTasks" condition="/root/agent_definition/items/item[type='message'] or /root/agent_definition/items/item[type='notification'] or /root/agent_definition/items/item[type='approval']" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts req-params xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="currentSelectedTaskId" select="/root/env/param[@name='tabSelectedID']"/>
- <xsl:variable name="currentSelectedTaskType" select="/root/agent_definition/items/item[id=$currentSelectedTaskId]/type"/>
- <!-- only build the structures if we're in the right type of task -->
- <xsl:if test="$currentSelectedTaskType='message' or $currentSelectedTaskType='notification' or $currentSelectedTaskType='approval'">
- <!-- attach is built for all tasks -->
- <xts:append select="/root/navigator/page[@name='{$currentSelectedTaskType}']/params">
- <req-params:param name="attach">
- <eventOutput>
- <searchPath>eventOutput</searchPath>
- </eventOutput>
- <xsl:for-each select="/root/reportTask">
- <xsl:if test="./param[@name='selected_path']">
- <xsl:variable name='taskId' select="./@id"/>
- <xts:transform src="ags/transforms/attachment_request_params.xslt" processor="XSLT">
- <root>
- <id><xsl:value-of select="$taskId"/></id>
- <taskName><xsl:value-of select="/root/agent_definition/items/item[id=$taskId]/name"/></taskName>
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_setmessagerequestparams_settemplateid_dialogadaptor001', string( ./param[@name ='reportOptions'])), true() )" disable-output-escaping="yes"/>
- <m_class><xsl:value-of select="./param[@name='m_class']"/></m_class>
- </root>
- </xts:transform>
- </xsl:if>
- </xsl:for-each>
- </req-params:param>
- <xsl:if test="$currentSelectedTaskType='notification' or $currentSelectedTaskType='approval' ">
- <req-params:param name="followingTaskList">
- <xsl:for-each select="/root/agent_definition/items/item[./id=$currentSelectedTaskId]/following-sibling::*">
- <futureTask>
- <display><xsl:value-of select="./name"/></display>
- <id><xsl:value-of select="./id"/></id>
- <taskType><xsl:value-of select="./type"/></taskType>
- </futureTask>
- </xsl:for-each>
- </req-params:param>
- </xsl:if>
- </xts:append>
- </xsl:if>
- <!-- tidy up the appended reportTask information -->
- <xts:delete select="/root/reportTask"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- appendTargetStoreId
- ===============================================================================================
- -->
- <xts:block id="appendTargetStoreId" type="exec" processor="XSLT" dependency="setMessageRequestParams" condition=".[not(contains(' storedProcedureTask webServiceTask memo shortcutRSSTask urlRSSTask ', /root/agent_definition/items/item[id=/root/env/param[@name='tabSelectedID']]/type))]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts req-params xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="/root/env/param[@name = 'selected_path'] and /root/env/param[@name = 'selected_path'] != ''">
- <xsl:choose>
- <xsl:when test="/root/agent_definition/items/item[id=/root/env/param[@name='tabSelectedID']]/targetStoreID">
- <xts:replace select="/root/agent_definition/items/item[id=/root/env/param[@name='tabSelectedID']]/targetStoreID">
- <targetStoreID>
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </targetStoreID>
- </xts:replace>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root/agent_definition/items/item[id=/root/env/param[@name='tabSelectedID']]">
- <targetStoreID>
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </targetStoreID>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- If we have at least one human task then check if the agent has been set to submit the tasks sequentially. This is a prerequisite for
- an approval task.
- ===============================================================================================
- -->
- <xts:block id="checkForHumanTask" dependency="appendTargetStoreId" condition=".[(/root/agent_definition/items/item[type='approval'] or /root/agent_definition/items/item[type='notification']) and /root/agent_definition/sequencing!='sequential' and count(/root/agent_definition/items/item) > 1]" processor="XSLT" type="exec" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <!-- the task is an approval so switch to sequential processing if not already done -->
- <xts:sequence>
- <xts:replace select="/root/agent_definition/sequencing">
- <sequencing>sequential</sequencing>
- </xts:replace>
- <xts:append select="/root/env">
- <param name="showAlert"><xts:string id="AGS_INFO_TASK_SUBMISSION_SEQUENTIAL" encode="javascript"/></param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="encode_agent_definition" dependency="checkForHumanTask" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf cm xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/agent_definition"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="agent_definition_blob">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_encodeagentdefinition_settemplateid_dialogadapter003'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- summarybar- render the summary bar HTML and place it in /root/summaryContent
- ===============================================================================================
- -->
- <xts:block id="summarybarVars" type="exec" processor="XSLT" mimeType="text/html" contentId="summaryContent" partId="1" dependency="encode_agent_definition">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <sb>
- <param name="tabSelectedID">
- <xsl:value-of select="/root/env/param[@name='tabSelectedID']"/>
- </param>
- <param name="prevTabID">
- <xsl:value-of select="/root/env/param[@name='prevTabID']"/>
- </param>
- <param name="itemSelected">
- <xsl:value-of select="/root/env/param[@name='itemSelected']"/>
- </param>
- <param name="itemNewLocation">
- <xsl:value-of select="/root/env/param[@name='itemNewLocation']"/>
- </param>
- <param name="agentItemOp">
- <xsl:value-of select="/root/env/param[@name='agentItemOp']"/>
- </param>
- <param name="cafcontextid">
- <xsl:value-of select="/root/env/param[@name='cafcontextid']"/>
- </param>
- <param name="agsSave_m_app">
- <xsl:value-of select="/root/env/param[@name='agsSave_m_app']"/>
- </param>
- <param name="m_app">
- <xsl:value-of select="/root/env/param[@name='m_app']"/>
- </param>
- </sb>
- </xts:append>
- <xts:delete select="/root/env/param[@name='tabSelectedID']"/>
- <xts:delete select="/root/env/param[@name='prevTabID']"/>
- <xts:delete select="/root/env/param[@name='newTaskType']"/>
- <xts:delete select="/root/env/param[@name='itemSelected']"/>
- <xts:delete select="/root/env/param[@name='itemNewLocation']"/>
- <xts:delete select="/root/env/param[@name='agentItemOp']"/>
- <xts:delete select="/root/env/param[@name='cafcontextid']"/>
- <xts:delete select="/root/env/param[@name='hid']"/>
- <xts:delete select="/root/env/param[@name='agsSave_m_app']"/>
- <xts:delete select="/root/env/param[@name='m_app']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- summarybar- render the summary bar HTML and place it in /root/summaryContent
- ===============================================================================================
- -->
- <xts:block id="summarybar" path="/ags/summarybar.xslt" type="exec" mode="output" processor="XSLT" mimeType="text/html" contentId="summaryContent" partId="1" dependency="summarybarVars">
- <!-- stuff for the summaryBar -->
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- presentation stuff -->
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Process the suppression rules if need be, and prepare an html fragment that will then be used for any visible task.
- ===============================================================================================
- -->
- <xts:block id="processSuppression" path="/ags/processSuppression.xslt" dependency="summarybar" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- presentation stuff -->
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- callMorphlet - Calls the appropriate morphlet using the passed in params which will return
- markup to be displayed or the expected results
- ===============================================================================================
- -->
- <xts:block id="callMorphlet" processor="XSLT" type="exec" dependency="processSuppression">
- <!--xts:logicsheet path="ags/logicsheets/dialogs.xsl"/-->
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:agsad="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agentDefinition/" xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="out agsad dlgctrl xtsext req-params agsdlg xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <xsl:template match="/">
- <!-- current controller_state -->
- <xsl:variable name="ctrl-template-controller-state">
- <xsl:choose>
- <xsl:when test="not(/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'])">
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']=''">
- <xsl:text>dialogAdaptor|markup</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='controller_state']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- get the id of the selected tab -->
- <xsl:variable name="tabSelectedID" select="/root/sb/param[@name='tabSelectedID']"/>
- <!-- state that will be sent in the request. -->
- <xsl:variable name="ctrl-template-new-state">
- <xsl:value-of select="substring-after($ctrl-template-controller-state,'|')"/>
- </xsl:variable>
- <!-- get the type of the selected tab - either the condition/summary/ or one of the agent/report/job etc types
- tabSelectedID actually can hold either a type - or a task id. Have to handle both -->
- <xsl:variable name="selTabType">
- <xsl:choose>
- <xsl:when test="not(/root/sb/param[@name='tabSelectedID']) or /root/sb/param[@name='tabSelectedID']=''">
- <xsl:value-of select="/root/navigator/page[@default='true']/@name"/>
- </xsl:when>
- <!-- we have a reference to a task -->
- <xsl:when test="/root/agent_definition/items/item[./id = $tabSelectedID]">
- <xsl:value-of select="/root/agent_definition/items/item[./id = $tabSelectedID]/type"/>
- </xsl:when>
- <!-- we have a type - so use that -->
- <xsl:otherwise>
- <xsl:value-of select="/root/sb/param[@name='tabSelectedID']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- get the name of the dialog that is to be loaded-->
- <xsl:variable name="forwardLocation">
- <xsl:value-of select="/root/navigator/page[@name=$selTabType]/link"/>
- </xsl:variable>
- <xsl:variable name="params">
- <xsl:copy-of select="/root/navigator/page[@name='{$selTabType}']/params/*[local-name()='param']"/>
- </xsl:variable>
- <xts:sequence>
- <!-- Call the morphlet -->
- <xts:append select="/root">
- <xts:request name="BUS" target="bus://xts2{$forwardLocation}" option="xml" outputHeader="true">
- <req-params:requestParams>
- <req-params:param name="requestState">
- <xsl:value-of select="$ctrl-template-new-state"/>
- </req-params:param>
- <req-params:param name="suppressionDetails">
- <xsl:value-of select="/root/suppressionDetails"/>
- </req-params:param>
- <req-params:param name="inWizard">
- <xsl:text>false</xsl:text>
- </req-params:param>
- <req-params:param name="agentStudio">
- <xsl:text>true</xsl:text>
- </req-params:param>
- <req-params:param name="tabSelectedID">
- <xsl:value-of select="$tabSelectedID"/>
- </req-params:param>
- <req-params:param name="defaultTarget">
- <xsl:text>ags/dialogAdapter.xts</xsl:text>
- </req-params:param>
- <req-params:param name="resultNode">
- <xsl:text>morphletResponse</xsl:text>
- </req-params:param>
- <req-params:param name="hideEmailAsAttachment">
- <xsl:text>true</xsl:text>
- </req-params:param>
- <req-params:param name="hideLinkToReport">
- <xsl:text>true</xsl:text>
- </req-params:param>
- <req-params:param name="hideAttachMenu">
- <xsl:text>false</xsl:text>
- </req-params:param>
- <req-params:param name="hideAddLinks">
- <xsl:text>false</xsl:text>
- </req-params:param>
- <xsl:copy-of select="/root/navigator/page[@name=$selTabType]/params/*[local-name()='param']"/>
- </req-params:requestParams>
- <!-- env -->
- <xsl:copy-of select="/root/env"/>
- <!-- system -->
- <xsl:copy-of select="/root/system"/>
- <!-- take a copy of the user params too -->
- <xsl:copy-of select="/root/user"/>
- <!-- http -->
- <xsl:copy-of select="/root/http"/>
- <!-- session -->
- <xsl:copy-of select="/root/session"/>
- <!-- header -->
- <xsl:copy-of select="/root/header"/>
- <!-- credential -->
- <xsl:copy-of select="/root/credential"/>
- <!-- cookies-->
- <xsl:copy-of select="/root/cookies"/>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <agsad:taskSuppressionStateText/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- processReponse - Process the response from the callMorphlet block and either displays
- the markup or processes the results
- ===============================================================================================
- -->
- <xts:block id="processResponse" processor="XSLT" dependency="callMorphlet" type="exec">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl dlgctrl xtsext xos xts pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <!-- get the output - not needed at the moment - but will be needed when we start calling Marcel pages -->
- <!-- get the id of the selected tab -->
- <xsl:variable name="tabSelectedID" select="/root/sb/param[@name='tabSelectedID']"/>
- <!-- get the type of the tab - we need to mutate the output if we are on the email page -->
- <xsl:variable name="selTabType">
- <xsl:choose>
- <xsl:when test="not(/root/sb/param[@name='tabSelectedID']) or /root/sb/param[@name='tabSelectedID']=''">
- <xsl:value-of select="/root/navigator/page[@default='true']/@name"/>
- </xsl:when>
- <!-- we have a reference to a task -->
- <xsl:when test="/root/agent_definition/items/item[./id = $tabSelectedID]">
- <xsl:value-of select="/root/agent_definition/items/item[./id = $tabSelectedID]/type"/>
- </xsl:when>
- <!-- we have a type - so use that -->
- <xsl:otherwise>
- <xsl:value-of select="/root/sb/param[@name='tabSelectedID']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- do the template -->
- <xsl:template match="/">
- <!-- create the output -->
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']">
- <xts:transform name="Null" option="content" mimeType="text/html" contentId="mainContent" partId="1">
- <xts:transform processor="XSLT" src="ags/transforms/display_markup_fragment.xslt">
- <root>
- <markup>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="/root/morphletResponse/markup"/>
- </xts:transform>
- </markup>
- <!-- special case for hts tasks-->
- <xsl:if test="$selTabType = 'message' or $selTabType = 'approval' or $selTabType = 'notification'">
- <formFields>
- <!--- do all variable maintainence in here - fixes problem with XML/HTML encoding from dialog adaptor -->
- <input id="m" type="hidden" name="m" value="{/root/env/param[@name='m']}"/>
- <input id="b_action" type="hidden" name="b_action" value="xts.run"/>
- <input id="ps_nav_op" type="hidden" name="ps_nav_op" value="{/root/env/param[@name='ps_nav_op']}"/>
- <input id="ps_nav_stack" type="hidden" name="ps_nav_stack" value="{/root/env/param[@name='ps_nav_stack']}"/>
- <!-- this is straight from the utml:form source - ps_nav_source represents the page where we come from -
- so it's always a copy of "m" -->
- <input id="ps_nav_source" type="hidden" name="ps_nav_source" value="{/root/env/param[@name='m']}"/>
- <!-- this is straight from the utml:form source - ps_nav_source represents the page where we come from -
- so it's always a copy of "m" -->
- <!-- lets persist the agent definition as well -->
- <input id="agent_definition_blob" type="hidden" name="agent_definition_blob" value="{/root/env/param[@name='agent_definition_blob']}"/>
- <xsl:for-each select="/root/env/param[starts-with(@name,'AgentTask-')]">
- <input id="{./@name}" type="hidden" name="{./@name}" value="{.}"/>
- </xsl:for-each>
- <input id="m_path" type="hidden" name="m_path" value="{/root/env/param[@name='m_path']}"/>
- <xsl:if test="not(/root/env/param[@name = 'm_app'])">
- <input id="m_app" type="hidden" name="m_app" value="AS"/>
- </xsl:if>
- </formFields>
- </xsl:if>
- </root>
- </xts:transform>
- </xts:transform>
- </xts:append>
- <!-- a little bit of tidyage is needed here -->
- <xts:delete select="/root/morphletResponse"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- render-page
- ===============================================================================================
- -->
- <xts:block id="render-page" type="exec" mode="interpret" processor="XSLT" dependency="processResponse" mimeType="text/html">
- <!-- portal specific information -->
-
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/presentation.xsl"/>
-
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:edp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/presentation/" 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:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl pf xtsext edp dp df cf xos cp xts">
- <pf:variables/>
- <xsl:variable name="showAlert_exists" select="boolean(key('env-param', 'showAlert'))"/>
- <!-- get the id of the selected tab -->
- <xsl:variable name="tabSelectedID" select="/root/sb/param[@name='tabSelectedID']"/>
- <xsl:variable name="selTabType">
- <xsl:choose>
- <xsl:when test="not(/root/sb/param[@name='tabSelectedID']) or /root/sb/param[@name='tabSelectedID']=''">
- <xsl:value-of select="/root/navigator/page[@default='true']/@name"/>
- </xsl:when>
- <!-- we have a reference to a task -->
- <xsl:when test="/root/agent_definition/items/item[./id = $tabSelectedID]">
- <xsl:value-of select="/root/agent_definition/items/item[./id = $tabSelectedID]/type"/>
- </xsl:when>
- <!-- we have a type - so use that -->
- <xsl:otherwise>
- <xsl:value-of select="/root/sb/param[@name='tabSelectedID']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/root">
- <!-- are we in a sub-morphlet call or not -->
- <!-- we only display the summary bar for main requests. If we're in a sub-morphlet - from email page - we don't display it -->
- <xsl:variable name="mainMorphlet" select="not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='' or string(xtsext:substringAfterLast(string(/root/env/param[@name='controller_state']), '|'))='canceled' or string(xtsext:substringAfterLast(string(/root/env/param[@name='controller_state']), '|'))='finished' "/>
- <xts:sequence>
- <xts:replace select="/root/output/*[local-name()='part']">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html>]]> </xsl:text>
- <edp:evtpage initFunction="dialogAdapterInit">
- <link rel="stylesheet" type="text/css" href="{$skin_style}"/>
- <link rel="stylesheet" type="text/css" href="{$skin_fonts}"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/ags/ags.css"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/ags/crn.css"/>
- <dp:meta>
- <pf:meta/>
- </dp:meta>
- <script language="javascript">
- function doDeletedAgentItems()
- {
- <xsl:for-each select="/root/agent_definition/deletedItems/item">
- parent.getAgentItemsListener().removeAllReferencesById('<xsl:value-of select="xtsext:javascriptencode(string(./id))"/>');
- </xsl:for-each>
- }
- function handleDeleteKeyDown(event) {
-
- //delete key
- if(parent.getKeyCode(event) == 46) {
- parent.deleteSelectedItem();
- }
-
- return true;
- }
- </script>
- <script language="javascript" src="{$webRoot}/cr1/caf.js"/>
- <script language="javascript" src="{$webcontent}/portal/js/validation.js"/>
- <script language="javascript">
- var cafInvalidStringMsg = "<xts:string id="IDS_VAL_ERR_INVALID_STRING" encode="javascript"/>";
- var cafInvalidInteger = "<xts:string id="IDS_VAL_ERR_INVALID_INTEGER" encode="javascript"/>";
- var cafInvalidUnsignedInteger = "<xts:string id="IDS_VAL_ERR_UNSIGNED_INTEGER" encode="javascript"/>";
- var cafInvalidLength = "<xts:string id="IDS_VAL_ERR_MAXIMUM_LENGTH" encode="javascript"/>";
- <xsl:if test="$browser = 'ie'">
- var cafGKeyPress = ""
- function setGlobalKeyDownHandler(event)
- {
- cafGKeyPress = event.keyCode;
- }
- </xsl:if>
- </script>
- <xsl:choose>
- <xsl:when test="$mainMorphlet">
- <script type="text/javascript" src="../ags/drag.js"/>
- <script type="text/javascript" src="../common/framework/notification/CObserver.js">//</script>
- <script type="text/javascript" src="../common/framework/ui/CUIStyle.js">//</script>
- <script type="text/javascript" src="../ags/common/CBar.js">//</script>
- <script type="text/javascript" src="../ags/CMenuItem.js">//</script>
- <script type="text/javascript" src="../ags/CMenu.js">//</script>
- <script type="text/javascript" src="../ags/common/CIcon.js">//</script>
- <script type="text/javascript" src="../ags/CToolbarButton.js">//</script>
- <script type="text/javascript" src="../ags/help.js">//</script>
- <script type="text/javascript" src="../ags/summarybar.js">//</script>
- <script type="text/javascript" src="../ags/AccessibilityHandler.js">//</script>
- <script type="text/javascript" src="../ags/CMenuExtractor.js">//</script>
- <script language="javascript">
- function dialogAdapterInit()
- {
- // if Loading pop-up is shown tell it to hide now
- if(parent.cfgGet('loadwait')==true){
- parent.doSetPopUpClosureFlag();
- parent.cfgSet('loadwait', false);
- }
- if(parent.cfgGet('agsInit')==true){
- parent.showLoadingMsg('100', '<xts:string id="AGS_LOADING_DONE" encode="javascript"/>');
- setTimeout("parent.g_divProgressBar.F_Hide()", 300);
- parent.cfgSet('agsInit', false);
- parent.getFrame("metadataIFrame").focus();
- }
-
- // do the summaryBar init
- setBarSize();
-
- doDeletedAgentItems() ;
-
- // now carry on the normal init procedure
- if(window.init) init();
-
- parent.deletionCandidateManager.setCandidate('tabSelectedID',parent.K_sControlCandidate);
-
- //unblock deletion now its all calmed down
- parent.applicationActionManager.allowActions();
-
- // move to tab in focus, this must happen after allowing actions
- setFocusToSelectedTab();
- updateSuppressionMessage();
- parent.cfgSet("isCurrentFailureTask",<xsl:value-of select="/root/suppressionDetails/@isCurrentFailureTask"/>);
- //This function is used to fix scroll bar issue of dialogIFrame in Standards mode.
- resetMargin();
-
- //add the key down delete handler
- var docco = parent.getMessageIFrame().document;
- parent.addEvent(docco,"keydown",handleDeleteKeyDown);
-
- //important to focus here otherwise the key press will not be detected
- //immediately after a task is shown unless the user explicitly clicks
- //in the task area
- parent.getMessageIFrame().focus();
-
- parent.getCommandStackManager().processCommandStack();
-
- <xsl:if test="$showAlert_exists">
- alert('<xsl:value-of select="/root/env/param[@name='showAlert']"/>');
- </xsl:if>
- }
-
- function resetMargin(){
- var elementArray = document.getElementsByTagName("body");
- var iframeBody = elementArray[0];
- iframeBody.style.margin = "0px";
- }
-
- function updateSuppressionMessage() {
- var eventListTable = document.getElementById("eventListTable");
- var msg = '<xsl:value-of select="xtsext:javascriptencode(string(/root/suppressionDetails))"/>';
- if (eventListTable) {
- eventListTable.parentNode.innerHTML = parent.decode(msg);
- eventListTable.style.display = '';
- }
- }
- </script>
- </xsl:when>
- <xsl:otherwise>
- <script language="javascript">
- function dialogAdapterInit()
- {
- //******************************
- // NOTHING SHOULD BE ADDED HERE
- //*****************************
- // IN REALITY THIS CASE WILL APPLY
- // WHEN YOU HAVE A POPUP ONLY.
- // now carry on the normal init procedure
- if(window.init) init();
- }
-
- </script>
- </xsl:otherwise>
- </xsl:choose>
- <form name="pform" method="post" action="{$gateway}">
- <!-- all tasks should have a help id-->
- <input id="hid" type="hidden" name="hid" value="{/root/navigator/page[@name=$selTabType]/*[local-name()='params']/*[local-name()='param'][@name='hid']}"/>
- <!-- main morphlet route means no pop-up is being shown -->
- <xsl:choose>
- <xsl:when test="$mainMorphlet">
- <table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0" role="presentation">
- <tr valign="top" style="display:block;">
- <td height="84px" style="width:100%;display:block;">
- <div id="d1" style="width:100%; height:100%">
- <!-- add in the summary bar -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'summaryContent']"/>
- </div>
- </td>
- </tr>
- <tr valign="top" style="display:block;">
- <td height="2px" style="display:block;">
- <img alt="" height="2" width="3" border="0" src="../ps/images/space.gif" title=""/>
- </td>
- </tr>
- <tr valign="top">
- <td valign="top">
- <div id="d2" role="presentation" style="width:100%;height:100%;">
- <!-- add in the other page information -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'mainContent']"/>
- </div>
- </td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <!-- add in the summary bar -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'summaryContent']"/>
- <!-- add in the other page information -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'mainContent']"/>
- </xsl:otherwise>
- </xsl:choose>
- </form>
- </edp:evtpage>
- </xos:entityBody>
- </xos:part>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render-page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|