123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2014
- 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).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl ui uic admui xts xtsext">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <!-- bring in all the UI rendering variables -->
- <admui:variables/>
-
- <!-- include all the transforms -->
- <xsl:include href="../cogadmin/transforms/presentation/common.xsl"/>
- <xsl:include href="../cogadmin/transforms/presentation/breadcrumb.xsl"/>
- <xsl:include href="../cogadmin/transforms/presentation/dialog.xsl"/>
- <xsl:include href="../cogadmin/transforms/presentation/table_control.xsl"/>
- <xsl:include href="../cogadmin/transforms/presentation/menu.xsl"/>
- <!--
- ********** WORK AROUND FOR AN XTS BUG 517642 ************
- XTS won't evaluate xts:string if they're in a stylesheet that's getting included. Define strings as variables in the
- root stylesheet so they can be used in the ones that are being included.
- ***** NEEDS TO CHANGED ONCE XTS BUG IS FIXED *****
- -->
- <xsl:variable name="pageItemNotFound">
- <xts:string id="IDS_PAGER_ITEMS_FOUND"/>
- </xsl:variable>
- <xsl:variable name="pagerItemsMsg">
- <xts:string id="IDS_PAGER_ITEMS"/>
- </xsl:variable>
- <xsl:variable name="time_now" select="xtsext:getCurrentDateTime(string(/root/user/param[@name='timeZoneID']))"/>
- <xsl:variable name="lastRefreshed">
- <xts:string id="IDS_LAST_UPDATED">
- <xts:param name="0">
- <span>
- <xsl:if test="$productLocale != $contentLocale">
- <xsl:attribute name="lang"><xsl:value-of select="$contentLocale"/></xsl:attribute>
- </xsl:if>
- <xsl:value-of select="xtsext:formatDateFromUTC(string($time_now), number('2'), number('3'), '', string($contentLocale))"/>
- </span>
- </xts:param>
- </xts:string>
- </xsl:variable>
- <xsl:variable name="tenantLabel">
- <xts:string id="IDS_ADM_TENANT"/>
- </xsl:variable>
- <xsl:variable name="expandAllTooltip"><xts:string id="IDS_ADM_SECTION_EXPAND_ALL"/></xsl:variable>
- <xsl:variable name="collapseAllTooltip"><xts:string id="IDS_ADM_SECTION_COLLAPSE_ALL"/></xsl:variable>
- <xsl:variable name="expandTooltip"><xts:string id="IDS_ADM_SECTION_EXPAND"/></xsl:variable>
- <xsl:variable name="collapseTooltip"><xts:string id="IDS_ADM_SECTION_COLLAPSE"/></xsl:variable>
- <xsl:variable name="dialogClose"><xts:string id="IDS_ADM_DIALOG_CLOSE"/></xsl:variable>
- <xsl:variable name="pagerFromInvalid"><xts:string id="IDS_PAGER_FROM_INVALID" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerToInvalid"><xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerEntriesInvalid"><xts:string id="IDS_PAGER_ENTRIES_INVALID" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerEntriesEmpty"><xts:string id="IDS_PAGER_ENTRIES_EMPTY" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerGoto"><xts:string id="IDS_PAGER_GO_TO" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerFirst"><xts:string id="IDS_PAGER_FIRST" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerPrevious"><xts:string id="IDS_PAGER_PREVIOUS" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerNext"><xts:string id="IDS_PAGER_NEXT" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerLast"><xts:string id="IDS_PAGER_LAST" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerSelectAll"><xts:string id="IDS_PAGER_SELECT_ALL" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerSelectRow"><xts:string id="IDS_PAGER_SELECT_ROW" encode="javascript"/></xsl:variable>
- <xsl:variable name="lastUpdated"><xts:string id="IDS_LAST_UPDATED" encode="javascript"/></xsl:variable>
- <xsl:variable name="helpLabel"><xts:string id="IDS_HELP" encode="javascript"/></xsl:variable>
- <xsl:variable name="filterTitle"><xts:string id="IDS_FLT_TITLE" encode="javascript"/></xsl:variable>
- <xsl:variable name="menuNoActions"><xts:string id="IDS_ADM_ACT_NO_ACTIONS" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerSortDefaultTooltip"><xts:string id="IDS_PAGER_SORT_DEFAULT_TOOLTIP" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerSortAscendingTooltip"><xts:string id="IDS_PAGER_SORT_ASCENDING_TOOLTIP" encode="javascript"/></xsl:variable>
- <xsl:variable name="pagerSortDescendingTooltip"><xts:string id="IDS_PAGER_SORT_DESCENDING_TOOLTIP" encode="javascript"/></xsl:variable>
-
- <!--
- TODO: should be able to use a call template inside the include stylesheet. If not, then we should have a set of
- variables for the URL roots (skin, cogadmin, portal, ...) and we'd just append the gif to those.
- -->
- <xsl:variable name="collapseGif">
- <admui:imageURL image="collapse.gif" type="cogadmin"/>
- </xsl:variable>
- <xsl:variable name="expandGif">
- <admui:imageURL image="expand.gif" type="cogadmin"/>
- </xsl:variable>
- <xsl:variable name="skinWebcontentPath">
- <admui:imageURL type="skin"/>
- </xsl:variable>
- <xsl:variable name="cogadminWebcontentPath">
- <admui:imageURL type="cogadmin"/>
- </xsl:variable>
- <xsl:variable name="serverWebcontentPath">
- <admui:imageURL type="server"/>
- </xsl:variable>
-
- <xsl:template match="/root" priority="2">
- <script>
- _THIS_callBack = function(skipRefresh) {
- ui_modal_dialog.close();
- if (!skipRefresh) {
- raiseReloadEvent(_THIS_);
- }
- }
- </script>
- <xsl:apply-templates select="uic:fragment/*"/>
- </xsl:template>
- <xsl:template match="*[namespace-uri() = 'http://developer.cognos.com/schemas/uic/presentation/markup/']" priority="-1">
- <xsl:apply-templates/>
- </xsl:template>
-
- <!--
- uic:fragmentHeader: renders the header for the fragments
- uic:title - will be placed in the left part of the header
- uic:pathControl - used if we need to show breadcrumbs in the header
- uic:headerActions - actions to be places at the right of the fragment
- -->
- <xsl:template match="uic:fragmentHeader">
- <table class="cogstyle-fragmentHeader-main" role="presentation">
- <tbody>
- <tr>
- <td class="cogstyle-fragmentHeader-title">
- <xsl:choose>
- <xsl:when test="uic:title">
- <span class="cogstyle-fragmentHeader-titleText"><xsl:apply-templates select="uic:title"/></span>
- </xsl:when>
- <xsl:when test="uic:pathControl">
- <!-- Note: this span is required by IE to get the table cell
- to expand fully when the width is specified in the CSS file -->
- <span><xsl:apply-templates select="uic:pathControl"/></span>
- </xsl:when>
- </xsl:choose>
- </td>
- <xsl:variable name="toolbarLabel"><xts:string id="IDS_TOOL_TOOLBAR_LABEL"><xts:param name="toolName"><xsl:value-of select="uic:title"/></xts:param></xts:string></xsl:variable>
- <td nowrap="nowrap" valign="middle" role="toolbar" aria-label="{$toolbarLabel}">
- <xsl:apply-templates select="uic:headerActions"/>
- </td>
- </tr>
- </tbody>
- </table>
- </xsl:template>
-
- <xsl:template match="uic:headerSeperator" name="uic:headerSeperator">
- <img style="margin-left:3px;margin-right:3px" alt="">
- <xsl:attribute name="src">
- <admui:imageURL image="divider.gif" type="cogadmin"/>
- </xsl:attribute>
- </img>
- </xsl:template>
-
- <xsl:template match="uic:filterInitScript">
- <script>
- function _THIS_onload() {
- setTimeout(function(){
- var filterDIV = _THIS_.parent.id + "filter";
- var filterFragId = _THIS_.parent.id + "<xsl:value-of select="xtsext:javascriptencode(string(@filterName))"/>";
- if (!_F_getFragmentByID(filterFragId)) {
- var _THIS_filterFrag = new fragment("/cogadminFragments/filter/<xsl:value-of select="@filterName"/>", _THIS_.parent.id + "<xsl:value-of select="xtsext:javascriptencode(string(@filterName))"/>", filterDIV);
- if (!isHidden($(_THIS_.div))) {
- $(filterDIV).style.display = "block";
- }
- _THIS_filterFrag.retrieve('personalOnly=<xsl:value-of select="/root/env/param[@name='personalOnly']='true'"/>');
- }
- },0);
- }
-
- //the setTimeout function is set to address the issue #568418
- _THIS_.setOnloadHandler(_THIS_onload);
- </script>
- </xsl:template>
- <xsl:template name="uic:genSelectRowCheckbox">
- <xsl:param name="tableName"/>
- <xsl:variable name="id">_THIS_<xsl:value-of select="$tableName"/>
- <xsl:text>_checkbox_</xsl:text><xsl:value-of select="position()"/>
- </xsl:variable>
- <xsl:variable name="value">
- <xsl:if test="@value">
- <xsl:value-of select="@value"/>
- </xsl:if>
- </xsl:variable>
- <input type="checkbox" name="{$id}" id="{$id}" onclick="cancelBubble(event)">
- <xsl:attribute name="aria-label">
- <xsl:choose>
- <xsl:when test="@label != ''"><xts:string id="IDS_PAGER_SELECT_ROW_WITH_NAME" encode="html"><xts:param name="name"><xsl:value-of select="@label"/></xts:param></xts:string></xsl:when>
- <xsl:otherwise><xts:string id="IDS_PAGER_SELECT_ROW" encode="html"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="value">
- <xsl:value-of select="xtsext:urlencode(string($value))"/>
- </xsl:attribute>
- </input>
- </xsl:template>
-
- <xsl:template match="node()" priority="-2">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="text()" priority="-2">
- <xsl:value-of select="."/>
- </xsl:template>
- </xsl:stylesheet>
|