123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2015
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="utml bus cm cf cp dp xts xtsext">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- This stylesheet (framework.xsl) consists of the following templates:
- cf:dynamicDropDown - creates a drop list where the user can type in the edit field to filter the available values
- cf:dynamicDiv - used to dynamically show/hide parts of the page (works with all Bering browsers)
- cf:dynamicSection - used to produce collapsible sections that are functional in Bering supported browsers
- cf:dynamicExpandingSection - render collapsible sections (works with all Bering browsers)
- cf:sortList - render a sortable list box.
- cf:column (mode header) - render column headers.
- cf:column (mode content) - render column content.
- cf:main-pager-section (used to produce list pager on main pages - Public Folders / My Folders)
- cf-main-pager-java-section - generate required java script.
- cf-main-pager-button-section - used with main-pager-section
- cf:do-the-path-link - render the search path.
- -->
- <!--
- cf:dynamicDropDown
- creates a drop list where the user can type in the edit field to filter the available values.
- You'll need to include dynDropDown.js for this template to work.
- @name: unique if for the control
- @array: name/value javascript array to populate the dropdown list
- @selectedName: default name for the edit field
- @selectedValue: default value
- @tooltipID: tooltip string ID
- @form: form name
- @first: boolen letting us know if we should put the javascript
- @filterList: Should the list of choices be filtered when the user types
- @valiated: javascript function to call when edit field changes. function take must take two parameters. The control that is being changed,
- and a boolean (ture|false) depending if the current value is valid (i.e. found in the array)
- @width: of the field to be displayed. The default is 200.
- @modifiable: if not modifiable then the utml input will show only the value.
- @useUtml: indicates if we should use utml or regular inputs.
- @track: used for utml:input to track values.
- @update: indicates if this utml input can be updated.
- @readonly: indicates if it is readonly.
- -->
- <xsl:template match="cf:dynamicDropDown">
- <xsl:variable name="width">
- <xsl:choose>
- <xsl:when test="@width != ''">
- <xsl:value-of select="@width"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'200'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <out:variable name="modifiable">
- <xsl:choose>
- <xsl:when test="@modifiable != ''">
- <out:value-of select="{@modifiable}"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'true'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="nameValue">
- <out:value-of select="{@selectedName}"/>
- </out:variable>
- <!-- keep the value of the selected hint -->
- <xsl:choose>
- <xsl:when test="@useUtml and @useUtml ='true'">
- <utml:input type="hidden">
- <utml:value><out:value-of select="{@selectedValue}"/></utml:value>
- <utml:name><out:value-of select="{@name}"/></utml:name>
- <xsl:if test="@track != ''">
- <utml:track><xsl:value-of select="@track"/></utml:track>
- </xsl:if>
- <out:attribute name="id"><out:value-of select="{@name}"/></out:attribute>
- <utml:read-only>
- <out:value-of select="not($modifiable)"/>
- </utml:read-only>
- <utml:update>
- <xsl:choose>
- <xsl:when test="@update='false'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </utml:update>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <input type="hidden">
- <xsl:if test="@selectedValue and @selectedValue !=''">
- <out:attribute name="value"><out:value-of select="{@selectedValue}"/></out:attribute>
- </xsl:if>
- <out:attribute name="name"><out:value-of select="{@name}"/></out:attribute>
- <out:attribute name="id"><out:value-of select="{@name}"/></out:attribute>
- </input>
- </xsl:otherwise>
- </xsl:choose>
- <table summary="" cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td class="tabletext">
- <!-- the edit field -->
- <xsl:choose>
- <xsl:when test="@useUtml and @useUtml = 'true'">
- <utml:input type="text" style="width: {$width}px" size="20" utml:track="true">
- <utml:value name="value"><out:value-of select="$nameValue"/></utml:value>
- <xsl:if test="@track != ''">
- <utml:track><xsl:value-of select="@track"/></utml:track>
- </xsl:if>
- <out:if test="{@readonly}='true'">
- <out:attribute name="readonly"><out:value-of select="{@readonly}"/></out:attribute>
- </out:if>
- <xsl:if test="normalize-space(@title) != ''">
- <out:attribute name="title"><out:value-of select="normalize-space({@title})"/></out:attribute>
- </xsl:if>
- <utml:name><out:value-of select="concat('editField_',{@name})"/></utml:name>
- <out:attribute name="autocomplete"><out:value-of select="'off'"/></out:attribute>
- <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>
- <out:attribute name="id"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
- <xsl:if test="@aria-labelledby and @aria-labelledby != ''">
- <out:attribute name="aria-labelledby"><out:value-of select="{@aria-labelledby}"/></out:attribute>
- </xsl:if>
- <xsl:if test="@onblur and @onblur != ''">
- <out:attribute name="onblur"><xsl:value-of select="@onblur"/>( this );</out:attribute>
- </xsl:if>
- <utml:update>
- <xsl:choose>
- <xsl:when test="@update != '' and @update='false'">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </utml:update>
- <utml:read-only>
- <out:value-of select="not($modifiable)"/>
- </utml:read-only>
- </utml:input>
- </xsl:when>
- <xsl:otherwise>
- <input style="width:{$width}px;">
- <xsl:if test="@selectedName and @selectedName!=''">
- <out:attribute name="value"><out:value-of select="{@selectedName}"/></out:attribute>
- </xsl:if>
- <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>
- <out:attribute name="name"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
- <out:attribute name="id"><out:value-of select="concat('editField_',{@name})"/></out:attribute>
- <xsl:if test="@aria-labelledby and @aria-labelledby != ''">
- <out:attribute name="aria-labelledby"><out:value-of select="{@aria-labelledby}"/></out:attribute>
- </xsl:if>
- </input>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <!-- do not show this if the field not modifiable -->
- <td>
- <!-- the down arrow -->
- <out:if test="$modifiable = 'true'">
- <img border="0" src="{'{$image_root}'}drop_down_arrow.gif" role="button" aria-haspopup="true" tabindex="0">
- <xsl:if test="@tooltipID">
- <out:attribute name="alt"><xts:string id="{@tooltipID}"/></out:attribute>
- </xsl:if>
- <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>
- <out:attribute name="onclick"><out:value-of select="$action"/></out:attribute>
- <out:attribute name="onkeyup">javascript:if(event.keyCode==13) {<out:value-of select="$action"/>}</out:attribute>
- </img>
- </out:if>
- </td>
- </tr>
- <tr>
- <td>
- <!-- div which will contain the select control (i.e. the dropdown) -->
- <div style="width:{$width}px; display:none; position:absolute; border: 0px; padding: 0px; overflow:off;">
- <out:attribute name="id"><out:value-of select="concat('div_',{@name})"/></out:attribute>
- </div>
- </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- Template - cf:dynamicDiv:
- This template is used to produce a div that can be hidden or shown. The surrounding UI
- will dynamically move depending on if the div is visible or hidden.
- Supported by all Bering browsers.
- @visible - compile time check to determine if the div is visible (true/false)
- @runTimeVisibleCheck - runtime check to determine if the div is visible
- -->
- <xsl:template match="cf:dynamicDiv">
- <xsl:if test="@name = //cf:dynamicDiv[1]/@name">
- <script language="javascript">
- function toggledynamicDiv(name)
- {
- var objDiv = document.getElementById(name);
- if (objDiv == null) {
- return;
- }
- if(objDiv.style.display == 'none')
- {
- showDynamicDiv(name);
- }
- else
- {
- hideDynamicDiv(name);
- }
- }
- function showDynamicDiv(name)
- {
- var objDiv = document.getElementById(name);
- if (objDiv != null) {
- objDiv.style.display='';
- }
- }
- function hideDynamicDiv(name)
- {
- var objDiv = document.getElementById(name);
- if (objDiv != null) {
- objDiv.style.display='none';
- }
- }
- </script>
- </xsl:if>
- <div id="{@name}">
- <out:attribute name="style">
- <xsl:choose>
- <xsl:when test="@visible='true'">display:</xsl:when>
- <xsl:when test="@runTimeVisibleCheck and @runTimeVisibleCheck!=''">
- <out:choose>
- <out:when test="{@runTimeVisibleCheck}">display:</out:when>
- <out:otherwise>display:none</out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>display:none</xsl:otherwise>
- </xsl:choose>
- </out:attribute>
- <xsl:apply-templates/>
- </div>
- </xsl:template>
- <!--
- Template - cf:dynamicSection:
- This template is used to produce collapsible sections that are functional in Bering supported browsers.
- The UI interface for this functionality is represented by a hyperlink followed by chevrons
- when the section is expanded and inverted chevrons when the section is collapsed.
- Operation:
- Makes a division displayed inline and visible or not displayed and invisible.
- -->
- <xsl:template match="cf:dynamicExpandingSection">
- <xsl:call-template name="generate_dynamicExpandingSectionTop"/>
- <xsl:call-template name="generate_dynamicExpandingSectionBody"/>
- </xsl:template>
- <xsl:template name="generate_dynamicExpandingSectionTop">
- <xsl:if test="@name = //cf:dynamicExpandingSection[1]/@name or @name = //cf:dynamicExpandingSectionTop/@name">
- <script language="javascript">
- //images used for the expanding section
- var imgUp = new Image();
- var imgDown = new Image();
- imgUp.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_collapse.gif";
- imgDown.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_expand.gif";
- function toggleDynamicSection(name)
- {
- if(document.getElementById(name).style.display == 'none')
- {
- showDynamicSection(name);
- }
- else
- {
- hideDynamicSection(name);
- }
- <xsl:if test="string(@callback-func) != ''">
- <xsl:value-of select="@callback-func"/>
- </xsl:if>
- }
- function showDynamicSection(name)
- {
- document.getElementById(name).style.display='';
- var imgName = document.getElementById('img' + name);
- imgName.src = imgUp.src;
- imgName.setAttribute('alt','<xts:string id="IDS_SECTION_COLLAPSE" encode="javascript"/>');
- imgName.setAttribute('title','<xts:string id="IDS_SECTION_COLLAPSE" encode="javascript"/>');
- setStateValue(name, "1");
- var controllerEl = document.getElementById(name);
- if (controllerEl != null){
- controllerEl.setAttribute("aria-expanded","true");
- }
- }
- function hideDynamicSection(name)
- {
- document.getElementById(name).style.display='none';
- var imgName = document.getElementById('img' + name);
- imgName.src = imgDown.src;
- imgName.setAttribute('alt','<xts:string id="IDS_SECTION_EXPAND" encode="javascript"/>');
- imgName.setAttribute('title','<xts:string id="IDS_SECTION_EXPAND" encode="javascript"/>');
- setStateValue(name, "0");
- var controllerEl = document.getElementById(name);
- if (controllerEl != null){
- controllerEl.setAttribute("aria-expanded","false");
- }
- }
- </script>
- </xsl:if>
- <cp:dynamicSectionTop>
- <xsl:copy-of select="@*"/>
- </cp:dynamicSectionTop>
- </xsl:template>
- <xsl:template name="generate_dynamicExpandingSectionBody">
- <div id="{@name}" role="region" >
- <!-- need to make sure that we don't have both an aria label and an aria-labelled by -->
- <xsl:choose>
- <xsl:when test="@label">
- <out:attribute name="aria-label">
- <xts:string id="{@label}"/>
- </out:attribute>
- </xsl:when>
- <xsl:otherwise>
- <out:attribute name="aria-labelledby"><xsl:value-of select="@name"/>_title</out:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <out:attribute name="style">
- <out:choose>
- <out:when test="@visible='true'">display:</out:when>
- <out:otherwise>display:none</out:otherwise>
- </out:choose>
- </out:attribute>
- <out:attribute name="aria-expanded">
- <out:value-of select="boolean(@visible)"/>
- </out:attribute>
- <xsl:apply-templates/>
- </div>
- <xsl:if test="not(@initialize = 'false')">
- <script language="javascript">
- if (getSessionValue("<xsl:value-of select="@name"/>") == 1 )
- showDynamicSection("<xsl:value-of select="@name"/>");
- else
- hideDynamicSection("<xsl:value-of select="@name"/>");
- </script>
- </xsl:if>
- </xsl:template>
- <xsl:template match="cf:dynamicExpandingSectionTop">
- <xsl:call-template name="generate_dynamicExpandingSectionTop"/>
- </xsl:template>
- <xsl:template match="cf:dynamicExpandingSectionBody">
- <xsl:call-template name="generate_dynamicExpandingSectionBody"/>
- </xsl:template>
- <!--
- Template - cf:sortList:
- This template creates a sortable list box.
- The attributes that can be used with this tag are:
- @name - name of the listbox
- @size - listbox size (no default)
- @form - name of the form we are in
- @array - name of the javascript array used
- sort array order
- 1) position - starting will be decending position
- 2) what you want to show up in the list - viewable portion
- 3) what you want to be passed with the postion for the item
- 4) place holder - empty value used for keeping selections selected
- - any others can be used for other ordering with the sortList function
- final passed value format example:
- <param name="name_of_sort_list">position(#1), passed info(#3)</param>
- to create this the ok button has to execute setList(document.formname.listName, sortarray)
- Operation:
- Produces a list of objects in a table with hyperlinks at the bottom right-hand corner which are used to manipulate
- the order of the list.
- Actions:
- up - move a selected object up one position in the list.
- down - move a selected object down one position in the list.
- top - move a selected object to the top of the list.
- bottom - move a selected object to the bottom of the list.
- -->
- <xsl:template match="cf:sortList">
- <out:variable name="cf_firstListName"><xsl:value-of select="//cf:sortList/@name"/></out:variable>
- <out:variable name="cf_listName"><xsl:value-of select="@name"/></out:variable>
- <out:variable name="action"><xsl:value-of select="@action"/></out:variable>
- <out:if test="$cf_listName = $cf_firstListName">
- <script language="javascript">
- function moveOptions(what, sortArray, myAction) {
- // If there is nothing to perform an action on then get out of here !!
- if (sortArray == null || sortArray.length == 0)
- return;
- //if there isn't a value, set them
- if (sortArray[sortArray.length - 1][0] == 0 && sortArray[0][0] == 0)
- revalue(sortArray);
- //mark all selected choices as selected
- for (var i=0; i < what.options.length; i++) {
- //if it is selected and the one before this isn't
- if (what[i].selected == true)
- sortArray[what[i].value][3] = "selected";
- }
- //move up
- if (myAction == 'up') {
- var optionAbove = '';
- var currentValue = '';
- var tempValue = '';
- for (var i=1; i < what.options.length; i++) {
- //if it is selected and the one before this isn't
- if ((what[i].selected == true) && (what[i-1].selected == false)) {
- optionAbove = i-1;
- currentValue = sortArray[what[i].value][0];
- sortArray[what[i].value][0] = sortArray[what[i-1].value][0];
- }
- //if it is selected and the one before this is
- if ((what[i].selected == true) && (what[i-1].selected == true) && (currentValue != '')) {
- tempValue = sortArray[what[i].value][0];
- sortArray[what[i].value][0] = currentValue;
- currentValue = tempValue;
- }
- //take the option above the top selected and move it down
- if (what[i].selected == true && (currentValue != '')) {
- if (what.options.length == i + 1)
- sortArray[what[optionAbove].value][0] = currentValue;
- else if (what[i+1].selected == false)
- sortArray[what[optionAbove].value][0] = currentValue;
- }
- }
- }
- // move down
- if (myAction == 'down') {
- var optionBelow = '';
- var currentValue = '';
- var tempValue = '';
- for (var i = what.options.length - 2; i >= 0; i--) {
- //if it is selected and the one after this isn't
- if ((what[i].selected == true) && (what[i + 1].selected == false)) {
- optionBelow = i + 1;
- currentValue = sortArray[what[i].value][0];
- sortArray[what[i].value][0] = sortArray[what[i+1].value][0];
- }
- //if it is selected and the one before this is
- if ((what[i].selected == true) && (what[i+1].selected == true) && (currentValue != '')) {
- tempValue = sortArray[what[i].value][0];
- sortArray[what[i].value][0] = currentValue;
- currentValue = tempValue;
- }
- //take the option above the top selected and move it down
- if (what[i].selected == true && (currentValue != '')) {
- if (i <= 0)
- sortArray[what[optionBelow].value][0] = currentValue;
- else if (what[i - 1].selected == false)
- sortArray[what[optionBelow].value][0] = currentValue;
- }
- }
- }
- // move to top
- if (myAction == 'top') {
- var topValue = sortArray[what[0].value][0];
- for (var i = what.options.length - 1; i >= 0; i--) {
- //if it is selected and the one after this isn't
- if (what[i].selected == true) {
- sortArray[what[i].value][0] = topValue - (-1);
- topValue++;
- }
- }
- }
- // move to bottom
- if (myAction == 'bottom') {
- var topValue = sortArray[what[(what.options.length - 1)].value][0];
- for (var i = 0; i < what.options.length; i++) {
- //if it is selected and the one after this isn't
- if (what[i].selected == true) {
- sortArray[what[i].value][0] = topValue - 1;
- topValue = topValue - 1;
- }
- }
- }
- //call the sort
- sortIndex(what, sortArray);
- }
- //delete an option
- function deleteOption(what, index) {
- what.options[index] = null;
- }
- //add an option
- function addOption(what, text, value, isHidden) {
- var defaultSelected = false;
- var selected = false;
- var optionName = new Option(text, value, defaultSelected, selected);
- optionName.lang = '<out:value-of select="$contentLocale"/>';
- if(isHidden=="true")
- optionName.className="inactiveText";
- what.options[what.length] = optionName;
- what.options[what.length-1].selected = false;
- }
- //sort the options by value
- function sortIndex(what, sortArray) {
- sortArray.sort(function(a,b) { return a[0]-b[0]; });
- //create selected options array and delete options
- selectedOptions = new Array();
- for (var i=(what.options.length - 1); i > -1; i--) {
- selectedOptions[i] = what[i].selected;
- deleteOption(what,i);
- }
- //delete all the options
- for (var i=(what.options.length - 1); i > -1; i--) {
- deleteOption(what,i);
- }
- //switch the array around to make the top the highest values
- sortArray.reverse();
- //add the options back in order
- var isHidden = 'false';
- for (var i=0; i < sortArray.length; i++) {
- if(sortArray[i].length > 7)
- isHidden = sortArray[i][7];
- addOption(what, sortArray[i][1], i, isHidden)
- if (sortArray[i][3] != '')
- what[i].selected=true;
- }
- revalue(sortArray);
- }
- //give the value to each item based on position
- function revalue(sortArray) {
- for (var i=0; i < sortArray.length; i++){
- sortArray[i][0] = sortArray.length - i;
- sortArray[i][3] = "";
- }
- }
- //sort the options by value
- function sortList(what, sortArray, sortValue) {
- //this will contain what part of the array to sor
- var sortOn = sortValue.substring(1, sortValue.length);
- //sort the values
- sortArray.sort(
- function(a, b) {
- if (a[sortOn] < b[sortOn])
- return -1;
- if (a[sortOn] > b[sortOn])
- return 1;
- return 0;
- });
- //delete all the options
- for (var i=(what.options.length - 1); i > -1; i--) {
- deleteOption(what,i);
- }
- //switch the array around if the order is descending
- if (sortValue.substring(0,1) == 'd')
- sortArray.reverse();
- //add the options back in order
- for (var i=0; i < sortArray.length; i++) {
- addOption(what,sortArray[i][1],i)
- }
- revalue(sortArray);
- }
- //set all the values the array value
- function setList(what, sortArray) {
- if (what) {
- for (var i=0; i < what.options.length; i++){
- positionInArray = what[i].value;
- sa = sortArray[positionInArray];
- what[i].value = sa[0] + ',' + sa[2];
- <!--
- Fix BUG 465693 - Sort dialogue fails.
- CM in Bering does strict type checking, so the 6th entry contains the objectClass that gets
- extracted in submit.xts and used to define the element name in save.xts.
- -->
- if(sa.length > 6)
- {
- what[i].value += ',' + sa[6];
- }
- what[i].selected = true;
- }
- }
- }
- </script>
- </out:if>
- <cp:sortListDisplay>
- <cp:section1>
- <utml:select name="{@name}" multiple="multiple" size="{@size}">
- <xsl:if test="@id">
- <xsl:attribute name="id">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@onClick">
- <xsl:attribute name="onClick">
- <xsl:value-of select="@onClick"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@class">
- <xsl:attribute name="class">
- <xsl:value-of select="@class"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@aria-labelledby">
- <xsl:attribute name="aria-labelledby">
- <xsl:value-of select="@aria-labelledby"/>
- </xsl:attribute>
- </xsl:if>
- <utml:default-value>
- <out:value-of select="'none'"/>
- </utml:default-value>
- <xsl:if test="cf:readOnlyFlag">
- <out:if test="{cf:readOnlyFlag}">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- </xsl:if>
- <xsl:apply-templates select="cf:initContent/*"/>
- <utml:option value="deleteme">
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- <out:text/>         <out:text/>
- </utml:option>
- </utml:select>
- </cp:section1>
- <xsl:choose>
- <xsl:when test="@mode='mypages'">
- <cp:section3>
- <out:if test="not({cf:readOnlyFlag})">
- <table summary="" border="0" width="100%" cellpadding="2" cellspacing="0">
- <tr>
- <td>
- <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'top')">
- <img border="0" src="{'{$image_root}'}move_top.gif">
- <out:attribute name="alt"><xts:string id="IDS_SORT_TOP"/></out:attribute>
- </img>
- </a>
- </td>
- </tr>
- <tr>
- <td>
- <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'up')">
- <img border="0" src="{'{$image_root}'}move_up.gif">
- <out:attribute name="alt"><xts:string id="IDS_SORT_UP"/></out:attribute>
- </img>
- </a>
- </td>
- </tr>
- <tr>
- <td>
- <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'down')">
- <img border="0" src="{'{$image_root}'}move_down.gif">
- <out:attribute name="alt"><xts:string id="IDS_SORT_DOWN"/></out:attribute>
- </img>
- </a>
- </td>
- </tr>
- <tr>
- <td>
- <a href="javascript:moveOptions(document.{@form}.{@name}, {@array}, 'bottom')">
- <img border="0" src="{'{$image_root}'}move_bottom.gif">
- <out:attribute name="alt"><xts:string id="IDS_SORT_BOTTOM"/></out:attribute>
- </img>
- </a>
- </td>
- </tr>
- </table>
- </out:if>
- </cp:section3>
- <cp:section2>
- <out:if test="not({cf:readOnlyFlag})">
- <xsl:apply-templates select="cf:sortAction/child::node()"/>
- </out:if>
- </cp:section2>
- </xsl:when>
- <xsl:otherwise>
- <cp:section2>
- <out:if test="$action!='none'">
- <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">
- <xsl:if test="@tLabel != ''">
- <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>
- </xsl:if>
- <tr class="formLink">
- <xsl:variable name="slalb">
- <xsl:value-of select="@tLabel"/><xsl:text> </xsl:text>
- <xsl:if test="@parentLabel != ''">
- <xsl:value-of select="@parentLabel"/><xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>sortList_</xsl:text>
- <xsl:value-of select="@tLabel"/><xsl:text>_</xsl:text><xsl:value-of select="@parentLabel"/><xsl:text>_</xsl:text>
- </xsl:variable>
- <td>
- <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>
- </td>
- <td>
- <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>
- </td>
- <td>
- <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>
- </td>
- <td>
- <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>
- </td>
- </tr>
- </table>
- <xsl:apply-templates select="cf:sortAction/*"/>
- </out:if>
- </cp:section2>
- </xsl:otherwise>
- </xsl:choose>
- </cp:sortListDisplay>
- <script language="javascript">
- //delete the blank options
- 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') {
- 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;
- }
- </script>
- </xsl:template>
- <xsl:template match="cf:column" mode="header">
- <cp:columnHeader from="ctrl">
- <xsl:if test="@sort">
- <xsl:attribute name="sort"><xsl:value-of select="@sort"/></xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="@width"/>
- <cp:text type="title"><xts:string id="{@name}"/></cp:text>
- </cp:columnHeader>
- </xsl:template>
- <xsl:template match="cf:column" mode="content">
- <cp:columnContent from="ctrl">
- <xsl:apply-templates select="child::*"/>
- <!--xsl:copy-of select="child::node()"/ -->
- </cp:columnContent>
- </xsl:template>
- <xsl:template match="text()">
- <xsl:copy-of select="."/>
- </xsl:template>
- <xsl:template match="*" mode="header">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="header"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="*" mode="content">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="content"/>
- </xsl:copy>
- </xsl:template>
- <!--
- Template - cf:main-pager-section:
- This template creates the list-view display for the main pages (Public Folders / My Folders) and other
- pages.
- Attributes that can be used with this tag are:
- @name - the name to be used for the pager (important when more that one pager exists on a page).
- @validate - whether or not the validate routine should be called when switching pages.
- @virtualPage - whether this pager is to use all the objects CM returns in one request or if there are multiple requests.
- @form - the name of the document form.
- @width - the display size of the pager.
- This template uses cf-main-pager-button-section.
- -->
- <!-- create simple pager control, none of the fancy fancy -->
- <xsl:template match="cf:main-pager-section">
- <out:if test="true()">
- <!-- name of the current pager -->
- <xsl:variable name="cf_pname" select="@name"/>
- <!-- if the validate js function should be called when switching pages -->
- <xsl:variable name="validate" select="@validate"/>
- <!-- Generate a preDelete[pager name]() function for non-virtual pagers with form attribute -->
- <xsl:variable name="genDelete" select="@genDelete"/>
- <xsl:variable name="noEntriesMessage" select="@noEntriesMsgID"/>
- <xsl:variable name="noEntriesMsgID">
- <xsl:choose>
- <xsl:when test="string($noEntriesMessage)=''">IDS_PAGER_NO_ITEMS</xsl:when>
- <xsl:otherwise><xsl:value-of select="$noEntriesMessage"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="useUtml" select="@utml"/>
- <!-- this little piece builds the page and sort for all the other pagers to be used in this pagers links -->
- <out:variable name="cf_{$cf_pname}_pager_vars">
- <xsl:for-each select="//cf:main-pager-section">
- <xsl:if test="($cf_pname != '' and $cf_pname != @name)">
- <out:if test="key('env-param', 'm_{@name}section')">
- <out:value-of select="concat('&m_', '{@name}', 'section=')"/><out:value-of select="key('env-param', 'm_{@name}section')"/>
- </out:if>
- </xsl:if>
- <out:if test="key('env-param', 'm_{@name}sort')">
- <out:value-of select="concat('&m_', '{@name}', 'sort=')"/><out:value-of select="key('env-param', 'm_{@name}sort')"/>
- </out:if>
- </xsl:for-each>
- </out:variable>
- <!--
- This attribute is defined and set to true when a request cannot obtain the position property.
- Because there is no position, the pager is unable to provide the last page functionality
- therefore the last page button is disabled.
- -->
- <xsl:variable name="noPosition" select="@noPosition"/>
- <xsl:variable name="isNavContent" select="@navContent='true'"/>
- <!-- special case when deployment messages are iterated in the the item-path -->
- <xsl:variable name="isDeploymentMessage" select="@deploymentMessage='true'"/>
- <!-- this will tell us if the query return just the current page of results -->
- <xsl:variable name="cf_vname" select="@virtualPage"/>
- <!-- these are what we are going to be paging through -->
- <xsl:variable name="formName"><xsl:value-of select="@form"/></xsl:variable>
- <!-- these are what we are going to be paging through -->
- <out:variable name="cf_{$cf_pname}_items" select="{cf:param[@name = 'item-path']}"/>
- <out:variable name="cf_{$cf_pname}_target" select="{cf:param[@name = 'target']}"/>
- <!-- user set display lines number -->
- <out:variable name="cf_{$cf_pname}_lines_per_page"><xsl:copy-of select="cf:param[@name = 'lines-per-page']"/></out:variable>
- <!-- controls whether to render the goto control -->
- <out:variable name="cf_{$cf_pname}_noGoto"><xsl:copy-of select="cf:param[@name = 'noGoto']"/></out:variable>
- <!-- controls whether to render the goto control -->
- <out:variable name="cf_{$cf_pname}_navContext"><xsl:copy-of select="cf:param[@name = 'navContext']"/></out:variable>
- <xsl:variable name="has_navApproximateMaxEntries" select="cf:param[@name = 'navApproximateMaxEntries']"/>
- <out:variable name="cf_{$cf_pname}_navApproximateMaxEntries"><xsl:copy-of select="cf:param[@name = 'navApproximateMaxEntries']"/></out:variable>
- <!-- item count for current request -->
- <out:variable name="cf_{$cf_pname}_itemCount">
- <xsl:choose>
- <xsl:when test="$isNavContent">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_items/../@more='true'">
- <out:value-of select="count($cf_{$cf_pname}_items) + 1"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="count($cf_{$cf_pname}_items)"/>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="count($cf_{$cf_pname}_items)"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <!-- Are the entry numbers past the number of entries -->
- <out:variable name="cf_{$cf_pname}_hasEntries">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'">
- <out:choose>
- <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>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_itemCount >0">1</out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <!-- number of items requested by user -->
- <out:variable name="cf_{$cf_pname}_requestNumberItems">
- <out:choose>
- <out:when test="string(/root/env/param[@name='m_pagerfrom{$cf_pname}']) != '' and string(/root/env/param[@name='m_pagerto{$cf_pname}']) != ''">
- <out:value-of select="(/root/env/param[@name='m_pagerto{$cf_pname}'] - /root/env/param[@name='m_pagerfrom{$cf_pname}']) + 1"/>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- number of display items -->
- <out:variable name="cf_{$cf_pname}_displayItemCount">
- <out:choose>
- <out:when test="string($cf_{$cf_pname}_requestNumberItems) != '0'">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_requestNumberItems > $cf_{$cf_pname}_itemCount">
- <out:value-of select="$cf_{$cf_pname}_itemCount"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_requestNumberItems"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise><out:value-of select="$cf_{$cf_pname}_lines_per_page"/></out:otherwise>
- </out:choose>
- </out:variable>
- <!-- In keeping with the CM Model start and end position are ZERO based numbers for the non-virtual pagers -->
- <out:variable name="cf_{$cf_pname}_startPosition">
- <out:if test="$cf_{$cf_pname}_itemCount > 0">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'">
- <out:choose>
- <xsl:choose>
- <xsl:when test="$isNavContent">
- <out:when test="true()"><out:value-of select="$cf_{$cf_pname}_items/../@start - 1"/></out:when>
- </xsl:when>
- <xsl:otherwise>
- <out:when test="'{$noPosition}' != 'true'">
- <xsl:choose>
- <xsl:when test="$isDeploymentMessage">
- <out:value-of select="$cf_{$cf_pname}_items[position() = 1]/../*[local-name()='position']"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="$cf_{$cf_pname}_items[position() = 1]/*[local-name()='position']"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:when>
- </xsl:otherwise>
- </xsl:choose>
- <out:when test="'{$noPosition}' = 'true' and string(/root/env/param[@name='m_{$cf_pname}section']) = '' and $cf_{$cf_pname}_requestNumberItems > 0"><out:value-of select="/root/env/param[@name='m_pagerfrom{$cf_pname}'] - 1"/></out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="string(/root/env/param[@name='m_{$cf_pname}section']) != ''">
- <out:value-of select="/root/env/param[@name='m_{$cf_pname}section']-1"/>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$cf_{$cf_pname}_requestNumberItems != 0">
- <out:choose>
- <out:when test="/root/env/param[@name='m_pagerfrom{$cf_pname}'] <= $cf_{$cf_pname}_itemCount">
- <out:value-of select="/root/env/param[@name='m_pagerfrom{$cf_pname}'] - 1"/>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="string(/root/env/param[@name='m_{$cf_pname}section']) != ''">
- <out:variable name="sect"><out:value-of select="/root/env/param[@name='m_{$cf_pname}section']"/></out:variable>
- <out:choose>
- <out:when test="$sect = 0">0</out:when>
- <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>
- <out:when test="$sect > 0 and $sect <= $cf_{$cf_pname}_itemCount and $cf_{$cf_pname}_itemCount < $cf_{$cf_pname}_lines_per_page"><out:value-of select="$sect - 1"/></out:when>
- <out:when test="not($cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_lines_per_page)">0</out:when>
- <out:when test="$sect > $cf_{$cf_pname}_itemCount"><out:value-of select="($sect - $cf_{$cf_pname}_lines_per_page) - 1"/></out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:if>
- </out:variable>
- <out:variable name="cf_{$cf_pname}_endPosition">
- <out:if test="$cf_{$cf_pname}_itemCount > 0">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'">
- <out:choose>
- <xsl:choose>
- <xsl:when test="$isNavContent">
- <out:when test="'{$noPosition}'!='true'">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_items/../@more='true'">
- <out:value-of select="$cf_{$cf_pname}_items/../@end"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_items/../@end - 1"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- </xsl:when>
- <xsl:otherwise>
- <out:when test="'{$noPosition}'!='true'">
- <xsl:choose>
- <xsl:when test="$isDeploymentMessage">
- <out:value-of select="$cf_{$cf_pname}_items[position() = last()]/../*[local-name()='position']"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="$cf_{$cf_pname}_items[position() = last()]/*[local-name()='position']"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:when>
- </xsl:otherwise>
- </xsl:choose>
- <out:otherwise><out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_itemCount) - 1"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_requestNumberItems != 0">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_requestNumberItems <= $cf_{$cf_pname}_itemCount">
- <out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}'] - 1"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_itemCount - 1 "/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_lines_per_page <= $cf_{$cf_pname}_itemCount">
- <out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_lines_per_page) - 1"/>
- </out:when>
- <out:otherwise><out:value-of select="($cf_{$cf_pname}_startPosition + $cf_{$cf_pname}_itemCount) - 1"/></out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:variable>
- <!-- NOTE: the position information is 0 based so always increment startPosition -->
- <!-- The 0 denotes no entries exist -->
- <out:variable name="cf_{$cf_pname}_startLine">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_startPosition != ''"><out:value-of select="$cf_{$cf_pname}_startPosition + 1"/></out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- NOTE: the number of items retrieved is 1 more than max (for virtual pagers) to determine if there are more objects to process. -->
- <!-- Because of this, we can use the EndPosition as is until the last page of items, then add 1 to the endPosition -->
- <!-- The 0 denotes no entries exist -->
- <out:variable name="cf_{$cf_pname}_endLine">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_endPosition != ''">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'">
- <out:choose>
- <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_displayItemCount">
- <out:value-of select="$cf_{$cf_pname}_endPosition"/>
- </out:when>
- <out:otherwise><out:value-of select="$cf_{$cf_pname}_endPosition + 1"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="not($cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_endPosition)">
- <out:value-of select="$cf_{$cf_pname}_itemCount"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_endPosition + 1"/>
- </out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- Total number of lines in this display section -->
- <out:variable name="cf_{$cf_pname}_linesTotal">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:when>
- <out:otherwise><out:value-of select="$cf_{$cf_pname}_itemCount"/></out:otherwise>
- </out:choose>
- </out:variable>
- <!-- Position of start of the previous section -->
- <out:variable name="cf_{$cf_pname}_previousSection">
- <out:choose>
- <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>
- <out:when test="'{$cf_vname}'!='true'">
- <out:variable name="previousStart"><out:value-of select="$cf_{$cf_pname}_startLine - $cf_{$cf_pname}_lines_per_page"/></out:variable>
- <out:variable name="testFirst" select="$cf_{$cf_pname}_startLine=0 or $cf_{$cf_pname}_startLine=1"/>
- <out:choose>
- <out:when test="not($testFirst) and $previousStart <= 0 ">1</out:when>
- <out:when test="not($testFirst) and not($cf_{$cf_pname}_startLine > $cf_{$cf_pname}_itemCount)"><out:value-of select="$previousStart"/></out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <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>
- <out:when test="not($cf_{$cf_pname}_startPosition - $cf_{$cf_pname}_lines_per_page > 0)">1</out:when>
- <out:otherwise><out:value-of select="$cf_{$cf_pname}_startLine - $cf_{$cf_pname}_lines_per_page"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <!-- Position of start of the next section -->
- <out:variable name="cf_{$cf_pname}_nextSection">
- <out:choose>
- <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_itemCount > $cf_{$cf_pname}_displayItemCount">
- <out:value-of select="$cf_{$cf_pname}_endPosition + 1"/>
- </out:when>
- <out:when test="'{$cf_vname}'!='true'">
- <out:variable name="nextStart"><out:value-of select="$cf_{$cf_pname}_endLine + 1"/></out:variable>
- <out:choose>
- <out:when test="not($nextStart > $cf_{$cf_pname}_itemCount)">
- <out:value-of select="$nextStart"/>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- Set the last page value to negative number of lines per page for easier CM request processing -->
- <out:variable name="cf_{$cf_pname}_lastSection">
- <out:choose>
- <out:when test="'{$noPosition}'='true'">0</out:when>
- <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_nextSection != '0'">-1</out:when>
- <out:when test="'{$cf_vname}'!='true'">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_itemCount <= $cf_{$cf_pname}_lines_per_page and $cf_{$cf_pname}_startLine != '1' and $cf_{$cf_pname}_endLine != $cf_{$cf_pname}_itemCount">1</out:when>
- <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)">
- <out:variable name="last"><out:value-of select="($cf_{$cf_pname}_itemCount - $cf_{$cf_pname}_lines_per_page)+1"/> </out:variable>
- <out:choose>
- <out:when test="$last != -1 and $last < 0">0</out:when>
- <out:when test="$last=0">-1</out:when>
- <out:otherwise><out:value-of select="$last"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_hasEntries='1' and $cf_{$cf_pname}_itemCount='0'">-1</out:when>
- <out:otherwise>0</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- this will deside what to iterate through -->
- <xsl:variable name="iterate">
- <xsl:choose>
- <xsl:when test="$cf_vname='true'">
- <xsl:text/>$cf_<xsl:value-of select="$cf_pname"/>_items[position() >= 1 and position() <= $cf_<xsl:value-of select="$cf_pname"/>_displayItemCount]<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>$cf_<xsl:value-of select="$cf_pname"/>_items[position() >= $cf_<xsl:value-of select="$cf_pname"/>_startLine and position() <= $cf_<xsl:value-of select="$cf_pname"/>_endLine]<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- if we don't have a page variable and we are submitting create a hidden input -->
- <out:if test="not('{$formName}' = '') and not(key('env-param', 'm_{$cf_pname}section'))">
- <input name="m_{$cf_pname}section" type="hidden" value=""/>
- <input name="m_{$cf_pname}context" type="hidden" value=""/>
- </out:if>
- <out:if test="not('{$formName}'='') and not(key('env-param','m'))"><input name="m" type="hidden" value=""/></out:if>
- <out:variable name="pagerBack">
- <xsl:if test="$formName=''">
- <out:value-of select="$gateway"/>?b_action=xts.run&m=<out:value-of select="key('env-param','m')"/>
- <out:if test="contains($state-params,' m_path ') and not(key('env-param','m_path')) and $m_path!=''">
- <out:text/>&m_path=<out:value-of select="xtsext:protect(xtsext:urlencode(string($m_path)),'url','searchPath','getdata')"/>
- </out:if>
- <out:if test="string($cf_{$cf_pname}_navContext) != ''">
- <out:text/>&m_<xsl:value-of select="$cf_pname"/>context=<out:value-of select="xtsext:urlencode(string($cf_{$cf_pname}_navContext))"/>
- </out:if>
- <out:for-each select="/root/env/param">
- <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}'">
- <out:text/>&<out:value-of select="@name"/>=<out:value-of select="xtsext:protect(xtsext:urlencode(string(.)),'url',concat('NAME',@name),'getdata')" />
- </out:if>
- </out:for-each>
- <!-- Add this bit in the case of consumer UI to pick up the id when the page is generated using a path -->
- <out:if test="not(/root/env/param[@name='m_folder']) and $folderID != ''">
- <out:text/>&m_folder=<out:value-of select="$folderID"/>
- </out:if>
- </xsl:if>
- </out:variable>
- <xsl:call-template name="cf-main-pager-java-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="genDelete"><xsl:value-of select="$genDelete"/></xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="cf_vname"><xsl:value-of select="$cf_vname"/></xsl:with-param>
- <xsl:with-param name="itemCnt">$cf_<xsl:value-of select="$cf_pname"/>_itemCount</xsl:with-param>
- <xsl:with-param name="startPos">$cf_<xsl:value-of select="$cf_pname"/>_startPosition</xsl:with-param>
- <xsl:with-param name="lines">$cf_<xsl:value-of select="$cf_pname"/>_lines_per_page</xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="target">$cf_<xsl:value-of select="$cf_pname"/>_target</xsl:with-param>
- <xsl:with-param name="nextSection">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
- <xsl:with-param name="prevSection">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
- <xsl:with-param name="lastSection">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
- <xsl:with-param name="hasEntries">$cf_<xsl:value-of select="$cf_pname"/>_hasEntries</xsl:with-param>
- <xsl:with-param name="noPosition"><xsl:value-of select="$noPosition"/></xsl:with-param>
- <xsl:with-param name="navContext">$cf_<xsl:value-of select="$cf_pname"/>_navContext</xsl:with-param>
- </xsl:call-template>
- <!-- this is the size of our list small and medium are the only two implemented -->
- <!--
- Translation:
- medium means scrolling list
- small means non-scrolling list
- -->
- <out:variable name="cf_{$cf_pname}_listSize">
- <out:choose>
- <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>
- <out:when test="$cf_{$cf_pname}_previousSection = 0 and $cf_{$cf_pname}_nextSection = 0">small</out:when>
- <out:otherwise>medium</out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="cf_{$cf_pname}_lastLine">
- <out:choose>
- <out:when test="'{$cf_vname}'='true'">
- <out:value-of select="$cf_{$cf_pname}_itemCount"/>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_endLine > $cf_{$cf_pname}_itemCount">
- <out:value-of select="$cf_{$cf_pname}_itemCount - 1"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_endLine"/>
- </out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="cf_{$cf_pname}_showEntries">
- <out:choose>
- <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>
- <out:when test="'{$cf_vname}'='true' and $cf_{$cf_pname}_lastLine = '0' and $cf_{$cf_pname}_hasEntries='1'">false</out:when>
- <out:otherwise>true</out:otherwise>
- </out:choose>
- </out:variable>
- <!-- what's what -->
- <!-- uncomment the following to debug pager -->
- <!-- <out:message>*****START*****</out:message>
- <out:message><out:value-of select="'{$formName}'"/></out:message>
- <out:message>itmcnt <out:value-of select="$cf_{$cf_pname}_itemCount"/></out:message>
- <out:message>reqnumitems <out:value-of select="$cf_{$cf_pname}_requestNumberItems"/></out:message>
- <out:message>dspitmcnt <out:value-of select="$cf_{$cf_pname}_displayItemCount"/></out:message>
- <out:message>hasEntries <out:value-of select="$cf_{$cf_pname}_hasEntries"/></out:message>
- <out:message>showEntries <out:value-of select="$cf_{$cf_pname}_showEntries"/></out:message>
- <out:message>listsize <out:value-of select="$cf_{$cf_pname}_listSize"/></out:message>
- <out:message>startpos <out:value-of select="$cf_{$cf_pname}_startPosition"/></out:message>
- <out:message>endpos <out:value-of select="$cf_{$cf_pname}_endPosition"/></out:message>
- <out:message>startline <out:value-of select="$cf_{$cf_pname}_startLine"/></out:message>
- <out:message>endline <out:value-of select="$cf_{$cf_pname}_endLine"/></out:message>
- <out:message>lastline <out:value-of select="$cf_{$cf_pname}_lastLine"/></out:message>
- <out:message>linestot <out:value-of select="$cf_{$cf_pname}_linesTotal"/></out:message>
- <out:message>lines per page <out:value-of select="$cf_{$cf_pname}_lines_per_page"/></out:message>
- <out:message>next <out:value-of select="$cf_{$cf_pname}_nextSection"/></out:message>
- <out:message>prev <out:value-of select="$cf_{$cf_pname}_previousSection"/></out:message>
- <out:message>last <out:value-of select="$cf_{$cf_pname}_lastSection"/></out:message>
- <out:message>*****END*****</out:message> -->
- <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}">
- <xsl:if test="@role != ''">
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="@id != ''">
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
- </xsl:if>
- <xsl:copy-of select="@*"/>
- <cp:actionTop width="{@width}">
- <xsl:copy-of select="cf:param[@name = 'actions']/child::node()"/>
- </cp:actionTop>
- <cp:tableSummary><xsl:copy-of select="cf:param[@name = 'pagerSummary']/child::node()"/></cp:tableSummary>
- <xsl:choose>
- <xsl:when test="string($useUtml)!='true'">
- <cp:fromTo width="{@width}">
- <xsl:choose>
- <xsl:when test="cf:param[@name='displayPath']">
- <cp:breadcrumb>
- <xsl:copy-of select="cf:param[@name='displayPath']/*"/>
- </cp:breadcrumb>
- </xsl:when>
- <xsl:when test="cf:param[@name='label']">
- <cp:tableLabel>
- <xsl:copy-of select="cf:param[@name='label']/*"/>
- </cp:tableLabel>
- </xsl:when>
- </xsl:choose>
- <cp:collectCount>
- <out:variable name="from">
- <out:choose>
- <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
- <out:if test="not($cf_{$cf_pname}_startLine = 0)">
- <out:value-of select="$cf_{$cf_pname}_startLine"/>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="to">
- <out:choose>
- <out:when test="'{$noPosition}' = 'true' and $cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] > 0">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_hasEntries = 0"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:when>
- <out:when test="/root/env/param[@name='m_pagerto{$cf_pname}'] > $cf_{$cf_pname}_itemCount"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:when>
- <out:otherwise><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] > $cf_{$cf_pname}_endLine">
- <out:choose>
- <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
- <out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="$cf_{$cf_pname}_endLine"/>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
- <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
- <out:value-of select="$cf_{$cf_pname}_endLine"/>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_noGoto='true'">
- <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
- <xsl:choose>
- <xsl:when test="$isNavContent and $has_navApproximateMaxEntries">
- <xts:string id="IDS_SEARCH_INDEXTREE_PAGER_FROMTO">
- <xts:param name="from"><out:value-of select="$from"/></xts:param>
- <xts:param name="to"><out:value-of select="$to"/></xts:param>
- <xts:param name="approximateEntries">
- <out:if test="$cf_{$cf_pname}_navApproximateMaxEntries > 0">
- <out:value-of select="$cf_{$cf_pname}_navApproximateMaxEntries"/>
- </out:if>
- </xts:param>
- </xts:string>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_PAGER_FROMTO">
- <xts:param name="from"><out:value-of select="$from"/></xts:param>
- <xts:param name="to"><out:value-of select="$to"/></xts:param>
- </xts:string>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </out:when>
- <out:otherwise>
- <input name="pagerfrom{$cf_pname}" id="pagerfrom{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$from"/></out:attribute>
- </input>
- <out:value-of select="' - '"/>
- <input name="pagerto{$cf_pname}" id="pagerto{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$to"/></out:attribute>
- </input>
- </out:otherwise>
- </out:choose>
- <out:if test="not(/root/env/param[@name='m_pagerfrom{$cf_pname}'])">
- <input name="m_pagerfrom{$cf_pname}" type="hidden" value=""/>
- <input name="m_pagerto{$cf_pname}" type="hidden" value=""/>
- <input name="m_pg_e{$cf_pname}" type="hidden" value=""/>
- </out:if>
- </cp:collectCount>
- <cp:goToButton>
- <out:if test="not($cf_{$cf_pname}_noGoto='true')">
- <xsl:call-template name="cf-main-pager-goto-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="pagerPosition">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- </xsl:call-template>
- </out:if>
- </cp:goToButton>
- <cp:buttons>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">1</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pageup</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pagedown</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <out:if test="not($cf_{$cf_pname}_noGoto='true')">
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- </out:if>
- </cp:buttons>
- </cp:fromTo>
- </xsl:when>
- <xsl:otherwise>
- <cp:fromTo width="{@width}">
- <xsl:if test="cf:param[@name='label']">
- <cp:tableLabel>
- <xsl:copy-of select="cf:param[@name='label']/*"/>
- </cp:tableLabel>
- </xsl:if>
- <cp:collectCount>
- <utml:input name="pagerfrom{$cf_pname}" id="pagerfrom{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
- <out:choose>
- <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
- <out:if test="not($cf_{$cf_pname}_startLine = 0)">
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_startLine"/></out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </utml:input>
- <out:value-of select="' - '"/>
- <utml:input name="pagerto{$cf_pname}" id="pagerto{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] > $cf_{$cf_pname}_endLine">
- <out:choose>
- <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
- <out:attribute name="value"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:attribute>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
- <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </utml:input>
- <utml:input name="m_pagerfrom{$cf_pname}" type="hidden" value="" utml:update="false"/>
- <utml:input name="m_pagerto{$cf_pname}" type="hidden" value="" utml:update="false"/>
- <utml:input name="m_pg_e{$cf_pname}" type="hidden" value="" utml:update="false"/>
- </cp:collectCount>
- <cp:goToButton>
- <xsl:call-template name="cf-main-pager-goto-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="pagerPosition">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- </xsl:call-template>
- </cp:goToButton>
- <cp:buttons>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">1</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pageup</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pagedown</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- </xsl:call-template>
- </cp:buttons>
- </cp:fromTo>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates select="cf:param[@name = 'rows']/child::node()"/>
- <!-- this will tell us we need to fill in the list to make the buttons look fine -->
- <out:if test="not($cf_{$cf_pname}_listSize = 'small')">
- <cp:rowFiller/>
- </out:if>
- <!-- For showing the entry fields and control buttons on the bottom of the table if #rows > 25 -->
- <xsl:if test="not(string(@is-scrolling) = 'true')">
- <xsl:choose>
- <xsl:when test="string($useUtml)!='true'">
- <cp:fromToBottom width="{@width}">
- <cp:collectCountBottom>
- <out:variable name="from">
- <out:choose>
- <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
- <out:if test="not($cf_{$cf_pname}_startLine = 0)">
- <out:value-of select="$cf_{$cf_pname}_startLine"/>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:variable name="to">
- <out:choose>
- <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] > $cf_{$cf_pname}_endLine">
- <out:if test="not($cf_{$cf_pname}_endLine = 0)">
- <out:value-of select="$cf_{$cf_pname}_endLine"/>
- </out:if>
- </out:when>
- <out:when test="not(string(/root/env/param[@name='m_pagerto{$cf_pname}']))">
- <out:if test="not($cf_{$cf_pname}_endLine = 0)">
- <out:value-of select="$cf_{$cf_pname}_endLine"/>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_noGoto='true'">
- <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
- <out:value-of select="$from"/>
- </td>
- <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
- <out:value-of select="' - '"/>
- </td>
- <td valign="middle" height="20" width="50%" class="formText" nowrap="nowrap">
- <out:value-of select="$to"/>
- </td>
- </out:when>
- <out:otherwise>
- <input name="pagerfrom_d{$cf_pname}" id="pagerfrom_d{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$from"/></out:attribute>
- </input>
- <out:value-of select="' - '"/>
- <input name="pagerto_d{$cf_pname}" id="pagerto_d{$cf_pname}" type="text" size="4" class="formText" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
- <out:attribute name="value"><out:value-of select="$to"/></out:attribute>
- </input>
- </out:otherwise>
- </out:choose>
- </cp:collectCountBottom>
- <cp:goToButton>
- <out:if test="not($cf_{$cf_pname}_noGoto='true')">
- <xsl:call-template name="cf-main-pager-goto-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="pagerPosition">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- </xsl:call-template>
- </out:if>
- </cp:goToButton>
- <cp:buttonsBottom>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">1</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pageup</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pagedown</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <out:if test="not($cf_{$cf_pname}_noGoto='true')">
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- </out:if>
- </cp:buttonsBottom>
- </cp:fromToBottom>
- </xsl:when>
- <xsl:otherwise>
- <cp:fromToBottom width="{@width}">
- <cp:collectCountBottom>
- <utml:input name="pagerfrom_d{$cf_pname}" id="pagerfrom_d{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_FROM"/></out:attribute>
- <out:choose>
- <out:when test="not(string(/root/env/param[@name='m_pagerfrom{$cf_pname}']))">
- <out:if test="not($cf_{$cf_pname}_startLine = 0)">
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_startLine"/></out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerfrom{$cf_pname}'])"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </utml:input>
- <out:value-of select="' - '"/>
- <utml:input name="pagerto_d{$cf_pname}" id="pagerto_d{$cf_pname}" type="text" size="4" class="formText" utml:update="false" maxlength="9">
- <out:attribute name="title"><xts:string id="IDS_ENTRIES_TO"/></out:attribute>
- <out:choose>
- <out:when test="$cf_{$cf_pname}_showEntries = 'true' and /root/env/param[@name='m_pagerto{$cf_pname}'] > $cf_{$cf_pname}_endLine">
- <out:choose>
- <out:when test="string($cf_{$cf_pname}_endLine) = '0'">
- <out:attribute name="value"><out:value-of select="/root/env/param[@name='m_pagerto{$cf_pname}']"/></out:attribute>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="string(/root/env/param[@name='m_pagerto{$cf_pname}'])=''">
- <out:if test="string($cf_{$cf_pname}_endLine) != '0'">
- <out:attribute name="value"><out:value-of select="$cf_{$cf_pname}_endLine"/></out:attribute>
- </out:if>
- </out:when>
- <out:otherwise>
- <out:attribute name="value"><out:value-of select="string(/root/env/param[@name='m_pagerto{$cf_pname}'])"/></out:attribute>
- </out:otherwise>
- </out:choose>
- </utml:input>
- </cp:collectCountBottom>
- <cp:goToButton>
- <xsl:call-template name="cf-main-pager-goto-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="pagerPosition">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- </xsl:call-template>
- </cp:goToButton>
- <cp:buttonsBottom>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">top</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">1</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_FIRST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_previousSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pageup</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_previousSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEUP</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <xsl:with-param name="condition">$cf_<xsl:value-of select="$cf_pname"/>_nextSection != '0'</xsl:with-param>
- <xsl:with-param name="label">pagedown</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_nextSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_PAGEDOWN</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="cf-main-pager-button-section">
- <xsl:with-param name="useUtml"><xsl:value-of select="$useUtml"/></xsl:with-param>
- <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>
- <xsl:with-param name="label">bottom</xsl:with-param>
- <xsl:with-param name="cf_pname"><xsl:value-of select="$cf_pname"/></xsl:with-param>
- <xsl:with-param name="formName"><xsl:value-of select="$formName"/></xsl:with-param>
- <xsl:with-param name="navpage">$cf_<xsl:value-of select="$cf_pname"/>_lastSection</xsl:with-param>
- <xsl:with-param name="tooltip">IDS_PAGER_LAST</xsl:with-param>
- <xsl:with-param name="validate"><xsl:value-of select="$validate"/></xsl:with-param>
- <xsl:with-param name="pagerBack">$pagerBack</xsl:with-param>
- <xsl:with-param name="buttBottom">_d</xsl:with-param>
- </xsl:call-template>
- </cp:buttonsBottom>
- </cp:fromToBottom>
- </xsl:otherwise>
- </xsl:choose>
- <cp:actionBottom width="{@width}">
- <xsl:copy-of select="cf:param[@name = 'actions']/child::node()"/>
- </cp:actionBottom>
- </xsl:if>
- </cp:table>
- </out:if>
- </xsl:template>
- <!--
- Template - cf-main-pager-java-section:
- This template creates the preDelete (virtualPage) or preDelete[pager name] (non-virtualPage) function that re-calculates the m_[pager name]section
- 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
- 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
- does not change.
- Operation:
- 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
- on pager type and position in current list.
- This template is used exclusively by cf-main-pager-section.
- -->
- <xsl:template name="cf-main-pager-java-section">
- <xsl:param name="formName"/>
- <xsl:param name="genDelete"/>
- <xsl:param name="cf_pname"/>
- <xsl:param name="cf_vname"/>
- <xsl:param name="itemCnt"/>
- <xsl:param name="startPos"/>
- <xsl:param name="lines"/>
- <xsl:param name="pagerBack"/>
- <xsl:param name="target"/>
- <xsl:param name="nextSection"/>
- <xsl:param name="prevSection"/>
- <xsl:param name="lastSection"/>
- <xsl:param name="hasEntries"/>
- <xsl:param name="noPosition"/>
- <xsl:param name="navContext"/>
- <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/utilities.js"></script>
- <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/list.js"></script>
- <script language="javascript">
- <out:choose>
- <out:when test="not('{$formName}'='')">
- function nav<xsl:value-of select="$cf_pname"/>T() {
- var form = document.<xsl:choose>
- <xsl:when test="$formName=''">pform</xsl:when>
- <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
- </xsl:choose>;
- var targetm = "<out:value-of select="{$target}"/>";
- if(targetm != '') {
- form.m.value= targetm;
- }
- form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
- form.ps_nav_op.value='maintain';
- form.m_<xsl:value-of select="$cf_pname"/>section.value='1';
- <out:if test="{$navContext} != ''">
- form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
- </out:if>
- if (form.onsubmit) {
- form.onsubmit();
- }
- form.submit();
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- <out:if test="{$prevSection} != 0">
- function nav<xsl:value-of select="$cf_pname"/>U() {
- var form = document.<xsl:choose>
- <xsl:when test="$formName=''">pform</xsl:when>
- <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
- </xsl:choose>;
- var targetm = "<out:value-of select="{$target}"/>";
- if(targetm != '') {
- form.m.value= targetm;
- }
- form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
- form.ps_nav_op.value='maintain';
- form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$prevSection}"/>';
- <out:if test="{$navContext} != ''">
- form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
- </out:if>
- if (form.onsubmit) {
- form.onsubmit();
- }
- form.submit();
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- </out:if>
- <out:if test="{$nextSection} != 0">
- function nav<xsl:value-of select="$cf_pname"/>D() {
- var form = document.<xsl:choose>
- <xsl:when test="$formName=''">pform</xsl:when>
- <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
- </xsl:choose>;
- var targetm = "<out:value-of select="{$target}"/>";
- if(targetm != '') {
- form.m.value= targetm;
- }
- form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
- form.ps_nav_op.value='maintain';
- form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$nextSection}"/>';
- <out:if test="{$navContext} != ''">
- form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
- </out:if>
- if (form.onsubmit) {
- form.onsubmit();
- }
- form.submit();
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- </out:if>
- function nav<xsl:value-of select="$cf_pname"/>B() {
- var form = document.<xsl:choose>
- <xsl:when test="$formName=''">pform</xsl:when>
- <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
- </xsl:choose>;
- var targetm = "<out:value-of select="{$target}"/>";
- if(targetm != '') {
- form.m.value= targetm;
- }
- form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pagerto<xsl:value-of select="$cf_pname"/>.value="";
- form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
- form.ps_nav_op.value='maintain';
- form.m_<xsl:value-of select="$cf_pname"/>section.value='<out:value-of select="{$lastSection}"/>';
- <out:if test="{$navContext} != ''">
- form.m_<xsl:value-of select="$cf_pname"/>context.value='<out:value-of select="{$navContext}"/>';
- </out:if>
- if (form.onsubmit) {
- form.onsubmit();
- }
- form.submit();
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- function nav<out:value-of select="'{$cf_pname}'"/>Go(pos) {
- var fromName = "pagerfrom" + pos + "<xsl:value-of select="$cf_pname"/>";
- var toName = "pagerto" + pos + "<xsl:value-of select="$cf_pname"/>";
- var fromA = document.getElementsByName(fromName);
- var toA = document.getElementsByName(toName);
- var from = fromA[0];
- var to = toA[0];
- var fromloc = trim(from.value);
- var toloc = trim(to.value);
- var form = document.<xsl:choose>
- <xsl:when test="$formName=''">pform</xsl:when>
- <xsl:otherwise><xsl:value-of select="$formName"/></xsl:otherwise>
- </xsl:choose>;
- var targetm = "<out:value-of select="{$target}"/>";
- form.m.value = targetm;
- var noPosition ="<out:value-of select="'{$noPosition}'"/>";
- if (fromloc !="") {
- checkPositiveIntegerDefault(from,"");
- fromloc = from.value;
- if ( fromloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_FROM_INVALID" encode="javascript"/>");
- return;
- }
- if (toloc !="") {
- checkPositiveIntegerDefault(to,"");
- toloc = to.value;
- if ( toloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
- return;
- }
- if ( Number(toloc) < Number(fromloc)) {
- alert( "<xts:string id="IDS_PAGER_ENTRIES_INVALID" encode="javascript"/>");
- return;
- }
- }
- else { //to is empty calculate it
- toloc = Number(fromloc) + <out:value-of select="{$lines}"/> -1;
- }
- } //if (fromloc!="")
- else {
- if (toloc == "") {
- alert ("<xts:string id="IDS_PAGER_ENTRIES_EMPTY" encode="javascript"/>");
- return;
- }
- else {
- checkPositiveIntegerDefault(to,"");
- toloc = to.value;
- if ( toloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
- return;
- }
- fromloc = Number(toloc) - <out:value-of select="{$lines}"/> +1;
- if (Number(fromloc) < 0) {
- fromloc=1;
- }
- }
- }
- if (noPosition=="true") {
- form.m_<xsl:value-of select="$cf_pname"/>section.value="";
- }
- form.m_pagerfrom<xsl:value-of select="$cf_pname"/>.value=fromloc;
- form.pagerfrom<xsl:value-of select="$cf_pname"/>.value="";
- form.pagerfrom<xsl:value-of select="$cf_pname"/>.disabled=true;
- form.m_pagerto<xsl:value-of select="$cf_pname"/>.value=toloc;
- form.pagerto<xsl:value-of select="$cf_pname"/>.value="";
- form.pagerto<xsl:value-of select="$cf_pname"/>.disabled=true;
- form.m_pg_e<xsl:value-of select="$cf_pname"/>.value='<out:value-of select="{$hasEntries}"/>';
- form.ps_nav_op.value='maintain';
- if (form.onsubmit) {
- form.onsubmit();
- }
- form.submit();
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- </out:when>
- <out:otherwise>
- function nav<out:value-of select="'{$cf_pname}'"/>Go(pos) {
- var fromName = "pagerfrom" + pos + "<xsl:value-of select="$cf_pname"/>";
- var toName = "pagerto" + pos + "<xsl:value-of select="$cf_pname"/>";
- var fromA = document.getElementsByName(fromName);
- var toA = document.getElementsByName(toName);
- var from = fromA[0];
- var to = toA[0];
- var fromloc = trim(from.value);
- var toloc = trim(to.value);
- if (fromloc != "")
- {
- checkPositiveIntegerDefault(from,"");
- fromloc = from.value;
- if ( fromloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_FROM_INVALID" encode="javascript"/>");
- return;
- }
- if (toloc !="") {
- checkPositiveIntegerDefault(to,"");
- toloc = to.value;
- if ( toloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
- return;
- }
- if ( Number(toloc) < Number(fromloc)) {
- alert( "<xts:string id="IDS_PAGER_ENTRIES_INVALID" encode="javascript"/>");
- return;
- }
- }
- else { //to is empty calculate it
- toloc = Number(fromloc) + <out:value-of select="{$lines}"/> -1;
- }
- }
- else {
- if (toloc == "") {
- alert ("<xts:string id="IDS_PAGER_ENTRIES_EMPTY" encode="javascript"/>");
- return;
- }
- else {
- checkPositiveIntegerDefault(to,"");
- toloc = to.value;
- if ( toloc == "" ) {
- alert( "<xts:string id="IDS_PAGER_TO_INVALID" encode="javascript"/>");
- return;
- }
- fromloc = Number(toloc) - <out:value-of select="{$lines}"/> +1;
- if (Number(fromloc) < 0) {
- fromloc=1;
- }
- }
- }
- location.href = "<out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/>&m_pagerfrom<xsl:value-of select="$cf_pname"/>=" + fromloc + "&m_pagerto<xsl:value-of select="$cf_pname"/>=" + toloc + "&m_pg_e<xsl:value-of select="$cf_pname"/>=<out:value-of select="{$hasEntries}"/>";
- if (document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go')) {
- document.getElementById('img_<xsl:value-of select="$cf_pname"/>_go').src = imgAnimatedGo.src;
- }
- }
- </out:otherwise>
- </out:choose>
- </script>
- <xsl:choose>
- <xsl:when test="$cf_vname='true'">
- <out:if test="{$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0'">
- <!--
- 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.
- -->
- <script language="javascript">
- function preDelete(formObj, prefix)
- {
- if( window.selectionCount )
- if (selectionCount(formObj, prefix) == <out:value-of select="{$itemCnt}"/>)
- {
- if( document.forms[formObj].backURL )
- {
- document.forms[formObj].backURL.value =
- "<out:value-of select="{$pagerBack}"/><out:value-of select="concat('&m_', '{$cf_pname}', 'section=')"/><out:value-of select="({$startPos}) - ({$lines}) + 1"/>";
- }
- }
- }
- </script>
- </out:if>
- </xsl:when>
- <xsl:otherwise>
- <out:if test="'{$genDelete}'='yes' and {$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0' and ({$startPos}+{$lines}) >= {$itemCnt}">
- <!--
- preDelete[pager name] java script function for a non-virtualPage pager.
- -->
- <script language="javascript">
- function preDelete<out:value-of select="'{$cf_pname}'"/>(formObj, prefix)
- {<out:text/><!--out:if test="{$itemCnt} > 0 and {$startPos} != '' and {$startPos} != '0' and ({$startPos}+{$lines}) >= {$itemCnt} "-->
- var lpp = <out:value-of select="{$lines}"/>;
- var len = 0;
- var elementCount = document.forms[formObj].length;
- for (var i=0; i < elementCount ; i++)
- {
- if (document.forms[formObj].elements[i].name.indexOf(prefix) == 0 && document.forms[formObj].elements[i].checked)
- {
- len = len + 1;
- }
- }
- if ( len == <out:value-of select="{$itemCnt} - {$startPos}"/>)
- {
- <out:value-of select="concat('document.forms[formObj].m_', '{$cf_pname}', 'section.value = ')"/><out:value-of select="{$startPos}+1"/> - lpp;
- }
- <!--/out:if--><out:text/>}
- </script>
- </out:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- Template - cf-main-pager-goto-button-section:
- This template creates the navigation goto button beside the input entry fields from and to for Entries:.
- Operation:
- 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
- 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
- No entries message is displayed.
- This template is used exclusively by cf-main-pager-section.
- -->
- <xsl:template name="cf-main-pager-goto-button-section">
- <xsl:param name="useUtml"/>
- <xsl:param name="cf_pname"/>
- <xsl:param name="pagerPosition"/>
- <xsl:param name="tooltip"/>
- <xsl:variable name="tb">
- <xsl:if test="$pagerPosition = 'bottom'">_d</xsl:if>
- </xsl:variable>
- <script language="javascript">
- var imgAnimatedGo = new Image();
- imgAnimatedGo.src = "<out:value-of select="xtsext:javascriptencode($skin_images)"/>action_go_ani.gif";
- </script>
- <out:variable name="GoToText"><xts:string id="IDS_PAGER_GO_TO"/></out:variable>
- <xsl:choose>
- <xsl:when test="$useUtml!='true'">
- <a title="{'{$GoToText}'}" role="button" tabindex="0">
- <out:attribute name="href">
- <out:text/>javascript:nav<xsl:value-of select="$cf_pname"/>Go('<xsl:value-of select="$tb"/>')<out:text/>
- </out:attribute>
- <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'"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <utml:a title="{'{$GoToText}'}" role="button" tabindex="0">
- <out:attribute name="href">
- <out:text/>javascript:nav<xsl:value-of select="$cf_pname"/>Go('<xsl:value-of select="$tb"/>')<out:text/>
- </out:attribute>
- <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'"/>
- </utml:a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--
- Template - cf-main-pager-button-section:
- This template creates the navigation buttons along the sides of list-view display for the main pages (Public Folders / My Folders) and other
- pages. The UI display consist of the top, page-up, page-down and bottom buttons.
- Operation:
- 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
- page-down and bottom buttons are disabled. When the buttons are active they contain the information on the action to be performed when pressed.
- They contain the next sections to display (minus 1 is used to get the last section to display for the bottom button).
- This template is used exclusively by cf-main-pager-section.
- -->
- <xsl:template name="cf-main-pager-button-section">
- <xsl:param name="useUtml"/>
- <xsl:param name="condition"/>
- <xsl:param name="label"/>
- <xsl:param name="cf_pname"/>
- <xsl:param name="formName"/>
- <xsl:param name="navpage"/>
- <xsl:param name="tooltip"/>
- <xsl:param name="validate"/>
- <xsl:param name="pagerBack"/>
- <xsl:param name="buttBottom" select="''"/>
- <xsl:choose> <!-- <out:if test="{$showControl}='true'"> <xsl:when test="string($useUtml)!='true'">-->
- <xsl:when test="string($useUtml)!='true'">
- <out:choose>
- <out:when test="{$condition}">
- <a role="button">
- <out:attribute name="href">
- <xsl:if test="$validate='true'"><xsl:text>javascript:if(validate()){</xsl:text></xsl:if>
- <xsl:choose>
- <xsl:when test="string($formName) != ''">
- <xsl:choose>
- <xsl:when test="$label='top'">javascript:nav<xsl:value-of select="$cf_pname"/>T();</xsl:when>
- <xsl:when test="$label='pageup'">javascript:nav<xsl:value-of select="$cf_pname"/>U();</xsl:when>
- <xsl:when test="$label='pagedown'">javascript:nav<xsl:value-of select="$cf_pname"/>D();</xsl:when>
- <xsl:otherwise>javascript:nav<xsl:value-of select="$cf_pname"/>B();</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/><out:value-of select="concat('&m_', '{$cf_pname}', 'section=')"/><out:value-of select="{$navpage}"/><out:value-of select="concat('&m_pg_e', '{$cf_pname}', '=')"/><out:value-of select="$cf_{$cf_pname}_hasEntries"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$validate='true'"><xsl:text>}</xsl:text></xsl:if>
- </out:attribute>
- <out:attribute name="title"><xts:string id="{$tooltip}"/></out:attribute>
- <out:attribute name="tabindex">0</out:attribute>
- <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'">
- <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
- </img>
- </a>
- </out:when>
- <out:otherwise>
- <img width="13" height="13" src="{'{$skin_images}'}control_btn_{$label}_disabled.gif" role="button" aria-disabled="true">
- <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
- <out:attribute name="class">button flippingImages</out:attribute>
- </img>
- </out:otherwise>
- </out:choose>
- </xsl:when>
- <xsl:otherwise>
- <out:choose>
- <out:when test="{$condition}">
- <utml:a role="button">
- <out:attribute name="href">
- <xsl:if test="$validate='true'"><xsl:text>javascript:if(validate()){</xsl:text></xsl:if>
- <xsl:choose>
- <xsl:when test="string($formName) != ''">
- <xsl:choose>
- <xsl:when test="$label='top'">javascript:nav<xsl:value-of select="$cf_pname"/>T();</xsl:when>
- <xsl:when test="$label='pageup'">javascript:nav<xsl:value-of select="$cf_pname"/>U();</xsl:when>
- <xsl:when test="$label='pagedown'">javascript:nav<xsl:value-of select="$cf_pname"/>D();</xsl:when>
- <xsl:otherwise>javascript:nav<xsl:value-of select="$cf_pname"/>B();</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="{$pagerBack}"/><out:value-of select="$cf_{$cf_pname}_pager_vars"/><out:value-of select="concat('&m_', '{$cf_pname}', 'section=')"/><out:value-of select="{$navpage}"/><out:value-of select="concat('&m_pg_e', '{$cf_pname}', '=')"/><out:value-of select="$cf_{$cf_pname}_hasEntries"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$validate='true'"><xsl:text>}</xsl:text></xsl:if>
- </out:attribute>
- <out:attribute name="title"><xts:string id="{$tooltip}"/></out:attribute>
- <out:attribute name="tabindex">0</out:attribute>
- <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'">
- <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
- </img>
- </utml:a>
- </out:when>
- <out:otherwise>
- <img width="13" height="13" src="{'{$skin_images}'}control_btn_{$label}_disabled.gif">
- <out:attribute name="alt"><xts:string id="{$tooltip}"/></out:attribute>
- <out:attribute name="class">button flippingImages</out:attribute>
- </img>
- </out:otherwise>
- </out:choose>
- </xsl:otherwise>
- </xsl:choose>
- <img height="1" width="2" src="{'{$webcontent}'}/images/space.gif" alt=""/>
- </xsl:template>
- <!--
- Template - cf:do-the-path-link:
- This template is used to display the search path for an object or where the object is located. The path link
- is represented by each object in the path (exclusive of the current object) which may or may not be
- hyperlinked with a greater than sign as a separation indicator.
- Example:
- Public Folders > YearToDate Reports > Finance
- Parameters that can be used with this tag are:
- cf:param familtytree - the objects ancestors
- cf:param familtymember - the current object name
- cf:param isRootPath - this is the root object; no ancestors
- cf:param home - the root of the ancestry.
- cf:param home-title - the root's title (such as /content = Public Folders).
- cf:param anchorpath - the path is an anchor - so use the supplied anchor.
- cf:param onlyancestors - only display the ancestry sans object.
- cf:param lastIsLink - the object is to be a hyperlink.
- Operation:
- The basic operation of this template is to loop through the objects ancestors displaying each objects title
- as a portion of the path - overriding the first objects title when a home-title is supplied and creating a hyperlink for
- each object (to be able to navigate to that object) as required.
- -->
- <xsl:template match="cf:do-the-path-link">
- <xsl:variable name="ft" select="./cf:param[@name='familytree']"/>
- <xsl:variable name="fm" select="./cf:param[@name='familymember']"/>
- <out:variable name="familytree" select="{$ft}"/>
- <out:variable name="familymember" select="{$fm}"/>
- <out:variable name="familymemberDisplay">
- <out:value-of select="xtsext:enforceBTD($familymember, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </out:variable>
- <out:variable name="isTop">
- <xsl:choose>
- <xsl:when test="./cf:param[@name='isRootPath']">
- <xsl:copy-of select="./cf:param[@name='isRootPath']"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="home">
- <xsl:choose>
- <xsl:when test="./cf:param[@name='home']">
- <xsl:copy-of select="./cf:param[@name='home']"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="home-title">
- <xsl:if test="./cf:param[@name='home-title']">
- <xsl:copy-of select="./cf:param[@name='home-title']"/>
- </xsl:if>
- </out:variable>
- <out:variable name="home-title-display">
- <out:value-of select="xtsext:enforceBTD($home-title, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </out:variable>
- <out:variable name="anchorpath">
- <xsl:choose>
- <xsl:when test="./cf:param[@name='anchorpath'] and ./cf:param[@name='anchorpath']!=''">
- <out:value-of select="'true'"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="onlyAncestors">
- <xsl:if test="./cf:param[@name='onlyAncestors'] and ./cf:param[@name='onlyAncestors']='true'">
- <out:value-of select="'true'"/>
- </xsl:if>
- <xsl:if test="not(./cf:param[@name='onlyAncestors']) or ./cf:param[@name='onlyAncestors']='false'">
- <out:value-of select="'false'"/>
- </xsl:if>
- </out:variable>
- <out:variable name="lastIsLink">
- <xsl:choose>
- <xsl:when test="./cf:param[@name='lastIsLink']">
- <xsl:copy-of select="./cf:param[@name='lastIsLink']"/>
- </xsl:when>
- <xsl:otherwise>
- <out:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </out:variable>
- <out:variable name="match-position">
- <out:if test="$home!='' and count($familytree/child::cm:ancestorInfo) > 0">
- <out:for-each select="$familytree/child::cm:ancestorInfo">
- <out:if test="not(starts-with(./child::cm:searchPath,$home))">
- <out:choose>
- <out:when test="$isTop='false'">
- <out:value-of select="concat(',',string(position()+1))"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="concat(',',string(position()))"/>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:for-each>
- </out:if>
- </out:variable>
- <out:variable name="start-position">
- <out:if test="$match-position != ''">
- <out:value-of select="xtsext:substringAfterLast(string($match-position),',')"/>
- </out:if>
- </out:variable>
- <!-- RTL Support -->
- <!-- TextSeparator ">" with marker according to UI Direction (RTL or LTR) -->
- <out:variable name="textSeparatorWithMarker">
- <out:choose>
- <out:when test="$is-ui-rtl=true()"> ‏> </out:when><!-- RLM -->
- <out:otherwise> ‎> </out:otherwise><!-- LRM -->
- </out:choose>
- </out:variable>
- <!--a>count: <out:value-of select="count($familytree/child::cm:ancestorInfo)"/></a><br/>
- <a>home: <out:value-of select="$home"/></a><br/>
- <a>home-title: <out:value-of select="$home-title"/></a><br/>
- <a>pos: <out:value-of select="$start-position"/></a><br/>
- <a>anchor: <out:value-of select="$anchorpath"/></a><br/>
- <a>member: <out:value-of select="$familymember"/></a><br/>
- <a>top: <out:value-of select="$isTop"/></a><br/-->
- <!-- RTL support -->
- <!-- Bread crumb Block start with RLE (for RTL) or LRE (for LTR)-->
- <out:choose>
- <out:when test="$is-ui-rtl=true()">‫</out:when><!-- RLE -->
- <out:otherwise>‪</out:otherwise><!-- LRE -->
- </out:choose>
- <out:for-each select="$familytree/child::cm:ancestorInfo">
- <!--out:comment><out:value-of select="./cf:param[@name='anchorpath']"/></out:comment-->
- <out:if test="$home = 'false' or $home='' or starts-with(./child::cm:searchPath,$home)">
- <out:choose>
- <out:when test="$anchorpath='false'">
- <out:choose>
- <out:when test="$home-title!='' and (string(position()) = $start-position or position()=1)">
- <cp:pathText><out:value-of select="$home-title-display"/></cp:pathText>
- </out:when>
- <out:otherwise>
- <out:variable name="cmTitle">
- <out:value-of select="./cm:title"/>
- </out:variable>
- <cp:pathText><out:value-of select="xtsext:enforceBTD($cmTitle, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></cp:pathText>
- </out:otherwise>
- </out:choose>
- <out:choose>
- <out:when test="$onlyAncestors = 'false'">
- <cp:pathTextSeparator> <out:value-of select="$textSeparatorWithMarker"/> </cp:pathTextSeparator>
- </out:when>
- <out:when test="($onlyAncestors='true' and position() != last())">
- <cp:pathTextSeparator> <out:value-of select="$textSeparatorWithMarker"/> </cp:pathTextSeparator>
- </out:when>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$onlyAncestors='true' and position() = (last())">
- <cp:pathLeafNode>
- <xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLeafNode>
- </out:when>
- <out:otherwise><cp:pathLink><xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLink></out:otherwise>
- </out:choose>
- <out:choose>
- <out:when test="$onlyAncestors='false'">
- <cp:pathSeparator><xsl:text> </xsl:text><out:value-of select="$textSeparatorWithMarker"/><xsl:text> </xsl:text></cp:pathSeparator>
- </out:when>
- <out:when test="($onlyAncestors='true' and position() != last())">
- <cp:pathSeparator><xsl:text> </xsl:text><out:value-of select="$textSeparatorWithMarker"/><xsl:text> </xsl:text></cp:pathSeparator>
- </out:when>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:if>
- </out:for-each>
- <out:if test="$onlyAncestors = 'false' ">
- <out:choose>
- <out:when test="$lastIsLink='true' and $anchorpath='true'"><cp:pathLink><xsl:copy-of select="./cf:param[@name='anchorpath']/child::node()"/></cp:pathLink></out:when>
- <out:when test="$isTop='true' and $home-title != ''">
- <out:choose>
- <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$home-title-display"/></cp:pathText></out:when>
- <out:otherwise><cp:pathLeafNode><out:value-of select="$home-title-display"/></cp:pathLeafNode></out:otherwise>
- </out:choose>
- </out:when>
- <out:when test="$start-position!='' and count($familytree/child::cm:ancestorInfo) >= $start-position">
- <out:choose>
- <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$familymemberDisplay"/></cp:pathText></out:when>
- <out:otherwise><cp:pathLeafNode><out:value-of select="$familymemberDisplay"/></cp:pathLeafNode></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$home != '' and $home != 'false' and $home-title != '' and $start-position=''">
- <out:choose>
- <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$home-title-display"/></cp:pathText></out:when>
- <out:otherwise><cp:pathLeafNode><out:value-of select="$home-title-display"/></cp:pathLeafNode></out:otherwise>
- </out:choose>
- </out:when>
- <out:otherwise>
- <out:choose>
- <out:when test="$anchorpath='false'"><cp:pathText><out:value-of select="$familymemberDisplay"/></cp:pathText></out:when>
- <out:otherwise><cp:pathLeafNode><out:value-of select="$familymemberDisplay"/></cp:pathLeafNode></out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:otherwise>
- </out:choose>
- </out:if>
- <!-- RTL support -->
- <!-- Bread crumb Block (LRE or RLE) termination -->
- <out:text>‬</out:text><!-- PDF -->
- </xsl:template>
- <!-- -->
- <xsl:template match="cf:resetOnResize">
- <!-- Use this in dialogues when need to reset the flyouts for window.onresize -->
- <!-- Specify supplimentary functions that need to be run in the otherFunctions attribute -->
- <!-- See flyouts.js for definition -->
- <script language="javascript">
- function resetOnResize()
- {
- <xsl:if test="string(@otherFunctions) != ''">
- <xsl:value-of select="@otherFunctions"/>
- </xsl:if>
- flyonresize();
- }
- </script>
- </xsl:template>
- <xsl:template match="cf:resetOnClick">
- <!-- Use this in dialogues when need to reset the flyouts for document.onclick -->
- <!-- Specify supplimentary functions that need to be run in the otherFunctions attribute -->
- <!-- See flyouts.js for definition -->
- <script language="javascript">
- function resetOnClick(event)
- {
- <xsl:if test="string(@otherFunctions) != ''">
- <xsl:value-of select="@otherFunctions"/>
- </xsl:if>
- flyonclick(event);
- }
- </script>
- </xsl:template>
- <!-- the main engine -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|