| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 | <?xml version="1.0" encoding="UTF-8"?><!--Licensed Materials - Property of IBMIBM Cognos Products: HTS(C) Copyright IBM Corp. 2005, 2010US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.--><xsl:stylesheet version="1.0"     xmlns:xts="http://developer.cognos.com/schemas/xts/"	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>    <xsl:template match="/">        <xsl:variable name="filterLabel"><xts:string id="IDS_FRAG_MENU_LABEL_FILTER"/></xsl:variable>        <xsl:variable name="typeMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_ALL_TYPES"/></xsl:variable>        <xsl:variable name="priorityMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_ALL_PRIORITIES"/></xsl:variable>        <xsl:variable name="statusMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_ALL_STATUSES"/></xsl:variable>        <xsl:variable name="datesMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_ALL_DATES"/></xsl:variable>        <xsl:variable name="taskMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_TASK"/></xsl:variable>        <xsl:variable name="folderMenuName"><xts:string id="IDS_FRAG_MENU_LABEL_APPLICATIONS"/></xsl:variable>        <xsl:variable name="newItemImageAltText"><xts:string id="IDS_FRAG_MENU_NEW_ITEM"/></xsl:variable>        <xsl:variable name="archiveImageAltText"><xts:string id="IDS_FRAG_MENU_BUTTON_ARCHIVE"/></xsl:variable>        <xsl:variable name="moveToImageAltText"><xts:string id="IDS_FRAG_MENU_BUTTON_CTRL_MOVETO"/></xsl:variable>        <xsl:variable name="deleteImageAltText"><xts:string id="IDS_FRAG_MENU_BUTTON_DELETE"/></xsl:variable>        <xsl:variable name="dateStyleLabel"><xts:string id="IDS_FRAG_MENU_LABEL_DATE_STYLE_CREATE"/></xsl:variable>        <xsl:variable name="dateStyleValue"><xsl:value-of select="/root/transients/param[@name='dateStyle']"/></xsl:variable>        <response>            <toolbar id="toolbar">            	<item type="button">			<image alt="{$newItemImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/fragments/myinbox/images/icon_notification_new.gif</image>    			<name><xts:string id="IDS_FRAG_MENU_LABEL_NEW_NOTIFICATION"/></name>			<action>_THIS_action('new',$(_THIS_),'notification',1);</action>    		</item>            	<item type="comboButton" separatorBefore="true">            		<menu id="deleteItemMenu" tooltip="{$moveToImageAltText}">                		<xsl:choose>                    		<xsl:when test="/root/customs/param[@name='folderName']='archive'">                    			<item fullImagePath="true" selected="true">                    			    <image alt="{$moveToImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/fragments/myinbox/images/action_move_to.png</image>                    				                    				<name><xts:string id="IDS_FRAG_MENU_BUTTON_UNARCHIVE"/></name>                    				<value>UNARCHIVE</value>                    				<action>_THIS_action('unarchive');</action>                    			</item>                    			<item fullImagePath="true" enabled="false">        							<image alt="{$moveToImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/fragments/myinbox/images/action_move_to.png</image>        							<name><xts:string id="IDS_FRAG_MENU_BUTTON_ARCHIVE"/></name>                    				<value>ARCHIVE</value>                    				<action>return true;</action>                    			</item>                			</xsl:when>                			<xsl:otherwise>                			    <item fullImagePath="true" enabled="false">                			    <image alt="{$moveToImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/fragments/myinbox/images/action_move_to.png</image>        							<name><xts:string id="IDS_FRAG_MENU_BUTTON_UNARCHIVE"/></name>                    				<value>UNARCHIVE</value>                    				<action>return true;</action>                    			</item>                			    <item selected="true" fullImagePath="true">                			        <image alt="{$moveToImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/fragments/myinbox/images/action_move_to.png</image>        							<name><xts:string id="IDS_FRAG_MENU_BUTTON_ARCHIVE"/></name>                    				<value>ARCHIVE</value>                    				<action>_THIS_action('archive');</action>                    			</item>                    	    </xsl:otherwise>                	    </xsl:choose>            		</menu>            	</item>                                <xsl:if test="/root/customs/param[@name='folderName']='archive'">                    <item type="button" separatorBefore="true">                        <image alt="{$deleteImageAltText}" pre="_THIS?frag-resource=" post="/THIS_">/ps/portal/images/action_delete.gif</image>                        <name><xts:string id="IDS_FRAG_MENU_BUTTON_DELETE"/></name>                        <action>_THIS_action('delete');</action>                    </item>                                 </xsl:if>            	<item type="button" separatorBefore="true">            		<name><xts:string id="IDS_FRAG_MENU_BUTTON_REFRESH"/></name>            		<image>fragments/myinbox/images/refresh.gif</image>            		<action>_THIS_action('refresh');</action>            	</item>            	            	 <item type="combo" separatorBefore="true">            		<menu id="dateStyleMenu" displayName="{$dateStyleLabel}" >            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_DATE_STYLE_CREATE"/></name>            				<value>Task.CreateDate</value>            				<action>_THIS_action('dateStyle', $(_THIS_), 'dateStyle',0);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_TASKLIST_HEADER_NEXT_DEADLINE"/></name>            				<value>Task.DueDate</value>            				<action>_THIS_action('dateStyle', $(_THIS_), 'dateStyle', 1);</action>            			</item>            		</menu>            	</item>             	<item type="combo" separatorBefore="true" labelBefore="{$filterLabel}">            		<menu id="typeFiltersMenu" displayName="{$typeMenuName}">            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_ALL_TYPES"/></name>            				<value>ALL</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Type',0);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_TASKS"/></name>            				<value>TASK</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Type',1);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_NOTIFICATIONS"/></name>            				<value>NOTIFICATION</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Type',2);</action>            			</item>            		</menu>            	</item>            	<item type="combo">            		<menu id="priorityMenu" displayName="{$priorityMenuName}">            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_ALL_PRIORITIES"/></name>            				<value>ALL</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Priority',0);</action>				            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_PRIORITY_LOW"/></name>            				<value>5</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Priority',1);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_PRIORITY_MEDIUM"/></name>            				<value>3</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Priority',2);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_PRIORITY_HIGH"/></name>            				<value>1</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Priority',3);</action>            			</item>            		</menu>            	</item>            	<item type="combo">            		<menu id="statusMenu" displayName="{$statusMenuName}">            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_ALL_STATUSES"/></name>            				<value>ALL</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',0);</action>								            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_NOT_STARTED_STATUS"/></name>            				<value>NOT_STARTED</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',1);</action>								            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_IN_PROGRESS_STATUS"/></name>            				<value>IN_PROGRESS</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',2);</action>								            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_COMPLETED_STATUS"/></name>            				<value>COMPLETED</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',3);</action>								            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_CANCELLED_STATUS"/></name>            				<value>OBSOLETE</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',4);</action>								            			</item>            			<!--item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_SUSPENDED_STATUS"/></name>            				<value>SUSPENDED</value>            				<action>_THIS_action('filter',$(_THIS_),'Task.Status',6);</action>								            			</item-->            		</menu>            	</item>            	<item type="combo">            		<menu id="datesMenu" displayName="{$datesMenuName}">            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_ALL_DATES"/></name>            				<value>ALL</value>            				<action>            				    _THIS_action('filter',$(_THIS_),_THIS_getDateFilterType(),0);            				</action>            			</item>            			<item>            				<name>                                <xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')"><xts:string id="IDS_FRAG_MENU_LABEL_NEXT_DAY"/></xsl:when>            				        <xsl:otherwise><xts:string id="IDS_FRAG_MENU_LABEL_LAST_DAY"/></xsl:otherwise>            				   </xsl:choose>            				 </name>            				<value type="script">								var utils = new hts_utils();                            <xsl:choose>                                <xsl:when test="contains($dateStyleValue,'Task.DueDate')">								return utils.getDays(1,true);								</xsl:when>								<xsl:otherwise>								return utils.getDays(1,false);								</xsl:otherwise>							</xsl:choose>            				</value>            				<action>            				    _THIS_action('filter',$(_THIS_),_THIS_getDateFilterType(),1);            				</action>            			</item>            			<item>            				<name>                                <xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')"><xts:string id="IDS_FRAG_MENU_LABEL_NEXT_WEEK"/></xsl:when>            				        <xsl:otherwise><xts:string id="IDS_FRAG_MENU_LABEL_LAST_WEEK"/></xsl:otherwise>            				   </xsl:choose>            				</name>            				<value type="script">								var utils = new hts_utils();								<xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')">                                    return utils.getDays(7,true);                                    </xsl:when>                                    <xsl:otherwise>                                    return utils.getDays(7,false);                                    </xsl:otherwise>                                </xsl:choose>            				</value>            				<action>            				    _THIS_action('filter',$(_THIS_),_THIS_getDateFilterType(),2);            				</action>				            			</item>            			<item>            				<name>                                <xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')"><xts:string id="IDS_FRAG_MENU_LABEL_NEXT_MONTH"/></xsl:when>            				        <xsl:otherwise><xts:string id="IDS_FRAG_MENU_LABEL_LAST_MONTH"/></xsl:otherwise>            				   </xsl:choose>            				 </name>            				<value type="script">								var utils = new hts_utils();								<xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')">                                    return utils.getMonths(1,true);                                    </xsl:when>                                    <xsl:otherwise>                                    return utils.getMonths(1,false);                                    </xsl:otherwise>                                </xsl:choose>            				</value>            				<action>            				    _THIS_action('filter',$(_THIS_),_THIS_getDateFilterType(),3);            				</action>				            			</item>            			<item>            				<name>                                <xsl:choose>                                    <xsl:when test="contains($dateStyleValue,'Task.DueDate')"><xts:string id="IDS_FRAG_MENU_LABEL_NEXT_6MONTHS"/></xsl:when>            				        <xsl:otherwise><xts:string id="IDS_FRAG_MENU_LABEL_LAST_6MONTHS"/></xsl:otherwise>            				   </xsl:choose>            				 </name>            				<value type="script">								var utils = new hts_utils();                            <xsl:choose>                                <xsl:when test="contains($dateStyleValue,'Task.DueDate')">								return utils.getMonths(6,true);								</xsl:when>								<xsl:otherwise>								return utils.getMonths(6,false);								</xsl:otherwise>							</xsl:choose>            				</value>            				<action>            				    _THIS_action('filter',$(_THIS_),_THIS_getDateFilterType(),4);            				</action>				            			</item>            		</menu>            	</item>            	<item type="combo">            		<!-- menu items are dynamically created by calling the createFunction value -->            		<menu id="applicationMenu" displayName="{$folderMenuName}">            			<item selected="true">            				<name><xts:string id="IDS_FRAG_MENU_LABEL_ALL_APPLICATIONS"/></name>            				<value>ALL</value>            				<action>_THIS_openApplicationDialog('filter',$(_THIS_),'Task.Application',0);</action>            			</item>            			<item>            				<name><xts:string id="IDS_FRAG_MENU_LABEL_SELECT"/></name>            				<value><xts:string id="IDS_FRAG_MENU_LABEL_SELECT"/></value>            				<action>_THIS_openApplicationDialog('filter',$(_THIS_),'Task.Application',1);</action>            			</item>            		</menu>            	</item>            </toolbar>        </response>    </xsl:template></xsl:stylesheet>
 |