123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- *****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: drill
- **
- ** (C) Copyright IBM Corp. 2001, 2015
- **
- ** US Government Users Restricted Rights - Use, duplication or
- ** disclosure restricted by GSA ADP Schedule Contract with
- ** IBM Corp.
- *****************************************************************
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" messageBase="messages/portal.xml,messages/portalRL.xml">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- getRoutingServerContent - Get the routing server information from CM
- ===============================================================================================
- -->
- <xts:block id="getRoutingServerContent"
- dependency="formlogic_init" processor="XSLT" type="exec" mandatory="false"
- condition=".[/root/env/param[@name='m_path']]" nodelist="env, header">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl send xts cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
-
- <xsl:template match="/">
- <xsl:variable name="current-step" select="key('env-param','current_step')"/>
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='routingServerGroup']"/>
- <xts:append>
- <routingServerGroup>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search><xsl:value-of select="key('env-param','m_path')"/></cm:search>
- <cm:properties>
- <cm:property name="searchPath"/>
- <cm:property name="routingServerGroup"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </routingServerGroup>
- </xts:append>
- <xts:append select="/root/env">
- <param name="routingServerGroup"><xts:queryValue select="/root/routingServerGroup/*[local-name()='queryResponse']/*[local-name()='package']/*[local-name()='routingServerGroup']"/></param>
- </xts:append>
- <xts:delete select="/root/routingServerGroup"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- execute-method -
- ===============================================================================================
- -->
- <xts:block id="execute-method" dependency="formlogic_init getRoutingServerContent" processor="XSLT" condition=".[not(root/env/param[@name='method']) or /root/env/param[@name='method']='forward' or /root/env/param[@name='method']='wait' or /root/env/param[@name='method']='back' or /root/env/param[@name='method']='finish' or /root/env/param[@name='method']='edit' or /root/env/param[@name='method']='cancel']" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="not(/root/env/param[@name='method'])">
- <xts:append select="/root/env">
- <param name="method"><xsl:value-of select="'edit'"/></param>
- </xts:append>
- </xsl:if>
- <xsl:variable name="returnTo">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''"><xsl:value-of select="/root/env/param[@name='ps_nav_stack']"/></xsl:when>
- <xsl:otherwise>portal/new_drillthru_scope.xts</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="returnOp">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">pop</xsl:when>
- <xsl:otherwise>maintain</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:append>
- <promptRequest>
- <send:request provider="xts" option="xml-multipart">
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='method']) or /root/env/param[@name='method'] = 'edit' ">
- <prompt:collect>
- <metaDataRequest>true</metaDataRequest>
- <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
- <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
- <runAsync>true</runAsync>
- <showNoPromptsWarning>false</showNoPromptsWarning>
- <routingServerGroup><xsl:value-of select="/root/env/param[@name='routingServerGroup']"/></routingServerGroup>
- </prompt:collect>
- </xsl:when>
- <!--If a prompt is cancelled by a user, reset to drill through definition page with list of drill targets -->
- <xsl:when test="/root/env/param[@name='method'] = 'cancel' ">
- <xsl:element name="{/root/env/param[@name='method']}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <returnMorphlet>portal/cc_drillthrough.xts</returnMorphlet>
- <ps_nav_op>maintain</ps_nav_op>
- <showNoPromptsWarning>false</showNoPromptsWarning>
- <callFinish>true</callFinish>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="{/root/env/param[@name='method']}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <metaDataRequest>true</metaDataRequest>
- <returnMorphlet>portal/new_drillthru_scope.xts</returnMorphlet>
- <ps_nav_op>maintain</ps_nav_op>
- <showNoPromptsWarning>false</showNoPromptsWarning>
- <callFinish>true</callFinish>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </send:request>
- </promptRequest>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method" condition=".[not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- </xts:block>
- <xts:block id="render_page" type="exec" mode="output" condition=".[/root/*[local-name()='view']='properties']" dependency="formlogic_init execute-method check-state" processor="XSLT" mimeType="text/html" mandatory="false">
- <xts:logicsheet path="portal/drillthru/common/scope_metadata.xslt"/>
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xtsdrillext="xalan://com.cognos.drill.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:scope="http://developer.cognos.com/schemas/xts/scope"
- xmlns:x="x"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl cm cf cp pf df dp lyt scope utml x">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_drillthru_scope.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="selectType">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_selectType'] and string(/root/env/param[@name='m_selectType'])!=''">
- <xsl:value-of select="/root/env/param[@name='m_selectType']"/>
- </xsl:when>
- <xsl:otherwise>scope</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="backURL" select="key('env-param','backURL')"/>
- <xsl:variable name="sourceparam">
- <xsl:if test="$selectType='param'">
- <xsl:value-of select="concat('drillParam_',string(/root/env/param[@name='paramToSelect']))"/>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="sourceparamName">
- <xsl:if test="$selectType='param'">
- <xsl:value-of select="string(/root/env/param[@name='paramName'])"/>
- </xsl:if>
- </xsl:variable>
- <xsl:variable name="browserTitle">
- <xsl:choose>
- <xsl:when test="$selectType = 'param'">
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_PARM_TITLE"><xts:param name="parmName"><xsl:value-of select="xtsext:enforceBTD($sourceparamName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></xts:param></xts:string><xsl:text/>
- </xsl:when>
- <xsl:when test="$selectType != 'scope'">
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_ITEM_TITLE"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_SCOPE_TITLE"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="pageDescription">
- <xsl:choose>
- <xsl:when test="$selectType = 'param'">
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_PARM_INTRO"/><xsl:text/>
- </xsl:when>
- <xsl:when test="$selectType = 'query'">
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_QUERY_INTRO"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_PROP_DRILLPATH_SCOPE_INTRO"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="currentValue">
- <xsl:choose>
- <xsl:when test="$selectType='scope' and /root/env/param[@name='m_p_scope'] and string(/root/env/param[@name='m_p_scope'])!=''"><xsl:value-of select="/root/env/param[@name='m_p_scope']"/></xsl:when>
- <xsl:when test="$selectType='query' and /root/env/param[@name='m_p_bookmarkItem'] and string(/root/env/param[@name='m_p_bookmarkItem'])!='' "><xsl:value-of select="/root/env/param[@name='m_p_bookmarkItem']"/></xsl:when>
- <xsl:when test="$selectType='param' and $sourceparam!=''"><xsl:value-of select="/root/env/param[@name=$sourceparam]"/></xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="dfltRadio">
- <xsl:choose>
- <xsl:when test="$currentValue=''">pkg</xsl:when>
- <xsl:when test="$selectType='scope' and /root/env/param[@name='m_p_scope'] and $currentValue!=''">ditm</xsl:when>
- <xsl:when test="$selectType='query' and /root/env/param[@name='m_p_bookmarkItem'] and $currentValue!='' ">ditm</xsl:when>
- <xsl:when test="$selectType='param' and $sourceparam != ''">ditm</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="dtLabel">
- <xsl:choose>
- <xsl:when test="$selectType='scope'">
- <xts:string id="IDS_PROP_DRILLPATH_DEF_SCOPE"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PROP_DRILLPATH_ITEMS_LABEL"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
- <dp:page longTitle="$browserTitle">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <scope:jscripts type="$selectType"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/prompting/promptCommon.css"/>
- <link rel="stylesheet" type="text/css" href="{$skin_style}"/>
- <pf:help/>
- <script language="javascript">
- <!-- Set focus to the Items radio button with this callback through the metadatatree -->
- <!-- Set focus to the Items radio button with this callback through the metadatatree -->
- function treeFocus(evt)
- {
- evt = (evt) ? evt : ((event) ? event : null);
- if(document.pform.radio_entry && document.pform.radio_entry.length==3)
- document.pform.radio_entry[2].checked="checked";
- else if(document.pform.radio_entry)
- document.pform.radio_entry[1].checked="checked";
- }
- function validate()
- {
- var frm = document.pform;
- if (frm.radio_entry[0].checked)
- {
- document.pform.selected_<xsl:value-of select="$selectType"/>.value = "";
- }
- else
- if (frm.radio_entry.length == 3 && frm.radio_entry[1].checked) {
- document.pform.selected_<xsl:value-of select="$selectType"/>.value = "<xsl:value-of select="xtsext:javascriptencode(string($currentValue))"/>";
- }
- else
- {
- var oSelectedItem = getSelectedNode();
- document.pform.selected_<xsl:value-of select="$selectType"/>.value = oSelectedItem.sSelected;
- // This condition is used for attributes under a level
- // if they are selected their MetaDataType is queryItem
- // Since we need to show the drop down menu in this case as well we set the MetaDataType to level
- // which is the condition used to show the drop done
- // TODO: instead of this set a ShowPropertyDropDown flag
- if (oSelectedItem.sParentMetaDataType == 'level' || oSelectedItem.sParentMetaDataType=='hierarchy')
- {
- document.pform.selected_<xsl:value-of select="$selectType"/>_MetaDataType.value = oSelectedItem.sParentMetaDataType;
- }
- else
- {
- document.pform.selected_<xsl:value-of select="$selectType"/>_MetaDataType.value = oSelectedItem.sMetaDataType;
- }
- if( document.pform.selected_<xsl:value-of select="$selectType"/>.value == "")
- {
- alert("<xts:string id="IDS_SELECT_ERR_NO_SELECTION" encode="javascript"/>");
- return false;
- }
- }
- return true;
- }
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:exclusion-list><xsl:value-of select="' method '"/></utml:exclusion-list>
- <utml:input type="hidden" value="" utml:update="false">
- <utml:name>selected_<xsl:value-of select="$selectType"/></utml:name>
- </utml:input>
- <utml:input type="hidden" value="" utml:update="false">
- <utml:name>selected_<xsl:value-of select="$selectType"/>_MetaDataType</utml:name>
- </utml:input>
- <utml:input type="hidden" name="errorText" value=""/>
- <utml:input type="hidden" name="errorDetail" value=""/>
- <dp:header>
- <!-- header titles-->
- <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
- <dp:description><xsl:value-of select="$pageDescription"/></dp:description>
- <dp:close>
- <utml:a utml:op="stack-down">
- <dp:closeMarker/>
- </utml:a>
- </dp:close>
- </dp:header>
- <lyt:layout style="1">
- <lyt:section>
- <utml:radio-group name="radio_entry">
- <utml:default-value><xsl:value-of select="$dfltRadio"/></utml:default-value>
- <dp:choice longTitle="$dtLabel" id="drillThruScpopeRG">
- <xsl:choose>
- <xsl:when test="$selectType='scope'">
- <dp:section1>
- <utml:input type="radio" id="scopePKGRB"><utml:value>pkg</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopePKGRB"><xts:string id="IDS_PROP_DRILLPATH_TREE_PKG"/></dp:section2>
- </xsl:when>
- <xsl:otherwise>
- <dp:section1>
- <utml:input type="radio" id="scopePKGRB"><utml:value>pkg</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopePKGRB"><xts:string id="IDS_PROP_DRILLPATH_NONE"/></dp:section2>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$currentValue !='' and $selectType = 'scope'">
- <xsl:variable name="langFormatedValue"><span lang="{$contentLocale}"><xsl:value-of select="xtsdrillext:enforceSTTAndBTDForMUN($currentValue, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span></xsl:variable>
- <dp:section1>
- <utml:input id="scopedpio" type="radio"><utml:value>ditm</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopedpio"><xts:string id="IDS_PROP_DRILLPATH_ITEM_OPTION_LABEL"><xts:param name="itemVal"><xsl:copy-of select="$langFormatedValue"/></xts:param></xts:string></dp:section2>
- </xsl:when>
- <xsl:when test="$currentValue !=''">
- <dp:section1>
- <utml:input id="scopedpio" type="radio"><utml:value>ditm</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopedpio"><span lang="{$contentLocale}"><xsl:value-of select="xtsdrillext:enforceSTTAndBTDForMUN($currentValue, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span></dp:section2>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$currentValue = ''">
- <dp:section1>
- <utml:input type="radio" id="scopetreerd"><utml:value>tree</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopetreerd"><xts:string id="IDS_PROP_DRILLPATH_TREE_ITEMS"/></dp:section2>
- <dp:section3>
- <scope:metadataTree/>
- </dp:section3>
- </xsl:when>
- <xsl:otherwise>
- <dp:section1>
- <utml:input type="radio" id="scopetreerd"><utml:value>tree</utml:value></utml:input>
- </dp:section1>
- <dp:section2 for="scopetreerd"><xts:string id="IDS_PROP_DRILLPATH_TREE_ITEMS_SELECTED"/></dp:section2>
- <dp:section3>
- <scope:metadataTree/>
- </dp:section3>
- </xsl:otherwise>
- </xsl:choose>
- </dp:choice>
- </utml:radio-group>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_OK" utml:validate="true" df:style="stack-down-save"/>
- <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <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>
|