123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- 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:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:doc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/doc/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layxsl/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:out="dummy-uri" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf xts qsdlg agsdlg cf doc utml lyt dp cp df cm xtsext">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <doc:group prefix="agsdlg">
- <doc:location>
- <doc:namespace>http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/</doc:namespace>
- <doc:ref>ps/ags/logicsheets/dialogs.xsl</doc:ref>
- </doc:location>
- </doc:group>
- <!-- Render a text area that has the functionality to remove selected text-->
- <doc:template type="control">
- <doc:name>removableText</doc:name>
- <doc:desc>renders a text area that has a "remove" action that can take out selected text</doc:desc>
- <doc:attr>
- <doc:attr-name>rows</doc:attr-name>
- <doc:attr-desc>The number of rows in the text area</doc:attr-desc>
- <doc:attr-name>cols</doc:attr-name>
- <doc:attr-desc>The maximum number of columns</doc:attr-desc>
- <doc:attr-name>name</doc:attr-name>
- <doc:attr-desc>The text area name</doc:attr-desc>
- <doc:attr-name>type</doc:attr-name>
- <doc:attr-desc>Can be 'action' or 'event'</doc:attr-desc>
- <doc:attr-name>listener</doc:attr-name>
- <doc:attr-desc>A call back function that is notified when text has been removed</doc:attr-desc>
- </doc:attr>
- </doc:template>
- <xsl:template match="agsdlg:removableText">
- <xsl:variable name="rows" select="@rows"/>
- <xsl:variable name="cols" select="@cols"/>
- <xsl:variable name="name" select="@name"/>
- <xsl:variable name="type" select="@type"/>
- <xsl:variable name="listener" select="@delete-listener"/>
- <table border="0" cellspacing="0" cellpadding="0" role="presentation">
- <!-- render the text area onkeyup="handleKeyPress();"-->
- <tr>
- <td class="dialogButton" align="left" valign="middle">
- <utml:textarea rows="{$rows}" name="{$name}" cols="{$cols}" id="{$name}" onkeydown="return false;"/>
- </td>
- </tr>
- <tr>
- <td class="formText" align="right" valign="middle">
- <a href="#" onclick="deleteSelectedText();">
- <xts:string id="IDS_REMOVE"/>
- </a>
- </td>
- </tr>
- </table>
- <script language="JavaScript">
-
- function isDelete(evt){
-
- evt = (evt) ? evt : (window.event) ? event : null;
-
- if (evt) {
- var charCode = (evt.charCode) ? evt.charCode :
- ((evt.keyCode) ? evt.keyCode :
- ((evt.which) ? evt.which : 0));
- }
-
- return charCode == 46 ;
- }
-
- /*function handleKeyPress(evt){
- //stop the event by returning false if we are not a delete
- return isDelete();
- }
-
- function handleKeyPress(evt){
-
- if(isDelete(evt)){
- //notify the agent items listener
- <xsl:if test="$name">
- parent.getAgentItemsListener().updateField('<xsl:value-of select="$name"/>', document.pform.<xsl:value-of select="$name"/>.value);
- </xsl:if>
- }
- }*/
- function deleteSelectedText(){
- var txt;
-
- if (document.getSelection){
- txt = document.getSelection();
- }
- else if (document.selection){
- if (window.clipboardData) {
- txt = document.selection.createRange().text;
- }else{
- txt = document.selection.createRange().textContent;
- }
- }
- else return;
-
- textArea = document.getElementById('<xsl:value-of select="$name"/>');
-
- index = -1;
- if(index = textArea.value.indexOf(txt) == -1){
- //this is not ours
- txt = "";
- }else{
- if("<xsl:value-of select="$type"/>" == "action"){
- //call a method on the nondupe js to process this text box to delete the selected text
- txt = getSelectedAction().nonDuplication.processDeleteQueryItem(txt);
- }else if("<xsl:value-of select="$type"/>" == "event"){
- txt = parent.getAgentDefinition().summaryEventKey.processDeleteQueryItem(txt);
- }else{
- //do a literal removal
- index = textArea.value.indexOf(txt);
-
- if(index != -1){
- textArea.value = textArea.value.substring(0, index) + textArea.value.substring(index + txt.length, textArea.value.length);
- }
- }
- cf.setIndicator(txt);
- <xsl:if test="$listener">
- //call the listener
- <xsl:value-of select="$listener"/>;
- </xsl:if>
- }
- }
- </script>
- </xsl:template>
- <!-- Render a button that will insert a selected tree object into the control nested in this tag-->
- <doc:template type="control">
- <doc:name>insertButton</doc:name>
- <doc:desc>Renders an insert button. This enables query items to be inserted from the model tree, when the browser does not support drag and drop.</doc:desc>
- <doc:example>xml/examples/agsdlg_insertButton_ex.xml</doc:example>
- <doc:notes>The tag must contain a child input control that has a name attribute. This is used to define the target for the insert operation.</doc:notes>
- </doc:template>
- <xsl:template match="agsdlg:insertButton">
- <!-- the id of the component to receive the selected tree object-->
- <xsl:variable name="targetId">
- <xsl:choose>
- <xsl:when test="@targetId">
- <xsl:value-of select="@targetId"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="child::*[1]/@name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <table border="0" cellspacing="0" cellpadding="0" align="left" width="100%" role="presentation">
- <tr>
- <td valign="top" nowrap="nowrap">
- <!-- CellPadding of 1 insures correct horizontal alignment with textareas and inputs.-->
- <table border="0" cellspacing="1" cellpadding="0" role="button">
- <tr>
- <dp:columnButton>
- <!-- Not sure that all those attributes are needed -->
- <out:attribute name="valign">top</out:attribute>
- <out:attribute name="height">18</out:attribute>
- <out:attribute name="width">18</out:attribute>
- <out:attribute name="nowrap">nowrap</out:attribute>
- <img align="middle" height="18" width="18" role="button" id="id_{$targetId}" onclick="javascript:parent.dropFrame=window.name;parent.insertStartMC('{$targetId}');" ondragstart="return false;">
- <!-- set the attributes not in the stylesheet pass but in the final XSL pass - have to be out: attributes instead -->
- <out:attribute name="src">../ags/images/tree/insert.gif</out:attribute>
- <out:attribute name="alt">
- <xts:string id="TREEBAR_INSERT"/>
- </out:attribute>
- </img>
- </dp:columnButton>
- </tr>
- </table>
- </td>
- <td nowrap="nowrap">
- <img width="3" src="../ags/images/spacer.gif" alt=""/>
- </td>
- <td nowrap="nowrap" width="100%" align="left">
- <xsl:apply-templates/>
- </td>
- </tr>
- </table>
- </xsl:template>
- <doc:template type="control">
- <doc:name>togglebutton</doc:name>
- <doc:desc>Renders an on/off or toggle button. It must be defined in a <utml:form> tag.</doc:desc>
- <doc:attr>
- <doc:attr-name>name</doc:attr-name>
- <doc:attr-desc>The name of the toggle button</doc:attr-desc>
- <doc:attr-name>state</doc:attr-name>
- <doc:attr-desc>active or inactive</doc:attr-desc>
- <doc:attr-name>selected</doc:attr-name>
- <doc:attr-desc>when true the toggle button is rendered as "pressed"</doc:attr-desc>
- </doc:attr>
- <doc:example>xml/examples/agsdlg_togglebutton_ex.xml</doc:example>
- <doc:notes>Have a look at ags/selectRecipients.xts for more information</doc:notes>
- </doc:template>
- <xsl:template match="agsdlg:togglebutton">
- <td class="commandButtonBorder">
- <xsl:if test="not(@state='inactive')">
- <xsl:attribute name="onmousedown">this.className = 'commandButtonDownBorder'</xsl:attribute>
- <xsl:attribute name="onmouseout">this.className = 'commandButtonBorder'</xsl:attribute>
- <xsl:attribute name="onmouseup">this.className = 'commandButtonBorder'</xsl:attribute>
- <xsl:attribute name="onmouseover">this.className = 'commandButtonBorder'</xsl:attribute>
- <xsl:attribute name="onkeydown">this.className = 'commandButtonDownBorder'</xsl:attribute>
- <xsl:attribute name="onkeyup">this.className = 'commandButtonBorder'</xsl:attribute>
- </xsl:if>
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <out:choose>
- <out:when test="$browser = 'ns4'">
- <!-- Specify explicit height and width for antiquated browsers like NS 4.76 -->
- <out:attribute name="width">70</out:attribute>
- <out:attribute name="height">22</out:attribute>
- </out:when>
- <out:otherwise>
- <!-- Use a cascading stylsheet for more "advanced" browsers -->
- <out:attribute name="id">noUnderLine</out:attribute>
- </out:otherwise>
- </out:choose>
- <tr>
- <td valign="middle" align="center" nowrap="nowrap" class="commandButton">
- <xsl:if test="not(@state='inactive')">
- <xsl:attribute name="onmouseover">this.className = 'commandButtonOver'</xsl:attribute>
- <xsl:attribute name="onmouseout">this.className = 'commandButton'</xsl:attribute>
- </xsl:if>
- <!--
- <xsl:if test="@selected='true'">
- <xsl:attribute name="style">background-color: #cccce3</xsl:attribute>
- </xsl:if>-->
- <xsl:if test="key('env-param', 'op_showUserGroups')='true'">
- <xsl:attribute name="style">background-color: #cccce3</xsl:attribute>
- </xsl:if>
- <img height="1" width="40" src="{'{$webcontent}'}/images/space.gif"/>
- <br/>
- <!-- minimum button width as specified by STAN -->
- <!-- Insert the button content text/images -->
- <xsl:apply-templates/>
- </td>
- </tr>
- </table>
- </td>
- <td width="5">
- <img height="1" width="8">
- <xsl:attribute name="src">
- <xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </xsl:template>
- <!--
- produce a list of textual forms of a parameter
- -->
- <xsl:template match="agsdlg:parametersSummary">
- <!-- template that calls an untrimmed version via the trimmer template -->
- <out:template name="parametersSummary">
- <out:param name="parameters"/>
- <out:param name="parametersSummarySize"/>
- <out:param name="parameterAssignments">
- <parameterAssignments/>
- </out:param>
- <out:call-template name="trimText">
- <out:with-param name="trimSize" select="$parametersSummarySize"/>
- <out:with-param name="text">
- <out:call-template name="parametersSummaryUnTrimmed">
- <out:with-param name="parameters">
- <out:copy-of select="$parameters"/>
- </out:with-param>
- <out:with-param name="parameterAssignments" select="$parameterAssignments"/>
- </out:call-template>
- </out:with-param>
- </out:call-template>
- </out:template>
- <!--make sure we have the conditionDisplayLogic template -->
- <agscnd:conditionFormat xmlns:agscnd="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/condition/"/>
- <!-- produces an unknown length summary of params -->
- <out:template name="parametersSummaryUnTrimmed">
- <out:param name="parameters"/>
- <out:param name="parameterAssignments"/>
- <out:value-of select="' '"/>
- <!-- first we must get a list of the param names -->
- <out:variable name="paramNames">
- <out:call-template name="buildParamNames">
- <out:with-param name="names">
- <out:for-each select="$parameterAssignments/parameterAssignments/parameterAssignment/parameterName">
- <parameterName>
- <out:value-of select="text()"/>
- </parameterName>
- </out:for-each>
- <out:for-each select="$parameters/parameterValues/item">
- <parameterName>
- <out:value-of select="./*[local-name()='name']/text()"/>
- </parameterName>
- </out:for-each>
- </out:with-param>
- <out:with-param name="position">
- <out:value-of select="number('1')"/>
- </out:with-param>
- </out:call-template>
- </out:variable>
- <!-- for each parameter retrieve its description-->
- <out:for-each select="$paramNames/parameterName">
- <out:sort select="."/>
- <out:value-of select="."/>
- <xts:string id="IDS_LIST_START"/>
- <out:value-of select="' '"/>
- <out:variable name="name" select="."/>
- <!-- only output literal if there is no model value-->
- <out:choose>
- <out:when test="$parameterAssignments/parameterAssignments/parameterAssignment[./parameterName = $name]">
- <out:call-template name="conditionFormatPortal">
- <out:with-param name="condition">
- <out:value-of select="$parameterAssignments/parameterAssignments/parameterAssignment[./parameterName = $name]/dataItemName"/>
- </out:with-param>
- </out:call-template>
- </out:when>
- <out:otherwise>
- <out:call-template name="parameterTextUnTrimmed">
- <out:with-param name="parameter">
- <out:copy-of select="$parameters/parameterValues/item[./*[local-name() = 'name'] = $name]"/>
- </out:with-param>
- </out:call-template>
- </out:otherwise>
- </out:choose>
- <xts:string id="IDS_LIST_END"/>
- <out:value-of select="' '"/>
- </out:for-each>
- </out:template>
- <out:template name="buildParamNames">
- <out:param name="list" select="''"/>
- <out:param name="names"/>
- <out:param name="position"/>
- <out:variable name="name" select="$names/parameterName[$position]"/>
- <out:variable name="nameText" select="concat($name/text(), ':')"/>
- <out:if test="not($position > count($names/parameterName)) and not(contains($list, $name))">
- <!-- we have names left to process and we dont have the current one -->
- <out:copy-of select="$name"/>
- <out:call-template name="buildParamNames">
- <out:with-param name="list">
- <out:value-of select="concat($list, $nameText)"/>
- </out:with-param>
- <out:with-param name="names">
- <out:copy-of select="$names"/>
- </out:with-param>
- <out:with-param name="position">
- <out:value-of select="number(number($position) + 1)"/>
- </out:with-param>
- </out:call-template>
- </out:if>
- </out:template>
- </xsl:template>
-
- <!--
- produce a textual form of a single parameter
- including the ags useModelItem params
- -->
- <xsl:template match="agsdlg:parameterText">
- <out:variable name="quote-string" select="{@quote-string}"/>
-
- <!-- creates a trimmable version of an individual parameters description -->
- <out:template name="parameterText">
- <out:param name="parameter"/>
- <out:param name="parameterTextSize" select="60"/>
-
- <out:call-template name="trimText">
- <out:with-param name="trimSize" select="$parameterTextSize"/>
- <out:with-param name="text">
- <out:call-template name="parameterTextUnTrimmed">
- <out:with-param name="parameter">
- <out:copy-of select="$parameter"/>
- </out:with-param>
- </out:call-template>
- </out:with-param>
- </out:call-template>
- </out:template>
- <!--tem,plate to trim whatever is passed to length -->
- <out:template name="trimText">
- <out:param name="trimSize"/>
- <out:param name="text"/>
- <!--trims the descriptions to length -->
- <out:variable name="ellipsis">
- <xts:string id="IDS_LIST_ELLIPSIS"/>
- </out:variable>
- <out:choose>
- <out:when test="string-length($text) > number($trimSize)">
- <out:value-of select="concat(substring($text,1, number($trimSize) - 3),$ellipsis)"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$text"/>
- </out:otherwise>
- </out:choose>
- </out:template>
- <!--produce a text description of a parameter of unknown length -->
- <out:template name="parameterTextUnTrimmed">
- <out:param name="parameter"/>
- <!-- get the name of the parameter - for credential matchup -->
- <out:variable name="paramName" select="$parameter/item/name"/>
- <!-- Check that this parameter is of type crednetials -->
- <out:variable name="type">
- <out:value-of select="boolean(/root/parametersResponse/parameter/item[./type='credential' and ./name=$paramName])"/>
- </out:variable>
- <!--check were called with the right single element -->
- <out:choose>
- <out:when test="$type='true'">
- <!-- We have a credentials. Strip em out-->
- <out:call-template name="credentials">
- <out:with-param name="credentialParam">
- <out:copy-of select="/root/credentialParameters/credentialParameter[@name=$paramName]"/>
- </out:with-param>
- </out:call-template>
- </out:when>
- <out:when test="$parameter/item[contains(@xsi:type, 'parameterValue')] and count($parameter) = 1">
- <out:apply-templates select="$parameter/item/value/item" mode="render-values"/>
- </out:when>
- </out:choose>
- </out:template>
- <out:template match="item[contains(@xsi:type, 'simpleParmValueItem')]" mode="render-values">
- <out:choose>
- <out:when test="*[local-name()='display'] != ''">
- <out:value-of select="$quote-string"/>
- <out:value-of select="*[local-name()='display']"/>
- <out:value-of select="$quote-string"/>
- <out:if test="position() != last()">
- <xts:string id="IDS_LIST_SEPARATOR"/>
- </out:if>
- </out:when>
- </out:choose>
- </out:template>
- <out:template match="item[contains(@xsi:type, 'boundRangeParmValueItem') or contains(@xsi:type, 'unboundedEndRangeParmValueItem') or contains(@xsi:type, 'unboundedStartRangeParmValueItem')]" mode="render-values">
- <out:variable name="startDisplay" select="*[local-name()='start']/*[local-name()='display']"/>
- <out:variable name="endDisplay" select="*[local-name()='end']/*[local-name()='display']"/>
- <out:choose>
- <out:when test="$startDisplay != '' and $endDisplay != ''">
- <out:choose>
- <out:when test="$startDisplay != $endDisplay">
- <out:value-of select="$quote-string"/>
- <xts:string id="IDS_OTHERRUN_BOUNDED_RANGE_VALUE">
- <xts:param name="startValue">
- <out:value-of select="$startDisplay"/>
- </xts:param>
- <xts:param name="endValue">
- <out:value-of select="$endDisplay"/>
- </xts:param>
- </xts:string>
- <out:value-of select="$quote-string"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$quote-string"/>
- <out:value-of select="$endDisplay"/>
- <out:value-of select="$quote-string"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$startDisplay != ''">
- <out:value-of select="$quote-string"/>
- <xts:string id="IDS_OTHERRUN_RANGED_START_PARAM_VALUE">
- <xts:param name="startValue">
- <out:value-of select="$startDisplay"/>
- </xts:param>
- </xts:string>
- <out:value-of select="$quote-string"/>
- </out:when>
- <out:when test="$endDisplay != ''">
- <out:value-of select="$quote-string"/>
- <xts:string id="IDS_OTHERRUN_RANGED_END_PARAM_VALUE">
- <xts:param name="endValue">
- <out:value-of select="$endDisplay"/>
- </xts:param>
- </xts:string>
- <out:value-of select="$quote-string"/>
- </out:when>
- </out:choose>
- <out:if test="not(position() = last())">
- <xts:string id="IDS_LIST_SEPARATOR"/>
- </out:if>
- </out:template>
- <out:template match="item[contains(@xsi:type, 'hierarchicalParmValueItem')]" mode="render-values">
- <out:param name="ancestorText" select="./*[local-name()='value']/*[local-name()='display']"/>
- <out:param name="position" select="'first'"/>
- <out:choose>
- <out:when test="./subNodes/item[contains(@xsi:type, 'hierarchicalParmValueItem')]">
- <out:for-each select="./subNodes/item[contains(@xsi:type, 'hierarchicalParmValueItem')]">
- <out:variable name="pos">
- <out:choose>
- <out:when test="$position = 'first' and position() = '1'">first</out:when>
- <out:otherwise>not_first</out:otherwise>
- </out:choose>
- </out:variable>
- <out:apply-templates select="." mode="render-values">
- <out:with-param name="ancestorText" select="concat($ancestorText, ' > ' ,*[local-name()='value']/*[local-name()='display'])"/>
- <out:with-param name="position" select="$pos"/>
- </out:apply-templates>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <out:if test="$position='not_first'">
- <br/>
- </out:if>
- <out:value-of select="$quote-string"/>
- <out:value-of select="$ancestorText"/>
- <out:value-of select="$quote-string"/>
- </out:otherwise>
- </out:choose>
- </out:template>
- <out:template name='credentials' >
- <out:param name="credentialParam"/>
- <out:if test="$credentialParam//dataSource">
- <out:choose>
- <out:when test="$credentialParam//dataSource//*[local-name()='dataSourceSignon']">
- <xts:string id="DIALOG_PROMPT_CONNECTION_SIGNON">
- <xts:param name="connection_name">
- <out:value-of select="$credentialParam//*[local-name()='dataSourceConnection']/*[local-name()='defaultName']"/>
- </xts:param>
- <xts:param name="signon_name">
- <out:value-of select="$credentialParam//*[local-name()='dataSourceSignon']/*[local-name()='defaultName']"/>
- </xts:param>
- </xts:string>
- </out:when>
- <out:otherwise>
- <xts:string id="DIALOG_PROMPT_CONNECTION_NO_SIGNON">
- <xts:param name="connection_name">
- <out:value-of select="$credentialParam//*[local-name()='dataSourceConnection']/*[local-name()='defaultName']"/>
- </xts:param>
- </xts:string>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:template>
- <!-- match anything -->
- <out:template match="*">
- <out:copy>
- <out:copy-of select="@*"/>
- <out:apply-templates/>
- </out:copy>
- </out:template>
- </xsl:template>
- <!--
- dp:box - provides side by side compartments with spacing between them.
- -->
- <xsl:template match="agsdlg:box">
- <table border="0" cellspacing="0" cellpadding="1" role="presentation">
- <xsl:if test="@width">
- <xsl:attribute name="width">
- <xsl:value-of select="@width"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@title">
- <tr>
- <td nowrap="nowrap" colspan="{2 * count(descendant::dp:section) - 1}" class="formLabel">
- <xts:string id="{@title}"/>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <xsl:if test="@valign">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </tr>
- <xsl:if test="not(@noSpace) or @noSpace = 'false'">
- <tr>
- <td nowrap="nowrap">
- <img height="5" width="1">
- <xsl:attribute name="src">
- <xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
- <!--
- dp:boxSection - containers in a box.
- -->
- <xsl:template match="agsdlg:boxSection">
- <td nowrap="nowrap">
- <xsl:if test="@width">
- <xsl:attribute name="width">
- <xsl:value-of select="@width"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@height">
- <xsl:attribute name="height">
- <xsl:value-of select="@height"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@align">
- <xsl:attribute name="align">
- <xsl:value-of select="@align"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@valign">
- <xsl:attribute name="valign">
- <xsl:value-of select="@valign"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@type='label'">formLabel</xsl:when>
- <xsl:otherwise>formText</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:apply-templates select="child::node()"/>
- </td>
- <xsl:if test="@hgap">
- <td nowrap="nowrap">
- <img height="5" width="{@hgap}">
- <xsl:attribute name="src">
- <xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
- </img>
- </td>
- </xsl:if>
- </xsl:template>
- <xsl:template match="agsdlg:header">
- <script language="javascript">
- var sParamDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d1))"/>";
- var sNameValueDelimiter = "<out:value-of select="xtsext:javascriptencode(string(key('system-param', 'delimiters')/@d2))"/>";
- var sCookiePath = "<out:value-of select="xtsext:javascriptencode(string($cookie_path))"/>";
- var sCookieDomain = "<out:value-of select="xtsext:javascriptencode(string($cookie_domain))"/>";
- var fHideFlyout = null;
- var sActiveFlyout = "";
-
- function dponclick(event)
- {
- if (fHideFlyout)
- {
- fHideFlyout();
- fHideFlyout = null;
- }
- return true;
- }
-
- function dponresize()
- {
- if (fHideFlyout)
- {
- fHideFlyout();
- fHideFlyout = null;
- }
- return true;
- }
-
- //window.onresize = dponresize;
- //document.onclick = dponclick;
- </script>
- <script language="javascript">
- <out:attribute name="src">
- <out:value-of select="$webcontent"/>/<out:value-of select="$app"/>/js/cookie_jar.js<out:text/>
- </out:attribute>
- </script>
- <script language="javascript">
- function debug()
- {
- if (window.event.altKey)
- {
- if (getSessionValue("debug") != "1")
- setStateValue("debug", "1");
- else
- setStateValue("debug", "0");
- location.reload();
- }
- }
- </script>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr style="display:block;">
- <td height="5px" style="display:block;">
- <img border="0" alt="" src="../ags/images/spacer.gif" height="5"/>
- </td>
- </tr>
- <tr style="display:block;">
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td width="24px" height="24px" valign="middle" align="center">
- <!-- copy the contents of the dp image -->
- <xsl:copy-of select="./dp:image/*"/>
- </td>
- <td width="5px">
- <img border="0" alt="" src="../ags/images/spacer.gif" width="5px"/>
- </td>
- <td class="page_label">
- <!-- copy the contents of the dp:title -->
- <span role="presentation" onclick="debug()">
- <xsl:copy-of select="dp:title/child::node()"/>
- </span>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr style="display:block;">
- <td height="5px" style="display:block;">
- <img border="0" alt="" src="../ags/images/spacer.gif" height="5"/>
- </td>
- </tr>
- <tr>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="97%">
- <tr>
- <td width="10px">
- <img border="0" alt="" src="../ags/images/spacer.gif" width="10px"/>
- </td>
- <td class="text2">
- <!-- copy the contents of the dp:description -->
- <xsl:copy-of select="./dp:description/*"/>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- dynamic div to show the default report options section.
- /root/agent_definition/agentOptions
- -->
- <xsl:template match="agsdlg:defaultReportOptionsDiv">
- <out:variable name="useReportOptionsForDefault" select="/root/agent_definition/agentOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='name']='outputFormat'"/>
- <out:variable name="reportOptions" select="/root/agent_definition/agentOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']"/>
- <out:variable name="agentOptionBurstSet" select="$reportOptions[./*[local-name()='name']='burst']/*[local-name()='value'] = 'true' "/>
- <out:variable name="reportIsBurstable" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*[local-name()='report']/*[local-name()='canBurst']='true'"/>
- <!-- only show the bursting section if :
- agent defaults burst option is set(/root/agent_definition/agentOptions/options/value/item/value)
- report is setup for burting(/root/queryResponse/queryReply/report/canBurst)
- -->
- <out:variable name="showBursting" select="$agentOptionBurstSet and $reportIsBurstable"/>
-
- <!-- read only default options -->
- <cf:dynamicDiv name="defaultOptions">
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_OTHERRUN_FORMAT"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="$useReportOptionsForDefault">
- <out:choose>
- <out:when test="/root/env/param[@name='formatSummary'] !=''">
- <out:value-of select="/root/env/param[@name='formatSummary']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/agent_definition/agentOptions/UIHelpers/formatSummary"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_OTHERRUN_DEFAULT"/>
- </out:otherwise>
- </out:choose>
- </dp:section2>
- </dp:input>
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_OTHERRUN_LANGUAGE"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="$useReportOptionsForDefault">
- <out:for-each select="$reportOptions[./*[local-name()='name']='outputLocale']/*[local-name()='value']/*[local-name()='item']">
- <out:sort select="."/>
- <out:variable name="locale" select="."/>
- <out:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and id=$locale]/displayName"/>
- <out:if test="position() != last()">
- <out:text>, </out:text>
- </out:if>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_OTHERRUN_DEFAULT"/>
- </out:otherwise>
- </out:choose>
- </dp:section2>
- </dp:input>
- <xsl:if test="@deliverySection != 'false'">
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_OTHERRUN_DELIVERY"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="$useReportOptionsForDefault">
- <out:variable name="saveSummary">
- <out:if test="$reportOptions[./*[local-name()='name']='saveOutput']/*[local-name()='value'] = 'true'">
- <xts:string id="IDS_OTHERRUN_SAVE_REPORTS"/>
- </out:if>
- </out:variable>
- <out:variable name="printSummary">
- <out:choose>
- <out:when test="/root/env/param[@name='printerSummary'] != ''">
- <xts:string id="IDS_CONFIRMATION_PRINT_REPORTS"/>
- <out:value-of select="concat(' ', /root/env/param[@name='printerSummary'])"/>
- </out:when>
- <out:when test="/root/agent_definition/agentOptions/UIHelpers/printerSummary != ''">
- <xts:string id="IDS_CONFIRMATION_PRINT_REPORTS"/>
- <out:value-of select="concat(' ', /root/agent_definition/agentOptions/UIHelpers/printerSummary)"/>
- </out:when>
- </out:choose>
- </out:variable>
- <out:variable name="emailSummary">
- <out:if test="$reportOptions[./*[local-name()='name']='email']/*[local-name()='value'] = 'true'">
- <out:choose>
- <out:when test="/root/env/param[@name='emailSummary'] != ''">
- <out:value-of select="/root/env/param[@name='emailSummary']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/agent_definition/agentOptions/UIHelpers/emailSummary"/>
- </out:otherwise>
- </out:choose>
- <!-- if bursting is false then show the email recipients -->
- <out:if test="$showBursting=false">
- <xsl:value-of select="': '"/>
- <out:choose>
- <out:when test="/root/env/param[@name='emailDescription'] != ''">
- <out:value-of select="/root/env/param[@name='emailDescription']"/>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="/root/reportOptions/UIHelpers/emailRecipients != ''">
- <out:value-of select="/root/agent_definition/agentOptions/UIHelpers/emailRecipients"/>
- </out:when>
- <out:when test="/root/agent_definition/agentOptions/UIHelpers/emailRecipientsCount = '1'">
- <xts:string id="IDS_OTHERRUN_EMAIL_ONE_RECIPIENT"/>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_OTHERRUN_EMAIL_RECIPIENT_COUNT">
- <xts:param name="numPeople">
- <out:value-of select="/root/agent_definition/agentOptions/UIHelpers/emailRecipientsCount"/>
- </xts:param>
- </xts:string>
- </out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:if>
- </out:variable>
- <out:if test="$saveSummary != ''">
- <out:value-of select="$saveSummary"/>
- <out:if test="$printSummary!='' or $emailSummary!=''">
- <xsl:value-of select="', '"/>
- </out:if>
- </out:if>
- <out:if test="$printSummary != ''">
- <out:value-of select="$printSummary"/>
- <out:if test="$emailSummary != ''">
- <xsl:value-of select="', '"/>
- </out:if>
- </out:if>
- <out:if test="$emailSummary != ''">
- <out:value-of select="$emailSummary"/>
- </out:if>
- </out:when>
- <out:otherwise>
- <xts:string id="IDS_OTHERRUN_SAVE_REPORT"/>
- </out:otherwise>
- </out:choose>
- </dp:section2>
- </dp:input>
- <!-- bursting -->
- <out:if test="$showBursting">
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_OTHERRUN_BURST_TITLE"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_OTHERRUN_BURST_MULTIPLE_REPORTS"/>
- </dp:section2>
- </dp:input>
- </out:if>
- </xsl:if>
- </cf:dynamicDiv>
- </xsl:template>
- <!--
- * - This next template is required to copy all other elements into the result.
- -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|