123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="logicsheets/formlogic_init.xslt"/>
- <xts:block id="getContent" processor="XSLT" type="exec" mode="interpret" dependency="formlogic_init">
- <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/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <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>
- <cm:search>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_po_skin']!=''">
- <xsl:value-of select="/root/env/param[@name='m_po_skin']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='m_obj']"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="previewImageLocation"/>
- <cm:property name="resourceLocation"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" dependency="getContent" mode="output" processor="XSLT" type="exec" mimeType="text/html">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <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: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:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts lyt pf dp df utml cm mt">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
-
- <pf:variables/>
- <xsl:variable name="mname" select="'preview_style.xts'"/>
- <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:portalSkin"/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_STYLE_PREVIEW_TITLE"/>
- <span lang="{$contentLocale}"><xsl:value-of select="$the-object/cm:defaultName"/></span>
- </xsl:variable>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <pf:meta/> <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <pf:help context="HID_PERSONALIZE"/> <!-- Help system -->
- <pf:dojo>
- <require>dijit.dijit</require>
- </pf:dojo>
- </dp:script>
- <script language="javascript">
- function closePage()
- {
- document.pform.ps_nav_op.value = "maintain";
- document.pform.m.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'p_style_back')))"/>";
- document.pform.submit();
- }
- </script>
- <xsl:variable name="preview" select="$the-object/cm:previewImageLocation"/>
- <xsl:variable name="skinFolderName" select="$the-object/cm:resourceLocation"/>
-
- <xsl:variable name="preview_image">
- <xsl:choose>
- <!-- Ignore external URLs -->
- <xsl:when test="contains($preview,':/') or contains($preview,'\\') or contains($preview,'//')">
- <!-- blank -->
- </xsl:when>
- <!-- Relative / Absolute URLs - Checking for \ is probably useless in this case -->
- <xsl:when test="contains($preview,'/') or contains($preview,'\')">
- <xsl:choose>
- <!-- Relative that doesn't start with / -->
- <xsl:when test="not(starts-with($preview, '.') or starts-with($preview, '/'))">
- <xsl:value-of select="$webRoot"/>/<xsl:value-of select="$preview"/>
- </xsl:when>
- <!-- Relative that starts with / -->
- <xsl:when test="starts-with($preview, '/')">
- <xsl:value-of select="$webRoot"/><xsl:value-of select="$preview"/>
- </xsl:when>
- <!-- Relative that starts with ../ -->
- <xsl:otherwise>
- <xsl:value-of select="$preview"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- Just a file name -->
- <xsl:when test="$preview != ''">
- <xsl:value-of select="concat($skincontent, '/', $skinFolderName, '/', $preview)"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <utml:form name="pform" method="post" action="{$gateway}">
- <!-- dialog header -->
- <dp:header help="true" div="div">
- <!-- header titles-->
- <dp:title showName="false">
- <span id="lbl_pageTitle"><xsl:copy-of select="$browserTitle"/></span>
- </dp:title>
- <!-- header introduction -->
- <dp:close>
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="key('env-param', 'p_style_back')">javascript:closePage();</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('env-param', 'backURL')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <dp:closeMarker/>
- </a>
- </dp:close>
- </dp:header>
- <xsl:choose>
- <xsl:when test="$preview_image != ''">
- <xsl:element name="iframe">
- <xsl:attribute name="src">
- <xsl:value-of select="$preview_image"/>
- </xsl:attribute>
- <xsl:attribute name="id">previewContent</xsl:attribute>
- <xsl:attribute name="width">100%</xsl:attribute>
- <xsl:attribute name="height">100%</xsl:attribute>
- <xsl:attribute name="aria-labelledby">lbl_pageTitle</xsl:attribute>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <lyt:layout style="1">
- <lyt:section>
- <dp:text>
- <mt:objectNoneFound id="IDS_STYLE_NO_PREVIEW"/>
- </dp:text>
- </lyt:section>
- </lyt:layout>
- </xsl:otherwise>
- </xsl:choose>
- <dp:footer div="div">
- <xsl:choose>
- <xsl:when test="key('env-param', 'p_style_back')">
- <df:button df:id="IDS_CLOSE" df:style="href" df:href="javascript:closePage();"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- <script language="javascript">
- var iframe = document.getElementById('previewContent');
- iframe.onload= function() {
- var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
- setTimeout(function(){iframe.height = innerDoc.body.scrollHeight + "px";},2);
- dojo.connect(innerDoc.body, 'onmousedown', function(e){
- dojo.stopEvent(e);
- },true);
-
- var previewFrame = dojo.byId("previewContent")
- previewFrame.setAttribute("aria-hidden","true");
- dojo.query("*", previewFrame).forEach( function(ele) {
- if (dijit.isTabNavigable(ele)) {
- ele.tabIndex = -1;
- }
- });
- }
- </script>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- Debug -->
- <xts:block id="debug" type="exec" dependency="format" mode="output" condition=".[ /root/session/param[@name='debug'] = '1' ]" processor="XSLT" mandatory="false" mimeType="text/html" >
- <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" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|