viewer.rs.core.js 503 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2014
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. function CViewerHelper(){
  13. this.m_oCV=null;
  14. };
  15. CViewerHelper.prototype.getCVObjectRef=function(){
  16. return this.getCV().getObjectId();
  17. };
  18. CViewerHelper.prototype.getCV=function(){
  19. if(this.m_oCV){
  20. return this.m_oCV;
  21. }
  22. return window;
  23. };
  24. CViewerHelper.prototype.getCVId=function(){
  25. var _1="";
  26. if(this.m_oCV){
  27. _1=this.m_oCV.getId();
  28. }
  29. return _1;
  30. };
  31. CViewerHelper.prototype.setCV=function(_2){
  32. this.m_oCV=_2;
  33. };
  34. function CObserver(_3){
  35. this.m_subject=_3;
  36. this.m_observers=[];
  37. };
  38. function CObserver_attach(_4,_5,_6){
  39. if(_4==null||typeof _4.update!="function"){
  40. alert("Notification Frame Work Error : attach failed");
  41. return false;
  42. }
  43. var _7=new CState(this.m_subject,_4,_5?_5:null,_6?_6:null);
  44. this.m_observers[this.m_observers.length]=_7;
  45. return true;
  46. };
  47. function CObserver_detach(_8){
  48. };
  49. function CObserver_hasObserver(_9){
  50. var _a=false;
  51. for(var _b=0;_b<this.m_observers.length;_b++){
  52. if(this.m_observers[_b].getObserver()==_9){
  53. _a=true;
  54. break;
  55. }
  56. }
  57. return _a;
  58. };
  59. function CObserver_notify(_c){
  60. var i=0;
  61. if(typeof _c!="undefined"&&_c!=null){
  62. for(i=0;i<this.m_observers.length;++i){
  63. if(this.m_observers[i].getEvt()==_c){
  64. var _e=this.m_observers[i].getObserver();
  65. var _f=this.m_observers[i].getCallback();
  66. var _10=_e.update;
  67. _e.update=_f;
  68. _e.update(this.m_observers[i]);
  69. _e.update=_10;
  70. }
  71. }
  72. }else{
  73. for(i=0;i<this.m_observers.length;++i){
  74. this.m_observers[i].getObserver().update(this.m_observers[i].getSubject());
  75. }
  76. }
  77. };
  78. CObserver.prototype.attach=CObserver_attach;
  79. CObserver.prototype.detach=CObserver_detach;
  80. CObserver.prototype.notify=CObserver_notify;
  81. CObserver.prototype.hasObserver=CObserver_hasObserver;
  82. function CState(_11,_12,_13,evt){
  83. this.m_subject=_11;
  84. this.m_observer=_12;
  85. this.m_callback=_13;
  86. this.m_evt=evt;
  87. };
  88. function CState_getObserver(){
  89. return this.m_observer;
  90. };
  91. function CState_getCallback(){
  92. return this.m_callback;
  93. };
  94. function CState_getSubject(){
  95. return this.m_subject;
  96. };
  97. function CState_getEvt(){
  98. return this.m_evt;
  99. };
  100. CState.prototype.getObserver=CState_getObserver;
  101. CState.prototype.getCallback=CState_getCallback;
  102. CState.prototype.getSubject=CState_getSubject;
  103. CState.prototype.getEvt=CState_getEvt;
  104. function CParameterValueStringOperators(_15,_16,_17,_18){
  105. this.m_sBetween=_15;
  106. this.m_sNotBetween=_16;
  107. this.m_sLessThan=_17;
  108. this.m_sGreaterThan=_18;
  109. };
  110. function CParameterValues(){
  111. this.m_parameterValues=new CDictionary();
  112. };
  113. CParameterValues.prototype.length=function(){
  114. var _19=this.m_parameterValues.keys();
  115. if(typeof _19=="undefined"||_19==null){
  116. return 0;
  117. }
  118. return _19.length;
  119. };
  120. CParameterValues.prototype.getParameterValue=function(_1a){
  121. if(typeof _1a!="string"||_1a==""){
  122. return null;
  123. }
  124. if(this.m_parameterValues.exists(_1a)){
  125. return this.m_parameterValues.get(_1a);
  126. }
  127. return null;
  128. };
  129. CParameterValues.prototype.getAt=function(_1b){
  130. if(_1b<this.length()){
  131. var _1c=this.m_parameterValues.keys();
  132. if(this.m_parameterValues.exists(_1c[_1b])){
  133. return this.m_parameterValues.get(_1c[_1b]);
  134. }
  135. }
  136. return null;
  137. };
  138. CParameterValues.prototype.addParameterValue=function(_1d,_1e){
  139. var _1f=this.getParameterValue(_1d);
  140. if(_1f==null){
  141. _1f=new CParameterValue();
  142. _1f.setName(_1d);
  143. }
  144. _1f.addParmValueItem(_1e);
  145. this.m_parameterValues.add(_1d,_1f);
  146. };
  147. CParameterValues.prototype.removeParameterValue=function(_20){
  148. return (this.m_parameterValues.remove(_20)!=null);
  149. };
  150. CParameterValues.prototype.removeSimpleParmValueItem=function(_21,_22){
  151. var _23=this.getParameterValue(_21);
  152. if(_23==null){
  153. return false;
  154. }
  155. return _23.removeSimpleParmValueItem(_22);
  156. };
  157. CParameterValues.prototype.addSimpleParmValueItem=function(_24,_25,_26,_27){
  158. if(typeof _24!="string"||_24==""){
  159. return null;
  160. }
  161. if(typeof _25!="string"||_25==""){
  162. return null;
  163. }
  164. if(typeof _26!="string"){
  165. return null;
  166. }
  167. if(typeof _27!="string"||(_27!="false"&&_27!="true")){
  168. return null;
  169. }
  170. var _28=null;
  171. if(this.m_parameterValues.exists(_24)==false){
  172. _28=new CParameterValue(_24);
  173. this.m_parameterValues.add(_24,_28);
  174. }
  175. _28=this.m_parameterValues.get(_24);
  176. if(typeof _28=="undefined"||_28==null){
  177. return null;
  178. }
  179. var _29=_28.getParmValueItems();
  180. for(var _2a=0;_2a<_29.length;++_2a){
  181. var _2b=_29[_2a];
  182. if(_2b.getDisplayValue()==_26&&_2b.getUseValue()==_25){
  183. return;
  184. }
  185. }
  186. return _28.addSimpleParmValueItem(_25,_26,_27);
  187. };
  188. CParameterValues.prototype.getSimpleParmValueItem=function(_2c,_2d){
  189. var _2e=this.getParameterValue(_2c);
  190. if(_2e!=null){
  191. return _2e.getSimpleParmValueItem(_2d);
  192. }
  193. return null;
  194. };
  195. CParameterValues.prototype.load=function(_2f){
  196. return this.loadWithOptions(_2f,true);
  197. };
  198. CParameterValues.prototype.loadWithOptions=function(_30,_31){
  199. try{
  200. var _32=_30.childNodes;
  201. for(var _33=0;_33<_32.length;++_33){
  202. var _34=_32[_33];
  203. if(_34.nodeType==3){
  204. continue;
  205. }
  206. var _35=new CParameterValue();
  207. if(_35.load(_34)){
  208. var _36=_35.name();
  209. if(_36!=""){
  210. if(_31==true||_36.indexOf("credential:")!=0){
  211. this.m_parameterValues.add(_36,_35);
  212. }
  213. }
  214. }else{
  215. delete _35;
  216. }
  217. }
  218. }
  219. catch(e){
  220. return false;
  221. }
  222. return true;
  223. };
  224. CParameterValues.prototype.buildXML=function(_37,_38,_39){
  225. var _3a=_38.createElement(_39);
  226. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  227. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  228. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  229. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");
  230. _37.XMLBuilderSetAttributeNodeNS(_3a,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  231. _37.XMLBuilderSetAttributeNodeNS(_3a,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  232. _38.documentElement.appendChild(_3a);
  233. var _3b=this.m_parameterValues.keys();
  234. for(var _3c=0;_3c<_3b.length;++_3c){
  235. if(this.m_parameterValues.exists(_3b[_3c])){
  236. var _3d=this.m_parameterValues.get(_3b[_3c]);
  237. _3d.generateXML(_37,_3a);
  238. }
  239. }
  240. return _3a;
  241. };
  242. CParameterValues.prototype.generateXML=function(_3e,_3f,_40){
  243. var _41="parameterValues";
  244. if(typeof _40!="undefined"&&_40!=null){
  245. _41=_40;
  246. }
  247. XMLBuilderSerializeNode(this.buildXML(_3e,_3f,_41));
  248. return XMLBuilderSerializeNode(_3f);
  249. };
  250. function CParameterValue(_42){
  251. this.m_name=_42;
  252. this.m_parmValueItems=[];
  253. };
  254. CParameterValue.prototype.name=function(){
  255. return this.m_name;
  256. };
  257. CParameterValue.prototype.setName=function(_43){
  258. this.m_name=_43;
  259. };
  260. CParameterValue.prototype.getParmValueItems=function(){
  261. return this.m_parmValueItems;
  262. };
  263. CParameterValue.prototype.length=function(){
  264. return this.m_parmValueItems.length;
  265. };
  266. CParameterValue.prototype.addParmValueItem=function(_44){
  267. this.m_parmValueItems.push(_44);
  268. };
  269. CParameterValue.prototype.addSimpleParmValueItem=function(_45,_46,_47){
  270. if(typeof _45!="string"||_45==""){
  271. return null;
  272. }
  273. if(typeof _46!="string"){
  274. return null;
  275. }
  276. if(typeof _47!="string"||(_47!="false"&&_47!="true")){
  277. return null;
  278. }
  279. var _48=new CSimpleParmValueItem(_45,_46,_47);
  280. this.m_parmValueItems.push(_48);
  281. return _48;
  282. };
  283. CParameterValue.prototype.removeSimpleParmValueItem=function(_49){
  284. if(typeof _49!="string"||_49==""){
  285. return false;
  286. }
  287. var _4a=[];
  288. var _4b=false;
  289. for(var _4c=0;_4c<this.length();++_4c){
  290. var _4d=this.m_parmValueItems[_4c];
  291. if(_4d instanceof CSimpleParmValueItem){
  292. if(_4d.getUseValue()==_49){
  293. _4b=true;
  294. continue;
  295. }
  296. }
  297. _4a.push(_4d);
  298. }
  299. this.m_parmValueItems=_4a;
  300. return _4b;
  301. };
  302. CParameterValue.prototype.getSimpleParmValueItem=function(_4e){
  303. if(typeof _4e!="string"||_4e==""){
  304. return null;
  305. }
  306. for(var _4f=0;_4f<this.length();++_4f){
  307. var _50=this.m_parmValueItems[_4f];
  308. if(_50 instanceof CSimpleParmValueItem){
  309. if(_50.getUseValue()==_4e){
  310. return _50;
  311. }
  312. }
  313. }
  314. return null;
  315. };
  316. CParameterValue.prototype.load=function(_51){
  317. var _52=_51.getAttributeNode("xsi:type");
  318. if(_52==null||_52.nodeValue!="bus:parameterValue"){
  319. return false;
  320. }
  321. var _53=XMLHelper_FindChildByTagName(_51,"name",false);
  322. if(_53==null){
  323. return false;
  324. }
  325. this.m_name=XMLHelper_GetText(_53);
  326. if(this.m_name==""){
  327. return false;
  328. }
  329. var _54=XMLHelper_FindChildByTagName(_51,"value",false);
  330. if(_54==null){
  331. return false;
  332. }
  333. var _55=_54.getAttributeNode("xsi:type");
  334. if(_55==null||_55.nodeValue!="SOAP-ENC:Array"){
  335. return false;
  336. }
  337. var _56=_54.getAttributeNode("SOAP-ENC:arrayType");
  338. if(_56==null||_56.nodeValue.indexOf("bus:parmValueItem[")==-1){
  339. return false;
  340. }
  341. var _57=_54.childNodes;
  342. for(var _58=0;_58<_57.length;++_58){
  343. var _59=_57[_58];
  344. if(_59.nodeType==3){
  345. continue;
  346. }
  347. var _5a=_59.getAttributeNode("xsi:type");
  348. if(_5a!=null){
  349. var _5b;
  350. var _5c;
  351. switch(_5a.nodeValue){
  352. case "bus:simpleParmValueItem":
  353. _5b=new CSimpleParmValueItem("","","");
  354. break;
  355. case "bus:boundRangeParmValueItem":
  356. _5b=new CBoundRangeParmValueItem();
  357. break;
  358. case "bus:unboundedEndRangeParmValueItem":
  359. _5b=new CUnboundedEndRangeParmValueItem();
  360. break;
  361. case "bus:unboundedStartRangeParmValueItem":
  362. _5b=new CUnboundedStartRangeParmValueItem();
  363. break;
  364. case "bus:hierarchicalParmValueItem":
  365. _5b=new CHierarchicalParmValueItem();
  366. break;
  367. default:
  368. return false;
  369. }
  370. _5c=_5b.load(_59);
  371. if(_5c){
  372. this.m_parmValueItems.push(_5b);
  373. }else{
  374. delete _5b;
  375. }
  376. }
  377. }
  378. return true;
  379. };
  380. CParameterValue.prototype.generateXML=function(_5d,_5e){
  381. var _5f=_5e.ownerDocument;
  382. var _60=_5f.createElement("item");
  383. _5d.XMLBuilderSetAttributeNodeNS(_60,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  384. _5e.appendChild(_60);
  385. var _61=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_5f);
  386. _5d.XMLBuilderSetAttributeNodeNS(_61,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  387. _61.appendChild(_5f.createTextNode(this.m_name));
  388. _60.appendChild(_61);
  389. var _62=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_5f);
  390. _5d.XMLBuilderSetAttributeNodeNS(_62,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  391. _5d.XMLBuilderSetAttributeNodeNS(_62,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  392. _60.appendChild(_62);
  393. for(var _63=0;_63<this.m_parmValueItems.length;++_63){
  394. if(typeof this.m_parmValueItems[_63].generateXML!="undefined"){
  395. this.m_parmValueItems[_63].generateXML(_5d,_62);
  396. }
  397. }
  398. };
  399. CParameterValue.prototype.toString=function(_64){
  400. var _65="";
  401. for(var _66=0;_66<this.m_parmValueItems.length;++_66){
  402. if(_65!=""){
  403. _65+=", ";
  404. }
  405. if(typeof this.m_parmValueItems[_66].toString!="undefined"){
  406. _65+=this.m_parmValueItems[_66].toString(_64);
  407. }
  408. }
  409. return _65;
  410. };
  411. function CParmValueItem(){
  412. this.initialize("true");
  413. };
  414. CParmValueItem.prototype.getInclusiveValue=function(){
  415. return this.m_inclusiveValue;
  416. };
  417. CParmValueItem.prototype.setInclusiveValue=function(_67){
  418. this.m_inclusiveValue=_67;
  419. };
  420. CParmValueItem.prototype.initialize=function(_68){
  421. this.m_inclusiveValue=_68;
  422. };
  423. CParmValueItem.prototype.load=function(_69){
  424. this.m_inclusiveValue="true";
  425. var _6a=XMLHelper_FindChildByTagName(_69,"inclusive",false);
  426. if(_6a!=null){
  427. var _6b=XMLHelper_GetText(_6a);
  428. if(_6b=="true"||_6b=="false"){
  429. this.m_inclusiveValue=_6b;
  430. }
  431. }
  432. };
  433. CParmValueItem.prototype.generateXML=function(_6c,_6d){
  434. var _6e=_6d.ownerDocument;
  435. var _6f=_6c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:inclusive",_6e);
  436. _6c.XMLBuilderSetAttributeNodeNS(_6f,"xsi:type","xs:boolean","http://www.w3.org/2001/XMLSchema-instance");
  437. _6f.appendChild(_6e.createTextNode(this.m_inclusiveValue));
  438. _6d.appendChild(_6f);
  439. };
  440. function CSimpleParmValueItem(_70,_71,_72){
  441. CSimpleParmValueItem.baseclass.initialize.call(this,_72);
  442. this.m_useValue=_70;
  443. this.m_displayValue=_71;
  444. };
  445. CSimpleParmValueItem.prototype=new CParmValueItem();
  446. CSimpleParmValueItem.prototype.constructor=CSimpleParmValueItem;
  447. CSimpleParmValueItem.baseclass=CParmValueItem.prototype;
  448. CSimpleParmValueItem.prototype.getUseValue=function(){
  449. return this.m_useValue;
  450. };
  451. CSimpleParmValueItem.prototype.getDisplayValue=function(){
  452. return this.m_displayValue;
  453. };
  454. CSimpleParmValueItem.prototype.getParmValueItem=function(){
  455. return this.m_parmValueItem;
  456. };
  457. CSimpleParmValueItem.prototype.setDisplayValue=function(_73){
  458. this.m_displayValue=_73;
  459. };
  460. CSimpleParmValueItem.prototype.setUseValue=function(_74){
  461. this.m_useValue=_74;
  462. };
  463. CSimpleParmValueItem.prototype.toString=function(_75){
  464. return this.getDisplayValue();
  465. };
  466. CSimpleParmValueItem.prototype.load=function(_76){
  467. CSimpleParmValueItem.baseclass.load.call(this,_76);
  468. var _77=XMLHelper_FindChildByTagName(_76,"use",false);
  469. if(_77==null){
  470. return false;
  471. }
  472. var _78=XMLHelper_GetText(_77);
  473. if(_78==""){
  474. return false;
  475. }
  476. this.m_useValue=_78;
  477. var _79=XMLHelper_FindChildByTagName(_76,"display",false);
  478. if(_79!=null){
  479. this.m_displayValue=XMLHelper_GetText(_79);
  480. }
  481. return true;
  482. };
  483. CSimpleParmValueItem.prototype.generateXML=function(_7a,_7b){
  484. var _7c=_7b.ownerDocument;
  485. var _7d=_7c.createElement("item");
  486. _7a.XMLBuilderSetAttributeNodeNS(_7d,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  487. _7b.appendChild(_7d);
  488. CSimpleParmValueItem.baseclass.generateXML.call(this,_7a,_7d);
  489. var _7e=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7c);
  490. _7a.XMLBuilderSetAttributeNodeNS(_7e,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  491. _7e.appendChild(_7c.createTextNode(this.m_useValue));
  492. _7d.appendChild(_7e);
  493. var _7f=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7c);
  494. _7a.XMLBuilderSetAttributeNodeNS(_7f,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  495. _7f.appendChild(_7c.createTextNode(this.m_displayValue));
  496. _7d.appendChild(_7f);
  497. };
  498. function CBoundRangeParmValueItem(){
  499. CBoundRangeParmValueItem.baseclass.initialize.call(this,"true");
  500. this.m_start=null;
  501. this.m_end=null;
  502. };
  503. CBoundRangeParmValueItem.prototype=new CParmValueItem();
  504. CBoundRangeParmValueItem.prototype.constructor=CBoundRangeParmValueItem;
  505. CBoundRangeParmValueItem.baseclass=CParmValueItem.prototype;
  506. CBoundRangeParmValueItem.prototype.setStart=function(_80){
  507. this.m_start=_80;
  508. };
  509. CBoundRangeParmValueItem.prototype.getStart=function(){
  510. return this.m_start;
  511. };
  512. CBoundRangeParmValueItem.prototype.setEnd=function(end){
  513. this.m_end=end;
  514. };
  515. CBoundRangeParmValueItem.prototype.getEnd=function(){
  516. return this.m_end;
  517. };
  518. CBoundRangeParmValueItem.prototype.toString=function(_82){
  519. return CViewerCommon.getMessage(_82.m_sBetween,[this.m_start.getDisplayValue(),this.m_end.getDisplayValue()]);
  520. };
  521. CBoundRangeParmValueItem.prototype.load=function(_83){
  522. CBoundRangeParmValueItem.baseclass.load.call(this,_83);
  523. this.m_start=new CSimpleParmValueItem("","","");
  524. this.m_start.load(XMLHelper_FindChildByTagName(_83,"start",false));
  525. this.m_end=new CSimpleParmValueItem("","","");
  526. this.m_end.load(XMLHelper_FindChildByTagName(_83,"end",false));
  527. return true;
  528. };
  529. CBoundRangeParmValueItem.prototype.generateXML=function(_84,_85){
  530. var _86=_85.ownerDocument;
  531. var _87=_86.createElement("item");
  532. _84.XMLBuilderSetAttributeNodeNS(_87,"xsi:type","bus:boundRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  533. _85.appendChild(_87);
  534. CBoundRangeParmValueItem.baseclass.generateXML.call(this,_84,_87);
  535. var _88=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_86);
  536. _87.appendChild(_88);
  537. this.m_start.generateXML(_84,_88);
  538. var _89=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_86);
  539. _87.appendChild(_89);
  540. this.m_end.generateXML(_84,_89);
  541. };
  542. function CUnboundedStartRangeParmValueItem(){
  543. CUnboundedStartRangeParmValueItem.baseclass.initialize.call(this,"true");
  544. this.m_end=null;
  545. };
  546. CUnboundedStartRangeParmValueItem.prototype=new CParmValueItem();
  547. CUnboundedStartRangeParmValueItem.prototype.constructor=CUnboundedStartRangeParmValueItem;
  548. CUnboundedStartRangeParmValueItem.baseclass=CParmValueItem.prototype;
  549. CUnboundedStartRangeParmValueItem.prototype.setEnd=function(end){
  550. this.m_end=end;
  551. };
  552. CUnboundedStartRangeParmValueItem.prototype.getEnd=function(){
  553. return this.m_end;
  554. };
  555. CUnboundedStartRangeParmValueItem.prototype.load=function(_8b){
  556. CUnboundedStartRangeParmValueItem.baseclass.load.call(this,_8b);
  557. this.m_end=new CSimpleParmValueItem("","","");
  558. this.m_end.load(XMLHelper_FindChildByTagName(_8b,"end",false));
  559. return true;
  560. };
  561. CUnboundedStartRangeParmValueItem.prototype.generateXML=function(_8c,_8d){
  562. var _8e=_8d.ownerDocument;
  563. var _8f=_8e.createElement("item");
  564. _8c.XMLBuilderSetAttributeNodeNS(_8f,"xsi:type","bus:unboundedStartRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  565. _8d.appendChild(_8f);
  566. CUnboundedStartRangeParmValueItem.baseclass.generateXML.call(this,_8c,_8f);
  567. var _90=_8c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_8e);
  568. _8f.appendChild(_90);
  569. this.m_end.generateXML(_8c,_90);
  570. };
  571. CUnboundedStartRangeParmValueItem.prototype.toString=function(_91){
  572. return _91.m_sLessThan+" "+this.m_end.getDisplayValue();
  573. };
  574. function CUnboundedEndRangeParmValueItem(){
  575. CUnboundedEndRangeParmValueItem.baseclass.initialize.call(this,"true");
  576. this.m_start=null;
  577. };
  578. CUnboundedEndRangeParmValueItem.prototype=new CParmValueItem();
  579. CUnboundedEndRangeParmValueItem.prototype.constructor=CUnboundedEndRangeParmValueItem;
  580. CUnboundedEndRangeParmValueItem.baseclass=CParmValueItem.prototype;
  581. CUnboundedEndRangeParmValueItem.prototype.setStart=function(_92){
  582. this.m_start=_92;
  583. };
  584. CUnboundedEndRangeParmValueItem.prototype.getStart=function(){
  585. return this.m_start;
  586. };
  587. CUnboundedEndRangeParmValueItem.prototype.load=function(_93){
  588. CUnboundedEndRangeParmValueItem.baseclass.load.call(this,_93);
  589. this.m_start=new CSimpleParmValueItem("","","");
  590. this.m_start.load(XMLHelper_FindChildByTagName(_93,"start",false));
  591. return true;
  592. };
  593. CUnboundedEndRangeParmValueItem.prototype.generateXML=function(_94,_95){
  594. var _96=_95.ownerDocument;
  595. var _97=_96.createElement("item");
  596. _94.XMLBuilderSetAttributeNodeNS(_97,"xsi:type","bus:unboundedEndRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  597. _95.appendChild(_97);
  598. CUnboundedEndRangeParmValueItem.baseclass.generateXML.call(this,_94,_97);
  599. var _98=_94.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_96);
  600. _97.appendChild(_98);
  601. this.m_start.generateXML(_94,_98);
  602. };
  603. CUnboundedEndRangeParmValueItem.prototype.toString=function(_99){
  604. return _99.m_sGreaterThan+" "+this.m_start.getDisplayValue();
  605. };
  606. function CHierarchicalParmValueItem(){
  607. CHierarchicalParmValueItem.baseclass.initialize.call(this,"true");
  608. this.m_value=null;
  609. this.m_subNodes=[];
  610. };
  611. CHierarchicalParmValueItem.prototype=new CParmValueItem();
  612. CHierarchicalParmValueItem.prototype.constructor=CHierarchicalParmValueItem;
  613. CHierarchicalParmValueItem.baseclass=CParmValueItem.prototype;
  614. CHierarchicalParmValueItem.prototype.getValue=function(){
  615. return this.m_value;
  616. };
  617. CHierarchicalParmValueItem.prototype.getSubNodes=function(){
  618. return this.m_subNodes;
  619. };
  620. CHierarchicalParmValueItem.prototype.setValue=function(_9a){
  621. this.m_value=_9a;
  622. };
  623. CHierarchicalParmValueItem.prototype.setSubNodes=function(_9b){
  624. this.m_subNodes=_9b;
  625. };
  626. CHierarchicalParmValueItem.prototype.load=function(_9c){
  627. CHierarchicalParmValueItem.baseclass.load.call(this,_9c);
  628. this.m_value=new CSimpleParmValueItem("","","");
  629. this.m_value.load(XMLHelper_FindChildByTagName(_9c,"value",false));
  630. var _9d=XMLHelper_FindChildByTagName(_9c,"subNodes",false);
  631. if(_9d==null){
  632. return false;
  633. }
  634. var _9e=_9d.getAttributeNode("xsi:type");
  635. if(_9e==null||_9e.nodeValue!="SOAP-ENC:Array"){
  636. return false;
  637. }
  638. var _9f=_9d.getAttributeNode("SOAP-ENC:arrayType");
  639. if(_9f==null||_9f.nodeValue!="bus:hierarchicalParmValueItem[]"){
  640. return false;
  641. }
  642. var _a0=_9d.childNodes;
  643. for(var _a1=0;_a1<_a0.length;++_a1){
  644. var _a2=new CHierarchicalParmValueItem();
  645. _a2.load(_a0[_a1]);
  646. this.m_subNodes.push(_a2);
  647. }
  648. return true;
  649. };
  650. CHierarchicalParmValueItem.prototype.generateXML=function(_a3,_a4){
  651. var _a5=_a4.ownerDocument;
  652. var _a6=_a5.createElement("item");
  653. _a3.XMLBuilderSetAttributeNodeNS(_a6,"xsi:type","bus:hierarchicalParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  654. _a4.appendChild(_a6);
  655. CHierarchicalParmValueItem.baseclass.generateXML.call(this,_a3,_a6);
  656. var _a7=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_a5);
  657. _a6.appendChild(_a7);
  658. this.m_value.generateXML(_a3,_a7);
  659. var _a8=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:subNodes",_a5);
  660. _a3.XMLBuilderSetAttributeNodeNS(_a8,"SOAP-ENC:arrayType","bus:hierarchicalParmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  661. _a3.XMLBuilderSetAttributeNodeNS(_a8,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  662. _a6.appendChild(_a8);
  663. for(var _a9=0;_a9<this.m_subNodes.length;++_a9){
  664. this.m_subNodes[_a9].generateXML(_a3,_a8);
  665. }
  666. };
  667. CHierarchicalParmValueItem.prototype.toString=function(){
  668. return "";
  669. };
  670. function XMLParser(s,_ab){
  671. if(s==null){
  672. return null;
  673. }
  674. if(/^\s*</.test(s)){
  675. s=s.replace(/^\s*/,"");
  676. if(s.charAt(1)=="/"){
  677. var _ac=new RegExp("^</"+_ab.getName()+"\\s*>","gi");
  678. if(!_ac.test(s)){
  679. alert("invalid XML "+_ab.getName()+"\n"+s);
  680. return null;
  681. }
  682. return XMLParser(s.replace(RegExp.lastMatch,""),_ab.parentNode);
  683. }else{
  684. var _ad=/^\s*<([\w:\-_\.]+)/;
  685. if(_ad.test(s)){
  686. var _ae=RegExp.$1;
  687. var e=new XMLElement(_ae,_ab);
  688. var _b0=new RegExp("^<"+_ae+"[^>]*>");
  689. s=s.replace(_b0,"");
  690. var _b1=RegExp.lastMatch;
  691. var _b2=/([\w:\-_\.]+)="([^"]*)"/gi;
  692. var _b3=_b1.match(_b2);
  693. if(_b3!=null){
  694. for(var i=0;i<_b3.length;i++){
  695. var _b5=_b3[i];
  696. (/([\w:\-_\.]+)\s*=\s*"(.*)"/).test(_b5);
  697. e.setAttribute(RegExp.$1,RegExp.$2);
  698. }
  699. }
  700. if(!(/\/>$/).test(_b1)){
  701. XMLParser(s,e);
  702. return e;
  703. }else{
  704. XMLParser(s,_ab);
  705. return e;
  706. }
  707. }
  708. }
  709. }else{
  710. if(s&&_ab){
  711. var _b6=new RegExp("([^<]*)</"+_ab.getName()+"\\s*[^>]*>","gi");
  712. _b6.test(s);
  713. var _b7=RegExp.$1;
  714. _ab.setValue(_b7);
  715. return (XMLParser(s.replace(_b7,""),_ab));
  716. }
  717. }
  718. return null;
  719. };
  720. function XMLElement(s,_b9){
  721. this.nodeName=s;
  722. this.nodeValue="";
  723. this.attributes=[];
  724. this.childNodes=[];
  725. this.parentNode=_b9;
  726. if(this.parentNode){
  727. this.parentNode.appendChild(this);
  728. }
  729. };
  730. XMLElement.prototype.appendChild=function(e){
  731. this.childNodes[this.childNodes.length]=e;
  732. };
  733. XMLElement.prototype.hasChildNodes=function(){
  734. if(this.childNodes.length>0){
  735. return true;
  736. }else{
  737. return false;
  738. }
  739. };
  740. XMLElement.prototype.findChildByName=function(n,_bc){
  741. if(this.getName()==n){
  742. return (this);
  743. }
  744. for(var i=0;i<this.childNodes.length;i++){
  745. if(this.childNodes[i].getName()==n){
  746. return this.childNodes[i];
  747. }
  748. }
  749. if(_bc!=false){
  750. for(i=0;i<this.childNodes.length;i++){
  751. var _be=this.childNodes[i].findChildByName(n,_bc);
  752. if(_be){
  753. return _be;
  754. }
  755. }
  756. }
  757. return null;
  758. };
  759. XMLElement.prototype.findChildWithAttribute=function(_bf,val){
  760. for(var i=0;i<this.childNodes.length;i++){
  761. if(this.childNodes[i].getAttribute(_bf)==val){
  762. return this.childNodes[i];
  763. }
  764. }
  765. return null;
  766. };
  767. XMLElement.prototype.getElementsByTagName=function(s,_c3){
  768. var a=[];
  769. for(var i=0;i<this.childNodes.length;i++){
  770. if(this.childNodes[i].getName()==s){
  771. a[a.length]=this.childNodes[i];
  772. }
  773. }
  774. if(_c3!=false){
  775. for(i=0;i<this.childNodes.length;i++){
  776. var _c6=this.childNodes[i].getElementsByTagName(s);
  777. for(var j=0;j<_c6.length;j++){
  778. a[a.length]=_c6[j];
  779. }
  780. }
  781. }
  782. return a;
  783. };
  784. XMLElement.prototype.getName=function(){
  785. return this.nodeName;
  786. };
  787. XMLElement.prototype.getValue=function(){
  788. return this.nodeValue;
  789. };
  790. XMLElement.prototype.setAttribute=function(a,v){
  791. this.attributes["_"+a]=v;
  792. };
  793. XMLElement.prototype.setValue=function(v){
  794. this.nodeValue=v;
  795. };
  796. XMLElement.prototype.getAttribute=function(a){
  797. var _cc="";
  798. if(typeof sXmlDecode=="function"){
  799. _cc=sXmlDecode(this.attributes["_"+a]);
  800. }else{
  801. _cc=this.attributes["_"+a];
  802. }
  803. return (_cc==null?"":_cc);
  804. };
  805. XMLElement.prototype.toString=function(){
  806. var s="<"+this.getName();
  807. for(var i in this.attributes){
  808. s+=" "+i.substring(1)+"=\""+this.attributes[i]+"\"";
  809. }
  810. s+=">"+this.getValue();
  811. for(var j=0;j<this.childNodes.length;j++){
  812. s+=this.childNodes[j].toString();
  813. }
  814. s+="</"+this.getName()+">";
  815. return s;
  816. };
  817. function XMLBuilderLoadXMLFromString(_d0,_d1){
  818. var _d2=null;
  819. if(typeof DOMParser!="undefined"){
  820. _d2=new DOMParser().parseFromString(_d0,"application/xml");
  821. }else{
  822. if(typeof ActiveXObject!="undefined"){
  823. try{
  824. _d2=new ActiveXObject("Microsoft.XMLDOM");
  825. _d2.loadXML(_d0);
  826. }
  827. catch(e){
  828. }
  829. }
  830. }
  831. return _d2;
  832. };
  833. function XMLBuilderCreateXMLDocument(_d3,_d4,_d5){
  834. var _d6=null;
  835. _d4=_d4||"";
  836. _d5=_d5||null;
  837. if(document.implementation&&document.implementation.createDocument){
  838. if(typeof _d4=="undefined"){
  839. _d4="http://www.w3.org/2000/xmlns/";
  840. }
  841. _d6=document.implementation.createDocument(_d4,_d3,_d5);
  842. }else{
  843. if(typeof ActiveXObject!="undefined"){
  844. try{
  845. _d6=new ActiveXObject("Microsoft.XMLDOM");
  846. var _d7=_d6.createNode(1,_d3,_d4);
  847. _d6.appendChild(_d7);
  848. }
  849. catch(e){
  850. }
  851. }
  852. }
  853. return _d6;
  854. };
  855. function XMLBuilderCreateElementNS(_d8,_d9,_da){
  856. var _db=null;
  857. if(typeof _da.createElementNS!="undefined"){
  858. if(typeof _d8=="undefined"){
  859. _d8="http://www.w3.org/2000/xmlns/";
  860. }
  861. _db=_da.createElementNS(_d8,_d9);
  862. }else{
  863. if(typeof _da.createNode!="undefined"){
  864. _db=_da.createNode(1,_d9,_d8);
  865. }
  866. }
  867. return _db;
  868. };
  869. function XMLBuilderSetAttributeNodeNS(_dc,_dd,_de,_df){
  870. if(typeof _dc.setAttributeNS!="undefined"){
  871. if(typeof _df=="undefined"){
  872. _df="http://www.w3.org/2000/xmlns/";
  873. }
  874. _dc.setAttributeNS(_df,_dd,_de);
  875. }else{
  876. if(typeof _dc.ownerDocument!="undefined"&&typeof _dc.ownerDocument.createNode!="undefined"){
  877. var _e0=_dc.ownerDocument.createNode(2,_dd,_df);
  878. _e0.nodeValue=_de;
  879. _dc.setAttributeNode(_e0);
  880. }
  881. }
  882. };
  883. function XMLBuilderSerializeNode(_e1){
  884. var _e2="";
  885. if(typeof XMLSerializer!="undefined"){
  886. try{
  887. _e2=new XMLSerializer().serializeToString(_e1);
  888. }
  889. catch(e){
  890. }
  891. }else{
  892. if(typeof _e1=="object"&&typeof _e1.xml!="undefined"){
  893. _e2=_e1.xml;
  894. }
  895. }
  896. return _e2.replace(/^\s+/g,"").replace(/\s+$/g,"");
  897. };
  898. function XMLHelper_GetText(_e3,_e4){
  899. var _e5="";
  900. var _e6=_e3.childNodes;
  901. for(var i=0;i<_e6.length;++i){
  902. if(_e6[i].nodeType==3){
  903. _e5+=_e6[i].nodeValue;
  904. }else{
  905. if(_e6[i].nodeName=="Value"){
  906. _e5+=_e6[i].getAttribute("display");
  907. }else{
  908. if(_e4){
  909. _e5+=XMLHelper_GetText(_e6[i],true);
  910. }
  911. }
  912. }
  913. }
  914. return _e5;
  915. };
  916. function XMLHelper_GetLocalName(_e8){
  917. if(typeof _e8.baseName!="undefined"){
  918. return _e8.baseName;
  919. }
  920. return _e8.localName;
  921. };
  922. function XMLHelper_FindChildByTagName(_e9,_ea,_eb){
  923. if(typeof _eb=="undefined"||(_eb!=true&&_eb!=false)){
  924. _eb=true;
  925. }
  926. if(XMLHelper_GetLocalName(_e9)==_ea){
  927. return (_e9);
  928. }
  929. var i;
  930. for(i=0;i<_e9.childNodes.length;i++){
  931. if(XMLHelper_GetLocalName(_e9.childNodes[i])==_ea){
  932. return _e9.childNodes[i];
  933. }
  934. }
  935. if(_eb!=false){
  936. for(i=0;i<_e9.childNodes.length;i++){
  937. var _ed=XMLHelper_FindChildByTagName(_e9.childNodes[i],_ea,_eb);
  938. if(_ed){
  939. return _ed;
  940. }
  941. }
  942. }
  943. return null;
  944. };
  945. function XMLHelper_FindChildrenByTagName(_ee,_ef,_f0){
  946. if(typeof _f0=="undefined"||(_f0!=true&&_f0!=false)){
  947. _f0=true;
  948. }
  949. var _f1=[];
  950. var _f2=_ee.childNodes;
  951. for(var _f3=0;_f3<_f2.length;_f3++){
  952. if(XMLHelper_GetLocalName(_f2[_f3])==_ef){
  953. _f1[_f1.length]=_f2[_f3];
  954. }
  955. if(_f0===true){
  956. var _f4=XMLHelper_FindChildrenByTagName(_f2[_f3],_ef,_f0);
  957. if(_f4.length>0){
  958. _f1=_f1.concat(_f4);
  959. }
  960. }
  961. }
  962. return _f1;
  963. };
  964. function XMLHelper_GetFirstChildElement(oEl){
  965. var _f6=null;
  966. if(oEl&&oEl.childNodes&&oEl.childNodes.length){
  967. for(var i=0;i<oEl.childNodes.length;i++){
  968. if(oEl.childNodes[i].nodeType==1){
  969. _f6=oEl.childNodes[i];
  970. break;
  971. }
  972. }
  973. }
  974. return _f6;
  975. };
  976. function XMLHelper_FindChildrenByAttribute(_f8,_f9,_fa,_fb,_fc){
  977. if(typeof _fb=="undefined"||(_fb!=true&&_fb!=false)){
  978. _fb=true;
  979. }
  980. if(typeof _fa!="string"&&typeof _fa!="number"){
  981. _fa=null;
  982. }else{
  983. _fa=_fa.toString();
  984. }
  985. var _fd=[];
  986. var _fe=_f8.childNodes;
  987. for(var _ff=0;_ff<_fe.length;_ff++){
  988. var _100=_fe[_ff];
  989. if(_100.nodeType==1){
  990. var _101=_100.getAttribute(_f9);
  991. if(_101!==null){
  992. if(_fa===null||_101==_fa){
  993. if(_fc){
  994. return [_100];
  995. }else{
  996. _fd[_fd.length]=_100;
  997. }
  998. }
  999. }
  1000. if(_fb===true){
  1001. var _102=XMLHelper_FindChildrenByAttribute(_100,_f9,_fa,_fb,_fc);
  1002. if(_102.length>0){
  1003. if(_fc){
  1004. if(_102.length==1){
  1005. return _102;
  1006. }else{
  1007. return [_102[0]];
  1008. }
  1009. }else{
  1010. _fd=_fd.concat(_102);
  1011. }
  1012. }
  1013. }
  1014. }
  1015. }
  1016. return _fd;
  1017. };
  1018. var DICTIONARY_INVALID_KEY=-1;
  1019. var DICTIONARY_SUCCESS=1;
  1020. function CDictionary(){
  1021. this.m_aValues={};
  1022. };
  1023. function CDictionary_add(sKey,_104){
  1024. if(typeof sKey!="string"&&typeof sKey!="number"){
  1025. return DICTIONARY_INVALID_KEY;
  1026. }
  1027. this.m_aValues[sKey]=_104;
  1028. return DICTIONARY_SUCCESS;
  1029. };
  1030. function CDictionary_exists(sKey){
  1031. if(typeof sKey!="string"&&typeof sKey!="number"){
  1032. return false;
  1033. }
  1034. return (typeof this.m_aValues[sKey]!="undefined");
  1035. };
  1036. function CDictionary_get(sKey){
  1037. if(typeof sKey!="string"&&typeof sKey!="number"){
  1038. return null;
  1039. }
  1040. if(this.exists(sKey)===true){
  1041. return this.m_aValues[sKey];
  1042. }else{
  1043. return null;
  1044. }
  1045. };
  1046. function CDictionary_keys(){
  1047. var _107=[];
  1048. for(var _108 in this.m_aValues){
  1049. _107.push(_108);
  1050. }
  1051. return _107.sort();
  1052. };
  1053. function CDictionary_remove(sKey){
  1054. if(typeof sKey!="string"&&typeof sKey!="number"){
  1055. return DICTIONARY_INVALID_KEY;
  1056. }
  1057. var _10a=this.get(sKey);
  1058. delete this.m_aValues[sKey];
  1059. return _10a;
  1060. };
  1061. function CDictionary_removeAll(){
  1062. this.m_aValues=[];
  1063. return DICTIONARY_SUCCESS;
  1064. };
  1065. function CDictionary_append(_10b){
  1066. if(_10b instanceof CDictionary&&_10b.keys().length>0){
  1067. var _10c=_10b.keys();
  1068. for(var _10d=0;_10d<_10c.length;_10d++){
  1069. this.add(_10c[_10d],_10b.get(_10c[_10d]));
  1070. }
  1071. }
  1072. };
  1073. CDictionary.prototype.add=CDictionary_add;
  1074. CDictionary.prototype.exists=CDictionary_exists;
  1075. CDictionary.prototype.get=CDictionary_get;
  1076. CDictionary.prototype.keys=CDictionary_keys;
  1077. CDictionary.prototype.remove=CDictionary_remove;
  1078. CDictionary.prototype.removeAll=CDictionary_removeAll;
  1079. CDictionary.prototype.append=CDictionary_append;
  1080. function CognosTabControl(_10e,_10f){
  1081. this._init();
  1082. this._outsideContainer=_10e;
  1083. this._callback=_10f;
  1084. };
  1085. CognosTabControl.prototype._init=function(){
  1086. this._tabs=null;
  1087. this._tabControlNode=null;
  1088. this._scrollButtonsVisible=false;
  1089. this._scrollLeftButton=null;
  1090. this._scrollRightButton=null;
  1091. this._selectedTab=null;
  1092. this._wrapperDiv=null;
  1093. this._topContainer=null;
  1094. this._seperator=null;
  1095. this._isSavedOutput=false;
  1096. this._isHighContrast=false;
  1097. };
  1098. CognosTabControl.prototype.destroy=function(){
  1099. if(this._wrapperDiv){
  1100. this._wrapperDiv.parentNode.removeChild(this._wrapperDiv);
  1101. delete this._wrapperDiv;
  1102. this._wrapperDiv=null;
  1103. }
  1104. };
  1105. CognosTabControl.prototype.setHighContrast=function(_110){
  1106. this._isHighContrast=_110;
  1107. };
  1108. CognosTabControl.prototype.isHighContrast=function(){
  1109. return this._isHighContrast;
  1110. };
  1111. CognosTabControl.prototype.setSpaceSaverContainer=function(node){
  1112. this._spaceSaverContainer=node;
  1113. };
  1114. CognosTabControl.prototype.useAbsolutePosition=function(_112){
  1115. this._useAbsolutePosition=_112;
  1116. };
  1117. CognosTabControl.prototype.setScrollAttachNode=function(node){
  1118. this._scrollAttachNode=node;
  1119. };
  1120. CognosTabControl.prototype.setIsSavedOutput=function(_114){
  1121. this._isSavedOutput=_114;
  1122. };
  1123. CognosTabControl.prototype.isSavedOutput=function(){
  1124. return this._isSavedOutput;
  1125. };
  1126. CognosTabControl.prototype.getSelectedTabId=function(){
  1127. if(this._selectedTab){
  1128. return this._selectedTab.getId();
  1129. }
  1130. return null;
  1131. };
  1132. CognosTabControl.prototype.getSelectedTab=function(){
  1133. return this._selectedTab?this._selectedTab:null;
  1134. };
  1135. CognosTabControl.prototype.isTopAligned=function(){
  1136. return this._isTopAligned;
  1137. };
  1138. CognosTabControl.prototype.getWrapperDiv=function(){
  1139. return this._wrapperDiv;
  1140. };
  1141. CognosTabControl.prototype.getVisibleWidth=function(){
  1142. var _115=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
  1143. return this._wrapperDiv.clientWidth-_115;
  1144. };
  1145. CognosTabControl.prototype.getMaxRightScroll=function(){
  1146. var _116=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
  1147. return this._totalWrapperWidth+_116+8-this._wrapperDiv.clientWidth;
  1148. };
  1149. CognosTabControl.prototype.hide=function(){
  1150. this._topContainer.style.display="none";
  1151. };
  1152. CognosTabControl.prototype.resetPosition=function(){
  1153. if(this._useAbsolutePosition===true){
  1154. this._outsideContainer.srollLeft="0px";
  1155. this._outsideContainer.scrollTop="0px";
  1156. this._topContainer.style.top="";
  1157. this._topContainer.style.bottom="";
  1158. this._topContainer.style.left="0px";
  1159. if(this._isTopAligned){
  1160. this._topContainer.style.top="0px";
  1161. }else{
  1162. this._topContainer.style.bottom="0px";
  1163. }
  1164. }
  1165. };
  1166. CognosTabControl.prototype.render=function(_117){
  1167. this._updateTabInfo(_117);
  1168. if(!this._tabControlNode){
  1169. var _118=this;
  1170. var _119=this._scrollAttachNode?this._scrollAttachNode:this._outsideContainer;
  1171. if(window.attachEvent){
  1172. window.attachEvent("onresize",function(){
  1173. _118.onResize();
  1174. });
  1175. if(this._useAbsolutePosition===true){
  1176. _119.attachEvent("onscroll",function(){
  1177. _118.onContainerScroll();
  1178. });
  1179. }
  1180. }else{
  1181. window.addEventListener("resize",function(){
  1182. _118.onResize();
  1183. },false);
  1184. if(this._useAbsolutePosition===true){
  1185. _119.addEventListener("scroll",function(){
  1186. _118.onContainerScroll();
  1187. },false);
  1188. }
  1189. }
  1190. this._outsideContainer.originalClassName=this._outsideContainer.className;
  1191. this._outsideContainer.className=this._outsideContainer.className+(this._isTopAligned?" ct_controlTop":" ct_controlBottom");
  1192. this._topContainer=document.createElement("div");
  1193. this._topContainer.className="ct_wrapperDiv";
  1194. if(this._useAbsolutePosition===true){
  1195. this._topContainer.style.width="100%";
  1196. this._topContainer.style.position="absolute";
  1197. this._topContainer.style.left="0px";
  1198. if(this._isTopAligned){
  1199. this._topContainer.style.top="0px";
  1200. }else{
  1201. this._topContainer.style.bottom="0px";
  1202. }
  1203. }
  1204. if(this._isTopAligned&&this._outsideContainer.firstChild){
  1205. this._outsideContainer.insertBefore(this._topContainer,this._outsideContainer.firstChild);
  1206. }else{
  1207. this._outsideContainer.appendChild(this._topContainer);
  1208. }
  1209. this._wrapperDiv=document.createElement("div");
  1210. this._wrapperDiv.setAttribute("role","presentation");
  1211. this._wrapperDiv.className="ct_wrapperDiv";
  1212. this._topContainer.appendChild(this._wrapperDiv);
  1213. this._tabControlNode=document.createElement("div");
  1214. this._tabControlNode.setAttribute("role","tablist");
  1215. this._tabControlNode.className="ct_control";
  1216. this._wrapperDiv.appendChild(this._tabControlNode);
  1217. this._totalWrapperWidth=0;
  1218. for(var i=0;i<this._tabs.length;i++){
  1219. var tab=this._tabs[i];
  1220. tab.render(this._tabControlNode);
  1221. this._totalWrapperWidth+=this._tabs[i].getWidth();
  1222. }
  1223. var _11c=0;
  1224. if(this._tabs[0]){
  1225. _11c=this._tabs[0].getHeight();
  1226. }
  1227. this._wrapperDiv.style.height=_11c+5+"px";
  1228. if(this._spaceSaverContainer){
  1229. this.spaceSaverDiv=document.createElement("div");
  1230. this.spaceSaverDiv.style.height=_11c+5+"px";
  1231. this.spaceSaverDiv.style.position="relative";
  1232. this.spaceSaverDiv.style.display="block";
  1233. this._spaceSaverContainer.appendChild(this.spaceSaverDiv);
  1234. }
  1235. this._createSeperator();
  1236. }else{
  1237. this.resetPosition();
  1238. }
  1239. this._topContainer.style.display="";
  1240. this.onResize();
  1241. this.selectTab(_117.currentTabId,false);
  1242. if(this._selectedTab){
  1243. this._selectedTab.scrollIntoView();
  1244. this.updateScrollButtons();
  1245. }
  1246. };
  1247. CognosTabControl.prototype.onContainerScroll=function(){
  1248. var _11d=this._scrollAttachNode?this._scrollAttachNode:this._topContainer;
  1249. this._topContainer.style.left=_11d.scrollLeft+"px";
  1250. if(this._isTopAligned){
  1251. this._topContainer.style.top=_11d.scrollTop+"px";
  1252. }else{
  1253. this._topContainer.style.bottom=(-_11d.scrollTop)+"px";
  1254. }
  1255. };
  1256. CognosTabControl.prototype._resetTabControl=function(){
  1257. if(this._outsideContainer.originalClassName){
  1258. this._outsideContainer.className=this._outsideContainer.originalClassName;
  1259. }else{
  1260. this._outsideContainer.className="";
  1261. }
  1262. if(this._topContainer){
  1263. var node=this._outsideContainer.removeChild(this._topContainer);
  1264. node=null;
  1265. }
  1266. this._init();
  1267. };
  1268. CognosTabControl.prototype._updateTabInfo=function(_11f){
  1269. this._isTopAligned=_11f.position=="topLeft"?true:false;
  1270. var tabs=_11f.tabs;
  1271. if(this._tabs){
  1272. if(this._tabs.length!=tabs.length){
  1273. this._resetTabControl();
  1274. }else{
  1275. for(var i=0;i<this._tabs.length;i++){
  1276. if(tabs[i].id!=this._tabs[i].getId()){
  1277. this._resetTabControl();
  1278. break;
  1279. }
  1280. }
  1281. }
  1282. }
  1283. if(!this._tabs){
  1284. this._tabs=[];
  1285. if(!tabs){
  1286. return;
  1287. }
  1288. for(var ii=0;ii<tabs.length;ii++){
  1289. var tab=new CognosTab(tabs[ii],this,ii);
  1290. this._tabs.push(tab);
  1291. }
  1292. }
  1293. };
  1294. CognosTabControl.prototype.getScrollPos=function(){
  1295. return this._wrapperDiv.scrollLeft;
  1296. };
  1297. CognosTabControl.prototype.scrollTo=function(_124){
  1298. this._wrapperDiv.scrollLeft=_124;
  1299. this.updateScrollButtons();
  1300. };
  1301. CognosTabControl.prototype.onResize=function(evt){
  1302. if(this._wrapperDiv.offsetWidth<this._totalWrapperWidth){
  1303. this._showScrollButtons();
  1304. this.updateScrollButtons();
  1305. if(this._selectedTab){
  1306. this._selectedTab.scrollIntoView();
  1307. }
  1308. if(this._scrollRightButton.isDisabled()){
  1309. this.scrollTo(this.getMaxRightScroll());
  1310. }
  1311. }else{
  1312. this._hideScrollButtons();
  1313. this.scrollTo(0);
  1314. }
  1315. };
  1316. CognosTabControl.prototype._showScrollButtons=function(){
  1317. if(this._scrollButtonsVisible){
  1318. return;
  1319. }
  1320. if(!this._scrollLeftButton){
  1321. var _126=0;
  1322. if(this._tabs[0]){
  1323. _126=this._tabs[0].getHeight();
  1324. }
  1325. this._scrollLeftButton=new CognosScrollButton("left",_126,this);
  1326. this._scrollLeftButton.render(this._topContainer);
  1327. this._scrollRightButton=new CognosScrollButton("right",_126,this);
  1328. this._scrollRightButton.render(this._topContainer);
  1329. }
  1330. this._scrollButtonsVisible=true;
  1331. this._scrollLeftButton.show();
  1332. this._scrollRightButton.show();
  1333. this._tabControlNode.style.left=this._scrollLeftButton.getWidth()-2+"px";
  1334. };
  1335. CognosTabControl.prototype.updateScrollButtons=function(){
  1336. if(this._scrollLeftButton){
  1337. this._scrollLeftButton.update();
  1338. }
  1339. if(this._scrollRightButton){
  1340. this._scrollRightButton.update();
  1341. }
  1342. };
  1343. CognosTabControl.prototype._hideScrollButtons=function(){
  1344. if(!this._scrollButtonsVisible){
  1345. return;
  1346. }
  1347. this._scrollButtonsVisible=false;
  1348. this._tabControlNode.style.left="0px";
  1349. this._scrollLeftButton.hide();
  1350. this._scrollRightButton.hide();
  1351. };
  1352. CognosTabControl.prototype._createSeperator=function(){
  1353. this._seperator=document.createElement("div");
  1354. this._seperator.setAttribute("role","presendation");
  1355. this._seperator.setAttribute("style","");
  1356. this._seperator.className="ct_verticalLine";
  1357. this._seperator.setAttribute("role","presentation");
  1358. this._tabControlNode.appendChild(this._seperator);
  1359. };
  1360. CognosTabControl.prototype.selectTab=function(_127,_128,evt){
  1361. if(!evt){
  1362. evt=window.event;
  1363. }
  1364. for(var i=0;i<this._tabs.length;i++){
  1365. var tab=this._tabs[i];
  1366. var _12c=tab.getId()==_127;
  1367. tab.select(_12c);
  1368. if(_12c){
  1369. this._selectedTab=tab;
  1370. if(_128&&this._callback){
  1371. this._callback(_127);
  1372. }
  1373. }
  1374. if(_128){
  1375. tab.focus(_12c);
  1376. }
  1377. }
  1378. if(evt&&window.stopEventBubble){
  1379. window.stopEventBubble(evt);
  1380. }
  1381. return false;
  1382. };
  1383. CognosTabControl.prototype.handleKeyDown=function(evt,_12e){
  1384. if(!evt){
  1385. evt=window.event;
  1386. }
  1387. if(!evt){
  1388. return;
  1389. }
  1390. if(evt.keyCode=="39"||evt.keyCode=="37"){
  1391. if(evt.keyCode=="39"){
  1392. _12e++;
  1393. if(_12e>=this._tabs.length){
  1394. _12e=0;
  1395. }
  1396. }else{
  1397. _12e--;
  1398. if(_12e<0){
  1399. _12e=this._tabs.length-1;
  1400. }
  1401. }
  1402. this._tabs[_12e].focus();
  1403. this._tabs[_12e].scrollIntoView();
  1404. }else{
  1405. if(evt.keyCode=="32"||evt.keyCode=="13"){
  1406. var _12f=this._tabs[_12e].getId();
  1407. this.selectTab(_12f,true);
  1408. }
  1409. }
  1410. };
  1411. function CognosTab(_130,_131,_132){
  1412. if(!_130){
  1413. return;
  1414. }
  1415. this._id=_130.id;
  1416. this._label=_130.label;
  1417. this._position=_132;
  1418. this._contentClassName=_130.className;
  1419. this._imgURL=_130.img;
  1420. this._selected=false;
  1421. this._tabControl=_131;
  1422. this._outerTabDiv=null;
  1423. this._focusDiv=null;
  1424. };
  1425. CognosTab.prototype.getWidth=function(){
  1426. return this._outerTabDiv.offsetWidth+1;
  1427. };
  1428. CognosTab.prototype.getHeight=function(){
  1429. return this._outerTabDiv.clientHeight;
  1430. };
  1431. CognosTab.prototype.getId=function(){
  1432. return this._id;
  1433. };
  1434. CognosTab.prototype.select=function(_133){
  1435. if(_133!=this._selected){
  1436. this._selected=_133;
  1437. if(_133){
  1438. this.scrollIntoView();
  1439. }
  1440. if(this._outerTabDiv){
  1441. this._updateSelectedClass();
  1442. this._updateAriaSelected();
  1443. }
  1444. }
  1445. };
  1446. CognosTab.prototype.scrollIntoView=function(){
  1447. var _134=this._outerTabDiv.offsetLeft+this._outerTabDiv.clientWidth;
  1448. var _135=this._tabControl.getVisibleWidth();
  1449. var _136=this._tabControl.getScrollPos();
  1450. var _137=this._outerTabDiv.offsetLeft;
  1451. if(_137===0){
  1452. this._tabControl.scrollTo(0);
  1453. }else{
  1454. if((_137>=_136)&&(_134<=(_136+_135))){
  1455. }else{
  1456. if(_137<_136){
  1457. var _138=_137<3?0:_137-3;
  1458. this._tabControl.scrollTo(_138);
  1459. }else{
  1460. if(_134-_135>0||_134<_136){
  1461. this._tabControl.scrollTo(_134-_135+10);
  1462. }
  1463. }
  1464. }
  1465. }
  1466. };
  1467. CognosTab.prototype.render=function(_139){
  1468. if(!this._outerTabDiv){
  1469. var _13a=this._id;
  1470. var _13b=this._tabControl;
  1471. var tab=this;
  1472. this._outerTabDiv=document.createElement("div");
  1473. this._outerTabDiv.onmousedown=function(_13d){
  1474. _13b.selectTab(_13a,true,_13d);
  1475. };
  1476. this._outerTabDiv.onmouseover=function(){
  1477. this.className=this.className+" ct_highlight";
  1478. };
  1479. this._outerTabDiv.onmouseout=function(){
  1480. tab._updateSelectedClass();
  1481. };
  1482. this._outerTabDiv.setAttribute("style","");
  1483. this._outerTabDiv.setAttribute("role","presentation");
  1484. this._updateSelectedClass();
  1485. _139.appendChild(this._outerTabDiv);
  1486. var _13e=document.createElement("div");
  1487. _13e.className="ct_content";
  1488. _13e.setAttribute("role","presentation");
  1489. this._outerTabDiv.appendChild(_13e);
  1490. this._focusDiv=document.createElement("span");
  1491. this._focusDiv.innerHTML=this._label?this._label:"&nbsp;";
  1492. this._focusDiv.className="ct_text";
  1493. this._focusDiv.setAttribute("tabIndex",this._position===0?"0":"-1");
  1494. this._focusDiv.setAttribute("role","tab");
  1495. this._focusDiv.onkeydown=function(_13f){
  1496. _13b.handleKeyDown(_13f,tab._position);
  1497. };
  1498. this._updateAriaSelected();
  1499. _13e.appendChild(this._focusDiv);
  1500. if(this.isIE()&&this.getWidth()<75){
  1501. this._outerTabDiv.style.width="75px";
  1502. }
  1503. }else{
  1504. this._updateSelectedClass();
  1505. this._updateAriaSelected();
  1506. }
  1507. };
  1508. CognosTab.prototype.isIE=function(){
  1509. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  1510. };
  1511. CognosTab.prototype.getFocusableDiv=function(){
  1512. return this._focusDiv;
  1513. };
  1514. CognosTab.prototype.focus=function(_140){
  1515. if(typeof _140==="undefined"){
  1516. _140=true;
  1517. }
  1518. this._focusDiv.setAttribute("tabIndex",_140?"0":"-1");
  1519. if(_140&&this._focusDiv.focus){
  1520. this._focusDiv.focus();
  1521. }
  1522. };
  1523. CognosTab.prototype._updateSelectedClass=function(){
  1524. this._outerTabDiv.className=this._selected?"ct_outerDiv ct_highlight ct_selected":"ct_outerDiv";
  1525. };
  1526. CognosTab.prototype._updateAriaSelected=function(){
  1527. this._focusDiv.setAttribute("aria-selected",this._selected?"true":"false");
  1528. };
  1529. function CognosScrollButton(_141,_142,_143){
  1530. this._direction=_141;
  1531. this._height=_142;
  1532. this._tabControl=_143;
  1533. this._disabled=true;
  1534. this._scrolling=false;
  1535. };
  1536. CognosScrollButton.prototype.getWidth=function(){
  1537. return this._scrollButtonDiv.offsetWidth+1;
  1538. };
  1539. CognosScrollButton.prototype.show=function(){
  1540. this._wrapperDiv.style.display="block";
  1541. };
  1542. CognosScrollButton.prototype.hide=function(){
  1543. this._wrapperDiv.style.display="none";
  1544. };
  1545. CognosScrollButton.prototype.update=function(){
  1546. var _144=this._tabControl.getWrapperDiv();
  1547. var _145=false;
  1548. if(this._direction=="left"){
  1549. if(_144.scrollLeft===0){
  1550. _145=true;
  1551. }
  1552. }else{
  1553. if(_144.scrollLeft>=(this._tabControl.getMaxRightScroll()-2)){
  1554. _145=true;
  1555. }
  1556. }
  1557. if(_145){
  1558. this._disable();
  1559. }else{
  1560. this._enable();
  1561. }
  1562. };
  1563. CognosScrollButton.prototype.isDisabled=function(){
  1564. return this._disabled;
  1565. };
  1566. CognosScrollButton.prototype._disable=function(){
  1567. this._disabled=true;
  1568. this._outerDiv.className="ct_outerDiv ct_scrollDisabled";
  1569. };
  1570. CognosScrollButton.prototype._enable=function(){
  1571. this._disabled=false;
  1572. this._outerDiv.className="ct_outerDiv ct_scrollEnabled";
  1573. };
  1574. CognosScrollButton.prototype.scroll=function(){
  1575. if(!this._scrolling){
  1576. this._scrolling=true;
  1577. var _146=this._tabControl.getWrapperDiv().clientWidth;
  1578. this._doAnimateScroll(_146,this._tabControl.getMaxRightScroll());
  1579. }
  1580. };
  1581. CognosScrollButton.prototype._doAnimateScroll=function(_147,_148){
  1582. if(_147>0){
  1583. var _149=10;
  1584. var _14a=this._tabControl.getWrapperDiv();
  1585. if(this._direction=="left"){
  1586. if(_14a.scrollLeft>_149){
  1587. this._tabControl.scrollTo(_14a.scrollLeft-_149);
  1588. }else{
  1589. this._tabControl.scrollTo(0);
  1590. this._scrolling=false;
  1591. return;
  1592. }
  1593. }else{
  1594. if(_14a.scrollLeft+_149<_148){
  1595. this._tabControl.scrollTo(_14a.scrollLeft+_149);
  1596. }else{
  1597. this._scrolling=false;
  1598. this._tabControl.scrollTo(_148);
  1599. this._tabControl.updateScrollButtons();
  1600. return;
  1601. }
  1602. }
  1603. _147-=_149;
  1604. var _14b=this;
  1605. setTimeout(function(){
  1606. _14b._doAnimateScroll(_147,_148);
  1607. },3);
  1608. }else{
  1609. this._scrolling=false;
  1610. this._tabControl.updateScrollButtons();
  1611. }
  1612. };
  1613. CognosScrollButton.prototype.isIE=function(){
  1614. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  1615. };
  1616. CognosScrollButton.prototype.render=function(_14c){
  1617. this._scrollButtonDiv=document.createElement("div");
  1618. this._scrollButtonDiv.className="ct_scrollButton";
  1619. var _14d=-1;
  1620. if(this.isIE()&&document.compatMode!="CSS1Compat"){
  1621. _14d=1;
  1622. }
  1623. this._scrollButtonDiv.style.height=this._height+_14d+"px";
  1624. if(this._tabControl.isHighContrast()){
  1625. this._scrollButtonDiv.innerHTML=this._direction=="left"?"&laquo;":"&raquo;";
  1626. }
  1627. this._outerDiv=document.createElement("div");
  1628. this._outerDiv.className="ct_scrollDisabled";
  1629. this._outerDiv.appendChild(this._scrollButtonDiv);
  1630. this._outerDiv.style.height=this._height+"px";
  1631. var _14e=this;
  1632. this._outerDiv.onclick=function(){
  1633. _14e.scroll();
  1634. };
  1635. this._wrapperDiv=document.createElement("div");
  1636. this._wrapperDiv.style.height=this._height+"px";
  1637. this._wrapperDiv.className="ct_scroll "+(this._direction=="left"?"ct_left":"ct_right")+(this._tabControl.isHighContrast()?" a11y":"");
  1638. this._wrapperDiv.appendChild(this._outerDiv);
  1639. if(this._direction=="left"){
  1640. _14c.insertBefore(this._wrapperDiv,_14c.firstChild);
  1641. this._wrapperDiv.style.left="0px";
  1642. }else{
  1643. _14c.appendChild(this._wrapperDiv);
  1644. this._wrapperDiv.style.right="0px";
  1645. }
  1646. };
  1647. function ActionFactory(_14f){
  1648. this.m_cognosViewer=_14f;
  1649. };
  1650. ActionFactory.prototype.load=function(_150){
  1651. this.m_cognosViewer.loadExtra();
  1652. var _151=null;
  1653. try{
  1654. var _152=_150+"Action";
  1655. _151=eval("(typeof "+_152+"=='function'? new "+_152+"():null);");
  1656. if(_151){
  1657. _151.setCognosViewer(this.m_cognosViewer);
  1658. }
  1659. }
  1660. catch(exception){
  1661. _151=null;
  1662. }
  1663. return _151;
  1664. };
  1665. function ActionFactory_loadActionHandler(evt,_154){
  1666. var _155=getCtxNodeFromEvent(evt);
  1667. var _156=_154.getSelectionController();
  1668. var _157=null;
  1669. if(_155!==null){
  1670. var _158=_155.getAttribute("ctx");
  1671. _158=_158.split("::")[0].split(":")[0];
  1672. var _159=_155.getAttribute("type")!=null?_155:_155.parentNode;
  1673. var type=_159.getAttribute("type");
  1674. switch(type){
  1675. case "columnTitle":
  1676. var _15b=(_155.getAttribute("dttargets")!=null);
  1677. var _15c=(_159.getAttribute("CTNM")!=null&&_156.getMun(_158)!=""&&_156.getUsageInfo(_158)!="2");
  1678. if(_15b||_15c){
  1679. _157=_154.getAction("DrillUpDownOrThrough");
  1680. _157.init(_15b,_15c);
  1681. _157.updateDrillabilityInfo(_154,_155);
  1682. }else{
  1683. _157=_154.getAction("RenameDataItem");
  1684. }
  1685. break;
  1686. case "datavalue":
  1687. case "chartElement":
  1688. case "ordinalAxisLabel":
  1689. case "legendLabel":
  1690. case "legendTitle":
  1691. case "ordinalAxisTitle":
  1692. var _15b=(_155.getAttribute("dttargets")!=null);
  1693. var _15c=(_156.getHun(_158)!="");
  1694. if(_15b||_15c){
  1695. _157=_154.getAction("DrillUpDownOrThrough");
  1696. _157.init(_15b,_15c);
  1697. _157.updateDrillabilityInfo(_154,_155);
  1698. }
  1699. break;
  1700. }
  1701. }
  1702. if(_157===null){
  1703. _157=_154.getAction("Selection");
  1704. }
  1705. _157.setCognosViewer(_154);
  1706. return _157;
  1707. };
  1708. ActionFactory.prototype.destroy=function(){
  1709. delete this.m_cognosViewer;
  1710. };
  1711. function CognosViewerAction(){
  1712. this.m_oCV=null;
  1713. };
  1714. CognosViewerAction.prototype.setRequestParms=function(_15d){
  1715. };
  1716. CognosViewerAction.prototype.onMouseOver=function(evt){
  1717. return false;
  1718. };
  1719. CognosViewerAction.prototype.onMouseOut=function(evt){
  1720. return false;
  1721. };
  1722. CognosViewerAction.prototype.onMouseDown=function(evt){
  1723. return false;
  1724. };
  1725. CognosViewerAction.prototype.onClick=function(evt){
  1726. return false;
  1727. };
  1728. CognosViewerAction.prototype.onDoubleClick=function(evt){
  1729. return false;
  1730. };
  1731. CognosViewerAction.prototype.updateMenu=function(_163){
  1732. return _163;
  1733. };
  1734. CognosViewerAction.prototype.addAdditionalOptions=function(_164){
  1735. };
  1736. CognosViewerAction.prototype.genSelectionContextWithUniqueCTXIDs=function(){
  1737. return false;
  1738. };
  1739. CognosViewerAction.prototype.doUndo=function(){
  1740. if(typeof console!="undefined"){
  1741. console.log("Required method doUndo not implemented.");
  1742. }
  1743. };
  1744. CognosViewerAction.prototype.doRedo=function(){
  1745. if(typeof console!="undefined"){
  1746. console.log("Required method doRedo not implemented.");
  1747. }
  1748. };
  1749. CognosViewerAction.prototype.forceRunSpecRequest=function(){
  1750. return false;
  1751. };
  1752. CognosViewerAction.prototype.preProcess=function(){
  1753. };
  1754. CognosViewerAction.prototype.setCognosViewer=function(oCV){
  1755. this.m_oCV=oCV;
  1756. };
  1757. CognosViewerAction.prototype.getCognosViewer=function(){
  1758. return this.m_oCV;
  1759. };
  1760. CognosViewerAction.prototype.getUndoRedoQueue=function(){
  1761. if(this.getCognosViewer().getViewerWidget()){
  1762. return this.getCognosViewer().getViewerWidget().getUndoRedoQueue();
  1763. }
  1764. return null;
  1765. };
  1766. CognosViewerAction.prototype.getViewerWidget=function(){
  1767. return this.m_oCV.getViewerWidget();
  1768. };
  1769. CognosViewerAction.prototype.getObjectDisplayName=function(){
  1770. var _166="";
  1771. if(this.m_oCV!=null){
  1772. if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){
  1773. _166=this.m_oCV.envParams["reportpart_id"];
  1774. }else{
  1775. if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){
  1776. _166=this.m_oCV.envParams["ui.name"];
  1777. }
  1778. }
  1779. }
  1780. return _166;
  1781. };
  1782. CognosViewerAction.prototype.getContainerId=function(_167){
  1783. var _168="";
  1784. if(_167&&_167.getAllSelectedObjects){
  1785. var _169=_167.getAllSelectedObjects();
  1786. if(_169){
  1787. var _16a=_169[0];
  1788. if(_16a&&_16a.getLayoutElementId){
  1789. _168=this.removeNamespace(_16a.getLayoutElementId());
  1790. }
  1791. }
  1792. }
  1793. return _168;
  1794. };
  1795. CognosViewerAction.prototype.removeNamespace=function(_16b){
  1796. var _16c=_16b;
  1797. try{
  1798. if(_16b!=""){
  1799. var _16d=_16b.indexOf(this.m_oCV.getId());
  1800. if(_16d!=-1){
  1801. _16b=_16b.replace(this.m_oCV.getId(),"");
  1802. }
  1803. }
  1804. return _16b;
  1805. }
  1806. catch(e){
  1807. return _16c;
  1808. }
  1809. };
  1810. CognosViewerAction.prototype.doAddActionContext=function(){
  1811. return true;
  1812. };
  1813. CognosViewerAction.prototype.getSelectionContext=function(){
  1814. return getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(this.m_oCV.envParams["ui.object"]),this.genSelectionContextWithUniqueCTXIDs());
  1815. };
  1816. CognosViewerAction.prototype.getNumberOfSelections=function(){
  1817. var _16e=-1;
  1818. if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){
  1819. _16e=this.m_oCV.getSelectionController().getSelections().length;
  1820. }
  1821. return _16e;
  1822. };
  1823. CognosViewerAction.prototype.buildDynamicMenuItem=function(_16f,_170){
  1824. _16f.action={name:"LoadMenu",payload:{action:_170}};
  1825. _16f.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}];
  1826. return _16f;
  1827. };
  1828. CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_171){
  1829. var oReq=new ViewerDispatcherEntry(this.getCognosViewer());
  1830. oReq.addFormField("ui.action",_171);
  1831. this.preProcess();
  1832. if(this.doAddActionContext()===true){
  1833. var _173=this.addActionContext();
  1834. oReq.addFormField("cv.actionContext",_173);
  1835. if(window.gViewerLogger){
  1836. window.gViewerLogger.log("Action context",_173,"xml");
  1837. }
  1838. }
  1839. oReq.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  1840. if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){
  1841. oReq.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
  1842. }
  1843. if(this.m_oCV.getModelPath()!==""){
  1844. oReq.addFormField("modelPath",this.m_oCV.getModelPath());
  1845. }
  1846. if(typeof this.m_oCV.envParams["packageBase"]!="undefined"){
  1847. oReq.addFormField("packageBase",this.m_oCV.envParams["packageBase"]);
  1848. }
  1849. if(typeof this.m_oCV.envParams["rap.state"]!="undefined"){
  1850. oReq.addFormField("rap.state",this.m_oCV.envParams["rap.state"]);
  1851. }
  1852. if(typeof this.m_oCV.envParams["rapReportInfo"]!="undefined"){
  1853. oReq.addFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
  1854. }
  1855. this.addAdditionalOptions(oReq);
  1856. return oReq;
  1857. };
  1858. CognosViewerAction.prototype.fireModifiedReportEvent=function(){
  1859. try{
  1860. var _174=this.getCognosViewer().getViewerWidget();
  1861. if(_174){
  1862. var _175={"modified":true};
  1863. _174.fireEvent("com.ibm.bux.widget.modified",null,_175);
  1864. }
  1865. }
  1866. catch(e){
  1867. }
  1868. };
  1869. CognosViewerAction.prototype.showCustomCursor=function(evt,id,_178){
  1870. var _179=document.getElementById(id);
  1871. if(_179==null){
  1872. _179=document.createElement("span");
  1873. _179.className="customCursor";
  1874. _179.setAttribute("id",id);
  1875. document.body.appendChild(_179);
  1876. }
  1877. var _17a="<img src=\""+this.getCognosViewer().getWebContentRoot()+_178+"\"/>";
  1878. _179.innerHTML=_17a;
  1879. _179.style.position="absolute";
  1880. _179.style.left=(evt.clientX+15)+"px";
  1881. _179.style.top=(evt.clientY+15)+"px";
  1882. _179.style.display="inline";
  1883. };
  1884. CognosViewerAction.prototype.hideCustomCursor=function(id){
  1885. var _17c=document.getElementById(id);
  1886. if(_17c!=null){
  1887. _17c.style.display="none";
  1888. }
  1889. };
  1890. CognosViewerAction.prototype.selectionHasContext=function(){
  1891. var _17d=this.getCognosViewer().getSelectionController().getAllSelectedObjects();
  1892. var _17e=false;
  1893. if(_17d!=null&&_17d.length>0){
  1894. for(var i=0;i<_17d.length;i++){
  1895. if(_17d[i].hasContextInformation()){
  1896. _17e=true;
  1897. break;
  1898. }
  1899. }
  1900. }
  1901. return _17e;
  1902. };
  1903. CognosViewerAction.prototype.isInteractiveDataContainer=function(_180){
  1904. var _181=false;
  1905. if(typeof _180!="undefined"&&_180!=null){
  1906. var id=_180.toLowerCase();
  1907. _181=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id);
  1908. }
  1909. return _181;
  1910. };
  1911. CognosViewerAction.prototype.getSelectedContainerId=function(){
  1912. var _183=this.getCognosViewer();
  1913. var _184=_183.getSelectionController();
  1914. var _185=null;
  1915. if(_184!=null&&typeof _184!="undefined"){
  1916. _185=this.getContainerId(_184);
  1917. }
  1918. return _185;
  1919. };
  1920. CognosViewerAction.prototype.getSelectedReportInfo=function(){
  1921. var _186=this.getCognosViewer();
  1922. var _187=this.getSelectedContainerId();
  1923. var _188=this.getReportInfo(_187);
  1924. if(_188==null){
  1925. var _189=_186.getRAPReportInfo();
  1926. if(_189.getContainerCount()==1){
  1927. _188=_189.getContainerFromPos(0);
  1928. }
  1929. }
  1930. return _188;
  1931. };
  1932. CognosViewerAction.prototype.getReportInfo=function(_18a){
  1933. var _18b=null;
  1934. if(_18a!=null&&_18a.length>0){
  1935. var _18c=this.getCognosViewer();
  1936. var _18d=_18c.getRAPReportInfo();
  1937. _18b=_18d.getContainer(_18a);
  1938. }
  1939. return _18b;
  1940. };
  1941. CognosViewerAction.prototype.isSelectionOnChart=function(){
  1942. var _18e=this.getCognosViewer();
  1943. if(_18e.getSelectionController().hasSelectedChartNodes()){
  1944. return true;
  1945. }
  1946. var _18f=this.getContainerId(_18e.getSelectionController());
  1947. if(typeof _18f!="undefined"){
  1948. var _190=this.getReportInfo(_18f);
  1949. if(_190!=null&&_190.displayTypeId){
  1950. var _191=_190.displayTypeId.toLowerCase();
  1951. return _18e.getRAPReportInfo().isChart(_191);
  1952. }
  1953. }
  1954. return false;
  1955. };
  1956. CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){
  1957. var _192=this.getCognosViewer().getRAPReportInfo();
  1958. if(_192){
  1959. return _192.containsInteractiveDataContainer();
  1960. }
  1961. return false;
  1962. };
  1963. CognosViewerAction.prototype.isPromptWidget=function(){
  1964. var oCV=this.getCognosViewer();
  1965. if(oCV.getRAPReportInfo()&&oCV.getRAPReportInfo().isPromptPart()){
  1966. return true;
  1967. }
  1968. return false;
  1969. };
  1970. CognosViewerAction.prototype.getLayoutComponents=function(){
  1971. var _194=[];
  1972. var _195=document.getElementById("rt"+this.m_oCV.getId());
  1973. if(_195!=null){
  1974. _194=getElementsByAttribute(_195,"*","lid");
  1975. }
  1976. return _194;
  1977. };
  1978. CognosViewerAction.prototype.addClientContextData=function(_196){
  1979. var _197=this.m_oCV.getSelectionController();
  1980. if(typeof _197!="undefined"&&_197!=null&&typeof _197.getCCDManager!="undefined"&&_197.getCCDManager()!=null){
  1981. var _198=_197.getCCDManager();
  1982. return ("<md>"+xml_encode(_198.MetadataToJSON())+"</md>"+"<cd>"+xml_encode(_198.ContextDataSubsetToJSON(_196))+"</cd>");
  1983. }
  1984. return "";
  1985. };
  1986. CognosViewerAction.prototype.getDataItemInfoMap=function(){
  1987. var _199=this.m_oCV.getSelectionController();
  1988. if(typeof _199!="undefined"&&_199!=null&&typeof _199.getCCDManager!="undefined"&&_199.getCCDManager()!=null){
  1989. var _19a=_199.getCCDManager();
  1990. return ("<di>"+xml_encode(_19a.DataItemInfoToJSON())+"</di>");
  1991. }
  1992. return "";
  1993. };
  1994. CognosViewerAction.prototype.getRAPLayoutTag=function(_19b){
  1995. var _19c=null;
  1996. if(typeof _19b=="object"&&_19b!=null){
  1997. _19c=_19b.getAttribute("rap_layout_tag");
  1998. }
  1999. return _19c;
  2000. };
  2001. CognosViewerAction.prototype.addMenuItemChecked=function(_19d,_19e,_19f){
  2002. if(_19d){
  2003. if(this.getCognosViewer().isHighContrast()){
  2004. _19e["class"]="menuItemSelected";
  2005. }
  2006. _19e.iconClass="menuItemChecked";
  2007. }else{
  2008. if(_19f&&_19f.length>0){
  2009. _19e.iconClass=_19f;
  2010. }
  2011. }
  2012. };
  2013. CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_1a0){
  2014. var _1a1=this.getCognosViewer().getViewerWidget();
  2015. _1a1.filterRequiredAction=_1a0;
  2016. _1a1.clearRAPCache();
  2017. _1a1.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"});
  2018. };
  2019. CognosViewerAction.prototype.addClientSideUndo=function(_1a2,_1a3){
  2020. var _1a4=GUtil.generateCallback(_1a2.doUndo,_1a3,_1a2);
  2021. var _1a5=GUtil.generateCallback(_1a2.doRedo,_1a3,_1a2);
  2022. this.getUndoRedoQueue().addClientSideUndo({"tooltip":_1a2.getUndoHint(),"undoCallback":_1a4,"redoCallback":_1a5});
  2023. this.getCognosViewer().getViewerWidget().updateToolbar();
  2024. };
  2025. CognosViewerAction.prototype.isValidMenuItem=function(){
  2026. var _1a6=this.getCognosViewer();
  2027. var _1a7=_1a6.getViewerWidget();
  2028. if(this.isPromptWidget()){
  2029. return false;
  2030. }
  2031. return true;
  2032. };
  2033. CognosViewerAction.prototype.isPositiveInt=function(_1a8){
  2034. if(typeof _1a8==="undefined"||_1a8===null){
  2035. return false;
  2036. }
  2037. var _1a9=parseInt(_1a8,10);
  2038. return _1a8&&_1a9===+_1a8&&_1a9>0&&_1a8.indexOf(".")==-1;
  2039. };
  2040. CognosViewerAction.prototype.buildActionResponseObject=function(_1aa,code,msg){
  2041. return {"status":_1aa,"message":msg?msg:null,"code":code?code:null,getStatus:function(){
  2042. return this.status;
  2043. },getMessage:function(){
  2044. return this.message;
  2045. },getCode:function(){
  2046. return this.code;
  2047. }};
  2048. };
  2049. function LineageAction(){
  2050. };
  2051. LineageAction.prototype=new CognosViewerAction();
  2052. LineageAction.prototype.getCommonOptions=function(_1ad){
  2053. _1ad.addFormField("cv.responseFormat","asynchDetailMIMEAttachment");
  2054. _1ad.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false");
  2055. _1ad.addFormField("cv.id",this.m_oCV.envParams["cv.id"]);
  2056. };
  2057. LineageAction.prototype.getSelectionOptions=function(_1ae){
  2058. var _1af=this.m_oCV.getSelectionController();
  2059. var _1b0=getSelectionContextIds(_1af);
  2060. _1ae.addFormField("context.format","initializer");
  2061. _1ae.addFormField("context.type","reportService");
  2062. _1ae.addFormField("context.selection","metadata,"+_1b0.toString());
  2063. };
  2064. LineageAction.prototype.getPrimaryRequestOptions=function(_1b1){
  2065. _1b1.addFormField("specificationType","metadataServiceLineageSpecification");
  2066. _1b1.addFormField("ui.action","runLineageSpecification");
  2067. _1b1.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  2068. };
  2069. LineageAction.prototype.getSecondaryRequestOptions=function(_1b2){
  2070. _1b2.addFormField("ui.conversation",this.m_oCV.getConversation());
  2071. _1b2.addFormField("m_tracking",this.m_oCV.getTracking());
  2072. _1b2.addFormField("ui.action","lineage");
  2073. };
  2074. LineageAction.prototype.updateMenu=function(_1b3){
  2075. if(!this.getCognosViewer().bCanUseLineage){
  2076. return "";
  2077. }
  2078. _1b3.disabled=!this.selectionHasContext();
  2079. return _1b3;
  2080. };
  2081. LineageAction.prototype.execute=function(){
  2082. var oCV=this.getCognosViewer();
  2083. var _1b5=new AsynchDataDispatcherEntry(oCV);
  2084. this.getCommonOptions(_1b5);
  2085. this.getSelectionOptions(_1b5);
  2086. if(oCV.getConversation()==""){
  2087. this.getPrimaryRequestOptions(_1b5);
  2088. }else{
  2089. this.getSecondaryRequestOptions(_1b5);
  2090. }
  2091. _1b5.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}});
  2092. if(!oCV.m_viewerFragment){
  2093. _1b5.setRequestIndicator(oCV.getRequestIndicator());
  2094. var _1b6=new WorkingDialog(oCV);
  2095. _1b6.setSimpleWorkingDialogFlag(true);
  2096. _1b5.setWorkingDialog(_1b6);
  2097. }
  2098. oCV.dispatchRequest(_1b5);
  2099. };
  2100. LineageAction.prototype.handleLineageResponse=function(_1b7){
  2101. var oCV=this.getCognosViewer();
  2102. oCV.loadExtra();
  2103. oCV.setStatus(_1b7.getAsynchStatus());
  2104. oCV.setConversation(_1b7.getConversation());
  2105. oCV.setTracking(_1b7.getTracking());
  2106. var _1b9=null;
  2107. if(typeof MDSRV_CognosConfiguration!="undefined"){
  2108. _1b9=new MDSRV_CognosConfiguration();
  2109. var _1ba="";
  2110. if(this.m_oCV.envParams["metadataInformationURI"]){
  2111. _1ba=this.m_oCV.envParams["metadataInformationURI"];
  2112. }
  2113. _1b9.addProperty("lineageURI",_1ba);
  2114. _1b9.addProperty("gatewayURI",this.m_oCV.getGateway());
  2115. }
  2116. var _1bb=this.m_oCV.envParams["ui.object"];
  2117. var _1bc=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_1bb));
  2118. var _1bd=new MDSRV_LineageFragmentContext(_1b9,_1bc);
  2119. _1bd.setExecutionParameters(this.m_oCV.getExecutionParameters());
  2120. if(typeof _1bb=="string"){
  2121. _1bd.setReportPath(_1bb);
  2122. }
  2123. _1bd.setReportLineage(_1b7.getResult());
  2124. _1bd.open();
  2125. };
  2126. function CSelectionDefaultStyles(_1be){
  2127. this.m_primarySelectionColor=null;
  2128. this.m_highContrastBorderStyle="solid";
  2129. this.m_secondarySelectionIsDisabled=false;
  2130. if(_1be){
  2131. this.m_selectionController=_1be;
  2132. this.m_oCognosViewer=_1be.m_oCognosViewer;
  2133. if(this.m_oCognosViewer){
  2134. var _1bf=this.m_oCognosViewer.getUIConfig();
  2135. if(_1bf){
  2136. if(_1bf.getPrimarySelectionColor()){
  2137. this.m_primarySelectionColor=_1bf.getPrimarySelectionColor();
  2138. }
  2139. if(!_1bf.getShowSecondarySelection()){
  2140. this.m_secondarySelectionIsDisabledConfig=true;
  2141. }else{
  2142. if(_1bf.getSeondarySelectionColor()){
  2143. this.m_secondarySelectionColor=_1bf.getSeondarySelectionColor();
  2144. }
  2145. }
  2146. }
  2147. }
  2148. }
  2149. };
  2150. CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_1c0){
  2151. return this.m_primarySelectionColor;
  2152. };
  2153. CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
  2154. return this.m_secondarySelectionColor;
  2155. };
  2156. CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
  2157. return this.m_highContrastBorderStyle;
  2158. };
  2159. CSelectionDefaultStyles.prototype.canApplyToSelection=function(_1c1){
  2160. return true;
  2161. };
  2162. CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
  2163. return this.m_secondarySelectionIsDisabled;
  2164. };
  2165. CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
  2166. };
  2167. function CSelectionFilterStyles(_1c2){
  2168. this.m_selectionController=_1c2;
  2169. this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD";
  2170. this.m_primarySelectionFilterColorForMeasure=null;
  2171. this.m_secondarySelectionColor=null;
  2172. this.m_highContrastBorderStyle="dotted";
  2173. this.m_secondarySelectionIsDisabled=true;
  2174. };
  2175. CSelectionFilterStyles.prototype=new CSelectionDefaultStyles();
  2176. CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_1c3){
  2177. return this.m_primarySelectionColor;
  2178. };
  2179. CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){
  2180. return this.m_secondarySelectionColor;
  2181. };
  2182. CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){
  2183. return this.m_highContrastBorderStyle;
  2184. };
  2185. CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){
  2186. return this.m_secondarySelectionIsDisabled;
  2187. };
  2188. CSelectionFilterStyles.prototype.canApplyToSelection=function(_1c4){
  2189. return !this.selectionHasOnlyMeasure(_1c4);
  2190. };
  2191. CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_1c5){
  2192. return (_1c5.length===1&&_1c5[0].length===1&&this.m_selectionController.isMeasure(_1c5[0][0]));
  2193. };
  2194. CSelectionFilterStyles.prototype.setStyleForSelection=function(_1c6){
  2195. this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_1c6))?null:this.m_primarySelectionFilterColor;
  2196. };
  2197. function CSelectionFilterContextMenuStyles(_1c7){
  2198. CSelectionDefaultStyles.call(this,_1c7);
  2199. this.m_secondarySelectionIsDisabled=true;
  2200. };
  2201. CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles();
  2202. function CSelectionObject(){
  2203. this.initialize();
  2204. };
  2205. CSelectionObject.prototype.initialize=function(){
  2206. this.m_oCellRef={};
  2207. this.m_sColumnRef="";
  2208. this.m_sColumnName="";
  2209. this.m_aDataItems=[];
  2210. this.m_aUseValues=[];
  2211. this.m_aDisplayValues=[];
  2212. this.m_sCellTypeId="";
  2213. this.m_sLayoutType="";
  2214. this.m_sTag="";
  2215. this.m_aMuns=[];
  2216. this.m_aRefQueries=[];
  2217. this.m_aMetadataItems=[];
  2218. this.m_aDrillOptions=[];
  2219. this.m_selectionController={};
  2220. this.m_contextIds=[];
  2221. this.m_ctxAttributeString="";
  2222. this.m_fetchedContextIds=false;
  2223. this.m_selectedClass=[];
  2224. this.m_cutClass=[];
  2225. this.m_dataContainerType="";
  2226. this.m_oJsonContext=null;
  2227. };
  2228. CSelectionObject.prototype.isSelectionOnVizChart=function(){
  2229. return false;
  2230. };
  2231. CSelectionObject.prototype.getCellRef=function(){
  2232. return this.m_oCellRef;
  2233. };
  2234. CSelectionObject.prototype.getColumnRP_Name=function(){
  2235. if(this.m_oCellRef!=null){
  2236. return this.m_oCellRef.getAttribute("rp_name");
  2237. }
  2238. };
  2239. CSelectionObject.prototype.getColumnRef=function(){
  2240. return this.m_sColumnRef;
  2241. };
  2242. CSelectionObject.prototype.getColumnName=function(){
  2243. if(this.m_sColumnName==""){
  2244. if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){
  2245. this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]);
  2246. }
  2247. }
  2248. return this.m_sColumnName;
  2249. };
  2250. CSelectionObject.prototype.getDataItemDisplayValue=function(_1c8){
  2251. var _1c9=this.getDataItems();
  2252. var item="";
  2253. if(_1c9&&_1c9[0]&&_1c9[0][0]){
  2254. item=this.getDataItems()[0][0];
  2255. if(_1c8&&_1c8.itemInfo&&_1c8.itemInfo.length){
  2256. var _1cb=_1c8.itemInfo;
  2257. for(var i=0;i<_1cb.length;i++){
  2258. if(_1cb[i].item===item&&_1cb[i].itemLabel){
  2259. return _1cb[i].itemLabel;
  2260. }
  2261. }
  2262. }
  2263. }
  2264. return item;
  2265. };
  2266. CSelectionObject.prototype.getDataItems=function(){
  2267. if(!this.m_aDataItems.length){
  2268. this.fetchContextIds();
  2269. for(var i=0;i<this.m_contextIds.length;++i){
  2270. this.m_aDataItems[this.m_aDataItems.length]=[];
  2271. for(var j=0;j<this.m_contextIds[i].length;++j){
  2272. var _1cf=this.m_contextIds[i][j];
  2273. this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_1cf)?this.m_selectionController.getRefDataItem(_1cf):"");
  2274. }
  2275. }
  2276. }
  2277. return this.m_aDataItems;
  2278. };
  2279. CSelectionObject.prototype.getUseValues=function(){
  2280. if(!this.m_aUseValues.length){
  2281. this.fetchContextIds();
  2282. for(var i=0;i<this.m_contextIds.length;++i){
  2283. this.m_aUseValues[this.m_aUseValues.length]=[];
  2284. for(var j=0;j<this.m_contextIds[i].length;++j){
  2285. var _1d2=this.m_contextIds[i][j];
  2286. this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_1d2)?this.m_selectionController.getUseValue(_1d2):"");
  2287. }
  2288. }
  2289. }
  2290. return this.m_aUseValues;
  2291. };
  2292. CSelectionObject.prototype.getCellTypeId=function(){
  2293. return this.m_sCellTypeId;
  2294. };
  2295. CSelectionObject.prototype.getDisplayValues=function(){
  2296. return this.m_aDisplayValues;
  2297. };
  2298. CSelectionObject.prototype.getLayoutType=function(){
  2299. return this.m_sLayoutType;
  2300. };
  2301. CSelectionObject.prototype.getTag=function(){
  2302. return this.m_sTag;
  2303. };
  2304. CSelectionObject.prototype.getMuns=function(){
  2305. if(!this.m_aMuns.length){
  2306. this.fetchContextIds();
  2307. for(var i=0;i<this.m_contextIds.length;++i){
  2308. this.m_aMuns[this.m_aMuns.length]=[];
  2309. for(var j=0;j<this.m_contextIds[i].length;++j){
  2310. var _1d5=this.m_contextIds[i][j];
  2311. this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_1d5)?this.m_selectionController.getMun(_1d5):"");
  2312. }
  2313. }
  2314. }
  2315. return this.m_aMuns;
  2316. };
  2317. CSelectionObject.prototype.getRefQueries=function(){
  2318. if(!this.m_aRefQueries.length){
  2319. this.fetchContextIds();
  2320. for(var i=0;i<this.m_contextIds.length;++i){
  2321. this.m_aRefQueries[this.m_aRefQueries.length]=[];
  2322. for(var j=0;j<this.m_contextIds[i].length;++j){
  2323. var _1d8=this.m_contextIds[i][j];
  2324. this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_1d8)?this.m_selectionController.getRefQuery(_1d8):"");
  2325. }
  2326. }
  2327. }
  2328. return this.m_aRefQueries;
  2329. };
  2330. CSelectionObject.prototype.getDimensionalItems=function(_1d9){
  2331. var _1da=[];
  2332. this.fetchContextIds();
  2333. for(var i=0;i<this.m_contextIds.length;++i){
  2334. _1da[_1da.length]=[];
  2335. for(var j=0;j<this.m_contextIds[i].length;++j){
  2336. var _1dd=this.m_contextIds[i][j];
  2337. var _1de="";
  2338. if(this.m_selectionController.isContextId(_1dd)){
  2339. switch(_1d9){
  2340. case "hun":
  2341. _1de=this.m_selectionController.getHun(_1dd);
  2342. break;
  2343. case "lun":
  2344. _1de=this.m_selectionController.getLun(_1dd);
  2345. break;
  2346. case "dun":
  2347. _1de=this.m_selectionController.getDun(_1dd);
  2348. break;
  2349. }
  2350. }
  2351. _1da[_1da.length-1].push(_1de);
  2352. }
  2353. }
  2354. return _1da;
  2355. };
  2356. CSelectionObject.prototype.getMetadataItems=function(){
  2357. if(!this.m_aMetadataItems.length){
  2358. this.fetchContextIds();
  2359. for(var i=0;i<this.m_contextIds.length;++i){
  2360. this.m_aMetadataItems[this.m_aMetadataItems.length]=[];
  2361. for(var j=0;j<this.m_contextIds[i].length;++j){
  2362. var _1e1=this.m_contextIds[i][j];
  2363. var _1e2="";
  2364. if(this.m_selectionController.isContextId(_1e1)){
  2365. var sLun=this.m_selectionController.getLun(_1e1);
  2366. var sHun=this.m_selectionController.getHun(_1e1);
  2367. if(sLun&&sLun!=""){
  2368. _1e2=sLun;
  2369. }else{
  2370. if(sHun&&sHun!=""){
  2371. _1e2=sHun;
  2372. }else{
  2373. _1e2=this.m_selectionController.getQueryModelId(_1e1);
  2374. }
  2375. }
  2376. }
  2377. this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_1e2);
  2378. }
  2379. }
  2380. }
  2381. return this.m_aMetadataItems;
  2382. };
  2383. CSelectionObject.prototype.getDrillOptions=function(){
  2384. if(!this.m_aDrillOptions.length){
  2385. this.fetchContextIds();
  2386. for(var i=0;i<this.m_contextIds.length;++i){
  2387. this.m_aDrillOptions[this.m_aDrillOptions.length]=[];
  2388. for(var j=0;j<this.m_contextIds[i].length;++j){
  2389. var _1e7=this.m_contextIds[i][j];
  2390. this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_1e7)?this.m_selectionController.getDrillFlag(_1e7):0);
  2391. }
  2392. }
  2393. }
  2394. return this.m_aDrillOptions;
  2395. };
  2396. CSelectionObject.prototype.getSelectedContextIds=function(){
  2397. return this.m_contextIds;
  2398. };
  2399. CSelectionObject.prototype.fetchContextIds=function(){
  2400. if(!this.m_fetchedContextIds&&this.m_contextIds.length&&this.m_selectionController.hasContextData()){
  2401. var _1e8=[];
  2402. for(var i=0;i<this.m_contextIds.length;i++){
  2403. for(var j=0;j<this.m_contextIds[i].length;j++){
  2404. _1e8.push(this.m_contextIds[i][j]);
  2405. }
  2406. }
  2407. this.m_selectionController.fetchContextData(_1e8);
  2408. this.m_fetchedContextIds=true;
  2409. }
  2410. };
  2411. CSelectionObject.prototype.setSelectionController=function(sc){
  2412. if(sc){
  2413. this.m_selectionController=sc;
  2414. }
  2415. };
  2416. CSelectionObject.prototype.getLayoutElementId=function(){
  2417. return this.m_layoutElementId;
  2418. };
  2419. CSelectionObject.prototype.hasContextInformation=function(){
  2420. for(var i=0;i<this.m_contextIds.length;i++){
  2421. for(var j=0;j<this.m_contextIds[i].length;j++){
  2422. if(this.m_contextIds[i][j].length>0){
  2423. return true;
  2424. }
  2425. }
  2426. }
  2427. return false;
  2428. };
  2429. CSelectionObject.prototype.isHomeCell=function(){
  2430. var _1ee=this.getCellRef().className;
  2431. if(_1ee&&(_1ee=="xm"||_1ee.indexOf("xm ")!=-1||_1ee.indexOf(" xm")!=-1)){
  2432. return true;
  2433. }
  2434. return false;
  2435. };
  2436. CSelectionObject.prototype.getDataContainerType=function(){
  2437. return this.m_dataContainerType;
  2438. };
  2439. CSelectionObject.prototype.getContextJsonObject=function(_1ef,_1f0){
  2440. if(this.m_oJsonContext===null){
  2441. var _1f1={};
  2442. var _1f2=[];
  2443. var _1f3=null;
  2444. this.getDataItems();
  2445. this.getUseValues();
  2446. if(this.m_contextIds.length==0){
  2447. return null;
  2448. }
  2449. var i=0,j=0;
  2450. var _1f6=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ef);
  2451. _1f3=_1f6;
  2452. this._populateJsonContextObj(_1f6,this.m_aUseValues[i][j],_1ef.getDisplayValue(this.m_contextIds[i][j]),_1ef.getMun(this.m_contextIds[i][j]),_1f1,_1f2);
  2453. j++;
  2454. for(;i<this.m_aDataItems.length;i++,j=0){
  2455. for(;j<this.m_aDataItems[i].length;j++){
  2456. _1f6=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ef);
  2457. if(!_1f3){
  2458. _1f3=_1f6;
  2459. }
  2460. this._populateJsonContextObj(_1f6,this.m_aUseValues[i][j],_1ef.getDisplayValue(this.m_contextIds[i][j]),_1ef.getMun(this.m_contextIds[i][j]),_1f1,_1f2);
  2461. }
  2462. }
  2463. this.m_oJsonContext=this._createGenericPayloadStructureJson(_1f3,_1f1,_1f2,_1f0);
  2464. }
  2465. return this.m_oJsonContext;
  2466. };
  2467. CSelectionObject.prototype._getBestPossibleItemName=function(_1f7,_1f8,_1f9){
  2468. var _1fa=null;
  2469. if(_1f9.isMeasure(_1f8)){
  2470. if(!_1f9.isValidColumnTitle(this.m_oCellRef)){
  2471. if(!_1f9.isRelational([_1f8])){
  2472. _1fa=_1f9.getCCDManager().GetBestPossibleDimensionMeasureName(_1f8);
  2473. }
  2474. return (_1fa)?_1fa:_1f7;
  2475. }
  2476. }
  2477. _1fa=_1f9.getCCDManager().GetBestPossibleItemName(_1f8);
  2478. return (_1fa)?_1fa:_1f7;
  2479. };
  2480. CSelectionObject.prototype._isTypeColumnTitle=function(){
  2481. if(this.m_oCellRef&&typeof this.m_oCellRef.getAttribute=="function"){
  2482. return (this.m_oCellRef.getAttribute("type")==="columnTitle");
  2483. }
  2484. return false;
  2485. };
  2486. CSelectionObject.prototype._populateJsonContextObj=function(_1fb,_1fc,_1fd,mun,_1ff,_200){
  2487. if(_1ff&&_200&&_1fb&&typeof _1ff[_1fb]=="undefined"){
  2488. var _201=_1fd?_1fd:_1fc;
  2489. _1ff[_1fb]=[_201];
  2490. var _202={};
  2491. if(_1fd){
  2492. _202["caption"]=_1fd;
  2493. }
  2494. if(mun){
  2495. _202["mun"]=mun;
  2496. }
  2497. if(_1fc){
  2498. _202["use"]=_1fc;
  2499. }
  2500. _200.push(_202);
  2501. }
  2502. };
  2503. CSelectionObject.prototype._createGenericPayloadStructureJson=function(_203,_204,_205,_206){
  2504. if(_203&&_204&&_205){
  2505. var _207=(_206)?_206:".";
  2506. var _208={};
  2507. _208[_207]={"values":_205};
  2508. var obj={"com.ibm.widget.context":{"values":_204},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_203,"itemSpecification":_208}}};
  2509. return obj;
  2510. }
  2511. return null;
  2512. };
  2513. CSelectionObject.prototype.populateSelectionPayload=function(_20a,_20b,_20c){
  2514. this.getDataItems();
  2515. this.getUseValues();
  2516. if(this.m_contextIds.length==0){
  2517. return false;
  2518. }
  2519. _20c=((_20c===undefined)?false:_20c);
  2520. var _20d=this.m_selectionController;
  2521. for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
  2522. var _210=(_20c?1:this.m_aDataItems[i].length);
  2523. for(;j<_210;j++){
  2524. if(!_20d.isMeasure(this.m_contextIds[i][j])){
  2525. var _211=this.m_aDataItems[i][j];
  2526. this._populateItemInSelectionPayload(_211,this.m_aUseValues[i][j],_20d.getDisplayValue(this.m_contextIds[i][j]),_20d.getMun(this.m_contextIds[i][j]),_20a,_20b);
  2527. }
  2528. }
  2529. }
  2530. return true;
  2531. };
  2532. CSelectionObject.prototype._populateItemInSelectionPayload=function(_212,_213,_214,mun,_216,_217){
  2533. if(_216&&_212){
  2534. var _218=_213?_213:_214;
  2535. if(_216[_212]){
  2536. _216[_212].push(_218);
  2537. }else{
  2538. _216[_212]=[_218];
  2539. }
  2540. var _219={};
  2541. _219["caption"]=_218;
  2542. if(mun){
  2543. _219["mun"]=mun;
  2544. }
  2545. var _21a=_217[_212];
  2546. if(!_21a){
  2547. _21a={"values":[]};
  2548. _217[_212]=_21a;
  2549. }
  2550. _21a.values.push(_219);
  2551. }
  2552. };
  2553. CSelectionObject.prototype.getCtxAttributeString=function(){
  2554. return this.m_ctxAttributeString;
  2555. };
  2556. CSelectionObject.prototype.isDataValueOrChartElement=function(){
  2557. return (this.m_sLayoutType==="datavalue"||this.m_sLayoutType==="chartElement");
  2558. };
  2559. CSelectionObject.prototype.marshal=function(_21b,_21c){
  2560. if(!this.m_oJsonForMarshal){
  2561. var _21d={};
  2562. var _21e=[];
  2563. var _21f=null;
  2564. this.getDataItems();
  2565. this.getUseValues();
  2566. if(this.m_contextIds.length==0){
  2567. return null;
  2568. }
  2569. var i=0,j=0;
  2570. if(this.m_contextIds[i][j].length==0){
  2571. var _222=false;
  2572. do{
  2573. for(;j<this.m_contextIds[i].length;j++){
  2574. if(this.m_contextIds[i][j].length>0){
  2575. _222=true;
  2576. break;
  2577. }
  2578. }
  2579. if(!_222){
  2580. j=0;
  2581. i++;
  2582. }
  2583. }while(!_222);
  2584. }
  2585. var _223=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_21b);
  2586. var _224=_21b.isMeasure(this.m_contextIds[i][j]);
  2587. var _225=this._getBestPossibleItemReference(this.m_contextIds[i][j],_224,_21b.getCCDManager());
  2588. var _226=_21b.getCCDManager().GetQuery(this.m_contextIds[i][j]);
  2589. var _227=this.isDataValueOrChartElement();
  2590. var _228=this._populateJsonForMarshal(_223,_225,_224,this.m_aUseValues[i][j],_21b.getDisplayValue(this.m_contextIds[i][j]),_21b.getMun(this.m_contextIds[i][j]),_227);
  2591. j++;
  2592. var _229=[];
  2593. for(;i<this.m_aDataItems.length;i++,j=0){
  2594. for(;j<this.m_aDataItems[i].length;j++){
  2595. _223=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_21b);
  2596. _224=_21b.isMeasure(this.m_contextIds[i][j]);
  2597. _225=this._getBestPossibleItemReference(this.m_contextIds[i][j],_224,_21b.getCCDManager());
  2598. var _22a=this._populateJsonForMarshal(_223,_225,_224,this.m_aUseValues[i][j],_21b.getDisplayValue(this.m_contextIds[i][j]),_21b.getMun(this.m_contextIds[i][j]));
  2599. if(_22a){
  2600. _229.push(_22a);
  2601. }
  2602. }
  2603. }
  2604. var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
  2605. if(lid&&lid.indexOf(_21c)>0){
  2606. lid=lid.substring(0,lid.indexOf(_21c)-1);
  2607. }
  2608. this.m_oJsonForMarshal={"lid":lid,"query":_226,"selectedItem":_228,"context":_229};
  2609. }
  2610. return this.m_oJsonForMarshal;
  2611. };
  2612. CSelectionObject.prototype._populateJsonForMarshal=function(_22c,_22d,_22e,_22f,_230,mun,_232){
  2613. if(_22c){
  2614. var _233={};
  2615. _233["itemName"]=_22c;
  2616. _233["isMeasure"]=_22e?"true":"false";
  2617. _233["mdProperty"]=_22d.mdProperty;
  2618. _233["mdValue"]=_22d.mdValue;
  2619. _233["isDataValueOrChartElement"]=_232?"true":"false";
  2620. if(mun){
  2621. _233["mun"]=mun;
  2622. }
  2623. if(_22f){
  2624. _233["use"]=_22f;
  2625. }
  2626. return _233;
  2627. }
  2628. return null;
  2629. };
  2630. CSelectionObject.prototype._getBestPossibleItemReference=function(_234,_235,_236){
  2631. var _237=null;
  2632. var _238=null;
  2633. if(_235){
  2634. _238="i";
  2635. _237=_236.GetQMID(_234);
  2636. if(_237==null){
  2637. _238="m";
  2638. _237=_236.GetMUN(_234);
  2639. }
  2640. if(_237==null){
  2641. _238="r";
  2642. _237=_236.GetRDIValue(_234);
  2643. }
  2644. }else{
  2645. _238="l";
  2646. _237=_236.GetLUN(_234);
  2647. if(_237==null){
  2648. _238="h";
  2649. _237=_236.GetHUN(_234);
  2650. }
  2651. if(_237==null){
  2652. _238="i";
  2653. _237=_236.GetQMID(_234);
  2654. }
  2655. if(_237==null){
  2656. _238="r";
  2657. _237=_236.GetRDIValue(_234);
  2658. }
  2659. }
  2660. return {"mdProperty":_238,"mdValue":_237};
  2661. };
  2662. CSelectionChartObject.prototype=new CSelectionObject();
  2663. CSelectionChartObject.prototype.constructor=CSelectionChartObject;
  2664. CSelectionChartObject.baseclass=CSelectionObject.prototype;
  2665. function CSelectionChartObject(){
  2666. CSelectionChartObject.baseclass.initialize.call(this);
  2667. this.m_chartArea=null;
  2668. this.m_context="";
  2669. this.m_chartCtxAreas=[];
  2670. this.m_selectedVizChart=false;
  2671. };
  2672. CSelectionChartObject.prototype.isSelectionOnVizChart=function(){
  2673. return this.m_selectedVizChart;
  2674. };
  2675. CSelectionChartObject.prototype.setSelectionOnVizChart=function(_239){
  2676. var _23a=this.m_selectionController.getSelectedChartImageFromChartArea(_239);
  2677. if(_23a){
  2678. this.m_selectedVizChart=_23a.parentNode.getAttribute("vizchart")=="true"?true:false;
  2679. }
  2680. };
  2681. CSelectionChartObject.prototype.getArea=function(){
  2682. return this.m_chartArea;
  2683. };
  2684. CSelectionChartObject.prototype.getContext=function(){
  2685. return this.m_context;
  2686. };
  2687. CSelectionChartObject.prototype.getCtxAreas=function(){
  2688. return this.m_chartCtxAreas;
  2689. };
  2690. CSelectionChartObject.prototype.setCtxAreas=function(_23b){
  2691. this.m_chartCtxAreas=_23b;
  2692. };
  2693. CSelectionChartObject.prototype.getCtxAttributeString=function(){
  2694. return this.m_context;
  2695. };
  2696. function CChartHelper(_23c,_23d,_23e){
  2697. var _23f=_23c.parentNode;
  2698. this.m_selectionObjectFactory=_23d;
  2699. this.m_map=_23f;
  2700. _23e.loadExtra();
  2701. this.imageMapHighlighter=new CImageMapHighlight(_23f,_23e.sWebContentRoot);
  2702. this.initialize();
  2703. };
  2704. CChartHelper.prototype.initialize=function(){
  2705. this.buildMapCtxAreas();
  2706. this.m_chartCtxNodes={};
  2707. };
  2708. CChartHelper.prototype.buildMapCtxAreas=function(){
  2709. var _240={};
  2710. var _241=this.m_map.childNodes;
  2711. var _242=_241.length;
  2712. var _243=null;
  2713. for(var i=0;i<_242;i++){
  2714. var a=_241[i];
  2715. _243=a.getAttribute("ctx");
  2716. if(_243){
  2717. if(_240[_243]){
  2718. _240[_243].push(a);
  2719. }else{
  2720. _240[_243]=[a];
  2721. }
  2722. }
  2723. }
  2724. this.m_ctxAreas=_240;
  2725. };
  2726. CChartHelper.prototype.getChartNode=function(_246){
  2727. if(!this.isAreaInitialized(_246)){
  2728. var _247=_246.parentNode;
  2729. this.m_map=_247;
  2730. this.initialize();
  2731. this.imageMapHighlighter.initialize(_247);
  2732. }
  2733. var _248=_246.getAttribute("ctx");
  2734. if(!this.m_chartCtxNodes[_248]){
  2735. this.m_chartCtxNodes[_248]=this.m_selectionObjectFactory.getSelectionChartObject(_246);
  2736. this.m_chartCtxNodes[_248].setCtxAreas(this.m_ctxAreas[_248]);
  2737. }
  2738. return this.m_chartCtxNodes[_248];
  2739. };
  2740. CChartHelper.prototype.isAreaInitialized=function(_249){
  2741. return this.imageMapHighlighter.isAreaInitialized(_249);
  2742. };
  2743. CChartHelper.prototype.getImageMapHighlighter=function(){
  2744. return this.imageMapHighlighter;
  2745. };
  2746. function CSelectionObjectFactory(_24a){
  2747. this.m_selectionController=_24a;
  2748. };
  2749. CSelectionObjectFactory.prototype.getSelectionController=function(){
  2750. return this.m_selectionController;
  2751. };
  2752. CSelectionObjectFactory.prototype.getChildSpans=function(_24b){
  2753. var _24c=[];
  2754. for(var i=0;i<_24b.childNodes.length;i++){
  2755. var _24e=_24b.childNodes[i];
  2756. if(!_24e.getAttribute||_24e.getAttribute("skipSelection")!="true"){
  2757. _24c.push(_24b.childNodes[i]);
  2758. }
  2759. }
  2760. var _24f=_24b;
  2761. var _250="";
  2762. while(!_250&&_24f){
  2763. _250=_24f.attributes?_24f.attributes["LID"]:"";
  2764. _24f=_24f.parentNode;
  2765. }
  2766. _250=_250?_250.value:"";
  2767. var _251=[];
  2768. while(_24c.length>0){
  2769. var _24e=_24c.pop();
  2770. var lid=_24e.attributes?_24e.attributes["LID"]:"";
  2771. lid=lid?lid.value:"";
  2772. if(!lid||lid==_250){
  2773. if(_24e.nodeName.toLowerCase()=="span"){
  2774. _251.push(_24e);
  2775. }else{
  2776. for(i=0;i<_24e.childNodes.length;i++){
  2777. _24c.push(_24e.childNodes[i]);
  2778. }
  2779. }
  2780. }
  2781. }
  2782. return _251;
  2783. };
  2784. CSelectionObjectFactory.prototype.getSelectionObject=function(_253,_254){
  2785. var _255=new CSelectionObject();
  2786. try{
  2787. _255.setSelectionController(this.getSelectionController());
  2788. _255.m_oCellRef=_253;
  2789. _255.m_sColumnRef=_253.getAttribute("cid");
  2790. _255.m_sCellTypeId=_253.getAttribute("uid");
  2791. _255.m_sLayoutType=_253.getAttribute("type");
  2792. _255.m_sTag=_253.getAttribute("tag");
  2793. _255.m_layoutElementId=this.getLayoutElementId(_253);
  2794. _255.m_dataContainerType=this.getContainerType(_253);
  2795. if(typeof cf!="undefined"){
  2796. var _256=cf.cfgGet("MiniQueryObj");
  2797. if(_256){
  2798. var _257=_256.findChildWithAttribute("tag",_255.m_sTag);
  2799. if(_257&&_257.getAttribute("id")!=null){
  2800. _255.m_sColumnName=_257.getAttribute("id");
  2801. }
  2802. }
  2803. }
  2804. var _258=this.getChildSpans(_253);
  2805. if(_258.length>0){
  2806. for(var i=0;i<_258.length;i++){
  2807. var _25a=_258[i];
  2808. if(_25a.nodeType==1&&_25a.nodeName.toLowerCase()=="span"&&_25a.style.visibility!="hidden"){
  2809. var _25b=null;
  2810. if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""){
  2811. _25b=_253;
  2812. }else{
  2813. if(_25a.getAttribute("ctx")!=null&&_25a.getAttribute("ctx")!=""){
  2814. _25b=_25a;
  2815. }else{
  2816. if(_25a.getAttribute("dtTargets")&&_25a.childNodes&&_25a.childNodes.length){
  2817. for(var _25c=0;_25c<_25a.childNodes.length;_25c++){
  2818. if(_25a.childNodes[_25c].nodeType==1&&_25a.childNodes[_25c].style.visibility!="hidden"){
  2819. _25b=_25a.childNodes[_25c];
  2820. }
  2821. }
  2822. }else{
  2823. for(var _25d=0;_25d<_25a.childNodes.length;_25d++){
  2824. var _25e=_25a.childNodes[_25d];
  2825. if(typeof _25e.getAttribute!="undefined"&&_25e.getAttribute("ctx")!=null&&_25e.getAttribute("ctx")!=""){
  2826. _25b=_25e;
  2827. break;
  2828. }
  2829. }
  2830. }
  2831. }
  2832. }
  2833. var _25f="";
  2834. if(_25b&&_25b.getAttribute("ctx")){
  2835. _25f=_25b.getAttribute("ctx");
  2836. }
  2837. _255.m_aDisplayValues[_255.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_25f,_253.parentNode);
  2838. if(typeof _254!="undefined"&&_254!=_25f){
  2839. continue;
  2840. }
  2841. _255=this.processCTX(_255,_25f);
  2842. }
  2843. }
  2844. }else{
  2845. if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""&&_255.m_sLayoutType=="datavalue"){
  2846. _255=this.processCTX(_255,_253.getAttribute("ctx"));
  2847. }
  2848. }
  2849. this.getSelectionController().processColumnTitleNode(_255);
  2850. }
  2851. catch(ex){
  2852. }
  2853. return _255;
  2854. };
  2855. CSelectionObjectFactory.prototype.processCTX=function(_260,_261){
  2856. if(typeof _261!="string"||_261.length==0){
  2857. return _260;
  2858. }
  2859. var ctx;
  2860. if(typeof _260.m_contextIds=="object"&&_260.m_contextIds!==null&&_260.m_contextIds.length>0){
  2861. var _263=_261.split("::");
  2862. for(ctx=0;ctx<_260.m_contextIds.length;++ctx){
  2863. try{
  2864. if(_263[ctx]){
  2865. _260.m_contextIds[ctx]=_260.m_contextIds[ctx].concat(_263[ctx].split(":"));
  2866. }
  2867. }
  2868. catch(e){
  2869. }
  2870. }
  2871. }else{
  2872. _260.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_261);
  2873. }
  2874. _260.m_ctxAttributeString=_261;
  2875. return _260;
  2876. };
  2877. CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_265,_266){
  2878. if(!_266){
  2879. _266=document;
  2880. }
  2881. var _267=new CSelectionObject();
  2882. _267.setSelectionController(this.getSelectionController());
  2883. _267.m_oCellRef=null;
  2884. _267.m_sColumnRef=null;
  2885. _267.m_sCellTypeId=null;
  2886. _267.refQuery="";
  2887. var _268=_266.getElementsByTagName("td");
  2888. for(var i=0;i<_268.length;i++){
  2889. var _26a=_268[i].getAttribute("tag");
  2890. if(_26a!=null&&_26a!=""){
  2891. if(tag==_26a){
  2892. var _26b=_268[i].className;
  2893. if(_26b!=null&&_26a!=""){
  2894. if((_265=="columnTitle"&&_26b=="lt")||(_265=="datavalue"&&_26b=="lc")){
  2895. _267.m_sColumnRef=_268[i].getAttribute("cid");
  2896. _267.m_sCellTypeId=_268[i].getAttribute("uid");
  2897. break;
  2898. }
  2899. }
  2900. }
  2901. }
  2902. }
  2903. if(_267.m_sCellTypeId==null){
  2904. return null;
  2905. }
  2906. return _267;
  2907. };
  2908. CSelectionObjectFactory.prototype.getSelectionChartObject=function(_26c){
  2909. var _26d="";
  2910. if(_26c.getAttribute("flashChart")!=null){
  2911. if(typeof _26c.getCtx!="undefined"){
  2912. try{
  2913. _26d=_26c.getCtx();
  2914. }
  2915. catch(e){
  2916. _26d="";
  2917. }
  2918. }
  2919. }else{
  2920. _26d=_26c.getAttribute("ctx");
  2921. }
  2922. var _26e=new CSelectionChartObject();
  2923. _26e.setSelectionController(this.getSelectionController());
  2924. if(_26d!=null){
  2925. _26e.m_contextIds=_26d.split("::");
  2926. for(var ctx=0;ctx<_26e.m_contextIds.length;++ctx){
  2927. _26e.m_contextIds[ctx]=_26e.m_contextIds[ctx].split(":");
  2928. }
  2929. }
  2930. _26e.m_layoutElementId=this.getLayoutElementId(_26c);
  2931. _26e.m_sLayoutType=_26c.getAttribute("type");
  2932. _26e.m_chartArea=_26c;
  2933. _26e.m_context=_26d;
  2934. _26e.setSelectionOnVizChart(_26c);
  2935. return _26e;
  2936. };
  2937. CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_270){
  2938. var _271="";
  2939. switch(_270){
  2940. case "ls":
  2941. _271="list";
  2942. break;
  2943. case "xt":
  2944. _271="crosstab";
  2945. break;
  2946. case "rt":
  2947. _271="repeaterTable";
  2948. break;
  2949. }
  2950. return _271;
  2951. };
  2952. CSelectionObjectFactory.prototype.getContainerType=function(el){
  2953. var type="";
  2954. if(el){
  2955. if(el.className){
  2956. type=this.getContainerTypeFromClass(el.className);
  2957. }
  2958. if(!type){
  2959. var _274=el.parentNode;
  2960. if(_274){
  2961. type=this.getContainerType(_274);
  2962. }
  2963. }
  2964. }
  2965. return type;
  2966. };
  2967. CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
  2968. var id="";
  2969. var _277=this.getSelectionController().getNamespace();
  2970. if(el){
  2971. if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
  2972. for(var _278=0;_278<el.childNodes.length;_278++){
  2973. var _279=el.childNodes[_278];
  2974. if(_279.nodeName.toLowerCase()=="img"&&_279.getAttribute("lid")!=null){
  2975. return _279.getAttribute("lid");
  2976. }
  2977. }
  2978. }
  2979. id=(el.getAttribute&&el.getAttribute("LID"))||"";
  2980. if(!id){
  2981. var _27a=el.parentNode;
  2982. if(_27a){
  2983. id=this.getLayoutElementId(_27a);
  2984. }
  2985. }else{
  2986. if(el.tagName.toUpperCase()=="MAP"){
  2987. id=id.replace(_277,"");
  2988. id=_277+id;
  2989. var _27b="#"+id;
  2990. var _27c=getElementsByAttribute(el.parentNode,"IMG","usemap",_27b);
  2991. if(_27c.length>0){
  2992. id=_27c[0].getAttribute("LID");
  2993. }
  2994. }
  2995. }
  2996. }
  2997. return id;
  2998. };
  2999. function CSelectionController(_27d,_27e){
  3000. this.m_bSelectionBasedFeaturesEnabled=false;
  3001. this.m_bDrillUpDownEnabled=false;
  3002. this.m_bModelDrillThroughEnabled=false;
  3003. this.m_oCognosViewer=null;
  3004. this.m_bSavedSelections=false;
  3005. if(_27e){
  3006. this.m_oCognosViewer=_27e;
  3007. }
  3008. this.initialize(_27d);
  3009. this.FILTER_SELECTION_STYLE=0;
  3010. this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
  3011. };
  3012. CSelectionController.prototype.initialize=function(_27f){
  3013. this.m_sNamespace=_27f;
  3014. this.m_aCutColumns=[];
  3015. this.m_aSelectedObjects=[];
  3016. this.m_selectedClass=[];
  3017. this.m_cutClass=[];
  3018. this.m_oObserver=new CObserver(this);
  3019. this.m_bSelectionArraysSetup=false;
  3020. this.m_aSelectionHoverNodes=[];
  3021. this.m_bUsingCCDManager=false;
  3022. this.m_aReportMetadataArray=[];
  3023. this.m_aReportContextDataArray=[];
  3024. this.m_oCDManager=new CCDManager();
  3025. this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this);
  3026. this.m_selectedChartArea=null;
  3027. this.m_selectedChartNodes=[];
  3028. this.m_selectionContainerMap=null;
  3029. this.m_chartHelpers={};
  3030. if(this.m_oCognosViewer!=null){
  3031. this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer);
  3032. }
  3033. this.m_maxSecondarySelection=-1;
  3034. this.c_usageMeasure="2";
  3035. this.m_ccl_dateTypes={59:"dateTime",60:"interval"};
  3036. this.m_selectionStyles=new CSelectionDefaultStyles(this);
  3037. this.m_originalSelectionStyles=this.m_selectionStyles;
  3038. this.m_bAllowHorizontalDataValueSelection=false;
  3039. };
  3040. CSelectionController.prototype.secondarySelectionIsDisabled=function(){
  3041. return this.m_selectionStyles.secondarySelectionIsDisabled();
  3042. };
  3043. CSelectionController.prototype.getPrimarySelectionColor=function(){
  3044. return this.m_selectionStyles.getPrimarySelectionColor();
  3045. };
  3046. CSelectionController.prototype.getHighContrastBorderStyle=function(){
  3047. return this.m_selectionStyles.getHighContrastBorderStyle();
  3048. };
  3049. CSelectionController.prototype.getSecondarySelectionColor=function(){
  3050. return this.m_selectionStyles.getSecondarySelectionColor();
  3051. };
  3052. CSelectionController.prototype.resetSelectionStyles=function(){
  3053. this.setSelectionStyles();
  3054. };
  3055. CSelectionController.prototype.setSelectionStyles=function(_280){
  3056. switch(_280){
  3057. case this.FILTER_SELECTION_STYLE:
  3058. if(!this.m_selectionFilterStyles){
  3059. this.m_selectionFilterStyles=new CSelectionFilterStyles(this);
  3060. }
  3061. this.m_selectionStyles=this.m_selectionFilterStyles;
  3062. break;
  3063. case this.FILTER_SELECTION_CONTEXT_MENU_STYLE:
  3064. if(!this.m_selectionFilterContextMenuStyles){
  3065. this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this);
  3066. }
  3067. this.m_selectionStyles=this.m_selectionFilterContextMenuStyles;
  3068. break;
  3069. default:
  3070. this.m_selectionStyles=this.m_originalSelectionStyles;
  3071. }
  3072. };
  3073. CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){
  3074. this.m_bAllowHorizontalDataValueSelection=false;
  3075. };
  3076. CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_281){
  3077. this.m_bAllowHorizontalDataValueSelection=_281;
  3078. };
  3079. CSelectionController.prototype.allowHorizontalDataValueSelection=function(){
  3080. return this.m_bAllowHorizontalDataValueSelection;
  3081. };
  3082. CSelectionController.prototype.clearSelectionData=function(){
  3083. this.m_aSelectedObjects=[];
  3084. this.m_selectedChartNodes=[];
  3085. this.m_oSelectedDrillThroughImage=null;
  3086. this.m_oSelectedDrillThroughSingleton=null;
  3087. };
  3088. CSelectionController.prototype.getCCDManager=function(){
  3089. return this.m_oCDManager;
  3090. };
  3091. CSelectionController.prototype.getCtxIdFromDisplayValue=function(_282){
  3092. if(!this.m_bUsingCCDManager){
  3093. var _283=this.getReportContextDataArray();
  3094. var _284=1;
  3095. for(var _285 in _283){
  3096. var _286=_283[_285];
  3097. if(_286[_284]==_282){
  3098. return _285;
  3099. }
  3100. }
  3101. return "";
  3102. }else{
  3103. var sId=this.m_oCDManager.GetContextIdForDisplayValue(_282);
  3104. return (sId==null)?"":sId;
  3105. }
  3106. };
  3107. CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_28a){
  3108. return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_28a);
  3109. };
  3110. CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){
  3111. var sLun=lun;
  3112. var sHun=hun;
  3113. if(mun&&mun.indexOf("->:[TM].")>0){
  3114. sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun);
  3115. sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun);
  3116. }
  3117. return {"lun":sLun,"hun":sHun};
  3118. };
  3119. CSelectionController.prototype.getCtxIdFromMun=function(sMun){
  3120. if(!this.m_bUsingCCDManager){
  3121. var _291=this.getReportMetadataArray();
  3122. var _292=0;
  3123. for(var sKey in _291){
  3124. var _294=_291[sKey];
  3125. if(_294[_292]==sMun){
  3126. var _295=2;
  3127. var _296=this.getReportContextDataArray();
  3128. for(var _297 in _296){
  3129. var _298=_296[_297];
  3130. if(_298[_295]==sKey){
  3131. return _297;
  3132. }
  3133. }
  3134. }
  3135. }
  3136. return "";
  3137. }else{
  3138. var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
  3139. return (sId==null)?"":sId;
  3140. }
  3141. };
  3142. CSelectionController.prototype.canDrillDown=function(_29a){
  3143. var _29b=this.getDrillFlagForMember(_29a);
  3144. return (_29b==3||_29b==2);
  3145. };
  3146. CSelectionController.prototype.canDrillUp=function(_29c){
  3147. var _29d=this.getDrillFlagForMember(_29c);
  3148. return (_29d==3||_29d==1);
  3149. };
  3150. CSelectionController.prototype.getQueryModelId=function(_29e){
  3151. var qmid="";
  3152. if(!this.m_bUsingCCDManager){
  3153. var _2a0=this.m_aReportContextDataArray[_29e];
  3154. if(_2a0&&typeof _2a0[3]!="undefined"){
  3155. var _2a1=_2a0[3];
  3156. var _2a2=this.m_aReportMetadataArray[_2a1];
  3157. if(typeof _2a2!="undefined"&&typeof _2a2[1]!="undefined"&&_2a2[1]=="I"){
  3158. qmid=_2a2[0];
  3159. }
  3160. }
  3161. }else{
  3162. qmid=this.m_oCDManager.GetQMID(_29e);
  3163. }
  3164. return qmid;
  3165. };
  3166. CSelectionController.prototype.getRefQuery=function(_2a3){
  3167. if(!this.m_bUsingCCDManager){
  3168. return this.getMetaDataItemUseValue(4,_2a3);
  3169. }else{
  3170. var _2a4=this.m_oCDManager.GetQuery(_2a3);
  3171. return (_2a4==null)?"":_2a4;
  3172. }
  3173. };
  3174. CSelectionController.prototype.getRefDataItem=function(_2a5){
  3175. return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_2a5);
  3176. };
  3177. CSelectionController.prototype.getMun=function(_2a6){
  3178. return this.m_oCognosViewer.getReportContextHelper().getMun(_2a6);
  3179. };
  3180. CSelectionController.prototype.getHun=function(_2a7){
  3181. if(!this.m_bUsingCCDManager){
  3182. var sHun=null;
  3183. var _2a9=this.getRDI(_2a7);
  3184. if(_2a9&&_2a9.length>4&&_2a9[1]=="R"){
  3185. var _2aa=_2a9[4];
  3186. var _2ab=this.getReportMetadataArray();
  3187. _2a9=_2ab[_2aa];
  3188. }
  3189. if(_2a9&&_2a9.length>1&&_2a9[1]=="H"){
  3190. sHun=_2a9[0];
  3191. }
  3192. return sHun;
  3193. }else{
  3194. return this.m_oCDManager.GetHUN(_2a7);
  3195. }
  3196. };
  3197. CSelectionController.prototype.fetchContextData=function(_2ac,_2ad){
  3198. var _2ae=0;
  3199. if(this.m_bUsingCCDManager){
  3200. _2ae=this.m_oCDManager.FetchContextData(_2ac,_2ad);
  3201. }
  3202. return _2ae;
  3203. };
  3204. CSelectionController.prototype.getMetaDataItem=function(sKey){
  3205. var _2b0=this.getReportMetadataArray();
  3206. if(typeof _2b0[sKey]!="undefined"){
  3207. return _2b0[sKey];
  3208. }
  3209. return null;
  3210. };
  3211. CSelectionController.prototype.getContextDataItem=function(_2b1){
  3212. var _2b2=this.getReportContextDataArray();
  3213. if(typeof _2b2[_2b1]!="undefined"){
  3214. return _2b2[_2b1];
  3215. }
  3216. return null;
  3217. };
  3218. CSelectionController.prototype.getMetaDataItemUseValue=function(_2b3,_2b4){
  3219. var _2b5=this.getContextDataItem(_2b4);
  3220. if(_2b5!=null){
  3221. var _2b6=_2b5[_2b3];
  3222. if(_2b6!=""){
  3223. var _2b7=this.getMetaDataItem(_2b6);
  3224. if(_2b7!=null){
  3225. return _2b7[0];
  3226. }
  3227. }
  3228. }
  3229. return "";
  3230. };
  3231. CSelectionController.prototype.getRDI=function(_2b8){
  3232. var _2b9=this.getContextDataItem(_2b8);
  3233. if(_2b9!=null){
  3234. var _2ba=_2b9[0];
  3235. if(_2ba!=""){
  3236. var _2bb=this.getMetaDataItem(_2ba);
  3237. if(_2bb!=null){
  3238. return _2bb;
  3239. }
  3240. }
  3241. }
  3242. };
  3243. CSelectionController.prototype.getNamespace=function(){
  3244. return this.m_sNamespace;
  3245. };
  3246. CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_2bc){
  3247. this.m_bSelectionBasedFeaturesEnabled=_2bc;
  3248. };
  3249. CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
  3250. return this.m_bSelectionBasedFeaturesEnabled;
  3251. };
  3252. CSelectionController.prototype.setDrillUpDownEnabled=function(_2bd){
  3253. this.m_bDrillUpDownEnabled=_2bd;
  3254. };
  3255. CSelectionController.prototype.getDrillUpDownEnabled=function(){
  3256. return this.m_bDrillUpDownEnabled;
  3257. };
  3258. CSelectionController.prototype.setModelDrillThroughEnabled=function(_2be){
  3259. this.m_bModelDrillThroughEnabled=_2be;
  3260. };
  3261. CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
  3262. var _2bf=this.getAllSelectedObjects();
  3263. if(_2bf&&_2bf.length>0){
  3264. var _2c0=_2bf[0];
  3265. if(_2c0.hasContextInformation()){
  3266. var _2c1=this.m_oCDManager.GetBIValue(_2c0.m_contextIds[0][0]);
  3267. if(!_2c1){
  3268. return null;
  3269. }
  3270. return _2c1;
  3271. }
  3272. }
  3273. return null;
  3274. };
  3275. CSelectionController.prototype.getModelPathForCurrentSelection=function(){
  3276. var _2c2=null;
  3277. var _2c3=this.getBookletItemForCurrentSelection();
  3278. if(_2c3){
  3279. var _2c2=this.m_oCDManager.getModelPathFromBookletItem(_2c3);
  3280. }
  3281. return _2c2;
  3282. };
  3283. CSelectionController.prototype.getModelDrillThroughEnabled=function(){
  3284. var _2c4=this.getBookletItemForCurrentSelection();
  3285. if(_2c4){
  3286. var _2c5=this.m_oCDManager.GetBookletModelBasedDrillThru(_2c4);
  3287. return _2c5==1?true:false;
  3288. }else{
  3289. return this.m_bModelDrillThroughEnabled;
  3290. }
  3291. };
  3292. CSelectionController.prototype.clearSelectedObjects=function(_2c6){
  3293. try{
  3294. if(!_2c6){
  3295. _2c6=document;
  3296. }
  3297. this.updateUI(_2c6,this.getSelections(),true,false);
  3298. this.m_aSelectedObjects=[];
  3299. if(typeof this.onSelectionChange=="function"){
  3300. this.onSelectionChange();
  3301. }
  3302. return true;
  3303. }
  3304. catch(e){
  3305. return false;
  3306. }
  3307. };
  3308. CSelectionController.prototype.resetSelections=function(_2c7){
  3309. try{
  3310. if(!_2c7){
  3311. _2c7=document;
  3312. }
  3313. if(this.hasSelectedChartNodes()){
  3314. this.resetChartSelections(_2c7);
  3315. }
  3316. this.m_oSelectedDrillThroughImage=null;
  3317. this.m_oSelectedDrillThroughSingleton=null;
  3318. if(this.getSelections()){
  3319. this.updateUI(_2c7,this.getSelections(),true,false);
  3320. this.updateUI(_2c7,this.getCutColumns(),true,false);
  3321. this.m_aCutColumns=[];
  3322. this.m_aSelectedObjects=[];
  3323. this.m_selectedClass=[];
  3324. this.m_cutClass=[];
  3325. if(typeof this.onSelectionChange=="function"){
  3326. this.onSelectionChange();
  3327. }
  3328. }
  3329. return true;
  3330. }
  3331. catch(e){
  3332. return false;
  3333. }
  3334. };
  3335. CSelectionController.prototype.resetChartSelections=function(_2c8){
  3336. var _2c9=this.m_chartHelpers;
  3337. for(var _2ca in _2c9){
  3338. if(_2c9[_2ca]){
  3339. var _2cb=_2c9[_2ca].getImageMapHighlighter();
  3340. if(_2cb.hideAllAreas){
  3341. _2cb.hideAllAreas();
  3342. }
  3343. }
  3344. }
  3345. this.m_selectedChartNodes=[];
  3346. this.m_selectionContainerMap=null;
  3347. };
  3348. CSelectionController.prototype.addSelectionObject=function(_2cc,_2cd){
  3349. try{
  3350. if(!_2cd){
  3351. _2cd=document;
  3352. }
  3353. var _2ce=_2cc.getCellRef();
  3354. if(this.isCellSelected(_2ce)!==true||(typeof _2ce!="object"||_2ce===null)){
  3355. if(this.isColumnCut(_2cc.getTag())!==true){
  3356. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_2cc;
  3357. if(typeof this.onSelectionChange=="function"){
  3358. this.onSelectionChange();
  3359. }
  3360. this.updateUI(_2cd,this.getSelections(),false,false);
  3361. }
  3362. }
  3363. return true;
  3364. }
  3365. catch(e){
  3366. return false;
  3367. }
  3368. };
  3369. CSelectionController.prototype.removeSelectionObject=function(_2cf,_2d0){
  3370. try{
  3371. if(!_2d0){
  3372. _2d0=document;
  3373. }
  3374. var _2d1=[];
  3375. var _2d2;
  3376. for(_2d2=0;_2d2<this.m_aSelectedObjects.length;_2d2++){
  3377. var _2d3=this.m_aSelectedObjects[_2d2].getCellRef();
  3378. var _2d4=_2cf.getCellRef();
  3379. if(typeof _2d3=="object"&&typeof _2d4=="object"&&_2d3!==null&&_2d4!==null){
  3380. if(_2d3==_2d4){
  3381. _2d1[_2d1.length]=_2d2;
  3382. }
  3383. }
  3384. }
  3385. if(_2d1.length>0){
  3386. this.updateUI(_2d0,this.getSelections(),true,false);
  3387. var _2d5=[];
  3388. for(_2d2=0;_2d2<this.m_aSelectedObjects.length;_2d2++){
  3389. var _2d6=true;
  3390. for(var j=0;j<_2d1.length;j++){
  3391. if(_2d2==_2d1[j]){
  3392. _2d6=false;
  3393. }
  3394. }
  3395. if(_2d6){
  3396. _2d5[_2d5.length]=this.m_aSelectedObjects[_2d2];
  3397. }
  3398. }
  3399. this.m_aSelectedObjects=_2d5;
  3400. this.updateUI(_2d0,this.getSelections(),false,false);
  3401. }
  3402. if(typeof this.onSelectionChange=="function"){
  3403. this.onSelectionChange();
  3404. }
  3405. return true;
  3406. }
  3407. catch(e){
  3408. return false;
  3409. }
  3410. };
  3411. CSelectionController.prototype.isSavedCellSelected=function(_2d8){
  3412. return this.isCellSelectedHelper(_2d8,this.getSavedSelectedObjects());
  3413. };
  3414. CSelectionController.prototype.isCellSelected=function(_2d9){
  3415. return this.isCellSelectedHelper(_2d9,this.getSelections());
  3416. };
  3417. CSelectionController.prototype.isCellSelectedHelper=function(_2da,_2db){
  3418. try{
  3419. for(var i=0;i<_2db.length;i++){
  3420. var _2dd=_2db[i].getCellRef();
  3421. if(typeof _2dd=="object"&&_2dd!==null){
  3422. if(_2dd==_2da){
  3423. return true;
  3424. }
  3425. }
  3426. }
  3427. }
  3428. catch(e){
  3429. }
  3430. return false;
  3431. };
  3432. CSelectionController.prototype.isColumnSelected=function(_2de){
  3433. try{
  3434. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  3435. if(this.m_aSelectedObjects[i].getTag()==_2de){
  3436. return true;
  3437. }
  3438. }
  3439. }
  3440. catch(e){
  3441. }
  3442. return false;
  3443. };
  3444. CSelectionController.prototype.isColumnCut=function(_2e0){
  3445. try{
  3446. for(var i=0;i<this.m_aCutColumns.length;i++){
  3447. if(this.m_aCutColumns[i].getTag()==_2e0){
  3448. return true;
  3449. }
  3450. }
  3451. }
  3452. catch(e){
  3453. }
  3454. return false;
  3455. };
  3456. CSelectionController.prototype.getSelections=function(){
  3457. return this.m_aSelectedObjects;
  3458. };
  3459. CSelectionController.prototype.selectSingleDomNode=function(_2e2){
  3460. this.clearSelectedObjects();
  3461. var _2e3=this.getSelectionObjectFactory().getSelectionObject(_2e2);
  3462. var _2e4=null;
  3463. if(isIE()){
  3464. _2e4=_2e2.document;
  3465. }else{
  3466. _2e4=_2e2.ownerDocument;
  3467. }
  3468. this.addSelectionObject(_2e3,_2e4);
  3469. };
  3470. CSelectionController.prototype.hasCutColumns=function(){
  3471. if(this.m_aCutColumns.length===0){
  3472. return false;
  3473. }else{
  3474. return true;
  3475. }
  3476. };
  3477. CSelectionController.prototype.setCutColumns=function(_2e5,_2e6){
  3478. try{
  3479. if(!_2e6){
  3480. _2e6=document;
  3481. }
  3482. this.updateUI(_2e6,this.getSelections(),true,false);
  3483. this.updateUI(_2e6,this.getCutColumns(),true,1);
  3484. this.m_aCutColumns=[];
  3485. if(_2e5===true){
  3486. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  3487. this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
  3488. }
  3489. this.m_aSelectedObjects=[];
  3490. }
  3491. this.updateUI(_2e6,this.getCutColumns(),false,2);
  3492. return true;
  3493. }
  3494. catch(e){
  3495. return false;
  3496. }
  3497. };
  3498. CSelectionController.prototype.getCutColumns=function(){
  3499. return this.m_aCutColumns;
  3500. };
  3501. CSelectionController.prototype.getObservers=function(){
  3502. return this.m_oObserver;
  3503. };
  3504. CSelectionController.prototype.attachObserver=function(_2e8){
  3505. this.m_oObserver.attach(_2e8);
  3506. };
  3507. CSelectionController.prototype.onSelectionChange=function(){
  3508. this.getObservers().notify();
  3509. };
  3510. CSelectionController.prototype.getSelectedColumns=function(_2e9){
  3511. var _2ea=[];
  3512. if(typeof _2e9=="undefined"){
  3513. _2e9=this.getSelections();
  3514. }
  3515. var _2eb=_2e9.length;
  3516. for(var i=0;i<_2eb;i++){
  3517. var _2ed=_2e9[i];
  3518. var _2ee=true;
  3519. for(var j=0;j<_2ea.length;j++){
  3520. if(_2ea[j][0]==_2ed.getColumnRef()&&_2ea[j][1]==_2ed.getCellTypeId()){
  3521. _2ee=false;
  3522. break;
  3523. }
  3524. }
  3525. if(_2ee){
  3526. _2ea[_2ea.length]=[_2ed.getColumnRef(),_2ed.getCellTypeId(),_2ed.getLayoutType(),_2ed.getTag(),_2ed.getColumnName()];
  3527. }
  3528. }
  3529. return _2ea;
  3530. };
  3531. CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
  3532. var _2f0=[];
  3533. var _2f1=this.getAllSelectedObjects();
  3534. for(var i=0;i<_2f1.length;i++){
  3535. var _2f3=false;
  3536. var _2f4=_2f1[i];
  3537. for(var ii=0;ii<_2f0.length;ii++){
  3538. if(_2f4.m_contextIds[0][0]==_2f0[ii].m_contextIds[0][0]){
  3539. _2f3=true;
  3540. break;
  3541. }
  3542. }
  3543. if(!_2f3){
  3544. _2f0.push(_2f4);
  3545. }
  3546. }
  3547. return _2f0;
  3548. };
  3549. CSelectionController.prototype.getAllSelectedObjects=function(){
  3550. var _2f6=this.getSelections();
  3551. if(this.hasSelectedChartNodes()){
  3552. _2f6=_2f6.concat(this.getSelectedChartNodes());
  3553. }
  3554. return _2f6;
  3555. };
  3556. CSelectionController.prototype.getSelectedColumnIds=function(_2f7){
  3557. var _2f8=[];
  3558. if(typeof _2f7=="undefined"){
  3559. _2f7=this.getSelections();
  3560. }
  3561. var _2f9=this.getSelectedColumns(_2f7);
  3562. for(var _2fa=0;_2fa<_2f9.length;_2fa++){
  3563. var _2fb=true;
  3564. for(var _2fc=0;_2fc<_2f8.length;_2fc++){
  3565. if(_2f8[_2fc]==_2f9[_2fa][4]){
  3566. _2fb=false;
  3567. break;
  3568. }
  3569. }
  3570. if(_2fb){
  3571. _2f8[_2f8.length]=_2f9[_2fa][4];
  3572. }
  3573. }
  3574. return _2f8;
  3575. };
  3576. var STYLE_SELECTION={};
  3577. CSelectionController.prototype.selecting=function(c,_2fe){
  3578. var _2ff="."+c+_2fe;
  3579. var doc=document;
  3580. var _301=document.getElementById("CVIFrame"+this.m_sNamespace);
  3581. if(_301){
  3582. doc=_301.contentWindow.document;
  3583. }
  3584. var _302=doc.createElement("style");
  3585. _302.setAttribute("type","text/css");
  3586. if(_302.styleSheet){
  3587. _302.styleSheet.cssText=_2ff;
  3588. }else{
  3589. _302.appendChild(doc.createTextNode(_2ff));
  3590. }
  3591. doc.getElementsByTagName("head").item(0).appendChild(_302);
  3592. STYLE_SELECTION[c]=_302;
  3593. };
  3594. CSelectionController.prototype.deselecting=function(_303){
  3595. for(var i=0;i<_303.length;++i){
  3596. if(STYLE_SELECTION[_303[i]]){
  3597. var node=STYLE_SELECTION[_303[i]];
  3598. node.parentNode.removeChild(node);
  3599. STYLE_SELECTION[_303[i]]=null;
  3600. }
  3601. }
  3602. if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
  3603. var _306=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
  3604. if(_306!=null){
  3605. var _307=_306.style.display;
  3606. _306.style.display="none";
  3607. _306.style.display=_307;
  3608. }
  3609. }
  3610. };
  3611. CSelectionController.prototype.showViewerContextMenu=function(){
  3612. if(this.hasSelectedChartNodes()){
  3613. return true;
  3614. }
  3615. if(this.m_aSelectedObjects&&this.m_aSelectedObjects.length>0){
  3616. return true;
  3617. }
  3618. return false;
  3619. };
  3620. function getStyleFromClass(c){
  3621. for(var i=0;i<document.styleSheets.length;i++){
  3622. var ss=document.styleSheets[i];
  3623. var _30b=(ss.cssRules?ss.cssRules:ss.rules);
  3624. for(var j=0;j<_30b.length;j++){
  3625. var cr=_30b[j];
  3626. var _30e=new RegExp("\\b"+c+"\\b","g");
  3627. if(cr.selectorText&&cr.selectorText.match(_30e)){
  3628. return cr;
  3629. }
  3630. }
  3631. }
  3632. return 0;
  3633. };
  3634. CSelectionController.prototype.canUpdateSelection=function(_30f){
  3635. return this.m_selectionStyles.canApplyToSelection(_30f);
  3636. };
  3637. CSelectionController.prototype.setStyleForSelection=function(_310){
  3638. return this.m_selectionStyles.setStyleForSelection(_310);
  3639. };
  3640. CSelectionController.prototype.updateUI=function(_311,_312,_313,_314){
  3641. if(!_311){
  3642. _311=document;
  3643. }
  3644. try{
  3645. if(_312&&_312.length>0){
  3646. var _315,_316,_317;
  3647. if(_314==1||_314==2){
  3648. if(_313){
  3649. this.deselecting(this.m_cutClass);
  3650. }else{
  3651. var _318=getStyleFromClass("cutSelection").style.color;
  3652. var _319=getStyleFromClass("cutSelection").style.backgroundColor;
  3653. _315=_312.length;
  3654. for(_316=0;_316<_315;_316++){
  3655. _317=_312[_316].getCellRef();
  3656. var _31a="cutQS"+_317.getAttribute("cid");
  3657. this.selecting(_31a,"\n{ background-color: "+_319+"; color: "+_318+";}\n");
  3658. this.m_cutClass.push(_31a);
  3659. }
  3660. }
  3661. }else{
  3662. if(this.m_oCognosViewer){
  3663. this.findSelectionURLs();
  3664. _317="";
  3665. _315=_312.length;
  3666. for(_316=0;_316<_315;_316++){
  3667. _317=_312[_316].getCellRef();
  3668. if(_317.getAttribute("oldClassName")!=null){
  3669. _317.className=_317.getAttribute("oldClassName");
  3670. _317.removeAttribute("oldClassName");
  3671. }
  3672. this.setStyleForSelection(_312[_316].m_contextIds);
  3673. if(!this.secondarySelectionIsDisabled()||_313){
  3674. var _31b=document.getElementById("CVReport"+this.getNamespace());
  3675. var _31c=getElementsByAttribute(_31b,["td","th"],"name",_317.getAttribute("name"),this.m_maxSecondarySelection);
  3676. for(var _31d=0;_31d<_31c.length;_31d++){
  3677. var cell=_31c[_31d];
  3678. if(_313){
  3679. this.restoreOldBackgroundImage(cell);
  3680. }else{
  3681. if(cell.getAttribute("oldBackgroundImageStyle")==null){
  3682. this.saveOldCellStyles(cell);
  3683. this.setSecondarySelectionStyles(cell);
  3684. }
  3685. }
  3686. }
  3687. }
  3688. this.saveOldCellStyles(_317);
  3689. if(_313){
  3690. this.restoreOldBackgroundImage(_317);
  3691. if(this.m_oCognosViewer.isHighContrast()){
  3692. this.restoreOldBorder(_317);
  3693. this.restoreOldPadding(_317);
  3694. }
  3695. }else{
  3696. this.setPrimarySelectionStyles(_317);
  3697. if(this.m_oCognosViewer.isHighContrast()){
  3698. var size=getBoxInfo(_317,true);
  3699. this.saveOldBorder(_317);
  3700. this.saveOldPadding(_317,size);
  3701. var _320=3;
  3702. var _321=size.borderTopWidth+size.paddingTop-_320;
  3703. var _322=size.borderBottomWidth+size.paddingBottom-_320;
  3704. var _323=size.borderLeftWidth+size.paddingLeft-_320;
  3705. var _324=size.borderRightWidth+size.paddingRight-_320;
  3706. _317.style.border=_320+"px "+this.getHighContrastBorderStyle()+" black";
  3707. _317.style.padding=_321+"px "+_324+"px "+_322+"px "+_323+"px";
  3708. }
  3709. }
  3710. }
  3711. }
  3712. }
  3713. }
  3714. return true;
  3715. }
  3716. catch(e){
  3717. return false;
  3718. }
  3719. };
  3720. CSelectionController.prototype.findSelectionURLs=function(){
  3721. if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){
  3722. if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){
  3723. this.pS_backgroundImageURL="url(../common/images/selection_primary.png)";
  3724. this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)";
  3725. }else{
  3726. this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection"));
  3727. this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection"));
  3728. }
  3729. }
  3730. };
  3731. CSelectionController.prototype.setSelectedChartImgArea=function(_325){
  3732. var _326=true;
  3733. var _327=_325.getAttribute("rsvpChart");
  3734. var _328=_325.parentNode.getAttribute("chartContainer");
  3735. if(_327!="true"&&_328!="true"){
  3736. this.m_selectedChartNodes=[];
  3737. _326=false;
  3738. }else{
  3739. var _329=this.getSelectionObjectFactory().getSelectionChartObject(_325);
  3740. this.m_selectedChartNodes=[_329];
  3741. }
  3742. return _326;
  3743. };
  3744. CSelectionController.prototype.setSelectedChartArea=function(_32a,e){
  3745. var _32c=typeof this.m_oCognosViewer.isBux!=="undefined";
  3746. var _32d=false;
  3747. if(_32a!==null){
  3748. if(_32a.tagName=="IMG"){
  3749. _32d=this.setSelectedChartImgArea(_32a);
  3750. }else{
  3751. if(_32a.nodeName=="AREA"&&_32a.attributes["ctx"]){
  3752. _32d=true;
  3753. if(_32c){
  3754. this.setBuxSelectedChartArea(_32a,e);
  3755. }else{
  3756. this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_32a)];
  3757. }
  3758. }
  3759. }
  3760. if(_32d){
  3761. this.getObservers().notify();
  3762. }
  3763. }
  3764. return _32d;
  3765. };
  3766. CSelectionController.prototype.setBuxSelectedChartArea=function(_32e,e){
  3767. var _330=this.getChartHelper(_32e);
  3768. var _331=_330.getChartNode(_32e);
  3769. this.setStyleForSelection(_331.m_contextIds);
  3770. var _332=_330.getImageMapHighlighter();
  3771. _332.setFillColour(this.getPrimarySelectionColor());
  3772. _332.setStrokeColour(this.getPrimarySelectionColor());
  3773. if(typeof e=="undefined"){
  3774. e={};
  3775. }
  3776. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  3777. if(_332.isAreaHighlighted(_32e)){
  3778. _332.hideAreas(_331.getCtxAreas());
  3779. var _333=_32e.getAttribute("ctx");
  3780. var _334=this.m_selectedChartNodes.length;
  3781. for(var i=0;i<_334;i++){
  3782. var _336=this.m_selectedChartNodes[i];
  3783. if(_333==_336.getContext()){
  3784. this.m_selectedChartNodes.splice(i,1);
  3785. break;
  3786. }
  3787. }
  3788. }else{
  3789. this.updateSelectionContainer(_32e);
  3790. _332.highlightAreas(_331.getCtxAreas(),true);
  3791. this.m_selectedChartNodes.push(_331);
  3792. }
  3793. }else{
  3794. if(this.hasSavedSelectedChartNodes()){
  3795. var _337=this.m_savedSelectedChartNodes.length;
  3796. var _338=this.m_savedSelectedChartNodes;
  3797. for(var i=0;i<_337;i++){
  3798. var area=_338[i].getArea();
  3799. var _33a=this.getSavedChartHelper(area);
  3800. var _33b=_33a.getImageMapHighlighter();
  3801. var _33c=_33b.getAreaId(area);
  3802. if(_332.getAreaId(_32e)===_33c){
  3803. _33b.hideAreaById(_33c+this.m_savedPrimarySelectionColor);
  3804. break;
  3805. }
  3806. }
  3807. }
  3808. this.updateSelectionContainer(_32e);
  3809. _332.highlightAreas(_331.getCtxAreas());
  3810. this.m_selectedChartNodes=[_331];
  3811. }
  3812. };
  3813. CSelectionController.prototype.updateSelectionContainer=function(_33d){
  3814. var _33e=_33d.parentNode;
  3815. if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_33e.name){
  3816. var _33f=this.getChartHelper(_33d).getImageMapHighlighter();
  3817. _33f.hideAllAreas();
  3818. }
  3819. this.m_selectionContainerMap=_33e;
  3820. };
  3821. CSelectionController.prototype.getChartHelper=function(_340){
  3822. var _341=_340.parentNode;
  3823. var _342=_341.name;
  3824. if(!this.m_chartHelpers[_342]){
  3825. this.m_chartHelpers[_342]=new CChartHelper(_340,this.getSelectionObjectFactory(),this.m_oCognosViewer);
  3826. }
  3827. return this.m_chartHelpers[_342];
  3828. };
  3829. CSelectionController.prototype.getSavedChartHelper=function(_343){
  3830. var _344=_343.parentNode;
  3831. var _345=_344.name;
  3832. return this.m_savedChartHelpers[_345];
  3833. };
  3834. CSelectionController.prototype.getSelectedChartArea=function(){
  3835. return this.m_selectedChartArea;
  3836. };
  3837. CSelectionController.prototype.getSelectedChartNodes=function(){
  3838. return this.m_selectedChartNodes;
  3839. };
  3840. CSelectionController.prototype.hasSelectedChartNodes=function(){
  3841. return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0;
  3842. };
  3843. CSelectionController.prototype.getSelectedChartImage=function(){
  3844. var _346=null;
  3845. if(this.hasSelectedChartNodes()){
  3846. var _347=this.m_selectedChartNodes[0];
  3847. _346=_347.getArea();
  3848. }
  3849. if(_346===null){
  3850. return null;
  3851. }
  3852. if(_346.tagName=="IMG"){
  3853. return _346;
  3854. }
  3855. return this.getSelectedChartImageFromChartArea(_346);
  3856. };
  3857. CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_348){
  3858. var _349=_348.parentNode;
  3859. var _34a="#"+_349.getAttribute("name");
  3860. return this.checkChildrenForChart(_349.parentNode,_34a);
  3861. };
  3862. CSelectionController.prototype.checkChildrenForChart=function(_34b,_34c){
  3863. var _34d=_34b.firstChild;
  3864. while(_34d!==null){
  3865. if(!_34d.tagName){
  3866. return null;
  3867. }else{
  3868. if(_34d.tagName=="IMG"&&_34d.getAttribute("usemap")==_34c){
  3869. return _34d;
  3870. }else{
  3871. if(_34d.tagName==="DIV"||_34d.tagName==="SPAN"){
  3872. var _34e=this.checkChildrenForChart(_34d,_34c);
  3873. if(_34e){
  3874. return _34e;
  3875. }
  3876. }
  3877. }
  3878. }
  3879. _34d=_34d.nextSibling;
  3880. }
  3881. return null;
  3882. };
  3883. CSelectionController.prototype.downloadSelectedChartImage=function(_34f){
  3884. var _350=this.getSelectedChartImage();
  3885. if(_350!==null){
  3886. var _351=this.getDocumentFromImage(_350);
  3887. var _352=_350.name.replace(".","_");
  3888. var _353=_352.substr(5);
  3889. var _354="?m_name=";
  3890. _354+=_353;
  3891. _354+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
  3892. if(isIE()){
  3893. _352=_351.parentWindow.eval("graphicSrc"+_353);
  3894. }else{
  3895. _352=_351.defaultView.eval("graphicSrc"+_353);
  3896. }
  3897. var _355="";
  3898. if(typeof _352!="undefined"&&_352!==null){
  3899. var _356=_352.split("&");
  3900. if(_356.length===0){
  3901. return;
  3902. }
  3903. if(_352.indexOf("/repository/")<0){
  3904. for(var i=0;i<_356.length;++i){
  3905. var _358=_356[i];
  3906. var _359=_358.indexOf("=");
  3907. if(_359!=-1){
  3908. var _35a=_358.substr(0,_359);
  3909. var _35b=_358.slice(_359+1);
  3910. if(_35a=="search"){
  3911. _355+=_35b;
  3912. break;
  3913. }
  3914. }
  3915. }
  3916. }
  3917. if(_355==""){
  3918. _354=_350.getAttribute("src");
  3919. if(_354.indexOf("?")!=-1){
  3920. _354+="&download=true";
  3921. }else{
  3922. _354+="?download=true";
  3923. }
  3924. }
  3925. if(typeof getConfigFrame=="function"){
  3926. _354+=_355;
  3927. _354=getConfigFrame().constructGETRequestParamsString(_354);
  3928. window.open(_354,"_blank","width=0,height=0");
  3929. }else{
  3930. _354=constructGETRequestParamsString(_354);
  3931. _354+=_355;
  3932. var _35c=this.m_oCognosViewer.getGateway();
  3933. var _35d=document.getElementById("CVIFrame"+this.m_sNamespace);
  3934. if(_35d){
  3935. var _35e=_35d.src;
  3936. if(_35e.indexOf("repository")>=0&&_354.indexOf("repository")<0){
  3937. var _35f=_35e.indexOf("content");
  3938. _354=_35e.substring(0,_35f)+_354;
  3939. }
  3940. }
  3941. if(_354.indexOf(_35c)==-1){
  3942. var _360=document.forms["formWarpRequest"+_34f];
  3943. _354=_360.action+_354;
  3944. }
  3945. if(typeof window.detachLeavingRV=="function"){
  3946. window.detachLeavingRV();
  3947. }
  3948. location.href=_354;
  3949. if(typeof window.attachLeavingRV=="function"){
  3950. setTimeout(window.attachLeavingRV,100);
  3951. }
  3952. }
  3953. }
  3954. }
  3955. };
  3956. CSelectionController.prototype.getDocumentFromImage=function(_361){
  3957. var _362=null;
  3958. if(_361.ownerDocument){
  3959. _362=_361.ownerDocument;
  3960. }else{
  3961. _362=_361.document;
  3962. }
  3963. return _362;
  3964. };
  3965. CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
  3966. var _364=this.getSelections();
  3967. if(_364.length>1){
  3968. if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){
  3969. var node=getNodeFromEvent(e);
  3970. try{
  3971. while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){
  3972. node=node.parentNode;
  3973. }
  3974. }
  3975. catch(ex){
  3976. }
  3977. var _366=this.getSelectionObjectFactory().getContainerType(node);
  3978. if(_366==="list"){
  3979. for(var i=0;i<_364.length;i++){
  3980. if(_364[i].m_oCellRef==node){
  3981. return false;
  3982. }
  3983. }
  3984. }
  3985. }
  3986. }
  3987. return true;
  3988. };
  3989. CSelectionController.prototype.getContainerType=function(){
  3990. var _368="";
  3991. if(this.hasSelectedChartNodes()){
  3992. _368="chart";
  3993. }else{
  3994. if(this.getDataContainerType()==="list"){
  3995. _368="list";
  3996. }else{
  3997. _368="crosstab";
  3998. }
  3999. }
  4000. return _368;
  4001. };
  4002. CSelectionController.prototype.getDisplayValues=function(){
  4003. var _369={};
  4004. var _36a=this.getAllSelectedObjects()[0];
  4005. if(_36a){
  4006. var _36b=_36a.getSelectedContextIds();
  4007. if(_36b){
  4008. for(var axis=0;axis<_36b.length;axis++){
  4009. var _36d=[];
  4010. var _36e=_36b[axis];
  4011. for(var _36f=0;_36f<_36e.length;_36f++){
  4012. var _370=_36e[_36f];
  4013. var _371=this.getDisplayValue(_370);
  4014. _36d.push(_371);
  4015. if(axis===0){
  4016. break;
  4017. }
  4018. }
  4019. var _372="";
  4020. switch(axis){
  4021. case 0:
  4022. _372="selected";
  4023. break;
  4024. case 1:
  4025. _372="rows";
  4026. break;
  4027. default:
  4028. _372="columns";
  4029. }
  4030. _369[_372]=_36d;
  4031. }
  4032. }
  4033. }
  4034. return _369;
  4035. };
  4036. CSelectionController.prototype.getChartTooltip=function(){
  4037. var _373=this.getAllSelectedObjects()[0];
  4038. if(_373){
  4039. var area=_373.getArea();
  4040. if(area){
  4041. var _375=area.getAttribute("title");
  4042. if(_375&&_375.length>0){
  4043. return area.getAttribute("title");
  4044. }
  4045. }
  4046. }
  4047. return "";
  4048. };
  4049. CSelectionController.prototype.pageClickedForMobile=function(e){
  4050. this.pageClicked(e);
  4051. var _377=this.getAllSelectedObjects().length;
  4052. if(_377==0){
  4053. var node=getNodeFromEvent(e,true);
  4054. if(!node){
  4055. return false;
  4056. }
  4057. if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){
  4058. this.selectDrillThroughImage(node);
  4059. return true;
  4060. }else{
  4061. if(node.getAttribute("dttargets")){
  4062. this.selectDrillThroughSingleton(node);
  4063. return true;
  4064. }else{
  4065. if(node.parentNode&&node.parentNode.getAttribute("dttargets")){
  4066. this.selectDrillThroughSingleton(node.parentNode);
  4067. return true;
  4068. }
  4069. }
  4070. }
  4071. return false;
  4072. }
  4073. return true;
  4074. };
  4075. CSelectionController.prototype.clearSavedSelections=function(){
  4076. this.m_bSavedSelections=false;
  4077. if(this.hasSavedSelectedObjects()){
  4078. this.updateUI(null,this.getSavedSelectedObjects(),true,false);
  4079. delete (this.m_aSavedSelectedObjects);
  4080. }
  4081. if(this.hasSavedSelectedChartNodes()){
  4082. var _379=this.m_savedChartHelpers;
  4083. for(var _37a in _379){
  4084. if(_379[_37a]){
  4085. var _37b=_379[_37a].getImageMapHighlighter();
  4086. if(_37b.hideAllAreas){
  4087. _37b.hideAllAreas();
  4088. }
  4089. }
  4090. }
  4091. delete this.m_savedChartHelpers;
  4092. delete this.m_savedSelectedChartNodes;
  4093. }
  4094. };
  4095. CSelectionController.prototype.hasSavedSelectedChartNodes=function(){
  4096. return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0);
  4097. };
  4098. CSelectionController.prototype.getSavedSelectedChartNodes=function(){
  4099. return this.m_savedSelectedChartNodes;
  4100. };
  4101. CSelectionController.prototype.saveSelections=function(){
  4102. this.m_savedSelectionStyles=this.m_selectionStyles;
  4103. if(this.m_aSelectedObjects.length>0){
  4104. this.m_aSavedSelectedObjects=[];
  4105. var _37c=this.m_aSelectedObjects.length;
  4106. var temp=[];
  4107. for(var i=0;i<_37c;i++){
  4108. if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){
  4109. temp.push(this.m_aSelectedObjects[i]);
  4110. }else{
  4111. this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]);
  4112. }
  4113. }
  4114. this.m_aSelectedObjects=temp;
  4115. }
  4116. if(this.hasSelectedChartNodes()){
  4117. this.m_savedChartHelpers=this.m_chartHelpers;
  4118. this.m_chartHelpers={};
  4119. this.m_savedSelectedChartNodes=[];
  4120. var _37f=this.m_selectedChartNodes.length;
  4121. var temp=[];
  4122. for(var i=0;i<_37f;i++){
  4123. if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
  4124. var _380=this.m_selectedChartNodes[i].getArea();
  4125. var _381=this.getImageMapName(_380);
  4126. this.m_chartHelpers[_381]=this.m_savedChartHelpers[_381];
  4127. delete this.m_savedChartHelpers[_381];
  4128. temp.push(this.m_selectedChartNodes[i]);
  4129. }else{
  4130. this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]);
  4131. }
  4132. }
  4133. this.m_selectedChartNodes=temp;
  4134. }
  4135. this.m_bSavedSelections=true;
  4136. };
  4137. CSelectionController.prototype.hasSavedSelections=function(){
  4138. return this.m_bSavedSelections;
  4139. };
  4140. CSelectionController.prototype.hasSavedSelectedObjects=function(){
  4141. return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes();
  4142. };
  4143. CSelectionController.prototype.getSavedSelectedObjects=function(){
  4144. return this.m_aSavedSelectedObjects;
  4145. };
  4146. CSelectionController.prototype.getImageMapName=function(_382){
  4147. var _383=_382.parentNode;
  4148. return _383.name;
  4149. };
  4150. CSelectionController.prototype.repaintBUXSelectedChartArea=function(_384,_385,_386){
  4151. var _387={};
  4152. var _388=_384.length;
  4153. for(var i=0;i<_388;i++){
  4154. var _38a=_384[i].getArea();
  4155. var _38b=this.getImageMapName(_38a);
  4156. var _38c;
  4157. if(!_387[_38b]){
  4158. _38c=(_385)?this.getSavedChartHelper(_38a):this.getChartHelper(_38a);
  4159. _387[_38b]=_38c;
  4160. var _38d=_38c.getImageMapHighlighter();
  4161. _38d.hideAllAreas();
  4162. _38d.setFillColour(this.getPrimarySelectionColor());
  4163. _38d.setStrokeColour(this.getPrimarySelectionColor());
  4164. }else{
  4165. _38c=_387[_38b];
  4166. }
  4167. var _38e=_384[i].m_contextIds;
  4168. if(_386&&_38e.length===1&&_38e[0].length===1&&this.isMeasure(_38e[0][0])){
  4169. continue;
  4170. }
  4171. _38d.highlightAreas(_384[i].getCtxAreas(),1);
  4172. }
  4173. };
  4174. CSelectionController.prototype.repaintSavedSelections=function(){
  4175. var _38f=this.m_selectionStyles;
  4176. this.m_selectionStyles=this.m_savedSelectionStyles;
  4177. var _390=this.getSavedSelectedChartNodes();
  4178. var _391=false;
  4179. if(_390&&_390.length>0){
  4180. bIsChart=true;
  4181. }else{
  4182. _390=this.getSavedSelectedObjects();
  4183. }
  4184. this.repaintSelectionsHelper(_390,true,_391);
  4185. this.resetSelectionStyles();
  4186. this.m_selectionStyles=_38f;
  4187. };
  4188. CSelectionController.prototype.repaintSelections=function(){
  4189. var _392=this.getSelectedChartNodes();
  4190. var _393=false;
  4191. if(_392&&_392.length>0){
  4192. _393=true;
  4193. }else{
  4194. _392=this.getSelections();
  4195. }
  4196. this.repaintSelectionsHelper(_392,false,_393);
  4197. };
  4198. CSelectionController.prototype.repaintSelectionsHelper=function(_394,_395,_396){
  4199. try{
  4200. if(_396){
  4201. this.repaintBUXSelectedChartArea(_394,_395);
  4202. }else{
  4203. this.updateUI(document,_394,true,false);
  4204. this.updateUI(document,_394,false,false);
  4205. }
  4206. }
  4207. catch(e){
  4208. return false;
  4209. }
  4210. };
  4211. CSelectionController.prototype.resetAll=function(){
  4212. this.resetSelectionStyles();
  4213. this.clearSavedSelections();
  4214. this.resetSelections();
  4215. this.resetAllowHorizontalDataValueSelection();
  4216. };
  4217. CSelectionController.prototype.pageClicked=function(e){
  4218. try{
  4219. var node=getNodeFromEvent(e);
  4220. if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){
  4221. var _399=node;
  4222. if(!_399.getAttribute("uid")){
  4223. var _39a=_399.parentNode;
  4224. if(_39a&&_39a.nodeType==1&&typeof _39a.getAttribute!="undefined"&&_39a.getAttribute("uid")!=null){
  4225. _399=_39a;
  4226. }
  4227. }
  4228. if(this.isCellSelected(_399)){
  4229. if(typeof this.m_oCognosViewer.isBux!=="undefined"){
  4230. this.repaintSelections();
  4231. }
  4232. if(e.button!==0){
  4233. return false;
  4234. }
  4235. }
  4236. }
  4237. if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){
  4238. return true;
  4239. }
  4240. if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){
  4241. return false;
  4242. }
  4243. var _39b=getDocumentFromEvent(e);
  4244. if(!this.hasContextData()||!this.hasMetadata()){
  4245. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){
  4246. this.setSelectedChartArea(node,e);
  4247. }
  4248. this.getObservers().notify();
  4249. return false;
  4250. }
  4251. if(typeof node.selectedCell!="undefined"){
  4252. var _39c=node;
  4253. node=node.selectedCell;
  4254. _39c.removeAttribute("selectedCell");
  4255. }
  4256. if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){
  4257. cf.hidePickers();
  4258. }
  4259. if(e.keyCode==27){
  4260. if(typeof g_reportSelectionController!="undefined"){
  4261. g_reportSelectionController.clearSelections();
  4262. }
  4263. this.resetSelections(_39b);
  4264. }else{
  4265. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){
  4266. if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){
  4267. this.selectNode(node,e);
  4268. this.setSelectedChartArea(node,e);
  4269. }
  4270. }else{
  4271. if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){
  4272. var _39d=this.m_oCognosViewer.getViewerWidget();
  4273. this.selectNode(node,e);
  4274. }
  4275. }
  4276. }
  4277. if(window.gViewerLogger){
  4278. window.gViewerLogger.addContextInfo(this);
  4279. }
  4280. }
  4281. catch(e){
  4282. }
  4283. };
  4284. CSelectionController.prototype.getSelectionObjectFactory=function(){
  4285. return this.m_oSelectionObjectFactory;
  4286. };
  4287. CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){
  4288. return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null);
  4289. };
  4290. CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_3a2){
  4291. var _3a3=this.getCtxIdFromMun(sMun);
  4292. if(_3a3==""){
  4293. _3a3=this.getCtxIdFromMetaData(sLun,sHun,_3a2);
  4294. }
  4295. if(_3a3!=null&&this.m_oCDManager.GetUsage(_3a3)!="2"){
  4296. var _3a4=document.getElementById("rt"+this.getNamespace());
  4297. if(_3a4!=null){
  4298. var _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3);
  4299. if(_3a5&&_3a5.length===0){
  4300. var _3a6=new RegExp("(^|:)"+_3a3+"(:|$)","i");
  4301. _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3,-1,_3a6);
  4302. }
  4303. var _3a7=null;
  4304. if(_3a5!=null&&_3a5.length>0){
  4305. _3a7=new CSelectionObject();
  4306. _3a7.setSelectionController(this);
  4307. _3a7.m_sColumnRef=_3a5[0].getAttribute("cid");
  4308. _3a7.m_sCellTypeId=_3a5[0].getAttribute("uid");
  4309. _3a7.m_sLayoutType=_3a5[0].getAttribute("type");
  4310. _3a7.m_sTag=_3a5[0].getAttribute("tag");
  4311. _3a7.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_3a5[0]);
  4312. _3a7.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_3a5[0]);
  4313. _3a7.m_contextIds=[[_3a3]];
  4314. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7;
  4315. }else{
  4316. var _3a8=getElementsByAttribute(_3a4,"*","flashChart","true");
  4317. if(_3a8!=null){
  4318. for(var _3a9=0;_3a9<_3a8.length;++_3a9){
  4319. var ldx=_3a8[_3a9].getLDX();
  4320. if(ldx.indexOf("<ctx>"+_3a3+"</ctx>")!=-1){
  4321. _3a7=new CSelectionObject();
  4322. _3a7.setSelectionController(this);
  4323. var lid=_3a8[_3a9].getAttribute("lid");
  4324. _3a7.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
  4325. _3a7.m_dataContainerType="chart";
  4326. _3a7.m_contextIds=[[_3a3]];
  4327. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7;
  4328. }
  4329. }
  4330. }
  4331. }
  4332. }
  4333. }
  4334. };
  4335. CSelectionController.prototype.buildSelectionObject=function(node,e){
  4336. var _3ae=null;
  4337. try{
  4338. while(node.nodeType==3){
  4339. node=node.parentNode;
  4340. }
  4341. if(this.isDrillLinkOnCrosstabCell(node)){
  4342. node=node.parentNode;
  4343. }
  4344. var ctx=node.getAttribute("ctx");
  4345. var uid=node.getAttribute("uid");
  4346. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){
  4347. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  4348. return null;
  4349. }
  4350. node=node.parentNode;
  4351. if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){
  4352. node=node.parentNode;
  4353. }
  4354. uid=node.getAttribute("uid");
  4355. }
  4356. if(uid!=null){
  4357. var _3b1=node.childNodes;
  4358. for(var i=0;i<_3b1.length;i++){
  4359. if(_3b1[i].nodeName.toUpperCase()=="TABLE"&&(_3b1[i].className=="ls"||_3b1[i].className=="xt")){
  4360. var trs=_3b1[i].rows;
  4361. for(var j=0;j<trs.length;j++){
  4362. var tds=trs[j].cells;
  4363. for(var k=0;k<tds.length;k++){
  4364. if(tds[k].getAttribute("uid")!=null){
  4365. return null;
  4366. }
  4367. }
  4368. }
  4369. }
  4370. }
  4371. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  4372. _3ae=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  4373. }else{
  4374. _3ae=this.getSelectionObjectFactory().getSelectionObject(node);
  4375. }
  4376. }
  4377. }
  4378. catch(e){
  4379. }
  4380. return _3ae;
  4381. };
  4382. CSelectionController.prototype.shiftKeyPressed=function(e){
  4383. if(e.keyCode=="121"){
  4384. return false;
  4385. }
  4386. if(isSafari()){
  4387. if(e.button!=2){
  4388. return e.shiftKey?e.shiftKey:false;
  4389. }else{
  4390. return false;
  4391. }
  4392. }
  4393. return e.shiftKey?e.shiftKey:false;
  4394. };
  4395. CSelectionController.prototype.ctrlKeyPressed=function(e){
  4396. if(isSafari()){
  4397. if(e.button!=2){
  4398. return e.ctrlKey?e.ctrlKey:false;
  4399. }else{
  4400. return false;
  4401. }
  4402. }
  4403. return e.ctrlKey?e.ctrlKey:false;
  4404. };
  4405. CSelectionController.prototype.isSelectionsPreviouslySaved=function(_3b9){
  4406. var _3ba=false;
  4407. if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_3b9||!_3b9.length){
  4408. return false;
  4409. }
  4410. for(var i=0;i<_3b9.length;i++){
  4411. if(this.isSavedCellSelected(_3b9[i].getCellRef())){
  4412. return true;
  4413. }
  4414. }
  4415. return false;
  4416. };
  4417. CSelectionController.prototype.selectNode=function(node,e){
  4418. try{
  4419. while(node.nodeType==3){
  4420. node=node.parentNode;
  4421. }
  4422. if(this.isDrillLinkOnCrosstabCell(node)){
  4423. node=node.parentNode;
  4424. }
  4425. var _3be=null;
  4426. if(isIE()){
  4427. _3be=node.document;
  4428. }else{
  4429. _3be=node.ownerDocument;
  4430. }
  4431. var ctx=node.getAttribute("ctx");
  4432. var uid=node.getAttribute("uid");
  4433. var _3c1=false;
  4434. if(typeof e=="undefined"){
  4435. e={};
  4436. }
  4437. var _3c2=false;
  4438. if(typeof g_reportSelectionController!="undefined"){
  4439. _3c2=this.checkForReportElementNode(node);
  4440. }
  4441. if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_3c2==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
  4442. if(this.getSelections().length>0){
  4443. _3c1=true;
  4444. }
  4445. if(this.hasCutColumns()==true){
  4446. this.clearSelectedObjects(_3be);
  4447. }else{
  4448. this.resetSelections(_3be);
  4449. this.repaintSavedSelections();
  4450. if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){
  4451. cf.removeAllSelectionsFromCfgVariables();
  4452. }
  4453. this.m_oCognosViewer.setCurrentNodeFocus(null);
  4454. }
  4455. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  4456. clearTextSelection(_3be);
  4457. }
  4458. if(typeof g_reportSelectionController!="undefined"&&_3c2==false){
  4459. if(g_reportSelectionController.getSelections().length>0){
  4460. _3c1=true;
  4461. }
  4462. g_reportSelectionController.clearSelections();
  4463. }
  4464. }
  4465. var _3c3=node.getAttribute("dtTargets")?node:null;
  4466. var _3c4=(node.nodeName.toLowerCase()==="area");
  4467. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){
  4468. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  4469. return false;
  4470. }
  4471. var _3c5;
  4472. var _3c6=3;
  4473. do{
  4474. node=node.parentNode;
  4475. if(node){
  4476. _3c3=(!_3c3&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_3c3;
  4477. uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
  4478. _3c5=node.nodeName.toLowerCase();
  4479. }
  4480. }while((uid==null)&&node&&(--_3c6>0)&&(_3c5=="span"||_3c5=="div"));
  4481. }
  4482. if(uid!=null){
  4483. var _3c7=node.childNodes;
  4484. for(var i=0;i<_3c7.length;i++){
  4485. if(_3c7[i].nodeName.toUpperCase()=="TABLE"&&(_3c7[i].className=="ls"||_3c7[i].className=="xt")){
  4486. var trs=_3c7[i].rows;
  4487. for(var j=0;j<trs.length;j++){
  4488. var tds=trs[j].cells;
  4489. for(var k=0;k<tds.length;k++){
  4490. if(tds[k].getAttribute("uid")!=null){
  4491. return false;
  4492. }
  4493. }
  4494. }
  4495. }
  4496. }
  4497. var _3cd;
  4498. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  4499. _3cd=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  4500. }else{
  4501. _3cd=this.getSelectionObjectFactory().getSelectionObject(node);
  4502. }
  4503. if(this.isCellSelected(node)==false){
  4504. if(this.shiftKeyPressed(e)){
  4505. var _3ce=this.getSelections();
  4506. if(_3ce.length>0){
  4507. var _3cf=_3ce[_3ce.length-1];
  4508. if(_3cf.getLayoutType()==_3cd.getLayoutType()&&(_3cf.getCellRef().parentNode.parentNode==_3cd.getCellRef().parentNode.parentNode)){
  4509. if(this.cellsAreInSameColumn(_3cf.getCellRef(),_3cd.getCellRef())){
  4510. this.selectVertical(_3cf,_3cd,_3be);
  4511. }else{
  4512. if(_3cf.getCellRef().parentNode.rowIndex==_3cd.getCellRef().parentNode.rowIndex){
  4513. this.selectHorizontal(_3cf,_3cd,_3be);
  4514. }
  4515. }
  4516. }
  4517. }
  4518. clearTextSelection(_3be);
  4519. }else{
  4520. if(this.ctrlKeyPressed(e)){
  4521. clearTextSelection(_3be);
  4522. }
  4523. }
  4524. this.addSelectionObject(_3cd,_3be);
  4525. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4526. cf.addSelectionToCfgVariables(_3cd.getColumnName());
  4527. }
  4528. this.m_oCognosViewer.setCurrentNodeFocus(node);
  4529. }else{
  4530. if(this.ctrlKeyPressed(e)){
  4531. this.removeSelectionObject(_3cd,_3be);
  4532. if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
  4533. if(!this.isColumnSelected(_3cd.getTag())){
  4534. cf.removeSelectionFromCfgVariables(_3cd.getTag());
  4535. }
  4536. }
  4537. clearTextSelection(_3be);
  4538. }else{
  4539. if(this.shiftKeyPressed(e)){
  4540. clearTextSelection(_3be);
  4541. }
  4542. }
  4543. }
  4544. _3c1=true;
  4545. }else{
  4546. if(_3c2){
  4547. var _3d0=null;
  4548. while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
  4549. node=node.parentNode;
  4550. }
  4551. if(node.id=="reportTitle"){
  4552. _3d0="TitleStyle";
  4553. }else{
  4554. if(node.id=="reportSubtitle"){
  4555. _3d0="SubtitleStyle";
  4556. }else{
  4557. if(node.id.indexOf("reportFilter")==0){
  4558. _3d0="FilterStyle";
  4559. }
  4560. }
  4561. }
  4562. if(_3d0!=null){
  4563. selectReportElement(e,node.id,_3d0);
  4564. _3c1=true;
  4565. }
  4566. }else{
  4567. if(_3c3!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_3c4){
  4568. var _3cd=this.getSelectionObjectFactory().getSelectionObject(_3c3);
  4569. this.addSelectionObject(_3cd,_3be);
  4570. }
  4571. }
  4572. }
  4573. if(_3c1==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){
  4574. cf.refreshDialog();
  4575. }
  4576. }
  4577. catch(ex){
  4578. }
  4579. };
  4580. CSelectionController.prototype.selectDrillThroughImage=function(node){
  4581. this.m_oSelectedDrillThroughImage=node;
  4582. };
  4583. CSelectionController.prototype.getSelectedDrillThroughImage=function(){
  4584. return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null;
  4585. };
  4586. CSelectionController.prototype.selectDrillThroughSingleton=function(node){
  4587. this.m_oSelectedDrillThroughSingleton=node;
  4588. };
  4589. CSelectionController.prototype.getSelectDrillThroughSingleton=function(){
  4590. return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null;
  4591. };
  4592. CSelectionController.prototype.getReportContextDataArray=function(){
  4593. return this.m_aReportContextDataArray;
  4594. };
  4595. CSelectionController.prototype.getReportMetadataArray=function(){
  4596. return this.m_aReportMetadataArray;
  4597. };
  4598. CSelectionController.prototype.setupContextDataArray=function(_3d3){
  4599. this.m_aReportContextDataArray=_3d3;
  4600. };
  4601. CSelectionController.prototype.setupMetaDataArray=function(_3d4){
  4602. this.m_aReportMetadataArray=_3d4;
  4603. };
  4604. CSelectionController.prototype.addContextData=function(_3d5){
  4605. this.m_aSelectedObjects=[];
  4606. this.m_oCDManager.SetContextData(_3d5);
  4607. if(!this.m_bUsingCCDManager){
  4608. this.m_bUsingCCDManager=true;
  4609. }
  4610. for(var i=0;i<this.m_selectedClass.length;++i){
  4611. this.deselecting(this.m_selectedClass);
  4612. }
  4613. };
  4614. CSelectionController.prototype.addMetaData=function(_3d7){
  4615. this.m_aSelectedObjects=[];
  4616. this.m_oCDManager.SetMetadata(_3d7);
  4617. if(!this.m_bUsingCCDManager){
  4618. this.m_bUsingCCDManager=true;
  4619. }
  4620. };
  4621. CSelectionController.prototype.getDrillFlag=function(_3d8){
  4622. var _3d9="";
  4623. if(!this.m_bUsingCCDManager){
  4624. var _3da=this.m_aReportContextDataArray[_3d8];
  4625. var _3db=_3da[0];
  4626. var _3dc=this.m_aReportMetadataArray[_3db];
  4627. if(typeof _3dc!="undefined"&&typeof _3dc[3]!="undefined"){
  4628. _3d9=_3dc[3];
  4629. }
  4630. }else{
  4631. _3d9=this.m_oCDManager.GetDrillFlag(_3d8);
  4632. }
  4633. return _3d9;
  4634. };
  4635. CSelectionController.prototype.getDrillFlagForMember=function(_3dd){
  4636. var _3de="0";
  4637. if(!this.m_bUsingCCDManager){
  4638. var _3df=this.getContextDataItem(_3dd);
  4639. if(_3df!=null){
  4640. var _3e0=_3df[2];
  4641. if(_3e0!=""){
  4642. var _3e1=_3df[0];
  4643. var _3e2=this.getMetaDataItem(_3e1);
  4644. if(_3e2!=null){
  4645. _3de=_3e2[3];
  4646. }
  4647. }
  4648. }
  4649. }else{
  4650. _3de=this.m_oCDManager.GetDrillFlagForMember(_3dd);
  4651. }
  4652. return (_3de==null)?0:_3de;
  4653. };
  4654. CSelectionController.prototype.getDataType=function(_3e3){
  4655. var _3e4=null;
  4656. if(!this.m_bUsingCCDManager){
  4657. var _3e5=this.getRDI(_3e3);
  4658. if(_3e5&&_3e5.length>2){
  4659. _3e4=parseInt(_3e5[2],10);
  4660. }
  4661. }else{
  4662. _3e4=parseInt(this.m_oCDManager.GetDataType(_3e3),10);
  4663. }
  4664. return _3e4;
  4665. };
  4666. CSelectionController.prototype.getUsageInfo=function(_3e6){
  4667. if(this.m_bUsingCCDManager){
  4668. return this.m_oCDManager.GetUsage(_3e6);
  4669. }
  4670. };
  4671. CSelectionController.prototype.isMeasure=function(_3e7){
  4672. return (this.getUsageInfo(_3e7)==this.c_usageMeasure);
  4673. };
  4674. CSelectionController.prototype.getDepth=function(_3e8){
  4675. var _3e9=null;
  4676. if(!this.m_bUsingCCDManager){
  4677. var _3ea=this.getRDI(_3e8);
  4678. if(_3ea&&_3ea.length>5&&_3ea[1]=="R"){
  4679. _3e9=_3ea[5];
  4680. }
  4681. }else{
  4682. _3e9=this.m_oCDManager.GetDepth(_3e8);
  4683. }
  4684. return _3e9;
  4685. };
  4686. CSelectionController.prototype.getUseValue=function(_3eb){
  4687. var _3ec="";
  4688. if(!this.m_bUsingCCDManager){
  4689. var _3ed=this.m_aReportContextDataArray[_3eb];
  4690. if(typeof _3ed[1]!="undefined"){
  4691. _3ec=_3ed[1];
  4692. }
  4693. }else{
  4694. _3ec=this.m_oCDManager.GetDisplayValue(_3eb);
  4695. }
  4696. return _3ec;
  4697. };
  4698. CSelectionController.prototype.getTextValue=function(_3ee){
  4699. var _3ef=null;
  4700. for(var _3f0=0;_3f0<_3ee.length;_3f0++){
  4701. if(_3ee[_3f0].style.visisbility!="hidden"){
  4702. if(isIE()){
  4703. _3ef=_3ee[_3f0].innerText;
  4704. }else{
  4705. _3ef=_3ee[_3f0].textContent;
  4706. }
  4707. var _3f1=_3ee[_3f0].nextSibling;
  4708. while(_3f1!=null){
  4709. if(_3f1.nodeName.toUpperCase()=="SPAN"&&_3f1.style.visibility!="hidden"){
  4710. if(isIE()){
  4711. _3ef+=_3f1.innerText;
  4712. }else{
  4713. _3ef+=_3f1.textContent;
  4714. }
  4715. }
  4716. _3f1=_3f1.nextSibling;
  4717. }
  4718. break;
  4719. }
  4720. }
  4721. return _3ef;
  4722. };
  4723. CSelectionController.prototype.getDisplayValueFromDOM=function(_3f2,_3f3){
  4724. var _3f4=null;
  4725. var _3f5;
  4726. var _3f6=new RegExp("(^|\\s)"+_3f2+"(\\s|$|:)","i");
  4727. if(typeof _3f3!="undefined"){
  4728. _3f5=getElementsByAttribute(_3f3,["span","td","th"],"ctx",_3f2,1,_3f6);
  4729. }else{
  4730. var _3f7=document.getElementById("CVIFrame"+this.m_sNamespace);
  4731. if(typeof _3f7=="undefined"||_3f7==null){
  4732. var _3f8=document.getElementById("RVContent"+this.m_sNamespace);
  4733. if(typeof _3f8=="undefined"||_3f8==null){
  4734. _3f5=getElementsByAttribute(document.body,["span","td","th"],"ctx",_3f2,1,_3f6);
  4735. }else{
  4736. _3f5=getElementsByAttribute(_3f8,["span","td","th"],"ctx",_3f2,1,_3f6);
  4737. }
  4738. }else{
  4739. _3f5=getElementsByAttribute(_3f7.contentWindow.document.body,["span","td","th"],"ctx",_3f2,1,_3f6);
  4740. }
  4741. }
  4742. var _3f9;
  4743. if(_3f5.length>0&&(_3f5[0].nodeName.toUpperCase()=="TD"||_3f5[0].nodeName.toUpperCase()=="TH")){
  4744. _3f9=_3f5[0].childNodes;
  4745. }else{
  4746. _3f9=_3f5;
  4747. }
  4748. if(_3f9.length==0||(_3f9[0].className.indexOf("chart_area")==-1&&_3f9[0].className.indexOf("bux-comment")==-1)){
  4749. _3f4=this.getTextValue(_3f9);
  4750. }
  4751. return _3f4;
  4752. };
  4753. CSelectionController.prototype.getDisplayValue=function(_3fa,_3fb){
  4754. var _3fc=this.getDisplayValueFromDOM(_3fa,_3fb);
  4755. if(_3fc==null){
  4756. _3fc=this.getUseValue(_3fa);
  4757. }
  4758. return _3fc;
  4759. };
  4760. CSelectionController.prototype.getDun=function(_3fd){
  4761. if(this.m_bUsingCCDManager){
  4762. return this.m_oCDManager.GetDUN(_3fd);
  4763. }else{
  4764. var _3fe=this.m_aReportContextDataArray[_3fd];
  4765. if(_3fe&&typeof _3fe[5]!="undefined"){
  4766. var _3ff=_3fe[5];
  4767. var _400=this.m_aReportMetadataArray[_3ff];
  4768. if(typeof _400!="undefined"&&typeof _400[1]!="undefined"&&_400[1]=="D"){
  4769. return _400[0];
  4770. }
  4771. }
  4772. }
  4773. };
  4774. CSelectionController.prototype.getPun=function(_401){
  4775. if(this.m_bUsingCCDManager){
  4776. return this.m_oCDManager.GetPUN(_401);
  4777. }
  4778. };
  4779. CSelectionController.prototype.getLun=function(_402){
  4780. var lun="";
  4781. if(!this.m_bUsingCCDManager){
  4782. var _404=this.m_aReportContextDataArray[_402];
  4783. if(_404&&typeof _404[3]!="undefined"){
  4784. var _405=_404[3];
  4785. var _406=this.m_aReportMetadataArray[_405];
  4786. if(typeof _406!="undefined"&&typeof _406[1]!="undefined"&&_406[1]=="L"){
  4787. lun=_406[0];
  4788. }
  4789. }
  4790. }else{
  4791. lun=this.m_oCDManager.GetLUN(_402);
  4792. }
  4793. return lun;
  4794. };
  4795. CSelectionController.prototype.isContextId=function(_407){
  4796. var _408=false;
  4797. if(!this.m_bUsingCCDManager){
  4798. var _409=this.m_aReportContextDataArray[_407];
  4799. _408=(typeof _409=="object");
  4800. }else{
  4801. this.m_oCDManager.FetchContextData([_407]);
  4802. _408=this.m_oCDManager.ContextIdExists(_407);
  4803. }
  4804. return _408;
  4805. };
  4806. CSelectionController.prototype.hasContextData=function(){
  4807. var _40a=false;
  4808. if(!this.m_bUsingCCDManager){
  4809. if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
  4810. return true;
  4811. }
  4812. }else{
  4813. _40a=this.m_oCDManager.HasContextData();
  4814. }
  4815. return _40a;
  4816. };
  4817. CSelectionController.prototype.hasMetadata=function(){
  4818. var _40b=false;
  4819. if(!this.m_bUsingCCDManager){
  4820. if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
  4821. return true;
  4822. }
  4823. }else{
  4824. _40b=this.m_oCDManager.HasMetadata();
  4825. }
  4826. return _40b;
  4827. };
  4828. CSelectionController.prototype.getDifferentCellIndex=function(_40c,_40d,_40e){
  4829. for(var i=0;i<_40c.cells.length;i++){
  4830. if(this.getSelectionObjectFactory().getSelectionObject(_40c.cells[i]).getLayoutType()=="datavalue"){
  4831. break;
  4832. }
  4833. }
  4834. if(_40e=="relative"){
  4835. return (_40d-i);
  4836. }else{
  4837. if(_40e=="actual"){
  4838. return (_40d+i);
  4839. }
  4840. }
  4841. };
  4842. CSelectionController.prototype.cellsAreInSameColumn=function(_410,_411){
  4843. if(_410.parentNode.rowIndex==_411.parentNode.rowIndex){
  4844. return false;
  4845. }
  4846. if(_410.getAttribute("cid")===null){
  4847. if(_410.getAttribute("uid")===_411.getAttribute("uid")){
  4848. if(_410.getAttribute("type")!="datavalue"){
  4849. return true;
  4850. }else{
  4851. if(this.getDifferentCellIndex(_410.parentNode,_410.cellIndex,"relative")==this.getDifferentCellIndex(_411.parentNode,_411.cellIndex,"relative")){
  4852. return true;
  4853. }
  4854. }
  4855. }else{
  4856. return false;
  4857. }
  4858. }else{
  4859. if(_410.getAttribute("cid")===_411.getAttribute("cid")){
  4860. return true;
  4861. }else{
  4862. return false;
  4863. }
  4864. }
  4865. };
  4866. CSelectionController.prototype.selectVertical=function(_412,_413,_414){
  4867. if(!_414){
  4868. _414=document;
  4869. }
  4870. var _415=_412.getCellRef().parentNode;
  4871. var _416,i;
  4872. var _418=(_412.getCellRef().parentNode.rowIndex<_413.getCellRef().parentNode.rowIndex);
  4873. var _419=(_412.getCellRef().parentNode.cells.length-_412.getCellRef().cellIndex);
  4874. while(_415.rowIndex!=_413.getCellRef().parentNode.rowIndex){
  4875. if(_418){
  4876. _415=_415.nextSibling;
  4877. }else{
  4878. _415=_415.previousSibling;
  4879. }
  4880. if(_415==null){
  4881. break;
  4882. }
  4883. if(_415.cells.length>=_419){
  4884. for(i=0;i<_415.cells.length;i++){
  4885. if((_415.cells[i].getAttribute("type")==_412.getLayoutType())&&this.cellsAreInSameColumn(_412.getCellRef(),_415.cells[i])){
  4886. _416=this.getSelectionObjectFactory().getSelectionObject(_415.cells[i]);
  4887. if(this.addSelectionObject(_416,_414)){
  4888. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4889. cf.addSelectionToCfgVariables(_416.getColumnName());
  4890. }
  4891. }
  4892. break;
  4893. }
  4894. }
  4895. }
  4896. }
  4897. };
  4898. CSelectionController.prototype.selectHorizontal=function(_41a,_41b,_41c){
  4899. var _41d="";
  4900. if(_41a.getColumnRef()==null){
  4901. if(_41a.getCellRef().getAttribute("uid")==_41b.getCellRef().getAttribute("uid")){
  4902. _41d=_41a.getCellRef().getAttribute("uid");
  4903. }else{
  4904. return;
  4905. }
  4906. }
  4907. var _41e,_41f;
  4908. var _420=_41b.getCellRef().parentNode;
  4909. var _421;
  4910. if(_41b.getCellRef().cellIndex<_41a.getCellRef().cellIndex){
  4911. _41e=_41b.getCellRef().cellIndex;
  4912. _41f=_41a.getCellRef().cellIndex;
  4913. }else{
  4914. _41f=_41b.getCellRef().cellIndex;
  4915. _41e=_41a.getCellRef().cellIndex;
  4916. }
  4917. for(var i=_41e+1;i<_41f;i++){
  4918. if(((_41a.getColumnRef()!=null)&&(_41a.getLayoutType()==_41b.getLayoutType())&&(_41a.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_41a.getColumnRef()==null)&&(_420.cells[i].getAttribute("uid")==_41d))){
  4919. _421=this.getSelectionObjectFactory().getSelectionObject(_420.cells[i]);
  4920. if(this.addSelectionObject(_421,_41c)){
  4921. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4922. cf.addSelectionToCfgVariables(_421.getColumnName());
  4923. }
  4924. }
  4925. }
  4926. }
  4927. };
  4928. CSelectionController.prototype.pageDoubleClicked=function(e){
  4929. try{
  4930. var node=getNodeFromEvent(e);
  4931. if(typeof node.selectedCell!="undefined"){
  4932. var _425=node;
  4933. node=node.selectedCell;
  4934. _425.removeAttribute("selectedCell");
  4935. }
  4936. while(node.nodeType==3){
  4937. node=node.parentNode;
  4938. }
  4939. var ctx=node.getAttribute("ctx");
  4940. var uid=node.getAttribute("uid");
  4941. if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  4942. node=node.parentNode;
  4943. if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){
  4944. node=node.parentNode;
  4945. }
  4946. uid=node.getAttribute("uid");
  4947. }
  4948. if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){
  4949. if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){
  4950. goWindowManager.getFeatureManager().launchFeature("Rename");
  4951. }
  4952. }
  4953. if(typeof g_reportSelectionController!="undefined"){
  4954. g_reportSelectionController.clearSelections();
  4955. }
  4956. }
  4957. catch(ex){
  4958. }
  4959. };
  4960. CSelectionController.prototype.getSelectionHoverNodes=function(){
  4961. return this.m_aSelectionHoverNodes;
  4962. };
  4963. CSelectionController.prototype.setSelectionHoverNodes=function(_428){
  4964. this.m_aSelectionHoverNodes=_428;
  4965. };
  4966. CSelectionController.prototype.addSelectionHoverNode=function(node){
  4967. this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node;
  4968. };
  4969. CSelectionController.prototype.pageHover=function(e){
  4970. try{
  4971. var node=getNodeFromEvent(e);
  4972. while(node.nodeType==3){
  4973. node=node.parentNode;
  4974. }
  4975. if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  4976. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  4977. node=node.parentNode;
  4978. }
  4979. }
  4980. var _42c=this.getSelectionHoverNodes();
  4981. var _42d=this.getAllSelectedObjects().length;
  4982. if(!(_42c.length==1&&_42c[0]==node)){
  4983. for(var i=0;i<_42c.length;i++){
  4984. this.sortIconHover(_42c[i],true);
  4985. if(_42d==0){
  4986. this.pageChangeHover(_42c[i],true);
  4987. }
  4988. }
  4989. this.setSelectionHoverNodes([]);
  4990. if(_42d==0){
  4991. this.sortIconHover(node,false);
  4992. if(this.pageChangeHover(node,false)){
  4993. this.addSelectionHoverNode(node);
  4994. }
  4995. }else{
  4996. if(this.sortIconHover(node,false)){
  4997. this.addSelectionHoverNode(node);
  4998. }
  4999. }
  5000. }
  5001. }
  5002. catch(ex){
  5003. }
  5004. };
  5005. CSelectionController.prototype.sortIconHover=function(node,_430){
  5006. if(!this.isValidColumnTitle(node)){
  5007. return false;
  5008. }
  5009. var _431=this.getSortImgNode(node);
  5010. if(_431!=null&&_431!="undefined"){
  5011. if(_431.getAttribute("sortOrder")==="nosort"){
  5012. if(_430){
  5013. _431.style.visibility="hidden";
  5014. }else{
  5015. _431.style.visibility="visible";
  5016. }
  5017. }
  5018. return true;
  5019. }
  5020. return false;
  5021. };
  5022. CSelectionController.prototype.isValidColumnTitle=function(node){
  5023. if(node&&node.parentNode){
  5024. var uid=node.getAttribute("uid");
  5025. if(uid!=null&&(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null))&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){
  5026. return true;
  5027. }
  5028. }
  5029. return false;
  5030. };
  5031. CSelectionController.prototype.pageChangeHover=function(node,_435){
  5032. try{
  5033. if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  5034. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  5035. node=node.parentNode;
  5036. }
  5037. }
  5038. if(this.isValidColumnTitle(node)){
  5039. var _436=this.isColumnSelected(node.getAttribute("tag"));
  5040. if(!_436){
  5041. _436=this.isColumnCut(node.getAttribute("tag"));
  5042. }
  5043. if(!_436){
  5044. if(_435){
  5045. if(node.getAttribute("oldClassName")!=null){
  5046. node.className=node.getAttribute("oldClassName");
  5047. node.removeAttribute("oldClassName");
  5048. }
  5049. this.restoreOldBackgroundImage(node);
  5050. }else{
  5051. if(node.getAttribute("oldClassName")!=null){
  5052. node.className=node.getAttribute("oldClassName");
  5053. }else{
  5054. node.setAttribute("oldClassName",node.className);
  5055. }
  5056. if(node.getAttribute("oldBackgroundImageStyle")!=null){
  5057. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  5058. }else{
  5059. this.saveOldCellStyles(node);
  5060. }
  5061. node.className+=" hoverSelection";
  5062. return true;
  5063. }
  5064. }
  5065. }
  5066. }
  5067. catch(ex){
  5068. }
  5069. return false;
  5070. };
  5071. CSelectionController.prototype.getSortImgNode=function(node){
  5072. var _438=node.getElementsByTagName("img");
  5073. for(var i=0;i<_438.length;i++){
  5074. var sId=_438[i].id.toString();
  5075. if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
  5076. node=_438[i];
  5077. return node;
  5078. }
  5079. }
  5080. return null;
  5081. };
  5082. CSelectionController.prototype.restoreOldPadding=function(node){
  5083. if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){
  5084. if(node.getAttribute("oldPaddingStyle").length>0){
  5085. node.style.padding=node.getAttribute("oldPaddingStyle");
  5086. }
  5087. node.removeAttribute("oldPaddingStyle");
  5088. }
  5089. };
  5090. CSelectionController.prototype.saveOldPadding=function(node,size){
  5091. if(node&&node.getAttribute("oldPaddingStyle")==null){
  5092. node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px");
  5093. }
  5094. };
  5095. CSelectionController.prototype.saveOldBorder=function(node){
  5096. if(node&&node.getAttribute("oldBorderStyle")==null){
  5097. node.setAttribute("oldBorderStyle",node.style.border);
  5098. }
  5099. };
  5100. CSelectionController.prototype.restoreOldBorder=function(node){
  5101. if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){
  5102. if(node.getAttribute("oldBorderStyle").length>0){
  5103. node.style.border=node.getAttribute("oldBorderStyle");
  5104. }else{
  5105. node.style.borderColor=node.style.borderWidth=node.style.borderStyle="";
  5106. }
  5107. node.removeAttribute("oldBorderStyle");
  5108. }
  5109. };
  5110. CSelectionController.prototype.setPrimarySelectionStyles=function(cell){
  5111. if(this.getPrimarySelectionColor()){
  5112. cell.style.backgroundColor=this.getPrimarySelectionColor();
  5113. }else{
  5114. cell.style.backgroundImage=this.pS_backgroundImageURL;
  5115. cell.style.backgroundRepeat="repeat";
  5116. }
  5117. };
  5118. CSelectionController.prototype.setSecondarySelectionStyles=function(cell){
  5119. if(this.getSecondarySelectionColor()){
  5120. cell.style.backgroundColor=this.getSecondarySelectionColor();
  5121. }else{
  5122. cell.style.backgroundImage=this.sS_backgroundImageURL;
  5123. cell.style.backgroundRepeat="repeat";
  5124. }
  5125. };
  5126. CSelectionController.prototype.saveOldCellStyles=function(node){
  5127. if(node&&node.getAttribute("oldBackgroundImageStyle")==null){
  5128. node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor"));
  5129. node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node));
  5130. node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat"));
  5131. node.style.backgroundImage="";
  5132. node.style.backgroundRepeat="";
  5133. }
  5134. };
  5135. CSelectionController.prototype.restoreOldBackgroundImage=function(node){
  5136. if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){
  5137. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  5138. node.removeAttribute("oldBackgroundImageStyle");
  5139. node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat");
  5140. node.removeAttribute("oldBackgroundRepeat");
  5141. node.style.backgroundColor=node.getAttribute("oldBackgroundColor");
  5142. node.removeAttribute("oldBackgroundColor");
  5143. }
  5144. };
  5145. CSelectionController.prototype.getStyleProperty=function(node,_445){
  5146. if(node&&node.style&&node.style[_445]){
  5147. return node.style[_445];
  5148. }
  5149. return "";
  5150. };
  5151. CSelectionController.prototype.getBackgroundImage=function(node){
  5152. if(node&&node.style){
  5153. return node.style.backgroundImage;
  5154. }
  5155. return "";
  5156. };
  5157. CSelectionController.prototype.pageContextClicked=function(e){
  5158. var node=getNodeFromEvent(e);
  5159. if(typeof node.selectedCell!="undefined"){
  5160. var _449=node;
  5161. node=node.selectedCell;
  5162. _449.removeAttribute("selectedCell");
  5163. }
  5164. while(node!=null&&node.tagName!="TD"){
  5165. node=node.parentNode;
  5166. }
  5167. if(node!=null){
  5168. var _44a=this.getBackgroundImage(node);
  5169. this.findSelectionURLs();
  5170. if(this.getSelections().length==0||_44a!=this.pS_backgroundImageURL){
  5171. this.pageClicked(e);
  5172. }
  5173. }
  5174. if(typeof populateContextMenu!="undefined"){
  5175. populateContextMenu();
  5176. moveContextMenu(e);
  5177. }
  5178. var _44b=false;
  5179. if(this.showViewerContextMenu()){
  5180. if(typeof e.preventDefault=="function"){
  5181. e.preventDefault();
  5182. }
  5183. _44b=true;
  5184. }
  5185. return _44b;
  5186. };
  5187. CSelectionController.prototype.chartContextMenu=function(e){
  5188. if(!this.hasSelectedChartNodes()){
  5189. return;
  5190. }
  5191. if(typeof populateContextMenu!="undefined"){
  5192. populateContextMenu();
  5193. moveContextMenu(e);
  5194. }
  5195. if(typeof e.preventDefault=="function"){
  5196. e.preventDefault();
  5197. }
  5198. return false;
  5199. };
  5200. CSelectionController.prototype.titleAreaContextMenu=function(e,_44e,sId){
  5201. if(typeof populateContextMenu!="undefined"){
  5202. goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_44e);
  5203. goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
  5204. populateContextMenu(_44e.toUpperCase());
  5205. moveContextMenu(e,_44e.toUpperCase());
  5206. }
  5207. if(typeof e.preventDefault=="function"){
  5208. e.preventDefault();
  5209. }
  5210. return false;
  5211. };
  5212. CSelectionController.prototype.selectionsAreAllSameType=function(){
  5213. var _450=this.getSelections();
  5214. if(_450.length>0){
  5215. var _451=_450[0].getLayoutType();
  5216. for(var i=1;i<_450.length;i++){
  5217. if(_451!=_450[i].getLayoutType()){
  5218. return 0;
  5219. }
  5220. }
  5221. return 1;
  5222. }
  5223. return -1;
  5224. };
  5225. CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
  5226. var _453=this.getSelections();
  5227. var i=0;
  5228. if(_453.length>0){
  5229. var _455=_453[0].getColumnRef();
  5230. if(_455!=null&&_455!=""){
  5231. for(i=1;i<_453.length;i++){
  5232. if(_455!=_453[i].getColumnRef()){
  5233. return false;
  5234. }
  5235. }
  5236. }else{
  5237. var _456=_453[0].getCellTypeId();
  5238. for(i=1;i<_453.length;i++){
  5239. if(_456!=_453[i].getCellTypeId()){
  5240. return false;
  5241. }
  5242. }
  5243. }
  5244. return true;
  5245. }
  5246. return false;
  5247. };
  5248. CSelectionController.prototype.checkForReportElementNode=function(node){
  5249. if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){
  5250. if(node.className=="tt"){
  5251. if(typeof node.parentNode!="undefined"&&node.parentNode!=null&&typeof node.parentNode.parentNode!="undefined"&&node.parentNode.parentNode!=null&&(node.parentNode.className=="reportSubtitleStyle"||node.parentNode.id=="reportTitleLink")){
  5252. node=node.parentNode.parentNode;
  5253. }else{
  5254. return false;
  5255. }
  5256. }else{
  5257. if(typeof node.parentNode!="undefined"&&node.parentNode!=null){
  5258. var _458=node.parentNode;
  5259. while(typeof _458!="undefined"&&_458!=null){
  5260. if(typeof _458.className!="undefined"&&_458.className!=null&&_458.className.substr(0,2)=="ft"){
  5261. node=_458;
  5262. break;
  5263. }else{
  5264. _458=_458.parentNode;
  5265. }
  5266. }
  5267. }else{
  5268. return false;
  5269. }
  5270. }
  5271. var _459=node.className.substr(0,2);
  5272. if(_459=="ta"||_459=="ts"||_459=="ft"){
  5273. return true;
  5274. }
  5275. }
  5276. return false;
  5277. };
  5278. CSelectionController.prototype.chartClicked=function(_45a){
  5279. this.setSelectedChartArea(_45a);
  5280. };
  5281. CSelectionController.prototype.processColumnTitleNode=function(_45b){
  5282. if(!_45b||!this.m_oCognosViewer.isBux){
  5283. return;
  5284. }
  5285. var _45c=_45b.getCellRef();
  5286. if(_45c.getAttribute("contextAugmented")=="true"||"list"!=_45b.getDataContainerType()||"columnTitle"!=_45b.getLayoutType()){
  5287. return;
  5288. }
  5289. var _45d=_45b.getSelectedContextIds();
  5290. var _45e=false;
  5291. if(typeof _45d=="object"&&_45d!=null&&_45d.length>0){
  5292. if(this.isRelational(_45d)&&this.getQueryModelId(_45d[0][0])==null){
  5293. _45e=true;
  5294. }else{
  5295. return;
  5296. }
  5297. }
  5298. var lid=_45c.parentNode.parentNode.parentNode.getAttribute("lid");
  5299. var _460=_45c.parentNode.nextSibling;
  5300. var _461=getChildElementsByAttribute(_460,"td","cid",_45c.getAttribute("cid"));
  5301. var _462=null;
  5302. var _463=true;
  5303. var _464;
  5304. if(_461.length>0){
  5305. var _465=_461[0];
  5306. var _466=_465.childNodes.length;
  5307. for(var _467=0;_467<_466;_467++){
  5308. var _468=_465.childNodes[_467];
  5309. if(_468.getAttribute&&((_468.nodeName.toLowerCase()=="table"&&typeof _468.getAttribute("lid")=="string")||_468.nodeName.toLowerCase()=="map"||_468.nodeName.toLowerCase()=="img"||_468.getAttribute("chartcontainer")=="true")){
  5310. if(_467==0){
  5311. _463=false;
  5312. }
  5313. }else{
  5314. _464=[];
  5315. if(_468.nodeName.toLowerCase()=="span"){
  5316. _464.push(_468);
  5317. }
  5318. var _469=_468.getElementsByTagName?_468.getElementsByTagName("span"):[];
  5319. for(var _46a=0;_46a<_469.length;++_46a){
  5320. if(lid==getImmediateLayoutContainerId(_469[_46a])){
  5321. _464.push(_469[_46a]);
  5322. }
  5323. }
  5324. for(var _46b=0;_46b<_464.length;++_46b){
  5325. var _46c=_464[_46b];
  5326. if(_46c.nodeType==1&&_46c.nodeName.toLowerCase()=="span"&&_46c.style.visibility!="hidden"){
  5327. if(_46c.getAttribute("ctx")!=null&&_46c.getAttribute("ctx")!=""){
  5328. _462=_46c.getAttribute("ctx");
  5329. break;
  5330. }
  5331. }
  5332. }
  5333. }
  5334. }
  5335. }
  5336. if(_462!=null){
  5337. var _46d=_462.split("::")[0].split(":")[0];
  5338. if(!_45e){
  5339. _464=_45c.getElementsByTagName("span");
  5340. if(_464.length!=0){
  5341. var _46e=this.m_oCDManager.m_cd[_46d];
  5342. var _46f=this.getTextValue(_464);
  5343. var _470={"u":_46f===null?"":_46f};
  5344. if(typeof _46e!="undefined"){
  5345. if(typeof _46e["r"]!="undefined"){
  5346. _470.r=_46e["r"];
  5347. }
  5348. if(typeof _46e["q"]!="undefined"){
  5349. _470.q=_46e["q"];
  5350. }
  5351. if(typeof _46e["i"]!="undefined"){
  5352. _470.i=_46e["i"];
  5353. }
  5354. }
  5355. var _471="cloned"+_46d;
  5356. this.m_oCDManager.m_cd[_471]=_470;
  5357. _464[0].setAttribute("ctx",_471);
  5358. _45b=this.getSelectionObjectFactory().processCTX(_45b,_471);
  5359. }
  5360. }else{
  5361. var qmid=this.getQueryModelId(_46d);
  5362. if(qmid==null){
  5363. }
  5364. if(qmid!=null){
  5365. var _473=_45d[0][0];
  5366. this.m_oCDManager.m_cd[_473].i=this.m_oCDManager.m_cd[_46d].i;
  5367. return false;
  5368. }
  5369. }
  5370. }else{
  5371. _463=false;
  5372. }
  5373. if(!_463){
  5374. _45c.setAttribute("canSort","false");
  5375. }
  5376. _45c.setAttribute("contextAugmented","true");
  5377. };
  5378. CSelectionController.prototype.selectionsInSameDataContainer=function(){
  5379. try{
  5380. var _474=this.getAllSelectedObjects();
  5381. var _475=_474[0].getLayoutElementId();
  5382. for(var _476=1;_476<_474.length;_476++){
  5383. if(_475!=_474[_476].getLayoutElementId()){
  5384. return false;
  5385. }
  5386. }
  5387. }
  5388. catch(e){
  5389. return false;
  5390. }
  5391. return true;
  5392. };
  5393. CSelectionController.prototype.selectionsFromSameDataItem=function(){
  5394. try{
  5395. var _477=this.getAllSelectedObjects();
  5396. var _478=_477[0].getDataItems()[0][0];
  5397. for(var _479=1;_479<_477.length;_479++){
  5398. if(_478!=_477[_479].getDataItems()[0][0]){
  5399. return false;
  5400. }
  5401. }
  5402. }
  5403. catch(e){
  5404. return false;
  5405. }
  5406. return true;
  5407. };
  5408. CSelectionController.prototype.isRelational=function(_47a){
  5409. try{
  5410. if(!_47a){
  5411. var _47b=this.getAllSelectedObjects()[0];
  5412. _47a=_47b.getSelectedContextIds();
  5413. }
  5414. for(var _47c=0;_47c<_47a.length;_47c++){
  5415. for(var _47d=0;_47d<_47a[_47c].length;_47d++){
  5416. var ctx=_47a[_47c][_47d];
  5417. var mun=this.getMun(ctx);
  5418. var lun=this.getLun(ctx);
  5419. var hun=this.getHun(ctx);
  5420. if(mun!=null&&typeof mun!="undefined"&&mun.length>0){
  5421. return false;
  5422. }
  5423. if(lun!=null&&typeof lun!="undefined"&&lun.length>0){
  5424. return false;
  5425. }
  5426. if(hun!=null&&typeof hun!="undefined"&&hun.length>0){
  5427. return false;
  5428. }
  5429. }
  5430. }
  5431. return true;
  5432. }
  5433. catch(e){
  5434. return true;
  5435. }
  5436. return true;
  5437. };
  5438. CSelectionController.prototype.getDataContainerType=function(){
  5439. try{
  5440. if(!this.getAllSelectedObjects()[0]){
  5441. return "";
  5442. }
  5443. return this.getAllSelectedObjects()[0].m_dataContainerType;
  5444. }
  5445. catch(e){
  5446. return "";
  5447. }
  5448. };
  5449. CSelectionController.prototype.areSelectionsColumnRowTitles=function(){
  5450. try{
  5451. var _482=this.getAllSelectedObjects();
  5452. for(var _483=0;_483<_482.length;_483++){
  5453. var _484=_482[_483];
  5454. if(_484.getLayoutType()!="columnTitle"||_484.isHomeCell()){
  5455. return false;
  5456. }
  5457. }
  5458. }
  5459. catch(e){
  5460. return false;
  5461. }
  5462. return true;
  5463. };
  5464. CSelectionController.prototype.selectionsAreMeasures=function(){
  5465. try{
  5466. var _485=this.getAllSelectedObjects();
  5467. for(var _486=0;_486<_485.length;_486++){
  5468. var _487=_485[_486];
  5469. if(this.getUsageInfo(_487.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
  5470. return false;
  5471. }
  5472. }
  5473. }
  5474. catch(e){
  5475. return false;
  5476. }
  5477. return true;
  5478. };
  5479. CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
  5480. var _488=this.getAllSelectedObjects();
  5481. if(_488.length==0){
  5482. return false;
  5483. }
  5484. for(var _489=0;_489<_488.length;_489++){
  5485. var _48a=_488[0];
  5486. if(_48a.getSelectedContextIds().length==0){
  5487. return false;
  5488. }
  5489. var _48b=_48a.getSelectedContextIds()[0][0];
  5490. var mun=this.getMun(_48b);
  5491. var _48d=this.getUsageInfo(_48b);
  5492. if(mun==null||typeof mun=="undefined"||mun.length==0||_48d==this.c_usageMeasure){
  5493. return false;
  5494. }
  5495. }
  5496. return true;
  5497. };
  5498. CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
  5499. var _48e=this.getAllSelectedObjects();
  5500. if(_48e.length==0){
  5501. return false;
  5502. }
  5503. var _48f=this.selectionsHaveCalculationMetadata();
  5504. for(var _490=0;_490<_48e.length;_490++){
  5505. var _491=_48e[_490];
  5506. var _492=_491.getSelectedContextIds()[0][0];
  5507. if(!this.isCalculationOrMeasure(_492,_48f)){
  5508. return false;
  5509. }
  5510. }
  5511. return true;
  5512. };
  5513. CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
  5514. try{
  5515. var _493=this.getDataContainerType();
  5516. var _494=this.getAllSelectedObjects();
  5517. for(var _495=0;_495<_494.length;_495++){
  5518. var _496=_494[_495];
  5519. var _497=_496.getSelectedContextIds();
  5520. var _498=_497[0][0];
  5521. var sHun=this.getHun(_498);
  5522. if(!this.hasCalculationMetadata(_498,_497,_493)){
  5523. return false;
  5524. }
  5525. }
  5526. }
  5527. catch(e){
  5528. return false;
  5529. }
  5530. return true;
  5531. };
  5532. CSelectionController.prototype.isCalculationOrMeasure=function(_49a,_49b){
  5533. var mun=this.getMun(_49a);
  5534. var _49d=this.getUsageInfo(_49a);
  5535. if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_49b)||_49d==this.c_usageMeasure)){
  5536. return false;
  5537. }
  5538. return true;
  5539. };
  5540. CSelectionController.prototype.hasCalculationMetadata=function(_49e,_49f,_4a0){
  5541. var sHun=this.getHun(_49e);
  5542. if(this.getUsageInfo(_49e)!=this.c_usageMeasure){
  5543. if((this.isRelational(_49f)&&this.getQueryModelId(_49e)!=null)||(!this.isRelational(_49f)&&_4a0=="list"&&(sHun&&sHun!=""))){
  5544. return false;
  5545. }
  5546. }
  5547. return true;
  5548. };
  5549. CSelectionController.prototype.selectionsAreDateTime=function(){
  5550. try{
  5551. var _4a2=this.getAllSelectedObjects();
  5552. for(var _4a3=0;_4a3<_4a2.length;_4a3++){
  5553. var _4a4=_4a2[_4a3];
  5554. var _4a5=_4a4.getSelectedContextIds();
  5555. var _4a6=_4a5[0][0];
  5556. var _4a7=this.getDataType(_4a6);
  5557. if(_4a7&&typeof this.m_ccl_dateTypes[_4a7]!=="undefined"){
  5558. return true;
  5559. }
  5560. }
  5561. }
  5562. catch(e){
  5563. return false;
  5564. }
  5565. return false;
  5566. };
  5567. CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
  5568. try{
  5569. var _4a8=this.getAllSelectedObjects();
  5570. if(_4a8===null||_4a8.length<=0){
  5571. return null;
  5572. }
  5573. var _4a9=this.m_oCognosViewer.getModelPath();
  5574. var _4aa=[];
  5575. for(var i=0;i<_4a8.length;i++){
  5576. var obj=_4a8[i].getContextJsonObject(this,_4a9);
  5577. _4aa.push(obj);
  5578. }
  5579. return _4aa;
  5580. }
  5581. catch(e){
  5582. }
  5583. };
  5584. CSelectionController.prototype.destroy=function(){
  5585. delete this.m_oCognosViewer;
  5586. delete this.m_aCutColumns;
  5587. delete this.m_aSelectedObjects;
  5588. delete this.m_selectedClass;
  5589. delete this.m_cutClass;
  5590. if(this.m_oObserver&&this.m_oObserver.destroy){
  5591. this.m_oObserver.destroy();
  5592. }
  5593. delete this.m_oObserver;
  5594. delete this.m_aReportMetadataArray;
  5595. delete this.m_aReportContextDataArray;
  5596. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  5597. this.m_oCDManager.destroy();
  5598. }
  5599. delete this.m_oCDManager;
  5600. if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){
  5601. this.m_oSelectionObjectFactory.destroy();
  5602. }
  5603. delete this.m_oSelectionObjectFactory;
  5604. delete this.m_selectedChartArea;
  5605. delete this.m_selectedChartNodes;
  5606. delete this.m_selectionContainerMap;
  5607. delete this.m_chartHelpers;
  5608. delete this.m_oJsonForMarshal;
  5609. if(this.hasSavedSelections()){
  5610. this.clearSavedSelections();
  5611. }
  5612. };
  5613. function clearTextSelection(_4ad){
  5614. if(!_4ad){
  5615. _4ad=document;
  5616. }
  5617. try{
  5618. if(typeof _4ad.selection=="object"&&_4ad.selection!==null){
  5619. _4ad.selection.empty();
  5620. }else{
  5621. if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){
  5622. window.getSelection().removeAllRanges();
  5623. }
  5624. }
  5625. }
  5626. catch(e){
  5627. }
  5628. };
  5629. function CtxArrayPlaceHolder(){
  5630. };
  5631. var self=window;
  5632. function CDrillManager(oCV){
  5633. this.m_drawDrillTargets=false;
  5634. this.setCV(oCV);
  5635. };
  5636. CDrillManager.prototype=new CViewerHelper();
  5637. CDrillManager.prototype.getSelectionController=function(){
  5638. var _4af;
  5639. try{
  5640. _4af=getCognosViewerSCObjectRef(this.getCV().getId());
  5641. }
  5642. catch(e){
  5643. _4af=null;
  5644. }
  5645. return _4af;
  5646. };
  5647. CDrillManager.prototype.getSelectedObject=function(){
  5648. var _4b0=this.getSelectionController();
  5649. if(_4b0==null){
  5650. return null;
  5651. }
  5652. var _4b1=null;
  5653. var _4b2=null;
  5654. if(_4b0.hasSelectedChartNodes()){
  5655. _4b2=_4b0.getSelectedChartNodes();
  5656. }else{
  5657. _4b2=_4b0.getSelections();
  5658. }
  5659. if(_4b2&&_4b2.length==1){
  5660. _4b1=_4b2[0];
  5661. }
  5662. return _4b1;
  5663. };
  5664. CDrillManager.prototype.canDrillUp=function(){
  5665. if(this.getDrillOption("drillUp")==true&&this.hasMuns()){
  5666. return true;
  5667. }
  5668. return false;
  5669. };
  5670. CDrillManager.prototype.canDrillDown=function(){
  5671. if(this.getDrillOption("drillDown")==true){
  5672. return true;
  5673. }
  5674. return false;
  5675. };
  5676. CDrillManager.prototype.hasMuns=function(_4b3){
  5677. if(typeof _4b3=="undefined"){
  5678. _4b3=this.getSelectedObject();
  5679. }
  5680. if(_4b3==null){
  5681. return false;
  5682. }
  5683. var _4b4=_4b3.getMuns();
  5684. var muns="";
  5685. for(var _4b6=0;_4b6<_4b4.length&&muns=="";++_4b6){
  5686. if(typeof _4b4[_4b6][0]!="undefined"){
  5687. muns+=_4b4[_4b6][0];
  5688. }
  5689. }
  5690. return (muns!="");
  5691. };
  5692. CDrillManager.prototype.getRefQuery=function(){
  5693. var _4b7="";
  5694. var _4b8=this.getSelectedObject();
  5695. if(_4b8==null){
  5696. return "";
  5697. }
  5698. var _4b9=_4b8.getRefQueries();
  5699. for(var i=0;i<_4b9.length;i++){
  5700. if(_4b9[i]!=null){
  5701. for(var j=0;j<_4b9[i].length;j++){
  5702. if(_4b9[i][j]!=null&&_4b9[i][j]!=""){
  5703. return _4b9[i][j];
  5704. }
  5705. }
  5706. }
  5707. }
  5708. return _4b7;
  5709. };
  5710. CDrillManager.prototype.isIsolated=function(){
  5711. var _4bc=this.getSelectionController();
  5712. if(_4bc==null||_4bc.getDrillUpDownEnabled()==false){
  5713. return false;
  5714. }
  5715. var _4bd=this.getSelectedObject();
  5716. if(_4bd==null){
  5717. return false;
  5718. }
  5719. if(_4bd instanceof CSelectionChartObject&&_4bc!=null){
  5720. var _4be=_4bd.getArea();
  5721. if(_4be!=null){
  5722. var _4bf=_4be.getAttribute("isolated");
  5723. if(typeof _4bf!="undefined"&&_4bf!=null&&_4bf=="true"){
  5724. return true;
  5725. }
  5726. }
  5727. }else{
  5728. var _4c0=_4bd.getCellRef();
  5729. if(typeof _4c0=="object"&&_4c0!=null){
  5730. var _4c1=_4c0.getElementsByTagName("span");
  5731. if(_4c1!=null&&typeof _4c1!="undefined"&&_4c1.length>0){
  5732. var _4c2=_4c1[0].getAttribute("isolated");
  5733. if(_4c2!=null&&_4c2!="undefined"&&_4c2=="true"){
  5734. return true;
  5735. }
  5736. }
  5737. }
  5738. }
  5739. return false;
  5740. };
  5741. CDrillManager.prototype.getDrillOption=function(_4c3){
  5742. var _4c4=this.getSelectionController();
  5743. if(_4c4==null||_4c4.getDrillUpDownEnabled()==false||typeof _4c3=="undefined"){
  5744. return false;
  5745. }
  5746. var _4c5=this.getSelectedObject();
  5747. if(_4c5==null){
  5748. return false;
  5749. }
  5750. if(this.isIsolated()){
  5751. if(_4c3=="drillDown"){
  5752. return false;
  5753. }else{
  5754. if(_4c3=="drillUp"){
  5755. return true;
  5756. }
  5757. }
  5758. }
  5759. if(_4c3=="drillDown"){
  5760. if(_4c5 instanceof CSelectionChartObject&&_4c4!=null){
  5761. var _4c6=_4c5.getArea();
  5762. if(_4c6!=null){
  5763. var _4c7=_4c6.getAttribute("isChartTitle");
  5764. if(typeof _4c7!="undefined"&&_4c7!=null&&_4c7=="true"){
  5765. return false;
  5766. }
  5767. }
  5768. }
  5769. }
  5770. var _4c8=_4c5.getDrillOptions();
  5771. var _4c9=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV));
  5772. for(var idx=0;idx<_4c8.length;++idx){
  5773. var _4cb=(_4c9)?_4c8[idx].length:1;
  5774. for(var _4cc=0;_4cc<_4cb;++_4cc){
  5775. var _4cd=_4c8[idx][_4cc];
  5776. if(_4cd=="3"){
  5777. return true;
  5778. }else{
  5779. if(_4c3=="drillUp"&&_4cd=="1"){
  5780. return true;
  5781. }else{
  5782. if(_4c3=="drillDown"&&_4cd=="2"){
  5783. return true;
  5784. }
  5785. }
  5786. }
  5787. }
  5788. }
  5789. return false;
  5790. };
  5791. CDrillManager.prototype.canDrillThrough=function(){
  5792. var _4ce=this.getSelectionController();
  5793. if(_4ce==null||_4ce.getModelDrillThroughEnabled()==false){
  5794. return false;
  5795. }
  5796. return true;
  5797. };
  5798. CDrillManager.prototype.singleClickDrillEvent=function(evt,app){
  5799. var _4d1=this.getSelectionController();
  5800. if(_4d1!=null){
  5801. if(this.getCV().bCanUseCognosViewerSelection==true){
  5802. _4d1.pageClicked(evt);
  5803. }
  5804. }
  5805. var node=getCrossBrowserNode(evt);
  5806. try{
  5807. if(node.className&&node.className.indexOf("dl")==0){
  5808. if(this.canDrillDown()){
  5809. this.singleClickDrillDown(evt,app);
  5810. return true;
  5811. }else{
  5812. if(this.canDrillUp()){
  5813. this.singleClickDrillUp(evt,app);
  5814. return true;
  5815. }
  5816. }
  5817. }
  5818. }
  5819. catch(e){
  5820. }
  5821. if(app=="RV"){
  5822. return this.getDrillThroughParameters("execute",evt);
  5823. }
  5824. return false;
  5825. };
  5826. CDrillManager.prototype.singleClickDrillDown=function(evt,app){
  5827. if(app=="QS"){
  5828. this.qsDrillDown();
  5829. }else{
  5830. this.rvDrillDown();
  5831. }
  5832. };
  5833. CDrillManager.prototype.singleClickDrillUp=function(evt,app){
  5834. if(app=="QS"){
  5835. this.qsDrillUp();
  5836. }else{
  5837. this.rvDrillUp();
  5838. }
  5839. };
  5840. CDrillManager.prototype.getDrillParameters=function(_4d7,_4d8,_4d9,_4da){
  5841. var _4db=[];
  5842. var _4dc=this.getSelectedObject();
  5843. if(_4dc==null){
  5844. return _4db;
  5845. }
  5846. if(typeof _4d8=="undefined"){
  5847. _4d8=true;
  5848. }
  5849. var _4dd=_4dc.getDataItems();
  5850. var _4de=_4dc.getMuns();
  5851. var _4df=_4dc.getDimensionalItems("lun");
  5852. var _4e0=_4dc.getDimensionalItems("hun");
  5853. var _4e1=_4dc.getDrillOptions();
  5854. if(typeof _4dd=="undefined"||typeof _4de=="undefined"||typeof _4e1=="undefined"||_4de==null||_4dd==null||_4e1==null){
  5855. return _4db;
  5856. }
  5857. if(_4de.length!=_4dd.length){
  5858. return _4db;
  5859. }
  5860. var _4e2=_4de.length;
  5861. for(var _4e3=0;_4e3<_4e2;++_4e3){
  5862. if(_4dd[_4e3].length!=0){
  5863. var _4e4=(_4da)?this.findUserSelectedDrillItem(_4da,_4dd[_4e3]):0;
  5864. if(_4e4<0){
  5865. continue;
  5866. }
  5867. if((_4d9===true)||this.getDrillOption(_4d7)){
  5868. if(_4de[_4e3][_4e4]==""||_4db.toString().indexOf(_4de[_4e3][_4e4],0)==-1){
  5869. _4db[_4db.length]=_4dd[_4e3][_4e4];
  5870. _4db[_4db.length]=_4de[_4e3][_4e4];
  5871. if(_4d8===true){
  5872. _4db[_4db.length]=_4df[_4e3][_4e4];
  5873. _4db[_4db.length]=_4e0[_4e3][_4e4];
  5874. }
  5875. }
  5876. }
  5877. }
  5878. }
  5879. return _4db;
  5880. };
  5881. CDrillManager.prototype.findUserSelectedDrillItem=function(_4e5,_4e6){
  5882. for(var _4e7=0;_4e7<_4e6.length;++_4e7){
  5883. if(_4e5==_4e6[_4e7]){
  5884. return _4e7;
  5885. }
  5886. }
  5887. return -1;
  5888. };
  5889. CDrillManager.prototype.getModelDrillThroughContext=function(_4e8){
  5890. var _4e9="";
  5891. if(this.canDrillThrough()===true){
  5892. if(typeof gUseNewSelectionContext=="undefined"){
  5893. var _4ea="";
  5894. if(typeof getConfigFrame!="undefined"){
  5895. _4ea=decodeURIComponent(getConfigFrame().cfgGet("PackageBase"));
  5896. }else{
  5897. if(this.getCV().getModelPath()!==""){
  5898. _4ea=this.getCV().getModelPath();
  5899. }
  5900. }
  5901. _4e9=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_4ea));
  5902. }else{
  5903. var _4eb=new CParameterValues();
  5904. var _4ec=this.getSelectionController();
  5905. if(_4ec){
  5906. var _4ed=_4ec.getAllSelectedObjects();
  5907. for(var _4ee=0;_4ee<_4ed.length;++_4ee){
  5908. var _4ef=_4ed[_4ee];
  5909. var _4f0=_4ef.getMuns();
  5910. var _4f1=_4ef.getMetadataItems();
  5911. var _4f2=_4ef.getUseValues();
  5912. for(var _4f3=0;_4f3<_4f1.length;++_4f3){
  5913. for(var idx=0;idx<_4f1[_4f3].length;++idx){
  5914. if(_4f1[_4f3][idx]==null||_4f1[_4f3][idx]==""){
  5915. continue;
  5916. }
  5917. var name=_4f1[_4f3][idx];
  5918. var _4f6;
  5919. if(_4f0[_4f3][idx]!=null&&_4f0[_4f3][idx]!=""){
  5920. _4f6=_4f0[_4f3][idx];
  5921. }else{
  5922. _4f6=_4f2[_4f3][idx];
  5923. }
  5924. var _4f7=_4f2[_4f3][idx];
  5925. _4eb.addSimpleParmValueItem(name,_4f6,_4f7,"true");
  5926. }
  5927. }
  5928. }
  5929. }
  5930. var _4f8=_4e8.XMLBuilderCreateXMLDocument("context");
  5931. _4e9=_4eb.generateXML(_4e8,_4f8);
  5932. }
  5933. }
  5934. return _4e9;
  5935. };
  5936. CDrillManager.prototype.rvDrillUp=function(_4f9){
  5937. this.getCV().executeAction("DrillUp",_4f9);
  5938. };
  5939. CDrillManager.prototype.rvDrillDown=function(_4fa){
  5940. this.getCV().executeAction("DrillDown",_4fa);
  5941. };
  5942. CDrillManager.prototype.rvBuildXMLDrillParameters=function(_4fb,_4fc){
  5943. var _4fd=this.getDrillParameters(_4fb,true,false,_4fc);
  5944. if(_4fd.length==0){
  5945. return drillParams;
  5946. }
  5947. return this.buildDrillParametersSpecification(_4fd);
  5948. };
  5949. CDrillManager.prototype.buildDrillParametersSpecification=function(_4fe){
  5950. var _4ff="<DrillParameters>";
  5951. var idx=0;
  5952. while(idx<_4fe.length){
  5953. _4ff+="<DrillGroup>";
  5954. _4ff+="<DataItem>";
  5955. _4ff+=sXmlEncode(_4fe[idx++]);
  5956. _4ff+="</DataItem>";
  5957. _4ff+="<MUN>";
  5958. _4ff+=sXmlEncode(_4fe[idx++]);
  5959. _4ff+="</MUN>";
  5960. _4ff+="<LUN>";
  5961. _4ff+=sXmlEncode(_4fe[idx++]);
  5962. _4ff+="</LUN>";
  5963. _4ff+="<HUN>";
  5964. _4ff+=sXmlEncode(_4fe[idx++]);
  5965. _4ff+="</HUN>";
  5966. _4ff+="</DrillGroup>";
  5967. }
  5968. _4ff+="</DrillParameters>";
  5969. return _4ff;
  5970. };
  5971. CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){
  5972. var _501=null;
  5973. var _502=this.getAuthoredDrillThroughTargets();
  5974. if(_502.length>0){
  5975. var _503="<AuthoredDrillTargets>";
  5976. for(var _504=0;_504<_502.length;++_504){
  5977. _503+=eval("\""+_502[_504]+"\"");
  5978. }
  5979. _503+="</AuthoredDrillTargets>";
  5980. var cv=this.getCV();
  5981. var _506=cv.getAction("AuthoredDrill");
  5982. var _507=cv.getDrillTargets();
  5983. if(_507.length>0){
  5984. _501=_506.getAuthoredDrillThroughContext(_503,_507);
  5985. }
  5986. }
  5987. return _501;
  5988. };
  5989. CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){
  5990. var _508="";
  5991. var _509=this.getAuthoredDrillsForCurrentSelection();
  5992. if(_509){
  5993. _508=XMLBuilderSerializeNode(_509);
  5994. }
  5995. return _508;
  5996. };
  5997. CDrillManager.prototype.launchGoToPage=function(_50a,_50b){
  5998. var _50c=this.getSelectionController();
  5999. if((_50c!=null&&_50c.getModelDrillThroughEnabled()==true)||(typeof _50a!="undefined"&&_50a!=null&&_50a!="")){
  6000. var _50d=this.getAuthoredDrillsForGotoPage();
  6001. var _50e=this.getModelDrillThroughContext(self);
  6002. var form=document.getElementById("drillForm");
  6003. if(form!=null){
  6004. document.body.removeChild(form);
  6005. }
  6006. form=document.createElement("form");
  6007. var cvid=this.getCVId();
  6008. var _511=document.forms["formWarpRequest"+cvid];
  6009. form.setAttribute("id","drillForm");
  6010. form.setAttribute("name","drillForm");
  6011. form.setAttribute("target",_511.getAttribute("target"));
  6012. form.setAttribute("method","post");
  6013. form.setAttribute("action",_511.getAttribute("action"));
  6014. form.style.display="none";
  6015. document.body.appendChild(form);
  6016. if(this.getCV().getModelPath()!==""){
  6017. form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath()));
  6018. }
  6019. if(typeof _511["ui.object"]!="undefined"&&_511["ui.object"].value!=""){
  6020. form.appendChild(createFormField("drillSource",_511["ui.object"].value));
  6021. }else{
  6022. if(typeof this.getCV().envParams["ui.spec"]!="undefined"){
  6023. form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"]));
  6024. }
  6025. }
  6026. if(_50d!=""){
  6027. form.appendChild(createHiddenFormField("m","portal/drillthrough.xts"));
  6028. form.appendChild(createFormField("invokeGotoPage","true"));
  6029. form.appendChild(createFormField("m","portal/drillthrough.xts"));
  6030. form.appendChild(createFormField("modelDrillEnabled",_50c.getModelDrillThroughEnabled()));
  6031. if(typeof gUseNewSelectionContext=="undefined"){
  6032. form.appendChild(createFormField("newSelectionContext","true"));
  6033. }
  6034. }else{
  6035. if(typeof gUseNewSelectionContext=="undefined"){
  6036. form.appendChild(createHiddenFormField("m","portal/goto2.xts"));
  6037. }else{
  6038. form.appendChild(createHiddenFormField("m","portal/goto.xts"));
  6039. }
  6040. }
  6041. form.appendChild(createHiddenFormField("b_action","xts.run"));
  6042. form.appendChild(createHiddenFormField("drillTargets",_50d));
  6043. if(typeof gUseNewSelectionContext=="undefined"){
  6044. form.appendChild(createHiddenFormField("drillContext",_50e));
  6045. }else{
  6046. form.appendChild(createHiddenFormField("modeledDrillthru",_50e));
  6047. }
  6048. form.appendChild(createHiddenFormField("errURL","javascript:window.close();"));
  6049. if(typeof _50b!="undefined"&&_50b==true){
  6050. form.appendChild(this.createFormField("directLaunch","true"));
  6051. }
  6052. var _512="";
  6053. if(this.getCV().envParams["ui.routingServerGroup"]){
  6054. _512=this.getCV().envParams["ui.routingServerGroup"];
  6055. }
  6056. form.appendChild(createHiddenFormField("ui.routingServerGroup",_512));
  6057. if(this.getCV().getExecutionParameters()!=""){
  6058. form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters()));
  6059. }
  6060. if(_511.lang&&_511.lang.value!=""){
  6061. form.appendChild(createHiddenFormField("lang",_511.lang.value));
  6062. }
  6063. if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){
  6064. if(typeof this.getCV().launchGotoPage==="function"){
  6065. this.getCV().launchGotoPage(form);
  6066. }else{
  6067. var _513="winNAT_"+(new Date()).getTime();
  6068. var _514=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid;
  6069. window.open(_514,_513,"toolbar,location,status,menubar,resizable,scrollbars=1");
  6070. form.target=_513;
  6071. }
  6072. }
  6073. }
  6074. };
  6075. CDrillManager.prototype.buildSearchPageXML=function(_515,pkg,_517,_518,_519,_51a,_51b){
  6076. var _51c=null;
  6077. if(typeof _515.XMLElement=="function"){
  6078. _51c=_515.XMLBuilderCreateXMLDocument("cognosSearch");
  6079. _515.XMLBuilderSetAttributeNodeNS(_51c.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/");
  6080. var _51d=_51c.createElement("package");
  6081. if(typeof pkg=="string"&&pkg!==""){
  6082. _51d.appendChild(_51c.createTextNode(pkg));
  6083. }
  6084. _51c.documentElement.appendChild(_51d);
  6085. var _51e=_51c.createElement("model");
  6086. if(typeof _517=="string"&&_517!==""){
  6087. _51e.appendChild(_51c.createTextNode(_517));
  6088. }
  6089. _51c.documentElement.appendChild(_51e);
  6090. var _51f=_51c.createElement("selectedContext");
  6091. _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  6092. _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  6093. _515.XMLBuilderSetAttributeNodeNS(_51f,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  6094. _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  6095. _515.XMLBuilderSetAttributeNodeNS(_51f,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  6096. _51c.documentElement.appendChild(_51f);
  6097. for(var _520 in _518){
  6098. var _521=_51c.createElement("item");
  6099. _515.XMLBuilderSetAttributeNodeNS(_521,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  6100. var _522=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_51c);
  6101. _515.XMLBuilderSetAttributeNodeNS(_522,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  6102. _522.appendChild(_51c.createTextNode(_518[_520].name));
  6103. var _523=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_51c);
  6104. _515.XMLBuilderSetAttributeNodeNS(_523,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  6105. _515.XMLBuilderSetAttributeNodeNS(_523,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  6106. for(var j=0;j<_518[_520].values.length;j++){
  6107. var _525=_51c.createElement("item");
  6108. _515.XMLBuilderSetAttributeNodeNS(_525,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  6109. var _526=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_51c);
  6110. _515.XMLBuilderSetAttributeNodeNS(_526,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  6111. _526.appendChild(_51c.createTextNode(_518[_520].values[j][0]));
  6112. var _527=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_51c);
  6113. _515.XMLBuilderSetAttributeNodeNS(_527,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  6114. var _528=_518[_520].values[j][1]==null?"":_518[_520].values[j][1];
  6115. _527.appendChild(_51c.createTextNode(_528));
  6116. _525.appendChild(_526);
  6117. _525.appendChild(_527);
  6118. _523.appendChild(_525);
  6119. }
  6120. _521.appendChild(_522);
  6121. _521.appendChild(_523);
  6122. _51f.appendChild(_521);
  6123. }
  6124. var _529=_51c.createElement("defaultMeasure");
  6125. _51c.documentElement.appendChild(_529);
  6126. _51a.buildXML(_515,_51c,"data");
  6127. var _52a=_51c.createElement("filter");
  6128. _51c.documentElement.appendChild(_52a);
  6129. }
  6130. return _51c;
  6131. };
  6132. CDrillManager.prototype.openSearchPage=function(_52b,_52c){
  6133. this.getModelDrillThroughContext(self);
  6134. var _52d=document.getElementById("searchPage");
  6135. if(_52d!=null){
  6136. document.body.removeChild(_52d);
  6137. }
  6138. _52d=document.createElement("form");
  6139. _52d.setAttribute("id","searchPage");
  6140. _52d.setAttribute("name","searchPage");
  6141. _52d.setAttribute("method","post");
  6142. _52d.setAttribute("target",_52d.name);
  6143. _52d.setAttribute("action",this.getCV().getGateway()+"/gosearch");
  6144. _52d.style.display="none";
  6145. document.body.appendChild(_52d);
  6146. _52d.appendChild(createHiddenFormField("csn.action","search"));
  6147. _52d.appendChild(createHiddenFormField("csn.drill",_52c));
  6148. var _52e=window.open("",_52d.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640");
  6149. _52e.focus();
  6150. _52d.submit();
  6151. };
  6152. CDrillManager.prototype.launchSearchPage=function(){
  6153. var _52f=this.getSelectionController();
  6154. var _530=document.forms["formWarpRequest"+this.getCVId()];
  6155. var _531=this.determineSelectionsForSearchPage(_52f);
  6156. var _532=this.getSearchContextDataSpecfication(_52f);
  6157. var _533=this.buildSearchPageXML(self,_530.packageBase.value,this.getCV().getModelPath(),_531,[],_532,[]);
  6158. this.openSearchPage(_530.packageBase.value,XMLBuilderSerializeNode(_533));
  6159. };
  6160. CDrillManager.prototype.qsDrillDown=function(){
  6161. if(!this.canDrillDown()){
  6162. getConfigFrame().dlgGenericSelectionMessage(false);
  6163. return;
  6164. }
  6165. var _534="DD:";
  6166. this.qsSendDrillCommand(_534);
  6167. };
  6168. CDrillManager.prototype.qsDrillUp=function(){
  6169. if(!this.canDrillUp()){
  6170. getConfigFrame().dlgGenericSelectionMessage(false);
  6171. return;
  6172. }
  6173. var _535="DU:";
  6174. this.qsSendDrillCommand(_535);
  6175. };
  6176. CDrillManager.prototype.qsSendDrillCommand=function(_536){
  6177. var _537;
  6178. if(_536=="DU:"){
  6179. _537="drillUp";
  6180. }else{
  6181. _537="drillDown";
  6182. }
  6183. var _538=this.getDrillParameters(_537,false,false);
  6184. if(_538.length==0){
  6185. getConfigFrame().dlgGenericSelectionMessage(false);
  6186. return;
  6187. }
  6188. for(var idx=0;idx<_538.length;++idx){
  6189. _536+=getConfigFrame().escapeParam(_538[idx]);
  6190. if(idx+1<_538.length){
  6191. _536+=",";
  6192. }
  6193. }
  6194. getConfigFrame().sendCmd(_536,"",true);
  6195. };
  6196. CDrillManager.prototype.qsLaunchGoToPage=function(_53a){
  6197. var _53b=this.getSelectionController();
  6198. if(_53b!=null&&_53b.getModelDrillThroughEnabled()==true){
  6199. var _53c=this.getModelDrillThroughContext(cf);
  6200. if(_53c==""){
  6201. getConfigFrame().dlgGenericSelectionMessage(false);
  6202. return;
  6203. }
  6204. var _53d=document.getElementById("gotoPage");
  6205. if(_53d!=null){
  6206. document.body.removeChild(_53d);
  6207. }
  6208. _53d=document.createElement("form");
  6209. _53d.setAttribute("id","gotoPage");
  6210. _53d.setAttribute("name","gotoPage");
  6211. _53d.setAttribute("method","post");
  6212. _53d.style.display="none";
  6213. document.body.appendChild(_53d);
  6214. var _53e=getConfigFrame();
  6215. _53d.appendChild(this.createFormField("objpath",decodeURIComponent(_53e.cfgGet("PackageBase"))));
  6216. if(typeof gUseNewSelectionContext=="undefined"){
  6217. _53d.appendChild(this.createFormField("m","portal/goto2.xts"));
  6218. }else{
  6219. _53d.appendChild(this.createFormField("m","portal/goto.xts"));
  6220. }
  6221. _53d.appendChild(this.createFormField("b_action","xts.run"));
  6222. if(typeof gUseNewSelectionContext=="undefined"){
  6223. _53d.appendChild(this.createFormField("drillContext",_53c));
  6224. }else{
  6225. _53d.appendChild(this.createFormField("modeledDrillthru",_53c));
  6226. }
  6227. if(typeof getConfigFrame().routingServerGroup!="undefined"){
  6228. _53d.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup));
  6229. }
  6230. if(typeof _53a!="undefined"&&_53a==true){
  6231. _53d.appendChild(this.createFormField("directLaunch","true"));
  6232. }
  6233. var _53f=_53e.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters();
  6234. if(_53f){
  6235. _53d.appendChild(this.createFormField("encExecutionParameters",_53f));
  6236. }
  6237. var _540="winNAT_"+(new Date()).getTime();
  6238. var _541=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId();
  6239. window.open(_541,_540,"toolbar,location,status,menubar,resizable,scrollbars=1");
  6240. _53d.target=_540;
  6241. }
  6242. };
  6243. CDrillManager.prototype.qsLaunchSearchPage=function(){
  6244. var cf=getConfigFrame();
  6245. var _543=goWindowManager.getSelectionController();
  6246. var _544=this.determineSelectionsForSearchPage(_543);
  6247. var _545=this.getSearchContextDataSpecfication(_543);
  6248. var _546=decodeURIComponent(cf.cfgGet("PackageBase"));
  6249. var _547=this.buildSearchPageXML(cf,_546,decodeURIComponent(cf.cfgGet("cmLastModel")),_544,[],_545,[]);
  6250. this.openSearchPage(_546,cf.XMLBuilderSerializeNode(_547));
  6251. };
  6252. CDrillManager.prototype.determineSelectionsForSearchPage=function(_548){
  6253. var _549=new CtxArrayPlaceHolder();
  6254. var _54a=_548.getAllSelectedObjects();
  6255. for(var i=0;i<_54a.length;i++){
  6256. var _54c=_54a[i].getColumnName();
  6257. if(!this.containsByIndiceInArray(_549,_54c)){
  6258. _549[_54c]={};
  6259. _549[_54c].name=_54c;
  6260. _549[_54c].values=[];
  6261. }
  6262. var idx0="";
  6263. var muns=_54a[i].getMuns();
  6264. if(muns!=null&&muns.length>0){
  6265. idx0=muns[0][0];
  6266. }
  6267. var idx1=_54a[i].getDisplayValues()[0];
  6268. if(!(this.containsInArray(_549[_54c].values,0,idx0)&&this.containsInArray(_549[_54c].values,1,idx1))){
  6269. _549[_54c].values[_549[_54c].values.length]=[idx0,idx1];
  6270. }
  6271. }
  6272. return _549;
  6273. };
  6274. CDrillManager.prototype.getSearchContextDataSpecfication=function(_550){
  6275. var _551=new CParameterValues();
  6276. var _552=_550.getCCDManager();
  6277. var _553=_552.m_cd;
  6278. for(var _554 in _553){
  6279. var _555=_552.GetUsage(_554);
  6280. if(_555!="2"){
  6281. var _556=_552.GetRDIValue(_554);
  6282. var _557=_552.GetDisplayValue(_554);
  6283. _551.addSimpleParmValueItem(_556,_556,_557,"true");
  6284. }
  6285. }
  6286. return _551;
  6287. };
  6288. CDrillManager.prototype.containsByIndiceInArray=function(a,v){
  6289. for(var i in a){
  6290. if(i==v){
  6291. return true;
  6292. }
  6293. }
  6294. return false;
  6295. };
  6296. CDrillManager.prototype.containsInArray=function(a,idx,v){
  6297. for(var i in a){
  6298. if(a[i][idx]==v){
  6299. return true;
  6300. }
  6301. }
  6302. return false;
  6303. };
  6304. CDrillManager.prototype.createFormField=function(name,_560){
  6305. var _561=document.createElement("input");
  6306. _561.setAttribute("type","hidden");
  6307. _561.setAttribute("name",name);
  6308. _561.setAttribute("value",_560);
  6309. return (_561);
  6310. };
  6311. CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){
  6312. var _562=[];
  6313. var _563=this.getSelectionController();
  6314. var _564=null;
  6315. if(_563!=null){
  6316. if(_563.getSelectedColumnIds().length==1){
  6317. var _565=_563.getSelections();
  6318. for(var _566=0;_566<_565.length;++_566){
  6319. var _567=_565[_566];
  6320. _564=_567.getCellRef();
  6321. while(_564){
  6322. if(_564.getAttribute("dtTargets")!=null){
  6323. _562.push("<rvDrillTargets>"+_564.getAttribute("dtTargets")+"</rvDrillTargets>");
  6324. break;
  6325. }else{
  6326. if(_564.getAttribute("onclick")!=null){
  6327. var _568=_564.getAttribute("onclick");
  6328. var _569=null;
  6329. if(_568.indexOf("doSingleDrillThrough")!=-1){
  6330. _569=_568.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough");
  6331. }else{
  6332. if(_568.indexOf("doMultipleDrillThrough")!=-1){
  6333. _569=_568.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough");
  6334. }
  6335. }
  6336. if(_569!=null){
  6337. var _56a=eval(_569);
  6338. if(_56a!=null){
  6339. _562.push(_56a);
  6340. break;
  6341. }
  6342. }
  6343. }
  6344. }
  6345. _564=XMLHelper_GetFirstChildElement(_564);
  6346. }
  6347. }
  6348. }else{
  6349. if(_563.hasSelectedChartNodes()){
  6350. var _56b=_563.getSelectedChartNodes();
  6351. var _56c=_56b[0];
  6352. _564=_56c.getArea();
  6353. if(_564.getAttribute("dtTargets")!=null){
  6354. _562.push("<rvDrillTargets>"+_564.getAttribute("dtTargets")+"</rvDrillTargets>");
  6355. }
  6356. }else{
  6357. if(_563.getSelectedDrillThroughImage()!=null){
  6358. var _56d=_563.getSelectedDrillThroughImage();
  6359. if(_56d&&_56d.getAttribute("dtTargets")!=null){
  6360. _562.push("<rvDrillTargets>"+_56d.getAttribute("dtTargets")+"</rvDrillTargets>");
  6361. }
  6362. }else{
  6363. if(_563.getSelectDrillThroughSingleton()!=null){
  6364. var _56e=_563.getSelectDrillThroughSingleton();
  6365. if(_56e&&_56e.getAttribute("dtTargets")!=null){
  6366. _562.push("<rvDrillTargets>"+_56e.getAttribute("dtTargets")+"</rvDrillTargets>");
  6367. }
  6368. }
  6369. }
  6370. }
  6371. }
  6372. }
  6373. return _562;
  6374. };
  6375. CDrillManager.prototype.getDrillThroughParameters=function(_56f,evt){
  6376. if(typeof _56f=="undefined"){
  6377. _56f="query";
  6378. }
  6379. var _571=[];
  6380. if(typeof evt!="undefined"){
  6381. var _572=getCrossBrowserNode(evt,true);
  6382. try{
  6383. while(_572){
  6384. if(typeof _572.getAttribute!="undefined"&&_572.getAttribute("dtTargets")){
  6385. _571.push("<rvDrillTargets>"+_572.getAttribute("dtTargets")+"</rvDrillTargets>");
  6386. break;
  6387. }
  6388. _572=_572.parentNode;
  6389. }
  6390. }
  6391. catch(e){
  6392. return false;
  6393. }
  6394. }else{
  6395. var oCV=this.getCV();
  6396. var _574=oCV.getDrillMgr();
  6397. var _575=_574.getSelectionController();
  6398. if(_575!=null){
  6399. var _576=null;
  6400. if(_575.hasSelectedChartNodes()){
  6401. var _577=_575.getSelectedChartNodes();
  6402. var _578=_577[0];
  6403. _576=_578.getArea();
  6404. }
  6405. if(_576!=null){
  6406. _571.push("<rvDrillTargets>"+_576.getAttribute("dtTargets")+"</rvDrillTargets>");
  6407. }else{
  6408. _571=this.getAuthoredDrillThroughTargets();
  6409. }
  6410. }
  6411. }
  6412. if(_571.length>0){
  6413. var _579="<AuthoredDrillTargets>";
  6414. for(var _57a=0;_57a<_571.length;++_57a){
  6415. _579+=eval("\""+_571[_57a]+"\"");
  6416. }
  6417. _579+="</AuthoredDrillTargets>";
  6418. var _57b=this.getCV().getAction("AuthoredDrill");
  6419. if(_56f=="query"){
  6420. _57b.populateContextMenu(_579);
  6421. this.showOtherMenuItems();
  6422. }else{
  6423. if(this.getCV().envParams["cv.id"]=="AA"){
  6424. this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent();
  6425. }else{
  6426. _57b.execute(_579);
  6427. }
  6428. }
  6429. return true;
  6430. }else{
  6431. if(_56f=="query"){
  6432. this.showOtherMenuItems();
  6433. return true;
  6434. }else{
  6435. return false;
  6436. }
  6437. }
  6438. };
  6439. CDrillManager.prototype.executeAuthoredDrill=function(_57c){
  6440. var _57d=decodeURIComponent(_57c);
  6441. var _57e=this.getCV().getAction("AuthoredDrill");
  6442. _57e.executeDrillTarget(_57d);
  6443. };
  6444. CDrillManager.prototype.doesMoreExist=function(_57f){
  6445. for(var i=0;i<_57f.getNumItems();i++){
  6446. var _581=_57f.get(i);
  6447. if(_581!=null){
  6448. if((_581 instanceof CMenuItem)&&(_581.getLabel()==RV_RES.RV_MORE)&&(_581.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){
  6449. return true;
  6450. }
  6451. }
  6452. }
  6453. return false;
  6454. };
  6455. CDrillManager.prototype.showOtherMenuItems=function(){
  6456. var cv=this.getCV();
  6457. var _583=cv.rvMainWnd;
  6458. var _584=_583.getToolbarControl();
  6459. var _585=null;
  6460. var _586=null;
  6461. if(typeof _584!="undefined"&&_584!=null){
  6462. _585=_584.getItem("goto");
  6463. if(_585){
  6464. _586=_585.getMenu();
  6465. }
  6466. }
  6467. var _587=_583.getContextMenu();
  6468. var _588=_583.getUIHide();
  6469. var _589=null;
  6470. if(typeof _587!="undefined"&&_587!=null&&_587.getGoToMenuItem()){
  6471. _589=_587.getGoToMenuItem().getMenu();
  6472. }
  6473. var _58a=null;
  6474. var _58b=this.getSelectionController();
  6475. if(_586!=null){
  6476. if(this.doesMoreExist(_586)==false){
  6477. if(typeof gMenuSeperator!="undefined"&&_586.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){
  6478. _586.add(gMenuSeperator);
  6479. }
  6480. var _58c=new CMenuItem(_586,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
  6481. if(_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){
  6482. _58c.hide();
  6483. }else{
  6484. if(_58b==null||_58b.getModelDrillThroughEnabled()==false){
  6485. _58c.disable();
  6486. }
  6487. }
  6488. }
  6489. }
  6490. if(_589!=null){
  6491. if(typeof gMenuSeperator!="undefined"&&_589.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){
  6492. _589.add(gMenuSeperator);
  6493. }
  6494. var _58d=new CMenuItem(_589,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
  6495. if(_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){
  6496. _58d.hide();
  6497. }else{
  6498. if(_58b==null||_58b.getModelDrillThroughEnabled()==false){
  6499. _58d.disable();
  6500. }
  6501. }
  6502. }
  6503. if(_58a!=null&&_58b!=null){
  6504. var _58e=_58b.getAllSelectedObjects();
  6505. if(_58e==null||_58e.length===0){
  6506. _58a.disable();
  6507. }
  6508. }
  6509. if(_586!=null){
  6510. _586.draw();
  6511. if(_586.isVisible()){
  6512. _586.show();
  6513. }
  6514. }
  6515. if(_589!=null){
  6516. _589.draw();
  6517. if(_589.isVisible()){
  6518. _589.show();
  6519. }
  6520. }
  6521. };
  6522. CDrillManager.prototype.ddc=function(evt){
  6523. var node=getNodeFromEvent(evt);
  6524. if(node!=null&&node.getAttribute("ddc")!=="1"){
  6525. node.setAttribute("ddc","1");
  6526. if(node.getAttribute("dtTargets")){
  6527. node.className="dl "+node.className;
  6528. node.setAttribute("href","#");
  6529. return;
  6530. }
  6531. var _591=this.getSelectionController();
  6532. if(_591!=null){
  6533. var _592=_591.getSelectionObjectFactory().getSelectionChartObject(node);
  6534. if(_592!=null){
  6535. var _593=_592.getDrillOptions();
  6536. for(var idx=0;idx<_593.length;++idx){
  6537. var _595=_593[idx][0];
  6538. if((node.getAttribute("isChartTitle")==="true"&&_595=="1")||_595=="3"||_595=="2"){
  6539. node.className="dl "+node.className;
  6540. node.setAttribute("href","#");
  6541. break;
  6542. }
  6543. }
  6544. }
  6545. }
  6546. }
  6547. };
  6548. CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_596){
  6549. if(typeof _596=="undefined"||_596==null){
  6550. return null;
  6551. }
  6552. var _597=this.getCV().getDrillTargets();
  6553. if(!_597||_597.length==0){
  6554. return null;
  6555. }
  6556. var _598=_596[0][0];
  6557. if(typeof _598=="undefined"||_598==null){
  6558. return null;
  6559. }
  6560. var _599=_597[_598];
  6561. if(typeof _599=="undefined"||_599==null){
  6562. return null;
  6563. }
  6564. var _59a="<drillTarget drillIdx=\\\""+_598+"\\\" label=\\\""+_599.getLabel()+"\\\"/>";
  6565. return "<rvDrillTargets>"+_59a+"</rvDrillTargets>";
  6566. };
  6567. CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_59b){
  6568. if(typeof _59b=="undefined"||_59b==null){
  6569. return null;
  6570. }
  6571. var _59c=this.getCV().getDrillTargets();
  6572. if(!_59c||_59c.length==0){
  6573. return null;
  6574. }
  6575. var _59d="";
  6576. for(var _59e=0;_59e<_59b.length;++_59e){
  6577. var _59f=_59b[_59e];
  6578. if(_59f.length<2){
  6579. continue;
  6580. }
  6581. var _5a0=_59f[0];
  6582. if(typeof _5a0=="undefined"||_5a0==null){
  6583. continue;
  6584. }
  6585. var _5a1=_59f[1];
  6586. if(typeof _5a1=="undefined"||_5a1==null){
  6587. continue;
  6588. }
  6589. var _5a2=_59c[_5a0];
  6590. if(typeof _5a2=="undefined"||_5a2==null){
  6591. continue;
  6592. }
  6593. if(_5a1===null||_5a1===""){
  6594. _5a1=_5a2.getLabel();
  6595. }
  6596. _59d+="<drillTarget drillIdx=\\\""+_5a0+"\\\" label=\\\""+_5a1+"\\\"/>";
  6597. }
  6598. if(_59d.length>0){
  6599. return "<rvDrillTargets>"+_59d+"</rvDrillTargets>";
  6600. }
  6601. return null;
  6602. };
  6603. function CDrillThroughTarget(_5a3,_5a4,_5a5,_5a6,_5a7,path,_5a9,_5aa,_5ab,_5ac,_5ad,_5ae){
  6604. this.m_label=_5a3;
  6605. this.m_outputFormat=_5a4;
  6606. this.m_outputLocale=_5a5;
  6607. this.m_showInNewWindow=_5a6;
  6608. this.m_method=_5a7;
  6609. this.m_path=path;
  6610. this.m_bookmark=_5a9;
  6611. this.m_parameters=_5aa;
  6612. this.m_objectPaths=_5ab;
  6613. this.m_prompt="false";
  6614. this.m_dynamicDrillThrough=false;
  6615. this.m_parameterProperties=_5ae;
  6616. if(typeof _5ac!="undefined"&&_5ac!=null){
  6617. if(_5ac=="yes"){
  6618. this.m_prompt="true";
  6619. }else{
  6620. if(_5ac=="target"){
  6621. this.m_prompt="";
  6622. }
  6623. }
  6624. }
  6625. if(typeof _5ad!="undefined"&&_5ad!=null){
  6626. if(typeof _5ad=="string"){
  6627. _5ad=_5ad=="true"?true:false;
  6628. }
  6629. this.m_dynamicDrillThrough=_5ad;
  6630. }
  6631. };
  6632. function CDrillThroughTarget_getParameterProperties(){
  6633. return this.m_parameterProperties;
  6634. };
  6635. function CDrillThroughTarget_getLabel(){
  6636. return this.m_label;
  6637. };
  6638. function CDrillThroughTarget_getOutputFormat(){
  6639. return this.m_outputFormat;
  6640. };
  6641. function CDrillThroughTarget_getOutputLocale(){
  6642. return this.m_outputLocale;
  6643. };
  6644. function CDrillThroughTarget_getShowInNewWindow(){
  6645. return this.m_showInNewWindow;
  6646. };
  6647. function CDrillThroughTarget_getMethod(){
  6648. return this.m_method;
  6649. };
  6650. function CDrillThroughTarget_getPath(){
  6651. return this.m_path;
  6652. };
  6653. function CDrillThroughTarget_getBookmark(){
  6654. return this.m_bookmark;
  6655. };
  6656. function CDrillThroughTarget_getParameters(){
  6657. return this.m_parameters;
  6658. };
  6659. function CDrillThroughTarget_getObjectPaths(){
  6660. return this.m_objectPaths;
  6661. };
  6662. function CDrillThroughTarget_getPrompt(){
  6663. return this.m_prompt;
  6664. };
  6665. function CDrillThroughTarget_isDynamicDrillThrough(){
  6666. return this.m_dynamicDrillThrough;
  6667. };
  6668. CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel;
  6669. CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat;
  6670. CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale;
  6671. CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow;
  6672. CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod;
  6673. CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath;
  6674. CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark;
  6675. CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters;
  6676. CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths;
  6677. CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt;
  6678. CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough;
  6679. CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties;
  6680. function sXmlEncode(_5af){
  6681. var _5b0=""+_5af;
  6682. if((_5b0=="0")||((_5af!=null)&&(_5af!=false))){
  6683. _5b0=_5b0.replace(/&/g,"&amp;");
  6684. _5b0=_5b0.replace(/</g,"&lt;");
  6685. _5b0=_5b0.replace(/>/g,"&gt;");
  6686. _5b0=_5b0.replace(/"/g,"&quot;");
  6687. _5b0=_5b0.replace(/'/g,"&apos;");
  6688. }else{
  6689. if(_5af==null){
  6690. _5b0="";
  6691. }
  6692. }
  6693. return _5b0;
  6694. };
  6695. function createFormField(name,_5b2){
  6696. var _5b3=document.createElement("input");
  6697. _5b3.setAttribute("type","hidden");
  6698. _5b3.setAttribute("name",name);
  6699. _5b3.setAttribute("value",_5b2);
  6700. return (_5b3);
  6701. };
  6702. function setBackURLToCloseWindow(_5b4){
  6703. var _5b5=_5b4.childNodes;
  6704. if(_5b5){
  6705. for(var _5b6=0;_5b6<_5b5.length;++_5b6){
  6706. var _5b7=_5b5[_5b6];
  6707. var _5b8=_5b7.getAttribute("name");
  6708. if(_5b8&&_5b8=="ui.backURL"){
  6709. _5b4.removeChild(_5b7);
  6710. }
  6711. }
  6712. }
  6713. _5b4.appendChild(createFormField("ui.backURL","javascript:window.close();"));
  6714. };
  6715. function doMultipleDrills(_5b9,cvId){
  6716. if(parent!=this&&parent.doMultipleDrills){
  6717. if(getCVId()!=""&&getCVId()!=cvId){
  6718. cvId=getCVId();
  6719. }
  6720. return parent.doMultipleDrills(_5b9,cvId);
  6721. }else{
  6722. if(window.gViewerLogger){
  6723. window.gViewerLogger.log("Drill Targets",_5b9,"text");
  6724. }
  6725. var oCV=null;
  6726. try{
  6727. oCV=getCognosViewerObjectRef(cvId);
  6728. }
  6729. catch(exception){
  6730. }
  6731. var _5bc=buildDrillForm(oCV);
  6732. addDrillEnvironmentFormFields(_5bc,oCV);
  6733. if(typeof oCV!="undefined"&&oCV!=null){
  6734. var _5bd=oCV.getModelPath();
  6735. _5bc.appendChild(createFormField("modelPath",_5bd));
  6736. var _5be=oCV.getSelectionController();
  6737. var _5bf="";
  6738. if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
  6739. _5bf=getViewerSelectionContext(_5be,new CSelectionContext(_5bd));
  6740. }
  6741. _5bc.appendChild(createFormField("drillContext",_5bf));
  6742. _5bc.appendChild(createFormField("modelDrillEnabled",_5be.getModelDrillThroughEnabled()));
  6743. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  6744. _5bc.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
  6745. }else{
  6746. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  6747. _5bc.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
  6748. }
  6749. }
  6750. }
  6751. _5bc.setAttribute("launchGotoPage","true");
  6752. _5bc.appendChild(createFormField("drillTargets",_5b9));
  6753. _5bc.appendChild(createFormField("invokeGotoPage","true"));
  6754. _5bc.appendChild(createFormField("m","portal/drillthrough.xts"));
  6755. _5bc.appendChild(createFormField("b_action","xts.run"));
  6756. var _5c0="winNAT_"+(new Date()).getTime();
  6757. var _5c1="..";
  6758. if(oCV!=null){
  6759. _5c1=oCV.getWebContentRoot();
  6760. var _5c2=oCV.getExecutionParameters();
  6761. if(_5c2!=""){
  6762. _5bc.appendChild(createFormField("encExecutionParameters",_5c2));
  6763. }
  6764. }
  6765. if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_5bc)){
  6766. if(oCV&&typeof oCV.launchGotoPage==="function"){
  6767. oCV.launchGotoPage(_5bc);
  6768. }else{
  6769. var _5c3=_5c1+"/rv/blankDrillWin.html";
  6770. _5bc.target=_5c0;
  6771. window.open(_5c3,_5c0);
  6772. }
  6773. }
  6774. }
  6775. };
  6776. function buildDrillForm(oCV){
  6777. var _5c5=document.getElementById("drillForm");
  6778. if(_5c5){
  6779. document.body.removeChild(_5c5);
  6780. }
  6781. _5c5=document.createElement("form");
  6782. if(typeof oCV!="undefined"&&oCV!=null){
  6783. var _5c6=document.getElementById("formWarpRequest"+oCV.getId());
  6784. _5c5.setAttribute("target",_5c6.getAttribute("target"));
  6785. _5c5.setAttribute("action",_5c6.getAttribute("action"));
  6786. }else{
  6787. _5c5.setAttribute("action",location.pathname);
  6788. }
  6789. _5c5.setAttribute("id","drillForm");
  6790. _5c5.setAttribute("name","drillForm");
  6791. _5c5.setAttribute("method","post");
  6792. _5c5.style.display="none";
  6793. document.body.appendChild(_5c5);
  6794. return _5c5;
  6795. };
  6796. function addDrillEnvironmentFormFields(_5c7,oCV){
  6797. if(window.g_dfEmail){
  6798. _5c7.appendChild(createFormField("dfemail",window.g_dfEmail));
  6799. }
  6800. if(oCV!=null){
  6801. _5c7.appendChild(createFormField("cv.id",oCV.getId()));
  6802. if(typeof oCV.envParams["ui.sh"]!="undefined"){
  6803. _5c7.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
  6804. }
  6805. if(oCV.getViewerWidget()==null){
  6806. if(typeof oCV.envParams["cv.header"]!="undefined"){
  6807. _5c7.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
  6808. }
  6809. if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
  6810. _5c7.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
  6811. }else{
  6812. var _5c9=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
  6813. if(oCV.m_viewerFragment&&_5c9!=null&&_5c9===true){
  6814. var _5ca=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
  6815. _5c7.appendChild(createFormField("cv.toolbar",_5ca));
  6816. }
  6817. }
  6818. }
  6819. if(typeof oCV.envParams["ui.backURL"]!="undefined"){
  6820. _5c7.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
  6821. }
  6822. if(typeof oCV.envParams["ui.postBack"]!="undefined"){
  6823. _5c7.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
  6824. }
  6825. if(typeof oCV.envParams["savedEnv"]!="undefined"){
  6826. _5c7.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
  6827. }
  6828. if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
  6829. _5c7.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
  6830. }
  6831. if(typeof oCV.envParams["lang"]!="undefined"){
  6832. _5c7.appendChild(createFormField("lang",oCV.envParams["lang"]));
  6833. }
  6834. if(typeof oCV.envParams["ui.errURL"]!="undefined"){
  6835. _5c7.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
  6836. }
  6837. var _5cb="";
  6838. if(oCV.envParams["ui.routingServerGroup"]){
  6839. _5cb=oCV.envParams["ui.routingServerGroup"];
  6840. }
  6841. _5c7.appendChild(createHiddenFormField("ui.routingServerGroup",_5cb));
  6842. }else{
  6843. _5c7.appendChild(createFormField("cv.header","false"));
  6844. _5c7.appendChild(createFormField("cv.toolbar","false"));
  6845. }
  6846. };
  6847. function appendReportHistoryObjects(oCV,_5cd){
  6848. if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_5cd!=null){
  6849. oCV.rvMainWnd.addCurrentReportToReportHistory();
  6850. var _5ce=oCV.rvMainWnd.saveReportHistoryAsXML();
  6851. _5cd.appendChild(createFormField("cv.previousReports",_5ce));
  6852. }
  6853. };
  6854. function doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9){
  6855. var _5da="";
  6856. if(typeof cvId=="string"){
  6857. _5da=cvId;
  6858. }
  6859. var oCV=null;
  6860. try{
  6861. oCV=getCognosViewerObjectRef(cvId);
  6862. }
  6863. catch(exception){
  6864. }
  6865. if(!oCV&&parent!=this&&parent.doSingleDrill){
  6866. if(getCVId()!=""&&getCVId()!=cvId){
  6867. cvId=getCVId();
  6868. }
  6869. return parent.doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9);
  6870. }else{
  6871. if(typeof _5d1=="undefined"){
  6872. _5d1="default";
  6873. }else{
  6874. if(_5d1=="execute"){
  6875. _5d1="run";
  6876. }
  6877. }
  6878. if(_5d1=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
  6879. _5cf="_blank";
  6880. }
  6881. var _5dc=buildDrillForm(oCV);
  6882. var _5dd="<authoredDrillRequest>";
  6883. _5dd+="<param name=\"action\">"+sXmlEncode(_5d1)+"</param>";
  6884. _5dd+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
  6885. _5dd+="<param name=\"format\">"+sXmlEncode(_5d2)+"</param>";
  6886. _5dd+="<param name=\"locale\">"+sXmlEncode(_5d3)+"</param>";
  6887. _5dd+="<param name=\"prompt\">"+sXmlEncode(_5d8)+"</param>";
  6888. _5dd+="<param name=\"dynamicDrill\">"+sXmlEncode(_5d9)+"</param>";
  6889. if(typeof oCV!="undefined"&&oCV!=null){
  6890. _5dd+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
  6891. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
  6892. _5dd+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  6893. }
  6894. var _5de=oCV.getModelPath();
  6895. _5dd+="<param name=\"metadataModel\">"+sXmlEncode(_5de)+"</param>";
  6896. _5dd+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_5de)))+"</param>";
  6897. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  6898. _5dd+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  6899. }else{
  6900. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  6901. _5dd+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
  6902. }
  6903. }
  6904. }
  6905. if(_5d4!=""){
  6906. _5dd+="<param name=\"bookmark\">"+_5d4+"</param>";
  6907. }
  6908. if(_5d1!="view"){
  6909. if(typeof _5d5!="undefined"){
  6910. _5dd+="<param name=\"sourceContext\">"+sXmlEncode(_5d5)+"</param>";
  6911. }
  6912. if(typeof _5d6!="undefined"){
  6913. _5dd+="<param name=\"objectPaths\">"+sXmlEncode(_5d6)+"</param>";
  6914. }
  6915. }
  6916. var _5df=0;
  6917. _5dd+="<drillParameters>";
  6918. var _5e0=[];
  6919. for(_5df=1;_5df<args.length;_5df++){
  6920. var sSel=args[_5df][1];
  6921. if(_5d2=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
  6922. var _5e2=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_5df][1])));
  6923. if(_5e2){
  6924. var sMun=_5e2.getAttribute("mun");
  6925. if(sMun!=null&&sMun!=""){
  6926. _5e2.setAttribute("useValue",sMun);
  6927. sSel="<selectChoices>"+XMLBuilderSerializeNode(_5e2)+"</selectChoices>";
  6928. }
  6929. }
  6930. }
  6931. var _5e4=args[_5df][0];
  6932. var _5e5=false;
  6933. for(var i=0;i<_5e0.length;i++){
  6934. var _5e7=_5e0[i];
  6935. if(_5e7.name===_5e4&&_5e7.value===sSel){
  6936. _5e5=true;
  6937. break;
  6938. }
  6939. }
  6940. if(!_5e5){
  6941. _5e0.push({"name":_5e4,"value":sSel});
  6942. _5dd+="<param name=\""+sXmlEncode(_5e4)+"\">"+sXmlEncode(sSel)+"</param>";
  6943. }
  6944. }
  6945. _5dd+="</drillParameters>";
  6946. _5dd+=getExecutionParamNode(oCV);
  6947. _5dd+="</authoredDrillRequest>";
  6948. _5dc.appendChild(createFormField("authoredDrill.request",_5dd));
  6949. _5dc.appendChild(createFormField("ui.action","authoredDrillThrough2"));
  6950. _5dc.appendChild(createFormField("b_action","cognosViewer"));
  6951. addDrillEnvironmentFormFields(_5dc,oCV);
  6952. if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_5dc)){
  6953. if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
  6954. oCV.sendDrillThroughRequest(_5dc);
  6955. }else{
  6956. if(_5cf==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
  6957. oCV.m_viewerFragment.raiseAuthoredDrillEvent(_5dd);
  6958. }else{
  6959. if((oCV!=null&&oCV.getViewerWidget()!=null)||_5cf!=""){
  6960. setBackURLToCloseWindow(_5dc);
  6961. var _5e8="winNAT_"+(new Date()).getTime();
  6962. var _5e9="..";
  6963. if(oCV!=null){
  6964. _5e9=oCV.getWebContentRoot();
  6965. }
  6966. var _5ea=_5e9+"/rv/blankDrillWin.html";
  6967. if(_5da){
  6968. _5ea+="?cv.id="+_5da;
  6969. }
  6970. if(oCV==null){
  6971. _5ea=window.location.href.substring(0,window.location.href.indexOf("/v1"));
  6972. _5ea+="/?perspective=classicviewer";
  6973. _5ea+="&altDrillFlag=true";
  6974. _5ea+="&format="+sXmlEncode(_5d2);
  6975. var _5eb=_5dc.getAttribute("name")+Date.now().toString();
  6976. _5dc.setAttribute("name",_5eb);
  6977. if(typeof (Storage)!=="undefined"){
  6978. localStorage.setItem(_5eb,_5dc.outerHTML);
  6979. _5ea+="&drillFormLabel="+_5eb;
  6980. }else{
  6981. console.log("Sorry! No Web Storage support...");
  6982. }
  6983. }
  6984. if(window.gViewerLogger){
  6985. window.gViewerLogger.log("Drill Specification",_5dd,"xml");
  6986. }
  6987. _5dc.target=_5e8;
  6988. newWindow=window.open(_5ea,_5e8);
  6989. }else{
  6990. appendReportHistoryObjects(oCV,_5dc);
  6991. if(window.gViewerLogger){
  6992. window.gViewerLogger.log("Drill Specification",_5dd,"xml");
  6993. }
  6994. _5dc.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
  6995. _5dc.submit();
  6996. if(oCV!=null&&!oCV.getDrillFormTarget){
  6997. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
  6998. }
  6999. }
  7000. }
  7001. }
  7002. }
  7003. }
  7004. };
  7005. function getExecutionParamNode(oCV){
  7006. var _5ed="";
  7007. if(typeof oCV!="undefined"&&oCV!=null){
  7008. var _5ee=oCV.getExecutionParameters();
  7009. if(_5ee!=""){
  7010. _5ed+="<param name=\"executionParameters\">";
  7011. _5ed+=sXmlEncode(_5ee);
  7012. _5ed+="</param>";
  7013. }
  7014. }
  7015. return _5ed;
  7016. };
  7017. function doSingleDrillThrough(_5ef,_5f0,cvId){
  7018. var _5f2=_5ef[0][0];
  7019. if(typeof _5f2=="undefined"||_5f2==null){
  7020. return;
  7021. }
  7022. var _5f3=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_5f2]:drillTargets[_5f2];
  7023. if(typeof _5f3=="undefined"){
  7024. return;
  7025. }
  7026. if(_5f0!=""&&_5f3.getPath()==""){
  7027. document.location="#"+_5f0;
  7028. }else{
  7029. var args=[];
  7030. args[args.length]=["ui.object",_5f3.getPath()];
  7031. for(var _5f5=1;_5f5<_5ef.length;++_5f5){
  7032. args[args.length]=_5ef[_5f5];
  7033. }
  7034. var _5f6="";
  7035. if(_5f3.getShowInNewWindow()=="true"){
  7036. _5f6="_blank";
  7037. }
  7038. var _5f7=_5f3.getParameters();
  7039. var _5f8=_5f3.getObjectPaths();
  7040. var _5f9=cvId;
  7041. if(!cvId){
  7042. _5f9=getCVId();
  7043. }
  7044. doSingleDrill(_5f6,args,_5f3.getMethod(),_5f3.getOutputFormat(),_5f3.getOutputLocale(),_5f0,_5f7,_5f8,_5f9,_5f3.getPrompt(),false);
  7045. }
  7046. };
  7047. function getCVId(){
  7048. var _5fa="";
  7049. try{
  7050. _5fa=this.frameElement.id.substring("CVIFrame".length);
  7051. }
  7052. catch(exception){
  7053. }
  7054. return _5fa;
  7055. };
  7056. function doMultipleDrillThrough(_5fb,cvId){
  7057. var _5fd="<rvDrillTargets>";
  7058. for(var _5fe=0;_5fe<_5fb.length;++_5fe){
  7059. var _5ff=_5fb[_5fe];
  7060. if(_5ff.length<3){
  7061. continue;
  7062. }
  7063. var _600=_5ff[0];
  7064. if(typeof _600=="undefined"||_600==null){
  7065. continue;
  7066. }
  7067. var _601=_5ff[1];
  7068. if(typeof _601=="undefined"||_601==null){
  7069. continue;
  7070. }
  7071. var _602=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_600]:drillTargets[_600];
  7072. if(typeof _602=="undefined"||_602==null){
  7073. continue;
  7074. }
  7075. if(_601===null||_601===""){
  7076. _601=_602.getLabel();
  7077. }
  7078. _5fd+="<drillTarget ";
  7079. _5fd+="outputFormat=\"";
  7080. _5fd+=_602.getOutputFormat();
  7081. _5fd+="\" ";
  7082. _5fd+="outputLocale=\"";
  7083. _5fd+=_602.getOutputLocale();
  7084. _5fd+="\" ";
  7085. _5fd+="label=\"";
  7086. _5fd+=sXmlEncode(_601);
  7087. _5fd+="\" ";
  7088. _5fd+="path=\"";
  7089. _5fd+=sXmlEncode(_602.getPath());
  7090. _5fd+="\" ";
  7091. _5fd+="showInNewWindow=\"";
  7092. _5fd+=_602.getShowInNewWindow();
  7093. _5fd+="\" ";
  7094. _5fd+="method=\"";
  7095. _5fd+=_602.getMethod();
  7096. _5fd+="\" ";
  7097. _5fd+="prompt=\"";
  7098. _5fd+=_602.getPrompt();
  7099. _5fd+="\" ";
  7100. _5fd+="dynamicDrill=\"";
  7101. _5fd+=_602.isDynamicDrillThrough();
  7102. _5fd+="\">";
  7103. for(var _603=2;_603<_5ff.length;++_603){
  7104. _5fd+=_5ff[_603];
  7105. }
  7106. _5fd+=_602.getParameters();
  7107. _5fd+=_602.getObjectPaths();
  7108. _5fd+="</drillTarget>";
  7109. }
  7110. _5fd+="</rvDrillTargets>";
  7111. if(!cvId){
  7112. cvId=getCVId();
  7113. }
  7114. doMultipleDrills(_5fd,cvId);
  7115. };
  7116. function CScriptLoader(_604){
  7117. this.m_oFiles={};
  7118. this.m_aScripts=[];
  7119. this.m_aDocumentWriters=[];
  7120. this.m_ajaxWarnings=[];
  7121. this.m_bIgnoreAjaxWarnings=false;
  7122. this.m_bHandleStylesheetLimit=false;
  7123. this.m_iInterval=20;
  7124. this.m_reFindCssPath=new RegExp("<link[^>]*href=\"([^\"]*)\"","i");
  7125. this.m_reFindInlineStyle=/<style\b(\s|.)*?<\/style>/gi;
  7126. this.m_reHasCss=/<link .*?>/gi;
  7127. this.m_reIsCss=/\.css$/i;
  7128. this.m_reIsJavascript=/\.js$/i;
  7129. this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i;
  7130. this.m_reScriptTagClose=/\s*<\/script>.*?$/i;
  7131. this.m_reScriptTagOpen=/^.*?<script[^>]*>\s*/i;
  7132. this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi;
  7133. this.m_reStyleTagOpen=/^\s*<style[^>]*>(\s|<|!|-)*/gi;
  7134. this.m_reEscapedCharacters=/\\[\\"']/g;
  7135. this.m_reStringLiterals=/("|')[\s\S]*?\1/g;
  7136. this.m_sWebContentRoot=_604;
  7137. this.m_bHasCompletedExecution=false;
  7138. this.m_aScriptLoadQueue=[];
  7139. this.m_bBlockScriptLoading=false;
  7140. this.m_bUseScriptBlocking=false;
  7141. this.m_bBlockPromptingLocaleScripts=false;
  7142. this.m_aBlockedPromptingLocaleFileQueue=[];
  7143. };
  7144. CScriptLoader.prototype.hasCompletedExecution=function(){
  7145. return this.m_bHasCompletedExecution;
  7146. };
  7147. CScriptLoader.prototype.setHandlerStylesheetLimit=function(_605){
  7148. this.m_bHandleStylesheetLimit=_605;
  7149. };
  7150. CScriptLoader.prototype.executeScripts=function(_606,_607){
  7151. if(this.isReadyToExecute()){
  7152. for(var _608=0;_608<this.m_aScripts.length;_608++){
  7153. if(this.m_aScripts[_608]){
  7154. var _609=document.createElement("script");
  7155. _609.setAttribute("language","javascript");
  7156. _609.setAttribute("type","text/javascript");
  7157. this.addNamespaceAttribute(_609,_607);
  7158. _609.text=this.m_aScripts[_608];
  7159. document.getElementsByTagName("head").item(0).appendChild(_609);
  7160. }
  7161. }
  7162. this.m_aScripts=[];
  7163. for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
  7164. var _60b=this.m_aDocumentWriters[idx];
  7165. _60b.execute();
  7166. }
  7167. this.m_aDocumentWriters=[];
  7168. if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
  7169. if(typeof _606=="function"){
  7170. _606();
  7171. }
  7172. this.m_bHasCompletedExecution=true;
  7173. }else{
  7174. setTimeout(function(){
  7175. window.gScriptLoader.executeScripts(_606,_607);
  7176. },this.m_iInterval);
  7177. }
  7178. }else{
  7179. setTimeout(function(){
  7180. window.gScriptLoader.executeScripts(_606,_607);
  7181. },this.m_iInterval);
  7182. }
  7183. };
  7184. CScriptLoader.prototype.isReadyToExecute=function(){
  7185. for(var _60c in this.m_oFiles){
  7186. if(this.m_oFiles[_60c]!="complete"){
  7187. return false;
  7188. }
  7189. }
  7190. if(this.m_aScriptLoadQueue.length>0){
  7191. return false;
  7192. }
  7193. return true;
  7194. };
  7195. CScriptLoader.prototype.loadCSS=function(_60d,_60e,_60f,_610){
  7196. var aM=_60d.match(this.m_reHasCss);
  7197. if(aM){
  7198. for(var i=0;i<aM.length;i++){
  7199. if(aM[i].match(this.m_reFindCssPath)){
  7200. var _613=RegExp.$1;
  7201. if(_613.indexOf("GlobalReportStyles")!=-1){
  7202. this.validateGlobalReportStyles(_613);
  7203. if(_60f){
  7204. if(_613.indexOf("GlobalReportStyles.css")!=-1){
  7205. _613=_613.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
  7206. }
  7207. var _614=this.getGlobalReportStylesClassPrefix(_613);
  7208. _613=_613.replace(".css","_NS.css");
  7209. if(_60e){
  7210. _60e.className="buxReport "+_614;
  7211. }
  7212. }
  7213. }
  7214. this.loadObject(_613,_610);
  7215. }
  7216. _60d=_60d.replace(aM[i],"");
  7217. }
  7218. }
  7219. return _60d;
  7220. };
  7221. CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_615){
  7222. var _616=null;
  7223. if(_615.indexOf("GlobalReportStyles_11.4.css")!=-1){
  7224. _616="v114";
  7225. }
  7226. if(_615.indexOf("GlobalReportStyles_11.css")!=-1){
  7227. _616="v11";
  7228. }
  7229. if(_615.indexOf("GlobalReportStyles_10.css")!=-1){
  7230. _616="v10";
  7231. }else{
  7232. if(_615.indexOf("GlobalReportStyles_1.css")!=-1){
  7233. _616="v1";
  7234. }else{
  7235. if(_615.indexOf("GlobalReportStyles_none.css")!=-1){
  7236. _616="vnone";
  7237. }else{
  7238. if(_615.indexOf("GlobalReportStyles.css")!=-1){
  7239. _616="v8";
  7240. }
  7241. }
  7242. }
  7243. }
  7244. return _616;
  7245. };
  7246. CScriptLoader.prototype.validateGlobalReportStyles=function(_617){
  7247. var _618=document.getElementsByTagName("link");
  7248. for(var i=0;i<_618.length;++i){
  7249. var _61a=_618[i];
  7250. if(_61a.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
  7251. if(_61a.getAttribute("href").toLowerCase()!=_617.toLowerCase()){
  7252. var _61b=_617.split("/");
  7253. var _61c=_61a.getAttribute("href").split("/");
  7254. if(_61b[_61b.length-1]!=_61c[_61c.length-1]){
  7255. this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
  7256. }
  7257. }
  7258. break;
  7259. }
  7260. }
  7261. };
  7262. CScriptLoader.prototype.loadFile=function(_61d,_61e,_61f){
  7263. var sURL="";
  7264. if(_61d){
  7265. sURL=_61d;
  7266. }
  7267. var _621=null;
  7268. if(typeof _61e=="string"){
  7269. _621=_61e;
  7270. }
  7271. var _622="POST";
  7272. if(_61f=="GET"){
  7273. _622="GET";
  7274. }
  7275. var _623=null;
  7276. if(typeof ActiveXObject!="undefined"){
  7277. _623=new ActiveXObject("Msxml2.XMLHTTP");
  7278. }else{
  7279. _623=new XMLHttpRequest();
  7280. }
  7281. _623.open(_622,sURL,false);
  7282. _623.send(_621);
  7283. return _623.responseText;
  7284. };
  7285. function CScriptLoader_onReadyStateChange(){
  7286. if(typeof this.readyState=="undefined"){
  7287. this.readyState="complete";
  7288. }
  7289. if(this.readyState=="loaded"||this.readyState=="complete"){
  7290. var path=this.sFilePath;
  7291. if(!path&&this.getAttribute){
  7292. path=this.getAttribute("href");
  7293. }
  7294. window.gScriptLoader.setFileState(path,"complete");
  7295. window.gScriptLoader.m_bBlockScriptLoading=false;
  7296. if(this.sFilePath&&window.gScriptLoader.m_bBlockPromptingLocaleScripts&&this.sFilePath.match(window.gScriptLoader.m_reIsPromptingLocaleJavascript)){
  7297. window.gScriptLoader.m_bBlockPromptingLocaleScripts=false;
  7298. if(window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.length>0){
  7299. var _625=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
  7300. window.gScriptLoader.loadObject(_625.sName,_625.sNamespaceId);
  7301. }
  7302. }
  7303. if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
  7304. window.gScriptLoader.loadObject();
  7305. }
  7306. }
  7307. };
  7308. CScriptLoader.prototype.moveLinks=function(node){
  7309. if(!node){
  7310. return;
  7311. }
  7312. var _627=node.getAttribute("href");
  7313. if(!_627||this.m_oFiles[_627]){
  7314. return;
  7315. }
  7316. this.m_oFiles[_627]="complete";
  7317. document.getElementsByTagName("head").item(0).appendChild(node);
  7318. };
  7319. CScriptLoader.prototype.loadObject=function(_628,_629){
  7320. var _62a=null;
  7321. if(typeof _628==="undefined"){
  7322. if(this.m_aScriptLoadQueue.length>0){
  7323. var _62b=this.m_aScriptLoadQueue.shift();
  7324. _628=_62b.name;
  7325. _629=_62b.namespaceId;
  7326. }else{
  7327. return;
  7328. }
  7329. }
  7330. if(this.m_oFiles[_628]){
  7331. return;
  7332. }
  7333. if(this.m_bBlockScriptLoading){
  7334. this.m_aScriptLoadQueue.push({"name":_628,"namespaceId":_629});
  7335. }else{
  7336. if(_628.match(this.m_reIsCss)){
  7337. _62a=document.createElement("link");
  7338. _62a.setAttribute("rel","stylesheet");
  7339. _62a.setAttribute("type","text/css");
  7340. _62a.setAttribute("href",_628);
  7341. if(window.isIE&&window.isIE()){
  7342. _62a.onreadystatechange=CScriptLoader_onReadyStateChange;
  7343. _62a.onload=CScriptLoader_onReadyStateChange;
  7344. _62a.onerror=CScriptLoader_onReadyStateChange;
  7345. this.m_oFiles[_628]="new";
  7346. }else{
  7347. this.m_oFiles[_628]="complete";
  7348. }
  7349. }else{
  7350. if(_628.match(this.m_reIsJavascript)){
  7351. if(_628.match(this.m_reIsPromptingLocaleJavascript)){
  7352. if(this.m_bBlockPromptingLocaleScripts){
  7353. this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_628,"sNamespaceId":_629});
  7354. return;
  7355. }
  7356. this.m_bBlockPromptingLocaleScripts=true;
  7357. }
  7358. this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
  7359. _62a=document.createElement("script");
  7360. _62a.setAttribute("language","javascript");
  7361. _62a.setAttribute("type","text/javascript");
  7362. _62a.setAttribute("src",_628);
  7363. _62a.sFilePath=_628;
  7364. _62a.onreadystatechange=CScriptLoader_onReadyStateChange;
  7365. _62a.onload=CScriptLoader_onReadyStateChange;
  7366. _62a.onerror=CScriptLoader_onReadyStateChange;
  7367. this.addNamespaceAttribute(_62a,_629);
  7368. this.m_oFiles[_628]="new";
  7369. }
  7370. }
  7371. if(_62a){
  7372. document.getElementsByTagName("head").item(0).appendChild(_62a);
  7373. }
  7374. }
  7375. };
  7376. CScriptLoader.prototype.loadScriptsFromDOM=function(_62c,_62d,_62e){
  7377. if(!_62c){
  7378. return;
  7379. }
  7380. var _62f=_62c.getElementsByTagName("script");
  7381. while(_62f.length>0){
  7382. var _630=_62f[0];
  7383. if(_630.getAttribute("src")!=null&&_630.getAttribute("src").length>0){
  7384. this.loadObject(_630.getAttribute("src"),_62d);
  7385. }else{
  7386. var _631=_630.innerHTML;
  7387. var _632=false;
  7388. if(_631.indexOf("document.write")!=-1){
  7389. var _633=_631.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
  7390. _632=(_633.indexOf("document.write")!=-1);
  7391. }
  7392. if(_632){
  7393. if(_62e){
  7394. var sId="CVScriptFromDOMPlaceHolder"+_62f.length+_62d;
  7395. var _635=_630.ownerDocument.createElement("span");
  7396. _635.setAttribute("id",sId);
  7397. _630.parentNode.insertBefore(_635,_630);
  7398. this.m_aDocumentWriters.push(new CDocumentWriter(sId,_631));
  7399. }
  7400. }else{
  7401. if(_631.length>0){
  7402. this.m_aScripts.push(_631);
  7403. }
  7404. }
  7405. }
  7406. _630.parentNode.removeChild(_630);
  7407. }
  7408. };
  7409. CScriptLoader.prototype.loadStyles=function(_636,_637){
  7410. if(!_636||!_636.parentNode){
  7411. return;
  7412. }
  7413. var _638=_636.parentNode.getElementsByTagName("style");
  7414. while(_638.length>0){
  7415. var _639=_638[0];
  7416. if(_637){
  7417. this.addNamespaceAttribute(_639,_637);
  7418. }
  7419. if(window.isIE&&window.isIE()&&window.getNavVer()<10){
  7420. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  7421. if(this.m_bHandleStylesheetLimit){
  7422. if(typeof window.gaRV_INSTANCES!="undefined"){
  7423. for(var i=0;i<window.gaRV_INSTANCES.length;i++){
  7424. window.gaRV_INSTANCES[i].cleanupStyles();
  7425. }
  7426. }
  7427. }
  7428. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  7429. if(typeof console!="undefined"&&console&&console.log){
  7430. console.log("Stylesheet limit reached.");
  7431. }
  7432. this.m_ajaxWarnings.push("Stylesheet limit reached.");
  7433. return;
  7434. }
  7435. }
  7436. }
  7437. document.getElementsByTagName("head").item(0).appendChild(_639);
  7438. }
  7439. };
  7440. CScriptLoader.prototype.loadAll=function(_63b,_63c,_63d,_63e){
  7441. this.m_bScriptLoaderCalled=true;
  7442. this.m_bHasCompletedExecution=false;
  7443. this.loadScriptsFromDOM(_63b,_63d,_63e);
  7444. if(this.containsAjaxWarnings()){
  7445. return false;
  7446. }
  7447. this.loadStyles(_63b,_63d);
  7448. if(this.containsAjaxWarnings()){
  7449. return false;
  7450. }
  7451. this.executeScripts(_63c,_63d);
  7452. return true;
  7453. };
  7454. CScriptLoader.prototype.setFileState=function(_63f,_640){
  7455. this.m_oFiles[_63f]=_640;
  7456. };
  7457. CScriptLoader.prototype.containsAjaxWarnings=function(){
  7458. if(this.m_bIgnoreAjaxWarnings){
  7459. return false;
  7460. }else{
  7461. return (this.m_ajaxWarnings.length>0);
  7462. }
  7463. };
  7464. CScriptLoader.prototype.addNamespaceAttribute=function(_641,_642){
  7465. if(typeof _642==="string"){
  7466. _641.setAttribute("namespaceId",_642);
  7467. }
  7468. };
  7469. if(typeof window.gScriptLoader=="undefined"){
  7470. window.gScriptLoader=new CScriptLoader();
  7471. }
  7472. function ViewerA11YHelper(oCV){
  7473. this.m_oCV=oCV;
  7474. };
  7475. ViewerA11YHelper.prototype.onFocus=function(evt){
  7476. var _645=getCrossBrowserNode(evt);
  7477. _645=ViewerA11YHelper.findChildOfTableCell(_645);
  7478. this.updateCellAccessibility(_645,false);
  7479. };
  7480. ViewerA11YHelper.prototype.onKeyDown=function(evt){
  7481. evt=(evt)?evt:((event)?event:null);
  7482. var _647=getCrossBrowserNode(evt);
  7483. if(ViewerA11YHelper.isTableCell(_647)){
  7484. for(var i=0;i<_647.childNodes.length;i++){
  7485. if(_647.childNodes[i].nodeName.toLowerCase()=="span"){
  7486. _647=_647.childNodes[i];
  7487. break;
  7488. }
  7489. }
  7490. }
  7491. if(!this.isValidNodeToSelect(_647)){
  7492. return true;
  7493. }
  7494. _647=ViewerA11YHelper.findChildOfTableCell(_647);
  7495. if(_647){
  7496. if(evt.keyCode=="39"){
  7497. if(this.m_oCV.getState()&&this.m_oCV.getState().getFindState()&&evt.ctrlKey&&evt.shiftKey){
  7498. this.m_oCV.executeAction("FindNext");
  7499. }else{
  7500. this.moveRight(_647);
  7501. }
  7502. return stopEventBubble(evt);
  7503. }else{
  7504. if(evt.keyCode=="37"){
  7505. this.moveLeft(_647);
  7506. return stopEventBubble(evt);
  7507. }else{
  7508. if(evt.keyCode=="38"){
  7509. this.moveUp(_647);
  7510. return stopEventBubble(evt);
  7511. }else{
  7512. if(evt.keyCode=="40"){
  7513. this.moveDown(_647);
  7514. return stopEventBubble(evt);
  7515. }else{
  7516. if(evt.keyCode=="13"){
  7517. if(this.m_oCV.isBux){
  7518. if(this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
  7519. this.m_oCV.getViewerWidget().preprocessPageClicked(false,evt);
  7520. if(this.m_oCV.getSelectionController().pageClicked(evt)!==false){
  7521. this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
  7522. this.m_oCV.getViewerWidget().updateToolbar();
  7523. }
  7524. }else{
  7525. this.m_oCV.getSelectionController().pageClicked(evt);
  7526. var _649=this.m_oCV.getActionFactory().load("Selection");
  7527. _649.onKeyDown(evt);
  7528. }
  7529. this.m_oCV.getViewerWidget().onSelectionChange();
  7530. }else{
  7531. this.m_oCV.de(evt);
  7532. }
  7533. }else{
  7534. if(evt.keyCode=="32"){
  7535. if(this.m_oCV.isBux){
  7536. this.m_oCV.getViewerWidget().preprocessPageClicked(false);
  7537. if(this.m_oCV.getSelectionController().pageClicked(evt)!==false&&this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
  7538. this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
  7539. }
  7540. this.m_oCV.getViewerWidget().updateToolbar();
  7541. this.m_oCV.getViewerWidget().onSelectionChange();
  7542. }else{
  7543. this.m_oCV.getSelectionController().pageClicked(evt);
  7544. }
  7545. return stopEventBubble(evt);
  7546. }else{
  7547. if(evt.keyCode=="46"&&this.m_oCV.isBux){
  7548. if(typeof this.m_oCV.envParams!="undefined"&&typeof this.m_oCV.envParams["ui.action"]!="undefined"&&this.m_oCV.envParams["ui.action"]!="view"&&!this.m_oCV.isLimitedInteractiveMode()){
  7549. var _64a=this.m_oCV.getActionFactory().load("Delete");
  7550. if(!this.m_oCV.isBlacklisted("Delete")&&_64a.canDelete()){
  7551. _64a.execute();
  7552. return stopEventBubble(evt);
  7553. }
  7554. }
  7555. }else{
  7556. if(this.m_oCV.isBux&&evt.ctrlKey==true&&evt.shiftKey==true&&evt.keyCode=="49"){
  7557. var lid=this.m_oCV.getSelectionController().getSelectionObjectFactory().getLayoutElementId(_647);
  7558. if(lid!=""){
  7559. lid=lid.split(this.m_oCV.getId())[0];
  7560. var _64c=-1;
  7561. var _64d=this.m_oCV.getRAPReportInfo();
  7562. if(_64d){
  7563. var _64e=_64d.getContainer(lid);
  7564. if(typeof _64e.layoutIndex!="undefined"){
  7565. _64c=_64e.layoutIndex;
  7566. }
  7567. }
  7568. var _64f=document.getElementById("infoBarHeaderButton"+_64c+this.m_oCV.getId());
  7569. if(_64f!==null){
  7570. this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt));
  7571. _64f.focus();
  7572. }
  7573. }
  7574. return stopEventBubble(evt);
  7575. }else{
  7576. if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){
  7577. var ocv=this.m_oCV;
  7578. var _651=function(){
  7579. if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){
  7580. var _652=clientToScreenCoords(evt.target,document.body);
  7581. evt.clientX=_652.leftCoord;
  7582. evt.clientY=_652.topCoord;
  7583. }
  7584. ocv.dcm(evt,true);
  7585. };
  7586. if(isFF()){
  7587. setTimeout(_651,0);
  7588. }else{
  7589. _651.call();
  7590. }
  7591. return stopEventBubble(evt);
  7592. }else{
  7593. if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){
  7594. var _653=this.m_oCV.getViewerWidget();
  7595. var _654=this.m_oCV.getSelectionController();
  7596. _653.preprocessPageClicked(true);
  7597. _654.pageClicked(evt);
  7598. _653.updateToolbar();
  7599. _653.onContextMenu(evt);
  7600. }
  7601. }
  7602. }
  7603. }
  7604. }
  7605. }
  7606. }
  7607. }
  7608. }
  7609. }
  7610. }
  7611. };
  7612. ViewerA11YHelper.prototype.isValidNodeToSelect=function(node){
  7613. return this.getValidNodeToSelect(node)?true:false;
  7614. };
  7615. ViewerA11YHelper.prototype.getValidNodeToSelect=function(node){
  7616. if(node&&node.style&&node.style.visibility!="hidden"&&node.style.display!="none"){
  7617. var _657=node.nodeName.toLowerCase();
  7618. if((_657=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_657=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_657=="div"&&node.getAttribute("chartcontainer")=="true")||(_657=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){
  7619. return node;
  7620. }
  7621. if(ViewerA11YHelper.isSemanticNode(node)){
  7622. var _658=node.childNodes&&node.childNodes.length?node.childNodes[0]:null;
  7623. if(_658){
  7624. return this.getValidNodeToSelect(_658);
  7625. }
  7626. }
  7627. }
  7628. return null;
  7629. };
  7630. ViewerA11YHelper.isSemanticNode=function(node){
  7631. if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){
  7632. ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"];
  7633. }
  7634. var _65a=node.nodeName.toLowerCase();
  7635. for(var i=0;i<ViewerA11YHelper.isSemanticNode._semanticNodeNames.length;i++){
  7636. if(_65a===ViewerA11YHelper.isSemanticNode._semanticNodeNames[i]){
  7637. return true;
  7638. }
  7639. }
  7640. return false;
  7641. };
  7642. ViewerA11YHelper.isTableCell=function(node){
  7643. var _65d=node.nodeName.toLowerCase();
  7644. return _65d==="td"||_65d==="th";
  7645. };
  7646. ViewerA11YHelper.findChildOfTableCell=function(_65e){
  7647. var _65f=_65e;
  7648. while(_65f&&_65f.parentNode){
  7649. if(ViewerA11YHelper.getTableCell(_65f)){
  7650. break;
  7651. }
  7652. _65f=_65f.parentNode;
  7653. }
  7654. return _65f;
  7655. };
  7656. ViewerA11YHelper.getTableCell=function(node){
  7657. var _661=node.parentNode;
  7658. if(ViewerA11YHelper.isTableCell(_661)){
  7659. return _661;
  7660. }
  7661. if(ViewerA11YHelper.isSemanticNode(_661)&&ViewerA11YHelper.isTableCell(_661.parentNode)){
  7662. return _661.parentNode;
  7663. }
  7664. return null;
  7665. };
  7666. ViewerA11YHelper.prototype.moveRight=function(_662){
  7667. var _663=this.getNextNonTextSibling(_662);
  7668. _663=this.getValidNodeToSelect(_663);
  7669. if(_663){
  7670. this.setFocusToNode(_663);
  7671. return true;
  7672. }
  7673. var _664=ViewerA11YHelper.getTableCell(_662);
  7674. _664=this.getPfMainOutputCell(_664);
  7675. while(_664.nextSibling){
  7676. if(this.moveToTD(_664.nextSibling)){
  7677. return true;
  7678. }
  7679. _664=_664.nextSibling;
  7680. }
  7681. var _665=_664.parentNode;
  7682. while(_665.nextSibling){
  7683. var _666=_665.nextSibling;
  7684. if(this.moveToTD(_666.childNodes[0])){
  7685. return true;
  7686. }
  7687. _665=_665.nextSibling;
  7688. }
  7689. return false;
  7690. };
  7691. ViewerA11YHelper.prototype.moveLeft=function(_667){
  7692. var _668=this.getPreviousNonTextSibling(_667);
  7693. _668=this.getValidNodeToSelect(_668);
  7694. if(_668){
  7695. this.setFocusToNode(_668);
  7696. return true;
  7697. }
  7698. var _669=ViewerA11YHelper.getTableCell(_667);
  7699. _669=this.getPfMainOutputCell(_669);
  7700. while(_669.previousSibling){
  7701. if(this.moveToTDFromTheRight(_669.previousSibling)){
  7702. return true;
  7703. }
  7704. _669=_669.previousSibling;
  7705. }
  7706. var _66a=_669.parentNode;
  7707. while(_66a.previousSibling){
  7708. var _66b=_66a.previousSibling;
  7709. if(this.moveToTDFromTheRight(_66b.lastChild)){
  7710. return true;
  7711. }
  7712. _66a=_66a.previousSibling;
  7713. }
  7714. return false;
  7715. };
  7716. ViewerA11YHelper.prototype.moveDown=function(_66c){
  7717. var _66d=ViewerA11YHelper.getTableCell(_66c);
  7718. _66d=this.getPfMainOutputCell(_66d);
  7719. var _66e=this.getColumnIndex(_66d);
  7720. _66e+=this.getColSpanFromRowSpans(_66d);
  7721. var _66f=_66d.parentNode;
  7722. if(_66d.rowSpan&&_66d.rowSpan>1){
  7723. var _670=_66d.rowSpan;
  7724. for(var _671=1;_671<_670;_671++){
  7725. _66f=_66f.nextSibling;
  7726. }
  7727. }
  7728. var _672=false;
  7729. while(_66f){
  7730. if(_66f.nextSibling){
  7731. _66f=_66f.nextSibling;
  7732. }else{
  7733. if(_66d.nextSibling&&!_672){
  7734. _66f=_66f.parentNode.firstChild;
  7735. _672=true;
  7736. _66e++;
  7737. }else{
  7738. return false;
  7739. }
  7740. }
  7741. if(this.doMoveUpDown(_66f,_66e)){
  7742. return true;
  7743. }
  7744. }
  7745. return false;
  7746. };
  7747. ViewerA11YHelper.prototype.moveUp=function(_673){
  7748. var _674=ViewerA11YHelper.getTableCell(_673);
  7749. _674=this.getPfMainOutputCell(_674);
  7750. var _675=_674.parentNode;
  7751. var _676=this.getColumnIndex(_674);
  7752. _676+=this.getColSpanFromRowSpans(_674);
  7753. var _677=false;
  7754. while(_675){
  7755. if(_675.previousSibling){
  7756. _675=_675.previousSibling;
  7757. }else{
  7758. if(_674.previousSibling&&!_677){
  7759. _675=_675.parentNode.lastChild;
  7760. _677=true;
  7761. _676--;
  7762. }else{
  7763. return false;
  7764. }
  7765. }
  7766. if(this.doMoveUpDown(_675,_676)){
  7767. return true;
  7768. }
  7769. }
  7770. return false;
  7771. };
  7772. ViewerA11YHelper.prototype.getNextNonTextSibling=function(node){
  7773. while(node.nextSibling){
  7774. node=node.nextSibling;
  7775. if(node.nodeName.toLowerCase()!="#text"){
  7776. return node;
  7777. }
  7778. }
  7779. if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
  7780. return this.getNextNonTextSibling(node.parentNode);
  7781. }
  7782. return null;
  7783. };
  7784. ViewerA11YHelper.prototype.doMoveUpDown=function(_679,_67a){
  7785. if(_679!=null){
  7786. var _67b=_679.firstChild;
  7787. var pos=this.getColSpanFromRowSpans(_67b);
  7788. while(_67b){
  7789. if(pos==_67a){
  7790. return this.moveToTDFromTheRight(_67b);
  7791. }else{
  7792. if(pos>_67a){
  7793. break;
  7794. }
  7795. }
  7796. var _67d=0;
  7797. if(_67b.colSpan){
  7798. _67d=_67b.colSpan;
  7799. }else{
  7800. _67d++;
  7801. }
  7802. pos+=_67d;
  7803. _67b=_67b.nextSibling;
  7804. }
  7805. }
  7806. };
  7807. ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){
  7808. td=this.getPfVisibleCell(td);
  7809. var _67f=td.childNodes;
  7810. for(var _680=_67f.length-1;_680>=0;_680--){
  7811. var node=this.getValidNodeToSelect(_67f[_680]);
  7812. if(node){
  7813. if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
  7814. node=node.childNodes[0];
  7815. }
  7816. if(node.tabIndex!=-1&&node.tabIndex!=0){
  7817. node.tabIndex=-1;
  7818. }
  7819. this.setFocusToNode(node);
  7820. return true;
  7821. }
  7822. }
  7823. return false;
  7824. };
  7825. ViewerA11YHelper.prototype.moveToTD=function(td){
  7826. td=this.getPfVisibleCell(td);
  7827. var _683=td.childNodes;
  7828. for(var _684=0;_684<_683.length;_684++){
  7829. var node=this.getValidNodeToSelect(_683[_684]);
  7830. if(node){
  7831. if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
  7832. node=node.childNodes[0];
  7833. }
  7834. if(node.tabIndex!=-1&&node.tabIndex!=0){
  7835. node.tabIndex=-1;
  7836. }
  7837. this.setFocusToNode(node);
  7838. return true;
  7839. }
  7840. }
  7841. return false;
  7842. };
  7843. ViewerA11YHelper.prototype.setFocusToNode=function(node){
  7844. this.m_oCV.setCurrentNodeFocus(node);
  7845. this.updateCellAccessibility(node,false);
  7846. node.focus();
  7847. if(this.m_oCV.m_pinFreezeManager){
  7848. var _687=this.m_oCV.m_pinFreezeManager.nodeToContainer(node);
  7849. if(_687){
  7850. _687.updateScroll(node);
  7851. }
  7852. }
  7853. };
  7854. ViewerA11YHelper.prototype.getPfMainOutputCell=function(_688){
  7855. var main=null;
  7856. var slid=_688.getAttribute("pfslid");
  7857. if(slid){
  7858. var lid=PinFreezeContainer.getLidFromSlid(slid);
  7859. if(lid&&this.m_oCV.m_pinFreezeManager){
  7860. lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
  7861. var _68c=this.m_oCV.m_pinFreezeManager.getContainer(lid);
  7862. if(_68c){
  7863. main=_68c.getMain(_688);
  7864. }
  7865. }
  7866. }
  7867. return main?main:_688;
  7868. };
  7869. ViewerA11YHelper.prototype.getPreviousNonTextSibling=function(node){
  7870. while(node.previousSibling){
  7871. node=node.previousSibling;
  7872. if(node.nodeName.toLowerCase()!="#text"){
  7873. return node;
  7874. }
  7875. }
  7876. if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
  7877. return this.getPreviousNonTextSibling(node.parentNode);
  7878. }
  7879. return null;
  7880. };
  7881. ViewerA11YHelper.prototype.getColumnIndex=function(node){
  7882. var _68f=0;
  7883. while(node.previousSibling){
  7884. node=node.previousSibling;
  7885. if(node.rowSpan==1){
  7886. if(node.colSpan){
  7887. _68f+=node.colSpan;
  7888. }else{
  7889. _68f++;
  7890. }
  7891. }
  7892. }
  7893. return _68f;
  7894. };
  7895. ViewerA11YHelper.prototype.getPfVisibleCell=function(_690){
  7896. var copy=null;
  7897. var slid=_690.getAttribute("pfslid");
  7898. if(slid){
  7899. var lid=PinFreezeContainer.getLidFromSlid(slid);
  7900. if(lid&&this.m_oCV.m_pinFreezeManager){
  7901. lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
  7902. var _694=this.m_oCV.m_pinFreezeManager.getContainer(lid);
  7903. if(_694){
  7904. copy=_694.getCopy(_690);
  7905. }
  7906. }
  7907. }
  7908. return copy?copy:_690;
  7909. };
  7910. ViewerA11YHelper.prototype.updateCellAccessibility=function(_695,_696){
  7911. if(!_695){
  7912. return false;
  7913. }
  7914. var _697=false;
  7915. var _698=false;
  7916. var _699=false;
  7917. var _69a=_695.getAttribute("ctx")!=null?_695:_695.parentNode;
  7918. if(_695.getAttribute("flashChartContainer")!="true"){
  7919. if(_69a.getAttribute("ctx")!=null){
  7920. if(this.m_oCV.isBux){
  7921. var _69b=this.m_oCV.getAction("DrillUpDown");
  7922. _69b.updateDrillability(this.m_oCV,_69a);
  7923. _697=_69b.canDrillDown();
  7924. _698=_69b.canDrillUp();
  7925. }else{
  7926. var _69c=_69a.getAttribute("ctx");
  7927. var _69d=_69c.indexOf(":")==-1?_69c:_69c.substring(0,_69c.indexOf(":"));
  7928. var _69e=this.m_oCV.getSelectionController();
  7929. _697=_69e.canDrillDown(_69d);
  7930. _698=_69e.canDrillUp(_69d);
  7931. }
  7932. }
  7933. _699=_695.parentNode.getAttribute("dtTargets")?true:false;
  7934. }
  7935. var _69f=_695.nodeName.toLowerCase()=="img";
  7936. var _6a0=_695.parentNode.getAttribute("type")=="columnTitle";
  7937. if(!_69f&&(_696||((_695.getAttribute("aria-labelledby")!=null||_6a0||this.m_oCV.isAccessibleMode())))){
  7938. var _6a1="";
  7939. if(_695.parentNode.getAttribute("cc")=="true"){
  7940. _6a1+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER;
  7941. }
  7942. if(_695.innerHTML.length===0){
  7943. _695.innerHTML="&nbsp;";
  7944. _6a1+=" "+RV_RES.IDS_JS_EMPTY_CELL;
  7945. }
  7946. if(_697&&_698){
  7947. _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS;
  7948. }else{
  7949. if(_697){
  7950. _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS;
  7951. }else{
  7952. if(_698){
  7953. _6a1+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS;
  7954. }
  7955. }
  7956. }
  7957. if(_699){
  7958. _6a1+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS;
  7959. }
  7960. if(_695.altText&&_695.altText.length>0){
  7961. _6a1=_695.altText;
  7962. }else{
  7963. if(_695.getAttribute("flashChartContainer")=="true"){
  7964. _6a1=RV_RES.IDS_JS_CHART_IMAGE;
  7965. }
  7966. }
  7967. if(this.m_oCV.isBux){
  7968. var _6a2=_695.previousSibling;
  7969. if(_6a2){
  7970. var wid=_6a2.getAttribute("widgetid");
  7971. if(wid&&wid.indexOf("comment")){
  7972. _6a1+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS;
  7973. }
  7974. }
  7975. if(_695.getAttribute("rp_name")||_695.parentNode.getAttribute("rp_name")){
  7976. _6a1+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED;
  7977. }
  7978. if(_695.nextSibling&&_695.nextSibling.getAttribute("class")=="sortIconVisible"){
  7979. _6a1+=" "+_695.nextSibling.getAttribute("alt");
  7980. }
  7981. }
  7982. if(_6a1.length>0){
  7983. this.addAriaLabelledByOnCell(_695,_6a1);
  7984. }
  7985. }
  7986. if(_698||_697||_699){
  7987. this.addDrillAccessibilityAttributes(_695,_699);
  7988. }
  7989. if(_695.attachEvent){
  7990. _695.attachEvent("onblur",this.onBlur);
  7991. }else{
  7992. _695.addEventListener("blur",this.onBlur,false);
  7993. }
  7994. if((isIE()&&_695.getAttribute("tabIndex")!=0)||_69f){
  7995. _695.setAttribute("modifiedTabIndex","true");
  7996. _695.setAttribute("oldTabIndex",_695.getAttribute("tabIndex"));
  7997. _695.setAttribute("tabIndex",0);
  7998. }
  7999. };
  8000. ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_6a4,_6a5){
  8001. var _6a6=0;
  8002. var _6a7=_6a4;
  8003. while(_6a7.previousSibling){
  8004. _6a6++;
  8005. _6a7=_6a7.previousSibling;
  8006. }
  8007. var _6a8=_6a4.getAttribute("ariaHiddenSpanId");
  8008. if(_6a8&&document.getElementById(_6a8)){
  8009. document.getElementById(_6a8).innerHTML=_6a5;
  8010. }else{
  8011. if(!_6a4.parentNode.id&&!_6a4.id){
  8012. _6a4.parentNode.id=Math.random();
  8013. }
  8014. var _6a9=document.createElement("span");
  8015. _6a9.style.visibility="hidden";
  8016. _6a9.style.display="none";
  8017. _6a9.id=(_6a4.id==""?_6a4.parentNode.id:_6a4.id)+"_"+_6a6;
  8018. _6a9.innerHTML=_6a5;
  8019. _6a4.parentNode.appendChild(_6a9);
  8020. var _6aa="";
  8021. if(_6a4.getAttribute("aria-labelledby")!=null){
  8022. _6aa+=_6a4.getAttribute("aria-labelledby");
  8023. }else{
  8024. if(_6a4.id==""){
  8025. _6a4.id=_6a4.parentNode.id+"_main_"+_6a6;
  8026. }
  8027. _6aa+=_6a4.id;
  8028. }
  8029. _6aa+=" "+_6a9.id;
  8030. _6a4.setAttribute("aria-labelledby",_6aa);
  8031. _6a4.setAttribute("ariaHiddenSpanId",_6a9.id);
  8032. }
  8033. };
  8034. ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_6ab,_6ac){
  8035. if(!_6ab.getAttribute("oldClassName")){
  8036. if(!_6ac){
  8037. _6ab.setAttribute("oldClassName",_6ab.className);
  8038. _6ab.className="dl "+_6ab.className;
  8039. }
  8040. if(!_6ab.getAttribute("role")){
  8041. _6ab.setAttribute("role","link");
  8042. }
  8043. }
  8044. };
  8045. ViewerA11YHelper.prototype.onBlur=function(evt){
  8046. var _6ae=null;
  8047. if(isIE()){
  8048. _6ae=getNodeFromEvent(evt,true);
  8049. }else{
  8050. _6ae=this;
  8051. }
  8052. _6ae=ViewerA11YHelper.findChildOfTableCell(_6ae);
  8053. if(_6ae){
  8054. if(_6ae.getAttribute("oldClassName")){
  8055. _6ae.className=_6ae.getAttribute("oldClassName");
  8056. _6ae.removeAttribute("oldClassName");
  8057. }
  8058. if(_6ae.getAttribute("modifiedTabIndex")=="true"){
  8059. _6ae.removeAttribute("modifiedTabIndex");
  8060. _6ae.removeAttribute("tabIndex");
  8061. if(_6ae.getAttribute("oldTabIndex")){
  8062. _6ae.setAttribute("tabIndex",_6ae.getAttribute("oldTabIndex"));
  8063. }
  8064. _6ae.removeAttribute("oldTabIndex");
  8065. }
  8066. var _6af=_6ae.getAttribute("ariaHiddenSpanId");
  8067. if(_6af){
  8068. var _6b0=document.getElementById(_6af);
  8069. if(_6b0){
  8070. _6b0.innerHTML="";
  8071. }
  8072. }
  8073. }
  8074. };
  8075. ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_6b1){
  8076. var _6b2=0;
  8077. var _6b3=_6b1.parentNode;
  8078. var _6b4=0;
  8079. while(_6b3){
  8080. var _6b5=_6b3.firstChild;
  8081. var _6b6=this.getColumnCount(_6b3)-_6b4;
  8082. while(_6b5&&_6b5.rowSpan>1&&_6b6>0&&_6b5!=_6b1){
  8083. _6b2+=_6b5.colSpan;
  8084. _6b5=_6b5.nextSibling;
  8085. _6b6--;
  8086. }
  8087. if(_6b3.childNodes.length>_6b4){
  8088. _6b4=this.getColumnCount(_6b3);
  8089. }
  8090. _6b3=_6b3.previousSibling;
  8091. }
  8092. return _6b2;
  8093. };
  8094. ViewerA11YHelper.prototype.getColumnCount=function(_6b7){
  8095. var _6b8=0;
  8096. var node=_6b7.firstChild;
  8097. while(node){
  8098. _6b8+=node.colSpan;
  8099. node=node.nextSibling;
  8100. }
  8101. return _6b8;
  8102. };
  8103. ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){
  8104. if(!this.m_oCV.isAccessibleMode()){
  8105. return;
  8106. }
  8107. var _6ba=document.getElementById("RVContent"+this.m_oCV.getId());
  8108. if(!_6ba){
  8109. return;
  8110. }
  8111. var _6bb=getElementsByAttribute(_6ba,"span","tabindex","0");
  8112. if(!_6bb){
  8113. return;
  8114. }
  8115. for(var i=0;i<_6bb.length;i++){
  8116. var span=_6bb[i];
  8117. this.updateCellAccessibility(span,false);
  8118. }
  8119. };
  8120. var CV_BACKGROUND_LAYER_ID="CV_BACK";
  8121. if(typeof window.gaRV_INSTANCES=="undefined"){
  8122. window.gaRV_INSTANCES=[];
  8123. }
  8124. if(!window.gViewerLogger){
  8125. window.gViewerLogger={log:function(hint,_6bf,type){
  8126. },addContextInfo:function(_6c1){
  8127. }};
  8128. }
  8129. function CognosViewerSession(oCV){
  8130. this.m_sConversation=oCV.getConversation();
  8131. this.m_sParameters=oCV.getExecutionParameters();
  8132. this.m_envParams={};
  8133. applyJSONProperties(this.m_envParams,oCV.envParams);
  8134. this.m_bRefreshPage=false;
  8135. };
  8136. function CCognosViewer(sId,_6c4){
  8137. if(typeof window.gCognosViewer=="undefined"){
  8138. window.gCognosViewer=this;
  8139. }
  8140. if(typeof ViewerConfig=="function"){
  8141. this.m_viewerConfig=new ViewerConfig();
  8142. try{
  8143. if(typeof window.getViewerConfiguration=="function"){
  8144. this.m_viewerConfig.configure(window.getViewerConfiguration());
  8145. }else{
  8146. if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){
  8147. this.m_viewerConfig.configure(window.parent.getViewerConfiguration());
  8148. }
  8149. }
  8150. }
  8151. catch(e){
  8152. }
  8153. this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig();
  8154. }
  8155. this.m_sActionState="";
  8156. this.m_bKeepSessionAlive=false;
  8157. this.m_undoStack=[];
  8158. this.m_aSecRequests=[];
  8159. this.m_bDebug=false;
  8160. this.m_sCAFContext="";
  8161. this.m_sContextInfoXML="";
  8162. this.m_sConversation="";
  8163. this.m_sStatus="";
  8164. this.m_sGateway=_6c4;
  8165. this.m_sId=sId;
  8166. this.m_sMetadataInfoXML="";
  8167. this.m_sParameters="";
  8168. this.m_sReportState="";
  8169. this.envParams={};
  8170. this.m_sTracking="";
  8171. this.m_sSoapFault="";
  8172. this.m_sWaitHTML="";
  8173. this.m_oDrillMgr=null;
  8174. this.goDrillManager=null;
  8175. this.m_oWorkingDialog=null;
  8176. this.m_oRequestExecutedIndicator=null;
  8177. this.m_bUseWorkingDialog=true;
  8178. this.m_oSubscriptionManager=null;
  8179. this.m_oCVMgr=null;
  8180. this.m_bUseSafeMode=true;
  8181. if(typeof CViewerManager=="function"){
  8182. this.m_oCVMgr=new CViewerManager(this);
  8183. }
  8184. if(window.gaRV_INSTANCES){
  8185. var _6c5=false;
  8186. for(var _6c6=0;_6c6<window.gaRV_INSTANCES.length;_6c6++){
  8187. if(window.gaRV_INSTANCES[_6c6].m_sId==sId){
  8188. window.gaRV_INSTANCES[_6c6]=this;
  8189. _6c5=true;
  8190. break;
  8191. }
  8192. }
  8193. if(!_6c5){
  8194. window.gaRV_INSTANCES=window.gaRV_INSTANCES.concat(this);
  8195. }
  8196. }
  8197. this.m_bReportHasPrompts=false;
  8198. this.m_viewerWidget=null;
  8199. this.m_flashChartsObjectIds=[];
  8200. this.m_raiseSharePromptEvent=true;
  8201. this.m_actionFactory=null;
  8202. this.m_calculationCache={};
  8203. this.m_drillTargets=[];
  8204. this.m_reportRenderingDone=false;
  8205. if(typeof PinFreezeManager!=="undefined"){
  8206. this.m_pinFreezeManager=new PinFreezeManager(this);
  8207. }
  8208. if(typeof ViewerDispatcher!=="undefined"){
  8209. this.m_viewerDispatcher=new ViewerDispatcher();
  8210. }
  8211. this.m_retryDispatcherEntry=null;
  8212. this.m_RAPReportInfo=null;
  8213. if(typeof ViewerState=="function"){
  8214. this.m_viewerState=new ViewerState();
  8215. }
  8216. this.m_aInfoBar=null;
  8217. };
  8218. CCognosViewer.prototype.setScheduledMobileOutput=function(_6c7){
  8219. this.m_mobileScheduledOutput=_6c7;
  8220. if(_6c7){
  8221. this.m_sStatus="complete";
  8222. }
  8223. };
  8224. CCognosViewer.prototype.setTabInfo=function(_6c8){
  8225. this.m_tabsPayload=_6c8;
  8226. if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
  8227. var _6c9=false;
  8228. for(var i=0;i<this.m_tabsPayload.tabs.length;i++){
  8229. var tab=this.m_tabsPayload.tabs[i];
  8230. if(tab.id==this._keepTabSelected){
  8231. this.m_tabsPayload.currentTabId=this._keepTabSelected;
  8232. break;
  8233. }
  8234. }
  8235. this._keepTabSelected=null;
  8236. }
  8237. };
  8238. CCognosViewer.prototype.setKeepTabSelected=function(_6cc){
  8239. this._keepTabSelected=_6cc;
  8240. };
  8241. CCognosViewer.prototype.getTabController=function(){
  8242. return this.m_tabControl;
  8243. };
  8244. CCognosViewer.prototype.getCurrentlySelectedTab=function(){
  8245. return this.m_currentlySelectedTab?this.m_currentlySelectedTab:null;
  8246. };
  8247. CCognosViewer.prototype.deleteTabs=function(){
  8248. if(this.m_tabControl){
  8249. this.m_tabControl.destroy();
  8250. delete this.m_tabControl;
  8251. this.m_tabControl=null;
  8252. }
  8253. this.m_tabsPayload=null;
  8254. };
  8255. CCognosViewer.prototype.renderTabs=function(){
  8256. if(!this.m_tabsPayload){
  8257. return;
  8258. }
  8259. var _6cd=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
  8260. var _6ce=document.getElementById("CVNavLinks"+this.getId());
  8261. if(_6ce||!this.shouldWriteNavLinks()||_6cd){
  8262. var _6cf=this.getReportDiv();
  8263. this.m_bHasTabs=true;
  8264. if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_6cd){
  8265. this.deleteTabs();
  8266. }
  8267. if(!this.m_tabControl){
  8268. if(this.getStatus()!="complete"&&!_6cd){
  8269. return;
  8270. }
  8271. var tr=document.createElement("tr");
  8272. var _6d1=document.createElement("td");
  8273. tr.appendChild(_6d1);
  8274. var _6d2=document.getElementById("mainViewerTR"+this.getId());
  8275. if(!_6d2){
  8276. return;
  8277. }
  8278. if(this.m_tabsPayload.position=="topLeft"){
  8279. _6d2.parentNode.insertBefore(tr,_6d2);
  8280. }else{
  8281. _6d2.parentNode.appendChild(tr);
  8282. }
  8283. var _6d3=null;
  8284. if(this.m_viewerWidget){
  8285. _6d3=this.m_viewerWidget.findContainerDiv().firstChild;
  8286. }else{
  8287. _6d3=_6d1;
  8288. }
  8289. var oCV=this;
  8290. if(_6cd){
  8291. this.m_tabControl=new CognosTabControl(_6d3,function(_6d5){
  8292. oCV.switchSavedOutputTab(_6d5,true);
  8293. });
  8294. this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
  8295. }else{
  8296. this.m_tabControl=new CognosTabControl(_6d3,function(_6d6){
  8297. oCV.switchTabs(_6d6);
  8298. });
  8299. }
  8300. if(this.m_viewerWidget){
  8301. this.m_tabControl.setSpaceSaverContainer(_6d1);
  8302. this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
  8303. this.m_tabControl.useAbsolutePosition(true);
  8304. }
  8305. this.m_tabControl.setIsSavedOutput(_6cd);
  8306. if(!window.gScriptLoader.m_bScriptLoaderCalled){
  8307. var _6d7=document.getElementById("RVContent"+this.getId());
  8308. var _6d8=this._getNodesWithViewerId(_6d7,"link",null);
  8309. for(var i=0;i<_6d8.length;i++){
  8310. window.gScriptLoader.moveLinks(_6d8[i]);
  8311. }
  8312. window.gScriptLoader.loadStyles(_6d7,this.getId());
  8313. this.repaintDiv(_6d7);
  8314. }
  8315. }
  8316. if(this.getStatus()=="prompting"){
  8317. this.previouslySelectedTab=null;
  8318. this.m_tabControl.hide();
  8319. }else{
  8320. if(this.isHighContrast()){
  8321. this.m_tabControl.setHighContrast(true);
  8322. }
  8323. this.m_tabControl.render(this.m_tabsPayload);
  8324. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  8325. if(this.m_switchingToTabId&&this.m_currentlySelectedTab!=this.m_switchingToTabId){
  8326. this._removeTabContent(_6cf.parentNode,this.m_switchingToTabId);
  8327. this._removeTabContent(_6cf.parentNode,this.m_currentlySelectedTab);
  8328. if(_6ce){
  8329. this._removeTabContent(_6ce.parentNode,this.m_switchingToTabId);
  8330. this._removeTabContent(_6ce.parentNode,this.m_currentlySelectedTab);
  8331. }
  8332. this.m_tabInfo={};
  8333. }
  8334. this.m_switchingToTabId=null;
  8335. _6cf.setAttribute("tabId",this.m_currentlySelectedTab);
  8336. if(_6ce){
  8337. _6ce.setAttribute("tabId",this.m_currentlySelectedTab);
  8338. }
  8339. if(isIE()&&_6cd&&window.resizeIFrame&&!this.m_viewerFragment&&!this.m_viewerWidget){
  8340. window.resizeIFrame();
  8341. }
  8342. }
  8343. this.setMaxContentSize();
  8344. }else{
  8345. var obj=this;
  8346. setTimeout(function(){
  8347. obj.renderTabs();
  8348. },100);
  8349. }
  8350. };
  8351. CCognosViewer.prototype.cancelTabSwitch=function(){
  8352. var _6db=this.getReportDiv();
  8353. var _6dc=this.m_switchingToTabId;
  8354. this.m_currentlySelectedTab=_6dc;
  8355. this.m_tabControl.selectTab(this.previouslySelectedTab,false);
  8356. this.switchTabs(this.previouslySelectedTab);
  8357. if(_6db){
  8358. _6db.parentNode.removeChild(_6db);
  8359. }
  8360. if(this.m_tabInfo[this.m_currentlySelectedTab]&&this.m_tabInfo[this.m_currentlySelectedTab].styles){
  8361. this._addTabStylesToHead(this.m_tabInfo[this.m_currentlySelectedTab].styles);
  8362. }
  8363. this.previouslySelectedTab=null;
  8364. this.m_tabInfo[_6dc]=null;
  8365. };
  8366. CCognosViewer.prototype.switchSavedOutputTab=function(_6dd,_6de){
  8367. var _6df=this.getSelectionController();
  8368. if(_6df){
  8369. _6df.clearSelectedObjects();
  8370. }
  8371. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  8372. if(_6de){
  8373. this.notifyTabChange(_6dd);
  8374. }
  8375. if(this.m_viewerWidget){
  8376. this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_6dd,_6de);
  8377. this.getTabController().resetPosition();
  8378. }else{
  8379. if(!this.savedOutputTabNodes){
  8380. var _6e0=document.getElementById("CVIFrame"+this.getId());
  8381. this.savedOutputTabNodes=getElementsByAttribute(_6e0.contentWindow.document.body,"*","tabid");
  8382. }
  8383. if(!this.savedOutputTabNodes){
  8384. return;
  8385. }
  8386. for(var i=0;i<this.savedOutputTabNodes.length;i++){
  8387. var _6e2=this.savedOutputTabNodes[i];
  8388. _6e2.style.display=_6e2.getAttribute("tabid")==_6dd?"":"none";
  8389. }
  8390. this.setMaxContentSize();
  8391. }
  8392. };
  8393. CCognosViewer.prototype.notifyTabChange=function(_6e3){
  8394. };
  8395. CCognosViewer.prototype._getNodesWithViewerId=function(_6e4,_6e5,id){
  8396. var _6e7=[];
  8397. var _6e8=_6e4.getElementsByTagName(_6e5);
  8398. for(var i=0;i<_6e8.length;i++){
  8399. var node=_6e8[i];
  8400. if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
  8401. node.parentNode.removeChild(node);
  8402. _6e7.push(node);
  8403. i--;
  8404. }
  8405. }
  8406. return _6e7;
  8407. };
  8408. CCognosViewer.prototype._removeTabStylesFromHead=function(){
  8409. var id=this.getId();
  8410. return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
  8411. };
  8412. CCognosViewer.prototype._addTabStylesToHead=function(_6ec){
  8413. if(!_6ec){
  8414. return;
  8415. }
  8416. for(var i=0;i<_6ec.length;i++){
  8417. document.getElementsByTagName("head").item(0).appendChild(_6ec[i]);
  8418. }
  8419. };
  8420. CCognosViewer.prototype.switchTabs=function(_6ee){
  8421. if(this.m_currentlySelectedTab==_6ee){
  8422. return;
  8423. }
  8424. var _6ef=this.getSelectionController();
  8425. if(_6ef){
  8426. _6ef.clearSelectedObjects();
  8427. }
  8428. var _6f0=this.getReportDiv();
  8429. this.m_nReportDiv=null;
  8430. var _6f1=_6f0.clientHeight;
  8431. _6f0.removeAttribute("id");
  8432. _6f0.style.display="none";
  8433. if(!this.m_tabInfo){
  8434. this.m_tabInfo={};
  8435. }
  8436. var _6f2=this._removeTabStylesFromHead();
  8437. var _6f3=this.getSelectionController().getCCDManager();
  8438. this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_6f3.getClonedMetadataArray(),"contextdata":_6f3.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_6f2,"hasPromptControl":this.getHasPrompts()};
  8439. var _6f4=this._findChildWithTabId(_6f0.parentNode,_6ee);
  8440. this.previouslySelectedTab=this.m_currentlySelectedTab;
  8441. if(_6f4&&this.m_tabInfo[_6ee]&&this.m_tabInfo[_6ee].hasPromptControl){
  8442. if(_6f4){
  8443. _6f4.parentNode.removeChild(_6f4);
  8444. _6f4=null;
  8445. }
  8446. delete this.m_tabInfo[_6ee];
  8447. this.m_tabInfo[_6ee]=null;
  8448. }
  8449. if(_6f4){
  8450. this.m_currentlySelectedTab=_6ee;
  8451. _6f4.style.display="block";
  8452. _6f4.setAttribute("id","CVReport"+this.getId());
  8453. if(this.m_tabInfo&&this.m_tabInfo[_6ee]){
  8454. var _6f5=this.m_tabInfo[_6ee];
  8455. if(_6f5.conversation){
  8456. this.setConversation(_6f5.conversation);
  8457. }
  8458. if(_6f5.metadata){
  8459. _6f3.SetMetadata(_6f5.metadata);
  8460. }
  8461. if(_6f5.contextdata){
  8462. _6f3.SetContextData(_6f5.contextdata);
  8463. }
  8464. if(_6f5.secondaryRequests){
  8465. this.setSecondaryRequests(_6f5.secondaryRequests);
  8466. }
  8467. if(_6f5.styles){
  8468. this._addTabStylesToHead(_6f5.styles);
  8469. }
  8470. this.setHasPrompts(_6f5.hasPromptControl);
  8471. }
  8472. if(this.shouldWriteNavLinks()){
  8473. this.writeNavLinks(this.getSecondaryRequests().join(" "));
  8474. }
  8475. if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
  8476. this.getPinFreezeManager().rePaint();
  8477. if(isIE()){
  8478. var _6f6=document.getElementById("RVContent"+this.getId());
  8479. this.repaintDiv(_6f6);
  8480. }
  8481. }
  8482. if(this.m_viewerWidget){
  8483. this.m_viewerWidget.placeTabControlInView();
  8484. }
  8485. this._keepFocus=null;
  8486. this.doneLoadingUpdateA11Y("complete");
  8487. this.getTabController().resetPosition();
  8488. this.setMaxContentSize();
  8489. }else{
  8490. this.m_switchingToTabId=_6ee;
  8491. var _6f7=_6f0.cloneNode(false);
  8492. _6f7.style.display="block";
  8493. _6f7.setAttribute("id","CVReport"+this.getId());
  8494. _6f7.removeAttribute("tabId");
  8495. _6f0.parentNode.appendChild(_6f7);
  8496. _6f7.innerHTML="<table height='"+_6f1+"px'><tr><td height='100%'></td></tr></table>";
  8497. var _6f8=new ViewerDispatcherEntry(this);
  8498. _6f8.addFormField("ui.action","reportAction");
  8499. _6f8.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_6ee);
  8500. if(this.m_viewerWidget){
  8501. this.m_viewerWidget.placeTabControlInView();
  8502. }
  8503. this.dispatchRequest(_6f8);
  8504. }
  8505. };
  8506. CCognosViewer.prototype._removeTabContent=function(_6f9,_6fa){
  8507. var _6fb=this._findChildWithTabId(_6f9,_6fa);
  8508. while(_6fb){
  8509. _6fb.parentNode.removeChild(_6fb);
  8510. _6fb=this._findChildWithTabId(_6f9,_6fa);
  8511. }
  8512. };
  8513. CCognosViewer.prototype._findChildWithTabId=function(_6fc,_6fd){
  8514. var _6fe=null;
  8515. for(var i=0;i<_6fc.childNodes.length;i++){
  8516. var _700=_6fc.childNodes[i];
  8517. if(_700.getAttribute("tabId")==_6fd){
  8518. _6fe=_700;
  8519. break;
  8520. }
  8521. }
  8522. return _6fe;
  8523. };
  8524. CCognosViewer.prototype.clearTabs=function(){
  8525. if(!this.m_bHasTabs){
  8526. return;
  8527. }
  8528. this.m_tabInfo={};
  8529. var _701=this.getReportDiv();
  8530. var _702=_701.parentNode;
  8531. for(var i=0;i<_702.childNodes.length;i++){
  8532. var node=_702.childNodes[i];
  8533. if(node.getAttribute("id")!="CVReport"+this.m_sId){
  8534. _702.removeChild(node);
  8535. i--;
  8536. }
  8537. }
  8538. };
  8539. CCognosViewer.prototype.isSavedOutput=function(){
  8540. var _705=this.envParams["ui.action"];
  8541. return _705==="view"||_705==="buxView";
  8542. };
  8543. CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_707,_708){
  8544. var _709=document.getElementById("CVReport"+this.getId());
  8545. var _70a=document.createElement("iframe");
  8546. _70a.style.width="100%";
  8547. _70a.style.height="99%";
  8548. _70a.id="CVIFrame"+this.getId();
  8549. _70a.title=_707;
  8550. _70a.setAttribute("frameBorder","0");
  8551. _709.appendChild(_70a);
  8552. var obj=this;
  8553. var func=function(){
  8554. obj.renderTabs();
  8555. };
  8556. setTimeout(function(){
  8557. if(_708){
  8558. if(_70a.attachEvent){
  8559. _70a.attachEvent("onload",func);
  8560. }else{
  8561. _70a.addEventListener("load",func,true);
  8562. }
  8563. }
  8564. _70a.src=url;
  8565. },1);
  8566. };
  8567. CCognosViewer.prototype.updatePageState=function(_70d){
  8568. if(_70d&&this.getState()){
  8569. this.getState().setPageState(_70d);
  8570. }
  8571. };
  8572. CCognosViewer.prototype.getPageInfo=function(){
  8573. if(this.m_viewerState&&this.m_viewerState.getPageState()){
  8574. var _70e=this.m_viewerState.getPageState();
  8575. return {"currentPage":_70e.getCurrentPage(),"pageCount":_70e.getPageCount()};
  8576. }
  8577. return {};
  8578. };
  8579. CCognosViewer.prototype.isIWidgetMobile=function(){
  8580. return this.m_viewerWidget&&this.m_viewerWidget.isMobile();
  8581. };
  8582. CCognosViewer.prototype.isInteractiveViewer=function(){
  8583. return false;
  8584. };
  8585. CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){
  8586. if(this.isIWidgetMobile()){
  8587. this.m_viewerWidget.launchGotoPageForIWidgetMobile(form);
  8588. return true;
  8589. }
  8590. return false;
  8591. };
  8592. CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){
  8593. if(this.isIWidgetMobile()){
  8594. this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form);
  8595. return true;
  8596. }
  8597. return false;
  8598. };
  8599. CCognosViewer.prototype.getState=function(){
  8600. return this.m_viewerState;
  8601. };
  8602. CCognosViewer.prototype.getConfig=function(){
  8603. return this.m_viewerConfig;
  8604. };
  8605. CCognosViewer.prototype.getUIConfig=function(){
  8606. return this.m_viewerUIConfig;
  8607. };
  8608. CCognosViewer.prototype.setCurrentNodeFocus=function(node){
  8609. this.m_currentNodeFocus=node;
  8610. };
  8611. CCognosViewer.prototype.getCurrentNodeFocus=function(node){
  8612. return this.m_currentNodeFocus;
  8613. };
  8614. CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){
  8615. this.m_CurrentPromptControlFocus=node;
  8616. };
  8617. CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){
  8618. return this.m_CurrentPromptControlFocus;
  8619. };
  8620. CCognosViewer.prototype.loadExtra=function(){
  8621. };
  8622. CCognosViewer.prototype.setRetryDispatcherEntry=function(_715){
  8623. this.m_retryDispatcherEntry=_715;
  8624. };
  8625. CCognosViewer.prototype.getRetryDispatcherEntry=function(){
  8626. return this.m_retryDispatcherEntry;
  8627. };
  8628. CCognosViewer.prototype.resetViewerDispatcher=function(){
  8629. if(this.m_viewerDispatcher!==null){
  8630. delete this.m_viewerDispatcher;
  8631. this.m_viewerDispatcher=new ViewerDispatcher();
  8632. }
  8633. };
  8634. CCognosViewer.prototype.getViewerDispatcher=function(){
  8635. return this.m_viewerDispatcher;
  8636. };
  8637. CCognosViewer.prototype.setFaultDispatcherEntry=function(_716){
  8638. this.m_faultDispatcherEntry=_716;
  8639. };
  8640. CCognosViewer.prototype.getFaultDispatcherEntry=function(){
  8641. return this.m_faultDispatcherEntry;
  8642. };
  8643. CCognosViewer.prototype.dispatchRequest=function(_717){
  8644. this.setFaultDispatcherEntry(null);
  8645. this.getViewerDispatcher().dispatchRequest(_717);
  8646. };
  8647. CCognosViewer.prototype.getActiveRequest=function(){
  8648. return this.getViewerDispatcher().getActiveRequest();
  8649. };
  8650. CCognosViewer.prototype.getProductLocale=function(){
  8651. if(this.sProductLocale){
  8652. return this.sProductLocale;
  8653. }
  8654. return "en";
  8655. };
  8656. CCognosViewer.prototype.getDirection=function(){
  8657. if(this.sDirection){
  8658. return this.sDirection;
  8659. }
  8660. return "ltr";
  8661. };
  8662. CCognosViewer.prototype.isBidiEnabled=function(){
  8663. if(this.bIsBidiEnabled){
  8664. return true;
  8665. }
  8666. return false;
  8667. };
  8668. CCognosViewer.prototype.getBaseTextDirection=function(){
  8669. if(this.isBidiEnabled()){
  8670. if(this.sBaseTextDirection){
  8671. return this.sBaseTextDirection;
  8672. }
  8673. }
  8674. return "";
  8675. };
  8676. CCognosViewer.prototype.getActionFactory=function(){
  8677. if(!this.m_actionFactory){
  8678. this.m_actionFactory=new ActionFactory(this);
  8679. }
  8680. return this.m_actionFactory;
  8681. };
  8682. CCognosViewer.prototype.getAction=function(_718){
  8683. var _718=this.getActionFactory().load(_718);
  8684. _718.setCognosViewer(this);
  8685. return _718;
  8686. };
  8687. CCognosViewer.prototype.getCalculationCache=function(){
  8688. return this.m_calculationCache;
  8689. };
  8690. CCognosViewer.prototype.updateOutputForA11ySupport=function(){
  8691. this.updateBorderCollapse();
  8692. if(this.getA11YHelper()){
  8693. this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
  8694. }
  8695. var _719=navigator.userAgent.toLowerCase();
  8696. var _71a=_719.indexOf("iphone")!=-1;
  8697. var _71b=_719.indexOf("ipod")!=-1;
  8698. var _71c=_719.indexOf("ipad")!=-1;
  8699. var _71d=_71a||_71b||_71c;
  8700. var _71e=_719.indexOf("android")!=-1;
  8701. if(_71d||_71e){
  8702. document.body.classList.add("clsViewerMobile");
  8703. }
  8704. };
  8705. CCognosViewer.prototype.checkForHighContrast=function(){
  8706. if(this.isBux){
  8707. this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false;
  8708. }else{
  8709. var _71f=document.createElement("div");
  8710. _71f.id=this.m_sId+"hc";
  8711. _71f.style.border="1px solid";
  8712. _71f.style.borderColor="red green";
  8713. _71f.style.height="10px";
  8714. _71f.style.top="-999px";
  8715. _71f.style.position="absolute";
  8716. document.body.appendChild(_71f);
  8717. var _720=null;
  8718. if(isIE()){
  8719. _720=_71f.currentStyle;
  8720. }else{
  8721. _720=_71f.ownerDocument.defaultView.getComputedStyle(_71f,null);
  8722. }
  8723. if(!_720){
  8724. return;
  8725. }
  8726. this.m_bHighContrast=_720.borderTopColor==_720.borderRightColor;
  8727. document.body.removeChild(_71f);
  8728. }
  8729. };
  8730. CCognosViewer.prototype.isHighContrast=function(){
  8731. if(typeof this.m_bHighContrast==="undefined"){
  8732. this.checkForHighContrast();
  8733. }
  8734. return this.m_bHighContrast;
  8735. };
  8736. CCognosViewer.prototype.isLimitedInteractiveMode=function(){
  8737. return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true";
  8738. };
  8739. CCognosViewer.prototype.updateBorderCollapse=function(){
  8740. if(this.isHighContrast()==true){
  8741. var _721=null;
  8742. if(this.envParams["ui.action"]=="view"&&!this.isBux){
  8743. var _722=document.getElementById("CVIFrame"+this.getId());
  8744. _721=_722.contentWindow.document;
  8745. }else{
  8746. _721=document.getElementById("CVReport"+this.getId());
  8747. }
  8748. var _723=_721.getElementsByTagName("table");
  8749. for(var i=0;i<_723.length;i++){
  8750. if(_723[i].style.borderCollapse=="collapse"){
  8751. _723[i].style.borderCollapse="separate";
  8752. }
  8753. }
  8754. }
  8755. };
  8756. CCognosViewer.prototype.isAccessibleMode=function(){
  8757. if(this.m_bAccessibleMode==true){
  8758. return true;
  8759. }
  8760. return false;
  8761. };
  8762. CCognosViewer.prototype.isSinglePageReport=function(){
  8763. for(var _725 in this.m_aSecRequests){
  8764. if(this.m_aSecRequests[_725]=="nextPage"||this.m_aSecRequests[_725]=="previousPage"){
  8765. return false;
  8766. }
  8767. }
  8768. return true;
  8769. };
  8770. CCognosViewer.prototype.hasNextPage=function(){
  8771. for(var _726 in this.m_aSecRequests){
  8772. if(this.m_aSecRequests[_726]=="nextPage"){
  8773. return true;
  8774. }
  8775. }
  8776. return false;
  8777. };
  8778. CCognosViewer.prototype.hasPrevPage=function(){
  8779. for(var _727 in this.m_aSecRequests){
  8780. if(this.m_aSecRequests[_727]=="previousPage"){
  8781. return true;
  8782. }
  8783. }
  8784. return false;
  8785. };
  8786. CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
  8787. evt=(evt)?evt:((event)?event:null);
  8788. if(evt){
  8789. var node=getNodeFromEvent(evt);
  8790. var _72a=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
  8791. if((evt.keyCode==8&&_72a!="input"&&_72a!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){
  8792. evt.returnValue=false;
  8793. evt.cancelBubble=true;
  8794. if(typeof evt.stopPropagation!="undefined"){
  8795. evt.stopPropagation();
  8796. }
  8797. if(typeof evt.preventDefault!="undefined"){
  8798. evt.preventDefault();
  8799. }
  8800. return false;
  8801. }
  8802. }
  8803. return true;
  8804. };
  8805. CCognosViewer.prototype.setUseWorkingDialog=function(_72b){
  8806. this.m_bUseWorkingDialog=_72b;
  8807. };
  8808. CCognosViewer.prototype.getWorkingDialog=function(){
  8809. if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){
  8810. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){
  8811. this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog();
  8812. }else{
  8813. this.m_oWorkingDialog=new WorkingDialog(this);
  8814. }
  8815. }
  8816. return this.m_oWorkingDialog;
  8817. };
  8818. CCognosViewer.prototype.getRequestIndicator=function(){
  8819. if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){
  8820. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){
  8821. this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator();
  8822. }else{
  8823. this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this);
  8824. }
  8825. }
  8826. return this.m_oRequestExecutedIndicator;
  8827. };
  8828. CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){
  8829. if(document.attachEvent){
  8830. document.attachEvent("onkeydown",this.captureHotkeyPageNavigation);
  8831. }else{
  8832. if(document.addEventListener){
  8833. document.addEventListener("keydown",this.captureHotkeyPageNavigation,false);
  8834. }
  8835. }
  8836. };
  8837. CCognosViewer.prototype.setHasPrompts=function(_72c){
  8838. if(!_72c){
  8839. this.preProcessControlArray=[];
  8840. }
  8841. this.m_bReportHasPrompts=_72c;
  8842. };
  8843. CCognosViewer.prototype.getHasPrompts=function(){
  8844. return this.m_bReportHasPrompts;
  8845. };
  8846. CCognosViewer.prototype.setUsePageRequest=function(_72d){
  8847. this.m_viewerDispatcher.setUsePageRequest(_72d);
  8848. };
  8849. CCognosViewer.prototype.getUsePageRequest=function(){
  8850. return this.m_viewerDispatcher.getUsePageRequest();
  8851. };
  8852. CCognosViewer.prototype.setKeepSessionAlive=function(_72e){
  8853. this.m_bKeepSessionAlive=_72e;
  8854. };
  8855. CCognosViewer.prototype.getKeepSessionAlive=function(){
  8856. return this.m_bKeepSessionAlive;
  8857. };
  8858. CCognosViewer.prototype.getWebContentRoot=function(){
  8859. if(typeof this.sWebContentRoot!="undefined"){
  8860. return this.sWebContentRoot;
  8861. }else{
  8862. return "..";
  8863. }
  8864. };
  8865. CCognosViewer.prototype.getSkin=function(){
  8866. if(typeof this.sSkin!="undefined"){
  8867. return this.sSkin;
  8868. }else{
  8869. return this.getWebContentRoot()+"/skins/corporate";
  8870. }
  8871. };
  8872. CCognosViewer.prototype.getSelectionController=function(){
  8873. var _72f;
  8874. try{
  8875. _72f=getCognosViewerSCObjectRef(this.m_sId);
  8876. }
  8877. catch(e){
  8878. _72f=null;
  8879. }
  8880. return _72f;
  8881. };
  8882. CCognosViewer.prototype.addCallback=function(_730,oFct,_732){
  8883. if(!this.m_aCallback){
  8884. this.m_aCallback=[];
  8885. }
  8886. this.m_aCallback=this.m_aCallback.concat({m_sEvent:_730,m_oCallback:oFct,m_bCaptureEvent:(_732===true)});
  8887. };
  8888. CCognosViewer.prototype.canDrillDown=function(sId){
  8889. var sCtx=this.findCtx(sId).split("::")[0];
  8890. if(sCtx){
  8891. var _735=this.getSelectionController();
  8892. if(_735){
  8893. return (_735.canDrillDown(sCtx));
  8894. }
  8895. }
  8896. return false;
  8897. };
  8898. CCognosViewer.prototype.canDrillUp=function(sId){
  8899. var sCtx=this.findCtx(sId).split("::")[0];
  8900. if(sCtx){
  8901. var _738=this.getSelectionController();
  8902. if(_738){
  8903. return (_738.canDrillUp(sCtx));
  8904. }
  8905. }
  8906. return false;
  8907. };
  8908. CCognosViewer.prototype.canSubmitPrompt=function(){
  8909. var _739=null;
  8910. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  8911. var _73a=this.preProcessControlArray.length;
  8912. for(var k=0;k<_73a;k++){
  8913. _739=eval(this.preProcessControlArray[k]);
  8914. if(_739.isValid()===false){
  8915. if(!this.m_reportRenderingDone||!_739.getCascadeOnParameter||!_739.getCascadeOnParameter()){
  8916. return false;
  8917. }
  8918. }
  8919. }
  8920. }
  8921. return true;
  8922. };
  8923. CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
  8924. if(this.rvMainWnd){
  8925. this.rvMainWnd.closeContextMenuAndToolbarMenus();
  8926. }
  8927. };
  8928. CCognosViewer.prototype.dcm=function(_73c,_73d){
  8929. if(this.canDisplayContextMenu()){
  8930. if(this.preSelectNode==true){
  8931. _73d=false;
  8932. this.preSelectNode=false;
  8933. }
  8934. if(this.rvMainWnd.displayContextMenu(_73c,_73d)!=false){
  8935. return stopEventBubble(_73c);
  8936. }
  8937. }
  8938. };
  8939. CCognosViewer.prototype.canDisplayContextMenu=function(){
  8940. if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){
  8941. return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu);
  8942. }
  8943. return false;
  8944. };
  8945. CCognosViewer.prototype.de=function(_73e){
  8946. var _73f=this.getDrillMgr();
  8947. if(_73f){
  8948. _73f.singleClickDrillEvent(_73e,"RV");
  8949. }
  8950. };
  8951. CCognosViewer.prototype.debug=function(sMsg){
  8952. if(this.m_bDebug){
  8953. var _741="";
  8954. var _742=this.debug.caller;
  8955. if(typeof _742=="object"&&_742!==null){
  8956. _741=_742.toString().match(/function (\w*)/)[1];
  8957. }
  8958. if(!_741){
  8959. _741="?";
  8960. }
  8961. alert(_741+": "+sMsg);
  8962. }
  8963. };
  8964. CCognosViewer.prototype.callbackExists=function(_743){
  8965. var _744=false;
  8966. if(this.m_aCallback&&this.m_aCallback.length){
  8967. for(var _745=0;_745<this.m_aCallback.length;++_745){
  8968. var oCB=this.m_aCallback[_745];
  8969. if(oCB.m_sEvent==_743){
  8970. return true;
  8971. }
  8972. }
  8973. }
  8974. return false;
  8975. };
  8976. CCognosViewer.prototype.executeCallback=function(_747){
  8977. var _748=false;
  8978. if(this.m_aCallback&&this.m_aCallback.length){
  8979. for(var _749=0;_749<this.m_aCallback.length;++_749){
  8980. var oCB=this.m_aCallback[_749];
  8981. if(oCB.m_sEvent==_747){
  8982. if(typeof oCB.m_oCallback=="function"){
  8983. oCB.m_oCallback();
  8984. }
  8985. if(oCB.m_bCaptureEvent){
  8986. _748=true;
  8987. }
  8988. }
  8989. }
  8990. }
  8991. return _748;
  8992. };
  8993. CCognosViewer.prototype.getCAFContext=function(){
  8994. return this.m_sCAFContext;
  8995. };
  8996. CCognosViewer.prototype.getSoapFault=function(){
  8997. return this.m_sSoapFault;
  8998. };
  8999. CCognosViewer.prototype.getColumnContextIds=function(sId){
  9000. return this.getContextIds(sId,2);
  9001. };
  9002. CCognosViewer.prototype.getConversation=function(){
  9003. return this.m_sConversation;
  9004. };
  9005. CCognosViewer.prototype.getStatus=function(){
  9006. return (this.m_sStatus?this.m_sStatus:"");
  9007. };
  9008. CCognosViewer.prototype.isWorking=function(_74c){
  9009. if(typeof _74c!="string"){
  9010. _74c=this.getStatus();
  9011. }
  9012. return ((""+_74c).match(/^(working|stillWorking)$/)?true:false);
  9013. };
  9014. CCognosViewer.prototype.isWorkingOrPrompting=function(){
  9015. return (this.getStatus().match(/^(working|stillWorking|prompting)$/)?true:false);
  9016. };
  9017. CCognosViewer.prototype.getActionState=function(){
  9018. return this.m_sActionState;
  9019. };
  9020. CCognosViewer.prototype.getDataItemName=function(sId){
  9021. var _74e=null;
  9022. var sCtx=this.findCtx(sId).split("::")[0];
  9023. if(sCtx){
  9024. var _750=this.getSelectionController();
  9025. if(_750){
  9026. var _751=_750.getRefDataItem(sCtx);
  9027. if(_751){
  9028. _74e=_751;
  9029. }
  9030. }
  9031. }
  9032. return _74e;
  9033. };
  9034. CCognosViewer.prototype.getDataType=function(sId){
  9035. var _753=null;
  9036. var sCtx=this.findCtx(sId).split("::")[0];
  9037. if(sCtx){
  9038. var _755=this.getSelectionController();
  9039. if(_755){
  9040. var _756=_755.getDataType(sCtx);
  9041. if(_756){
  9042. _753=_756;
  9043. }
  9044. }
  9045. }
  9046. return _753;
  9047. };
  9048. CCognosViewer.prototype.getDepth=function(sId){
  9049. var _758=null;
  9050. var sCtx=this.findCtx(sId).split("::")[0];
  9051. if(sCtx){
  9052. var _75a=this.getSelectionController();
  9053. if(_75a){
  9054. var _75b=_75a.getDepth(sCtx);
  9055. if(_75b){
  9056. _758=_75b;
  9057. }
  9058. }
  9059. }
  9060. return _758;
  9061. };
  9062. CCognosViewer.prototype.getDrillMgr=function(){
  9063. if(!this.m_oDrillMgr){
  9064. this.loadExtra();
  9065. if(typeof CDrillManager=="function"){
  9066. this.m_oDrillMgr=new CDrillManager(this);
  9067. this.goDrillManager=this.m_oDrillMgr;
  9068. }
  9069. }
  9070. return this.m_oDrillMgr;
  9071. };
  9072. CCognosViewer.prototype.getSubscriptionManager=function(){
  9073. if(!this.m_oSubscriptionManager){
  9074. this.loadExtra();
  9075. if(typeof CSubscriptionManager=="function"){
  9076. this.m_oSubscriptionManager=new CSubscriptionManager(this);
  9077. }
  9078. }
  9079. return this.m_oSubscriptionManager;
  9080. };
  9081. CCognosViewer.prototype.updateGlobalParameters=function(_75c){
  9082. var oReq=new ViewerDispatcherEntry(this);
  9083. oReq.addFormField("ui.action","forward");
  9084. oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_75c);
  9085. oReq.addFormField("run.prompt",true);
  9086. oReq.addFormField("_promptControl","reprompt");
  9087. this.submitPromptValues(oReq);
  9088. };
  9089. CCognosViewer.prototype.getExecutionParameters=function(){
  9090. return this.m_sParameters;
  9091. };
  9092. CCognosViewer.prototype.getGateway=function(){
  9093. return this.m_sGateway;
  9094. };
  9095. CCognosViewer.prototype.getSpecification=function(){
  9096. return this.envParams["ui.spec"];
  9097. };
  9098. CCognosViewer.prototype.getHierarchyUniqueName=function(sId){
  9099. var sHun=null;
  9100. var sCtx=this.findCtx(sId).split("::")[0];
  9101. if(sCtx){
  9102. var _761=this.getSelectionController();
  9103. if(_761){
  9104. var aHUN=_761.getHun(sCtx);
  9105. if(aHUN){
  9106. sHun=aHUN;
  9107. }
  9108. }
  9109. }
  9110. return sHun;
  9111. };
  9112. CCognosViewer.prototype.getDimensionUniqueName=function(sId){
  9113. var sCtx=this.findCtx(sId).split("::")[0];
  9114. if(sCtx){
  9115. var _765=this.getSelectionController();
  9116. if(_765){
  9117. var aDUN=_765.getDun(sCtx);
  9118. if(aDUN){
  9119. return aDUN;
  9120. }
  9121. }
  9122. }
  9123. return null;
  9124. };
  9125. CCognosViewer.prototype.getId=function(){
  9126. return this.m_sId;
  9127. };
  9128. CCognosViewer.prototype.getLevelId=function(sId){
  9129. var _768=null;
  9130. var sCtx=this.findCtx(sId).split("::")[0];
  9131. if(sCtx){
  9132. var _76a=this.getSelectionController();
  9133. if(_76a){
  9134. var aLUN=_76a.getLun(sCtx);
  9135. if(aLUN){
  9136. _768=aLUN;
  9137. }
  9138. }
  9139. }
  9140. return _768;
  9141. };
  9142. CCognosViewer.prototype.getMemberUniqueName=function(sId){
  9143. var sMUN=null;
  9144. var sCtx=this.findCtx(sId).split("::")[0];
  9145. if(sCtx){
  9146. var _76f=this.getSelectionController();
  9147. if(_76f){
  9148. var aMUN=_76f.getMun(sCtx);
  9149. if(aMUN){
  9150. sMUN=aMUN;
  9151. }
  9152. }
  9153. }
  9154. return sMUN;
  9155. };
  9156. CCognosViewer.prototype.getObjectId=function(){
  9157. var _771="window";
  9158. if(typeof this.getId()=="string"){
  9159. _771=getCognosViewerObjectRefAsString(this.getId());
  9160. }
  9161. return _771;
  9162. };
  9163. CCognosViewer.prototype.getQueryModelId=function(sId){
  9164. var _773=null;
  9165. var sCtx=this.findCtx(sId).split("::")[0];
  9166. if(sCtx){
  9167. var _775=this.getSelectionController();
  9168. if(_775){
  9169. var _776=_775.getQueryModelId(sCtx);
  9170. if(_776){
  9171. _773=_776;
  9172. }
  9173. }
  9174. }
  9175. return _773;
  9176. };
  9177. CCognosViewer.prototype.getQueryName=function(sId){
  9178. var _778=null;
  9179. var sCtx=this.findCtx(sId).split("::")[0];
  9180. if(sCtx){
  9181. var _77a=this.getSelectionController();
  9182. if(_77a){
  9183. var _77b=_77a.getRefQuery(sCtx);
  9184. if(_77b){
  9185. _778=_77b;
  9186. }
  9187. }
  9188. }
  9189. return _778;
  9190. };
  9191. CCognosViewer.prototype.getContextIds=function(sId,_77d){
  9192. var aIds=[];
  9193. var sCtx=this.findCtx(sId);
  9194. if(sCtx){
  9195. var _780=sCtx.split("::");
  9196. if(_780&&_780.length>1&&_77d<_780.length){
  9197. aIds=_780[_77d].split(":");
  9198. }
  9199. }
  9200. return aIds;
  9201. };
  9202. CCognosViewer.prototype.getRowContextIds=function(sId){
  9203. return this.getContextIds(sId,1);
  9204. };
  9205. CCognosViewer.prototype.getPageContextIds=function(sId){
  9206. return this.getContextIds(sId,3);
  9207. };
  9208. CCognosViewer.prototype.getString=function(sKey){
  9209. if(RV_RES&&RV_RES[sKey]){
  9210. return RV_RES[sKey];
  9211. }
  9212. return sKey;
  9213. };
  9214. CCognosViewer.prototype.getRV=function(){
  9215. if(typeof this.m_oCVMgr=="object"){
  9216. return this.m_oCVMgr;
  9217. }
  9218. return window;
  9219. };
  9220. CCognosViewer.prototype.getSecondaryRequests=function(){
  9221. return this.m_aSecRequests;
  9222. };
  9223. CCognosViewer.prototype.getTracking=function(){
  9224. return this.m_sTracking;
  9225. };
  9226. CCognosViewer.prototype.findCtx=function(sId){
  9227. var sCtx="";
  9228. if(typeof sId=="string"){
  9229. var aCtx=this.getReportContextHelper().processCtx(sId);
  9230. var _787=aCtx[0][0];
  9231. var _788=this.getSelectionController();
  9232. if(_788){
  9233. if(_788.isContextId(_787)){
  9234. sCtx=sId;
  9235. }
  9236. }
  9237. }
  9238. if(!sCtx){
  9239. var _789=this.findElementWithCtx(sId);
  9240. if(_789){
  9241. sCtx=_789.getAttribute("ctx");
  9242. }
  9243. }
  9244. return sCtx;
  9245. };
  9246. CCognosViewer.prototype.findElementWithCtx=function(sId){
  9247. var _78b=sId;
  9248. if(typeof sId=="string"){
  9249. _78b=this.findElementWithCtx(document.getElementById(sId));
  9250. }
  9251. if(_78b){
  9252. if(_78b.getAttribute&&_78b.getAttribute("ctx")){
  9253. return _78b;
  9254. }
  9255. for(var _78c=0;_78c<_78b.childNodes.length;_78c++){
  9256. var _78d=this.findElementWithCtx(_78b.childNodes[_78c]);
  9257. if(_78d){
  9258. return _78d;
  9259. }
  9260. }
  9261. }
  9262. return null;
  9263. };
  9264. CCognosViewer.prototype.getUseValue=function(sId){
  9265. var sVal=null;
  9266. var sCtx=this.findCtx(sId).split("::")[0];
  9267. if(sCtx){
  9268. var _791=this.getSelectionController();
  9269. if(_791){
  9270. sVal=_791.getUseValue(sCtx);
  9271. }
  9272. }
  9273. return sVal;
  9274. };
  9275. CCognosViewer.prototype.init=function(_792){
  9276. if(_792&&typeof _792=="object"){
  9277. for(var _793 in _792){
  9278. this[_793]=_792[_793];
  9279. }
  9280. }
  9281. };
  9282. CCognosViewer.prototype.initViewer=function(_794){
  9283. var _795=new RequestHandler(this);
  9284. var _796=document.getElementById("formBackJax"+this.getId());
  9285. if(_796&&typeof _796.state!="undefined"&&_796.state.value.length>0){
  9286. _795.loadReportHTML(_796.result.value);
  9287. var _797=eval("("+_796.state.value+")");
  9288. _795.updateViewerState(_797);
  9289. _795.postComplete();
  9290. }else{
  9291. if(this.getUsePageRequest()){
  9292. var _798=_794?_794.m_sStatus:null;
  9293. if(isIE()){
  9294. if(window.location.hash=="#working"){
  9295. window.history.go(-2);
  9296. return;
  9297. }else{
  9298. if(_798==="working"||_798==="stillWorking"){
  9299. window.location.hash="#working";
  9300. }
  9301. }
  9302. }else{
  9303. if(_796&&_796.working){
  9304. if(_796.working.value=="true"){
  9305. window.history.go(-1);
  9306. return;
  9307. }else{
  9308. if(_798==="working"||_798==="stillWorking"){
  9309. _796.working.value="true";
  9310. }
  9311. }
  9312. }
  9313. }
  9314. }
  9315. _795.processInitialResponse(_794);
  9316. }
  9317. };
  9318. CCognosViewer.prototype.saveBackJaxInformation=function(_799){
  9319. var _79a=document.getElementById("formBackJax"+this.getId());
  9320. if(_79a){
  9321. if(typeof _79a.state!="undefined"){
  9322. _79a.state.value=_799.getResponseStateText();
  9323. }
  9324. if(typeof _79a.result!="undefined"){
  9325. _79a.result.value=_799.getResult();
  9326. }
  9327. }
  9328. };
  9329. CCognosViewer.prototype.pcc=function(evt){
  9330. if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
  9331. this.preSelectNode=true;
  9332. var _79c=this.getSelectionController();
  9333. if(_79c){
  9334. _79c.pageContextClicked(evt);
  9335. }
  9336. }
  9337. };
  9338. CCognosViewer.prototype.isValidAjaxResponse=function(_79d){
  9339. return (_79d&&_79d.childNodes&&_79d.childNodes.length>0&&_79d.childNodes[0].nodeName!="parsererror"?true:false);
  9340. };
  9341. CCognosViewer.prototype.resubmitInSafeMode=function(_79e){
  9342. if(this.m_bUseSafeMode){
  9343. this.resetViewerDispatcher();
  9344. this.setUsePageRequest(true);
  9345. this.envParams["cv.useAjax"]="false";
  9346. if(_79e){
  9347. _79e.retryRequest();
  9348. }
  9349. }
  9350. };
  9351. CCognosViewer.prototype.showLoadedContent=function(_79f){
  9352. if(_79f!==null&&typeof _79f!="undefined"){
  9353. _79f.style.display="block";
  9354. }
  9355. this.m_resizeReady=true;
  9356. this.doneLoading();
  9357. var obj=this;
  9358. setTimeout(function(){
  9359. obj.renderTabs();
  9360. },1);
  9361. };
  9362. CCognosViewer.prototype.doneLoading=function(){
  9363. var _7a1=this.getViewerWidget();
  9364. if(_7a1){
  9365. if(window.IBM&&window.IBM.perf){
  9366. window.IBM.perf.log("viewer_doneLoading",this);
  9367. }
  9368. var _7a2=this.getStatus();
  9369. if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
  9370. var _7a3=_7a2=="working"||_7a2=="stillWorking"||_7a2=="fault";
  9371. _7a1.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_7a3});
  9372. if(_7a2=="complete"){
  9373. if(window.IBM&&window.IBM.perf){
  9374. window.IBM.perf.log("viewer_doneLoading",this);
  9375. }
  9376. if(typeof _7a1.postLoadContent=="function"){
  9377. _7a1.postLoadContent();
  9378. }
  9379. this.m_reportRenderingDone=true;
  9380. if(!_7a3){
  9381. var _7a4=this;
  9382. setTimeout(function(){
  9383. _7a4.m_readyToRespondToResizeEvent=true;
  9384. },20);
  9385. }
  9386. }
  9387. }
  9388. if(_7a2!="fault"){
  9389. _7a1.clearErrorDlg();
  9390. }
  9391. this.doneLoadingUpdateA11Y(_7a2);
  9392. }else{
  9393. var _7a2=this.getStatus();
  9394. if(_7a2=="complete"){
  9395. this.m_reportRenderingDone=true;
  9396. this.JAWSTalk(RV_RES.IDS_JS_READY);
  9397. }else{
  9398. if(_7a2=="working"){
  9399. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  9400. }
  9401. }
  9402. }
  9403. };
  9404. CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_7a5){
  9405. if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
  9406. var _7a6=this.getKeepFocus();
  9407. if(_7a5=="complete"){
  9408. this.setKeepFocus(false);
  9409. }
  9410. var _7a7=null;
  9411. if(this.getVisibleDialog()!==null){
  9412. _7a7=this.getVisibleDialog().getDialogDiv();
  9413. }else{
  9414. if(_7a6===true){
  9415. _7a7=document.getElementById("CVReport"+this.getId());
  9416. }else{
  9417. if(typeof _7a6=="string"){
  9418. _7a7=document.getElementById(_7a6);
  9419. }else{
  9420. if(_7a6!==null){
  9421. _7a7=_7a6;
  9422. if(this.isBux){
  9423. dojo.window.scrollIntoView(_7a7);
  9424. }
  9425. }
  9426. }
  9427. }
  9428. }
  9429. if(_7a7){
  9430. setFocusToFirstTabItem(_7a7);
  9431. }
  9432. if(_7a5=="complete"){
  9433. this.JAWSTalk(RV_RES.IDS_JS_READY);
  9434. }else{
  9435. if(_7a5=="working"||_7a5=="stillWorking"){
  9436. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  9437. }
  9438. }
  9439. }
  9440. };
  9441. CCognosViewer.prototype.JAWSTalk=function(_7a8){
  9442. if(this.isMobile()||this.isIWidgetMobile()){
  9443. return;
  9444. }
  9445. var id=this.getId();
  9446. var div=document.getElementById("JAWS_Alert_"+id);
  9447. if(div){
  9448. div.parentNode.removeChild(div);
  9449. }
  9450. div=document.createElement("div");
  9451. div.id="JAWS_Alert_"+id;
  9452. div.style.position="absolute";
  9453. div.style.top="-9000px";
  9454. div.style.display="none";
  9455. div.setAttribute("role","alert");
  9456. div.appendChild(document.createTextNode(_7a8));
  9457. var _7ab=document.getElementById("RVContent"+id);
  9458. if(_7ab){
  9459. _7ab.appendChild(div);
  9460. }else{
  9461. if(typeof console!="undefined"&&console&&console.log){
  9462. console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert.");
  9463. }
  9464. }
  9465. };
  9466. CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){
  9467. if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){
  9468. return false;
  9469. }
  9470. var _7ac=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
  9471. if(_7ac===null){
  9472. return false;
  9473. }
  9474. var _7ad=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
  9475. return (_7ac.toLowerCase()==="on"&&_7ad!==false)||(_7ac.toLowerCase()==="off"&&_7ad===true);
  9476. };
  9477. CCognosViewer.prototype.setMaxContentSize=function(){
  9478. if("10"!=window.getIEVersion()){
  9479. return;
  9480. }
  9481. if(document.body.className==="viewer"){
  9482. var _7ae=document.body.offsetHeight;
  9483. var _7af=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
  9484. var _7b0=document.getElementById("mainViewerTable"+this.getId());
  9485. _7b0.style.maxHeight=_7ae-_7af-2+"px";
  9486. var _7b1=GUtil.generateCallback(this.setMaxContentSize,[true],this);
  9487. if(!this.attachedOnResize){
  9488. this.attachedOnResize=true;
  9489. if(window.attachEvent){
  9490. window.attachEvent("onresize",_7b1);
  9491. }else{
  9492. if(window.addEventListener){
  9493. window.addEventListener("resize",_7b1,false);
  9494. }
  9495. }
  9496. }
  9497. }
  9498. };
  9499. CCognosViewer.prototype.getNonReportHeight=function(node){
  9500. var _7b3=0;
  9501. var _7b4=node.parentNode;
  9502. if(!_7b4){
  9503. return _7b3;
  9504. }
  9505. if(_7b4.childNodes.length>1){
  9506. for(var i=0;i<_7b4.childNodes.length;i++){
  9507. var _7b6=_7b4.childNodes[i];
  9508. if(_7b6!=node&&!isNaN(_7b6.clientHeight)&&_7b6.style.display!="none"){
  9509. _7b3+=_7b6.clientHeight;
  9510. }
  9511. }
  9512. }
  9513. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  9514. _7b3+=this.getNonReportHeight(_7b4);
  9515. }
  9516. return _7b3;
  9517. };
  9518. CCognosViewer.prototype.addPageAdornments=function(){
  9519. this.m_layoutElements=null;
  9520. this.m_lidToElement=null;
  9521. this.initFlashCharts();
  9522. this.insertSortIconsForAllLists();
  9523. var _7b7=this.getViewerWidget().getProperties();
  9524. if(this.canInsertExpandIconsForAllCrosstabs()){
  9525. this.insertExpandIconsForAllCrosstabs();
  9526. }
  9527. var _7b8=document.getElementById("CVReport"+this.getId());
  9528. if(_7b8){
  9529. var oCV=this;
  9530. setTimeout(function(){
  9531. if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
  9532. oCV.getPinFreezeManager().renderReportWithFrozenContainers(_7b8);
  9533. }
  9534. oCV.addInfoBar();
  9535. },1);
  9536. }
  9537. this.getViewerWidget().reselectSelectionFilterObjects();
  9538. this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
  9539. };
  9540. CCognosViewer.prototype.addFlashChart=function(_7ba){
  9541. this.m_flashChartsObjectIds.push(_7ba);
  9542. };
  9543. CCognosViewer.prototype.flashChartError=function(_7bb){
  9544. var _7bc=this.getViewerWidget();
  9545. var _7bd=_7bc.getProperties();
  9546. _7bd.setProperty("flashCharts",false);
  9547. var _7be=this.getAction("Redraw");
  9548. _7be.isUndoable=function(){
  9549. return false;
  9550. };
  9551. _7be.execute();
  9552. };
  9553. CCognosViewer.prototype.initFlashCharts=function(){
  9554. var _7bf=this.getViewerWidget();
  9555. if(this.m_flashChartsObjectIds.length>0){
  9556. var _7c0=document.getElementById("rt"+this.getId());
  9557. if(window.addEventListener){
  9558. _7c0.addEventListener("mousedown",onFlashChartRightClick,true);
  9559. }else{
  9560. var _7c1={};
  9561. var _7c2=function(){
  9562. this.releaseCapture();
  9563. };
  9564. var _7c3=function(){
  9565. onFlashChartRightClick(event);
  9566. this.setCapture();
  9567. };
  9568. for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
  9569. var _7c5=this.m_flashChartsObjectIds[i];
  9570. var _7c6=document.getElementById(_7c5);
  9571. _7c1[_7c5]=1;
  9572. _7c6.parentNode.onmouseup=_7c2;
  9573. _7c6.parentNode.onmousedown=_7c3;
  9574. }
  9575. if(this.m_flashChartsObjectIds.length>0){
  9576. _7c0.attachEvent("oncontextmenu",function(){
  9577. if(_7c1[window.event.srcElement.id]){
  9578. return false;
  9579. }
  9580. });
  9581. }
  9582. }
  9583. if(_7bf){
  9584. _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
  9585. }
  9586. }else{
  9587. if(_7bf){
  9588. _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
  9589. }
  9590. }
  9591. };
  9592. CCognosViewer.prototype.initializeLayoutElements=function(){
  9593. var _7c7=document.getElementById("rt"+this.getId());
  9594. var _7c8=getElementsByAttribute(_7c7,"*","lid");
  9595. this.m_lidToElement={};
  9596. this.m_layoutElements=[];
  9597. var _7c9=0;
  9598. var _7ca=this.getPinFreezeManager();
  9599. for(var i=0;i<_7c8.length;i++){
  9600. var e=_7c8[i];
  9601. if(!_7ca||!_7ca.getContainerElement(e)||_7ca.isElementInMainOutput(e)){
  9602. this.m_layoutElements[_7c9]=e;
  9603. this.m_lidToElement[e.getAttribute("lid")]=e;
  9604. _7c9++;
  9605. }
  9606. }
  9607. };
  9608. CCognosViewer.prototype.getLayoutElement=function(_7cd){
  9609. if(!this.m_layoutElements){
  9610. this.initializeLayoutElements();
  9611. }
  9612. if(this.m_layoutElements){
  9613. return this.m_layoutElements[_7cd];
  9614. }
  9615. return null;
  9616. };
  9617. CCognosViewer.prototype.getLayoutElementFromLid=function(lid){
  9618. if(!this.m_lidToElement){
  9619. this.initializeLayoutElements();
  9620. }
  9621. return this.m_lidToElement[lid];
  9622. };
  9623. CCognosViewer.prototype.getInfoBars=function(){
  9624. return this.m_aInfoBar?this.m_aInfoBar:null;
  9625. };
  9626. CCognosViewer.prototype.addInfoBar=function(){
  9627. if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){
  9628. return;
  9629. }
  9630. var _7cf=this.getRAPReportInfo();
  9631. if(_7cf){
  9632. var _7d0=document.getElementById("rt"+this.getId());
  9633. this.initializeLayoutElements();
  9634. var _7d1=[];
  9635. this.m_aInfoBar=[];
  9636. for(var _7d2=0;_7d2<this.m_layoutElements.length;++_7d2){
  9637. var _7d3=this.m_layoutElements[_7d2];
  9638. var lid=_7d3.getAttribute("lid");
  9639. if(lid){
  9640. if(lid.indexOf("RAP_NDH_")>-1){
  9641. lid=lid.substring(8);
  9642. }
  9643. lid=lid.substring(0,lid.indexOf(this.getId()));
  9644. }
  9645. var _7d5=_7cf.getContainer(lid);
  9646. if(_7d5&&typeof _7d5.parentContainer=="undefined"){
  9647. var _7d6=this.collectChildContainers(_7d5.container);
  9648. if(this.getPinFreezeManager()){
  9649. oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_7d3);
  9650. _7d3=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_7d3;
  9651. }
  9652. var _7d7=new InfoBar(this,_7d3,_7d5,_7d6,_7d2);
  9653. _7d7.setTimingDetails(_7cf._getEventTimings());
  9654. _7d7.render();
  9655. if(_7d7.hasSomethingRendered()){
  9656. _7d1.push(_7d7.getId());
  9657. }
  9658. this.m_aInfoBar.push(_7d7);
  9659. }
  9660. }
  9661. var _7d8=this.getViewerWidget();
  9662. if(_7d8){
  9663. _7d8.refreshInfoBarRenderedState(_7d1);
  9664. }
  9665. }
  9666. };
  9667. CCognosViewer.prototype.collectChildContainers=function(_7d9){
  9668. var _7da=[];
  9669. var _7db=this.getRAPReportInfo();
  9670. if(_7db){
  9671. var _7dc=_7db.getContainerCount();
  9672. for(var cidx=0;cidx<_7dc;++cidx){
  9673. var _7de=_7db.getContainerFromPos(cidx);
  9674. if(typeof _7de.parentContainer!="undefined"&&_7de.parentContainer==_7d9){
  9675. _7da.push(_7de);
  9676. }
  9677. }
  9678. }
  9679. return _7da;
  9680. };
  9681. CCognosViewer.prototype.addReportInfo=function(){
  9682. var _7df=this.getViewerWidget();
  9683. if(typeof _7df==="undefined"||_7df===null){
  9684. return;
  9685. }
  9686. if(!_7df.getAttributeValue("originalReport")||this.isIWidgetMobile()){
  9687. return;
  9688. }
  9689. var _7e0=this.envParams["baseReportModificationTime"];
  9690. var _7e1=_7df.getAttributeValue("baseReportModificationTime");
  9691. if(typeof _7e0!=="undefined"&&typeof _7e1!=="undefined"&&_7e1&&_7e1!="<empty>"&&_7e0!==_7e1){
  9692. var cvid=this.getId();
  9693. var _7e3=document.getElementById("CVReport"+cvid);
  9694. var _7e4=_7e3.parentNode;
  9695. var id="ReportInfo"+cvid;
  9696. var _7e6=document.createElement("div");
  9697. _7e6.setAttribute("id",id+"_container");
  9698. _7e6.setAttribute("cvid",cvid);
  9699. _7e6.className="new-info-indicator BUXNoPrint";
  9700. var _7e7=document.createElement("img");
  9701. var img=null;
  9702. if(this.getDirection()==="rtl"){
  9703. img="/rv/images/action_show_info_rtl.png";
  9704. }else{
  9705. img="/rv/images/action_show_info.png";
  9706. }
  9707. _7e7.src=this.getWebContentRoot()+img;
  9708. _7e7.className="reportInfoIcon";
  9709. _7e7.setAttribute("tabIndex","0");
  9710. _7e7.setAttribute("alt","");
  9711. _7e7.setAttribute("title","");
  9712. _7e7.setAttribute("role","presentation");
  9713. var _7e9=RV_RES.IDS_JS_REPORT_INFO_TITLE;
  9714. var _7ea=RV_RES.IDS_JS_REPORT_INFO_TEXT;
  9715. var _7eb=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
  9716. _7e6.appendChild(_7e7);
  9717. _7e4.insertBefore(_7e6,_7e3);
  9718. this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_7e7,position:["above","below"],title:_7e9,text:_7ea,linkText:_7eb,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
  9719. }
  9720. };
  9721. CCognosViewer.prototype.reportInfoResetReport=function(){
  9722. this.executeAction("ResetToOriginal");
  9723. };
  9724. CCognosViewer.prototype.hideReportInfo=function(){
  9725. var _7ec=document.getElementById("ReportInfo"+this.getId()+"_container");
  9726. if(typeof _7ec!=="undefined"&&_7ec!==null){
  9727. _7ec.style.visibility="hidden";
  9728. }
  9729. };
  9730. CCognosViewer.prototype.insertSortIcons=function(){
  9731. var _7ed=this.envParams?this.envParams.limitedInteractiveMode:true;
  9732. if(typeof _7ed==="undefined"||_7ed===true){
  9733. return;
  9734. }
  9735. if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
  9736. this.insertSortIconsForAllLists();
  9737. }
  9738. };
  9739. CCognosViewer.prototype._getContainers=function(_7ee){
  9740. var _7ef=[];
  9741. var _7f0="",_7f1="";
  9742. if(_7ee==="list"){
  9743. _7f0="list";
  9744. _7f1="ls";
  9745. }else{
  9746. if(_7ee==="crosstab"){
  9747. _7f0="crosstab";
  9748. _7f1="xt";
  9749. }
  9750. }
  9751. var _7f2=document.getElementById("CVReport"+this.getId());
  9752. if(this.getRAPReportInfo()){
  9753. var _7f3=this.getRAPReportInfo().getContainerIds(_7f0);
  9754. for(var i=0;i<_7f3.length;++i){
  9755. var _7f5=getElementsByAttribute(_7f2,"table","lid",_7f3[i]+this.getId(),1);
  9756. if(_7f5&&_7f5.length>0){
  9757. _7ef.push(_7f5[0]);
  9758. }
  9759. }
  9760. }else{
  9761. _7ef=getElementsByClassName(_7f2,"table",_7f1);
  9762. }
  9763. return _7ef;
  9764. };
  9765. CCognosViewer.prototype.insertSortIconsForAllLists=function(){
  9766. var _7f6=this._getContainers("list");
  9767. for(var i=0;i<_7f6.length;++i){
  9768. this.insertSortIconsToList(_7f6[i]);
  9769. }
  9770. };
  9771. CCognosViewer.prototype.insertSortIconsToList=function(_7f8){
  9772. var _7f9=getElementsByAttribute(_7f8,"*","type","columnTitle");
  9773. for(var i=0;i<_7f9.length;++i){
  9774. var _7fb=_7f9[i];
  9775. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_7fb);
  9776. if(_7fb.getAttribute("canSort")!="false"&&_7fb.getAttribute("CTNM")===null&&_7fb.getAttribute("CC")===null){
  9777. var _7fc=false;
  9778. for(var _7fd=0;_7fd<_7fb.childNodes.length;_7fd++){
  9779. var _7fe=_7fb.childNodes[_7fd];
  9780. if(_7fe.nodeName.toLowerCase()=="img"){
  9781. if(_7fe.id&&_7fe.id.indexOf("sortimg")===0){
  9782. _7fc=true;
  9783. break;
  9784. }
  9785. var sLid=_7fe.getAttribute("lid");
  9786. if(sLid&&sLid.indexOf("SortIcon")!==-1){
  9787. _7fb.removeChild(_7fe);
  9788. break;
  9789. }
  9790. }
  9791. }
  9792. if(!_7fc&&this.canInsertSortIcon(_7fb)){
  9793. this.insertSortIconToColumnHeader(_7fb);
  9794. }
  9795. }
  9796. }
  9797. };
  9798. CCognosViewer.prototype.isDrillBlackListed=function(){
  9799. if(typeof this.m_bDrillBlacklisted=="undefined"){
  9800. this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp");
  9801. }
  9802. return this.m_bDrillBlacklisted;
  9803. };
  9804. CCognosViewer.prototype.isBlacklisted=function(item){
  9805. return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0;
  9806. };
  9807. CCognosViewer.prototype.canInsertSortIcon=function(_801){
  9808. var _802=_801.getAttribute("rp_sort");
  9809. return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_802!==undefined&&_802!==null&&_802.length>0));
  9810. };
  9811. CCognosViewer.prototype.insertSortIconToColumnHeader=function(_803){
  9812. if(!_803.style.whiteSpace){
  9813. _803.style.whiteSpace="nowrap";
  9814. }
  9815. var _804=document.createElement("img");
  9816. _804.setAttribute("id","sortimg"+Math.random());
  9817. if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
  9818. _804.onmouseover=function(){
  9819. this.setAttribute("oldClassName",this.className);
  9820. this.className+=" sortIconOver";
  9821. };
  9822. _804.onmouseout=function(){
  9823. this.className=this.getAttribute("oldClassName");
  9824. this.removeAttribute("oldClassName");
  9825. };
  9826. }
  9827. _804.src=this.getImgSrc(_803);
  9828. var _805=this.getSortInfo(_803);
  9829. var _806=this.getSortOrder(_805);
  9830. _804.setAttribute("alt",this.getSortAltText(_806));
  9831. _804.setAttribute("title",this.getSortAltText(_806));
  9832. _804.className=this.getSortClass(_805);
  9833. _804.setAttribute("sortOrder",_806);
  9834. _803.appendChild(_804);
  9835. };
  9836. CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_807,_808){
  9837. var _809=this.getSelectionController();
  9838. var _80a=_809.hasCalculationMetadata(_808,[_808],"crosstab");
  9839. return ((_809.canDrillDown(_808)||_807.alwaysCanExpandCollapse)&&!_809.isCalculationOrMeasure(_808,_80a));
  9840. };
  9841. CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
  9842. var _80b=this._getContainers("crosstab");
  9843. var _80c=this;
  9844. var _80d=this.getRAPReportInfo();
  9845. var _80e=this.getReportContextHelper();
  9846. for(var i=0;i<_80b.length;i++){
  9847. var _810=_80b[i];
  9848. var _811=_810.getAttribute("lid");
  9849. _811=_811.substring(0,_811.length-this.getId().length);
  9850. var _812=getElementsByAttribute(_810,["td","th"],"ctnm","true");
  9851. for(var j=0;j<_812.length;j++){
  9852. var _814=_812[j];
  9853. var sCtx=this.findCtx(_814);
  9854. var _816=_80e.getDataItemName(sCtx);
  9855. if(_816){
  9856. var _817=_80d.getItemInfo(_811,_816);
  9857. var _818=_80e.processCtx(sCtx);
  9858. if(this.canInsertShowExpandCollapseIconForNode(_817,_818[0][0])){
  9859. var sMun=_80e.getMun(sCtx);
  9860. var _81a=sMun&&_817.expandedMembers&&_817.expandedMembers[sMun]===true;
  9861. var _81b=document.createElement("div");
  9862. _81b.setAttribute("skipSelection","true");
  9863. _81b.className="expandButton "+(_81a?"collapse":"expand");
  9864. _814.insertBefore(_81b,_814.firstChild);
  9865. var _81c=document.createElement("span");
  9866. _81c.className="expandButtonCaption";
  9867. _81c.innerHTML=(_81a?"[-]":"[+]");
  9868. _81b.appendChild(_81c);
  9869. }
  9870. }
  9871. }
  9872. }
  9873. };
  9874. CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
  9875. var _81d=this._getContainers("crosstab");
  9876. for(var i=0;i<_81d.length;i++){
  9877. var _81f=_81d[i];
  9878. var _820=_81f.getAttribute("lid");
  9879. _820=_820.substring(0,_820.length-this.getId().length);
  9880. var _821=getElementsByAttribute(_81f,"td","ctnm","true");
  9881. for(var j=0;j<_821.length;j++){
  9882. var _823=_821[j];
  9883. if(_823.firstChild.className==="expandButton collapse"||_823.firstChild.className==="expandButton expand"){
  9884. _823.removeChild(_823.firstChild);
  9885. }
  9886. }
  9887. }
  9888. };
  9889. CCognosViewer.prototype.fillInContextData=function(){
  9890. if(!this.isLimitedInteractiveMode()){
  9891. var _824=document.getElementById("CVReport"+this.getId());
  9892. var _825=getElementsByClassName(_824,"table","ls");
  9893. for(var i=0;i<_825.length;++i){
  9894. var _827=getElementsByAttribute(_825[i],"*","type","columnTitle");
  9895. for(var j=0;j<_827.length;++j){
  9896. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_827[j]);
  9897. }
  9898. }
  9899. }
  9900. };
  9901. CCognosViewer.prototype.getSortAltText=function(_829){
  9902. if(_829==="ascending"){
  9903. return RV_RES.IDS_JS_SORT_ASCENDING;
  9904. }else{
  9905. if(_829==="descending"){
  9906. return RV_RES.IDS_JS_SORT_DESCENDING;
  9907. }else{
  9908. if(_829==="nosort"){
  9909. return RV_RES.IDS_JS_NOT_SORTED;
  9910. }
  9911. }
  9912. }
  9913. };
  9914. CCognosViewer.prototype.getSortInfo=function(_82a){
  9915. var _82b=_82a.getAttribute("rp_sort");
  9916. if(_82b){
  9917. _82b=_82b.split(".");
  9918. }
  9919. return _82b;
  9920. };
  9921. CCognosViewer.prototype.getSortClass=function(_82c){
  9922. var _82d="sortIconHidden";
  9923. if(_82c){
  9924. if(_82c[0]==="d"||_82c[0]==="a"){
  9925. _82d="sortIconVisible";
  9926. }
  9927. }
  9928. return _82d;
  9929. };
  9930. CCognosViewer.prototype.getSortOrder=function(_82e){
  9931. var _82f="nosort";
  9932. if(_82e){
  9933. if(_82e[0]==="d"){
  9934. _82f="descending";
  9935. }else{
  9936. if(_82e[0]==="a"){
  9937. _82f="ascending";
  9938. }
  9939. }
  9940. }
  9941. return _82f;
  9942. };
  9943. CCognosViewer.prototype.getImgSrc=function(_830){
  9944. var _831=_830.getAttribute("rp_sort");
  9945. var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_831);
  9946. return src;
  9947. };
  9948. CCognosViewer.prototype.getSortIconName=function(_833){
  9949. var _834="sort_no.gif";
  9950. if(_833){
  9951. _833=_833.split(".");
  9952. if(_833[0]==="d"){
  9953. _834="sort_descending.gif";
  9954. }else{
  9955. if(_833[0]==="a"){
  9956. _834="sort_ascending.gif";
  9957. }
  9958. }
  9959. }
  9960. return _834;
  9961. };
  9962. CCognosViewer.prototype.shouldWriteNavLinks=function(){
  9963. if(this.envParams["cv.navlinks"]=="false"){
  9964. return false;
  9965. }else{
  9966. if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){
  9967. if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){
  9968. return true;
  9969. }
  9970. }
  9971. }
  9972. return false;
  9973. };
  9974. CCognosViewer.prototype.isActiveReport=function(){
  9975. if(this.envParams["cv.responseFormat"]==="activeReport"){
  9976. return true;
  9977. }
  9978. return false;
  9979. };
  9980. CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){
  9981. this.m_raiseSharePromptEvent=true;
  9982. };
  9983. CCognosViewer.prototype.resetbHasPromptFlag=function(){
  9984. this.m_bHasPrompt=null;
  9985. };
  9986. CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){
  9987. this.m_raiseSharePromptEvent=false;
  9988. };
  9989. CCognosViewer.prototype.widgetHasPromptParameters=function(){
  9990. var _835=this.getViewerWidget();
  9991. return (_835&&_835.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
  9992. };
  9993. CCognosViewer.prototype.getPromptParametersInfo=function(){
  9994. var _836=null;
  9995. if(this.widgetHasPromptParameters()){
  9996. _836="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
  9997. }
  9998. return _836;
  9999. };
  10000. CCognosViewer.prototype.raisePromptEvent=function(_837,_838,_839){
  10001. try{
  10002. var _83a=this.getViewerWidget();
  10003. _83a.getWidgetContextManager().raisePromptEvent(_837,_838,_838.get("ui.action"),this.getModelPath(),_839);
  10004. }
  10005. catch(e){
  10006. }
  10007. };
  10008. CCognosViewer.prototype.getModelPath=function(){
  10009. var _83b=this.getSelectionController().getModelPathForCurrentSelection();
  10010. if(_83b){
  10011. return _83b;
  10012. }else{
  10013. if(this.envParams.modelPath){
  10014. return this.envParams.modelPath;
  10015. }else{
  10016. if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){
  10017. return document.forms["formWarpRequest"+this.getId()].modelPath.value;
  10018. }
  10019. }
  10020. }
  10021. return "";
  10022. };
  10023. CCognosViewer.prototype.setKeepFocus=function(_83c){
  10024. this._keepFocus=_83c;
  10025. };
  10026. CCognosViewer.prototype.getKeepFocus=function(){
  10027. if(typeof this._keepFocus!="undefined"){
  10028. return this._keepFocus;
  10029. }
  10030. return false;
  10031. };
  10032. CCognosViewer.prototype.onFocus=function(evt){
  10033. var _83e=this.getA11YHelper();
  10034. if(_83e){
  10035. _83e.onFocus(evt);
  10036. }
  10037. };
  10038. CCognosViewer.prototype.getA11YHelper=function(){
  10039. if(!this.a11yHelper){
  10040. this.loadExtra();
  10041. if(typeof ViewerA11YHelper=="function"){
  10042. this.a11yHelper=new ViewerA11YHelper(this);
  10043. }else{
  10044. if(typeof console!=="undefined"&&console.log){
  10045. console.log("CCognosViewer: Could not create ViewerA11YHelper object.");
  10046. }
  10047. return null;
  10048. }
  10049. }
  10050. return this.a11yHelper;
  10051. };
  10052. CCognosViewer.prototype.onKeyDown=function(evt){
  10053. if(this.getA11YHelper()){
  10054. this.getA11YHelper().onKeyDown(evt);
  10055. }
  10056. };
  10057. CCognosViewer.prototype.updateSkipToReportLink=function(){
  10058. var _840=this.getStatus();
  10059. var _841=document.getElementById("cvSkipToReport"+this.getId());
  10060. if(_841){
  10061. _841.style.display=_840=="prompting"?"none":"";
  10062. }
  10063. };
  10064. CCognosViewer.prototype.updateSkipToNavigationLink=function(_842){
  10065. var _843=document.getElementById("cvSkipToNavigation"+this.getId());
  10066. if(_843){
  10067. _843.style.display=_842?"none":"";
  10068. }
  10069. };
  10070. CCognosViewer.prototype.pageAction=function(_844){
  10071. this.setKeepFocus("CVNavLinks"+this.getId());
  10072. var _845=new ViewerDispatcherEntry(this);
  10073. _845.addFormField("ui.action",_844);
  10074. if(this.getCurrentlySelectedTab()){
  10075. _845.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
  10076. }
  10077. this.dispatchRequest(_845);
  10078. };
  10079. CCognosViewer.prototype.writeNavLink=function(_846,_847,_848,_849){
  10080. var _84a="";
  10081. if(_848){
  10082. _84a="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
  10083. if(_849){
  10084. _84a+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
  10085. }else{
  10086. _84a+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
  10087. }
  10088. _84a+=">LINK_TEXT</a>&#160;"+"</td>";
  10089. }else{
  10090. _84a="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">LINK_TEXT&#160;</td>";
  10091. }
  10092. var sImg=this.sSkin+(!_848&&_846.sImgDisabled?_846.sImgDisabled:_846.sImg);
  10093. return _84a.replace(/LINK_REQUEST/g,_847).replace(/LINK_TEXT/g,_846.sText).replace(/LINK_IMG/g,sImg);
  10094. };
  10095. CCognosViewer.prototype.loadNavLinks=function(){
  10096. var _84c=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
  10097. if(_84c){
  10098. this.init(eval("("+_84c+")"));
  10099. }
  10100. };
  10101. CCognosViewer.prototype.writeNavLinks=function(sSR,_84e){
  10102. var _84f=document.getElementById("CVNavLinks"+this.getId());
  10103. if(_84f){
  10104. var _850=document.getElementById("CVNavLinks_Container"+this.getId());
  10105. if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){
  10106. _84f.style.display="none";
  10107. if(_850){
  10108. _850.style.display="none";
  10109. }
  10110. this.updateSkipToNavigationLink(true);
  10111. return;
  10112. }
  10113. this.updateSkipToNavigationLink(false);
  10114. if(_850){
  10115. _850.style.display="";
  10116. }
  10117. _84f.style.display=(isIE()?"block":"table-cell");
  10118. var _851="";
  10119. _851+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
  10120. _851+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_84e);
  10121. _851+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_84e);
  10122. _851+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_84e);
  10123. _851+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_84e);
  10124. _851+="</tr></tbody></table>";
  10125. var _852=document.getElementById("CVNavLinks_label"+this.getId());
  10126. var _853="";
  10127. if(_852){
  10128. _853+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_852.innerHTML+"</span>";
  10129. }
  10130. _84f.innerHTML=_853+_851;
  10131. }else{
  10132. if(this.shouldWriteNavLinks()){
  10133. setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_84e+"\");",100);
  10134. }
  10135. }
  10136. };
  10137. function CVBackgroundLayer_ignoreMouseClick(e){
  10138. if(e.returnValue){
  10139. e.returnValue=false;
  10140. }else{
  10141. if(e.preventDefault){
  10142. e.preventDefault();
  10143. }else{
  10144. return false;
  10145. }
  10146. }
  10147. };
  10148. CCognosViewer.prototype.createTransparentBackgroundLayer=function(){
  10149. this.removeTransparentBackgroundLayer();
  10150. var oBL=document.createElement("div");
  10151. oBL.id=CV_BACKGROUND_LAYER_ID;
  10152. oBL.style.display="none";
  10153. oBL.style.position="absolute";
  10154. oBL.setAttribute("role","region");
  10155. oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT);
  10156. oBL.style.top="0px";
  10157. oBL.style.left="0px";
  10158. oBL.style.zIndex=98;
  10159. oBL.style.width="100%";
  10160. oBL.style.height="100%";
  10161. oBL.style.backgroundColor="rgb(238, 238, 238)";
  10162. oBL.style.opacity="0";
  10163. oBL.style.filter="alpha(opacity:0)";
  10164. oBL.innerHTML="<table tabindex=\"1\" width=\"100%\" height=\"100%\"><tr><td role=\"presentation\" onclick=\"CVBackgroundLayer_ignoreMouseClick(event)\"></td></tr></table>";
  10165. oBL.style.display="inline";
  10166. document.body.appendChild(oBL);
  10167. };
  10168. CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){
  10169. var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID);
  10170. if(oBL){
  10171. oBL.parentNode.removeChild(oBL);
  10172. }
  10173. };
  10174. CCognosViewer.prototype.closeActiveHTTPConnection=function(){
  10175. var _857=this.getActiveRequest();
  10176. if(_857){
  10177. _857.abortHttpRequest();
  10178. }
  10179. };
  10180. CCognosViewer.prototype.canCancel=function(){
  10181. var _858=this.getTracking();
  10182. var _859=this.getStatus();
  10183. return _858!=""&&_859!="complete";
  10184. };
  10185. CCognosViewer.prototype.cancel=function(_85a){
  10186. if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
  10187. this.getWorkingDialog().disableCancelButton(_85a);
  10188. }
  10189. this.removeTransparentBackgroundLayer();
  10190. this.clearPrompts();
  10191. if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
  10192. this.envParams["fragment.fireEventWhenComplete"]="";
  10193. }
  10194. var _85b=null;
  10195. if(this.m_undoStack.length>0){
  10196. _85b=this.m_undoStack.pop();
  10197. }
  10198. var _85c=this.getActiveRequest();
  10199. if(this.canCancel()===true||_85c){
  10200. if(_85c){
  10201. _85c.cancelRequest(true);
  10202. }else{
  10203. var _85d=null;
  10204. var _85e=_85b!=null&&_85b.m_bRefreshPage;
  10205. if(typeof this.getCancelDispatcherEntry=="function"){
  10206. _85d=this.getCancelDispatcherEntry();
  10207. }else{
  10208. if(_85e||this.m_viewerFragment){
  10209. _85d=new ViewerDispatcherEntry(this);
  10210. }else{
  10211. if(this.getId()=="RS"){
  10212. _85d=new ViewerDispatcherEntry(this);
  10213. _85d.addFormField("cv.responseFormat","rs");
  10214. }else{
  10215. _85d=new DispatcherEntry(this);
  10216. _85d.addFormField("cv.responseFormat","successfulRequest");
  10217. }
  10218. }
  10219. }
  10220. _85d.forceSynchronous();
  10221. _85d.addFormField("ui.action","cancel");
  10222. _85d.addFormField("m_tracking",this.getTracking());
  10223. this.setTracking("");
  10224. if(_85e){
  10225. var _85f="<CognosViewerUndo><conversation>";
  10226. _85f+=_85b.m_sConversation;
  10227. _85f+="</conversation></CognosViewerUndo>";
  10228. _85d.addFormField("cv.previousSession",_85f);
  10229. }
  10230. this.dispatchRequest(_85d);
  10231. if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
  10232. this.executeCallback("cancel");
  10233. }
  10234. }
  10235. this.setStatus("complete");
  10236. var _860=this.envParams["ui.action"];
  10237. var _861=this.getUsePageRequest();
  10238. var _862=this.m_undoStack.length;
  10239. if(_85b!=null){
  10240. this.m_sConversation=_85b.m_sConversation;
  10241. this.m_sParameters=_85b.m_sParameters;
  10242. this.envParams={};
  10243. applyJSONProperties(this.envParams,_85b.m_envParams);
  10244. this.m_undoStack.push(_85b);
  10245. }
  10246. this.setTracking("");
  10247. if(this.previouslySelectedTab){
  10248. this.cancelTabSwitch();
  10249. }else{
  10250. if(_860!="view"&&_862<=0&&this.rvMainWnd){
  10251. this.rvMainWnd.executePreviousReport(-1);
  10252. }
  10253. }
  10254. return true;
  10255. }else{
  10256. if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){
  10257. this.rvMainWnd.executePreviousReport(-1);
  10258. return true;
  10259. }else{
  10260. if(!this.isBux){
  10261. executeBackURL(this.getId());
  10262. }
  10263. return true;
  10264. }
  10265. }
  10266. return false;
  10267. };
  10268. CCognosViewer.prototype.clearPrompts=function(){
  10269. if(this.preProcessControlArray){
  10270. var _863=this.preProcessControlArray.length;
  10271. var k=0;
  10272. for(k=0;k<_863;k++){
  10273. var _865=eval(this.preProcessControlArray[k]);
  10274. if(_865){
  10275. if(_865.clearSubmit){
  10276. _865.clearSubmit();
  10277. }
  10278. }
  10279. }
  10280. }
  10281. };
  10282. CCognosViewer.prototype.wait=function(){
  10283. if(this.isWorking()){
  10284. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  10285. var _866=new ViewerDispatcherEntry(this);
  10286. _866.addFormField("ui.action","wait");
  10287. _866.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  10288. _866.addFormField("cv.actionState",this.envParams["cv.actionState"]);
  10289. _866.addNonEmptyStringFormField("bux",this.envParams["bux"]);
  10290. _866.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
  10291. this.dispatchRequest(_866);
  10292. return true;
  10293. }
  10294. return false;
  10295. };
  10296. CCognosViewer.prototype.setCAFContext=function(_867){
  10297. this.m_sCAFContext=_867;
  10298. };
  10299. CCognosViewer.prototype.setContextInfo=function(sXML){
  10300. this.m_sContextInfoXML=sXML;
  10301. };
  10302. CCognosViewer.prototype.setConversation=function(_869){
  10303. this.m_sConversation=_869;
  10304. };
  10305. CCognosViewer.prototype.setActionState=function(_86a){
  10306. this.m_sActionState=_86a;
  10307. };
  10308. CCognosViewer.prototype.setStatus=function(_86b){
  10309. this.m_sStatus=_86b;
  10310. };
  10311. CCognosViewer.prototype.setDebug=function(_86c){
  10312. this.m_bDebug=_86c;
  10313. };
  10314. CCognosViewer.prototype.setExecutionParameters=function(_86d){
  10315. this.m_sParameters=_86d;
  10316. };
  10317. CCognosViewer.prototype.setMetadataInfo=function(sXML){
  10318. this.m_sMetadataInfoXML=sXML;
  10319. };
  10320. CCognosViewer.prototype.setSecondaryRequests=function(_86f){
  10321. if(_86f){
  10322. this.m_aSecRequests=_86f;
  10323. }else{
  10324. this.m_aSecRequests=[];
  10325. }
  10326. };
  10327. CCognosViewer.prototype.setTracking=function(_870){
  10328. this.m_sTracking=_870;
  10329. };
  10330. CCognosViewer.prototype.setSoapFault=function(_871){
  10331. this.m_sSoapFault=_871;
  10332. };
  10333. CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
  10334. var _873=document.getElementById("formWarpRequest"+this.getId());
  10335. var _874=_873.elements["ui.postBack"];
  10336. var _875=_873.elements["ui.backURL"];
  10337. if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
  10338. window.detachLeavingRV();
  10339. }
  10340. if(window.opener||_874||(_875&&_875.value!=="javascript:window.close();")){
  10341. window.open(sURL,"","");
  10342. this.updateNewBrowserWindow();
  10343. }else{
  10344. window.location=sURL;
  10345. }
  10346. };
  10347. CCognosViewer.prototype.hideToolbar=function(_876){
  10348. this.m_bHideToolbar=_876;
  10349. };
  10350. CCognosViewer.prototype.showExcel=function(sURL){
  10351. var _878=true;
  10352. var _879=document.getElementById("formWarpRequest"+this.getId());
  10353. var _87a=_879.elements["ui.backURL"];
  10354. if(_87a&&_87a.value.indexOf("javascript:window.close()")!==0&&_87a.value.indexOf("close.html")===-1){
  10355. _878=false;
  10356. }
  10357. if(window.detachLeavingRV){
  10358. window.detachLeavingRV();
  10359. }
  10360. var _87b=window;
  10361. if(window.opener&&(isIE()||isFF())&&_878){
  10362. _87b=window.opener?window.opener:window;
  10363. }else{
  10364. if(!window.opener&&_878){
  10365. window.location=sURL;
  10366. return;
  10367. }
  10368. }
  10369. var _87c=null;
  10370. var _87d="";
  10371. try{
  10372. if(this.envParams["cv.excelWindowOpenProperties"]){
  10373. _87d=this.envParams["cv.excelWindowOpenProperties"];
  10374. }
  10375. _87c=_87b.open(sURL,"",_87d);
  10376. }
  10377. catch(e){
  10378. _87b=window;
  10379. _87c=_87b.open(sURL,"",_87d);
  10380. }
  10381. if(!_87c||_87c.closed||typeof _87c.closed=="undefined"){
  10382. alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
  10383. }
  10384. this.updateNewBrowserWindow();
  10385. };
  10386. CCognosViewer.prototype.updateNewBrowserWindow=function(){
  10387. var id=this.getId();
  10388. var _87f=document.forms["formWarpRequest"+id].elements["ui.postBack"];
  10389. var _880=document.forms["formWarpRequest"+id].elements["ui.backURL"];
  10390. if(_87f&&_87f.value){
  10391. setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
  10392. }else{
  10393. if(_880&&_880.value){
  10394. if(_880.value.length<2048){
  10395. setTimeout("location.replace(\""+_880.value+"\");",100);
  10396. }else{
  10397. _880=decodeURIComponent(_880.value);
  10398. var _881=_880.split("?");
  10399. var _882=document.createElement("form");
  10400. _882.style.display="none";
  10401. _882.setAttribute("target","_self");
  10402. _882.setAttribute("method","post");
  10403. _882.setAttribute("action",_881[0]);
  10404. var _883=_881[1].split("&");
  10405. for(var _884=0;_884<_883.length;_884++){
  10406. var _885=_883[_884].indexOf("=");
  10407. var _886=_883[_884].substr(0,_885);
  10408. var _887=_883[_884].substr(_885+1);
  10409. var _888=document.createElement("img");
  10410. _888.setAttribute("type","hidden");
  10411. _888.setAttribute("name",decodeURIComponent(_886));
  10412. _888.setAttribute("value",decodeURIComponent(_887));
  10413. _882.appendChild(_888);
  10414. }
  10415. document.body.appendChild(_882);
  10416. _882.submit();
  10417. }
  10418. }else{
  10419. window.close();
  10420. }
  10421. }
  10422. };
  10423. CCognosViewer.prototype.showWaitPage=function(){
  10424. };
  10425. CCognosViewer.prototype.sendRequest=function(_889){
  10426. var _88a=new ViewerDispatcherEntry(this);
  10427. _88a.addFormField("ui.action",_889.getAction());
  10428. if(_889.getCallback()!=null){
  10429. _88a.setCallbacks({"complete":{"object":null,"method":_889.getCallback()}});
  10430. }
  10431. var _88b=_889.getFormFields().keys();
  10432. for(var _88c=0;_88c<_88b.length;_88c++){
  10433. _88a.addFormField(_88b[_88c],_889.getFormFields().get(_88b[_88c]));
  10434. }
  10435. var _88d=_889.m_oOptions.keys();
  10436. for(var _88e=0;_88e<_88d.length;_88e++){
  10437. _88a.addFormField(_88d[_88e],_889.getOption(_88d[_88e]));
  10438. }
  10439. var _88f=_889.m_oParams.keys();
  10440. for(var _890=0;_890<_88f.length;_890++){
  10441. _88a.addFormField(_88f[_890],_889.getParameter(_88f[_890]));
  10442. }
  10443. this.dispatchRequest(_88a);
  10444. };
  10445. CCognosViewer.prototype.promptAction=function(_891,sUrl){
  10446. this.setKeepFocus(true);
  10447. if(typeof datePickerObserverNotify=="function"){
  10448. datePickerObserverNotify();
  10449. }
  10450. var _893=this.getViewerWidget();
  10451. if(_891=="cancel"){
  10452. this.cancelPrompt(sUrl);
  10453. if(_893){
  10454. if(!this.isReportRenderingDone()){
  10455. var _894={action:"deleteWidget"};
  10456. _893.fireEvent("com.ibm.bux.widget.action",null,_894);
  10457. }
  10458. }
  10459. }else{
  10460. var oReq=new ViewerDispatcherEntry(this);
  10461. oReq.addFormField("ui.action",_891=="back"?"back":"forward");
  10462. if(_891=="finish"){
  10463. oReq.addFormField("run.prompt",false);
  10464. }else{
  10465. if(_891=="back"||_891=="next"){
  10466. oReq.addFormField("run.prompt",true);
  10467. }
  10468. }
  10469. if(_891=="reprompt"){
  10470. if(typeof repromptObserverNotify=="function"){
  10471. repromptObserverNotify(this);
  10472. }
  10473. oReq.addFormField("_promptControl",_891);
  10474. }else{
  10475. oReq.addFormField("_promptControl","prompt");
  10476. }
  10477. if(_893){
  10478. _893.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
  10479. if(_893.isSelectionFilterEnabled){
  10480. _893.clearSelectionFilter();
  10481. }
  10482. }
  10483. this.submitPromptValues(oReq);
  10484. }
  10485. };
  10486. CCognosViewer.prototype.cancelPrompt=function(sUrl){
  10487. this.cancel();
  10488. };
  10489. CCognosViewer.prototype.notify=function(_897,_898){
  10490. var _899=0,k=0;
  10491. var _89b=null;
  10492. if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
  10493. _899=this.rangeObserverArray.length;
  10494. for(k=0;k<_899;k++){
  10495. _89b=eval(this.rangeObserverArray[k]);
  10496. if(_89b&&typeof _89b=="object"&&typeof _89b.update=="function"){
  10497. _89b.update();
  10498. }
  10499. }
  10500. }
  10501. var _89c=true;
  10502. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  10503. _899=this.preProcessControlArray.length;
  10504. for(k=0;k<_899;k++){
  10505. _89b=eval(this.preProcessControlArray[k]);
  10506. if((typeof _89b.getValid=="function")&&!_89b.getValid()){
  10507. _89c=false;
  10508. break;
  10509. }
  10510. }
  10511. }
  10512. this.notifyPageNavEnabled(_89c);
  10513. if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
  10514. _899=this.multipleObserverArray.length;
  10515. for(k=0;k<_899;k++){
  10516. _89b=eval(this.multipleObserverArray[k]);
  10517. if(_89b&&typeof _89b=="object"&&typeof _89b.checkInsertRemove=="function"){
  10518. _89b.checkInsertRemove();
  10519. }
  10520. }
  10521. }
  10522. for(var _89d=0;_89d<gaNotifyTargets.length;_89d++){
  10523. var _89e=gaNotifyTargets[_89d];
  10524. if(typeof _89e!="undefined"&&typeof _89e.notify=="function"){
  10525. _89e.notify(_897,_898);
  10526. }
  10527. }
  10528. };
  10529. CCognosViewer.prototype.notifyPageNavEnabled=function(_89f){
  10530. if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
  10531. var _8a0=this.pageNavigationObserverArray.length;
  10532. var _8a1=false;
  10533. var _8a2=null;
  10534. var _8a3=null;
  10535. var k=0;
  10536. for(k=0;k<_8a0;k++){
  10537. try{
  10538. _8a2=eval(this.pageNavigationObserverArray[k]);
  10539. _8a3=_8a2.getType();
  10540. if(_8a3==PROMPTBUTTON_FINISH){
  10541. _8a1=true;
  10542. break;
  10543. }
  10544. }
  10545. catch(e){
  10546. }
  10547. }
  10548. for(k=0;k<_8a0;k++){
  10549. try{
  10550. _8a2=eval(this.pageNavigationObserverArray[k]);
  10551. _8a3=_8a2.getType();
  10552. if(!_89f){
  10553. if((_8a3==PROMPTBUTTON_NEXT)||(_8a3==PROMPTBUTTON_OK)||(_8a3==PROMPTBUTTON_FINISH)){
  10554. _8a2.setEnabled(false);
  10555. }
  10556. }else{
  10557. if(_8a3==PROMPTBUTTON_FINISH){
  10558. _8a2.setEnabled(this.bCanFinish);
  10559. }else{
  10560. if(_8a3==PROMPTBUTTON_NEXT){
  10561. _8a2.setEnabled(this.bNextPage||!_8a1);
  10562. }else{
  10563. if(_8a3==PROMPTBUTTON_OK){
  10564. _8a2.setEnabled(true);
  10565. }
  10566. }
  10567. }
  10568. }
  10569. }
  10570. catch(e2){
  10571. }
  10572. }
  10573. }
  10574. };
  10575. CCognosViewer.prototype.getDrillResetHUNs=function(_8a5){
  10576. var _8a6=null;
  10577. if(this.getRAPReportInfo()){
  10578. _8a6=this.getRAPReportInfo().getDrilledOnHUNs();
  10579. }
  10580. if(!_8a6){
  10581. return null;
  10582. }
  10583. var _8a7=this.getExecutionParameters();
  10584. if(!_8a7){
  10585. return null;
  10586. }
  10587. var _8a8=this._getListOfChangedPromptParameters(_8a5);
  10588. if(!_8a8||_8a8.length===0){
  10589. return null;
  10590. }
  10591. var _8a9=[];
  10592. for(var i=0;i<_8a6.length;i++){
  10593. for(var j=0;j<_8a8.length;j++){
  10594. if(_8a8[j].indexOf(_8a6[i])!==-1){
  10595. _8a9.push(_8a6[i]);
  10596. }
  10597. }
  10598. }
  10599. return _8a9;
  10600. };
  10601. CCognosViewer.prototype.getOldParameters=function(){
  10602. var _8ac=new CParameterValues();
  10603. var _8ad=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  10604. if(_8ad.childNodes.length==1){
  10605. _8ac.loadWithOptions(_8ad.childNodes[0],false);
  10606. }
  10607. if(!_8ac||!_8ac.m_parameterValues||!_8ac.m_parameterValues.m_aValues){
  10608. return null;
  10609. }
  10610. return _8ac.m_parameterValues.m_aValues;
  10611. };
  10612. CCognosViewer.prototype._createDummyRequest=function(){
  10613. var _8ae=new ViewerDispatcherEntry(this);
  10614. return this.preparePromptValues(_8ae);
  10615. };
  10616. CCognosViewer.prototype._getChangedPromptParametersValues=function(_8af,_8b0,_8b1){
  10617. var _8b2=XMLBuilderLoadXMLFromString(_8b0);
  10618. if(!_8b2){
  10619. for(var j=0;j<_8af.length;j++){
  10620. var _8b4=_8af[j].m_useValue;
  10621. if(_8b0.indexOf(sXmlEncode(_8b4))<0){
  10622. _8b1.push(_8b4);
  10623. }
  10624. }
  10625. return;
  10626. }
  10627. var _8b5=_8b2.getElementsByTagName("selectOption");
  10628. if(!_8b5){
  10629. return;
  10630. }
  10631. var _8b6=_8af.length;
  10632. var _8b7=_8b5.length;
  10633. for(var i=0;i<_8b7;i++){
  10634. var _8b0=_8b5[i].attributes.getNamedItem("useValue").nodeValue;
  10635. bMatchOldParam=false;
  10636. for(var j=0;j<_8b6;j++){
  10637. var _8b4=_8af[j].m_useValue;
  10638. if(_8b0.indexOf(_8b4)===0){
  10639. bMatchOldParam=true;
  10640. break;
  10641. }
  10642. }
  10643. if(!bMatchOldParam){
  10644. _8b1.push(_8b0);
  10645. }
  10646. }
  10647. };
  10648. CCognosViewer.prototype._getListOfChangedPromptParameters=function(_8b9){
  10649. var _8ba=this.getOldParameters();
  10650. if(!_8ba){
  10651. return null;
  10652. }
  10653. var _8bb=[];
  10654. if(!_8b9){
  10655. var _8bc=this._createDummyRequest();
  10656. for(var _8bd in _8ba){
  10657. var _8be=_8ba[_8bd].m_parmValueItems;
  10658. var _8bf=_8bc.getRequest().getFormFields().get("p_"+_8bd);
  10659. if(!_8bf){
  10660. continue;
  10661. }
  10662. this._getChangedPromptParametersValues(_8be,_8bf,_8bb);
  10663. }
  10664. }else{
  10665. if(!_8b9.parameters){
  10666. return null;
  10667. }
  10668. var _8c0=_8b9.parameters;
  10669. for(var i=0;i<_8c0.length;i++){
  10670. var _8c2=_8c0[i].parmName;
  10671. if(!_8c2||!_8ba[_8c2]){
  10672. continue;
  10673. }
  10674. var _8be=_8ba[_8c2].m_parmValueItems;
  10675. if(!_8be||_8be.length==0){
  10676. continue;
  10677. }
  10678. this._getChangedPromptParametersValues(_8be,_8c0[i].parmValue,_8bb);
  10679. }
  10680. }
  10681. return _8bb;
  10682. };
  10683. CCognosViewer.prototype.submitPromptValues=function(oReq){
  10684. if(this.gbPromptRequestSubmitted===true){
  10685. return false;
  10686. }
  10687. this.gbPromptRequestSubmitted=true;
  10688. if(this.isBux){
  10689. var _8c4=this.getDrillResetHUNs(null);
  10690. if(_8c4&&_8c4.length!==0){
  10691. var _8c5={"drilledResetHUNs":_8c4};
  10692. this.executeAction("DrillReset",_8c5);
  10693. return;
  10694. }
  10695. }
  10696. oReq=this.preparePromptValues(oReq);
  10697. if(window.portletSharePrompt){
  10698. var _8c6=this.portletPromptParams(oReq);
  10699. if(_8c6.length>0){
  10700. portletSharePrompt(_8c6);
  10701. }
  10702. }
  10703. this.dispatchRequest(oReq);
  10704. };
  10705. CCognosViewer.prototype.portletPromptParams=function(oReq){
  10706. var _8c8=[];
  10707. var _8c9=null;
  10708. var _8ca=true;
  10709. var _8cb=oReq.getFormFields().keys();
  10710. for(var _8cc=0;_8cc<_8cb.length;_8cc++){
  10711. _8c9=_8cb[_8cc];
  10712. if(_8c9=="_promptControl"&&oReq.getFormField(_8c9)=="search"){
  10713. _8ca=false;
  10714. break;
  10715. }else{
  10716. if(_8c9.indexOf("p_")===0){
  10717. if(_8c9.indexOf("p_credential")===0){
  10718. _8ca=false;
  10719. break;
  10720. }else{
  10721. _8c8.push([_8c9,oReq.getFormField(_8c9)]);
  10722. }
  10723. }
  10724. }
  10725. }
  10726. if(_8c8&&!_8ca){
  10727. _8c8=[];
  10728. }
  10729. return _8c8;
  10730. };
  10731. CCognosViewer.prototype.preparePromptValues=function(oReq){
  10732. var _8ce=[];
  10733. if(this.preProcessControlArray){
  10734. var _8cf=this.preProcessControlArray.length;
  10735. var k=0;
  10736. for(k=0;k<_8cf;k++){
  10737. var _8d1=eval(this.preProcessControlArray[k]);
  10738. var _8d2=(typeof _8d1.isEnabled=="function"?_8d1.isEnabled():true);
  10739. if(_8d1&&typeof _8d1.preProcess=="function"&&_8d2){
  10740. _8d1.preProcess();
  10741. if(_8d1.m_oSubmit){
  10742. if(oReq.addParameter){
  10743. oReq.addParameter(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value);
  10744. }else{
  10745. oReq.addFormField(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value);
  10746. }
  10747. _8ce.push(_8d1.m_oSubmit);
  10748. if(_8d1.m_sPromptId&&_8d1.m_oForm&&_8d1.m_oForm.elements&&typeof _8d1.m_oForm.elements["p_"+_8d1.m_sRef]=="object"){
  10749. if(oReq.addParameter){
  10750. oReq.addParameter("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value);
  10751. }else{
  10752. oReq.addFormField("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value);
  10753. }
  10754. }
  10755. }
  10756. }
  10757. }
  10758. }
  10759. var _8d3=document.getElementById("formWarpRequest"+this.getId());
  10760. if(_8d3){
  10761. var _8d4=_8d3.elements;
  10762. for(var _8d5=0;_8d5<_8d4.length;_8d5++){
  10763. var _8d6=_8d4[_8d5];
  10764. if(!_8d6.name||!_8d6.name.match(/^p_/)){
  10765. continue;
  10766. }
  10767. var _8d7=true;
  10768. for(var _8d8=0;_8d8<_8ce.length;_8d8++){
  10769. if(_8ce[_8d8]==_8d6){
  10770. _8d7=false;
  10771. break;
  10772. }
  10773. }
  10774. if(_8d7){
  10775. oReq.addFormField(_8d6.name,_8d6.value);
  10776. _8ce.push(_8d6);
  10777. }
  10778. }
  10779. }
  10780. var oRM=this["CognosReport"];
  10781. if(oRM){
  10782. var _8da=oRM.prompt.getParameters();
  10783. for(var i=0;i<_8da.length;i++){
  10784. var _8dc="p_"+_8da[i].getName();
  10785. if(!oReq.getFormField(_8dc)){
  10786. oReq.addFormField(_8dc,_8da[i].getXML());
  10787. }
  10788. }
  10789. }
  10790. return oReq;
  10791. };
  10792. CCognosViewer.prototype.setViewerWidget=function(_8dd){
  10793. this.m_viewerWidget=_8dd;
  10794. };
  10795. CCognosViewer.prototype.getViewerWidget=function(){
  10796. return this.m_viewerWidget;
  10797. };
  10798. CCognosViewer.prototype.getFlashChartOption=function(){
  10799. var _8de=this.getViewerWidget();
  10800. var _8df=null;
  10801. if(_8de){
  10802. var _8e0=_8de.getProperties();
  10803. if(_8e0){
  10804. _8df=_8e0.getFlashCharts();
  10805. }
  10806. }
  10807. return _8df;
  10808. };
  10809. CCognosViewer.prototype.fireWidgetEvent=function(evt,_8e2){
  10810. var _8e3=this.getViewerWidget();
  10811. if(_8e3!=null){
  10812. _8e3.fireEvent(evt,null,_8e2);
  10813. }
  10814. };
  10815. CCognosViewer.prototype.isMobile=function(){
  10816. return false;
  10817. };
  10818. CCognosViewer.prototype.setVisibleDialog=function(_8e4){
  10819. this.m_visibleDialog=_8e4;
  10820. };
  10821. CCognosViewer.prototype.getVisibleDialog=function(){
  10822. if(typeof this.m_visibleDialog!="undefined"){
  10823. return this.m_visibleDialog;
  10824. }
  10825. return null;
  10826. };
  10827. CCognosViewer.prototype.getContentLocale=function(){
  10828. var _8e5=document.getElementById("formWarpRequest"+this.getId());
  10829. if(_8e5&&_8e5["ui.contentLocale"]&&_8e5["reRunObj"]&&_8e5["reRunObj"].value.length>0){
  10830. return _8e5["ui.contentLocale"].value;
  10831. }
  10832. return null;
  10833. };
  10834. CCognosViewer.prototype.updateLayout=function(_8e6){
  10835. var cvid=this.getId();
  10836. var _8e8=document.getElementById("CVHeader"+cvid);
  10837. var _8e9=document.getElementById("CVToolbar"+cvid);
  10838. if(!_8e8&&!_8e9){
  10839. setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_8e6+"\");",100);
  10840. return;
  10841. }
  10842. if(_8e8){
  10843. var _8ea=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
  10844. if((_8e6=="prompting"&&!this.bShowHeaderWithPrompts)||_8ea){
  10845. _8e8.parentNode.style.display="none";
  10846. }else{
  10847. _8e8.parentNode.style.display="";
  10848. }
  10849. }
  10850. if(_8e9){
  10851. if(_8e6=="prompting"||this.m_bHideToolbar==true){
  10852. _8e9.parentNode.style.display="none";
  10853. }else{
  10854. _8e9.parentNode.style.display="";
  10855. }
  10856. }
  10857. };
  10858. CCognosViewer.prototype.updateResponseSpecification=function(_8eb){
  10859. this.sResponseSpecification=_8eb;
  10860. };
  10861. CCognosViewer.prototype.getResponseSpecification=function(){
  10862. return this.sResponseSpecification;
  10863. };
  10864. CCognosViewer.prototype.release=function(_8ec){
  10865. if(this.getStatus()!="fault"){
  10866. this._release(_8ec);
  10867. }
  10868. };
  10869. CCognosViewer.prototype._release=function(_8ed){
  10870. var form=document.getElementById("formWarpRequest"+this.getId());
  10871. var _8ef=this.getTracking();
  10872. if(!_8ef&&form&&form["m_tracking"]&&form["m_tracking"].value){
  10873. _8ef=form["m_tracking"].value;
  10874. form["m_tracking"].value="";
  10875. }
  10876. this.setTracking("");
  10877. if(_8ef){
  10878. var _8f0=new DispatcherEntry(this);
  10879. if(this.isWorkingOrPrompting()){
  10880. _8f0.addFormField("ui.action","cancel");
  10881. }else{
  10882. _8f0.addFormField("ui.action","release");
  10883. }
  10884. _8f0.addFormField("cv.responseFormat","successfulRequest");
  10885. _8f0.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  10886. _8f0.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
  10887. _8f0.addFormField("m_tracking",_8ef);
  10888. if(_8ed!=true){
  10889. _8f0.forceSynchronous();
  10890. }
  10891. var _8f1=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
  10892. if(_8f1&&_8f1.getFormField("cv.outputKey")){
  10893. _8f0.addFormField("b_action","cvx.high");
  10894. _8f0.addFormField("cv.outputKey",_8f1.getFormField("cv.outputKey"));
  10895. _8f0.addFormField("cv.waitForResponse","false");
  10896. _8f0.setHeaders(_8f1.getHeaders());
  10897. }
  10898. var _8f2=_8f0.getRequest().getFormFields();
  10899. var _8f3=_8f2.keys();
  10900. var data=new URLSearchParams();
  10901. for(var _8f5=0;_8f5<_8f3.length;_8f5++){
  10902. data.append(_8f3[_8f5],_8f2.get(_8f3[_8f5]));
  10903. }
  10904. if(!navigator.sendBeacon(this.getGateway(),data)){
  10905. if(typeof console!=="undefined"&&console.log){
  10906. console.log("CCognosViewer: release sendBeacon failed.");
  10907. }
  10908. }
  10909. return true;
  10910. }
  10911. return false;
  10912. };
  10913. CCognosViewer.prototype.cleanupStyles=function(){
  10914. if(this.getViewerWidget()){
  10915. this.getViewerWidget().cleanupStyles();
  10916. }
  10917. };
  10918. CCognosViewer.prototype.destroy=function(_8f6){
  10919. this.release(_8f6);
  10920. if(!this.m_destroyed){
  10921. if(typeof window.gaRV_INSTANCES!="undefined"){
  10922. for(var _8f7=0;_8f7<window.gaRV_INSTANCES.length;_8f7++){
  10923. if(window.gaRV_INSTANCES[_8f7].m_sId==this.getId()){
  10924. window.gaRV_INSTANCES.splice(_8f7,1);
  10925. this.m_destroyed=true;
  10926. break;
  10927. }
  10928. }
  10929. }
  10930. if(this.m_layoutElements){
  10931. for(var i=0;i<this.m_layoutElements.length;i++){
  10932. var e=this.m_layoutElements[i];
  10933. var j=e.getAttribute("lid");
  10934. this.m_layoutElements.splice(i,1);
  10935. delete this.m_lidToElement[j];
  10936. var _8fb=e.parentNode;
  10937. if(_8fb){
  10938. _8fb.removeChild(e);
  10939. }
  10940. }
  10941. delete this.m_layoutElements;
  10942. delete this.m_lidToElement;
  10943. }
  10944. if(this.m_oDrillMgr){
  10945. this.m_oDrillMgr.setCV(null);
  10946. }
  10947. var _8fc=this.getSelectionController();
  10948. if(_8fc){
  10949. GUtil.destroyProperties(_8fc);
  10950. }
  10951. var cvId=this.getId();
  10952. this.m_viewerDispatcher=null;
  10953. GUtil.destroyProperties(this,true);
  10954. cleanupGlobalObjects(cvId);
  10955. }
  10956. };
  10957. CCognosViewer.prototype.exit=function(){
  10958. this.release();
  10959. };
  10960. CCognosViewer.prototype.executeAction=function(_8fe,_8ff){
  10961. var _900=this.getAction(_8fe);
  10962. _900.setRequestParms(_8ff);
  10963. return _900.execute();
  10964. };
  10965. CCognosViewer.prototype.getCalculation=function(_901){
  10966. var calc=null;
  10967. var _903=this.getCalculationCache();
  10968. if(_903[_901]){
  10969. calc=_903[_901];
  10970. }else{
  10971. if(window[_901]&&typeof window[_901]=="function"){
  10972. calc=new window[_901]();
  10973. calc.setCognosViewer(this);
  10974. }
  10975. _903[_901]=calc;
  10976. }
  10977. return calc;
  10978. };
  10979. CCognosViewer.prototype.findBlueDotMenu=function(_904){
  10980. var root=null;
  10981. var _906=(_904)?_904:this.getToolbar();
  10982. for(var idx=0;idx<_906.length;++idx){
  10983. if(typeof _906[idx]._root!="undefined"){
  10984. root=_906[idx]._root;
  10985. break;
  10986. }
  10987. }
  10988. return root;
  10989. };
  10990. CCognosViewer.prototype.findToolbarItem=function(_908,_909){
  10991. var spec=typeof _909=="undefined"||_909==null?this.getToolbar():_909;
  10992. var _90b=null;
  10993. for(var _90c=0;_90c<spec.length;++_90c){
  10994. var name=spec[_90c]["name"];
  10995. if(typeof name!="undefined"&&name==_908){
  10996. _90b=spec[_90c];
  10997. break;
  10998. }
  10999. }
  11000. return _90b;
  11001. };
  11002. CCognosViewer.prototype.findToolbarItemIndex=function(_90e,_90f){
  11003. var spec=typeof _90f=="undefined"||_90f==null?this.getToolbar():_90f;
  11004. var _911=null;
  11005. for(var _912=0;_912<spec.length;++_912){
  11006. var name=spec[_912]["name"];
  11007. if(typeof name!="undefined"&&name==_90e){
  11008. _911=_912;
  11009. break;
  11010. }
  11011. }
  11012. return _911;
  11013. };
  11014. CCognosViewer.prototype.addedButtonToToolbar=function(_914,_915,_916,_917){
  11015. if(typeof _915!="undefined"&&_915!=null){
  11016. if(this.findToolbarItem(_915.name,_914)==null){
  11017. _916=this.findToolbarItemIndex(_916,_914);
  11018. if(typeof _916!="undefined"&&_916!=null){
  11019. _914.splice(++_916,0,_915);
  11020. return true;
  11021. }else{
  11022. if(typeof _917!="undefined"&&_917!=null){
  11023. _914.splice(_917,0,_915);
  11024. return true;
  11025. }
  11026. }
  11027. }
  11028. }
  11029. return false;
  11030. };
  11031. CCognosViewer.prototype.addDrillTargets=function(_918){
  11032. this.m_drillTargets=_918;
  11033. };
  11034. CCognosViewer.prototype.getDrillTargets=function(){
  11035. if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
  11036. var _919=document.getElementById("CVIFrame"+this.getId());
  11037. if(typeof _919!="undefined"&&_919!=null){
  11038. if(_919.contentWindow.drillTargets){
  11039. return _919.contentWindow.drillTargets;
  11040. }
  11041. }
  11042. }
  11043. return this.m_drillTargets;
  11044. };
  11045. CCognosViewer.prototype.getDrillTarget=function(idx){
  11046. if(idx>=this.m_drillTargets.length){
  11047. return null;
  11048. }
  11049. return this.m_drillTargets[idx];
  11050. };
  11051. CCognosViewer.prototype.getNumberOfDrillTargets=function(){
  11052. return this.m_drillTargets.length;
  11053. };
  11054. CCognosViewer.prototype.isReportRenderingDone=function(){
  11055. return this.m_reportRenderingDone;
  11056. };
  11057. CCognosViewer.prototype.setReportRenderingDone=function(flag){
  11058. this.m_reportRenderingDone=flag;
  11059. };
  11060. CCognosViewer.prototype.hasAVSChart=function(){
  11061. var _91c=this.getRAPReportInfo();
  11062. if(_91c){
  11063. var _91d=_91c.getDisplayTypes();
  11064. return _91d.match("_v2")!=null||_91d.match("v2_")!=null;
  11065. }
  11066. return false;
  11067. };
  11068. CCognosViewer.prototype.getPinFreezeManager=function(){
  11069. return this.m_pinFreezeManager;
  11070. };
  11071. CCognosViewer.prototype.getReportContextHelper=function(){
  11072. if(!this.m_reportContextHelper){
  11073. this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager());
  11074. }
  11075. return this.m_reportContextHelper;
  11076. };
  11077. CCognosViewer.prototype.getRAPReportInfo=function(){
  11078. return this.m_RAPReportInfo;
  11079. };
  11080. CCognosViewer.prototype.setRAPReportInfo=function(_91e){
  11081. this.m_RAPReportInfo=_91e;
  11082. };
  11083. CCognosViewer.prototype.isNodeVisible=function(node){
  11084. if(this.m_pinFreezeManager){
  11085. return this.m_pinFreezeManager.isNodeVisible(node);
  11086. }
  11087. return true;
  11088. };
  11089. CCognosViewer.prototype.getWarpRequestForm=function(){
  11090. return document.getElementById("formWarpRequest"+this.getId());
  11091. };
  11092. CCognosViewer.prototype.getBrowser=function(){
  11093. return this.sBrowser;
  11094. };
  11095. CCognosViewer.prototype.repaintDiv=function(oDiv){
  11096. var _921=oDiv.style.display;
  11097. oDiv.style.display="none";
  11098. oDiv.style.display=_921;
  11099. };
  11100. CCognosViewer.prototype.isMetadataEmpty=function(){
  11101. var oSC=this.getSelectionController();
  11102. if(oSC){
  11103. var _923=oSC.getCCDManager();
  11104. if(_923){
  11105. return _923.isMetadataEmpty();
  11106. }
  11107. }
  11108. return true;
  11109. };
  11110. CCognosViewer.prototype.setContextMenu=function(_924){
  11111. this.m_contextMenu=_924;
  11112. };
  11113. CCognosViewer.prototype.getContextMenu=function(){
  11114. return this.m_contextMenu;
  11115. };
  11116. CCognosViewer.prototype.setToolbar=function(_925){
  11117. this.m_toolbar=_925;
  11118. };
  11119. CCognosViewer.prototype.getToolbar=function(){
  11120. return this.m_toolbar;
  11121. };
  11122. CCognosViewer.prototype.getAdvancedServerProperty=function(_926){
  11123. if(this.m_advancedProperties&&this.m_advancedProperties[_926]!==undefined&&this.m_advancedProperties[_926]!==null){
  11124. return this.m_advancedProperties[_926];
  11125. }else{
  11126. return null;
  11127. }
  11128. };
  11129. CCognosViewer.prototype.hasPrompt=function(){
  11130. if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
  11131. var _927=false;
  11132. if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
  11133. _927=true;
  11134. }else{
  11135. var _928=new CParameterValues();
  11136. var _929=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  11137. if(_929.childNodes.length==1){
  11138. _928.loadWithOptions(_929.childNodes[0],true);
  11139. var _92a=_928.length();
  11140. for(var _92b=0;_92b<_92a;++_92b){
  11141. var _92c=_928.getAt(_92b);
  11142. if(_92c!==null&&_92c.length()>0&&_92c.name().indexOf("credential:")!=-1){
  11143. _927=true;
  11144. break;
  11145. }
  11146. }
  11147. }
  11148. }
  11149. this.m_bHasPrompt=_927;
  11150. }
  11151. return this.m_bHasPrompt;
  11152. };
  11153. CCognosViewer.prototype.getDrillState=function(){
  11154. return this.m_sStateData?this.m_sStateData:"";
  11155. };
  11156. CCognosViewer.prototype.isSelectionFilterEnabled=function(){
  11157. if(typeof this.m_bSelectionFilterSwitch=="undefined"){
  11158. this.m_bSelectionFilterSwitch=false;
  11159. }
  11160. return this.m_bSelectionFilterSwitch;
  11161. };
  11162. CCognosViewer.prototype.broadcastContextChange=function(evt,_92e){
  11163. if(this.getViewerWidget()){
  11164. this.getViewerWidget().broadcastContextChange(_92e);
  11165. }
  11166. stopEventBubble(evt);
  11167. };
  11168. CCognosViewer.prototype.broadcastParameterChange=function(evt,_930){
  11169. if(this.getViewerWidget()){
  11170. this.getViewerWidget().broadcastParameterChange(_930);
  11171. }
  11172. stopEventBubble(evt);
  11173. };
  11174. CCognosViewer.prototype.getReportDiv=function(){
  11175. if(!this.m_nReportDiv){
  11176. this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId);
  11177. }
  11178. return this.m_nReportDiv;
  11179. };
  11180. function CDocumentWriter(sId,_932){
  11181. this.m_sId=sId;
  11182. this.m_sText="";
  11183. this.m_sScript=_932;
  11184. };
  11185. CDocumentWriter.prototype.isValid=function(){
  11186. if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){
  11187. return true;
  11188. }
  11189. return false;
  11190. };
  11191. CDocumentWriter.prototype.execute=function(){
  11192. if(this.isValid()&&window.gScriptLoader){
  11193. var _933=/document\.write(ln)?\s*\(/gi;
  11194. var _934=this.m_sScript.replace(_933,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
  11195. try{
  11196. eval(_934);
  11197. var _935=document.getElementById(this.m_sId);
  11198. if(_935){
  11199. _935.innerHTML=this.m_sText;
  11200. return true;
  11201. }
  11202. }
  11203. catch(e){
  11204. }
  11205. }
  11206. return false;
  11207. };
  11208. CDocumentWriter.prototype.write=function(_936){
  11209. var _937="";
  11210. if(typeof _936=="function"){
  11211. _937=eval(_936);
  11212. }else{
  11213. if(typeof _936=="string"){
  11214. _937=_936;
  11215. }
  11216. }
  11217. this.m_sText+=_937;
  11218. };
  11219. function setFocusToFirstTabItem(_938){
  11220. if(!window.dojo){
  11221. return;
  11222. }
  11223. var _939=dojo.query("*",_938);
  11224. var _93a=_939.length;
  11225. for(var i=0;i<_93a;i++){
  11226. var node=_939[i];
  11227. if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){
  11228. if(node.getAttribute("tabIndex")==0){
  11229. try{
  11230. node.focus();
  11231. }
  11232. catch(e){
  11233. }
  11234. break;
  11235. }
  11236. }
  11237. }
  11238. };
  11239. function ReportContextHelper(_93d){
  11240. this.m_oCDManager=_93d;
  11241. };
  11242. ReportContextHelper.prototype.destroy=function(){
  11243. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  11244. this.m_oCDManager.destroy();
  11245. }
  11246. delete this.m_oCDManager;
  11247. };
  11248. ReportContextHelper.prototype.processCtx=function(sCtx){
  11249. var _93f=sCtx.split("::");
  11250. var _940=[];
  11251. for(var i=0;i<_93f.length;++i){
  11252. _940[i]=_93f[i].split(":");
  11253. }
  11254. if(_940&&_940.length&&_940[0].length){
  11255. return _940;
  11256. }else{
  11257. return null;
  11258. }
  11259. };
  11260. ReportContextHelper.prototype.getDataItemName=function(sCtx){
  11261. var _943=this.processCtx(sCtx);
  11262. if(_943){
  11263. return this.getRefDataItem(_943[0][0]);
  11264. }
  11265. return null;
  11266. };
  11267. ReportContextHelper.prototype.getRefDataItem=function(_944){
  11268. var _945=this.m_oCDManager.GetRDIValue(_944);
  11269. return (_945==null)?"":_945;
  11270. };
  11271. ReportContextHelper.prototype.getMun=function(_946){
  11272. var aCtx=null;
  11273. if(typeof _946==="string"){
  11274. aCtx=this.processCtx(_946);
  11275. }else{
  11276. if(typeof _946==="number"){
  11277. aCtx=this.processCtx(_946.toString());
  11278. }else{
  11279. aCtx=_946;
  11280. }
  11281. }
  11282. if(aCtx){
  11283. var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]);
  11284. return (sMun==null)?"":sMun;
  11285. }
  11286. return "";
  11287. };
  11288. function CCDManager(cv){
  11289. this.m_cd=null;
  11290. this.m_md=null;
  11291. this.m_oCV=null;
  11292. this.m_dataItemInfo=null;
  11293. };
  11294. CCDManager.prototype.SetContextData=function(CD){
  11295. if(this.m_cd){
  11296. this.m_cd=null;
  11297. }
  11298. this.m_cd=CD;
  11299. };
  11300. CCDManager.prototype.SetMetadata=function(MD){
  11301. if(this.m_md){
  11302. this.m_md=null;
  11303. }
  11304. this.m_md=MD;
  11305. };
  11306. CCDManager.prototype.AddContextData=function(CD){
  11307. if(!this.m_cd){
  11308. this.m_cd=CD;
  11309. }else{
  11310. for(var i in CD){
  11311. this.m_cd[i]=CD[i];
  11312. }
  11313. }
  11314. };
  11315. CCDManager.prototype.AddMetadata=function(MD){
  11316. if(!this.m_md){
  11317. this.m_md=MD;
  11318. }else{
  11319. for(var j in MD){
  11320. this.m_md[j]=MD[j];
  11321. }
  11322. }
  11323. };
  11324. CCDManager.prototype.getClonedMetadataArray=function(){
  11325. var _950={};
  11326. applyJSONProperties(_950,this.m_md);
  11327. return _950;
  11328. };
  11329. CCDManager.prototype.getClonedContextdataArray=function(){
  11330. var _951={};
  11331. applyJSONProperties(_951,this.m_cd);
  11332. return _951;
  11333. };
  11334. CCDManager.prototype.SetCognosViewer=function(_952){
  11335. if(_952){
  11336. this.m_oCV=_952;
  11337. }
  11338. };
  11339. CCDManager.prototype.onComplete_GetCDRequest=function(_953,_954){
  11340. if(_953){
  11341. var _955=_953.getResult();
  11342. var _956=XMLBuilderLoadXMLFromString(_955);
  11343. if(_956){
  11344. var _957=_956.getElementsByTagName("Block");
  11345. for(var i=0;i<_957.length;i++){
  11346. var _959="";
  11347. var _95a=_957[i].firstChild;
  11348. while(_95a){
  11349. _959+=_95a.nodeValue;
  11350. _95a=_95a.nextSibling;
  11351. }
  11352. var cd=eval("("+_959+")");
  11353. this.AddContextData(cd);
  11354. }
  11355. }
  11356. }
  11357. if(_954&&typeof _954=="function"){
  11358. _954();
  11359. }
  11360. };
  11361. CCDManager.prototype.FetchContextData=function(_95c,_95d){
  11362. var _95e=[];
  11363. var c=null,_960=_95c.length;
  11364. for(var i=0;i<_960;++i){
  11365. c=_95c[i];
  11366. if(c!=""&&!this.ContextIdExists(c)){
  11367. _95e.push(c);
  11368. }
  11369. }
  11370. if(_95e.length){
  11371. if(this.m_oCV){
  11372. this.getContextData(_95e,_95d);
  11373. }
  11374. }
  11375. return _95e.length;
  11376. };
  11377. CCDManager.prototype.getContextData=function(_962,_963){
  11378. var oCV=this.m_oCV;
  11379. var _965=new AsynchDataDispatcherEntry(oCV);
  11380. _965.setCanBeQueued(false);
  11381. if(!oCV.isBux){
  11382. _965.forceSynchronous();
  11383. }
  11384. var form=document["formWarpRequest"+oCV.getId()];
  11385. var _967=oCV.getConversation();
  11386. var _968=oCV.getTracking();
  11387. if(!_968&&form&&form["m_tracking"]&&form["m_tracking"].value){
  11388. _968=form["m_tracking"].value;
  11389. }
  11390. if(oCV.m_viewerFragment){
  11391. var _969=oCV.getActiveRequest();
  11392. if(_969&&_969.getFormField("m_tracking")==_968){
  11393. return;
  11394. }
  11395. }
  11396. var _96a={customArguments:[_963],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
  11397. if(oCV.getStatus()=="prompting"){
  11398. _96a["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
  11399. }
  11400. _965.setCallbacks(_96a);
  11401. if(_967&&oCV.envParams["ui.action"]!="view"){
  11402. _965.addFormField("ui.action","getContext");
  11403. _965.addFormField("ui.conversation",_967);
  11404. }else{
  11405. var _96b=form["ui.object"];
  11406. if(typeof _96b.length!="undefined"&&_96b.length>1){
  11407. _965.addFormField("ui.object",form["ui.object"][0].value);
  11408. }else{
  11409. _965.addFormField("ui.object",form["ui.object"].value);
  11410. }
  11411. _965.addFormField("ui.action","getObjectContext");
  11412. }
  11413. _965.addFormField("cv.responseFormat","asynchDetailContext");
  11414. _965.addFormField("context.format","initializer");
  11415. _965.addFormField("context.type","reportService");
  11416. _965.addFormField("context.selection",_962.join(","));
  11417. _965.addNonEmptyStringFormField("m_tracking",_968);
  11418. oCV.dispatchRequest(_965);
  11419. };
  11420. CCDManager.prototype.ContextIdExists=function(_96c){
  11421. return (this.m_cd&&this.m_cd[_96c]?true:false);
  11422. };
  11423. CCDManager.prototype.HasContextData=function(){
  11424. return (this.m_cd?true:false);
  11425. };
  11426. CCDManager.prototype.HasMetadata=function(){
  11427. return (this.m_md?true:false);
  11428. };
  11429. CCDManager.prototype._getMDPropertyFromCD=function(_96d,_96e,_96f){
  11430. var p=null;
  11431. this.FetchContextData([_96d]);
  11432. var cd=this.m_cd&&this.m_cd[_96d];
  11433. if(cd){
  11434. var md=this.m_md[cd[_96e]];
  11435. if(md){
  11436. p=md[_96f];
  11437. }
  11438. }
  11439. return p;
  11440. };
  11441. CCDManager.prototype.GetDrillFlag=function(_973){
  11442. return this._getMDPropertyFromCD(_973,"r","drill");
  11443. };
  11444. CCDManager.prototype.getModelPathFromBookletItem=function(_974){
  11445. var mp=null;
  11446. var md=this.m_md[_974];
  11447. if(md){
  11448. mp=md.mp;
  11449. if(mp&&this.m_md[mp]){
  11450. mp=this.m_md[mp].mp;
  11451. }
  11452. }
  11453. return mp?mp:null;
  11454. };
  11455. CCDManager.prototype.GetBookletModelBasedDrillThru=function(_977){
  11456. var p=null;
  11457. var md=this.m_md[_977];
  11458. if(md){
  11459. p=md.modelBasedDrillThru;
  11460. }
  11461. return p?p:0;
  11462. };
  11463. CCDManager.prototype.GetDrillFlagForMember=function(_97a){
  11464. var _97b=null;
  11465. var d=this._getMDPropertyFromCD(_97a,"r","drill");
  11466. if(d!==null&&this.m_cd[_97a].m){
  11467. _97b=d;
  11468. }
  11469. return _97b;
  11470. };
  11471. CCDManager.prototype.GetDataType=function(_97d){
  11472. return this._getMDPropertyFromCD(_97d,"r","dtype");
  11473. };
  11474. CCDManager.prototype.GetUsage=function(_97e){
  11475. return this._getMDPropertyFromCD(_97e,"r","usage");
  11476. };
  11477. CCDManager.prototype.GetHUN=function(_97f){
  11478. var hun=this._getMDPropertyFromCD(_97f,"h","h");
  11479. if(!hun){
  11480. var h=this._getMDPropertyFromCD(_97f,"r","h");
  11481. if(h){
  11482. hun=this.m_md[h].h;
  11483. }
  11484. }
  11485. if(hun!=null&&hun.indexOf("[__ns_")==0){
  11486. hun=null;
  11487. }
  11488. return hun;
  11489. };
  11490. CCDManager.prototype.GetQuery=function(_982){
  11491. var qry=null;
  11492. var q=this._getMDPropertyFromCD(_982,"r","q");
  11493. if(q){
  11494. qry=this.m_md[q].q;
  11495. }
  11496. return qry;
  11497. };
  11498. CCDManager.prototype.GetDepth=function(_985){
  11499. return this._getMDPropertyFromCD(_985,"r","level");
  11500. };
  11501. CCDManager.prototype.GetDisplayValue=function(_986){
  11502. var _987=null;
  11503. this.FetchContextData([_986]);
  11504. if(this.ContextIdExists(_986)&&this.m_cd[_986]){
  11505. _987=this.m_cd[_986].u;
  11506. }
  11507. return _987;
  11508. };
  11509. CCDManager.prototype.GetPUN=function(_988){
  11510. return this._getMDPropertyFromCD(_988,"p","p");
  11511. };
  11512. CCDManager.prototype.GetLUN=function(_989){
  11513. return this._getMDPropertyFromCD(_989,"l","l");
  11514. };
  11515. CCDManager.prototype.GetMUN=function(_98a){
  11516. return this._getMDPropertyFromCD(_98a,"m","m");
  11517. };
  11518. CCDManager.prototype.GetDUN=function(_98b){
  11519. return this._getMDPropertyFromCD(_98b,"d","d");
  11520. };
  11521. CCDManager.prototype.GetQMID=function(_98c){
  11522. return this._getMDPropertyFromCD(_98c,"i","i");
  11523. };
  11524. CCDManager.prototype.GetRDIValue=function(_98d){
  11525. return this._getMDPropertyFromCD(_98d,"r","r");
  11526. };
  11527. CCDManager.prototype.GetBIValue=function(_98e){
  11528. return this._getMDPropertyFromCD(_98e,"r","bi");
  11529. };
  11530. CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_991){
  11531. var _992=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
  11532. for(var _993=0;_993<_992.length;++_993){
  11533. var _994=_992[_993].expression;
  11534. var _995=_992[_993].type;
  11535. if(_994==""){
  11536. continue;
  11537. }
  11538. for(var _996 in this.m_md){
  11539. if(this.m_md[_996][_995]==_994){
  11540. for(var _997 in this.m_md){
  11541. if(this.m_md[_997].r&&this.m_md[_997][_995]==_996){
  11542. if(this.m_md[_997].drill!=0||_991==true){
  11543. for(var ctx in this.m_cd){
  11544. if(this.m_cd[ctx].r==_997&&this.m_cd[ctx].m){
  11545. return ctx;
  11546. }
  11547. }
  11548. }
  11549. }
  11550. }
  11551. }
  11552. }
  11553. }
  11554. return "";
  11555. };
  11556. CCDManager.prototype.GetContextIdForMUN=function(mun){
  11557. var _99a=null;
  11558. var _99b=null;
  11559. for(var i in this.m_md){
  11560. if(this.m_md[i].m==mun){
  11561. _99a=i;
  11562. break;
  11563. }
  11564. }
  11565. if(_99a!=null){
  11566. for(var j in this.m_cd){
  11567. if(this.m_cd[j].m==_99a){
  11568. _99b=j;
  11569. break;
  11570. }
  11571. }
  11572. }
  11573. return _99b;
  11574. };
  11575. CCDManager.prototype.GetContextIdsForRDI=function(rdi){
  11576. var _99f=[];
  11577. for(var i in this.m_md){
  11578. if(this.m_md[i].r==rdi){
  11579. _99f.push(i);
  11580. }
  11581. }
  11582. return _99f;
  11583. };
  11584. CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_9a2){
  11585. var _9a3=this.GetContextIdsForRDI(rdi);
  11586. for(var i in this.m_cd){
  11587. for(var j in _9a3){
  11588. if(this.m_cd[i].r==_9a3[j]&&this.m_cd[i].u==_9a2){
  11589. var _9a6=this.m_cd[i].m;
  11590. if(_9a6){
  11591. return this.m_md[_9a6].m;
  11592. }
  11593. }
  11594. }
  11595. }
  11596. return null;
  11597. };
  11598. CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
  11599. var _9a8=null;
  11600. var _9a9=null;
  11601. var _9aa=this.GetContextIdsForRDI(rdi);
  11602. this.FetchContextData([0]);
  11603. for(var i in this.m_cd){
  11604. for(var j in _9aa){
  11605. if(this.m_cd[i].r==_9aa[j]){
  11606. var _9ad=parseFloat(this.m_cd[i].u);
  11607. if(_9ad==this.m_cd[i].u){
  11608. if(_9a8==null||_9ad<_9a8){
  11609. _9a8=_9ad;
  11610. }
  11611. if(_9a9==null||_9ad>_9a9){
  11612. _9a9=_9ad;
  11613. }
  11614. }
  11615. }
  11616. }
  11617. }
  11618. if(_9a8!=null&&_9a9!=null){
  11619. return eval("({ pageMin: "+_9a8+", pageMax: "+_9a9+"})");
  11620. }
  11621. };
  11622. CCDManager.prototype.GetContextIdForDisplayValue=function(_9ae){
  11623. var _9af=null;
  11624. for(var i in this.m_cd){
  11625. if(this.m_cd[i].u==_9ae){
  11626. _9af=i;
  11627. break;
  11628. }
  11629. }
  11630. return _9af;
  11631. };
  11632. CCDManager.prototype.GetContextIdForUseValue=function(_9b1){
  11633. var _9b2=null;
  11634. var _9b3=null;
  11635. var _9b4=null;
  11636. for(var i in this.m_md){
  11637. var md=this.m_md[i];
  11638. for(var j in md){
  11639. if(md[j]==_9b1){
  11640. _9b2=i;
  11641. _9b3=j;
  11642. break;
  11643. }
  11644. }
  11645. }
  11646. if(_9b2!=null){
  11647. for(var k in this.m_cd){
  11648. if(this.m_cd[k][_9b3]==_9b2){
  11649. _9b4=k;
  11650. break;
  11651. }
  11652. }
  11653. }
  11654. return _9b4;
  11655. };
  11656. CCDManager.prototype.getDataItemInfo=function(){
  11657. if(this.m_cd){
  11658. var _9b9={};
  11659. this.m_dataItemInfo={};
  11660. for(var i in this.m_cd){
  11661. var _9bb=this.m_cd[i].r;
  11662. if(typeof _9bb!="undefined"){
  11663. var _9bc=this.m_md[_9bb].r;
  11664. if(this.m_dataItemInfo[_9bc]==null){
  11665. this.m_dataItemInfo[_9bc]=1;
  11666. }else{
  11667. this.m_dataItemInfo[_9bc]++;
  11668. }
  11669. }
  11670. }
  11671. return CViewerCommon.toJSON(this.m_dataItemInfo);
  11672. }
  11673. return "";
  11674. };
  11675. CCDManager.prototype.DataItemInfoToJSON=function(){
  11676. return this.getDataItemInfo();
  11677. };
  11678. CCDManager.prototype.MetadataToJSON=function(){
  11679. if(this.m_md){
  11680. return CViewerCommon.toJSON(this.m_md);
  11681. }
  11682. return "";
  11683. };
  11684. CCDManager.prototype.ContextDataToJSON=function(){
  11685. if(this.m_cd){
  11686. return CViewerCommon.toJSON(this.m_cd);
  11687. }
  11688. return "";
  11689. };
  11690. CCDManager.prototype.ContextDataSubsetToJSON=function(_9bd){
  11691. if(_9bd<=0){
  11692. return this.ContextDataToJSON();
  11693. }
  11694. if(this.m_cd){
  11695. var _9be={};
  11696. var _9bf={};
  11697. for(var i in this.m_cd){
  11698. var _9c1=this.m_cd[i].r;
  11699. if(typeof _9c1!="undefined"){
  11700. if(_9be[_9c1]==null){
  11701. _9be[_9c1]=0;
  11702. }else{
  11703. _9be[_9c1]++;
  11704. }
  11705. if(_9be[_9c1]<_9bd){
  11706. _9bf[i]=this.m_cd[i];
  11707. }
  11708. }
  11709. }
  11710. return CViewerCommon.toJSON(_9bf);
  11711. }
  11712. return "";
  11713. };
  11714. CCDManager.prototype.GetHUNForRDI=function(rdi,_9c3){
  11715. for(var i in this.m_md){
  11716. if(this.m_md[i].r==rdi&&this.m_md[i].q==_9c3){
  11717. var _9c5=this.m_md[i].h;
  11718. if(_9c5){
  11719. return this.m_md[_9c5].h;
  11720. }
  11721. }
  11722. }
  11723. return null;
  11724. };
  11725. CCDManager.prototype.GetMetadataIdForQueryName=function(_9c6){
  11726. for(var i in this.m_md){
  11727. if(this.m_md[i].q===_9c6){
  11728. return i;
  11729. }
  11730. }
  11731. return null;
  11732. };
  11733. CCDManager.prototype._isEmptyObject=function(obj){
  11734. for(var _9c9 in obj){
  11735. return false;
  11736. }
  11737. return true;
  11738. };
  11739. CCDManager.prototype.isMetadataEmpty=function(){
  11740. if(this.m_md){
  11741. return this._isEmptyObject(this.m_md);
  11742. }
  11743. return true;
  11744. };
  11745. CCDManager.prototype.GetBestPossibleItemName=function(_9ca){
  11746. var item=this.m_cd[_9ca];
  11747. if(!item){
  11748. return null;
  11749. }
  11750. if(item.l&&this.m_md[item.l].l){
  11751. return this._getStringInLastBracket(this.m_md[item.l].l);
  11752. }
  11753. if(item.r&&this.m_md[item.r].r){
  11754. return this._getStringInLastBracket(this.m_md[item.r].r);
  11755. }
  11756. if(item.h&&this.m_md[item.h].h){
  11757. return this._getStringInLastBracket(this.m_md[item.h].h);
  11758. }
  11759. if(item.i&&this.m_md[item.i].i){
  11760. return this._getStringInLastBracket(this.m_md[item.i].i);
  11761. }
  11762. return null;
  11763. };
  11764. CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_9cc){
  11765. var item=this.m_cd[_9cc];
  11766. if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){
  11767. return this._getStringInLastBracket(this.m_md[item.m].m);
  11768. }
  11769. return null;
  11770. };
  11771. CCDManager.prototype._getStringInLastBracket=function(str){
  11772. if(str&&str.indexOf("].[")>0){
  11773. var _9cf=str.split("].[");
  11774. var _9d0=_9cf[_9cf.length-1];
  11775. return _9d0.substring(0,_9d0.length-1);
  11776. }
  11777. return str;
  11778. };
  11779. CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_9d1){
  11780. var _9d2=this._getNamespaceAndDimensionFromUniqueName(_9d1);
  11781. if(_9d2&&this.m_md){
  11782. for(var _9d3 in this.m_md){
  11783. var sMun=this.m_md[_9d3].m;
  11784. if(sMun&&sMun.length>0){
  11785. if(sMun.indexOf("->:[TM].")>0){
  11786. var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
  11787. if(oObj.dimension&&oObj.dimension===_9d2.dimension&&oObj.namespace!==_9d2.namespace){
  11788. var _9d6=_9d1.indexOf(".");
  11789. return oObj.namespace+_9d1.substr(_9d6,_9d1.length);
  11790. }
  11791. }else{
  11792. var _9d7=sMun.indexOf("->:[");
  11793. if(_9d7>0){
  11794. if(sMun.substr(_9d7+4,4)!=="TM]."){
  11795. return _9d1;
  11796. }
  11797. }
  11798. }
  11799. }
  11800. }
  11801. }
  11802. return _9d1;
  11803. };
  11804. CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_9d8){
  11805. if(_9d8&&_9d8.length>0&&_9d8.indexOf("].[")>0){
  11806. var _9d9=_9d8.split("].[");
  11807. if(_9d9.length>1){
  11808. return {"namespace":_9d9[0]+"]","dimension":"["+_9d9[1]+"]"};
  11809. }
  11810. }
  11811. return null;
  11812. };
  11813. CCDManager.prototype.destroy=function(){
  11814. delete this.m_cd;
  11815. delete this.m_md;
  11816. delete this.m_oCV;
  11817. delete this.m_dataItemInfo;
  11818. };
  11819. function CSelectionXml(_9da,_9db,_9dc){
  11820. this.queries={};
  11821. this.burstContext=_9da||"";
  11822. this.expressionLocale=_9db||"";
  11823. this.contentLocale=_9dc||"";
  11824. };
  11825. function SC_SingleSelection(){
  11826. this.rows=[];
  11827. this.cols=[];
  11828. this.sections=[];
  11829. this.measures=[];
  11830. this.layoutElementId="";
  11831. };
  11832. function SC_SingleQuery(){
  11833. this.selections=[];
  11834. this.slicers=[];
  11835. this.filters=[];
  11836. };
  11837. function SC_SingleSlicer(){
  11838. };
  11839. function SC_SingleDetailFilter(){
  11840. };
  11841. function SC_SingleSummaryFilter(){
  11842. };
  11843. CSelectionXml.prototype.BuildSelectionFromController=function(sc){
  11844. if(sc){
  11845. var _9de=sc.getAllSelectedObjects();
  11846. for(var s=0;s<_9de.length;++s){
  11847. var _9e0=_9de[s];
  11848. var _9e1=_9e0.getSelectedContextIds();
  11849. var muns=_9e0.getMuns();
  11850. var _9e3=muns.length;
  11851. var _9e4=new SC_SingleSelection();
  11852. _9e4.layoutElementId=_9e0.getLayoutElementId();
  11853. var _9e5=null;
  11854. for(var i=0;i<_9e3;++i){
  11855. var j,_9e8,_9e9;
  11856. if(i===0&&_9e3===1){
  11857. for(j=0;j<muns[i].length;++j){
  11858. _9e8=_9e1[i][j];
  11859. if(_9e8!=0){
  11860. if(j===0){
  11861. _9e5=sc.getRefQuery(_9e8);
  11862. _9e9=_9e0.getDisplayValues()[j];
  11863. this._buildMeasureSelection(sc,_9e8,_9e4.measures,_9e9,j,_9e0.getLayoutType());
  11864. }else{
  11865. if(sc.getUsageInfo(_9e8)!=2){
  11866. this._buildEdgeSelection(sc,_9e8,_9e4.cols,j);
  11867. }
  11868. }
  11869. }
  11870. }
  11871. }else{
  11872. for(j=0;j<muns[i].length;++j){
  11873. _9e8=_9e1[i][j];
  11874. if(_9e8!=0){
  11875. if(i===0){
  11876. _9e9=_9e0.getDisplayValues()[j];
  11877. _9e5=sc.getRefQuery(_9e8);
  11878. this._buildMeasureSelection(sc,_9e8,_9e4.measures,_9e9,j,_9e0.getLayoutType());
  11879. }else{
  11880. if(i===1){
  11881. this._buildEdgeSelection(sc,_9e8,_9e4.rows,j);
  11882. }else{
  11883. if(i===2){
  11884. this._buildEdgeSelection(sc,_9e8,_9e4.cols,j);
  11885. }else{
  11886. this._buildSectionSelection(sc,_9e8,_9e4.sections,j);
  11887. }
  11888. }
  11889. }
  11890. }
  11891. }
  11892. }
  11893. }
  11894. this.AddSelection(_9e5,_9e4);
  11895. }
  11896. }
  11897. };
  11898. CSelectionXml.prototype.AddSelection=function(_9ea,_9eb){
  11899. if(!this.queries[_9ea]){
  11900. this.queries[_9ea]=new SC_SingleQuery();
  11901. }
  11902. this.queries[_9ea].selections.push(_9eb);
  11903. };
  11904. CSelectionXml.prototype._buildMeasureSelection=function(sc,_9ed,_9ee,_9ef,idx,_9f1){
  11905. if(_9f1==""||_9f1==null){
  11906. _9f1="datavalue";
  11907. }
  11908. if(_9ed){
  11909. _9ee.push({name:sc.getRefDataItem(_9ed),values:[{use:sc.getUseValue(_9ed),display:_9ef}],order:idx,hun:sc.getHun(_9ed),dataType:_9f1,usage:sc.getUsageInfo(_9ed),dtype:sc.getDataType(_9ed),selection:"true"});
  11910. }
  11911. };
  11912. CSelectionXml.prototype._buildEdgeSelection=function(sc,_9f3,_9f4,idx){
  11913. if(_9f3){
  11914. _9f4.push({name:sc.getRefDataItem(_9f3),values:[{use:this.getUseValue(sc,_9f3),display:sc.getDisplayValue(_9f3)}],order:idx,lun:sc.getLun(_9f3),hun:sc.getHun(_9f3),dataType:"columnTitle",usage:sc.getUsageInfo(_9f3),dtype:sc.getDataType(_9f3)});
  11915. }
  11916. };
  11917. CSelectionXml.prototype._buildSectionSelection=function(sc,_9f7,_9f8,idx){
  11918. if(_9f7){
  11919. _9f8.push({name:sc.getRefDataItem(_9f7),values:[{use:this.getUseValue(sc,_9f7),display:sc.getDisplayValue(_9f7)}],order:idx,lun:sc.getLun(_9f7),hun:sc.getHun(_9f7),dataType:"section",usage:sc.getUsageInfo(_9f7),dtype:sc.getDataType(_9f7),queryRef:sc.getRefQuery(_9f7)});
  11920. }
  11921. };
  11922. CSelectionXml.prototype.getUseValue=function(sc,_9fb){
  11923. var _9fc=sc.getMun(_9fb);
  11924. if(_9fc==""){
  11925. _9fc=sc.getUseValue(_9fb);
  11926. }
  11927. return _9fc;
  11928. };
  11929. CSelectionXml.prototype.toXml=function(){
  11930. var _9fd=XMLBuilderCreateXMLDocument("selections");
  11931. var _9fe=_9fd.documentElement;
  11932. XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  11933. XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  11934. XMLBuilderSetAttributeNodeNS(_9fe,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  11935. XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  11936. XMLBuilderSetAttributeNodeNS(_9fe,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  11937. _9fe.setAttribute("contentLocale",this.contentLocale);
  11938. _9fe.setAttribute("expressionLocale",this.expressionLocale);
  11939. for(var q in this.queries){
  11940. this._queryToXml(_9fe,q,this.queries[q]);
  11941. }
  11942. this._burstToXml(_9fe);
  11943. return XMLBuilderSerializeNode(_9fd);
  11944. };
  11945. CSelectionXml.prototype._queryToXml=function(_a00,name,obj){
  11946. var _a03=_a00.ownerDocument.createElement("query");
  11947. _a03.setAttribute("name",name);
  11948. for(var _a04=0;_a04<obj.selections.length;++_a04){
  11949. this._selectionToXml(_a03,obj.selections[_a04]);
  11950. }
  11951. for(var _a05=0;_a05<obj.slicers.length;++_a05){
  11952. this._slicersToXml(_a03,obj.slicers[_a05]);
  11953. }
  11954. for(var _a06=0;_a06<obj.selections.length;++_a06){
  11955. this._filtersToXml(_a03,obj.selections[_a06]);
  11956. }
  11957. _a00.appendChild(_a03);
  11958. };
  11959. CSelectionXml.prototype._selectionToXml=function(_a07,_a08){
  11960. var doc=_a07.ownerDocument;
  11961. var _a0a=doc.createElement("selection");
  11962. _a07.appendChild(_a0a);
  11963. this._edgeToXml(_a0a,"row",_a08.rows);
  11964. this._edgeToXml(_a0a,"column",_a08.cols);
  11965. this._edgeToXml(_a0a,"measure",_a08.measures);
  11966. this._edgeToXml(_a0a,"section",_a08.sections);
  11967. var _a0b=doc.createElement("layoutElementId");
  11968. _a0b.appendChild(doc.createTextNode(_a08.layoutElementId));
  11969. _a0a.appendChild(_a0b);
  11970. };
  11971. CSelectionXml.prototype._edgeToXml=function(_a0c,_a0d,_a0e){
  11972. var doc=_a0c.ownerDocument;
  11973. var _a10=doc.createElement(_a0d+"s");
  11974. _a0c.appendChild(_a10);
  11975. for(var i=0;i<_a0e.length;++i){
  11976. var _a12=doc.createElement(_a0d);
  11977. _a10.appendChild(_a12);
  11978. var edge=_a0e[i];
  11979. for(var j in edge){
  11980. if(j!=="name"&&j!=="values"){
  11981. _a12.setAttribute(j,edge[j]!==null?edge[j]:"");
  11982. }
  11983. }
  11984. this._itemToXml(_a12,edge.name,edge.values);
  11985. }
  11986. };
  11987. CSelectionXml.prototype._itemToXml=function(_a15,name,_a17){
  11988. var doc=_a15.ownerDocument;
  11989. var _a19=doc.createElement("item");
  11990. XMLBuilderSetAttributeNodeNS(_a19,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  11991. var _a1a=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",doc);
  11992. XMLBuilderSetAttributeNodeNS(_a1a,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  11993. _a1a.appendChild(doc.createTextNode(name));
  11994. _a19.appendChild(_a1a);
  11995. var _a1b=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",doc);
  11996. XMLBuilderSetAttributeNodeNS(_a1b,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  11997. XMLBuilderSetAttributeNodeNS(_a1b,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  11998. _a19.appendChild(_a1b);
  11999. for(var j=0;j<_a17.length;j++){
  12000. var _a1d=doc.createElement("item");
  12001. XMLBuilderSetAttributeNodeNS(_a1d,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  12002. var _a1e=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",doc);
  12003. XMLBuilderSetAttributeNodeNS(_a1e,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  12004. if(_a17[j].use){
  12005. _a1e.appendChild(doc.createTextNode(_a17[j].use));
  12006. }else{
  12007. if(_a17[j].display){
  12008. _a1e.appendChild(doc.createTextNode(_a17[j].display));
  12009. }else{
  12010. _a1e.appendChild(doc.createTextNode(""));
  12011. }
  12012. }
  12013. var _a1f=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",doc);
  12014. XMLBuilderSetAttributeNodeNS(_a1f,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  12015. if(_a17[j].display){
  12016. _a1f.appendChild(doc.createTextNode(_a17[j].display));
  12017. }else{
  12018. _a1f.appendChild(doc.createTextNode(""));
  12019. }
  12020. _a1d.appendChild(_a1e);
  12021. _a1d.appendChild(_a1f);
  12022. _a1b.appendChild(_a1d);
  12023. }
  12024. _a15.appendChild(_a19);
  12025. };
  12026. CSelectionXml.prototype._burstToXml=function(_a20){
  12027. var doc=_a20.ownerDocument;
  12028. var _a22=doc.createElement("burst-context");
  12029. _a22.appendChild(doc.createTextNode(this.burstContext));
  12030. _a20.appendChild(_a22);
  12031. };
  12032. CSelectionXml.prototype._slicersToXml=function(_a23,_a24){
  12033. };
  12034. CSelectionXml.prototype._filtersToXml=function(_a25,_a26){
  12035. };
  12036. var GUtil={};
  12037. GUtil.createHiddenForm=function(name,_a28,_a29,_a2a){
  12038. var form=document.getElementById(name);
  12039. if(form){
  12040. document.body.removeChild(form);
  12041. }
  12042. form=document.createElement("form");
  12043. form.id=name;
  12044. form.name=name;
  12045. form.method=_a28;
  12046. form.style.display="none";
  12047. form.action=document.forms["formWarpRequest"+_a29].action;
  12048. form.target=_a2a+(new Date()).getTime();
  12049. document.body.appendChild(form);
  12050. return form;
  12051. };
  12052. GUtil.createFormField=function(el,name,_a2e){
  12053. var _a2f=document.createElement("input");
  12054. _a2f.type="hidden";
  12055. _a2f.name=name;
  12056. _a2f.value=_a2e;
  12057. el.appendChild(_a2f);
  12058. };
  12059. GUtil.generateCallback=function(func,_a31,_a32){
  12060. if(func){
  12061. var _a33=_a32||this;
  12062. _a31=(_a31 instanceof Array)?_a31:[];
  12063. return (function(_a34){
  12064. if(typeof _a34!="undefined"&&_a31.length==0){
  12065. _a31.push(_a34);
  12066. }
  12067. return func.apply(_a33,_a31);
  12068. });
  12069. }else{
  12070. return (function(){
  12071. });
  12072. }
  12073. };
  12074. GUtil.destroyProperties=function(_a35,_a36){
  12075. var _a37;
  12076. if(_a35 instanceof Array){
  12077. for(var i=0;i<_a35.length;i++){
  12078. _a37=_a35[i];
  12079. if(_a37 instanceof String){
  12080. _a37=null;
  12081. }else{
  12082. if(_a37&&_a37.destroy&&!_a37._beingDestroyed){
  12083. _a37.destroy();
  12084. }
  12085. GUtil.destroyProperties(_a37);
  12086. }
  12087. }
  12088. }else{
  12089. if(_a35 instanceof Object){
  12090. if(_a35._beingDestroyed){
  12091. return;
  12092. }
  12093. var obj=_a35;
  12094. obj._beingDestroyed=true;
  12095. for(var _a3a in obj){
  12096. _a37=obj[_a3a];
  12097. if(_a3a==="_beingDestroyed"||_a3a==="m_destroyed"||_a3a==="_destroyed"||typeof _a37=="function"){
  12098. continue;
  12099. }
  12100. if(_a37 instanceof Array){
  12101. GUtil.destroyProperties(_a37);
  12102. }else{
  12103. if(_a37 instanceof Object){
  12104. if(typeof _a37.destroy=="function"&&!_a37._destroyed&&(_a37!==CCognosViewer||_a36)){
  12105. _a37.destroy();
  12106. }
  12107. }
  12108. }
  12109. delete obj[_a3a];
  12110. }
  12111. }
  12112. }
  12113. };
  12114. cvLoadDialog=function(_a3b,_a3c,_a3d,_a3e,_a3f,_a40){
  12115. _a40=((_a40===undefined)?true:_a40);
  12116. var _a41=document.getElementById("formWarpRequest"+_a3b.getId());
  12117. if(_a41&&_a3b){
  12118. _a3b.getWorkingDialog().hide();
  12119. var _a42="";
  12120. var _a43="";
  12121. var _a44=null;
  12122. if(_a3b.isAccessibleMode()){
  12123. _a42="winNAT_"+(new Date()).getTime();
  12124. _a43=_a3b.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
  12125. }else{
  12126. var _a45=document.body;
  12127. _a44=new CModal("","",_a45,null,null,_a3e,_a3d,true,true,false,true,_a3b.getWebContentRoot());
  12128. if(typeof _a3f=="string"){
  12129. document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_a3f);
  12130. }
  12131. document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
  12132. _a42=CMODAL_CONTENT_ID;
  12133. }
  12134. var _a46=document.createElement("FORM");
  12135. _a46.method="POST";
  12136. _a46.action=_a3b.getGateway();
  12137. _a46.target=_a42;
  12138. _a46.style.margin="0px";
  12139. document.body.appendChild(_a46);
  12140. for(var _a47 in _a3c){
  12141. _a46.appendChild(createHiddenFormField(_a47,_a3c[_a47]));
  12142. }
  12143. if(_a40){
  12144. _a46.appendChild(createHiddenFormField("cv.id",_a3b.getId()));
  12145. _a46.appendChild(createHiddenFormField("b_action","xts.run"));
  12146. _a46.appendChild(createHiddenFormField("ui.action",_a41["ui.action"].value));
  12147. _a46.appendChild(createHiddenFormField("ui.object",_a41["ui.object"].value));
  12148. if(typeof _a3b.rvMainWnd!="undefined"){
  12149. _a46.appendChild(createHiddenFormField("run.outputFormat",_a3b.rvMainWnd.getCurrentFormat()));
  12150. }
  12151. if(typeof _a41["run.outputLocale"]!="undefined"){
  12152. _a46.appendChild(createHiddenFormField("run.outputLocale",_a41["run.outputLocale"].value));
  12153. }
  12154. if(typeof _a46["backURL"]=="undefined"&&typeof _a46["ui.backURL"]=="undefined"&&typeof _a41["ui.backURL"]!="undefined"){
  12155. _a46.appendChild(createHiddenFormField("ui.backURL",_a41["ui.backURL"].value));
  12156. }
  12157. if(typeof _a3b!="undefined"&&typeof _a3b.getConversation!="undefined"&&typeof _a3b.getTracking!="undefined"){
  12158. _a46.appendChild(createHiddenFormField("ui.conversation",_a3b.getConversation()));
  12159. _a46.appendChild(createHiddenFormField("m_tracking",_a3b.getTracking()));
  12160. if(_a3b.envParams["ui.name"]!="undefined"){
  12161. _a46.appendChild(createHiddenFormField("ui.name",_a3b.envParams["ui.name"]));
  12162. }
  12163. }
  12164. }
  12165. var _a48=window.onbeforeunload;
  12166. window.onbeforeunload=null;
  12167. if(_a3b.isAccessibleMode()){
  12168. window.open(_a43,_a42,"rv");
  12169. _a46.submit();
  12170. }else{
  12171. _a46.submit();
  12172. _a44.show();
  12173. }
  12174. window.onbeforeunload=_a48;
  12175. document.body.removeChild(_a46);
  12176. _a3b.modalShown=true;
  12177. }
  12178. };
  12179. function createHiddenFormField(name,_a4a){
  12180. var _a4b=document.createElement("input");
  12181. _a4b.setAttribute("type","hidden");
  12182. _a4b.setAttribute("name",name);
  12183. _a4b.setAttribute("id",name);
  12184. _a4b.setAttribute("value",_a4a);
  12185. return (_a4b);
  12186. };
  12187. function isAuthenticationFault(_a4c){
  12188. if(_a4c!=null){
  12189. var _a4d=XMLHelper_FindChildByTagName(_a4c,"CAM",true);
  12190. return (_a4d!=null&&XMLHelper_FindChildByTagName(_a4d,"promptInfo",true)!=null);
  12191. }
  12192. };
  12193. function processAuthenticationFault(_a4e,_a4f){
  12194. if(isAuthenticationFault(_a4e)){
  12195. launchLogOnDialog(_a4f,_a4e);
  12196. return true;
  12197. }
  12198. return false;
  12199. };
  12200. function isObjectEmpty(_a50){
  12201. for(var _a51 in _a50){
  12202. if(_a50.hasOwnProperty(_a51)){
  12203. return false;
  12204. }
  12205. }
  12206. return true;
  12207. };
  12208. function launchLogOnDialog(cvID,_a53){
  12209. try{
  12210. var oCV=getCognosViewerObjectRef(cvID);
  12211. var _a55={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
  12212. if(_a53!=null){
  12213. var _a56=XMLHelper_FindChildrenByTagName(_a53,"namespace",true);
  12214. if(_a56!=null){
  12215. for(var _a57=0;_a57<_a56.length;++_a57){
  12216. var _a58=_a56[_a57];
  12217. if(_a58!=null){
  12218. var _a59=XMLHelper_FindChildByTagName(_a58,"name",false);
  12219. var _a5a=XMLHelper_FindChildByTagName(_a58,"value",false);
  12220. if(_a59!=null&&_a5a!=null){
  12221. var _a5b=XMLHelper_GetText(_a59);
  12222. var _a5c=XMLHelper_GetText(_a5a);
  12223. if(_a5b!=null&&_a5b.length>0){
  12224. _a55[_a5b]=_a5c;
  12225. }
  12226. }
  12227. }
  12228. }
  12229. }
  12230. }
  12231. cvLoadDialog(oCV,_a55,540,460,null,false);
  12232. }
  12233. catch(exception){
  12234. }
  12235. };
  12236. function getCVWaitingOnFault(){
  12237. var oCV=null;
  12238. for(var _a5e=0;_a5e<window.gaRV_INSTANCES.length;_a5e++){
  12239. if(window.gaRV_INSTANCES[_a5e].getRetryDispatcherEntry()!=null){
  12240. oCV=window.gaRV_INSTANCES[_a5e];
  12241. break;
  12242. }
  12243. }
  12244. return oCV;
  12245. };
  12246. function ccModalCallBack(_a5f,data){
  12247. var oCV=getCVWaitingOnFault();
  12248. destroyCModal();
  12249. if(typeof HiddenIframeDispatcherEntry=="function"&&HiddenIframeDispatcherEntry.hideIframe){
  12250. var oCV=window.gaRV_INSTANCES[0];
  12251. if(oCV){
  12252. HiddenIframeDispatcherEntry.hideIframe(oCV.getId());
  12253. }
  12254. }
  12255. if(oCV!=null){
  12256. if(typeof _a5f!="undefined"&&_a5f=="ok"){
  12257. var _a62=oCV.getRetryDispatcherEntry();
  12258. if(_a62){
  12259. _a62.retryRequest();
  12260. }
  12261. if(oCV.getRV()!=null){
  12262. oCV.getRV().updateUserName();
  12263. }
  12264. }else{
  12265. oCV.rvMainWnd.hideOpenMenus();
  12266. }
  12267. }
  12268. };
  12269. function closeErrorPage(){
  12270. var oCV=getCVWaitingOnFault();
  12271. destroyCModal();
  12272. if(oCV!=null){
  12273. oCV.setRetryDispatcherEntry(null);
  12274. oCV.rvMainWnd.hideOpenMenus();
  12275. }
  12276. };
  12277. function getCrossBrowserNode(evt,_a65){
  12278. var node=null;
  12279. if(_a65&&evt.explicitOriginalTarget){
  12280. node=evt.explicitOriginalTarget;
  12281. }else{
  12282. if(evt.originalTarget){
  12283. node=evt.originalTarget;
  12284. }else{
  12285. if(evt.target){
  12286. node=evt.target;
  12287. }else{
  12288. if(evt.srcElement){
  12289. node=evt.srcElement;
  12290. }
  12291. }
  12292. }
  12293. }
  12294. try{
  12295. if(node&&node.nodeType==3){
  12296. node=node.parentNode;
  12297. }
  12298. }
  12299. catch(ex){
  12300. }
  12301. return node;
  12302. };
  12303. function getNodeFromEvent(evt,_a68){
  12304. var node=getCrossBrowserNode(evt,true);
  12305. if(node&&node.getAttribute&&node.getAttribute("name")=="primarySelectionDiv"){
  12306. node=node.parentNode.firstChild;
  12307. }
  12308. if(node&&node.getAttribute&&node.getAttribute("flashChartContainer")=="true"){
  12309. node=node.firstChild;
  12310. }
  12311. if(node&&node.getAttribute&&node.getAttribute("chartContainer")=="true"&&node.childNodes){
  12312. for(var i=0;i<node.childNodes.length;i++){
  12313. if(node.childNodes[i].nodeName.toLowerCase()=="img"){
  12314. node=node.childNodes[i];
  12315. break;
  12316. }
  12317. }
  12318. }else{
  12319. if(!_a68&&node&&node.nodeName&&node.nodeName.toLowerCase()=="img"&&node.getAttribute("rsvpChart")!="true"){
  12320. node=node.parentNode;
  12321. }
  12322. }
  12323. return node;
  12324. };
  12325. function getCtxNodeFromEvent(evt){
  12326. try{
  12327. var node=getCrossBrowserNode(evt);
  12328. var _a6d=node.nodeName.toUpperCase();
  12329. if((_a6d=="SPAN"||_a6d=="AREA"||_a6d=="IMG")&&node.getAttribute("ctx")!=null){
  12330. return node;
  12331. }else{
  12332. if(_a6d=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
  12333. return node.parentNode;
  12334. }
  12335. }
  12336. }
  12337. catch(exception){
  12338. }
  12339. return null;
  12340. };
  12341. function getDocumentFromEvent(evt){
  12342. var node=getCrossBrowserNode(evt,true);
  12343. var _a70=node.document?node.document:node.ownerDocument;
  12344. return _a70;
  12345. };
  12346. function stopEventBubble(evt){
  12347. evt.returnValue=false;
  12348. evt.cancelBubble=true;
  12349. if(typeof evt.stopPropagation!="undefined"){
  12350. evt.stopPropagation();
  12351. }
  12352. if(typeof evt.preventDefault!="undefined"){
  12353. evt.preventDefault();
  12354. }
  12355. return false;
  12356. };
  12357. function setNodeFocus(evt){
  12358. evt=(evt)?evt:((event)?event:null);
  12359. var _a73=getNodeFromEvent(evt);
  12360. if(_a73&&_a73.nodeName){
  12361. var _a74=_a73.nodeName.toLowerCase();
  12362. if((_a74=="td"||_a74=="span")&&_a73.childNodes&&_a73.childNodes.length>0&&_a73.childNodes[0].className=="textItem"){
  12363. try{
  12364. _a73.childNodes[0].focus();
  12365. }
  12366. catch(e){
  12367. if(typeof console!=="undefined"&&console.log){
  12368. console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js");
  12369. }
  12370. }
  12371. }
  12372. }
  12373. };
  12374. function html_encode(str){
  12375. return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
  12376. };
  12377. function replaceNewLine(_a76){
  12378. var regX=/\r\n|\r|\n/g;
  12379. var _a78="<br/>";
  12380. return _a76.replace(regX,_a78);
  12381. };
  12382. function xml_encode(_a79){
  12383. var _a7a=""+_a79;
  12384. if((_a7a=="0")||((_a79!=null)&&(_a79!=false))){
  12385. _a7a=_a7a.replace(/&/g,"&amp;");
  12386. _a7a=_a7a.replace(/</g,"&lt;");
  12387. _a7a=_a7a.replace(/>/g,"&gt;");
  12388. _a7a=_a7a.replace(/"/g,"&quot;");
  12389. _a7a=_a7a.replace(/'/g,"&apos;");
  12390. }else{
  12391. if(_a79==null){
  12392. _a7a="";
  12393. }
  12394. }
  12395. return _a7a;
  12396. };
  12397. function xml_decodeParser(sAll,_a7c){
  12398. var _a7d=sAll;
  12399. switch(_a7c){
  12400. case "amp":
  12401. _a7d="&";
  12402. break;
  12403. case "lt":
  12404. _a7d="<";
  12405. break;
  12406. case "gt":
  12407. _a7d=">";
  12408. break;
  12409. case "quot":
  12410. _a7d="\"";
  12411. break;
  12412. case "apos":
  12413. _a7d="'";
  12414. break;
  12415. }
  12416. return _a7d;
  12417. };
  12418. function xml_decode(_a7e){
  12419. var _a7f=""+_a7e;
  12420. if((_a7f=="0")||((_a7e!=null)&&(_a7e!=false))){
  12421. _a7f=_a7f.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
  12422. }else{
  12423. if(_a7e==null){
  12424. _a7f="";
  12425. }
  12426. }
  12427. return _a7f;
  12428. };
  12429. function xpath_attr_encode(_a80){
  12430. var _a81=null;
  12431. if(_a80.indexOf("'")>=0&&_a80.indexOf("\"")>=0){
  12432. var _a82=_a80.split("\"");
  12433. _a81="concat(";
  12434. for(var i=0;i<_a82.length;++i){
  12435. if(i>0){
  12436. _a81+=",";
  12437. }
  12438. if(_a82[i].length>0){
  12439. _a81+=("\""+_a82[i]+"\"");
  12440. }else{
  12441. _a81+="'\"'";
  12442. }
  12443. }
  12444. _a81+=")";
  12445. }else{
  12446. if(_a80.indexOf("'")>=0){
  12447. _a81="\""+_a80+"\"";
  12448. }else{
  12449. _a81="'"+_a80+"'";
  12450. }
  12451. }
  12452. return _a81;
  12453. };
  12454. function getCognosViewerObjectString(sId){
  12455. return "oCV"+sId;
  12456. };
  12457. function getCognosViewerObjectRefAsString(sId){
  12458. return "window."+getCognosViewerObjectString(sId);
  12459. };
  12460. function getCognosViewerObjectRef(sId){
  12461. return window[getCognosViewerObjectString(sId)];
  12462. };
  12463. function getCognosViewerSCObjectString(sId){
  12464. return "oCVSC"+sId;
  12465. };
  12466. function getCognosViewerSCObjectRefAsString(sId){
  12467. return "window."+getCognosViewerSCObjectString(sId);
  12468. };
  12469. function getCognosViewerSCObjectRef(sId){
  12470. return window[getCognosViewerSCObjectString(sId)];
  12471. };
  12472. function cleanupGlobalObjects(sId){
  12473. cleanupVariable(getCognosViewerObjectString(sId));
  12474. cleanupVariable(getCognosViewerSCObjectString(sId));
  12475. };
  12476. function cleanupVariable(_a8b){
  12477. if(typeof window[_a8b]!="undefined"&&window[_a8b]){
  12478. if(isIE()){
  12479. eval("delete "+_a8b);
  12480. }else{
  12481. delete window[_a8b];
  12482. }
  12483. }
  12484. };
  12485. function loadClass(_a8c){
  12486. try{
  12487. var _a8d=eval("new "+_a8c+"();");
  12488. return _a8d;
  12489. }
  12490. catch(e){
  12491. return null;
  12492. }
  12493. };
  12494. function getElementsByClassName(oElm,_a8f,_a90){
  12495. var _a91=(_a8f=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_a8f);
  12496. var _a92=[];
  12497. var _a93=new RegExp("(^|\\s)"+_a90+"(\\s|$)");
  12498. var _a94=_a91.length;
  12499. for(var i=0;i<_a94;i++){
  12500. var _a96=_a91[i];
  12501. if(_a93.test(_a96.className)){
  12502. _a92.push(_a96);
  12503. }
  12504. }
  12505. return _a92;
  12506. };
  12507. function getImmediateLayoutContainerId(node){
  12508. var _a98=node;
  12509. while(_a98!=null){
  12510. if(_a98.getAttribute&&_a98.getAttribute("lid")!=null){
  12511. return _a98.getAttribute("lid");
  12512. }
  12513. _a98=_a98.parentNode;
  12514. }
  12515. return null;
  12516. };
  12517. function getChildElementsByAttribute(oElm,_a9a,_a9b,_a9c){
  12518. return getDescendantElementsByAttribute(oElm,_a9a,_a9b,_a9c,true);
  12519. };
  12520. function getElementsByAttribute(oElm,_a9e,_a9f,_aa0,_aa1,_aa2){
  12521. return getDescendantElementsByAttribute(oElm,_a9e,_a9f,_aa0,false,_aa1,_aa2);
  12522. };
  12523. function getDescendantElementsByAttribute(oElm,_aa4,_aa5,_aa6,_aa7,_aa8,_aa9){
  12524. var _aaa=[];
  12525. var _aab=null;
  12526. if(typeof _aa9==="undefined"){
  12527. _aab=(typeof _aa6!="undefined")?new RegExp("(^|\\s)"+_aa6+"(\\s|$)","i"):null;
  12528. }else{
  12529. _aab=_aa9;
  12530. }
  12531. if(typeof _aa4=="string"){
  12532. _aa4=[_aa4];
  12533. }
  12534. var _aac=(oElm?_aa4.length:0);
  12535. for(var _aad=0;_aad<_aac;_aad++){
  12536. var _aae=null;
  12537. if(_aa7){
  12538. if(_aa4[_aad]=="*"&&oElm.all){
  12539. _aae=oElm.childNodes;
  12540. }else{
  12541. _aae=[];
  12542. var _aaf=oElm.childNodes;
  12543. for(var i=0;i<_aaf.length;++i){
  12544. if(_aaf[i].nodeName.toLowerCase()==_aa4[_aad].toLowerCase()){
  12545. _aae.push(_aaf[i]);
  12546. }
  12547. }
  12548. }
  12549. }else{
  12550. _aae=(_aa4[_aad]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_aa4[_aad]);
  12551. }
  12552. var _ab1=_aae.length;
  12553. for(var idx=0;idx<_ab1;idx++){
  12554. var _ab3=_aae[idx];
  12555. var _ab4=_ab3.getAttribute&&_ab3.getAttribute(_aa5);
  12556. if(_ab4!==null){
  12557. var _ab5=null;
  12558. if(typeof _ab4==="number"){
  12559. _ab5=String(_ab4);
  12560. }else{
  12561. if(typeof _ab4==="string"&&_ab4.length>0){
  12562. _ab5=_ab4;
  12563. }
  12564. }
  12565. if(_ab5!==null){
  12566. if(typeof _aa6=="undefined"||(_aab&&_aab.test(_ab5))){
  12567. _aaa.push(_ab3);
  12568. if(_aa8!=-1&&_aaa.length>_aa8){
  12569. return [];
  12570. }else{
  12571. if(_aa8==1&&_aaa.length==1){
  12572. return _aaa;
  12573. }
  12574. }
  12575. }
  12576. }
  12577. }
  12578. }
  12579. }
  12580. return _aaa;
  12581. };
  12582. function savedOutputDoneLoading(cvId,_ab7){
  12583. var oCV=window["oCV"+cvId];
  12584. var _ab9=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
  12585. var _aba=(_ab9?_ab9.getSavedOutput():null);
  12586. if(_aba){
  12587. _aba.outputDoneLoading();
  12588. }else{
  12589. if(_ab7<5){
  12590. _ab7++;
  12591. var _abb=function(){
  12592. savedOutputDoneLoading(cvId,_ab7);
  12593. };
  12594. setTimeout(_abb,100);
  12595. }
  12596. }
  12597. };
  12598. function getNavVer(){
  12599. var temp;
  12600. if(isIE()){
  12601. return getIEVersion();
  12602. }else{
  12603. temp=navigator.userAgent.split("/");
  12604. return parseFloat(temp[temp.length-1]);
  12605. }
  12606. };
  12607. function isSafari(){
  12608. return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1);
  12609. };
  12610. function isIE(){
  12611. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  12612. };
  12613. function getIEVersion(){
  12614. var _abd=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
  12615. return _abd?parseFloat(_abd[1]):null;
  12616. };
  12617. function isFF(){
  12618. return (navigator.userAgent.indexOf("Firefox")!=-1);
  12619. };
  12620. function isIOS(){
  12621. return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1;
  12622. };
  12623. function displayChart(_abe,_abf,_ac0,_ac1){
  12624. if(_abf.length>1){
  12625. document.images[_abe].src=_abf;
  12626. }
  12627. };
  12628. function isFlashChartNode(evt){
  12629. var node=getNodeFromEvent(evt);
  12630. if(node!=null&&typeof node.getAttribute=="function"){
  12631. return node.getAttribute("flashChart")!=null;
  12632. }
  12633. return false;
  12634. };
  12635. function onFlashChartRightClick(evt){
  12636. if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){
  12637. return onViewerChartFocus(evt);
  12638. }
  12639. };
  12640. function onViewerChartFocus(evt){
  12641. if(evt.stopPropagation){
  12642. evt.stopPropagation();
  12643. }
  12644. if(evt.preventDefault){
  12645. evt.preventDefault();
  12646. }
  12647. if(evt.preventCapture){
  12648. evt.preventCapture();
  12649. }
  12650. if(evt.preventBubble){
  12651. evt.preventBubble();
  12652. }
  12653. var node=getNodeFromEvent(evt);
  12654. var _ac7=node.getAttribute("viewerId");
  12655. if(!_ac7){
  12656. _ac7=node.parentNode.getAttribute("viewerId");
  12657. }
  12658. if(!_ac7){
  12659. return;
  12660. }
  12661. var oCV=window["oCV"+_ac7];
  12662. var _ac9=oCV.getAction("Selection");
  12663. _ac9.pageClicked(evt);
  12664. return stopEventBubble(evt);
  12665. };
  12666. function clientToScreenCoords(_aca,_acb){
  12667. var _acc=_aca;
  12668. var _acd={topCoord:0,leftCoord:0};
  12669. while(_acc!=null&&_acc!=_acb){
  12670. _acd.topCoord+=_acc.offsetTop;
  12671. _acd.leftCoord+=_acc.offsetLeft;
  12672. _acc=_acc.offsetParent;
  12673. }
  12674. return _acd;
  12675. };
  12676. function getCurrentPosistionString(oCV,_acf,_ad0){
  12677. var _ad1=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
  12678. var _ad2=/\{0\}/;
  12679. var _ad3=/\{1\}/;
  12680. _ad1=_ad1.replace(_ad2,_acf);
  12681. _ad1=" "+_ad1.replace(_ad3,_ad0)+" ";
  12682. return _ad1;
  12683. };
  12684. function applyJSONProperties(obj,_ad5){
  12685. for(property in _ad5){
  12686. if(typeof _ad5[property]=="object"&&!(_ad5[property] instanceof Array)){
  12687. if(typeof obj[property]=="undefined"){
  12688. obj[property]={};
  12689. }
  12690. applyJSONProperties(obj[property],_ad5[property]);
  12691. }else{
  12692. obj[property]=_ad5[property];
  12693. }
  12694. }
  12695. };
  12696. function CViewerCommon(){
  12697. };
  12698. CViewerCommon.openNewWindowOrTab=function(sURL,_ad7){
  12699. return window.open(sURL,_ad7);
  12700. };
  12701. CViewerCommon.toJSON=function(obj){
  12702. var type=typeof (obj);
  12703. if(type!="object"||type===null){
  12704. if(type==="string"){
  12705. obj="\""+obj+"\"";
  12706. }
  12707. return String(obj);
  12708. }else{
  12709. var _ada;
  12710. var prop;
  12711. var json=[];
  12712. var _add=(obj&&obj.constructor==Array);
  12713. for(_ada in obj){
  12714. prop=obj[_ada];
  12715. type=typeof (prop);
  12716. if(type==="string"){
  12717. prop="\""+prop+"\"";
  12718. }else{
  12719. if(type=="object"&&prop!==null){
  12720. prop=CViewerCommon.toJSON(prop);
  12721. }
  12722. }
  12723. json.push((_add?"":"\""+_ada+"\":")+String(prop));
  12724. }
  12725. return (_add?"[":"{")+String(json)+(_add?"]":"}");
  12726. }
  12727. };
  12728. function resizePinnedContainers(){
  12729. var oCV=window.gaRV_INSTANCES[0];
  12730. if(oCV&&!oCV.m_viewerFragment){
  12731. var _adf=oCV.getPinFreezeManager();
  12732. if(_adf&&_adf.hasFrozenContainers()){
  12733. var _ae0=document.getElementById("RVContent"+oCV.getId());
  12734. var _ae1=document.getElementById("mainViewerTable"+oCV.getId());
  12735. var _ae2=_ae0.clientWidth;
  12736. var _ae3=_ae1.clientHeight;
  12737. _adf.resize(_ae2,_ae3);
  12738. if(isIE()){
  12739. oCV.repaintDiv(_ae0);
  12740. }
  12741. }
  12742. }
  12743. };
  12744. function setWindowHref(url){
  12745. var _ae5=window.onbeforeunload;
  12746. window.onbeforeunload=null;
  12747. window.location.href=url;
  12748. window.onbeforeunload=_ae5;
  12749. };
  12750. CViewerCommon.getMessage=function(msg,args){
  12751. if(typeof args=="undefined"){
  12752. return msg;
  12753. }else{
  12754. if(typeof args=="string"){
  12755. msg=msg.replace("{0}",args);
  12756. }else{
  12757. if(args.length){
  12758. for(var i=0;i<args.length;++i){
  12759. msg=msg.replace("{"+i+"}",args[i]);
  12760. }
  12761. }else{
  12762. msg=msg.replace("{0}",args);
  12763. }
  12764. }
  12765. }
  12766. return msg;
  12767. };
  12768. function getViewerDirection(){
  12769. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12770. return gaRV_INSTANCES[0].getDirection();
  12771. }
  12772. return "ltr";
  12773. };
  12774. function isViewerBidiEnabled(){
  12775. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12776. var _ae9=gaRV_INSTANCES[0].isBidiEnabled();
  12777. if(_ae9){
  12778. return true;
  12779. }
  12780. }
  12781. return false;
  12782. };
  12783. function getViewerBaseTextDirection(){
  12784. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12785. return gaRV_INSTANCES[0].getBaseTextDirection();
  12786. }
  12787. return "";
  12788. };
  12789. function enforceTextDir(_aea){
  12790. if(isViewerBidiEnabled()&&_aea){
  12791. var sDir=getViewerBaseTextDirection();
  12792. var _aec=BidiUtils.getInstance();
  12793. if(sDir=="auto"){
  12794. sDir=_aec.resolveStrBtd(_aea);
  12795. }
  12796. var _aed=(!dojo._isBodyLtr())?_aec.RLM:_aec.LRM;
  12797. return _aed+((sDir==="rtl")?_aec.RLE:_aec.LRE)+_aea+_aec.PDF+_aed;
  12798. }
  12799. return _aea;
  12800. };
  12801. function getElementDirection(_aee){
  12802. var dir=null;
  12803. if(_aee.currentStyle){
  12804. dir=_aee.currentStyle.direction;
  12805. }else{
  12806. if(window.getComputedStyle){
  12807. var _af0=window.getComputedStyle(_aee,null);
  12808. if(_af0){
  12809. dir=_af0.getPropertyValue("direction");
  12810. }
  12811. }
  12812. }
  12813. if(dir){
  12814. dir=dir.toLowerCase();
  12815. }
  12816. return dir;
  12817. };
  12818. function getScrollLeft(_af1){
  12819. if(getElementDirection(_af1)==="rtl"&&isFF()){
  12820. return _af1.scrollWidth-_af1.offsetWidth+_af1.scrollLeft;
  12821. }
  12822. return _af1.scrollLeft;
  12823. };
  12824. function setScrollLeft(_af2,_af3){
  12825. if(getElementDirection(_af2)==="rtl"&&isFF()){
  12826. _af2.scrollLeft=_af2.offsetWidth+_af3-_af2.scrollWidth;
  12827. }else{
  12828. _af2.scrollLeft=_af3;
  12829. }
  12830. };
  12831. function setScrollRight(_af4,_af5){
  12832. if(getElementDirection(_af4)==="rtl"&&isFF()){
  12833. _af4.scrollLeft=-_af5;
  12834. }else{
  12835. _af4.scrollLeft=_af4.scrollWidth-_af4.offsetWidth-_af5;
  12836. }
  12837. };
  12838. function getBoxInfo(el,_af7){
  12839. if(!getBoxInfo.aStyles){
  12840. getBoxInfo.aStyles=[{name:"marginLeft",ie:"marginLeft",ff:"margin-left"},{name:"marginRight",ie:"marginRight",ff:"margin-right"},{name:"marginTop",ie:"marginTop",ff:"margin-top"},{name:"marginBottom",ie:"marginBottom",ff:"margin-bottom"},{name:"borderLeftWidth",ie:"borderLeftWidth",ff:"border-left-width"},{name:"borderRightWidth",ie:"borderRightWidth",ff:"border-right-width"},{name:"borderTopWidth",ie:"borderTopWidth",ff:"border-top-width"},{name:"borderBottomWidth",ie:"borderBottomWidth",ff:"border-bottom-width"},{name:"paddingLeft",ie:"paddingLeft",ff:"padding-left"},{name:"paddingRight",ie:"paddingRight",ff:"padding-right"},{name:"paddingTop",ie:"paddingTop",ff:"padding-top"},{name:"paddingBottom",ie:"paddingBottom",ff:"padding-bottom"}];
  12841. }
  12842. var _af8={};
  12843. var _af9=null;
  12844. if(el.currentStyle){
  12845. _af9=el.currentStyle;
  12846. }else{
  12847. if(window.getComputedStyle){
  12848. _af9=window.getComputedStyle(el,null);
  12849. }
  12850. }
  12851. if(!_af9){
  12852. return null;
  12853. }
  12854. for(i in getBoxInfo.aStyles){
  12855. var _afa=getBoxInfo.aStyles[i];
  12856. var size=null;
  12857. if(_af9.getPropertyValue){
  12858. size=_af9.getPropertyValue(_afa.ff);
  12859. }else{
  12860. size=_af9[_afa.ie];
  12861. }
  12862. if(size&&_af7){
  12863. size=Number(size.replace("px",""));
  12864. }
  12865. _af8[_afa.name]=size;
  12866. }
  12867. return _af8;
  12868. };
  12869. function CSelectionMetadata(){
  12870. this.m_sContextId="";
  12871. this.m_sDataItem="";
  12872. this.m_sMetadataModelItem="";
  12873. this.m_sUseValue="";
  12874. this.m_sUseValueType="";
  12875. this.m_sType=null;
  12876. this.m_sDisplayValue="";
  12877. this.m_sUsage=null;
  12878. this.m_refQuery=null;
  12879. this.m_sHun=null;
  12880. this.m_sDun=null;
  12881. };
  12882. CSelectionMetadata.prototype.setContextId=function(_afc){
  12883. this.m_sContextId=_afc;
  12884. };
  12885. CSelectionMetadata.prototype.getContextId=function(){
  12886. return this.m_sContextId;
  12887. };
  12888. CSelectionMetadata.prototype.setRefQuery=function(_afd){
  12889. this.m_refQuery=_afd;
  12890. };
  12891. CSelectionMetadata.prototype.getRefQuery=function(){
  12892. return this.m_refQuery;
  12893. };
  12894. CSelectionMetadata.prototype.setDataItem=function(_afe){
  12895. this.m_sDataItem=_afe;
  12896. };
  12897. CSelectionMetadata.prototype.getDataItem=function(){
  12898. return this.m_sDataItem;
  12899. };
  12900. CSelectionMetadata.prototype.setMetadataModelItem=function(_aff){
  12901. this.m_sMetadataModelItem=_aff;
  12902. };
  12903. CSelectionMetadata.prototype.getMetadataModelItem=function(){
  12904. return this.m_sMetadataModelItem;
  12905. };
  12906. CSelectionMetadata.prototype.setUseValue=function(_b00){
  12907. this.m_sUseValue=_b00;
  12908. };
  12909. CSelectionMetadata.prototype.getUseValue=function(){
  12910. return this.m_sUseValue;
  12911. };
  12912. CSelectionMetadata.prototype.setUseValueType=function(_b01){
  12913. this.m_sUseValueType=_b01;
  12914. };
  12915. CSelectionMetadata.prototype.setType=function(_b02){
  12916. this.m_sType=_b02;
  12917. };
  12918. CSelectionMetadata.prototype.getType=function(){
  12919. var _b03=null;
  12920. switch(this.m_sUseValueType){
  12921. case 25:
  12922. case 27:
  12923. case 30:
  12924. case 32:
  12925. _b03="memberUniqueName";
  12926. break;
  12927. case 26:
  12928. _b03="memberCaption";
  12929. break;
  12930. case 1:
  12931. case 55:
  12932. case 56:
  12933. _b03="string";
  12934. break;
  12935. case 2:
  12936. case 3:
  12937. case 4:
  12938. case 5:
  12939. case 6:
  12940. case 7:
  12941. case 8:
  12942. case 9:
  12943. case 10:
  12944. case 11:
  12945. case 12:
  12946. case 16:
  12947. case 17:
  12948. case 18:
  12949. case 19:
  12950. case 20:
  12951. case 22:
  12952. case 21:
  12953. case 23:
  12954. case 24:
  12955. case 54:
  12956. _b03=parseInt(this.m_sUseValueType,10);
  12957. break;
  12958. }
  12959. return _b03;
  12960. };
  12961. CSelectionMetadata.prototype.getUseValueType=function(){
  12962. if(this.m_sType==null){
  12963. this.m_sType=this.getType();
  12964. }
  12965. return this.m_sType;
  12966. };
  12967. CSelectionMetadata.prototype.setDisplayValue=function(_b04){
  12968. this.m_sDisplayValue=_b04;
  12969. };
  12970. CSelectionMetadata.prototype.getDisplayValue=function(){
  12971. return this.m_sDisplayValue;
  12972. };
  12973. CSelectionMetadata.prototype.setUsage=function(_b05){
  12974. this.m_sUsage=_b05;
  12975. };
  12976. CSelectionMetadata.prototype.getUsage=function(){
  12977. if(this.m_sUsage=="2"){
  12978. return "measure";
  12979. }else{
  12980. return "nonMeasure";
  12981. }
  12982. };
  12983. CSelectionMetadata.prototype.setHun=function(sHun){
  12984. this.m_sHun=sHun;
  12985. };
  12986. CSelectionMetadata.prototype.getHun=function(){
  12987. return this.m_sHun;
  12988. };
  12989. CSelectionMetadata.prototype.setDun=function(sDun){
  12990. this.m_sDun=sDun;
  12991. };
  12992. CSelectionMetadata.prototype.getDun=function(){
  12993. return this.m_sDun;
  12994. };
  12995. function CSelectionMetadataIterator(_b08,_b09){
  12996. this.m_axisIndex=_b09;
  12997. this.m_index=0;
  12998. this.m_selectionObject=_b08;
  12999. };
  13000. CSelectionMetadataIterator.prototype.getSelectionAxis=function(){
  13001. var _b0a=null;
  13002. if(typeof this.m_selectionObject=="object"&&this.m_axisIndex<this.m_selectionObject.getSelectedContextIds().length){
  13003. _b0a=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex];
  13004. }
  13005. return _b0a;
  13006. };
  13007. CSelectionMetadataIterator.prototype.hasNext=function(){
  13008. var _b0b=this.getSelectionAxis();
  13009. if(_b0b!=null){
  13010. return (this.m_index<_b0b.length);
  13011. }else{
  13012. return false;
  13013. }
  13014. };
  13015. CSelectionMetadataIterator.prototype.next=function(){
  13016. var _b0c=null;
  13017. if(this.hasNext()){
  13018. _b0c=new CSelectionMetadata();
  13019. _b0c.setContextId(this.m_selectionObject.m_contextIds[this.m_axisIndex][this.m_index]);
  13020. _b0c.setDataItem(this.m_selectionObject.getDataItems()[this.m_axisIndex][this.m_index]);
  13021. _b0c.setMetadataModelItem(this.m_selectionObject.getMetadataItems()[this.m_axisIndex][this.m_index]);
  13022. if(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=null&&this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=""){
  13023. _b0c.setUseValue(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]);
  13024. _b0c.setType("memberUniqueName");
  13025. }else{
  13026. _b0c.setUseValue(this.m_selectionObject.getUseValues()[this.m_axisIndex][this.m_index]);
  13027. }
  13028. if(typeof this.m_selectionObject.m_selectionController=="object"){
  13029. var _b0d=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex][this.m_index];
  13030. if(this.m_selectionObject.useDisplayValueFromObject){
  13031. _b0c.setDisplayValue(this.m_selectionObject.getDisplayValues()[this.m_axisIndex]);
  13032. }else{
  13033. var _b0e=null;
  13034. var _b0f=null;
  13035. if(this.m_axisIndex===0){
  13036. var _b10=this.m_selectionObject.getCellRef();
  13037. if(_b10&&_b10.nodeName&&_b10.nodeName.toLowerCase()==="td"){
  13038. _b0f=this.m_selectionObject.m_selectionController.getDisplayValueFromDOM(_b0d,_b10.parentNode);
  13039. }
  13040. }
  13041. if(_b0f==null){
  13042. _b0f=this.m_selectionObject.m_selectionController.getDisplayValue(_b0d);
  13043. }
  13044. if(_b0f===""){
  13045. _b0f=this.m_selectionObject.m_selectionController.getUseValue(_b0d);
  13046. }
  13047. _b0c.setDisplayValue(_b0f);
  13048. }
  13049. _b0c.setUseValueType(this.m_selectionObject.m_selectionController.getDataType(_b0d));
  13050. _b0c.setUsage(this.m_selectionObject.m_selectionController.getUsageInfo(_b0d));
  13051. _b0c.setRefQuery(this.m_selectionObject.m_selectionController.getRefQuery(_b0d));
  13052. _b0c.setHun(this.m_selectionObject.m_selectionController.getHun(_b0d));
  13053. _b0c.setDun(this.m_selectionObject.m_selectionController.getDun(_b0d));
  13054. }
  13055. ++this.m_index;
  13056. }
  13057. return _b0c;
  13058. };
  13059. function CAxisSelectionIterator(_b11){
  13060. this.m_index=0;
  13061. this.m_selectionObject=_b11;
  13062. };
  13063. CAxisSelectionIterator.prototype.hasNext=function(){
  13064. return ((typeof this.m_selectionObject=="object")&&(this.m_index<this.m_selectionObject.getSelectedContextIds().length));
  13065. };
  13066. CAxisSelectionIterator.prototype.next=function(){
  13067. var _b12=null;
  13068. if(this.hasNext()){
  13069. _b12=new CSelectionMetadataIterator(this.m_selectionObject,this.m_index);
  13070. ++this.m_index;
  13071. }
  13072. return _b12;
  13073. };
  13074. function getSelectionContextIds(_b13){
  13075. var _b14=[];
  13076. var _b15=_b13.getAllSelectedObjects();
  13077. if(_b15!=null&&_b15.length>0){
  13078. for(var _b16=0;_b16<_b15.length;++_b16){
  13079. var _b17=_b15[_b16];
  13080. var _b18=_b17.getSelectedContextIds();
  13081. var _b19=[];
  13082. for(var item=0;item<_b18.length;++item){
  13083. var _b1b=_b18[item].join(":");
  13084. _b19.push(_b1b);
  13085. }
  13086. _b14.push(_b19.join("::"));
  13087. }
  13088. }
  13089. return _b14;
  13090. };
  13091. function getViewerSelectionContext(_b1c,_b1d,_b1e){
  13092. var _b1f=_b1e==true?_b1c.getAllSelectedObjectsWithUniqueCTXIDs():_b1c.getAllSelectedObjects();
  13093. if(_b1f!=null&&_b1f.length>0){
  13094. for(var _b20=0;_b20<_b1f.length;++_b20){
  13095. var _b21={};
  13096. var _b22=new CAxisSelectionIterator(_b1f[_b20]);
  13097. if(_b22.hasNext()){
  13098. var _b23=_b22.next();
  13099. if(_b23.hasNext()){
  13100. var _b24=_b23.next();
  13101. var _b25=_b24.getContextId();
  13102. _b21[_b25]=true;
  13103. var _b26=_b1d.addSelectedCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
  13104. if(_b24.getHun()!=null){
  13105. _b26.addProperty("HierarchyUniqueName",_b24.getHun());
  13106. }
  13107. if(_b24.getDun()!=null){
  13108. _b26.addProperty("DimensionUniqueName",_b24.getDun());
  13109. }
  13110. while(_b23.hasNext()){
  13111. _b24=_b23.next();
  13112. _b25=_b24.getContextId();
  13113. if(typeof _b21[_b25]=="undefined"||_b25===""){
  13114. _b21[_b25]=true;
  13115. var _b27=_b26.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
  13116. if(_b24.getHun()!=null){
  13117. _b27.addProperty("HierarchyUniqueName",_b24.getHun());
  13118. }
  13119. if(_b24.getDun()!=null){
  13120. _b27.addProperty("DimensionUniqueName",_b24.getDun());
  13121. }
  13122. }
  13123. }
  13124. while(_b22.hasNext()){
  13125. _b23=_b22.next();
  13126. var _b28=_b26;
  13127. while(_b23.hasNext()){
  13128. _b24=_b23.next();
  13129. _b25=_b24.getContextId();
  13130. if(typeof _b21[_b25]=="undefined"||_b25===""){
  13131. _b21[_b25]=true;
  13132. _b28=_b28.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
  13133. if(_b24.getHun()!=null){
  13134. _b28.addProperty("HierarchyUniqueName",_b24.getHun());
  13135. }
  13136. if(_b24.getDun()!=null){
  13137. _b28.addProperty("DimensionUniqueName",_b24.getDun());
  13138. }
  13139. }
  13140. }
  13141. }
  13142. }
  13143. }
  13144. }
  13145. }
  13146. var _b29=_b1d.toString();
  13147. if(window.gViewerLogger){
  13148. window.gViewerLogger.log("Selection context",_b29,"xml");
  13149. }
  13150. return _b29;
  13151. };
  13152. function PinFreezeContainer(_b2a,lid,_b2c,_b2d,_b2e,_b2f,_b30){
  13153. this.m_pinFreezeManager=_b2a;
  13154. this.m_lid=lid;
  13155. this.m_lidNS=lid+_b2c+_b30;
  13156. this.m_viewerId=_b2c;
  13157. this.m_freezeTop=_b2d;
  13158. this.m_freezeSide=_b2e;
  13159. this.m_cachedReportDiv=null;
  13160. this.m_cachedPFContainer=null;
  13161. this.m_cachedBaseContainer=_b2f;
  13162. this.m_containerMargin={"top":0,"left":0};
  13163. if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){
  13164. if(this.m_cachedBaseContainer.style.marginTop){
  13165. this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px",""));
  13166. }
  13167. if(this.m_cachedBaseContainer.style.marginLeft){
  13168. this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px",""));
  13169. }
  13170. }
  13171. this.m_cachedContainerIndex=_b30;
  13172. this.m_sectionCache=null;
  13173. this.m_homeCellNodes={};
  13174. this.m_fixedWidth=null;
  13175. this.m_clientWidth=700;
  13176. this.m_scrollableClientWidth=700;
  13177. this.m_fixedHeight=null;
  13178. this.m_clientHeight=300;
  13179. this.m_scrollableClientHeight=300;
  13180. this.m_wrapFlag=false;
  13181. this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20;
  13182. this.touchScrollSections=false;
  13183. this.touchPreviousX=-1;
  13184. this.touchPreviousY=-1;
  13185. };
  13186. PinFreezeContainer.prototype.toJSONString=function(){
  13187. var _b31="{";
  13188. _b31+="\"m_clientWidth\":"+this.m_clientWidth+"";
  13189. _b31+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
  13190. _b31+=",\"m_clientHeight\":"+this.m_clientHeight+"";
  13191. _b31+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
  13192. _b31+="}";
  13193. return _b31;
  13194. };
  13195. PinFreezeContainer.prototype.copyProperties=function(_b32){
  13196. this.m_clientWidth=_b32.m_clientWidth;
  13197. this.m_scrollableClientWidth=_b32.m_scrollableClientWidth;
  13198. this.m_clientHeight=_b32.m_clientHeight;
  13199. this.m_scrollableClientHeight=_b32.m_scrollableClientHeight;
  13200. };
  13201. PinFreezeContainer.prototype.setViewerId=function(id){
  13202. this.m_viewerId=id;
  13203. };
  13204. PinFreezeContainer.prototype.getLid=function(){
  13205. return this.m_lid;
  13206. };
  13207. PinFreezeContainer.prototype.createPFContainer=function(_b34,_b35){
  13208. var _b36=document.createElement("temp");
  13209. if(this.m_cachedBaseContainer){
  13210. this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
  13211. this.m_cachedReportDiv=_b34;
  13212. var _b37=this.m_cachedBaseContainer.parentNode;
  13213. var _b38=this.loadTemplateHTML();
  13214. if(_b38){
  13215. _b36.innerHTML=_b38;
  13216. var _b39=this.getContainerByLID(_b36);
  13217. var _b3a=this.getSectionByLID(_b36.firstChild,"pfMainOutput");
  13218. if(_b3a){
  13219. var i=this.getChildPosition(_b37,this.m_cachedBaseContainer);
  13220. if(i!=-1){
  13221. var _b3c=this.m_pinFreezeManager.m_oCV;
  13222. if(_b3c&&_b3c.envParams["freezeDefaultWrap"]){
  13223. if(this.m_cachedBaseContainer.style.whiteSpace===""&&_b3c.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
  13224. var _b3d=this.m_cachedBaseContainer.getElementsByTagName("span");
  13225. if(_b3d){
  13226. for(var k=0;k<_b3d.length;k++){
  13227. _b3d[k].style.whiteSpace="nowrap";
  13228. }
  13229. }
  13230. this.m_wrapFlag=true;
  13231. }
  13232. }
  13233. if(!_b35){
  13234. if(!this._getFixedWidth()){
  13235. this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false");
  13236. this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1;
  13237. this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px";
  13238. }
  13239. if(!this._getFixedHeight()){
  13240. this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false");
  13241. this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight;
  13242. this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px";
  13243. }
  13244. _b3a.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
  13245. _b3a.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
  13246. }
  13247. _b3a.appendChild(this.m_cachedBaseContainer);
  13248. this.insertAt(_b37,_b39,i);
  13249. }
  13250. if(this.m_cachedBaseContainer.style.border!==""){
  13251. _b39.style.border=this.m_cachedBaseContainer.style.border;
  13252. this.m_cachedBaseContainer.style.border="";
  13253. }
  13254. }
  13255. }
  13256. }
  13257. };
  13258. PinFreezeContainer.prototype._getFixedWidth=function(_b3f){
  13259. if(_b3f&&_b3f.style.width&&!_b3f.getAttribute("authoredFixedWidth")){
  13260. var _b40=Number(_b3f.style.width.split("px")[0]);
  13261. return isNaN(_b40)?null:_b40;
  13262. }
  13263. return null;
  13264. };
  13265. PinFreezeContainer.prototype._getFixedHeight=function(_b41){
  13266. if(_b41&&_b41.style.height&&!_b41.getAttribute("authoredFixedHeight")){
  13267. var _b42=Number(_b41.style.height.split("px")[0]);
  13268. return isNaN(_b42)?null:_b42;
  13269. }
  13270. return null;
  13271. };
  13272. PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_b43){
  13273. var _b44=this._getFixedWidth(_b43);
  13274. if(_b44){
  13275. this.m_fixedWidth=_b44;
  13276. this.m_clientWidth=this.m_fixedWidth;
  13277. this.m_scrollableClientWidth=this.m_fixedWidth;
  13278. }
  13279. var _b45=this._getFixedHeight(_b43);
  13280. if(_b45){
  13281. this.m_fixedHeight=_b45;
  13282. this.m_clientHeight=this.m_fixedHeight;
  13283. this.m_scrollableClientHeight=this.m_fixedHeight;
  13284. }
  13285. };
  13286. PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
  13287. var _b46="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeTop\"><td align=\"center\" templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfHomeCell_"+this.m_lidNS+"\" style=\"overflow-x:hidden; overflow-y:hidden; width:100%; height:100%\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td templatePart=\"freezeTop\"></td></tr>"+"<tr><td class=\"BUXNoPrint\" valign=top templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"<td class=\"BUXNoPrint\" templatePart=\"freezeTop\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr>"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeSide\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\">&nbsp;</div>"+"</div>"+"</td><td></td></tr></table>";
  13288. return _b46;
  13289. };
  13290. PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
  13291. var _b47="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\"><tr>"+"<td class=\"BUXNoPrint\" valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"</tr>"+"<tr class=\"BUXNoPrint\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\">&nbsp;</div>"+"</div>"+"</td></tr></table>";
  13292. return _b47;
  13293. };
  13294. PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
  13295. var _b48="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\"><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td></td></tr>"+"<tr><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"></div></td>"+"<td class=\"BUXNoPrint\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr></table>";
  13296. return _b48;
  13297. };
  13298. PinFreezeContainer.prototype.loadTemplateHTML=function(){
  13299. if(this.m_freezeSide&&this.m_freezeTop){
  13300. return this.loadFreezeBothTemplateHTML();
  13301. }else{
  13302. if(this.m_freezeSide){
  13303. return this.loadFreezeSideTemplateHTML();
  13304. }else{
  13305. if(this.m_freezeTop){
  13306. return this.loadFreezeTopTemplateHTML();
  13307. }
  13308. }
  13309. }
  13310. return null;
  13311. };
  13312. PinFreezeContainer.prototype.createSideHeadings=function(_b49){
  13313. var _b4a=this.getSection("pfMainOutput");
  13314. var _b4b=_b4a.getAttribute("pfslid");
  13315. var _b4c=this.getSection("pfSideHeadings");
  13316. var _b4d=_b4c.getAttribute("pfslid");
  13317. var _b4e=this.getMainOutputHomeCell();
  13318. if(!_b4e){
  13319. return;
  13320. }
  13321. var _b4f=_b49;
  13322. var _b50=_b4c;
  13323. var _b51=this.isA11yEnabled(_b4f);
  13324. var _b52=this.m_pinFreezeManager.deepCloneNode(_b4f);
  13325. _b50.appendChild(_b52);
  13326. var _b53=this.getSectionHomeCell(_b4c);
  13327. if(!_b53){
  13328. return;
  13329. }
  13330. var _b54=_b4f.getElementsByTagName("tbody");
  13331. var _b55=_b52.getElementsByTagName("tbody");
  13332. if(_b54.length>0&&_b55.length>0){
  13333. var _b56=_b54[0];
  13334. var _b57=_b55[0];
  13335. var _b58=_b56.firstChild;
  13336. var _b59=_b57.firstChild;
  13337. var _b5a=_b4e.rowSpan;
  13338. this.markAsCopy(_b4e,_b53,_b4b,_b4d);
  13339. for(var r=0;r<_b5a;++r){
  13340. var _b5c=_b57.rows[r];
  13341. this.removeCTX(_b5c);
  13342. }
  13343. for(var r=_b5a;r<_b57.rows.length;++r){
  13344. var _b5d=_b56.rows[r];
  13345. var _b5c=_b57.rows[r];
  13346. _b5c.style.visibility="hidden";
  13347. for(var c=0;c<_b5c.cells.length;++c){
  13348. var _b5f=_b5c.cells[c];
  13349. if(_b51){
  13350. _b5f=this.m_pinFreezeManager.removeIdAttribute(_b5f);
  13351. }
  13352. if(_b5f.getAttribute("type")=="datavalue"){
  13353. _b5f.removeAttribute("ctx");
  13354. _b5f.removeAttribute("uid");
  13355. _b5f.removeAttribute("name");
  13356. }else{
  13357. var _b60=_b5d.cells[c];
  13358. this.markAsCopy(_b60,_b5f,_b4b,_b4d);
  13359. }
  13360. }
  13361. _b5c.style.visibility="visible";
  13362. }
  13363. }
  13364. };
  13365. PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_b61,_b62){
  13366. if(isFF()||isIE()){
  13367. if(_b61&&_b61.length&&_b61[0].cells&&_b61[0].cells.length>1){
  13368. if(this.m_freezeSide){
  13369. var _b63=this.getBorderInfo(_b61[0].cells[1],"right");
  13370. if(_b63){
  13371. _b62.style.borderRightWidth=_b63.borderRightWidth;
  13372. _b62.style.borderRightStyle=_b63.borderRightStyle;
  13373. _b62.style.borderRightColor=_b63.borderRightColor;
  13374. }
  13375. }
  13376. if(this.m_freezeTop){
  13377. var _b63=this.getBorderInfo(_b61[0].cells[1],"bottom");
  13378. if(_b63){
  13379. _b62.style.borderBottomWidth=_b63.borderBottomWidth;
  13380. _b62.style.borderBottomStyle=_b63.borderBottomStyle;
  13381. _b62.style.borderBottomColor=_b63.borderBottomColor;
  13382. }
  13383. }
  13384. }
  13385. }
  13386. };
  13387. PinFreezeContainer.prototype.createTopHeadings=function(_b64){
  13388. var _b65=this.getSection("pfMainOutput");
  13389. var _b66=_b65.getAttribute("pfslid");
  13390. var _b67=this.getSection("pfTopHeadings");
  13391. var _b68=_b67.getAttribute("pfslid");
  13392. var _b69=this.getMainOutputHomeCell();
  13393. if(!_b69){
  13394. return;
  13395. }
  13396. var _b6a=_b64;
  13397. var _b6b=_b67;
  13398. var _b6c=this.isA11yEnabled(_b6a);
  13399. var _b6d=this.m_pinFreezeManager.deepCloneNode(_b6a);
  13400. _b6d.setAttribute("clonednode","true");
  13401. _b6b.appendChild(_b6d);
  13402. var _b6e=_b6a.getElementsByTagName("tbody");
  13403. var _b6f=_b6d.getElementsByTagName("tbody");
  13404. if(_b6e.length>0&&_b6f.length>0){
  13405. var _b70=_b6e[0];
  13406. var _b71=_b6f[0];
  13407. var _b72=_b69.rowSpan;
  13408. for(var r=0;r<_b71.rows.length;++r){
  13409. var _b74=_b70.rows[r];
  13410. var _b75=_b71.rows[r];
  13411. if(_b6c){
  13412. _b75=this.m_pinFreezeManager.removeIdAttribute(_b75);
  13413. }
  13414. _b75.style.visibility="hidden";
  13415. for(var c=0;c<_b75.cells.length;++c){
  13416. var _b77=_b75.cells[c];
  13417. if(r>_b72||_b77.getAttribute("type")=="datavalue"){
  13418. _b77.removeAttribute("ctx");
  13419. _b77.removeAttribute("uid");
  13420. _b77.removeAttribute("name");
  13421. }else{
  13422. var _b78=_b74.cells[c];
  13423. this.markAsCopy(_b78,_b77,_b66,_b68);
  13424. if(_b78===_b69){
  13425. this.initializeHomeCellTabIndex(_b77);
  13426. this.applyNeighbouringBorderStylesToHomeCell(_b70.rows,_b77);
  13427. }
  13428. }
  13429. }
  13430. _b75.style.visibility="visible";
  13431. }
  13432. }
  13433. };
  13434. PinFreezeContainer.prototype.createHomeCellHeading=function(){
  13435. var _b79=this.getSection("pfMainOutput");
  13436. var _b7a=_b79.getAttribute("pfslid");
  13437. var _b7b=this.getSection("pfHomeCell");
  13438. var _b7c=_b7b.parentNode;
  13439. var _b7d=_b7b.getAttribute("pfslid");
  13440. var _b7e=this.getMainOutputHomeCell();
  13441. if(!_b7e){
  13442. return;
  13443. }
  13444. _b7c.style.height="100%";
  13445. var _b7f=this.getTopHeadingSectionHeight(_b7e);
  13446. _b7b.style.height=_b7f-this.m_containerMargin.top+"px";
  13447. _b7b.style.width=this.getSideHeadingSectionWidth(_b7e)-this.m_containerMargin.left+"px";
  13448. _b7b.style.marginTop=this.m_containerMargin.top+"px";
  13449. _b7b.style.marginLeft=this.m_containerMargin.left+"px";
  13450. var _b80=_b7e.parentNode;
  13451. var _b81=_b80.cloneNode(false);
  13452. var _b82=this._findBestGuessHomeCell(_b7e);
  13453. var _b83=document.createElement("div");
  13454. _b83.style.width="100%";
  13455. _b83.style.height="100%";
  13456. while(_b7e.offsetLeft<=_b82.offsetLeft){
  13457. oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_b7e);
  13458. if(isFF()||isIE()){
  13459. _b7e.appendChild(_b83);
  13460. oTargetHomeCell.style.width=_b83.clientWidth+"px";
  13461. _b7e.removeChild(_b83);
  13462. }else{
  13463. oTargetHomeCell.style.width=_b7e.clientWidth+1+"px";
  13464. }
  13465. oTargetHomeCell.style.borderBottomWidth="0px";
  13466. _b81.appendChild(oTargetHomeCell);
  13467. this.markAsCopy(_b7e,oTargetHomeCell,_b7a,_b7d);
  13468. if(_b7e.nextSibling){
  13469. _b7e=_b7e.nextSibling;
  13470. }else{
  13471. break;
  13472. }
  13473. }
  13474. if(oTargetHomeCell){
  13475. oTargetHomeCell.style.borderRightWidth="0px";
  13476. }
  13477. var _b84=_b80.parentNode;
  13478. var _b85=_b84.cloneNode(false);
  13479. _b85.appendChild(_b81);
  13480. var _b86=_b84.parentNode;
  13481. var _b87=_b86.cloneNode(false);
  13482. _b87.appendChild(_b85);
  13483. _b87.style.width="100%";
  13484. _b87.style.height="100%";
  13485. _b87.style.marginLeft="";
  13486. _b87.style.marginTop="";
  13487. _b7b.appendChild(_b87);
  13488. this.initializeHomeCellTabIndex(oTargetHomeCell);
  13489. this.applyNeighbouringBorderStylesToHomeCell(_b79.firstChild.rows,_b7b);
  13490. };
  13491. PinFreezeContainer.prototype.markAsCopy=function(main,copy,_b8a,_b8b){
  13492. if(!main.pfCopy){
  13493. main.setAttribute("pfslid",_b8a);
  13494. main.pfCopy=[];
  13495. }
  13496. main.pfCopy.push(copy);
  13497. copy.pfMain=main;
  13498. copy.setAttribute("pfslid",_b8b);
  13499. };
  13500. PinFreezeContainer.prototype.getCopy=function(_b8c){
  13501. if(_b8c.pfCopy){
  13502. var _b8d={};
  13503. for(var i in _b8c.pfCopy){
  13504. var copy=_b8c.pfCopy[i];
  13505. if(copy.getAttribute){
  13506. var _b90=copy.getAttribute("pfslid");
  13507. if(_b90){
  13508. var _b91=PinFreezeContainer.getSectionNameFromSlid(_b90);
  13509. var _b92=this.getSection(_b91);
  13510. if(_b92&&PinFreezeContainer.isSectionVisible(_b92)){
  13511. _b8d[_b91]=copy;
  13512. }
  13513. }
  13514. }
  13515. }
  13516. if(_b8d["pfHomeCell"]){
  13517. return _b8d["pfHomeCell"];
  13518. }
  13519. for(i in _b8d){
  13520. return _b8d[i];
  13521. }
  13522. }
  13523. return null;
  13524. };
  13525. PinFreezeContainer.prototype.getMain=function(_b93){
  13526. if(_b93.pfMain){
  13527. return _b93.pfMain;
  13528. }
  13529. return null;
  13530. };
  13531. PinFreezeContainer.isSectionVisible=function(_b94){
  13532. var node=_b94;
  13533. if(!node){
  13534. return false;
  13535. }
  13536. while(node.parentNode&&!node.getAttribute("pfclid")){
  13537. if(node.style&&node.style.display==="none"){
  13538. return false;
  13539. }
  13540. node=node.parentNode;
  13541. }
  13542. return (!node.style||node.style.display!=="none");
  13543. };
  13544. PinFreezeContainer.prototype.getSectionStructure=function(){
  13545. var _b96={isSideFrozen:false,isTopFrozen:false};
  13546. if(this.m_freezeSide){
  13547. var side=this.getSection("pfSideHeadings");
  13548. if(side){
  13549. _b96.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
  13550. }
  13551. }
  13552. if(this.m_freezeTop){
  13553. var top=this.getSection("pfTopHeadings");
  13554. if(top){
  13555. _b96.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
  13556. }
  13557. }
  13558. return _b96;
  13559. };
  13560. PinFreezeContainer.prototype.checkSectionStructureChange=function(_b99,_b9a){
  13561. if(_b99.isSideFrozen!==_b9a.isSideFrozen||_b99.isTopFrozen!==_b9a.isTopFrozen){
  13562. this.m_pinFreezeManager.sectionStructureChange();
  13563. }
  13564. };
  13565. PinFreezeContainer.prototype.freezeContainerInReport=function(_b9b){
  13566. this.cacheContainerAndSections(this.getContainerByLID(_b9b));
  13567. this.m_homeCellNodes={};
  13568. this.updateContainer();
  13569. };
  13570. PinFreezeContainer.prototype.frozenSectionsRequired=function(){
  13571. return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
  13572. };
  13573. PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
  13574. var _b9c=this.getSection("pfMainOutput");
  13575. if(_b9c){
  13576. if(this.m_freezeSide){
  13577. var _b9d=_b9c.scrollWidth;
  13578. return ((this.m_clientWidth<_b9d)||_b9d==0);
  13579. }
  13580. }
  13581. return false;
  13582. };
  13583. PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
  13584. var _b9e=this.getSection("pfMainOutput");
  13585. if(_b9e){
  13586. if(this.m_freezeTop){
  13587. var _b9f=_b9e.scrollHeight;
  13588. return ((this.m_clientHeight<_b9f)||_b9f==0);
  13589. }
  13590. }
  13591. return false;
  13592. };
  13593. PinFreezeContainer.prototype.showTemplatePart=function(_ba0,_ba1){
  13594. var _ba2=this.getContainer().rows;
  13595. for(var r=0;r<_ba2.length;++r){
  13596. if(_ba2[r].getAttribute("templatePart")===_ba0){
  13597. _ba2[r].style.display=((_ba1)?"":"none");
  13598. }else{
  13599. var _ba4=_ba2[r].cells;
  13600. for(var c=0;c<_ba4.length;++c){
  13601. if(_ba4[c].getAttribute("templatePart")===_ba0){
  13602. _ba4[c].style.display=((_ba1)?"":"none");
  13603. }
  13604. }
  13605. }
  13606. }
  13607. };
  13608. PinFreezeContainer.prototype.showFreezeTopOnly=function(_ba6){
  13609. if(!(this.m_freezeTop&&this.m_freezeSide)){
  13610. return;
  13611. }
  13612. var _ba7=(_ba6.scrollWidth==0)?_ba6.clientWidth:_ba6.scrollWidth;
  13613. this.updateMainOutputWidth(_ba7);
  13614. this.setScrollX(_ba6,0);
  13615. if(this.getSection("pfTopHeadings")){
  13616. this.getSection("pfTopHeadings").style.width=_ba7+"px";
  13617. this.setScrollX(this.getSection("pfTopHeadings"),0);
  13618. }
  13619. this.showTemplatePart("freezeSide",false);
  13620. };
  13621. PinFreezeContainer.prototype.showFreezeSideOnly=function(_ba8){
  13622. if(!(this.m_freezeTop&&this.m_freezeSide)){
  13623. return;
  13624. }
  13625. var _ba9=(_ba8.scrollHeight==0)?_ba8.clientHeight:_ba8.scrollHeight;
  13626. this.updateMainOutputHeight(_ba9);
  13627. this.setScrollY(_ba8,0);
  13628. if(this.getSection("pfSideHeadings")){
  13629. this.getSection("pfSideHeadings").style.height=_ba9+"px";
  13630. this.setScrollY(this.getSection("pfSideHeadings"),0);
  13631. }
  13632. this.showTemplatePart("freezeTop",false);
  13633. };
  13634. PinFreezeContainer.prototype.showAll=function(){
  13635. if(!(this.m_freezeTop&&this.m_freezeSide)){
  13636. return;
  13637. }
  13638. this.showTemplatePart("freezeTop",true);
  13639. this.showTemplatePart("freezeSide",true);
  13640. };
  13641. PinFreezeContainer.prototype.showMainOutputOnly=function(_baa){
  13642. this.updateMainOutputWidth((_baa.scrollWidth==0)?_baa.clientWidth:_baa.scrollWidth);
  13643. this.updateMainOutputHeight((_baa.scrollHeight==0)?_baa.clientHeight:_baa.scrollHeight);
  13644. this.setInitialScrollPosition(_baa,0,0);
  13645. if(this.m_freezeSide&&this.m_freezeTop){
  13646. this.getSection("pfHomeCell").style.display="none";
  13647. }
  13648. if(this.m_freezeSide){
  13649. this.getSection("pfSideHeadings").style.display="none";
  13650. this.getSection("pfHorizontalScrollBar").style.display="none";
  13651. }
  13652. if(this.m_freezeTop){
  13653. this.getSection("pfTopHeadings").style.display="none";
  13654. this.getSection("pfVerticalScrollBar").style.display="none";
  13655. }
  13656. };
  13657. PinFreezeContainer.prototype.getWrap=function(el){
  13658. if(el.currentStyle){
  13659. return el.currentStyle.whiteSpace;
  13660. }else{
  13661. if(window.getComputedStyle){
  13662. return window.getComputedStyle(el,null).getPropertyValue("white-space");
  13663. }else{
  13664. return el.style.whiteSpace;
  13665. }
  13666. }
  13667. };
  13668. PinFreezeContainer.prototype.getStyleDisplay=function(el){
  13669. if(el.currentStyle){
  13670. return el.currentStyle.display;
  13671. }else{
  13672. if(window.getComputedStyle){
  13673. return window.getComputedStyle(el,null).getPropertyValue("display");
  13674. }else{
  13675. return el.style.display;
  13676. }
  13677. }
  13678. };
  13679. PinFreezeContainer.prototype.headingsCreated=function(_bad){
  13680. return _bad.firstChild?true:false;
  13681. };
  13682. PinFreezeContainer.prototype.updateContainer=function(){
  13683. var _bae=this.getSection("pfMainOutput");
  13684. var _baf=this.getMainOutputHomeCell();
  13685. if(_baf){
  13686. if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
  13687. this.m_scrollableClientHeight-=_baf.offsetHeight;
  13688. var _bb0=this.calculateMinCrossTabScrollableClientHeight();
  13689. if(_bb0>this.m_scrollableClientHeight){
  13690. this.m_scrollableClientHeight=_bb0;
  13691. }
  13692. }
  13693. if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
  13694. this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_baf);
  13695. }
  13696. }
  13697. if(_bae&&_baf){
  13698. this.showAll();
  13699. if(this.frozenSectionsRequired()){
  13700. this.updateMainOutputSize();
  13701. this.initializeHomeCellTabIndex(_baf);
  13702. if(this.m_freezeSide){
  13703. var _bb1=this.getSection("pfSideHeadings");
  13704. if(!this.headingsCreated(_bb1)){
  13705. this.createSideHeadings(this.m_cachedBaseContainer);
  13706. if(this.m_freezeTop){
  13707. this.initializeTouchScrolling(_bb1);
  13708. }
  13709. }
  13710. var _bb2=this.getSection("pfHorizontalScrollBar");
  13711. _bb2.scrollLeft="0px";
  13712. }
  13713. if(this.m_freezeTop){
  13714. var _bb3=this.getSection("pfTopHeadings");
  13715. if(!this.headingsCreated(_bb3)){
  13716. this.createTopHeadings(this.m_cachedBaseContainer);
  13717. if(this.m_freezeSide){
  13718. this.initializeTouchScrolling(_bb3);
  13719. }
  13720. }
  13721. var _bb4=this.getSection("pfVerticalScrollBar");
  13722. _bb4.scrollTop="0px";
  13723. }
  13724. if(this.m_freezeSide&&this.m_freezeTop){
  13725. var _bb5=this.getSection("pfHomeCell");
  13726. if(!this.headingsCreated(_bb5)){
  13727. this.createHomeCellHeading();
  13728. }
  13729. _bb5.style.display="";
  13730. }
  13731. var _bb6=this.updateSideHeadingSize(_baf);
  13732. var _bb7=this.updateTopHeadingSize(_baf);
  13733. if(!this.frozenSectionsRequired()){
  13734. this.showMainOutputOnly(_bae);
  13735. }
  13736. this.setInitialScrollPosition(_bae,_bb6,_bb7);
  13737. if(this.m_freezeTop&&this.m_freezeSide){
  13738. this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_bb7);
  13739. this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_bb6,0);
  13740. }
  13741. this.initializeTouchScrolling(_bae);
  13742. }else{
  13743. this.showMainOutputOnly(_bae);
  13744. this.removeTouchScrolling();
  13745. }
  13746. this.updateTabIndexValues();
  13747. }
  13748. };
  13749. PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
  13750. var _bb8=0;
  13751. if(this.m_cachedPFContainer){
  13752. var _bb9=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
  13753. if(_bb9){
  13754. var _bba=0;
  13755. for(var r=0;r<_bb9.rows.length;r++){
  13756. var row=_bb9.rows[r];
  13757. for(var c=0;c<row.cells.length;c++){
  13758. var cell=row.cells[c];
  13759. if(cell.getAttribute("type")=="datavalue"){
  13760. _bba++;
  13761. if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
  13762. _bb8=_bb8+cell.offsetHeight;
  13763. }else{
  13764. _bba++;
  13765. var _bbf=this.getSection("pfVerticalScrollBar");
  13766. if(_bbf){
  13767. _bb8=_bbf.offsetWidth*2;
  13768. }
  13769. }
  13770. break;
  13771. }
  13772. }
  13773. if(_bba>=2){
  13774. break;
  13775. }
  13776. }
  13777. }
  13778. }
  13779. return _bb8;
  13780. };
  13781. PinFreezeContainer.prototype.updateSideHeadingSize=function(_bc0){
  13782. var _bc1=0;
  13783. if(this.m_freezeSide){
  13784. var _bc2=this.getSection("pfMainOutput");
  13785. if(!_bc2){
  13786. return 0;
  13787. }
  13788. if(!this.frozenSideHeadingsRequired()){
  13789. this.showFreezeTopOnly(_bc2);
  13790. return 0;
  13791. }
  13792. var _bc3=this.getSection("pfSideHeadings");
  13793. _bc1=this.getSideHeadingSectionWidth(_bc0);
  13794. var _bc4=this.getSection("pfHorizontalScrollBar");
  13795. var _bc5=this.getSectionHomeCell(_bc3);
  13796. if(_bc3.style.display=="none"){
  13797. _bc3.style.display="";
  13798. _bc4.style.display="";
  13799. }
  13800. _bc3.style.width=_bc1+"px";
  13801. _bc3.style.height=_bc2.clientHeight+"px";
  13802. }
  13803. return _bc1;
  13804. };
  13805. PinFreezeContainer.prototype.updateTopHeadingSize=function(_bc6){
  13806. var _bc7=0;
  13807. if(this.m_freezeTop){
  13808. var _bc8=this.getSection("pfMainOutput");
  13809. if(!_bc8){
  13810. return 0;
  13811. }
  13812. if(!this.frozenTopHeadingsRequired()){
  13813. this.showFreezeSideOnly(_bc8);
  13814. return 0;
  13815. }
  13816. var _bc9=this.getSection("pfTopHeadings");
  13817. _bc7=this.getTopHeadingSectionHeight(_bc6);
  13818. var _bca=this.getSection("pfVerticalScrollBar");
  13819. var _bcb=this.getSectionHomeCell(_bc9);
  13820. if(_bc9.style.display=="none"){
  13821. _bc9.style.display="";
  13822. _bca.style.display="";
  13823. }
  13824. _bc9.style.height=_bc7+"px";
  13825. _bc9.style.width=_bc8.clientWidth+"px";
  13826. }
  13827. return _bc7;
  13828. };
  13829. PinFreezeContainer.prototype.setScrollX=function(_bcc,_bcd){
  13830. if(getElementDirection(_bcc)==="rtl"){
  13831. setScrollRight(_bcc,_bcd);
  13832. }else{
  13833. setScrollLeft(_bcc,_bcd);
  13834. }
  13835. };
  13836. PinFreezeContainer.prototype.setScrollY=function(_bce,_bcf){
  13837. _bce.scrollTop=_bcf;
  13838. };
  13839. PinFreezeContainer.prototype.setInitialScrollPosition=function(_bd0,_bd1,_bd2){
  13840. if(getElementDirection(_bd0)==="rtl"){
  13841. setScrollRight(_bd0,_bd1);
  13842. }else{
  13843. setScrollLeft(_bd0,_bd1);
  13844. }
  13845. _bd0.scrollTop=_bd2;
  13846. };
  13847. PinFreezeContainer.prototype.getScrollableClientWidth=function(){
  13848. return this.m_scrollableClientWidth;
  13849. };
  13850. PinFreezeContainer.prototype.setScrollableClientWidth=function(_bd3){
  13851. this.m_scrollableClientWidth=_bd3;
  13852. };
  13853. PinFreezeContainer.prototype.getContainerWidth=function(){
  13854. return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth;
  13855. };
  13856. PinFreezeContainer.prototype.getClientWidth=function(){
  13857. return this.m_clientWidth;
  13858. };
  13859. PinFreezeContainer.prototype.getScrollableClientHeight=function(){
  13860. return this.m_scrollableClientHeight;
  13861. };
  13862. PinFreezeContainer.prototype.setScrollableClientHeight=function(_bd4){
  13863. this.m_scrollableClientHeight=_bd4;
  13864. };
  13865. PinFreezeContainer.prototype.getClientHeight=function(){
  13866. return this.m_clientHeight;
  13867. };
  13868. PinFreezeContainer.prototype.clientHeight=function(_bd5){
  13869. return _bd5.clientHeight;
  13870. };
  13871. PinFreezeContainer.prototype.findBestContainerHeight=function(_bd6){
  13872. if(this.m_freezeTop&&this.m_cachedReportDiv){
  13873. var _bd7=this.m_cachedReportDiv.parentNode;
  13874. if(_bd7){
  13875. var _bd8=this._findRestOfPageHeight(this.getContainer());
  13876. return _bd6-_bd8-(this.c_pageMargin/2)-this.m_containerMargin.top;
  13877. }
  13878. }
  13879. return _bd6-this.c_pageMargin;
  13880. };
  13881. PinFreezeContainer.prototype.findBestContainerWidth=function(_bd9){
  13882. var node=this.getContainer();
  13883. while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  13884. node=node.parentNode;
  13885. }
  13886. if(!node){
  13887. return -1;
  13888. }
  13889. if(node.nodeName.toLowerCase()=="td"){
  13890. var _bdb=0;
  13891. var _bdc=node.parentNode.childNodes;
  13892. for(var i=0;i<_bdc.length;i++){
  13893. if(_bdc[i]!==node){
  13894. _bdb+=_bdc[i].clientWidth;
  13895. }
  13896. }
  13897. return _bd9-_bdb-(this.c_pageMargin/2);
  13898. }
  13899. return _bd9;
  13900. };
  13901. PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
  13902. var _bdf=0;
  13903. var _be0=node.parentNode;
  13904. if(!_be0){
  13905. return _bdf;
  13906. }
  13907. if(_be0.childNodes.length>1){
  13908. for(var i=0;i<_be0.childNodes.length;i++){
  13909. var _be2=_be0.childNodes[i];
  13910. if(_be2.nodeType==1){
  13911. var _be3=this.getStyleDisplay(_be2);
  13912. if(_be2!=node&&!isNaN(_be2.clientHeight)&&_be3!="none"&&_be3!="table-cell"){
  13913. _bdf+=this.clientHeight(_be2);
  13914. }
  13915. }
  13916. }
  13917. }
  13918. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  13919. _bdf+=this._findRestOfPageHeight(_be0);
  13920. }
  13921. return _bdf;
  13922. };
  13923. PinFreezeContainer.prototype.resize=function(_be4,_be5,_be6,_be7){
  13924. if(this.m_fixedWidth&&this.m_fixedHeight){
  13925. return;
  13926. }
  13927. _be4=(this.m_fixedWidth)?this.m_fixedWidth:_be4;
  13928. _be5=(this.m_fixedHeight)?this.m_fixedHeight:_be5;
  13929. var _be8=this.getSectionStructure();
  13930. if(this.m_sectionCache&&this.m_cachedPFContainer){
  13931. var _be9=0;
  13932. if(_be5!==0){
  13933. _be9=this.findBestContainerHeight(_be5);
  13934. if(_be6&&_be9<300){
  13935. _be9=300;
  13936. }else{
  13937. if(_be9<100){
  13938. _be9=100;
  13939. }
  13940. }
  13941. }
  13942. this.m_clientHeight=_be9>0?_be9:this.m_clientHeight;
  13943. var _bea=0;
  13944. if(_be4!==0){
  13945. _bea=this.findBestContainerWidth(_be4);
  13946. }
  13947. this.m_clientWidth=(_bea>0)?_bea-5-(this.c_pageMargin/2):this.m_clientWidth;
  13948. var _beb=this.getSection("pfMainOutput");
  13949. var _bec=this.getSectionHomeCell(_beb);
  13950. if(_bec){
  13951. this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_bec);
  13952. this.m_scrollableClientHeight=this.m_clientHeight-_bec.offsetHeight;
  13953. }
  13954. if(_be7){
  13955. var _bed=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_be7.lid);
  13956. if(_bed){
  13957. var node=_bed[0];
  13958. while(node.nodeName.toLowerCase()!="table"){
  13959. node=node.parentNode;
  13960. }
  13961. node.style.width=_be7.width+"px";
  13962. }
  13963. }
  13964. this.updateContainer();
  13965. }else{
  13966. this.m_clientWidth=_be4-this.c_pageMargin;
  13967. this.m_clientHeight=_be5-this.c_pageMargin;
  13968. }
  13969. var _bef=this.getSectionStructure();
  13970. this.checkSectionStructureChange(_be8,_bef);
  13971. };
  13972. PinFreezeContainer.prototype.updateMainOutputSize=function(){
  13973. if(this.m_freezeSide&&this.m_freezeTop){
  13974. if(this.frozenSideHeadingsRequired()){
  13975. this.updateMainOutputWidth(this.getScrollableClientWidth());
  13976. }
  13977. if(this.frozenTopHeadingsRequired()){
  13978. this.updateMainOutputHeight(this.getScrollableClientHeight());
  13979. }
  13980. }else{
  13981. if(this.m_freezeSide){
  13982. this.updateMainOutputWidth(this.getScrollableClientWidth());
  13983. }else{
  13984. if(this.m_freezeTop){
  13985. this.updateMainOutputHeight(this.getScrollableClientHeight());
  13986. }
  13987. }
  13988. }
  13989. };
  13990. PinFreezeContainer.prototype.updateMainOutputWidth=function(_bf0){
  13991. var _bf1=this.getSection("pfMainOutput");
  13992. if(!_bf1){
  13993. return;
  13994. }
  13995. if(this.m_freezeSide==true){
  13996. _bf1.style.width=(_bf0+"px");
  13997. if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
  13998. _bf1.style.height=_bf1.firstChild.clientHeight+"px";
  13999. }
  14000. var _bf2=this.getSection("pfHorizontalScrollBar");
  14001. if(_bf2){
  14002. _bf2.style.width=(_bf0+"px");
  14003. var _bf3=_bf2.firstChild;
  14004. if(_bf3){
  14005. var _bf4=this.getSectionHomeCell(_bf1);
  14006. var _bf5=_bf1.scrollWidth-this.getHomeCellOffsetWidth(_bf4);
  14007. _bf3.style.width=_bf5+"px";
  14008. }
  14009. }
  14010. }
  14011. };
  14012. PinFreezeContainer.prototype.updateMainOutputHeight=function(_bf6){
  14013. var _bf7=this.getSection("pfMainOutput");
  14014. if(!_bf7){
  14015. return;
  14016. }
  14017. _bf7.style.height=(_bf6+"px");
  14018. if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
  14019. _bf7.style.width=_bf7.firstChild.clientWidth+2+"px";
  14020. }
  14021. var _bf8=this.getSection("pfVerticalScrollBar");
  14022. if(_bf8){
  14023. _bf8.style.height=(_bf6+"px");
  14024. var _bf9=_bf8.firstChild;
  14025. if(_bf9){
  14026. var _bfa=this.getSectionHomeCell(_bf7);
  14027. var _bfb=_bf7.scrollHeight-_bfa.offsetHeight;
  14028. _bf9.style.height=_bfb+"px";
  14029. }
  14030. }
  14031. };
  14032. PinFreezeContainer.prototype.getElementByLID=function(_bfc,tag,lid){
  14033. var _bff=getElementsByAttribute(_bfc,tag,"lid",lid);
  14034. if(_bff.length>0){
  14035. return _bff[0];
  14036. }
  14037. return null;
  14038. };
  14039. PinFreezeContainer.prototype.getContainerByLID=function(_c00){
  14040. var _c01=getElementsByAttribute(_c00,"table","pfclid","pfContainer_"+this.m_lidNS);
  14041. if(_c01.length>0){
  14042. return _c01[0];
  14043. }
  14044. return null;
  14045. };
  14046. PinFreezeContainer.prototype.getSectionByLID=function(_c02,_c03){
  14047. var _c04=getElementsByAttribute(_c02,"div","pfslid",_c03+"_"+this.m_lidNS);
  14048. if(_c04.length>0){
  14049. return _c04[0];
  14050. }
  14051. return null;
  14052. };
  14053. PinFreezeContainer.getSectionNameFromSlid=function(slid){
  14054. return slid?slid.split("_")[0]:null;
  14055. };
  14056. PinFreezeContainer.getLidFromSlid=function(slid){
  14057. return slid.split("_")[1];
  14058. };
  14059. PinFreezeContainer.nodeToSlid=function(_c07){
  14060. while(_c07.parentNode&&!_c07.getAttribute("pfslid")){
  14061. _c07=_c07.parentNode;
  14062. }
  14063. if(_c07.getAttribute){
  14064. return _c07.getAttribute("pfslid");
  14065. }
  14066. return null;
  14067. };
  14068. PinFreezeContainer.prototype.cacheContainerAndSections=function(_c08){
  14069. if(!_c08){
  14070. return _c08;
  14071. }
  14072. this.m_cachedPFContainer=_c08;
  14073. var _c09=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
  14074. this.m_sectionCache={};
  14075. for(var i=0;i<_c09.length;++i){
  14076. var key=_c09[i].getAttribute("pfslid");
  14077. key=key.split("_",1);
  14078. this.m_sectionCache[key]=_c09[i];
  14079. }
  14080. return _c08;
  14081. };
  14082. PinFreezeContainer.prototype.getContainer=function(){
  14083. return this.m_cachedPFContainer;
  14084. };
  14085. PinFreezeContainer.prototype.getSection=function(key){
  14086. if(!this.m_sectionCache){
  14087. return null;
  14088. }
  14089. if(!this.m_sectionCache[key]){
  14090. this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key);
  14091. }
  14092. return this.m_sectionCache[key];
  14093. };
  14094. PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_c0d){
  14095. var slid=PinFreezeContainer.nodeToSlid(_c0d);
  14096. if(!this.m_homeCellNodes[slid]){
  14097. var _c0f=getElementsByAttribute(_c0d,"*","tabIndex","*");
  14098. for(var i in _c0f){
  14099. if(!_c0f[i].getAttribute("widgetid")){
  14100. this.m_homeCellNodes[slid]=_c0f[i];
  14101. break;
  14102. }
  14103. }
  14104. }
  14105. };
  14106. PinFreezeContainer.prototype.updateTabIndexValues=function(){
  14107. if(this.isContainerFrozen()){
  14108. for(var slid in this.m_homeCellNodes){
  14109. var _c12=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
  14110. this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12);
  14111. }
  14112. }else{
  14113. for(var slid in this.m_homeCellNodes){
  14114. var _c12=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
  14115. this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12);
  14116. }
  14117. }
  14118. };
  14119. PinFreezeContainer.prototype.getSectionHomeCell=function(_c13){
  14120. if(_c13){
  14121. var _c14=this.getElementByLID(_c13,"table",this.m_lid+this.m_viewerId);
  14122. if(_c14&&_c14.rows.length&&_c14.rows[0].cells.length){
  14123. return _c14.rows[0].cells[0];
  14124. }
  14125. }
  14126. return null;
  14127. };
  14128. PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
  14129. var _c15=this.getSection("pfMainOutput");
  14130. if(!_c15){
  14131. _c15=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
  14132. }
  14133. return this.getSectionHomeCell(_c15);
  14134. };
  14135. PinFreezeContainer.prototype.getChildPosition=function(_c16,_c17){
  14136. for(var i=0;i<_c16.childNodes.length;++i){
  14137. if(_c16.childNodes[i]==_c17){
  14138. return i;
  14139. }
  14140. }
  14141. return -1;
  14142. };
  14143. PinFreezeContainer.prototype.insertAt=function(_c19,_c1a,_c1b){
  14144. if(_c1b==_c19.childNodes.length){
  14145. _c19.appendChild(_c1a);
  14146. }else{
  14147. _c19.insertBefore(_c1a,_c19.childNodes[_c1b]);
  14148. }
  14149. };
  14150. PinFreezeContainer.prototype.synchScroll=function(){
  14151. if(!this.m_cachedPFContainer){
  14152. return;
  14153. }
  14154. var _c1c=this.getMainOutputHomeCell();
  14155. var _c1d=this.getSection("pfMainOutput");
  14156. var _c1e=this.getSection("pfSideHeadings");
  14157. if(_c1e!=null){
  14158. var _c1f=this.getSection("pfHorizontalScrollBar");
  14159. if(_c1f){
  14160. var _c20=this.getSideHeadingSectionWidth(_c1c);
  14161. if(getElementDirection(_c1d)==="rtl"){
  14162. _c20=0;
  14163. }
  14164. setScrollLeft(_c1d,getScrollLeft(_c1f)+_c20);
  14165. if(this.m_freezeTop){
  14166. setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_c1f)+_c20);
  14167. }
  14168. }
  14169. }
  14170. };
  14171. PinFreezeContainer.prototype.updateScroll=function(_c21){
  14172. var slid=PinFreezeContainer.nodeToSlid(_c21);
  14173. if(!slid){
  14174. return;
  14175. }
  14176. var _c23=PinFreezeContainer.getSectionNameFromSlid(slid);
  14177. if(!_c23){
  14178. return;
  14179. }
  14180. var _c24=document.getElementById("CVReport"+this.m_viewerId);
  14181. if(!_c24){
  14182. return;
  14183. }
  14184. if(!this.m_cachedPFContainer){
  14185. return;
  14186. }
  14187. var _c25=_c21.parentNode;
  14188. if(_c25){
  14189. var _c26=_c25.tagName.toLowerCase();
  14190. if(_c26==="td"||_c26==="th"){
  14191. var _c27=this.getMainOutputHomeCell();
  14192. var _c28=this.getSection("pfMainOutput");
  14193. if(_c23==="pfMainOutput"||_c23==="pfTopHeadings"){
  14194. var _c29=this.getSection("pfHorizontalScrollBar");
  14195. if(_c29){
  14196. var _c2a=PinFreezeContainer.calculateNewPosition(_c25.offsetLeft,_c25.offsetWidth,getScrollLeft(_c28),_c28.offsetWidth);
  14197. var _c2b=this.getHomeCellOffsetWidth(_c27);
  14198. if(getElementDirection(_c28)==="rtl"){
  14199. _c2b=0;
  14200. }
  14201. setScrollLeft(_c29,_c2a-_c2b);
  14202. setScrollLeft(_c28,_c2a);
  14203. }
  14204. }
  14205. if(_c23==="pfMainOutput"||_c23==="pfSideHeadings"){
  14206. var _c2c=this.getSection("pfVerticalScrollBar");
  14207. if(_c2c){
  14208. var _c2d=PinFreezeContainer.calculateNewPosition(_c25.offsetTop,_c25.offsetHeight,_c28.scrollTop,_c28.offsetHeight);
  14209. _c2c.scrollTop=_c2d-_c27.offsetHeight;
  14210. _c28.scrollTop=_c2d;
  14211. }
  14212. }
  14213. }
  14214. }
  14215. };
  14216. PinFreezeContainer.calculateNewPosition=function(_c2e,_c2f,_c30,_c31){
  14217. var _c32=_c2e+_c2f;
  14218. var _c33=_c30+_c31;
  14219. if(_c30>_c2e){
  14220. return _c2e;
  14221. }else{
  14222. if(_c33<_c32){
  14223. if(_c2f>_c31){
  14224. return _c2e;
  14225. }
  14226. return _c32-_c31;
  14227. }
  14228. }
  14229. return _c30;
  14230. };
  14231. PinFreezeContainer.prototype.synchVScroll=function(){
  14232. if(!this.m_cachedPFContainer){
  14233. return;
  14234. }
  14235. var _c34=this.getMainOutputHomeCell();
  14236. var _c35=this.getSection("pfMainOutput");
  14237. var _c36=this.getSection("pfTopHeadings");
  14238. if(_c36!=null){
  14239. var _c37=this.getSection("pfVerticalScrollBar");
  14240. if(_c37){
  14241. _c35.scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34);
  14242. if(this.m_freezeSide){
  14243. this.getSection("pfSideHeadings").scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34);
  14244. }
  14245. }
  14246. }
  14247. };
  14248. PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_c38){
  14249. return _c38.offsetHeight+_c38.offsetTop+this.m_containerMargin.top;
  14250. };
  14251. PinFreezeContainer.prototype._findBestGuessHomeCell=function(_c39){
  14252. if(this.m_bestGuessHomeCell){
  14253. return this.m_bestGuessHomeCell;
  14254. }
  14255. if(_c39){
  14256. var _c3a=_c39.parentNode.parentNode;
  14257. var _c3b=_c39.rowSpan?(_c39.rowSpan):1;
  14258. var tr=_c3a.childNodes[_c3b];
  14259. if(tr){
  14260. var _c3d=tr.childNodes.length;
  14261. var _c3e=null;
  14262. var td=null;
  14263. for(var i=0;i<_c3d;i++){
  14264. td=tr.childNodes[i];
  14265. if(td.getAttribute("type")=="datavalue"){
  14266. break;
  14267. }
  14268. _c3e=td;
  14269. }
  14270. if(_c3e){
  14271. this.m_bestGuessHomeCell=_c3e;
  14272. return this.m_bestGuessHomeCell;
  14273. }
  14274. }else{
  14275. return _c39;
  14276. }
  14277. }
  14278. return null;
  14279. };
  14280. PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_c41){
  14281. var _c42=this._findBestGuessHomeCell(_c41);
  14282. return _c42?_c42.offsetWidth:0;
  14283. };
  14284. PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_c43){
  14285. var _c44=this._findBestGuessHomeCell(_c43);
  14286. if(_c44){
  14287. return _c44.offsetWidth+_c44.offsetLeft+this.m_containerMargin.left;
  14288. }else{
  14289. return _c43.offsetWidth+_c43.offsetLeft;
  14290. }
  14291. };
  14292. PinFreezeContainer.prototype.isContainerFrozen=function(){
  14293. return (this.m_freezeTop||this.m_freezeSide);
  14294. };
  14295. PinFreezeContainer.prototype.unfreeze=function(_c45){
  14296. var _c46=this.getContainerByLID(_c45);
  14297. this.m_freezeTop=false;
  14298. this.m_freezeSide=false;
  14299. if(_c46){
  14300. var _c47=_c46.parentNode;
  14301. pfMainOutput=this.getSectionByLID(_c46,"pfMainOutput");
  14302. if(pfMainOutput&&_c47){
  14303. if(_c46.style.border!==""){
  14304. pfMainOutput.firstChild.style.border=_c46.style.border;
  14305. _c46.style.border="";
  14306. }
  14307. if(this.m_wrapFlag){
  14308. var _c48=pfMainOutput.firstChild.getElementsByTagName("span");
  14309. if(_c48){
  14310. for(var k=0;k<_c48.length;k++){
  14311. _c48[k].style.whiteSpace="";
  14312. }
  14313. }
  14314. this.m_wrapFlag=false;
  14315. }
  14316. this.updateTabIndexValues();
  14317. if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){
  14318. this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth");
  14319. this.m_cachedBaseContainer.style.width="auto";
  14320. this.m_addedFixedWidth=null;
  14321. }
  14322. if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){
  14323. this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight");
  14324. this.m_cachedBaseContainer.style.height="auto";
  14325. this.m_addedFixedHeight=null;
  14326. }
  14327. _c47.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_c46);
  14328. }
  14329. }
  14330. };
  14331. PinFreezeContainer.prototype.getBorderInfo=function(el,_c4b){
  14332. var _c4c={};
  14333. var _c4d="border-"+_c4b+"-";
  14334. var _c4e="border"+_c4b.charAt(0).toUpperCase()+_c4b.substring(1);
  14335. if(el.currentStyle){
  14336. _c4c[_c4e+"Width"]=el.currentStyle[_c4e+"Width"];
  14337. _c4c[_c4e+"Style"]=el.currentStyle[_c4e+"Style"];
  14338. _c4c[_c4e+"Color"]=el.currentStyle[_c4e+"Color"];
  14339. }else{
  14340. if(window.getComputedStyle){
  14341. _c4c[_c4e+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"width");
  14342. _c4c[_c4e+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"style");
  14343. _c4c[_c4e+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"color");
  14344. }else{
  14345. return null;
  14346. }
  14347. }
  14348. return _c4c;
  14349. };
  14350. PinFreezeContainer.prototype.isA11yEnabled=function(_c4f){
  14351. return (_c4f.getAttribute("role")==="grid");
  14352. };
  14353. PinFreezeContainer.isElementInMainOutput=function(_c50){
  14354. var _c51=PinFreezeContainer.nodeToSlid(_c50);
  14355. if(_c51){
  14356. return (_c51.indexOf("pfMainOutput_")===0);
  14357. }
  14358. return false;
  14359. };
  14360. PinFreezeContainer.prototype.removeCTX=function(_c52){
  14361. _c52.removeAttribute("ctx");
  14362. var _c53=getElementsByAttribute(_c52,"*","ctx","*");
  14363. if(_c53&&_c53.length){
  14364. for(var i=0;i<_c53.length;i++){
  14365. _c53[i].removeAttribute("ctx");
  14366. }
  14367. }
  14368. };
  14369. PinFreezeContainer.prototype.initializeTouchScrolling=function(_c55){
  14370. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  14371. return;
  14372. }
  14373. if(_c55){
  14374. _c55.m_pinFreezeContainer=this;
  14375. if(document.attachEvent){
  14376. _c55.attachEvent("touchstart",this.touchStart);
  14377. _c55.attachEvent("touchmove",this.touchMove);
  14378. _c55.attachEvent("touchend",this.touchEnd);
  14379. }else{
  14380. _c55.addEventListener("touchstart",this.touchStart,false);
  14381. _c55.addEventListener("touchmove",this.touchMove,false);
  14382. _c55.addEventListener("touchend",this.touchEnd,false);
  14383. }
  14384. }
  14385. };
  14386. PinFreezeContainer.prototype.removeTouchScrolling=function(){
  14387. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  14388. return;
  14389. }
  14390. this.removeTouchScrollingEvents(this.getSection("pfMainOutput"));
  14391. this.removeTouchScrollingEvents(this.getSection("pfSideHeadings"));
  14392. this.removeTouchScrollingEvents(this.getSection("pfTopHeadings"));
  14393. };
  14394. PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_c56){
  14395. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  14396. return;
  14397. }
  14398. if(_c56){
  14399. if(document.detachEvent){
  14400. _c56.detachEvent("touchstart",this.touchStart);
  14401. _c56.detachEvent("touchmove",this.touchMove);
  14402. _c56.detachEvent("touchend",this.touchEnd);
  14403. }else{
  14404. _c56.removeEventListener("touchstart",this.touchStart,false);
  14405. _c56.removeEventListener("touchmove",this.touchMove,false);
  14406. _c56.removeEventListener("touchend",this.touchEnd,false);
  14407. }
  14408. }
  14409. };
  14410. PinFreezeContainer.prototype.touchMove=function(e){
  14411. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  14412. var _c58=e.changedTouches[0];
  14413. if(_c58&&_c58.clientX&&_c58.clientY){
  14414. var _c59=parseInt(_c58.clientX);
  14415. var _c5a=parseInt(_c58.clientY);
  14416. if(this.m_pinFreezeContainer.touchMoveHandler(_c59,_c5a)){
  14417. return stopEventBubble(e);
  14418. }
  14419. }
  14420. }
  14421. };
  14422. PinFreezeContainer.prototype.touchStart=function(e){
  14423. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  14424. var _c5c=e.changedTouches[0];
  14425. if(_c5c&&_c5c.clientX&&_c5c.clientY){
  14426. var _c5d=parseInt(_c5c.clientX);
  14427. var _c5e=parseInt(_c5c.clientY);
  14428. this.m_pinFreezeContainer.touchStartHandler(_c5d,_c5e);
  14429. }
  14430. }
  14431. };
  14432. PinFreezeContainer.prototype.touchStartHandler=function(_c5f,_c60){
  14433. this.touchScrollSections=false;
  14434. this.touchPreviousX=_c5f;
  14435. this.touchPreviousY=_c60;
  14436. };
  14437. PinFreezeContainer.prototype.touchEnd=function(e){
  14438. if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
  14439. stopEventBubble(e);
  14440. }
  14441. };
  14442. PinFreezeContainer.prototype.touchEndHandler=function(){
  14443. var _c62=this.touchScrollSections;
  14444. this.touchScrollSections=false;
  14445. this.touchPreviousX=-1;
  14446. this.touchPreviousY=-1;
  14447. return _c62;
  14448. };
  14449. PinFreezeContainer.prototype.touchMoveHandler=function(_c63,_c64){
  14450. var _c65=this.getSection("pfMainOutput");
  14451. if(!_c65){
  14452. return;
  14453. }
  14454. var _c66=this.getSectionHomeCell(_c65);
  14455. var _c67=this.getTopHeadingSectionHeight(_c66);
  14456. var _c68=this.getSideHeadingSectionWidth(_c66);
  14457. var _c69=_c64-this.touchPreviousY;
  14458. var _c6a=_c63-this.touchPreviousX;
  14459. if(this.touchScrollSections){
  14460. if(_c69!=0){
  14461. var _c6b=_c65.scrollTop-_c69;
  14462. _c6b=(_c6b>_c67)?_c6b:_c67;
  14463. _c65.scrollTop=_c6b;
  14464. var _c6c=this.getSection("pfSideHeadings");
  14465. if(_c6c){
  14466. _c6c.scrollTop=_c6b;
  14467. }
  14468. }
  14469. if(_c6a!=0){
  14470. var _c6d=_c65.scrollLeft-_c6a;
  14471. _c6d=(_c6d>_c68)?_c6d:_c68;
  14472. _c65.scrollLeft=_c6d;
  14473. var _c6e=this.getSection("pfTopHeadings");
  14474. if(_c6e){
  14475. _c6e.scrollLeft=_c6d;
  14476. }
  14477. }
  14478. }else{
  14479. this.firstTouchMove(_c65,_c6a,_c69,_c68,_c67);
  14480. }
  14481. this.touchPreviousX=_c63;
  14482. this.touchPreviousY=_c64;
  14483. return this.touchScrollSections;
  14484. };
  14485. PinFreezeContainer.prototype.firstTouchMove=function(_c6f,_c70,_c71,_c72,_c73){
  14486. var _c74=this.mostlyVerticalTouchMove(_c70,_c71);
  14487. var _c75=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
  14488. var _c76=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
  14489. if(_c74&&(!_c75||(_c71>0&&_c6f.scrollTop<=_c73)||(_c71<0&&_c6f.scrollTop+_c6f.clientHeight>=_c6f.scrollHeight))){
  14490. this.touchScrollSections=false;
  14491. }else{
  14492. if(!_c74&&(!_c76||(_c70>0&&_c6f.scrollLeft<=_c72)||(_c70<0&&_c6f.scrollLeft+_c6f.clientWidth>=_c6f.scrollWidth))){
  14493. this.touchScrollSections=false;
  14494. }else{
  14495. this.touchScrollSections=true;
  14496. }
  14497. }
  14498. };
  14499. PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_c77,_c78){
  14500. var _c79=(_c77>0)?_c77:0-_c77;
  14501. var _c7a=(_c78>0)?_c78:0-_c78;
  14502. return (_c7a>_c79);
  14503. };
  14504. PinFreezeContainer.prototype.destroy=function(){
  14505. this.removeTouchScrolling();
  14506. GUtil.destroyProperties(this);
  14507. };
  14508. function PinFreezeManager(oCV){
  14509. this.m_oCV=oCV;
  14510. this.m_viewerId=oCV.getId();
  14511. this.m_frozenInfo=null;
  14512. this.m_lastWidthProcessed=0;
  14513. this.m_lastHeightProcessed=0;
  14514. this.c_resizeTweekLimit=5;
  14515. this.m_repaintOnVisible=false;
  14516. };
  14517. PinFreezeManager.prototype.addContainerObject=function(lid,_c7d,_c7e,_c7f,_c80){
  14518. if(_c7d||_c7e){
  14519. if(!this.m_frozenInfo){
  14520. this.m_frozenInfo={};
  14521. }
  14522. if(!this.m_frozenInfo[lid]){
  14523. this._createDefaultFrozenInfo(lid);
  14524. }
  14525. this.m_frozenInfo[lid].freezeTop=_c7d;
  14526. this.m_frozenInfo[lid].freezeSide=_c7e;
  14527. var _c81=this.newContainer(lid,_c7d,_c7e,_c7f,_c80);
  14528. this.m_frozenInfo[lid].pinFreezeContainers.push(_c81);
  14529. return _c81;
  14530. }
  14531. return null;
  14532. };
  14533. PinFreezeManager.prototype.newContainer=function(lid,_c83,_c84,_c85,_c86){
  14534. return new PinFreezeContainer(this,lid,this.m_viewerId,_c83,_c84,_c85,_c86);
  14535. };
  14536. PinFreezeManager.prototype.clearPinInfo=function(lid){
  14537. if(!this.m_frozenInfo){
  14538. return;
  14539. }
  14540. if(lid){
  14541. if(this.m_frozenInfo[lid]){
  14542. delete this.m_frozenInfo[lid];
  14543. }
  14544. }else{
  14545. delete this.m_frozenInfo;
  14546. this.m_frozenInfo=null;
  14547. }
  14548. };
  14549. PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){
  14550. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}};
  14551. };
  14552. PinFreezeManager.prototype._resetFrozenInfo=function(lid){
  14553. var _c8a=this.m_frozenInfo[lid];
  14554. if(_c8a){
  14555. delete _c8a.pinFreezeContainers;
  14556. _c8a.pinFreezeContainers=[];
  14557. _c8a.freezeTop=false;
  14558. _c8a.freezeSide=false;
  14559. }
  14560. };
  14561. PinFreezeManager.prototype.prepopulateFrozenInfo=function(_c8b){
  14562. var _c8c=getDescendantElementsByAttribute(_c8b,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  14563. if(_c8c){
  14564. if(!this.m_frozenInfo){
  14565. this.m_frozenInfo={};
  14566. }
  14567. for(var i=0;i<_c8c.length;i++){
  14568. var _c8e=_c8c[i];
  14569. if(_c8e.getAttribute("id")=="rt"+this.m_viewerId){
  14570. continue;
  14571. }
  14572. var lid=this.removeNamespace(_c8e.getAttribute("lid"));
  14573. if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){
  14574. continue;
  14575. }
  14576. if(!this.m_frozenInfo[lid]){
  14577. this._createDefaultFrozenInfo(lid);
  14578. }
  14579. if(!this.m_frozenInfo[lid].childContainers){
  14580. this.m_frozenInfo[lid].childContainers={};
  14581. }
  14582. var _c90=getDescendantElementsByAttribute(_c8e,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  14583. if(_c90){
  14584. for(var _c91=0;_c91<_c90.length;_c91++){
  14585. var _c92=_c90[_c91];
  14586. var _c93=this.removeNamespace(_c92.getAttribute("lid"));
  14587. if(!this.m_frozenInfo[lid].childContainers[_c93]){
  14588. var _c94=_c92.parentNode;
  14589. while(_c94&&!_c94.getAttribute("lid")){
  14590. _c94=_c94.parentNode;
  14591. }
  14592. if(_c94&&this.removeNamespace(_c94.getAttribute("lid"))==lid){
  14593. this.m_frozenInfo[lid].childContainers[_c93]=true;
  14594. }
  14595. }
  14596. }
  14597. }
  14598. }
  14599. this._updateParentContainerInfo();
  14600. }
  14601. };
  14602. PinFreezeManager.prototype._updateParentContainerInfo=function(){
  14603. for(var _c95 in this.m_frozenInfo){
  14604. var _c96=this.m_frozenInfo[_c95].childContainers;
  14605. if(_c96){
  14606. for(var _c97 in _c96){
  14607. if(this.m_frozenInfo[_c97]){
  14608. this.m_frozenInfo[_c97].parentContainer=_c95;
  14609. break;
  14610. }
  14611. }
  14612. }
  14613. }
  14614. };
  14615. PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){
  14616. if(this.m_frozenInfo[lid]){
  14617. while(this.m_frozenInfo[lid].parentContainer){
  14618. lid=this.m_frozenInfo[lid].parentContainer;
  14619. }
  14620. }
  14621. return lid;
  14622. };
  14623. PinFreezeManager.prototype.freezeContainer=function(lid,_c9a,_c9b){
  14624. var _c9c=document.getElementById("CVReport"+this.m_viewerId);
  14625. this.prepopulateFrozenInfo(_c9c);
  14626. var _c9d=this.getTopLevelContainerLID(lid);
  14627. this.unfreezeAllNestedContainers(_c9d,_c9c);
  14628. this.m_frozenInfo[lid].freezeTop=_c9a;
  14629. this.m_frozenInfo[lid].freezeSide=_c9b;
  14630. var _c9e=this._createPinAndFreezeObject(_c9c,_c9d);
  14631. this.m_lastWidthProcessed=0;
  14632. this.m_lastHeightProcessed=0;
  14633. this._resizePinFreezeObjects(_c9e);
  14634. this.sectionStructureChange();
  14635. if(isIE()){
  14636. var obj=this;
  14637. setTimeout(function(){
  14638. obj.refresh();
  14639. },1);
  14640. var _ca0=document.getElementById("RVContent"+this.m_viewerId);
  14641. this.m_oCV.repaintDiv(_ca0);
  14642. }
  14643. return _c9e;
  14644. };
  14645. PinFreezeManager.prototype.getInitialWidthThreshold=function(){
  14646. return document.body.clientWidth*3/4;
  14647. };
  14648. PinFreezeManager.prototype.getInitialHeightThreshold=function(){
  14649. return document.body.clientWidth*9/10;
  14650. };
  14651. PinFreezeManager.prototype.hasFrozenContainers=function(){
  14652. return ((this.m_frozenInfo)?true:false);
  14653. };
  14654. PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){
  14655. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  14656. return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false;
  14657. }
  14658. return false;
  14659. };
  14660. PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){
  14661. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  14662. return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false;
  14663. }
  14664. return false;
  14665. };
  14666. PinFreezeManager.prototype.removeNamespace=function(idNS){
  14667. if(idNS.length>this.m_viewerId.length){
  14668. if(idNS.indexOf(this.m_viewerId)>0){
  14669. return idNS.substring(0,idNS.indexOf(this.m_viewerId));
  14670. }
  14671. }
  14672. return idNS;
  14673. };
  14674. PinFreezeManager.prototype.getContainer=function(lid,_ca5){
  14675. if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
  14676. _ca5=_ca5?_ca5:0;
  14677. return this.m_frozenInfo[lid].pinFreezeContainers[_ca5];
  14678. }
  14679. return null;
  14680. };
  14681. PinFreezeManager.prototype.nodeToContainer=function(node){
  14682. var slid=PinFreezeContainer.nodeToSlid(node);
  14683. var _ca8=null;
  14684. if(slid){
  14685. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  14686. _ca8=this.getContainer(lid);
  14687. }
  14688. return _ca8;
  14689. };
  14690. PinFreezeManager.prototype.getContainerElement=function(_caa){
  14691. var lid=this.removeNamespace(_caa.getAttribute("lid"));
  14692. if(lid){
  14693. var _cac=this.getContainer(lid);
  14694. if(_cac){
  14695. return _cac.getContainer();
  14696. }
  14697. }
  14698. return null;
  14699. };
  14700. PinFreezeManager.prototype._createPinAndFreezeObject=function(_cad,lid){
  14701. var _caf=null;
  14702. if(this.m_frozenInfo){
  14703. var _cb0=this.m_frozenInfo[lid];
  14704. var _cb1=_cb0.initialLoad;
  14705. if(_cb1){
  14706. delete _cb0.initialLoad;
  14707. }
  14708. var _cb2=_cb0.freezeTop;
  14709. var _cb3=_cb0.freezeSide;
  14710. var _cb4=null;
  14711. if(_cb1&&_cb0.pinFreezeContainers&&(_cb2||_cb3)){
  14712. _cb4=_cb0.pinFreezeContainers.slice(0);
  14713. }
  14714. var _cb5=_cad;
  14715. if(_cb0&&_cb0.parentContainer){
  14716. var _cb6=getElementsByAttribute(_cad,"table","lid",_cb0.parentContainer+this.m_viewerId);
  14717. if(_cb6){
  14718. for(parentIndex=0;parentIndex<_cb6.length;parentIndex++){
  14719. if(!_cb6[parentIndex].getAttribute("clonednode")){
  14720. _cb5=_cb6[parentIndex];
  14721. break;
  14722. }
  14723. }
  14724. }
  14725. }
  14726. if(_cb0.childContainers){
  14727. for(var _cb7 in _cb0.childContainers){
  14728. var _cb8=this._createPinAndFreezeObject(_cb5,_cb7);
  14729. _caf=_caf?_caf:_cb8;
  14730. }
  14731. }
  14732. var _cb9=getElementsByAttribute(_cb5,"table","lid",lid+this.m_viewerId);
  14733. if(_cb9&&_cb9.length>0){
  14734. delete _cb0.pinFreezeContainers;
  14735. _cb0.pinFreezeContainers=[];
  14736. }else{
  14737. return null;
  14738. }
  14739. if(_cb9&&(_cb2||_cb3)){
  14740. var _cba=(_caf!==null);
  14741. for(var i=0;i<_cb9.length;i++){
  14742. var _cbc=_cb9[i];
  14743. if(_cbc.getAttribute("clonednode")=="true"){
  14744. continue;
  14745. }
  14746. _caf=this.addContainerObject(lid,_cb2,_cb3,_cbc,i);
  14747. if(_caf){
  14748. _caf.createPFContainer(_cb5,_cba);
  14749. if(_cb1){
  14750. _caf.copyProperties(_cb4[0]);
  14751. }
  14752. _caf.freezeContainerInReport(_cad);
  14753. }
  14754. }
  14755. }
  14756. }
  14757. return _caf;
  14758. };
  14759. PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_cbd){
  14760. if(this.m_frozenInfo){
  14761. var _cbe=false;
  14762. var _cbf=null;
  14763. for(var _cc0 in this.m_frozenInfo){
  14764. var _cc1=this.m_frozenInfo[_cc0];
  14765. if(!_cbe){
  14766. _cbe=_cc1.initialLoad;
  14767. }
  14768. if(!_cc1.parentContainer){
  14769. var temp=this._createPinAndFreezeObject(_cbd,_cc1.lid);
  14770. _cbf=_cbf?_cbf:temp;
  14771. }
  14772. }
  14773. if(!_cbe&&_cbf){
  14774. this._resizePinFreezeObjects(_cbf);
  14775. }
  14776. this.refresh();
  14777. }
  14778. };
  14779. PinFreezeManager.prototype._resizePinFreezeObjects=function(_cc3){
  14780. var _cc4,_cc5;
  14781. var _cc6=this.m_oCV.getViewerWidget();
  14782. if(_cc6){
  14783. var size=_cc6.getWidgetSize();
  14784. _cc5=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_cc3.getClientWidth();
  14785. _cc4=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_cc3.getClientHeight();
  14786. }else{
  14787. var _cc8=document.getElementById("RVContent"+this.m_viewerId);
  14788. var _cc9=document.getElementById("mainViewerTable"+this.m_viewerId);
  14789. _cc5=_cc8.clientWidth;
  14790. _cc4=_cc9.clientHeight;
  14791. }
  14792. this.m_lastWidthProcessed=0;
  14793. this.m_lastHeightProcessed=0;
  14794. this.resize(_cc5,_cc4);
  14795. };
  14796. PinFreezeManager.prototype.resize=function(_cca,_ccb){
  14797. var _ccc=(Math.abs(_cca-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
  14798. var _ccd=(Math.abs(_ccb-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
  14799. if(_ccc&&_ccd){
  14800. return;
  14801. }
  14802. var _cce=(Math.abs(_cca-this.m_lastWidthProcessed)>2)?_cca:0;
  14803. var _ccf=(Math.abs(_ccb-this.m_lastHeightProcessed)>2)?_ccb:0;
  14804. for(var lid in this.m_frozenInfo){
  14805. if(!this.m_frozenInfo[lid].parentContainer){
  14806. this.resizeContainer(lid,_cce,_ccf);
  14807. }
  14808. }
  14809. this.m_lastWidthProcessed=_cca;
  14810. this.m_lastHeightProcessed=_ccb;
  14811. };
  14812. PinFreezeManager.prototype.resizeContainer=function(lid,_cd2,_cd3){
  14813. var _cd4=this.m_frozenInfo[lid];
  14814. if(_cd4){
  14815. var _cd5=null;
  14816. if(_cd4.childContainers){
  14817. var _cd6=_cd2>10?_cd2-10:_cd2;
  14818. var _cd7=_cd3>10?_cd3-10:_cd3;
  14819. for(var _cd8 in _cd4.childContainers){
  14820. _cd5=this.resizeContainer(_cd8,_cd6,_cd7);
  14821. }
  14822. }
  14823. var _cd9=_cd4.pinFreezeContainers;
  14824. var _cda=null;
  14825. var _cdb=null;
  14826. if(_cd9){
  14827. for(var i=0;i<_cd9.length;i++){
  14828. _cda=_cd9[i];
  14829. _cda.resize(_cd2,_cd3,_cd4.parentContainer,_cd5);
  14830. var _cdd=_cda.getContainer();
  14831. if(_cdd&&(!_cdb||(_cdb.width<_cdd.clientWidth))){
  14832. _cdb={"width":_cdd.clientWidth,"lid":_cda.m_lidNS};
  14833. }
  14834. }
  14835. }
  14836. return _cdb;
  14837. }
  14838. };
  14839. PinFreezeManager.prototype.processAutoResize=function(_cde,_cdf){
  14840. this.m_lastWidthProcessed=_cde;
  14841. this.m_lastHeightProcessed=_cdf;
  14842. };
  14843. PinFreezeManager.prototype.onSetVisible=function(){
  14844. this.refresh();
  14845. if(this.m_repaintOnVisible){
  14846. this.rePaint();
  14847. this.m_repaintOnVisible=false;
  14848. }
  14849. };
  14850. PinFreezeManager.prototype.onResizeCanvas=function(_ce0){
  14851. if(_ce0){
  14852. this.rePaint();
  14853. }else{
  14854. this.m_repaintOnVisible=true;
  14855. }
  14856. };
  14857. PinFreezeManager.prototype.rePaint=function(){
  14858. for(var lid in this.m_frozenInfo){
  14859. if(!this.m_frozenInfo[lid].parentContainer){
  14860. this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed);
  14861. }
  14862. }
  14863. };
  14864. PinFreezeManager.prototype.refresh=function(){
  14865. for(var _ce2 in this.m_frozenInfo){
  14866. var _ce3=this.m_frozenInfo[_ce2].pinFreezeContainers;
  14867. if(_ce3){
  14868. for(var i=0;i<_ce3.length;i++){
  14869. var _ce5=_ce3[i];
  14870. _ce5.synchScroll();
  14871. _ce5.synchVScroll();
  14872. }
  14873. }
  14874. }
  14875. };
  14876. PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){
  14877. return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true);
  14878. };
  14879. PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){
  14880. var lid=this.getValidSelectedContainerId(false);
  14881. if(lid){
  14882. this.m_oCV.getSelectionController().resetSelections();
  14883. return this.freezeContainerRowHeadings(lid);
  14884. }
  14885. return null;
  14886. };
  14887. PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){
  14888. var lid=this.getValidSelectedContainerId(false);
  14889. if(lid){
  14890. return (!this.hasFrozenRowHeadings(lid));
  14891. }
  14892. return false;
  14893. };
  14894. PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){
  14895. this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false);
  14896. };
  14897. PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){
  14898. var lid=this.getValidSelectedContainerId(false);
  14899. if(lid){
  14900. this.m_oCV.getSelectionController().resetSelections();
  14901. this.unfreezeContainerRowHeadings(lid);
  14902. }
  14903. };
  14904. PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){
  14905. var lid=this.getValidSelectedContainerId(false);
  14906. if(lid){
  14907. return (this.hasFrozenRowHeadings(lid));
  14908. }
  14909. return false;
  14910. };
  14911. PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){
  14912. return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid));
  14913. };
  14914. PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){
  14915. var lid=this.getValidSelectedContainerId(true);
  14916. if(lid){
  14917. this.m_oCV.getSelectionController().resetSelections();
  14918. return this.freezeContainerColumnHeadings(lid);
  14919. }
  14920. return null;
  14921. };
  14922. PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){
  14923. var lid=this.getValidSelectedContainerId(true);
  14924. if(lid){
  14925. return (!this.hasFrozenColumnHeadings(lid));
  14926. }
  14927. return false;
  14928. };
  14929. PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){
  14930. this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid));
  14931. };
  14932. PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){
  14933. var lid=this.getValidSelectedContainerId(true);
  14934. if(lid){
  14935. this.m_oCV.getSelectionController().resetSelections();
  14936. this.unfreezeContainerColumnHeadings(lid);
  14937. }
  14938. };
  14939. PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){
  14940. var lid=this.getValidSelectedContainerId(true);
  14941. if(lid){
  14942. return (this.hasFrozenColumnHeadings(lid));
  14943. }
  14944. return false;
  14945. };
  14946. PinFreezeManager.prototype.getValidSelectedContainerId=function(_cf2){
  14947. var _cf3=this.m_oCV.getSelectionController().getAllSelectedObjects();
  14948. if(_cf3&&_cf3.length&&(_cf3[0].getDataContainerType()==="crosstab"||(_cf2&&_cf3[0].getDataContainerType()==="list"))){
  14949. var lid=(_cf3[0].getLayoutElementId());
  14950. if(lid){
  14951. if(!this.hasPromptControlsInFreezableCells(lid)){
  14952. return this.removeNamespace(lid);
  14953. }
  14954. }
  14955. }
  14956. return null;
  14957. };
  14958. PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
  14959. var _cf6=this.m_oCV.getLayoutElementFromLid(lid);
  14960. var _cf7=getElementsByAttribute(_cf6,["td","th"],"type","columnTitle");
  14961. var _cf8=new RegExp("(^|[W])clsPromptComponent($|[W])");
  14962. var _cf9=isIE()?"className":"class";
  14963. for(var j in _cf7){
  14964. if(_cf7.hasOwnProperty(j)){
  14965. var _cfb=getElementsByAttribute(_cf7[j],"*",_cf9,null,1,_cf8);
  14966. if(_cfb.length>0){
  14967. return true;
  14968. }
  14969. }
  14970. }
  14971. return false;
  14972. };
  14973. PinFreezeManager.prototype.unfreeze=function(lid,_cfd,_cfe){
  14974. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  14975. var _cff=this.m_frozenInfo[lid].pinFreezeContainers;
  14976. if(_cff){
  14977. for(var i=0;i<_cff.length;i++){
  14978. var _d01=_cff[i];
  14979. _d01.unfreeze(_cfd);
  14980. }
  14981. if(_cfe){
  14982. this._resetFrozenInfo(lid);
  14983. }
  14984. }
  14985. }
  14986. };
  14987. PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_d03){
  14988. var _d04=this.m_frozenInfo[lid];
  14989. if(_d04){
  14990. if(_d04.freezeTop||_d04.freezeSide){
  14991. this.unfreeze(lid,_d03,false);
  14992. }
  14993. if(_d04.childContainers){
  14994. for(var _d05 in _d04.childContainers){
  14995. this.unfreezeAllNestedContainers(_d05,_d03);
  14996. }
  14997. }
  14998. }
  14999. };
  15000. PinFreezeManager.prototype.isNodeVisible=function(node){
  15001. var slid=PinFreezeContainer.nodeToSlid(node);
  15002. if(!slid){
  15003. return true;
  15004. }
  15005. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  15006. var _d09=this.getContainer(lid);
  15007. if(!_d09){
  15008. return true;
  15009. }
  15010. var _d0a=PinFreezeContainer.getSectionNameFromSlid(slid);
  15011. var _d0b=_d09.getSection(_d0a);
  15012. var _d0c=null,_d0d=null;
  15013. var _d0e=node;
  15014. var _d0f=null;
  15015. while(_d0e&&_d0e!==_d0b&&!_d0c&&!_d0d){
  15016. _d0c=_d09.getMain(_d0e);
  15017. _d0d=_d09.getCopy(_d0e);
  15018. _d0f=_d0e;
  15019. _d0e=_d0e.parentNode;
  15020. }
  15021. var _d10=_d0c?true:false;
  15022. var _d11=_d0d?true:false;
  15023. if(_d10){
  15024. return _d09.getCopy(_d0c)===_d0f;
  15025. }else{
  15026. if(_d11){
  15027. return _d09.getCopy(_d0f)?false:true;
  15028. }else{
  15029. return true;
  15030. }
  15031. }
  15032. };
  15033. PinFreezeManager.prototype.sectionStructureChange=function(){
  15034. var _d12=this.m_oCV.getViewerWidget();
  15035. if(_d12&&_d12.getAnnotationHelper()){
  15036. _d12.getAnnotationHelper().repositionCommentIndicators();
  15037. }
  15038. };
  15039. PinFreezeManager.prototype.deepCloneNode=function(_d13){
  15040. var copy=_d13.cloneNode(true);
  15041. var _d15=this.m_oCV.getViewerWidget();
  15042. if(_d15){
  15043. if(_d15.reportContainsDijits()){
  15044. var _d16=getElementsByAttribute(copy,"*","widgetid","*");
  15045. if(_d16&&_d16.length){
  15046. for(var i=0;i<_d16.length;i++){
  15047. _d16[i].parentNode.removeChild(_d16[i]);
  15048. }
  15049. }
  15050. }
  15051. }
  15052. return copy;
  15053. };
  15054. PinFreezeManager.prototype.toJSONString=function(){
  15055. var _d18="";
  15056. var _d19="";
  15057. for(var _d1a in this.m_frozenInfo){
  15058. if(_d18.length>0){
  15059. _d18+=",";
  15060. }
  15061. var _d1b=this.m_frozenInfo[_d1a];
  15062. _d18+="{";
  15063. _d18+="\"lid\":\""+_d1b.lid.replace("\"","\\\"")+"\",";
  15064. _d18+="\"freezeTop\":"+_d1b.freezeTop+",";
  15065. _d18+="\"freezeSide\":"+_d1b.freezeSide+",";
  15066. if(_d1b.parentContainer){
  15067. _d18+="\"parentContainer\":\""+_d1b.parentContainer+"\",";
  15068. }
  15069. if(_d1b.pinFreezeContainers&&_d1b.pinFreezeContainers.length>0){
  15070. _d18+="\"properties\":"+_d1b.pinFreezeContainers[0].toJSONString()+",";
  15071. }
  15072. _d18+="\"childContainers\": {";
  15073. if(_d1b.childContainers){
  15074. var _d1c=true;
  15075. for(var _d1d in _d1b.childContainers){
  15076. if(!_d1c){
  15077. _d18+=",";
  15078. }
  15079. _d18+="\""+_d1d+"\":true";
  15080. _d1c=false;
  15081. }
  15082. }
  15083. _d18+="}}";
  15084. }
  15085. if(_d18.length>0){
  15086. _d19="{\"version\":1, \"containers\":["+_d18+"]}";
  15087. }
  15088. return _d19;
  15089. };
  15090. PinFreezeManager.prototype.fromJSONString=function(_d1e){
  15091. if(!_d1e||_d1e.length===0){
  15092. return;
  15093. }
  15094. var _d1f=null;
  15095. try{
  15096. _d1f=eval("("+_d1e+")");
  15097. }
  15098. catch(e){
  15099. if(typeof console!="undefined"){
  15100. console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_d1e);
  15101. console.log(e);
  15102. }
  15103. }
  15104. if(!_d1f){
  15105. return;
  15106. }
  15107. var _d20=_d1f.containers;
  15108. var _d21=_d1f.version;
  15109. if(_d20.length>0){
  15110. this.m_frozenInfo={};
  15111. }
  15112. for(var _d22=0;_d22<_d20.length;_d22++){
  15113. var _d23=_d20[_d22];
  15114. var lid=_d23.lid;
  15115. var _d25=_d23.freezeTop;
  15116. var _d26=_d23.freezeSide;
  15117. var _d27=document.getElementById("CVReport"+this.m_viewerId);
  15118. var _d28=getElementsByAttribute(_d27,"table","lid",lid+this.m_viewerId);
  15119. var _d29=[];
  15120. if(_d28&&(_d25||_d26)){
  15121. for(var i=0;i<_d28.length;i++){
  15122. var _d2b=_d28[i];
  15123. var _d2c=new PinFreezeContainer(this,lid,this.m_viewerId,_d23.freezeTop,_d23.freezeSide,_d2b,i);
  15124. if(_d23.properties){
  15125. applyJSONProperties(_d2c,_d23.properties);
  15126. }
  15127. _d29.push(_d2c);
  15128. }
  15129. }
  15130. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_d25,"freezeSide":_d26,"pinFreezeContainers":_d29,"initialLoad":true};
  15131. if(_d21>=1){
  15132. if(_d23.childContainers){
  15133. this.m_frozenInfo[lid].childContainers=_d23.childContainers;
  15134. }
  15135. if(_d23.parentContainer){
  15136. this.m_frozenInfo[lid].parentContainer=_d23.parentContainer;
  15137. }
  15138. }
  15139. }
  15140. };
  15141. PinFreezeManager.prototype.removeIdAttribute=function(_d2d){
  15142. var _d2e=_d2d.getAttribute("id");
  15143. if(_d2e!==null&&_d2e!==""){
  15144. _d2d.removeAttribute("id");
  15145. }
  15146. var _d2f=getElementsByAttribute(_d2d,"*","id","*");
  15147. if(_d2f&&_d2f.length){
  15148. for(var i=0;i<_d2f.length;i++){
  15149. _d2f[i].removeAttribute("id");
  15150. }
  15151. }
  15152. return _d2d;
  15153. };
  15154. PinFreezeManager.prototype.isElementInMainOutput=function(_d31){
  15155. return PinFreezeContainer.isElementInMainOutput(_d31);
  15156. };
  15157. PinFreezeManager.prototype.isIWidgetMobile=function(){
  15158. return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
  15159. };
  15160. PinFreezeManager.prototype.destroy=function(){
  15161. GUtil.destroyProperties(this);
  15162. };
  15163. function AuthoredDrillAction(){
  15164. this.m_drillTargetSpecification="";
  15165. };
  15166. AuthoredDrillAction.prototype=new CognosViewerAction();
  15167. AuthoredDrillAction.prototype.setRequestParms=function(_d32){
  15168. this.m_drillTargetSpecification=_d32;
  15169. };
  15170. AuthoredDrillAction.prototype.executeDrillTarget=function(_d33){
  15171. var _d34=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_d33));
  15172. var _d35=encodeURIComponent(_d34.getAttribute("bookmarkRef"));
  15173. var _d36=_d34.getAttribute("path");
  15174. var _d37=this._shouldShowInNewWindow(_d34);
  15175. var oCV=this.getCognosViewer();
  15176. if((_d35!==null&&_d35!=="")&&(_d36===null||_d36==="")){
  15177. var _d39=_d34.getAttribute("bookmarkPage");
  15178. if(_d39&&_d39!==""){
  15179. oCV.executeAction("GotoPage",{"pageNumber":_d39,"anchorName":_d35});
  15180. }else{
  15181. document.location="#"+_d35;
  15182. }
  15183. }else{
  15184. var _d3a="";
  15185. if(_d37){
  15186. _d3a="_blank";
  15187. }
  15188. var _d3b=[];
  15189. var _d3c=[];
  15190. _d3c.push("obj");
  15191. _d3c.push(_d36);
  15192. _d3b[_d3b.length]=_d3c;
  15193. var _d3d=false;
  15194. var _d3e,_d3f,_d40,_d41,sNil;
  15195. var _d43=XMLHelper_FindChildrenByTagName(_d34,"drillParameter",false);
  15196. for(var _d44=0;_d44<_d43.length;++_d44){
  15197. _d3e=[];
  15198. _d3f=_d43[_d44];
  15199. _d40=_d3f.getAttribute("value");
  15200. _d41=_d3f.getAttribute("name");
  15201. if(_d40!==null&&_d40!==""){
  15202. _d3e.push("p_"+_d41);
  15203. _d3e.push(this.buildSelectionChoicesSpecification(_d3f));
  15204. }
  15205. sNil=_d3f.getAttribute("nil");
  15206. if(sNil!==null&&sNil!==""){
  15207. _d3e.push("p_"+_d41);
  15208. _d3e.push(this.buildSelectionChoicesNilSpecification());
  15209. }
  15210. if(_d3e.length>0){
  15211. _d3b[_d3b.length]=_d3e;
  15212. }
  15213. if(!_d3d){
  15214. var _d45=_d3f.getAttribute("propertyToPass");
  15215. _d3d=(_d45&&_d45.length>0)?true:false;
  15216. }
  15217. }
  15218. var _d46=_d34.getAttribute("method");
  15219. var _d47=_d34.getAttribute("outputFormat");
  15220. var _d48=_d34.getAttribute("outputLocale");
  15221. var _d49=_d34.getAttribute("prompt");
  15222. var _d4a=_d34.getAttribute("dynamicDrill");
  15223. var _d4b=this.getXMLNodeAsString(_d34,"parameters");
  15224. var _d4c=this.getXMLNodeAsString(_d34,"objectPaths");
  15225. var _d4d=oCV.getId();
  15226. var _d4e=document.forms["formWarpRequest"+_d4d];
  15227. var _d4f=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF");
  15228. if((!_d4f||_d4f.toLowerCase()!=="false")&&_d49!="true"&&this.isSameReport(_d4e,_d36)&&this.isSameReportFormat(_d47)&&!_d37&&!_d3d){
  15229. var _d50=new ViewerDispatcherEntry(oCV);
  15230. _d50.addFormField("ui.action","forward");
  15231. if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){
  15232. oCV.rvMainWnd.addCurrentReportToReportHistory();
  15233. var _d51=oCV.rvMainWnd.saveReportHistoryAsXML();
  15234. _d50.addFormField("cv.previousReports",_d51);
  15235. }
  15236. for(_d44=0;_d44<_d43.length;++_d44){
  15237. _d3e=[];
  15238. _d3f=_d43[_d44];
  15239. _d40=_d3f.getAttribute("value");
  15240. _d41=_d3f.getAttribute("name");
  15241. sNil=_d3f.getAttribute("nil");
  15242. if((sNil===null||sNil==="")&&(_d40===null||_d40==="")){
  15243. _d3e.push("p_"+_d41);
  15244. _d3e.push(this.buildSelectionChoicesNilSpecification());
  15245. }
  15246. if(_d3e.length>0){
  15247. _d3b[_d3b.length]=_d3e;
  15248. }
  15249. }
  15250. for(_d44=1;_d44<_d3b.length;_d44++){
  15251. _d50.addFormField(_d3b[_d44][0],_d3b[_d44][1]);
  15252. }
  15253. _d50.addFormField("_drillThroughToSelf","true");
  15254. if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){
  15255. _d50.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id);
  15256. }
  15257. oCV.setUsePageRequest(true);
  15258. oCV.dispatchRequest(_d50);
  15259. if(typeof oCV.m_viewerFragment=="undefined"){
  15260. var _d52=getCognosViewerObjectRefAsString(_d4d);
  15261. setTimeout(_d52+".getRequestIndicator().show()",10);
  15262. }
  15263. }else{
  15264. doSingleDrill(_d3a,_d3b,_d46,_d47,_d48,_d35,_d4b,_d4c,this.getCognosViewer().getId(),_d49,_d4a);
  15265. }
  15266. }
  15267. };
  15268. AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_d53){
  15269. return _d53.getAttribute("showInNewWindow")=="true";
  15270. };
  15271. AuthoredDrillAction.prototype.isSameReport=function(_d54,_d55){
  15272. if(_d54["ui.object"]&&_d55==_d54["ui.object"].value){
  15273. return true;
  15274. }
  15275. return false;
  15276. };
  15277. AuthoredDrillAction.prototype.isSameReportFormat=function(_d56){
  15278. var _d57=this.getCognosViewer().envParams["run.outputFormat"];
  15279. if(_d57){
  15280. if(_d56==_d57){
  15281. return true;
  15282. }else{
  15283. if(_d57=="HTML"&&_d56=="HTMLFragment"){
  15284. return true;
  15285. }
  15286. }
  15287. }
  15288. return false;
  15289. };
  15290. AuthoredDrillAction.prototype.getXMLNodeAsString=function(_d58,_d59){
  15291. var sXML="";
  15292. if(_d58!=null){
  15293. var node=XMLHelper_FindChildByTagName(_d58,_d59,false);
  15294. if(node!=null){
  15295. sXML=XMLBuilderSerializeNode(node);
  15296. }
  15297. }
  15298. return sXML;
  15299. };
  15300. AuthoredDrillAction.prototype.execute=function(_d5c){
  15301. if(this.m_drillTargetSpecification!=""){
  15302. this.executeDrillTarget(this.m_drillTargetSpecification);
  15303. }else{
  15304. if(typeof _d5c!="undefined"){
  15305. var _d5d=this.getCognosViewer().getDrillTargets();
  15306. var _d5e=this.getAuthoredDrillThroughContext(_d5c,_d5d);
  15307. var _d5f=_d5e.childNodes;
  15308. if(_d5f.length==1){
  15309. this.executeDrillTarget(XMLBuilderSerializeNode(_d5f[0]));
  15310. }else{
  15311. doMultipleDrills(XMLBuilderSerializeNode(_d5e),this.getCognosViewer().getId());
  15312. }
  15313. }
  15314. }
  15315. };
  15316. AuthoredDrillAction.prototype.showDrillTargets=function(_d60){
  15317. var _d61="<context>";
  15318. for(var _d62=0;_d62<_d60.length;++_d62){
  15319. var _d63=_d60[_d62];
  15320. _d61+="<member>";
  15321. var _d64=_d63.getAttribute("label");
  15322. _d61+="<name>";
  15323. _d61+=sXmlEncode(_d64);
  15324. _d61+="</name>";
  15325. var _d65=_d63.getAttribute("path");
  15326. _d61+="<drillThroughSearchPath>";
  15327. _d61+=sXmlEncode(_d65);
  15328. _d61+="</drillThroughSearchPath>";
  15329. var _d66=_d63.getAttribute("method");
  15330. _d61+="<drillThroughAction>";
  15331. _d61+=sXmlEncode(_d66);
  15332. _d61+="</drillThroughAction>";
  15333. var _d67=_d63.getAttribute("outputFormat");
  15334. _d61+="<drillThroughFormat>";
  15335. _d61+=sXmlEncode(_d67);
  15336. _d61+="</drillThroughFormat>";
  15337. var _d68="parent."+this.getTargetReportRequestString(_d63);
  15338. _d61+="<data>";
  15339. _d61+=sXmlEncode(_d68);
  15340. _d61+="</data>";
  15341. _d61+="</member>";
  15342. }
  15343. _d61+="</context>";
  15344. };
  15345. AuthoredDrillAction.prototype.populateContextMenu=function(_d69){
  15346. var _d6a=this.getCognosViewer();
  15347. var _d6b=_d6a.rvMainWnd.getToolbarControl();
  15348. var _d6c=null;
  15349. if(typeof _d6b!="undefined"&&_d6b!=null){
  15350. var _d6d=_d6b.getItem("goto");
  15351. if(_d6d){
  15352. _d6c=_d6d.getMenu();
  15353. }
  15354. }
  15355. var _d6e=_d6a.rvMainWnd.getContextMenu();
  15356. var _d6f=null;
  15357. if(typeof _d6e!="undefined"&&_d6e!=null){
  15358. _d6f=_d6e.getGoToMenuItem().getMenu();
  15359. }
  15360. if(_d6c!=null||_d6f!=null){
  15361. var _d70=this.getCognosViewer().getDrillTargets();
  15362. var _d71=this.getAuthoredDrillThroughContext(_d69,_d70);
  15363. var _d72=_d71.childNodes;
  15364. if(_d72.length>0){
  15365. for(var _d73=0;_d73<_d72.length;++_d73){
  15366. var _d74=_d72[_d73];
  15367. var _d75=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_d74))+"\");";
  15368. var _d76=this.getTargetReportIconPath(_d74);
  15369. var _d77=_d74.getAttribute("label");
  15370. if(isViewerBidiEnabled()){
  15371. var bidi=BidiUtils.getInstance();
  15372. _d77=bidi.btdInjectUCCIntoStr(_d77,getViewerBaseTextDirection());
  15373. }
  15374. if(_d6c!=null){
  15375. new CMenuItem(_d6c,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin());
  15376. }
  15377. if(_d6f!=null){
  15378. new CMenuItem(_d6f,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin());
  15379. }
  15380. }
  15381. }
  15382. }
  15383. };
  15384. AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){
  15385. return "<selectChoices/>";
  15386. };
  15387. AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_d79){
  15388. var _d7a="";
  15389. var _d7b=_d79.getAttribute("value");
  15390. if(_d7b!=null){
  15391. var _d7c=_d79.getAttribute("propertyToPass");
  15392. _d7a+="<selectChoices";
  15393. if(_d7c!=null&&_d7c!=""){
  15394. _d7a+=" propertyToPass=\"";
  15395. _d7a+=sXmlEncode(_d7c);
  15396. _d7a+="\"";
  15397. }
  15398. _d7a+=">";
  15399. if(_d7b.indexOf("<selectChoices>")!=-1){
  15400. _d7a+=_d7b.substring(_d7b.indexOf("<selectChoices>")+15);
  15401. }else{
  15402. if(_d7b!=""){
  15403. _d7a+="<selectOption ";
  15404. var sMun=_d79.getAttribute("mun");
  15405. if(sMun!=null&&sMun!=""){
  15406. var _d7e=sXmlEncode(sMun);
  15407. _d7a+="useValue=\"";
  15408. _d7a+=_d7e;
  15409. _d7a+="\" ";
  15410. _d7a+="mun=\"";
  15411. _d7a+=_d7e;
  15412. _d7a+="\" ";
  15413. _d7a+="displayValue=\"";
  15414. _d7a+=sXmlEncode(_d7b);
  15415. _d7a+="\"";
  15416. }else{
  15417. _d7a+="useValue=\"";
  15418. _d7a+=sXmlEncode(_d7b);
  15419. _d7a+="\" ";
  15420. var _d7f=_d79.getAttribute("displayValue");
  15421. if(_d7f==null||_d7f==""){
  15422. _d7f=_d7b;
  15423. }
  15424. _d7a+="displayValue=\"";
  15425. _d7a+=sXmlEncode(_d7f);
  15426. _d7a+="\"";
  15427. }
  15428. _d7a+="/>";
  15429. _d7a+="</selectChoices>";
  15430. }
  15431. }
  15432. }
  15433. return _d7a;
  15434. };
  15435. AuthoredDrillAction.prototype.getPropertyToPass=function(_d80,_d81){
  15436. if(_d80!=null&&_d80!=""&&_d81!=null){
  15437. var _d82=_d81.childNodes;
  15438. if(_d82!=null){
  15439. for(var _d83=0;_d83<_d82.length;++_d83){
  15440. var _d84=_d82[_d83];
  15441. var _d85="";
  15442. if(_d84.getAttribute("name")!=null){
  15443. _d85=_d84.getAttribute("name");
  15444. }
  15445. if(_d85==_d80){
  15446. return _d84.getAttribute("propertyToPass");
  15447. }
  15448. }
  15449. }
  15450. }
  15451. return "";
  15452. };
  15453. AuthoredDrillAction.prototype.getTargetReportRequestString=function(_d86){
  15454. var _d87="";
  15455. var _d88=_d86.getAttribute("bookmarkRef");
  15456. var _d89=_d86.getAttribute("path");
  15457. var _d8a=_d86.getAttribute("showInNewWindow");
  15458. if((_d88!=null&&_d88!="")&&(_d89==null||_d89=="")){
  15459. _d87+="document.location=\"#";
  15460. _d87+=_d88;
  15461. _d87+="\";";
  15462. }else{
  15463. _d87+="doSingleDrill(";
  15464. if(_d8a=="true"){
  15465. _d87+="\"_blank\",";
  15466. }else{
  15467. _d87+="\"\",";
  15468. }
  15469. _d87+="[[\"obj\",\"";
  15470. _d87+=encodeURIComponent(_d89);
  15471. _d87+="\"]";
  15472. var _d8b=XMLHelper_FindChildrenByTagName(_d86,"drillParameter",false);
  15473. for(var _d8c=0;_d8c<_d8b.length;++_d8c){
  15474. var _d8d=_d8b[_d8c];
  15475. var _d8e=_d8d.getAttribute("value");
  15476. var _d8f=_d8d.getAttribute("name");
  15477. if(_d8e!=null&&_d8e!=""){
  15478. _d87+=", [\"p_"+_d8f+"\",\""+encodeURIComponent(this.buildSelectionChoicesSpecification(_d8d))+"\"]";
  15479. }
  15480. var sNil=_d8d.getAttribute("nil");
  15481. if(sNil!=null&&sNil!=""){
  15482. _d87+="\", [\"p_"+_d8f+"\",\""+encodeURIComponent(this.buildSelectionChoicesNilSpecification())+"\"]";
  15483. }
  15484. }
  15485. _d87+="],";
  15486. var _d91=_d86.getAttribute("method");
  15487. _d87+="\""+encodeURIComponent(_d91)+"\",";
  15488. var _d92=_d86.getAttribute("outputFormat");
  15489. _d87+="\""+encodeURIComponent(_d92)+"\",";
  15490. var _d93=_d86.getAttribute("outputLocale");
  15491. _d87+="\""+encodeURIComponent(_d93)+"\",";
  15492. _d87+="\""+encodeURIComponent(_d88)+"\",";
  15493. var _d94=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_d86,"parameters",false));
  15494. _d87+="\""+encodeURIComponent(_d94)+"\",";
  15495. var _d95=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_d86,"objectPaths",false));
  15496. _d87+="\""+encodeURIComponent(_d95)+"\",";
  15497. _d87+="\""+encodeURIComponent(this.getCognosViewer().getId())+"\",";
  15498. var _d96=_d86.getAttribute("prompt");
  15499. _d87+="\""+encodeURIComponent(_d96)+"\",";
  15500. var _d97=_d86.getAttribute("dynamicDrill");
  15501. _d87+=" "+encodeURIComponent(_d97);
  15502. _d87+=");";
  15503. }
  15504. return _d87;
  15505. };
  15506. AuthoredDrillAction.prototype.getTargetReportIconPath=function(_d98){
  15507. var _d99="";
  15508. var _d9a=_d98.getAttribute("bookmarkRef");
  15509. var _d9b=XMLHelper_FindChildByTagName(_d98,"drillParameter",false);
  15510. if((_d9a!=null&&_d9a!="")&&_d9b==null){
  15511. _d99="/common/images/spacer.gif";
  15512. }else{
  15513. var _d9c=_d98.getAttribute("method");
  15514. switch(_d9c){
  15515. case "editAnalysis":
  15516. _d99="/ps/portal/images/icon_ps_analysis.gif";
  15517. break;
  15518. case "editQuery":
  15519. _d99="/ps/portal/images/icon_qs_query.gif";
  15520. break;
  15521. case "execute":
  15522. _d99="/ps/portal/images/action_run.gif";
  15523. break;
  15524. case "view":
  15525. var _d9d=_d98.getAttribute("outputFormat");
  15526. switch(_d9d){
  15527. case "HTML":
  15528. case "XHTML":
  15529. case "HTMLFragment":
  15530. _d99="/ps/portal/images/icon_result_html.gif";
  15531. break;
  15532. case "PDF":
  15533. _d99="/ps/portal/images/icon_result_pdf.gif";
  15534. break;
  15535. case "XML":
  15536. _d99="/ps/portal/images/icon_result_xml.gif";
  15537. break;
  15538. case "CSV":
  15539. _d99="/ps/portal/images/icon_result_csv.gif";
  15540. break;
  15541. case "XLS":
  15542. _d99="/ps/portal/images/icon_result_excel.gif";
  15543. break;
  15544. case "SingleXLS":
  15545. _d99="/ps/portal/images/icon_result_excel_single.gif";
  15546. break;
  15547. case "XLWA":
  15548. _d99="/ps/portal/images/icon_result_excel_web_arch.gif";
  15549. break;
  15550. default:
  15551. _d99="/common/images/spacer.gif";
  15552. }
  15553. break;
  15554. default:
  15555. _d99="/common/images/spacer.gif";
  15556. }
  15557. }
  15558. return this.getCognosViewer().getWebContentRoot()+_d99;
  15559. };
  15560. AuthoredDrillAction.prototype.getAuthoredDrillThroughContext=function(_d9e,_d9f){
  15561. if(typeof _d9e!="string"||typeof _d9f!="object"){
  15562. return null;
  15563. }
  15564. var _da0=XMLBuilderLoadXMLFromString(_d9e);
  15565. if(_da0==null||_da0.firstChild==null){
  15566. return null;
  15567. }
  15568. var _da1=XMLHelper_GetFirstChildElement(_da0);
  15569. if(XMLHelper_GetLocalName(_da1)!="AuthoredDrillTargets"){
  15570. return null;
  15571. }
  15572. var _da2=XMLHelper_GetFirstChildElement(_da1);
  15573. if(XMLHelper_GetLocalName(_da2)!="rvDrillTargets"){
  15574. return null;
  15575. }
  15576. var _da3=_da2.childNodes;
  15577. if(_da3===null||_da3.length===0){
  15578. return null;
  15579. }
  15580. var _da4=self.XMLBuilderCreateXMLDocument("rvDrillTargets");
  15581. for(var _da5=0;_da5<_da3.length;++_da5){
  15582. if(typeof _da3[_da5].getAttribute=="undefined"){
  15583. continue;
  15584. }
  15585. var _da6=_da4.createElement("drillTarget");
  15586. _da4.documentElement.appendChild(_da6);
  15587. var _da7=_da3[_da5].getAttribute("bookmarkRef");
  15588. if(_da7===null){
  15589. _da6.setAttribute("bookmarkRef","");
  15590. }else{
  15591. _da6.setAttribute("bookmarkRef",_da7);
  15592. }
  15593. var _da8=_da3[_da5].getAttribute("bookmarkPage");
  15594. if(_da8===null){
  15595. _da6.setAttribute("bookmarkPage","");
  15596. }else{
  15597. _da6.setAttribute("bookmarkPage",_da8);
  15598. }
  15599. var _da9=_da3[_da5].getAttribute("drillIdx");
  15600. if(_da9==null){
  15601. continue;
  15602. }
  15603. if(_da9>=_d9f.length){
  15604. continue;
  15605. }
  15606. var _daa=_d9f[_da9];
  15607. if(typeof _daa!="object"){
  15608. continue;
  15609. }
  15610. _da6.setAttribute("outputFormat",_daa.getOutputFormat());
  15611. _da6.setAttribute("outputLocale",_daa.getOutputLocale());
  15612. _da6.setAttribute("prompt",_daa.getPrompt());
  15613. _da6.setAttribute("dynamicDrill",_daa.isDynamicDrillThrough()?"true":"false");
  15614. var _dab=_da3[_da5].getAttribute("label");
  15615. if(_dab===null||_dab===""){
  15616. _dab=_daa.getLabel();
  15617. }
  15618. _da6.setAttribute("label",_dab);
  15619. _da6.setAttribute("path",_daa.getPath());
  15620. _da6.setAttribute("showInNewWindow",_daa.getShowInNewWindow());
  15621. _da6.setAttribute("method",_daa.getMethod());
  15622. var _dac=_da2;
  15623. var _dad="";
  15624. var _dae=_daa.getParameterProperties();
  15625. if(typeof _dae!="undefined"&&_dae!=null&&_dae!=""){
  15626. _dad=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_daa.getParameterProperties()));
  15627. }
  15628. while(_dac){
  15629. var _daf=_dac.childNodes[_da5].childNodes;
  15630. for(var _db0=0;_db0<_daf.length;++_db0){
  15631. var _db1=_daf[_db0].cloneNode(true);
  15632. if(_dad){
  15633. var _db2=this.getPropertyToPass(_db1.getAttribute("name"),_dad);
  15634. if(_db2!=null&&_db2!=""){
  15635. _db1.setAttribute("propertyToPass",_db2);
  15636. }
  15637. }
  15638. _da6.appendChild(_db1);
  15639. }
  15640. _dac=_dac.nextSibling;
  15641. }
  15642. var _db3="<root xmlns:bus=\"http://developer.cognos.com/schemas/bibus/3/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
  15643. var _db4="</root>";
  15644. var _db5=_db3+_daa.getParameters()+_db4;
  15645. var _db6=XMLBuilderLoadXMLFromString(_db5);
  15646. var _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db6));
  15647. if(_db7){
  15648. _da6.appendChild(_db7.cloneNode(true));
  15649. }
  15650. var _db8=_db3+_daa.getObjectPaths()+_db4;
  15651. var _db9=XMLBuilderLoadXMLFromString(_db8);
  15652. _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db9));
  15653. if(_db7){
  15654. _da6.appendChild(_db7.cloneNode(true));
  15655. }
  15656. }
  15657. return XMLHelper_GetFirstChildElement(_da4);
  15658. };
  15659. function XmlHttpObject(){
  15660. this.m_formFields=new CDictionary();
  15661. this.xmlHttp=XmlHttpObject.createRequestObject();
  15662. this.m_requestIndicator=null;
  15663. this.m_httpCallbacks={};
  15664. this.m_asynch=true;
  15665. this.m_headers=null;
  15666. };
  15667. XmlHttpObject.prototype.setHeaders=function(_dba){
  15668. this.m_headers=_dba;
  15669. };
  15670. XmlHttpObject.prototype.getHeaders=function(){
  15671. return this.m_headers;
  15672. };
  15673. XmlHttpObject.prototype.newRequest=function(){
  15674. var _dbb=new XmlHttpObject();
  15675. _dbb.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  15676. this.executeHttpCallback("newRequest");
  15677. return _dbb;
  15678. };
  15679. XmlHttpObject.prototype.abortHttpRequest=function(){
  15680. if(this.xmlHttp!=null){
  15681. this.xmlHttp.abort();
  15682. this.xmlHttp=null;
  15683. this.executeHttpCallback("cancel");
  15684. this.m_httpCallbacks={};
  15685. }
  15686. };
  15687. XmlHttpObject.prototype.cancel=function(){
  15688. this.abortHttpRequest();
  15689. };
  15690. XmlHttpObject.prototype.executeHttpCallback=function(_dbc){
  15691. if(this.m_httpCallbacks&&this.m_httpCallbacks[_dbc]){
  15692. var _dbd=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
  15693. var _dbe=GUtil.generateCallback(this.m_httpCallbacks[_dbc].method,_dbd,this.m_httpCallbacks[_dbc].object);
  15694. _dbe();
  15695. return true;
  15696. }
  15697. return false;
  15698. };
  15699. XmlHttpObject.prototype.setCallbacks=function(_dbf){
  15700. if(!this.m_httpCallbacks){
  15701. this.m_httpCallbacks={};
  15702. }
  15703. for(callback in _dbf){
  15704. this.m_httpCallbacks[callback]=_dbf[callback];
  15705. }
  15706. };
  15707. XmlHttpObject.prototype.getCallbacks=function(){
  15708. return this.m_httpCallbacks;
  15709. };
  15710. XmlHttpObject.createRequestObject=function(){
  15711. var _dc0=null;
  15712. if(window.XMLHttpRequest){
  15713. _dc0=new XMLHttpRequest();
  15714. }else{
  15715. if(window.ActiveXObject){
  15716. _dc0=new ActiveXObject("Msxml2.XMLHTTP");
  15717. }else{
  15718. }
  15719. }
  15720. return _dc0;
  15721. };
  15722. XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
  15723. var _dc1=this.xmlHttp;
  15724. if(_dc1&&_dc1.readyState===4){
  15725. if(_dc1.status===200){
  15726. this.httpSuccess();
  15727. }else{
  15728. this.httpError();
  15729. }
  15730. }else{
  15731. }
  15732. };
  15733. XmlHttpObject.prototype.init=function(_dc2,_dc3,url,_dc5){
  15734. this.m_action=_dc2;
  15735. this.m_gateway=_dc3;
  15736. this.m_url=url;
  15737. this.m_asynch=_dc5;
  15738. };
  15739. XmlHttpObject.prototype.httpSuccess=function(){
  15740. this.executeHttpCallback("postHttpRequest");
  15741. this.executeHttpCallback("entryComplete");
  15742. this.executeHttpCallback("complete");
  15743. this.m_httpCallbacks=null;
  15744. };
  15745. XmlHttpObject.prototype.httpError=function(){
  15746. this.executeHttpCallback("entryFault");
  15747. this.executeHttpCallback("fault");
  15748. this.m_httpCallbacks=null;
  15749. };
  15750. XmlHttpObject.prototype.forceSynchronous=function(){
  15751. this.m_asynch=false;
  15752. };
  15753. XmlHttpObject.prototype.sendRequest=function(){
  15754. this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  15755. };
  15756. XmlHttpObject.prototype.sendHtmlRequest=function(_dc6,_dc7,url,_dc9){
  15757. var _dca=this.xmlHttp;
  15758. if(_dca){
  15759. _dca.open(_dc6,_dc7,_dc9);
  15760. if(_dc9){
  15761. _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  15762. }else{
  15763. _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  15764. if(!isIE()){
  15765. _dca.onload=GUtil.generateCallback(this.httpSuccess,[],this);
  15766. _dca.onerror=GUtil.generateCallback(this.httpError,[],this);
  15767. }
  15768. }
  15769. _dca.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  15770. if(this.m_headers){
  15771. for(header in this.m_headers){
  15772. _dca.setRequestHeader(header,this.m_headers[header]);
  15773. }
  15774. }
  15775. this.executeHttpCallback("preHttpRequest");
  15776. var _dcb=this.convertFormFieldsToUrl();
  15777. if(url){
  15778. _dcb+=url;
  15779. }
  15780. _dca.send(_dcb);
  15781. }
  15782. };
  15783. XmlHttpObject.prototype.getResponseXml=function(){
  15784. return (this.xmlHttp)?this.xmlHttp.responseXML:null;
  15785. };
  15786. XmlHttpObject.prototype.getResponseText=function(){
  15787. return (this.xmlHttp)?this.xmlHttp.responseText:"";
  15788. };
  15789. XmlHttpObject.prototype.getResponseHeader=function(item){
  15790. return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null;
  15791. };
  15792. XmlHttpObject.prototype.getStatus=function(){
  15793. return this.xmlHttp.status;
  15794. };
  15795. XmlHttpObject.prototype.addFormField=function(name,_dce){
  15796. this.m_formFields.add(name,_dce);
  15797. };
  15798. XmlHttpObject.prototype.getFormFields=function(){
  15799. return this.m_formFields;
  15800. };
  15801. XmlHttpObject.prototype.getFormField=function(_dcf){
  15802. return this.m_formFields.get(_dcf);
  15803. };
  15804. XmlHttpObject.prototype.clearFormFields=function(){
  15805. this.m_formFields=new CDictionary();
  15806. };
  15807. XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
  15808. var url="";
  15809. var _dd1=this.m_formFields.keys();
  15810. for(var _dd2=0;_dd2<_dd1.length;_dd2++){
  15811. if(_dd2>0){
  15812. url+="&";
  15813. }
  15814. url+=encodeURIComponent(_dd1[_dd2])+"="+encodeURIComponent(this.m_formFields.get(_dd1[_dd2]));
  15815. }
  15816. return url;
  15817. };
  15818. XmlHttpObject.prototype.concatResponseArguments=function(_dd3){
  15819. var _dd4=[this];
  15820. if(_dd3){
  15821. _dd4=_dd4.concat(_dd3);
  15822. }
  15823. return _dd4;
  15824. };
  15825. function AsynchRequest(_dd5,_dd6){
  15826. AsynchRequest.baseConstructor.call(this);
  15827. this.m_gateway=_dd5;
  15828. this.m_webContentRoot=_dd6;
  15829. this.m_callbacks={};
  15830. this.m_soapFault=null;
  15831. this.m_faultDialog=null;
  15832. this.m_promptDialog=null;
  15833. this.m_logonDialog=null;
  15834. };
  15835. AsynchRequest.prototype=new XmlHttpObject();
  15836. AsynchRequest.baseConstructor=XmlHttpObject;
  15837. AsynchRequest.prototype.parent=XmlHttpObject.prototype;
  15838. AsynchRequest.prototype.getTracking=function(){
  15839. return "";
  15840. };
  15841. AsynchRequest.prototype.getConversation=function(){
  15842. return "";
  15843. };
  15844. AsynchRequest.prototype.getPrimaryAction=function(){
  15845. return "";
  15846. };
  15847. AsynchRequest.prototype.getActionState=function(){
  15848. return "";
  15849. };
  15850. AsynchRequest.prototype.getAsynchStatus=function(){
  15851. return "";
  15852. };
  15853. AsynchRequest.prototype.getResult=function(){
  15854. return null;
  15855. };
  15856. AsynchRequest.prototype.getSoapFault=function(){
  15857. return this.m_soapFault;
  15858. };
  15859. AsynchRequest.prototype.constructFaultEnvelope=function(){
  15860. return null;
  15861. };
  15862. AsynchRequest.prototype.getPromptHTMLFragment=function(){
  15863. return "";
  15864. };
  15865. AsynchRequest.prototype.isRAPWaitTrue=function(){
  15866. return false;
  15867. };
  15868. AsynchRequest.prototype.getRAPRequestCache=function(){
  15869. return null;
  15870. };
  15871. AsynchRequest.prototype.getMainConversation=function(){
  15872. return null;
  15873. };
  15874. AsynchRequest.prototype.getMainTracking=function(){
  15875. return null;
  15876. };
  15877. AsynchRequest.prototype.construct=function(){
  15878. };
  15879. AsynchRequest.prototype.executeCallback=function(_dd7){
  15880. if(this.m_callbacks[_dd7]){
  15881. var _dd8=this.concatResponseArguments(this.m_callbacks.customArguments);
  15882. var _dd9=GUtil.generateCallback(this.m_callbacks[_dd7].method,_dd8,this.m_callbacks[_dd7].object);
  15883. _dd9();
  15884. return true;
  15885. }
  15886. return false;
  15887. };
  15888. AsynchRequest.prototype.setCallbacks=function(_dda){
  15889. if(!this.m_callbacks){
  15890. this.m_callbacks={};
  15891. }
  15892. for(callback in _dda){
  15893. this.m_callbacks[callback]=_dda[callback];
  15894. }
  15895. };
  15896. AsynchRequest.prototype.getCallbacks=function(){
  15897. return this.m_callbacks;
  15898. };
  15899. AsynchRequest.prototype.newRequest=function(){
  15900. var _ddb=this.construct();
  15901. _ddb.setHeaders(this.getHeaders());
  15902. if(this.getFormFields().exists("b_action")){
  15903. _ddb.addFormField("b_action",this.getFormField("b_action"));
  15904. }
  15905. if(this.getFormFields().exists("cv.catchLogOnFault")){
  15906. _ddb.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  15907. }
  15908. _ddb.setPromptDialog(this.m_promptDialog);
  15909. _ddb.setFaultDialog(this.m_faultDialog);
  15910. _ddb.setLogonDialog(this.m_logonDialog);
  15911. _ddb.m_asynch=this.m_asynch;
  15912. if(this.m_callbacks.newRequest){
  15913. var _ddc=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_ddb],this.m_callbacks.newRequest.object);
  15914. _ddc();
  15915. }
  15916. return _ddb;
  15917. };
  15918. AsynchRequest.prototype.success=function(){
  15919. var _ddd=this.getAsynchStatus();
  15920. switch(_ddd){
  15921. case "stillWorking":
  15922. case "working":
  15923. this.working();
  15924. break;
  15925. case "prompting":
  15926. this.prompting();
  15927. break;
  15928. case "fault":
  15929. case "complete":
  15930. case "conversationComplete":
  15931. this.complete();
  15932. break;
  15933. default:
  15934. this.complete();
  15935. break;
  15936. }
  15937. };
  15938. AsynchRequest.prototype.setFaultDialog=function(_dde){
  15939. if(_dde instanceof IFaultDialog){
  15940. if(typeof console!="undefined"){
  15941. console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
  15942. }
  15943. this.m_faultDialog=_dde;
  15944. }else{
  15945. if(_dde&&typeof console!="undefined"){
  15946. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  15947. }
  15948. }
  15949. };
  15950. AsynchRequest.prototype.setPromptDialog=function(_ddf){
  15951. if(_ddf instanceof IPromptDialog){
  15952. if(typeof console!="undefined"){
  15953. console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
  15954. }
  15955. this.m_promptDialog=_ddf;
  15956. }else{
  15957. if(_ddf&&typeof console!="undefined"){
  15958. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  15959. }
  15960. }
  15961. };
  15962. AsynchRequest.prototype.setLogonDialog=function(_de0){
  15963. if(_de0 instanceof ILogOnDialog){
  15964. if(typeof console!="undefined"){
  15965. console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
  15966. }
  15967. this.m_logonDialog=_de0;
  15968. }else{
  15969. if(_de0&&typeof console!="undefined"){
  15970. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  15971. }
  15972. }
  15973. };
  15974. AsynchRequest.prototype.resubmitRequest=function(){
  15975. var _de1=this.newRequest();
  15976. _de1.m_formFields=this.m_formFields;
  15977. _de1.sendRequest();
  15978. return _de1;
  15979. };
  15980. AsynchRequest.prototype.sendRequest=function(){
  15981. var _de2=this;
  15982. var _de3={"complete":{"object":_de2,"method":_de2.successHandler},"fault":{"object":_de2,"method":_de2.errorHandler}};
  15983. this.init("POST",this.m_gateway,"",this.m_asynch);
  15984. this.executeCallback("preHttpRequest");
  15985. this.parent.setCallbacks.call(this,_de3);
  15986. this.parent.sendRequest.call(this);
  15987. };
  15988. AsynchRequest.prototype.errorHandler=function(){
  15989. this.executeCallback("postHttpRequest");
  15990. this.executeCallback("entryFault");
  15991. this.executeCallback("error");
  15992. };
  15993. AsynchRequest.prototype.successHandler=function(){
  15994. this.executeCallback("postHttpRequest");
  15995. if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){
  15996. window["AsynchRequestPromptDialog"].hide();
  15997. window["AsynchRequestPromptDialog"]=null;
  15998. }
  15999. if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  16000. var _de4=this.getResponseText();
  16001. if(_de4.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
  16002. this.passportTimeout();
  16003. }else{
  16004. if((_de4.indexOf("http-equiv=\"refresh\"")!=-1)||(_de4.indexOf("http-equiv='refresh'")!=-1)){
  16005. this.passportTimeout();
  16006. }else{
  16007. this.executeCallback("entryFault");
  16008. if(!this.executeCallback("fault")){
  16009. var _de5=window.open("","","height=400,width=500");
  16010. if(_de5!=null){
  16011. _de5.document.write(_de4);
  16012. }
  16013. }
  16014. }
  16015. }
  16016. }else{
  16017. this.m_soapFault=this.constructFaultEnvelope();
  16018. if(this.m_soapFault!=null){
  16019. var _de6=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
  16020. if(_de6!=null&&XMLHelper_FindChildByTagName(_de6,"promptInfo",true)){
  16021. this.passportTimeout();
  16022. }else{
  16023. this.fault();
  16024. }
  16025. }else{
  16026. this.success();
  16027. }
  16028. }
  16029. };
  16030. AsynchRequest.prototype.cancel=function(){
  16031. this.parent.cancel.call(this);
  16032. var _de7=this.getFormField("m_tracking");
  16033. if(_de7){
  16034. var _de8=new XmlHttpObject();
  16035. _de8.init("POST",this.m_gateway,"",false);
  16036. if(this.getFormField("cv.outputKey")){
  16037. _de8.addFormField("b_action","cvx.high");
  16038. _de8.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  16039. _de8.setHeaders(this.getHeaders());
  16040. }else{
  16041. _de8.addFormField("b_action","cognosViewer");
  16042. }
  16043. _de8.addFormField("cv.responseFormat","successfulRequest");
  16044. _de8.addFormField("ui.action","cancel");
  16045. _de8.addFormField("m_tracking",_de7);
  16046. if(this.getFormField("cv.debugDirectory")){
  16047. _de8.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  16048. }
  16049. _de8.sendRequest();
  16050. this.executeCallback("cancel");
  16051. }
  16052. };
  16053. AsynchRequest.prototype.working=function(){
  16054. this.executeCallback("working");
  16055. var _de9=this.newRequest();
  16056. _de9.addFormField("m_tracking",this.getTracking());
  16057. if(this.getFormField("cv.outputKey")){
  16058. _de9.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  16059. _de9.addFormField("b_action","cvx.high");
  16060. }
  16061. if(this.isRAPWaitTrue()){
  16062. _de9.m_formFields=this.m_formFields;
  16063. _de9.addFormField("m_tracking",this.getTracking());
  16064. _de9.addFormField("rapWait","true");
  16065. var _dea=this.getRAPRequestCache();
  16066. if(_dea!==null&&typeof _dea!="undefined"){
  16067. _de9.addFormField("rapRequestCache",_dea);
  16068. }
  16069. var _deb=this.getMainConversation();
  16070. if(_deb){
  16071. _de9.addFormField("mainConversation",_deb);
  16072. }
  16073. var _dec=this.getMainTracking();
  16074. if(_dec){
  16075. _de9.addFormField("mainTracking",_dec);
  16076. }
  16077. }else{
  16078. _de9.addFormField("ui.action","wait");
  16079. _de9.addFormField("ui.primaryAction",this.getPrimaryAction());
  16080. _de9.addFormField("cv.actionState",this.getActionState());
  16081. if(this.getFormField("ui.preserveRapTags")){
  16082. _de9.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
  16083. }
  16084. if(this.getFormField("ui.backURL")){
  16085. _de9.addFormField("ui.backURL",this.getFormField("ui.backURL"));
  16086. }
  16087. if(this.getFormField("errURL")){
  16088. _de9.addFormField("errURL",this.getFormField("errURL"));
  16089. }
  16090. if(this.getFormField("cv.showFaultPage")){
  16091. _de9.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
  16092. }
  16093. if(this.getFormField("cv.catchLogOnFault")){
  16094. _de9.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  16095. }
  16096. }
  16097. if(this.getFormField("bux")){
  16098. _de9.addFormField("bux",this.getFormField("bux"));
  16099. }
  16100. if(this.getFormField("cv.debugDirectory")){
  16101. _de9.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  16102. }
  16103. _de9.sendRequest();
  16104. };
  16105. AsynchRequest.prototype.prompting=function(){
  16106. this.executeCallback("entryComplete");
  16107. if(!this.executeCallback("prompting")){
  16108. if(this.m_promptDialog!=null){
  16109. this.showPromptPage();
  16110. }else{
  16111. if(typeof console!="undefined"){
  16112. console.log("An unhandled prompt response was returned: %o",this.xmlHttp);
  16113. }
  16114. }
  16115. }
  16116. this.executeCallback("postEntryComplete");
  16117. };
  16118. AsynchRequest.prototype.promptPageOkCallback=function(_ded){
  16119. var _dee=this.newRequest();
  16120. _dee.addFormField("ui.action","forward");
  16121. _dee.addFormField("m_tracking",this.getTracking());
  16122. _dee.addFormField("ui.conversation",this.getConversation());
  16123. _dee.addFormField("ui.primaryAction",this.getPrimaryAction());
  16124. _dee.addFormField("cv.actionState",this.getActionState());
  16125. for(var _def in _ded){
  16126. _dee.addFormField(_def,_ded[_def]);
  16127. }
  16128. _dee.sendRequest();
  16129. window["AsynchRequestObject"]=null;
  16130. };
  16131. AsynchRequest.prototype.promptPageCancelCallback=function(){
  16132. window["AsynchRequestPromptDialog"].hide();
  16133. this.complete();
  16134. };
  16135. AsynchRequest.prototype.showPromptPage=function(){
  16136. window["AsynchRequestObject"]=this;
  16137. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  16138. var _df0=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
  16139. window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_df0,400,400);
  16140. window["AsynchRequestPromptDialog"].show();
  16141. };
  16142. AsynchRequest.prototype.passportTimeout=function(){
  16143. this.executeCallback("entryFault");
  16144. if(!this.executeCallback("passportTimeout")){
  16145. if(this.m_logonDialog!=null){
  16146. this.m_logonDialog.show(response.getSoapFault());
  16147. }else{
  16148. if(typeof console!="undefined"){
  16149. console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault());
  16150. }
  16151. }
  16152. }
  16153. };
  16154. AsynchRequest.prototype.fault=function(){
  16155. this.executeCallback("entryFault");
  16156. if(!this.executeCallback("fault")){
  16157. if(this.m_faultDialog!=null){
  16158. this.m_faultDialog.show(this.getSoapFault());
  16159. }else{
  16160. if(typeof console!="undefined"){
  16161. console.log("An unhandled soap fault was returned: %o",this.getSoapFault());
  16162. }
  16163. }
  16164. }
  16165. };
  16166. AsynchRequest.prototype.complete=function(){
  16167. this.executeCallback("entryComplete");
  16168. this.executeCallback("complete");
  16169. this.executeCallback("postEntryComplete");
  16170. };
  16171. AsynchRequest.prototype.getSoapFaultCode=function(){
  16172. var _df1=this.constructFaultEnvelope();
  16173. if(_df1){
  16174. var _df2=XMLHelper_FindChildByTagName(_df1,"faultcode",true);
  16175. if(_df2!=null){
  16176. return XMLHelper_GetText(_df2);
  16177. }
  16178. }
  16179. return null;
  16180. };
  16181. AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
  16182. var _df3=this.constructFaultEnvelope();
  16183. if(_df3){
  16184. var _df4=XMLHelper_FindChildByTagName(_df3,"messageString",true);
  16185. if(_df4!=null){
  16186. return XMLHelper_GetText(_df4);
  16187. }
  16188. }
  16189. return null;
  16190. };
  16191. function AsynchDATARequest(_df5,_df6){
  16192. AsynchDATARequest.baseConstructor.call(this,_df5,_df6);
  16193. this.m_oResponseState=null;
  16194. this.m_sResponseState=null;
  16195. this.m_endOfStateIdx=-1;
  16196. this.cStatePrefix="<xml><state>";
  16197. this.cStateSuffix="</state></xml>";
  16198. };
  16199. AsynchDATARequest.prototype=new AsynchRequest();
  16200. AsynchDATARequest.baseConstructor=AsynchRequest;
  16201. AsynchDATARequest.prototype.getEndOfStateIdx=function(){
  16202. if(this.m_endOfStateIdx==-1){
  16203. var _df7=this.getResponseText().substring(0,12);
  16204. if(_df7==this.cStatePrefix){
  16205. this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix);
  16206. if(this.m_endOfStateIdx!=-1){
  16207. this.m_endOfStateIdx+=this.cStateSuffix.length;
  16208. }
  16209. }
  16210. }
  16211. return this.m_endOfStateIdx;
  16212. };
  16213. AsynchDATARequest.prototype.getResponseStateText=function(){
  16214. if(!this.m_sResponseState){
  16215. this.getResponseState();
  16216. }
  16217. return this.m_sResponseState;
  16218. };
  16219. AsynchDATARequest.prototype.getResponseState=function(){
  16220. if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){
  16221. this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length);
  16222. if(this.m_sResponseState!=null){
  16223. this.m_sResponseState=xml_decode(this.m_sResponseState);
  16224. this.m_oResponseState=eval("("+this.m_sResponseState+")");
  16225. }
  16226. }
  16227. return this.m_oResponseState;
  16228. };
  16229. AsynchDATARequest.prototype.getAsynchStatus=function(){
  16230. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){
  16231. return this.getResponseState().m_sStatus;
  16232. }
  16233. return "unknown";
  16234. };
  16235. AsynchDATARequest.prototype.getTracking=function(){
  16236. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){
  16237. return this.getResponseState().m_sTracking;
  16238. }
  16239. return "";
  16240. };
  16241. AsynchDATARequest.prototype.getConversation=function(){
  16242. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){
  16243. return this.getResponseState().m_sConversation;
  16244. }
  16245. return "";
  16246. };
  16247. AsynchDATARequest.prototype.getPrimaryAction=function(){
  16248. if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){
  16249. return this.getResponseState().envParams["ui.primaryAction"];
  16250. }
  16251. return "";
  16252. };
  16253. AsynchDATARequest.prototype.getActionState=function(){
  16254. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){
  16255. return this.getResponseState().m_sActionState;
  16256. }
  16257. return "";
  16258. };
  16259. AsynchDATARequest.prototype.getResult=function(){
  16260. if(this.getEndOfStateIdx()!=-1){
  16261. return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length);
  16262. }
  16263. return "";
  16264. };
  16265. AsynchDATARequest.prototype.getDebugLogs=function(){
  16266. if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){
  16267. return this.getResponseState().debugLogs;
  16268. }
  16269. return "";
  16270. };
  16271. AsynchDATARequest.prototype.getPromptHTMLFragment=function(){
  16272. return this.getResult();
  16273. };
  16274. AsynchDATARequest.prototype.constructFaultEnvelope=function(){
  16275. if(this.m_soapFault==null){
  16276. var _df8=this.getResponseState();
  16277. if(_df8!=null){
  16278. if(_df8.m_sSoapFault){
  16279. var _df9=_df8.m_sSoapFault;
  16280. this.m_soapFault=XMLBuilderLoadXMLFromString(_df9);
  16281. }
  16282. }
  16283. }
  16284. return this.m_soapFault;
  16285. };
  16286. AsynchDATARequest.prototype.construct=function(){
  16287. var _dfa=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
  16288. _dfa.setCallbacks(this.m_callbacks);
  16289. if(this.getFormFields().exists("cv.responseFormat")){
  16290. _dfa.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  16291. }else{
  16292. _dfa.addFormField("cv.responseFormat","data");
  16293. }
  16294. return _dfa;
  16295. };
  16296. AsynchDATARequest.prototype.getEnvParam=function(_dfb){
  16297. var _dfc=this.getResponseState();
  16298. if(_dfc&&typeof _dfc.envParams!="undefined"&&typeof _dfc.envParams[_dfb]!="undefined"){
  16299. return _dfc.envParams[_dfb];
  16300. }
  16301. return null;
  16302. };
  16303. AsynchDATARequest.prototype.isRAPWaitTrue=function(){
  16304. var _dfd=this.getEnvParam("rapWait");
  16305. if(_dfd!=null){
  16306. return _dfd=="true"?true:false;
  16307. }
  16308. return false;
  16309. };
  16310. AsynchDATARequest.prototype.getRAPRequestCache=function(){
  16311. return this.getEnvParam("rapRequestCache");
  16312. };
  16313. AsynchDATARequest.prototype.getMainConversation=function(){
  16314. return this.getEnvParam("mainConversation");
  16315. };
  16316. AsynchDATARequest.prototype.getMainTracking=function(){
  16317. return this.getEnvParam("mainTracking");
  16318. };
  16319. function AsynchJSONRequest(_dfe,_dff){
  16320. AsynchJSONRequest.baseConstructor.call(this,_dfe,_dff);
  16321. this.m_jsonResponse=null;
  16322. };
  16323. AsynchJSONRequest.prototype=new AsynchRequest();
  16324. AsynchJSONRequest.baseConstructor=AsynchRequest;
  16325. AsynchJSONRequest.prototype.getJSONResponseObject=function(){
  16326. if(this.m_jsonResponse==null){
  16327. if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){
  16328. var text=this.getResponseText();
  16329. if(text!=null){
  16330. var _e01=this.removeInvalidCharacters(text);
  16331. this.m_jsonResponse=eval("("+_e01+")");
  16332. }
  16333. }
  16334. }
  16335. return this.m_jsonResponse;
  16336. };
  16337. AsynchJSONRequest.prototype.getTracking=function(){
  16338. var _e02=this.getJSONResponseObject();
  16339. if(_e02){
  16340. return _e02.tracking;
  16341. }
  16342. return "";
  16343. };
  16344. AsynchJSONRequest.prototype.getConversation=function(){
  16345. var _e03=this.getJSONResponseObject();
  16346. if(_e03){
  16347. return _e03.conversation;
  16348. }
  16349. return "";
  16350. };
  16351. AsynchJSONRequest.prototype.getAsynchStatus=function(){
  16352. var _e04=this.getJSONResponseObject();
  16353. if(_e04){
  16354. return _e04.status;
  16355. }
  16356. return "unknown";
  16357. };
  16358. AsynchJSONRequest.prototype.getPrimaryAction=function(){
  16359. var _e05=this.getJSONResponseObject();
  16360. if(_e05){
  16361. return _e05.primaryAction;
  16362. }
  16363. return "";
  16364. };
  16365. AsynchJSONRequest.prototype.getActionState=function(){
  16366. var _e06=this.getJSONResponseObject();
  16367. if(_e06){
  16368. return _e06.actionState;
  16369. }
  16370. return "";
  16371. };
  16372. AsynchJSONRequest.prototype.getDebugLogs=function(){
  16373. var _e07=this.getJSONResponseObject();
  16374. if(_e07){
  16375. return _e07.debugLogs;
  16376. }
  16377. return "";
  16378. };
  16379. AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
  16380. var _e08=this.getJSONResponseObject();
  16381. if(_e08){
  16382. return (_e08.rapWait==="true");
  16383. }
  16384. return false;
  16385. };
  16386. AsynchJSONRequest.prototype.getRAPRequestCache=function(){
  16387. var _e09=this.getJSONResponseObject();
  16388. if(_e09){
  16389. var _e0a=_e09.rapRequestCache;
  16390. if(_e0a!==null&&typeof _e0a!="undefined"){
  16391. return _e0a;
  16392. }
  16393. }
  16394. return null;
  16395. };
  16396. AsynchJSONRequest.prototype.getMainConversation=function(){
  16397. var _e0b=this.getJSONResponseObject();
  16398. if(_e0b){
  16399. return _e0b.mainConversation;
  16400. }
  16401. return null;
  16402. };
  16403. AsynchJSONRequest.prototype.getMainTracking=function(){
  16404. var _e0c=this.getJSONResponseObject();
  16405. if(_e0c){
  16406. return _e0c.mainTracking;
  16407. }
  16408. return null;
  16409. };
  16410. AsynchJSONRequest.prototype.getResult=function(){
  16411. var _e0d=this.getJSONResponseObject();
  16412. if(_e0d&&_e0d.json){
  16413. var _e0e=this.removeInvalidCharacters(_e0d.json);
  16414. return eval("("+_e0e+")");
  16415. }
  16416. return null;
  16417. };
  16418. AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
  16419. if(text){
  16420. text=text.replace(/(\n|\r|\t)+/g,"");
  16421. }
  16422. return text;
  16423. };
  16424. AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
  16425. var _e10=this.getJSONResponseObject();
  16426. if(_e10&&_e10.promptHTMLFragment){
  16427. return _e10.promptHTMLFragment;
  16428. }
  16429. return "";
  16430. };
  16431. AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
  16432. if(this.m_soapFault==null){
  16433. var _e11=this.getJSONResponseObject();
  16434. if(_e11.status=="fault"){
  16435. this.m_soapFault=XMLBuilderLoadXMLFromString(_e11.fault);
  16436. }
  16437. }
  16438. return this.m_soapFault;
  16439. };
  16440. AsynchJSONRequest.prototype.construct=function(){
  16441. var _e12=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
  16442. _e12.setCallbacks(this.m_callbacks);
  16443. if(this.getFormFields().exists("cv.responseFormat")){
  16444. _e12.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  16445. }else{
  16446. _e12.addFormField("cv.responseFormat","asynchJSON");
  16447. }
  16448. return _e12;
  16449. };
  16450. function IFaultDialog(){
  16451. };
  16452. IFaultDialog.prototype.show=function(){
  16453. if(typeof console!="undefined"){
  16454. console.log("Required method IFaultDialog:show not implemented.");
  16455. }
  16456. };
  16457. IFaultDialog.prototype.handleUnknownHTMLResponse=function(){
  16458. if(typeof console!="undefined"){
  16459. console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented.");
  16460. }
  16461. };
  16462. function ILogOnDialog(){
  16463. };
  16464. ILogOnDialog.prototype.show=function(_e13){
  16465. if(typeof console!="undefined"){
  16466. console.log("Required method ILogOnDialog:show not implemented.");
  16467. }
  16468. };
  16469. ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_e14){
  16470. if(typeof console!="undefined"){
  16471. console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
  16472. }
  16473. };
  16474. function IPromptDialog(){
  16475. };
  16476. IPromptDialog.prototype.initialize=function(url,_e16,_e17){
  16477. if(typeof console!="undefined"){
  16478. console.log("Required method IModalDialog:initialize not implemented.");
  16479. }
  16480. };
  16481. IPromptDialog.prototype.show=function(){
  16482. if(typeof console!="undefined"){
  16483. console.log("Required method IModalDialog:show not implemented.");
  16484. }
  16485. };
  16486. IPromptDialog.prototype.hide=function(){
  16487. if(typeof console!="undefined"){
  16488. console.log("Required method IModalDialog:hide not implemented.");
  16489. }
  16490. };
  16491. function IRequestHandler(){
  16492. };
  16493. IRequestHandler.prototype.preHttpRequest=function(_e18){
  16494. if(typeof console!="undefined"){
  16495. console.log("Required method IRequestHandler:preHttpRequest not implemented.");
  16496. }
  16497. };
  16498. IRequestHandler.prototype.postHttpRequest=function(_e19){
  16499. if(typeof console!="undefined"){
  16500. console.log("Required method IRequestHandler:postHttpRequest not implemented.");
  16501. }
  16502. };
  16503. IRequestHandler.prototype.postComplete=function(_e1a){
  16504. if(typeof console!="undefined"){
  16505. console.log("Required method IRequestHandler:postComplete not implemented.");
  16506. }
  16507. };
  16508. IRequestHandler.prototype.onComplete=function(_e1b){
  16509. if(typeof console!="undefined"){
  16510. console.log("Required method IRequestHandler:onComplete not implemented.");
  16511. }
  16512. };
  16513. IRequestHandler.prototype.onPostEntryComplete=function(_e1c){
  16514. if(typeof console!="undefined"){
  16515. console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
  16516. }
  16517. };
  16518. IRequestHandler.prototype.onFault=function(_e1d){
  16519. if(typeof console!="undefined"){
  16520. console.log("Required method IRequestHandler:onFault not implemented.");
  16521. }
  16522. };
  16523. IRequestHandler.prototype.onPrompting=function(_e1e){
  16524. if(typeof console!="undefined"){
  16525. console.log("Required method IRequestHandler:onPrompting not implemented.");
  16526. }
  16527. };
  16528. IRequestHandler.prototype.onWorking=function(_e1f){
  16529. if(typeof console!="undefined"){
  16530. console.log("Required method IRequestHandler:onWorking not implemented.");
  16531. }
  16532. };
  16533. IRequestHandler.prototype.setWorkingDialog=function(_e20){
  16534. if(typeof console!="undefined"){
  16535. console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
  16536. }
  16537. };
  16538. IRequestHandler.prototype.setRequestIndicator=function(_e21){
  16539. if(typeof console!="undefined"){
  16540. console.log("Required method IRequestHandler:setExecutionCursor not implemented.");
  16541. }
  16542. };
  16543. function IRequestIndicator(){
  16544. };
  16545. IRequestIndicator.prototype.show=function(){
  16546. if(typeof console!="undefined"){
  16547. console.log("Required method IRequestIndicator:show not implemented.");
  16548. }
  16549. };
  16550. IRequestIndicator.prototype.hide=function(){
  16551. if(typeof console!="undefined"){
  16552. console.log("Required method IRequestIndicator:hide not implemented.");
  16553. }
  16554. };
  16555. function BaseRequestHandler(oCV){
  16556. if(oCV){
  16557. this.m_oCV=oCV;
  16558. this.m_workingDialog=null;
  16559. this.m_requestIndicator=null;
  16560. this.m_faultDialog=null;
  16561. this.m_logOnDialog=null;
  16562. this.m_promptDialog=null;
  16563. this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null;
  16564. }
  16565. };
  16566. BaseRequestHandler.prototype=new IRequestHandler();
  16567. BaseRequestHandler.prototype.onError=function(_e23){
  16568. };
  16569. BaseRequestHandler.prototype.onComplete=function(){
  16570. };
  16571. BaseRequestHandler.prototype.onPrompting=function(){
  16572. };
  16573. BaseRequestHandler.prototype.resubmitInSafeMode=function(){
  16574. };
  16575. BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
  16576. };
  16577. BaseRequestHandler.prototype.onPostEntryComplete=function(){
  16578. this._processDelayedLoadingQueue();
  16579. };
  16580. BaseRequestHandler.prototype.getViewer=function(){
  16581. return this.m_oCV;
  16582. };
  16583. BaseRequestHandler.prototype.setDispatcherEntry=function(_e24){
  16584. this.m_oDispatcherEntry=_e24;
  16585. };
  16586. BaseRequestHandler.prototype.getDispatcherEntry=function(){
  16587. return this.m_oDispatcherEntry;
  16588. };
  16589. BaseRequestHandler.prototype.processInitialResponse=function(_e25){
  16590. this.updateViewerState(_e25);
  16591. };
  16592. BaseRequestHandler.prototype.setLogOnDialog=function(_e26){
  16593. if(_e26==null){
  16594. this.m_logOnDialog=null;
  16595. }else{
  16596. if(_e26 instanceof ILogOnDialog){
  16597. this.m_logOnDialog=_e26;
  16598. }else{
  16599. if(_e26&&typeof console!="undefined"){
  16600. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  16601. }
  16602. }
  16603. }
  16604. };
  16605. BaseRequestHandler.prototype.setWorkingDialog=function(_e27){
  16606. if(_e27==null){
  16607. this.m_workingDialog=null;
  16608. }else{
  16609. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
  16610. this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
  16611. }else{
  16612. if(_e27 instanceof IRequestIndicator){
  16613. this.m_workingDialog=_e27;
  16614. }else{
  16615. if(_e27&&typeof console!="undefined"){
  16616. console.log("The parameter workingDialog must be an instance of IRequestIndicator");
  16617. }
  16618. }
  16619. }
  16620. }
  16621. };
  16622. BaseRequestHandler.prototype.getWorkingDialog=function(){
  16623. return this.m_workingDialog;
  16624. };
  16625. BaseRequestHandler.prototype.setRequestIndicator=function(_e28){
  16626. if(_e28==null){
  16627. this.m_requestIndicator=null;
  16628. }else{
  16629. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
  16630. this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
  16631. }else{
  16632. if(_e28 instanceof IRequestIndicator){
  16633. this.m_requestIndicator=_e28;
  16634. }else{
  16635. if(_e28&&typeof console!="undefined"){
  16636. console.log("The parameter requestIndicator must be an instance of IRequestIndicator");
  16637. }
  16638. }
  16639. }
  16640. }
  16641. };
  16642. BaseRequestHandler.prototype.getRequestIndicator=function(){
  16643. return this.m_requestIndicator;
  16644. };
  16645. BaseRequestHandler.prototype.setFaultDialog=function(_e29){
  16646. if(_e29==null){
  16647. this.m_faultDialog=null;
  16648. }else{
  16649. if(_e29 instanceof IFaultDialog){
  16650. this.m_faultDialog=_e29;
  16651. }else{
  16652. if(_e29&&typeof console!="undefined"){
  16653. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  16654. }
  16655. }
  16656. }
  16657. };
  16658. BaseRequestHandler.prototype.setPromptDialog=function(_e2a){
  16659. if(_e2a==null){
  16660. this.m_promptDialog=null;
  16661. }else{
  16662. if(_e2a instanceof IPromptDialog){
  16663. this.m_promptDialog=_e2a;
  16664. }else{
  16665. if(_e2a&&typeof console!="undefined"){
  16666. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  16667. }
  16668. }
  16669. }
  16670. };
  16671. BaseRequestHandler.prototype.preHttpRequest=function(_e2b){
  16672. if(_e2b&&typeof _e2b.getFormField=="function"){
  16673. if(_e2b.getFormField("ui.action")!="wait"&&_e2b.getFormField("rapWait")!="true"){
  16674. if(this.m_requestIndicator){
  16675. this.m_requestIndicator.show();
  16676. }
  16677. }
  16678. }
  16679. };
  16680. BaseRequestHandler.prototype.postHttpRequest=function(_e2c){
  16681. if(_e2c&&typeof _e2c.getAsynchStatus=="function"){
  16682. var _e2d=_e2c.getAsynchStatus();
  16683. if(_e2d!="working"&&_e2d!="stillWorking"){
  16684. if(this.m_workingDialog){
  16685. this.m_workingDialog.hide();
  16686. }
  16687. if(this.m_requestIndicator){
  16688. this.m_requestIndicator.hide();
  16689. }
  16690. }
  16691. }else{
  16692. if(this.m_workingDialog){
  16693. this.m_workingDialog.hide();
  16694. }
  16695. if(this.m_requestIndicator){
  16696. this.m_requestIndicator.hide();
  16697. }
  16698. }
  16699. };
  16700. BaseRequestHandler.prototype.onFault=function(_e2e){
  16701. var oCV=this.getViewer();
  16702. if(this.m_workingDialog){
  16703. this.m_workingDialog.hide();
  16704. }
  16705. if(this.m_requestIndicator){
  16706. this.m_requestIndicator.hide();
  16707. }
  16708. if(typeof FaultDialog=="undefined"){
  16709. if(typeof console!="undefined"){
  16710. console.log("An unhandled fault was returned: %o",_e2e);
  16711. }
  16712. return;
  16713. }
  16714. if(!this.m_faultDialog){
  16715. this.m_faultDialog=new FaultDialog(this.getViewer());
  16716. }
  16717. if(_e2e&&_e2e.getResponseHeader&&_e2e.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  16718. this.m_faultDialog.handleUnknownHTMLResponse(_e2e.getResponseText());
  16719. }else{
  16720. if(_e2e&&_e2e.getSoapFault){
  16721. this.m_faultDialog.show(_e2e.getSoapFault());
  16722. }else{
  16723. if(oCV.getSoapFault()){
  16724. var _e30=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  16725. this.m_faultDialog.show(_e30);
  16726. oCV.setSoapFault("");
  16727. }else{
  16728. if(typeof console!="undefined"){
  16729. console.log("An unhandled fault was returned: %o",_e2e);
  16730. }
  16731. }
  16732. }
  16733. }
  16734. };
  16735. BaseRequestHandler.prototype.isAuthenticationFault=function(_e31){
  16736. var oCV=this.getViewer();
  16737. var _e33=null;
  16738. if(_e31&&_e31.getSoapFault){
  16739. _e33=_e31.getSoapFault();
  16740. }else{
  16741. if(oCV.getSoapFault()){
  16742. _e33=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  16743. }
  16744. }
  16745. if(_e33!=null){
  16746. var _e34=XMLHelper_FindChildByTagName(_e33,"CAM",true);
  16747. return (_e34!=null&&XMLHelper_FindChildByTagName(_e34,"promptInfo",true)!=null);
  16748. }
  16749. return false;
  16750. };
  16751. BaseRequestHandler.prototype.onPassportTimeout=function(_e35){
  16752. var oCV=this.getViewer();
  16753. if(this.m_workingDialog){
  16754. this.m_workingDialog.hide();
  16755. }
  16756. if(this.m_requestIndicator){
  16757. this.m_requestIndicator.hide();
  16758. }
  16759. if(!this.m_logOnDialog){
  16760. this.m_logOnDialog=new LogOnDialog(this.getViewer());
  16761. }
  16762. if(_e35&&_e35.getResponseHeader&&_e35.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  16763. var _e37="";
  16764. if(_e35.getResponseText){
  16765. _e37=_e35.getResponseText();
  16766. }
  16767. if((_e37.indexOf("http-equiv=\"refresh\"")!=-1)||(_e37.indexOf("http-equiv='refresh'")!=-1)){
  16768. this.m_logOnDialog.show(null);
  16769. }else{
  16770. this.m_logOnDialog.handleUnknownHTMLResponse(_e37);
  16771. }
  16772. }else{
  16773. if(_e35&&_e35.getSoapFault){
  16774. this.m_logOnDialog.show(_e35.getSoapFault());
  16775. }else{
  16776. if(oCV.getSoapFault()){
  16777. var _e38=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  16778. this.m_logOnDialog.show(_e38);
  16779. oCV.setSoapFault("");
  16780. }else{
  16781. if(typeof console!="undefined"){
  16782. console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_e35);
  16783. }
  16784. }
  16785. }
  16786. }
  16787. };
  16788. BaseRequestHandler.prototype.onWorking=function(_e39){
  16789. if(this.m_workingDialog){
  16790. var _e3a=_e39&&typeof _e39.getAsynchStatus=="function"&&_e39.getAsynchStatus()=="stillWorking"?true:false;
  16791. if(!_e3a){
  16792. if(this.m_requestIndicator){
  16793. this.m_requestIndicator.hide();
  16794. }
  16795. this.m_workingDialog.show();
  16796. }
  16797. }
  16798. };
  16799. BaseRequestHandler.prototype.onCancel=function(){
  16800. if(this.m_workingDialog){
  16801. this.m_workingDialog.hide();
  16802. }
  16803. if(this.m_requestIndicator){
  16804. this.m_requestIndicator.hide();
  16805. }
  16806. var oCV=this.getViewer();
  16807. oCV.gbPromptRequestSubmitted=false;
  16808. this._processDelayedLoadingQueue();
  16809. };
  16810. BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){
  16811. var oCV=this.getViewer();
  16812. if(oCV&&oCV.getViewerWidget()){
  16813. var _e3d=oCV.getViewerWidget();
  16814. if(_e3d.getLoadManager()){
  16815. _e3d.getLoadManager().processQueue();
  16816. }
  16817. }
  16818. };
  16819. BaseRequestHandler.prototype.onPrompting=function(_e3e){
  16820. var oCV=this.getViewer();
  16821. if(this.m_workingDialog){
  16822. this.m_workingDialog.hide();
  16823. }
  16824. if(this.m_requestIndicator){
  16825. this.m_requestIndicator.hide();
  16826. }
  16827. if(!this.m_promptDialog){
  16828. this.m_promptDialog=new PromptDialog(this.getViewer());
  16829. }
  16830. window["AsynchRequestObject"]=_e3e;
  16831. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  16832. var _e40="?cv.id="+oCV.getId();
  16833. window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_e40,400,400);
  16834. window["AsynchRequestPromptDialog"].show();
  16835. };
  16836. BaseRequestHandler.prototype.processDATAReportResponse=function(_e41){
  16837. var oCV=this.getViewer();
  16838. if(!oCV||oCV.m_destroyed){
  16839. if(console){
  16840. console.warn("Tried to process a data response on an invalid CCognosViewer",oCV);
  16841. }
  16842. return;
  16843. }
  16844. var _e43=_e41.getResponseState();
  16845. if(!_e43){
  16846. this.resubmitInSafeMode();
  16847. }
  16848. if(this.loadReportHTML(_e41.getResult())===false){
  16849. this.resubmitInSafeMode();
  16850. }
  16851. this.updateViewerState(_e43);
  16852. };
  16853. BaseRequestHandler.prototype.updateViewerState=function(_e44){
  16854. var oCV=this.getViewer();
  16855. applyJSONProperties(oCV,_e44);
  16856. var _e46=oCV.getStatus();
  16857. if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("&lt;")===0){
  16858. oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]);
  16859. }
  16860. if(_e46!="fault"){
  16861. if(oCV.envParams["rapReportInfo"]){
  16862. this._processRapReportInfo(oCV);
  16863. }
  16864. if(typeof _e44.clientunencodedexecutionparameters!="undefined"){
  16865. var _e47=document.getElementById("formWarpRequest"+oCV.getId());
  16866. if(_e47!=null&&typeof _e47["clientunencodedexecutionparameters"]!="undefined"){
  16867. _e47["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters;
  16868. }
  16869. if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
  16870. document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters;
  16871. }
  16872. }
  16873. }else{
  16874. oCV.setTracking("");
  16875. }
  16876. };
  16877. BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
  16878. if(oCV.envParams["rapReportInfo"]){
  16879. var _e49=eval("("+oCV.envParams["rapReportInfo"]+")");
  16880. if(typeof RAPReportInfo!="undefined"){
  16881. var _e4a=new RAPReportInfo(_e49,oCV);
  16882. oCV.setRAPReportInfo(_e4a);
  16883. }
  16884. }
  16885. };
  16886. BaseRequestHandler.prototype.loadReportHTML=function(_e4b){
  16887. if(!_e4b){
  16888. return true;
  16889. }
  16890. var oCV=this.getViewer();
  16891. if(window.IBM&&window.IBM.perf){
  16892. window.IBM.perf.log("viewer_gotHtml",oCV);
  16893. }
  16894. if(oCV.m_undoStack.length>0){
  16895. oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true;
  16896. }
  16897. oCV.pageNavigationObserverArray=[];
  16898. oCV.m_flashChartsObjectIds=[];
  16899. var _e4d=_e4b.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
  16900. oCV.m_sHTML=_e4d;
  16901. oCV.setHasPrompts(false);
  16902. var id=oCV.getId();
  16903. var _e4f=document.getElementById("RVContent"+id);
  16904. var _e50=document.getElementById("CVReport"+id);
  16905. if(window.gScriptLoader){
  16906. var _e51=oCV.getViewerWidget()?true:false;
  16907. var _e52=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_e50;
  16908. _e4d=window.gScriptLoader.loadCSS(_e4d,_e52,_e51,id);
  16909. }
  16910. if(oCV.sBrowser=="ie"){
  16911. _e4d="<span style='display:none'>&nbsp;</span>"+_e4d;
  16912. }
  16913. _e50.innerHTML=_e4d;
  16914. this.massageHtmlBeforeDisplayed();
  16915. if(window.gScriptLoader){
  16916. var _e53=GUtil.generateCallback(oCV.showLoadedContent,[_e4f],oCV);
  16917. oCV.m_resizeReady=false;
  16918. if(!window.gScriptLoader.loadAll(_e50,_e53,id,true)){
  16919. if(window.gScriptLoader.containsAjaxWarnings()){
  16920. return false;
  16921. }
  16922. }
  16923. }else{
  16924. _e4f.style.display="block";
  16925. }
  16926. var _e54=document.querySelectorAll("button");
  16927. var _e55=_e54.length;
  16928. for(var k=0;k<_e55;k++){
  16929. var _e57=_e54[k];
  16930. var id=_e57.id;
  16931. var _e58=id.match(/reprompt/);
  16932. if(_e58){
  16933. var _e59=_e57.outerHTML;
  16934. var _e5a=_e59.match(/layoutname="\w+"/);
  16935. if(_e5a!==null){
  16936. var _e5b=_e5a[0];
  16937. var _e5c=/".*"/;
  16938. var _e5d=_e5c.exec(_e5b);
  16939. if(oCV.getCurrentPromptControlFocus()==_e5d){
  16940. _e57.focus();
  16941. oCV.setCurrentPromptControlFocus(null);
  16942. _e57=null;
  16943. }
  16944. }else{
  16945. oCV.setCurrentPromptControlFocus(null);
  16946. _e57=null;
  16947. }
  16948. }
  16949. }
  16950. oCV.updateOutputForA11ySupport();
  16951. this._clearFindState();
  16952. return true;
  16953. };
  16954. BaseRequestHandler.prototype._clearFindState=function(){
  16955. var oCV=this.getViewer();
  16956. var _e5f=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
  16957. if(_e5f&&!_e5f.findOnServerInProgress()){
  16958. oCV.getState().clearFindState();
  16959. }
  16960. };
  16961. BaseRequestHandler.prototype.showReport=function(){
  16962. var oCV=this.getViewer();
  16963. var _e61=document.getElementById("CVReport"+oCV.getId());
  16964. if(_e61){
  16965. _e61.style.display="";
  16966. }
  16967. };
  16968. BaseRequestHandler.prototype.postComplete=function(){
  16969. var oCV=this.getViewer();
  16970. if(oCV.shouldWriteNavLinks()){
  16971. oCV.writeNavLinks(oCV.getSecondaryRequests().join(" "));
  16972. }
  16973. if(oCV.getStatus()==="complete"){
  16974. oCV.m_undoStack=[new CognosViewerSession(oCV)];
  16975. }
  16976. };
  16977. BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_e63){
  16978. if(this.m_httpRequestConfig){
  16979. var _e64=this.m_httpRequestConfig.getReportStatusCallback(_e63);
  16980. if(_e64){
  16981. _e64();
  16982. }
  16983. }
  16984. };
  16985. BaseRequestHandler.prototype.addCallbackHooks=function(){
  16986. if(!this.m_httpRequestConfig){
  16987. return;
  16988. }
  16989. this._addCallback("complete","onComplete");
  16990. this._addCallback("working","onWorking");
  16991. this._addCallback("prompting","onPrompting");
  16992. };
  16993. BaseRequestHandler.prototype._addCallback=function(_e65,_e66){
  16994. var _e67=_e65;
  16995. var _e68=this[_e66];
  16996. this[_e66]=function(_e69){
  16997. _e68.apply(this,arguments);
  16998. var _e6a=null;
  16999. if(_e69&&typeof _e69.getAsynchStatus=="function"){
  17000. _e6a=_e69.getAsynchStatus();
  17001. }else{
  17002. _e6a=_e67=="complete"?this.getViewer().getStatus():_e67;
  17003. }
  17004. if(_e6a=="stillWorking"){
  17005. return;
  17006. }
  17007. var _e6b=this.m_httpRequestConfig.getReportStatusCallback(_e6a);
  17008. if(typeof _e6b=="function"){
  17009. setTimeout(_e6b,10);
  17010. }
  17011. };
  17012. };
  17013. function ViewerBaseWorkingDialog(_e6c){
  17014. if(!_e6c){
  17015. return;
  17016. }
  17017. this.setCognosViewer(_e6c);
  17018. this.m_oCV=_e6c;
  17019. this.m_sNamespace=_e6c.getId();
  17020. this.m_sGateway=_e6c.getGateway();
  17021. this.m_UIBlacklist=null;
  17022. this.m_bUse=true;
  17023. this.m_bCancelSubmitted=false;
  17024. };
  17025. ViewerBaseWorkingDialog.prototype=new IRequestIndicator();
  17026. ViewerBaseWorkingDialog.prototype.setCognosViewer=function(oCV){
  17027. this.m_oCV=oCV;
  17028. };
  17029. ViewerBaseWorkingDialog.prototype.getCognosViewer=function(){
  17030. return this.m_oCV;
  17031. };
  17032. ViewerBaseWorkingDialog.prototype.getGateway=function(){
  17033. return this.m_sGateway;
  17034. };
  17035. ViewerBaseWorkingDialog.prototype.getNamespace=function(){
  17036. return this.m_sNamespace;
  17037. };
  17038. ViewerBaseWorkingDialog.prototype.cancelSubmitted=function(){
  17039. return this.m_bCancelSubmitted;
  17040. };
  17041. ViewerBaseWorkingDialog.prototype.setCancelSubmitted=function(_e6e){
  17042. this.m_bCancelSubmitted=_e6e;
  17043. };
  17044. ViewerBaseWorkingDialog.prototype.show=function(){
  17045. var _e6f=document.getElementById(this.getContainerId());
  17046. if(_e6f){
  17047. _e6f.style.display="block";
  17048. this.enableCancelButton();
  17049. }else{
  17050. this.create();
  17051. }
  17052. var _e70=document.getElementById("reportBlocker"+this.m_oCV.getId());
  17053. if(_e70){
  17054. _e70.style.display="block";
  17055. }
  17056. };
  17057. ViewerBaseWorkingDialog.prototype.create=function(){
  17058. if(typeof document.body!="undefined"){
  17059. if(this.isModal()){
  17060. this.createModalWaitDialog();
  17061. }else{
  17062. this.createInlineWaitDialog();
  17063. }
  17064. }
  17065. };
  17066. ViewerBaseWorkingDialog.prototype.createContainer=function(_e71){
  17067. var _e72=document.createElement("div");
  17068. _e72.setAttribute("id",this.getContainerId());
  17069. _e72.className=_e71?"modalWaitPage":"inlineWaitPage";
  17070. return _e72;
  17071. };
  17072. ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){
  17073. this._createBlocker();
  17074. var _e73=this.createContainer(true);
  17075. _e73.innerHTML=this.renderHTML();
  17076. _e73.style.zIndex="7002";
  17077. _e73.setAttribute("role","region");
  17078. _e73.setAttribute("aria-label",RV_RES.GOTO_WORKING);
  17079. document.body.appendChild(_e73);
  17080. var _e74=this.createModalIframeBackground();
  17081. document.body.appendChild(_e74);
  17082. var _e75=0;
  17083. var _e76=0;
  17084. if(typeof window.innerHeight!="undefined"){
  17085. _e75=Math.round((window.innerHeight/2)-(_e73.offsetHeight/2));
  17086. _e76=Math.round((window.innerWidth/2)-(_e73.offsetWidth/2));
  17087. }else{
  17088. _e75=Math.round((document.body.clientHeight/2)-(_e73.offsetHeight/2));
  17089. _e76=Math.round((document.body.clientWidth/2)-(_e73.offsetWidth/2));
  17090. }
  17091. _e73.style.bottom=_e75+"px";
  17092. _e73.style.left=_e76+"px";
  17093. _e74.style.left=_e76-1+"px";
  17094. _e74.style.bottom=_e75-1+"px";
  17095. _e74.style.width=_e73.offsetWidth+2+"px";
  17096. _e74.style.height=_e73.offsetHeight+2+"px";
  17097. };
  17098. ViewerBaseWorkingDialog.prototype._createBlocker=function(){
  17099. var _e77=document.getElementById("reportBlocker"+this.m_oCV.getId());
  17100. if(_e77){
  17101. return;
  17102. }
  17103. var _e78=document.getElementById("mainViewerTable"+this.m_oCV.getId());
  17104. if(_e78){
  17105. _e77=document.createElement("div");
  17106. _e78.parentNode.appendChild(_e77);
  17107. _e77.id="reportBlocker"+this.m_oCV.getId();
  17108. _e77.style.zIndex="6001";
  17109. _e77.style.position="absolute";
  17110. _e77.style.top="0px";
  17111. _e77.style.left="0px";
  17112. _e77.style.width="100%";
  17113. _e77.style.height="100%";
  17114. _e77.style.display="none";
  17115. _e77.style.opacity="0";
  17116. _e77.style.backgroundColor="#FFFFFF";
  17117. _e77.style.filter="alpha(opacity:0)";
  17118. }
  17119. };
  17120. ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){
  17121. var _e79=this.m_oCV.getId();
  17122. var _e7a=document.getElementById("CVReport"+_e79);
  17123. if(_e7a){
  17124. var _e7b=this.createContainer(false);
  17125. _e7b.innerHTML="<table width=\"100%\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\" role=\"presentation\">"+this.renderHTML()+"</td></tr></table>";
  17126. _e7a.appendChild(_e7b);
  17127. }
  17128. };
  17129. ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){
  17130. var _e7c=document.createElement("iframe");
  17131. var _e7d="..";
  17132. var oCV=this.getCognosViewer();
  17133. if(oCV!==null){
  17134. _e7d=oCV.getWebContentRoot();
  17135. }
  17136. _e7c.setAttribute("id",this.getContainerId()+"Iframe");
  17137. _e7c.setAttribute("title","Empty iframe");
  17138. _e7c.setAttribute("src",_e7d+"/common/images/spacer.gif");
  17139. _e7c.setAttribute("scrolling","no");
  17140. _e7c.setAttribute("frameborder","0");
  17141. _e7c.style.position="absolute";
  17142. _e7c.style.zIndex="6002";
  17143. _e7c.style.display="block";
  17144. return _e7c;
  17145. };
  17146. ViewerBaseWorkingDialog.prototype.updateCoords=function(_e7f,_e80){
  17147. if(this.m_container!==null&&m_iframeBackground!==null){
  17148. var _e81=0;
  17149. var _e82=0;
  17150. if(typeof window.innerHeight!="undefined"){
  17151. _e81=Math.round((window.innerHeight/2)-(_e7f.offsetHeight/2));
  17152. _e82=Math.round((window.innerWidth/2)-(_e7f.offsetWidth/2));
  17153. }else{
  17154. _e81=Math.round((document.body.clientHeight/2)-(_e7f.offsetHeight/2));
  17155. _e82=Math.round((document.body.clientWidth/2)-(_e7f.offsetWidth/2));
  17156. }
  17157. _e7f.style.bottom=_e81+"px";
  17158. _e7f.style.left=_e82+"px";
  17159. _e80.style.left=_e7f.style.left;
  17160. _e80.style.bottom=_e7f.style.bottom;
  17161. _e80.style.width=_e7f.offsetWidth+"px";
  17162. _e80.style.height=_e7f.offsetHeight+"px";
  17163. }
  17164. };
  17165. ViewerBaseWorkingDialog.prototype.hide=function(){
  17166. var _e83=document.getElementById(this.getContainerId());
  17167. if(_e83){
  17168. _e83.parentNode.removeChild(_e83);
  17169. }
  17170. var _e84=document.getElementById(this.getContainerId()+"Iframe");
  17171. if(_e84){
  17172. _e84.parentNode.removeChild(_e84);
  17173. }
  17174. var _e85=document.getElementById("reportBlocker"+this.m_oCV.getId());
  17175. if(_e85){
  17176. _e85.parentNode.removeChild(_e85);
  17177. }
  17178. };
  17179. ViewerBaseWorkingDialog.prototype.isModal=function(){
  17180. var _e86=this.m_oCV.getId();
  17181. var _e87=document.getElementById("CVReport"+_e86);
  17182. var _e88=true;
  17183. if(_e87&&_e87.innerHTML===""){
  17184. _e88=false;
  17185. }
  17186. return _e88;
  17187. };
  17188. ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_e89){
  17189. };
  17190. ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){
  17191. };
  17192. function FaultDialog(oCV){
  17193. this.m_oCV=oCV;
  17194. };
  17195. FaultDialog.prototype=new IFaultDialog();
  17196. FaultDialog.prototype.show=function(_e8b){
  17197. if(typeof console!="undefined"){
  17198. console.log("FaultDialog - an unhandled soap fault was returned: %o",_e8b);
  17199. }
  17200. };
  17201. FaultDialog.prototype.handleUnknownHTMLResponse=function(_e8c){
  17202. this.m_oCV.setTracking("");
  17203. this.m_oCV.setConversation("");
  17204. if(_e8c){
  17205. if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){
  17206. var _e8d=document.getElementsByTagName("head")[0];
  17207. var _e8e=_e8c.match(/<body[^>]*>([\s\S]*)<\/body>/im)[1];
  17208. var _e8f=/<script[^>]*>([\s\S]*?)<\/script>/igm;
  17209. var _e90=_e8f.exec(_e8c);
  17210. while(_e90!=null){
  17211. var _e91=document.createElement("script");
  17212. _e91.type="text/javascript";
  17213. var _e92=_e90[0].match(/src="([\s\S]*?)"/i);
  17214. if(_e92==null){
  17215. _e91.text=_e90[1];
  17216. }else{
  17217. _e91.src=_e92[1];
  17218. }
  17219. _e8d.appendChild(_e91);
  17220. _e90=_e8f.exec(_e8c);
  17221. }
  17222. document.body.innerHTML=_e8e;
  17223. }else{
  17224. document.write(_e8c);
  17225. }
  17226. }
  17227. };
  17228. function LogOnDialog(oCV){
  17229. this.m_oCV=oCV;
  17230. };
  17231. LogOnDialog.prototype=new ILogOnDialog();
  17232. LogOnDialog.prototype.handleUnknownHTMLResponse=function(_e94){
  17233. if(_e94){
  17234. document.write(_e94);
  17235. }
  17236. };
  17237. LogOnDialog.prototype.show=function(_e95){
  17238. launchLogOnDialog(this.m_oCV.getId(),_e95);
  17239. };
  17240. LogOnDialog.prototype.hide=function(){
  17241. };
  17242. function PromptDialog(oCV){
  17243. this.m_oCV=oCV;
  17244. this.m_dialogImpl=null;
  17245. };
  17246. PromptDialog.prototype=new IPromptDialog();
  17247. PromptDialog.prototype.initialize=function(url,_e98,_e99){
  17248. this.m_dialogImpl=new CModal("","",document.body,null,null,_e98,_e99,true,true,false,true,this.m_oCV.getWebContentRoot());
  17249. var _e9a=document.getElementById(CMODAL_CONTENT_ID);
  17250. _e9a.src=url;
  17251. };
  17252. PromptDialog.prototype.show=function(){
  17253. this.m_dialogImpl.show();
  17254. };
  17255. PromptDialog.prototype.hide=function(){
  17256. this.m_dialogImpl.hide();
  17257. destroyCModal();
  17258. };
  17259. function WorkingDialog(_e9b){
  17260. if(_e9b){
  17261. this.m_bSimpleWorkingDialog=false;
  17262. this.m_bShowCancelButton=(_e9b.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true;
  17263. WorkingDialog.baseConstructor.call(this,_e9b);
  17264. this.m_secondaryRequests=_e9b.getSecondaryRequests();
  17265. }
  17266. };
  17267. WorkingDialog.prototype=new ViewerBaseWorkingDialog();
  17268. WorkingDialog.baseConstructor=ViewerBaseWorkingDialog;
  17269. WorkingDialog.prototype.setSecondaryRequests=function(_e9c){
  17270. this.m_secondaryRequests=_e9c;
  17271. };
  17272. WorkingDialog.prototype._getSecondaryRequests=function(){
  17273. return this.m_secondaryRequests;
  17274. };
  17275. WorkingDialog.prototype.getIsSavedReport=function(){
  17276. return this.getCognosViewer().bIsSavedReport;
  17277. };
  17278. WorkingDialog.prototype.setSimpleWorkingDialogFlag=function(flag){
  17279. this.m_bSimpleWorkingDialog=flag;
  17280. };
  17281. WorkingDialog.prototype.getSimpleWorkingDialogFlag=function(){
  17282. return this.m_bSimpleWorkingDialog;
  17283. };
  17284. WorkingDialog.prototype.showDeliveryOptions=function(_e9e){
  17285. var _e9f=this.getNamespace();
  17286. var _ea0=document.getElementById("DeliveryOptionsVisible"+_e9f);
  17287. if(_ea0){
  17288. _ea0.style.display=(_e9e===false?"none":"block");
  17289. if(_e9e){
  17290. var _ea1=_ea0.getElementsByTagName("a");
  17291. for(var i=_ea1.length;i>0;i--){
  17292. if(_ea1[i]&&_ea1[i].getAttribute("tabIndex")=="0"){
  17293. _ea1[i].focus();
  17294. }
  17295. }
  17296. }
  17297. }
  17298. _ea0=document.getElementById("OptionsLinkSelected"+_e9f);
  17299. if(_ea0){
  17300. _ea0.style.display=(_e9e===false?"none":"block");
  17301. }
  17302. _ea0=document.getElementById("OptionsLinkUnselected"+_e9f);
  17303. if(_ea0){
  17304. _ea0.style.display=(_e9e===false?"block":"none");
  17305. }
  17306. };
  17307. WorkingDialog.prototype.renderHTML=function(){
  17308. var _ea3=this.getNamespace();
  17309. var _ea4=_ea3+"_workingMsg "+_ea3+"_workingMsg2";
  17310. var html="<table class=\"viewerWorkingDialog\" id=\"CVWaitTable"+_ea3+"\""+" role=\"presentation\">";
  17311. html+=("<tr>"+"<td align=\"center\">"+"<div tabIndex=\"0\" role=\"presentation\" aria-labelledby=\""+_ea4+"\""+" class=\"body_dialog_modal workingDialogDiv\">");
  17312. html+=this.renderFirstInnerTable();
  17313. html+=this.renderSecondInnerTable();
  17314. html+=("</div>"+"</td>"+"</tr>"+"</table>");
  17315. return html;
  17316. };
  17317. WorkingDialog.prototype.renderFirstInnerTable=function(){
  17318. var _ea6=this.getSimpleWorkingDialogFlag();
  17319. var _ea7=_ea6?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING;
  17320. var _ea8=this.m_sNamespace;
  17321. var _ea9="<table class=\"workingDialogInnerTable\" role=\"presentation\">"+"<tr>"+"<td valign=\"middle\">";
  17322. var _eaa=this.getCognosViewer().getSkin()+"/branding/";
  17323. _ea9+="<img src=\""+_eaa+"progress.gif\"";
  17324. if(isIE()){
  17325. _ea9+=" width=\"48\" height=\"48\" border=\"0\"";
  17326. }
  17327. _ea9+=" name=\"progress\"";
  17328. if(isIE()){
  17329. _ea9+=" align=\"top\"";
  17330. }
  17331. _ea9+=" alt=\"";
  17332. _ea9+=_ea7;
  17333. _ea9+="\"/></td>";
  17334. _ea9+="<td width=\"20\">&nbsp;</td>";
  17335. _ea9+="<td style=\"padding-top: 5px;\" class=\"tableText\">";
  17336. _ea9+="<span id=\""+_ea8+"_workingMsg\">";
  17337. _ea9+=_ea7;
  17338. _ea9+="</span>";
  17339. _ea9+="<br/><br/>";
  17340. var _eab=this.getCognosViewer().envParams["cv.responseFormat"];
  17341. if(_ea6||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_eab&&("qs"===_eab||"fragment"===_eab))){
  17342. _ea9+=RV_RES.RV_PLEASE_WAIT;
  17343. }else{
  17344. var _eac=this.canShowDeliveryOptions();
  17345. if(_eac){
  17346. _ea9+=this.optionLinkSelectedDiv();
  17347. _ea9+=this.optionLinkUnselectedDiv();
  17348. }else{
  17349. _ea9+=RV_RES.RV_PLEASE_WAIT;
  17350. }
  17351. }
  17352. _ea9+="</td></tr><tr><td colspan=\"3\">&nbsp;</td></tr></table>";
  17353. return _ea9;
  17354. };
  17355. WorkingDialog.prototype.optionLinkSelectedDiv=function(){
  17356. var _ead="";
  17357. _ead+="<div id=\"OptionsLinkSelected"+this.getNamespace()+"\" style=\"display: none\">";
  17358. _ead+=RV_RES.RV_BUSY_OPTIONS_SELECTED;
  17359. _ead+="</div>";
  17360. return _ead;
  17361. };
  17362. WorkingDialog.prototype.optionLinkUnselectedDiv=function(){
  17363. var _eae="";
  17364. var _eaf=this.getNamespace();
  17365. var _eb0="window.oCV"+_eaf+".getWorkingDialog()";
  17366. _eae+="<div id=\"OptionsLinkUnselected"+_eaf+"\">";
  17367. _eae+="<span id=\""+_eaf+"_workingMsg2\">";
  17368. _eae+=RV_RES.RV_BUSY_OPTIONS_UNSELECTED;
  17369. _eae+="</span><br/>";
  17370. _eae+="<a href=\"#\" class=\"deliveryOptionLink\" onclick=\"javascript:"+_eb0+".showDeliveryOptions(true)\">";
  17371. _eae+=RV_RES.RV_BUSY_OPTIONS_LINK;
  17372. _eae+="</a></div>";
  17373. return _eae;
  17374. };
  17375. WorkingDialog.prototype.canShowDeliveryOptions=function(){
  17376. var _eb1=this.getCognosViewer().envParams["ui.primaryAction"];
  17377. if("saveAs"!==_eb1&&"email"!==_eb1&&this.getIsSavedReport()){
  17378. return true;
  17379. }
  17380. return false;
  17381. };
  17382. WorkingDialog.prototype.isUIBlacklisted=function(item){
  17383. var _eb3=this.getUIBlacklist();
  17384. for(var _eb4 in _eb3){
  17385. if(_eb3[_eb4]===item){
  17386. return true;
  17387. }
  17388. }
  17389. return false;
  17390. };
  17391. WorkingDialog.prototype.getUIBlacklist=function(){
  17392. if(!this.m_UIBlacklist&&this.getCognosViewer().UIBlacklist){
  17393. this.m_UIBlacklist=this.getCognosViewer().UIBlacklist.split(" ");
  17394. }
  17395. return this.m_UIBlacklist;
  17396. };
  17397. WorkingDialog.prototype.deliverySectionIsNeeded=function(){
  17398. return !this._isSaveBlackListed()||!this._isSaveAsBlackListed()||!this._isEmailBlackListed();
  17399. };
  17400. WorkingDialog.prototype._isSaveBlackListed=function(){
  17401. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVE")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVE")||!this._hasSecondaryRequest("save");
  17402. };
  17403. WorkingDialog.prototype._isSaveAsBlackListed=function(){
  17404. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVEAS")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVEAS")||!this._hasSecondaryRequest("saveAs");
  17405. };
  17406. WorkingDialog.prototype._isEmailBlackListed=function(){
  17407. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SEND")||this.isUIBlacklisted("RV_WORKING_DIALOG_SEND")||!this._hasSecondaryRequest("email");
  17408. };
  17409. WorkingDialog.prototype.showCancelButton=function(){
  17410. return this.m_bShowCancelButton;
  17411. };
  17412. WorkingDialog.prototype._hasSecondaryRequest=function(_eb5){
  17413. var _eb6=this._getSecondaryRequests();
  17414. if(_eb6){
  17415. var _eb7=_eb6.length;
  17416. for(var i=0;i<_eb7;i++){
  17417. if(_eb6[i]==_eb5){
  17418. return true;
  17419. }
  17420. }
  17421. }
  17422. return false;
  17423. };
  17424. WorkingDialog.prototype.renderSecondInnerTable=function(){
  17425. var _eb9="";
  17426. var _eba=this.getCognosViewer().getWebContentRoot();
  17427. _eb9+="<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">";
  17428. _eb9+="<tr id=\"DeliveryOptionsVisible"+this.getNamespace()+"\" class=\"workingDialogOptions\">";
  17429. _eb9+="<td align=\"left\">";
  17430. _eb9+="<table class=\"workingDialogInnerTable workingDialogLinks\" role=\"presentation\">";
  17431. var _ebb=this.canShowDeliveryOptions();
  17432. if(_ebb&&this.deliverySectionIsNeeded()){
  17433. if(!this._isSaveBlackListed()){
  17434. _eb9+=this.addDeliverOption("/rv/images/action_save_report_output.gif",RV_RES.RV_SAVE_REPORT,"SaveReport(true);");
  17435. }
  17436. if("reportView"!==this.getCognosViewer().envParams["ui.objectClass"]&&!this._isSaveAsBlackListed()){
  17437. _eb9+=this.addDeliverOption("/rv/images/action_save_report_view.gif",RV_RES.RV_SAVE_AS_REPORT_VIEW,"SaveAsReportView(true);");
  17438. }
  17439. if(!this.isUIBlacklisted("CC_RUN_OPTIONS_EMAIL_ATTACHMENT")&&!this._isEmailBlackListed()){
  17440. _eb9+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);");
  17441. }
  17442. }
  17443. _eb9+="</table></td></tr> ";
  17444. _eb9+="<tr style=\"padding-top: 5px\"> ";
  17445. _eb9+="<td align=\"left\" colspan=\"3\" id=\"cancelButtonContainer"+this.getNamespace()+"\"> ";
  17446. if(this.showCancelButton()){
  17447. _eb9+=this.addCancelButton();
  17448. }
  17449. _eb9+="</td></tr> ";
  17450. _eb9+="</table> ";
  17451. return _eb9;
  17452. };
  17453. WorkingDialog.prototype.addDeliverOption=function(_ebc,_ebd,_ebe){
  17454. var _ebf="";
  17455. var _ec0=this.getCognosViewer().getWebContentRoot();
  17456. var _ec1="javascript: window.oCV"+this.getNamespace()+".getRV().";
  17457. var _ec2=_ec1+_ebe;
  17458. _ebf+="<tr><td> ";
  17459. _ebf+="<a tabIndex=\"-1\" href=\""+_ebe+"\"> ";
  17460. _ebf+="<img border=\"0\" src=\""+_ec0+_ebc+"\" alt=\" "+html_encode(_ebd)+"\"/></a> ";
  17461. _ebf+="</td><td width=\"100%\" valign=\"middle\" class=\"tableText\"> ";
  17462. _ebf+="<a tabIndex=\"0\" role=\"link\" href=\"#\" onclick=\""+_ec2+"\" style=\"padding-left: 5px\" class=\"deliveryOptionLink\"> ";
  17463. _ebf+=(_ebd+"</a></td></tr>");
  17464. return _ebf;
  17465. };
  17466. WorkingDialog.prototype.addCancelButton=function(){
  17467. var _ec3="";
  17468. var _ec4=this.getCognosViewer().getWebContentRoot();
  17469. _ec3+="<table role=\"presentation\"><tr><td> ";
  17470. _ec3+="<table id=\"cvWorkingDialog"+this.getNamespace()+"\" role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" onmouseover=\"this.className = 'commandButtonOver'\" onmouseout=\"this.className = 'commandButton'\" onmousedown=\"this.className = 'commandButtonDown'\" class=\"commandButton\"> ";
  17471. _ec3+="<tr> ";
  17472. _ec3+="<td valign=\"middle\" align=\"center\" nowrap=\"nowrap\" class=\"workingDialogCancelButton\" ";
  17473. if(isIE()){
  17474. _ec3+="id=\"btnAnchorIE\" ";
  17475. }else{
  17476. _ec3+="id=\"btnAnchor\" ";
  17477. }
  17478. _ec3+="> ";
  17479. var _ec5="window.oCV"+this.m_sNamespace+".cancel(this)";
  17480. _ec3+="<a href=\"#\" onclick=\""+_ec5+"\"> ";
  17481. _ec3+=RV_RES.CANCEL;
  17482. _ec3+="</a> ";
  17483. _ec3+="</td></tr></table></td> ";
  17484. _ec3+="<td><img alt=\"\" height=\"1\" ";
  17485. if(isIE()){
  17486. _ec3+="width=\"10\" ";
  17487. }
  17488. _ec3+="src=\""+_ec4+"/ps/images/space.gif\"/></td> ";
  17489. _ec3+="</tr></table> ";
  17490. return _ec3;
  17491. };
  17492. WorkingDialog.prototype.disableCancelButton=function(_ec6){
  17493. this.cancelButtonDisabled=true;
  17494. var _ec7=document.getElementById("cvWorkingDialog"+this.getNamespace());
  17495. if(_ec7){
  17496. _ec7.style.cursor="default";
  17497. _ec7.className="commandButtonOver";
  17498. _ec7.removeAttribute("onmouseover");
  17499. _ec7.removeAttribute("onmouseout");
  17500. }
  17501. if(_ec6){
  17502. _ec6.removeAttribute("href");
  17503. _ec6.removeAttribute("onclick");
  17504. _ec6.style.cursor="default";
  17505. }
  17506. };
  17507. WorkingDialog.prototype.enableCancelButton=function(){
  17508. if(this.cancelButtonDisabled){
  17509. var _ec8=document.getElementById("cancelButtonContainer"+this.getNamespace());
  17510. if(_ec8){
  17511. _ec8.innerHTML=this.addCancelButton();
  17512. }
  17513. this.cancelButtonDisabled=false;
  17514. }
  17515. };
  17516. WorkingDialog.prototype.getContainerId=function(){
  17517. return "CVWait"+this.getNamespace();
  17518. };
  17519. function RequestExecutedIndicator(_ec9){
  17520. if(_ec9){
  17521. RequestExecutedIndicator.baseConstructor.call(this,_ec9);
  17522. }
  17523. };
  17524. RequestExecutedIndicator.baseConstructor=WorkingDialog;
  17525. RequestExecutedIndicator.prototype=new WorkingDialog();
  17526. RequestExecutedIndicator.prototype.renderHTML=function(){
  17527. var _eca="<table id=\"CVWaitTable"+this.getNamespace()+"\" requestExecutionIndicator=\"true\" class=\"viewerWorkingDialog\" role=\"presentation\">";
  17528. _eca+="<tr><td align=\"center\">";
  17529. _eca+="<div class=\"body_dialog_modal\">";
  17530. _eca+="<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" style=\"vertical-align:middle; text-align: left;\" role=\"presentation\">";
  17531. _eca+="<tr><td rowspan=\"2\">";
  17532. _eca+="<img alt=\""+RV_RES.GOTO_WORKING+"\" src=\""+this.getCognosViewer().getSkin()+"/branding/progress.gif\" style=\"margin:5px;\" width=\"48\" height=\"48\" name=\"progress\"/>";
  17533. _eca+="</td><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
  17534. _eca+=RV_RES.GOTO_WORKING;
  17535. _eca+="</span></td></tr><tr><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
  17536. _eca+=RV_RES.RV_PLEASE_WAIT;
  17537. _eca+="</span></td></tr><tr><td style=\"height:7px;\" colspan=\"2\"></td></tr></table></div></td></tr></table>";
  17538. return _eca;
  17539. };
  17540. RequestExecutedIndicator.prototype.getContainerId=function(){
  17541. return "CVWaitindicator"+this.getNamespace();
  17542. };
  17543. function RequestHandler(oCV){
  17544. if(oCV){
  17545. RequestHandler.baseConstructor.call(this,oCV);
  17546. }
  17547. };
  17548. RequestHandler.prototype=new BaseRequestHandler();
  17549. RequestHandler.baseConstructor=BaseRequestHandler;
  17550. RequestHandler.prototype.parent=BaseRequestHandler.prototype;
  17551. RequestHandler.prototype.resubmitInSafeMode=function(){
  17552. this.getViewer().resubmitInSafeMode(this.getDispatcherEntry());
  17553. };
  17554. RequestHandler.prototype.onComplete=function(_ecc){
  17555. this.parent.onComplete.call(this,_ecc);
  17556. this.processDATAReportResponse(_ecc);
  17557. this.postComplete();
  17558. };
  17559. RequestHandler.prototype.processInitialResponse=function(_ecd){
  17560. this.parent.processInitialResponse.call(this,_ecd);
  17561. var oCV=this.getViewer();
  17562. var _ecf=oCV.getStatus();
  17563. oCV.setMaxContentSize();
  17564. var _ed0=(oCV.isWorking(_ecf)||_ecf=="default");
  17565. if(_ed0){
  17566. if(oCV.getWorkingDialog()){
  17567. oCV.getWorkingDialog().show();
  17568. }
  17569. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
  17570. }else{
  17571. if(_ecf=="fault"){
  17572. oCV.setSoapFault(_ecd.m_sSoapFault);
  17573. oCV.executeCallback("fault");
  17574. }else{
  17575. if(_ecd.status=="cancel"){
  17576. oCV.executeCallback("cancel");
  17577. }else{
  17578. oCV.updateSkipToReportLink();
  17579. if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){
  17580. var _ed1=oCV.getPinFreezeManager();
  17581. _ed1.fromJSONString(oCV.envParams["pinFreezeInfo"]);
  17582. delete oCV.envParams["pinFreezeInfo"];
  17583. }
  17584. if(_ecf!="prompting"||!oCV.executeCallback("prompt")){
  17585. this.postComplete();
  17586. }else{
  17587. oCV.updateSkipToNavigationLink(true);
  17588. }
  17589. }
  17590. }
  17591. }
  17592. this.showReport();
  17593. this.getViewer().renderTabs();
  17594. this.onAsynchStatusUpdate(_ecf);
  17595. };
  17596. RequestHandler.prototype.postComplete=function(){
  17597. this.parent.postComplete.call(this);
  17598. var oCV=this.getViewer();
  17599. var _ed3=document.getElementById("RVContent"+oCV.getId());
  17600. if(_ed3){
  17601. _ed3.scrollTop=0;
  17602. }
  17603. oCV.updateSkipToReportLink();
  17604. if(oCV.rvMainWnd){
  17605. oCV.updateLayout(oCV.getStatus());
  17606. if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){
  17607. var _ed4=oCV.rvMainWnd.getToolbar();
  17608. if(_ed4){
  17609. oCV.rvMainWnd.updateToolbar(oCV.outputFormat);
  17610. _ed4.draw();
  17611. }
  17612. }
  17613. if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){
  17614. var _ed5=oCV.rvMainWnd.getBannerToolbar();
  17615. if(_ed5){
  17616. _ed5.draw();
  17617. }
  17618. }
  17619. }
  17620. if(oCV.getBrowser()=="moz"){
  17621. if(_ed3){
  17622. if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){
  17623. _ed3.style.overflow="hidden";
  17624. }else{
  17625. _ed3.style.overflow="auto";
  17626. }
  17627. }
  17628. }
  17629. oCV.gbPromptRequestSubmitted=false;
  17630. this.showReport();
  17631. if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
  17632. var _ed6=document.getElementById("CVReport"+oCV.getId());
  17633. if(_ed6){
  17634. setTimeout(function(){
  17635. oCV.getPinFreezeManager().renderReportWithFrozenContainers(_ed6);
  17636. if(isIE()){
  17637. oCV.repaintDiv(_ed3);
  17638. }
  17639. },1);
  17640. }
  17641. }
  17642. oCV.setMaxContentSize();
  17643. oCV.executeCallback("done");
  17644. oCV.doneLoading();
  17645. };
  17646. function ActionFormFields(_ed7){
  17647. this.m_dispatcherEntry=_ed7;
  17648. this.m_oCV=_ed7.getViewer();
  17649. };
  17650. ActionFormFields.prototype.addFormFields=function(){
  17651. var _ed8=this.m_dispatcherEntry;
  17652. var _ed9=_ed8.getAction();
  17653. _ed9.preProcess();
  17654. _ed8.addFormField("ui.action","modifyReport");
  17655. if(this.m_oCV.getModelPath()!==""){
  17656. _ed8.addFormField("modelPath",this.m_oCV.getModelPath());
  17657. if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){
  17658. _ed8.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]);
  17659. }
  17660. }
  17661. if(_ed9.doAddActionContext()===true){
  17662. var _eda=_ed9.addActionContext();
  17663. _ed8.addFormField("cv.actionContext",_eda);
  17664. if(window.gViewerLogger){
  17665. window.gViewerLogger.log("Action context",_eda,"xml");
  17666. }
  17667. }
  17668. var _edb=this.m_oCV.envParams["bux"]=="true";
  17669. if(_edb){
  17670. _ed8.addFormField("cv.showFaultPage","false");
  17671. }else{
  17672. _ed8.addFormField("cv.showFaultPage","true");
  17673. }
  17674. _ed8.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  17675. _ed8.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
  17676. _ed8.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]);
  17677. _ed8.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]);
  17678. _ed8.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]);
  17679. _ed8.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
  17680. _ed8.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]);
  17681. _ed8.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]);
  17682. _ed8.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]);
  17683. _ed8.addNonNullFormField("bux",this.m_oCV.envParams["bux"]);
  17684. _ed8.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]);
  17685. _ed8.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]);
  17686. var _edc=this.m_oCV.getFlashChartOption();
  17687. if(_edc!=null){
  17688. _ed8.addFormField("savedFlashChartOption",_edc);
  17689. if(_edc&&_ed9!=null&&typeof (_ed9.m_requestParams)!="undefined"&&typeof (_ed9.m_requestParams.targetType)!="undefined"){
  17690. var _edd=false;
  17691. var _ede=null;
  17692. if(typeof (_ed9.m_requestParams.targetType.targetType)!="undefined"){
  17693. _ede=_ed9.m_requestParams.targetType.targetType;
  17694. }else{
  17695. _ede=_ed9.m_requestParams.targetType;
  17696. }
  17697. if(_ede.match("v2_")!=null||_ede.match("_v2")!=null){
  17698. _edd=true;
  17699. }else{
  17700. var _edf=this.m_oCV.getRAPReportInfo();
  17701. var _ee0=_ed9.getSelectedReportInfo();
  17702. if(_edf&&_ee0){
  17703. var _ee1=_edf.getDisplayTypes(_ee0.container);
  17704. if(_ee1.match("v2_")!=null||_ee1.match("_v2")!=null){
  17705. _edd=true;
  17706. }
  17707. }
  17708. }
  17709. _ed8.addFormField("hasAVSChart",_edd);
  17710. }else{
  17711. _ed8.addFormField("hasAVSChart",this.m_oCV.hasAVSChart());
  17712. }
  17713. }
  17714. var sEP=this.m_oCV.getExecutionParameters();
  17715. if(sEP){
  17716. _ed8.addFormField("executionParameters",encodeURIComponent(sEP));
  17717. }
  17718. _ed8.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation()));
  17719. _ed8.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking()));
  17720. var sCAF=this.m_oCV.getCAFContext();
  17721. if(sCAF){
  17722. _ed8.addFormField("ui.cafcontextid",sCAF);
  17723. }
  17724. if(_ed9.forceRunSpecRequest()){
  17725. _ed8.addFormField("widget.forceRunSpec","true");
  17726. }
  17727. };
  17728. function ViewerDispatcher(){
  17729. this.m_activeRequest=null;
  17730. this.m_requestQueue=[];
  17731. this.m_bUsePageRequest=false;
  17732. };
  17733. ViewerDispatcher.prototype.getActiveRequest=function(){
  17734. return this.m_activeRequest;
  17735. };
  17736. ViewerDispatcher.prototype.setUsePageRequest=function(_ee4){
  17737. this.m_bUsePageRequest=_ee4;
  17738. };
  17739. ViewerDispatcher.prototype.getUsePageRequest=function(){
  17740. return this.m_bUsePageRequest;
  17741. };
  17742. ViewerDispatcher.prototype.dispatchRequest=function(_ee5){
  17743. if(this.m_activeRequest==null){
  17744. this.startRequest(_ee5);
  17745. }else{
  17746. if(_ee5.canBeQueued()==true){
  17747. this.m_requestQueue.push(_ee5);
  17748. }else{
  17749. if(window.cognosViewerDebug&&console&&console.warn){
  17750. console.warn("Warning! Dropped a dispatcher entry!");
  17751. }
  17752. }
  17753. }
  17754. };
  17755. ViewerDispatcher.prototype.startRequest=function(_ee6){
  17756. this.m_activeRequest=_ee6;
  17757. if(_ee6!=null){
  17758. _ee6.setUsePageRequest(this.m_bUsePageRequest);
  17759. _ee6.sendRequest();
  17760. }
  17761. };
  17762. ViewerDispatcher.prototype.cancelRequest=function(key){
  17763. for(var i=0;i<this.m_requestQueue.length;i++){
  17764. var _ee9=this.m_requestQueue[i];
  17765. if(_ee9.getKey()===key){
  17766. _ee9.setCallbacks({"onEntryComplete":null});
  17767. _ee9.cancelRequest(false);
  17768. this.m_requestQueue.splice(i,1);
  17769. i--;
  17770. }
  17771. }
  17772. if(this.m_activeRequest&&this.m_activeRequest.getKey()===key){
  17773. this.m_activeRequest.setCallbacks({"onEntryComplete":null});
  17774. this.m_activeRequest.cancelRequest(false);
  17775. this.requestComplete();
  17776. }
  17777. };
  17778. ViewerDispatcher.prototype.possibleUnloadEvent=function(){
  17779. if(this.m_activeRequest){
  17780. this.m_activeRequest.possibleUnloadEvent();
  17781. }
  17782. };
  17783. ViewerDispatcher.prototype.requestComplete=function(_eea){
  17784. this.startRequest(this.nextRequest());
  17785. };
  17786. ViewerDispatcher.prototype.nextRequest=function(){
  17787. var _eeb=null;
  17788. if(this.m_requestQueue.length>0){
  17789. _eeb=this.m_requestQueue.shift();
  17790. if(_eeb.getKey()!=null){
  17791. while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_eeb.getKey()){
  17792. _eeb=this.m_requestQueue.shift();
  17793. }
  17794. }
  17795. }
  17796. return _eeb;
  17797. };
  17798. ViewerDispatcher.prototype.queueIsEmpty=function(){
  17799. return (this.m_requestQueue.length==0);
  17800. };
  17801. function DispatcherEntry(oCV){
  17802. this.m_oCV=oCV;
  17803. this.m_requestKey=null;
  17804. this.m_canBeQueued=false;
  17805. this.m_originalFormFields=null;
  17806. this.m_bUsePageRequest=false;
  17807. if(oCV){
  17808. if(!this.m_request){
  17809. this.m_request=new XmlHttpObject();
  17810. this.m_request.init("POST",this.m_oCV.getGateway(),"",true);
  17811. }
  17812. if(!this.m_requestHandler){
  17813. this.setRequestHandler(new BaseRequestHandler(oCV));
  17814. }
  17815. DispatcherEntry.prototype.setDefaultFormFields.call(this);
  17816. this.setCallbacks({"entryComplete":{"object":this,"method":this.onEntryComplete},"entryFault":{"object":this,"method":this.onEntryFault},"newRequest":{"object":this,"method":this.onNewRequest},"fault":{"object":this,"method":this.onFault},"error":{"object":this,"method":this.onError},"passportTimeout":{"object":this,"method":this.onPassportTimeout},"working":{"object":this,"method":this.onWorking},"prompting":{"object":this,"method":this.onPrompting},"preHttpRequest":{"object":this,"method":this.onPreHttpRequest},"postHttpRequest":{"object":this,"method":this.onPostHttpRequest},"postEntryComplete":{"object":this,"method":this.onPostEntryComplete}});
  17817. }
  17818. };
  17819. DispatcherEntry.prototype.setHeaders=function(_eed){
  17820. this.m_request.setHeaders(_eed);
  17821. };
  17822. DispatcherEntry.prototype.getHeaders=function(){
  17823. return this.m_request.getHeaders();
  17824. };
  17825. DispatcherEntry.prototype.setOriginalFormFields=function(_eee){
  17826. this.m_originalFormFields=_eee;
  17827. };
  17828. DispatcherEntry.prototype.getOriginalFormFields=function(){
  17829. return this.m_originalFormFields;
  17830. };
  17831. DispatcherEntry.prototype.setRequestHandler=function(_eef){
  17832. _eef.addCallbackHooks();
  17833. this.m_requestHandler=_eef;
  17834. };
  17835. DispatcherEntry.prototype.getRequestHandler=function(){
  17836. return this.m_requestHandler;
  17837. };
  17838. DispatcherEntry.prototype.setWorkingDialog=function(_ef0){
  17839. if(this.getRequestHandler()){
  17840. this.m_requestHandler.setWorkingDialog(_ef0);
  17841. }
  17842. };
  17843. DispatcherEntry.prototype.setRequestIndicator=function(_ef1){
  17844. if(this.getRequestHandler()){
  17845. this.getRequestHandler().setRequestIndicator(_ef1);
  17846. }
  17847. };
  17848. DispatcherEntry.prototype.forceSynchronous=function(){
  17849. this.getRequest().forceSynchronous();
  17850. };
  17851. DispatcherEntry.prototype.setUsePageRequest=function(_ef2){
  17852. this.m_bUsePageRequest=_ef2;
  17853. };
  17854. DispatcherEntry.prototype.getUsePageRequest=function(){
  17855. return this.m_bUsePageRequest;
  17856. };
  17857. DispatcherEntry.prototype.setDefaultFormFields=function(){
  17858. var _ef3=this.getViewer().envParams;
  17859. this.addFormField("b_action","cognosViewer");
  17860. this.addFormField("cv.catchLogOnFault","true");
  17861. this.addDefinedNonNullFormField("protectParameters",_ef3["protectParameters"]);
  17862. this.addDefinedNonNullFormField("ui.routingServerGroup",_ef3["ui.routingServerGroup"]);
  17863. this.addDefinedNonNullFormField("cv.debugDirectory",_ef3["cv.debugDirectory"]);
  17864. this.addDefinedNonNullFormField("cv.showFaultPage",_ef3["cv.showFaultPage"]);
  17865. this.addDefinedNonNullFormField("cv.useRAPDrill",_ef3["cv.useRAPDrill"]);
  17866. this.addDefinedNonNullFormField("container",_ef3["container"]);
  17867. this.addNonEmptyStringFormField("cv.objectPermissions",_ef3["cv.objectPermissions"]);
  17868. };
  17869. DispatcherEntry.prototype.getViewer=function(){
  17870. return this.m_oCV;
  17871. };
  17872. DispatcherEntry.prototype.prepareRequest=function(){
  17873. };
  17874. DispatcherEntry.addWidgetInfoToFormFields=function(_ef4,_ef5){
  17875. if(_ef4){
  17876. var _ef6=_ef4.getBUXRTStateInfoMap();
  17877. if(_ef6){
  17878. _ef5.addFormField("cv.buxRTStateInfo",_ef6);
  17879. }
  17880. var _ef7=_ef4.getDisplayName();
  17881. if(_ef7&&_ef7.length>0){
  17882. _ef5.addFormField("displayTitle",_ef7);
  17883. }
  17884. }
  17885. };
  17886. DispatcherEntry.prototype.canBeQueued=function(){
  17887. return this.m_canBeQueued;
  17888. };
  17889. DispatcherEntry.prototype.setCanBeQueued=function(_ef8){
  17890. this.m_canBeQueued=_ef8;
  17891. };
  17892. DispatcherEntry.prototype.getKey=function(){
  17893. return this.m_requestKey;
  17894. };
  17895. DispatcherEntry.prototype.setKey=function(key){
  17896. this.m_requestKey=key;
  17897. };
  17898. DispatcherEntry.prototype.setRequest=function(_efa){
  17899. this.m_request=_efa;
  17900. };
  17901. DispatcherEntry.prototype.getRequest=function(){
  17902. return this.m_request;
  17903. };
  17904. DispatcherEntry.prototype.setCallbacks=function(_efb){
  17905. this.getRequest().setCallbacks(_efb);
  17906. };
  17907. DispatcherEntry.prototype.getCallbacks=function(){
  17908. return this.getRequest().getCallbacks();
  17909. };
  17910. DispatcherEntry.prototype.sendRequest=function(){
  17911. this.prepareRequest();
  17912. var _efc=this.getRequest().getFormFields();
  17913. var _efd=_efc.keys();
  17914. if(!this.m_originalFormFields){
  17915. this.m_originalFormFields=new CDictionary();
  17916. for(var _efe=0;_efe<_efd.length;_efe++){
  17917. this.m_originalFormFields.add(_efd[_efe],_efc.get(_efd[_efe]));
  17918. }
  17919. }
  17920. this.getRequest().sendRequest();
  17921. };
  17922. DispatcherEntry.prototype.onNewRequest=function(_eff){
  17923. this.setRequest(_eff);
  17924. };
  17925. DispatcherEntry.prototype.retryRequest=function(){
  17926. var oCV=this.getViewer();
  17927. oCV.setRetryDispatcherEntry(null);
  17928. var _f01=this.getRequest().newRequest();
  17929. _f01.setHeaders(null);
  17930. this.setRequest(_f01);
  17931. var _f02=this.m_originalFormFields.keys();
  17932. for(var _f03=0;_f03<_f02.length;_f03++){
  17933. var _f04=_f02[_f03];
  17934. var _f05=this.m_originalFormFields.get(_f04);
  17935. if(_f04=="cv.responseFormat"&&_f05=="iWidget"){
  17936. this.addFormField("cv.responseFormat","data");
  17937. }else{
  17938. if(_f04=="ui.action"&&_f05=="wait"){
  17939. this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
  17940. }else{
  17941. if(_f04!="m_tracking"&&_f04!="cv.outputKey"){
  17942. this.addFormField(_f04,_f05);
  17943. }
  17944. }
  17945. }
  17946. }
  17947. this.addFormField("widget.reloadToolbar","true");
  17948. if(this.m_oCV.getViewerWidget()){
  17949. this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole());
  17950. }
  17951. this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]);
  17952. this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]);
  17953. this.m_oCV.getViewerDispatcher().dispatchRequest(this);
  17954. };
  17955. DispatcherEntry.prototype.abortHttpRequest=function(){
  17956. if(!this.m_bCancelCalled){
  17957. if(this.getRequestHandler()){
  17958. this.getRequestHandler().onCancel();
  17959. }
  17960. this.m_bCancelCalled=true;
  17961. this.getRequest().abortHttpRequest();
  17962. this.onEntryComplete();
  17963. }
  17964. };
  17965. DispatcherEntry.prototype.cancelRequest=function(_f06){
  17966. if(!this.m_bCancelCalled){
  17967. this.m_bCancelCalled=true;
  17968. if(this.getRequestHandler()){
  17969. this.getRequestHandler().onCancel();
  17970. }
  17971. if(_f06){
  17972. this.getRequest().forceSynchronous();
  17973. }
  17974. this.getRequest().cancel();
  17975. this.onEntryComplete();
  17976. }
  17977. };
  17978. DispatcherEntry.prototype.getFormFields=function(){
  17979. return this.m_request.getFormFields();
  17980. };
  17981. DispatcherEntry.prototype.getFormField=function(name){
  17982. if(this.m_request){
  17983. return this.m_request.getFormField(name);
  17984. }else{
  17985. return "";
  17986. }
  17987. };
  17988. DispatcherEntry.prototype.clearFormFields=function(){
  17989. this.m_request.clearFormFields();
  17990. };
  17991. DispatcherEntry.prototype.formFieldExists=function(name){
  17992. if(this.m_request){
  17993. return this.m_request.getFormFields().exists(name);
  17994. }
  17995. return false;
  17996. };
  17997. DispatcherEntry.prototype.removeFormField=function(name){
  17998. if(this.formFieldExists(name)){
  17999. this.m_request.getFormFields().remove(name);
  18000. }
  18001. };
  18002. DispatcherEntry.prototype.addFormField=function(name,_f0b){
  18003. this.m_request.addFormField(name,_f0b);
  18004. };
  18005. DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,_f0d){
  18006. if(typeof _f0d!="undefined"&&_f0d!=null){
  18007. this.addFormField(name,_f0d);
  18008. }
  18009. };
  18010. DispatcherEntry.prototype.addDefinedFormField=function(name,_f0f){
  18011. if(typeof _f0f!="undefined"){
  18012. this.addFormField(name,_f0f);
  18013. }
  18014. };
  18015. DispatcherEntry.prototype.addNonNullFormField=function(name,_f11){
  18016. if(_f11!=null){
  18017. this.addFormField(name,_f11);
  18018. }
  18019. };
  18020. DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,_f13){
  18021. if(typeof _f13!="undefined"&&_f13!=null&&_f13!=""){
  18022. this.addFormField(name,_f13);
  18023. }
  18024. };
  18025. DispatcherEntry.prototype.onWorking=function(_f14,arg1){
  18026. if(this.getRequestHandler()){
  18027. this.getRequestHandler().onWorking(_f14);
  18028. }
  18029. };
  18030. DispatcherEntry.prototype.onFault=function(_f16){
  18031. if(this.getRequestHandler()){
  18032. this.getRequestHandler().onFault(_f16);
  18033. }
  18034. };
  18035. DispatcherEntry.prototype.onError=function(_f17){
  18036. if(this.m_bCancelCalled){
  18037. return;
  18038. }
  18039. if(this.getRequestHandler()){
  18040. this.getRequestHandler().onError(_f17);
  18041. }
  18042. };
  18043. DispatcherEntry.prototype.possibleUnloadEvent=function(){
  18044. this.setCallbacks({"error":{}});
  18045. };
  18046. DispatcherEntry.prototype.onPreHttpRequest=function(_f18){
  18047. if(this.getRequestHandler()){
  18048. this.getRequestHandler().preHttpRequest(_f18);
  18049. }
  18050. };
  18051. DispatcherEntry.prototype.onPostHttpRequest=function(_f19){
  18052. if(this.getRequestHandler()){
  18053. this.getRequestHandler().postHttpRequest(_f19);
  18054. }
  18055. };
  18056. DispatcherEntry.prototype.onPassportTimeout=function(_f1a){
  18057. if(this.getRequestHandler()){
  18058. this.getRequestHandler().onPassportTimeout(_f1a);
  18059. }
  18060. };
  18061. DispatcherEntry.prototype.onPrompting=function(_f1b){
  18062. if(this.getRequestHandler()){
  18063. this.getRequestHandler().onPrompting(_f1b);
  18064. }
  18065. };
  18066. DispatcherEntry.prototype.onEntryComplete=function(_f1c){
  18067. if(!this.m_oCV._beingDestroyed){
  18068. this.m_oCV.getViewerDispatcher().requestComplete(this);
  18069. }
  18070. };
  18071. DispatcherEntry.prototype.onEntryFault=function(_f1d){
  18072. this.m_oCV.setFaultDispatcherEntry(this);
  18073. this.m_oCV.resetViewerDispatcher();
  18074. if(!this.m_bCancelCalled){
  18075. this.m_oCV.setRetryDispatcherEntry(this);
  18076. }
  18077. };
  18078. DispatcherEntry.prototype.onCloseErrorDlg=function(){
  18079. var _f1e=this.getCallbacks();
  18080. if(_f1e["closeErrorDlg"]){
  18081. var _f1f=GUtil.generateCallback(_f1e["closeErrorDlg"].method,[],_f1e["closeErrorDlg"].object);
  18082. _f1f();
  18083. }
  18084. };
  18085. DispatcherEntry.prototype.onPostEntryComplete=function(){
  18086. if(this.getRequestHandler()){
  18087. this.getRequestHandler().onPostEntryComplete();
  18088. }
  18089. this.executeCallback("postComplete");
  18090. };
  18091. DispatcherEntry.prototype.executeCallback=function(_f20){
  18092. var _f21=this.getCallbacks();
  18093. if(_f21[_f20]){
  18094. var _f22=(_f21.customArguments)?[this,_f21.customArguments]:[this];
  18095. var _f23=GUtil.generateCallback(_f21[_f20].method,_f22,_f21[_f20].object);
  18096. _f23();
  18097. return true;
  18098. }
  18099. return false;
  18100. };
  18101. function DataDispatcherEntry(oCV){
  18102. if(oCV){
  18103. this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()));
  18104. }
  18105. DataDispatcherEntry.baseConstructor.call(this,oCV);
  18106. };
  18107. DataDispatcherEntry.prototype=new DispatcherEntry();
  18108. DataDispatcherEntry.baseConstructor=DispatcherEntry;
  18109. function JSONDispatcherEntry(oCV){
  18110. if(oCV){
  18111. this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()));
  18112. }
  18113. JSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  18114. JSONDispatcherEntry.baseConstructor.call(this,oCV);
  18115. };
  18116. JSONDispatcherEntry.prototype=new DispatcherEntry();
  18117. JSONDispatcherEntry.baseConstructor=DispatcherEntry;
  18118. JSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  18119. this.addFormField("cv.responseFormat","JSON");
  18120. };
  18121. function AsynchDataDispatcherEntry(oCV){
  18122. if(oCV){
  18123. var _f27=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
  18124. this.setRequest(_f27);
  18125. AsynchDataDispatcherEntry.baseConstructor.call(this,oCV);
  18126. AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this);
  18127. }
  18128. };
  18129. AsynchDataDispatcherEntry.prototype=new DispatcherEntry();
  18130. AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry;
  18131. AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){
  18132. this.addFormField("cv.responseFormat","data");
  18133. };
  18134. function AsynchJSONDispatcherEntry(oCV){
  18135. if(oCV){
  18136. var _f29=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
  18137. this.setRequest(_f29);
  18138. AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV);
  18139. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  18140. }
  18141. };
  18142. AsynchJSONDispatcherEntry.prototype=new DispatcherEntry();
  18143. AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry;
  18144. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  18145. this.addFormField("cv.responseFormat","asynchJSON");
  18146. };
  18147. function ReportDispatcherEntry(oCV){
  18148. ReportDispatcherEntry.baseConstructor.call(this,oCV);
  18149. if(oCV){
  18150. ReportDispatcherEntry.prototype.setDefaultFormFields.call(this);
  18151. this.setRequestHandler(new RequestHandler(oCV));
  18152. this.setWorkingDialog(oCV.getWorkingDialog());
  18153. this.setRequestIndicator(oCV.getRequestIndicator());
  18154. this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}});
  18155. }
  18156. };
  18157. ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry();
  18158. ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry;
  18159. ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype;
  18160. ReportDispatcherEntry.prototype.prepareRequest=function(){
  18161. var _f2b=this.getFormField("ui.action");
  18162. var _f2c=this.getViewer().getActionState();
  18163. if(_f2c!==""&&(_f2b=="wait"||_f2b=="forward"||_f2b=="back")){
  18164. this.addFormField("cv.actionState",_f2c);
  18165. }
  18166. var _f2d=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
  18167. var _f2e=true;
  18168. for(var i=0;i<_f2d.length;i++){
  18169. if(_f2d[i]==_f2b){
  18170. _f2e=false;
  18171. break;
  18172. }
  18173. }
  18174. if(_f2e){
  18175. this.getViewer().clearTabs();
  18176. }
  18177. if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){
  18178. this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab());
  18179. }
  18180. };
  18181. ReportDispatcherEntry.prototype.setDefaultFormFields=function(){
  18182. var oCV=this.getViewer();
  18183. var _f31=oCV.envParams;
  18184. this.addFormField("cv.id",oCV.getId());
  18185. if(_f31["cv.showFaultPage"]){
  18186. this.addFormField("cv.showFaultPage",_f31["cv.showFaultPage"]);
  18187. }else{
  18188. this.addFormField("cv.showFaultPage","false");
  18189. }
  18190. this.addDefinedNonNullFormField("ui.object",_f31["ui.object"]);
  18191. this.addDefinedNonNullFormField("ui.primaryAction",_f31["ui.primaryAction"]);
  18192. this.addDefinedNonNullFormField("ui.objectClass",_f31["ui.objectClass"]);
  18193. this.addNonEmptyStringFormField("specificationType",_f31["specificationType"]);
  18194. this.addNonEmptyStringFormField("cv.promptForDownload",_f31["cv.promptForDownload"]);
  18195. this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
  18196. this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
  18197. var _f32=oCV.getExecutionParameters();
  18198. this.addNonEmptyStringFormField("executionParameters",_f32);
  18199. var sCAF=oCV.getCAFContext();
  18200. this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
  18201. };
  18202. ReportDispatcherEntry.prototype.onWorking=function(_f34,arg1){
  18203. var _f36=_f34.getResponseState();
  18204. var _f37=this.getRequestHandler();
  18205. if(_f37){
  18206. var _f38=_f37.getWorkingDialog();
  18207. if(_f38&&_f38.setSecondaryRequests&&_f36.m_aSecRequests){
  18208. _f38.setSecondaryRequests(_f36.m_aSecRequests);
  18209. }
  18210. }
  18211. DispatcherEntry.prototype.onWorking.call(this,_f34,arg1);
  18212. if(_f37){
  18213. this.getRequestHandler().updateViewerState(_f36);
  18214. }
  18215. };
  18216. ReportDispatcherEntry.prototype.onComplete=function(_f39,arg1){
  18217. if(this.getRequestHandler()){
  18218. this.getRequestHandler().onComplete(_f39);
  18219. }
  18220. };
  18221. function ViewerDispatcherEntry(oCV){
  18222. ViewerDispatcherEntry.baseConstructor.call(this,oCV);
  18223. if(oCV){
  18224. ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this);
  18225. this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onPrompting},"cancel":{"object":this,"method":this.onCancel}});
  18226. }
  18227. };
  18228. ViewerDispatcherEntry.prototype=new ReportDispatcherEntry();
  18229. ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry;
  18230. ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype;
  18231. ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){
  18232. var oCV=this.getViewer();
  18233. var _f3d=oCV.envParams;
  18234. this.addFormField("cv.showFaultPage","true");
  18235. this.addDefinedNonNullFormField("cv.header",_f3d["cv.header"]);
  18236. this.addDefinedNonNullFormField("cv.toolbar",_f3d["cv.toolbar"]);
  18237. this.addDefinedNonNullFormField("ui.backURL",_f3d["ui.backURL"]);
  18238. this.addDefinedNonNullFormField("errURL",_f3d["ui.backURL"]);
  18239. this.addDefinedNonNullFormField("errURL",_f3d["ui.errURL"]);
  18240. this.addDefinedNonNullFormField("cv.catchLogOnFault","true");
  18241. this.addDefinedNonNullFormField("m_sessionConv",_f3d["m_sessionConv"]);
  18242. if(_f3d["m_session"]){
  18243. this.addFormField("m_session",_f3d["m_session"]);
  18244. this.addFormField("cv.ignoreState","true");
  18245. }
  18246. };
  18247. ViewerDispatcherEntry.prototype.prepareRequest=function(){
  18248. this.parent.prepareRequest.call(this);
  18249. if(this.getUsePageRequest()){
  18250. this.m_oCV.setKeepSessionAlive(true);
  18251. if(typeof this.m_oCV.envParams["cv.responseFormat"]!="undefined"&&this.m_oCV.envParams["cv.responseFormat"]!=null&&this.m_oCV.envParams["cv.responseFormat"]!=""){
  18252. this.addFormField("cv.responseFormat",this.m_oCV.envParams["cv.responseFormat"]);
  18253. }else{
  18254. if(this.getFormField("cv.responseFormat")!="view"){
  18255. this.addFormField("cv.responseFormat","page");
  18256. }
  18257. }
  18258. var _f3e=this.m_oCV.getPinFreezeManager();
  18259. if(_f3e&&_f3e.hasFrozenContainers()){
  18260. this.addFormField("pinFreezeInfo",_f3e.toJSONString());
  18261. }
  18262. if(this.m_oCV.envParams["cv.createCallback"]){
  18263. this.addFormField("cv.createCallback",this.m_oCV.envParams["cv.createCallback"]);
  18264. }
  18265. }
  18266. };
  18267. ViewerDispatcherEntry.prototype.sendRequest=function(){
  18268. if(this.getUsePageRequest()){
  18269. this.prepareRequest();
  18270. var _f3f=this.buildRequestForm();
  18271. if(typeof document.progress!="undefined"){
  18272. setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1);
  18273. }
  18274. _f3f.submit();
  18275. }else{
  18276. this.getViewer().closeContextMenuAndToolbarMenus();
  18277. this.parent.sendRequest.call(this);
  18278. }
  18279. };
  18280. ViewerDispatcherEntry.prototype.buildRequestForm=function(){
  18281. var oCV=this.getViewer();
  18282. var _f41=document.createElement("form");
  18283. _f41.setAttribute("id","requestForm");
  18284. _f41.setAttribute("name","requestForm");
  18285. _f41.setAttribute("method","post");
  18286. _f41.setAttribute("target","_self");
  18287. _f41.setAttribute("action",oCV.getGateway());
  18288. _f41.style.display="none";
  18289. document.body.appendChild(_f41);
  18290. var _f42=this.getRequest().getFormFields();
  18291. var _f43=_f42.keys();
  18292. for(var _f44=0;_f44<_f43.length;_f44++){
  18293. _f41.appendChild(this.createHiddenFormField(_f43[_f44],_f42.get(_f43[_f44])));
  18294. }
  18295. for(param in oCV.envParams){
  18296. if(!_f42.exists(param)&&param!="cv.actionState"){
  18297. _f41.appendChild(this.createHiddenFormField(param,oCV.envParams[param]));
  18298. }
  18299. }
  18300. return _f41;
  18301. };
  18302. ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,_f46){
  18303. var _f47=document.createElement("input");
  18304. _f47.setAttribute("type","hidden");
  18305. _f47.setAttribute("name",name);
  18306. _f47.setAttribute("id",name);
  18307. _f47.setAttribute("value",_f46);
  18308. return (_f47);
  18309. };
  18310. ViewerDispatcherEntry.prototype.onCancel=function(){
  18311. var oCV=this.getViewer();
  18312. oCV.setStatus("complete");
  18313. if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){
  18314. oCV.executeCallback("cancel");
  18315. }
  18316. };
  18317. ViewerDispatcherEntry.prototype.onFault=function(_f49){
  18318. if(this.getViewer().callbackExists("fault")){
  18319. this.getViewer().setSoapFault(_f49.getSoapFault());
  18320. this.getViewer().executeCallback("fault");
  18321. }else{
  18322. this.parent.onFault.call(this,_f49);
  18323. }
  18324. };
  18325. ViewerDispatcherEntry.prototype.onComplete=function(_f4a){
  18326. var oCV=this.getViewer();
  18327. oCV.saveBackJaxInformation(_f4a);
  18328. if(oCV.isReportRenderingDone()){
  18329. this.getViewer().getSelectionController().resetSelections();
  18330. }
  18331. this.parent.onComplete.call(this,_f4a);
  18332. };
  18333. ViewerDispatcherEntry.prototype.onPrompting=function(_f4c){
  18334. var oCV=this.getViewer();
  18335. oCV.updateSkipToNavigationLink(true);
  18336. if(!oCV.executeCallback("prompt")){
  18337. this.onComplete(_f4c);
  18338. }
  18339. };
  18340. ViewerDispatcherEntry.prototype.onEntryComplete=function(_f4e){
  18341. if(this.getRequestHandler()){
  18342. this.getRequestHandler().setDispatcherEntry(this);
  18343. }
  18344. this.parent.onEntryComplete.call(this,_f4e);
  18345. };