123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: Viewer
- (C) Copyright IBM Corp. 2001, 2012
- US Government Users Restricted Rights - Use, duplication or
- disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/viewer.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ================================================================================
- start us on the right path if we've started from RV
- ================================================================================
- -->
- <xts:block id="startingFromRV" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name='soapFault'])]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- need information about the report - the defaultName to be precise -->
- <xts:append select="/root">
- <annotationSource>
- <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 xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="/root/env/param[@name='ui.object']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="defaultName"/>
- <cm:property name="defaultDescription"/>
- <cm:property name="searchPath"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </annotationSource>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- append the error
- ===============================================================================================
- -->
- <xts:block id="appendError" processor="XSLT" type="exec" dependency="startingFromRV" condition=".[/root/env/param[@name='soapFault']]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- need information about the report - the defaultName to be precise -->
- <xts:append select="/root">
- <soapFault>
- <xsl:value-of select="/root/env/param[@name='soapFault']" disable-output-escaping="yes"/>
- </soapFault>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- render the error using the default portal error page
- ===============================================================================================
- -->
- <xts:block id="portalDisplayError" dependency="appendError" processor="XSLT" type="exec" mode="interpret" condition=".[/root/soapFault and /root/soapFault//*[local-name()='exception']/*[local-name()='errorCode'] != 'cmDuplicateName']" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fault="http://developer.cognos.com/schemas/xts/portal/iFaultHandler/1/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/" >
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xts:request name="BUS" target="bus://xts2/portal/iFaultHandler/handleFault.xts" option="content" outputHeader="true">
- <!-- env -->
- <xsl:copy-of select="/root/env"/>
- <!-- system -->
- <xsl:copy-of select="/root/system"/>
- <!-- http -->
- <xsl:copy-of select="/root/http"/>
- <!-- session -->
- <xsl:copy-of select="/root/session"/>
- <!-- credential -->
- <xsl:copy-of select="/root/credential"/>
- <!-- cookies-->
- <xsl:copy-of select="/root/cookies"/>
- <!-- user vars -->
- <xsl:copy-of select="/root/user"/>
- <!-- header vars -->
- <xsl:copy-of select="/root/header"/>
- <command>
- <fault:handleFault>
- <!-- copy the fault which was encoded -->
- <xsl:copy-of select="/root/soapFault"/>
- <!-- copy the header from this request - it should have all the form vars -->
- <fault:originalRequest>
- <xsl:copy-of select="/root/header"/>
- </fault:originalRequest>
- </fault:handleFault>
- </command>
- </xts:request>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- format - render the page
- ===============================================================================================
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="portalDisplayError" condition=".[not(/root/soapFault) or /root/soapFault//*[local-name()='exception']/*[local-name()='errorCode'] = 'cmDuplicateName']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.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/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:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- 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:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl cf cp pf df dp lyt cm cml utml xts xtsext SOAP-ENV bus dt">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="m_name" select="'annotation1.xts'"/>
- <xsl:variable name="skin" select="key('user-param', 'skin')"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <!-- The object type we are about to create -->
- <xsl:variable name="new-class" select="'annotation'"/>
- <!-- always define booleans in the var declaration -->
- <xsl:variable name="viewAnnotation" select="boolean(not(/root/env/param[@name='action_hint']) or /root/env/param[@name='action_hint']='')"/>
- <!-- get the title -->
- <xsl:variable name="wizardTitle">
- <xsl:choose>
- <xsl:when test="$viewAnnotation">
- <xts:string id="IDS_VIEW_ANNOTATION_TITLE"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='action_hint']='save'">
- <xts:string id="IDS_MODIFY_ANNOTATION_TITLE"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ANNOTATION_TITLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="new-general-title">
- <xsl:choose>
- <xsl:when test="/root/soapFault">
- <xts:string id="IDS_COGNOS_REPORTS"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$wizardTitle"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="new-general-description">
- <xsl:choose>
- <xsl:when test="/root/soapFault or not((/root/env/param[@name='action_hint']) or /root/env/param[@name='action_hint']='')">
- <xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ANNOTATION_NEW_INTRO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- This is the "default" string that we will display in the name field -->
- <xsl:variable name="defaultName">
- <xsl:choose>
- <!-- just use the name from the object given to us - which will either be the report itself or the annotation -->
- <xsl:when test="/root/env/param[@name='action_hint'] = 'create'">
- <xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='annotationSource']/*/*/*[local-name()='defaultName']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Have to use the defaultDescription from an annotation - otherwise have to leave it blank -->
- <xsl:variable name="defaultDescription">
- <xsl:choose>
- <xsl:when test="/root/*[local-name()='annotationSource']/*/*/*[local-name()='objectClass']='annotation'">
- <xsl:value-of select="/root/*[local-name()='annotationSource']/*/*/*[local-name()='defaultDescription']"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- this it just blank -->
- <xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="label_name"><xts:string id="IDS_NEW_NAME" encode="javascript"/></xsl:variable>
- <xsl:variable name="errmsg">
- <xts:string id="IDS_ERR_MANDATORY" encode="javascript">
- <xts:param name="field">" + label + "</xts:param>
- </xts:string>
- </xsl:variable>
- <dp:page longTitle="$new-general-title" dp:kbA11y="true">
- <dp:meta>
- <!-- Help system -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <!-- Help system -->
- <pf:help context=""/>
- <script type="text/javascript" src="../prompting/CDispatcher.js">//</script>
- <script language="javascript">
- function init()
- {
- try {
- if (document.pform.m_p_defaultName)
- document.pform.m_p_defaultName.focus();
- } catch (e) {
- //possibly when the control's container is not (yet) visible
- }
- }
- function validateInputField(field, label)
- {
- field.value = trim(field.value);
- if (field.value == '')
- {
- alert("<xsl:value-of select="normalize-space($errmsg)"/>");
- field.focus();
- return false;
- }
- return true;
- }
- function validate()
- {
- var f = document.pform;
- var res = CAFContainsInvalidString(f.m_p_defaultName.value);
- if (res)
- {
- CAFReportValidationError(cafInvalidStringMsg + res);
- highlight = res;
- if (highlight != null)
- {
- CAFSelectText(f.m_p_defaultName, highlight);
- }
- return false;
- }
- var res = CAFContainsInvalidString(f.m_p_defaultDescription.value);
- if (res)
- {
- CAFReportValidationError(cafInvalidStringMsg + res);
- highlight = res;
- if (highlight != null)
- {
- CAFSelectText(f.m_p_defaultDescription, highlight);
- }
- return false;
- }
- <!-- Validate the name -->
- if ( !validateInputField(f.m_p_defaultName, "<xsl:value-of select="normalize-space($label_name)"/>"))
- {
- return false;
- }
- if(document.pform.m_p_defaultDescription.value.length > 3772)
- {
- alert('<xts:string id="IDS_ANNOTATION_LONG_MSG_ALERT" encode="javascript"/>');
- return false;
- }
- return true;
- }
- var FAULT_SOAPFAULT = "SOAP-ENV:Fault";
- var FAULT_PASSPORT = "authenticationFault";
- var SUCCESS_RESPONSE = "response";
- function resetPageState()
- {
- <!-- Clear the cookie value mfst -->
- clearSessionEntry('mfst');
- }
- function doCancel()
- {
- window.close();
- }
- // a global async dispatcher
- var gDispatcher = new CDispatcher();
- //encode the URI
- function URIEncode(name, value)
- {
- return (value) ? "&" + name + "=" + encodeURIComponent(value) : "";
- }
- function getTextNodeValue(obj)
- {
- var text_data = "";
- if(obj && obj.childNodes){
- for(var i = 0; i < obj.childNodes.length; i++){
- text_data += obj.childNodes[i].data;
- }
- }
- return text_data;
- }
- function createHiddenInput(document, name, value){
- var inline = document.createElement("INPUT");
- inline.setAttribute("name", name);
- inline.setAttribute("value", value);
- inline.setAttribute("id", name);
- inline.setAttribute("type", "hidden");
- return inline;
- }
- function checkSOAPPassportExpire(obj)
- {
- var ret_value = false;
- // find the CAM/exception/promptInfo/displayObjects/item[./name="h_CAM_action"]/value
- // and see if it's a logonAS.
- var CAM = obj.getElementsByTagName("CAM");
- if (CAM && CAM.length == 1) {
- var exception = CAM[0].getElementsByTagName("exception");
- if (exception && exception.length == 1) {
- var promptInfo = exception[0].getElementsByTagName("promptInfo");
- if (promptInfo && promptInfo.length == 1) {
- var displayObjects = promptInfo[0].getElementsByTagName("displayObjects");
- if (displayObjects && displayObjects.length == 1) {
- var items = displayObjects[0].getElementsByTagName("item");
- if (items && items.length > 0) {
- // have to loop over all the items
- for (var i = 0; i < items.length; i++) {
- var name = items[i].getElementsByTagName("name");
- var value = items[i].getElementsByTagName("value");
- var nameValue = (name && name.length > 0) ? getTextNodeValue(name[0]) : null;
- var valueValue = (value && value.length > 0) ? getTextNodeValue(value[0]) : null;
- if (nameValue && nameValue == "h_CAM_action" && valueValue && valueValue.indexOf("logon")==0) {
- ret_value = true;
- break;
- }
- }
- }
- }
- }
- }
- }
- return ret_value;
- }
- // have to submit an async request to viewer to do the work
- function submitToViewer()
- {
- if (!validate()) return;
- // otherwise we have to submit to the viewer
- var gateway = "<xsl:value-of select="xtsext:javascriptencode($gateway)"/>";
- // have to build the params
- var params = "b_action=cognosViewer";
- // add the name of the annotation
- if (pform["action_hint"].value=="save") {
- params += URIEncode("ui.action", "updateAnnotation");
- }
- else {
- params += URIEncode("ui.action", "createAnnotation");
- }
- params += URIEncode("rv.annotationName",pform["m_p_defaultName"].value);
- params += URIEncode("rv.annotationDescription",pform["m_p_defaultDescription"].value);
- params += URIEncode("ui.object", pform["ui.object"].value);
- params += URIEncode("cv.catchLogOnFault", "true");
- // force an XML response - have to decide what to do.
- params += URIEncode("forceSOAPFault", "true");
- var request = gDispatcher.createRequest(gateway, params, viewerCallback);
- request.setResponseType("XMLHTML");
- gDispatcher.dispatchRequest(request);
- }
- // have the callback function from viewer
- function viewerCallback(responseArray)
- {
- // get the values returned
- var responseXML = responseArray[0];
- var responseText = responseArray[1];
- // look for the various responses
- var passport = responseXML.getElementsByTagName(FAULT_PASSPORT);
- var soapFault = responseXML.getElementsByTagName(FAULT_SOAPFAULT);
- var success = responseXML.getElementsByTagName(SUCCESS_RESPONSE);
- // have to check the response
- if (success.length == 1) {
- // everything was ok - just close the window
- window.close();
- }
- // can't pass the general soap-fault for a passport to the ifaultHandler cause
- // the submit to ourselves might fail at the dispatcher stage - which will display the logon page.
- // logging in - will then show the logon page again - which isn't what's wanted. For a passport
- // failure - we just have to go back to the same page - either dispatcher will catch the error (if logged out)
- // or the call to CM will catch it (passport expired)
- else if (passport.length == 1 || checkSOAPPassportExpire(responseXML)) {
- // we've got a passport error - resubmit to ourselves - this should fire up the logon page
- pform.submit();
- }
- else if (soapFault.length == 1) {
- // have to decompose the fault - see what sort of error it is
- // have to string the header from XML response
- var soapFaultTxt = responseText;
- if (soapFaultTxt.indexOf("?xml")!=-1) {
- soapFaultTxt = soapFaultTxt.substring(soapFaultTxt.indexOf('>')+1);
- }
- var faultInput = null;
- if (pform["soapFault"] == null) {
- faultInput = createHiddenInput(document, "soapFault", soapFaultTxt);
- } else {
- faultInput = pform["soapFault"];
- faultInput.value = soapFaultTxt;
- }
- pform.appendChild(faultInput);
- // submit the form
- pform.submit();
- }
- else
- if (responseText.indexOf("<html>") > -1 ||
- responseText.indexOf("<HTML>") > -1) {
- doHTMLResponse(responseText);
- } else {
- // none of the above - we really don't know what happened.
- alert(responseText);
- }
- }
- </script>
- <script language="javascript" src="../ps/portal/js/utilities.js">//</script>
- </dp:script>
- <link href="{$skin_root}/portal/default.css" type="text/css" rel="stylesheet" dp:kbA11y="true"/>
- <utml:form name="pform" method="post" action="{$gateway}" dp:kbA11y="true">
- <input type="hidden" name="ui.backURL" value="{/root/env/param[@name='backURL']}"/>
- <!-- By Default if errURL is specified but empty - doCancel() is done.-->
- <utml:input type="hidden" name="errURL" utml:update="false">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='errURL']">
- <utml:value>
- <xsl:value-of select="/root/env/param[@name='errURL']"/>
- </utml:value>
- </xsl:when>
- <xsl:otherwise>
- <utml:value/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:input>
- <!-- Header -->
- <!-- ================================================================ -->
- <dp:header dp:kbA11y="true">
- <dp:title dp:kbA11y="true">
- <xsl:value-of select="$new-general-title"/>
- </dp:title>
- <dp:close>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='backURL']">
- <a href="{/root/env/param[@name = 'backURL']}">
- <xsl:call-template name="myCloseMarker"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a href="javascript:doCancel()">
- <xsl:call-template name="myCloseMarker"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </dp:close>
- <dp:description dp:kbA11y="true">
- <xsl:value-of select="$new-general-description"/>
- </dp:description>
- </dp:header>
- <!-- what to display if there's a soapFault -->
- <!-- ================================================================ -->
- <xsl:choose>
- <xsl:when test="/root/soapFault">
- <xsl:choose>
- <!-- specific cmDuplicate name error -->
- <!-- ================================================================ -->
- <xsl:when test="/root/soapFault/SOAP-ENV:Envelope/SOAP-ENV:Body/SOAP-ENV:Fault/detail/bus:exception/errorCode = 'cmDuplicateName' ">
- <lyt:layout style="1" lyt:kbA11y="true">
- <lyt:section lyt:kbA11y="true">
- <dp:group>
- <dp:groupItem valign="top">
- <img height="32" width="32" border="0">
- <xsl:attribute name="src">
- <xsl:value-of select="$webcontent"/>
- <xsl:text/>/portal/images/msg_warning.gif<xsl:text/>
- </xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_STATUS_WARN"/></xsl:attribute>
- </img>
- </dp:groupItem>
- <dp:groupItem>
- <!-- used for alignment -->
- <dp:text/><xsl:text> </xsl:text>
- </dp:groupItem>
- <dp:groupItem valign="top">
- <dp:text nospace="nospace" wrap="wrap">
- <label for="inputDuplicateName"><xts:string id="IDS_DUPLICATE_ERROR_RENAME_ERROR"><xts:param name="entryName"><xsl:value-of select="/root/env/param[@name='m_p_defaultName']"/></xts:param></xts:string>
- <br/><br/>
- <xts:string id="IDS_DUPLICATE_ERROR_RENAME_ENTRY_OPTION"/><br/></label>
- <utml:input type="text" size="30" aria-required="true" id="inputDuplicateName" name="m_p_defaultName" class="pInput" maxlength="256"/>
- <br/><br/>
- <xts:string id="IDS_DUPLICATE_ERROR_CONTINUE"/>
- <!-- add a hidden form field for the description - utml:form will miss it cause it's declared in the other case statement -->
- <utml:input type="hidden" name="m_p_defaultDescription"/>
- <br/>
- </dp:text>
- </dp:groupItem>
- </dp:group>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <!-- Default. Use Ok/Cancel buttons -->
- <df:button df:id="IDS_DUPLICATE_ERROR_OK" df:style="href" df:href="javascript:submitToViewer();" df:kbA11y="true"/>
- <df:button df:id="IDS_DUPLICATE_ERROR_CANCEL" df:style="href" df:href="javascript:window.close();" df:kbA11y="true"/>
- </dp:footer>
- </xsl:when>
- <xsl:otherwise>
- <!-- general error - we don't know what to do with it -->
- <!-- ================================================================ -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <!-- what to display when we have a normal page -->
- <!-- ================================================================ -->
- <lyt:layout style="1" lyt:kbA11y="true">
- <lyt:section lyt:kbA11y="true">
- <!-- Name -->
- <dp:input dp:kbA11y="true">
- <dp:section1>
- <label for="inputDefaultName"><xts:string id="IDS_ANNOTATION_NEW_NAME"/></label>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" size="30" aria-required="true" name="m_p_defaultName" id="inputDefaultName" class="pInput" maxlength="256">
- <utml:read-only><xsl:value-of select="$viewAnnotation"/></utml:read-only>
- <utml:value>
- <xsl:choose>
- <xsl:when test="not(key('env-param', 'm_p_defaultName')) and string-length($defaultName) <= 256">
- <xsl:value-of select="$defaultName"/>
- </xsl:when>
- <xsl:when test="not(key('env-param', 'm_p_defaultName')) and string-length($defaultName) > 256">
- <xsl:value-of select="substring($defaultName,0,257)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- </utml:input>
- </dp:section2>
- </dp:input>
- <!-- Description -->
- <dp:input dp:kbA11y="true">
- <dp:section1>
- <label for="inputDefaultDescription"><xts:string id="IDS_ANNOTATION_NEW_DESCRIPTION"/></label>
- </dp:section1>
- <dp:section2>
- <utml:textarea name="m_p_defaultDescription" id="inputDefaultDescription" class="pTextarea" style="height:140px">
- <utml:read-only><xsl:value-of select="$viewAnnotation"/></utml:read-only>
- <utml:value>
- <xsl:value-of select="$defaultDescription"/>
- </utml:value>
- </utml:textarea>
- </dp:section2>
- </dp:input>
- </lyt:section>
- </lyt:layout>
- <!-- Footer -->
- <!-- ================================================================ -->
- <xsl:choose>
- <xsl:when test="not($viewAnnotation)">
- <dp:footer>
- <df:button df:id="IDS_CANCEL" df:style="href" df:kbA11y="true">
- <df:href>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='backURL']">
- <xsl:value-of select="/root/env/param[@name='backURL']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>javascript:doCancel();</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </df:href>
- </df:button>
- <df:button df:id="IDS_FINISH" df:style="href" df:kbA11y="true">
- <df:href>
- <xsl:text>javascript:submitToViewer();</xsl:text>
- </df:href>
- </df:button>
- </dp:footer>
- </xsl:when>
- <xsl:otherwise>
- <dp:footer>
- <df:button df:id="IDS_FINISH" df:style="href" df:kbA11y="true">
- <df:href>
- <xsl:text>javascript:window.close();</xsl:text>
- </df:href>
- </df:button>
- </dp:footer>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </utml:form>
- </dp:page>
- </xsl:template>
- <xsl:template name="myCloseMarker">
- <xsl:variable name="close"><xts:string id="IDS_CLOSE"/></xsl:variable>
- <img role="button" height="16" width="16" class="dialogClose" vspace="2" border="0" src="{$skin_root}/portal/images/close.gif" alt="{$close}" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'"/>
- </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="xsl dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <dbg:templates/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|