framework.xsl 119 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553
  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, 2015
  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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  10. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  11. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  12. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  13. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  14. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  15. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  16. xmlns:out="dummy-uri"
  17. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="utml bus cm cf cp dp xts xtsext">
  18. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  19. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  20. <!--
  21. This stylesheet (framework.xsl) consists of the following templates:
  22. cf:dynamicDropDown - creates a drop list where the user can type in the edit field to filter the available values
  23. cf:dynamicDiv - used to dynamically show/hide parts of the page (works with all Bering browsers)
  24. cf:dynamicSection - used to produce collapsible sections that are functional in Bering supported browsers
  25. cf:dynamicExpandingSection - render collapsible sections (works with all Bering browsers)
  26. cf:sortList - render a sortable list box.
  27. cf:column (mode header) - render column headers.
  28. cf:column (mode content) - render column content.
  29. cf:main-pager-section (used to produce list pager on main pages - Public Folders / My Folders)
  30. cf-main-pager-java-section - generate required java script.
  31. cf-main-pager-button-section - used with main-pager-section
  32. cf:do-the-path-link - render the search path.
  33. -->
  34. <!--
  35. cf:dynamicDropDown
  36. creates a drop list where the user can type in the edit field to filter the available values.
  37. You'll need to include dynDropDown.js for this template to work.
  38. @name: unique if for the control
  39. @array: name/value javascript array to populate the dropdown list
  40. @selectedName: default name for the edit field
  41. @selectedValue: default value
  42. @tooltipID: tooltip string ID
  43. @form: form name
  44. @first: boolen letting us know if we should put the javascript
  45. @filterList: Should the list of choices be filtered when the user types
  46. @valiated: javascript function to call when edit field changes. function take must take two parameters. The control that is being changed,
  47. and a boolean (ture|false) depending if the current value is valid (i.e. found in the array)
  48. @width: of the field to be displayed. The default is 200.
  49. @modifiable: if not modifiable then the utml input will show only the value.
  50. @useUtml: indicates if we should use utml or regular inputs.
  51. @track: used for utml:input to track values.
  52. @update: indicates if this utml input can be updated.
  53. @readonly: indicates if it is readonly.
  54. -->
  55. <xsl:template match="cf:dynamicDropDown">
  56. <xsl:variable name="width">
  57. <xsl:choose>
  58. <xsl:when test="@width != ''">
  59. <xsl:value-of select="@width"/>
  60. </xsl:when>
  61. <xsl:otherwise>
  62. <xsl:value-of select="'200'"/>
  63. </xsl:otherwise>
  64. </xsl:choose>
  65. </xsl:variable>
  66. <out:variable name="modifiable">
  67. <xsl:choose>
  68. <xsl:when test="@modifiable != ''">
  69. <out:value-of select="{@modifiable}"/>
  70. </xsl:when>
  71. <xsl:otherwise>
  72. <xsl:value-of select="'true'"/>
  73. </xsl:otherwise>
  74. </xsl:choose>
  75. </out:variable>
  76. <out:variable name="nameValue">
  77. <out:value-of select="{@selectedName}"/>
  78. </out:variable>
  79. <!-- keep the value of the selected hint -->
  80. <xsl:choose>
  81. <xsl:when test="@useUtml and @useUtml ='true'">
  82. <utml:input type="hidden">
  83. <utml:value><out:value-of select="{@selectedValue}"/></utml:value>
  84. <utml:name><out:value-of select="{@name}"/></utml:name>
  85. <xsl:if test="@track != ''">
  86. <utml:track><xsl:value-of select="@track"/></utml:track>
  87. </xsl:if>
  88. <out:attribute name="id"><out:value-of select="{@name}"/></out:attribute>
  89. <utml:read-only>
  90. <out:value-of select="not($modifiable)"/>
  91. </utml:read-only>
  92. <utml:update>
  93. <xsl:choose>
  94. <xsl:when test="@update='false'">false</xsl:when>
  95. <xsl:otherwise>true</xsl:otherwise>
  96. </xsl:choose>
  97. </utml:update>
  98. </utml:input>
  99. </xsl:when>
  100. <xsl:otherwise>
  101. <input type="hidden">
  102. <xsl:if test="@selectedValue and @selectedValue !=''">
  103. <out:attribute name="value"><out:value-of select="{@selectedValue}"/></out:attribute>
  104. </xsl:if>
  105. <out:attribute name="name"><out:value-of select="{@name}"/></out:attribute>
  106. <out:attribute name="id"><out:value-of select="{@name}"/></out:attribute>
  107. </input>
  108. </xsl:otherwise>
  109. </xsl:choose>
  110. <table summary="" cellpadding="0" cellspacing="0" border="0" role="presentation">
  111. <tr>
  112. <td class="tabletext">
  113. <!-- the edit field -->
  114. <xsl:choose>
  115. <xsl:when test="@useUtml and @useUtml = 'true'">
  116. <utml:input type="text" style="width: {$width}px" size="20" utml:track="true">
  117. <utml:value name="value"><out:value-of select="$nameValue"/></utml:value>
  118. <xsl:if test="@track != ''">
  119. <utml:track><xsl:value-of select="@track"/></utml:track>
  120. </xsl:if>
  121. <out:if test="{@readonly}='true'">
  122. <out:attribute name="readonly"><out:value-of select="{@readonly}"/></out:attribute>
  123. </out:if>
  124. <xsl:if test="normalize-space(@title) != ''">
  125. <out:attribute name="title"><out:value-of select="normalize-space({@title})"/></out:attribute>
  126. </xsl:if>
  127. <utml:name><out:value-of select="concat('editField_',{@name})"/></utml:name>
  128. <out:attribute name="autocomplete"><out:value-of select="'off'"/></out:attribute>
  129. <out:attribute name="onfocus">setGlobals('<out:value-of select="xtsext:javascriptencode(string({@name}))"/>',<out:value-of select="xtsext:javascriptencode(string({@array}))"/>, '<xsl:value-of select="xtsext:javascriptencode(string(@validate))"/>', '<xsl:value-of select="xtsext:javascriptencode(string(@filterList))"/>');handleEditFieldFocus();</out:attribute>
  130. <out:attribute name="id"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
  131. <xsl:if test="@aria-labelledby and @aria-labelledby != ''">
  132. <out:attribute name="aria-labelledby"><out:value-of select="{@aria-labelledby}"/></out:attribute>
  133. </xsl:if>
  134. <xsl:if test="@onblur and @onblur != ''">
  135. <out:attribute name="onblur"><xsl:value-of select="@onblur"/>( this );</out:attribute>
  136. </xsl:if>
  137. <utml:update>
  138. <xsl:choose>
  139. <xsl:when test="@update != '' and @update='false'">false</xsl:when>
  140. <xsl:otherwise>true</xsl:otherwise>
  141. </xsl:choose>
  142. </utml:update>
  143. <utml:read-only>
  144. <out:value-of select="not($modifiable)"/>
  145. </utml:read-only>
  146. </utml:input>
  147. </xsl:when>
  148. <xsl:otherwise>
  149. <input style="width:{$width}px;">
  150. <xsl:if test="@selectedName and @selectedName!=''">
  151. <out:attribute name="value"><out:value-of select="{@selectedName}"/></out:attribute>
  152. </xsl:if>
  153. <out:attribute name="onfocus">setGlobals('<out:value-of select="xtsext:javascriptencode(string({@name}))"/>',<out:value-of select="xtsext:javascriptencode(string({@array}))"/>, '<xsl:value-of select="xtsext:javascriptencode(string(@validate))"/>', '<xsl:value-of select="xtsext:javascriptencode(string(@filterList))"/>');handleEditFieldFocus();</out:attribute>
  154. <out:attribute name="name"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
  155. <out:attribute name="id"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
  156. <xsl:if test="@aria-labelledby and @aria-labelledby != ''">
  157. <out:attribute name="aria-labelledby"><out:value-of select="{@aria-labelledby}"/></out:attribute>
  158. </xsl:if>
  159. </input>
  160. </xsl:otherwise>
  161. </xsl:choose>
  162. </td>
  163. <!-- do not show this if the field not modifiable -->
  164. <td>
  165. <!-- the down arrow -->
  166. <out:if test="$modifiable = 'true'">
  167. <img border="0" src="{'{$image_root}'}drop_down_arrow.gif" role="button" aria-haspopup="true" tabindex="0">
  168. <xsl:if test="@tooltipID">
  169. <out:attribute name="alt"><xts:string id="{@tooltipID}"/></out:attribute>
  170. </xsl:if>
  171. <out:variable name="action">setGlobals('<out:value-of select="xtsext:javascriptencode(string({@name}))"/>', <out:value-of select="xtsext:javascriptencode(string({@array}))"/>, '<xsl:value-of select="xtsext:javascriptencode(string(@validate))"/>', '<xsl:value-of select="xtsext:javascriptencode(string(@filterList))"/>');doDropDown('downArrow');</out:variable>
  172. <out:attribute name="onclick"><out:value-of select="$action"/></out:attribute>
  173. <out:attribute name="onkeyup">javascript:if(event.keyCode==13) {<out:value-of select="$action"/>}</out:attribute>
  174. </img>
  175. </out:if>
  176. </td>
  177. </tr>
  178. <tr>
  179. <td>
  180. <!-- div which will contain the select control (i.e. the dropdown) -->
  181. <div style="width:{$width}px; display:none; position:absolute; border: 0px; padding: 0px; overflow:off;">
  182. <out:attribute name="id"><out:value-of select="concat('div_',{@name})"/></out:attribute>
  183. </div>
  184. </td>
  185. </tr>
  186. </table>
  187. </xsl:template>
  188. <!--
  189. Template - cf:dynamicDiv:
  190. This template is used to produce a div that can be hidden or shown. The surrounding UI
  191. will dynamically move depending on if the div is visible or hidden.
  192. Supported by all Bering browsers.
  193. @visible - compile time check to determine if the div is visible (true/false)
  194. @runTimeVisibleCheck - runtime check to determine if the div is visible
  195. -->
  196. <xsl:template match="cf:dynamicDiv">
  197. <xsl:if test="@name = //cf:dynamicDiv[1]/@name">
  198. <script language="javascript">
  199. function toggledynamicDiv(name)
  200. {
  201. var objDiv = document.getElementById(name);
  202. if (objDiv == null) {
  203. return;
  204. }
  205. if(objDiv.style.display == 'none')
  206. {
  207. showDynamicDiv(name);
  208. }
  209. else
  210. {
  211. hideDynamicDiv(name);
  212. }
  213. }
  214. function showDynamicDiv(name)
  215. {
  216. var objDiv = document.getElementById(name);
  217. if (objDiv != null) {
  218. objDiv.style.display='';
  219. }
  220. }
  221. function hideDynamicDiv(name)
  222. {
  223. var objDiv = document.getElementById(name);
  224. if (objDiv != null) {
  225. objDiv.style.display='none';
  226. }
  227. }
  228. </script>
  229. </xsl:if>
  230. <div id="{@name}">
  231. <out:attribute name="style">
  232. <xsl:choose>
  233. <xsl:when test="@visible='true'">display:</xsl:when>
  234. <xsl:when test="@runTimeVisibleCheck and @runTimeVisibleCheck!=''">
  235. <out:choose>
  236. <out:when test="{@runTimeVisibleCheck}">display:</out:when>
  237. <out:otherwise>display:none</out:otherwise>
  238. </out:choose>
  239. </xsl:when>
  240. <xsl:otherwise>display:none</xsl:otherwise>
  241. </xsl:choose>
  242. </out:attribute>
  243. <xsl:apply-templates/>
  244. </div>
  245. </xsl:template>
  246. <!--
  247. Template - cf:dynamicSection:
  248. This template is used to produce collapsible sections that are functional in Bering supported browsers.
  249. The UI interface for this functionality is represented by a hyperlink followed by chevrons
  250. when the section is expanded and inverted chevrons when the section is collapsed.
  251. Operation:
  252. Makes a division displayed inline and visible or not displayed and invisible.
  253. -->
  254. <xsl:template match="cf:dynamicExpandingSection">
  255. <xsl:call-template name="generate_dynamicExpandingSectionTop"/>
  256. <xsl:call-template name="generate_dynamicExpandingSectionBody"/>
  257. </xsl:template>
  258. <xsl:template name="generate_dynamicExpandingSectionTop">
  259. <xsl:if test="@name = //cf:dynamicExpandingSection[1]/@name or @name = //cf:dynamicExpandingSectionTop/@name">
  260. <script language="javascript">
  261. //images used for the expanding section
  262. var imgUp = new Image();
  263. var imgDown = new Image();
  264. imgUp.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_collapse.gif";
  265. imgDown.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_expand.gif";
  266. function toggleDynamicSection(name)
  267. {
  268. if(document.getElementById(name).style.display == 'none')
  269. {
  270. showDynamicSection(name);
  271. }
  272. else
  273. {
  274. hideDynamicSection(name);
  275. }
  276. <xsl:if test="string(@callback-func) != ''">
  277. <xsl:value-of select="@callback-func"/>
  278. </xsl:if>
  279. }
  280. function showDynamicSection(name)
  281. {
  282. document.getElementById(name).style.display='';
  283. var imgName = document.getElementById('img' + name);
  284. imgName.src = imgUp.src;
  285. imgName.setAttribute('alt','<xts:string id="IDS_SECTION_COLLAPSE" encode="javascript"/>');
  286. imgName.setAttribute('title','<xts:string id="IDS_SECTION_COLLAPSE" encode="javascript"/>');
  287. setStateValue(name, "1");
  288. var controllerEl = document.getElementById(name);
  289. if (controllerEl != null){
  290. controllerEl.setAttribute("aria-expanded","true");
  291. }
  292. }
  293. function hideDynamicSection(name)
  294. {
  295. document.getElementById(name).style.display='none';
  296. var imgName = document.getElementById('img' + name);
  297. imgName.src = imgDown.src;
  298. imgName.setAttribute('alt','<xts:string id="IDS_SECTION_EXPAND" encode="javascript"/>');
  299. imgName.setAttribute('title','<xts:string id="IDS_SECTION_EXPAND" encode="javascript"/>');
  300. setStateValue(name, "0");
  301. var controllerEl = document.getElementById(name);
  302. if (controllerEl != null){
  303. controllerEl.setAttribute("aria-expanded","false");
  304. }
  305. }
  306. </script>
  307. </xsl:if>
  308. <cp:dynamicSectionTop>
  309. <xsl:copy-of select="@*"/>
  310. </cp:dynamicSectionTop>
  311. </xsl:template>
  312. <xsl:template name="generate_dynamicExpandingSectionBody">
  313. <div id="{@name}" role="region" >
  314. <!-- need to make sure that we don't have both an aria label and an aria-labelled by -->
  315. <xsl:choose>
  316. <xsl:when test="@label">
  317. <out:attribute name="aria-label">
  318. <xts:string id="{@label}"/>
  319. </out:attribute>
  320. </xsl:when>
  321. <xsl:otherwise>
  322. <out:attribute name="aria-labelledby"><xsl:value-of select="@name"/>_title</out:attribute>
  323. </xsl:otherwise>
  324. </xsl:choose>
  325. <out:attribute name="style">
  326. <out:choose>
  327. <out:when test="@visible='true'">display:</out:when>
  328. <out:otherwise>display:none</out:otherwise>
  329. </out:choose>
  330. </out:attribute>
  331. <out:attribute name="aria-expanded">
  332. <out:value-of select="boolean(@visible)"/>
  333. </out:attribute>
  334. <xsl:apply-templates/>
  335. </div>
  336. <xsl:if test="not(@initialize = 'false')">
  337. <script language="javascript">
  338. if (getSessionValue("<xsl:value-of select="@name"/>") == 1 )
  339. showDynamicSection("<xsl:value-of select="@name"/>");
  340. else
  341. hideDynamicSection("<xsl:value-of select="@name"/>");
  342. </script>
  343. </xsl:if>
  344. </xsl:template>
  345. <xsl:template match="cf:dynamicExpandingSectionTop">
  346. <xsl:call-template name="generate_dynamicExpandingSectionTop"/>
  347. </xsl:template>
  348. <xsl:template match="cf:dynamicExpandingSectionBody">
  349. <xsl:call-template name="generate_dynamicExpandingSectionBody"/>
  350. </xsl:template>
  351. <!--
  352. Template - cf:sortList:
  353. This template creates a sortable list box.
  354. The attributes that can be used with this tag are:
  355. @name - name of the listbox
  356. @size - listbox size (no default)
  357. @form - name of the form we are in
  358. @array - name of the javascript array used
  359. sort array order
  360. 1) position - starting will be decending position
  361. 2) what you want to show up in the list - viewable portion
  362. 3) what you want to be passed with the postion for the item
  363. 4) place holder - empty value used for keeping selections selected
  364. - any others can be used for other ordering with the sortList function
  365. final passed value format example:
  366. <param name="name_of_sort_list">position(#1), passed info(#3)</param>
  367. to create this the ok button has to execute setList(document.formname.listName, sortarray)
  368. Operation:
  369. Produces a list of objects in a table with hyperlinks at the bottom right-hand corner which are used to manipulate
  370. the order of the list.
  371. Actions:
  372. up - move a selected object up one position in the list.
  373. down - move a selected object down one position in the list.
  374. top - move a selected object to the top of the list.
  375. bottom - move a selected object to the bottom of the list.
  376. -->
  377. <xsl:template match="cf:sortList">
  378. <out:variable name="cf_firstListName"><xsl:value-of select="//cf:sortList/@name"/></out:variable>
  379. <out:variable name="cf_listName"><xsl:value-of select="@name"/></out:variable>
  380. <out:variable name="action"><xsl:value-of select="@action"/></out:variable>
  381. <out:if test="$cf_listName = $cf_firstListName">
  382. <script language="javascript">
  383. function moveOptions(what, sortArray, myAction) {
  384. // If there is nothing to perform an action on then get out of here !!
  385. if (sortArray == null || sortArray.length == 0)
  386. return;
  387. //if there isn't a value, set them
  388. if (sortArray[sortArray.length - 1][0] == 0 &amp;&amp; sortArray[0][0] == 0)
  389. revalue(sortArray);
  390. //mark all selected choices as selected
  391. for (var i=0; i &lt; what.options.length; i++) {
  392. //if it is selected and the one before this isn't
  393. if (what[i].selected == true)
  394. sortArray[what[i].value][3] = "selected";
  395. }
  396. //move up
  397. if (myAction == 'up') {
  398. var optionAbove = '';
  399. var currentValue = '';
  400. var tempValue = '';
  401. for (var i=1; i &lt; what.options.length; i++) {
  402. //if it is selected and the one before this isn't
  403. if ((what[i].selected == true) &amp;&amp; (what[i-1].selected == false)) {
  404. optionAbove = i-1;
  405. currentValue = sortArray[what[i].value][0];
  406. sortArray[what[i].value][0] = sortArray[what[i-1].value][0];
  407. }
  408. //if it is selected and the one before this is
  409. if ((what[i].selected == true) &amp;&amp; (what[i-1].selected == true) &amp;&amp; (currentValue != '')) {
  410. tempValue = sortArray[what[i].value][0];
  411. sortArray[what[i].value][0] = currentValue;
  412. currentValue = tempValue;
  413. }
  414. //take the option above the top selected and move it down
  415. if (what[i].selected == true &amp;&amp; (currentValue != '')) {
  416. if (what.options.length == i + 1)
  417. sortArray[what[optionAbove].value][0] = currentValue;
  418. else if (what[i+1].selected == false)
  419. sortArray[what[optionAbove].value][0] = currentValue;
  420. }
  421. }
  422. }
  423. // move down
  424. if (myAction == 'down') {
  425. var optionBelow = '';
  426. var currentValue = '';
  427. var tempValue = '';
  428. for (var i = what.options.length - 2; i >= 0; i--) {
  429. //if it is selected and the one after this isn't
  430. if ((what[i].selected == true) &amp;&amp; (what[i + 1].selected == false)) {
  431. optionBelow = i + 1;
  432. currentValue = sortArray[what[i].value][0];
  433. sortArray[what[i].value][0] = sortArray[what[i+1].value][0];
  434. }
  435. //if it is selected and the one before this is
  436. if ((what[i].selected == true) &amp;&amp; (what[i+1].selected == true) &amp;&amp; (currentValue != '')) {
  437. tempValue = sortArray[what[i].value][0];
  438. sortArray[what[i].value][0] = currentValue;
  439. currentValue = tempValue;
  440. }
  441. //take the option above the top selected and move it down
  442. if (what[i].selected == true &amp;&amp; (currentValue != '')) {
  443. if (i &lt;= 0)
  444. sortArray[what[optionBelow].value][0] = currentValue;
  445. else if (what[i - 1].selected == false)
  446. sortArray[what[optionBelow].value][0] = currentValue;
  447. }
  448. }
  449. }
  450. // move to top
  451. if (myAction == 'top') {
  452. var topValue = sortArray[what[0].value][0];
  453. for (var i = what.options.length - 1; i >= 0; i--) {
  454. //if it is selected and the one after this isn't
  455. if (what[i].selected == true) {
  456. sortArray[what[i].value][0] = topValue - (-1);
  457. topValue++;
  458. }
  459. }
  460. }
  461. // move to bottom
  462. if (myAction == 'bottom') {
  463. var topValue = sortArray[what[(what.options.length - 1)].value][0];
  464. for (var i = 0; i &lt; what.options.length; i++) {
  465. //if it is selected and the one after this isn't
  466. if (what[i].selected == true) {
  467. sortArray[what[i].value][0] = topValue - 1;
  468. topValue = topValue - 1;
  469. }
  470. }
  471. }
  472. //call the sort
  473. sortIndex(what, sortArray);
  474. }
  475. //delete an option
  476. function deleteOption(what, index) {
  477. what.options[index] = null;
  478. }
  479. //add an option
  480. function addOption(what, text, value, isHidden) {
  481. var defaultSelected = false;
  482. var selected = false;
  483. var optionName = new Option(text, value, defaultSelected, selected);
  484. optionName.lang = '<out:value-of select="$contentLocale"/>';
  485. if(isHidden=="true")
  486. optionName.className="inactiveText";
  487. what.options[what.length] = optionName;
  488. what.options[what.length-1].selected = false;
  489. }
  490. //sort the options by value
  491. function sortIndex(what, sortArray) {
  492. sortArray.sort(function(a,b) { return a[0]-b[0]; });
  493. //create selected options array and delete options
  494. selectedOptions = new Array();
  495. for (var i=(what.options.length - 1); i > -1; i--) {
  496. selectedOptions[i] = what[i].selected;
  497. deleteOption(what,i);
  498. }
  499. //delete all the options
  500. for (var i=(what.options.length - 1); i > -1; i--) {
  501. deleteOption(what,i);
  502. }
  503. //switch the array around to make the top the highest values
  504. sortArray.reverse();
  505. //add the options back in order
  506. var isHidden = 'false';
  507. for (var i=0; i &lt; sortArray.length; i++) {
  508. if(sortArray[i].length > 7)
  509. isHidden = sortArray[i][7];
  510. addOption(what, sortArray[i][1], i, isHidden)
  511. if (sortArray[i][3] != '')
  512. what[i].selected=true;
  513. }
  514. revalue(sortArray);
  515. }
  516. //give the value to each item based on position
  517. function revalue(sortArray) {
  518. for (var i=0; i &lt; sortArray.length; i++){
  519. sortArray[i][0] = sortArray.length - i;
  520. sortArray[i][3] = "";
  521. }
  522. }
  523. //sort the options by value
  524. function sortList(what, sortArray, sortValue) {
  525. //this will contain what part of the array to sor
  526. var sortOn = sortValue.substring(1, sortValue.length);
  527. //sort the values
  528. sortArray.sort(
  529. function(a, b) {
  530. if (a[sortOn] &lt; b[sortOn])
  531. return -1;
  532. if (a[sortOn] &gt; b[sortOn])
  533. return 1;
  534. return 0;
  535. });
  536. //delete all the options
  537. for (var i=(what.options.length - 1); i > -1; i--) {
  538. deleteOption(what,i);
  539. }
  540. //switch the array around if the order is descending
  541. if (sortValue.substring(0,1) == 'd')
  542. sortArray.reverse();
  543. //add the options back in order
  544. for (var i=0; i &lt; sortArray.length; i++) {
  545. addOption(what,sortArray[i][1],i)
  546. }
  547. revalue(sortArray);
  548. }
  549. //set all the values the array value
  550. function setList(what, sortArray) {
  551. if (what) {
  552. for (var i=0; i &lt; what.options.length; i++){
  553. positionInArray = what[i].value;
  554. sa = sortArray[positionInArray];
  555. what[i].value = sa[0] + ',' + sa[2];
  556. <!--
  557. Fix BUG 465693 - Sort dialogue fails.
  558. CM in Bering does strict type checking, so the 6th entry contains the objectClass that gets
  559. extracted in submit.xts and used to define the element name in save.xts.
  560. -->
  561. if(sa.length &gt; 6)
  562. {
  563. what[i].value += ',' + sa[6];
  564. }
  565. what[i].selected = true;
  566. }
  567. }
  568. }
  569. </script>
  570. </out:if>
  571. <cp:sortListDisplay>
  572. <cp:section1>
  573. <utml:select name="{@name}" multiple="multiple" size="{@size}">
  574. <xsl:if test="@id">
  575. <xsl:attribute name="id">
  576. <xsl:value-of select="@id"/>
  577. </xsl:attribute>
  578. </xsl:if>
  579. <xsl:if test="@onClick">
  580. <xsl:attribute name="onClick">
  581. <xsl:value-of select="@onClick"/>
  582. </xsl:attribute>
  583. </xsl:if>
  584. <xsl:if test="@class">
  585. <xsl:attribute name="class">
  586. <xsl:value-of select="@class"/>
  587. </xsl:attribute>
  588. </xsl:if>
  589. <xsl:if test="@aria-labelledby">
  590. <xsl:attribute name="aria-labelledby">
  591. <xsl:value-of select="@aria-labelledby"/>
  592. </xsl:attribute>
  593. </xsl:if>
  594. <utml:default-value>
  595. <out:value-of select="'none'"/>
  596. </utml:default-value>
  597. <xsl:if test="cf:readOnlyFlag">
  598. <out:if test="{cf:readOnlyFlag}">
  599. <out:attribute name="disabled">disabled</out:attribute>
  600. </out:if>
  601. </xsl:if>
  602. <xsl:apply-templates select="cf:initContent/*"/>
  603. <utml:option value="deleteme">
  604. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  605. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  606. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  607. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  608. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  609. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  610. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  611. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  612. <out:text/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<out:text/>
  613. </utml:option>
  614. </utml:select>
  615. </cp:section1>
  616. <xsl:choose>
  617. <xsl:when test="@mode='mypages'">
  618. <cp:section3>
  619. <out:if test="not({cf:readOnlyFlag})">
  620. <table summary="" border="0" width="100%" cellpadding="2" cellspacing="0">
  621. <tr>
  622. <td>
  623. <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'top')">
  624. <img border="0" src="{'{$image_root}'}move_top.gif">
  625. <out:attribute name="alt"><xts:string id="IDS_SORT_TOP"/></out:attribute>
  626. </img>
  627. </a>
  628. </td>
  629. </tr>
  630. <tr>
  631. <td>
  632. <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'up')">
  633. <img border="0" src="{'{$image_root}'}move_up.gif">
  634. <out:attribute name="alt"><xts:string id="IDS_SORT_UP"/></out:attribute>
  635. </img>
  636. </a>
  637. </td>
  638. </tr>
  639. <tr>
  640. <td>
  641. <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'down')">
  642. <img border="0" src="{'{$image_root}'}move_down.gif">
  643. <out:attribute name="alt"><xts:string id="IDS_SORT_DOWN"/></out:attribute>
  644. </img>
  645. </a>
  646. </td>
  647. </tr>
  648. <tr>
  649. <td>
  650. <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'bottom')">
  651. <img border="0" src="{'{$image_root}'}move_bottom.gif">
  652. <out:attribute name="alt"><xts:string id="IDS_SORT_BOTTOM"/></out:attribute>
  653. </img>
  654. </a>
  655. </td>
  656. </tr>
  657. </table>
  658. </out:if>
  659. </cp:section3>
  660. <cp:section2>
  661. <out:if test="not({cf:readOnlyFlag})">
  662. <xsl:apply-templates select="cf:sortAction/child::node()"/>
  663. </out:if>
  664. </cp:section2>
  665. </xsl:when>
  666. <xsl:otherwise>
  667. <cp:section2>
  668. <out:if test="$action!='none'">
  669. <table role="toolbar" aria-controls="sortList_{@tLabel}_{@parentLabel}_IDS_SORT_UP sortList_{@tLabel}_{@parentLabel}_IDS_SORT_DOWN sortList_{@tLabel}_{@parentLabel}_IDS_SORT_TOP sortList_{@tLabel}_{@parentLabel}_IDS_SORT_BOTTOM">
  670. <xsl:if test="@tLabel != ''">
  671. <xsl:attribute name="aria-labelledby"><xsl:value-of select="@tLabel"/><xsl:if test="@parentLabel != ''"><xsl:text> </xsl:text><xsl:value-of select="@parentLabel"/></xsl:if></xsl:attribute>
  672. </xsl:if>
  673. <tr class="formLink">
  674. <xsl:variable name="slalb">
  675. <xsl:value-of select="@tLabel"/><xsl:text> </xsl:text>
  676. <xsl:if test="@parentLabel != ''">
  677. <xsl:value-of select="@parentLabel"/><xsl:text> </xsl:text>
  678. </xsl:if>
  679. <xsl:text>sortList_</xsl:text>
  680. <xsl:value-of select="@tLabel"/><xsl:text>_</xsl:text><xsl:value-of select="@parentLabel"/><xsl:text>_</xsl:text>
  681. </xsl:variable>
  682. <td>
  683. <a id="sortList_{@tLabel}_{@parentLabel}_IDS_SORT_UP" aria-labelledby="{$slalb}IDS_SORT_UP" role="button" href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'up')"><xts:string id="IDS_SORT_UP"/></a>
  684. </td>
  685. <td>
  686. <a id="sortList_{@tLabel}_{@parentLabel}_IDS_SORT_DOWN" aria-labelledby="{$slalb}IDS_SORT_DOWN" role="button" href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'down')"><xts:string id="IDS_SORT_DOWN"/></a>
  687. </td>
  688. <td>
  689. <a role="button" id="sortList_{@tLabel}_{@parentLabel}_IDS_SORT_TOP" aria-labelledby="{$slalb}IDS_SORT_TOP" href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'top')"><xts:string id="IDS_SORT_TOP"/></a>
  690. </td>
  691. <td>
  692. <a role="button" id="sortList_{@tLabel}_{@parentLabel}_IDS_SORT_BOTTOM" aria-labelledby="{$slalb}IDS_SORT_BOTTOM" href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'bottom')"><xts:string id="IDS_SORT_BOTTOM"/></a>
  693. </td>
  694. </tr>
  695. </table>
  696. <xsl:apply-templates select="cf:sortAction/*"/>
  697. </out:if>
  698. </cp:section2>
  699. </xsl:otherwise>
  700. </xsl:choose>
  701. </cp:sortListDisplay>
  702. <script language="javascript">
  703. //delete the blank options
  704. if (document.<xsl:value-of select="@form"/>.<xsl:value-of select="@name"/>[(document.<xsl:value-of select="@form"/>.<xsl:value-of select="@name"/>.length - 1)].value == 'deleteme') {
  705. document.<xsl:value-of select="@form"/>.<xsl:value-of select="@name"/>[(document.<xsl:value-of select="@form"/>.<xsl:value-of select="@name"/>.length - 1)] = null;
  706. }
  707. </script>
  708. </xsl:template>
  709. <xsl:template match="cf:column" mode="header">
  710. <cp:columnHeader from="ctrl">
  711. <xsl:if test="@sort">
  712. <xsl:attribute name="sort"><xsl:value-of select="@sort"/></xsl:attribute>
  713. </xsl:if>
  714. <xsl:copy-of select="@width"/>
  715. <cp:text type="title"><xts:string id="{@name}"/></cp:text>
  716. </cp:columnHeader>
  717. </xsl:template>
  718. <xsl:template match="cf:column" mode="content">
  719. <cp:columnContent from="ctrl">
  720. <xsl:apply-templates select="child::*"/>
  721. <!--xsl:copy-of select="child::node()"/ -->
  722. </cp:columnContent>
  723. </xsl:template>
  724. <xsl:template match="text()">
  725. <xsl:copy-of select="."/>
  726. </xsl:template>
  727. <xsl:template match="*" mode="header">
  728. <xsl:copy>
  729. <xsl:copy-of select="@*"/>
  730. <xsl:apply-templates mode="header"/>
  731. </xsl:copy>
  732. </xsl:template>
  733. <xsl:template match="*" mode="content">
  734. <xsl:copy>
  735. <xsl:copy-of select="@*"/>
  736. <xsl:apply-templates mode="content"/>
  737. </xsl:copy>
  738. </xsl:template>
  739. <!--
  740. Template - cf:main-pager-section:
  741. This template creates the list-view display for the main pages (Public Folders / My Folders) and other
  742. pages.
  743. Attributes that can be used with this tag are:
  744. @name - the name to be used for the pager (important when more that one pager exists on a page).
  745. @validate - whether or not the validate routine should be called when switching pages.
  746. @virtualPage - whether this pager is to use all the objects CM returns in one request or if there are multiple requests.
  747. @form - the name of the document form.
  748. @width - the display size of the pager.
  749. This template uses cf-main-pager-button-section.
  750. -->
  751. <!-- create simple pager control, none of the fancy fancy -->
  752. <xsl:template match="cf:main-pager-section">
  753. <out:if test="true()">
  754. <!-- name of the current pager -->
  755. <xsl:variable name="cf_pname" select="@name"/>
  756. <!-- if the validate js function should be called when switching pages -->
  757. <xsl:variable name="validate" select="@validate"/>
  758. <!-- Generate a preDelete[pager name]() function for non-virtual pagers with form attribute -->
  759. <xsl:variable name="genDelete" select="@genDelete"/>
  760. <xsl:variable name="noEntriesMessage" select="@noEntriesMsgID"/>
  761. <xsl:variable name="noEntriesMsgID">
  762. <xsl:choose>
  763. <xsl:when test="string($noEntriesMessage)=''">IDS_PAGER_NO_ITEMS</xsl:when>
  764. <xsl:otherwise><xsl:value-of select="$noEntriesMessage"/></xsl:otherwise>
  765. </xsl:choose>
  766. </xsl:variable>
  767. <xsl:variable name="useUtml" select="@utml"/>
  768. <!-- this little piece builds the page and sort for all the other pagers to be used in this pagers links -->
  769. <out:variable name="cf_{$cf_pname}_pager_vars">
  770. <xsl:for-each select="//cf:main-pager-section">
  771. <xsl:if test="($cf_pname != '' and $cf_pname != @name)">
  772. <out:if test="key('env-param', 'm_{@name}section')">
  773. <out:value-of select="concat('&amp;m_', '{@name}', 'section=')"/><out:value-of select="key('env-param', 'm_{@name}section')"/>
  774. </out:if>
  775. </xsl:if>
  776. <out:if test="key('env-param', 'm_{@name}sort')">
  777. <out:value-of select="concat('&amp;m_', '{@name}', 'sort=')"/><out:value-of select="key('env-param', 'm_{@name}sort')"/>
  778. </out:if>
  779. </xsl:for-each>
  780. </out:variable>
  781. <!--
  782. This attribute is defined and set to true when a request cannot obtain the position property.
  783. Because there is no position, the pager is unable to provide the last page functionality
  784. therefore the last page button is disabled.
  785. -->
  786. <xsl:variable name="noPosition" select="@noPosition"/>
  787. <xsl:variable name="isNavContent" select="@navContent='true'"/>
  788. <!-- special case when deployment messages are iterated in the the item-path -->
  789. <xsl:variable name="isDeploymentMessage" select="@deploymentMessage='true'"/>
  790. <!-- this will tell us if the query return just the current page of results -->
  791. <xsl:variable name="cf_vname" select="@virtualPage"/>
  792. <!-- these are what we are going to be paging through -->
  793. <xsl:variable name="formName"><xsl:value-of select="@form"/></xsl:variable>
  794. <!-- these are what we are going to be paging through -->
  795. <out:variable name="cf_{$cf_pname}_items" select="{cf:param[@name = 'item-path']}"/>
  796. <out:variable name="cf_{$cf_pname}_target" select="{cf:param[@name = 'target']}"/>
  797. <!-- user set display lines number -->
  798. <out:variable name="cf_{$cf_pname}_lines_per_page"><xsl:copy-of select="cf:param[@name = 'lines-per-page']"/></out:variable>
  799. <!-- controls whether to render the goto control -->
  800. <out:variable name="cf_{$cf_pname}_noGoto"><xsl:copy-of select="cf:param[@name = 'noGoto']"/></out:variable>
  801. <!-- controls whether to render the goto control -->
  802. <out:variable name="cf_{$cf_pname}_navContext"><xsl:copy-of select="cf:param[@name = 'navContext']"/></out:variable>
  803. <xsl:variable name="has_navApproximateMaxEntries" select="cf:param[@name = 'navApproximateMaxEntries']"/>
  804. <out:variable name="cf_{$cf_pname}_navApproximateMaxEntries"><xsl:copy-of select="cf:param[@name = 'navApproximateMaxEntries']"/></out:variable>
  805. <!-- item count for current request -->
  806. <out:variable name="cf_{$cf_pname}_itemCount">
  807. <xsl:choose>
  808. <xsl:when test="$isNavContent">
  809. <out:choose>
  810. <out:when test="$cf_{$cf_pname}_items/../@more='true'">
  811. <out:value-of select="count($cf_{$cf_pname}_items) + 1"/>
  812. </out:when>
  813. <out:otherwise>
  814. <out:value-of select="count($cf_{$cf_pname}_items)"/>
  815. </out:otherwise>
  816. </out:choose>
  817. </xsl:when>
  818. <xsl:otherwise>
  819. <out:value-of select="count($cf_{$cf_pname}_items)"/>
  820. </xsl:otherwise>
  821. </xsl:choose>
  822. </out:variable>
  823. <!-- Are the entry numbers past the number of entries -->
  824. <out:variable name="cf_{$cf_pname}_hasEntries">
  825. <out:choose>
  826. <out:when test="'{$cf_vname}'='true'">
  827. <out:choose>
  828. <out:when test="string(/root/env/param[@name='m_pg_e{$cf_pname}']) = '1' or (not(string(/root/env/param[@name='m_pg_e{$cf_pname}']) = '1') and $cf_{$cf_pname}_itemCount > 0)">1</out:when>
  829. <out:otherwise>0</out:otherwise>
  830. </out:choose>
  831. </out:when>
  832. <out:otherwise>
  833. <out:choose>
  834. <out:when test="$cf_{$cf_pname}_itemCount >0">1</out:when>
  835. <out:otherwise>0</out:otherwise>
  836. </out:choose>
  837. </out:otherwise>
  838. </out:choose>
  839. </out:variable>
  840. <!-- number of items requested by user -->
  841. <out:variable name="cf_{$cf_pname}_requestNumberItems">
  842. <out:choose>
  843. <out:when test="string(/root/env/param[@name='m_pagerfrom{$cf_pname}']) != '' and string(/root/env/param[@name='m_pagerto{$cf_pname}']) != ''">
  844. <out:value-of select="(/root/env/param[@name='m_pagerto{$cf_pname}'] - /root/env/param[@name='m_pagerfrom{$cf_pname}']) + 1"/>
  845. </out:when>
  846. <out:otherwise>0</out:otherwise>
  847. </out:choose>
  848. </out:variable>
  849. <!-- number of display items -->
  850. <out:variable name="cf_{$cf_pname}_displayItemCount">
  851. <out:choose>
  852. <out:when test="string($cf_{$cf_pname}_requestNumberItems) != '0'">
  853. <out:choose>
  854. <out:when test="$cf_{$cf_pname}_requestNumberItems > $cf_{$cf_pname}_itemCount">
  855. <out:value-of select="$cf_{$cf_pname}_itemCount"/>
  856. </out:when>
  857. <out:otherwise>
  858. <out:value-of select="$cf_{$cf_pname}_requestNumberItems"/>
  859. </out:otherwise>
  860. </out:choose>
  861. </out:when>
  862. <out:otherwise><out:value-of select="$cf_{$cf_pname}_lines_per_page"/></out:otherwise>
  863. </out:choose>
  864. </out:variable>
  865. <!-- In keeping with the CM Model start and end position are ZERO based numbers for the non-virtual pagers -->
  866. <out:variable name="cf_{$cf_pname}_startPosition">
  867. <out:if test="$cf_{$cf_pname}_itemCount > 0">
  868. <out:choose>
  869. <out:when test="'{$cf_vname}'='true'">
  870. <out:choose>
  871. <xsl:choose>
  872. <xsl:when test="$isNavContent">
  873. <out:when test="true()"><out:value-of select="$cf_{$cf_pname}_items/../@start - 1"/></out:when>
  874. </xsl:when>
  875. <xsl:otherwise>
  876. <out:when test="'{$noPosition}' != 'true'">
  877. <xsl:choose>
  878. <xsl:when test="$isDeploymentMessage">
  879. <out:value-of select="$cf_{$cf_pname}_items[position() = 1]/../*[local-name()='position']"/>
  880. </xsl:when>
  881. <xsl:otherwise>
  882. <out:value-of select="$cf_{$cf_pname}_items[position() = 1]/*[local-name()='position']"/>
  883. </xsl:otherwise>
  884. </xsl:choose>
  885. </out:when>
  886. </xsl:otherwise>
  887. </xsl:choose>
  888. <out:when test="'{$noPosition}' = 'true' and string(/root/env/param[@name='m_{$cf_pname}section']) = '' and $cf_{$cf_pname}_requestNumberItems &gt; 0"><out:value-of select="/root/env/param[@name='m_pagerfrom{$cf_pname}'] - 1"/></out:when>
  889. <out:otherwise>
  890. <out:choose>
  891. <out:when test="string(/root/env/param[@name='m_{$cf_pname}section']) != ''">
  892. <out:value-of select="/root/env/param[@name='m_{$cf_pname}section']-1"/>
  893. </out:when>
  894. <out:otherwise>0</out:otherwise>
  895. </out:choose>
  896. </out:otherwise>
  897. </out:choose>
  898. </out:when>
  899. <out:when test="$cf_{$cf_pname}_requestNumberItems != 0">
  900. <out:choose>
  901. <out:when test="/root/env/param[@name='m_pagerfrom{$cf_pname}'] &lt;= $cf_{$cf_pname}_itemCount">
  902. <out:value-of select="/root/env/param[@name='m_pagerfrom{$cf_pname}'] - 1"/>
  903. </out:when>
  904. <out:otherwise>0</out:otherwise>
  905. </out:choose>
  906. </out:when>
  907. <out:when test="string(/root/env/param[@name='m_{$cf_pname}section']) != ''">
  908. <out:variable name="sect"><out:value-of select="/root/env/param[@name='m_{$cf_pname}section']"/></out:variable>
  909. <out:choose>
  910. <out:when test="$sect = 0">0</out:when>
  911. <out:when test="not($sect > $cf_{$cf_pname}_itemCount) and $cf_{$cf_pname}_itemCount >= $cf_{$cf_pname}_lines_per_page"><out:value-of select="$sect - 1"/></out:when>
  912. <out:when test="$sect > 0 and $sect &lt;= $cf_{$cf_pname}_itemCount and $cf_{$cf_pname}_itemCount &lt; $cf_{$cf_pname}_lines_per_page"><out:value-of select="$sect - 1"/></out:when>
  913. <out:when test="not($cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_lines_per_page)">0</out:when>
  914. <out:when test="$sect > $cf_{$cf_pname}_itemCount"><out:value-of select="($sect - $cf_{$cf_pname}_lines_per_page) - 1"/></out:when>
  915. <out:otherwise>0</out:otherwise>
  916. </out:choose>
  917. </out:when>
  918. <out:otherwise>0</out:otherwise>
  919. </out:choose>
  920. </out:if>
  921. </out:variable>
  922. <out:variable name="cf_{$cf_pname}_endPosition">
  923. <out:if test="$cf_{$cf_pname}_itemCount > 0">
  924. <out:choose>
  925. <out:when test="'{$cf_vname}'='true'">
  926. <out:choose>
  927. <xsl:choose>
  928. <xsl:when test="$isNavContent">
  929. <out:when test="'{$noPosition}'!='true'">
  930. <out:choose>
  931. <out:when test="$cf_{$cf_pname}_items/../@more='true'">
  932. <out:value-of select="$cf_{$cf_pname}_items/../@end"/>
  933. </out:when>
  934. <out:otherwise>
  935. <out:value-of select="$cf_{$cf_pname}_items/../@end - 1"/>
  936. </out:otherwise>
  937. </out:choose>
  938. </out:when>
  939. </xsl:when>
  940. <xsl:otherwise>
  941. <out:when test="'{$noPosition}'!='true'">
  942. <xsl:choose>
  943. <xsl:when test="$isDeploymentMessage">
  944. <out:value-of select="$cf_{$cf_pname}_items[position() = last()]/../*[local-name()='position']"/>
  945. </xsl:when>
  946. <xsl:otherwise>
  947. <out:value-of select="$cf_{$cf_pname}_items[position() = last()]/*[local-name()='position']"/>
  948. </xsl:otherwise>
  949. </xsl:choose>
  950. </out:when>
  951. </xsl:otherwise>
  952. </xsl:choose>
  953. <out:otherwise><out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_itemCount) - 1"/></out:otherwise>
  954. </out:choose>
  955. </out:when>
  956. <out:otherwise>
  957. <out:choose>
  958. <out:when test="$cf_{$cf_pname}_requestNumberItems != 0">
  959. <out:choose>
  960. <out:when test="$cf_{$cf_pname}_requestNumberItems &lt;= $cf_{$cf_pname}_itemCount">
  961. <out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}'] - 1"/>
  962. </out:when>
  963. <out:otherwise>
  964. <out:value-of select="$cf_{$cf_pname}_itemCount - 1 "/>
  965. </out:otherwise>
  966. </out:choose>
  967. </out:when>
  968. <out:when test="$cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_lines_per_page &lt;= $cf_{$cf_pname}_itemCount">
  969. <out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_lines_per_page) - 1"/>
  970. </out:when>
  971. <out:otherwise><out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_itemCount) - 1"/></out:otherwise>
  972. </out:choose>
  973. </out:otherwise>
  974. </out:choose>
  975. </out:if>
  976. </out:variable>
  977. <!-- NOTE: the position information is 0 based so always increment startPosition -->
  978. <!-- The 0 denotes no entries exist -->
  979. <out:variable name="cf_{$cf_pname}_startLine">
  980. <out:choose>
  981. <out:when test="$cf_{$cf_pname}_startPosition != ''"><out:value-of select="$cf_{$cf_pname}_startPosition + 1"/></out:when>
  982. <out:otherwise>0</out:otherwise>
  983. </out:choose>
  984. </out:variable>
  985. <!-- NOTE: the number of items retrieved is 1 more than max (for virtual pagers) to determine if there are more objects to process. -->
  986. <!-- Because of this, we can use the EndPosition as is until the last page of items, then add 1 to the endPosition -->
  987. <!-- The 0 denotes no entries exist -->
  988. <out:variable name="cf_{$cf_pname}_endLine">
  989. <out:choose>
  990. <out:when test="$cf_{$cf_pname}_endPosition != ''">
  991. <out:choose>
  992. <out:when test="'{$cf_vname}'='true'">
  993. <out:choose>
  994. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_itemCount &gt; $cf_{$cf_pname}_displayItemCount">
  995. <out:value-of select="$cf_{$cf_pname}_endPosition"/>
  996. </out:when>
  997. <out:otherwise><out:value-of select="$cf_{$cf_pname}_endPosition + 1"/></out:otherwise>
  998. </out:choose>
  999. </out:when>
  1000. <out:otherwise>
  1001. <out:choose>
  1002. <out:when test="not($cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_endPosition)">
  1003. <out:value-of select="$cf_{$cf_pname}_itemCount"/>
  1004. </out:when>
  1005. <out:otherwise>
  1006. <out:value-of select="$cf_{$cf_pname}_endPosition + 1"/>
  1007. </out:otherwise>
  1008. </out:choose>
  1009. </out:otherwise>
  1010. </out:choose>
  1011. </out:when>
  1012. <out:otherwise>0</out:otherwise>
  1013. </out:choose>
  1014. </out:variable>
  1015. <!-- Total number of lines in this display section -->
  1016. <out:variable name="cf_{$cf_pname}_linesTotal">
  1017. <out:choose>
  1018. <out:when test="'{$cf_vname}'='true'"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:when>
  1019. <out:otherwise><out:value-of select="$cf_{$cf_pname}_itemCount"/></out:otherwise>
  1020. </out:choose>
  1021. </out:variable>
  1022. <!-- Position of start of the previous section -->
  1023. <out:variable name="cf_{$cf_pname}_previousSection">
  1024. <out:choose>
  1025. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_startLine > 1 and not($cf_{$cf_pname}_endLine > $cf_{$cf_pname}_displayItemCount)">1</out:when>
  1026. <out:when test="'{$cf_vname}'!='true'">
  1027. <out:variable name="previousStart"><out:value-of select="$cf_{$cf_pname}_startLine - $cf_{$cf_pname}_lines_per_page"/></out:variable>
  1028. <out:variable name="testFirst" select="$cf_{$cf_pname}_startLine=0 or $cf_{$cf_pname}_startLine=1"/>
  1029. <out:choose>
  1030. <out:when test="not($testFirst) and $previousStart &lt;= 0 ">1</out:when>
  1031. <out:when test="not($testFirst) and not($cf_{$cf_pname}_startLine > $cf_{$cf_pname}_itemCount)"><out:value-of select="$previousStart"/></out:when>
  1032. <out:otherwise>0</out:otherwise>
  1033. </out:choose>
  1034. </out:when>
  1035. <out:when test="$cf_{$cf_pname}_startLine = '0' or $cf_{$cf_pname}_startLine = '1' or not($cf_{$cf_pname}_endLine > $cf_{$cf_pname}_displayItemCount)">0</out:when>
  1036. <out:when test="not($cf_{$cf_pname}_startPosition - $cf_{$cf_pname}_lines_per_page > 0)">1</out:when>
  1037. <out:otherwise><out:value-of select="$cf_{$cf_pname}_startLine - $cf_{$cf_pname}_lines_per_page"/>
  1038. </out:otherwise>
  1039. </out:choose>
  1040. </out:variable>
  1041. <!-- Position of start of the next section -->
  1042. <out:variable name="cf_{$cf_pname}_nextSection">
  1043. <out:choose>
  1044. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_displayItemCount">
  1045. <out:value-of select="$cf_{$cf_pname}_endPosition + 1"/>
  1046. </out:when>
  1047. <out:when test="'{$cf_vname}'!='true'">
  1048. <out:variable name="nextStart"><out:value-of select="$cf_{$cf_pname}_endLine + 1"/></out:variable>
  1049. <out:choose>
  1050. <out:when test="not($nextStart > $cf_{$cf_pname}_itemCount)">
  1051. <out:value-of select="$nextStart"/>
  1052. </out:when>
  1053. <out:otherwise>0</out:otherwise>
  1054. </out:choose>
  1055. </out:when>
  1056. <out:otherwise>0</out:otherwise>
  1057. </out:choose>
  1058. </out:variable>
  1059. <!-- Set the last page value to negative number of lines per page for easier CM request processing -->
  1060. <out:variable name="cf_{$cf_pname}_lastSection">
  1061. <out:choose>
  1062. <out:when test="'{$noPosition}'='true'">0</out:when>
  1063. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_nextSection != '0'">-1</out:when>
  1064. <out:when test="'{$cf_vname}'!='true'">
  1065. <out:choose>
  1066. <out:when test="$cf_{$cf_pname}_itemCount &lt;= $cf_{$cf_pname}_lines_per_page and $cf_{$cf_pname}_startLine != '1' and $cf_{$cf_pname}_endLine != $cf_{$cf_pname}_itemCount">1</out:when>
  1067. <out:when test="($cf_{$cf_pname}_nextSection != 0) or ($cf_{$cf_pname}_requestNumberItems != '0' and /root/env/param[@name='m_pagerfrom{$cf_pname}'] > $cf_{$cf_pname}_itemCount)">
  1068. <out:variable name="last"><out:value-of select="($cf_{$cf_pname}_itemCount - $cf_{$cf_pname}_lines_per_page)+1"/> </out:variable>
  1069. <out:choose>
  1070. <out:when test="$last != -1 and $last &lt; 0">0</out:when>
  1071. <out:when test="$last=0">-1</out:when>
  1072. <out:otherwise><out:value-of select="$last"/></out:otherwise>
  1073. </out:choose>
  1074. </out:when>
  1075. <out:otherwise>0</out:otherwise>
  1076. </out:choose>
  1077. </out:when>
  1078. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_hasEntries='1' and $cf_{$cf_pname}_itemCount='0'">-1</out:when>
  1079. <out:otherwise>0</out:otherwise>
  1080. </out:choose>
  1081. </out:variable>
  1082. <!-- this will deside what to iterate through -->
  1083. <xsl:variable name="iterate">
  1084. <xsl:choose>
  1085. <xsl:when test="$cf_vname='true'">
  1086. <xsl:text/>$cf_<xsl:value-of select="$cf_pname"/>_items[position() >= 1 and position() &lt;= $cf_<xsl:value-of select="$cf_pname"/>_displayItemCount]<xsl:text/>
  1087. </xsl:when>
  1088. <xsl:otherwise>
  1089. <xsl:text/>$cf_<xsl:value-of select="$cf_pname"/>_items[position() >= $cf_<xsl:value-of select="$cf_pname"/>_startLine and position() &lt;= $cf_<xsl:value-of select="$cf_pname"/>_endLine]<xsl:text/>
  1090. </xsl:otherwise>
  1091. </xsl:choose>
  1092. </xsl:variable>
  1093. <!-- if we don't have a page variable and we are submitting create a hidden input -->
  1094. <out:if test="not('{$formName}' = '') and not(key('env-param', 'm_{$cf_pname}section'))">
  1095. <input name="m_{$cf_pname}section" type="hidden" value=""/>
  1096. <input name="m_{$cf_pname}context" type="hidden" value=""/>
  1097. </out:if>
  1098. <out:if test="not('{$formName}'='') and not(key('env-param','m'))"><input name="m" type="hidden" value=""/></out:if>
  1099. <out:variable name="pagerBack">
  1100. <xsl:if test="$formName=''">
  1101. <out:value-of select="$gateway"/>?b_action=xts.run&amp;m=<out:value-of select="key('env-param','m')"/>
  1102. <out:if test="contains($state-params,' m_path ') and not(key('env-param','m_path')) and $m_path!=''">
  1103. <out:text/>&amp;m_path=<out:value-of select="xtsext:protect(xtsext:urlencode(string($m_path)),'url','searchPath','getdata')"/>
  1104. </out:if>
  1105. <out:if test="string($cf_{$cf_pname}_navContext) != ''">
  1106. <out:text/>&amp;m_<xsl:value-of select="$cf_pname"/>context=<out:value-of select="xtsext:urlencode(string($cf_{$cf_pname}_navContext))"/>
  1107. </out:if>
  1108. <out:for-each select="/root/env/param">
  1109. <out:if test="contains($state-params, concat(' ', @name, ' ')) and @name != 'm_{$cf_pname}section' and @name != 'm_{$cf_pname}context' and @name != 'm_pagerto{$cf_pname}' and @name != 'm_pagerfrom{$cf_pname}' and @name != 'm_pg_e{$cf_pname}'">
  1110. <out:text/>&amp;<out:value-of select="@name"/>=<out:value-of select="xtsext:protect(xtsext:urlencode(string(.)),'url',concat('NAME',@name),'getdata')" />
  1111. </out:if>
  1112. </out:for-each>
  1113. <!-- Add this bit in the case of consumer UI to pick up the id when the page is generated using a path -->
  1114. <out:if test="not(/root/env/param[@name='m_folder']) and $folderID != ''">
  1115. <out:text/>&amp;m_folder=<out:value-of select="$folderID"/>
  1116. </out:if>
  1117. </xsl:if>
  1118. </out:variable>
  1119. <xsl:call-template name="cf-main-pager-java-section">
  1120. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1121. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1122. <xsl:with-param name="genDelete"><xsl:value-of select="$genDelete"/></xsl:with-param>
  1123. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1124. <xsl:with-param name="cf_vname"><xsl:value-of select="$cf_vname"/></xsl:with-param>
  1125. <xsl:with-param name="itemCnt">$cf_<xsl:value-of select="$cf_pname"/>_itemCount</xsl:with-param>
  1126. <xsl:with-param name="startPos">$cf_<xsl:value-of select="$cf_pname"/>_startPosition</xsl:with-param>
  1127. <xsl:with-param name="lines">$cf_<xsl:value-of select="$cf_pname"/>_lines_per_page</xsl:with-param>
  1128. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1129. <xsl:with-param name="target">$cf_<xsl:value-of select="$cf_pname"/>_target</xsl:with-param>
  1130. <xsl:with-param name="nextSection">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
  1131. <xsl:with-param name="prevSection">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
  1132. <xsl:with-param name="lastSection">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
  1133. <xsl:with-param name="hasEntries">$cf_<xsl:value-of select="$cf_pname"/>_hasEntries</xsl:with-param>
  1134. <xsl:with-param name="noPosition"><xsl:value-of select="$noPosition"/></xsl:with-param>
  1135. <xsl:with-param name="navContext">$cf_<xsl:value-of select="$cf_pname"/>_navContext</xsl:with-param>
  1136. </xsl:call-template>
  1137. <!-- this is the size of our list small and medium are the only two implemented -->
  1138. <!--
  1139. Translation:
  1140. medium means scrolling list
  1141. small means non-scrolling list
  1142. -->
  1143. <out:variable name="cf_{$cf_pname}_listSize">
  1144. <out:choose>
  1145. <out:when test="'{$cf_vname}' = 'true' and $cf_{$cf_pname}_linesTotal = 0 and (key('env-param', 'm_{$cf_pname}section') != '1' and key('env-param', 'm_{$cf_pname}section') != '')">empty</out:when>
  1146. <out:when test="$cf_{$cf_pname}_previousSection = 0 and $cf_{$cf_pname}_nextSection = 0">small</out:when>
  1147. <out:otherwise>medium</out:otherwise>
  1148. </out:choose>
  1149. </out:variable>
  1150. <out:variable name="cf_{$cf_pname}_lastLine">
  1151. <out:choose>
  1152. <out:when test="'{$cf_vname}'='true'">
  1153. <out:value-of select="$cf_{$cf_pname}_itemCount"/>
  1154. </out:when>
  1155. <out:otherwise>
  1156. <out:choose>
  1157. <out:when test="$cf_{$cf_pname}_endLine > $cf_{$cf_pname}_itemCount">
  1158. <out:value-of select="$cf_{$cf_pname}_itemCount - 1"/>
  1159. </out:when>
  1160. <out:otherwise>
  1161. <out:value-of select="$cf_{$cf_pname}_endLine"/>
  1162. </out:otherwise>
  1163. </out:choose>
  1164. </out:otherwise>
  1165. </out:choose>
  1166. </out:variable>
  1167. <out:variable name="cf_{$cf_pname}_showEntries">
  1168. <out:choose>
  1169. <out:when test="'{$cf_vname}'!='true' and $cf_{$cf_pname}_lastLine != '0' and /root/env/param[@name='m_pagerfrom{$cf_pname}'] > $cf_{$cf_pname}_lastLine and $cf_{$cf_pname}_hasEntries='1'">false</out:when>
  1170. <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_lastLine = '0' and $cf_{$cf_pname}_hasEntries='1'">false</out:when>
  1171. <out:otherwise>true</out:otherwise>
  1172. </out:choose>
  1173. </out:variable>
  1174. <!-- what's what -->
  1175. <!-- uncomment the following to debug pager -->
  1176. <!-- <out:message>*****START*****</out:message>
  1177. <out:message><out:value-of select="'{$formName}'"/></out:message>
  1178. <out:message>itmcnt <out:value-of select="$cf_{$cf_pname}_itemCount"/></out:message>
  1179. <out:message>reqnumitems <out:value-of select="$cf_{$cf_pname}_requestNumberItems"/></out:message>
  1180. <out:message>dspitmcnt <out:value-of select="$cf_{$cf_pname}_displayItemCount"/></out:message>
  1181. <out:message>hasEntries <out:value-of select="$cf_{$cf_pname}_hasEntries"/></out:message>
  1182. <out:message>showEntries <out:value-of select="$cf_{$cf_pname}_showEntries"/></out:message>
  1183. <out:message>listsize <out:value-of select="$cf_{$cf_pname}_listSize"/></out:message>
  1184. <out:message>startpos <out:value-of select="$cf_{$cf_pname}_startPosition"/></out:message>
  1185. <out:message>endpos <out:value-of select="$cf_{$cf_pname}_endPosition"/></out:message>
  1186. <out:message>startline <out:value-of select="$cf_{$cf_pname}_startLine"/></out:message>
  1187. <out:message>endline <out:value-of select="$cf_{$cf_pname}_endLine"/></out:message>
  1188. <out:message>lastline <out:value-of select="$cf_{$cf_pname}_lastLine"/></out:message>
  1189. <out:message>linestot <out:value-of select="$cf_{$cf_pname}_linesTotal"/></out:message>
  1190. <out:message>lines per page <out:value-of select="$cf_{$cf_pname}_lines_per_page"/></out:message>
  1191. <out:message>next <out:value-of select="$cf_{$cf_pname}_nextSection"/></out:message>
  1192. <out:message>prev <out:value-of select="$cf_{$cf_pname}_previousSection"/></out:message>
  1193. <out:message>last <out:value-of select="$cf_{$cf_pname}_lastSection"/></out:message>
  1194. <out:message>*****END*****</out:message> -->
  1195. <cp:table iterate="{$iterate}" id="{$cf_pname}" showEntries="$cf_{$cf_pname}_showEntries" showControls="true" width="{@width}" name="{$cf_pname}" listSize="$cf_{$cf_pname}_listSize" lastLine="$cf_{$cf_pname}_lastLine" displayItemCount="$cf_{$cf_pname}_displayItemCount" requestNumberItems="$cf_{$cf_pname}_requestNumberItems" vname="{$cf_vname}" endLine="$cf_{$cf_pname}_endLine" startLine="$cf_{$cf_pname}_startLine" msgID="{$noEntriesMsgID}">
  1196. <xsl:if test="@role != ''">
  1197. <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
  1198. </xsl:if>
  1199. <xsl:if test="@id != ''">
  1200. <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
  1201. </xsl:if>
  1202. <xsl:copy-of select="@*"/>
  1203. <cp:actionTop width="{@width}">
  1204. <xsl:copy-of select="cf:param[@name = 'actions']/child::node()"/>
  1205. </cp:actionTop>
  1206. <cp:tableSummary><xsl:copy-of select="cf:param[@name = 'pagerSummary']/child::node()"/></cp:tableSummary>
  1207. <xsl:choose>
  1208. <xsl:when test="string($useUtml)!='true'">
  1209. <cp:fromTo width="{@width}">
  1210. <xsl:choose>
  1211. <xsl:when test="cf:param[@name='displayPath']">
  1212. <cp:breadcrumb>
  1213. <xsl:copy-of select="cf:param[@name='displayPath']/*"/>
  1214. </cp:breadcrumb>
  1215. </xsl:when>
  1216. <xsl:when test="cf:param[@name='label']">
  1217. <cp:tableLabel>
  1218. <xsl:copy-of select="cf:param[@name='label']/*"/>
  1219. </cp:tableLabel>
  1220. </xsl:when>
  1221. </xsl:choose>
  1222. <cp:collectCount>
  1223. <out:variable name="from">
  1224. <out:choose>
  1225. <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
  1226. <out:if test="not($cf_{$cf_pname}_startLine = 0)">
  1227. <out:value-of select="$cf_{$cf_pname}_startLine"/>
  1228. </out:if>
  1229. </out:when>
  1230. <out:otherwise>
  1231. <out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/>
  1232. </out:otherwise>
  1233. </out:choose>
  1234. </out:variable>
  1235. <out:variable name="to">
  1236. <out:choose>
  1237. <out:when test="'{$noPosition}' = 'true' and $cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] &gt; 0">
  1238. <out:choose>
  1239. <out:when test="$cf_{$cf_pname}_hasEntries = 0"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:when>
  1240. <out:when test="/root/env/param[@name='m_pagerto{$cf_pname}'] &gt; $cf_{$cf_pname}_itemCount"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:when>
  1241. <out:otherwise><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:otherwise>
  1242. </out:choose>
  1243. </out:when>
  1244. <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] &gt; $cf_{$cf_pname}_endLine">
  1245. <out:choose>
  1246. <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
  1247. <out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/>
  1248. </out:when>
  1249. <out:otherwise>
  1250. <out:value-of select="$cf_{$cf_pname}_endLine"/>
  1251. </out:otherwise>
  1252. </out:choose>
  1253. </out:when>
  1254. <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
  1255. <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
  1256. <out:value-of select="$cf_{$cf_pname}_endLine"/>
  1257. </out:if>
  1258. </out:when>
  1259. <out:otherwise>
  1260. <out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/>
  1261. </out:otherwise>
  1262. </out:choose>
  1263. </out:variable>
  1264. <out:choose>
  1265. <out:when test="$cf_{$cf_pname}_noGoto='true'">
  1266. <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
  1267. <xsl:choose>
  1268. <xsl:when test="$isNavContent and $has_navApproximateMaxEntries">
  1269. <xts:string id="IDS_SEARCH_INDEXTREE_PAGER_FROMTO">
  1270. <xts:param name="from"><out:value-of select="$from"/></xts:param>
  1271. <xts:param name="to"><out:value-of select="$to"/></xts:param>
  1272. <xts:param name="approximateEntries">
  1273. <out:if test="$cf_{$cf_pname}_navApproximateMaxEntries &gt; 0">
  1274. <out:value-of select="$cf_{$cf_pname}_navApproximateMaxEntries"/>
  1275. </out:if>
  1276. </xts:param>
  1277. </xts:string>
  1278. </xsl:when>
  1279. <xsl:otherwise>
  1280. <xts:string id="IDS_PAGER_FROMTO">
  1281. <xts:param name="from"><out:value-of select="$from"/></xts:param>
  1282. <xts:param name="to"><out:value-of select="$to"/></xts:param>
  1283. </xts:string>
  1284. </xsl:otherwise>
  1285. </xsl:choose>
  1286. </td>
  1287. </out:when>
  1288. <out:otherwise>
  1289. <input name="pagerfrom{$cf_pname}" id="pagerfrom{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
  1290. <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
  1291. <out:attribute name="value"><out:value-of select="$from"/></out:attribute>
  1292. </input>
  1293. <out:value-of select="' - '"/>
  1294. <input name="pagerto{$cf_pname}" id="pagerto{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
  1295. <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
  1296. <out:attribute name="value"><out:value-of select="$to"/></out:attribute>
  1297. </input>
  1298. </out:otherwise>
  1299. </out:choose>
  1300. <out:if test="not(/root/env/param[@name='m_pagerfrom{$cf_pname}'])">
  1301. <input name="m_pagerfrom{$cf_pname}" type="hidden" value=""/>
  1302. <input name="m_pagerto{$cf_pname}" type="hidden" value=""/>
  1303. <input name="m_pg_e{$cf_pname}" type="hidden" value=""/>
  1304. </out:if>
  1305. </cp:collectCount>
  1306. <cp:goToButton>
  1307. <out:if test="not($cf_{$cf_pname}_noGoto='true')">
  1308. <xsl:call-template name="cf-main-pager-goto-button-section">
  1309. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1310. <xsl:with-param name="pagerPosition">top</xsl:with-param>
  1311. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1312. </xsl:call-template>
  1313. </out:if>
  1314. </cp:goToButton>
  1315. <cp:buttons>
  1316. <xsl:call-template name="cf-main-pager-button-section">
  1317. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1318. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_startLine > 1 or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1319. <xsl:with-param name="label">top</xsl:with-param>
  1320. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1321. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1322. <xsl:with-param name="navpage">1</xsl:with-param>
  1323. <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
  1324. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1325. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1326. </xsl:call-template>
  1327. <xsl:call-template name="cf-main-pager-button-section">
  1328. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1329. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
  1330. <xsl:with-param name="label">pageup</xsl:with-param>
  1331. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1332. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1333. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
  1334. <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
  1335. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1336. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1337. </xsl:call-template>
  1338. <xsl:call-template name="cf-main-pager-button-section">
  1339. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1340. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
  1341. <xsl:with-param name="label">pagedown</xsl:with-param>
  1342. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1343. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1344. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
  1345. <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
  1346. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1347. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1348. </xsl:call-template>
  1349. <out:if test="not($cf_{$cf_pname}_noGoto='true')">
  1350. <xsl:call-template name="cf-main-pager-button-section">
  1351. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1352. <xsl:with-param name="condition">'<xsl:value-of select="$noPosition"/>' != 'true' and ($cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_lastSection != '0' or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0'))</xsl:with-param>
  1353. <xsl:with-param name="label">bottom</xsl:with-param>
  1354. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1355. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1356. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
  1357. <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
  1358. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1359. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1360. </xsl:call-template>
  1361. </out:if>
  1362. </cp:buttons>
  1363. </cp:fromTo>
  1364. </xsl:when>
  1365. <xsl:otherwise>
  1366. <cp:fromTo width="{@width}">
  1367. <xsl:if test="cf:param[@name='label']">
  1368. <cp:tableLabel>
  1369. <xsl:copy-of select="cf:param[@name='label']/*"/>
  1370. </cp:tableLabel>
  1371. </xsl:if>
  1372. <cp:collectCount>
  1373. <utml:input name="pagerfrom{$cf_pname}" id="pagerfrom{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
  1374. <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
  1375. <out:choose>
  1376. <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
  1377. <out:if test="not($cf_{$cf_pname}_startLine = 0)">
  1378. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_startLine"/></out:attribute>
  1379. </out:if>
  1380. </out:when>
  1381. <out:otherwise>
  1382. <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/></out:attribute>
  1383. </out:otherwise>
  1384. </out:choose>
  1385. </utml:input>
  1386. <out:value-of select="' - '"/>
  1387. <utml:input name="pagerto{$cf_pname}" id="pagerto{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
  1388. <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
  1389. <out:choose>
  1390. <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] &gt; $cf_{$cf_pname}_endLine">
  1391. <out:choose>
  1392. <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
  1393. <out:attribute name="value"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:attribute>
  1394. </out:when>
  1395. <out:otherwise>
  1396. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
  1397. </out:otherwise>
  1398. </out:choose>
  1399. </out:when>
  1400. <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
  1401. <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
  1402. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
  1403. </out:if>
  1404. </out:when>
  1405. <out:otherwise>
  1406. <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/></out:attribute>
  1407. </out:otherwise>
  1408. </out:choose>
  1409. </utml:input>
  1410. <utml:input name="m_pagerfrom{$cf_pname}" type="hidden" value="" utml:update="false"/>
  1411. <utml:input name="m_pagerto{$cf_pname}" type="hidden" value="" utml:update="false"/>
  1412. <utml:input name="m_pg_e{$cf_pname}" type="hidden" value="" utml:update="false"/>
  1413. </cp:collectCount>
  1414. <cp:goToButton>
  1415. <xsl:call-template name="cf-main-pager-goto-button-section">
  1416. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1417. <xsl:with-param name="pagerPosition">top</xsl:with-param>
  1418. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1419. </xsl:call-template>
  1420. </cp:goToButton>
  1421. <cp:buttons>
  1422. <xsl:call-template name="cf-main-pager-button-section">
  1423. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1424. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_startLine > 1</xsl:with-param>
  1425. <xsl:with-param name="label">top</xsl:with-param>
  1426. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1427. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1428. <xsl:with-param name="navpage">1</xsl:with-param>
  1429. <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
  1430. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1431. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1432. </xsl:call-template>
  1433. <xsl:call-template name="cf-main-pager-button-section">
  1434. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1435. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
  1436. <xsl:with-param name="label">pageup</xsl:with-param>
  1437. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1438. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1439. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
  1440. <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
  1441. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1442. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1443. </xsl:call-template>
  1444. <xsl:call-template name="cf-main-pager-button-section">
  1445. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1446. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
  1447. <xsl:with-param name="label">pagedown</xsl:with-param>
  1448. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1449. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1450. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
  1451. <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
  1452. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1453. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1454. </xsl:call-template>
  1455. <xsl:call-template name="cf-main-pager-button-section">
  1456. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1457. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_lastSection != '0' or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1458. <xsl:with-param name="label">bottom</xsl:with-param>
  1459. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1460. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1461. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
  1462. <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
  1463. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1464. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1465. </xsl:call-template>
  1466. </cp:buttons>
  1467. </cp:fromTo>
  1468. </xsl:otherwise>
  1469. </xsl:choose>
  1470. <xsl:apply-templates select="cf:param[@name = 'rows']/child::node()"/>
  1471. <!-- this will tell us we need to fill in the list to make the buttons look fine -->
  1472. <out:if test="not($cf_{$cf_pname}_listSize = 'small')">
  1473. <cp:rowFiller/>
  1474. </out:if>
  1475. <!-- For showing the entry fields and control buttons on the bottom of the table if #rows > 25 -->
  1476. <xsl:if test="not(string(@is-scrolling) = 'true')">
  1477. <xsl:choose>
  1478. <xsl:when test="string($useUtml)!='true'">
  1479. <cp:fromToBottom width="{@width}">
  1480. <cp:collectCountBottom>
  1481. <out:variable name="from">
  1482. <out:choose>
  1483. <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
  1484. <out:if test="not($cf_{$cf_pname}_startLine = 0)">
  1485. <out:value-of select="$cf_{$cf_pname}_startLine"/>
  1486. </out:if>
  1487. </out:when>
  1488. <out:otherwise>
  1489. <out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/>
  1490. </out:otherwise>
  1491. </out:choose>
  1492. </out:variable>
  1493. <out:variable name="to">
  1494. <out:choose>
  1495. <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] &gt; $cf_{$cf_pname}_endLine">
  1496. <out:if test="not($cf_{$cf_pname}_endLine = 0)">
  1497. <out:value-of select="$cf_{$cf_pname}_endLine"/>
  1498. </out:if>
  1499. </out:when>
  1500. <out:when test="not(string(/root/env/param[@name='m_pagerto{$cf_pname}']))">
  1501. <out:if test="not($cf_{$cf_pname}_endLine = 0)">
  1502. <out:value-of select="$cf_{$cf_pname}_endLine"/>
  1503. </out:if>
  1504. </out:when>
  1505. <out:otherwise>
  1506. <out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/>
  1507. </out:otherwise>
  1508. </out:choose>
  1509. </out:variable>
  1510. <out:choose>
  1511. <out:when test="$cf_{$cf_pname}_noGoto='true'">
  1512. <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
  1513. <out:value-of select="$from"/>
  1514. </td>
  1515. <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
  1516. <out:value-of select="'&#160;-&#160;'"/>
  1517. </td>
  1518. <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
  1519. <out:value-of select="$to"/>
  1520. </td>
  1521. </out:when>
  1522. <out:otherwise>
  1523. <input name="pagerfrom_d{$cf_pname}" id="pagerfrom_d{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
  1524. <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
  1525. <out:attribute name="value"><out:value-of select="$from"/></out:attribute>
  1526. </input>
  1527. <out:value-of select="' - '"/>
  1528. <input name="pagerto_d{$cf_pname}" id="pagerto_d{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
  1529. <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
  1530. <out:attribute name="value"><out:value-of select="$to"/></out:attribute>
  1531. </input>
  1532. </out:otherwise>
  1533. </out:choose>
  1534. </cp:collectCountBottom>
  1535. <cp:goToButton>
  1536. <out:if test="not($cf_{$cf_pname}_noGoto='true')">
  1537. <xsl:call-template name="cf-main-pager-goto-button-section">
  1538. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1539. <xsl:with-param name="pagerPosition">bottom</xsl:with-param>
  1540. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1541. </xsl:call-template>
  1542. </out:if>
  1543. </cp:goToButton>
  1544. <cp:buttonsBottom>
  1545. <xsl:call-template name="cf-main-pager-button-section">
  1546. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1547. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_startLine > 1 or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1548. <xsl:with-param name="label">top</xsl:with-param>
  1549. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1550. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1551. <xsl:with-param name="navpage">1</xsl:with-param>
  1552. <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
  1553. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1554. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1555. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1556. </xsl:call-template>
  1557. <xsl:call-template name="cf-main-pager-button-section">
  1558. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1559. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
  1560. <xsl:with-param name="label">pageup</xsl:with-param>
  1561. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1562. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1563. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
  1564. <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
  1565. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1566. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1567. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1568. </xsl:call-template>
  1569. <xsl:call-template name="cf-main-pager-button-section">
  1570. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1571. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
  1572. <xsl:with-param name="label">pagedown</xsl:with-param>
  1573. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1574. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1575. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
  1576. <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
  1577. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1578. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1579. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1580. </xsl:call-template>
  1581. <out:if test="not($cf_{$cf_pname}_noGoto='true')">
  1582. <xsl:call-template name="cf-main-pager-button-section">
  1583. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1584. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_lastSection != '0' or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1585. <xsl:with-param name="label">bottom</xsl:with-param>
  1586. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1587. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1588. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
  1589. <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
  1590. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1591. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1592. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1593. </xsl:call-template>
  1594. </out:if>
  1595. </cp:buttonsBottom>
  1596. </cp:fromToBottom>
  1597. </xsl:when>
  1598. <xsl:otherwise>
  1599. <cp:fromToBottom width="{@width}">
  1600. <cp:collectCountBottom>
  1601. <utml:input name="pagerfrom_d{$cf_pname}" id="pagerfrom_d{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
  1602. <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
  1603. <out:choose>
  1604. <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
  1605. <out:if test="not($cf_{$cf_pname}_startLine = 0)">
  1606. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_startLine"/></out:attribute>
  1607. </out:if>
  1608. </out:when>
  1609. <out:otherwise>
  1610. <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/></out:attribute>
  1611. </out:otherwise>
  1612. </out:choose>
  1613. </utml:input>
  1614. <out:value-of select="' - '"/>
  1615. <utml:input name="pagerto_d{$cf_pname}" id="pagerto_d{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
  1616. <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
  1617. <out:choose>
  1618. <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] &gt; $cf_{$cf_pname}_endLine">
  1619. <out:choose>
  1620. <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
  1621. <out:attribute name="value"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:attribute>
  1622. </out:when>
  1623. <out:otherwise>
  1624. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
  1625. </out:otherwise>
  1626. </out:choose>
  1627. </out:when>
  1628. <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
  1629. <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
  1630. <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
  1631. </out:if>
  1632. </out:when>
  1633. <out:otherwise>
  1634. <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/></out:attribute>
  1635. </out:otherwise>
  1636. </out:choose>
  1637. </utml:input>
  1638. </cp:collectCountBottom>
  1639. <cp:goToButton>
  1640. <xsl:call-template name="cf-main-pager-goto-button-section">
  1641. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1642. <xsl:with-param name="pagerPosition">bottom</xsl:with-param>
  1643. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1644. </xsl:call-template>
  1645. </cp:goToButton>
  1646. <cp:buttonsBottom>
  1647. <xsl:call-template name="cf-main-pager-button-section">
  1648. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1649. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_startLine > 1 or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1650. <xsl:with-param name="label">top</xsl:with-param>
  1651. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1652. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1653. <xsl:with-param name="navpage">1</xsl:with-param>
  1654. <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
  1655. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1656. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1657. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1658. </xsl:call-template>
  1659. <xsl:call-template name="cf-main-pager-button-section">
  1660. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1661. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
  1662. <xsl:with-param name="label">pageup</xsl:with-param>
  1663. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1664. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1665. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
  1666. <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
  1667. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1668. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1669. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1670. </xsl:call-template>
  1671. <xsl:call-template name="cf-main-pager-button-section">
  1672. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1673. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
  1674. <xsl:with-param name="label">pagedown</xsl:with-param>
  1675. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1676. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1677. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
  1678. <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
  1679. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1680. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1681. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1682. </xsl:call-template>
  1683. <xsl:call-template name="cf-main-pager-button-section">
  1684. <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
  1685. <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_showEntries='false' or $cf_<xsl:value-of select="$cf_pname"/>_lastSection != '0' or ($cf_<xsl:value-of select="$cf_pname"/>_endLine = '0' and $cf_<xsl:value-of select="$cf_pname"/>_startLine != '0')</xsl:with-param>
  1686. <xsl:with-param name="label">bottom</xsl:with-param>
  1687. <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
  1688. <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
  1689. <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
  1690. <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
  1691. <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
  1692. <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
  1693. <xsl:with-param name="buttBottom">_d</xsl:with-param>
  1694. </xsl:call-template>
  1695. </cp:buttonsBottom>
  1696. </cp:fromToBottom>
  1697. </xsl:otherwise>
  1698. </xsl:choose>
  1699. <cp:actionBottom width="{@width}">
  1700. <xsl:copy-of select="cf:param[@name = 'actions']/child::node()"/>
  1701. </cp:actionBottom>
  1702. </xsl:if>
  1703. </cp:table>
  1704. </out:if>
  1705. </xsl:template>
  1706. <!--
  1707. Template - cf-main-pager-java-section:
  1708. This template creates the preDelete (virtualPage) or preDelete[pager name] (non-virtualPage) function that re-calculates the m_[pager name]section
  1709. parameter, based on what is being deleted from the page. If the pager is on the last page, then the section is recalculated to the start of the previous
  1710. page. However, if there are more items after this page (since in the case of virtualPage cm skip objects option we always ask for 1 more), the section
  1711. does not change.
  1712. Operation:
  1713. When the display is at the first object this javascript is not defined. When the pager moves off the first entry, then is function may be defined based
  1714. on pager type and position in current list.
  1715. This template is used exclusively by cf-main-pager-section.
  1716. -->
  1717. <xsl:template name="cf-main-pager-java-section">
  1718. <xsl:param name="formName"/>
  1719. <xsl:param name="genDelete"/>
  1720. <xsl:param name="cf_pname"/>
  1721. <xsl:param name="cf_vname"/>
  1722. <xsl:param name="itemCnt"/>
  1723. <xsl:param name="startPos"/>
  1724. <xsl:param name="lines"/>
  1725. <xsl:param name="pagerBack"/>
  1726. <xsl:param name="target"/>
  1727. <xsl:param name="nextSection"/>
  1728. <xsl:param name="prevSection"/>
  1729. <xsl:param name="lastSection"/>
  1730. <xsl:param name="hasEntries"/>
  1731. <xsl:param name="noPosition"/>
  1732. <xsl:param name="navContext"/>
  1733. <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/utilities.js"></script>
  1734. <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/list.js"></script>
  1735. <script language="javascript">
  1736. <out:choose>
  1737. <out:when test="not('{$formName}'='')">
  1738. function nav<xsl:value-of select="$cf_pname"/>T() {
  1739. var form = document.<xsl:choose>
  1740. <xsl:when test="$formName=''">pform</xsl:when>
  1741. <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
  1742. </xsl:choose>;
  1743. var targetm = "<out:value-of select="{$target}"/>";
  1744. if(targetm != '') {
  1745. form.m.value= targetm;
  1746. }
  1747. form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
  1748. form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
  1749. form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
  1750. form.ps_nav_op.value='maintain';
  1751. form.m_<xsl:value-of select="$cf_pname"/>section.value='1';
  1752. <out:if test="{$navContext} != ''">
  1753. form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
  1754. </out:if>
  1755. if (form.onsubmit) {
  1756. form.onsubmit();
  1757. }
  1758. form.submit();
  1759. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1760. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1761. }
  1762. }
  1763. <out:if test="{$prevSection} != 0">
  1764. function nav<xsl:value-of select="$cf_pname"/>U() {
  1765. var form = document.<xsl:choose>
  1766. <xsl:when test="$formName=''">pform</xsl:when>
  1767. <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
  1768. </xsl:choose>;
  1769. var targetm = "<out:value-of select="{$target}"/>";
  1770. if(targetm != '') {
  1771. form.m.value= targetm;
  1772. }
  1773. form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
  1774. form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
  1775. form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
  1776. form.ps_nav_op.value='maintain';
  1777. form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$prevSection}"/>';
  1778. <out:if test="{$navContext} != ''">
  1779. form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
  1780. </out:if>
  1781. if (form.onsubmit) {
  1782. form.onsubmit();
  1783. }
  1784. form.submit();
  1785. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1786. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1787. }
  1788. }
  1789. </out:if>
  1790. <out:if test="{$nextSection} != 0">
  1791. function nav<xsl:value-of select="$cf_pname"/>D() {
  1792. var form = document.<xsl:choose>
  1793. <xsl:when test="$formName=''">pform</xsl:when>
  1794. <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
  1795. </xsl:choose>;
  1796. var targetm = "<out:value-of select="{$target}"/>";
  1797. if(targetm != '') {
  1798. form.m.value= targetm;
  1799. }
  1800. form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
  1801. form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
  1802. form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
  1803. form.ps_nav_op.value='maintain';
  1804. form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$nextSection}"/>';
  1805. <out:if test="{$navContext} != ''">
  1806. form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
  1807. </out:if>
  1808. if (form.onsubmit) {
  1809. form.onsubmit();
  1810. }
  1811. form.submit();
  1812. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1813. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1814. }
  1815. }
  1816. </out:if>
  1817. function nav<xsl:value-of select="$cf_pname"/>B() {
  1818. var form = document.<xsl:choose>
  1819. <xsl:when test="$formName=''">pform</xsl:when>
  1820. <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
  1821. </xsl:choose>;
  1822. var targetm = "<out:value-of select="{$target}"/>";
  1823. if(targetm != '') {
  1824. form.m.value= targetm;
  1825. }
  1826. form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
  1827. form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
  1828. form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
  1829. form.ps_nav_op.value='maintain';
  1830. form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$lastSection}"/>';
  1831. <out:if test="{$navContext} != ''">
  1832. form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
  1833. </out:if>
  1834. if (form.onsubmit) {
  1835. form.onsubmit();
  1836. }
  1837. form.submit();
  1838. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1839. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1840. }
  1841. }
  1842. function nav<out:value-of select="'{$cf_pname}'"/>Go(pos) {
  1843. var fromName = "pagerfrom" + pos + "<xsl:value-of select="$cf_pname"/>";
  1844. var toName = "pagerto" + pos + "<xsl:value-of select="$cf_pname"/>";
  1845. var fromA = document.getElementsByName(fromName);
  1846. var toA = document.getElementsByName(toName);
  1847. var from = fromA[0];
  1848. var to = toA[0];
  1849. var fromloc = trim(from.value);
  1850. var toloc = trim(to.value);
  1851. var form = document.<xsl:choose>
  1852. <xsl:when test="$formName=''">pform</xsl:when>
  1853. <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
  1854. </xsl:choose>;
  1855. var targetm = "<out:value-of select="{$target}"/>";
  1856. form.m.value = targetm;
  1857. var noPosition ="<out:value-of select="'{$noPosition}'"/>";
  1858. if (fromloc !="") {
  1859. checkPositiveIntegerDefault(from,"");
  1860. fromloc = from.value;
  1861. if ( fromloc == "" ) {
  1862. alert( "<xts:string id="IDS_PAGER_FROM_INVALID" encode="javascript"/>");
  1863. return;
  1864. }
  1865. if (toloc !="") {
  1866. checkPositiveIntegerDefault(to,"");
  1867. toloc = to.value;
  1868. if ( toloc == "" ) {
  1869. alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
  1870. return;
  1871. }
  1872. if ( Number(toloc) &lt; Number(fromloc)) {
  1873. alert( "<xts:string id="IDS_PAGER_ENTRIES_INVALID" encode="javascript"/>");
  1874. return;
  1875. }
  1876. }
  1877. else { //to is empty calculate it
  1878. toloc = Number(fromloc) + <out:value-of select="{$lines}"/> -1;
  1879. }
  1880. } //if (fromloc!="")
  1881. else {
  1882. if (toloc == "") {
  1883. alert ("<xts:string id="IDS_PAGER_ENTRIES_EMPTY" encode="javascript"/>");
  1884. return;
  1885. }
  1886. else {
  1887. checkPositiveIntegerDefault(to,"");
  1888. toloc = to.value;
  1889. if ( toloc == "" ) {
  1890. alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
  1891. return;
  1892. }
  1893. fromloc = Number(toloc) - <out:value-of select="{$lines}"/> +1;
  1894. if (Number(fromloc) &lt; 0) {
  1895. fromloc=1;
  1896. }
  1897. }
  1898. }
  1899. if (noPosition=="true") {
  1900. form.m_<xsl:value-of select="$cf_pname"/>section.value="";
  1901. }
  1902. form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value=fromloc;
  1903. form.pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
  1904. form.pagerfrom<xsl:value-of select="$cf_pname"/>.disabled=true;
  1905. form.m_pagerto<xsl:value-of select="$cf_pname"/>.value=toloc;
  1906. form.pagerto<xsl:value-of select="$cf_pname"/>.value="";
  1907. form.pagerto<xsl:value-of select="$cf_pname"/>.disabled=true;
  1908. form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
  1909. form.ps_nav_op.value='maintain';
  1910. if (form.onsubmit) {
  1911. form.onsubmit();
  1912. }
  1913. form.submit();
  1914. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1915. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1916. }
  1917. }
  1918. </out:when>
  1919. <out:otherwise>
  1920. function nav<out:value-of select="'{$cf_pname}'"/>Go(pos) {
  1921. var fromName = "pagerfrom" + pos + "<xsl:value-of select="$cf_pname"/>";
  1922. var toName = "pagerto" + pos + "<xsl:value-of select="$cf_pname"/>";
  1923. var fromA = document.getElementsByName(fromName);
  1924. var toA = document.getElementsByName(toName);
  1925. var from = fromA[0];
  1926. var to = toA[0];
  1927. var fromloc = trim(from.value);
  1928. var toloc = trim(to.value);
  1929. if (fromloc != "")
  1930. {
  1931. checkPositiveIntegerDefault(from,"");
  1932. fromloc = from.value;
  1933. if ( fromloc == "" ) {
  1934. alert( "<xts:string id="IDS_PAGER_FROM_INVALID" encode="javascript"/>");
  1935. return;
  1936. }
  1937. if (toloc !="") {
  1938. checkPositiveIntegerDefault(to,"");
  1939. toloc = to.value;
  1940. if ( toloc == "" ) {
  1941. alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
  1942. return;
  1943. }
  1944. if ( Number(toloc) &lt; Number(fromloc)) {
  1945. alert( "<xts:string id="IDS_PAGER_ENTRIES_INVALID" encode="javascript"/>");
  1946. return;
  1947. }
  1948. }
  1949. else { //to is empty calculate it
  1950. toloc = Number(fromloc) + <out:value-of select="{$lines}"/> -1;
  1951. }
  1952. }
  1953. else {
  1954. if (toloc == "") {
  1955. alert ("<xts:string id="IDS_PAGER_ENTRIES_EMPTY" encode="javascript"/>");
  1956. return;
  1957. }
  1958. else {
  1959. checkPositiveIntegerDefault(to,"");
  1960. toloc = to.value;
  1961. if ( toloc == "" ) {
  1962. alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
  1963. return;
  1964. }
  1965. fromloc = Number(toloc) - <out:value-of select="{$lines}"/> +1;
  1966. if (Number(fromloc) &lt; 0) {
  1967. fromloc=1;
  1968. }
  1969. }
  1970. }
  1971. location.href = "<out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/>&amp;m_pagerfrom<xsl:value-of select="$cf_pname"/>=" + fromloc + "&amp;m_pagerto<xsl:value-of select="$cf_pname"/>=" + toloc + "&amp;m_pg_e<xsl:value-of select="$cf_pname"/>=<out:value-of select="{$hasEntries}"/>";
  1972. if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
  1973. document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
  1974. }
  1975. }
  1976. </out:otherwise>
  1977. </out:choose>
  1978. </script>
  1979. <xsl:choose>
  1980. <xsl:when test="$cf_vname='true'">
  1981. <out:if test="{$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0'">
  1982. <!--
  1983. preDelete java script function for a virtualPage pager. Only used on the main page to return to the previous page when the contents of the last page are deleted.
  1984. -->
  1985. <script language="javascript">
  1986. function preDelete(formObj, prefix)
  1987. {
  1988. if( window.selectionCount )
  1989. if (selectionCount(formObj, prefix) == <out:value-of select="{$itemCnt}"/>)
  1990. {
  1991. if( document.forms[formObj].backURL )
  1992. {
  1993. document.forms[formObj].backURL.value =
  1994. &quot;<out:value-of select="{$pagerBack}"/><out:value-of select="concat('&amp;m_', '{$cf_pname}', 'section=')"/><out:value-of select="({$startPos}) - ({$lines}) + 1"/>&quot;;
  1995. }
  1996. }
  1997. }
  1998. </script>
  1999. </out:if>
  2000. </xsl:when>
  2001. <xsl:otherwise>
  2002. <out:if test="'{$genDelete}'='yes' and {$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0' and ({$startPos}+{$lines}) >= {$itemCnt}">
  2003. <!--
  2004. preDelete[pager name] java script function for a non-virtualPage pager.
  2005. -->
  2006. <script language="javascript">
  2007. function preDelete<out:value-of select="'{$cf_pname}'"/>(formObj, prefix)
  2008. {<out:text/><!--out:if test="{$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0' and ({$startPos}+{$lines}) >= {$itemCnt} "-->
  2009. var lpp = <out:value-of select="{$lines}"/>;
  2010. var len = 0;
  2011. var elementCount = document.forms[formObj].length;
  2012. for (var i=0; i &lt; elementCount ; i++)
  2013. {
  2014. if (document.forms[formObj].elements[i].name.indexOf(prefix) == 0 &amp;&amp; document.forms[formObj].elements[i].checked)
  2015. {
  2016. len = len + 1;
  2017. }
  2018. }
  2019. if ( len == <out:value-of select="{$itemCnt} - {$startPos}"/>)
  2020. {
  2021. <out:value-of select="concat('document.forms[formObj].m_', '{$cf_pname}', 'section.value = ')"/><out:value-of select="{$startPos}+1"/> - lpp;
  2022. }
  2023. <!--/out:if--><out:text/>}
  2024. </script>
  2025. </out:if>
  2026. </xsl:otherwise>
  2027. </xsl:choose>
  2028. </xsl:template>
  2029. <!--
  2030. Template - cf-main-pager-goto-button-section:
  2031. This template creates the navigation goto button beside the input entry fields from and to for Entries:.
  2032. Operation:
  2033. When the user enters a value for a range of entries they wish to see, then the goto button is pressed the entries corresponding to those numbers
  2034. are displayed, given the fact that those entries DO exist - if they do not, the original numbers remain in the fields; the pager navigation buttons are disabled and a
  2035. No entries message is displayed.
  2036. This template is used exclusively by cf-main-pager-section.
  2037. -->
  2038. <xsl:template name="cf-main-pager-goto-button-section">
  2039. <xsl:param name="useUtml"/>
  2040. <xsl:param name="cf_pname"/>
  2041. <xsl:param name="pagerPosition"/>
  2042. <xsl:param name="tooltip"/>
  2043. <xsl:variable name="tb">
  2044. <xsl:if test="$pagerPosition = 'bottom'">_d</xsl:if>
  2045. </xsl:variable>
  2046. <script language="javascript">
  2047. var imgAnimatedGo = new Image();
  2048. imgAnimatedGo.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>action_go_ani.gif";
  2049. </script>
  2050. <out:variable name="GoToText"><xts:string id="IDS_PAGER_GO_TO"/></out:variable>
  2051. <xsl:choose>
  2052. <xsl:when test="$useUtml!='true'">
  2053. <a title="{'{$GoToText}'}" role="button" tabindex="0">
  2054. <out:attribute name="href">
  2055. <out:text/>javascript:nav<xsl:value-of select="$cf_pname"/>Go('<xsl:value-of select="$tb"/>')<out:text/>
  2056. </out:attribute>
  2057. <img alt="{'{$GoToText}'}" title="{'{$GoToText}'}" id="img_{$cf_pname}_go{$pagerPosition}" class="button flippingImages" role="button" border="0" width="16" height="16" src="{'{$skin_images}'}action_go.gif" onmousedown="this.className='button_pressed flippingImages'" onmouseover="this.className='button_hover flippingImages'" onmouseout="this.className='button flippingImages'"/>
  2058. </a>
  2059. </xsl:when>
  2060. <xsl:otherwise>
  2061. <utml:a title="{'{$GoToText}'}" role="button" tabindex="0">
  2062. <out:attribute name="href">
  2063. <out:text/>javascript:nav<xsl:value-of select="$cf_pname"/>Go('<xsl:value-of select="$tb"/>')<out:text/>
  2064. </out:attribute>
  2065. <img alt="{'{$GoToText}'}" title="{'{$GoToText}'}" id="img_{$cf_pname}_go" class="button flippingImages" role="button" border="0" width="16" height="16" src="{'{$skin_images}'}action_go.gif" onmousedown="this.className='button_pressed flippingImages'" onmouseover="this.className='button_hover flippingImages'" onmouseout="this.className='button flippingImages'"/>
  2066. </utml:a>
  2067. </xsl:otherwise>
  2068. </xsl:choose>
  2069. </xsl:template>
  2070. <!--
  2071. Template - cf-main-pager-button-section:
  2072. This template creates the navigation buttons along the sides of list-view display for the main pages (Public Folders / My Folders) and other
  2073. pages. The UI display consist of the top, page-up, page-down and bottom buttons.
  2074. Operation:
  2075. When the display is at the first object the top and page-up navigation buttons are disabled. Likewise, when the display is at the last object the
  2076. page-down and bottom buttons are disabled. When the buttons are active they contain the information on the action to be performed when pressed.
  2077. They contain the next sections to display (minus 1 is used to get the last section to display for the bottom button).
  2078. This template is used exclusively by cf-main-pager-section.
  2079. -->
  2080. <xsl:template name="cf-main-pager-button-section">
  2081. <xsl:param name="useUtml"/>
  2082. <xsl:param name="condition"/>
  2083. <xsl:param name="label"/>
  2084. <xsl:param name="cf_pname"/>
  2085. <xsl:param name="formName"/>
  2086. <xsl:param name="navpage"/>
  2087. <xsl:param name="tooltip"/>
  2088. <xsl:param name="validate"/>
  2089. <xsl:param name="pagerBack"/>
  2090. <xsl:param name="buttBottom" select="''"/>
  2091. <xsl:choose> <!-- <out:if test="{$showControl}='true'"> <xsl:when test="string($useUtml)!='true'">-->
  2092. <xsl:when test="string($useUtml)!='true'">
  2093. <out:choose>
  2094. <out:when test="{$condition}">
  2095. <a role="button">
  2096. <out:attribute name="href">
  2097. <xsl:if test="$validate='true'"><xsl:text>javascript:if(validate()){</xsl:text></xsl:if>
  2098. <xsl:choose>
  2099. <xsl:when test="string($formName) != ''">
  2100. <xsl:choose>
  2101. <xsl:when test="$label='top'">javascript:nav<xsl:value-of select="$cf_pname"/>T();</xsl:when>
  2102. <xsl:when test="$label='pageup'">javascript:nav<xsl:value-of select="$cf_pname"/>U();</xsl:when>
  2103. <xsl:when test="$label='pagedown'">javascript:nav<xsl:value-of select="$cf_pname"/>D();</xsl:when>
  2104. <xsl:otherwise>javascript:nav<xsl:value-of select="$cf_pname"/>B();</xsl:otherwise>
  2105. </xsl:choose>
  2106. </xsl:when>
  2107. <xsl:otherwise>
  2108. <out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/><out:value-of select="concat('&amp;m_', '{$cf_pname}', 'section=')"/><out:value-of select="{$navpage}"/><out:value-of select="concat('&amp;m_pg_e', '{$cf_pname}', '=')"/><out:value-of select="$cf_{$cf_pname}_hasEntries"/>
  2109. </xsl:otherwise>
  2110. </xsl:choose>
  2111. <xsl:if test="$validate='true'"><xsl:text>}</xsl:text></xsl:if>
  2112. </out:attribute>
  2113. <out:attribute name="title"><xts:string id="{$tooltip}"/></out:attribute>
  2114. <out:attribute name="tabindex">0</out:attribute>
  2115. <img class="button flippingImages" role="button" width="13" height="13" border="0" src="{'{$skin_images}'}control_btn_{$label}.gif" onmousedown="this.className='button_pressed flippingImages'" onmouseover="this.className='button_hover flippingImages'" onmouseout="this.className='button flippingImages'">
  2116. <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
  2117. </img>
  2118. </a>
  2119. </out:when>
  2120. <out:otherwise>
  2121. <img width="13" height="13" src="{'{$skin_images}'}control_btn_{$label}_disabled.gif" role="button" aria-disabled="true">
  2122. <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
  2123. <out:attribute name="class">button flippingImages</out:attribute>
  2124. </img>
  2125. </out:otherwise>
  2126. </out:choose>
  2127. </xsl:when>
  2128. <xsl:otherwise>
  2129. <out:choose>
  2130. <out:when test="{$condition}">
  2131. <utml:a role="button">
  2132. <out:attribute name="href">
  2133. <xsl:if test="$validate='true'"><xsl:text>javascript:if(validate()){</xsl:text></xsl:if>
  2134. <xsl:choose>
  2135. <xsl:when test="string($formName) != ''">
  2136. <xsl:choose>
  2137. <xsl:when test="$label='top'">javascript:nav<xsl:value-of select="$cf_pname"/>T();</xsl:when>
  2138. <xsl:when test="$label='pageup'">javascript:nav<xsl:value-of select="$cf_pname"/>U();</xsl:when>
  2139. <xsl:when test="$label='pagedown'">javascript:nav<xsl:value-of select="$cf_pname"/>D();</xsl:when>
  2140. <xsl:otherwise>javascript:nav<xsl:value-of select="$cf_pname"/>B();</xsl:otherwise>
  2141. </xsl:choose>
  2142. </xsl:when>
  2143. <xsl:otherwise>
  2144. <out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/><out:value-of select="concat('&amp;m_', '{$cf_pname}', 'section=')"/><out:value-of select="{$navpage}"/><out:value-of select="concat('&amp;m_pg_e', '{$cf_pname}', '=')"/><out:value-of select="$cf_{$cf_pname}_hasEntries"/>
  2145. </xsl:otherwise>
  2146. </xsl:choose>
  2147. <xsl:if test="$validate='true'"><xsl:text>}</xsl:text></xsl:if>
  2148. </out:attribute>
  2149. <out:attribute name="title"><xts:string id="{$tooltip}"/></out:attribute>
  2150. <out:attribute name="tabindex">0</out:attribute>
  2151. <img class="button flippingImages" role="button" width="13" height="13" border="0" src="{'{$skin_images}'}control_btn_{$label}.gif" onmousedown="this.className='button_pressed flippingImages'" onmouseover="this.className='button_hover flippingImages'" onmouseout="this.className='button flippingImages'">
  2152. <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
  2153. </img>
  2154. </utml:a>
  2155. </out:when>
  2156. <out:otherwise>
  2157. <img width="13" height="13" src="{'{$skin_images}'}control_btn_{$label}_disabled.gif">
  2158. <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
  2159. <out:attribute name="class">button flippingImages</out:attribute>
  2160. </img>
  2161. </out:otherwise>
  2162. </out:choose>
  2163. </xsl:otherwise>
  2164. </xsl:choose>
  2165. <img height="1" width="2" src="{'{$webcontent}'}/images/space.gif" alt=""/>
  2166. </xsl:template>
  2167. <!--
  2168. Template - cf:do-the-path-link:
  2169. This template is used to display the search path for an object or where the object is located. The path link
  2170. is represented by each object in the path (exclusive of the current object) which may or may not be
  2171. hyperlinked with a greater than sign as a separation indicator.
  2172. Example:
  2173. Public Folders > YearToDate Reports > Finance
  2174. Parameters that can be used with this tag are:
  2175. cf:param familtytree - the objects ancestors
  2176. cf:param familtymember - the current object name
  2177. cf:param isRootPath - this is the root object; no ancestors
  2178. cf:param home - the root of the ancestry.
  2179. cf:param home-title - the root's title (such as /content = Public Folders).
  2180. cf:param anchorpath - the path is an anchor - so use the supplied anchor.
  2181. cf:param onlyancestors - only display the ancestry sans object.
  2182. cf:param lastIsLink - the object is to be a hyperlink.
  2183. Operation:
  2184. The basic operation of this template is to loop through the objects ancestors displaying each objects title
  2185. as a portion of the path - overriding the first objects title when a home-title is supplied and creating a hyperlink for
  2186. each object (to be able to navigate to that object) as required.
  2187. -->
  2188. <xsl:template match="cf:do-the-path-link">
  2189. <xsl:variable name="ft" select="./cf:param[@name='familytree']"/>
  2190. <xsl:variable name="fm" select="./cf:param[@name='familymember']"/>
  2191. <out:variable name="familytree" select="{$ft}"/>
  2192. <out:variable name="familymember" select="{$fm}"/>
  2193. <out:variable name="familymemberDisplay">
  2194. <out:value-of select="xtsext:enforceBTD($familymember, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2195. </out:variable>
  2196. <out:variable name="isTop">
  2197. <xsl:choose>
  2198. <xsl:when test="./cf:param[@name='isRootPath']">
  2199. <xsl:copy-of select="./cf:param[@name='isRootPath']"/>
  2200. </xsl:when>
  2201. <xsl:otherwise>
  2202. <out:value-of select="'false'"/>
  2203. </xsl:otherwise>
  2204. </xsl:choose>
  2205. </out:variable>
  2206. <out:variable name="home">
  2207. <xsl:choose>
  2208. <xsl:when test="./cf:param[@name='home']">
  2209. <xsl:copy-of select="./cf:param[@name='home']"/>
  2210. </xsl:when>
  2211. <xsl:otherwise>
  2212. <out:value-of select="'false'"/>
  2213. </xsl:otherwise>
  2214. </xsl:choose>
  2215. </out:variable>
  2216. <out:variable name="home-title">
  2217. <xsl:if test="./cf:param[@name='home-title']">
  2218. <xsl:copy-of select="./cf:param[@name='home-title']"/>
  2219. </xsl:if>
  2220. </out:variable>
  2221. <out:variable name="home-title-display">
  2222. <out:value-of select="xtsext:enforceBTD($home-title, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
  2223. </out:variable>
  2224. <out:variable name="anchorpath">
  2225. <xsl:choose>
  2226. <xsl:when test="./cf:param[@name='anchorpath'] and ./cf:param[@name='anchorpath']!=''">
  2227. <out:value-of select="'true'"/>
  2228. </xsl:when>
  2229. <xsl:otherwise>
  2230. <out:value-of select="'false'"/>
  2231. </xsl:otherwise>
  2232. </xsl:choose>
  2233. </out:variable>
  2234. <out:variable name="onlyAncestors">
  2235. <xsl:if test="./cf:param[@name='onlyAncestors'] and ./cf:param[@name='onlyAncestors']='true'">
  2236. <out:value-of select="'true'"/>
  2237. </xsl:if>
  2238. <xsl:if test="not(./cf:param[@name='onlyAncestors']) or ./cf:param[@name='onlyAncestors']='false'">
  2239. <out:value-of select="'false'"/>
  2240. </xsl:if>
  2241. </out:variable>
  2242. <out:variable name="lastIsLink">
  2243. <xsl:choose>
  2244. <xsl:when test="./cf:param[@name='lastIsLink']">
  2245. <xsl:copy-of select="./cf:param[@name='lastIsLink']"/>
  2246. </xsl:when>
  2247. <xsl:otherwise>
  2248. <out:value-of select="'false'"/>
  2249. </xsl:otherwise>
  2250. </xsl:choose>
  2251. </out:variable>
  2252. <out:variable name="match-position">
  2253. <out:if test="$home!='' and count($familytree/child::cm:ancestorInfo) > 0">
  2254. <out:for-each select="$familytree/child::cm:ancestorInfo">
  2255. <out:if test="not(starts-with(./child::cm:searchPath,$home))">
  2256. <out:choose>
  2257. <out:when test="$isTop='false'">
  2258. <out:value-of select="concat(',',string(position()+1))"/>
  2259. </out:when>
  2260. <out:otherwise>
  2261. <out:value-of select="concat(',',string(position()))"/>
  2262. </out:otherwise>
  2263. </out:choose>
  2264. </out:if>
  2265. </out:for-each>
  2266. </out:if>
  2267. </out:variable>
  2268. <out:variable name="start-position">
  2269. <out:if test="$match-position != ''">
  2270. <out:value-of select="xtsext:substringAfterLast(string($match-position),',')"/>
  2271. </out:if>
  2272. </out:variable>
  2273. <!-- RTL Support -->
  2274. <!-- TextSeparator ">" with marker according to UI Direction (RTL or LTR) -->
  2275. <out:variable name="textSeparatorWithMarker">
  2276. <out:choose>
  2277. <out:when test="$is-ui-rtl=true()"> &#8207;&gt; </out:when><!-- RLM -->
  2278. <out:otherwise> &#8206;&gt; </out:otherwise><!-- LRM -->
  2279. </out:choose>
  2280. </out:variable>
  2281. <!--a>count: <out:value-of select="count($familytree/child::cm:ancestorInfo)"/></a><br/>
  2282. <a>home: <out:value-of select="$home"/></a><br/>
  2283. <a>home-title: <out:value-of select="$home-title"/></a><br/>
  2284. <a>pos: <out:value-of select="$start-position"/></a><br/>
  2285. <a>anchor: <out:value-of select="$anchorpath"/></a><br/>
  2286. <a>member: <out:value-of select="$familymember"/></a><br/>
  2287. <a>top: <out:value-of select="$isTop"/></a><br/-->
  2288. <!-- RTL support -->
  2289. <!-- Bread crumb Block start with RLE (for RTL) or LRE (for LTR)-->
  2290. <out:choose>
  2291. <out:when test="$is-ui-rtl=true()">&#8235;</out:when><!-- RLE -->
  2292. <out:otherwise>&#8234;</out:otherwise><!-- LRE -->
  2293. </out:choose>
  2294. <out:for-each select="$familytree/child::cm:ancestorInfo">
  2295. <!--out:comment><out:value-of select="./cf:param[@name='anchorpath']"/></out:comment-->
  2296. <out:if test="$home = 'false' or $home='' or starts-with(./child::cm:searchPath,$home)">
  2297. <out:choose>
  2298. <out:when test="$anchorpath='false'">
  2299. <out:choose>
  2300. <out:when test="$home-title!='' and (string(position()) = $start-position or position()=1)">
  2301. <cp:pathText><out:value-of select="$home-title-display"/></cp:pathText>
  2302. </out:when>
  2303. <out:otherwise>
  2304. <out:variable name="cmTitle">
  2305. <out:value-of select="./cm:title"/>
  2306. </out:variable>
  2307. <cp:pathText><out:value-of select="xtsext:enforceBTD($cmTitle, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></cp:pathText>
  2308. </out:otherwise>
  2309. </out:choose>
  2310. <out:choose>
  2311. <out:when test="$onlyAncestors = 'false'">
  2312. <cp:pathTextSeparator> <out:value-of select="$textSeparatorWithMarker"/> </cp:pathTextSeparator>
  2313. </out:when>
  2314. <out:when test="($onlyAncestors='true' and position() != last())">
  2315. <cp:pathTextSeparator> <out:value-of select="$textSeparatorWithMarker"/> </cp:pathTextSeparator>
  2316. </out:when>
  2317. </out:choose>
  2318. </out:when>
  2319. <out:otherwise>
  2320. <out:choose>
  2321. <out:when test="$onlyAncestors='true' and position() = (last())">
  2322. <cp:pathLeafNode>
  2323. <xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLeafNode>
  2324. </out:when>
  2325. <out:otherwise><cp:pathLink><xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLink></out:otherwise>
  2326. </out:choose>
  2327. <out:choose>
  2328. <out:when test="$onlyAncestors='false'">
  2329. <cp:pathSeparator><xsl:text> </xsl:text><out:value-of select="$textSeparatorWithMarker"/><xsl:text> </xsl:text></cp:pathSeparator>
  2330. </out:when>
  2331. <out:when test="($onlyAncestors='true' and position() != last())">
  2332. <cp:pathSeparator><xsl:text> </xsl:text><out:value-of select="$textSeparatorWithMarker"/><xsl:text> </xsl:text></cp:pathSeparator>
  2333. </out:when>
  2334. </out:choose>
  2335. </out:otherwise>
  2336. </out:choose>
  2337. </out:if>
  2338. </out:for-each>
  2339. <out:if test="$onlyAncestors = 'false' ">
  2340. <out:choose>
  2341. <out:when test="$lastIsLink='true' and $anchorpath='true'"><cp:pathLink><xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLink></out:when>
  2342. <out:when test="$isTop='true' and $home-title != ''">
  2343. <out:choose>
  2344. <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$home-title-display"/></cp:pathText></out:when>
  2345. <out:otherwise><cp:pathLeafNode><out:value-of select="$home-title-display"/></cp:pathLeafNode></out:otherwise>
  2346. </out:choose>
  2347. </out:when>
  2348. <out:when test="$start-position!='' and count($familytree/child::cm:ancestorInfo) >= $start-position">
  2349. <out:choose>
  2350. <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$familymemberDisplay"/></cp:pathText></out:when>
  2351. <out:otherwise><cp:pathLeafNode><out:value-of select="$familymemberDisplay"/></cp:pathLeafNode></out:otherwise>
  2352. </out:choose>
  2353. </out:when>
  2354. <out:otherwise>
  2355. <out:choose>
  2356. <out:when test="$home != '' and $home != 'false' and $home-title != '' and $start-position=''">
  2357. <out:choose>
  2358. <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$home-title-display"/></cp:pathText></out:when>
  2359. <out:otherwise><cp:pathLeafNode><out:value-of select="$home-title-display"/></cp:pathLeafNode></out:otherwise>
  2360. </out:choose>
  2361. </out:when>
  2362. <out:otherwise>
  2363. <out:choose>
  2364. <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$familymemberDisplay"/></cp:pathText></out:when>
  2365. <out:otherwise><cp:pathLeafNode><out:value-of select="$familymemberDisplay"/></cp:pathLeafNode></out:otherwise>
  2366. </out:choose>
  2367. </out:otherwise>
  2368. </out:choose>
  2369. </out:otherwise>
  2370. </out:choose>
  2371. </out:if>
  2372. <!-- RTL support -->
  2373. <!-- Bread crumb Block (LRE or RLE) termination -->
  2374. <out:text>&#8236;</out:text><!-- PDF -->
  2375. </xsl:template>
  2376. <!-- -->
  2377. <xsl:template match="cf:resetOnResize">
  2378. <!-- Use this in dialogues when need to reset the flyouts for window.onresize -->
  2379. <!-- Specify supplimentary functions that need to be run in the otherFunctions attribute -->
  2380. <!-- See flyouts.js for definition -->
  2381. <script language="javascript">
  2382. function resetOnResize()
  2383. {
  2384. <xsl:if test="string(@otherFunctions) != ''">
  2385. <xsl:value-of select="@otherFunctions"/>
  2386. </xsl:if>
  2387. flyonresize();
  2388. }
  2389. </script>
  2390. </xsl:template>
  2391. <xsl:template match="cf:resetOnClick">
  2392. <!-- Use this in dialogues when need to reset the flyouts for document.onclick -->
  2393. <!-- Specify supplimentary functions that need to be run in the otherFunctions attribute -->
  2394. <!-- See flyouts.js for definition -->
  2395. <script language="javascript">
  2396. function resetOnClick(event)
  2397. {
  2398. <xsl:if test="string(@otherFunctions) != ''">
  2399. <xsl:value-of select="@otherFunctions"/>
  2400. </xsl:if>
  2401. flyonclick(event);
  2402. }
  2403. </script>
  2404. </xsl:template>
  2405. <!-- the main engine -->
  2406. <xsl:template match="*">
  2407. <xsl:copy>
  2408. <xsl:copy-of select="@*"/>
  2409. <xsl:apply-templates/>
  2410. </xsl:copy>
  2411. </xsl:template>
  2412. </xsl:stylesheet>