123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 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).
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:encodingUtils="com.cognos.portal.utils.EncodingUtils">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="customs" select="/root/customs/param"/>
- <xsl:variable name="meta" select="/root/fragment/meta"/>
- <xsl:variable name="pages" select="/root/input[@name='pages']/pages"/>
- <xsl:variable name="header">
- <xsl:call-template name="get-custom">
- <xsl:with-param name="name">header</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="footer">
- <xsl:call-template name="get-custom">
- <xsl:with-param name="name">footer</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="fixed">
- <xsl:call-template name="get-custom">
- <xsl:with-param name="name">fixed</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="showicons">
- <xsl:call-template name="get-custom">
- <xsl:with-param name="name">showicons</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="vtabs-width">
- <xsl:call-template name="get-custom">
- <xsl:with-param name="name">vtabswidth</xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="refresh" select="string(/root/interactions/param[@name='refresh'])"/>
- <xsl:variable name="updateState" select="string(/root/interactions/param[@name='updateState'])"/>
-
- <xsl:variable name="level1-selected-page" select="($pages/page[@selected='true'] | $pages/page[position() = 1 and not($pages/page[@selected='true'])])"/>
- <xsl:variable name="selected-page" select="($level1-selected-page/page[@selected='true'] | $level1-selected-page/page[position() = 1 and not($level1-selected-page/page[@selected='true'])] | $level1-selected-page[not(page)] )"/>
- <xsl:variable name="first-page" select="$selected-page[not($refresh = 'true' or $updateState = 'true')]"/>
-
- <xsl:variable name="has-icons" select="$pages//*[@icon != '']"/>
- <xsl:variable name="selected-tabs" select="/root/state/param[@name='selectedTabs']"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="$refresh!='true' and $updateState!='true'">
- <div id="_THIS_tabIncompatibilityWarning" class="cogstyle-portlet-error-frame" style="display:none;">
- <table cellpadding="3" role="presentation">
- <tr>
- <td>
- <img src="_THIS?frag-resource=/ps/portal/images/msg_warning.gif/THIS_">
- <xsl:attribute name="alt"><xts:string id="IDS_BV_INCOMPATIBLE_ENVIRONMENT"/></xsl:attribute>
- </img>
- </td>
- <td><xts:string id="IDS_BV_INCOMPATIBLE_ENVIRONMENT"/></td>
- </tr>
- </table>
- </div>
- <div id="_THIS_bvContainer">
- <xsl:if test="$header != ''">
- <div id="_THIS_headercontent" style="width:100%;overflow:hidden">_THIS?frag-subfragment=header&frag-id=header/THIS_</div>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$pages/@unavailable = 'true'">
- <xsl:call-template name="render-error">
- <xsl:with-param name="message"><xts:string id="IDS_BV_PAGE_UNAVAILABLE"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$pages/@no-source = 'true'">
- <xsl:call-template name="render-error">
- <xsl:with-param name="message"><xts:string id="IDS_VEW_CUSTOMIZE"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <table id="_THIS_tabs_main" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout:fixed" role="presentation">
- <tr>
- <td role="tablist" id="_THIS_tabs_area" valign="top" nowrap="nowrap" style="width:{$vtabs-width}px">
- <div id="_THIS_tabs_area_div" style="overflow-x:hidden;overflow-y:auto;width:100%;">
- <xsl:variable name="vtabslab"><xts:string id="IDS_VERTICLE_TABS_LABEL"/></xsl:variable>
- <div id="_THIS_tabs_control_div" class="cogstyle-vtabs-area" style="overflow-x:hidden;width:100%;" role="navigation" aria-label="{$vtabslab}" >
- <xsl:apply-templates select="$pages/*" mode="html"/>
- <script type="text/javascript">
- <xsl:text> var _THIS_tabs = </xsl:text>
- <xsl:apply-templates select="$pages" mode="script"/>
- <xsl:text>;</xsl:text>
- </script>
- </div>
- <div id="_THIS_filter_container" style="overflow:auto;">
- <xsl:if test="$first-page">
- <xsl:variable name="tab-id" select="concat($first-page/../@id, $first-page/@id)"/>
- <div id="_THIS_{$tab-id}filter" style="display:none" class="cogstyle-filter"/>
- </xsl:if>
- </div>
- </div>
- </td>
- <td id="_THIS_tabs_splitter" valign="top" nowrap="nowrap" class="cogstyle-splitter">
- <br/>
- </td>
- <td id="_THIS_tabs_container" valign="top">
- <xsl:if test="$first-page">
- <xsl:variable name="tab-id" select="concat($first-page/../@id, $first-page/@id)"/>
- <div id="_THIS_{$tab-id}page" role="tabpanel" aria-labelledby="_THIS_{$tab-id}tab_anchor">
- <xsl:attribute name="style">
- <xsl:text>width:100%;height:100%</xsl:text>
- </xsl:attribute>
- <div id="_THIS_{$tab-id}content">
- <xsl:attribute name="style">
- <xsl:text>width:100%;height:100%;overflow-x:auto;</xsl:text>
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="$fixed = 'true'">cogstyle-vtabs-page-content-fixed</xsl:when>
- <xsl:otherwise>cogstyle-vtabs-page-content</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:text>_THIS?frag-subfragment=firstpage&frag-id=</xsl:text>
- <xsl:value-of select="$tab-id"/>
- <xsl:text>/THIS_</xsl:text>
- </div>
- </div>
- </xsl:if>
- </td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$footer != ''">
- <div id="_THIS_footercontent">_THIS?frag-subfragment=footer&frag-id=footer/THIS_</div>
- </xsl:if>
- </div>
- <script type="text/javascript">
- <xsl:text>
- function _THIS_get_selected_tab() {
- var tab = _THIS_tabs.tabs[_THIS_tabs.activeTabID];
- while (tab && tab.subtabs) {
- tab = tab.subtabs.tabs[tab.subtabs.activeTabID];
- }
- return tab;
- }
- function _THIS_refresh(evt) {
- if (evt.eventPhase == evt.AT_TARGET) {
- if (typeof _THIS_tabs != 'undefined') {
- var selectedTabs = _THIS_tabs.activeTabID;
- for (var tabID in _THIS_tabs.tabs) {
- var subTab = _THIS_tabs.tabs[tabID].subtabs;
- if (subTab) {
- selectedTabs += "," + subTab.activeTabID;
- }
- }
- if (_F_getFragmentByID("_THIS_header")) {
- _F_getFragmentByID("_THIS_header").raiseEvent("fragment.refresh",null,null,false,true);
- }
- if (_F_getFragmentByID("_THIS_footer")) {
- _F_getFragmentByID("_THIS_footer").raiseEvent("fragment.refresh",null,null,false,true);
- }
- //Hide the current tab, as it may not exist after the refresh
- var currentTab = _THIS_get_selected_tab();
- if (currentTab) {
- currentTab.deselect();
- }
- evt.preventDefault();
- _THIS_.retrieve("refresh=true&selectedTabs="+selectedTabs,"_THIS_tabs_control_div", false, true);
- }
- }
- }
- function _THIS_onload(evt) {
- if (evt.eventPhase == evt.CAPTURING_PHASE) {
- if (_THIS_.onresize)
- _THIS_.onresize();
- } else if (evt.eventPhase == evt.AT_TARGET) {
- </xsl:text>
- <xsl:if test="$first-page">
- <xsl:text>
- var firstChild = _F_getFragmentByID('</xsl:text><xsl:value-of select="concat('_THIS_',$first-page/../@id,$first-page/@id)"/><xsl:text>');
- if (firstChild != null)
- {
- firstChild.raiseEvent("fragment.load", null, "", false, false);
- }
- if (_F_getFragmentByID("_THIS_header")) {
- _F_getFragmentByID("_THIS_header").raiseEvent("fragment.load", null, "", false, false);
- }
- if (_F_getFragmentByID("_THIS_footer")) {
- _F_getFragmentByID("_THIS_footer").raiseEvent("fragment.load", null, "", false, false);
- }
- </xsl:text>
- </xsl:if>
- <xsl:text>
- if (_THIS_.parent.parent == null) {
- </xsl:text>
- <xsl:choose>
- <xsl:when test="$fixed = 'true'">
- <xsl:text>
- if (document.all) {
- document.body.scroll = "no";
- EventUtils.addEventListener(window,"beforeprint",function(event){document.body.style.overflow = "auto";document.body.scroll = "auto";document.getElementById("_THIS_tabs_area_div").style.overflowY="";var currentTab=_THIS_get_selected_tab();if(currentTab){var div=document.getElementById(currentTab.uniqueID()+"content");if(div){div.style.overflow="";}}});
- EventUtils.addEventListener(window,"afterprint",function(event){document.body.style.overflow = "";document.body.scroll = "no";document.getElementById("_THIS_tabs_area_div").style.overflowY="auto";var currentTab=_THIS_get_selected_tab();if(currentTab){var div=document.getElementById(currentTab.uniqueID()+"content");if(div){div.style.overflow="auto";}}scroll(0,0);});
- } else {
- document.body.style.overflow = "hidden";
- }
- scroll(0,0);
- </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- if (document.all) {
- document.body.scroll = "";
- } else {
- document.body.style.overflow = "auto";
- }
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>
- }
- new ui_splitter({id: "_THIS_tabs_splitter", resizing: _THIS_tabs});
- _THIS_.onresize = function() {
- var firstChild = _F_getFragmentByID('</xsl:text><xsl:value-of select="concat('_THIS_',$first-page/../@id,$first-page/@id)"/><xsl:text>');
- if (firstChild != null) {
- var tabsContainer = $(firstChild.parent.id + "tabs_container");
- var firstChildParentDiv = $(firstChild.parent.div);
- var height = xClientHeight() - ui_calcAvailableHeight(firstChildParentDiv, document.body,true);
- tabsContainer.style.height= height+'px';
- }
- if (typeof _THIS_tabs != 'undefined') {
- _THIS_tabs.onresize();
- }
- return true;
- }
- _THIS_.onresize();
- }
- }
- function _THIS_modeChange(evt)
- {
- if ((evt.eventPhase == evt.AT_TARGET)&&(evt.payload["newMode"] == "edit")) {
- //Remove fragment.retrieve before and after event handlers
- _THIS_.removeEventListener("fragment.retrieve.before", "_THIS_monitor", true);
- _THIS_.removeEventListener("fragment.retrieve.after", "_THIS_monitor", true);
- </xsl:text>
- <xsl:if test="string(/root/controllerParams/param[@name='frag-portalAgent'])!='cognos'">
- <xsl:text>
- _THIS_.removeEventListener("fragment.reload", "_THIS_monitor", true);
- </xsl:text>
- </xsl:if>
- <xsl:text>
- //Clean up child fragments before opening the edit page
- var childFragments = _THIS_.getChildren();
- if (childFragments) {
- for (var i=0; i < childFragments.length; i++) {
- childFragments[i].destroy();
- }
- }
- }
- }
- function _THIS_windowStateHandler(evt)
- {
- if (evt.eventPhase == evt.AT_TARGET) {
- evt.preventDefault();
- }
- }
- function _THIS_visibilityHandler(evt)
- {
- if (evt.eventPhase == evt.AT_TARGET) {
- var currentTab = _THIS_get_selected_tab();
- if (_F_getFragmentByID(currentTab.uniqueID()))
- _F_getFragmentByID(currentTab.uniqueID()).raiseEvent("fragment.visibility.change",
- {
- "setVisibility":evt.payload.newVisibility
- }
- , "params", false, false);
- }
- }
- if (typeof _THIS_tabs != 'undefined') {
- _THIS_tabs.attach(null);
- }
- _THIS_.addEventListener("fragment.visibility.change", "_THIS_visibilityHandler", false);
- _THIS_.addEventListener("fragment.windowstate.change", "_THIS_windowStateHandler", false);
- _THIS_.addEventListener("fragment.refresh", "_THIS_refresh", false);
- _THIS_.addEventListener("fragment.load", "_THIS_onload", true);
- _THIS_.addEventListener("fragment.mode.change", "_THIS_modeChange", false);
- </xsl:text>
- var _THIS_currentSelection = '<xsl:value-of select="encodingUtils:javascriptencode(string($selected-tabs))"/>';
- <xsl:choose>
- <xsl:when test="/root/controllerParams/param[@name='frag-portalAgent']='cognos'">
- <xsl:text>
- function _THIS_saveState(){
- if (typeof _THIS_tabs != 'undefined') {
- var selectedTabs = _THIS_tabs.activeTabID;
- for (var tabID in _THIS_tabs.tabs) {
- var subTab = _THIS_tabs.tabs[tabID].subtabs;
- if (subTab) {
- selectedTabs += "," + subTab.activeTabID;
- }
- }
- if (_THIS_currentSelection != selectedTabs){
- _THIS_currentSelection = selectedTabs;
- var fragRequest = new _F_Ajax.Request(_THIS_.interactionURI("refresh=true&selectedTabs="+selectedTabs),
- {
- requestHeaders:
- {
- "Connection": "keep-alive",
- "Accept": "text/xml,application/xml"
- },
- asynchronous : false
- });
- }
- }
- }
- _F_Document.addEventListener(window, "beforeunload", _THIS_saveState);
- </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- function _THIS_saveStateEvt(evt)
- {
- if (evt.eventPhase == evt.AT_TARGET) {
- if (typeof _THIS_tabs != 'undefined') {
- var selectedTabs = _THIS_tabs.activeTabID;
- for (var tabID in _THIS_tabs.tabs) {
- var subTab = _THIS_tabs.tabs[tabID].subtabs;
- if (subTab) {
- selectedTabs += "," + subTab.activeTabID;
- }
- }
- if (_THIS_currentSelection != selectedTabs){
- _THIS_currentSelection = selectedTabs;
- _THIS_.retrieve("updateState=true&selectedTabs="+selectedTabs,"_THIS_tabs_control_div",true, true);
- }
- }
- }
- }
- _THIS_.addEventListener("fragment.reload", "_THIS_saveStateEvt", false);
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>
- //- Activity Indicators
- var _THIS_indicators = null;
- function _THIS_monitor(evt)
- {
- if (evt.eventPhase == evt.AT_TARGET) //only want to execute this on downstream events
- return;
- if (_THIS_indicators == null)
- _THIS_indicators = new ui_throbbers("_THIS_", "_THIS?frag-resource=/ps/portal/images/icon_loading.gif/THIS_");
- _THIS_indicators.handler(evt);
- }
- _THIS_.addEventListener("fragment.retrieve.before", "_THIS_monitor", true);
- _THIS_.addEventListener("fragment.retrieve.after", "_THIS_monitor", true);
- </xsl:text>
- </script>
- </xsl:when>
- <xsl:otherwise>
- <!-- We are doing a refresh. Only generate the tabs. -->
- <xsl:apply-templates select="$pages/*" mode="html"/>
- <script type="text/javascript">
- <xsl:text> var _THIS_tabs = </xsl:text>
- <xsl:apply-templates select="$pages" mode="script"/>
- <xsl:text>;
- _THIS_tabs.attach(null);
- </xsl:text>
- <xsl:if test="$refresh='true'">
- <xsl:text>
- var _THIS_visibleTab = _THIS_get_selected_tab();
- if (_THIS_visibleTab) {
- _THIS_visibleTab.select();
- }
- </xsl:text>
- </xsl:if>
- </script>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="page" mode="html">
- <xsl:variable name="tabs-id" select="../@id"/>
- <xsl:variable name="tab-id" select="@id"/>
- <xsl:variable name="alt">
- <xsl:if test="parent::page">-alt</xsl:if>
- </xsl:variable>
- <xsl:variable name="more">
- <xsl:if test="page">-opened</xsl:if>
- <xsl:if test="(position() = 1 and not(../page[@selected='true'])) or @selected='true'">-active</xsl:if>
- </xsl:variable>
- <xsl:variable name="active" select="(position() = 1 and not(../page[@selected='true'])) or @selected='true'"/>
- <div id="_THIS_{$tabs-id}{$tab-id}tab">
- <xsl:if test="$active">
- <xsl:attribute name="class">cogstyle-vtabs-active-border</xsl:attribute>
- </xsl:if>
- <div class="cogstyle-vtabs{$alt}{$more}-left-edge">
- <div class="cogstyle-vtabs{$alt}{$more}-right-edge">
- <div class="cogstyle-vtabs{$alt}{$more}" style="padding-left: { 10 * count(ancestor::page) }px" title="{@title}">
- <xsl:variable name="spacer">_THIS?frag-resource=/ps/images/space.gif/THIS_</xsl:variable>
- <xsl:variable name="icon">
- <xsl:choose>
- <xsl:when test="$showicons = 'true' and starts-with(@icon, 'http://')">
- <xsl:value-of select="@icon"/>
- </xsl:when>
- <xsl:when test="$showicons = 'true' and @icon != ''">
- <xsl:text>_THIS?frag-resource=</xsl:text>
- <xsl:value-of select="@icon"/>
- <xsl:text>/THIS_</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$spacer"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <img id="_THIS_{ $tabs-id }{ $tab-id }_throbber" src="{ $icon }" border="0">
- <xsl:if test="parent::page">
- <xsl:attribute name="parent"><xsl:value-of select="concat('_THIS_', ancestor::*[2]/@id, ancestor::*[1]/@id, '_throbber')"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="alt"></xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>cogstyle-vtabs-icon</xsl:text>
- <xsl:if test="@hidden = 'true'"> cogstyle-img-faded</xsl:if>
- </xsl:attribute>
- </img>
- <a href="javascript:noop()" onclick="return false" role="tab" aria-selected="{$active}" id="_THIS_{$tabs-id}{$tab-id}tab_anchor">
- <xsl:if test="position() = 1">
- <xsl:choose>
- <xsl:when test="page"><xsl:attribute name="aria-controls">_THIS_<xsl:value-of select="$tabs-id"/><xsl:value-of select="$tab-id"/>subtabs</xsl:attribute></xsl:when>
- <xsl:otherwise><xsl:attribute name="aria-controls">_THIS_<xsl:value-of select="$tabs-id"/><xsl:value-of select="$tab-id"/>page</xsl:attribute></xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:value-of select="@title"/>
- </a>
- </div>
- </div>
- </div>
- <xsl:if test="page">
- <div id="_THIS_{$tabs-id}{$tab-id}subtabs" class="cogstyle-vtabs{$alt}{$more}-subtabs-area">
- <xsl:if test="not((position() = 1 and not(../page[@selected='true'])) or @selected='true')">
- <xsl:attribute name="style">display:none</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates mode="html"/>
- </div>
- </xsl:if>
- </div>
- </xsl:template>
- <xsl:template match="pages|page" mode="script">
- <xsl:text>new ui_vtabs({ frag: _THIS_, id: "</xsl:text>
- <xsl:value-of select="@id"/>
- <xsl:text>"</xsl:text>
- <xsl:if test="self::pages">
- <xsl:text>, fixed: </xsl:text>
- <xsl:value-of select="$fixed"/>
- <xsl:text>, vtabsWidth: </xsl:text>
- <xsl:value-of select="number($vtabs-width)"/>
- </xsl:if>
- <xsl:text>, activeTabID: "</xsl:text>
- <xsl:choose>
- <xsl:when test="page[@selected='true']">
- <xsl:value-of select="page[@selected='true']/@id"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="page[1]/@id"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>", tabs: { </xsl:text>
- <xsl:for-each select="page">
- <xsl:variable name="tab-id" select="@id"/>
- <xsl:value-of select="substring('										',1,count(ancestor-or-self::page))"/>
- <xsl:text>"</xsl:text>
- <xsl:value-of select="$tab-id"/>
- <xsl:text>": new ui_vtab({id: "</xsl:text>
- <xsl:value-of select="$tab-id"/>
- <xsl:text>", </xsl:text>
- <xsl:choose>
- <xsl:when test="page">
- <xsl:text>subtabs: </xsl:text>
- <xsl:apply-templates select="self::page" mode="script"/>
- </xsl:when>
- <xsl:when test="@href">
- <xsl:text>href: "</xsl:text>
- <xsl:value-of select="@href"/>
- <xsl:text>"</xsl:text>
- </xsl:when>
- </xsl:choose>
- <xsl:if test ="custom/param">
- <xsl:text>, customProperties:{</xsl:text>
- <xsl:for-each select="custom/param">
- <xsl:value-of select="@name"/>
- <xsl:text>:"</xsl:text>
- <xsl:value-of select="encodingUtils:javascriptencode(string(.))"/>
- <xsl:text>"</xsl:text>
- <xsl:if test="position() < last()">, </xsl:if>
- </xsl:for-each>
- <xsl:text>}</xsl:text>
- </xsl:if>
- <xsl:if test="@id = $first-page/@id and string($selected-tabs)=''">
- <xsl:text>, loaded: true</xsl:text>
- </xsl:if>
- <xsl:text>, target: { id: "</xsl:text>
- <xsl:value-of select="@id"/>
- <xsl:text>", type: "</xsl:text>
- <xsl:value-of select="@type"/>
- <xsl:if test="@target != ''">
- <xsl:text>", targetType: "</xsl:text>
- <xsl:value-of select="@target"/>
- </xsl:if>
- <xsl:text>", permissions: "</xsl:text>
- <xsl:value-of select="@permissions"/>
- <xsl:text>"}</xsl:text>
- <xsl:if test="string(/root/customs/param[@name='reportSavedOutputHeight']) != ''">
- <xsl:text>, height: </xsl:text><xsl:value-of select="/root/customs/param[@name='reportSavedOutputHeight']"/>
- </xsl:if>
- <xsl:text>})</xsl:text>
- <xsl:if test="position() < last()">, </xsl:if>
- </xsl:for-each>
- <xsl:text>} } )</xsl:text>
- </xsl:template>
- <xsl:template name="get-custom">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="$customs[@name=$name]">
- <xsl:value-of select="$customs[@name=$name]"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$meta/customProperties[@name=$name]/default/value"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="render-error">
- <xsl:param name="message" select="''"/>
- <table id="_THIS_default" border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td class="portlet-font" align="center" valign="middle" height="100">
- <xsl:value-of select="$message"/>
- </td>
- </tr>
- </table>
- </xsl:template>
- </xsl:stylesheet>
|