presentation.xsl 134 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0"
  9. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  10. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  11. xmlns:out="dummy-uri"
  12. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  13. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  14. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  15. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  16. exclude-result-prefixes="xsl cp xts xtsext cm utml">
  17. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  18. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  19. <!--
  20. This stylesheet (presentation.xsl) consists of the following templates:
  21. cp:dynamicSectionTop
  22. cp:columnContent
  23. cp:columnHeader
  24. cp:columnFooter
  25. cp:columnHeaderToggleSet
  26. cp:label
  27. cp:pathText
  28. cp:pathSeperator
  29. cp:pathLeafNode
  30. cp:pathLink
  31. cp:pathSeparator
  32. cp:sortListDisplay
  33. cp:tab
  34. cp:select
  35. cp:tabend
  36. cp:table
  37. cp:tabset
  38. cp:dialog
  39. cp:flyoutControl
  40. cp:renderPushButton
  41. cp:toolbarControl
  42. cp:tabControl
  43. cp:colourSelectionDialog
  44. -->
  45. <!-- ====================================================================================== -->
  46. <!-- Path Control - Used by cf:expandingSection -->
  47. <!-- Generic wrapers used to style path control elements. -->
  48. <xsl:template match="cp:pathText"><xsl:apply-templates/></xsl:template>
  49. <xsl:template match="cp:pathTextSeparator"> <xsl:text> </xsl:text><xsl:apply-templates/><xsl:text> </xsl:text></xsl:template>
  50. <xsl:template match="cp:pathLeafNode"><span class="pathLeafNode"><xsl:apply-templates/></span></xsl:template>
  51. <xsl:template match="cp:pathLink"><span class="pathLink"><xsl:apply-templates/></span></xsl:template>
  52. <xsl:template match="cp:pathSeparator"><span class="pathSeparator"> <xsl:text> </xsl:text><xsl:apply-templates/><xsl:text> </xsl:text></span></xsl:template>
  53. <!-- ====================================================================================== -->
  54. <!-- Expanding Section Control - Used by cf:dynamicExpandingSection -->
  55. <!--
  56. Template - cp:dynamicSectionTop:
  57. Attributes:
  58. @indent - if the section is to be indented.
  59. @title - the title of the section.
  60. @name - the name of the expanding section.
  61. @onclick - execution when onclick event fired.
  62. -->
  63. <xsl:template match="cp:dynamicSectionTop">
  64. <table border="0" cellpadding="0" cellspacing="0" style="padding-bottom:5px; padding-top:5px;">
  65. <tr>
  66. <td>
  67. <xsl:variable name="expanded">
  68. <xsl:choose>
  69. <xsl:when test="@visible = 'true'">true</xsl:when>
  70. <xsl:otherwise>false</xsl:otherwise>
  71. </xsl:choose>
  72. </xsl:variable>
  73. <a id="{@name}_control" onkeypress="javascript:if(event.keyCode==9) return true; toggleDynamicSection('{@name}');{@onclick}" onclick="javascript:toggleDynamicSection('{@name}');{@onclick}" href="#" role="button" aria-controls="{@name}">
  74. <xsl:if test="@longDescription">
  75. <xsl:attribute name="aria-labelledby">
  76. <xsl:value-of select="@longDescription"/>
  77. </xsl:attribute>
  78. </xsl:if>
  79. <xsl:if test="@role">
  80. <xsl:attribute name="role">
  81. <xsl:value-of select="@role"/>
  82. </xsl:attribute>
  83. </xsl:if>
  84. <div nowrap="nowrap" role="group" aria-labelledby="{@name}_title">
  85. <xsl:if test="@title">
  86. <span style="vertical-align: top; white-space: nowrap" class="formLink" id="{@name}_title">
  87. <xsl:if test="not(@indent) or (@indent='yes')">
  88. <xsl:attribute name="style">padding-left:12px;</xsl:attribute>
  89. </xsl:if>
  90. <xts:string id="{@title}"/>
  91. </span>
  92. </xsl:if>
  93. <span style="padding:left:3px; vertical-align: middle;">
  94. <img style="position: relative; top: -8px" name="img{@name}" id="img{@name}" border="0">
  95. <xsl:choose>
  96. <xsl:when test="@visible = 'true'">
  97. <out:attribute name="src"><out:value-of select="$skin_images"/>prompt_option_collapse.gif</out:attribute>
  98. <out:attribute name="alt"><xts:string id="IDS_SECTION_COLLAPSE"/></out:attribute>
  99. </xsl:when>
  100. <xsl:otherwise>
  101. <out:attribute name="src"><out:value-of select="$skin_images"/>prompt_option_expand.gif</out:attribute>
  102. <out:attribute name="alt"><xts:string id="IDS_SECTION_EXPAND"/></out:attribute>
  103. </xsl:otherwise>
  104. </xsl:choose>
  105. </img>
  106. </span>
  107. </div>
  108. </a>
  109. </td>
  110. </tr>
  111. </table>
  112. </xsl:template>
  113. <!--
  114. Template - cp:sortListDisplay:
  115. Render sortListDisplay entry.
  116. Operation:
  117. Applies the templates for cp:section1 and cp:section2 within this tag.
  118. -->
  119. <xsl:template match="cp:sortListDisplay">
  120. <table summary="" border="0" cellspacing="0" cellpadding="1" role="presentation">
  121. <tr>
  122. <td class="sortSelectContainer" nowrap="nowrap">
  123. <xsl:apply-templates select="cp:section1/child::node()"/>
  124. </td>
  125. <xsl:if test="cp:section3">
  126. <td valign="top">
  127. <xsl:apply-templates select="cp:section3/child::node()"/>
  128. </td>
  129. </xsl:if>
  130. </tr>
  131. <tr>
  132. <td class="formLink" nowrap="nowrap" >
  133. <out:attribute name="align">
  134. <out:choose>
  135. <out:when test="$is-ui-rtl"><out:value-of select="'left'"/></out:when>
  136. <out:otherwise><out:value-of select="'right'"/></out:otherwise>
  137. </out:choose>
  138. </out:attribute>
  139. <xsl:apply-templates select="cp:section2/child::node()"/>
  140. </td>
  141. <xsl:if test="cp:section3">
  142. <td/>
  143. </xsl:if>
  144. </tr>
  145. </table>
  146. </xsl:template>
  147. <xsl:template match="cp:fromTo">
  148. <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
  149. <tr valign="bottom">
  150. <td width="100%" align="left">
  151. <table summary="" role="presentation">
  152. <tr>
  153. <td>
  154. <xsl:choose>
  155. <xsl:when test="cp:breadcrumb">
  156. <xsl:attribute name="class">formLink</xsl:attribute>
  157. <xsl:attribute name="style">white-space:nowrap;padding-bottom:5px;padding-right:8px;</xsl:attribute>
  158. <xsl:copy-of select="cp:breadcrumb/child::node()"/>
  159. </xsl:when>
  160. <xsl:when test="cp:tableLabel">
  161. <xsl:attribute name="class">formLabel</xsl:attribute>
  162. <xsl:attribute name="style">white-space:nowrap;padding-bottom:5px;padding-right:8px;</xsl:attribute>
  163. <xsl:copy-of select="cp:tableLabel/child::node()"/>
  164. </xsl:when>
  165. </xsl:choose>
  166. </td>
  167. </tr>
  168. </table>
  169. </td>
  170. <td>
  171. <table summary="" role="presentation" cellpadding="0" cellspacing="0" style="padding:1px;height:20px;">
  172. <tr>
  173. <td class="formLabel" style="white-space:nowrap;padding-right:5px;"><xts:string id="IDS_ENTRIES"/></td>
  174. <td nowrap="nowrap"><xsl:apply-templates select="cp:collectCount/*"/></td>
  175. <td nowrap="nowrap" style="padding-right:8px;padding-left:2px;"><xsl:apply-templates select="cp:goToButton/*"/></td>
  176. <td nowrap="nowrap"><div style="height:13px;" class="rowDivider"/></td>
  177. <td nowrap="nowrap" style="padding-left:8px;"><xsl:apply-templates select="cp:buttons/*"/></td>
  178. </tr>
  179. </table>
  180. </td>
  181. </tr>
  182. </table>
  183. </xsl:template>
  184. <xsl:template match="cp:fromToBottom">
  185. <table summary="" border="0" cellpadding="0" cellspacing="0" width="100%">
  186. <tr valign="bottom">
  187. <out:attribute name="align">
  188. <out:choose>
  189. <out:when test="$is-ui-rtl"><out:value-of select="'left'"/></out:when>
  190. <out:otherwise><out:value-of select="'right'"/></out:otherwise>
  191. </out:choose>
  192. </out:attribute>
  193. <td>
  194. <table summary="" role="presentation" cellpadding="0" cellspacing="0" style="padding:1px;height:20px;">
  195. <tr>
  196. <td class="formText" style="white-space:nowrap;padding-right:5px;"><xts:string id="IDS_ENTRIES"/></td>
  197. <td nowrap="nowrap"><xsl:apply-templates select="cp:collectCountBottom/*"/></td>
  198. <td nowrap="nowrap" style="padding-right:8px;padding-left:2px;"><xsl:apply-templates select="cp:goToButton/*"/></td>
  199. <td nowrap="nowrap"><div style="height:13px;" class="rowDivider"/></td>
  200. <td nowrap="nowrap" style="padding-left:8px;"><xsl:apply-templates select="cp:buttonsBottom/*"/></td>
  201. </tr>
  202. </table>
  203. </td>
  204. </tr>
  205. </table>
  206. </xsl:template>
  207. <!-- ====================================================================================== -->
  208. <!-- Tab control -->
  209. <!--
  210. Template - cp:tabset:
  211. Template used to render a set of tabs.
  212. Attributes:
  213. @width - the tabset width.
  214. @inverted - the tabset is drawn upside down
  215. Operation:
  216. Renders UI for all tabs in the tab set.
  217. -->
  218. <xsl:template match="cp:tabset">
  219. <!-- define the inverted attributes - we can switch the direction of the tabset -->
  220. <xsl:variable name="inverted">
  221. <xsl:choose>
  222. <xsl:when test="@inverted">true</xsl:when>
  223. <xsl:otherwise>false </xsl:otherwise>
  224. </xsl:choose>
  225. </xsl:variable>
  226. <table class="mainHeader3" summary="" height="20" cellspacing="0" cellpadding="0" border="0" role="presentation">
  227. <xsl:attribute name="width">
  228. <xsl:choose>
  229. <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
  230. <xsl:otherwise>100%</xsl:otherwise>
  231. </xsl:choose>
  232. </xsl:attribute>
  233. <tr>
  234. <out:variable name="df_tab_selected"><xsl:copy-of select="cp:select/child::node()"/></out:variable>
  235. <!-- create the tabs-->
  236. <td valign="bottom" align="right">
  237. <table summary="" cellspacing="0" cellpadding="0" border="0" role="tablist">
  238. <xsl:if test="@id != ''">
  239. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  240. </xsl:if>
  241. <tr>
  242. <xsl:apply-templates/>
  243. </tr>
  244. </table>
  245. </td>
  246. <td width="100%">
  247. <xsl:attribute name="valign">
  248. <xsl:choose>
  249. <xsl:when test="$inverted = 'true'">top</xsl:when>
  250. <xsl:otherwise>bottom</xsl:otherwise>
  251. </xsl:choose>
  252. </xsl:attribute>
  253. <table summary="" border="0" height="1" width="100%" cellpadding="0" cellspacing="0" role="presentation">
  254. <xsl:attribute name="class">
  255. <xsl:choose>
  256. <xsl:when test="$inverted = 'true'">tabBorderInverted</xsl:when>
  257. <xsl:otherwise>tabBorder</xsl:otherwise>
  258. </xsl:choose>
  259. </xsl:attribute>
  260. <tr>
  261. <td>
  262. <img height="1" width="1" alt="">
  263. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  264. </img>
  265. </td>
  266. </tr>
  267. </table>
  268. </td>
  269. </tr>
  270. </table>
  271. </xsl:template>
  272. <!--
  273. Template - cp:tab:
  274. UI rendering of a tab.
  275. Attributes:
  276. @var-name - indicator to use the name unquoted.
  277. @name - the tab name
  278. @position - position in the set of tabs.
  279. Example:
  280. The General tab on the properties page.
  281. Operation:
  282. Render the appropriate lines to display a tab.
  283. -->
  284. <xsl:template match="cp:tab">
  285. <!-- define the inverted attributes - we can switch the direction of the tabset -->
  286. <xsl:variable name="inverted">
  287. <xsl:choose>
  288. <xsl:when test="ancestor::cp:tabset/@inverted">true</xsl:when>
  289. <xsl:otherwise>false</xsl:otherwise>
  290. </xsl:choose>
  291. </xsl:variable>
  292. <!-- define the size of the tabs - we can choose the min width -->
  293. <xsl:variable name="width">
  294. <xsl:choose>
  295. <xsl:when test="ancestor::cp:tabset/@tabwidth">
  296. <xsl:value-of select="ancestor::cp:tabset/@tabwidth"/>
  297. </xsl:when>
  298. <xsl:otherwise>
  299. <xsl:value-of select="'80'"/>
  300. </xsl:otherwise>
  301. </xsl:choose>
  302. </xsl:variable>
  303. <xsl:variable name="nm">
  304. <xsl:choose>
  305. <xsl:when test="@var-name = 'true'">string(<xsl:value-of select="@name"/>)</xsl:when>
  306. <xsl:otherwise>'<xsl:value-of select="@name"/>'</xsl:otherwise>
  307. </xsl:choose>
  308. </xsl:variable>
  309. <out:if test="not('{@position}' = 'start' and not({$nm} = $df_tab_selected))">
  310. <td width="1" height="1">
  311. <xsl:attribute name="class">
  312. <xsl:choose>
  313. <xsl:when test="$inverted = 'true'">tabBorderInverted</xsl:when>
  314. <xsl:otherwise>tabBorder</xsl:otherwise>
  315. </xsl:choose>
  316. </xsl:attribute>
  317. <img height="1" width="1" alt="">
  318. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  319. </img>
  320. </td>
  321. </out:if>
  322. <td height="20" width="{$width}" class="staticTabPadding">
  323. <table width="100%" height="20" cellspacing="0" cellpadding="0" border="0" summary="" role="presentation">
  324. <xsl:choose>
  325. <xsl:when test="$inverted = 'true'">
  326. <out:choose>
  327. <out:when test="$df_tab_selected = {$nm}">
  328. <out:attribute name="class">tabSelectedInverted</out:attribute>
  329. </out:when>
  330. <out:otherwise>
  331. <out:attribute name="class">tabNormalInverted</out:attribute>
  332. </out:otherwise>
  333. </out:choose>
  334. </xsl:when>
  335. <xsl:otherwise>
  336. <out:choose>
  337. <out:when test="$df_tab_selected = {$nm}">
  338. <out:attribute name="class">tabSelected</out:attribute>
  339. </out:when>
  340. <out:otherwise>
  341. <out:attribute name="class">tabNormal</out:attribute>
  342. </out:otherwise>
  343. </out:choose>
  344. </xsl:otherwise>
  345. </xsl:choose>
  346. <tr>
  347. <td height="18" nowrap="nowrap" align="center">
  348. <out:attribute name="class">
  349. <out:choose>
  350. <out:when test="$df_tab_selected = {$nm}">tabLabel</out:when>
  351. <out:otherwise>tabLink</out:otherwise>
  352. </out:choose>
  353. </out:attribute>
  354. <out:if test="$df_tab_selected = {$nm}">
  355. <out:attribute name="tabindex">0</out:attribute>
  356. <out:attribute name="role">tab</out:attribute>
  357. <out:attribute name="aria-selected">true</out:attribute>
  358. </out:if>
  359. <!-- create the tabs -->
  360. <out:choose>
  361. <out:when test="$df_tab_selected = {$nm}">
  362. <xsl:copy-of select="*[local-name() != 'a']"/>
  363. <xsl:copy-of select="descendant::cp:label/node()"/>
  364. </out:when>
  365. <out:otherwise>
  366. <out:if test="true()">
  367. <out:variable name="isTabSelected">
  368. <xsl:choose>
  369. <xsl:when test="$inverted = 'true'">
  370. <out:choose>
  371. <out:when test="$df_tab_selected = {$nm}">true</out:when>
  372. <out:otherwise>false</out:otherwise>
  373. </out:choose>
  374. </xsl:when>
  375. <xsl:otherwise>
  376. <out:choose>
  377. <out:when test="$df_tab_selected = {$nm}">true</out:when>
  378. <out:otherwise>false</out:otherwise>
  379. </out:choose>
  380. </xsl:otherwise>
  381. </xsl:choose>
  382. </out:variable>
  383. <xsl:choose>
  384. <xsl:when test=".//a"><xsl:apply-templates mode="tab"/></xsl:when>
  385. <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
  386. </xsl:choose>
  387. </out:if>
  388. </out:otherwise>
  389. </out:choose>
  390. </td>
  391. </tr>
  392. </table>
  393. </td>
  394. <out:if test="'{@position}' = 'end' and {$nm} = $df_tab_selected">
  395. <td width="1" height="1">
  396. <xsl:attribute name="class">
  397. <xsl:choose>
  398. <xsl:when test="$inverted = 'true'">tabBorderInverted</xsl:when>
  399. <xsl:otherwise>tabBorder</xsl:otherwise>
  400. </xsl:choose>
  401. </xsl:attribute>
  402. <img height="1" width="1" alt="">
  403. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  404. </img>
  405. </td>
  406. </out:if>
  407. </xsl:template>
  408. <xsl:template match="a" mode="tab">
  409. <a>
  410. <xsl:copy-of select="@*[local-name() != 'role']"/>
  411. <xsl:attribute name="role">tab</xsl:attribute>
  412. <xsl:attribute name="aria-selected">false</xsl:attribute>
  413. <xsl:apply-templates select="./*"/>
  414. </a>
  415. </xsl:template>
  416. <!--
  417. Template - cp:label:
  418. <cp:label> is used inside of a <cp:tab> control to wrap a static tab label.
  419. -->
  420. <xsl:template match="cp:label">
  421. <xsl:copy-of select="child::node()"/>
  422. </xsl:template>
  423. <!--
  424. Template - cp:select:
  425. Used by the tabset control to specify the selected tab.
  426. -->
  427. <xsl:template match="cp:select"/>
  428. <!--
  429. Template - cp:tabend:
  430. Render the closing bar on the last display tab, when selected.
  431. -->
  432. <xsl:template match="cp:tabend">
  433. <td width="1" height="1" class="tabBorder">
  434. <img height="1" width="1" alt="">
  435. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  436. </img>
  437. </td>
  438. </xsl:template>
  439. <!-- End of Tab control -->
  440. <!-- ====================================================================================== -->
  441. <!-- ====================================================================================== -->
  442. <!-- Table control -->
  443. <!--
  444. Template - cp:table:
  445. Render the table with one or more columns.
  446. Attributes:
  447. @name - the table name.
  448. @iterator - the object that is to be used for iteration
  449. @listSize - number of line in the table.
  450. @showControls - display the pager top, page-up, page-down, and bottom controls.
  451. @width - the table width.
  452. @role - a role to apply to the table
  453. Operation:
  454. Generates the list pager table.
  455. -->
  456. <xsl:template match="cp:table">
  457. <!-- this is the count of items in our list -->
  458. <out:variable name="cp_{@name}_count">
  459. <xsl:attribute name="select">
  460. <xsl:choose>
  461. <xsl:when test="@iterate">
  462. <xsl:value-of select="@iterate"/>
  463. </xsl:when>
  464. <xsl:otherwise>
  465. <xsl:value-of select="'NOTHING/NOTHING'"/>
  466. </xsl:otherwise>
  467. </xsl:choose>
  468. </xsl:attribute>
  469. </out:variable>
  470. <out:variable name="cp_{@name}_showEntries">
  471. <xsl:attribute name="select">
  472. <xsl:choose>
  473. <xsl:when test="string(@showEntries)!=''"><xsl:value-of select="@showEntries"/></xsl:when>
  474. <xsl:otherwise>'true'</xsl:otherwise>
  475. </xsl:choose>
  476. </xsl:attribute>
  477. </out:variable>
  478. <!-- the count of the columns -->
  479. <out:variable name="cp_{@name}_columnCount">
  480. <out:variable name="declaredColumnCount">
  481. <out:value-of select="{(count(cp:tableContent//cp:columnContent) * 2) - 1}"/>
  482. </out:variable>
  483. <out:variable name="columnConditionCount">
  484. <xsl:for-each select="cp:tableContent//cp:columnContent">
  485. <xsl:if test="cp:columnCondition">
  486. <out:variable name="cc{position()}">
  487. <xsl:copy-of select="cp:columnCondition"/>
  488. </out:variable>
  489. <out:if test="$cc{position()}!='true'">
  490. <out:value-of select="'.'"/>
  491. </out:if>
  492. </xsl:if>
  493. </xsl:for-each>
  494. </out:variable>
  495. <out:value-of select="$declaredColumnCount - (string-length($columnConditionCount) * 2)"/>
  496. </out:variable>
  497. <!-- the count of rows -->
  498. <out:variable name="cp_{@name}_rowCount" select="(count($cp_{@name}_count))"/>
  499. <out:variable name="cp_{@name}_listSize">
  500. <xsl:if test="@listSize"><out:value-of select="{@listSize}"/></xsl:if>
  501. </out:variable>
  502. <out:variable name="cp_{@name}_lastLine">
  503. <xsl:if test="@listSize"><out:value-of select="{@lastLine}"/></xsl:if>
  504. </out:variable>
  505. <out:variable name="cp_{@name}_displayItemCount">
  506. <xsl:if test="@displayItemCount"><out:value-of select="{@displayItemCount}"/></xsl:if>
  507. </out:variable>
  508. <out:variable name="cp_{@name}_requestNumberItems">
  509. <xsl:if test="@requestNumberItems"><out:value-of select="{@requestNumberItems}"/></xsl:if>
  510. </out:variable>
  511. <out:variable name="cp_{@name}_endLine">
  512. <xsl:if test="@endLine"><out:value-of select="{@endLine}"/></xsl:if>
  513. </out:variable>
  514. <out:variable name="cp_{@name}_startLine">
  515. <xsl:if test="@startLine"><out:value-of select="{@startLine}"/></xsl:if>
  516. </out:variable>
  517. <!--if non-virtual or not, virtual=true -->
  518. <out:variable name="cf_vname_{@name}">
  519. <xsl:if test="@vname"><xsl:value-of select="@vname"/></xsl:if>
  520. </out:variable>
  521. <!-- pager need special check to show bottom buttons -->
  522. <out:variable name="showBottom_{@name}">
  523. <out:variable name="fromPgr_{@name}">
  524. <out:choose>
  525. <out:when test="string(/root/env/param[@name='m_pagerfrom{@name}']) != '' ">
  526. <!-- in case pagerfrom is out of range -->
  527. <out:choose>
  528. <out:when test="/root/env/param[@name='m_pagerfrom{@name}'] &lt;= $cp_{@name}_rowCount">
  529. <out:value-of select="'true'"/>
  530. </out:when>
  531. <out:otherwise><out:value-of select="'false'"/></out:otherwise>
  532. </out:choose>
  533. </out:when>
  534. <out:otherwise><out:value-of select="'true'"/></out:otherwise>
  535. </out:choose>
  536. </out:variable>
  537. <out:choose>
  538. <out:when test="$cf_vname_{@name}='true'">
  539. <out:value-of select="'true'"/>
  540. </out:when>
  541. <out:otherwise>
  542. <out:choose>
  543. <out:when test="($cp_{@name}_endLine -$cp_{@name}_startLine +1) >= 26 and $fromPgr_{@name}='true'">
  544. <out:value-of select="'true'"/>
  545. </out:when>
  546. <out:otherwise><out:value-of select="'false'"/></out:otherwise>
  547. </out:choose>
  548. </out:otherwise>
  549. </out:choose>
  550. </out:variable>
  551. <!-- Determine if we are to show horizontal lines between pages rows -->
  552. <out:variable name="isGridControl_{@name}">
  553. <xsl:choose>
  554. <xsl:when test="cp:tableContent[@style='linedRows']">y</xsl:when>
  555. <xsl:otherwise>n</xsl:otherwise>
  556. </xsl:choose>
  557. </out:variable>
  558. <out:variable name="isForcedGridControl_{@name}">
  559. <xsl:choose>
  560. <xsl:when test="cp:tableContent[@forceGrid='true']">true</xsl:when>
  561. <xsl:otherwise>false</xsl:otherwise>
  562. </xsl:choose>
  563. </out:variable>
  564. <!-- these are the available text types in a cp:table -->
  565. <out:variable name="pWidth_{@name}">
  566. <xsl:choose>
  567. <xsl:when test="string(@width)!=''"><xsl:value-of select="@width"/></xsl:when>
  568. <xsl:otherwise>100%</xsl:otherwise>
  569. </xsl:choose>
  570. </out:variable>
  571. <table border="0" cellpadding="1" cellspacing="0" summary="" role="presentation">
  572. <out:attribute name="width"><out:value-of select="$pWidth_{@name}"/></out:attribute>
  573. <xsl:choose>
  574. <xsl:when test="cp:action">
  575. <!-- To determine whether or not bottom controls should be shown. Shown if the number of lines in the list is >= 26 -->
  576. <!-- The non-virtual pagers require more conditions: if adding items w/out using pager controls-->
  577. <out:if test="$showBottom_{@name}='true' and $cp_{@name}_displayItemCount &gt;= 26">
  578. <!-- 2nd part of this pertains more to non-virtual pagers -->
  579. <out:if test="($cp_{@name}_lastLine &gt;= $cp_{@name}_displayItemCount) or ($cp_{@name}_requestNumberItems=0 and $cp_{@name}_lastLine &lt; $cp_{@name}_displayItemCount and $cp_{@name}_lastLine &gt;= 26)">
  580. <tr>
  581. <xsl:if test="@showControls='true'">
  582. <td valign="top">
  583. <img height="1" width="1" alt="">
  584. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  585. </img>
  586. </td>
  587. </xsl:if>
  588. <td align="right" class="tabletext" colspan="2">
  589. <img height="1" width="10" alt="">
  590. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  591. </img>
  592. <xsl:for-each select="cp:action">
  593. <img height="1" width="10" alt="">
  594. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  595. </img>
  596. <xsl:apply-templates/>
  597. </xsl:for-each>
  598. </td>
  599. <xsl:if test="@showControls='true'">
  600. <td valign="top">
  601. <img height="1" width="1" alt="">
  602. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  603. </img>
  604. </td>
  605. </xsl:if>
  606. </tr>
  607. </out:if>
  608. </out:if>
  609. </xsl:when>
  610. <xsl:when test="cp:actionTop">
  611. <!-- To determine whether or not bottom controls should be shown. Shown if the number of lines in the list is >= 26 -->
  612. <!-- The non-virtual pagers require more conditions: if adding items w/out using pager controls-->
  613. <out:if test="$showBottom_{@name}='true' and $cp_{@name}_displayItemCount &gt;= 26">
  614. <!-- 2nd part of this pertains more to non-virtual pagers -->
  615. <out:if test="($cp_{@name}_lastLine &gt;= $cp_{@name}_displayItemCount) or ($cp_{@name}_requestNumberItems=0 and $cp_{@name}_lastLine &lt; $cp_{@name}_displayItemCount and $cp_{@name}_lastLine &gt;= 26)">
  616. <tr>
  617. <xsl:apply-templates select="cp:actionTop"/>
  618. </tr>
  619. </out:if>
  620. </out:if>
  621. </xsl:when>
  622. </xsl:choose>
  623. <xsl:if test="cp:fromTo">
  624. <tr align="right">
  625. <td colspan="2" width="100%" nowrap="nowrap">
  626. <xsl:apply-templates select="cp:fromTo"/>
  627. </td>
  628. </tr>
  629. </xsl:if>
  630. <tr>
  631. <td valign="top" width="100%" colspan="2">
  632. <xsl:if test="@showControls='true'">
  633. <out:attribute name="rowspan">2</out:attribute>
  634. </xsl:if>
  635. <div>
  636. <xsl:if test="@id != ''">
  637. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  638. </xsl:if>
  639. <xsl:if test="string(@is-scrolling) = 'true'">
  640. <out:choose>
  641. <out:when test="$browser='ie'">
  642. <out:attribute name="style">overflow:auto;width:100%;border:1px solid black</out:attribute>
  643. </out:when>
  644. <out:otherwise>
  645. <out:attribute name="style">border:1px solid black</out:attribute>
  646. </out:otherwise>
  647. </out:choose>
  648. </xsl:if>
  649. <xsl:if test="@role != ''">
  650. <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
  651. </xsl:if>
  652. <!-- Made this a true data table (for accessibility support) by not having role="presentation" and defining each column header as <th scope="col"> rather than <td>. -->
  653. <span style="position: absolute;margin-left: -9999px; margin-top: -9999px; " id="lbl_selectAll_deselectAll{@name}"><xts:string id="IDS_SELECT_DESELECT_ALL"/></span>
  654. <table width="100%" border="0" cellpadding="1" cellspacing="0">
  655. <xsl:if test="not(string(@is-scrolling) = 'true')">
  656. <xsl:attribute name="class">cctable</xsl:attribute>
  657. </xsl:if>
  658. <out:attribute name="summary">
  659. <xsl:variable name="summary">
  660. <xsl:copy-of select="cp:tableSummary/*"/>
  661. </xsl:variable>
  662. <xsl:choose>
  663. <xsl:when test="$summary != ''"><xsl:value-of select="$summary"/></xsl:when>
  664. <xsl:when test="count($summary/*) &gt;= 1"><xsl:copy-of select="cp:tableSummary/*"/></xsl:when>
  665. <xsl:otherwise><xsl:text>Content</xsl:text></xsl:otherwise>
  666. </xsl:choose>
  667. </out:attribute>
  668. <out:if test="/root/env/param[@name='md.callBack']">
  669. <out:attribute name="id">pgr</out:attribute>
  670. </out:if>
  671. <out:attribute name="cellpadding">
  672. <out:choose>
  673. <out:when test="$isGridControl_{@name} = 'y' or key('session-param', 'listViewSeparator') = 'line'">1</out:when>
  674. <out:otherwise>2</out:otherwise>
  675. </out:choose>
  676. </out:attribute>
  677. <thead id="{concat(string(@id),'Header')}" >
  678. <xsl:if test="cp:tableHeader">
  679. <tr class="tableHeader" >
  680. <xsl:if test="string(@is-scrolling) = 'true'">
  681. <out:if test="$browser = 'ie'">
  682. <out:attribute name="style">position:relative;top:expression(this.offsetParent.scrollTop);</out:attribute>
  683. </out:if>
  684. </xsl:if>
  685. <!-- for each column passed -->
  686. <xsl:apply-templates select="cp:tableHeader/*"/>
  687. <xsl:if test="string(@is-scrolling) = 'true'">
  688. <out:if test="$browser != 'ie'">
  689. <th scope="col">
  690. <img height="1px" width="18px" alt="">
  691. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  692. </img>
  693. </th>
  694. </out:if>
  695. </xsl:if>
  696. </tr>
  697. </xsl:if>
  698. </thead>
  699. <tbody>
  700. <xsl:if test="string(@is-scrolling) = 'true'">
  701. <xsl:attribute name="id"><xsl:value-of select="concat(string(@id),'Body')"/></xsl:attribute>
  702. <out:if test="$browser != 'ie'">
  703. <out:attribute name="style">overflow:auto</out:attribute>
  704. </out:if>
  705. </xsl:if>
  706. <out:variable name="cp_{@name}_table_content">
  707. <xsl:attribute name="select">
  708. <xsl:choose>
  709. <xsl:when test="@iterate">
  710. <xsl:value-of select="@iterate"/>
  711. </xsl:when>
  712. <xsl:otherwise>
  713. <xsl:value-of select="'//root'"/>
  714. </xsl:otherwise>
  715. </xsl:choose>
  716. </xsl:attribute>
  717. </out:variable>
  718. <out:variable name="tcTest_{@name}">
  719. <out:if test="(($isGridControl_{@name} = 'y' and key('session-param', 'listViewSeparator') = 'none') or key('session-param', 'listViewSeparator') = 'line')">true</out:if>
  720. </out:variable>
  721. <out:if test="string($cp_{@name}_showEntries)='true'">
  722. <out:for-each select="$cp_{@name}_table_content">
  723. <out:if test="$tcTest_{@name} != '' or ($isGridControl_{@name} = 'y' and $isForcedGridControl_{@name}='true')">
  724. <tr role="presentation" aria-hidden="true">
  725. <out:attribute name="style">height:1px</out:attribute> <!-- 189822 made the hack apply to all browsers. :Hack for Moz browser 1.x, to fix a problem with gaps between rows in a scrollable table -->
  726. <td class="rowDividerLine">
  727. <out:attribute name="colspan"><out:value-of select="$cp_{@name}_columnCount"/></out:attribute>
  728. <img height="1" width="1" alt="">
  729. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  730. </img>
  731. </td>
  732. </tr>
  733. </out:if>
  734. <xsl:for-each select="cp:tableContent">
  735. <xsl:apply-templates select="*[local-name() = 'common-render-variables']"/>
  736. <xsl:apply-templates select="*[local-name() != 'common-render-variables']"/>
  737. </xsl:for-each>
  738. </out:for-each>
  739. <tr role="presentation" aria-hidden="true"><td/></tr> <!-- 189822 made the hack apply to all browsers. Hack for Moz browser 1.x, to fix a problem with gaps between rows in a scrollable table -->
  740. </out:if>
  741. <out:if test="('{@showEmptyMsg}'='true' and $cp_{@name}_rowCount = 0) or ('{@showControls}'='true' and $cp_{@name}_showEntries='false') or ('{@showControls}'='true' and (not($cp_{@name}_listSize = 'small') or $cp_{@name}_rowCount = 0) and 2 > $cp_{@name}_rowCount)">
  742. <tr>
  743. <td valign="top" width="15">
  744. <out:attribute name="colspan"><out:value-of select="$cp_{@name}_columnCount"/></out:attribute>
  745. <img width="15" alt="">
  746. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  747. <out:choose>
  748. <out:when test="$cp_{@name}_showEntries='true' and $cp_{@name}_rowCount > 0">
  749. <out:attribute name="height"><out:value-of select="(2 - $cp_{@name}_rowCount) * 20"/></out:attribute>
  750. </out:when>
  751. <out:otherwise>
  752. <out:attribute name="height">40</out:attribute>
  753. </out:otherwise>
  754. </out:choose>
  755. </img>
  756. </td>
  757. </tr>
  758. </out:if>
  759. <out:if test="('{@showEmptyMsg}'='true' and $cp_{@name}_rowCount = 0) or ('{@showControls}'='true' and $cp_{@name}_showEntries!='true') or ('{@showControls}'='true' and (string($cp_{@name}_lastLine) = '0'))">
  760. <tr>
  761. <td valign="bottom" align="center" class="formText" width="100%">
  762. <out:attribute name="colspan"><out:value-of select="$cp_{@name}_columnCount"/></out:attribute>
  763. <out:choose>
  764. <out:when test="$cp_{@name}_showEntries!='true'">
  765. <xts:string id="IDS_END_OF_LIST"/>
  766. </out:when>
  767. <out:when test="'{@msgID}' != ''">
  768. <xts:string id="{@msgID}"/>
  769. </out:when>
  770. <out:otherwise>
  771. <xts:string id="IDS_NO_ITEMS_FOUND"/>
  772. </out:otherwise>
  773. </out:choose>
  774. </td>
  775. </tr>
  776. <tr>
  777. <td>
  778. <img width="15" alt="">
  779. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  780. <out:attribute name="colspan"><out:value-of select="$cp_{@name}_columnCount"/></out:attribute>
  781. <out:choose>
  782. <out:when test="$cp_{@name}_showEntries='true' and $cp_{@name}_rowCount > 0">
  783. <out:attribute name="height"><out:value-of select="(2 - $cp_{@name}_rowCount) * 20"/></out:attribute>
  784. </out:when>
  785. <out:otherwise>
  786. <out:attribute name="height">40</out:attribute>
  787. </out:otherwise>
  788. </out:choose>
  789. </img>
  790. </td>
  791. </tr>
  792. </out:if>
  793. </tbody>
  794. <tfoot>
  795. <xsl:if test="cp:tableFooter">
  796. <tr class="tableFooter">
  797. <!-- for each column passed -->
  798. <xsl:apply-templates select="cp:tableFooter/*"/>
  799. </tr>
  800. </xsl:if>
  801. </tfoot>
  802. </table>
  803. </div>
  804. </td>
  805. </tr>
  806. <xsl:if test="not(string(@is-scrolling) = 'true')">
  807. <tr>
  808. <td colspan="2">
  809. <img height="1" width="1" alt="">
  810. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  811. </img>
  812. </td>
  813. </tr>
  814. <xsl:if test="cp:fromToBottom">
  815. <!-- To determine whether or not bottom controls should be shown. Shown if the number of lines in the list is >= 26 -->
  816. <!-- The non-virtual pagers require more conditions: if adding items w/out using pager controls-->
  817. <out:if test="$showBottom_{@name}='true' and $cp_{@name}_displayItemCount &gt;= 26">
  818. <!-- 2nd part of this pertains more to non-virtual pagers -->
  819. <out:if test="($cp_{@name}_lastLine &gt;= $cp_{@name}_displayItemCount) or ($cp_{@name}_requestNumberItems=0 and $cp_{@name}_lastLine &lt; $cp_{@name}_displayItemCount and $cp_{@name}_lastLine &gt;= 26)">
  820. <tr align="right">
  821. <td colspan="2" width="100%" nowrap="nowrap">
  822. <xsl:apply-templates select="cp:fromToBottom"/>
  823. </td>
  824. </tr>
  825. </out:if>
  826. </out:if>
  827. </xsl:if>
  828. </xsl:if>
  829. <xsl:choose>
  830. <xsl:when test="cp:action">
  831. <tr>
  832. <td align="right" class="tabletext" colspan="2">
  833. <xsl:if test="@showControls='true'">
  834. <img height="1" width="1" alt="">
  835. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  836. </img>
  837. </xsl:if>
  838. <img height="1" width="10" alt="">
  839. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  840. </img>
  841. <xsl:for-each select="cp:action">
  842. <img height="1" width="10" alt="">
  843. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  844. </img>
  845. <xsl:apply-templates/>
  846. </xsl:for-each>
  847. <xsl:if test="@showControls='true'">
  848. <img height="1" width="1" alt="">
  849. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  850. </img>
  851. </xsl:if>
  852. </td>
  853. </tr>
  854. </xsl:when>
  855. <xsl:when test="cp:actionBottom">
  856. <tr>
  857. <xsl:apply-templates select="cp:actionBottom"/>
  858. </tr>
  859. </xsl:when>
  860. </xsl:choose>
  861. </table>
  862. </xsl:template>
  863. <xsl:template match="cp:actionTop">
  864. <!-- <td valign="top">
  865. <img height="1" width="1" alt="">
  866. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  867. </img>
  868. </td>
  869. <td align="right" class="tabletext" colspan="2">
  870. <img height="1" width="10" alt="">
  871. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  872. </img>
  873. <xsl:for-each select="cp:action">
  874. <img height="1" width="10" alt="">
  875. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  876. </img>
  877. <xsl:apply-templates/>
  878. </xsl:for-each>
  879. </td>
  880. <td valign="top">
  881. <img height="1" width="1" alt="">
  882. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  883. </img>
  884. </td>
  885. <td/>
  886. -->
  887. <td align="right" class="tabletext" colspan="2" nowrap="nowrap">
  888. <img height="1" width="10" alt="">
  889. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  890. </img>
  891. <xsl:for-each select="cp:action">
  892. <img height="1" width="10" alt=""><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
  893. <xsl:apply-templates/>
  894. </xsl:for-each>
  895. </td>
  896. <xsl:if test="@showControls='true'">
  897. <td valign="top">
  898. <img height="1" width="1" alt=""><xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute></img>
  899. </td>
  900. </xsl:if>
  901. <td/>
  902. </xsl:template>
  903. <xsl:template match="cp:actionBottom">
  904. <!-- <td valign="top">
  905. <img height="1" width="1" alt="">
  906. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  907. </img>
  908. </td>
  909. <td align="right" class="tabletext" colspan="2">
  910. <img height="1" width="10" alt="">
  911. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  912. </img>
  913. <xsl:for-each select="cp:action">
  914. <img height="1" width="10" alt="">
  915. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  916. </img>
  917. <xsl:apply-templates/>
  918. </xsl:for-each>
  919. </td>
  920. <td valign="top">
  921. <img height="1" width="1" alt="">
  922. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  923. </img>
  924. </td>
  925. <td/>
  926. -->
  927. <td align="right" class="tableText" colspan="2" nowrap="nowrap">
  928. <img height="1" width="10" alt="">
  929. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  930. </img>
  931. <xsl:for-each select="cp:action">
  932. <img height="1" width="10" alt="">
  933. <out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute>
  934. </img>
  935. <xsl:apply-templates/>
  936. </xsl:for-each>
  937. </td>
  938. <xsl:if test="@showControls='true'">
  939. <td valign="top">
  940. <img height="1" width="1" alt="">
  941. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  942. </img>
  943. </td>
  944. </xsl:if>
  945. <td/>
  946. </xsl:template>
  947. <!--
  948. Template - cp:common-render-variables:
  949. Defines xsl variables that belong to a given entry at a row scope
  950. -->
  951. <xsl:template match="cp:common-render-variables">
  952. <xsl:copy-of select="*"/>
  953. </xsl:template>
  954. <!--
  955. Template - cp:columnHeader:
  956. This template is used to render the column header for particular object contents (usually in the pager).
  957. Operation:
  958. Generate html for the columns header. Provides for column sorting where required:
  959. Default sorting - render two hollow triangles one right-side up and the other inverted.
  960. Ascended sorting - render a solid right-side up triangle.
  961. Descended sorting - render a solid inverted triangle.
  962. -->
  963. <xsl:template match="cp:columnHeader">
  964. <out:if test="true()">
  965. <out:variable name="columnCondition{position()}">
  966. <xsl:choose>
  967. <xsl:when test="cp:columnCondition"><xsl:copy-of select="cp:columnCondition"/></xsl:when>
  968. <xsl:otherwise><xsl:value-of select="true()"/></xsl:otherwise>
  969. </xsl:choose>
  970. </out:variable>
  971. <out:if test="$columnCondition{position()} = 'true'">
  972. <!-- Replaced <td> by <th> in order for tables that include such cp:columnHeader to be represented as true data tables for screen readers. Added onkeypress="keyEvent()" to address a Manual violation). -->
  973. <th height="10" class="tableTitle" align="left">
  974. <xsl:choose>
  975. <xsl:when test="@scope">
  976. <xsl:if test="@scope !=''">
  977. <xsl:attribute name="scope"><xsl:value-of select="@scope"/></xsl:attribute>
  978. </xsl:if>
  979. </xsl:when>
  980. <xsl:otherwise>
  981. <xsl:attribute name="scope">col</xsl:attribute>
  982. </xsl:otherwise>
  983. </xsl:choose>
  984. <xsl:if test="@tabindex != ''">
  985. <xsl:attribute name="tabindex"><xsl:value-of select="@tabindex"/></xsl:attribute>
  986. </xsl:if>
  987. <xsl:if test="@aria-labelledby">
  988. <xsl:attribute name="aria-labelledby">
  989. <xsl:value-of select="@aria-labelledby"/>
  990. </xsl:attribute>
  991. </xsl:if>
  992. <xsl:if test="@width">
  993. <xsl:attribute name="width">
  994. <xsl:value-of select="@width"/>
  995. </xsl:attribute>
  996. </xsl:if>
  997. <xsl:if test="@title">
  998. <xsl:attribute name="title">
  999. <xsl:value-of select="@title"/>
  1000. </xsl:attribute>
  1001. </xsl:if>
  1002. <xsl:if test="@id">
  1003. <xsl:attribute name="id">
  1004. <xsl:value-of select="@id"/>
  1005. </xsl:attribute>
  1006. </xsl:if>
  1007. <xsl:choose>
  1008. <xsl:when test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute></xsl:when>
  1009. <xsl:otherwise><xsl:attribute name="valign">middle</xsl:attribute></xsl:otherwise>
  1010. </xsl:choose>
  1011. <xsl:choose>
  1012. <xsl:when test="@wrap">
  1013. <xsl:attribute name="style">padding-left:2px;padding-top:2px;</xsl:attribute>
  1014. </xsl:when>
  1015. <xsl:otherwise>
  1016. <xsl:attribute name="style">padding-left:2px;padding-top:2px;white-space:nowrap;</xsl:attribute>
  1017. <xsl:attribute name="nowrap">nowrap</xsl:attribute>
  1018. </xsl:otherwise>
  1019. </xsl:choose>
  1020. <out:variable name="sortHref">
  1021. <xsl:if test="cp:sortHref">
  1022. <xsl:copy-of select="cp:sortHref"/>
  1023. </xsl:if>
  1024. </out:variable>
  1025. <xsl:choose>
  1026. <xsl:when test="@sort">
  1027. <out:variable name="lbl_header">
  1028. <xsl:apply-templates select="*[not(local-name() = 'sortHref') and not(self::cp:columnCondition)]"/>
  1029. </out:variable>
  1030. <out:if test="$lbl_header != ''">
  1031. <out:attribute name="abbr"><out:value-of select="xtsext:htmlencode($lbl_header)"/></out:attribute>
  1032. </out:if>
  1033. <out:variable name="columnSortOrder">
  1034. <out:choose>
  1035. <out:when test="key('session-param', 's_so') = 'na' ">ascending</out:when>
  1036. <out:when test="key('session-param', 's_so') = 'nd' ">descending</out:when>
  1037. <out:otherwise>none</out:otherwise>
  1038. </out:choose>
  1039. </out:variable>
  1040. <out:variable name="sortOrder">
  1041. <out:choose>
  1042. <out:when test="'{ancestor::cp:tableHeader/@session-name}' = 'monitor-sort'">
  1043. <out:choose>
  1044. <out:when test="not (/root/env/param[@name='m_monitor_type']) or /root/env/param[@name='m_monitor_type'] = 'dispatcher'">
  1045. <out:choose>
  1046. <out:when test="key('session-param', 's_disp') = concat('{@sort}', 'd')">down</out:when>
  1047. <out:when test="key('session-param', 's_disp') = concat('{@sort}', 'a')">up</out:when>
  1048. <out:otherwise>default</out:otherwise>
  1049. </out:choose>
  1050. </out:when>
  1051. <out:when test="/root/env/param[@name='m_monitor_type'] and /root/env/param[@name='m_monitor_type'] = 'service'">
  1052. <out:choose>
  1053. <out:when test="key('session-param', 's_serv') = concat('{@sort}', 'd')">down</out:when>
  1054. <out:when test="key('session-param', 's_serv') = concat('{@sort}', 'a')">up</out:when>
  1055. <out:otherwise>default</out:otherwise>
  1056. </out:choose>
  1057. </out:when>
  1058. <out:otherwise>none</out:otherwise>
  1059. </out:choose>
  1060. </out:when>
  1061. <out:when test="'{ancestor::cp:tableHeader/@sort_track_type}' = 'page' ">
  1062. <out:choose>
  1063. <out:when test="key('env-param', '{ancestor::cp:tableHeader/@session-name}') = concat('{@sort}', 'd')">down</out:when>
  1064. <out:when test="key('env-param', '{ancestor::cp:tableHeader/@session-name}') = concat('{@sort}', 'a')">up</out:when>
  1065. <out:otherwise>default</out:otherwise>
  1066. </out:choose>
  1067. </out:when>
  1068. <out:when test="key('session-param', '{ancestor::cp:tableHeader/@session-name}') = concat('{@sort}', 'd')">down</out:when>
  1069. <out:when test="key('session-param', '{ancestor::cp:tableHeader/@session-name}') = concat('{@sort}', 'a')">up</out:when>
  1070. <out:otherwise>default</out:otherwise>
  1071. </out:choose>
  1072. </out:variable>
  1073. <a class="tableSortTitle" role="button">
  1074. <out:if test="$sortHref!=''">
  1075. <out:attribute name="href">
  1076. <out:value-of select="$sortHref"/>
  1077. </out:attribute>
  1078. </out:if>
  1079. <xsl:apply-templates select="*[not(local-name() = 'sortHref') and not(self::cp:columnCondition)]"/>
  1080. <xsl:variable name="sortID">sortIndicatorID_<xsl:value-of select="@id"/></xsl:variable>
  1081. <img height="15" width="15" border="0" style="vertical-align: bottom;">
  1082. <out:attribute name="alt">
  1083. <out:choose>
  1084. <out:when test="$sortOrder = 'down'"><xts:string id="IDS_DESCENDING_SORT"/></out:when>
  1085. <out:when test="$sortOrder = 'up'"><xts:string id="IDS_ASCENDING_SORT"/></out:when>
  1086. <out:when test="$sortOrder = 'default'"><xts:string id="IDS_DEFAULT_SORT"/></out:when>
  1087. </out:choose>
  1088. </out:attribute>
  1089. <out:attribute name="src">
  1090. <out:choose>
  1091. <out:when test="$sortOrder = 'down'"><out:value-of select="$skin_images"/>list_sort_descending.gif</out:when>
  1092. <out:when test="$sortOrder = 'up'"><out:value-of select="$skin_images"/>list_sort_ascending.gif</out:when>
  1093. <out:when test="$sortOrder = 'default'"><out:value-of select="$skin_images"/>list_sort_no.gif</out:when>
  1094. <out:otherwise><out:value-of select="$webcontent"/>/images/space.gif</out:otherwise>
  1095. </out:choose>
  1096. </out:attribute>
  1097. </img>
  1098. </a>
  1099. </xsl:when>
  1100. <xsl:when test="@toggleName">
  1101. <out:variable name="form">
  1102. <xsl:choose>
  1103. <xsl:when test="@form"><xsl:value-of select="@form"/></xsl:when>
  1104. <xsl:when test="./cp:columnHeaderForm"><xsl:copy-of select="./cp:columnHeaderForm"/></xsl:when>
  1105. </xsl:choose>
  1106. </out:variable>
  1107. <out:variable name="id" >
  1108. <xsl:choose>
  1109. <xsl:when test="@id"><xsl:value-of select="@id"/></xsl:when>
  1110. <xsl:otherwise><xsl:value-of select="concat('control_',@toggleName)"/></xsl:otherwise>
  1111. </xsl:choose>
  1112. </out:variable>
  1113. <out:attribute name="abbr"><xts:string id="{@toggleLabel}" encode="html"/></out:attribute>
  1114. <input type="checkbox"><out:text/>
  1115. <out:attribute name="onclick">javascript:toggleChecks(this.checked,<xsl:if test="@toggleName">'<xsl:value-of select="@toggleName"/>'</xsl:if><out:if test="string($form) !=''">,'<out:value-of select="$form"/>'</out:if>)<xsl:if test="@other">;<xsl:value-of select="@other"/></xsl:if></out:attribute><out:text/>
  1116. <out:attribute name="id">select_deselectALL_<out:value-of select="$id"/></out:attribute>
  1117. <out:attribute name="aria-labelledby">lbl_selectAll_deselectAll<xsl:value-of select="ancestor::cp:table/@name"/><xsl:if test="not(@noLabel='true')"> lbl_column_header_<out:value-of select="$id"/></xsl:if></out:attribute>
  1118. </input>
  1119. <xsl:if test="@toggleLabel"><span id="lbl_column_header_{'{$id}'}"><xts:string id="{@toggleLabel}"/></span></xsl:if>
  1120. <script language="javascript">
  1121. function checkControl_<xsl:value-of select="@toggleName"/>(cbName)
  1122. {
  1123. <out:choose>
  1124. <out:when test="string($form) !=''">
  1125. var formObj = "<out:value-of select="$form"/>";
  1126. </out:when>
  1127. <out:otherwise>
  1128. var formObj = "pform";
  1129. </out:otherwise>
  1130. </out:choose>
  1131. var idObj = "<out:value-of select="$id"/>";
  1132. resetControlCheck(formObj, idObj, cbName);
  1133. }
  1134. </script>
  1135. </xsl:when>
  1136. <xsl:otherwise>
  1137. <xsl:apply-templates select="*[not(self::cp:columnCondition)]"/>
  1138. <xsl:choose>
  1139. <xsl:when test="string(@nonbsp) = 'true'"/>
  1140. <xsl:otherwise><out:text>&#160;</out:text></xsl:otherwise>
  1141. </xsl:choose>
  1142. </xsl:otherwise>
  1143. </xsl:choose>
  1144. </th>
  1145. <xsl:if test="position() != last()">
  1146. <!-- Replaced this <td> by a <th> in order to allow the table that includes the current cp:columnHeader to be recognized as a true data table for screen readers. -->
  1147. <th height="15" width="1" class="tableTitle" valign="middle" nowrap="" style="padding-left:1px;padding-top:1px;" scope="col" role="separator" aria-orientation="">
  1148. <table cellpadding="0" cellspacing="0" border="0" summary="" role="presentation">
  1149. <tr>
  1150. <td>
  1151. <xsl:if test="not(@noSep) or @noSep != 'T'">
  1152. <xsl:attribute name="class"><xsl:value-of select="'tableHeaderDivider'"/></xsl:attribute>
  1153. </xsl:if>
  1154. <img width="1" alt="">
  1155. <xsl:attribute name="height">
  1156. <xsl:choose>
  1157. <xsl:when test="not(@tallDivider)">15</xsl:when>
  1158. <xsl:otherwise>24</xsl:otherwise>
  1159. </xsl:choose>
  1160. </xsl:attribute>
  1161. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1162. </img>
  1163. </td>
  1164. </tr>
  1165. </table>
  1166. </th>
  1167. </xsl:if>
  1168. </out:if>
  1169. </out:if>
  1170. </xsl:template>
  1171. <!--
  1172. Template - cp:columnContent:
  1173. This template is used to render an object value in a column (usually in the pager).
  1174. Operation:
  1175. Generate html for the column.
  1176. -->
  1177. <xsl:template match="cp:columnContent">
  1178. <out:if test="true()">
  1179. <out:variable name="columnCondition{position()}">
  1180. <xsl:choose>
  1181. <xsl:when test="cp:columnCondition"><xsl:copy-of select="cp:columnCondition"/></xsl:when>
  1182. <xsl:otherwise><xsl:value-of select="true()"/></xsl:otherwise>
  1183. </xsl:choose>
  1184. </out:variable>
  1185. <out:if test="$columnCondition{position()} = 'true'">
  1186. <xsl:if test="position() = 1 or @position = 'start'">
  1187. <out:text disable-output-escaping="yes">&lt;tr</out:text>
  1188. <out:text/> style="height:1px" <out:text/> <!-- 189822 made the hack apply to all browsers. Hack for Moz browser 1.x, to fix a problem with gaps between rows in a scrollable table -->
  1189. <out:if test="(position() mod 2) != 1 and key('session-param', 'listViewSeparator') = 'background'"> class="rowHighlight"</out:if>
  1190. <out:text disable-output-escaping="yes">&gt;</out:text>
  1191. </xsl:if>
  1192. <td height="10" class="tabletext" >
  1193. <xsl:copy-of select="@*"/>
  1194. <xsl:choose>
  1195. <xsl:when test="@wrap"/>
  1196. <xsl:otherwise><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:otherwise>
  1197. </xsl:choose>
  1198. <xsl:apply-templates select="*[not(self::cp:columnCondition)]"/>
  1199. </td>
  1200. <xsl:if test="position() != last() and not(@position = 'end')">
  1201. <td height="15" width="1" role="separator" aria-orientation="vertical">
  1202. <img height="15" width="1" alt="">
  1203. <xsl:attribute name="src"><xsl:value-of select="'{$webcontent}'"/>/images/space.gif</xsl:attribute>
  1204. </img>
  1205. </td>
  1206. </xsl:if>
  1207. <xsl:if test="position() = last() or @position = 'end'">
  1208. <out:text disable-output-escaping="yes">&lt;/tr&gt;</out:text>
  1209. </xsl:if>
  1210. </out:if>
  1211. </out:if>
  1212. </xsl:template>
  1213. <!--
  1214. Template - cp:columnFooter:
  1215. This template is used to render the column footer for particular object contents (usually in the pager).
  1216. Operation:
  1217. Generate html for the columns footer.
  1218. -->
  1219. <xsl:template match="cp:columnFooter">
  1220. <td class="tableFooter" height="10" style="padding-left:2px;padding-top:2px;">
  1221. <xsl:if test="@width">
  1222. <xsl:attribute name="width">
  1223. <xsl:value-of select="@width"/>
  1224. </xsl:attribute>
  1225. </xsl:if>
  1226. <xsl:if test="@colspan">
  1227. <xsl:attribute name="colspan">
  1228. <xsl:value-of select="@colspan"/>
  1229. </xsl:attribute>
  1230. </xsl:if>
  1231. <xsl:choose>
  1232. <xsl:when test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute></xsl:when>
  1233. <xsl:otherwise><xsl:attribute name="valign">middle</xsl:attribute></xsl:otherwise>
  1234. </xsl:choose>
  1235. <xsl:choose>
  1236. <xsl:when test="@wrap"/>
  1237. <xsl:otherwise><xsl:attribute name="nowrap">nowrap</xsl:attribute></xsl:otherwise>
  1238. </xsl:choose>
  1239. <xsl:apply-templates/>
  1240. </td>
  1241. </xsl:template>
  1242. <!--
  1243. Template - cp:columnHeaderToggleSet:
  1244. This template generates an inline javascript to ensure that the control toggle reflects the list items state when all are preset to checked.
  1245. -->
  1246. <xsl:template match="cp:columnHeaderToggleSet">
  1247. <script language="javascript">
  1248. checkControl_<xsl:value-of select="@toggleName"/>('<xsl:value-of select="@toggleName"/>');
  1249. </script>
  1250. </xsl:template>
  1251. <!-- End of Table control -->
  1252. <!-- ===================================================================================== -->
  1253. <!-- ====================================================================================== -->
  1254. <!-- Flyout control -->
  1255. <xsl:template match="cp:flyoutControl">
  1256. <out:template name="renderPopup">
  1257. <out:param name="flyoutXML"/>
  1258. <out:param name="controlID" />
  1259. <out:variable name="flyoutID" select="$flyoutXML/flyout/@id"/>
  1260. <script language="javascript">
  1261. var ccPopupMessageStrings = eval("({ 'IDS_CCPOPUP_DOT':'<xts:string id="IDS_CCPOPUP_DOT_ALT"/>' , 'IDS_CCPOPUP_CHECKED':'<xts:string id="IDS_CCPOPUP_CHECKED_ALT"/>' } )");
  1262. with(new CCPopupMenu("<out:value-of select="$flyoutID"/>","<out:value-of select="$controlID"/>", "<out:value-of select="$flyoutXML/flyout/@height"/>","<out:value-of select="$flyoutXML/flyout/@hasCheckbox"/>", ccPopupMessageStrings))
  1263. {
  1264. <out:if test="$flyoutXML/flyout/label != ''">
  1265. setLabel("<out:value-of select="$flyoutXML/flyout/label"/>");
  1266. </out:if>
  1267. <out:apply-templates select="$flyoutXML/flyout/items/*">
  1268. <out:with-param name="flyoutID"><out:value-of select="$flyoutID"/></out:with-param>
  1269. </out:apply-templates>
  1270. }
  1271. </script>
  1272. </out:template>
  1273. <out:template match="item[@type='separator']">
  1274. <out:param name="flyoutID"/>
  1275. <out:param name="groupID"/>
  1276. addMenuSeparator();
  1277. </out:template>
  1278. <out:template match="itemGroup">
  1279. <out:param name="flyoutID"/>
  1280. <out:apply-templates select="./*">
  1281. <out:with-param name="flyoutID"><out:value-of select="$flyoutID"/></out:with-param>
  1282. <out:with-param name="groupID"><out:value-of select="@id"/></out:with-param>
  1283. </out:apply-templates>
  1284. </out:template>
  1285. <out:template match="item">
  1286. <out:param name="flyoutID"/>
  1287. <out:param name="groupID"/>
  1288. addMenuItem("<out:value-of select="@id"/>","<out:value-of select="$groupID"/>", "<out:value-of select="xtsext:javascriptencode(./text)"/>", "<out:value-of select="xtsext:javascriptencode(./icon)"/>","<out:value-of select="xtsext:javascriptencode(./action)"/>");
  1289. <out:choose>
  1290. <out:when test="@itemSelectedState = 'checked'">
  1291. setMenuItemChecked("<out:value-of select="@id"/>");
  1292. </out:when>
  1293. <out:when test="@itemSelectedState = 'selected'">
  1294. setMenuItemSelected("<out:value-of select="@id"/>");
  1295. </out:when>
  1296. </out:choose>
  1297. </out:template>
  1298. </xsl:template>
  1299. <xsl:template match="cp:action"/>
  1300. <!-- End of flyout control -->
  1301. <!-- ===================================================================================== -->
  1302. <!-- ===================================================================================== -->
  1303. <!-- Stand-alone toolbar -->
  1304. <xsl:template match="cp:toolbarControl">
  1305. <out:template name="renderToolBar">
  1306. <out:param name="toolbarXML"/>
  1307. <out:variable name="toolbar_id" select="$toolbarXML/toolbar/@id"/>
  1308. <script language="JavaScript">
  1309. function disable_<out:value-of select="$toolbar_id"/>(btn)
  1310. {
  1311. eval("enabled_" + btn + " = false");
  1312. document.getElementById(btn).className = "toolbarImageUnavailable";
  1313. }
  1314. function enable_<out:value-of select="$toolbar_id"/>(btn)
  1315. {
  1316. eval("enabled_" + btn + " = true");
  1317. document.getElementById(btn).className = "toolbarImageNormal";
  1318. eval("pressed_" + btn + " = false");
  1319. }
  1320. function press_<out:value-of select="$toolbar_id"/>(btn)
  1321. {
  1322. eval("pressed_" + btn + " = true");
  1323. if (!eval("disabled_" + btn))
  1324. document.getElementById(btn).className = "toolbarImagePressed";
  1325. }
  1326. function release_<out:value-of select="$toolbar_id"/>(btn)
  1327. {
  1328. eval("pressed_" + btn + " = false");
  1329. if (!eval("disabled_" + btn))
  1330. document.getElementById(btn).className = "toolbarImageNormal";
  1331. }
  1332. function mouseover_<out:value-of select="$toolbar_id"/>(btn)
  1333. {
  1334. if (btn.className == 'toolbarImageNormal')
  1335. btn.className = 'toolbarImageOver';
  1336. if (btn.className == 'toolbarImagePressed')
  1337. btn.className = 'toolbarImageOverPressed';
  1338. }
  1339. function mouseout_<out:value-of select="$toolbar_id"/>(btn)
  1340. {
  1341. if (btn.className == 'toolbarImageOver')
  1342. btn.className = 'toolbarImageNormal';
  1343. if (btn.className == 'toolbarImageOverPressed')
  1344. btn.className = 'toolbarImagePressed';
  1345. }
  1346. </script>
  1347. <table border="0" width="100%" cellpadding="0" cellspacing="3" summary="" role="presentation">
  1348. <tr>
  1349. <out:for-each select="$toolbarXML/toolbar/*">
  1350. <out:choose>
  1351. <out:when test="name() = 'toolbarButton'">
  1352. <out:call-template name="renderToolBarButton">
  1353. <out:with-param name="toolbar_id" select="$toolbar_id"/>
  1354. <out:with-param name="button"><out:copy-of select="."/></out:with-param>
  1355. </out:call-template>
  1356. </out:when>
  1357. <out:when test="local-name() = 'toolbarSeparator'">
  1358. <out:call-template name="renderToolbarSeparator">
  1359. <out:with-param name="button" select="."/>
  1360. </out:call-template>
  1361. </out:when>
  1362. </out:choose>
  1363. </out:for-each>
  1364. </tr>
  1365. </table>
  1366. </out:template>
  1367. <out:template name="renderToolbarSeparator">
  1368. <out:param name="button"/>
  1369. <td style="padding-left:2px;padding-right:2px;" align="middle">
  1370. <out:if test="@style = 'bar'">
  1371. <div class="toolbarDivider"></div>
  1372. </out:if>
  1373. </td>
  1374. </out:template>
  1375. <out:template name="renderToolBarButton">
  1376. <out:param name="toolbar_id"/>
  1377. <out:param name="button"/>
  1378. <out:variable name="butnID" select="@id"/>
  1379. <out:variable name="disabled" select="@disabled = 'true'"/>
  1380. <out:variable name="pressed" select="@pressed = 'true'"/>
  1381. <out:variable name="image" select="param[@name='image']"/>
  1382. <out:variable name="text" select="param[@name='text']"/>
  1383. <out:variable name="title" select="param[@name='title']"/>
  1384. <td style="width:20px;" id="{'{$butnID}'}" onmouseover="mouseover_{'{$toolbar_id}'}(this)" onmouseout="mouseout_{'{$toolbar_id}'}(this)" align="middle" valign="middle">
  1385. <out:if test="not($disabled)">
  1386. <out:attribute name="onclick"><out:copy-of select="param[@name='onclick']"/></out:attribute>
  1387. <out:attribute name="style">cursor:pointer;</out:attribute>
  1388. </out:if>
  1389. <out:attribute name="class">
  1390. <out:choose>
  1391. <out:when test="@disabled='true'">toolbarImageUnavailable</out:when>
  1392. <out:when test="@pressed='true'">toolbarImagePressed</out:when>
  1393. <out:otherwise>toolbarImageNormal</out:otherwise>
  1394. </out:choose>
  1395. </out:attribute>
  1396. <out:attribute name="title"><out:value-of select="$title"/></out:attribute>
  1397. <script language="JavaScript">
  1398. var disabled_<out:value-of select="$butnID"/> = <out:value-of select="$disabled"/>;
  1399. var pressed_<out:value-of select="$butnID"/> = <out:value-of select="$pressed"/>;
  1400. function isEnabled_<out:value-of select="$butnID"/>()
  1401. { return !disabled_<out:value-of select="$butnID"/>; }
  1402. function isPressed_<out:value-of select="$butnID"/>()
  1403. { return pressed_<out:value-of select="$butnID"/>; }
  1404. </script>
  1405. <out:choose>
  1406. <out:when test="$image">
  1407. <img id="img{'{$butnID}'}" src="{'{$image_root}'}{'{$image}'}">
  1408. <out:attribute name="alt"><out:value-of select="$title"/></out:attribute>
  1409. </img>
  1410. </out:when>
  1411. <out:when test="$text">
  1412. <out:if test="$browser!='ie'">
  1413. <img style="height: 1px; width:18px;" src="{'{$webcontent}/images/space.gif'}" alt=""/><br/>
  1414. </out:if>
  1415. <span style="width:18px;"><out:copy-of select="$text"/></span>
  1416. </out:when>
  1417. </out:choose>
  1418. </td>
  1419. </out:template>
  1420. </xsl:template>
  1421. <!-- Generates an HTML push (command) button from a button spec -->
  1422. <xsl:template name="renderPushButton">
  1423. <xsl:param name="buttonSpec"/>
  1424. <xsl:variable name="btnID" select="$buttonSpec/cp:cmdButton/@id"/>
  1425. <xsl:variable name="btnDefaultState" select="$buttonSpec/cp:cmdButton/@defaultState"/>
  1426. <xsl:variable name="btnType" select="$buttonSpec/cp:cmdButton/@type"/>
  1427. <input id="{$btnID}">
  1428. <xsl:attribute name="type">
  1429. <xsl:choose>
  1430. <xsl:when test="$btnType = 'submit'">submit</xsl:when>
  1431. <xsl:otherwise>button</xsl:otherwise>
  1432. </xsl:choose>
  1433. </xsl:attribute>
  1434. <xsl:if test="$btnDefaultState = 'inactive'">
  1435. <xsl:attribute name="disabled">disabled</xsl:attribute>
  1436. <xsl:attribute name="class">cmdButtonInactive</xsl:attribute>
  1437. </xsl:if>
  1438. <xsl:if test="string($btnDefaultState) != 'inactive'">
  1439. <xsl:attribute name="class">cmdButton</xsl:attribute>
  1440. <xsl:attribute name="onmouseover">this.className='cmdButtonOver'</xsl:attribute>
  1441. <xsl:attribute name="onmouseout">this.className='cmdButton'</xsl:attribute>
  1442. </xsl:if>
  1443. <out:attribute name="value"><xsl:copy-of select="$buttonSpec/cp:cmdButton/cp:cmdButtonText"/></out:attribute>
  1444. <xsl:for-each select="$buttonSpec/cp:cmdButton/cp:cmdButtonEvents/cp:cmdButtonEvent">
  1445. <out:attribute name="{@name}"><xsl:copy-of select="."/></out:attribute>
  1446. </xsl:for-each>
  1447. </input>
  1448. <script language="JavaScript">
  1449. var <xsl:value-of select="$btnID"/>_enabled = true;
  1450. function <xsl:value-of select="$btnID"/>_enable()
  1451. {
  1452. <xsl:value-of select="$btnID"/>_enabled = true;
  1453. document.getElementById('<xsl:value-of select="$btnID"/>').disabled = false;
  1454. document.getElementById('<xsl:value-of select="$btnID"/>').className = "cmdButton";
  1455. }
  1456. function <xsl:value-of select="@id"/>_disable()
  1457. {
  1458. <xsl:value-of select="$btnID"/>_enabled = false;
  1459. document.getElementById('<xsl:value-of select="$btnID"/>').disabled = true;
  1460. document.getElementById('<xsl:value-of select="$btnID"/>').className = "cmdButtonInactive";
  1461. }
  1462. function <xsl:value-of select="$btnID"/>_isEnabled()
  1463. {
  1464. return <xsl:value-of select="$btnID"/>_enabled;
  1465. }
  1466. function <xsl:value-of select="$btnID"/>_initSize()
  1467. {
  1468. <!--This is to get around that fact that IE does not support min-width properly in Quirks mode. A min-width of 4.9em is added to the css files for firefox and other browsers -->
  1469. //IE Function only
  1470. <out:if test="$browser = 'ie'">
  1471. var btnID = document.getElementById('<xsl:value-of select="$btnID"/>');
  1472. if(btnID) {
  1473. if (btnID.offsetWidth &lt; 70) {
  1474. btnID.style.width = "4.9em";
  1475. btnID.style.overflow="visible";
  1476. }
  1477. }
  1478. </out:if>
  1479. }
  1480. if (window.addEventListener) {
  1481. window.addEventListener("load", <xsl:value-of select="$btnID"/>_initSize, false);
  1482. } else if (window.attachEvent) {
  1483. window.attachEvent("onload", <xsl:value-of select="$btnID"/>_initSize);
  1484. }
  1485. </script>
  1486. </xsl:template>
  1487. <xsl:template match="cp:cmdButton">
  1488. <xsl:call-template name="renderPushButton">
  1489. <xsl:with-param name="buttonSpec">
  1490. <xsl:copy-of select="."/>
  1491. </xsl:with-param>
  1492. </xsl:call-template>
  1493. </xsl:template>
  1494. <!--
  1495. Template - cp:genericDialog:
  1496. Template used to render information messages
  1497. Attributes:
  1498. @height - the height of the dialog box (default 100).
  1499. @width - the width of the dialog box (default 300).
  1500. @id - id for the dialog box.
  1501. @type - message type to be rendered.
  1502. @action - specifies type of button to be rendered.
  1503. @interactive - should the dialog header be rendered
  1504. Operation:
  1505. Renders simple DHTML dialog
  1506. -->
  1507. <xsl:template match="cp:genericDialog">
  1508. <xsl:variable name="height">
  1509. <xsl:choose>
  1510. <xsl:when test="@height"><xsl:value-of select="@height"/></xsl:when>
  1511. <xsl:otherwise>100</xsl:otherwise>
  1512. </xsl:choose>
  1513. </xsl:variable>
  1514. <xsl:variable name="width">
  1515. <xsl:choose>
  1516. <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
  1517. <xsl:otherwise>300</xsl:otherwise>
  1518. </xsl:choose>
  1519. </xsl:variable>
  1520. <out:variable name="s" select="concat(' ', /root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help/@show, ' ')"/>
  1521. <out:variable name="helpBasedOnUser" select="(contains($s , 'Administrators') and $isAdminUser) or
  1522. (contains($s , 'QSUsers') and $hasFullQSCapability) or
  1523. (contains($s , 'RSUsers') and $hasFullRSCapability) or
  1524. (contains($s , 'Consumers') and $is-named='1') or
  1525. (contains($s , 'Anonymous') and $is-named='0')"/>
  1526. <out:variable name="groupShowHelp" select="key('system-param', 'ui_groups')/group[contains($s, concat(' ', @id, ' ')) and contains(key('session-param', 'uig'), concat(' ', @id, ' '))]"/>
  1527. <out:variable name="dialogHeaderHelp" select="/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help[$helpBasedOnUser or $groupShowHelp]"/>
  1528. <out:variable name="systemHelpHide" select="/root/system/param[@name='ui_hide']/CC_DIALOG_HEADER_help"/>
  1529. <out:variable name="showHelp" select="not($systemHelpHide) or $dialogHeaderHelp"/>
  1530. <out:variable name="setHelpFocus">
  1531. <out:choose>
  1532. <out:when test="$showHelp">
  1533. <xsl:choose>
  1534. <xsl:when test="string(@helpid)!=''">true</xsl:when>
  1535. <xsl:otherwise>false</xsl:otherwise>
  1536. </xsl:choose>
  1537. </out:when>
  1538. <out:otherwise>false</out:otherwise>
  1539. </out:choose>
  1540. </out:variable>
  1541. <script language="JavaScript">
  1542. // Register to hide dialog when the user clicks anywhere on the document
  1543. <xsl:choose>
  1544. <xsl:when test="@rootContainerId and @rootContainerId != ''">
  1545. attachClickOnPageHandler(document.getElementById('<xsl:value-of select="@rootContainerId"/>'));
  1546. </xsl:when>
  1547. <xsl:otherwise>
  1548. attachClickOnPageHandler(document);
  1549. </xsl:otherwise>
  1550. </xsl:choose>
  1551. function attachClickOnPageHandler(target) {
  1552. if (target.addEventListener) {
  1553. target.addEventListener("click", hide_<xsl:value-of select="@id"/>, false);
  1554. } else if (target.attachEvent) {
  1555. target.attachEvent("onclick", hide_<xsl:value-of select="@id"/>);
  1556. }
  1557. }
  1558. function obj_<xsl:value-of select="@id"/>()
  1559. {
  1560. this.hide = hide_<xsl:value-of select="@id"/>;
  1561. this.position = position_<xsl:value-of select="@id"/>;
  1562. this.resize = resize_<xsl:value-of select="@id"/>;
  1563. this.show = show_<xsl:value-of select="@id"/>;
  1564. }
  1565. var <xsl:value-of select="@id"/> = new obj_<xsl:value-of select="@id"/>();
  1566. function position_<xsl:value-of select="@id"/>()
  1567. {
  1568. div = document.getElementById('<xsl:value-of select="@id"/>');
  1569. innerTable = document.getElementById('<xsl:value-of select="concat('innerTable',@id)"/>');
  1570. <xsl:choose>
  1571. <xsl:when test="@positionHorizontal='false'"/>
  1572. <xsl:otherwise>
  1573. div.style.left = ((document.body.clientWidth - div.scrollWidth) / 2) + "px";
  1574. </xsl:otherwise>
  1575. </xsl:choose>
  1576. <out:if test="$browser = 'ie'">
  1577. <!-- Position the dummy iframe so that it will appear directly below the pop up dialog to prevent "windowed" controls from showing through. -->
  1578. dummyFrame = document.getElementById('i<xsl:value-of select="@id"/>');
  1579. dummyFrame.style.top = div.style.top;
  1580. dummyFrame.style.left = div.style.left;
  1581. </out:if>
  1582. }
  1583. function resize_<xsl:value-of select="@id"/>()
  1584. {
  1585. div = document.getElementById('<xsl:value-of select="@id"/>');
  1586. <xsl:choose>
  1587. <xsl:when test="@height">div.style.height = <xsl:value-of select="@height"/>;</xsl:when>
  1588. <xsl:otherwise>div.style.height = document.getElementById('innerTable<xsl:value-of select="@id"/>').scrollHeight;</xsl:otherwise>
  1589. </xsl:choose>
  1590. <xsl:choose>
  1591. <xsl:when test="@width">div.style.width = <xsl:value-of select="@width"/> + "px";</xsl:when>
  1592. <xsl:otherwise>div.style.width = document.getElementById('innerTable<xsl:value-of select="@id"/>').scrollWidth;</xsl:otherwise>
  1593. </xsl:choose>
  1594. }
  1595. function resizeInsulatingFrame_<xsl:value-of select="@id"/>()
  1596. {
  1597. <out:if test="$browser = 'ie'">
  1598. <!-- the insulating frame is only needed on ie. If it is included on mozilla it appears to cause some problems with the scrollbars -->
  1599. dummyFrame = document.getElementById('i<xsl:value-of select="@id"/>');
  1600. <!-- for some reason, the iframe height and width were a little to small to cover the entire div, adding
  1601. 5px seemed like the magic number for all the browsers -->
  1602. dummyFrame.style.height = document.getElementById('innerTable<xsl:value-of select="@id"/>').scrollHeight + 5;
  1603. dummyFrame.style.width = document.getElementById('innerTable<xsl:value-of select="@id"/>').scrollWidth + 5;
  1604. </out:if>
  1605. }
  1606. function hide_<xsl:value-of select="@id"/>(e)
  1607. {
  1608. // If the mouse click is a right mouse click don't close the window
  1609. if (e) {
  1610. if (e.button) {
  1611. if (e.button == 2) {
  1612. return;
  1613. }
  1614. }
  1615. }
  1616. obj = document.getElementById('<xsl:value-of select="@id"/>');
  1617. obj.className = "hidden";
  1618. <!-- need to reset the columns and rows of the insertTablePopup or we might get a CAF error (bug 550539) -->
  1619. if ('<xsl:value-of select="@id"/>'=='insertTablePopup') {
  1620. <!-- need to only reset defaults if table is not valid (bug 555470.1) -->
  1621. if (!validateHideTable()) {
  1622. cancelCreateTable();
  1623. }
  1624. }
  1625. <out:if test="$browser = 'ie'">
  1626. <!-- hide the dummyFrame -->
  1627. document.getElementById('i<xsl:value-of select="@id"/>').style.display = "none";
  1628. </out:if>
  1629. }
  1630. function show_<xsl:value-of select="@id"/>(wasDelayed)
  1631. {
  1632. if (wasDelayed) {
  1633. obj = document.getElementById('<xsl:value-of select="@id"/>');
  1634. resize_<xsl:value-of select="@id"/>();
  1635. resizeInsulatingFrame_<xsl:value-of select="@id"/>();
  1636. obj.className = "visible";
  1637. position_<xsl:value-of select="@id"/>();
  1638. resizeInsulatingFrame_<xsl:value-of select="@id"/>();
  1639. <!-- show the dummyFrame -->
  1640. <out:if test="$browser = 'ie'">
  1641. document.getElementById('i<xsl:value-of select="@id"/>').style.display = "block";
  1642. </out:if>
  1643. <out:choose>
  1644. <out:when test="$setHelpFocus='true'">
  1645. document.getElementById('<xsl:value-of select="@helpid"/>').focus();
  1646. </out:when>
  1647. <out:otherwise>
  1648. document.getElementById('innerTable<xsl:value-of select="@id"/>').focus();
  1649. </out:otherwise>
  1650. </out:choose>
  1651. } else {
  1652. <!-- delay 'show' a bit to ensure it gets executed after 'hide' in some instances -->
  1653. setTimeout('show_<xsl:value-of select="@id"/>("wasDelayed")', 10);
  1654. }
  1655. }
  1656. </script>
  1657. <out:if test="$browser = 'ie'">
  1658. <!-- Dummy iframe below the pop up dialog to prevent "windowed" controls from showing through -->
  1659. <!-- A11y replaced space.gif with dummy.html to prevent error in an ssl env if the src tag is not there -->
  1660. <iframe id="i{@id}" frameborder="0" style="display:none; border:0px; position: absolute;" src="{'{$webcontent}'}/images/dummy.html" title="i{@id}"/>
  1661. </out:if>
  1662. <div id="{@id}" class="hidden" style="padding:0px;z-index:2;" aria-labelledby="{@id}dialogTitle">
  1663. <xsl:attribute name="role">
  1664. <xsl:choose>
  1665. <xsl:when test="@role and @role !=''"><xsl:value-of select="@role"/></xsl:when>
  1666. <xsl:otherwise>dialog</xsl:otherwise>
  1667. </xsl:choose>
  1668. </xsl:attribute>
  1669. <out:attribute name="onclick">
  1670. <out:choose>
  1671. <out:when test="$browser = 'ie'">event.cancelBubble='true';</out:when>
  1672. <out:otherwise>event.stopPropagation();</out:otherwise>
  1673. </out:choose>
  1674. </out:attribute>
  1675. <table class="popup" style="position: absolute;" id="innerTable{@id}" border="0" width="100%" cellpadding="0" cellspacing="0" summary="" tabindex="0" role="presentation">
  1676. <tr>
  1677. <td>
  1678. <!-- If this is supposed to be an interactive dialog then show a standard header -->
  1679. <xsl:if test="@interactive">
  1680. <table id="t{@id}1" border="0" width="100%" cellpadding="0" cellspacing="0" class="dialogHeader" summary="" role="presentation">
  1681. <tr>
  1682. <td width="100%" valign="middle"><span class="dialogHeaderTitle" id="{@id}dialogTitle"><xsl:copy-of select="cp:param[@name = 'title']/*"/></span></td>
  1683. <td valign="middle" nowrap="nowrap" class="dialogHeaderLink" >
  1684. <out:if test="$showHelp">
  1685. <a class="dialogHeaderLinkColor" href="#" onclick="javascript:help()">
  1686. <xsl:if test="@helpid"><xsl:attribute name="id"><xsl:value-of select="@helpid"/></xsl:attribute></xsl:if>
  1687. <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>
  1688. <xsl:if test="@focusidOnShiftTab">
  1689. <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>
  1690. </xsl:if>
  1691. <xts:string id="IDS_HELP"/>
  1692. </a>
  1693. </out:if>
  1694. </td>
  1695. <td valign="middle" style="padding-right:3px;">
  1696. <a id="close_{@id}" href="#" onclick="{@closeOnClick}{@id}.hide()" role="button" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" onmouseup="this.className = 'dialogClose'">
  1697. <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>
  1698. <out:if test="not($showHelp)">
  1699. <xsl:if test="@focusidOnShiftTab">
  1700. <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>
  1701. </xsl:if>
  1702. </out:if>
  1703. <img height="16" width="16" border="0" src="{'{$skin_images}'}close.gif" class="dialogClose" >
  1704. <out:attribute name="title"><xts:string id="IDS_CLOSE"/></out:attribute>
  1705. <out:attribute name="alt"><xts:string id="IDS_CLOSE"/></out:attribute>
  1706. </img></a>
  1707. </td>
  1708. </tr>
  1709. </table>
  1710. </xsl:if>
  1711. <table id="t{@id}2" border="0" width="100%" cellpadding="0" cellspacing="0" class="dialogWindowPopup" summary="" role="presentation">
  1712. <xsl:if test="cp:param[@name = 'message']">
  1713. <tr>
  1714. <xsl:if test="@type">
  1715. <td valign="top" align="middle">
  1716. <img src="{'{$image_root}'}msg_information.gif">
  1717. <xsl:attribute name="alt"><xts:string id="IDS_ICON_INFORMATION" encode="html"/></xsl:attribute>
  1718. </img>
  1719. </td>
  1720. </xsl:if>
  1721. <td valign="middle" class="formText" >
  1722. <xsl:attribute name="align">
  1723. <xsl:choose>
  1724. <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
  1725. <xsl:when test="@type or @action">left</xsl:when>
  1726. <xsl:otherwise>middle</xsl:otherwise>
  1727. </xsl:choose>
  1728. </xsl:attribute>
  1729. <xsl:copy-of select="cp:param[@name = 'message']/*"/>
  1730. </td>
  1731. </tr>
  1732. </xsl:if>
  1733. <!-- user specified a custom body -->
  1734. <xsl:if test="cp:param[@name = 'body']">
  1735. <tr>
  1736. <td colspan="2" class="body_dialog_modal">
  1737. <xsl:attribute name="align">
  1738. <xsl:choose>
  1739. <xsl:when test="cp:param[@name = 'body' and @align]"><xsl:value-of select="cp:param[@name = 'body']/@align"/></xsl:when>
  1740. <xsl:otherwise>left</xsl:otherwise>
  1741. </xsl:choose>
  1742. </xsl:attribute>
  1743. <xsl:apply-templates select="cp:param[@name = 'body']/*"/>
  1744. </td>
  1745. </tr>
  1746. </xsl:if>
  1747. </table>
  1748. <xsl:if test="cp:param[@name = 'footer']">
  1749. <xsl:apply-templates select="cp:param[@name = 'footer']/*"/>
  1750. </xsl:if>
  1751. </td>
  1752. </tr>
  1753. </table>
  1754. </div>
  1755. </xsl:template>
  1756. <!--
  1757. Colour Selection Dialog
  1758. =======================
  1759. Usage:
  1760. 1- Add the colour picker dialog to your morphlet once by inserting a reference to it outside ou anu UTML form.
  1761. 2- Call it by invoking the showColourSelectionDlg(fnc, nXPos, nYPos) function where:
  1762. - fnc [required]: (string) The name of the function to call (with the colour selection) once a colour has been selected.
  1763. - nXPos, nYPos [optional]: (Integers) The screen coordinates where the colour picker is to be displayed.
  1764. -->
  1765. <xsl:template match="cp:colourSelectionDialog">
  1766. <iframe id="iColourPicker" frameborder="0" style="display:none; position:absolute; width:1px; height:1px;" src="{'{$webcontent}'}/images/space.gif"/>
  1767. <div id="divColourPicker" class="colourPicker" style="display:none;">
  1768. <out:attribute name="onclick">
  1769. <out:choose>
  1770. <out:when test="$browser = 'ie'">event.cancelBubble='true';</out:when>
  1771. <out:otherwise>event.stopPropagation();</out:otherwise>
  1772. </out:choose>
  1773. </out:attribute>
  1774. <!-- The container for the colour palette -->
  1775. <div class="CPCaptionBar">
  1776. <select id="paletteMode" type="select" name="paletteMode" onchange="loadPalette(this.options[this.selectedIndex].value)">
  1777. <option value="namedColours"><xts:string id="IDS_CON_CP_NAMED"/></option>
  1778. <option value="weSafePalette"><xts:string id="IDS_CON_CP_WEBSAFE"/></option>
  1779. <out:if test="$browser != 'safari'">
  1780. <option value="customColour"><xts:string id="IDS_CON_CP_CUSTOM"/></option>
  1781. </out:if>
  1782. </select>
  1783. <!-- Allow IE users to use the windows colour picker
  1784. <out:if test="$browser = 'ie'">
  1785. &#160;<span class="formLink"><a href="javascript:moreColours()"><xts:string id="IDS_CON_CP_MORE_COLOURS"/></a></span>
  1786. </out:if>
  1787. -->
  1788. </div>
  1789. <div id="divPaletteContainer" class="paletteContainer"/>
  1790. <!-- Place holder for the custom colour palette -->
  1791. <div id="divCustomColours" style="display:none;">
  1792. <table class="palletContainer" cellpadding="0" cellspacing="0">
  1793. <tr>
  1794. <td valign="top">
  1795. <table cellpadding="0" cellspacing="0">
  1796. <tr><td/><td class="formLabel"><xts:string id="IDS_CON_CP_RED"/></td></tr>
  1797. <tr>
  1798. <td style="padding-right:2px;" class="formText">#</td>
  1799. <td><input type="text" id="red" style="width: 65px;" maxlength="2" value="00" onkeyup="previewColour()"/></td>
  1800. </tr>
  1801. <tr><td/><td class="formLabel" style="padding-top:8px;"><xts:string id="IDS_CON_CP_GREEN"/></td></tr>
  1802. <tr>
  1803. <td style="padding-right:2px;" class="formText">&#160;</td>
  1804. <td><input type="text" id="green" style="width: 65px;" maxlength="2" value="00" onkeyup="previewColour()"/></td>
  1805. </tr>
  1806. <tr><td/><td class="formLabel" style="padding-top:8px;"><xts:string id="IDS_CON_CP_BLUE"/></td></tr>
  1807. <tr>
  1808. <td style="padding-right:2px;" class="formText">&#160;</td>
  1809. <td><input type="text" id="blue" style="width: 65px;" maxlength="2" value="00" onkeyup="previewColour()"/></td>
  1810. </tr>
  1811. </table>
  1812. </td>
  1813. <td width="100%" style="padding-left: 5px;">
  1814. <table cellpadding="0" cellspacing="0">
  1815. <tr><td class="formLabel"><xts:string id="IDS_CON_CP_PREVIEW"/></td></tr>
  1816. <tr>
  1817. <td class="formLabel">
  1818. <div id="x" class="colourPreviewContainer">
  1819. <div id="colourPreview" class="colourPreviewPane"/>
  1820. </div>
  1821. </td>
  1822. </tr>
  1823. <tr><td align="right" class="formLink" height="20" valign="middle"><a href="javascript:selectColour(calculateCustomColourInHexFormat())"><xts:string id="IDS_CON_CP_APPLYNOW"/></a></td></tr>
  1824. </table>
  1825. </td>
  1826. </tr>
  1827. </table>
  1828. </div>
  1829. <script language="JavaScript">
  1830. var setFunction = null; // Stores the function name that will get called when a colour is selected.
  1831. // The colour picker dialog
  1832. var CP = document.getElementById('divColourPicker');
  1833. var iframe = document.getElementById('iColourPicker');
  1834. // Make the CP disappear when the user clicks anywhere on the document
  1835. document.onclick = hideColourPicker;
  1836. window.onresize = hideColourPicker;
  1837. /*
  1838. This is the main entry point to this dialog.
  1839. fnc [mandatory]: The name of the function that will be call upon colour selection
  1840. nXPos, nYPos [optional] screen coordinates where the caller wants to place the colour picker
  1841. */
  1842. function showColourSelectionDlg(fnc, nXPos, nYPos)
  1843. {
  1844. setFunction = fnc;
  1845. var colourOptions = document.getElementById('paletteMode').options[document.getElementById('paletteMode').selectedIndex].value;
  1846. loadPalette(colourOptions);
  1847. CP.style.display = "block";
  1848. positionColourPicker(nXPos, nYPos);
  1849. }
  1850. function loadPalette(palette)
  1851. {
  1852. var sPaletteMarckup = "";
  1853. switch (palette)
  1854. {
  1855. case 'namedColours':
  1856. sPaletteMarckup = buildNamedColourPalette();
  1857. break;
  1858. case 'customColour':
  1859. sPaletteMarckup = buildCustomColourPalette();
  1860. break;
  1861. default:
  1862. sPaletteMarckup = buildWebSafePalette();
  1863. }
  1864. document.getElementById('divPaletteContainer').innerHTML = sPaletteMarckup;
  1865. }
  1866. function positionColourPicker(x,y)
  1867. {
  1868. // if explicit position is specified then use it otherwise center on the screen.
  1869. if (x)
  1870. {
  1871. CP.style.top = y;
  1872. CP.style.left = x;
  1873. }
  1874. else
  1875. {
  1876. CP.style.top = ((document.body.clientHeight - CP.scrollHeight) / 2) + document.body.scrollTop;
  1877. CP.style.left =((document.body.clientWidth - CP.scrollWidth) / 2) + document.body.scrollLeft;
  1878. }
  1879. iframe.style.height = CP.scrollHeight;
  1880. iframe.style.width = CP.scrollWidth;
  1881. iframe.style.top = CP.style.top;
  1882. iframe.style.left = CP.style.left;
  1883. iframe.style.display = "block";
  1884. }
  1885. function hideColourPicker()
  1886. {
  1887. CP.style.display = "none";
  1888. iframe.style.display = "none";
  1889. }
  1890. function selectColour(colour)
  1891. {
  1892. eval( setFunction + "('" + colour + "')" );
  1893. hideColourPicker();
  1894. }
  1895. <!--
  1896. /* =============================================================================== */
  1897. /* Web-Safe Colours and Helper Functions */
  1898. /* =============================================================================== */
  1899. -->
  1900. function buildWebSafePalette()
  1901. {
  1902. var rows = "";
  1903. var paletteCount = 216;
  1904. var swatchPerRow = 18;
  1905. var aBC = new Array ("00", "33", "66", "99", "cc", "ff");
  1906. var aColours = new Array(paletteCount);
  1907. var aR = aBC;
  1908. var aG = aBC;
  1909. var aB = aBC;
  1910. var count = 0;
  1911. // generate the colour array
  1912. for (var b=0; b &lt; 6; b++)
  1913. {
  1914. for (var g=0; g &lt; 6; g++)
  1915. {
  1916. for (var r=0; r &lt; 6; r++)
  1917. {
  1918. aColours[count] = "#" + aR[b] + aG[g] + aB[r];
  1919. count++;
  1920. }
  1921. }
  1922. }
  1923. // Define a table cell template to generate colour swatches from
  1924. var sCS = '';
  1925. sCS = '<td>';
  1926. sCS += '<img class="CPcolourSwatch" style="background-color:###;" onclick="selectColour(\'###\')" onmousedown="WSSPress(this)" onmouseover="WSSOver(this)" onmouseout="WSSOut(this)" title="ttt" src="{'{$webcontent}'}/images/space.gif" alt=""/>';
  1927. sCS += '</td>';
  1928. var re1 = /###/g; //places we will drop the named colour
  1929. var re2 = /ttt/g; //places we will drop the named colour
  1930. var i = 0;
  1931. do
  1932. {
  1933. var cell = "";
  1934. var cells = "";
  1935. for (var c=0; c &lt; swatchPerRow; c++)
  1936. {
  1937. cells += sCS.replace(re1,aColours[i]).replace(re2,aColours[i]);
  1938. i++;
  1939. }
  1940. rows += '<tr>' + cells + '</tr>';
  1941. }
  1942. while (i &lt; paletteCount);
  1943. return '<table class="paletteContainer">' + rows + '</table>';
  1944. }
  1945. function WSSPress(swatch)
  1946. {
  1947. swatch.className = 'CPcolourSwatchPress';
  1948. }
  1949. function WSSOver(swatch)
  1950. {
  1951. swatch.className = 'CPcolourSwatchOver';
  1952. }
  1953. function WSSOut(swatch)
  1954. {
  1955. swatch.className = 'CPcolourSwatch';
  1956. }
  1957. <!--
  1958. /* =============================================================================== */
  1959. /* Named Colours and Helper Functions */
  1960. /* =============================================================================== */
  1961. -->
  1962. function buildNamedColourPalette()
  1963. {
  1964. var aColours = new Array (
  1965. "Black", "Fuchsia",
  1966. "Silver", "Green",
  1967. "Gray", "Lime",
  1968. "White", "Olive",
  1969. "Maroon", "Yellow",
  1970. "Red", "Navy",
  1971. "Purple", "Blue",
  1972. "Teal", "Aqua");
  1973. var rows = "";
  1974. // Named Colour Panel Template
  1975. sNCPT1 = '<td><div class="namedColourPanel" onclick="selectColour(\'###\')" onmousedown="NCMPress(this,\'###\')" onmouseover="NCMOver(this, \'###\')" onmouseout="NCMOut(this, \'###\')" width="50%">';
  1976. sNCPT2 = '<img id="sw###" class="CPnamedColourSwatch" style="background-color:###;" title="ttt" width="15" height="15" src="{'{$webcontent}'}/images/space.gif"/>';
  1977. sNCPT3 = '<span class="namedColourPanelText" >zzz</span>';
  1978. sNCPT4 = '</div></td>';
  1979. var re1 = /###/g; // places we will drop the named colour
  1980. var re2 = /ttt/g; // places we will drop the hex colour
  1981. var re3 = /zzz/g; // places we will drop the named colour
  1982. var nCC = aColours.length; // colour count
  1983. var i = 0;
  1984. do
  1985. {
  1986. rows += '<tr>';
  1987. rows += sNCPT1.replace(re1,aColours[i]) + sNCPT2.replace(re1,aColours[i]).replace(re2,namedToHex(aColours[i]));
  1988. rows += sNCPT3.replace(re3,getLocalizedName(aColours[i]));
  1989. rows += sNCPT4;
  1990. i++;
  1991. rows += sNCPT1.replace(re1,aColours[i]) + sNCPT2.replace(re1,aColours[i]).replace(re2,namedToHex(aColours[i]));
  1992. rows += sNCPT3.replace(re3,getLocalizedName(aColours[i]));
  1993. rows += sNCPT4;
  1994. rows += '</tr>';
  1995. i++
  1996. }
  1997. while (i &lt; nCC);
  1998. return '<table class="paletteContainer">' + rows + '</table>';
  1999. }
  2000. function NCMPress(panel, colour)
  2001. {
  2002. panel.className = 'namedColourPanelOver';
  2003. document.getElementById('sw'+colour).className = 'CPnamedColourSwatchPress';
  2004. }
  2005. function NCMOver(panel, colour)
  2006. {
  2007. panel.className = 'namedColourPanelOver';
  2008. document.getElementById('sw'+colour).className = 'CPnamedColourSwatchOver';
  2009. }
  2010. function NCMOut(panel, colour)
  2011. {
  2012. panel.className = 'namedColourPanel';
  2013. document.getElementById('sw'+colour).className = 'CPnamedColourSwatch';
  2014. }
  2015. function getLocalizedName(sNamedColour)
  2016. {
  2017. switch (sNamedColour)
  2018. {
  2019. case 'Black': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_BLACK"/>"; break;
  2020. case 'Silver': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_SILVER"/>"; break;
  2021. case 'Gray': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_GRAY"/>"; break;
  2022. case 'White': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_WHITE"/>"; break;
  2023. case 'Maroon': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_MAROON"/>"; break;
  2024. case 'Red': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_RED"/>"; break;
  2025. case 'Purple': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_PURPLE"/>"; break;
  2026. case 'Fuchsia': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_FUCHSIA"/>"; break;
  2027. case 'Green': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_GREEN"/>"; break;
  2028. case 'Lime': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_LIME"/>"; break;
  2029. case 'Olive': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_OLIVE"/>"; break;
  2030. case 'Yellow': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_YELLOW"/>"; break;
  2031. case 'Navy': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_NAVY"/>"; break;
  2032. case 'Blue': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_BLUE"/>"; break;
  2033. case 'Teal': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_TEAL"/>"; break;
  2034. case 'Aqua': return "<xts:string encode="javascript" id="IDS_CON_CP_NC_AQUA"/>"; break;
  2035. default: return "";
  2036. }
  2037. }
  2038. function namedToHex(sNamedColour)
  2039. {
  2040. switch (sNamedColour)
  2041. {
  2042. case 'Black': return "#000000"; break;
  2043. case 'Silver': return "#c0c0c0"; break;
  2044. case 'Gray': return "#808080"; break;
  2045. case 'White': return "#ffffff"; break;
  2046. case 'Maroon': return "#800000"; break;
  2047. case 'Red': return "#ff0000"; break;
  2048. case 'Purple': return "#800080"; break;
  2049. case 'Fuchsia': return "#ff00ff"; break;
  2050. case 'Green': return "#008000"; break;
  2051. case 'Lime': return "#00ff00"; break;
  2052. case 'Olive': return "#808000"; break;
  2053. case 'Yellow': return "#ffff00"; break;
  2054. case 'Navy': return "#000080"; break;
  2055. case 'Blue': return "#0000ff"; break;
  2056. case 'Teal': return "#008080"; break;
  2057. case 'Aqua': return "#00ffff"; break;
  2058. default: return "";
  2059. }
  2060. }
  2061. <!--
  2062. /* =============================================================================== */
  2063. /* Custom Colours and Helper Functions */
  2064. /* =============================================================================== */
  2065. -->
  2066. function buildCustomColourPalette()
  2067. {
  2068. return document.getElementById('divCustomColours').innerHTML;
  2069. }
  2070. function previewColour()
  2071. {
  2072. document.getElementById('colourPreview').style.backgroundColor = calculateCustomColourInHexFormat();
  2073. }
  2074. function calculateCustomColourInHexFormat()
  2075. {
  2076. var red = convertToHexColour(document.getElementById('red').value);
  2077. var green = convertToHexColour(document.getElementById('green').value);
  2078. var blue = convertToHexColour(document.getElementById('blue').value);
  2079. return "#" + red + green + blue;
  2080. }
  2081. function convertToHexColour(colour)
  2082. {
  2083. var s1 = charToHEX(colour.charAt(0));
  2084. var s2 = charToHEX(colour.charAt(1));
  2085. return s1 + s2;
  2086. }
  2087. /* takes a char and converts it to a hex value 0-9,a,b,c,d,e,f */
  2088. function charToHEX(c)
  2089. {
  2090. var s1 = parseInt(c,16);
  2091. if(s1 &gt; 9 || isNaN(s1))
  2092. {
  2093. switch (s1)
  2094. {
  2095. case 10: return "a"; break;
  2096. case 11: return "b"; break;
  2097. case 12: return "c"; break;
  2098. case 13: return "d"; break;
  2099. case 14: return "e"; break;
  2100. case 15: return "f"; break;
  2101. default: return "0";
  2102. }
  2103. }
  2104. else
  2105. return s1.toString();
  2106. }
  2107. <!--
  2108. /* =============================================================================== */
  2109. /* Windows Colour Dialog - IE browsers only */
  2110. /* =============================================================================== */
  2111. <out:if test="$browser = 'ie'">
  2112. function moreColours(sInitColour)
  2113. {
  2114. var IEDom = document.all; //IE only
  2115. if (sInitColour == null)
  2116. //display color dialog box
  2117. var sColor = IEDom.dlgHelper.ChooseColorDlg();
  2118. else
  2119. var sColor = IEDom.dlgHelper.ChooseColorDlg(sInitColour);
  2120. //change decimal to hex
  2121. sColor = sColor.toString(16);
  2122. //add extra zeroes if hex number is less than 6 digits
  2123. if (sColor.length &lt; 6)
  2124. {
  2125. var sTempString = "000000".substring(0,6-sColor.length);
  2126. sColor = sTempString.concat(sColor);
  2127. }
  2128. selectColour("#" + sColor);
  2129. }
  2130. </out:if>
  2131. -->
  2132. </script>
  2133. <!-- Create the Dialog Helper Object
  2134. <OBJECT id="dlgHelper" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT>
  2135. -->
  2136. </div>
  2137. </xsl:template>
  2138. <!--
  2139. Simple template that can walk through a set of elements and render them as tabs.
  2140. -->
  2141. <xsl:template match="cp:tabControl">
  2142. <out:template name="renderTabs">
  2143. <out:param name="tabs"/>
  2144. <out:param name="schedule" select="false()"/>
  2145. <out:param name="scroll" select="false()"/>
  2146. <!-- the tabs -->
  2147. <out:variable name="daTabs">
  2148. <table summary="" cellpadding="0" cellspacing="0" border="0" width="100%" id="tabs" role="tablist">
  2149. <tr>
  2150. <out:for-each select="$tabs/*">
  2151. <!-- left tab decor -->
  2152. <td>
  2153. <out:choose>
  2154. <out:when test="@selected='true'">
  2155. <out:attribute name="class">tabSelectedEdgeBorder</out:attribute>
  2156. <div class="tabLeftSelected flippingImages">&#160;</div>
  2157. </out:when>
  2158. <out:otherwise>
  2159. <out:attribute name="class">tabNormalEdgeBorder</out:attribute>
  2160. <div class="tabLeftNormal flippingImages">&#160;</div>
  2161. </out:otherwise>
  2162. </out:choose>
  2163. </td>
  2164. <!-- the tab -->
  2165. <out:choose>
  2166. <out:when test="@selected='true'">
  2167. <td nowrap="nowrap" class="tabSelected">
  2168. <div id="selectedTab" style="position:relative;" aria-selected="true" role="tab" onkeydown="actionTabs(event);">
  2169. <out:if test="$isBidiEnabled = 'true'">
  2170. <out:attribute name="dir"><out:value-of select="xtsext:getBTD(string(.), $baseTextDirection, $productLocale)"/></out:attribute>
  2171. </out:if>
  2172. <out:copy-of select="./*|text()"/>
  2173. </div>
  2174. </td>
  2175. </out:when>
  2176. <out:otherwise>
  2177. <td nowrap="nowrap" class="tabNormal" >
  2178. <div id="nonSelectedTab_{'{position()}'}" role="tab" aria-selected="false" onkeydown="actionTabs(event);">
  2179. <out:if test="$isBidiEnabled = 'true'">
  2180. <out:attribute name="dir"><out:value-of select="xtsext:getBTD(string(.), $baseTextDirection, $productLocale)"/></out:attribute>
  2181. </out:if>
  2182. <out:copy-of select="./*|text()"/>
  2183. </div>
  2184. </td>
  2185. </out:otherwise>
  2186. </out:choose>
  2187. <!-- right tab decor -->
  2188. <td>
  2189. <out:choose>
  2190. <out:when test="@selected='true'">
  2191. <out:attribute name="class">tabSelectedEdgeBorder</out:attribute>
  2192. <div class="tabRightSelected flippingImages">&#160;</div>
  2193. </out:when>
  2194. <out:otherwise>
  2195. <out:attribute name="class">tabNormalEdgeBorder</out:attribute>
  2196. <div class="tabRightNormal flippingImages">&#160;</div>
  2197. </out:otherwise>
  2198. </out:choose>
  2199. </td>
  2200. <!-- tab spacer -->
  2201. <out:if test="position() != last()">
  2202. <td valign="bottom"><div class="tabSpacer"/></td>
  2203. </out:if>
  2204. </out:for-each>
  2205. <out:if test="not($schedule)">
  2206. <td class="tabTail">&#160;</td>
  2207. </out:if>
  2208. </tr>
  2209. </table>
  2210. </out:variable>
  2211. <!-- Render tabs with scroll control -->
  2212. <div>
  2213. <out:if test="not($schedule)">
  2214. <out:attribute name="class">tabBarContainer</out:attribute>
  2215. </out:if>
  2216. <script language="javascript">
  2217. function actionTabs(evt) {
  2218. evt = evt != null ? evt : window.event;
  2219. var e = evt.srcElement ? evt.srcElement : evt.target;
  2220. if (evt.keyCode == 37 || evt.keyCode == 38) {
  2221. var tabbar = e.parentNode.parentNode;
  2222. var tds = tabbar.childNodes;
  2223. var newTab = null;
  2224. for (var i = 0, len = tds.length; i &lt; len; i++) {
  2225. if (tds[i].className == "tabSelected") {
  2226. if (newTab == null) {
  2227. return;
  2228. } else {
  2229. location.href = newTab.childNodes[0].childNodes[0].href;
  2230. }
  2231. } else if (tds[i].className == "tabNormal") {
  2232. newTab = tds[i];
  2233. }
  2234. }
  2235. } else if (evt.keyCode == 39 || evt.keyCode == 40) {
  2236. var tabbar = e.parentNode.parentNode;
  2237. var tds = tabbar.childNodes;
  2238. var newTab = null;
  2239. for (var i = tds.length; --i;) {
  2240. if (tds[i].className == "tabSelected") {
  2241. if (newTab == null) {
  2242. return;
  2243. } else {
  2244. location.href = newTab.childNodes[0].childNodes[0].href;
  2245. }
  2246. } else if (tds[i].className == "tabNormal") {
  2247. newTab = tds[i];
  2248. }
  2249. }
  2250. }
  2251. }
  2252. </script>
  2253. <table summary="" cellspacing="0" cellpadding="0" width="100%" role="presentation">
  2254. <tr>
  2255. <out:choose>
  2256. <out:when test="$scroll">
  2257. <td valign="bottom" style="position:relative;width:100%;top:0px;">
  2258. <div id="tabWindow" onresize="tabEvalScroll();" role="tablist">
  2259. <out:attribute name="style">
  2260. <out:text/>overflow:hidden;width:100%<out:text/>
  2261. <out:if test="$browser='ie'">;position:absolute</out:if>
  2262. </out:attribute>
  2263. <out:copy-of select="$daTabs"/>
  2264. </div>
  2265. </td>
  2266. </out:when>
  2267. <out:otherwise>
  2268. <td valign="bottom">
  2269. <out:copy-of select="$daTabs"/>
  2270. </td>
  2271. </out:otherwise>
  2272. </out:choose>
  2273. <out:if test="$scroll">
  2274. <script language="JavaScript">
  2275. var g_sImageRoot = "<out:value-of select="xtsext:javascriptencode(string($skin_shared_images))"/>";
  2276. </script>
  2277. <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/tabs.js"></script>
  2278. <td>
  2279. <div id="tabControlLeftContainer" tabindex="0" accesskey="1"
  2280. class="tabScrollButton"
  2281. onkeypress="if(event.keyCode==9)return true; else if (event.keyCode==13 || event.keyCode==32 || event.charCode==32) tabControlDBLClick('left', event); return false;"
  2282. onmouseover = "tabControlMouseOver(this)"
  2283. onmouseout = "tabControlMouseOut(this)"
  2284. ondblclick = "tabControlDBLClick('left', event); return true;"
  2285. onmousedown = "tabControlPress('left', event); return true;"
  2286. onmouseup = "tabControlRelease(); return true;"
  2287. role="button">
  2288. <out:attribute name="title"><xts:string id="IDS_SCROLL_LEFT"/></out:attribute>
  2289. <img id="tabControlLeft" src="{'{$skin_shared_images}'}action_scroll_left.gif" class="flippingImages">
  2290. <out:attribute name="alt"><xts:string id="IDS_SCROLL_LEFT"/></out:attribute>
  2291. </img>
  2292. </div>
  2293. </td>
  2294. <td>
  2295. <div id="tabControlRightContainer" tabindex="0" accesskey="2"
  2296. class="tabScrollButton"
  2297. onkeypress="if(event.keyCode==9)return true; else if (event.keyCode==13 || event.keyCode==32 || event.charCode==32) tabControlDBLClick('right', event); return true;"
  2298. onmouseover = "tabControlMouseOver(this)"
  2299. onmouseout = "tabControlMouseOut(this)"
  2300. ondblclick = "tabControlDBLClick('right', event); return true;"
  2301. onmousedown = "tabControlPress('right', event); return true;"
  2302. onmouseup = "tabControlRelease(); return true;"
  2303. role="button">
  2304. <out:attribute name="title"><xts:string id="IDS_SCROLL_RIGH"/></out:attribute>
  2305. <img id="tabControlRight" src="{'{$skin_shared_images}'}action_scroll_right.gif" class="flippingImages">
  2306. <out:attribute name="alt"><xts:string id="IDS_SCROLL_RIGH"/></out:attribute>
  2307. </img>
  2308. </div>
  2309. </td>
  2310. </out:if>
  2311. </tr>
  2312. </table>
  2313. </div>
  2314. </out:template>
  2315. </xsl:template>
  2316. <!-- the main engine -->
  2317. <xsl:template match="*">
  2318. <xsl:copy>
  2319. <xsl:copy-of select="@*"/>
  2320. <xsl:apply-templates/>
  2321. </xsl:copy>
  2322. </xsl:template>
  2323. </xsl:stylesheet>