123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- 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/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
- <xts:block id="page" type="exec" mode="output" processor="XSLT" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- get the new theme stuff -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="qs/logicsheets/dialogs.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"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" 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:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts lyt pf dp df cp cf dbg qsdlg xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- add any theme variables -->
- <df:variables/>
- <pf:variables/>
- <xsl:key name="param-name" match="/root/env/param" use="@name"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="dlgAdv" select="key('param-name','xxSummaryDlgAdvanced')"/>
- <xsl:variable name="footerOptionTwo" select="key('param-name','xxColType') = 'numeric' or key('param-name','xxColType') = 'interval'"/>
- <dp:page>
- <dp:script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/executeButton.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript"><!--
- var cf = getConfigFrame();
- var currentDetailAgg = cf.dlgGlobalGetParm('xxCurrentDetailAgg');
- var currentSummaryAgg = cf.dlgGlobalGetParm('xxCurrentSummaryAgg');
- var goDialogManager = new CDialogManager();
- function execute()
- {
-
- var oMQMgr = cf.goApplicationManager.getMiniQueryManager();
- var regularAggregation = "none";
- var n = cf.cfgSize("SelColumns");
- for (var idxCt = 0; idxCt < n; idxCt++)
- {
- var col = cf.cfgGetAt("SelColumns", idxCt);
- regularAggregation = oMQMgr.getRegularAggregate(col);
- }
- var detailAgg = "none";
- var footerAgg = "none";
- if ("<xsl:value-of select="xtsext:javascriptencode(string($dlgAdv))"/>" == "true")
- {
- if (cf.dlgGlobalGetParm("CanUseCellAggregation") == true)
- {
- if(document.f.cells[0].checked == true)
- detailAgg = "calculated";
- else if(document.f.cells[1].checked == true)
- detailAgg = document.f.detailAggType[document.f.detailAggType.selectedIndex].value;
- }
- else if(currentDetailAgg != 'none')
- {
- detailAgg = currentDetailAgg;
- }
- if(document.f.footers[1].checked == true)
- footerAgg = "calculated";
- else if(document.f.footers[2].checked == true)
- footerAgg = document.f.summaryAggType[document.f.summaryAggType.selectedIndex].value;
- }
- else
- {
- if(currentDetailAgg != 'none')
- detailAgg = currentDetailAgg;
- if(document.f.footerSummaries.checked == true)
- {
- if(currentSummaryAgg != 'none')
- footerAgg = currentSummaryAgg;
-
- if(regularAggregation != 'none')
- {
- footerAgg = regularAggregation;
- }
- else
- {
- footerAgg = "default";
- }
- }
- }
- getConfigFrame().doSummary(footerAgg, detailAgg);
- }
- function updateDlgLists(selection)
- {
- if ((selection == "none" || selection == "count" || selection == "countDistinct") && cf.dlgGlobalGetParm("xxIsMeasure") == "nonMeasuresOnly")
- getConfigFrame().summarizeNonMeasure(selection);
- }
- function advancedDlg(toAdvancedMode)
- {
- getConfigFrame().summarize(toAdvancedMode);
- }
- function validateOption(colType, turnOn)
- {
- if (colType == "cells")
- document.f.detailAggType.disabled = !turnOn;
- else
- document.f.summaryAggType.disabled = !turnOn;
- }
- function createNewOptAddToSelect(optStr, optType, currentAgg, selectObj)
- {
- var newOpt = new Option(optStr, optType);
- if (cf.dlgGlobalGetParm(currentAgg) == optType)
- newOpt.selected = true;
- selectObj.options[selectObj.options.length] = newOpt;
- }
- function init()
- {
- attachMouseEvents();
- var select;
- if (cf.dlgGlobalGetParm("CanUseCellAggregation") == true)
- {
- select = document.f.detailAggType;
- if (typeof select == "object")
- {
- var detailAggTypeOptions = cf.dlgGlobalGetParm("xxDetailAggTypeOptions");
- if (cf.dlgGlobalGetParm("xxCurrentDetailAgg") == 'mixed')
- {
- var newOpt = new Option("", "mixed");
- newOpt.selected = true;
- select.options[select.options.length] = newOpt;
- }
- for (var i=0; i < detailAggTypeOptions.length; i++)
- {
- createNewOptAddToSelect(detailAggTypeOptions[i].text, detailAggTypeOptions[i].value, "xxCurrentDetailAgg", select);
- }
- }
- }
- select = document.f.summaryAggType
- if (typeof select == "object")
- {
- if (cf.dlgGlobalGetParm("xxShowMixed") == true)
- {
- var newOpt = new Option("", "mixed");
- newOpt.selected = true;
- select.options[select.options.length] = newOpt;
- }
- var summaryAggTypeOptions = cf.dlgGlobalGetParm("xxSummaryAggTypeOptions");
- for (var i=0; i < summaryAggTypeOptions.length; i++)
- {
- setTimeout('createNewOptAddToSelect("'+summaryAggTypeOptions[i].text+'", "'+summaryAggTypeOptions[i].value+'", "xxCurrentSummaryAgg", document.f.summaryAggType);', (1+i)*5);
- }
- }
- if ("<xsl:value-of select="xtsext:javascriptencode(string($dlgAdv))"/>" == "true")
- {
- if (cf.dlgGlobalGetParm("CanUseCellAggregation") == true)
- {
- if (currentDetailAgg == 'calculated')
- {
- document.f.cells[0].checked = true;
- document.f.detailAggType.disabled = true;
- }
- else
- {
- document.f.cells[1].checked = true;
- }
- }
- if (currentSummaryAgg == 'calculated' || currentSummaryAgg == 'none')
- {
- if (currentSummaryAgg == 'none')
- document.f.footers[0].checked = true;
- else if (currentSummaryAgg == 'calculated')
- document.f.footers[1].checked = true;
- document.f.summaryAggType.disabled = true;
- }
- else
- {
- document.f.footers[2].checked = true;
- }
- if (cf.dlgGlobalGetParm("xxDisableAdvLink") != true)
- {
- var adv = document.getElementById("advLink");
- adv.href = "javascript:advancedDlg(false)";
- adv.appendChild(document.createTextNode("<xts:string id="DIALOG_BASIC" encode="javascript"/>"));
- }
- }
- else
- {
- if (currentSummaryAgg != 'none')
- document.f.footerSummaries.checked = true;
- if (cf.dlgGlobalGetParm("xxDisableAdvLink") != true)
- {
- var adv = document.getElementById("advLink");
- adv.href = "javascript:advancedDlg(true)";
- adv.appendChild(document.createTextNode("<xts:string id="DIALOG_ADVANCED" encode="javascript"/>"));
- }
- }
- if (cf && cf.showDialogFrame)
- cf.showDialogFrame(<xsl:choose>
- <xsl:when test="$dlgAdv ='true' and /root/env/param[@name='CanUseCellAggregation']='false'">270</xsl:when>
- <xsl:when test="$dlgAdv ='true'">395</xsl:when>
- <xsl:otherwise>220</xsl:otherwise>
- </xsl:choose>);
- }
- //--></script>
- </dp:script>
- <form style="margin:0px" name="f" method="POST" onsubmit="return false;">
- <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
- <tr>
- <td width="100%" height="0%">
- <!-- dialog header -->
- <dp:header help="false">
- <!-- header titles -->
- <dp:title>
- <xsl:choose>
- <xsl:when test="$dlgAdv ='true'">
- <xts:string id="SUMMARY_TITLE_ADVANCED"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="SUMMARY_TITLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:title>
- <!-- close link for the header -->
- <dp:close>
- <a href="javascript:getConfigFrame().hideDialogFrame()">
- <dp:closeMarker/>
- </a>
- </dp:close>
- <!-- description (hint text) -->
- <dp:description>
- <xsl:choose>
- <xsl:when test="$dlgAdv='false' or /root/env/param[@name='CanUseCellAggregation']='false'">
- <xts:string id="SUMMARY_CALCULATE_DESCRIPTION_NO_CELLS"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="SUMMARY_CALCULATE_DESCRIPTION"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:description>
- <!-- header links -->
- <dp:headerLinks>
- <dp:headerLink>
- <dp:hl_attribute name="id">advLink</dp:hl_attribute>
- </dp:headerLink>
- </dp:headerLinks>
- </dp:header>
- </td>
- </tr>
- <tr>
- <td width="100%" height="100%" valign="top">
- <!-- layout -->
- <lyt:layout style="1" border="no">
- <lyt:section height="100">
- <xsl:choose>
- <xsl:when test="$dlgAdv='true'">
- <xsl:if test="/root/env/param[@name='CanUseCellAggregation']='true'">
- <dp:choice>
- <dp:section1>
- <table height="100%">
- <tr>
- <td valign="top">
- <img>
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/images/summarize_cell_list.gif</xsl:attribute>
- </img>
- </td>
- </tr>
- </table>
- </dp:section1>
- <dp:section2>
- <dp:choice title="SUMMARY_CELL_VALUES">
- <dp:section1>
- <input type="radio" name="cells" value="1" onClick="validateOption('cells', false);"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_SUMMARIZE_FIRST"/>
- </dp:section2>
- <dp:section1>
- <input type="radio" name="cells" value="2" onClick="validateOption('cells', true);"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_CALCULATE_FIRST"/>
- </dp:section2>
- <dp:section1/>
- <dp:section2>
- <dp:input>
- <dp:section1>
- <xts:string id="SUMMARY_FOR_CELLS"/>
- </dp:section1>
- <dp:section2>
- <select name="detailAggType" onChange="updateDlgLists(this.options[this.selectedIndex].value)"/>
- </dp:section2>
- </dp:input>
- </dp:section2>
- </dp:choice>
- </dp:section2>
- </dp:choice>
- </xsl:if>
- <dp:choice>
- <dp:section1>
- <table height="100%">
- <tr>
- <td valign="top">
- <img>
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/images/summarize_footer_list.gif</xsl:attribute>
- </img>
- </td>
- </tr>
- </table>
- </dp:section1>
- <dp:section2>
- <dp:choice title="SUMMARY_FOOTERS">
- <dp:section1>
- <input type="radio" name="footers" value="1" onClick="validateOption('footers', false);"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_NO_SUMMARY"/>
- </dp:section2>
- <xsl:if test="$footerOptionTwo">
- <dp:section1>
- <input type="radio" name="footers" value="2" onClick="validateOption('footers', false);"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_SUMMARIZE_FIRST"/>
- </dp:section2>
- </xsl:if>
- <dp:section1>
- <xsl:if test="$footerOptionTwo = false()">
- <input type="radio" name="footers" value="2" style="display:none;"/>
- </xsl:if>
- <input type="radio" name="footers" value="3" onClick="validateOption('footers', true);"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_CALCULATE_FIRST"/>
- </dp:section2>
- <dp:section1/>
- <dp:section2>
- <dp:input>
- <dp:section1>
- <xts:string id="SUMMARY_FOR_FOOTERS"/>
- </dp:section1>
- <dp:section2>
- <select name="summaryAggType"/>
- </dp:section2>
- </dp:input>
- </dp:section2>
- </dp:choice>
- </dp:section2>
- </dp:choice>
- </xsl:when>
- <xsl:otherwise>
- <img>
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/images/summarize_footer_list.gif</xsl:attribute>
- </img>
- <dp:choice>
- <dp:section1>
- <input type="checkbox" name="footerSummaries"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="SUMMARY_SHOW_SUMMARIES"/>
- </dp:section2>
- </dp:choice>
- </xsl:otherwise>
- </xsl:choose>
- </lyt:section>
- </lyt:layout>
- </td>
- </tr>
- <tr>
- <td width="100%" height="0%">
- <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
- <qsdlg:defaultButtons/>
- </td>
- </tr>
- <!-- <dbg:dumpxml select="/"/> -->
- </table>
- </form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|