123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: Viewer
- (C) Copyright IBM Corp. 2001, 2011
- 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:frag="http://developer.cognos.com/schemas/cps/logic/fragment/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/" xmlns:nui="http://developer.cognos.com/schemas/cps/logic/nav/ui/1/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" xmlns:layout="http://developer.cognos.com/common/layout" xmlns:valerr="http://developer.cognos.com/validation/errrormessages/1/" xmlns:java="java:com.cognos.portal.utils.CCLLocaleUtils" exclude-result-prefixes="xts xtsext ui nui nav">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <layout:selectortemplates/>
- <xsl:template match="/">
- <xsl:variable name="dialogSubmit" select="/root/interactions/param[@name='dialogSubmit']"/>
- <xsl:choose>
- <xsl:when test="/root/interactions/param[@name='formaction'] = 'objectSelect'">
- <xsl:call-template name="generateMarkupForObjectSelect"/>
- </xsl:when>
- <xsl:when test="$dialogSubmit = 'true'">
- <layout:script>
- <xsl:variable name="propsURL" select="/root/interactions/param[@name='propsURL']"/>
- <xsl:if test="$propsURL != ''">
- var propsURL = "<xsl:value-of select="$propsURL"/>";
- </xsl:if>
- function _THIS_init(evt){
- if (evt.eventPhase == evt.AT_TARGET){
- _THIS_.raiseEvent("cognos.viewer.plugin.preferences.save", propsURL, "xsd:string");
- }
- }
- </layout:script>
- </xsl:when>
- <xsl:otherwise>
- <div>
- <layout formname="form">
- <xsl:call-template name="generateMarkupForFullPage"/>
- </layout>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="buildVariable">
- <xsl:param name="name" select="."/>
- <xsl:choose>
- <xsl:when test="/root/state/param[@name='{$name}'] != ''">
- <xsl:value-of select="/root/state/param[@name='{$name}']"/>
- </xsl:when>
- <xsl:when test="/root/customs/param[@name='{$name}'] != ''">
- <xsl:value-of select="/root/customs/param[@name='{$name}']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="generateMarkupForObjectSelect">
- <xsl:variable name="dialogMode" select="/root/controllerParams/param[@name='frag-view'] = 'dialog'"/>
- <xsl:variable name="formAction" select="/root/interactions/param[@name='formaction']"/>
- <xsl:variable name="selectionId" select="/root/interactions/param[@name='p_navSelectionId']"/>
- <xsl:variable name="dialogSubmit" select="/root/interactions/param[@name='dialogSubmit']"/>
- <xsl:variable name="reportLaunchOption">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">reportLaunchOption</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="promptOption">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">promptOption</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="usePromptChannel">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">usePromptChannel</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="useDrillChannel">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">useDrillChannel</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="useAuthoredDrillChannel">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">useAuthoredDrillChannel</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="viewerToolbarNormalMode">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">viewerToolbarNormalMode</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="viewerToolbarMaximizeMode">
- <xsl:call-template name="buildVariable">
- <xsl:with-param name="name">viewerToolbarMaximizeMode</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <layout:section id="ReportOptions">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_FRAGMENT_OPTION_CAPTION"/>
- </layout:text>
- </layout:label>
- <layout:radio name="p_reportLaunchOption" id="reportLaunchOption">
- <xsl:if test="($reportLaunchOption = 'runIcon')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <layout:text>
- <xts:string id="IDS_PROP_REPORT_SHOW_RUN_ACTION_CAPTION"/>
- </layout:text>
- <layout:value>runIcon</layout:value>
- </layout:radio>
- <layout:radio name="p_reportLaunchOption" id="reportLaunchOption">
- <xsl:choose>
- <xsl:when test="($reportLaunchOption = 'run')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <layout:text>
- <xts:string id="IDS_PROP_REPORT_RUN_REPORT_CAPTION"/>
- </layout:text>
- <layout:value>run</layout:value>
- </layout:radio>
- <layout:radio name="p_reportLaunchOption" id="reportLaunchOption">
- <xsl:choose>
- <xsl:when test="($reportLaunchOption = 'output')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:when>
- <xsl:when test="$reportLaunchOption = ''">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <layout:text>
- <xts:string id="IDS_PROP_REPORT_SHOW_SNAPSHOT_CAPTION"/>
- </layout:text>
- <layout:value>output</layout:value>
- <layout:rcsection>
- <layout:select name="p_reportLaunchSubOption" id="reportLaunchSubOption">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_REPORT_NO_SAVED_OUTPUT_CAPTION"/>
- </layout:text>
- </layout:label>
- <layout:option value="run">
- <xts:string id="IDS_PROP_REPORT_RUN_REPORT_CAPTION"/>
- </layout:option>
- <layout:option value="runIcon">
- <xts:string id="IDS_PROP_REPORT_SHOW_RUN_ACTION_CAPTION"/>
- </layout:option>
- </layout:select>
- </layout:rcsection>
- </layout:radio>
- </layout:section>
- <layout:section id="Prompt values">
- <layout:select name="p_promptOption" id="promptOption">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PROMPT_USER"/>
- </layout:text>
- </layout:label>
- <layout:option value="false">
- <xts:string id="IDS_PROP_PROMPT_SETTING_ONLY_WHEN_REQUIRED"/>
- </layout:option>
- <layout:option value="true">
- <xts:string id="IDS_PROP_PROMPT_SETTING_ALWAYS"/>
- </layout:option>
- <layout:option value="default">
- <xts:string id="IDS_PROP_PROMPT_SETTING_DEFAULT"/>
- </layout:option>
- <layout:option value="hide">
- <xts:string id="IDS_PROP_PROMPT_SETTING_HIDE_UNTIL_VALUES_PROVIDED"/>
- </layout:option>
- </layout:select>
- </layout:section>
- <layout:section id="Portlet communction">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATION_OPTIONS"/>
- </layout:text>
- <layout:hint>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATION_OPTIONS_HINT"/>
- </layout:hint>
- </layout:label>
- <!--Global Prompts-->
- <layout:section id="promptValues">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PROMPT_VALUES"/>
- </layout:text>
- </layout:label>
- <layout:checkbox name="p_sharePromptValues" id="sharePromptValues">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_WITH_OTHER_PORTLETS"/>
- </layout:text>
- <layout:value>true</layout:value>
- <layout:rcsection>
- <layout:radio name="p_usePromptChannel" id="sharePromptAllChannels">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_ALL_PORTLETS"/>
- </layout:text>
- <layout:value>false</layout:value>
- <xsl:if test="$usePromptChannel='false'">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- </layout:radio>
- <layout:radio name="p_usePromptChannel" id="sharePromptOnSpecifiedChannel">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_CHANNELED_PORTLET"/>
- </layout:text>
- <layout:value>true</layout:value>
- <xsl:if test="$usePromptChannel='true'">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <layout:rcsection>
- <layout:field id="promptEventChannel" name="p_promptEventChannel" type="text" maxlength="1024"/>
- </layout:rcsection>
- </layout:radio>
- <layout:section id="MatchOn">
- <layout:select name="p_matchOnParameterNameOnly" id="matchOnParameterNameOnly" disabled="disabled">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_MATCH_ON"/>
- </layout:text>
- </layout:label>
- <layout:option value="false">
- <xts:string id="IDS_PROP_PORTLET_MATCH_ON_PARAMETER_AND_DATA_ITEM"/>
- </layout:option>
- <layout:option value="true">
- <xts:string id="IDS_PROP_PORTLET_MATCH_ON_PARAMETER_ONLY"/>
- </layout:option>
- </layout:select>
- </layout:section>
- </layout:rcsection>
- </layout:checkbox>
- </layout:section>
- <!--End of Global Prompts-->
- <!--Drill up/Drill down-->
- <layout:section id="drillUpDown">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_DRILL_UP_DOWN"/>
- </layout:text>
- </layout:label>
- <layout:checkbox name="p_shareDrillEvents" id="shareDrillEvents">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_WITH_OTHER_PORTLETS_ON_PAGE"/>
- </layout:text>
- <layout:value>true</layout:value>
- <layout:rcsection>
- <layout:radio name="p_useDrillChannel" id="shareDrillEventOnAllChannels">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_ALL_PORTLETS"/>
- </layout:text>
- <layout:value>false</layout:value>
- <xsl:if test="$useDrillChannel='false'">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- </layout:radio>
- <layout:radio name="p_useDrillChannel" id="shareDrillEventOnSpecifiedChannel">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_CHANNELED_PORTLET"/>
- </layout:text>
- <layout:value>true</layout:value>
- <layout:rcsection>
- <layout:field id="drillChannel" name="p_drillChannel" type="text" maxlength="1024"/>
- </layout:rcsection>
- <xsl:if test="$useDrillChannel='true'">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- </layout:radio>
- </layout:rcsection>
- </layout:checkbox>
- </layout:section>
- <!--End of Drill up/Drill down-->
- <!--Authored drill through-->
- <layout:rcsection id="authoredDrillThrough">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_REPORT_DRILL_THROUGH"/>
- </layout:text>
- </layout:label>
- <layout:checkbox name="p_shareAuthoredDrillEvents" id="shareAuthoredDrillEvents">
- <layout:text>
- <xts:string id="IDS_PROP_PORTLET_COMMUNICATE_WITH_OTHER_PORTLETS_ON_PAGE"/>
- </layout:text>
- <layout:value>true</layout:value>
- <layout:rcsection>
- <layout:field id="authoredDrillChannel" name="p_authoredDrillChannel" type="text" maxlength="1024"/>
- </layout:rcsection>
- </layout:checkbox>
- </layout:rcsection>
- <!--End of authored drill-->
- </layout:section>
- <layout:section id="View options" format="division">
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_RVF_VIEW_OPTIONS"/>
- </layout:text>
- </layout:label>
- </layout:section>
- <layout:section>
- <layout:label>
- <layout:text>
- <xts:string id="IDS_PROP_FRAGMENT_SHOW_TOOLBAR_CAPTION"/>
- </layout:text>
- </layout:label>
- <layout:checkbox name="p_viewerToolbarNormalMode" id="viewerToolbarNormalMode">
- <xsl:if test="($viewerToolbarNormalMode = 'showNormal')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <layout:text>
- <xts:string id="IDS_PROP_FRAGMENT_SHOW_NORMAL_MODE_CAPTION"/>
- </layout:text>
- <layout:value>showNormal</layout:value>
- </layout:checkbox>
- <layout:checkbox name="p_viewerToolbarMaximizeMode" id="viewerToolbarMaximizeMode">
- <xsl:choose>
- <xsl:when test="($viewerToolbarMaximizeMode = 'showMaximize')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:when>
- <xsl:when test="($viewerToolbarMaximizeMode != 'showMaximize') and ($viewerToolbarNormalMode != 'showNormal')">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:when>
- </xsl:choose>
- <layout:text>
- <xts:string id="IDS_PROP_FRAGMENT_SHOW_MAXIMIZE_MODE_CAPTION"/>
- </layout:text>
- <layout:value>showMaximize</layout:value>
- </layout:checkbox>
- </layout:section>
- </xsl:template>
- <xsl:template name="generateMarkupForFullPage">
- <xsl:variable name="selection">
- <xsl:choose>
- <xsl:when test="/root/state/param[@name='viewerSelectedLanguage']">
- <xsl:value-of select="/root/state/param[@name='viewerSelectedLanguage']"/>
- </xsl:when>
- <xsl:when test="/root/preferences/param[@name='contentLocale']">
- <xsl:value-of select="/root/preferences/param[@name='contentLocale']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="titleOptions">
- <xsl:choose>
- <xsl:when test="/root/state/param[@name='viewerTitleOptions'] != ''">
- <xsl:value-of select="/root/state/param[@name='viewerTitleOptions']"/>
- </xsl:when>
- <xsl:when test="/root/customs/param[@name='viewerTitleOptions'] != ''">
- <xsl:value-of select="/root/customs/param[@name='viewerTitleOptions']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <layout:form id="_THIS_form" name="_THIS_form" method="get" action="_THIS?/THIS_">
- <layout:script>
- <xsl:value-of select="xtsext:cafaction('get_jsconfig', '')"/>
- var _THIS_itemList = new Array("title");
- _THIS_.addEventListener("cognos.ui.dialog.*", "CViewerFragmentPropertiesPage_processDialogEvents", false);
- function _THIS_cancelEdit()
- {
- _THIS_.setMode('view');
- _THIS_.retrieve();
- }
- var _THIS_currentObjDiv = "";
- var _THIS_currentObjType ="";
- var _THIS_currentProperty ="";
- var _THIS_TransientsFetched = false;
- <xsl:variable name="reportId">
- <xsl:choose>
- <xsl:when test="/root/interactions/param[@name='p_navSelectionId'] != ''">
- <xsl:value-of select="/root/interactions/param[@name='p_navSelectionId']"/>
- </xsl:when>
- <xsl:when test="/root/state/param[@name='navSelectionId'] != ''">
- <xsl:value-of select="/root/state/param[@name='navSelectionId']"/>
- </xsl:when>
- <xsl:when test="/root/customs/param[@name='navSelectionId'] != ''">
- <xsl:value-of select="/root/customs/param[@name='navSelectionId']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- var theAmp = "&";
- var _THIS_Action = "_THIS?frag-urlType=gateway/THIS_";
- var _THIS_GetTransientsURLParams = "b_action=cognosViewer" + theAmp +
- "ui.action=getTransients" + theAmp +
- "cv.useAjax=false" + theAmp +
- "cv.id=_THIS_" + theAmp +
- "cv.responseFormat=getTransients" + theAmp +
- "ui.object=storeID('<xsl:value-of select="$reportId"/>')";
- var _THIS_NO_CHANNEL_SPECIFIED_ERROR = '<xts:string id="IDS_PROP_PORTLET_NO_CHANNEL_SPECIFIED_ERROR" encode="javascript"/>';
- function _THIS_init(evt)
- {
- if (evt.eventPhase == evt.AT_TARGET)
- {
- if (_THIS_.ownerDialog.data)
- {
- CViewerFragmentPropertiesPage_setData('_THIS_', _THIS_.ownerDialog.data);
- var promptOption = document.getElementById('_THIS_' + "promptOption");
- var sharePromptValuesCheckBox = document.getElementById('_THIS_' + "sharePromptValues");
- if(promptOption != null && promptOption.value == 'hide')
- {
- if(sharePromptValuesCheckBox != null)
- {
- sharePromptValuesCheckBox.disabled = true;
- }
- }
- if (sharePromptValuesCheckBox)
- {
- var matchOnParameterNameOnly = document.getElementById('_THIS_' + "matchOnParameterNameOnly");
- if (matchOnParameterNameOnly)
- {
- matchOnParameterNameOnly.disabled = !sharePromptValuesCheckBox.checked;
- }
- }
- }
- CViewerFragmentPropertiesPage_attachOnClickEvents('_THIS_');
- }
- }
- _THIS_.addEventListener("fragment.load", "_THIS_init", false);
- </layout:script>
- <layout:section format="header">
- <layout:text><xts:string id="IDS_PROP_EDIT_REPORT_VIEW_TITLE_HINT"/></layout:text>
- </layout:section>
- <xsl:call-template name="generateMarkupForObjectSelect"/>
- <!-- hidden inputs -->
- <xsl:variable name="transientSpecification">
- <xsl:choose>
- <xsl:when test="/root/state/param[@name='transientSpecification'] != ''">
- <xsl:value-of select="/root/state/param[@name='transientSpecification']"/>
- </xsl:when>
- <xsl:when test="/root/customs/param[@name='transientSpecification'] != ''">
- <xsl:value-of select="/root/customs/param[@name='transientSpecification']"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <layout:hidden id="transientSpecification" name="p_transientSpecification" value="{$transientSpecification}"/>
- </layout:form>
- </xsl:template>
- </xsl:stylesheet>
|