12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2019
- 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:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" exclude-result-prefixes="cp df dp xts xtsext utml cm">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
-
- <!--
- df:button
- df:propertiesTabs
- df:personalizeTabs
- -->
- <xsl:variable name="df-namespace-uri" select="'http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/'"/>
-
-
- <!--
- df:button - a set of commonly used buttons
- -No style defined - custom button
- -->
- <xsl:template match="df:button[not(@df:style)]">
- <dp:button>
- <xsl:copy-of select="@state"/>
- <xsl:apply-templates/>
- </dp:button>
- </xsl:template>
- <!--
- df:button - stack-up - df:target child element determines target
- -->
- <xsl:template match="df:button[@df:style='stack-up' or @df:style='push']">
- <out:if test="true()">
- <out:variable name="df-target">
- <xsl:copy-of select="df:target/child::node()"/>
- </out:variable>
- <out:choose>
- <out:when test="$df-target = ''">
- <dp:button state="inactive">
- <dp:buttonText><xts:string id="{@df:id}"/></dp:buttonText>
- </dp:button>
- </out:when>
- <out:otherwise>
- <dp:button>
- <utml:a utml:op="stack-up" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <utml:target>
- <out:value-of select="$df-target"/>
- </utml:target>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:otherwise>
- </out:choose>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="stack-down-save"/>
- -->
- <xsl:template match="df:button[@df:style='stack-down-save' or @df:style='drop']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <dp:button>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="stack-down-save" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="stack-down"/> Without A11y
- -->
- <xsl:template match="df:button[(@df:style='stack-down' or @df:style='pop') and not(@df:kbA11y)]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <dp:button>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="stack-down" id="{@df:idPrefix}{@df:id}" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="stack-down"/> with A11y
- -->
- <xsl:template match="df:button[(@df:style='stack-down' or @df:style='pop') and @df:kbA11y='true']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <dp:df_no_id><xsl:value-of select="$df-kbA11y"/></dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="stack-down" id="{@df:idPrefix}{@df:id}" role="button" utml:kbA11y="{$df-kbA11y}">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="maintain"/> - dp:target child element determines target
- -->
- <xsl:template match="df:button[@df:style='maintain']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <out:variable name="df-target">
- <xsl:copy-of select="df:target/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="true"/></xsl:variable>
- <out:choose>
- <out:when test="$df-target = ''">
- <dp:button state="inactive">
- <dp:buttonText><xts:string id="{@df:id}"/></dp:buttonText>
- </dp:button>
- </out:when>
- <out:otherwise>
- <dp:button>
- <dp:df_no_id>true</dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a>
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <out:attribute name="role">button</out:attribute>
- <utml:target>
- <out:value-of select="$df-target"/>
- </utml:target>
- <out:attribute name="class">
- <out:variable name="AOKButton">
- <xsl:if test="@df:id='IDS_OK'">OK</xsl:if>
- </out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-label">
- <xsl:choose>
- <xsl:when test="@df:label"><xts:string id="{@df:label}"/></xsl:when>
- <xsl:otherwise><xts:string id="{@df:id}"/></xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText>
- <xsl:choose>
- <!-- if there's a left pointing arrow, then place the image followed by the text -->
- <xsl:when test="@df:imagePosition='left'">
- <xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}" dp:imagePosition="left"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if><xts:string id="{@df:id}"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </dp:buttonText>
- </utml:a>
- </dp:button>
- </out:otherwise>
- </out:choose>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="back-url"/> - uses the backURL env param as the target
- -->
- <xsl:template match="df:button[@df:style='back-url' and not(@df:kbA11y)]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultBack">
- <out:value-of select="/root/env/param[@name='backURL']"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <dp:df_no_id>true</dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- <dp:defaultBack><out:value-of select="$df-defaultBack"/></dp:defaultBack>
- </xsl:if>
- <a role="button" >
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-label">
- <xsl:choose>
- <xsl:when test="@df:label"><xts:string id="{@df:label}"/></xsl:when>
- <xsl:otherwise><xts:string id="{@df:id}"/></xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <out:attribute name="href">
- <out:value-of select="xtsext:htmlencode(/root/env/param[@name = 'backURL'])"/>
- </out:attribute>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="back-url"/> - uses the backURL env param as the target
- -->
- <xsl:template match="df:button[@df:style='back-url' and @df:kbA11y='true']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultBack">
- <out:value-of select="/root/env/param[@name='backURL']"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <dp:df_no_id><xsl:value-of select="$df-kbA11y"/></dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- <dp:defaultBack><out:value-of select="$df-defaultBack"/></dp:defaultBack>
- </xsl:if>
- <a role="button" tabindex="0">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="href">#</out:attribute>
- <out:attribute name="onclick">javascript:location.href="<out:value-of select="xtsext:javascriptencode(/root/env/param[@name = 'backURL'])"/>"</out:attribute>
- <xsl:choose>
- <xsl:when test="@focusidOnTab">
- <out:attribute name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else <xsl:text>{</xsl:text> if(document.getElementById("<xsl:value-of select="@focusidOnTab"/>")) <xsl:text>{</xsl:text>document.getElementById("<xsl:value-of select="@focusidOnTab"/>").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:when>
- <xsl:when test="@focusidOnShiftTab">
- <out:attribute name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==false) return true; else <xsl:text>{</xsl:text> if(document.getElementById("<xsl:value-of select="@focusidOnShiftTab"/>")) <xsl:text>{</xsl:text>document.getElementById("<xsl:value-of select="@focusidOnShiftTab"/>").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:when>
- </xsl:choose>
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="href"/> - a dp:href attribute or child determines target
- -->
- <xsl:template match="df:button[@df:style='href' and not(@df:kbA11y)]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="true"/></xsl:variable>
- <dp:button>
- <dp:df_no_id>true</dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- <dp:defaultAct><out:value-of select="$df-defaultAct"/></dp:defaultAct>
- </xsl:if>
- <a id="{@df:id}" role="button">
- <xsl:choose>
- <xsl:when test="@df:href">
- <xsl:attribute name="href">
- <xsl:value-of select="@df:href"/>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <out:variable name="df-href">
- <xsl:copy-of select="df:href"/>
- </out:variable>
- <out:attribute name="href">
- <out:value-of select="$df-href"/>
- </out:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:copy-of select="@*[(local-name()!='class' and local-name()!='role' and local-name()!='aria-label') and namespace-uri() != $df-namespace-uri]"/>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-label">
- <xsl:choose>
- <xsl:when test="@df:label"><xts:string id="{@df:label}"/></xsl:when>
- <xsl:otherwise><xts:string id="{@df:id}"/></xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <dp:buttonText>
- <xsl:if test="not(@df:noText) or @df:noText = 'false'"><xts:string id="{@df:id}"/></xsl:if>
- <xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if>
- </dp:buttonText>
- </a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <dp:button dp:id="xxx" dp:style="href"/> - a dp:href attribute or child determines target
- -->
- <xsl:template match="df:button[@df:style='href' and @df:kbA11y='true']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <dp:df_no_id><xsl:value-of select="$df-kbA11y"/></dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- <dp:defaultAct><out:value-of select="$df-defaultAct"/></dp:defaultAct>
- </xsl:if>
- <a id="{@df:idPrefix}{@df:id}" role="button">
- <xsl:attribute name="href">#</xsl:attribute>
- <xsl:choose>
- <xsl:when test="@df:href">
- <!-- When the href is #, an onclick must have be specified for the button -->
- <xsl:if test="string(@df:href)!='#'">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@df:href"/>
- </xsl:attribute>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="string(df:href)!='#'">
- <out:variable name="df-href">
- <xsl:copy-of select="df:href"/>
- </out:variable>
- <out:attribute name="onclick">
- <out:value-of select="$df-href"/>
- </out:attribute>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <xsl:choose>
- <xsl:when test="@focusidOnTab">
- <out:attribute name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==true) return true; else <xsl:text>{</xsl:text> if(document.getElementById("<xsl:value-of select="@focusidOnTab"/>")) <xsl:text>{</xsl:text>document.getElementById("<xsl:value-of select="@focusidOnTab"/>").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:when>
- <xsl:when test="@focusidOnShiftTab">
- <out:attribute name="onkeydown">javascript:if(event.keyCode==9) <xsl:text>{</xsl:text> if(event.shiftKey==false) return true; else <xsl:text>{</xsl:text> if(document.getElementById("<xsl:value-of select="@focusidOnShiftTab"/>")) <xsl:text>{</xsl:text>document.getElementById("<xsl:value-of select="@focusidOnShiftTab"/>").focus(); return false; <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> <xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:when>
- </xsl:choose>
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- <xsl:copy-of select="@*[(local-name()!='class' and local-name()!='focusidOnTab' and local-name()!='focusidOnShiftTab' and local-name()!='id' and local-name()!='role') and namespace-uri() != $df-namespace-uri]"/>
- <dp:buttonText>
- <xsl:if test="not(@df:noText) or @df:noText = 'false'"><xts:string id="{@df:id}"/></xsl:if>
- <xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if>
- </dp:buttonText>
- </a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <df:button df:id="xxx" df:style="submit"/> - submit.xts is target
- -->
- <xsl:template match="df:button[@df:style='submit' and not(df:target) and not(df:nav_op)]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <dp:df_no_id>true</dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="submit" role="button" utml:kbA11y="{$df-kbA11y}">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <utml:target>
- <out:value-of select="concat($app, '/submit.xts')"/>
- </utml:target>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-label">
- <xsl:choose>
- <xsl:when test="@df:label"><xts:string id="{@df:label}"/></xsl:when>
- <xsl:otherwise><xts:string id="{@df:id}"/></xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <df:button df:id="xxx" df:style="submit"/> - submit.xts is target
- -->
- <xsl:template match="df:button[@df:style='submit' and (@df:nav_op) and not(df:target) and not(@df:kbA11y)]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <dp:button>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="{@df:nav_op}" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <utml:target>
- <out:value-of select="concat($app, '/submit.xts')"/>
- </utml:target>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <df:button df:id="xxx" df:style="submit"/> - submit.xts is target
- -->
- <xsl:template match="df:button[@df:style='submit' and (@df:nav_op) and not(df:target) and @df:kbA11y='true']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <dp:button>
- <span id="buttonLabel{@df:id}" style="position: absolute;margin-left: -9999px;margin-top: -9999px;"><xts:string id="{@df:id}"/></span>
- <dp:df_no_id>true</dp:df_no_id>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="{@df:nav_op}" role="button" utml:kbA11y="{$df-kbA11y}">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <utml:target>
- <out:value-of select="concat($app, '/submit.xts')"/>
- </utml:target>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <out:attribute name="class">
- <out:variable name="AOKButton"><xsl:if test="@df:id='IDS_OK'">OK</xsl:if></out:variable>
- <out:choose>
- <out:when test="$browser = 'ie'">ieAnchorButton</out:when>
- <out:when test="$AOKButton = 'OK'">genericAnchorWideButton</out:when>
- <out:otherwise>genericAnchorButton</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-labelledby">buttonLabel<xsl:value-of select="@df:id"/></out:attribute>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:if>
- </xsl:template>
- <!--
- df:button - <df:button df:id="xxx" df:style="submit"/> - custom target
- -->
- <xsl:template match="df:button[@df:style='submit' and df:target]">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <out:variable name="df-target">
- <xsl:copy-of select="df:target/child::node()"/>
- </out:variable>
- <out:choose>
- <out:when test="$df-target = ''">
- <dp:button state="inactive">
- <dp:buttonText><xts:string id="{@df:id}"/></dp:buttonText>
- </dp:button>
- </out:when>
- <out:otherwise>
- <dp:button>
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <utml:a utml:op="submit" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <utml:target>
- <out:value-of select="$df-target"/>
- </utml:target>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </utml:a>
- </dp:button>
- </out:otherwise>
- </out:choose>
- </out:if>
- </xsl:template>
-
- <!--
- Active button. Can be enabled and disabled on the fly (browser side)
- -->
- <xsl:template match="df:button[@df:style='active']">
- <out:if test="true()">
- <xsl:variable name="df-defaultKey">
- <xsl:value-of select="@df:defaultKey"/>
- </xsl:variable>
- <out:variable name="df-defaultAct">
- <xsl:copy-of select="df:defaultAct/child::node()"/>
- </out:variable>
- <dp:button id="{@id}"> <!-- pass the id to the presentation code to insert in the final button tag -->
- <xsl:if test="$df-defaultKey='active'">
- <dp:defaultKey><xsl:value-of select="$df-defaultKey"/></dp:defaultKey>
- </xsl:if>
- <a class="commandButtonActive" role="button">
- <xsl:copy-of select="@*[namespace-uri() != $df-namespace-uri]"/>
- <xsl:if test="$df-defaultKey='active'">
- <utml:defaultKey><xsl:value-of select="$df-defaultKey"/></utml:defaultKey>
- <utml:defaultAct><out:value-of select="$df-defaultAct"/></utml:defaultAct>
- </xsl:if>
- <dp:buttonText><xts:string id="{@df:id}"/><xsl:if test="df:image"><dp:buttonImage dp:tooltip="{df:image/@df:tooltip}"><xsl:value-of select="df:image"/></dp:buttonImage></xsl:if></dp:buttonText>
- </a>
- </dp:button>
- </out:if>
- </xsl:template>
-
- <!--
- df:button - <df:button df:id="xxx"/> - inactive button
- -->
- <xsl:template match="df:button[@df:id and (count(@*) = 1)]">
- <xsl:variable name="df-kbA11y">
- <xsl:value-of select="true"/>
- </xsl:variable>
- <dp:button state="inactive">
- <dp:df_no_id>true</dp:df_no_id>
- <dp:buttonText>
- <xts:string id="{@df:id}"/>
- </dp:buttonText>
- </dp:button>
- </xsl:template>
- <!--
- df:propertiesTabs - this will display the properties it is a set list that is dependant on the current object
- -->
- <xsl:template match="df:propertiesTabs">
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <xsl:variable name="onClickScript" select="@onclick | @onClick"/>
- <xsl:variable name="hasJSStart" select="starts-with(string($onClickScript),'java')"/>
- <script language="javascript">
-
- function submitForm(sTarget, bSkipValidate)
- {
- if (bSkipValidate == null) {
- bSkipValidate = false;
- }
- var bValidate = true;
- <!--If we are not to skip validation and there is something to validate on the container page then do the validation ..-->
- <![CDATA[
- if (window.validate && !bSkipValidate) {
- bValidate = validate();
- }
- ]]>
- if (bValidate)
- {
- document.pform.m.value = "<out:value-of select="$app"/>" + "/" + sTarget;
- document.pform.m_class.value = "<out:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_class']))"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }
- }
-
- </script>
-
- <!-- the tabset requires the df_tab_selected variable to be defined >
- <out:variable name="df_tab_selected"><xsl:value-of select="@select"/></out:variable-->
- <out:variable name="df_hasSetPolicy">
- <xsl:if test="df:hasSetPolicy">
- <xsl:copy-of select="df:hasSetPolicy/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasRead">
- <xsl:if test="df:hasRead">
- <xsl:copy-of select="df:hasRead/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasTraverse">
- <xsl:if test="df:hasTraverse">
- <xsl:copy-of select="df:hasTraverse/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_outtabend">
- <xsl:choose>
- <xsl:when test="@select='general'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="df_hasUserProfile">
- <xsl:if test="df:hasUserProfile">
- <xsl:copy-of select="df:hasUserProfile/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="userInterfaces" select="/root//cm:queryResponse//cm:package/cm:userInterfaces/cm:uiComponentEnum"/>
- <out:variable name="objLaunchableType" select="/root//cm:queryResponse//cm:launchable/cm:launchableType"/>
-
- <out:variable name="effectiveUserCapabilities">
- <out:call-template name="calEffectiveObjectCapabilities">
- <out:with-param name="capabilities" select="/root//cm:queryResponse/*/cm:effectiveUserCapabilities | /root//cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
- </out:call-template>
- </out:variable>
- <out:variable name="tabObj" select="key('ui-object-properties', /root/env/param[@name='m_class'])"/>
- <out:variable name="ui-obj-tab" select="key('ui-object-properties', /root/env/param[@name='m_class'])[not(@userInterface) or @userInterface=$userInterfaces][not(@launchableType) or @launchableType=$objLaunchableType]"/>
- <!-- these are the properties tabs -->
- <cp:tabset id="maintabs">
- <cp:select><out:text><xsl:value-of select="@select"/></out:text></cp:select>
- <cp:tab name="general" position="start">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_general.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_general.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <!--
- I could just copy all of the attributes specified on the df:propertiesTabs tag but
- not sure if that would produce undesirable side effects.
- -->
- <cp:label><xts:string id="IDS_PROP_TAB_GENERAL"/></cp:label>
- </a>
- </cp:tab>
-
- <out:variable name="df_tabcnt">
- <out:choose>
- <out:when test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:choose>
- <out:when test="$df_hasTraverse = 'true' or $df_hasTraverse=''"><out:value-of select="count($ui-obj-tab/tab)"/></out:when>
- <out:otherwise><out:value-of select="count($ui-obj-tab/tab[not(@needTraverse='T')])"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- only show these property pages if the user has read permission or if the tab needs traverse and the user has traverse -->
- <out:if test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:variable name="anonymousObj" select="/root/env/param[@name='m_obj'] = 'CAMID("::Anonymous")'"/>
- <out:for-each select="$ui-obj-tab/tab[not(@needTraverse='T') or (@needTraverse='T' and ($df_hasTraverse = 'true' or $df_hasTraverse=''))]">
- <out:variable name="requiredCondition" select="condition"/>
- <out:variable name="conditionMet">
- <out:for-each select="$requiredCondition">
- <out:if test="@type='session'">
- <out:variable name="name" select="@name"/>
- <out:value-of select="/root/session/param[@name=$name]=@value"/>
- </out:if>
- </out:for-each>
- </out:variable>
- <out:variable name="requiredCapability" select="@requiredCapability"/>
- <out:variable name="hasCapability" select="string($requiredCapability) = '' or boolean(/root/session/param[@name='capabilities']/*[local-name()=$requiredCapability])"/>
- <out:if test="$hasCapability and (not(contains($conditionMet,'false'))) and ((not($anonymousObj or starts-with(/root/env/param[@name='m_obj'],'/configuration/account'))) or @name != 'personal')">
- <out:variable name="tabName">
- <out:choose>
- <out:when test="@isClassTab='T'">
- <out:value-of select="/root/objectClass/class[@name= string(/root/env/param[@name='m_class'])]"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="."/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="(((position() = last() or ($anonymousObj and @name='preferences')) and $df_hasUserProfile != 'false') or (@name='personal' and $df_hasUserProfile = 'false')) and $df_hasSetPolicy = 'false'">
- <cp:tab name="@name" var-name="true" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:when>
- <out:when test="@name='preferences' or @name='mypages'">
- <out:if test="$df_hasUserProfile != 'false'">
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:if>
- </out:when>
- <out:otherwise>
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:for-each>
- </out:if>
-
- <out:variable name="df_hasCapabilityPolicy" select="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $userCanUseOC"/>
- <out:choose>
- <out:when test="($df_hasSetPolicy = 'true' or $df_hasSetPolicy='')">
- <out:choose>
- <out:when test="$df_hasCapabilityPolicy">
- <cp:tab name="privileges">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_privileges.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_privileges.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <cp:label><xts:string id="IDS_PROP_TAB_PRIVILEGES"/></cp:label>
- </a>
- </cp:tab>
- <cp:tab name="capabilities" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_capabilities.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_capabilities.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <cp:label><xts:string id="IDS_PROP_TAB_CAPABILITIES"/></cp:label>
- </a>
- </cp:tab>
- </out:when>
- <out:otherwise>
- <cp:tab name="privileges" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_privileges.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_privileges.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <cp:label><xts:string id="IDS_PROP_TAB_PRIVILEGES"/></cp:label>
- </a>
- </cp:tab>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <!-- diddle with the right-hand bar that completes the property tab -->
- <out:if test="$df_outtabend='false' and $df_tabcnt=0"><cp:tabend/></out:if>
- </out:otherwise>
- </out:choose>
- <xsl:apply-templates select="cp:description"/>
- </cp:tabset>
- </xsl:template>
- <xsl:template match="df:propertiesTabsTitanPagelet">
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <xsl:variable name="onClickScript" select="@onclick | @onClick"/>
- <xsl:variable name="hasJSStart" select="starts-with(string($onClickScript),'java')"/>
- <script language="javascript">
-
- function submitForm(sTarget, bSkipValidate)
- {
- if (bSkipValidate == null) {
- bSkipValidate = false;
- }
- var bValidate = true;
- <!--If we are not to skip validation and there is something to validate on the container page then do the validation ..-->
- <![CDATA[
- if (window.validate && !bSkipValidate) {
- bValidate = validate();
- }
- ]]>
- if (bValidate)
- {
- document.pform.m.value = "<out:value-of select="$app"/>" + "/" + sTarget;
- document.pform.m_class.value = "<out:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_class']))"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }
- }
-
- </script>
-
- <!-- the tabset requires the df_tab_selected variable to be defined >
- <out:variable name="df_tab_selected"><xsl:value-of select="@select"/></out:variable-->
- <out:variable name="df_hasSetPolicy">
- <xsl:if test="df:hasSetPolicy">
- <xsl:copy-of select="df:hasSetPolicy/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasRead">
- <xsl:if test="df:hasRead">
- <xsl:copy-of select="df:hasRead/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasTraverse">
- <xsl:if test="df:hasTraverse">
- <xsl:copy-of select="df:hasTraverse/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_outtabend">
- <xsl:choose>
- <xsl:when test="@select='general'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="df_hasUserProfile">
- <xsl:if test="df:hasUserProfile">
- <xsl:copy-of select="df:hasUserProfile/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="userInterfaces" select="/root//cm:queryResponse//cm:package/cm:userInterfaces/cm:uiComponentEnum"/>
- <out:variable name="objLaunchableType" select="/root//cm:queryResponse//cm:launchable/cm:launchableType"/>
-
- <out:variable name="effectiveUserCapabilities">
- <out:call-template name="calEffectiveObjectCapabilities">
- <out:with-param name="capabilities" select="/root//cm:queryResponse/*/cm:effectiveUserCapabilities | /root//cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
- </out:call-template>
- </out:variable>
- <out:variable name="tabObj" select="key('ui-object-properties', /root/env/param[@name='m_class'])"/>
- <out:variable name="ui-obj-tab" select="key('ui-object-properties', /root/env/param[@name='m_class'])[not(@userInterface) or @userInterface=$userInterfaces][not(@launchableType) or @launchableType=$objLaunchableType]"/>
- <!-- these are the properties tabs -->
- <cp:tabset id="maintabs">
- <cp:select><out:text><xsl:value-of select="@select"/></out:text></cp:select>
-
- <out:variable name="df_tabcnt">
- <out:choose>
- <out:when test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:choose>
- <out:when test="$df_hasTraverse = 'true' or $df_hasTraverse=''"><out:value-of select="count($ui-obj-tab/tab)"/></out:when>
- <out:otherwise><out:value-of select="count($ui-obj-tab/tab[not(@needTraverse='T')])"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- only show these property pages if the user has read permission or if the tab needs traverse and the user has traverse -->
- <out:if test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:variable name="anonymousObj" select="/root/env/param[@name='m_obj'] = 'CAMID("::Anonymous")'"/>
- <out:for-each select="$ui-obj-tab/tab[not(@needTraverse='T') or (@needTraverse='T' and ($df_hasTraverse = 'true' or $df_hasTraverse=''))]">
- <out:variable name="requiredCondition" select="condition"/>
- <out:variable name="conditionMet">
- <out:for-each select="$requiredCondition">
- <out:if test="@type='session'">
- <out:variable name="name" select="@name"/>
- <out:value-of select="/root/session/param[@name=$name]=@value"/>
- </out:if>
- </out:for-each>
- </out:variable>
- <out:variable name="requiredCapability" select="@requiredCapability"/>
- <out:variable name="hasCapability" select="string($requiredCapability) = '' or boolean(/root/session/param[@name='capabilities']/*[local-name()=$requiredCapability])"/>
- <out:if test="$hasCapability and (not(contains($conditionMet,'false'))) and ((not($anonymousObj or starts-with(/root/env/param[@name='m_obj'],'/configuration/account'))) or @name != 'personal')">
- <out:variable name="tabName">
- <out:choose>
- <out:when test="@isClassTab='T'">
- <out:value-of select="/root/objectClass/class[@name= string(/root/env/param[@name='m_class'])]"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="."/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="(((position() = last() or ($anonymousObj and @name='preferences')) and $df_hasUserProfile != 'false') or (@name='personal' and $df_hasUserProfile = 'false')) and $df_hasSetPolicy = 'false'">
- <cp:tab name="@name" var-name="true" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:when>
- <out:when test="@name='preferences' or @name='mypages'">
- <out:if test="$df_hasUserProfile != 'false'">
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:if>
- </out:when>
- <out:otherwise>
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:for-each>
- </out:if>
-
- <out:variable name="df_hasCapabilityPolicy" select="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $userCanUseOC"/>
- <!-- diddle with the right-hand bar that completes the property tab -->
- <out:if test="$df_outtabend='false' and $df_tabcnt=0"><cp:tabend/></out:if>
- <xsl:apply-templates select="cp:description"/>
- </cp:tabset>
- </xsl:template>
- <xsl:template match="df:propertiesTabsJobsTitan">
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <xsl:variable name="onClickScript" select="@onclick | @onClick"/>
- <xsl:variable name="hasJSStart" select="starts-with(string($onClickScript),'java')"/>
- <script language="javascript">
-
- function submitForm(sTarget, bSkipValidate)
- {
- if (bSkipValidate == null) {
- bSkipValidate = false;
- }
- var bValidate = true;
- <!--If we are not to skip validation and there is something to validate on the container page then do the validation ..-->
- <![CDATA[
- if (window.validate && !bSkipValidate) {
- bValidate = validate();
- }
- ]]>
- if (bValidate)
- {
- document.pform.m.value = "<out:value-of select="$app"/>" + "/" + sTarget;
- document.pform.m_class.value = "<out:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_class']))"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }
- }
-
- </script>
-
- <!-- the tabset requires the df_tab_selected variable to be defined >
- <out:variable name="df_tab_selected"><xsl:value-of select="@select"/></out:variable-->
- <out:variable name="df_hasSetPolicy">
- <xsl:if test="df:hasSetPolicy">
- <xsl:copy-of select="df:hasSetPolicy/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasRead">
- <xsl:if test="df:hasRead">
- <xsl:copy-of select="df:hasRead/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasTraverse">
- <xsl:if test="df:hasTraverse">
- <xsl:copy-of select="df:hasTraverse/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_outtabend">
- <xsl:choose>
- <xsl:when test="@select='general'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="df_hasUserProfile">
- <xsl:if test="df:hasUserProfile">
- <xsl:copy-of select="df:hasUserProfile/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="userInterfaces" select="/root//cm:queryResponse//cm:package/cm:userInterfaces/cm:uiComponentEnum"/>
- <out:variable name="objLaunchableType" select="/root//cm:queryResponse//cm:launchable/cm:launchableType"/>
-
- <out:variable name="effectiveUserCapabilities">
- <out:call-template name="calEffectiveObjectCapabilities">
- <out:with-param name="capabilities" select="/root//cm:queryResponse/*/cm:effectiveUserCapabilities | /root//cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
- </out:call-template>
- </out:variable>
- <out:variable name="tabObj" select="key('ui-object-properties', /root/env/param[@name='m_class'])"/>
- <out:variable name="ui-obj-tab" select="key('ui-object-properties', /root/env/param[@name='m_class'])[not(@userInterface) or @userInterface=$userInterfaces][not(@launchableType) or @launchableType=$objLaunchableType]"/>
- <!-- these are the properties tabs -->
- <cp:tabset id="maintabs">
- <cp:select><out:text><xsl:value-of select="@select"/></out:text></cp:select>
-
- <out:variable name="df_tabcnt">
- <out:choose>
- <out:when test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:choose>
- <out:when test="$df_hasTraverse = 'true' or $df_hasTraverse=''"><out:value-of select="count($ui-obj-tab/tab)"/></out:when>
- <out:otherwise><out:value-of select="count($ui-obj-tab/tab[not(@needTraverse='T')])"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- only show these property pages if the user has read permission or if the tab needs traverse and the user has traverse -->
- <out:if test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:variable name="anonymousObj" select="/root/env/param[@name='m_obj'] = 'CAMID("::Anonymous")'"/>
- <out:for-each select="$ui-obj-tab/tab[not(@needTraverse='T') or (@needTraverse='T' and ($df_hasTraverse = 'true' or $df_hasTraverse=''))]">
- <out:variable name="requiredCondition" select="condition"/>
- <out:variable name="conditionMet">
- <out:for-each select="$requiredCondition">
- <out:if test="@type='session'">
- <out:variable name="name" select="@name"/>
- <out:value-of select="/root/session/param[@name=$name]=@value"/>
- </out:if>
- </out:for-each>
- </out:variable>
- <out:variable name="requiredCapability" select="@requiredCapability"/>
- <out:variable name="hasCapability" select="string($requiredCapability) = '' or boolean(/root/session/param[@name='capabilities']/*[local-name()=$requiredCapability])"/>
- <out:if test="$hasCapability and (not(contains($conditionMet,'false'))) and ((not($anonymousObj or starts-with(/root/env/param[@name='m_obj'],'/configuration/account'))) or @name != 'personal')">
- <out:variable name="tabName">
- <out:choose>
- <out:when test="@isClassTab='T'">
- <out:value-of select="/root/objectClass/class[@name= string(/root/env/param[@name='m_class'])]"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="."/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="(((position() = last() or ($anonymousObj and @name='preferences')) and $df_hasUserProfile != 'false') or (@name='personal' and $df_hasUserProfile = 'false')) and $df_hasSetPolicy = 'false'">
- <cp:tab name="@name" var-name="true" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:when>
- <out:when test="@name='preferences' or @name='mypages'">
- <out:if test="$df_hasUserProfile != 'false'">
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:if>
- </out:when>
- <out:otherwise>
- <cp:tab name="@name" var-name="true">
- <a>
- <xsl:attribute name="href">
- <xsl:text/>javascript:submitForm('{@page}')<xsl:text/>
- </xsl:attribute>
- <xsl:if test="@onclick">
- <xsl:attribute name="onclick">
- <xsl:value-of select="@onclick"/>
- </xsl:attribute>
- </xsl:if>
- <cp:label><out:value-of select="$tabName"/></cp:label>
- </a>
- </cp:tab>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:for-each>
- </out:if>
-
- <out:variable name="df_hasCapabilityPolicy" select="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $userCanUseOC"/>
- <xsl:apply-templates select="cp:description"/>
- </cp:tabset>
- </xsl:template>
- <xsl:template match="df:propertiesTabsCapabilitiesTitan">
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <xsl:variable name="onClickScript" select="@onclick | @onClick"/>
- <xsl:variable name="hasJSStart" select="starts-with(string($onClickScript),'java')"/>
- <script language="javascript">
-
- function submitForm(sTarget, bSkipValidate)
- {
- if (bSkipValidate == null) {
- bSkipValidate = false;
- }
- var bValidate = true;
- <!--If we are not to skip validation and there is something to validate on the container page then do the validation ..-->
- <![CDATA[
- if (window.validate && !bSkipValidate) {
- bValidate = validate();
- }
- ]]>
- if (bValidate)
- {
- document.pform.m.value = "<out:value-of select="$app"/>" + "/" + sTarget;
- document.pform.m_class.value = "<out:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_class']))"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }
- }
-
- </script>
-
- <!-- the tabset requires the df_tab_selected variable to be defined >
- <out:variable name="df_tab_selected"><xsl:value-of select="@select"/></out:variable-->
- <out:variable name="df_hasSetPolicy">
- <xsl:if test="df:hasSetPolicy">
- <xsl:copy-of select="df:hasSetPolicy/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasRead">
- <xsl:if test="df:hasRead">
- <xsl:copy-of select="df:hasRead/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasTraverse">
- <xsl:if test="df:hasTraverse">
- <xsl:copy-of select="df:hasTraverse/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_outtabend">
- <xsl:choose>
- <xsl:when test="@select='general'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="df_hasUserProfile">
- <xsl:if test="df:hasUserProfile">
- <xsl:copy-of select="df:hasUserProfile/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="userInterfaces" select="/root//cm:queryResponse//cm:package/cm:userInterfaces/cm:uiComponentEnum"/>
- <out:variable name="objLaunchableType" select="/root//cm:queryResponse//cm:launchable/cm:launchableType"/>
-
- <out:variable name="effectiveUserCapabilities">
- <out:call-template name="calEffectiveObjectCapabilities">
- <out:with-param name="capabilities" select="/root//cm:queryResponse/*/cm:effectiveUserCapabilities | /root//cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
- </out:call-template>
- </out:variable>
- <out:variable name="tabObj" select="key('ui-object-properties', /root/env/param[@name='m_class'])"/>
- <out:variable name="ui-obj-tab" select="key('ui-object-properties', /root/env/param[@name='m_class'])[not(@userInterface) or @userInterface=$userInterfaces][not(@launchableType) or @launchableType=$objLaunchableType]"/>
- <!-- these are the properties tabs -->
- <cp:tabset id="maintabs">
- <cp:select><out:text><xsl:value-of select="@select"/></out:text></cp:select>
-
- <out:variable name="df_tabcnt">
- <out:choose>
- <out:when test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:choose>
- <out:when test="$df_hasTraverse = 'true' or $df_hasTraverse=''"><out:value-of select="count($ui-obj-tab/tab)"/></out:when>
- <out:otherwise><out:value-of select="count($ui-obj-tab/tab[not(@needTraverse='T')])"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
-
-
- <out:variable name="df_hasCapabilityPolicy" select="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $userCanUseOC"/>
- <out:choose>
- <out:when test="($df_hasSetPolicy = 'true' or $df_hasSetPolicy='')">
- <out:choose>
- <out:when test="$df_hasCapabilityPolicy">
- <cp:tab name="capabilities" position="end">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_capabilities.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_capabilities.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <cp:label><xts:string id="IDS_PROP_TAB_CAPABILITIES"/></cp:label>
- </a>
- </cp:tab>
- </out:when>
- <out:otherwise>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <!-- diddle with the right-hand bar that completes the property tab -->
- <out:if test="$df_outtabend='false' and $df_tabcnt=0"><cp:tabend/></out:if>
- </out:otherwise>
- </out:choose>
- <xsl:apply-templates select="cp:description"/>
- </cp:tabset>
- </xsl:template>
- <xsl:template match="df:propertiesTabsTitan">
- <xsl:variable name="df-kbA11y"><xsl:value-of select="string(@df:kbA11y)"/></xsl:variable>
- <xsl:variable name="onClickScript" select="@onclick | @onClick"/>
- <xsl:variable name="hasJSStart" select="starts-with(string($onClickScript),'java')"/>
- <script language="javascript">
-
- function submitForm(sTarget, bSkipValidate)
- {
- if (bSkipValidate == null) {
- bSkipValidate = false;
- }
- var bValidate = true;
- <!--If we are not to skip validation and there is something to validate on the container page then do the validation ..-->
- <![CDATA[
- if (window.validate && !bSkipValidate) {
- bValidate = validate();
- }
- ]]>
- if (bValidate)
- {
- document.pform.m.value = "<out:value-of select="$app"/>" + "/" + sTarget;
- document.pform.m_class.value = "<out:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='m_class']))"/>";
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }
- }
-
- </script>
-
- <!-- the tabset requires the df_tab_selected variable to be defined >
- <out:variable name="df_tab_selected"><xsl:value-of select="@select"/></out:variable-->
- <out:variable name="df_hasSetPolicy">
- <xsl:if test="df:hasSetPolicy">
- <xsl:copy-of select="df:hasSetPolicy/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasRead">
- <xsl:if test="df:hasRead">
- <xsl:copy-of select="df:hasRead/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_hasTraverse">
- <xsl:if test="df:hasTraverse">
- <xsl:copy-of select="df:hasTraverse/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="df_outtabend">
- <xsl:choose>
- <xsl:when test="@select='general'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="df_hasUserProfile">
- <xsl:if test="df:hasUserProfile">
- <xsl:copy-of select="df:hasUserProfile/node()"/>
- </xsl:if>
- </out:variable>
- <out:variable name="userInterfaces" select="/root//cm:queryResponse//cm:package/cm:userInterfaces/cm:uiComponentEnum"/>
- <out:variable name="objLaunchableType" select="/root//cm:queryResponse//cm:launchable/cm:launchableType"/>
-
- <out:variable name="effectiveUserCapabilities">
- <out:call-template name="calEffectiveObjectCapabilities">
- <out:with-param name="capabilities" select="/root//cm:queryResponse/*/cm:effectiveUserCapabilities | /root//cm:queryResponse/*/*/*/cm:effectiveUserCapabilities"/>
- </out:call-template>
- </out:variable>
- <out:variable name="tabObj" select="key('ui-object-properties', /root/env/param[@name='m_class'])"/>
- <out:variable name="ui-obj-tab" select="key('ui-object-properties', /root/env/param[@name='m_class'])[not(@userInterface) or @userInterface=$userInterfaces][not(@launchableType) or @launchableType=$objLaunchableType]"/>
- <!-- these are the properties tabs -->
- <cp:tabset id="maintabs">
- <cp:select><out:text><xsl:value-of select="@select"/></out:text></cp:select>
- <cp:tab name="general" position="start">
- <a>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'">#</xsl:when>
- <xsl:otherwise>javascript:submitForm('properties_general.xts')</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$onClickScript or $df-kbA11y='true'">
- <xsl:attribute name="onclick">
- <xsl:choose>
- <xsl:when test="$df-kbA11y='true'"><xsl:if test="not($hasJSStart)">javascript:</xsl:if><xsl:if test="$onClickScript != ''"><xsl:value-of select="$onClickScript"/>;</xsl:if>submitForm('properties_general.xts');</xsl:when>
- <xsl:otherwise><xsl:value-of select="$onClickScript"/></xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:if test="$df-kbA11y='true'">
- <out:attribute name="onkeypress">javascript:if( event.keyCode==13 || event.keyCode==32 || event.charCode==32 )<xsl:text>{</xsl:text>this.onclick(); return false;<xsl:text>}</xsl:text> return true;</out:attribute>
- </xsl:if>
- </xsl:if>
- <!--
- I could just copy all of the attributes specified on the df:propertiesTabs tag but
- not sure if that would produce undesirable side effects.
- -->
- <cp:label><xts:string id="IDS_PROP_TAB_GENERAL"/></cp:label>
- </a>
- </cp:tab>
-
- <out:variable name="df_tabcnt">
- <out:choose>
- <out:when test="$df_hasRead = 'true' or $df_hasRead=''">
- <out:choose>
- <out:when test="$df_hasTraverse = 'true' or $df_hasTraverse=''"><out:value-of select="count($ui-obj-tab/tab)"/></out:when>
- <out:otherwise><out:value-of select="count($ui-obj-tab/tab[not(@needTraverse='T')])"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="df_hasCapabilityPolicy" select="contains(' package content folder ', concat(' ', /root/env/param[@name='m_class'], ' ')) and $userCanUseOC"/>
-
- <xsl:apply-templates select="cp:description"/>
- </cp:tabset>
- </xsl:template>
-
- <!--
- df:personalizeTabs - this will display the tabs for the personalize section
- -->
- <xsl:template match="df:personalizeTabs">
- <cp:tabset>
- <cp:select><xsl:value-of select="@select"/></cp:select>
- <cp:tab name="general" position="start">
- <utml:a utml:validate="true">
- <utml:target>
- <out:value-of select="$app"/>/preferences/general.xts<out:text/>
- </utml:target>
- <cp:label><xts:string id="IDS_PROP_TAB_GENERAL"/></cp:label>
- </utml:a>
- </cp:tab>
-
- <!-- These tabs are not supported for users that do not have write access to the account object -->
- <out:choose>
- <out:when test="(contains(/root/cm:queryResponse/cm:queryReply/cm:account/cm:permissions,'write') or ($isNamedAccountReadOnly))">
- <cp:tab name="personal">
- <utml:a utml:validate="true">
- <utml:target>
- <out:value-of select="$app"/>/preferences/personal.xts<out:text/>
- </utml:target>
- <cp:label><xts:string id="IDS_PERS_TAB_PERSONAL"/></cp:label>
- </utml:a>
- </cp:tab>
- <cp:tab name="mypages" position="end">
- <utml:a utml:validate="true">
- <utml:target>
- <out:value-of select="$app"/>/preferences/mypages.xts<out:text/>
- </utml:target>
- <cp:label><xts:string id="IDS_PERS_TAB_MYPAGES"/></cp:label>
- </utml:a>
- </cp:tab>
- </out:when>
- <!-- generate a dummy tab to force the the tab-rendering control to close the general tab -->
- <out:otherwise>
- <cp:tab name="dummy" position="end"/>
- </out:otherwise>
- </out:choose>
-
- </cp:tabset>
- </xsl:template>
-
-
- <!-- the main engine -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|