1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: HTS
- (C) Copyright IBM Corp. 2005, 2010
- 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:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:hts="http://developer.cognos.com/myinbox/common/hts_ui" exclude-result-prefixes="xts xtsext hts">
- <xsl:import href="../../common/set-priority.xslt"/>
- <xsl:import href="../../common/json-converter.xslt"/>
- <xsl:import href="../../common/task-info.xslt"/>
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/">
- <xsl:apply-templates select="/" mode="common"/>
- <hts:script language="javascript">
- dojo.require("dijit.layout.ContentPane");
- _THIS_.addEventListener("fragment.load", "_THIS_init");
- _THIS_.addEventListener("fragment.retrieve.after", "_THIS_retrieveAfter");
- // enable logging?
- _F_config.enableLog = false;
- function _THIS_init(evt) {
- //write the task description
- _THIS_renderDescription();
- }
-
- function _THIS_renderDescription() {
- var description = '<xsl:value-of select="xtsext:javascriptencode(/root/input[@name='dep']/queryResponse/*[local-name()='presentationDescription']/*[local-name()='description'])"/>';
- if (description) {
- dojo.addOnLoad(function() {
- if (dijit.byId("_THIS_task_email_container")) {
- //if it there detroy it. Should really update, but for some reason
- //dijit.byId("_THIS_task_email_container").attr('content', 'test')
- //does not work.
- dijit.byId("_THIS_task_email_container").destroy();
- }
- new dijit.layout.ContentPane({content: description},"_THIS_task_email_container");
- });
- }
- }
- function _THIS_retrieveAfter(evt) {
- if (evt.target.id == "_THIS_") {
- //get the selected task, JSONify it and raise the event
- _THIS_raiseTaskInfo();
- }
- }
- </hts:script>
- <xsl:call-template name="Display_Single_Task">
- <xsl:with-param name="tasks" select="/root/input[@name='dep']/queryResponse/*[local-name()='getTaskInfoResponse']/*"/>
- <xsl:with-param name="desc" select="/root/input[@name='dep']/queryResponse/*[local-name()='presentationDescription']"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template name="Display_Single_Task">
- <xsl:param name="tasks"/>
- <xsl:param name="desc"/>
- <!-- should only be one for now -->
- <xsl:for-each select="$tasks">
- <xsl:variable name="ttype" select="*[local-name()='taskType']"/>
- <xsl:variable name="priority_tooltip">
- <xts:string id="IDS_FRAG_TASKVIEWER_TOOLTIP_EDIT_PRIORITY"/>
- </xsl:variable>
- <xsl:variable name="showAdvancedPropertiesTooltip">
- <xts:string id="IDS_FRAG_TASKVIEWER_TOOLTIP_SHOW_ADVANCED_PROPERTIES"/>
- </xsl:variable>
- <xsl:variable name="hideAdvancedPropertiesTooltip">
- <xts:string id="IDS_FRAG_TASKVIEWER_TOOLTIP_HIDE_ADVANCED_PROPERTIES"/>
- </xsl:variable>
- <xsl:variable name="showAdvancedPropertiesButtonAltMessage">
- <xts:string id="IDS_FRAG_TASKVIEWER_SHOW_ADVANCED_PROPERTIES_BUTTON_ALT"/>
- </xsl:variable>
- <xsl:variable name="hideAdvancedPropertiesButtonAltMessage">
- <xts:string id="IDS_FRAG_TASKVIEWER_HIDE_ADVANCED_PROPERTIES_BUTTON_ALT"/>
- </xsl:variable>
- <hts:section format="select-dialog" style="width:100%">
- <hts:rowset width="100%">
- <hts:row>
- <hts:action>
- <hts:div id="_THIS_task_email_container" dojoType="dijit.layout.ContentPane" style="width:100%;height:100%;overflow-y:auto"></hts:div>
- </hts:action>
- </hts:row>
- </hts:rowset>
- </hts:section>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
|