12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- +===================================================================+
- | Licensed Materials - Property of IBM
- | BI and PM: prmt
- | (C) Copyright IBM Corp. 2002, 2022
- |
- | US Government Users Restricted Rights - Use, duplication or
- | disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- |
- +===================================================================+
- ////////////////////////////////////////////////////////////////////////
- // p_include_main.xsl
- ///////////////////////////////////////////////////////////////////////
- This XSL file defines a common interface for using prompting controls. Prompt controls are used to create forms for user input
- with rich, browser specific user interfaces.
- This file serves two purposes:
- 1) to be used in combination with an XML input document, appropriate XSL style sheets and XSLt transformer to produce the
- desired browser output.
- 2) to be used as an example for calling prompt control templates from other products (e.g. via: XSL, XTS, C++, Java, ...). This file
- encapsulates the prompting control functionality so that developers can include prompting controls with a few tags.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
- <xsl:param name="webcontentRootURI"><xsl:value-of select="$webRoot"/></xsl:param>
- <xsl:param name="skin_folder"><xsl:value-of select="$webcontentRootURI"/>/skins/<xsl:value-of select="$skin"/></xsl:param>
- <xsl:param name="CognosViewerID" select="''"/>
- <xsl:param name="CVObject">
- <xsl:text/>oCV<xsl:value-of select="$CognosViewerID"/>.<xsl:text/>
- </xsl:param>
- <xsl:param name="UseFullPrmtCompiled" select="'true'"/>
- <xsl:param name="PRMT_isLocaleValidated" select="'false'"/>
- <xsl:param name="HTML5PromptControls" select="'false'"/>
-
- <!-- prompt submit type determines how to submit the data -->
- <xsl:variable name="promptSubmitType">XML</xsl:variable>
- <xsl:variable name="promptLocaleLanguage" select="substring($promptLocale, 1, 2)"/>
- <xsl:variable name="validConfigLocale">
- <xsl:choose>
- <xsl:when test="$PRMT_isLocaleValidated='true' or document(concat($cogLocalePath,'/coglocale.xml'))/localeConfiguration/supportedProductLocales/locale[@id=$promptLocaleLanguage]">
- <xsl:value-of select="$promptLocale"/>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="validLocale">
- <xsl:choose>
- <xsl:when test="$PRMT_isLocaleValidated='true'">
- <xsl:text/><xsl:value-of select="$promptLocale"/><xsl:text/>
- </xsl:when>
- <xsl:when test="$validConfigLocale!=''">
- <xsl:text/><xsl:value-of select="$validConfigLocale"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="contains('ar en ca cs da de es el fi fr hr hu id in it ja kk ko ms nl no nb pl pt ro ru sl sv th tr zh ', concat(' ', substring($promptLocale, 1, 2), ' '))">
- <xsl:text/><xsl:value-of select="$promptLocale"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise><xsl:text/>en<xsl:text/></xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="ClientPromptingLocale">
- <xsl:choose>
- <xsl:when test="starts-with($validLocale,'zh')">
- <xsl:choose>
- <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
- <xsl:otherwise><xsl:value-of select="$validLocale"/></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$promptLocale!=''"><xsl:value-of select="substring($validLocale, 0,3)"/></xsl:when>
- <xsl:otherwise>en</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="ClientPromptingValidLocale">
- <xsl:choose>
- <xsl:when test="$ClientPromptingLocale!='en' and document(concat('./promptingStrings_',$ClientPromptingLocale,'.xml'))" >
- <xsl:value-of select="$ClientPromptingLocale"/>
- </xsl:when>
- <xsl:otherwise>en</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="ClientPromptingStrings" select="document(concat('./promptingStrings_',$ClientPromptingValidLocale,'.xml'))"/>
- <!--
- create a key map for any selected user choices
- there are typically going to be fewer selected choices than options to choose from
- -->
- <xsl:key name="select-options-by-useValue" match="/Document/DATA//selectChoices/selectOption" use="concat(../../@name, @useValue)"/>
- <xsl:key name="select-options-by-displayValue" match="/Document/DATA//selectChoices/selectOption" use="concat(../../@name, @displayValue)"/>
- <!--
- /////////////////////////////////////////////////////////
- // Prompt Controls Interface
- /////////////////////////////////////////////////////////
- -->
- <xsl:template match="selectValue | textBox | selectInterval | selectDate | selectDateTime | selectTime | selectWithTree | selectWithSearch | selectFile" priority="1">
-
- <xsl:variable name="sPromptId">
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <div id="PRMT_{$sPromptId}" class="clsPromptComponent"></div>
- <xsl:if test="local-name() = 'selectValue'">
- <xsl:apply-templates mode="render" select="."/>
- </xsl:if>
- <script language="javascript" type="text/javascript">
- <xsl:text>
- </xsl:text>
- <xsl:choose>
- <xsl:when test="not($CognosViewerID)">
- <xsl:text/>G_PM_THIS_<xsl:value-of select="$CognosViewerID"/>.F_Add(<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>G_PM<xsl:value-of select="$CognosViewerID"/>.F_Add(<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates mode="json" select="."/>
- <xsl:text>,{_id_:'</xsl:text>
- <xsl:value-of select="$sPromptId"/>
- <xsl:text>',CVId:'</xsl:text>
- <xsl:value-of select="$CognosViewerID"/>
- <xsl:text>'});
- </xsl:text>
- </script>
- </xsl:template>
- <xsl:template match="selectValue" mode="render">
- <xsl:variable name="sPromptId">
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <xsl:variable name="selectValueUI">
- <xsl:choose>
- <!-- if it's a range, we force it as a dropdown -->
- <xsl:when test="@range='true'">dropdown</xsl:when>
- <xsl:otherwise><xsl:value-of select="@selectValueUI"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$selectValueUI = 'radioGroup' or $selectValueUI = 'checkboxGroup'">
- <xsl:variable name="inputType">
- <xsl:choose>
- <xsl:when test="@multiSelect = 'true'">checkbox</xsl:when>
- <xsl:otherwise>radio</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="disabled" select="@disabled"/>
- <div id="PRMT_SV_{$sPromptId}" class="clsCheckBoxList pv">
- <xsl:if test="$disabled">
- <xsl:attribute name="disabled">disabled</xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$inputType = 'radio'">
- <xsl:attribute name="role">radiogroup</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="role">group</xsl:attribute>
- <xsl:attribute name="aria-label"><xsl:value-of select="substring-before($ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='UIM']/string[@id='VALU_CHECKBOX_MULTISELECT_INSTRUCTIONS'],'^1')"/><xsl:value-of select="@parameter"/><xsl:value-of select="substring-after($ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='UIM']/string[@id='VALU_CHECKBOX_MULTISELECT_INSTRUCTIONS'],'^1')"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="./selectOptions/selectOption">
- <xsl:variable name="sOptionId">
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
-
- <div class="clsCheckBoxRow">
- <div class="clsCheckBox">
- <input name="pOpt_{$sPromptId}" id="{$sOptionId}" type="{$inputType}" role="{$inputType}" value="{@useValue}" dv="{@displayValue}" class="dijitCheckBoxInput">
- <xsl:if test="@selected">
- <xsl:attribute name="checked"/>
- </xsl:if>
- <xsl:if test="@nullUse">
- <xsl:attribute name="nullUse">
- <xsl:value-of select="@nullUse"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@nullDisplay">
- <xsl:attribute name="nullDisplay">
- <xsl:value-of select="@nullDisplay"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$disabled">
- <xsl:attribute name="disabled">disabled</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="onclick">return PRMTUtils.F_OnChange(event, this);</xsl:attribute>
- <xsl:attribute name="onkeypress">return PRMTUtils.F_OnChange(event, this);</xsl:attribute>
- <xsl:attribute name="onfocus">return PRMTUtils.f_CheckboxOnFocus(this);</xsl:attribute>
- <xsl:attribute name="onblur">return PRMTUtils.f_CheckboxOnBlur(this);</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </input>
-
- </div>
- <xsl:variable name="sDisplayValue">
- <xsl:choose>
- <xsl:when test="@displayValue and @displayValue!=''">
- <xsl:value-of select="@displayValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@useValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <label for="{$sOptionId}">
- <xsl:value-of select="translate($sDisplayValue, ' ', ' ')"/>
- </label>
- </div>
- </xsl:for-each>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <select id="PRMT_SV_{$sPromptId}" class="clsSelectControl pv">
- <xsl:attribute name="role">listbox</xsl:attribute>
- <xsl:if test="@multiSelect='true' and @selectValueUI!='dropdown'">
- <xsl:attribute name="multiple">multiple</xsl:attribute>
- </xsl:if>
- <xsl:if test="@columnName and ($selectValueUI='dropdown' or not(@required='true' or @multiSelect='true'))">
- <xsl:attribute name="hasLabel">true</xsl:attribute>
- <option><xsl:value-of select="@columnName"/></option>
- <option>--------------------------------------------</option>
- </xsl:if>
- <xsl:for-each select="./selectOptions/selectOption">
- <option value="{@useValue}" dv="{@displayValue}">
- <xsl:attribute name="role">option</xsl:attribute>
- <xsl:attribute name="aria-selected">false</xsl:attribute>
- <xsl:if test="@selected">
- <xsl:attribute name="selected"/>
- </xsl:if>
- <xsl:if test="@nullUse">
- <xsl:attribute name="nullUse">
- <xsl:value-of select="@nullUse"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@nullDisplay">
- <xsl:attribute name="nullDisplay">
- <xsl:value-of select="@nullDisplay"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:variable name="sDisplayValue">
- <xsl:choose>
- <xsl:when test="@displayValue and @displayValue!=''">
- <xsl:value-of select="@displayValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@useValue"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="translate($sDisplayValue, ' ', ' ')"/>
- </option>
- </xsl:for-each>
- </select>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="@*" mode="json">
- <xsl:text>"@</xsl:text>
- <xsl:value-of select="name()"/>
- <xsl:text>":</xsl:text>
- <xsl:choose>
- <xsl:when test=" . = 'true' ">true</xsl:when>
- <xsl:when test=" . = 'false' ">false</xsl:when>
- <xsl:otherwise>"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="."/></xsl:call-template>"</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="*" mode="json">
- <xsl:text>{n:'</xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:text>'</xsl:text>
- <xsl:for-each select="@*">
- <xsl:text>,</xsl:text>
- <xsl:apply-templates mode="json" select="."/>
- </xsl:for-each>
- <xsl:if test="*">
- <xsl:text>,c:[</xsl:text>
- <xsl:for-each select="*">
- <xsl:if test="position()>1">,</xsl:if>
- <xsl:apply-templates mode="json" select="."/>
- </xsl:for-each>
- <xsl:text>]</xsl:text>
- </xsl:if>
- <xsl:text>}</xsl:text>
- </xsl:template>
- <!-- ****************** prompt button templates ****************** -->
- <xsl:template match="promptButton" priority="1">
-
- <xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptDisplayValue" select="OTI" />
- <xsl:with-param name="promptStyle">
- <xsl:call-template name="getPromptButtonStyle">
- <xsl:with-param name="promptButton" select="."/>
- </xsl:call-template>
- </xsl:with-param>
- <xsl:with-param name="promptType" select="@type" />
- <xsl:with-param name="promptBackURL" select="@backURL"/>
- <xsl:with-param name="promptClass" select="@class"/>
- <xsl:with-param name="promptButtonName" select="@name"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="getPromptButtonStyle">
- <xsl:param name="promptButton"/>
- <xsl:choose>
- <xsl:when test="$promptButton/@style">
- <xsl:value-of select="@style"/>
- </xsl:when>
- <xsl:when test="$promptButton/@styleId">
- <xsl:variable name="styleId" select="$promptButton/@styleId"/>
- <xsl:value-of select="/Document/styleOptions/cssOptStyle[@styleId=$styleId]/@value"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <!-- ****************** default prompt page templates ****************** -->
- <xsl:template match="OTD[@layoutClass='pageHeader' and @defaultPromptHeader = 'true']" priority="1">
- <td>
- <xsl:call-template name="getDefaultPromptHeader">
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptPageTitle" select="@reportTitle"/>
- <xsl:with-param name="promptBackURL" select="@backURL"/>
- </xsl:call-template>
- </td>
- </xsl:template>
- <xsl:template match="FORM[@layoutClass='block' and @defaultPromptControl='true']" priority="1">
- <xsl:call-template name="getDefaultPromptControl" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptType" select="@type"/>
- <xsl:with-param name="promptCalculationName" select="@calculationName"/>
- <xsl:with-param name="promptExpression" select="@expression"/>
- <xsl:with-param name="promptOperator" select="@operator"/>
- <xsl:with-param name="promptDataType" select="@dataType"/>
- <xsl:with-param name="promptColumnName" select="@columnName"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="defaultCascadingPrompt" priority="1">
- <xsl:call-template name="getDefaultCascadingPrompt" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptColumnName" select="@columnName"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="defaultCascadingPromptControl" priority="1">
- <xsl:call-template name="getDefaultCascadingPromptControl" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptColumnName" select="@columnName"/>
- <xsl:with-param name="promptOperator" select="@operator"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="OTD[@layoutClass='pageFooter' and @defaultPromptFooter = 'true']" priority="1">
- <td>
- <xsl:choose>
- <xsl:when test="contains(//Document/styleOptions/namedCssStyleText, '.bp{')">
- <xsl:call-template name="getDefaultPromptFooter" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptBackURL" select="@backURL"/>
- <xsl:with-param name="promptClass" select="'bp'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="getDefaultPromptFooter" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptBackURL" select="@backURL"/>
- <xsl:with-param name="promptClass" select="''"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:template>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Data Source Signon Interface
- ///////////////////////////////////////////////////////////////////////
- -->
- <xsl:template match="selectDataSourceSignon" priority="1">
- <xsl:call-template name="getSelectDataSourceSignon" >
- <xsl:with-param name="promptLocale" select="$promptLocale" />
- <xsl:with-param name="promptParameter" select="@parameter" />
- <xsl:with-param name="promptConnectionName" select="@connectionName" />
- <xsl:with-param name="promptSearchPath" select="@searchPath" />
- <xsl:with-param name="promptFaultCode" select="//PAGE/@faultcode" />
- </xsl:call-template>
- </xsl:template>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Utility functions
- ///////////////////////////////////////////////////////////////////////
- -->
- <xsl:template name="convertQuotes">
- <xsl:param name="str"/>
- <xsl:choose>
- <xsl:when test="contains($str, '"')">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-before($str, '"')"/>
- </xsl:call-template>\"<xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-after($str, '"')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, '\')">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-before($str, '\')"/>
- </xsl:call-template>\\<xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-after($str, '\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, ' ')">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-before($str, ' ')"/>
- </xsl:call-template>\n<xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-after($str, ' ')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, ' ')">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-before($str, ' ')"/>
- </xsl:call-template>\r<xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="substring-after($str, ' ')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="convertLTGT">
- <xsl:with-param name="str" select="$str"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="convertLTGT">
- <xsl:param name="str"/>
- <xsl:param name="encodeApos"/>
- <xsl:variable name="theApos">'</xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($str, '<')">
- <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-before($str, '<')"/>
- </xsl:call-template>\\U003C<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-after($str, '<')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, '>')">
- <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-before($str, '>')"/>
- </xsl:call-template>\\U003E<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-after($str, '>')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$encodeApos=true() and contains($str, $theApos)">
- <xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-before($str, $theApos)"/>
- </xsl:call-template>\'<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="$encodeApos"/>
- <xsl:with-param name="str" select="substring-after($str, $theApos)"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$str"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template name="getButtonType">
- <xsl:variable name="faultcode" select="//PAGE/@faultcode"/>
- <xsl:choose>
- <xsl:when test="$faultcode='CQE-804' or $faultcode ='CQE-805' or $faultcode ='CQE-806'">CLOSE</xsl:when>
- <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1' or @faultSubcode='6')]">CLOSE</xsl:when>
- <xsl:when test="//PAGE[@defaultOnly='false']">WIZARD</xsl:when>
- <xsl:otherwise>OKCANCEL</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="getOKButtonPromptType">
- <xsl:choose>
- <xsl:when test="//OTD[@layoutClass='pageFooter' and @defaultPromptFooter='true' and @promptRunOption='true']">next</xsl:when>
- <xsl:otherwise>finish</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- If buttontype is OKCANCEL and its onclick is next then return true anything else returns false -->
- <xsl:template name="isOKButtonPromptTypeNext">
- <xsl:variable name="buttonType"><xsl:call-template name="getButtonType"/></xsl:variable>
- <xsl:variable name="okButtonPromptType"><xsl:call-template name="getOKButtonPromptType"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="$buttonType = 'OKCANCEL' and $okButtonPromptType = 'next'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!--
- /////////////////////////////////////////////////////////
- // Prompt Control Include Templates
- /////////////////////////////////////////////////////////
- Includes provide required javascript and CSS styles for the HTML output.
- There are two ways to use these includes:
- 1) use 'getPromptHeadIncludes' - this will inspect the input document and supply the
- correct includes. This is a convenient function, but costly because it uses '//' to find elements
- 2) call the includes directly - use this method if you are crafting your own user interface in
- XML, XSL or XTS and know exactly what controls to include, and have control over the output.
- Prompt Control Includes (No Hints)
- Test for the presence of controls in the input document.
- Ensure that the right files get included in the head of the output.
- -->
- <xsl:template name="getPromptHeadIncludes">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptContentLocale"/>
- <!-- check to see if prompts are needed -->
- <xsl:if test="/Document/DATA//promptButton or /Document/DATA//defaultPromptFooter or /Document/DATA//selectValue or /Document/DATA//textBox or /Document/DATA//selectDate or /Document/DATA//selectWithSearch or /Document/DATA//selectWithTree or /Document/DATA//selectTime or /Document/DATA//selectInterval or /Document/DATA//selectDateTime or /Document/DATA//selectDataSourceSignon or /Document/DATA//selectFile">
- <!-- stylesheet the common includes for prompting controls -->
- <xsl:call-template name="getPromptCommonIncludes"/>
- <xsl:variable name="promptContentLocaleSubstring" select="substring($promptContentLocale, 0,6)"/>
- <script language="javascript" src="{$webcontentRootURI}/prompting/res/promptLocale_{$promptContentLocaleSubstring}.js" type="text/javascript">/**/</script>
- </xsl:if>
- </xsl:template>
- <xsl:template name="PromptJavascriptFiles">
- <!-- -->
- <xsl:choose>
- <xsl:when test="$UseFullPrmtCompiled = 'true'">
- <script language="javascript" src="{$webcontentRootURI}/prompting/PRMTcompiled.js" type="text/javascript">/**/</script>
- </xsl:when>
- <xsl:otherwise>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prmt_core.js" type="text/javascript">/**/</script>
- </xsl:otherwise>
- </xsl:choose>
- <!-- -->
-
- <!--
- <script language="javascript" src="{$webcontentRootURI}/prompting/constants.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/extensions.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/BidiUtils.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/C_PromptElement.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/cognos.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/prompt.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/parameter.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/value/value.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/report/report.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/report/action.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Range.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/C_Choices.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectValue.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Text.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Interval.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Date.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Time.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/DateTime.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Tree.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/PickTree.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/Search.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectFile.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/DateHelper.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/TimeHelper.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5Date.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5Time.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompt/control/SelectHTML5DateTime.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prompting.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CDispatcher.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CRange.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleRange.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CText.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleTextPicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectValueSelectList.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectValueInputList.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerIE5.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerCommon.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CDatePickerDialogIE5.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleDatePicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CTimePickerIE5.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CClockIE5.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleTimePicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CDateTime.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CSearch.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CTreeIE5NS6.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CInnerTree.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CInnerTreeIOS.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CIntervalPicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleIntervalPicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CMultipleDateTimePicker.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CPromptButton.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/CSelectDataSourceSignon.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenTextBoxHTML.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenSelectValueHTML.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenIntervalHTML.js" type="text/javascript">/**/</script>
- <script language="javascript" src="{$webcontentRootURI}/prompting/prmtGenDateTimeHTML.js" type="text/javascript">/**/</script>
- -->
- </xsl:template>
- <!-- common includes required by all prompt controls -->
- <xsl:template name="getPromptCommonIncludes">
- <xsl:call-template name="getPromptIncludes">
- <xsl:with-param name="skinFolder" select="$skin_folder"/>
- <xsl:with-param name="webRootURI" select="$webcontentRootURI"/>
- </xsl:call-template>
- </xsl:template>
- <!-- common includes required by all prompt controls -->
- <xsl:template name="getPromptIncludes">
- <xsl:param name="skinFolder"/>
- <xsl:param name="webRootURI"/>
- <script type="text/javascript">
- <!-- Set oCV to window if no CCognosViewer instance is available ( like in QS ) -->
- try{if (typeof oCV<xsl:value-of select="$CognosViewerID"/>=="undefined"){oCV<xsl:value-of select="$CognosViewerID"/>=window;}}
- catch(e){oCV<xsl:value-of select="$CognosViewerID"/>=window;}
- </script>
- <link href="{$skinFolder}/prompting/promptCommon.css" type="text/css" rel="stylesheet"/>
- <script language="javascript" src="{$webRootURI}/prompting/properties.js" type="text/javascript">/**/</script>
- <xsl:call-template name="PromptJavascriptFiles"/>
- <xsl:if test="$validLocale!='en'">
- <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptingStrings_en.js">
- <xsl:text>/**/</xsl:text>
- </script>
- <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptLocale_en.js">
- <xsl:text>/**/</xsl:text>
- </script>
- </xsl:if>
- <script language="javascript" type="text/javascript">
- <xsl:variable name="promptingStringsLocale">
- <xsl:choose>
- <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
- <xsl:when test="string-length($validLocale)>2 and not(starts-with($validLocale,'zh'))"><xsl:value-of select="substring($validLocale, 0, 3)"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$validLocale"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:attribute name="src"><xsl:value-of select="$webRootURI"/>/prompting/res/<xsl:value-of select="concat('promptingStrings_',$promptingStringsLocale,'.js')"/></xsl:attribute>
- <xsl:text>/**/</xsl:text>
- </script>
- <xsl:variable name="PL">
- <xsl:choose>
- <xsl:when test="$validLocale='zh'">zh-cn</xsl:when>
- <xsl:when test="string-length($validLocale)>5 and not(starts-with($validLocale,'zh'))">
- <xsl:value-of select="substring($validLocale, 0, 6)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$validLocale"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <script language="javascript" type="text/javascript" src="{$webRootURI}/prompting/res/promptLocale_{$PL}.js">
- <xsl:text>/**/</xsl:text>
- </script>
- <script language="javascript" type="text/javascript">
- <xsl:text>
- </xsl:text>
- var G_IsBidiEnabled = <xsl:value-of select="$PRMT_isBidiEnabled"/>;
- var G_PRMT_HTML5PromptControls = <xsl:value-of select="$HTML5PromptControls"/>;
- <xsl:choose>
- <xsl:when test="not($CognosViewerID)">
- <xsl:text/>var G_PM_THIS_<xsl:value-of select="$CognosViewerID"/> = new C_PromptManager();<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>var G_PM<xsl:value-of select="$CognosViewerID"/> = new C_PromptManager(); <xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CVObject"/>preProcessControlArray=[];<xsl:text/>
- <xsl:text/>p_sSkinFolder="<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$skinFolder"/></xsl:call-template>";<xsl:text/>
- <xsl:text/>p_sWebContentURI="<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$webRootURI"/></xsl:call-template>";<xsl:text/>
- <xsl:value-of select="$CVObject"/>gbPromptRequestSubmitted=false;<xsl:text/>
- <!-- prompt button navigation variables -->
- <xsl:variable name="bCanFinish">
- <xsl:choose>
- <xsl:when test="//PAGE[@canFinish = 'false']">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$CVObject"/>bCanFinish=<xsl:value-of select="$bCanFinish"/>;<xsl:text/>
- <xsl:variable name="bCanNext">
- <xsl:choose>
- <xsl:when test="//PAGE[@canNext = 'false']">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$CVObject"/>bNextPage=<xsl:value-of select="$bCanNext"/>;<xsl:text/>
- <!-- page navigation control observers -->
- <xsl:value-of select="$CVObject"/>pageNavigationObserverArray=[];<xsl:text/>
- <xsl:value-of select="$CVObject"/>rangeObserverArray=[];<xsl:text/>
- <xsl:value-of select="$CVObject"/>multipleObserverArray=[];<xsl:text/>
- <xsl:value-of select="$CVObject"/>datePickerObserverArray=[];<xsl:text/>
- <xsl:value-of select="$CVObject"/>repromptObserverArray=[];<xsl:text/>
- <xsl:value-of select="$CVObject"/>hasPromptKeyDown=false;<xsl:text/>
- <xsl:text>
- </xsl:text>
- </script>
- </xsl:template>
- <!--
- We are leaving these empty templates here because they are still called by other applications, like Query Studio
- -->
- <xsl:template name="gettextBoxIncludes"/>
- <xsl:template name="getselectValueIncludes"/>
- <xsl:template name="getselectDateIncludes"/>
- <xsl:template name="getselectWithSearchIncludes"/>
- <xsl:template name="getselectWithTreeIncludes"/>
- <xsl:template name="getselectTimeIncludes"/>
- <xsl:template name="getintervalFieldIncludes"/>
- <xsl:template name="getselectDateTimeIncludes"/>
- <xsl:template name="getPromptButtonIncludes"/>
- <xsl:template name="getselectDataSourceSignonIncludes"/>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Prompt Control Templates
- ////////////////////////////////////////////////////////////////////////
- -->
- <!--
- ****** text field input box control, implemented as single, multiple line edit box or password field ******
- -->
- <xsl:template name="getTextBox">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptHideText"/>
- <xsl:param name="promptDefaultValue"/>
- <xsl:param name="promptDataType"/>
- <xsl:param name="promptMultiLine"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptNumbersOnly"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptMaxLength"/>
- <xsl:param name="promptShowThousandSeparator"/>
- <xsl:param name="promptAllowZero"/>
- <xsl:param name="promptReadOnly"/>
- <xsl:param name="promptShowCondition"/>
- <xsl:param name="promptForceOuterDivWidth"/>
- <div class="clsPromptComponent">
- <xsl:if test="$promptForceOuterDivWidth='true'"><xsl:attribute name = "style" >width:100%;</xsl:attribute></xsl:if>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <xsl:variable name="promptUseValue">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="promptDisplayValue">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="./selectChoices/selectOption/@displayValue"/>
- </xsl:call-template>
- </xsl:variable>
- <div id="textBox{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genTextBoxHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="translate($promptParameter,'"','"')"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">dataType</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptDataType!=''"><xsl:value-of select="$promptDataType"/></xsl:when>
- <xsl:when test="$promptNumbersOnly='true'">number</xsl:when>
- <xsl:otherwise><xsl:text/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultValue</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
- <xsl:when test="$promptUseValue!=''"><xsl:value-of select="$promptUseValue"/></xsl:when>
- <xsl:when test="$promptDisplayValue!=''"><xsl:value-of select="$promptDisplayValue"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$promptDefaultValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showThousandSeparator</xsl:with-param><xsl:with-param name="value" select="$promptShowThousandSeparator"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multiLine</xsl:with-param><xsl:with-param name="value" select="$promptMultiLine"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">allowZero</xsl:with-param><xsl:with-param name="value" select="$promptAllowZero"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideText</xsl:with-param><xsl:with-param name="value" select="$promptHideText"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">readOnly</xsl:with-param><xsl:with-param name="value" select="$promptReadOnly"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showCondition</xsl:with-param><xsl:with-param name="value" select="$promptShowCondition"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">maxLength</xsl:with-param><xsl:with-param name="value" select="number($promptMaxLength)"/></xsl:call-template>
- <!-- if range, include default end value -->
- <xsl:if test="$promptRange='true'">
- <xsl:variable name="sEndValue"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">endValue</xsl:with-param><xsl:with-param name="value" select="$sEndValue"/></xsl:call-template>
- </xsl:if>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
- <xsl:call-template name="getListOptionsJS">
- <xsl:with-param name="objectId" select="concat('multipleText', $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectChoices"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </script>
- </div>
- </xsl:template>
- <!--
- ********** select value prompt control **********
- -->
- <xsl:template name="getSelectValue">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptSelectUI"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="promptAutoSubmit"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptAutoCascade"/>
- <xsl:param name="promptColumnName"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptDisabled"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptShowParentDetails"/>
- <xsl:param name="promptAlwaysShowGroupingBox"/>
- <div class="clsPromptComponent">
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <div id="selectValue{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectValueHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="translate($promptParameter,'"','"')"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:text/>autoSubmitType:'<xsl:choose>
- <xsl:when test="$promptAutoCascade='true'">reprompt</xsl:when>
- <xsl:otherwise>prompt</xsl:otherwise>
- </xsl:choose>', <xsl:text/>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">columnName</xsl:with-param><xsl:with-param name="value" select="$promptColumnName"/></xsl:call-template>
- <xsl:text>initialState:</xsl:text><xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">disabled</xsl:with-param><xsl:with-param name="value" select="$promptDisabled"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">autoSubmit</xsl:with-param><xsl:with-param name="value" select="$promptAutoSubmit"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showParentDetails</xsl:with-param><xsl:with-param name="value" select="$promptShowParentDetails"/></xsl:call-template>
- <xsl:text/>numSelectOptions:<xsl:value-of select="count(./selectOptions/*)"/>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">alwaysShowGroupingBox</xsl:with-param><xsl:with-param name="value" select="$promptAlwaysShowGroupingBox"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptRange='true'">
- <xsl:if test="$promptMultiSelect='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:variable name="rangeSuffix"><xsl:if test="$promptMultiSelect='true'">r_</xsl:if></xsl:variable>
- <xsl:call-template name="getListOptionsJS">
- <xsl:with-param name="objectId" select="concat('listBoxrange_from', $rangeSuffix, $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectOptions"/>
- </xsl:call-template>
- <xsl:call-template name="getListOptionsJS">
- <xsl:with-param name="objectId" select="concat('listBoxrange_to', $rangeSuffix, $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectOptions"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$promptSelectUI='dropdown' or $promptSelectUI='listBox'">
- <xsl:call-template name="getListOptionsJS">
- <xsl:with-param name="objectId" select="concat('listBox', $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectOptions"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptSelectUI='radioGroup' or $promptSelectUI='checkboxGroup'">
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true'">
- <xsl:call-template name="getGroupOptionsJS">
- <xsl:with-param name="objectId" select="concat('checkBoxList', $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectOptions"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="getGroupOptionsJS">
- <xsl:with-param name="objectId" select="concat('radioList', $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectOptions"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$promptRange='true' and ./selectChoices">
- <xsl:variable name="sRangeName">
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true'">ranger_</xsl:when>
- <xsl:otherwise>range</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="./selectChoices/selectBoundRange">
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectBoundRange/start/@useValue"/></xsl:call-template>");
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectBoundRange/end/@useValue[last()]"/></xsl:call-template>");
- </xsl:when>
- <xsl:when test="./selectChoices/selectUnboundedEndRange">
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectUnboundedEndRange/start/@useValue"/></xsl:call-template>");
- </xsl:when>
- <xsl:when test="./selectChoices/selectUnboundedStartRange">
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectUnboundedStartRange/end/@useValue[last()]"/></xsl:call-template>");
- </xsl:when>
- <xsl:when test="./selectChoices/selectOption">
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oFrom.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/></xsl:call-template>");
- <xsl:value-of select="$sRangeName"/><xsl:value-of select="$sPromptId"/>.m_oTo.selectByUseValue("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="./selectChoices/selectOption/@useValue"/></xsl:call-template>");
- </xsl:when>
- </xsl:choose>
- </xsl:if>
- </script>
- </div>
- </xsl:template>
- <!--
- ********** select prompt control contents implemented as checkboxes or radio buttons **********
- -->
- <xsl:template name="getGroupOptionsJS">
- <xsl:param name="objectId"/>
- <xsl:param name="selectOptions"/>
- <xsl:if test="count($selectOptions/selectOption)>0">
- <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
- <xsl:for-each select="$selectOptions/selectOption">
- <xsl:variable name="attr_displayValue">
- <xsl:choose>
- <xsl:when test="@displayValue[last()]!=''"><xsl:value-of select="@displayValue[last()]"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@useValue[last()]"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
- <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
- <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
- <xsl:variable name="attr_selected">
- <xsl:choose>
- <!--
- select the option if there is a suitable user choice
- - match by use value first, because that is what will be used for the parameter value.
- - if no use value is supplied, then match by display value
- -->
- <xsl:when test="count($scUseValue) > 0">true</xsl:when>
- <xsl:when test="count($scDisplayValue) > 0">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="not($attr_displayValue)">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_useValue"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_displayValue"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="useValue">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_useValue"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>",<xsl:text/>
- <xsl:choose>
- <xsl:when test="$attr_selected='true'"><xsl:text/>true<xsl:text/></xsl:when>
- <xsl:otherwise><xsl:text/>false<xsl:text/></xsl:otherwise>
- </xsl:choose>
- <xsl:text>],</xsl:text>
- </xsl:for-each>
- <xsl:text>null]);</xsl:text>
- </xsl:if>
- </xsl:template>
- <!--
- ********** select prompt control contents implemented as dropdowns or list boxes **********
- -->
- <xsl:template name="getListOptionsJS">
- <xsl:param name="objectId"/>
- <xsl:param name="selectOptions"/>
- <xsl:if test="count($selectOptions/selectOption)>0">
- <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
- <xsl:for-each select="$selectOptions/selectOption">
- <xsl:variable name="attr_displayValue">
- <xsl:choose>
- <xsl:when test="@displayValue[last()]!=''"><xsl:value-of select="@displayValue[last()]"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@useValue[last()]"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
- <xsl:variable name="useValue">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_useValue"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
- <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
- <xsl:variable name="attr_selected">
- <xsl:choose>
- <!--
- select the option if there is a suitable user choice
- - match by use value first, because that is what will be used for the parameter value.
- - if no use value is supplied, then match by display value
- -->
- <xsl:when test="count($scUseValue) > 0">true</xsl:when>
- <xsl:when test="count($scDisplayValue) > 0">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="not($attr_displayValue)">
- <xsl:text/><xsl:value-of select="$useValue"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_displayValue"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>"<xsl:text/>
- <xsl:if test="$attr_selected='true'">, true</xsl:if>
- <xsl:text>],</xsl:text>
- </xsl:for-each>
- <xsl:text>null]);</xsl:text>
- </xsl:if>
- </xsl:template>
- <!--
- ********** select with search prompt controls **********
- -->
- <xsl:template name="getSelectWithSearch">
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptSearchValue"/>
- <xsl:param name="promptMatchAnywhere"/>
- <xsl:param name="promptMatchAll"/>
- <xsl:param name="promptShowOptions"/>
- <xsl:param name="promptNoResultsFound"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="promptSearchFunction"/>
- <xsl:param name="promptDisabled"/>
- <xsl:param name="promptCaseInsensitive"/>
- <xsl:param name="promptShowCondition"/>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <script language="javascript" type="text/javascript">
- addHiddenInputHTML("<xsl:value-of select="concat($promptFormName, $CognosViewerID)"/>", "p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$sPromptId"/></xsl:call-template>", "");
- </script>
- <div id="selectSearch{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectSearchHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">search_criteria</xsl:with-param><xsl:with-param name="value" select="$promptSearchValue"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">search_matchAnywhere</xsl:with-param><xsl:with-param name="value" select="$promptMatchAnywhere"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">search_matchAll</xsl:with-param><xsl:with-param name="value" select="$promptMatchAll"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showOptions</xsl:with-param><xsl:with-param name="value" select="$promptShowOptions"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">search_showNoResultFoundString</xsl:with-param><xsl:with-param name="value" select="$promptNoResultsFound"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_editBox</xsl:with-param><xsl:with-param name="value" select="./swsEditBox/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_searchButton</xsl:with-param><xsl:with-param name="value" select="./swsSearchButton/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_options</xsl:with-param><xsl:with-param name="value" select="./swsOptions/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_resultsHeader</xsl:with-param><xsl:with-param name="value" select="./swsResultsHeader/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_resultsListBox</xsl:with-param><xsl:with-param name="value" select="./swsResultsListbox/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_choicesHeader</xsl:with-param><xsl:with-param name="value" select="./swsChoicesHeader/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style_choicesListBox</xsl:with-param><xsl:with-param name="value" select="./swsChoicesListbox/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">search_function</xsl:with-param><xsl:with-param name="value" select="$promptSearchFunction"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">disabled</xsl:with-param><xsl:with-param name="value" select="$promptDisabled"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">search_caseInsensitive</xsl:with-param><xsl:with-param name="value" select="$promptCaseInsensitive"/><xsl:with-param name="default" select="'true'"/></xsl:call-template>
- <xsl:if test="$promptId!=''">usePromptIdForName:true,</xsl:if>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">search_showCondition</xsl:with-param><xsl:with-param name="value" select="$promptShowCondition"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true'">
- <xsl:call-template name="getListResultsJS">
- <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
- <xsl:with-param name="listType" select="'list'"/>
- <xsl:with-param name="selectOptions" select="selectChoices"/>
- <xsl:with-param name="bSelect" select="'true'"/>
- <xsl:with-param name="bMultiSelect" select="'true'"/>
- </xsl:call-template>
- <xsl:call-template name="getListResultsJS">
- <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
- <xsl:with-param name="listType" select="'result'"/>
- <xsl:with-param name="selectOptions" select="selectOptions"/>
- <xsl:with-param name="bMultiSelect" select="'true'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="not(selectOptions)">
- <xsl:call-template name="getListResultsJS">
- <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
- <xsl:with-param name="listType" select="'list'"/>
- <xsl:with-param name="selectOptions" select="selectChoices"/>
- <xsl:with-param name="bMultiSelect" select="'false'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="getListResultsJS">
- <xsl:with-param name="objectId" select="concat('search', $sPromptId)"/>
- <xsl:with-param name="listType" select="'list'"/>
- <xsl:with-param name="selectOptions" select="selectOptions"/>
- <xsl:with-param name="bMultiSelect" select="'false'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </script>
- </xsl:template>
- <!--
- ********** specifically populates contents of select with search prompt controls according **********
- ********** to whether the item is a result of the search, or a selected item **********
- the bSelect and bMultiSelect parameters are used for single select searches to reselect choices
- -->
- <xsl:template name="getListResultsJS">
- <xsl:param name="objectId"/>
- <xsl:param name="listType"/>
- <xsl:param name="selectOptions"/>
- <xsl:param name="bSelect"/>
- <xsl:param name="bMultiSelect"/>
- <xsl:if test="count($selectOptions/selectOption)>0">
- <xsl:text/><xsl:value-of select="$objectId"/>.addOptions([<xsl:text/>
- <xsl:for-each select="$selectOptions/selectOption">
- <xsl:variable name="attr_displayValue" select="@displayValue[last()]"/>
- <xsl:variable name="attr_useValue" select="@useValue[last()]"/>
- <xsl:variable name="attr_selected" select="@selected[last()]"/>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="not($attr_displayValue)">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_useValue"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_displayValue"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="useValue">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$attr_useValue"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="bSelectThisOption">
- <xsl:choose>
- <xsl:when test="$bMultiSelect='false' and $selectOptions/../selectChoices/selectOption">
- <xsl:variable name="scUseValue" select="key('select-options-by-useValue', concat(../../@name, @useValue[last()]))"/>
- <xsl:variable name="scDisplayValue" select="key('select-options-by-displayValue', concat(../../@name, @displayValue[last()]))"/>
- <xsl:choose>
- <!--
- select the option if there is a suitable user choice
- - match by use value first, because that is what will be used for the parameter value.
- - if no use value is supplied, then match by display value
- -->
- <xsl:when test="count($scUseValue) > 0">true</xsl:when>
- <xsl:when test="count($scDisplayValue) > 0">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$attr_selected='true'">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>["<xsl:value-of select="$displayValue"/>","<xsl:value-of select="$useValue"/>",<xsl:text/>
- <xsl:value-of select="$bSelectThisOption"/>,"<xsl:value-of select="$listType"/>"],<xsl:text/>
- </xsl:for-each>
- <xsl:text>null]);</xsl:text>
- </xsl:if>
- </xsl:template>
- <!--
- ********** range prompt control templates **********
- -->
- <xsl:template name="getRangeType">
- <xsl:param name="selectOptions"/>
- <xsl:choose>
- <xsl:when test="$selectOptions/selectBoundRange">RANGE_BOUND_VALUE</xsl:when>
- <xsl:when test="$selectOptions/selectUnboundedEndRange">RANGE_START_VALUE</xsl:when>
- <xsl:when test="$selectOptions/selectUnboundedStartRange">RANGE_END_VALUE</xsl:when>
- <xsl:when test="$selectOptions/selectOption">RANGE_EQUAL_VALUE</xsl:when>
- <xsl:otherwise>RANGE_NO_VALUE</xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="getStartRangeOption">
- <xsl:param name="selectOptions"/>
- <xsl:choose>
- <xsl:when test="$selectOptions/selectBoundRange"><xsl:value-of select="$selectOptions/selectBoundRange/start/@useValue"/></xsl:when>
- <xsl:when test="$selectOptions/selectUnboundedEndRange"><xsl:value-of select="$selectOptions/selectUnboundedEndRange/start/@useValue"/></xsl:when>
- <xsl:when test="$selectOptions/selectOption"><xsl:value-of select="$selectOptions/selectOption/@useValue"/></xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="getEndRangeOption">
- <xsl:param name="selectOptions"/>
- <xsl:choose>
- <xsl:when test="$selectOptions/selectBoundRange"><xsl:value-of select="$selectOptions/selectBoundRange/end/@useValue[last()]"/></xsl:when>
- <xsl:when test="$selectOptions/selectUnboundedStartRange"><xsl:value-of select="$selectOptions/selectUnboundedStartRange/end/@useValue[last()]"/></xsl:when>
- <xsl:when test="$selectOptions/selectOption"><xsl:value-of select="$selectOptions/selectOption/@useValue[last()]"/></xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="getMultipleRangeSavedValues">
- <xsl:param name="selectChoices"/>
- <xsl:param name="multipleRangeControl"/>
- <xsl:for-each select="$selectChoices/*">
- <xsl:variable name="startUseValue"><xsl:value-of select="./start/@useValue"/></xsl:variable>
- <xsl:variable name="endUseValue"><xsl:value-of select="./end/@useValue"/></xsl:variable>
- <xsl:variable name="useValue"><xsl:value-of select="./@useValue"/></xsl:variable>
- <xsl:variable name="startDisplayValue">
- <xsl:choose>
- <xsl:when test="./start/@displayValue"><xsl:value-of select="./start/@displayValue"/></xsl:when>
- <xsl:when test="../../selectOptions/selectOption[@useValue=$startUseValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$startUseValue]/@displayValue"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="./start/@useValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="endDisplayValue">
- <xsl:choose>
- <xsl:when test="./end/@displayValue"><xsl:value-of select="./end/@displayValue"/></xsl:when>
- <xsl:when test="../../selectOptions/selectOption[@useValue=$endUseValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$endUseValue]/@displayValue"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="./end/@useValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="displayValue">
- <xsl:choose>
- <xsl:when test="@displayValue"><xsl:value-of select="@displayValue"/></xsl:when>
- <xsl:when test="../../selectOptions/selectOption[@useValue=$useValue]/@displayValue"><xsl:value-of select="../../selectOptions/selectOption[@useValue=$useValue]/@displayValue"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@useValue"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="name() = 'selectBoundRange'">
- <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startDisplayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endDisplayValue"/></xsl:call-template>", null);
- </xsl:when>
- <xsl:when test="name() = 'selectUnboundedEndRange'">
- <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$startDisplayValue"/></xsl:call-template>",null, null, null);
- </xsl:when>
- <xsl:when test="name() = 'selectUnboundedStartRange'">
- <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral(null, null, "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endUseValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$endDisplayValue"/></xsl:call-template>", null);
- </xsl:when>
- <xsl:when test="name() = 'selectOption'">
- <xsl:value-of select="$multipleRangeControl"/>.addSuperRangeLiteral("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$useValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$displayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$useValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$displayValue"/></xsl:call-template>", null);
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text/><xsl:value-of select="$multipleRangeControl"/>.checkData();
- </xsl:template>
- <!--
- ********** date prompt controls **********
- -->
- <xsl:template name="getSelectDate">
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptStartOfWeek"/>
- <xsl:param name="promptCalendar"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptSelectDateUI"/>
- <xsl:param name="promptInputOrder"/>
- <xsl:param name="promptDefaultDate"/>
- <xsl:param name="promptFirstDate"/>
- <xsl:param name="promptLastDate"/>
- <xsl:param name="promptDateTime"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="suppressDisabled"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptSelectUI"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="popupLabel"/>
- <xsl:param name="popupZindex">115</xsl:param>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <div class="clsPromptComponent" id="selectDate{$sPromptId}"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectDateHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">prmtDefaultDate</xsl:with-param><xsl:with-param name="value" select="$promptDefaultDate"/></xsl:call-template>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">defaultValue</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
- <xsl:when test="$promptDefaultDate=-1"><xsl:text/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
- <xsl:when test="$promptDefaultDate!=''"><xsl:value-of select="$promptDefaultDate"/></xsl:when>
- <xsl:otherwise><xsl:text/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">startOfWeek</xsl:with-param><xsl:with-param name="value" select="$promptStartOfWeek"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">calendar</xsl:with-param><xsl:with-param name="value" select="$promptCalendar"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectDateUI"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">inputOrder</xsl:with-param><xsl:with-param name="value" select="$promptInputOrder"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">firstDate</xsl:with-param><xsl:with-param name="value" select="$promptFirstDate"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">lastDate</xsl:with-param><xsl:with-param name="value" select="$promptLastDate"/></xsl:call-template>
- <xsl:text/>dateTime:<xsl:choose>
- <xsl:when test="$promptDateTime='true'">0,</xsl:when>
- <xsl:otherwise>1,</xsl:otherwise>
- </xsl:choose>
- <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateEditBoxStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateEditBox/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateYearsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateYears/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateMonthsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateMonths/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysOfWeekStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDaysOfWeek/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDays/@style"/></xsl:call-template>
-
- <xsl:if test="$promptRange='true'">
- <xsl:variable name="sEndValue"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">endRange</xsl:with-param><xsl:with-param name="value" select="$sEndValue"/></xsl:call-template>
- </xsl:if>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">popupLabel</xsl:with-param><xsl:with-param name="value" select="$popupLabel"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">popupZindex</xsl:with-param><xsl:with-param name="value" select="$popupZindex"/></xsl:call-template>
-
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
- <xsl:call-template name='getListOptionsJS'>
- <xsl:with-param name="objectId" select="concat('multipleDatePicker', $sPromptId)"/>
- <xsl:with-param name='selectOptions' select='./selectChoices'/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </script>
- </xsl:template>
- <!--
- ********** time prompt controls **********
- -->
- <xsl:template name="getSelectTime">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptDefaultValue"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptType"/>
- <xsl:param name="promptDisplay"/>
- <xsl:param name="promptInline"/>
- <xsl:param name="promptTimeZone"/>
- <xsl:param name="promptHourFormat"/>
- <xsl:param name="promptMinuteFormat"/>
- <xsl:param name="promptSecondFormat"/>
- <xsl:param name="promptMode"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptShowSeconds"/>
- <xsl:param name="promptShowMilliseconds"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="suppressDisabled"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptSelectUI"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="promptTimeLabel"/>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <div id="selectTime{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectTimeHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">defaultValue</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptRange='true'">
- <xsl:variable name="sDefaultStartTime">
- <xsl:call-template name="getStartRangeOption">
- <xsl:with-param name="selectOptions" select="./selectChoices"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$sDefaultStartTime!=''"><xsl:value-of select="$sDefaultStartTime"/></xsl:when>
- <xsl:otherwise>00:00:00.000</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$promptDefaultValue=-1"><xsl:text/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
- <xsl:when test="$promptDefaultValue!=''"><xsl:value-of select="$promptDefaultValue"/></xsl:when>
- <xsl:otherwise><xsl:text/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">timeZone</xsl:with-param><xsl:with-param name="value" select="$promptTimeZone"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">hourFormat</xsl:with-param><xsl:with-param name="value" select="$promptHourFormat"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">minuteFormat</xsl:with-param><xsl:with-param name="value" select="$promptMinuteFormat"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">secondFormat</xsl:with-param><xsl:with-param name="value" select="$promptSecondFormat"/></xsl:call-template>
- <xsl:if test="$promptType!=''">type:<xsl:value-of select="number($promptType)"/>,</xsl:if>
- <xsl:text>display:</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptDisplay!=''"><xsl:value-of select="number($promptDisplay)"/></xsl:when>
- <xsl:when test="$promptShowMilliseconds='true'">0</xsl:when>
- <xsl:when test="$promptShowSeconds='true'">1</xsl:when>
- <xsl:otherwise>2</xsl:otherwise>
- </xsl:choose>
- <xsl:text>,</xsl:text>
- <xsl:text>mode:</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMode='static'">0</xsl:when>
- <xsl:when test="$promptMode='live'">1</xsl:when>
- <xsl:when test="$promptMode!=''"><xsl:value-of select="number($promptMode)"/>, <xsl:text/></xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- <xsl:text>,</xsl:text>
- <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:if test="$promptRange='true'">
- <xsl:variable name="sDefaultEndTime"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:variable>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">endTime</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$sDefaultEndTime!=''"><xsl:value-of select="$sDefaultEndTime"/></xsl:when>
- <xsl:otherwise>23:59:59.999</xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:if test="$promptTimeLabel != ''">
- ,<xsl:call-template name="stringProp"><xsl:with-param name="isMore" select="false()"/><xsl:with-param name="name">timeLabel</xsl:with-param><xsl:with-param name="value" select="$promptTimeLabel"/></xsl:call-template>
- </xsl:if>
-
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
- <xsl:call-template name='getListOptionsJS'>
- <xsl:with-param name="objectId" select="concat('multipleTimePicker', $sPromptId)"/>
- <xsl:with-param name='selectOptions' select='./selectChoices'/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </script>
- </xsl:template>
- <!--
- ********** dateTime prompt controls **********
- -->
- <xsl:template name="getSelectDateTime">
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptStartOfWeek"/>
- <xsl:param name="promptCalendar"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptInputOrder"/>
- <xsl:param name="promptDefaultDate"/>
- <xsl:param name="promptDefaultTime"/>
- <xsl:param name="promptFirstDate"/>
- <xsl:param name="promptLastDate"/>
- <xsl:param name="promptDateTime"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptType"/>
- <xsl:param name="promptDisplay"/>
- <xsl:param name="promptInline"/>
- <xsl:param name="promptTimeZone"/>
- <xsl:param name="promptHourFormat"/>
- <xsl:param name="promptMinuteFormat"/>
- <xsl:param name="promptSecondFormat"/>
- <xsl:param name="promptMode"/>
- <xsl:param name="promptShowSeconds"/>
- <xsl:param name="promptShowMilliseconds"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="suppressDisabled"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptSelectUI"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptXSDFormat"/>
- <xsl:param name="promptStyle"/>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <xsl:variable name='sStartDateTime'>
- <xsl:call-template name='getStartRangeOption'>
- <xsl:with-param name='selectOptions' select='./selectChoices'/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name='sStartTime'>
- <xsl:choose>
- <xsl:when test="$sStartDateTime != ''"><xsl:value-of select="substring-after($sStartDateTime, 'T')"/></xsl:when>
- <xsl:otherwise>00:00:00.000</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name='sEndDateTime'>
- <xsl:call-template name='getEndRangeOption'>
- <xsl:with-param name='selectOptions' select='./selectChoices'/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name='sEndTime'>
- <xsl:choose>
- <xsl:when test="$sEndDateTime != ''"><xsl:value-of select="substring-after($sEndDateTime, 'T')"/></xsl:when>
- <xsl:otherwise>23:59:59.999</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="clsPromptComponent" id="selectDateTime{$sPromptId}"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectDateTimeHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:choose>
- <!-- StartDate and StartTime for Ranged prompt controls -->
- <xsl:when test="$promptRange='true'">
- <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultDate</xsl:with-param><xsl:with-param name="value" select="substring-before($sStartDateTime, 'T')"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">defaultTime</xsl:with-param><xsl:with-param name="value" select="$sStartTime"/></xsl:call-template>
- </xsl:when>
- <!-- Else use Default Value -->
- <xsl:otherwise>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">defaultDate</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptDefaultDate =-1"><xsl:text/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@useValue != ''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@displayValue != ''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
- <xsl:when test="$promptDefaultDate !=''"><xsl:value-of select="$promptDefaultDate"/></xsl:when>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">defaultTime</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptDefaultTime =-1"><xsl:text/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@useValue != ''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@displayValue != ''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
- <xsl:when test="$promptDefaultTime !=''"><xsl:value-of select="$promptDefaultTime"/></xsl:when>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">startOfWeek</xsl:with-param><xsl:with-param name="value" select="$promptStartOfWeek"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">calendar</xsl:with-param><xsl:with-param name="value" select="$promptCalendar"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectUI</xsl:with-param><xsl:with-param name="value" select="$promptSelectUI"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">inputOrder</xsl:with-param><xsl:with-param name="value" select="$promptInputOrder"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">firstDate</xsl:with-param><xsl:with-param name="value" select="$promptFirstDate"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">lastDate</xsl:with-param><xsl:with-param name="value" select="$promptLastDate"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">timeZone</xsl:with-param><xsl:with-param name="value" select="$promptTimeZone"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">hourFormat</xsl:with-param><xsl:with-param name="value" select="$promptHourFormat"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">minuteFormat</xsl:with-param><xsl:with-param name="value" select="$promptMinuteFormat"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">secondFormat</xsl:with-param><xsl:with-param name="value" select="$promptSecondFormat"/></xsl:call-template>
- <xsl:text>dateTime:</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptDateTime='true'">0,</xsl:when>
- <xsl:otherwise>1,</xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$promptType!=''">type:<xsl:value-of select="number($promptType)"/>,</xsl:if>
- <xsl:text>display:</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptDisplay!=''"><xsl:value-of select="number($promptDisplay)"/></xsl:when>
- <xsl:when test="$promptShowMilliseconds='true'">0</xsl:when>
- <xsl:when test="$promptShowSeconds='true'">1</xsl:when>
- <xsl:otherwise>2</xsl:otherwise>
- </xsl:choose>
- <xsl:text>,</xsl:text>
- <xsl:text>mode:</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMode='static'">0</xsl:when>
- <xsl:when test="$promptMode='live'">1</xsl:when>
- <xsl:when test="$promptMode!=''"><xsl:value-of select="number($promptMode)"/>, <xsl:text/></xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- <xsl:text>,</xsl:text>
- <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressDisabled</xsl:with-param><xsl:with-param name="value" select="$suppressDisabled"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">xSDFormat</xsl:with-param><xsl:with-param name="value" select="$promptXSDFormat"/><xsl:with-param name="default" select="'true'"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateEditBoxStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateEditBox/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateYearsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateYears/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateMonthsStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateMonths/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysOfWeekStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDaysOfWeek/@style"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">selectDateDaysStyle</xsl:with-param><xsl:with-param name="value" select="./selectDateCalendar/selectDateDays/@style"/></xsl:call-template>
- <xsl:if test="$promptRange='true'">
- <xsl:call-template name="stringProp"><xsl:with-param name="name">endDate</xsl:with-param><xsl:with-param name="value" select="substring-before($sEndDateTime, 'T')"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">endTime</xsl:with-param><xsl:with-param name="value" select="$sEndTime"/></xsl:call-template>
- </xsl:if>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
- <xsl:call-template name='getListOptionsJS'>
- <xsl:with-param name="objectId" select="concat('multipleDateTimePicker', $sPromptId)"/>
- <xsl:with-param name="selectOptions" select="./selectChoices"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </script>
- </xsl:template>
- <!--
- ********** interval prompt controls **********
- -->
- <xsl:template name="getSelectInterval">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptFormName"/>
- <xsl:param name="promptRequired"/>
- <xsl:param name="promptDefaultValue"/>
- <xsl:param name="promptParameter"/>
- <xsl:param name="promptId"/>
- <xsl:param name="promptMultiSelect"/>
- <xsl:param name="promptSubmitType"/>
- <xsl:param name="suppressDisabled"/>
- <xsl:param name="promptHideAdornments"/>
- <xsl:param name="promptShowSeconds"/>
- <xsl:param name="promptShowMilliseconds"/>
- <xsl:param name="promptRange"/>
- <xsl:param name="promptAllowComplexRange"/>
- <xsl:param name="promptAllowNegative"/>
- <xsl:param name="promptSuppressExtraPromptNames"/>
- <xsl:param name="promptStyle"/>
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$promptId"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <div class="clsPromptComponent">
- <div id="selectInterval{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- <xsl:text>genSelectIntervalHTML({</xsl:text>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">formName</xsl:with-param><xsl:with-param name="value" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">parameterName</xsl:with-param><xsl:with-param name="value" select="$promptParameter"/></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">submitType</xsl:with-param><xsl:with-param name="value" select="$promptSubmitType"/></xsl:call-template>
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">defaultValue</xsl:with-param>
- <xsl:with-param name="value">
- <xsl:choose>
- <xsl:when test="$promptRange='true'"><xsl:call-template name='getStartRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:when>
- <xsl:when test="$promptDefaultValue=-1"><xsl:text/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@useValue!=''"><xsl:value-of select="./selectChoices/selectOption/@useValue"/></xsl:when>
- <xsl:when test="./selectChoices/selectOption/@displayValue!=''"><xsl:value-of select="./selectChoices/selectOption/@displayValue"/></xsl:when>
- <xsl:when test="$promptDefaultValue!=''"><xsl:value-of select="$promptDefaultValue"/></xsl:when>
- <xsl:otherwise><xsl:text/></xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- </xsl:call-template>
- <xsl:text/>initialState:<xsl:call-template name="getRangeType"><xsl:with-param name="selectOptions" select="./selectChoices"/></xsl:call-template>,<xsl:text/>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">required</xsl:with-param><xsl:with-param name="value" select="$promptRequired"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">hideAdornments</xsl:with-param><xsl:with-param name="value" select="$promptHideAdornments"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showSeconds</xsl:with-param><xsl:with-param name="value" select="$promptShowSeconds"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">showMilliseconds</xsl:with-param><xsl:with-param name="value" select="$promptShowMilliseconds"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">suppressExtraPromptNames</xsl:with-param><xsl:with-param name="value" select="$promptSuppressExtraPromptNames"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">multi</xsl:with-param><xsl:with-param name="value" select="$promptMultiSelect"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">range</xsl:with-param><xsl:with-param name="value" select="$promptRange"/></xsl:call-template>
- <xsl:call-template name="boolProp"><xsl:with-param name="name">allowNegative</xsl:with-param><xsl:with-param name="value" select="$promptAllowNegative"/><xsl:with-param name="default">true</xsl:with-param></xsl:call-template>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">style</xsl:with-param><xsl:with-param name="value" select="$promptStyle"/></xsl:call-template>
- <!-- range to default value for range prompt controls -->
- <xsl:if test="$promptRange='true'">
- <xsl:call-template name="stringProp">
- <xsl:with-param name="name">endValue</xsl:with-param>
- <xsl:with-param name="value"><xsl:call-template name='getEndRangeOption'><xsl:with-param name='selectOptions' select='./selectChoices'/></xsl:call-template></xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:call-template name="stringProp"><xsl:with-param name="name">CVId</xsl:with-param><xsl:with-param name="value" select="$CognosViewerID"/></xsl:call-template>
- <xsl:text/>id:"<xsl:value-of select="$sPromptId"/>"<xsl:text/>
- <xsl:text>});</xsl:text>
- <xsl:choose>
- <xsl:when test="$promptMultiSelect='true' and ($promptRange!='true' or not($promptRange))">
- <xsl:call-template name='getListOptionsJS'>
- <xsl:with-param name="objectId" select="concat('multipleIntervalPicker', $sPromptId)"/>
- <xsl:with-param name='selectOptions' select='./selectChoices'/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$promptMultiSelect='true' and $promptRange='true'">
- <xsl:call-template name="getMultipleRangeSavedValues">
- <xsl:with-param name="selectChoices" select="./selectChoices"/>
- <xsl:with-param name="multipleRangeControl">multipleRange<xsl:value-of select="$sPromptId"/></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </script>
- </div>
- </xsl:template>
- <!--
- ********** select with tree prompt controls **********
- -->
- <xsl:template name="getSelectWithTree">
- <xsl:param name="promptLocale" />
- <xsl:param name="promptFormName" />
- <xsl:param name="promptRequired" />
- <xsl:param name="promptMultiSelect" />
- <xsl:param name="promptStyle" />
- <xsl:param name="promptParameter" />
- <xsl:param name="promptId" />
- <xsl:param name="promptSubmitType" />
- <xsl:param name="promptHideAdornments" />
- <xsl:param name="promptMustChangeDefaultValue"/>
- <xsl:param name="promptHideOuterTable"/>
- <xsl:param name="promptRowsPerPage"/>
- <xsl:param name="promptShowPreviousValues"/>
- <xsl:param name="promptCanHaveChildren"/>
- <xsl:param name="promptDisabled"/>
- <div class="clsPromptComponent">
- <!-- unique identifier for the control, generate one if not -->
- <xsl:variable name="sPromptId">
- <xsl:choose>
- <xsl:when test="$promptId!=''">
- <xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptId"/></xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate(generate-id(), '.', 'x')"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$CognosViewerID"/>
- </xsl:variable>
- <xsl:variable name="sFormId">
- <xsl:choose>
- <xsl:when test="$promptFormName !=''">"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>"</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="htmlForm">document.forms[<xsl:value-of select="$sFormId"/>]</xsl:variable>
- <xsl:variable name="bRequired">
- <xsl:choose>
- <xsl:when test="$promptRequired !=''">
- <xsl:choose>
- <xsl:when test="translate($promptRequired, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bMultiSelect">
- <xsl:choose>
- <xsl:when test="$promptMultiSelect!=''">
- <xsl:choose>
- <xsl:when test="translate($promptMultiSelect, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bMustChangeDefaultValue">
- <xsl:choose>
- <xsl:when test="$promptMustChangeDefaultValue!=''">
- <xsl:choose>
- <xsl:when test="translate($promptMustChangeDefaultValue, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bHideAdornments">
- <xsl:choose>
- <xsl:when test="$promptHideAdornments!=''">
- <xsl:choose>
- <xsl:when test="translate($promptHideAdornments, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bHideOuterTable">
- <xsl:choose>
- <xsl:when test="$promptHideOuterTable!=''">
- <xsl:choose>
- <xsl:when test="translate($promptHideOuterTable, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bCanHaveChildren">
- <xsl:choose>
- <xsl:when test="$promptCanHaveChildren!=''">
- <xsl:choose>
- <xsl:when test="translate($promptCanHaveChildren, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bDisabled">
- <xsl:choose>
- <xsl:when test="$promptDisabled!=''">
- <xsl:choose>
- <xsl:when test="translate($promptDisabled, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bShowPreviousValues">
- <xsl:choose>
- <xsl:when test="$promptShowPreviousValues!=''">
- <xsl:choose>
- <xsl:when test="translate($promptShowPreviousValues, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')='TRUE'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <script language="javascript" type="text/javascript">
- addHiddenInputHTML(<xsl:value-of select="$sFormId"/>, "p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>", "");
- </script>
- <div id="selectWithTree{$sPromptId}" class="clsPromptComponent"></div>
- <script language="javascript" type="text/javascript">
- var treeSubmit<xsl:value-of select="$sPromptId"/> = <xsl:value-of select="$htmlForm"/>.elements["p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>"];
- var treeDiv = document.getElementById("selectWithTree<xsl:value-of select="$sPromptId"/>");
- var tree<xsl:value-of select="$sPromptId"/> = new CTree (treeDiv, treeSubmit<xsl:value-of select="$sPromptId"/>, <xsl:value-of select="$bRequired"/>, <xsl:value-of select="$bMultiSelect"/>, "tree<xsl:value-of select="$sPromptId"/>", null, null, "<xsl:value-of select="$CognosViewerID"/>","<xsl:value-of select="$promptStyle"/>");
- <xsl:variable name="parentNode">treeroot<xsl:value-of select="$sPromptId"/></xsl:variable>
- var <xsl:value-of select="$parentNode"/> = tree<xsl:value-of select="$sPromptId"/>.getRootNode();
- tree<xsl:value-of select="$sPromptId"/>.setMustChangeDefaultValue(<xsl:value-of select="$bMustChangeDefaultValue"/>);
- tree<xsl:value-of select="$sPromptId"/>.setHideAdornments(<xsl:value-of select="$bHideAdornments"/>);
- tree<xsl:value-of select="$sPromptId"/>.setHideOuterTable(<xsl:value-of select="$bHideOuterTable"/>);
- tree<xsl:value-of select="$sPromptId"/>.setPromptingTree("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template>");
- <xsl:if test="$promptRowsPerPage!=''">
- tree<xsl:value-of select="$sPromptId"/>.setMaxValueCount(<xsl:value-of select="number($promptRowsPerPage)"/>);
- </xsl:if>
- <xsl:if test="$promptShowPreviousValues!=''">
- tree<xsl:value-of select="$sPromptId"/>.setShowPreviousValues(<xsl:value-of select="$bShowPreviousValues"/>);
- </xsl:if>
- <xsl:if test="contains($promptStyle, 'width:')">
- <xsl:variable name="afterStr"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="substring-after($promptStyle, 'width:')"/></xsl:call-template></xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($afterStr, ';')">
- tree<xsl:value-of select="$sPromptId"/>.setContainerWidth("<xsl:value-of select="substring-before($afterStr,';')"/>");
- </xsl:when>
- <xsl:otherwise>
- tree<xsl:value-of select="$sPromptId"/>.setContainerWidth("<xsl:value-of select="$afterStr"/>");
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="contains($promptStyle, 'height:')">
- <xsl:variable name="afterStr"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="substring-after($promptStyle, 'height:')"/></xsl:call-template></xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($afterStr, ';')">
- tree<xsl:value-of select="$sPromptId"/>.setContainerHeight("<xsl:value-of select="substring-before($afterStr,';')"/>");
- </xsl:when>
- <xsl:otherwise>
- tree<xsl:value-of select="$sPromptId"/>.setContainerHeight("<xsl:value-of select="$afterStr"/>");
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:if test="$promptCanHaveChildren!=''">
- tree<xsl:value-of select="$sPromptId"/>.setNodesCanHaveChildren(<xsl:value-of select="$bCanHaveChildren"/>);
- </xsl:if>
- <xsl:if test="$promptDisabled!=''">
- tree<xsl:value-of select="$sPromptId"/>.setDisabled(<xsl:value-of select="$bDisabled"/>);
- </xsl:if>
- if (typeof tntGeneric == "undefined")
- tntGeneric = new CTreeNodeType(TREE_FOLDER, true, PROMPT_SKIN + "/prompting/images/genericTreeNode.gif", PROMPT_SKIN + "/prompting/images/genericTreeNode.gif");
- <xsl:for-each select="selectChoices/selectTreeOption">
- tree<xsl:value-of select="$sPromptId"/>.addToPrevSelArray("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>","<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>");
- </xsl:for-each>
- <xsl:for-each select="selectChoices/selectOption">
- tree<xsl:value-of select="$sPromptId"/>.addToPrevSelArray("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>","<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>");
- </xsl:for-each>
- <xsl:for-each select="selectOptions/selectTreeOption">
- <xsl:call-template name="getSelectTreeOption">
- <xsl:with-param name="selectTreeOption" select="."/>
- <xsl:with-param name="parentNode" select="$parentNode"/>
- </xsl:call-template>
- </xsl:for-each>
- <xsl:if test="number(selectOptions/@skipValueCount) >= 0">
- <xsl:value-of select="$parentNode"/>.setSkipValueCount(<xsl:value-of select="number(selectOptions/@skipValueCount)"/>);
- </xsl:if>
- <xsl:if test="number(selectOptions/@memberDisplayCountDefault) >= 0">
- tree<xsl:value-of select="$sPromptId"/>.setMaxValueCount(<xsl:value-of select="number(selectOptions/@memberDisplayCountDefault)"/>);
- </xsl:if>
- <xsl:if test="$bMultiSelect = 'false'">
- tree<xsl:value-of select="$sPromptId"/>.setRecursiveSelect(false);
- </xsl:if>
- setTimeout("tree<xsl:value-of select="$sPromptId"/>.drawAll();", 100);
- setTimeout("tree<xsl:value-of select="$sPromptId"/>.checkData();", 110);
- <xsl:if test="selectOptions/@moreData='true' and ((number(selectOptions/@skipValueCount) + number(selectOptions/@memberDisplayCountDefault)) < number(selectOptions/@memberDisplayCountLimit))">
- <xsl:value-of select="$parentNode"/>.setMoreData(true);
- var theNodeRef = tree<xsl:value-of select="$sPromptId"/>.getName() + <xsl:value-of select="$parentNode"/>.getTreeRef();
- setTimeout("tree<xsl:value-of select="$sPromptId"/>.drawMoreData(<xsl:value-of select="$parentNode"/>, '" + theNodeRef + "');", 250);
- </xsl:if>
- <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("tree<xsl:value-of select="$sPromptId"/>");
- </script>
- </div>
- </xsl:template>
- <xsl:template name="getSelectTreeOption">
- <xsl:param name="selectTreeOption"/>
- <xsl:param name="parentNode"/>
- <xsl:for-each select="$selectTreeOption">
- <xsl:variable name="nodeName">node<xsl:value-of select="translate(generate-id(), '.', 'x')"/></xsl:variable>
- var <xsl:value-of select="$nodeName"/> = new CTreeNode(<xsl:value-of select="$parentNode"/>, tntGeneric, false, "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@displayValue"/></xsl:call-template>", "<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@useValue"/></xsl:call-template>", false);
- <xsl:if test="./selectTreeOption">
- <xsl:call-template name="getSelectTreeOption">
- <xsl:with-param name="selectTreeOption" select="./selectTreeOption"/>
- <xsl:with-param name="parentNode" select="$nodeName"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Prompt Buttons
- ////////////////////////////////////////////////////////////////////////
- -->
- <!-- Prompt Submit Button -->
- <xsl:template name="getPromptButton">
- <xsl:param name="promptDisplayValue"/>
- <xsl:param name="promptStyle"/>
- <xsl:param name="promptType"/>
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptBackURL"/>
- <xsl:param name="promptClass"/>
- <xsl:param name="promptButtonName"/>
- <xsl:variable name="sPromptId"><xsl:value-of select="$promptType"/><xsl:value-of select="translate(generate-id(), '.', 'x')"/><xsl:value-of select="$CognosViewerID"/></xsl:variable>
- <!-- use the authored text for the label if there is any, otherwise use the default -->
- <xsl:variable name="sLabel">
- <xsl:choose>
- <xsl:when test="$promptDisplayValue != '' ">
- <xsl:value-of select="$promptDisplayValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$promptType != ''">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DON']/string[@id=$promptType]"/>
- </xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="promptTypeEnumeration">
- <xsl:choose>
- <xsl:when test="$promptType='back'">PROMPTBUTTON_BACK</xsl:when>
- <xsl:when test="$promptType='cancel'">PROMPTBUTTON_CANCEL</xsl:when>
- <xsl:when test="$promptType='next' ">PROMPTBUTTON_NEXT</xsl:when>
- <xsl:when test="$promptType='finish'">PROMPTBUTTON_FINISH</xsl:when>
- <xsl:when test="$promptType='reprompt'">PROMPTBUTTON_REPROMPT</xsl:when>
- <xsl:when test="$promptType='OK'">PROMPTBUTTON_OK</xsl:when>
- <xsl:otherwise>PROMPTBUTTON_NEXT</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="bEnabled">
- <xsl:choose>
- <xsl:when test="($promptType='back') and (//PAGE[@canBack='false'])">false</xsl:when>
- <xsl:when test="($promptType='finish') and (//PAGE[@canFinish='false'])">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="sClass">
- <xsl:choose>
- <xsl:when test="$promptClass != ''"><xsl:value-of select="$promptClass"/></xsl:when>
- <xsl:otherwise>clsPromptButton</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="sClassOver">
- <xsl:choose>
- <xsl:when test="$promptClass != ''">this.className = '<xsl:value-of select="$promptClass"/> bph'</xsl:when>
- <xsl:otherwise>this.className = 'clsPromptButtonOver'</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="sClassOut">
- <xsl:choose>
- <xsl:when test="$promptClass != ''">this.className = '<xsl:value-of select="$promptClass"/>'</xsl:when>
- <xsl:otherwise>this.className = 'clsPromptButton'</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="clsPromptComponent" pt="btn">
- <button type="button" name="{$sPromptId}" id="{$sPromptId}" class="{$sClass}" onmouseover="{$sClassOver}" onmouseout="{$sClassOut}">
- <xsl:if test="$promptButtonName != ''">
- <xsl:attribute name="layoutName">
- <xsl:value-of select="$promptButtonName"/><xsl:value-of select="$CognosViewerID"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:attribute name="onclick">
- <xsl:value-of select="$CVObject"/>promptAction('<xsl:value-of select="$promptType"/>'<xsl:text/>
- <xsl:if test="$promptType='cancel' and not($promptBackURL='')">
- <xsl:text>,'</xsl:text>
- <xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptBackURL"/></xsl:call-template>
- <xsl:text>'</xsl:text>
- </xsl:if>
- <xsl:text>)</xsl:text>
- </xsl:attribute>
- <xsl:attribute name="style">
- <xsl:if test="not(*) and string-length(normalize-space($sLabel))<4">padding-left:10px;padding-right:10px;</xsl:if>
- <xsl:value-of select="$promptStyle"/>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="*"><xsl:apply-templates select="*"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$sLabel"/></xsl:otherwise>
- </xsl:choose>
- </button>
- </div>
- <script language="javascript" type="text/javascript">
- var promptButton<xsl:value-of select="$sPromptId"/> = new CPromptButton (document.getElementById("<xsl:value-of select="$sPromptId"/>"), <xsl:value-of select="$promptTypeEnumeration"/>, <xsl:value-of select="$bEnabled"/>, "<xsl:value-of select="$CognosViewerID"/>");
- <xsl:value-of select="$CVObject"/>pageNavigationObserverArray = <xsl:value-of select="$CVObject"/>pageNavigationObserverArray.concat("promptButton<xsl:value-of select="$sPromptId"/>");
- <xsl:value-of select="$CVObject"/>notify();
- </script>
- </xsl:template>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Default Prompt Page Generation
- ////////////////////////////////////////////////////////////////////////
- The following templates are used to create default prompt pages (in the case where a prompt page has not been authored)
- -->
- <!-- Default Prompt Page Header -->
- <xsl:template name="getDefaultPromptHeader">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptPageTitle"/>
- <xsl:param name="promptBackURL"/>
- <xsl:variable name="action">
- <xsl:value-of select="$CVObject"/>promptAction(K_ACTION_CANCEL,'<xsl:text/>
- <xsl:if test="not($promptBackURL='')"><xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptBackURL"/></xsl:call-template></xsl:if>
- <xsl:text>')</xsl:text>
- </xsl:variable>
- <xsl:call-template name="PromptJavascriptFiles"/>
- <script language="javascript" src="{$webcontentRootURI}/prompting/res/promptLocale_{substring($promptLocale,0,6)}.js" type="text/javascript">/**/</script>
- <!-- determine the appropriate page title-->
- <xsl:variable name="faultcode" select="//PAGE/@faultcode"/>
- <xsl:variable name="dialogTitle">
- <xsl:choose>
- <xsl:when test="$faultcode = 'CQE-801'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TITLE']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-802'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_SIGNON_TITLE']"/></xsl:when>
- <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and @faultSubcode='1']"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_ENTER_SIGNON_TITLE']"/></xsl:when>
- <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1')]"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_LOGON_FAILED_TITLE']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-804'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_CONNECTION_NOT_FOUND_TITLE']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-805'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SIGNON_NOT_FOUND_TITLE']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-806'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_SOURCE_NOT_FOUND_TITLE']"/></xsl:when>
- <xsl:otherwise>
- <xsl:if test="$promptPageTitle!=''"><xsl:value-of select="$promptPageTitle"/> - </xsl:if>
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='promptTitle']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="dialogTip">
- <xsl:choose>
- <xsl:when test="$faultcode = 'CQE-801'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TIP']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-802'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_SIGNON_TIP']"/></xsl:when>
- <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and (@faultSubcode='1' or @faultSubcode='6')]"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_LOGON_FAILED_TIP']"/></xsl:when>
- <xsl:when test="//selectDataSourceSignon[@faultcode='CQE-803' and not(@faultSubcode='1' or @faultSubcode='6')]"><xsl:value-of select="//PAGE/@faultstring"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-804'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_CONNECTION_NOT_FOUND_TIP']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-805'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SIGNON_NOT_FOUND_TIP']"/></xsl:when>
- <xsl:when test="$faultcode = 'CQE-806'"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_SOURCE_NOT_FOUND_TIP']"/></xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='hintText']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:call-template name="renderDialogHeader">
- <xsl:with-param name="action" select="$action"/>
- <xsl:with-param name="faultcode" select="$faultcode"/>
- <xsl:with-param name="dialogTitle" select="$dialogTitle"/>
- <xsl:with-param name="dialogTip" select="$dialogTip"/>
- </xsl:call-template>
- <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" height="10">
- <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- </tr>
- </table>
- <xsl:if test="//PAGE[@generateRepromptButton='true']">
- <TABLE role="presentation" cellpadding="1" cellspacing="0" border="0">
- <TR>
- <TD height="20" width="1"><img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <TD><TABLE role="presentation" cellpadding="1" cellspacing="0" border="0">
- <TR>
- <TD><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DON']/string[@id='reprompt']"/></xsl:with-param>
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'reprompt'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL"/>
- </xsl:call-template></TD>
- <TD nowrap="nowrap" class="formText"><IMG height="30" width="30" src="{$skin_folder}/prompting/images/tip_template.gif"/></TD>
- <TD nowrap="nowrap" class="formText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='repromptHintText']"/></TD>
- </TR>
- </TABLE></TD>
- </TR>
- <TR>
- <TD colspan="2" height="10"><img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- </TR>
- </TABLE>
- </xsl:if>
- </xsl:template>
- <xsl:template name="renderDialogHeader">
- <xsl:param name="action"/>
- <xsl:param name="faultcode"/>
- <xsl:param name="dialogTitle"/>
- <xsl:param name="dialogTip"/>
- <table width="100%" height="21" cellspacing="0" cellpadding="0" border="0" class="dialogHeader" role="presentation">
- <tr>
- <td valign="top" class="dialogHeaderTitle" width="100%" tabindex="0" nowrap="nowrap">
- <xsl:value-of select="$dialogTitle"/>
- </td>
- <td align="right" valign="middle" style="padding-right:3px;">
- <xsl:choose>
- <xsl:when test="$action!=''">
- <a onmouseover="window.status='';return true;" onmouseout="window.status='';return true;" href="#" onclick="{$action}">
- <img height="14" width="14" vspace="2" border="0" class="dialogClose" onmouseover="this.className = 'dialogCloseOver'" onmouseout="this.className = 'dialogClose'" src="{$skin_folder}/prompting/images/close_16.svg" role="button">
- <xsl:attribute name="title"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:attribute>
- </img>
- </a>
- </xsl:when>
- <xsl:otherwise><img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </table>
- <table border="0" width="100%" cellspacing="0" cellpadding="0" style="padding-left:5px;margin-top:10px;" role="presentation">
- <tr>
- <td class="dialogHeaderText" tabindex="0" align="left">
- <xsl:value-of select="$dialogTip"/>
- </td>
- </tr>
- <xsl:if test="not (//selectDataSourceSignon[@faultcode='CQE-803' and (@faultSubcode!='1' or @faultSubcode='6')]) and not($faultcode = 'CQE-804') and not($faultcode = 'CQE-805') and not($faultcode = 'CQE-806')">
- <tr>
- <td class="dialogHeaderText" align="left">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td height="20" width="1">
- <img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- <td height="20" valign="middle">
- <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- <img alt="" src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="bottom" height="10" width="10" border="0"/>
- <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- <span class="clsDialogIntroduction">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='requiredText']"/>
- </span>
- </td>
- </tr>
- <tr>
- <td height="20" width="1">
- <img alt="" height="10" width="1" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- <td height="20" valign="middle">
- <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- <img alt="" src="{$skin_folder}/prompting/images/error_timed_on.gif" class="clsErrorRequired" align="bottom" height="10" width="10" border="0"/>
- <img alt="" height="10" width="4" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- <span class="clsDialogIntroduction">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='validationText']"/>
- </span>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:template>
-
-
- <!-- ********* Default Prompt Page Control ********* -->
- <xsl:template name="getDefaultPromptControl">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptType"/>
- <xsl:param name="promptCalculationName"/>
- <xsl:param name="promptExpression"/>
- <xsl:param name="promptOperator"/>
- <xsl:param name="promptDataType"/>
- <xsl:param name="promptColumnName"/>
- <xsl:variable name="promptControl" select="./descendant::selectValue|./descendant::textBox|./descendant::textBox|./descendant::selectInterval|./descendant::selectDate|./descendant::selectDateTime|./descendant::selectTime|./descendant::selectWithTree|./descendant::selectWithSearch"/>
- <xsl:choose>
- <xsl:when test="$promptType='calculation'">
- <table width="100%" role="presentation">
- <tr>
- <td class="clsFormLabel" nowrap="nowrap">
- <xsl:value-of select="$promptCalculationName"/>
- </td>
- <td width="100%">
- <hr size="1"/>
- </td>
- </tr>
- </table>
- <table role="presentation">
- <tr>
- <td class="clsFormLabel">
- <xsl:value-of select="$promptExpression"/>:</td>
- </tr>
- </table>
- <xsl:apply-templates select="*"/>
- <table border="0" height="11" cellpadding="0" cellspacing="0" width="100%" role="presentation">
- <tr>
- <td colspan="2" height="10">
- <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="operator">
- <xsl:value-of select="$promptOperator"/>
- </xsl:variable>
- <xsl:variable name="dataType">
- <xsl:value-of select="$promptDataType"/>
- </xsl:variable>
- <xsl:variable name="sLabelId">
- <xsl:value-of select="concat('PRMT_LBL_', translate(generate-id($promptControl[1]), '.', 'x'), $CognosViewerID)"/>
- </xsl:variable>
- <table width="100%" role="presentation">
- <tr>
- <td class="clsFormLabel" nowrap="nowrap">
- <label id="{$sLabelId}"><xsl:value-of select="$promptColumnName"/></label>
- </td>
- <td width="100%">
- <!--<hr size="1"/>-->
- </td>
- </tr>
- </table>
- <table role="presentation">
- <tr>
- <td class="clsFormLabel">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id=$dataType]"/>
- <xsl:text> </xsl:text></td>
- </tr>
- </table>
- <xsl:apply-templates select="*"/>
- <table border="0" height="11" cellpadding="0" cellspacing="0" width="100%" role="presentation">
- <tr>
- <td colspan="2" height="10">
- <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- ********* Default Prompt Page Cascading Prompt Container ********* -->
- <xsl:template name="getDefaultCascadingPrompt">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptColumnName"/>
- <xsl:variable name="promptControl" select="./descendant::selectValue"/>
- <xsl:variable name="sLabelId">
- <xsl:value-of select="concat('PRMT_LBL_', translate(generate-id($promptControl[1]), '.', 'x'), $CognosViewerID)"/>
- </xsl:variable>
- <table role="presentation" width="100%">
- <tr>
- <td class="clsFormLabel">
- <!-- xsl:value-of select="$promptColumnName"/ -->
- <label id="{$sLabelId}"><xsl:value-of select="$promptColumnName"/></label>
- </td>
- <td width="100%"></td>
- </tr>
- </table>
- <xsl:apply-templates select="*"/>
- <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" height="10">
- <img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/>
- </td>
- </tr>
- </table>
- </xsl:template>
- <!-- ********* Default Prompt Page Cascading Prompt Control ********* -->
- <xsl:template name="getDefaultCascadingPromptControl">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptColumnName"/>
- <xsl:param name="promptOperator"/>
- <xsl:variable name="operator">
- <xsl:value-of select="$promptOperator"/>
- </xsl:variable>
- <table role="presentation">
- <tr>
- <td class="clsFormLabel">
- <xsl:value-of select="$promptColumnName"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id=$operator]"/>
- </td>
- </tr>
- </table>
- <xsl:apply-templates select="*"/>
- <table role="presentation" border="0" height="11" cellpadding="0" cellspacing="0" width="100%">
- <tr>
- <td colspan="2" height="10"><img alt="" height="10" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- </table>
- </xsl:template>
- <!-- ********* Default Prompt Page Footer ********* -->
- <xsl:template name="getDefaultPromptFooter">
- <xsl:param name="promptLocale"/>
- <xsl:param name="promptBackURL"/>
- <xsl:param name="promptClass"/>
- <!-- determine the appropriate page title-->
- <xsl:variable name="buttonType"><xsl:call-template name="getButtonType"/></xsl:variable>
- <table border="0" cellpadding="1" cellspacing="0" class="fp" role="presentation">
- <tr>
- <td valign="middle">
- <xsl:choose>
- <xsl:when test="$buttonType='CLOSE'">
- <table role="presentation" cellpadding="0" cellspacing="0" class="commandButton" onmouseover="this.className = 'commandButtonOver'" onmouseout="this.className = 'commandButton'" onmousedown="this.className = 'commandButtonDown'">
- <tr>
- <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonClose']"/></xsl:with-param>
- <xsl:with-param name="promptStyle"/>
- <xsl:with-param name="promptType" select="'cancel'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- </tr>
- </table>
- </xsl:when>
- <xsl:when test="$buttonType='WIZARD'">
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'cancel'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'back'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'next'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'finish'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="OKpromptType"><xsl:call-template name="getOKButtonPromptType"/></xsl:variable>
- <table border="0" cellpadding="0" cellspacing="0" role="presentation">
- <tr>
- <td width="5" height="1"><img alt="" height="1" width="5" border="0" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonOK']"/></xsl:with-param>
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="$OKpromptType"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- <td><xsl:call-template name="getPromptButton">
- <xsl:with-param name="promptDisplayValue"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='DFP']/string[@id='buttonCancel']"/></xsl:with-param>
- <xsl:with-param name="promptStyle" />
- <xsl:with-param name="promptType" select="'cancel'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptBackURL" select="$promptBackURL"/>
- <xsl:with-param name="promptClass" select="$promptClass"/>
- </xsl:call-template></td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td width="100%"> </td>
- </tr>
- </table>
- </xsl:template>
- <!--
- ////////////////////////////////////////////////////////////////////////
- // Data Source Signon Template
- ///////////////////////////////////////////////////////////////////////
- <selectDataSourceSignon parameter="credential:gosales" dataSourceName="gosales" faultcode="CQE-801" faultstring="QE-DEF-0283 Ambiguous connection" faultConnectionName="gosales" faultConnectionSearchPath="/content/.." faultSignonName="" faultSignonSearchPath="">
- <connection name="gosales" searchPath="/content/..." selected="false">
- <signon name="a1" searchPath="/content/..." selected="false"/>
- <signon name="a2" searchPath="/content/..." selected="false"/>
- </connection>
- </selectDataSourceSignon>
- Fault codes:
- CQE-801: ambiguous connection
- CQE-802: ambiguous signon
- CQE-803: logon failure
- Fault subcodes:
- 1 - Missing or invalid userId/password.
- 2 - Invalid connection string.
- 3 - Invalid DSN(ODBC)/ServiceName, missing DSN, or host not accessible.
- 4 - Unknown cause of logon failure.
- 6 - Wrong password for a protected cube (password only, no login name).
- -->
- <xsl:template name="getSelectDataSourceSignon">
- <xsl:param name="promptLocale" />
- <xsl:param name="promptParameter" />
- <xsl:param name="promptConnectionName" />
- <xsl:param name="promptSearchPath" />
- <xsl:param name="promptFaultCode" />
- <xsl:variable name="sPromptId"><xsl:value-of select="translate(generate-id(), '.', 'x')"/><xsl:value-of select="$CognosViewerID"/></xsl:variable>
- <xsl:variable name="sFormId">
- <xsl:choose>
- <xsl:when test="$promptFormName !=''">"<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="concat($promptFormName, $CognosViewerID)"/></xsl:call-template>"</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="htmlForm">document.forms[<xsl:value-of select="$sFormId"/>]</xsl:variable>
- <xsl:variable name="submitElementName">p_<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="$promptParameter"/></xsl:call-template></xsl:variable>
- <!--- Needed to pass to CSelectDataSourceSignon to ensure enterkeypress does the same thing as the Pages default OK Button onClick -->
- <xsl:variable name="okButtonPromptTypeIsNext"><xsl:call-template name="isOKButtonPromptTypeNext"/></xsl:variable>
- <script language="javascript" type="text/javascript">
- addHiddenInputHTML(<xsl:value-of select="$sFormId"/>, "<xsl:value-of select="$submitElementName"/>", "");
- // <xsl:value-of select="@faultcode"/>
- </script>
-
- <!-- determine the type of fault -->
- <xsl:choose>
- <xsl:when test="@faultcode='CQE-801'">
- <!-- Add the dialog header when is not a prompt header -->
- <xsl:if test="@defaultPromptHeader!='true'">
- <xsl:variable name="dialogTitle">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TITLE']"/>
- </xsl:variable>
- <xsl:variable name="dialogTip">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_SELECT_CONNECTION_TIP']"/>
- </xsl:variable>
- <!-- add default css file -->
- <xsl:variable name="theSkin">
- <xsl:choose>
- <xsl:when test="$skin!='true'">
- <xsl:value-of select="$skin"/>
- </xsl:when>
- <xsl:otherwise>corporate</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <link href="{$webcontentRootURI}/skins/{$theSkin}/portal/default.css" type="text/css" rel="stylesheet"/>
- <link href="{$webcontentRootURI}/schemas/GlobalReportStyles.css" type="text/css" rel="stylesheet"/>
- <table class="pp" style="height:auto;" role="presentation"><tbody><tr><td>
- <xsl:call-template name="renderDialogHeader">
- <xsl:with-param name="action" select="''"/>
- <xsl:with-param name="faultcode" select="$promptFaultCode"/>
- <xsl:with-param name="dialogTitle" select="$dialogTitle"/>
- <xsl:with-param name="dialogTip" select="$dialogTip"/>
- </xsl:call-template>
- </td></tr></tbody></table>
- </xsl:if>
-
- <input type="hidden" name="oDataSourceConnection{$sPromptId}" value=""/>
- <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
- <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="true"/>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
- </tr>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTIONS']"/></td>
- </tr>
- </table>
- <TABLE width="100%" cellspacing="0" cellpadding="1" border="0" role="presentation">
- <TR>
- <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
- <td width="10" valign="top">
- <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="10" height="20">
- <tr><td>
- <img src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="top" height="10" width="10" border="0"/>
- </td></tr>
- <tr><td>
- <img id="imgTest{$sPromptId}" name="imgTest{$sPromptId}" class="clsErrorRequired" src="{$skin_folder}/prompting/images/error_timed_small_off.gif" align="bottom" height="10" width="10" border="0"/>
- </td></tr>
- </table>
- </td>
- <TD colspan="2" width="100%" valign="top" rowspan="2"><TABLE role="presentation" cellspacing="0" cellpadding="2" border="0" width="100%" class="clsTableOutlineIE">
- <TR class="clsTableHeader">
- <TD class="clsTableTitle" valign="center" height="10" width="16" nowrap="nowrap"><xsl:text> </xsl:text></TD>
- <TD width="1" height="15">
- <TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
- <TR>
- <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- </TR>
- </TABLE>
- </TD>
- <TD class="clsTableTitle" valign="center" height="10" width="20" nowrap="nowrap"><xsl:text> </xsl:text></TD>
- <TD width="1" height="15"><TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
- <TR>
- <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- </TR>
- </TABLE></TD>
- <TD class="clsTableTitle" valign="center" height="10" width="50%" nowrap="nowrap"><TABLE role="presentation" cellspacing="0" cellpadding="0" border="0">
- <TR>
- <TD valign="top" class="clsTableTitle" nowrap="nowrap"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTION_NAME']"/></TD>
- </TR>
- </TABLE></TD>
- </TR>
- <xsl:for-each select="connection">
- <xsl:variable name="attr_name" select="@name[last()]"/>
- <xsl:variable name="attr_selected" select="@selected[last()]"/>
- <xsl:variable name="attr_searchPath" select="@searchPath[last()]"/>
- <TR>
- <TD class="clsTableText" height="10" nowrap="nowrap">
- <INPUT type="radio" value="{$attr_searchPath}" name="frmcon{$sPromptId}">
- <xsl:if test="$attr_selected='true'"><xsl:attribute name="checked"/></xsl:if>
- <xsl:attribute name="onclick">selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceConnection(this.value);selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.checkData()</xsl:attribute>
- </INPUT>
- </TD>
- <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <TD class="clsTableText" height="10" nowrap="nowrap"><IMG width="16" height="16" alt="" src="{$skin_folder}/prompting/images/icon_data_source_connection.gif"/></TD>
- <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <TD class="clsTableText" height="10" width="100%" nowrap="nowrap"><xsl:value-of select="$attr_name"/></TD>
- </TR>
- </xsl:for-each>
- </TABLE></TD>
- <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
- </TR>
- </TABLE>
- <script language="javascript" type="text/javascript">
- var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], null, null,<xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', <xsl:value-of select="$htmlForm"/>.elements["frmcon<xsl:value-of select="$sPromptId"/>"], document.getElementById("imgTest<xsl:value-of select="$sPromptId"/>"), null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
- <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
- <xsl:for-each select="connection">
- <xsl:if test="@selected='true'">
- selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceConnection("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@searchPath"/></xsl:call-template>");
- </xsl:if>
- </xsl:for-each>
- </script>
- </xsl:when>
- <xsl:when test="@faultcode='CQE-802'">
- <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
- <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
- <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="true"/>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
- </tr>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_CONNECTION']"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><xsl:value-of select="@faultConnectionName"/></td>
- </tr>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='RADIO_SELECT_SIGNON']"/></td>
- </tr>
- </table>
- <TABLE role="presentation" width="100%" cellspacing="0" cellpadding="1" border="0">
- <TR>
- <TD width="10" valign="top"><IMG width="10" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <td width="10" valign="top">
- <table role="presentation" cellpadding="0" cellspacing="0" border="0" width="10" height="20">
- <tr><td>
- <img src="{$skin_folder}/prompting/images/icon_required.gif" class="clsErrorRequired" align="top" height="10" width="10" border="0"/>
- </td></tr>
- <tr><td>
- <img id="imgTest{$sPromptId}" name="imgTest{$sPromptId}" class="clsErrorRequired" src="{$skin_folder}/prompting/images/error_timed_small_off.gif" align="bottom" height="10" width="10" border="0"/>
- </td></tr>
- </table>
- </td>
- <TD colspan="2" width="100%" valign="top" rowspan="2"><TABLE role="presentation" cellspacing="0" cellpadding="2" border="0" width="100%" class="clsTableOutlineIE">
- <TR class="clsTableHeader">
- <TD class="clsTableTitle" valign="center" height="10" width="16" nowrap="nowrap"><xsl:text> </xsl:text></TD>
- <TD width="1" height="15">
- <TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
- <TR>
- <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- </TR>
- </TABLE>
- </TD>
- <TD class="clsTableTitle" valign="center" height="10" width="20" nowrap="nowrap"><xsl:text> </xsl:text></TD>
- <TD width="1" height="15"><TABLE role="presentation" border="0" cellspacing="0" cellpadding="0">
- <TR>
- <TD class="clsTableOutline3"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- </TR>
- </TABLE></TD>
- <TD class="clsTableTitle" valign="center" height="10" width="50%" nowrap="nowrap"><TABLE role="presentation" cellspacing="0" cellpadding="0" border="0">
- <TR>
- <TD valign="top" class="clsTableTitle" nowrap="nowrap"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_SIGNON_NAME']"/></TD>
- </TR>
- </TABLE></TD>
- </TR>
- <xsl:for-each select="connection/signon[ancestor::connection/@searchPath = ancestor::selectDataSourceSignon/@faultConnectionSearchPath]">
- <xsl:variable name="attr_name" select="@name[last()]"/>
- <xsl:variable name="attr_searchPath" select="@searchPath[last()]"/>
- <xsl:variable name="attr_selected" select="@selected[last()]"/>
- <TR>
- <TD class="clsTableText" height="10" nowrap="nowrap">
- <INPUT type="radio" value="{$attr_searchPath}" name="frmsig{$sPromptId}">
- <xsl:if test="$attr_selected='true'"><xsl:attribute name="checked"/></xsl:if>
- <xsl:attribute name="onclick">selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceSignon(this.value);selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.checkData();</xsl:attribute>
- </INPUT>
- </TD>
- <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <TD class="clsTableText" height="10" nowrap="nowrap"><IMG width="16" height="16" alt="" src="{$skin_folder}/prompting/images/icon_signon.gif"/></TD>
- <TD width="1" height="15"><IMG width="1" height="15" src="{$skin_folder}/prompting/images/spacer.gif"/></TD>
- <TD class="clsTableText" height="10" width="100%" nowrap="nowrap"><xsl:value-of select="$attr_name"/></TD>
- </TR>
- </xsl:for-each>
- </TABLE></TD>
- <TD width="1" valign="top"><BR/><IMG width="1" height="4" src="{$skin_folder}/prompting/images/spacer.gif"/><BR/></TD>
- </TR>
- </TABLE>
- <script language="javascript" type="text/javascript">
- var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], null, null, <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', <xsl:value-of select="$htmlForm"/>.elements["frmsig<xsl:value-of select="$sPromptId"/>"], document.getElementById("imgTest<xsl:value-of select="$sPromptId"/>"), null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
- <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
- <xsl:for-each select="connection/signon[ancestor::connection/@searchPath = ancestor::selectDataSourceSignon/@faultConnectionSearchPath]">
- <xsl:if test="@selected='true'">
- selectDataSourceSignon<xsl:value-of select="$sPromptId"/>.setDataSourceSignon("<xsl:call-template name="convertQuotes"><xsl:with-param name="str" select="@searchPath"/></xsl:call-template>");
- </xsl:if>
- </xsl:for-each>
- </script>
- </xsl:when>
- <xsl:when test="@faultcode='CQE-803' and (@faultSubcode='1' or @faultSubcode='6')">
- <xsl:if test="number(@logonFailureCount) > 2">
- <table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td height="1" valign="top" width="5"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION']"/></td>
- </tr>
- </table>
- </xsl:if>
- <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
- <input type="hidden" name="oDataSourceSignon{$sPromptId}" value=""/>
- <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="false"/>
- <table cellpadding="0" cellspacing="0" border="0" role="presentation">
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_DATA_SOURCE']"/></td>
- </tr>
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><xsl:value-of select="@dataSourceName"/></td>
- </tr>
- </table>
- <table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td height="1" valign="top" width="10"><IMG width="10" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td><table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr><td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
- <xsl:if test="@faultSubcode!='6'">
- <tr><td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_USER_ID']"/></td></tr>
- <tr><td class="clsFormLabel"><input type="text" name="oUsername{$sPromptId}" value="" size="30"/></td></tr>
- <tr><td height="5"><IMG width="1" height="5" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
- </xsl:if>
- <tr><td class="clsFormLabel"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_PASSWORD']"/></td></tr>
- <tr><td class="clsFormLabel">
- <input type="password" autocomplete="off" name="o{$sPromptId}Password" value="" size="30"/>
- <xsl:if test="@faultSubcode='6'">
- <input type="hidden" name="oUsername{$sPromptId}" value=""/>
- </xsl:if>
- </td></tr>
- <xsl:if test="@persistPrompt and @persistPrompt='true'">
- <tr><td class="clsReadOnlyText" style="white-space: nowrap;">
- <input type="checkbox" id="oPersist{$sPromptId}" name="oPersist{$sPromptId}" />
- <label for="oPersist{$sPromptId}">
- <xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='LBL_PERSIST']"/>
- </label>
- <input type="hidden" id="oConnectionName{$sPromptId}" name="oConnectionName{$sPromptId}" value="{@faultConnectionName}"/>
- </td></tr>
- </xsl:if>
- <tr><td height="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td></tr>
- </table></td>
- </tr>
- </table>
- <script language="javascript" type="text/javascript">
- var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(<xsl:value-of select="$htmlForm"/>.elements["oDataSourceConnection<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oDataSourceSignon<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUsername<xsl:value-of select="$sPromptId"/>"], <xsl:value-of select="$htmlForm"/>.elements["o<xsl:value-of select="$sPromptId"/>Password"], <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', null, null, <xsl:choose><xsl:when test="@faultSubcode='6'">true</xsl:when><xsl:otherwise>null</xsl:otherwise></xsl:choose>, "<xsl:value-of select="$CognosViewerID"/>", "<xsl:value-of select="$sPromptId"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
- <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
- </script>
- </xsl:when>
- <xsl:when test="@faultcode='CQE-803' and (@faultSubcode='2' or @faultSubcode='3' or @faultSubcode='4' or @faultSubcode='5' or @faultSubcode='99')">
- <table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td width="5" valign="top"><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td class="clsReadOnlyText"><table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td rowspan="3" valign="top"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif" align="top"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif" align="top"/></td>
- <td class="clsReadOnlyText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION_PROBLEM']"/></td>
- </tr>
- <tr>
- <td class="clsReadOnlyText"><xsl:value-of select="@faultSubstring"/></td>
- </tr>
- <tr>
- <td class="clsReadOnlyText"><xsl:value-of select="$ClientPromptingStrings/stringTable/component[@name='PMT']/section[@name='CON']/string[@id='DLG_DATA_ERROR_TEST_CONNECTION_TRY_AGAIN']"/></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td colspan="2"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <input type="hidden" name="oDataSourceConnection{$sPromptId}" value="{@faultConnectionSearchPath}"/>
- <input type="hidden" name="oDataSourceSignon{$sPromptId}" value="{@faultSignonSearchPath}"/>
- <input type="hidden" name="oUseSignonDefault{$sPromptId}" value="false"/>
- <input type="hidden" name="oUsername{$sPromptId}" value=""/>
- <input type="hidden" name="o{$sPromptId}Password" value=""/>
- <table role="presentation" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- <tr>
- <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td valign="top" class="clsReadOnlyText"><img alt="" height="13" width="13" border="0" src="{$skin_folder}/prompting/images/icon_critical.gif"/><IMG width="5" height="1" src="{$skin_folder}/prompting/images/spacer.gif"/>
- <xsl:value-of select="@faultstring"/></td>
- </tr>
- <tr>
- <td height="10" valign="top" width="10"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- <td height="10" valign="top"><IMG width="1" height="10" src="{$skin_folder}/prompting/images/spacer.gif"/></td>
- </tr>
- </table>
- <script language="javascript" type="text/javascript">
- var selectDataSourceSignon<xsl:value-of select="$sPromptId"/> = new CSelectDataSourceSignon(null, null, null, null, <xsl:value-of select="$htmlForm"/>.elements["<xsl:value-of select="$submitElementName"/>"], <xsl:value-of select="$htmlForm"/>.elements["oUseSignonDefault<xsl:value-of select="$sPromptId"/>"], '<xsl:call-template name="convertLTGT"><xsl:with-param name="encodeApos" select="true()"/><xsl:with-param name="str" select="$promptSubmitType"/></xsl:call-template>', null, null, null, "<xsl:value-of select="$CognosViewerID"/>", <xsl:value-of select="$okButtonPromptTypeIsNext"/>);
- <xsl:value-of select="$CVObject"/>preProcessControlArray = <xsl:value-of select="$CVObject"/>preProcessControlArray.concat("selectDataSourceSignon<xsl:value-of select="$sPromptId"/>");
- </script>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="stringProp">
- <xsl:param name="name"/>
- <xsl:param name="value"/>
- <xsl:param name="isMore" select="true()"/>
- <xsl:value-of select="$name"/>
- <xsl:text>:"</xsl:text>
- <xsl:call-template name="convertQuotes">
- <xsl:with-param name="str" select="$value"/>
- </xsl:call-template>
- <xsl:text>"</xsl:text>
- <xsl:if test="$isMore">
- <xsl:text>,</xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template name="boolProp">
- <xsl:param name="name"/>
- <xsl:param name="value"/>
- <xsl:param name="default" select="'false'"/>
- <xsl:variable name="valueLowerCase" select="translate($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
- <xsl:value-of select="$name"/>:<xsl:choose>
- <xsl:when test="$valueLowerCase='true'">true</xsl:when>
- <xsl:when test="$valueLowerCase='false'">false</xsl:when>
- <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
- </xsl:choose>
- <xsl:text>,</xsl:text>
- </xsl:template>
- </xsl:stylesheet>
|