viewer.standalone.core.js 697 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897
  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 CUIStyle(_15d,_15e,_15f,_160,_161){
  1712. this.m_active=_15d;
  1713. this.m_normal=_15d;
  1714. this.m_rollover=_15e;
  1715. this.m_activeRollover=_15e;
  1716. this.m_depressed=_15f;
  1717. this.m_depressed_rollover=_160;
  1718. this.m_disabled=_161;
  1719. };
  1720. function CUIStyle_getActiveState(){
  1721. return this.m_active;
  1722. };
  1723. function CUIStyle_setActiveState(_162){
  1724. switch(_162){
  1725. case "normal":
  1726. this.m_active=this.m_normal;
  1727. break;
  1728. case "depressed":
  1729. this.m_active=this.m_depressed;
  1730. break;
  1731. case "disabled":
  1732. this.m_active=this.m_disabled;
  1733. break;
  1734. default:
  1735. this.m_active=this.m_normal;
  1736. }
  1737. };
  1738. function CUIStyle_getActiveRolloverState(){
  1739. return this.m_activeRollover;
  1740. };
  1741. function CUIStyle_setActiveRolloverState(_163){
  1742. switch(_163){
  1743. case "normal":
  1744. this.m_activeRollover=this.m_rollover;
  1745. break;
  1746. case "depressed":
  1747. this.m_activeRollover=this.m_depressed_rollover;
  1748. break;
  1749. case "disabled":
  1750. this.m_activeRollover=this.m_disabled;
  1751. break;
  1752. default:
  1753. this.m_activeRollover=this.m_rollover;
  1754. }
  1755. };
  1756. function CUIStyle_getNormalState(){
  1757. return this.m_normal;
  1758. };
  1759. function CUIStyle_getRolloverState(){
  1760. return this.m_rollover;
  1761. };
  1762. function CUIStyle_getDepressedState(){
  1763. return this.m_depressed;
  1764. };
  1765. function CUIStyle_getDepressedRolloverState(){
  1766. return this.m_depressed_rollover;
  1767. };
  1768. function CUIStyle_getDisabledState(){
  1769. return this.m_disabled;
  1770. };
  1771. function CUIStyle_setNormalState(_164){
  1772. this.m_normal=_164;
  1773. };
  1774. function CUIStyle_setRolloverState(_165){
  1775. this.m_rollover=_165;
  1776. };
  1777. function CUIStyle_setDepressedState(_166){
  1778. this.m_depressed=_166;
  1779. };
  1780. function CUIStyle_setDepressedRolloverState(_167){
  1781. this.m_depressed_rollover=_167;
  1782. };
  1783. function CUIStyle_setDisabledState(_168){
  1784. this.m_disabled=_168;
  1785. };
  1786. CUIStyle.prototype.getNormalState=CUIStyle_getNormalState;
  1787. CUIStyle.prototype.getRolloverState=CUIStyle_getRolloverState;
  1788. CUIStyle.prototype.getDepressedState=CUIStyle_getDepressedState;
  1789. CUIStyle.prototype.getDepressedRolloverState=CUIStyle_getDepressedRolloverState;
  1790. CUIStyle.prototype.getDisabledState=CUIStyle_getDisabledState;
  1791. CUIStyle.prototype.setNormalState=CUIStyle_setNormalState;
  1792. CUIStyle.prototype.setRolloverState=CUIStyle_setRolloverState;
  1793. CUIStyle.prototype.setDepressedState=CUIStyle_setDepressedState;
  1794. CUIStyle.prototype.setDepressedRolloverState=CUIStyle_setDepressedRolloverState;
  1795. CUIStyle.prototype.setDisabledState=CUIStyle_setDisabledState;
  1796. CUIStyle.prototype.setActiveState=CUIStyle_setActiveState;
  1797. CUIStyle.prototype.getActiveState=CUIStyle_getActiveState;
  1798. CUIStyle.prototype.getActiveRolloverState=CUIStyle_getActiveRolloverState;
  1799. CUIStyle.prototype.setActiveRolloverState=CUIStyle_setActiveRolloverState;
  1800. function CToolbarSelect(_169,name,_16b,_16c,_16d){
  1801. this.m_parent=_169;
  1802. this.m_name=name;
  1803. this.m_command=_16b;
  1804. this.m_label=_16c;
  1805. this.m_toolTip=_16d;
  1806. this.m_items=[];
  1807. if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
  1808. this.m_parent.add(this);
  1809. }
  1810. if(_16c){
  1811. this.add("",_16c);
  1812. }
  1813. };
  1814. function CToolbarSelect_draw(){
  1815. var html="<select id=\""+this.m_name+"\" name=\""+this.m_name+"\" onchange=\""+this.m_command+"\"";
  1816. if(this.m_toolTip!=""){
  1817. html+=" title=\""+this.m_toolTip+"\"";
  1818. }
  1819. html+=">";
  1820. html+=this.drawItems();
  1821. html+="</select>";
  1822. return html;
  1823. };
  1824. function CToolbarSelect_drawItems(){
  1825. var html="";
  1826. for(var i=0;i<this.m_items.length;i++){
  1827. html+="<option value=\""+this.m_items[i].getUse()+"\">"+this.m_items[i].getDisplay()+"</option>";
  1828. }
  1829. return html;
  1830. };
  1831. function CToolbarSelect_add(sUse,_172){
  1832. var _173=new CSelectItem(sUse,_172);
  1833. this.m_items=this.m_items.concat(_173);
  1834. };
  1835. function CToolbarSelect_isVisible(){
  1836. return true;
  1837. };
  1838. CToolbarSelect.prototype.draw=CToolbarSelect_draw;
  1839. CToolbarSelect.prototype.drawItems=CToolbarSelect_drawItems;
  1840. CToolbarSelect.prototype.isVisible=CToolbarSelect_isVisible;
  1841. CToolbarSelect.prototype.add=CToolbarSelect_add;
  1842. function CSelectItem(sUse,_175){
  1843. this.m_sUse=sUse;
  1844. this.m_sDisplay=_175;
  1845. };
  1846. function CSelectItem_getUse(){
  1847. return this.m_sUse;
  1848. };
  1849. function CSelectItem_getDisplay(){
  1850. return this.m_sDisplay;
  1851. };
  1852. CSelectItem.prototype.getUse=CSelectItem_getUse;
  1853. CSelectItem.prototype.getDisplay=CSelectItem_getDisplay;
  1854. function CToolbarPicker(_176,_177,_178,sRef,_17a){
  1855. this.m_parent=_176;
  1856. this.m_command=_177;
  1857. this.m_oPicker=null;
  1858. this.m_sPromptId=_178;
  1859. this.m_sRef=sRef;
  1860. this.m_sType=_17a;
  1861. if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
  1862. this.m_parent.add(this);
  1863. }
  1864. };
  1865. function CToolbarPicker_draw(){
  1866. var html="<div id=\""+this.m_sType+this.m_sPromptId+"\" onclick=\""+this.m_sRef+".preventBubbling(event);\"></div>";
  1867. return html;
  1868. };
  1869. function CToolbarPicker_init(){
  1870. this.m_oPicker=eval(this.m_command);
  1871. g_pickerObservers=g_pickerObservers.concat(this.m_sRef);
  1872. };
  1873. function CToolbarPicker_isVisible(){
  1874. return true;
  1875. };
  1876. function CToolbarPicker_togglePicker(){
  1877. this.m_oPicker.togglePicker();
  1878. };
  1879. function CToolbarPicker_setActiveColor(s){
  1880. this.m_oPicker.setActiveColor(s);
  1881. };
  1882. function CToolbarPicker_setColor(s){
  1883. this.m_oPicker.setColor(s);
  1884. };
  1885. function CToolbarPicker_setAlignment(s){
  1886. this.m_oPicker.setAlignment(s);
  1887. };
  1888. function CToolbarPicker_setActiveAlignment(s){
  1889. this.m_oPicker.setActiveAlignment(s);
  1890. };
  1891. function CToolbarPicker_setPalette(s){
  1892. this.m_oPicker.setPalette(s);
  1893. };
  1894. function CToolbarPicker_applyCustomStyle(){
  1895. this.m_oPicker.applyCustomStyle();
  1896. };
  1897. function CToolbarPicker_updateCustomStyle(){
  1898. this.m_oPicker.updateCustomStyle();
  1899. };
  1900. function CToolbarPicker_hide(){
  1901. this.m_oPicker.hide();
  1902. };
  1903. function CToolbarPicker_preventBubbling(e){
  1904. this.m_oPicker.preventBubbling(e);
  1905. };
  1906. function CToolbarPicker_buttonMouseHandler(_182,_183){
  1907. this.m_oPicker.buttonMouseHandler(_182,_183);
  1908. };
  1909. CToolbarPicker.prototype.draw=CToolbarPicker_draw;
  1910. CToolbarPicker.prototype.isVisible=CToolbarPicker_isVisible;
  1911. CToolbarPicker.prototype.init=CToolbarPicker_init;
  1912. CToolbarPicker.prototype.togglePicker=CToolbarPicker_togglePicker;
  1913. CToolbarPicker.prototype.setColor=CToolbarPicker_setColor;
  1914. CToolbarPicker.prototype.setAlignment=CToolbarPicker_setAlignment;
  1915. CToolbarPicker.prototype.setActiveAlignment=CToolbarPicker_setActiveAlignment;
  1916. CToolbarPicker.prototype.setActiveColor=CToolbarPicker_setActiveColor;
  1917. CToolbarPicker.prototype.setPalette=CToolbarPicker_setPalette;
  1918. CToolbarPicker.prototype.applyCustomStyle=CToolbarPicker_applyCustomStyle;
  1919. CToolbarPicker.prototype.updateCustomStyle=CToolbarPicker_updateCustomStyle;
  1920. CToolbarPicker.prototype.hide=CToolbarPicker_hide;
  1921. CToolbarPicker.prototype.preventBubbling=CToolbarPicker_preventBubbling;
  1922. CToolbarPicker.prototype.buttonMouseHandler=CToolbarPicker_buttonMouseHandler;
  1923. var tbUniqueId=0;
  1924. function makeId(){
  1925. return tbUniqueId++;
  1926. };
  1927. gDropDownButtonStyle=new CUIStyle("dropDownArrow","dropDownArrowOver","","","");
  1928. gHeaderDropDownButtonStyle=new CUIStyle("bannerDropDownArrow","bannerDropDownArrowOver","","","");
  1929. function CToolbarButton(_184,_185,_186,_187,_188,_189,_18a,_18b,_18c){
  1930. this.m_id="tbbutton"+makeId();
  1931. this.m_bVisible=true;
  1932. this.m_action=_185;
  1933. this.m_toolTip=_187;
  1934. if(typeof _18c!="undefined"&&_18c!=""){
  1935. this.m_webContentRoot=_18c;
  1936. }else{
  1937. this.m_webContentRoot="..";
  1938. }
  1939. this.m_icon=(_186)?new CIcon(_186,_187,this.webContentRoot):null;
  1940. this.m_parent=_184;
  1941. this.m_menu=null;
  1942. if(typeof _189=="boolean"){
  1943. this.m_bHideDropDown=_189;
  1944. }else{
  1945. this.m_bHideDropDown=false;
  1946. }
  1947. this.m_style=new CUIStyle(_188.getNormalState(),_188.getRolloverState(),_188.getDepressedState(),_188.getDepressedRolloverState(),_188.getDisabledState());
  1948. this.m_observers=new CObserver(this);
  1949. if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
  1950. this.m_parent.add(this);
  1951. }
  1952. this.m_label=(_18a)?_18a:null;
  1953. this.m_dropDownToolTip=(_18b)?_18b:this.m_toolTip;
  1954. this.m_dropDownStyle=gDropDownButtonStyle;
  1955. };
  1956. function CToolbarButton_getId(){
  1957. return this.m_id;
  1958. };
  1959. function CToolbarButton_draw(){
  1960. var html="";
  1961. html+="<div style=\"margin-right:3px;\"><button type=\"button\" id=\"";
  1962. html+=this.m_id;
  1963. html+="\"";
  1964. if(typeof this.getStyle()=="object"){
  1965. html+=" class=\""+this.getStyle().getActiveState()+"\"";
  1966. if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
  1967. if(this.isEnabled()){
  1968. html+=" tabIndex=\"1\"";
  1969. }
  1970. html+=" hideFocus=\"true\"";
  1971. }
  1972. }
  1973. if(this.m_toolTip!=""){
  1974. html+=" title=\""+this.m_toolTip+"\"";
  1975. }
  1976. html+=">";
  1977. if(this.m_icon!=null){
  1978. html+=this.m_icon.draw();
  1979. }
  1980. if(this.m_label!=null){
  1981. html+=this.m_label;
  1982. }
  1983. html+="</button>";
  1984. if(this.m_menu!=null&&!this.m_bHideDropDown){
  1985. html+="<button type=\"button\" id=\"";
  1986. html+=("menu"+this.getId());
  1987. html+="\"";
  1988. if(typeof this.getStyle()=="object"){
  1989. html+=" class=\""+this.getDropDownStyle().getActiveState()+"\"";
  1990. if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
  1991. if(this.isEnabled()){
  1992. html+=" tabIndex=\"1\"";
  1993. }
  1994. html+=" hideFocus=\"true\"";
  1995. }
  1996. }
  1997. if(this.m_dropDownToolTip!=""){
  1998. html+=" title=\""+this.m_dropDownToolTip+"\"";
  1999. }
  2000. html+="><img style=\"vertical-align:middle;\" border=\"0\" src=\""+this.m_webContentRoot+"/common/images/toolbar_drop_arrow.gif\"";
  2001. if(this.m_dropDownToolTip!=""){
  2002. html+=" alt=\""+this.m_dropDownToolTip+"\"";
  2003. html+=" title=\""+this.m_dropDownToolTip+"\"";
  2004. }else{
  2005. html+=" alt=\"\"";
  2006. }
  2007. html+=" width=\"7\" height=\"16\"/></button>";
  2008. }
  2009. html+="</div>";
  2010. return html;
  2011. };
  2012. function CToolbarButton_attachEvents(){
  2013. if(typeof this.getParent().getHTMLContainer!="function"){
  2014. return;
  2015. }
  2016. var _18e=this.getParent().getHTMLContainer();
  2017. if(_18e==null){
  2018. return;
  2019. }
  2020. var _18f=eval(_18e.document?_18e.document.getElementById(this.m_id):_18e.ownerDocument.getElementById(this.m_id));
  2021. if(_18f==null){
  2022. return;
  2023. }
  2024. _18f.onmouseover=this.onmouseover;
  2025. _18f.onmouseout=this.onmouseout;
  2026. _18f.onclick=this.onclick;
  2027. _18f.onkeypress=this.onkeypress;
  2028. _18f.onfocus=this.onfocus;
  2029. _18f.onblur=this.onblur;
  2030. _18f.tbItem=eval(this);
  2031. if(this.m_menu!=null&&!this.m_bHideDropDown){
  2032. var _190=eval(_18e.document?_18e.document.getElementById("menu"+this.getId()):_18e.ownerDocument.getElementById("menu"+this.getId()));
  2033. _190.onmouseover=this.onmouseover;
  2034. _190.onmouseout=this.onmouseout;
  2035. _190.onclick=this.onclick;
  2036. _190.onkeypress=this.onkeypress;
  2037. _190.onfocus=this.onfocus;
  2038. _190.onblur=this.onblur;
  2039. _190.tbItem=eval(this);
  2040. }
  2041. };
  2042. function CToolbarButton_createDropDownMenu(_191,_192){
  2043. this.m_dropDownToolTip=(_192)?_192:this.m_toolTip;
  2044. this.m_menu=new CMenu("dropDown"+this.getId(),_191,this.m_webContentRoot);
  2045. this.m_menu.setParent(this);
  2046. return this.m_menu;
  2047. };
  2048. function CToolbarButton_addOwnerDrawControl(_193){
  2049. this.m_menu=_193;
  2050. if(typeof _193.setParent!="undefined"){
  2051. this.m_menu.setParent(this);
  2052. }
  2053. };
  2054. function CToolbarButton_getParent(){
  2055. return this.m_parent;
  2056. };
  2057. function CToolbarButton_setParent(_194){
  2058. this.m_parent=_194;
  2059. };
  2060. function CToolbarButton_getAction(){
  2061. return this.m_action;
  2062. };
  2063. function CToolbarButton_setAction(_195){
  2064. this.m_action=_195;
  2065. };
  2066. function CToolbarButton_getToolTip(){
  2067. return this.m_toolTip;
  2068. };
  2069. function CToolbarButton_setToolTip(_196){
  2070. this.m_toolTip=_196;
  2071. };
  2072. function CToolbarButton_getDropDownToolTip(){
  2073. return this.m_dropDownToolTip;
  2074. };
  2075. function CToolbarButton_setDropDownToolTip(_197){
  2076. this.m_dropDownToolTip=_197;
  2077. };
  2078. function CToolbarButton_getIcon(){
  2079. return this.m_icon;
  2080. };
  2081. function CToolbarButton_setIcon(_198){
  2082. this.m_icon.setPath(_198);
  2083. };
  2084. function CToolbarButton_onmouseover(evt){
  2085. var _19a=this.tbItem;
  2086. if(typeof _19a=="object"){
  2087. if(!_19a.isEnabled()){
  2088. return;
  2089. }
  2090. if(_19a.getMenu()!=null&&!_19a.m_bHideDropDown&&("menu"+_19a.getId())==this.id){
  2091. this.className=_19a.getDropDownStyle().getActiveRolloverState();
  2092. }else{
  2093. if(typeof _19a.getStyle()=="object"){
  2094. this.className=_19a.getStyle().getActiveRolloverState();
  2095. }
  2096. if(_19a.getMenu()!=null&&!_19a.m_bHideDropDown){
  2097. var _19b=this.document?this.document.getElementById("menu"+_19a.getId()):this.ownerDocument.getElementById("menu"+_19a.getId());
  2098. if(typeof _19b=="object"){
  2099. _19b.className=_19a.getDropDownStyle().getActiveRolloverState();
  2100. }
  2101. }
  2102. }
  2103. if(_19a.getParent()!=null&&typeof _19a.getParent().onmouseover=="function"){
  2104. _19a.getParent().onmouseover(evt);
  2105. }
  2106. _19a.getObservers().notify(CToolbarButton_onmouseover);
  2107. }
  2108. };
  2109. function CToolbarButton_onmouseout(evt){
  2110. var _19d=this.tbItem;
  2111. if(typeof _19d=="object"){
  2112. if(!_19d.isEnabled()){
  2113. return;
  2114. }
  2115. if(_19d.getMenu()!=null&&!_19d.m_bHideDropDown&&("menu"+_19d.getId())==this.id){
  2116. this.className=_19d.getDropDownStyle().getActiveState();
  2117. }else{
  2118. if(typeof _19d.getStyle()=="object"){
  2119. this.className=_19d.getStyle().getActiveState();
  2120. }
  2121. if(_19d.getMenu()!=null&&!_19d.m_bHideDropDown){
  2122. var _19e=this.document?this.document.getElementById("menu"+_19d.getId()):this.ownerDocument.getElementById("menu"+_19d.getId());
  2123. if(typeof _19e=="object"){
  2124. _19e.className=_19d.getDropDownStyle().getActiveState();
  2125. }
  2126. }
  2127. }
  2128. if(_19d.getParent()!=null&&typeof _19d.getParent().onmouseout=="function"){
  2129. _19d.getParent().onmouseout(evt);
  2130. }
  2131. _19d.getObservers().notify(CToolbarButton_onmouseout);
  2132. }
  2133. };
  2134. function CToolbarButton_onclick(evt){
  2135. evt=(evt)?evt:((event)?event:null);
  2136. var _1a0=this.tbItem;
  2137. if(_1a0!=null){
  2138. if(!_1a0.isEnabled()){
  2139. return;
  2140. }
  2141. var menu=_1a0.getMenu();
  2142. if(menu!=null&&((this.id==("menu"+_1a0.getId()))||(_1a0.m_bHideDropDown&&this.id==_1a0.getId()))){
  2143. if(menu.isVisible()){
  2144. menu.remove();
  2145. }else{
  2146. if(typeof menu.setHTMLContainer!="undefined"){
  2147. menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
  2148. }
  2149. if(typeof _1a0.m_parent.closeMenus=="function"){
  2150. _1a0.m_parent.closeMenus();
  2151. }
  2152. menu.draw();
  2153. menu.show();
  2154. }
  2155. }else{
  2156. eval(this.tbItem.m_action);
  2157. }
  2158. if(_1a0.getParent()!=null&&typeof _1a0.getParent().onclick=="function"){
  2159. _1a0.getParent().onclick(evt);
  2160. }
  2161. _1a0.getObservers().notify(CToolbarButton_onclick);
  2162. }
  2163. if(this.blur){
  2164. this.blur();
  2165. }
  2166. evt.cancelBubble=true;
  2167. return false;
  2168. };
  2169. function CToolbarButton_onkeypress(evt){
  2170. evt=(evt)?evt:((event)?event:null);
  2171. if(evt.keyCode==13||evt.keyCode==0){
  2172. var _1a3=this.tbItem;
  2173. if(_1a3!=null){
  2174. if(!_1a3.isEnabled()){
  2175. return;
  2176. }
  2177. var menu=_1a3.getMenu();
  2178. if(menu!=null&&((this.id==("menu"+_1a3.getId()))||(_1a3.m_bHideDropDown&&this.id==_1a3.getId()))){
  2179. if(menu.isVisible()){
  2180. menu.remove();
  2181. }else{
  2182. if(typeof menu.setHTMLContainer!="undefined"){
  2183. menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
  2184. }
  2185. menu.draw();
  2186. menu.show();
  2187. }
  2188. }else{
  2189. eval(this.tbItem.m_action);
  2190. }
  2191. if(_1a3.getParent()!=null&&typeof _1a3.getParent().onkeypress=="function"){
  2192. _1a3.getParent().onkeypress(evt);
  2193. }
  2194. _1a3.getObservers().notify(CToolbarButton_onkeypress);
  2195. }
  2196. return false;
  2197. }
  2198. evt.cancelBubble=true;
  2199. return true;
  2200. };
  2201. function CToolbarButton_getMenu(){
  2202. return this.m_menu;
  2203. };
  2204. function CToolbarButton_getMenuType(){
  2205. return "dropDown";
  2206. };
  2207. function CToolbarButton_setStyle(_1a5){
  2208. this.m_style=_1a5;
  2209. };
  2210. function CToolbarButton_getStyle(){
  2211. return this.m_style;
  2212. };
  2213. function CToolbarButton_getDropDownStyle(){
  2214. return this.m_dropDownStyle;
  2215. };
  2216. function CToolbarButton_setDropDownStyle(_1a6){
  2217. this.m_dropDownStyle=_1a6;
  2218. };
  2219. function CToolbarButton_isVisible(){
  2220. return this.m_bVisible;
  2221. };
  2222. function CToolbarButton_hide(){
  2223. this.m_bVisible=false;
  2224. };
  2225. function CToolbarButton_show(){
  2226. this.m_bVisible=true;
  2227. };
  2228. function CToolbarButton_enable(){
  2229. this.getStyle().setActiveState("normal");
  2230. this.getStyle().setActiveRolloverState("normal");
  2231. if(this.getIcon()){
  2232. this.getIcon().enable();
  2233. }
  2234. this.updateHTML();
  2235. };
  2236. function CToolbarButton_disable(){
  2237. this.getStyle().setActiveState("disabled");
  2238. this.getStyle().setActiveRolloverState("disabled");
  2239. if(this.getIcon()){
  2240. this.getIcon().disable();
  2241. }
  2242. this.updateHTML();
  2243. };
  2244. function CToolbarButton_isEnabled(){
  2245. if(this.getIcon()){
  2246. return this.getIcon().isEnabled();
  2247. }else{
  2248. return true;
  2249. }
  2250. };
  2251. function CToolbarButton_pressed(){
  2252. this.getStyle().setActiveState("depressed");
  2253. this.getStyle().setActiveRolloverState("depressed");
  2254. this.updateHTML();
  2255. };
  2256. function CToolbarButton_reset(){
  2257. this.getStyle().setActiveState("normal");
  2258. this.getStyle().setActiveRolloverState("normal");
  2259. this.updateHTML();
  2260. };
  2261. function CToolbarButton_updateHTML(){
  2262. if(typeof this.getStyle()=="object"){
  2263. if(typeof this.getParent().getHTMLContainer=="function"){
  2264. var _1a7=this.getParent().getHTMLContainer();
  2265. if(_1a7!=null){
  2266. var _1a8=_1a7.document?_1a7.document.getElementById(this.getId()):_1a7.ownerDocument.getElementById(this.getId());
  2267. if(_1a8!=null){
  2268. var _1a9=_1a8.getElementsByTagName("img");
  2269. if(typeof _1a9!="undefined"&&_1a9 instanceof Array&&_1a9.length>0){
  2270. if(this.getIcon()){
  2271. if(this.getIcon().isEnabled()){
  2272. _1a9[0].src=this.getIcon().getPath();
  2273. }else{
  2274. _1a9[0].src=this.getIcon().getDisabledImagePath();
  2275. }
  2276. }
  2277. if(this.getToolTip()){
  2278. _1a8.title=this.getToolTip();
  2279. _1a9[0].title=this.getToolTip();
  2280. }
  2281. }
  2282. var _1aa;
  2283. if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
  2284. _1a8.tabIndex=1;
  2285. if(this.getMenu()!=null&&!this.m_bHideDropDown){
  2286. _1a8.nextSibling.tabIndex=1;
  2287. _1a8.nextSibling.title=this.getToolTip();
  2288. _1aa=_1a8.nextSibling.getElementsByTagName("img");
  2289. if(_1aa!=null){
  2290. _1aa[0].title=this.getToolTip();
  2291. }
  2292. }
  2293. }else{
  2294. if(_1a8.tabIndex!="undefined"){
  2295. _1a8.removeAttribute("tabIndex");
  2296. if(this.getMenu()!=null){
  2297. _1a8.nextSibling.removeAttribute("tabIndex");
  2298. _1a8.nextSibling.title=this.getToolTip();
  2299. _1aa=_1a8.nextSibling.getElementsByTagName("img");
  2300. if(_1aa!=null){
  2301. _1aa[0].title=this.getToolTip();
  2302. }
  2303. }
  2304. }
  2305. }
  2306. _1a8.className=this.getStyle().getActiveState();
  2307. }
  2308. }
  2309. }
  2310. }
  2311. };
  2312. function CToolbarButton_getObservers(){
  2313. return this.m_observers;
  2314. };
  2315. function CToolbarButton_setFocus(){
  2316. if(this.m_menu!=null&&!this.m_bHideDropDown){
  2317. document.getElementById(this.m_id).nextSibling.focus();
  2318. }else{
  2319. document.getElementById(this.m_id).focus();
  2320. }
  2321. };
  2322. CToolbarButton.prototype.draw=CToolbarButton_draw;
  2323. CToolbarButton.prototype.attachEvents=CToolbarButton_attachEvents;
  2324. CToolbarButton.prototype.onblur=CToolbarButton_onmouseout;
  2325. CToolbarButton.prototype.onfocus=CToolbarButton_onmouseover;
  2326. CToolbarButton.prototype.onkeypress=CToolbarButton_onkeypress;
  2327. CToolbarButton.prototype.onmouseover=CToolbarButton_onmouseover;
  2328. CToolbarButton.prototype.onmouseout=CToolbarButton_onmouseout;
  2329. CToolbarButton.prototype.onclick=CToolbarButton_onclick;
  2330. CToolbarButton.prototype.setParent=CToolbarButton_setParent;
  2331. CToolbarButton.prototype.getParent=CToolbarButton_getParent;
  2332. CToolbarButton.prototype.getAction=CToolbarButton_getAction;
  2333. CToolbarButton.prototype.setAction=CToolbarButton_setAction;
  2334. CToolbarButton.prototype.getToolTip=CToolbarButton_getToolTip;
  2335. CToolbarButton.prototype.setToolTip=CToolbarButton_setToolTip;
  2336. CToolbarButton.prototype.getDropDownToolTip=CToolbarButton_getDropDownToolTip;
  2337. CToolbarButton.prototype.setDropDownToolTip=CToolbarButton_setDropDownToolTip;
  2338. CToolbarButton.prototype.getIcon=CToolbarButton_getIcon;
  2339. CToolbarButton.prototype.setIcon=CToolbarButton_setIcon;
  2340. CToolbarButton.prototype.getMenu=CToolbarButton_getMenu;
  2341. CToolbarButton.prototype.getMenuType=CToolbarButton_getMenuType;
  2342. CToolbarButton.prototype.getId=CToolbarButton_getId;
  2343. CToolbarButton.prototype.setStyle=CToolbarButton_setStyle;
  2344. CToolbarButton.prototype.getStyle=CToolbarButton_getStyle;
  2345. CToolbarButton.prototype.getDropDownStyle=CToolbarButton_getDropDownStyle;
  2346. CToolbarButton.prototype.setDropDownStyle=CToolbarButton_setDropDownStyle;
  2347. CToolbarButton.prototype.createDropDownMenu=CToolbarButton_createDropDownMenu;
  2348. CToolbarButton.prototype.addOwnerDrawControl=CToolbarButton_addOwnerDrawControl;
  2349. CToolbarButton.prototype.getObservers=CToolbarButton_getObservers;
  2350. CToolbarButton.prototype.update=new Function("return true");
  2351. CToolbarButton.prototype.isVisible=CToolbarButton_isVisible;
  2352. CToolbarButton.prototype.hide=CToolbarButton_hide;
  2353. CToolbarButton.prototype.show=CToolbarButton_show;
  2354. CToolbarButton.prototype.isEnabled=CToolbarButton_isEnabled;
  2355. CToolbarButton.prototype.enable=CToolbarButton_enable;
  2356. CToolbarButton.prototype.disable=CToolbarButton_disable;
  2357. CToolbarButton.prototype.pressed=CToolbarButton_pressed;
  2358. CToolbarButton.prototype.reset=CToolbarButton_reset;
  2359. CToolbarButton.prototype.setFocus=CToolbarButton_setFocus;
  2360. CToolbarButton.prototype.updateHTML=CToolbarButton_updateHTML;
  2361. var CMODAL_ID="CMODAL_FRAME";
  2362. var CMODAL_BLUR="CMODAL_BLUR";
  2363. var CMODAL_CONTENT_ID="CMODAL_CONTENT";
  2364. var CMODAL_HEADER="CMODAL_HEADER";
  2365. var CMODAL_BACKGROUND_LAYER_ID="CMODAL_BK";
  2366. var CMODAL_BACK_IFRAME_ID="CMODAL_BK_IFRAME";
  2367. var CMODAL_ZINDEX=111;
  2368. var CMODAL_dragEnabled=false;
  2369. var CMODAL_resizeDirection=null;
  2370. var CMODAL_startLeft=null;
  2371. var CMODAL_startTop=null;
  2372. var CMODAL_startWidth=null;
  2373. var CMODAL_startHeight=null;
  2374. var CMODAL_deltaX=null;
  2375. var CMODAL_deltaY=null;
  2376. function CModal(_1ab,_1ac,_1ad,t,l,h,w,_1b2,_1b3,_1b4,_1b5,_1b6){
  2377. this.m_hideButtonBar=false;
  2378. if(typeof _1b2!="undefined"){
  2379. this.m_hideButtonBar=_1b2;
  2380. }
  2381. this.m_hideHeader=false;
  2382. if(typeof _1b3!="undefined"){
  2383. this.m_hideHeader=_1b3;
  2384. }
  2385. this.m_title=_1ab;
  2386. this.m_sCloseToolTip=_1ac;
  2387. if(_1ad){
  2388. this.m_parent=_1ad;
  2389. }else{
  2390. this.m_parent=(document.body?document.body:document.documentElement);
  2391. }
  2392. var oBL=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
  2393. if(oBL){
  2394. oBL.parentNode.removeChild(oBL);
  2395. }
  2396. if(typeof _1b6!="undefined"&&_1b6!=""){
  2397. this.m_webContentRoot=_1b6;
  2398. }else{
  2399. this.m_webContentRoot="..";
  2400. }
  2401. oBL=document.createElement("div");
  2402. oBL.id=CMODAL_BACKGROUND_LAYER_ID;
  2403. oBL.style.display="none";
  2404. oBL.style.position="absolute";
  2405. oBL.style.top="0px";
  2406. oBL.style.left="0px";
  2407. oBL.style.zIndex=(CMODAL_ZINDEX-2);
  2408. oBL.style.width="100%";
  2409. oBL.style.height="100%";
  2410. if(typeof _1b5!="undefined"&&_1b5){
  2411. oBL.style.backgroundColor="rgb(238, 238, 238)";
  2412. oBL.style.opacity="0.6";
  2413. oBL.style.filter="alpha(opacity:60)";
  2414. }
  2415. oBL.innerHTML="<table width=\"100%\" height=\"100%\" role=\"presentation\"><tr><td role=\"presentation\" onmousemove=\"CModalEvent_mousemoving(event)\" onmouseup=\"CModalEvent_disableDrag(event)\"></td></tr></table>";
  2416. this.m_parent.appendChild(oBL);
  2417. this.m_backLayer=oBL;
  2418. this.m_top=(t==null?0:t);
  2419. this.m_left=(l==null?0:l);
  2420. this.m_height=(h==null?0:h);
  2421. this.m_width=(w==null?0:w);
  2422. if(typeof _1b4!="undefined"&&_1b4==true){
  2423. this.m_height=CModal_dynamicHeight();
  2424. this.m_width=CModal_dynamicWidth();
  2425. }
  2426. if(window.attachEvent){
  2427. window.attachEvent("onresize",CModalEvent_onWindowResize);
  2428. window.attachEvent("onscroll",CModalEvent_onWindowResize);
  2429. }else{
  2430. window.addEventListener("resize",CModalEvent_onWindowResize,false);
  2431. window.addEventListener("scroll",CModalEvent_onWindowResize,false);
  2432. }
  2433. var f=document.getElementById(CMODAL_ID);
  2434. if(f){
  2435. f.parentNode.removeChild(f);
  2436. }
  2437. f=document.createElement("span");
  2438. f.id=CMODAL_ID;
  2439. f.CModal=this;
  2440. f.className="CModal_frame";
  2441. f.style.zIndex=CMODAL_ZINDEX;
  2442. f.style.border="#99aacc 1px solid";
  2443. var div=this.createHiddenDiv("CMODAL_TAB_LOOP_BEFORE",0);
  2444. div.onfocus=function(){
  2445. document.getElementById("CMODAL_AFTER_PLACEHOLDER").focus();
  2446. };
  2447. this.m_parent.appendChild(f);
  2448. div=this.createHiddenDiv("CMODAL_AFTER_PLACEHOLDER",-1);
  2449. div=this.createHiddenDiv("CMODAL_TAB_LOOP_AFTER",0);
  2450. div.onfocus=function(){
  2451. document.getElementById(CMODAL_CONTENT_ID).contentWindow.focus();
  2452. };
  2453. this.m_back_iframe=document.getElementById(CMODAL_BACK_IFRAME_ID);
  2454. if(this.m_back_iframe){
  2455. this.m_back_iframe.parentNode.removeChild(this.m_back_iframe);
  2456. }
  2457. this.m_back_iframe=document.createElement("iframe");
  2458. this.m_back_iframe.id=CMODAL_BACK_IFRAME_ID;
  2459. this.m_back_iframe.frameBorder=0;
  2460. this.m_back_iframe.src=this.m_webContentRoot+"/common/blank.html";
  2461. this.m_back_iframe.style.position="absolute";
  2462. this.m_back_iframe.style.zIndex=CMODAL_ZINDEX-1;
  2463. this.m_back_iframe.onfocus=function(){
  2464. document.getElementById(CMODAL_BACKGROUND_LAYER_ID).focus();
  2465. };
  2466. this.m_back_iframe.tabIndex=1;
  2467. this.m_back_iframe.title="Empty frame";
  2468. this.m_back_iframe.role="presentation";
  2469. this.m_parent.appendChild(this.m_back_iframe);
  2470. f.innerHTML=this.renderDialogFrame();
  2471. this.m_frame=f;
  2472. };
  2473. function CModal_createHiddenDiv(_1ba,_1bb){
  2474. var div=document.getElementById(_1ba);
  2475. if(div){
  2476. div.parentNode.removeChild(div);
  2477. }
  2478. div=document.createElement("div");
  2479. div.id=_1ba;
  2480. div.tabIndex=_1bb;
  2481. div.style.position="absolute";
  2482. div.style.overflow="hidden";
  2483. div.style.width="0px";
  2484. div.style.height="0px";
  2485. this.m_parent.appendChild(div);
  2486. return div;
  2487. };
  2488. function CModal_hide(){
  2489. this.m_top=parseInt(this.m_frame.offsetTop,10);
  2490. this.m_left=parseInt(this.m_frame.offsetLeft,10);
  2491. this.m_height=parseInt(this.m_frame.offsetHeight,10);
  2492. this.m_width=parseInt(this.m_frame.offsetWidth,10);
  2493. this.m_backLayer.style.display="none";
  2494. this.m_frame.style.display="none";
  2495. if(this.m_back_iframe){
  2496. this.m_back_iframe.style.display="none";
  2497. }
  2498. };
  2499. function CModal_reCenter(){
  2500. this.m_left=(document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth-this.m_width)/2;
  2501. this.m_top=(document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight-this.m_height)/2;
  2502. };
  2503. function CModal_renderDialogFrame(){
  2504. var _1bd="summary=\"\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"";
  2505. var out="<table role=\"presentation\" style=\"width:100%; height:99%; padding-top:2px;\" "+_1bd+" onmouseup=\"CModalEvent_disableDrag(event)\" onmousemove=\"CModalEvent_mousemoving(event)\">";
  2506. if(!this.m_hideHeader){
  2507. out+=""+"<tr>"+"<td role=\"presentation\" onmousedown=\"CModalEvent_enableDrag(event);\">"+"<table class=\"dialogHeader\" width=\"100%\" "+_1bd+">"+"<tr>"+"<td id=\""+CMODAL_HEADER+"\" valign=\"top\" class=\"dialogHeaderTitle\" width=\"100%\" nowrap=\"nowrap\">"+getConfigFrame().htmlencode(this.m_title)+"</td><td align=\"right\" valign=\"middle\">"+"<a onclick=\"hideCModal()\" style=\"cursor:pointer;\">"+"<img height=\"16\" width=\"16\" vspace=\"2\" border=\"0\" class=\"dialogClose\" onmouseover=\"this.className = 'dialogCloseOver'\" onmouseout=\"this.className = 'dialogClose'\" onmouseup=\"this.className = 'dialogClose'\" src=\""+p_sSkinFolder+"/portal/images/close.gif\" alt=\""+getConfigFrame().htmlencode(this.m_sCloseToolTip)+"\" title=\""+getConfigFrame().htmlencode(this.m_sCloseToolTip)+"\">"+"</a>"+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>";
  2508. }
  2509. out+="<tr><td role=\"presentation\" width=\"100%\" height=\"100%\" class=\"body_dialog_modal\" onmousemove=\"CModalEvent_mousemoving(event)\" onmouseup=\"CModalEvent_disableDrag(event)\">"+"<iframe title=\"modal dialog\" id=\""+CMODAL_CONTENT_ID+"\" name=\""+CMODAL_CONTENT_ID+"\" class=\"body_dialog_modal\" src=\""+this.m_webContentRoot+"/"+"qs"+"/blankNewWin.html\" style=\"padding:0px;margin:0px;width:100%;height:100%;\" frameborder=\"0\">no iframe support?</iframe>"+"</td></tr>";
  2510. if(!this.m_hideButtonBar){
  2511. out+="<tr><td>"+"<table "+_1bd+" class=\"dialogButtonBar\" style=\"padding:0px\">"+"<tr>"+"<td width=\"2\" valign=\"middle\"><img width=\"2\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td valign=\"middle\"><table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" role=\"presentation\">"+"<tr>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td>"+CModal_renderButton(msgQS["OK"],"okCModal()")+"</td>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td>"+CModal_renderButton(msgQS["CANCEL"],"cancelCModal()")+"</td>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"</tr></table>"+"</td><td width=\"100%\">&nbsp;</td>"+"<td style=\"padding:3px;\" valign=\"bottom\" class=\"CModal_sideSE\" onmousedown=\"CModalEvent_enableResize(event)\">"+"<img role=\"presentation\" class=\"CModal_sideSE\" style=\"cursor:se-resize;\" alt=\"\" height=\"12\" width=\"12\" border=\"0\" src=\""+this.m_webContentRoot+"/common/images/dialog_resize.gif\" onmousedown=\"CModalEvent_enableResize(event);return false;\" onmouseup=\"CModalEvent_disableDrag(event);return false;\" onmousemove=\"CModalEvent_mousemoving(event);return false;\">"+"</td>"+"</tr></table></td></tr>";
  2512. }
  2513. out+="</table>";
  2514. return out;
  2515. };
  2516. function CModal_renderButton(_1bf,_1c0){
  2517. var out="<table cellpadding=\"0\" cellspacing=\"0\" style=\"padding: 2px 10px 3px;\" class=\"commandButton\" onmouseover=\"this.className='commandButtonOver'\""+" onmouseout=\"this.className = 'commandButton'\" onmousedown=\"this.className='commandButtonDown'\">"+"<tr>"+"<td style=\"cursor:pointer;\" valign=\"middle\" align=\"center\" nowrap id=\"btnAnchor\" onclick=\""+_1c0+"\">"+" <img height=\"1\" width=\"60\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"><br>"+_1bf+"</td></tr></table>";
  2518. return out;
  2519. };
  2520. function CModal_show(){
  2521. this.m_backLayer.style.display="";
  2522. this.reCenter();
  2523. var _1c2=CMenu_getScrollingPosition();
  2524. this.m_frame.style.top=(_1c2.y+this.m_top)+"px";
  2525. this.m_frame.style.left=(_1c2.x+this.m_left)+"px";
  2526. this.m_frame.style.height=this.m_height+"px";
  2527. this.m_frame.style.width=this.m_width+"px";
  2528. this.m_frame.style.display="inline";
  2529. this.m_frame.focus();
  2530. if(this.m_back_iframe){
  2531. this.m_back_iframe.style.top=this.m_frame.offsetTop+"px";
  2532. this.m_back_iframe.style.left=this.m_frame.offsetLeft+"px";
  2533. this.m_back_iframe.style.height=this.m_frame.offsetHeight+"px";
  2534. this.m_back_iframe.style.width=this.m_frame.offsetWidth+"px";
  2535. this.m_back_iframe.style.display="block";
  2536. }
  2537. };
  2538. CModal.prototype.hide=CModal_hide;
  2539. CModal.prototype.createHiddenDiv=CModal_createHiddenDiv;
  2540. CModal.prototype.reCenter=CModal_reCenter;
  2541. CModal.prototype.renderDialogFrame=CModal_renderDialogFrame;
  2542. CModal.prototype.show=CModal_show;
  2543. function hideCModal(){
  2544. var cdlg=document.getElementById(CMODAL_ID);
  2545. if(cdlg&&cdlg.CModal){
  2546. cdlg.CModal.hide();
  2547. }
  2548. };
  2549. function destroyCModal(){
  2550. var oBL=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
  2551. if(oBL){
  2552. oBL.style.display="none";
  2553. }
  2554. var _1c5=document.getElementById(CMODAL_ID);
  2555. if(_1c5){
  2556. _1c5.style.display="none";
  2557. }
  2558. var _1c6=document.getElementById(CMODAL_BACK_IFRAME_ID);
  2559. if(_1c6){
  2560. _1c6.style.display="none";
  2561. }
  2562. if(window.detachEvent){
  2563. window.detachEvent("onresize",CModalEvent_onWindowResize);
  2564. window.detachEvent("onscroll",CModalEvent_onWindowResize);
  2565. }else{
  2566. window.removeEventListener("resize",CModalEvent_onWindowResize,false);
  2567. window.removeEventListener("scroll",CModalEvent_onWindowResize,false);
  2568. }
  2569. };
  2570. function cancelCModal(){
  2571. var _1c7=document.getElementById(CMODAL_CONTENT_ID);
  2572. if(_1c7&&_1c7.contentWindow&&typeof _1c7.contentWindow.cancelDialog=="function"){
  2573. _1c7.contentWindow.cancelDialog();
  2574. }else{
  2575. hideCModal();
  2576. }
  2577. };
  2578. function okCModal(){
  2579. var _1c8=document.getElementById(CMODAL_CONTENT_ID);
  2580. if(_1c8&&_1c8.contentWindow&&typeof _1c8.contentWindow.execute=="function"){
  2581. _1c8.contentWindow.execute();
  2582. }else{
  2583. hideCModal();
  2584. }
  2585. };
  2586. function CModal_dynamicWidth(){
  2587. return (window.innerWidth!=null?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body!=null?document.body.clientWidth:null)-150;
  2588. };
  2589. function CModal_dynamicHeight(){
  2590. return (window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null)-150;
  2591. };
  2592. function CModal_setModalHeight(_1c9){
  2593. var _1ca=_1c9.getAttribute("storedHeight");
  2594. if(_1c9.offsetHeight>document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight){
  2595. if(_1ca==null){
  2596. _1c9.setAttribute("storedHeight",_1c9.offsetHeight);
  2597. }
  2598. _1c9.style.height=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight+"px";
  2599. }else{
  2600. if(_1ca!=null){
  2601. if(_1ca<document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight){
  2602. _1c9.style.height=_1ca+"px";
  2603. }else{
  2604. _1c9.style.height=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight+"px";
  2605. }
  2606. }
  2607. }
  2608. };
  2609. function CModal_setModalWidth(_1cb){
  2610. var _1cc=_1cb.getAttribute("storedWidth");
  2611. if(_1cb.offsetWidth>document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth){
  2612. if(_1cc==null){
  2613. _1cb.setAttribute("storedWidth",_1cb.offsetWidth);
  2614. }
  2615. _1cb.style.width=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth+"px";
  2616. }else{
  2617. if(_1cc!=null){
  2618. if(_1cc<document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth){
  2619. _1cb.removeAttribute("storedWidth");
  2620. _1cb.style.width=_1cc+"px";
  2621. }else{
  2622. _1cb.style.width=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth+"px";
  2623. }
  2624. }
  2625. }
  2626. };
  2627. function CModalEvent_onWindowResize(e){
  2628. var _1ce=document.getElementById(CMODAL_ID);
  2629. var _1cf=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
  2630. var _1d0=document.getElementById(CMODAL_BACK_IFRAME_ID);
  2631. if(_1ce&&_1cf&&_1d0){
  2632. CModal_setModalWidth(_1ce);
  2633. CModal_setModalHeight(_1ce);
  2634. var _1d1=CMenu_getScrollingPosition();
  2635. var _1d2=(_1d1.y+((_1cf.clientHeight-_1ce.offsetHeight)/2));
  2636. var _1d3=(_1d1.x+((_1cf.clientWidth-_1ce.offsetWidth)/2));
  2637. _1ce.style.top=_1d2+"px";
  2638. _1ce.style.left=_1d3+"px";
  2639. _1d0.style.top=_1d2+"px";
  2640. _1d0.style.width=_1ce.style.width;
  2641. _1d0.style.height=_1ce.style.height;
  2642. _1d0.style.left=_1d3+"px";
  2643. }
  2644. };
  2645. function CModalEvent_mousemoving(e){
  2646. var oDlg=null;
  2647. var _1d6=null;
  2648. if(CMODAL_dragEnabled){
  2649. if(e==null&&(typeof event=="object")&&event.clientX!=null){
  2650. e=event;
  2651. }
  2652. oDlg=document.getElementById(CMODAL_ID);
  2653. if(CMODAL_startLeft==null){
  2654. CMODAL_startLeft=parseInt(oDlg.style.left,10)-e.clientX;
  2655. CMODAL_startTop=parseInt(oDlg.style.top,10)-e.clientY;
  2656. }
  2657. oDlg.style.left=CMODAL_startLeft+e.clientX;
  2658. oDlg.style.top=CMODAL_startTop+e.clientY;
  2659. _1d6=document.getElementById(CMODAL_BACK_IFRAME_ID);
  2660. if(_1d6){
  2661. _1d6.style.left=oDlg.style.left;
  2662. _1d6.style.top=oDlg.style.top;
  2663. }
  2664. }
  2665. if(CMODAL_resizeDirection){
  2666. if(e==null&&(typeof event=="object")&&event.clientX!=null){
  2667. e=event;
  2668. }
  2669. oDlg=document.getElementById(CMODAL_ID);
  2670. if(CMODAL_startLeft==null){
  2671. CMODAL_startLeft=parseInt(oDlg.style.left,10);
  2672. CMODAL_startTop=parseInt(oDlg.style.top,10);
  2673. CMODAL_startHeight=parseInt(oDlg.style.height,10);
  2674. CMODAL_startWidth=parseInt(oDlg.style.width,10);
  2675. }
  2676. var h=0,w=0;
  2677. switch(CMODAL_resizeDirection){
  2678. case "NE":
  2679. case "E":
  2680. case "SE":
  2681. w=(e.clientX-CMODAL_startLeft+CMODAL_deltaX);
  2682. if(w<100){
  2683. w=100;
  2684. }
  2685. oDlg.style.width=w+"px";
  2686. }
  2687. switch(CMODAL_resizeDirection){
  2688. case "SW":
  2689. case "S":
  2690. case "SE":
  2691. h=(e.clientY-CMODAL_startTop+CMODAL_deltaY);
  2692. if(h<100){
  2693. h=100;
  2694. }
  2695. oDlg.style.height=h+"px";
  2696. }
  2697. switch(CMODAL_resizeDirection){
  2698. case "NW":
  2699. case "N":
  2700. case "NE":
  2701. oDlg.style.top=e.clientY;
  2702. h=(CMODAL_startHeight+(CMODAL_startTop-e.clientY)+CMODAL_deltaY);
  2703. if(h<100){
  2704. h=100;
  2705. }
  2706. oDlg.style.height=h+"px";
  2707. }
  2708. switch(CMODAL_resizeDirection){
  2709. case "NW":
  2710. case "W":
  2711. case "SW":
  2712. oDlg.style.left=e.clientX;
  2713. w=(CMODAL_startWidth+(CMODAL_startLeft-e.clientX)+CMODAL_deltaX);
  2714. if(w<100){
  2715. w=100;
  2716. }
  2717. oDlg.style.width=w+"px";
  2718. }
  2719. _1d6=document.getElementById(CMODAL_BACK_IFRAME_ID);
  2720. if(_1d6){
  2721. _1d6.style.left=oDlg.offsetLeft;
  2722. _1d6.style.top=oDlg.offsetTop;
  2723. _1d6.style.height=oDlg.offsetHeight;
  2724. _1d6.style.width=oDlg.offsetWidth;
  2725. }
  2726. }
  2727. if(e.returnValue){
  2728. e.returnValue=false;
  2729. }else{
  2730. if(e.preventDefault){
  2731. e.preventDefault();
  2732. }else{
  2733. return false;
  2734. }
  2735. }
  2736. };
  2737. function CModalEvent_disableDrag(e){
  2738. CMODAL_dragEnabled=false;
  2739. CMODAL_resizeDirection=null;
  2740. CMODAL_startLeft=null;
  2741. CMODAL_startTop=null;
  2742. CMODAL_deltaX=0;
  2743. CMODAL_deltaY=0;
  2744. var cn=document.getElementById(CMODAL_ID).className;
  2745. var _1db=document.getElementById(CMODAL_HEADER);
  2746. if(_1db!=null){
  2747. _1db.style.cursor="default";
  2748. }
  2749. document.getElementById(CMODAL_ID).className=cn.replace(/\s*\bCModal_dragging\b/g,"");
  2750. document.getElementById(CMODAL_CONTENT_ID).style.visibility="visible";
  2751. if(typeof document.getElementById(CMODAL_CONTENT_ID).contentWindow.refreshContent=="function"){
  2752. document.getElementById(CMODAL_CONTENT_ID).contentWindow.refreshContent();
  2753. }
  2754. if(e.returnValue){
  2755. e.returnValue=false;
  2756. }else{
  2757. if(e.preventDefault){
  2758. e.preventDefault();
  2759. }else{
  2760. return false;
  2761. }
  2762. }
  2763. };
  2764. function CModalEvent_enableDrag(e){
  2765. CMODAL_dragEnabled=true;
  2766. CMODAL_startLeft=null;
  2767. CMODAL_startTop=null;
  2768. if(e==null&&(typeof event=="object")&&event.clientX!=null){
  2769. e=event;
  2770. }
  2771. document.getElementById(CMODAL_ID).className+=" CModal_dragging";
  2772. document.getElementById(CMODAL_HEADER).style.cursor="move";
  2773. document.getElementById(CMODAL_CONTENT_ID).style.visibility="hidden";
  2774. if(e.returnValue){
  2775. e.returnValue=false;
  2776. }else{
  2777. if(e.preventDefault){
  2778. e.preventDefault();
  2779. }else{
  2780. return false;
  2781. }
  2782. }
  2783. };
  2784. function CModalEvent_enableResize(e){
  2785. CMODAL_startLeft=null;
  2786. CMODAL_startTop=null;
  2787. CMODAL_startWidth=null;
  2788. CMODAL_startHeight=null;
  2789. CMODAL_deltaX=0;
  2790. CMODAL_deltaY=0;
  2791. if(e==null&&(typeof event=="object")&&event.clientX!=null){
  2792. e=event;
  2793. }
  2794. var oDlg=document.getElementById(CMODAL_ID);
  2795. CMODAL_startLeft=parseInt(oDlg.style.left,10);
  2796. CMODAL_startTop=parseInt(oDlg.style.top,10);
  2797. CMODAL_startHeight=parseInt(oDlg.style.height,10);
  2798. CMODAL_startWidth=parseInt(oDlg.style.width,10);
  2799. CMODAL_deltaX=(CMODAL_startLeft+CMODAL_startWidth-e.clientX);
  2800. CMODAL_deltaY=(CMODAL_startTop+CMODAL_startHeight-e.clientY);
  2801. var src=(e.srcElement?e.srcElement:e.target);
  2802. if((/\bCModal_side(\w+)\b/).test(src.className)){
  2803. CMODAL_resizeDirection=RegExp.$1;
  2804. document.getElementById(CMODAL_ID).className+=" CModal_dragging";
  2805. document.getElementById(CMODAL_CONTENT_ID).style.visibility="hidden";
  2806. }
  2807. if(e.returnValue){
  2808. e.returnValue=false;
  2809. }else{
  2810. if(e.preventDefault){
  2811. e.preventDefault();
  2812. }else{
  2813. return false;
  2814. }
  2815. }
  2816. };
  2817. function CMenuEntry(){
  2818. this.m_menu=null;
  2819. this.m_menuType="";
  2820. this.m_action=null;
  2821. this.m_bEnabled=true;
  2822. };
  2823. function CMenuEntry_setParent(_1e0){
  2824. this.m_parent=_1e0;
  2825. };
  2826. function CMenuEntry_getParent(){
  2827. return this.m_parent;
  2828. };
  2829. function CMenuEntry_setWebContentRoot(_1e1){
  2830. this.m_webContentRoot=_1e1;
  2831. };
  2832. function CMenuEntry_setId(id){
  2833. this.m_id=id;
  2834. };
  2835. function CMenuEntry_getId(){
  2836. return this.m_id;
  2837. };
  2838. function CMenuEntry_getObservers(){
  2839. return this.m_observers;
  2840. };
  2841. function CMenuEntry_onkeydown(evt){
  2842. evt=(evt)?evt:((event)?event:null);
  2843. if(typeof evt!="object"||evt==null){
  2844. return;
  2845. }
  2846. var i=0,ii,_1e6,_1e7,_1e8;
  2847. var _1e9=true;
  2848. var _1ea=evt.currentTarget||evt.srcElement;
  2849. if(evt.keyCode==9&&evt.shiftKey){
  2850. _1e8=this.getParent();
  2851. for(i=0;i<_1e8.getNumItems();i++){
  2852. if(_1e8.get(i)==this){
  2853. _1e8.hide();
  2854. this.getObservers().notify("CMenuItem_closeMenuTabEvent");
  2855. var _1eb=_1e8.getMenuType?_1e8.getMenuType():null;
  2856. if(_1eb!==cHorizonalBar&&_1eb!==cVerticalBar){
  2857. if(isIE()){
  2858. evt.preventDefault();
  2859. }else{
  2860. evt.returnValue=false;
  2861. }
  2862. }
  2863. break;
  2864. }else{
  2865. if(this.getParent().get(i).m_bEnabled==true){
  2866. break;
  2867. }
  2868. }
  2869. }
  2870. }else{
  2871. if(evt.keyCode==9){
  2872. if(this.isInMenu()){
  2873. for(i=(this.getParent().getNumItems()-1);i>=0;i++){
  2874. if(this.getParent().get(i)==this){
  2875. if(this.getMenu()){
  2876. this.getMenu().hide();
  2877. }
  2878. this.getParent().hide();
  2879. this.getObservers().notify("CMenuItem_closeMenuTabEvent");
  2880. if(isIE()){
  2881. evt.preventDefault();
  2882. }else{
  2883. evt.returnValue=false;
  2884. }
  2885. break;
  2886. }else{
  2887. if(this.getParent().get(i).m_bEnabled==true){
  2888. break;
  2889. }
  2890. }
  2891. }
  2892. }else{
  2893. if(typeof this.getParent().closeAllMenus=="function"){
  2894. this.getParent().closeAllMenus();
  2895. }else{
  2896. if(typeof this.getParent().closeMenus=="function"){
  2897. this.getParent().closeMenus();
  2898. }
  2899. }
  2900. }
  2901. }else{
  2902. if(evt.keyCode==40){
  2903. if(this.isInMenu()){
  2904. _1e6=this.getParent().getNumItems();
  2905. for(i=0;i<_1e6;i++){
  2906. if(this===this.getParent().get(i)){
  2907. var _1ec=0;
  2908. var _1ed=true;
  2909. if(i!=(_1e6-1)){
  2910. _1ec=i+1;
  2911. _1ed=false;
  2912. }
  2913. for(ii=_1ec;ii<_1e6;ii++){
  2914. _1e7=this.getParent().get(ii);
  2915. if(typeof _1e7.isVisible=="function"&&_1e7.isVisible()&&typeof _1e7.setFocus=="function"){
  2916. _1e7.setFocus();
  2917. break;
  2918. }
  2919. if(ii==(_1e6-1)&&!_1ed){
  2920. ii=0;
  2921. _1ed=true;
  2922. }
  2923. }
  2924. break;
  2925. }
  2926. }
  2927. }else{
  2928. if(this.isEnabled()){
  2929. _1e9=false;
  2930. var menu=this.getMenu();
  2931. if(this.getMenuType()=="dropDown"){
  2932. if(menu.isVisible()==false){
  2933. menu.setHTMLContainer(_1ea.document?_1ea.document.body:_1ea.ownerDocument.body);
  2934. menu.draw();
  2935. menu.show();
  2936. }else{
  2937. menu.remove();
  2938. }
  2939. }
  2940. }
  2941. }
  2942. }else{
  2943. if(evt.keyCode==38&&this.isInMenu()){
  2944. _1e6=this.getParent().getNumItems();
  2945. for(i=0;i<_1e6;i++){
  2946. if(this===this.getParent().get(i)){
  2947. var _1ec=i-1;
  2948. var _1ef=false;
  2949. if(i<=0){
  2950. _1ec=_1e6-1;
  2951. _1ef=true;
  2952. }
  2953. for(ii=_1ec;ii>=0;ii--){
  2954. _1e7=this.getParent().get(ii);
  2955. if(typeof _1e7.isVisible=="function"&&_1e7.isVisible()&&typeof _1e7.setFocus=="function"){
  2956. _1e7.setFocus();
  2957. break;
  2958. }
  2959. if(ii==0&&!_1ef){
  2960. _1ef=true;
  2961. ii=_1e6;
  2962. }
  2963. }
  2964. break;
  2965. }
  2966. }
  2967. }else{
  2968. if(evt.keyCode==37||evt.keyCode==39){
  2969. if(this.isEnabled()&&this.getMenu()!=null){
  2970. var menu=this.getMenu();
  2971. if(this.getMenuType()=="cascaded"){
  2972. _1e9=false;
  2973. if(menu.isVisible()==false){
  2974. menu.setHTMLContainer(_1ea.document?_1ea.document.body:_1ea.ownerDocument.body);
  2975. menu.draw();
  2976. menu.show();
  2977. }
  2978. }
  2979. }else{
  2980. _1e9=false;
  2981. _1e8=this.getParent();
  2982. if(_1e8&&_1e8.getParent()&&_1e8.getParent().getMenuType()=="cascaded"){
  2983. _1e8.hide();
  2984. }
  2985. }
  2986. }
  2987. }
  2988. }
  2989. }
  2990. }
  2991. if(_1e9&&this.getParent()!=null&&typeof this.getParent().onkeydown=="function"){
  2992. this.getParent().onkeydown(evt);
  2993. }
  2994. this.getObservers().notify(CMenuItem_onkeydown);
  2995. };
  2996. function CMenuEntry_onkeypress(evt){
  2997. evt=(evt)?evt:((event)?event:null);
  2998. var _1f1=evt.keyCode;
  2999. if(_1f1==0&&typeof evt.charCode!="undefined"){
  3000. _1f1=evt.charCode;
  3001. }
  3002. if(typeof evt=="object"&&evt!=null){
  3003. var _1f2=evt.currentTarget||evt.srcElement;
  3004. var _1f3=true;
  3005. if(_1f1==9||_1f1==37||_1f1==38||_1f1==39||_1f1==40){
  3006. _1f3=false;
  3007. }else{
  3008. if(_1f1==13||_1f1==32){
  3009. if(!this.isEnabled()){
  3010. return;
  3011. }
  3012. if(this.getMenu()!=null){
  3013. var menu=this.getMenu();
  3014. if(this.getMenuType()=="cascaded"){
  3015. _1f3=false;
  3016. if(menu.isVisible()==false){
  3017. menu.setHTMLContainer(_1f2.document?_1f2.document.body:_1f2.ownerDocument.body);
  3018. menu.draw();
  3019. menu.show();
  3020. }else{
  3021. menu.remove();
  3022. }
  3023. }else{
  3024. if(this.getMenuType()=="dropDown"){
  3025. if(menu.isVisible()==false){
  3026. menu.setHTMLContainer(_1f2.document?_1f2.document.body:_1f2.ownerDocument.body);
  3027. menu.draw();
  3028. menu.show();
  3029. }else{
  3030. menu.remove();
  3031. }
  3032. }
  3033. }
  3034. }else{
  3035. eval(this.getAction());
  3036. }
  3037. }else{
  3038. if(_1f1==27){
  3039. this.getParent().hide();
  3040. return;
  3041. }
  3042. }
  3043. }
  3044. if(_1f3){
  3045. if(this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
  3046. this.getParent().onkeypress(evt);
  3047. }
  3048. this.getObservers().notify(CMenuItem_onkeypress);
  3049. }
  3050. }
  3051. if(_1f1==13||_1f1==0||_1f1==40||_1f1==38){
  3052. if(evt!=null){
  3053. evt.cancelBubble=true;
  3054. }
  3055. return false;
  3056. }
  3057. return true;
  3058. };
  3059. function CMenuEntry_getMenu(){
  3060. return this.m_menu;
  3061. };
  3062. function CMenuEntry_getMenuType(){
  3063. return this.m_menuType;
  3064. };
  3065. function CMenuEntry_isEnabled(){
  3066. return this.m_bEnabled;
  3067. };
  3068. function CMenuEntry_isInMenu(){
  3069. return this.getParent() instanceof CMenu;
  3070. };
  3071. function CMenuEntry_getAction(){
  3072. return this.m_action;
  3073. };
  3074. function CMenuEntry_setAction(_1f5){
  3075. this.m_action=_1f5;
  3076. };
  3077. CMenuEntry.prototype.getObservers=CMenuEntry_getObservers;
  3078. CMenuEntry.prototype.setId=CMenuEntry_setId;
  3079. CMenuEntry.prototype.getId=CMenuEntry_getId;
  3080. CMenuEntry.prototype.onkeypress=CMenuEntry_onkeypress;
  3081. CMenuEntry.prototype.onkeydown=CMenuEntry_onkeydown;
  3082. CMenuEntry.prototype.getMenu=CMenuEntry_getMenu;
  3083. CMenuEntry.prototype.getMenuType=CMenuEntry_getMenuType;
  3084. CMenuEntry.prototype.setParent=CMenuEntry_setParent;
  3085. CMenuEntry.prototype.getParent=CMenuEntry_getParent;
  3086. CMenuEntry.prototype.setWebContentRoot=CMenuEntry_setWebContentRoot;
  3087. CMenuEntry.prototype.isEnabled=CMenuEntry_isEnabled;
  3088. CMenuEntry.prototype.isInMenu=CMenuEntry_isInMenu;
  3089. CMenuEntry.prototype.getAction=CMenuEntry_getAction;
  3090. CMenuEntry.prototype.setAction=CMenuEntry_setAction;
  3091. var theMenuCnt=1;
  3092. function CMenuItem(_1f6,_1f7,_1f8,_1f9,_1fa,_1fb,skin){
  3093. this.m_label=_1f7;
  3094. if(this.m_label){
  3095. this.m_label=this.m_label.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
  3096. }
  3097. this.setId(escape(_1f7)+theMenuCnt++);
  3098. this.m_bVisible=true;
  3099. this.setAction(_1f8);
  3100. this.setWebContentRoot(_1fb);
  3101. var _1fd=_1f9;
  3102. if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["isTitan"])&&(gCognosViewer.envParams["isTitan"]==true)){
  3103. _1fd="blankIcon";
  3104. }
  3105. this.m_icon=new CIcon(_1fd,"",this.m_webContentRoot);
  3106. this.setParent(_1f6);
  3107. this.m_style=_1fa;
  3108. this.m_observers=new CObserver(this);
  3109. if(typeof skin!="undefined"&&skin!=""){
  3110. this.m_sSkin=skin;
  3111. }else{
  3112. this.m_sSkin=(typeof getPromptSkin!="undefined"?getPromptSkin():this.m_webContentRoot+"/skins/corporate");
  3113. }
  3114. if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
  3115. this.m_parent.add(this);
  3116. }
  3117. this.m_sDropDownArrow="dropdown_arrow_banner.gif";
  3118. };
  3119. CMenuItem.prototype=new CMenuEntry();
  3120. CMenuItem.prototype.setDropDownArrow=function(_1fe){
  3121. this.m_sDropDownArrow=_1fe;
  3122. };
  3123. CMenuItem.prototype.getDropDownArrow=function(){
  3124. return this.m_sDropDownArrow;
  3125. };
  3126. function CMenuItem_setId(id){
  3127. this.m_id=id;
  3128. };
  3129. function CMenuItem_setIcon(_200){
  3130. this.m_icon.setPath(_200);
  3131. };
  3132. function CMenuItem_setToolTip(_201){
  3133. this.m_icon.m_toolTip=_201;
  3134. };
  3135. function CMenuItem_getToolTip(){
  3136. return this.m_icon.m_toolTip;
  3137. };
  3138. function CMenuItem_setAltText(_202){
  3139. this.m_sAltText=_202;
  3140. };
  3141. function CMenuItem_getAltText(){
  3142. if(this.m_sAltText){
  3143. return this.m_sAltText;
  3144. }else{
  3145. return "";
  3146. }
  3147. };
  3148. function CMenuItem_genARIATags(){
  3149. var html="";
  3150. if(this.isInMenu()){
  3151. html+=" role=\"menuitem\" ";
  3152. }else{
  3153. html+=" role=\"button\" ";
  3154. }
  3155. if(this.m_menuType=="dropDown"||this.m_menuType=="cascaded"){
  3156. html+=" aria-haspopup=\"true\" ";
  3157. }
  3158. if(this.getAltText().length==0){
  3159. this.setAltText(this.m_label);
  3160. }
  3161. if((this.getAltText()&&this.getAltText().length>0)||(this.m_icon&&this.m_icon.getToolTip())){
  3162. html+=" aria-labelledby=\""+this.m_id+"label\" ";
  3163. }
  3164. if(!this.isEnabled()){
  3165. html+=" aria-disabled=\"true\" ";
  3166. }
  3167. return html;
  3168. };
  3169. function CMenuItem_genMenuItemAltText(){
  3170. var html="";
  3171. if((this.getAltText()&&this.getAltText().length>0)||(this.m_icon&&this.m_icon.getToolTip())){
  3172. html+="<div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.m_id+"label\">";
  3173. if(this.getAltText()&&this.getAltText().length>0){
  3174. html+=this.getAltText();
  3175. }else{
  3176. html+=this.m_icon.getToolTip();
  3177. }
  3178. html+="</div>";
  3179. }
  3180. return html;
  3181. };
  3182. function CMenuItem_draw(){
  3183. var html="<div>";
  3184. var _206=false,_207=null,_208=null,_209=0;
  3185. if(this.m_menu==null||this.m_menuType=="dropDown"){
  3186. html+="<table ";
  3187. html+=this.genARIATags();
  3188. if(this.isInMenu()){
  3189. if(this.isEnabled()){
  3190. html+=" hideFocus=\"true\" ";
  3191. }
  3192. html+=" tabIndex=\"0\" ";
  3193. }else{
  3194. if(this.isEnabled()){
  3195. html+=" tabIndex=\"0\"";
  3196. }
  3197. }
  3198. html+=" width=\"100%\" ";
  3199. html+="class=\"";
  3200. if(typeof this.getStyle()=="object"){
  3201. if(this.isEnabled()){
  3202. html+=this.getStyle().getNormalState();
  3203. }else{
  3204. html+=this.getStyle().getDisabledState();
  3205. }
  3206. }
  3207. html+="\" id=\"";
  3208. html+=this.getId();
  3209. html+="\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:1px;\"><tr>";
  3210. _206=false;
  3211. if(this.m_icon.getPath()==""&&this.m_parent instanceof CMenu){
  3212. _207=this.m_parent.getNumItems();
  3213. for(_209=0;_209<_207;++_209){
  3214. _208=this.m_parent.get(_209);
  3215. if(typeof _208.getIcon=="function"&&_208.getIcon().getPath()){
  3216. _206=true;
  3217. break;
  3218. }
  3219. }
  3220. }
  3221. if(_206||this.m_icon.getPath()!=""){
  3222. var f="";
  3223. if(getViewerDirection()=="rtl"){
  3224. f=" float: right;";
  3225. }
  3226. html+="<td width=\"16\" style=\"padding-right: 2px; padding-left: 2px;"+f+"\">";
  3227. if(this.m_icon.getPath()!=""){
  3228. html+=this.m_icon.draw();
  3229. }else{
  3230. html+="<img alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" width=\"16\"/>";
  3231. }
  3232. html+="</td>";
  3233. }
  3234. if(getViewerDirection()=="rtl"){
  3235. html+="<td nowrap=\"nowrap\" align=\"right\">";
  3236. }else{
  3237. html+="<td nowrap=\"nowrap\" align=\"left\">";
  3238. }
  3239. html+=this.m_label;
  3240. html+=this.genMenuItemAltText();
  3241. html+="</td>";
  3242. if(this.m_menuType=="dropDown"){
  3243. html+="<td width=\"10%\" align=\"right\" style=\"padding-right: 3px;padding-left: 3px\">";
  3244. html+="<img alt=\"\" src=\""+this.m_sSkin;
  3245. if(this.getDropDownArrow()=="dropdown_arrow_banner.gif"){
  3246. html+="/shared/images/";
  3247. }else{
  3248. html+="/portal/images/";
  3249. }
  3250. html+=this.getDropDownArrow()+"\" WIDTH=\"7\" HEIGHT=\"16\" style=\"vertical-align:middle;\"/>";
  3251. html+="</td>";
  3252. }
  3253. html+="</tr></table></div>";
  3254. }else{
  3255. html+="<table";
  3256. html+=this.genARIATags();
  3257. if(this.isEnabled()||this.isInMenu()){
  3258. html+=" tabIndex=\"0\" hideFocus=\"true\"";
  3259. }
  3260. html+=" width=\"100%\" class=\"";
  3261. if(typeof this.getStyle()=="object"){
  3262. if(this.isEnabled()){
  3263. html+=this.getStyle().getNormalState();
  3264. }else{
  3265. html+=this.getStyle().getDisabledState();
  3266. }
  3267. }
  3268. html+="\" id=\"";
  3269. html+=this.getId();
  3270. html+="\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:1px;\"><tr>";
  3271. html+="<td";
  3272. _206=false;
  3273. if(this.m_icon.getPath()==""){
  3274. _207=this.m_parent.getNumItems();
  3275. for(_209=0;_209<_207;++_209){
  3276. _208=this.m_parent.get(_209);
  3277. if(typeof _208.getIcon=="function"&&_208.getIcon().getPath()){
  3278. _206=true;
  3279. break;
  3280. }
  3281. }
  3282. }
  3283. if(_206||this.m_icon.getPath()!=""){
  3284. html+=" width=\"16\" style=\"padding-right: 2px; padding-left: 2px;\">";
  3285. }else{
  3286. html+=" width=\"1\">";
  3287. }
  3288. html+=this.m_icon.draw();
  3289. html+="</td>";
  3290. if(getViewerDirection()=="rtl"){
  3291. html+="<td nowrap=\"nowrap\" align=\"right\">";
  3292. }else{
  3293. html+="<td nowrap=\"nowrap\" align=\"left\">";
  3294. }
  3295. html+=this.m_label;
  3296. html+=this.genMenuItemAltText();
  3297. html+="</td>";
  3298. if(getViewerDirection()=="rtl"){
  3299. html+="<td width=\"10%\" align=\"left\">";
  3300. html+="<img style=\"vertical-align:middle;\" alt=\"\" src=\""+this.m_sSkin+"/viewer/images/menu_expand_rtl.gif\" WIDTH=\"13\" HEIGHT=\"13\"/>";
  3301. }else{
  3302. html+="<td width=\"10%\" align=\"right\">";
  3303. html+="<img style=\"vertical-align:middle;\" alt=\"\" src=\""+this.m_sSkin+"/viewer/images/menu_expand.gif\" WIDTH=\"13\" HEIGHT=\"13\"/>";
  3304. }
  3305. html+="</td>";
  3306. html+="</tr></table>";
  3307. html+="</div>";
  3308. }
  3309. return html;
  3310. };
  3311. function CMenuItem_onmouseover(evt){
  3312. evt=(evt)?evt:((event)?event:null);
  3313. var _20c=null;
  3314. if(typeof this.menuItem!="undefined"){
  3315. _20c=this.menuItem;
  3316. }else{
  3317. if(this instanceof CMenuItem){
  3318. _20c=this;
  3319. }
  3320. }
  3321. if(_20c==null||!(_20c instanceof CMenuItem)||!_20c.isEnabled()){
  3322. return;
  3323. }
  3324. var menu=_20c.getMenu();
  3325. if(typeof _20c.getStyle()=="object"&&(menu!=null||typeof _20c.getIcon().getPath()!="undefined")){
  3326. this.className=_20c.getStyle().getRolloverState();
  3327. }
  3328. if(menu!=null){
  3329. var _20e=0;
  3330. var _20f=0;
  3331. if(typeof window.innerWidth!="undefined"){
  3332. _20e=window.innerWidth;
  3333. }else{
  3334. _20e=document.body.clientWidth;
  3335. }
  3336. if(typeof window.innerHeight!="undefined"){
  3337. _20f=window.innerHeight;
  3338. }else{
  3339. _20f=document.body.clientHeight;
  3340. }
  3341. if(_20c.getMenuType()=="cascaded"){
  3342. if(menu.isVisible()==false){
  3343. menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
  3344. menu.draw();
  3345. menu.show();
  3346. }
  3347. }else{
  3348. if(_20c.getMenuType()=="dropDown"){
  3349. var _210=_20c.getParent();
  3350. var _211=_210.getNumItems();
  3351. for(var i=0;i<_211;++i){
  3352. var _213=_210.get(i);
  3353. if(_213!=_20c&&typeof _213.getMenu=="function"&&_213.getMenu()&&_213.getMenu().isVisible()){
  3354. menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
  3355. menu.draw();
  3356. menu.show();
  3357. break;
  3358. }
  3359. }
  3360. }
  3361. }
  3362. }
  3363. if(_20c.getParent()!=null&&typeof _20c.getParent().onmouseover=="function"){
  3364. _20c.getParent().onmouseover(evt);
  3365. }
  3366. _20c.getObservers().notify(CMenuItem_onmouseover);
  3367. };
  3368. function CMenuItem_onfocus(evt){
  3369. evt=(evt)?evt:((event)?event:null);
  3370. var _215=null;
  3371. if(typeof this.menuItem!="undefined"){
  3372. _215=this.menuItem;
  3373. }else{
  3374. if(this instanceof CMenuItem){
  3375. _215=this;
  3376. }
  3377. }
  3378. if(_215==null||!(_215 instanceof CMenuItem)||!_215.isEnabled()){
  3379. return;
  3380. }
  3381. if(typeof _215.getStyle()=="object"){
  3382. this.className=_215.getStyle().getRolloverState();
  3383. }
  3384. if(_215.getParent()!=null&&typeof _215.getParent().onmouseover=="function"){
  3385. _215.getParent().onmouseover(evt);
  3386. }
  3387. _215.getObservers().notify(CMenuItem_onfocus);
  3388. };
  3389. function CMenuItem_onmouseout(evt){
  3390. evt=(evt)?evt:((event)?event:null);
  3391. var _217=null;
  3392. if(typeof this.menuItem!="undefined"){
  3393. _217=this.menuItem;
  3394. }else{
  3395. if(this instanceof CMenuItem){
  3396. _217=this;
  3397. }
  3398. }
  3399. if(_217==null||!(_217 instanceof CMenuItem)||!_217.isEnabled()){
  3400. return;
  3401. }
  3402. if(typeof _217.getStyle()=="object"){
  3403. this.className=_217.getStyle().getNormalState();
  3404. }
  3405. if(_217.getParent()!=null&&typeof _217.getParent().onmouseout=="function"){
  3406. _217.getParent().onmouseout(evt);
  3407. }
  3408. _217.getObservers().notify(CMenuItem_onmouseout);
  3409. };
  3410. function CMenuItem_onclick(evt){
  3411. evt=(evt)?evt:((event)?event:null);
  3412. if(evt!=null){
  3413. evt.cancelBubble=true;
  3414. }
  3415. return false;
  3416. };
  3417. function CMenuItem_onmouseup(evt){
  3418. evt=(evt)?evt:((event)?event:null);
  3419. var _21a=null;
  3420. if(typeof this.menuItem!="undefined"){
  3421. _21a=this.menuItem;
  3422. }else{
  3423. if(this instanceof CMenuItem){
  3424. _21a=this;
  3425. }
  3426. }
  3427. if(_21a!=null&&_21a instanceof CMenuItem){
  3428. if(!_21a.isEnabled()){
  3429. return;
  3430. }
  3431. if(_21a.getMenu()!=null){
  3432. if(_21a.getMenuType()=="cascaded"){
  3433. }else{
  3434. if(_21a.getMenuType()=="dropDown"){
  3435. var menu=_21a.getMenu();
  3436. if(menu.isVisible()==false){
  3437. if(!this.document&&!this.ownerDocument){
  3438. return;
  3439. }
  3440. menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
  3441. menu.draw();
  3442. menu.show();
  3443. }else{
  3444. menu.remove();
  3445. }
  3446. }
  3447. }
  3448. }else{
  3449. eval(_21a.getAction());
  3450. }
  3451. if(typeof getReportFrame!="undefined"&&typeof getReportFrame().clearTextSelection!="undefined"){
  3452. getReportFrame().clearTextSelection();
  3453. }else{
  3454. if(typeof clearTextSelection!="undefined"){
  3455. clearTextSelection();
  3456. }
  3457. }
  3458. if(_21a.getMenuType()!="cascaded"){
  3459. if(_21a.getParent()!=null&&typeof _21a.getParent().onmouseup=="function"){
  3460. _21a.getParent().onmouseup(evt);
  3461. }
  3462. _21a.getObservers().notify(CMenuItem_onmouseup);
  3463. }
  3464. if(typeof this.menuItem!="undefined"&&_21a.getMenu()!=null&&_21a.getMenuType()=="cascaded"&&_21a.getAction()!=""){
  3465. eval(_21a.getAction());
  3466. }
  3467. }
  3468. if(evt!=null){
  3469. evt.cancelBubble=true;
  3470. }
  3471. return false;
  3472. };
  3473. function CMenuItem_onkeydown(evt){
  3474. var _21d=null;
  3475. if(typeof this.menuItem!="undefined"){
  3476. _21d=this.menuItem;
  3477. }else{
  3478. if(this instanceof CMenuItem){
  3479. _21d=this;
  3480. }
  3481. }
  3482. if(_21d==null||!(_21d instanceof CMenuItem)){
  3483. return;
  3484. }
  3485. return CMenuEntry_onkeydown.call(_21d,evt);
  3486. };
  3487. function CMenuItem_onkeypress(evt){
  3488. evt=(evt)?evt:((event)?event:null);
  3489. var _21f=null;
  3490. if(typeof this.menuItem!="undefined"){
  3491. _21f=this.menuItem;
  3492. }else{
  3493. if(this instanceof CMenuItem){
  3494. _21f=this;
  3495. }
  3496. }
  3497. if(_21f!=null&&_21f instanceof CMenuItem){
  3498. return CMenuEntry_onkeypress.call(_21f,evt);
  3499. }
  3500. };
  3501. function CMenuItem_createDropDownMenu(_220){
  3502. this.m_menu=new CMenu("dropDownMenu_"+this.getId(),_220,this.m_webContentRoot);
  3503. this.m_menu.setParent(this);
  3504. this.m_menuType="dropDown";
  3505. return this.m_menu;
  3506. };
  3507. function CMenuItem_createCascadedMenu(_221){
  3508. this.m_menu=new CMenu("cascadedMenu_"+this.getId(),_221,this.m_webContentRoot);
  3509. this.m_menu.setParent(this);
  3510. this.m_originalMenuType=this.m_menuType;
  3511. this.m_menuType="cascaded";
  3512. return this.m_menu;
  3513. };
  3514. function CMenuItem_clearCascadedMenu(){
  3515. if(this.m_menu){
  3516. this.m_menu.remove();
  3517. this.m_menu=null;
  3518. }
  3519. if(this.m_originalMenuType){
  3520. this.m_menuType=this.m_originalMenuType;
  3521. }
  3522. };
  3523. function CMenuItem_addOwnerDrawControl(_222,type){
  3524. this.m_menu=_222;
  3525. this.m_menuType=type;
  3526. if(typeof _222.setParent!="undefined"){
  3527. this.m_menu.setParent(this);
  3528. }
  3529. };
  3530. function CMenuItem_attachEvents(){
  3531. if(typeof this.getParent().getHTMLContainer!="function"){
  3532. return;
  3533. }
  3534. var _224=this.getParent().getHTMLContainer();
  3535. if(_224==null){
  3536. return;
  3537. }
  3538. var _225=eval(_224.document?_224.document.getElementById(this.getId()):_224.ownerDocument.getElementById(this.getId()));
  3539. if(_225==null){
  3540. return;
  3541. }
  3542. _225.onmouseover=this.onmouseover;
  3543. _225.onmouseout=this.onmouseout;
  3544. _225.onmouseup=this.onmouseup;
  3545. _225.onkeypress=this.onkeypress;
  3546. _225.onfocus=this.onfocus;
  3547. _225.onblur=this.onblur;
  3548. _225.onkeydown=this.onkeydown;
  3549. _225.onclick=this.onclick;
  3550. _225.menuItem=eval(this);
  3551. };
  3552. function CMenuItem_remove(){
  3553. };
  3554. function CMenuItem_getStyle(){
  3555. return this.m_style;
  3556. };
  3557. function CMenuItem_setStyle(_226){
  3558. this.m_style=_226;
  3559. };
  3560. function CMenuItem_hide(){
  3561. this.m_bVisible=false;
  3562. };
  3563. function CMenuItem_show(){
  3564. this.m_bVisible=true;
  3565. };
  3566. function CMenuItem_enable(){
  3567. if(typeof this.getStyle()=="object"){
  3568. if(typeof this.getParent().getHTMLContainer=="function"){
  3569. var _227=this.getParent().getHTMLContainer();
  3570. if(_227!=null){
  3571. var _228=_227.document?_227.document.getElementById(this.getId()):_227.ownerDocument.getElementById(this.getId());
  3572. if(_228!=null){
  3573. _228.className=this.getStyle().getNormalState();
  3574. }
  3575. }
  3576. }
  3577. this.m_bEnabled=true;
  3578. this.getIcon().enable();
  3579. this.updateHTML();
  3580. }
  3581. };
  3582. function CMenuItem_updateHTML(){
  3583. if(typeof this.getStyle()=="object"){
  3584. if(typeof this.getParent().getHTMLContainer=="function"){
  3585. var _229=this.getParent().getHTMLContainer();
  3586. if(_229!=null){
  3587. var _22a=_229.document?_229.document.getElementById(this.getId()):_229.ownerDocument.getElementById(this.getId());
  3588. if(_22a!=null){
  3589. var _22b=_22a.getElementsByTagName("img");
  3590. if(typeof _22b!="undefined"){
  3591. if(this.getIcon()){
  3592. if(this.getIcon().isEnabled()){
  3593. _22b[0].src=this.getIcon().getPath();
  3594. }else{
  3595. _22b[0].src=this.getIcon().getDisabledImagePath();
  3596. }
  3597. }
  3598. if(this.getToolTip()){
  3599. _22a.title=this.getToolTip();
  3600. _22b[0].title=this.getToolTip();
  3601. }
  3602. }
  3603. if(this.isEnabled()){
  3604. if(_22a.getAttribute("aria-disabled")){
  3605. _22a.removeAttribute("aria-disabled");
  3606. }
  3607. }else{
  3608. _22a.setAttribute("aria-disabled","true");
  3609. }
  3610. var _22c;
  3611. if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
  3612. _22a.tabIndex=0;
  3613. if(this.getMenu()!=null&&!this.m_bHideDropDown&&_22a.nextSibling){
  3614. _22a.nextSibling.tabIndex=0;
  3615. _22a.nextSibling.title=this.getToolTip();
  3616. _22c=_22a.nextSibling.getElementsByTagName("img");
  3617. if(_22c!=null){
  3618. _22c[0].title=this.getToolTip();
  3619. }
  3620. }
  3621. }else{
  3622. if(_22a.tabIndex!="undefined"){
  3623. _22a.removeAttribute("tabIndex");
  3624. if(this.getMenu()!=null){
  3625. _22a.nextSibling.removeAttribute("tabIndex");
  3626. _22a.nextSibling.title=this.getToolTip();
  3627. _22c=_22a.nextSibling.getElementsByTagName("img");
  3628. if(_22c!=null){
  3629. _22c[0].title=this.getToolTip();
  3630. }
  3631. }
  3632. }
  3633. }
  3634. _22a.className=this.getStyle().getActiveState();
  3635. }
  3636. }
  3637. }
  3638. }
  3639. };
  3640. function CMenuItem_disable(){
  3641. if(typeof this.getStyle()=="object"){
  3642. if(typeof this.getParent().getHTMLContainer=="function"){
  3643. var _22d=this.getParent().getHTMLContainer();
  3644. if(_22d!=null){
  3645. var _22e=_22d.document?_22d.document.getElementById(this.getId()):_22d.ownerDocument.getElementById(this.getId());
  3646. if(_22e!=null){
  3647. _22e.className=this.getStyle().getDisabledState();
  3648. }
  3649. }
  3650. }
  3651. this.m_bEnabled=false;
  3652. this.getIcon().disable();
  3653. this.updateHTML();
  3654. }
  3655. };
  3656. function CMenuItem_isVisible(){
  3657. return this.m_bVisible;
  3658. };
  3659. function CMenuItem_getIcon(){
  3660. return this.m_icon;
  3661. };
  3662. function CMenuItem_getLabel(){
  3663. return this.m_label;
  3664. };
  3665. function CMenuItem_setFocus(){
  3666. var e=document.getElementById(this.m_id);
  3667. if(e){
  3668. e.focus();
  3669. return true;
  3670. }
  3671. return false;
  3672. };
  3673. CMenuItem.prototype.draw=CMenuItem_draw;
  3674. CMenuItem.prototype.onmouseover=CMenuItem_onmouseover;
  3675. CMenuItem.prototype.onmouseout=CMenuItem_onmouseout;
  3676. CMenuItem.prototype.onmouseup=CMenuItem_onmouseup;
  3677. CMenuItem.prototype.onkeypress=CMenuItem_onkeypress;
  3678. CMenuItem.prototype.onkeydown=CMenuItem_onkeydown;
  3679. CMenuItem.prototype.onfocus=CMenuItem_onfocus;
  3680. CMenuItem.prototype.onblur=CMenuItem_onmouseout;
  3681. CMenuItem.prototype.onclick=CMenuItem_onclick;
  3682. CMenuItem.prototype.attachEvents=CMenuItem_attachEvents;
  3683. CMenuItem.prototype.remove=CMenuItem_remove;
  3684. CMenuItem.prototype.setStyle=CMenuItem_setStyle;
  3685. CMenuItem.prototype.getStyle=CMenuItem_getStyle;
  3686. CMenuItem.prototype.createDropDownMenu=CMenuItem_createDropDownMenu;
  3687. CMenuItem.prototype.createCascadedMenu=CMenuItem_createCascadedMenu;
  3688. CMenuItem.prototype.clearCascadedMenu=CMenuItem_clearCascadedMenu;
  3689. CMenuItem.prototype.addOwnerDrawControl=CMenuItem_addOwnerDrawControl;
  3690. CMenuItem.prototype.isVisible=CMenuItem_isVisible;
  3691. CMenuItem.prototype.hide=CMenuItem_hide;
  3692. CMenuItem.prototype.show=CMenuItem_show;
  3693. CMenuItem.prototype.enable=CMenuItem_enable;
  3694. CMenuItem.prototype.disable=CMenuItem_disable;
  3695. CMenuItem.prototype.getIcon=CMenuItem_getIcon;
  3696. CMenuItem.prototype.setIcon=CMenuItem_setIcon;
  3697. CMenuItem.prototype.getLabel=CMenuItem_getLabel;
  3698. CMenuItem.prototype.setFocus=CMenuItem_setFocus;
  3699. CMenuItem.prototype.setToolTip=CMenuItem_setToolTip;
  3700. CMenuItem.prototype.getToolTip=CMenuItem_getToolTip;
  3701. CMenuItem.prototype.updateHTML=CMenuItem_updateHTML;
  3702. CMenuItem.prototype.update=new Function("return true");
  3703. CMenuItem.prototype.genARIATags=CMenuItem_genARIATags;
  3704. CMenuItem.prototype.setAltText=CMenuItem_setAltText;
  3705. CMenuItem.prototype.getAltText=CMenuItem_getAltText;
  3706. CMenuItem.prototype.genMenuItemAltText=CMenuItem_genMenuItemAltText;
  3707. function CSeperator(type,size,_232,_233){
  3708. this.m_type=type;
  3709. this.m_size=size;
  3710. this.m_bVisible=true;
  3711. if(_232!==null&&typeof _232=="object"){
  3712. this.m_style=new CUIStyle(_232.getNormalState(),_232.getRolloverState(),_232.getDepressedState(),_232.getDepressedRolloverState(),_232.getDisabledState());
  3713. }else{
  3714. this.m_style=new CUIStyle("","","","","");
  3715. }
  3716. if(typeof _233!="undefined"&&_233!=""){
  3717. this.m_webContentRoot=_233;
  3718. }else{
  3719. this.m_webContentRoot="..";
  3720. }
  3721. this.m_toolbarSeperatorClass="bannerDivider";
  3722. };
  3723. CSeperator.prototype.setToolbarSeperatorClass=function(_234){
  3724. this.m_toolbarSeperatorClass=_234;
  3725. };
  3726. CSeperator.prototype.getToolbarSeperatorClass=function(){
  3727. return this.m_toolbarSeperatorClass;
  3728. };
  3729. CSeperator.prototype.setWebContentRoot=function(_235){
  3730. this.m_webContentRoot=_235;
  3731. };
  3732. function CSeperator_draw(){
  3733. if(this.m_style==""){
  3734. return;
  3735. }
  3736. var html="";
  3737. switch(this.m_type){
  3738. case "horizonal_blank":
  3739. html+="<td style=\"padding:0px;\"><img border=\"0\" alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" height=\"1\" width=\"";
  3740. html+=this.m_size;
  3741. html+="\"/></td>";
  3742. break;
  3743. case "horizontal_line":
  3744. html+="<div class=\""+this.getStyle().getActiveState()+"\"></div>";
  3745. break;
  3746. case "vertical_blank":
  3747. html+="<tr>";
  3748. html+="<td style=\"padding:0px;\"><img border=\"0\" alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" width=\"1\" height=\"";
  3749. html+=this.m_size;
  3750. html+="\"/></td></tr>";
  3751. break;
  3752. case "vertical_line":
  3753. html+="<td class=\"toolbarVerticalSeperator\"><div class=\""+this.getToolbarSeperatorClass()+"\"/></td>";
  3754. break;
  3755. }
  3756. return html;
  3757. };
  3758. function CSeperator_getSize(){
  3759. return this.m_size;
  3760. };
  3761. function CSeperator_setSize(size){
  3762. this.m_size=size;
  3763. };
  3764. function CSeperator_setStyle(_238){
  3765. this.m_style=_238;
  3766. };
  3767. function CSeperator_getStyle(){
  3768. return this.m_style;
  3769. };
  3770. function CSeperator_setType(type){
  3771. this.m_type=type;
  3772. };
  3773. function CSeperator_getType(){
  3774. return this.m_type;
  3775. };
  3776. function CSeperator_hide(){
  3777. this.m_bVisible=false;
  3778. };
  3779. function CSeperator_show(){
  3780. this.m_bVisible=true;
  3781. };
  3782. function CSeperator_isVisible(){
  3783. return this.m_bVisible;
  3784. };
  3785. CSeperator.prototype.draw=CSeperator_draw;
  3786. CSeperator.prototype.setSize=CSeperator_setSize;
  3787. CSeperator.prototype.getSize=CSeperator_getSize;
  3788. CSeperator.prototype.setStyle=CSeperator_setStyle;
  3789. CSeperator.prototype.getStyle=CSeperator_getStyle;
  3790. CSeperator.prototype.getType=CSeperator_getType;
  3791. CSeperator.prototype.setType=CSeperator_setType;
  3792. CSeperator.prototype.isVisible=CSeperator_isVisible;
  3793. CSeperator.prototype.show=CSeperator_show;
  3794. CSeperator.prototype.hide=CSeperator_hide;
  3795. function CInfoPanel(size,_23b,id){
  3796. this.m_size=size;
  3797. this.m_bVisible=true;
  3798. this.m_properties=[];
  3799. this.setId(id);
  3800. this.m_observers=new CObserver(this);
  3801. this.setWebContentRoot(_23b);
  3802. };
  3803. CInfoPanel.prototype=new CMenuEntry();
  3804. CInfoPanel.prototype.setWebContentRoot=function(_23d){
  3805. this.m_webContentRoot=_23d;
  3806. };
  3807. function CInfoPanel_addCheckedProperty(name,_23f){
  3808. var o={"name":name,"value":_23f,"type":"checkBox","spacer":false};
  3809. this.m_properties[this.m_properties.length]=o;
  3810. };
  3811. function CInfoPanel_addProperty(name,_242){
  3812. var o={"name":name,"value":_242,"spacer":false};
  3813. this.m_properties[this.m_properties.length]=o;
  3814. };
  3815. function CInfoPanel_addSpacer(_244){
  3816. var o={"spacer":true,"height":_244};
  3817. this.m_properties[this.m_properties.length]=o;
  3818. };
  3819. function CInfoPanel_draw(){
  3820. var i=0;
  3821. var html="<table CELLPADDING=\"0\" CELLSPACING=\"0\" role=\"presentation\">";
  3822. if(this.m_properties.length>0){
  3823. var _248="<tr><td>";
  3824. var _249="";
  3825. for(i=0;i<this.m_properties.length;i++){
  3826. if(this.m_properties[i].spacer){
  3827. }else{
  3828. if(this.m_properties[i].type!=null&&this.m_properties[i].type=="checkBox"){
  3829. _248+="<tr><td><span><span class=\"formText\">";
  3830. if(this.m_properties[i].value=="true"){
  3831. _248+="<input type=\"checkbox\" disabled=\"true\" checked>";
  3832. }else{
  3833. _248+="<input type=\"checkbox\" disabled=\"true\">";
  3834. }
  3835. _248+=this.m_properties[i].name;
  3836. _248+="</span>&nbsp;</input>";
  3837. _248+="<span></td></tr>";
  3838. }else{
  3839. _248+="<tr><td><span><span class=\"menuItem_normal\" style=\"font-weight:bold\">";
  3840. _248+=this.m_properties[i].name;
  3841. _248+="</span>&nbsp;<span class=\"menuItem_normal\">";
  3842. _248+=this.m_properties[i].value;
  3843. _248+="</span></span></td></tr>";
  3844. }
  3845. _249+=this.m_properties[i].name+" "+this.m_properties[i].value+", ";
  3846. }
  3847. }
  3848. var id=this.getId()?"id=\""+this.getId()+"\" ":"";
  3849. var _24b="<table summary=\""+_249+"\" role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" "+id+" tabindex=\"0\" style=\"margin-bottom:1px;";
  3850. if(typeof this.m_size!="undefined"&&this.m_size!=""){
  3851. _24b+="width:"+this.m_size;
  3852. }
  3853. _24b+="\"\t>";
  3854. html+=_24b+_248+"</table></td></tr>";
  3855. }
  3856. html+="</table>";
  3857. return html;
  3858. };
  3859. function CInfoPanel_getSize(){
  3860. return this.m_size;
  3861. };
  3862. function CInfoPanel_setSize(size){
  3863. this.m_size=size;
  3864. };
  3865. function CInfoPanel_hide(){
  3866. this.m_bVisible=false;
  3867. };
  3868. function CInfoPanel_show(){
  3869. this.m_bVisible=true;
  3870. };
  3871. function CInfoPanel_isVisible(){
  3872. return this.m_bVisible;
  3873. };
  3874. function CInfoPanel_isEnabled(){
  3875. return true;
  3876. };
  3877. function CInfoPanel_onkeydown(evt){
  3878. var _24e=null;
  3879. if(typeof this.infoPanel!="undefined"){
  3880. _24e=this.infoPanel;
  3881. }else{
  3882. if(this instanceof CInfoPanel){
  3883. _24e=this;
  3884. }
  3885. }
  3886. if(_24e==null||!(_24e instanceof CInfoPanel)){
  3887. return;
  3888. }
  3889. return CMenuEntry_onkeydown.call(_24e,evt);
  3890. };
  3891. function CInfoPanel_onkeypress(evt){
  3892. evt=(evt)?evt:((event)?event:null);
  3893. var _250=null;
  3894. if(typeof this.infoPanel!="undefined"){
  3895. _250=this.infoPanel;
  3896. }else{
  3897. if(this instanceof CInfoPanel){
  3898. _250=this;
  3899. }
  3900. }
  3901. if(_250!=null&&_250 instanceof CInfoPanel){
  3902. return CMenuEntry_onkeypress.call(_250,evt);
  3903. }
  3904. };
  3905. function CInfoPanel_setFocus(){
  3906. if(this.getId()){
  3907. document.getElementById(this.getId()).focus();
  3908. }
  3909. };
  3910. function CInfoPanel_attachEvents(){
  3911. if(typeof this.getParent().getHTMLContainer!="function"){
  3912. return;
  3913. }
  3914. var _251=this.getParent().getHTMLContainer();
  3915. if(_251==null){
  3916. return;
  3917. }
  3918. var _252=eval(_251.document?_251.document.getElementById(this.getId()):_251.ownerDocument.getElementById(this.getId()));
  3919. if(_252==null){
  3920. return;
  3921. }
  3922. _252.onkeypress=this.onkeypress;
  3923. _252.onkeydown=this.onkeydown;
  3924. _252.infoPanel=eval(this);
  3925. };
  3926. CInfoPanel.prototype.draw=CInfoPanel_draw;
  3927. CInfoPanel.prototype.onkeypress=CInfoPanel_onkeypress;
  3928. CInfoPanel.prototype.onkeydown=CInfoPanel_onkeydown;
  3929. CInfoPanel.prototype.addProperty=CInfoPanel_addProperty;
  3930. CInfoPanel.prototype.addCheckedProperty=CInfoPanel_addCheckedProperty;
  3931. CInfoPanel.prototype.addSpacer=CInfoPanel_addSpacer;
  3932. CInfoPanel.prototype.setSize=CInfoPanel_setSize;
  3933. CInfoPanel.prototype.getSize=CInfoPanel_getSize;
  3934. CInfoPanel.prototype.isVisible=CInfoPanel_isVisible;
  3935. CInfoPanel.prototype.show=CInfoPanel_show;
  3936. CInfoPanel.prototype.hide=CInfoPanel_hide;
  3937. CInfoPanel.prototype.isEnabled=CInfoPanel_isEnabled;
  3938. CInfoPanel.prototype.setFocus=CInfoPanel_setFocus;
  3939. CInfoPanel.prototype.attachEvents=CInfoPanel_attachEvents;
  3940. var g_ownerDocument=null;
  3941. function CMenu(id,_254,_255){
  3942. this.m_htmlContainer=document.body;
  3943. this.m_bVisible=false;
  3944. this.m_id=id;
  3945. this.m_htmlDivElement=null;
  3946. this.m_parent=null;
  3947. this.m_menuItems=[];
  3948. this.m_style=_254;
  3949. this.m_callback=null;
  3950. this.m_observers=new CObserver(this);
  3951. this.m_bForceCallback=false;
  3952. this.m_loadingMenuItem=false;
  3953. this.m_oCV=null;
  3954. if(typeof _255!="undefined"&&_255!=""){
  3955. this.m_webContentRoot=_255;
  3956. }else{
  3957. this.m_webContentRoot="..";
  3958. }
  3959. };
  3960. function CMenu_setHTMLContainer(_256){
  3961. this.m_htmlContainer=_256;
  3962. g_ownerDocument=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument;
  3963. };
  3964. function CMenu_getHTMLContainer(){
  3965. return this.m_htmlContainer;
  3966. };
  3967. function CMenu_setParent(_257){
  3968. this.m_parent=_257;
  3969. };
  3970. function CMenu_getParent(){
  3971. return this.m_parent;
  3972. };
  3973. function CMenu_getId(){
  3974. return this.m_id;
  3975. };
  3976. function CMenu_getHTMLDiv(){
  3977. return this.m_htmlDivElement;
  3978. };
  3979. function CMenu_create(){
  3980. var _258=this.m_htmlContainer.document?this.m_htmlContainer.document.createElement("div"):this.m_htmlContainer.ownerDocument.createElement("div");
  3981. if(typeof this.getStyle()=="object"){
  3982. _258.className=this.getStyle().getNormalState();
  3983. }
  3984. _258.style.display="none";
  3985. _258.style.visibility="hidden";
  3986. _258.style.position="absolute";
  3987. _258.style.left="0px";
  3988. _258.style.top="0px";
  3989. _258.id=this.m_id;
  3990. _258.setAttribute("role","region");
  3991. if(window.RV_RES){
  3992. _258.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_DYNAMIC_MENU);
  3993. }
  3994. this.m_htmlContainer.appendChild(_258);
  3995. this.m_htmlDivElement=_258;
  3996. };
  3997. function CMenu_setAltText(_259){
  3998. this.m_altText=_259;
  3999. };
  4000. function CMenu_getAltText(){
  4001. if(this.m_altText){
  4002. return this.m_altText;
  4003. }else{
  4004. return "";
  4005. }
  4006. };
  4007. function CMenu_genARIATags(){
  4008. var html=" role=\"menu\"";
  4009. if(this.getAltText()&&this.getAltText().length>0){
  4010. html+=" aria-labelledby=\""+this.m_id+"label\" ";
  4011. }else{
  4012. if(window.RV_RES){
  4013. html+=" aria-label=\""+RV_RES.IDS_JS_A11Y_DYNAMIC_MENU+"\" ";
  4014. }
  4015. }
  4016. return html;
  4017. };
  4018. function CMenu_genMenuAltText(){
  4019. var html="";
  4020. if(this.getAltText()&&this.getAltText().length>0){
  4021. html+="<tr><td><div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.m_id+"label\">"+this.getAltText()+"</div></td></tr>";
  4022. }
  4023. return html;
  4024. };
  4025. function CMenu_draw(){
  4026. if(this.m_htmlContainer==null){
  4027. return;
  4028. }
  4029. if(this.m_htmlDivElement==null){
  4030. this.create();
  4031. }
  4032. var html="";
  4033. if(this.m_menuItems.length==0||this.m_bForceCallback==true){
  4034. this.setForceCallback(false);
  4035. if(this.m_callback!=null){
  4036. this.setLoadingMenuItem(true);
  4037. var menu=this;
  4038. var _25e=function(){
  4039. if(menu&&menu.executeCallback){
  4040. menu.executeCallback();
  4041. }
  4042. };
  4043. setTimeout(_25e,1000);
  4044. html="<table class=\"menuItem_normal\" CELLPADDING=\"0\" CELLSPACING=\"0\" tabindex=\"0\" hidefocus=\"true\"";
  4045. html+=this.genARIATags();
  4046. html+=">";
  4047. html+=this.genMenuAltText();
  4048. html+="<tr>";
  4049. var _25f="";
  4050. if(this.m_oCV&&RV_RES.GOTO_LOADING){
  4051. _25f=RV_RES.GOTO_LOADING;
  4052. }else{
  4053. if(typeof gUIFrameWorkMenuLoadingMessage!="undefined"){
  4054. _25f=gUIFrameWorkMenuLoadingMessage;
  4055. }else{
  4056. _25f="...";
  4057. }
  4058. }
  4059. html+="<td>";
  4060. html+="<img style=\"vertical-align:middle;\" alt=\""+_25f+"\" width=\"16\" height=\"16\" src=\""+this.m_webContentRoot+"/common/images/tv_loading.gif\"/>";
  4061. html+="</td>";
  4062. html+="<td nowrap=\"nowrap\" align=\"left\">";
  4063. html+=_25f;
  4064. html+="</td>";
  4065. html+="</tr>";
  4066. html+="</table>";
  4067. }
  4068. }else{
  4069. this.setLoadingMenuItem(false);
  4070. var i=0;
  4071. html="<table CELLPADDING=\"0\" CELLSPACING=\"0\" tabindex=\"0\" style=\"outline: none;\" hidefocus=\"true\"";
  4072. html+=this.genARIATags();
  4073. html+=">";
  4074. html+=this.genMenuAltText();
  4075. var _261=false;
  4076. for(i=0;i<this.m_menuItems.length;i++){
  4077. if(this.m_menuItems[i].isVisible()){
  4078. _261=true;
  4079. html+="<tr><td>";
  4080. html+=this.m_menuItems[i].draw();
  4081. html+="</td></tr>";
  4082. }
  4083. }
  4084. if(!_261){
  4085. this.remove();
  4086. return;
  4087. }
  4088. html+="</table>";
  4089. }
  4090. try{
  4091. this.m_htmlDivElement.innerHTML=html;
  4092. this.attachEvents();
  4093. }
  4094. catch(e){
  4095. }
  4096. this.updateCoords();
  4097. var _262="uiFrameworkHiddenIframe"+this.m_id;
  4098. var _263=((!isIE())&&(document.getElementById))?true:false;
  4099. setTimeout("updateIframeCoords(\""+_262+"\", \""+this.m_htmlDivElement.id+"\", "+_263+")",50);
  4100. if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["cv.responseFormat"])&&(gCognosViewer.envParams["cv.responseFormat"]=="fragment")){
  4101. AdjustPortalFont(this.m_htmlDivElement);
  4102. }
  4103. };
  4104. function CMenu_setLoadingMenuItem(_264){
  4105. this.m_loadingMenuItem=_264;
  4106. };
  4107. function CMenu_getLoadingMenuItem(){
  4108. return this.m_loadingMenuItem;
  4109. };
  4110. function CMenu_getScrollingPosition(){
  4111. var _265={"x":0,"y":0};
  4112. if(typeof window.pageYOffset!="undefined"){
  4113. _265={"x":window.pageXOffset,"y":window.pageYOffset};
  4114. }else{
  4115. if((typeof document.documentElement.scrollTop!="undefined")&&(document.documentElement.scrollTop>0||typeof document.body.scrollTop=="undefined"||document.body.scrollTop==document.documentElement.scrollTop)){
  4116. _265={"x":document.documentElement.scrollLeft,"y":document.documentElement.scrollTop};
  4117. }else{
  4118. if(typeof document.body.scrollTop!="undefined"){
  4119. _265={"x":document.body.scrollLeft,"y":document.body.scrollTop};
  4120. }
  4121. }
  4122. }
  4123. return _265;
  4124. };
  4125. function AdjustPortalFont(div){
  4126. var _267=fragments;
  4127. if(_267){
  4128. div.className+=" PortalFontFix";
  4129. var _268=null;
  4130. for(var frag in _267){
  4131. if(frag.indexOf("rvCanvas")>-1){
  4132. _268=$(_267[frag].div);
  4133. if(_268!=null){
  4134. break;
  4135. }
  4136. }
  4137. }
  4138. if(_268!=null){
  4139. div.style.fontSize=xGetComputedStyle(_268,"font-size");
  4140. }
  4141. }
  4142. };
  4143. function CMenu_updateCoords(){
  4144. var _26a=this.getParent();
  4145. var mnu=this.m_htmlDivElement;
  4146. if(mnu!=null){
  4147. var _26c=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument;
  4148. var _26d=mnu.style.visibility;
  4149. var _26e=mnu.style.display;
  4150. mnu.style.visibility="hidden";
  4151. mnu.style.display="block";
  4152. if(mnu.firstChild!=null){
  4153. mnu.style.width=mnu.firstChild.offsetWidth;
  4154. }
  4155. var x=0,y=0;
  4156. var db=mnu.parentNode;
  4157. var _272=db.clientWidth;
  4158. var _273=db.clientHeight;
  4159. var _274=CMenu_getScrollingPosition();
  4160. var _275=_274.x;
  4161. var _276=_274.y;
  4162. if(_26a==null){
  4163. x=mnu.style.left;
  4164. y=mnu.style.top;
  4165. if(x.substr(x.length-2,2)=="px"){
  4166. x=parseInt(x.substring(0,x.length-2),10);
  4167. y=parseInt(y.substring(0,y.length-2),10);
  4168. }
  4169. if(y+mnu.offsetHeight>=(_273)){
  4170. if(y-mnu.offsetHeight>0){
  4171. y=y+_276-mnu.offsetHeight;
  4172. }else{
  4173. y=Math.max(_273-mnu.offsetHeight,0);
  4174. }
  4175. }else{
  4176. y=y+_276;
  4177. }
  4178. if(x+mnu.offsetWidth>=(_272)){
  4179. if(x-mnu.offsetWidth>0){
  4180. x=x+_275-mnu.offsetWidth;
  4181. }else{
  4182. x=Math.max(_272-mnu.offsetWidth,0);
  4183. }
  4184. }else{
  4185. x=x+_275;
  4186. }
  4187. }else{
  4188. if(!(_26a instanceof CToolbarButton)&&!(_26a instanceof CMenuItem)){
  4189. return;
  4190. }
  4191. if(typeof _26a.getMenuType!="function"){
  4192. return;
  4193. }
  4194. var _277=_26c.getElementById(this.getParent().getId());
  4195. var _278=_26c.getElementById("menu"+this.getParent().getId());
  4196. if(_277==null){
  4197. return;
  4198. }
  4199. var _279=_277;
  4200. if(_26a.getMenuType()=="dropDown"){
  4201. x=0;
  4202. y=_277.offsetHeight;
  4203. while(_279!=null){
  4204. x+=_279.offsetLeft;
  4205. y+=_279.offsetTop;
  4206. _279=_279.offsetParent;
  4207. }
  4208. if(getViewerDirection()=="rtl"){
  4209. var _27a=x-(mnu.offsetWidth-_277.offsetWidth);
  4210. if(_27a>_275){
  4211. x=_27a;
  4212. }
  4213. }
  4214. if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["cv.responseFormat"])&&(gCognosViewer.envParams["cv.responseFormat"]=="fragment")){
  4215. var _27b=_277;
  4216. while((_27b!=document.body)&&(_27b=_27b.parentNode)){
  4217. x-=_27b.scrollLeft||0;
  4218. y-=_27b.scrolltop||0;
  4219. }
  4220. }
  4221. if((x+mnu.offsetWidth)>(_272+_275)){
  4222. x=x+_277.offsetWidth-mnu.offsetWidth;
  4223. if(_278!=null){
  4224. x=x+_278.offsetWidth;
  4225. }
  4226. }
  4227. if(((y+mnu.offsetHeight)>(_273+_276))&&(y-(mnu.offsetHeight+_277.clientHeight)>=0)){
  4228. y-=(mnu.offsetHeight+_277.clientHeight);
  4229. }
  4230. }else{
  4231. if(_26a.getMenuType()=="cascaded"){
  4232. x=_277.offsetWidth;
  4233. while(_279!=null){
  4234. x+=_279.offsetLeft;
  4235. y+=_279.offsetTop;
  4236. _279=_279.offsetParent;
  4237. }
  4238. if(getViewerDirection()=="rtl"){
  4239. var _27a=x-(mnu.offsetWidth+_277.offsetWidth);
  4240. if(_27a>_275){
  4241. x=_27a;
  4242. }
  4243. }
  4244. if((x+mnu.offsetWidth)>(_272+_275)){
  4245. x-=(_277.offsetWidth+mnu.offsetWidth);
  4246. }
  4247. if((y+mnu.offsetHeight)>(_273+_276)){
  4248. y-=(mnu.offsetHeight-_277.clientHeight);
  4249. }
  4250. }
  4251. }
  4252. }
  4253. mnu.style.visibility=_26d;
  4254. mnu.style.display=_26e;
  4255. this.setXCoord(x);
  4256. this.setYCoord(y);
  4257. this.setZIndex(500);
  4258. }
  4259. };
  4260. function CMenu_add(_27c){
  4261. if(typeof _27c.getObservers=="function"&&typeof _27c.getObservers()=="object"){
  4262. _27c.getObservers().attach(this,this.closeSubMenus,_27c.onmouseover);
  4263. _27c.getObservers().attach(this,this.closeAllMenus,_27c.onmouseup);
  4264. _27c.getObservers().attach(this,this.closeSubMenus,_27c.onfocus);
  4265. _27c.getObservers().attach(this,this.closeAllMenus,_27c.onkeypress);
  4266. }
  4267. this.m_menuItems[this.m_menuItems.length]=_27c;
  4268. };
  4269. function CMenu_get(_27d){
  4270. if(_27d>=0&&_27d<this.getNumItems()){
  4271. return this.m_menuItems[_27d];
  4272. }
  4273. return null;
  4274. };
  4275. CMenu.prototype.getItem=function(_27e){
  4276. var sId=_27e;
  4277. if(this.m_oCV){
  4278. sId=this.m_oCV.getId()+_27e;
  4279. }
  4280. for(var _280=0;_280<this.getNumItems();_280++){
  4281. var _281=this.get(_280);
  4282. if(typeof _281.getId=="function"&&_281.getId()==sId){
  4283. return _281;
  4284. }
  4285. }
  4286. };
  4287. function CMenu_getNumItems(){
  4288. return this.m_menuItems.length;
  4289. };
  4290. function CMenu_hide(){
  4291. this.hideHiddenIframe();
  4292. if(this.m_htmlDivElement!=null){
  4293. this.m_htmlDivElement.style.visibility="hidden";
  4294. }
  4295. this.m_bVisible=false;
  4296. var _282=this.getParent();
  4297. if(_282!=null&&typeof _282.setFocus=="function"){
  4298. _282.setFocus();
  4299. }else{
  4300. if(_282!=null&&typeof _282.focus=="function"){
  4301. _282.focus();
  4302. }else{
  4303. if(typeof this.m_focusCell=="object"&&typeof this.m_focusCell.focus=="function"){
  4304. this.m_focusCell.focus();
  4305. }
  4306. }
  4307. }
  4308. };
  4309. function CMenu_setFocus(){
  4310. try{
  4311. var _283=null;
  4312. for(var _284=0;_284<this.getNumItems()&&!_283;_284++){
  4313. var _285=this.get(_284);
  4314. if(_285.isVisible&&_285.isVisible()){
  4315. _283=_285;
  4316. }
  4317. }
  4318. if(!_283||!_283.setFocus()){
  4319. this.m_htmlDivElement.childNodes[0].focus();
  4320. }
  4321. }
  4322. catch(e){
  4323. }
  4324. };
  4325. function CMenu_show(){
  4326. if(this.m_htmlDivElement!=null){
  4327. this.m_bVisible=true;
  4328. this.updateCoords();
  4329. var _286=((!isIE())&&(document.getElementById))?true:false;
  4330. var _287="uiFrameworkHiddenIframe"+this.m_id;
  4331. var _288=this.m_htmlContainer.document?this.m_htmlContainer.document.getElementById(_287):this.m_htmlContainer.ownerDocument.getElementById(_287);
  4332. if(_288==null){
  4333. _288=this.createHiddenIFrame(_287);
  4334. }
  4335. if(_288){
  4336. _288.style.display="block";
  4337. _288.style.left="0px";
  4338. _288.style.top="0px";
  4339. updateIframeCoords(_287,this.m_htmlDivElement.id,_286);
  4340. setTimeout("updateIframeCoords(\""+_287+"\", \""+this.m_htmlDivElement.id+"\", "+_286+")",50);
  4341. }
  4342. this.m_htmlDivElement.style.display="block";
  4343. this.m_htmlDivElement.style.visibility="visible";
  4344. this.setFocus();
  4345. if(!window.isIOS()){
  4346. var _289=this;
  4347. if(window.attachEvent){
  4348. window.attachEvent("onresize",function(){
  4349. _289.remove();
  4350. });
  4351. window.attachEvent("onscroll",function(){
  4352. _289.remove();
  4353. });
  4354. }else{
  4355. window.addEventListener("resize",function(){
  4356. _289.remove();
  4357. },false);
  4358. window.addEventListener("scroll",function(){
  4359. _289.remove();
  4360. },false);
  4361. }
  4362. var _28a=null;
  4363. if(this.m_oCV!=null){
  4364. _28a=document.getElementById(this.m_oCV.getId()+"content");
  4365. }
  4366. if(_28a){
  4367. if(_28a.parentNode.parentNode.attachEvent){
  4368. _28a.parentNode.parentNode.attachEvent("onscroll",function(){
  4369. _289.remove();
  4370. });
  4371. }else{
  4372. _28a.parentNode.parentNode.addEventListener("scroll",function(){
  4373. _289.remove();
  4374. },false);
  4375. }
  4376. }
  4377. }
  4378. }
  4379. };
  4380. function CMenu_createHiddenIFrame(_28b){
  4381. var _28c=this.getHTMLContainer();
  4382. var _28d=_28c.document?_28c.document.createElement("iframe"):_28c.ownerDocument.createElement("iframe");
  4383. _28d.setAttribute("id",_28b);
  4384. _28d.setAttribute("src",this.m_webContentRoot+"/common/images/spacer.gif");
  4385. _28d.setAttribute("scrolling","no");
  4386. _28d.setAttribute("frameborder","0");
  4387. _28d.style.position="absolute";
  4388. _28d.style.minWidth="0px";
  4389. _28d.style.minHeight="0px";
  4390. _28d.style.left="0px";
  4391. _28d.style.top="0px";
  4392. _28d.style.zIndex=499;
  4393. _28d.style.display="none";
  4394. _28d.setAttribute("title","Empty frame");
  4395. _28d.setAttribute("role","presentation");
  4396. _28c.appendChild(_28d);
  4397. return _28d;
  4398. };
  4399. function CMenu_isVisible(){
  4400. return this.m_bVisible;
  4401. };
  4402. function CMenu_remove(){
  4403. this.removeHiddenIframe();
  4404. for(var i=0;i<this.getNumItems();++i){
  4405. var _28f=this.get(i);
  4406. if(typeof _28f.getMenu=="function"&&_28f.getMenu()!=null){
  4407. _28f.getMenu().remove();
  4408. }
  4409. }
  4410. if(this.m_htmlContainer!=null&&this.m_htmlDivElement!=null){
  4411. this.m_htmlContainer.removeChild(this.m_htmlDivElement);
  4412. }
  4413. this.m_htmlDivElement=null;
  4414. this.m_bVisible=false;
  4415. };
  4416. function CMenu_removeHiddenIframe(){
  4417. try{
  4418. if(g_ownerDocument){
  4419. var _290=g_ownerDocument.getElementById("uiFrameworkHiddenIframe"+this.m_id);
  4420. if(_290!=null){
  4421. _290.style.display="none";
  4422. if(_290.parentNode&&_290.parentNode.removeChild){
  4423. _290.parentNode.removeChild(_290);
  4424. }
  4425. }
  4426. }
  4427. }
  4428. catch(e){
  4429. }
  4430. };
  4431. function CMenu_hideHiddenIframe(){
  4432. try{
  4433. if(g_ownerDocument){
  4434. var _291=g_ownerDocument.getElementById("uiFrameworkHiddenIframe"+this.m_id);
  4435. if(_291){
  4436. _291.style.display="none";
  4437. }
  4438. }
  4439. }
  4440. catch(e){
  4441. }
  4442. };
  4443. function CMenu_enable(){
  4444. };
  4445. function CMenu_disable(){
  4446. };
  4447. function CMenu_getState(){
  4448. };
  4449. function CMenu_clear(){
  4450. if(this.m_htmlDivElement!=null){
  4451. this.m_htmlDivElement.innerHTML="";
  4452. }
  4453. this.m_menuItems.splice(0,this.m_menuItems.length);
  4454. };
  4455. function CMenu_attachEvents(){
  4456. for(var i=0;i<this.m_menuItems.length;i++){
  4457. if(typeof this.m_menuItems[i].attachEvents=="function"){
  4458. this.m_menuItems[i].attachEvents();
  4459. }
  4460. }
  4461. this.m_htmlDivElement.onkeypress=this.onkeypress;
  4462. this.m_htmlDivElement.tbMenu=eval(this);
  4463. };
  4464. function CMenu_closeSubMenus(_293){
  4465. for(var i=0;i<this.m_menuItems.length;i++){
  4466. var _295=this.m_menuItems[i];
  4467. var _296=_293.getSubject();
  4468. if(_295!=_296&&typeof _295.getMenu=="function"&&_295.getMenu()!=null&&_295.getMenu().isVisible()){
  4469. _295.getMenu().remove();
  4470. }
  4471. }
  4472. };
  4473. function CMenu_closeAllMenus(_297){
  4474. var _298=this;
  4475. var _299=null;
  4476. while(_298){
  4477. if(_298 instanceof CMenu){
  4478. _299=_298;
  4479. }
  4480. _298=_298.getParent();
  4481. }
  4482. if(_299!=null){
  4483. _299.remove();
  4484. }
  4485. };
  4486. function CMenu_setStyle(_29a){
  4487. this.m_style=_29a;
  4488. };
  4489. function CMenu_getStyle(){
  4490. return this.m_style;
  4491. };
  4492. function CMenu_setXCoord(x){
  4493. var _29c=this.getHTMLDiv();
  4494. if(_29c!=null){
  4495. _29c.style.left=x+"px";
  4496. }
  4497. };
  4498. function CMenu_setYCoord(y){
  4499. var _29e=this.getHTMLDiv();
  4500. if(_29e!=null){
  4501. _29e.style.top=y+"px";
  4502. }
  4503. };
  4504. function CMenu_setZIndex(_29f){
  4505. var _2a0=this.getHTMLDiv();
  4506. if(_2a0!=null){
  4507. _2a0.style.zIndex=_29f;
  4508. }
  4509. };
  4510. function CMenu_registerCallback(_2a1){
  4511. this.m_callback=_2a1;
  4512. };
  4513. function CMenu_executeCallback(){
  4514. if(typeof this.m_callback=="function"){
  4515. this.m_callback();
  4516. }else{
  4517. if(typeof this.m_callback=="string"){
  4518. eval(this.m_callback);
  4519. }
  4520. }
  4521. };
  4522. function CMenu_getObservers(){
  4523. return this.m_observers;
  4524. };
  4525. function CMenu_onmouseover(evt){
  4526. evt=(evt)?evt:((event)?event:null);
  4527. if(this.getParent()!=null&&typeof this.getParent().onmouseover=="function"){
  4528. this.getParent().onmouseover(evt);
  4529. }
  4530. this.getObservers().notify(CMenu_onmouseover);
  4531. };
  4532. function CMenu_onmouseout(evt){
  4533. evt=(evt)?evt:((event)?event:null);
  4534. if(this.getParent()!=null&&typeof this.getParent().onmouseout=="function"){
  4535. this.getParent().onmouseout(evt);
  4536. }
  4537. this.getObservers().notify(CMenu_onmouseout);
  4538. };
  4539. function CMenu_onmouseup(evt){
  4540. evt=(evt)?evt:((event)?event:null);
  4541. if(this.getParent()!=null&&typeof this.getParent().onmouseup=="function"){
  4542. this.getParent().onmouseup(evt);
  4543. }
  4544. this.getObservers().notify(CMenu_onmouseup);
  4545. };
  4546. function CMenu_onkeypress(evt){
  4547. evt=(evt)?evt:((event)?event:null);
  4548. var menu=this.tbMenu;
  4549. if(typeof menu=="object"){
  4550. if(evt.keyCode==40){
  4551. var _2a7=false;
  4552. for(var i=0;i<menu.m_menuItems.length;i++){
  4553. var _2a9=menu.m_menuItems[i];
  4554. if(typeof _2a9.isVisible=="function"&&_2a9.isVisible()&&typeof _2a9.setFocus=="function"){
  4555. _2a9.setFocus();
  4556. _2a7=true;
  4557. break;
  4558. }
  4559. }
  4560. if(!_2a7){
  4561. menu.hide();
  4562. }
  4563. }
  4564. if(evt.keyCode==38){
  4565. menu.hide();
  4566. }
  4567. }
  4568. if(typeof this.getParent=="function"&&this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
  4569. this.getParent().onkeypress(evt);
  4570. }
  4571. if(typeof this.getObservers=="function"){
  4572. this.getObservers().notify(CMenu_onkeypress);
  4573. }
  4574. };
  4575. function CMenu_getForceCallback(){
  4576. return this.m_bForceCallback;
  4577. };
  4578. function CMenu_setForceCallback(_2aa){
  4579. this.m_bForceCallback=_2aa;
  4580. };
  4581. CMenu.prototype.draw=CMenu_draw;
  4582. CMenu.prototype.updateCoords=CMenu_updateCoords;
  4583. CMenu.prototype.add=CMenu_add;
  4584. CMenu.prototype.get=CMenu_get;
  4585. CMenu.prototype.getNumItems=CMenu_getNumItems;
  4586. CMenu.prototype.hide=CMenu_hide;
  4587. CMenu.prototype.hideHiddenIframe=CMenu_hideHiddenIframe;
  4588. CMenu.prototype.removeHiddenIframe=CMenu_removeHiddenIframe;
  4589. CMenu.prototype.show=CMenu_show;
  4590. CMenu.prototype.enable=CMenu_enable;
  4591. CMenu.prototype.disable=CMenu_disable;
  4592. CMenu.prototype.getState=CMenu_getState;
  4593. CMenu.prototype.clear=CMenu_clear;
  4594. CMenu.prototype.attachEvents=CMenu_attachEvents;
  4595. CMenu.prototype.setParent=CMenu_setParent;
  4596. CMenu.prototype.getParent=CMenu_getParent;
  4597. CMenu.prototype.getHTMLContainer=CMenu_getHTMLContainer;
  4598. CMenu.prototype.setHTMLContainer=CMenu_setHTMLContainer;
  4599. CMenu.prototype.getHTMLDiv=CMenu_getHTMLDiv;
  4600. CMenu.prototype.create=CMenu_create;
  4601. CMenu.prototype.remove=CMenu_remove;
  4602. CMenu.prototype.getId=CMenu_getId;
  4603. CMenu.prototype.isVisible=CMenu_isVisible;
  4604. CMenu.prototype.setStyle=CMenu_setStyle;
  4605. CMenu.prototype.getStyle=CMenu_getStyle;
  4606. CMenu.prototype.closeSubMenus=CMenu_closeSubMenus;
  4607. CMenu.prototype.closeAllMenus=CMenu_closeAllMenus;
  4608. CMenu.prototype.setXCoord=CMenu_setXCoord;
  4609. CMenu.prototype.setYCoord=CMenu_setYCoord;
  4610. CMenu.prototype.setZIndex=CMenu_setZIndex;
  4611. CMenu.prototype.update=new Function("return true");
  4612. CMenu.prototype.registerCallback=CMenu_registerCallback;
  4613. CMenu.prototype.executeCallback=CMenu_executeCallback;
  4614. CMenu.prototype.getObservers=CMenu_getObservers;
  4615. CMenu.prototype.onmouseover=CMenu_onmouseover;
  4616. CMenu.prototype.onmouseout=CMenu_onmouseout;
  4617. CMenu.prototype.onmouseup=CMenu_onmouseup;
  4618. CMenu.prototype.onkeypress=CMenu_onkeypress;
  4619. CMenu.prototype.createHiddenIFrame=CMenu_createHiddenIFrame;
  4620. CMenu.prototype.setForceCallback=CMenu_setForceCallback;
  4621. CMenu.prototype.getForceCallback=CMenu_getForceCallback;
  4622. CMenu.prototype.setFocus=CMenu_setFocus;
  4623. CMenu.prototype.genARIATags=CMenu_genARIATags;
  4624. CMenu.prototype.setAltText=CMenu_setAltText;
  4625. CMenu.prototype.getAltText=CMenu_getAltText;
  4626. CMenu.prototype.genMenuAltText=CMenu_genMenuAltText;
  4627. CMenu.prototype.setLoadingMenuItem=CMenu_setLoadingMenuItem;
  4628. CMenu.prototype.getLoadingMenuItem=CMenu_getLoadingMenuItem;
  4629. function updateIframeCoords(id,_2ac,_2ad){
  4630. if(g_ownerDocument==null){
  4631. return;
  4632. }
  4633. var _2ae=g_ownerDocument.getElementById(_2ac);
  4634. var _2af=g_ownerDocument.getElementById(id);
  4635. if(_2af&&_2ae){
  4636. if(_2ad==true){
  4637. _2af.style.left=_2ae.offsetLeft+"px";
  4638. _2af.style.top=_2ae.offsetTop+"px";
  4639. _2af.style.width=_2ae.offsetWidth+"px";
  4640. _2af.style.height=_2ae.offsetHeight+"px";
  4641. }else{
  4642. _2af.style.pixelLeft=_2ae.offsetLeft;
  4643. _2af.style.pixelTop=_2ae.offsetTop;
  4644. _2af.style.pixelWidth=_2ae.offsetWidth;
  4645. _2af.style.pixelHeight=_2ae.offsetHeight;
  4646. }
  4647. }
  4648. };
  4649. function CIcon(_2b0,_2b1,_2b2){
  4650. this.m_iconPath=_2b0;
  4651. this.m_toolTip=_2b1;
  4652. this.m_enabled=true;
  4653. this.m_height=16;
  4654. this.m_width=16;
  4655. if(typeof _2b2!="undefined"&&_2b2!=""){
  4656. this.m_webContentRoot=_2b2;
  4657. }else{
  4658. this.m_webContentRoot="..";
  4659. }
  4660. };
  4661. function CIcon_draw(){
  4662. var html="";
  4663. html+="<img style=\"vertical-align:middle;\" src=\"";
  4664. if(typeof this.m_iconPath!="undefined"&&this.m_iconPath!==""&&this.m_iconPath!="blankIcon"){
  4665. if(this.m_enabled==true){
  4666. html+=this.m_iconPath;
  4667. }else{
  4668. html+=this.getDisabledImagePath();
  4669. }
  4670. html+="\" title=\"";
  4671. if(typeof this.m_toolTip=="string"&&this.m_toolTip.length>0){
  4672. html+=this.m_toolTip;
  4673. }
  4674. html+="\" alt=\"";
  4675. if(typeof this.m_toolTip=="string"&&this.m_toolTip.length>0){
  4676. html+=this.m_toolTip;
  4677. }
  4678. html+="\" width=\"";
  4679. html+=this.m_width;
  4680. html+="\" height=\"";
  4681. html+=this.m_height;
  4682. html+="\"/>";
  4683. }else{
  4684. html+=this.m_webContentRoot+"/common/images/spacer.gif";
  4685. html+="\" alt=\"\"";
  4686. if(this.m_iconPath=="blankIcon"){
  4687. html+=" width=\"";
  4688. html+=this.m_width;
  4689. html+="\" height=\"";
  4690. html+=this.m_height;
  4691. html+="\"/>";
  4692. }else{
  4693. html+=" width=\"1\" height=\"1\"/>";
  4694. }
  4695. }
  4696. return html;
  4697. };
  4698. function CIcon_getDisabledImagePath(){
  4699. var _2b4=this.m_iconPath.split("/");
  4700. var _2b5="";
  4701. for(var i=0;i<(_2b4.length-1);++i){
  4702. _2b5+=_2b4[i]+"/";
  4703. }
  4704. _2b5+="dis_"+_2b4[_2b4.length-1];
  4705. return _2b5;
  4706. };
  4707. function CIcon_getPath(){
  4708. return this.m_iconPath;
  4709. };
  4710. function CIcon_setPath(path){
  4711. this.m_iconPath=path;
  4712. };
  4713. function CIcon_getToolTip(){
  4714. return this.m_toolTip;
  4715. };
  4716. function CIcon_setToolTip(_2b8){
  4717. this.m_toolTip=_2b8;
  4718. };
  4719. function CIcon_enable(){
  4720. this.m_enabled=true;
  4721. };
  4722. function CIcon_disable(){
  4723. this.m_enabled=false;
  4724. };
  4725. function CIcon_isEnabled(){
  4726. return this.m_enabled;
  4727. };
  4728. function CIcon_setHeight(_2b9){
  4729. this.m_height=_2b9;
  4730. };
  4731. function CIcon_getHeight(){
  4732. return this.m_height;
  4733. };
  4734. function CIcon_setWidth(_2ba){
  4735. this.m_width=_2ba;
  4736. };
  4737. function CIcon_getWidth(){
  4738. return this.m_width;
  4739. };
  4740. CIcon.prototype.draw=CIcon_draw;
  4741. CIcon.prototype.enable=CIcon_enable;
  4742. CIcon.prototype.disable=CIcon_disable;
  4743. CIcon.prototype.isEnabled=CIcon_isEnabled;
  4744. CIcon.prototype.getDisabledImagePath=CIcon_getDisabledImagePath;
  4745. CIcon.prototype.getPath=CIcon_getPath;
  4746. CIcon.prototype.setPath=CIcon_setPath;
  4747. CIcon.prototype.setHeight=CIcon_setHeight;
  4748. CIcon.prototype.getHeight=CIcon_getHeight;
  4749. CIcon.prototype.setWidth=CIcon_setWidth;
  4750. CIcon.prototype.getWidth=CIcon_getWidth;
  4751. CIcon.prototype.getToolTip=CIcon_getToolTip;
  4752. CIcon.prototype.setToolTip=CIcon_setToolTip;
  4753. var cHorizonalBar=0;
  4754. var cVerticalBar=1;
  4755. function CBar(_2bb,_2bc,sId,_2be,_2bf,_2c0,_2c1,_2c2){
  4756. this.m_align="left";
  4757. this.m_items=[];
  4758. this.m_htmlContainerId=_2bb;
  4759. this.m_htmlContainer=null;
  4760. this.m_id="cbar"+_2bb;
  4761. this.m_menuType=cVerticalBar;
  4762. this.m_style=_2bc;
  4763. this.m_parent=null;
  4764. this.m_observers=new CObserver(this);
  4765. this.m_cookieVar=_2c1;
  4766. this.m_cookieName=_2c2;
  4767. this.m_sId=(sId)?sId:null;
  4768. this.m_display=DISPLAY_INLINE;
  4769. this.m_imagePath=(_2be)?_2be:"../common/images/toolbar/";
  4770. this.m_imgCollapseSrc=this.m_imagePath+"toolbar_collapse.gif";
  4771. this.m_imgExpandSrc=this.m_imagePath+"toolbar_expand.gif";
  4772. this.m_showTooltip=_2bf?_2bf:null;
  4773. this.m_hideTooltip=_2c0?_2c0:null;
  4774. };
  4775. function CBar_hideBar(){
  4776. var bar=document.getElementById("bar"+this.m_id);
  4777. var _2c4=document.getElementById("barIcon"+this.m_id);
  4778. if(_2c4){
  4779. _2c4.src=this.m_imgExpandSrc;
  4780. if(this.m_showTooltip!=null){
  4781. _2c4.alt=this.m_showTooltip;
  4782. _2c4.title=this.m_showTooltip;
  4783. }
  4784. }
  4785. if(bar){
  4786. bar.style.display=DISPLAY_NONE;
  4787. if(typeof setQSCookie=="function"){
  4788. setQSCookie(this.m_cookieVar,this.m_cookieName,0);
  4789. }
  4790. }
  4791. };
  4792. function CBar_showBar(){
  4793. var bar=document.getElementById("bar"+this.m_id);
  4794. var _2c6=document.getElementById("barIcon"+this.m_id);
  4795. if(_2c6){
  4796. _2c6.src=this.m_imgCollapseSrc;
  4797. if(this.m_hideTooltip!=null){
  4798. _2c6.alt=this.m_hideTooltip;
  4799. _2c6.title=this.m_hideTooltip;
  4800. }
  4801. }
  4802. if(bar){
  4803. bar.style.display=this.m_display;
  4804. if(typeof setQSCookie=="function"){
  4805. setQSCookie(this.m_cookieVar,this.m_cookieName,1);
  4806. }
  4807. }
  4808. };
  4809. function CBar_toggleBar(){
  4810. var bar=document.getElementById("bar"+this.m_id);
  4811. var _2c8=bar.style.display;
  4812. if((_2c8==this.m_display)||(_2c8=="")){
  4813. this.hideBar();
  4814. }else{
  4815. this.showBar();
  4816. }
  4817. };
  4818. function CBar_getParent(){
  4819. return this.m_parent;
  4820. };
  4821. function CBar_setParent(_2c9){
  4822. this.m_parent=_2c9;
  4823. };
  4824. function CBar_draw(){
  4825. if(this.m_htmlContainer==null){
  4826. this.m_htmlContainer=document.getElementById(this.m_htmlContainerId);
  4827. if(this.m_htmlContainer==null){
  4828. return;
  4829. }
  4830. }
  4831. var html="";
  4832. html+="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"";
  4833. if(this.m_sId!=null){
  4834. html+="style=\"display: inline;\"><tr>";
  4835. html+="<td"+(isFF()?" style=\"vertical-align:bottom\"":"")+" style=\"height:26px\"><img id=\"barIcon"+this.m_id+"\" border=\"0\" src=\""+this.m_imgCollapseSrc+"\"";
  4836. if(this.m_hideTooltip!=null){
  4837. html+=" alt=\""+this.m_hideTooltip+"\" title=\""+this.m_hideTooltip+"\"";
  4838. }
  4839. html+=" onclick=\""+this.m_sId+".toggleBar();\" style=\"cursor:pointer;cursor:hand;\"></td>";
  4840. }else{
  4841. var _2cb="";
  4842. if(this.m_htmlContainer.style.textAlign=="right"){
  4843. _2cb="margin-left:auto; margin-right: 0;";
  4844. }else{
  4845. if(this.m_htmlContainer.style.textAlign=="left"){
  4846. _2cb="margin-left:0; margin-right: auto;";
  4847. }else{
  4848. if(this.m_htmlContainer.style.textAlign=="center"){
  4849. _2cb="margin-left:auto; margin-right: auto;";
  4850. }
  4851. }
  4852. }
  4853. if(_2cb!=""){
  4854. html+=" style=\""+_2cb+"\"";
  4855. }
  4856. html+="><tr>";
  4857. }
  4858. html+="<td id=\"bar"+this.m_id+"\">";
  4859. html+="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\" class=\"";
  4860. if(this.getStyle()!=null){
  4861. html+=this.getStyle().getNormalState();
  4862. }
  4863. html+="\" id=\"";
  4864. html+=this.m_id;
  4865. html+="\" style=\""+this.m_style+"\"><tr>";
  4866. html+=this.drawItems();
  4867. html+="</tr></table></td>";
  4868. html+="</tr></table>";
  4869. this.m_htmlContainer.innerHTML=html;
  4870. this.m_htmlContainer.style.textAlign=this.m_align;
  4871. for(var i=0;i<this.m_items.length;++i){
  4872. if(typeof this.m_items[i].init=="function"){
  4873. this.m_items[i].init();
  4874. }
  4875. }
  4876. this.attachEvents();
  4877. };
  4878. function CBar_drawItems(){
  4879. var html="";
  4880. for(var i=0;i<this.m_items.length;++i){
  4881. if(typeof this.m_items[i].draw=="function"){
  4882. if(this.m_menuType==cHorizonalBar&&!(this.m_items[i] instanceof CSeperator)){
  4883. html+="<td style=\"white-space:nowrap;";
  4884. if(this.m_items[i] instanceof CMenuItem){
  4885. html+=";padding-left:1px; padding-right: 1px;";
  4886. }
  4887. html+="\">";
  4888. }
  4889. if(this.m_items[i].isVisible()){
  4890. html+=this.m_items[i].draw();
  4891. }
  4892. if(this.m_menuType==cHorizonalBar&&!(this.m_items[i] instanceof CSeperator)){
  4893. html+="</td>";
  4894. }
  4895. }
  4896. }
  4897. return html;
  4898. };
  4899. function CBar_attachEvents(){
  4900. for(var i=0;i<this.m_items.length;++i){
  4901. if(typeof this.m_items[i].attachEvents=="function"&&this.m_items[i].isVisible()){
  4902. this.m_items[i].attachEvents();
  4903. }
  4904. }
  4905. };
  4906. function CBar_add(item){
  4907. if(typeof item.getObservers=="function"&&typeof item.getObservers()=="object"&&typeof item.onmouseover=="function"&&item instanceof CMenuItem){
  4908. item.getObservers().attach(this,this.closeMenus,item.onmouseover);
  4909. }
  4910. this.m_items[this.m_items.length]=item;
  4911. };
  4912. function CBar_getNumItems(){
  4913. return this.m_items.length;
  4914. };
  4915. function CBar_getId(){
  4916. return this.m_id;
  4917. };
  4918. function CBar_get(_2d1){
  4919. if(_2d1>=0&&_2d1<this.getNumItems()){
  4920. return this.m_items[_2d1];
  4921. }
  4922. return null;
  4923. };
  4924. function CBar_hide(_2d2){
  4925. if(_2d2>0&&_2d2<this.getNumItems()){
  4926. if(typeof this.m_items[i].hide=="function"){
  4927. this.m_items[i].hide();
  4928. }
  4929. }
  4930. };
  4931. function CBar_show(_2d3){
  4932. if(_2d3>0&&_2d3<this.getNumItems()){
  4933. if(typeof this.m_items[i].show=="function"){
  4934. this.m_items[i].show();
  4935. }
  4936. }
  4937. };
  4938. function CBar_enable(_2d4){
  4939. if(_2d4>0&&_2d4<this.getNumItems()){
  4940. if(typeof this.m_items[i].enable=="function"){
  4941. this.m_items[i].enable();
  4942. }
  4943. }
  4944. };
  4945. function CBar_disable(_2d5){
  4946. if(_2d5>0&&_2d5<this.getNumItems()){
  4947. if(typeof this.m_items[i].disable=="function"){
  4948. this.m_items[i].disable();
  4949. }
  4950. }
  4951. };
  4952. function CBar_getState(_2d6){
  4953. if(_2d6>0&&_2d6<this.getNumItems()){
  4954. if(typeof this.m_items[i].getState=="function"){
  4955. this.m_items[i].getState();
  4956. }
  4957. }
  4958. };
  4959. function CBar_setMenuType(_2d7){
  4960. this.m_menuType=_2d7;
  4961. };
  4962. function CBar_getMenuType(){
  4963. return this.m_menuType;
  4964. };
  4965. function CBar_setStyle(_2d8){
  4966. this.m_style=_2d8;
  4967. };
  4968. function CBar_setAlign(_2d9){
  4969. this.m_align=_2d9;
  4970. };
  4971. function CBar_getStyle(){
  4972. return this.m_style;
  4973. };
  4974. function CBar_closeMenus(_2da){
  4975. for(var i=0;i<this.getNumItems();i++){
  4976. var _2dc=this.get(i);
  4977. if(typeof _2da=="object"){
  4978. if(_2da.getSubject()==_2dc){
  4979. continue;
  4980. }
  4981. }
  4982. if(typeof _2dc.getMenu=="function"&&_2dc.getMenu()!=null&&_2dc.getMenu().isVisible()){
  4983. _2dc.getMenu().remove();
  4984. }
  4985. }
  4986. };
  4987. function CBar_getHTMLContainer(){
  4988. return this.m_htmlContainer;
  4989. };
  4990. function CBar_getObservers(){
  4991. return this.m_observers;
  4992. };
  4993. function CBar_onmouseover(evt){
  4994. evt=(evt)?evt:((event)?event:null);
  4995. if(this.getParent()!=null&&typeof this.getParent().onmouseover=="function"){
  4996. this.getParent().onmouseover(evt);
  4997. }
  4998. this.getObservers().notify(CBar_onmouseover);
  4999. };
  5000. function CBar_onmouseout(evt){
  5001. evt=(evt)?evt:((event)?event:null);
  5002. if(this.getParent()!=null&&typeof this.getParent().onmouseout=="function"){
  5003. this.getParent().onmouseout(evt);
  5004. }
  5005. this.getObservers().notify(CBar_onmouseout);
  5006. };
  5007. function CBar_onmouseup(evt){
  5008. evt=(evt)?evt:((event)?event:null);
  5009. if(this.getParent()!=null&&typeof this.getParent().onmouseup=="function"){
  5010. this.getParent().onmouseup(evt);
  5011. }
  5012. this.getObservers().notify(CBar_onmouseup);
  5013. };
  5014. function CBar_onkeypress(evt){
  5015. evt=(evt)?evt:((event)?event:null);
  5016. if(this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
  5017. this.getParent().onkeypress(evt);
  5018. }
  5019. this.getObservers().notify(CBar_onkeypress);
  5020. };
  5021. CBar.prototype.draw=CBar_draw;
  5022. CBar.prototype.add=CBar_add;
  5023. CBar.prototype.get=CBar_get;
  5024. CBar.prototype.hide=CBar_hide;
  5025. CBar.prototype.show=CBar_show;
  5026. CBar.prototype.enable=CBar_enable;
  5027. CBar.prototype.disable=CBar_disable;
  5028. CBar.prototype.getState=CBar_getState;
  5029. CBar.prototype.attachEvents=CBar_attachEvents;
  5030. CBar.prototype.drawItems=CBar_drawItems;
  5031. CBar.prototype.getId=CBar_getId;
  5032. CBar.prototype.setMenuType=CBar_setMenuType;
  5033. CBar.prototype.getMenuType=CBar_getMenuType;
  5034. CBar.prototype.getNumItems=CBar_getNumItems;
  5035. CBar.prototype.setStyle=CBar_setStyle;
  5036. CBar.prototype.getStyle=CBar_getStyle;
  5037. CBar.prototype.setAlign=CBar_setAlign;
  5038. CBar.prototype.closeMenus=CBar_closeMenus;
  5039. CBar.prototype.setParent=CBar_setParent;
  5040. CBar.prototype.getParent=CBar_getParent;
  5041. CBar.prototype.getHTMLContainer=CBar_getHTMLContainer;
  5042. CBar.prototype.getObservers=CBar_getObservers;
  5043. CBar.prototype.update=new Function("return true");
  5044. CBar.prototype.getObservers=CBar_getObservers;
  5045. CBar.prototype.onmouseover=CBar_onmouseover;
  5046. CBar.prototype.onmouseout=CBar_onmouseout;
  5047. CBar.prototype.onmouseup=CBar_onmouseup;
  5048. CBar.prototype.onkeypress=CBar_onkeypress;
  5049. CBar.prototype.hideBar=CBar_hideBar;
  5050. CBar.prototype.showBar=CBar_showBar;
  5051. CBar.prototype.toggleBar=CBar_toggleBar;
  5052. function CStaticText(text,_2e2){
  5053. this.m_text=text;
  5054. this.m_style=_2e2;
  5055. this.m_bVisible=true;
  5056. this.m_sId="";
  5057. };
  5058. CStaticText.prototype.setId=function(sId){
  5059. this.m_sId=sId;
  5060. };
  5061. CStaticText.prototype.getId=function(){
  5062. return this.m_sId;
  5063. };
  5064. CStaticText.prototype.setText=function(text){
  5065. this.m_text=text;
  5066. };
  5067. CStaticText.prototype.setLabelledBy=function(text){
  5068. this.m_labelledBy=text;
  5069. };
  5070. CStaticText.prototype.draw=function(){
  5071. var html="";
  5072. html+="<td style=\"white-space: nowrap;\" class=\"";
  5073. html+=this.m_style.getNormalState()+"\"";
  5074. if(this.getId()!=""){
  5075. html+=" id=\""+this.getId()+"\"";
  5076. }
  5077. html+=">";
  5078. var _2e7=this.m_labelledBy?"aria-labelledby=\""+this.getId()+"label\"":"";
  5079. html+="<div role=\"presentation\" tabIndex=\"0\" "+_2e7+">";
  5080. html+=this.m_text;
  5081. html+="</div>";
  5082. if(this.m_labelledBy){
  5083. html+="<div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.getId()+"label\">";
  5084. html+=this.m_labelledBy;
  5085. html+="</div>";
  5086. }
  5087. html+="</td>";
  5088. return html;
  5089. };
  5090. CStaticText.prototype.isVisible=function(){
  5091. return this.m_bVisible;
  5092. };
  5093. CStaticText.prototype.hide=function(){
  5094. this.m_bVisible=false;
  5095. };
  5096. CStaticText.prototype.hide.show=function(){
  5097. this.m_bVisible=true;
  5098. };
  5099. var DISPLAY_INLINE="inline";
  5100. var DISPLAY_NONE="none";
  5101. var DISPLAY_BLOCK="block";
  5102. var __excel_win=null;
  5103. var __pdf_win=null;
  5104. if(window.attachEvent){
  5105. window.attachEvent("onkeydown",viewerMainKeyPress);
  5106. window.attachEvent("onresize",onResizeViewerEvent);
  5107. }else{
  5108. if(window.addEventListener){
  5109. window.addEventListener("keydown",viewerMainKeyPress,false);
  5110. window.addEventListener("resize",onResizeViewerEvent,false);
  5111. }
  5112. }
  5113. function attachLeavingRV(){
  5114. if(window.attachEvent){
  5115. window.attachEvent("onbeforeunload",leavingRV);
  5116. }else{
  5117. if(window.addEventListener){
  5118. window.addEventListener("beforeunload",leavingRV,false);
  5119. }else{
  5120. try{
  5121. var _2e8=window.onunload;
  5122. if(!(""+_2e8).match(/leavingRV/gi)){
  5123. window.oLeavingRV_onunload=window.onunload;
  5124. window.onunload=function(){
  5125. window.oLeavingRV_onunload();
  5126. leavingRV();
  5127. };
  5128. }
  5129. }
  5130. catch(e){
  5131. }
  5132. }
  5133. }
  5134. };
  5135. function detachLeavingRV(){
  5136. if(window.detachEvent){
  5137. window.detachEvent("onbeforeunload",leavingRV);
  5138. }else{
  5139. window.removeEventListener("beforeunload",leavingRV,false);
  5140. }
  5141. };
  5142. window.attachLeavingRV();
  5143. function CContextMenu(_2e9){
  5144. if(_2e9==null){
  5145. return;
  5146. }
  5147. this.m_mainWnd=_2e9;
  5148. this.setCV(this.m_mainWnd.getCV());
  5149. var _2ea=this.m_mainWnd.getCV().getWebContentRoot();
  5150. var _2eb=this.m_mainWnd.getCV().getSkin();
  5151. var _2ec=this.m_mainWnd.getUIHide();
  5152. this.m_contextMenu=new CMenu("rvContextMenu"+this.getCVId(),gMenuStyle,_2ea);
  5153. this.m_contextMenu.m_oCV=this.getCV();
  5154. this.m_downloadChart=new CMenuItem(this.m_contextMenu,RV_RES.RV_DOWNLOAD_CHART,"if(typeof "+getCognosViewerSCObjectRefAsString(this.getCVId())+" != 'undefined') "+getCognosViewerSCObjectRefAsString(this.getCVId())+".downloadSelectedChartImage('"+this.getCVId()+"');",_2ea+"/rv/images/action_chart.gif",gMenuItemStyle,_2ea,_2eb);
  5155. this.m_downloadChart.hide();
  5156. this.m_downloadChartSeperator=new CSeperator("horizontal_line"+this.getCVId(),"1",gMenuSeperatorStyle,_2ea);
  5157. this.m_downloadChartSeperator.hide();
  5158. this.m_contextMenu.add(this.m_downloadChartSeperator);
  5159. var _2ed=this.getCV().getDrillMgr();
  5160. if(_2ed){
  5161. if(typeof RV_RES.RV_DRILL_DOWN!="undefined"){
  5162. this.m_drillDown=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_DOWN,this.getCVObjectRef()+".getDrillMgr().rvDrillDown();",_2ea+"/rv/images/action_drill_down.gif",gMenuItemStyle,_2ea,_2eb);
  5163. this.m_drillDown.disable();
  5164. }
  5165. if(typeof RV_RES.RV_DRILL_UP!="undefined"){
  5166. this.m_drillUp=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_UP,this.getCVObjectRef()+".getDrillMgr().rvDrillUp();",_2ea+"/rv/images/action_drill_up.gif",gMenuItemStyle,_2ea,_2eb);
  5167. this.m_drillUp.disable();
  5168. }
  5169. if(this.getCV().isInteractiveViewer()&&this.getCV().getAdvancedServerProperty("VIEWER_JS_ENABLE_EXPAND_COLLAPSE")=="true"){
  5170. this.m_contextMenu.add(gMenuSeperator);
  5171. if(typeof RV_RES.IDS_JS_EXPAND_MEMBER!="undefined"){
  5172. this.m_expand=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_EXPAND_MEMBER,this.getCVObjectRef()+".expand();","",gMenuItemStyle,_2ea,_2eb);
  5173. this.m_expand.disable();
  5174. }
  5175. if(typeof RV_RES.IDS_JS_COLLAPSE_MEMBER!="undefined"){
  5176. this.m_collapse=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_COLLAPSE_MEMBER,this.getCVObjectRef()+".collapse();","",gMenuItemStyle,_2ea,_2eb);
  5177. this.m_collapse.disable();
  5178. }
  5179. }
  5180. if((!this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]!="view")&&typeof RV_RES.IDS_JS_FREEZECOLUMNHEADINGS!=="undefined"&&typeof RV_RES.IDS_JS_FREEZEROWHEADINGS!=="undefined"){
  5181. this.m_freezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb);
  5182. this.m_unfreezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb);
  5183. this.m_freezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb);
  5184. this.m_unfreezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb);
  5185. this.m_freezeColumnHeadings.hide();
  5186. this.m_unfreezeColumnHeadings.hide();
  5187. this.m_freezeRowHeadings.hide();
  5188. this.m_unfreezeRowHeadings.hide();
  5189. }
  5190. if(typeof RV_RES.RV_GO_TO!="undefined"){
  5191. if(_2ec.indexOf(" RV_CONTEXT_MENU_GOTO ")==-1){
  5192. if(_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")==-1||!_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")==-1){
  5193. this.m_contextMenu.add(gMenuSeperator);
  5194. }
  5195. }
  5196. this.m_goto=new CMenuItem(this.m_contextMenu,RV_RES.RV_GO_TO,this.getCVObjectRef()+".getDrillMgr().launchGoToPage(null,true);",_2ea+"/rv/images/action_go_to.gif",gMenuItemStyle,_2ea,_2eb);
  5197. var _2ee=this.m_goto.createCascadedMenu(gMenuStyle);
  5198. _2ee.m_oCV=this.getCV();
  5199. if(this.getCV().envParams["cv.containerApp"]=="AA"){
  5200. _2ee.registerCallback(this.getCVObjectRef()+".m_viewerFragment.raiseGotoContextMenuEvent()");
  5201. }else{
  5202. _2ee.registerCallback(this.getCVObjectRef()+".getDrillMgr().getDrillThroughParameters()");
  5203. }
  5204. }
  5205. }
  5206. var _2ef=this.getCV().getSubscriptionManager();
  5207. if(_2ef&&this.getCV().bCanUseCognosViewerConditionalSubscriptions){
  5208. this.m_subscriptionSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle,_2ea);
  5209. this.m_subscriptionSeperator.hide();
  5210. this.m_contextMenu.add(this.m_subscriptionSeperator);
  5211. if(RV_RES.RV_NEW_WATCH_RULE){
  5212. this.m_subscription=new CMenuItem(this.m_contextMenu,RV_RES.RV_NEW_WATCH_RULE,this.getCVObjectRef()+".getSubscriptionManager().NewSubscription();",_2ea+"/rv/images/action_new_subscription.gif",gMenuItemStyle,_2ea,_2eb);
  5213. this.m_subscription.disable();
  5214. }
  5215. }
  5216. var _2f0=false;
  5217. if(this.getCV().bCanUseGlossary&&RV_RES.RV_GLOSSARY&&_2ec.indexOf(" RV_CONTEXT_MENU_GLOSSARY ")==-1){
  5218. _2f0=true;
  5219. this.m_contextMenu.add(gMenuSeperator);
  5220. this.m_glossaryItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_GLOSSARY,this.getCVObjectRef()+".executeAction('Glossary');",_2ea+"/rv/images/action_glossary.gif",gMenuItemStyle,_2ea,_2eb);
  5221. this.m_glossaryItem.disable();
  5222. }
  5223. if(this.isLinegaeVisisble(_2ec)){
  5224. if(!_2f0){
  5225. this.m_contextMenu.add(gMenuSeperator);
  5226. }
  5227. this.m_lineageItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_LINEAGE,this.getCVObjectRef()+".executeAction('Lineage');",_2ea+"/rv/images/action_lineage.gif",gMenuItemStyle,_2ea,_2eb);
  5228. this.m_lineageItem.disable();
  5229. }
  5230. };
  5231. CContextMenu.prototype=new CViewerHelper();
  5232. CContextMenu.prototype.isLinegaeVisisble=function(_2f1){
  5233. if(!isSafari()&&this.getCV().bCanUseLineage&&RV_RES.RV_LINEAGE&&_2f1.indexOf(" RV_CONTEXT_MENU_LINEAGE ")==-1){
  5234. if(this.getCV().envParams["ui.object"]||(this.getCV().envParams["metadataInformationURI"]&&this.getCV().envParams["metadataInformationURI"].indexOf("iis=")==-1)){
  5235. return true;
  5236. }
  5237. }
  5238. return false;
  5239. };
  5240. CContextMenu.prototype.hideFirstSeperators=function(){
  5241. var _2f2=this.m_contextMenu.m_menuItems.length;
  5242. for(var _2f3=0;_2f3<_2f2;_2f3++){
  5243. var _2f4=this.m_contextMenu.m_menuItems[_2f3];
  5244. if(_2f4.isVisible()&&typeof _2f4.m_toolbarSeperatorClass!="string"){
  5245. break;
  5246. }else{
  5247. if(typeof _2f4.m_toolbarSeperatorClass=="string"){
  5248. _2f4.hide();
  5249. }
  5250. }
  5251. }
  5252. };
  5253. CContextMenu.prototype.updateFreezeHeadings=function(){
  5254. if(this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]=="view"){
  5255. return;
  5256. }
  5257. if(this.getCV().getPinFreezeManager()){
  5258. var _2f5=this.getCV().getPinFreezeManager();
  5259. if(this.m_freezeRowHeadings){
  5260. if(_2f5.canFreezeSelectedRowHeadings()){
  5261. this.m_freezeRowHeadings.show();
  5262. }else{
  5263. this.m_freezeRowHeadings.hide();
  5264. }
  5265. }
  5266. if(this.m_unfreezeRowHeadings){
  5267. if(_2f5.canUnfreezeSelectedRowHeadings()){
  5268. this.m_unfreezeRowHeadings.show();
  5269. }else{
  5270. this.m_unfreezeRowHeadings.hide();
  5271. }
  5272. }
  5273. if(this.m_freezeColumnHeadings){
  5274. if(_2f5.canFreezeSelectedColumnHeadings()){
  5275. this.m_freezeColumnHeadings.show();
  5276. }else{
  5277. this.m_freezeColumnHeadings.hide();
  5278. }
  5279. }
  5280. if(this.m_unfreezeColumnHeadings){
  5281. if(_2f5.canUnfreezeSelectedColumnHeadings()){
  5282. this.m_unfreezeColumnHeadings.show();
  5283. }else{
  5284. this.m_unfreezeColumnHeadings.hide();
  5285. }
  5286. }
  5287. }
  5288. };
  5289. function CContextMenu_draw(evt){
  5290. this.updateSubscriptionContextMenuItem();
  5291. if(this.m_bFaultModalShown){
  5292. this.update(this.subject);
  5293. this.m_bFaultModalShown=false;
  5294. }
  5295. this.hideFirstSeperators();
  5296. this.m_contextMenu.remove();
  5297. this.m_contextMenu.setHTMLContainer(document.body);
  5298. this.m_contextMenu.draw();
  5299. if(isIE()&&evt.keyCode&&evt.keyCode!=0){
  5300. var node=getCrossBrowserNode(evt);
  5301. var _2f8=clientToScreenCoords(node,document.body);
  5302. this.m_contextMenu.setXCoord(_2f8.leftCoord+node.scrollWidth);
  5303. this.m_contextMenu.setYCoord(_2f8.topCoord);
  5304. }else{
  5305. this.m_contextMenu.setXCoord(evt.clientX);
  5306. this.m_contextMenu.setYCoord(evt.clientY);
  5307. }
  5308. if(getCVWaitingOnFault()==null){
  5309. this.m_contextMenu.show();
  5310. this.m_bFaultModalShown=false;
  5311. }else{
  5312. this.m_bFaultModalShown=true;
  5313. }
  5314. var _2f9=this.m_contextMenu.get(this.m_contextMenu.getNumItems()-1);
  5315. if(_2f9&&typeof _2f9.getObservers=="function"&&typeof _2f9.getObservers()=="object"){
  5316. _2f9.getObservers().attach(this,this.closeMenuTabEvent,"CMenuItem_closeMenuTabEvent");
  5317. }
  5318. };
  5319. function CContextMenu_getDrillUpMenuItem(){
  5320. return this.m_drillUp;
  5321. };
  5322. function CContextMenu_getDrillDownMenuItem(){
  5323. return this.m_drillDown;
  5324. };
  5325. function CContextMenu_getGoToMenuItem(){
  5326. return this.m_goto;
  5327. };
  5328. function CContextMenu_closeMenuTabEvent(){
  5329. var oCV=this.m_mainWnd.getCV();
  5330. var _2fb=oCV.getSelectionController();
  5331. var _2fc=_2fb.getAllSelectedObjects().length;
  5332. if(_2fc>0){
  5333. var _2fd=_2fb.getAllSelectedObjects()[_2fc-1];
  5334. var _2fe=_2fd.getCellRef().getElementsByTagName("span");
  5335. if(_2fe.length>0){
  5336. for(var i=0;i<_2fe.length;i++){
  5337. var span=_2fe[i];
  5338. if(span.getAttribute("tabindex")!=null&&span.style.visibility!="hidden"){
  5339. span.focus();
  5340. }
  5341. }
  5342. }
  5343. }
  5344. };
  5345. function CContextMenu_hide(){
  5346. this.m_contextMenu.remove();
  5347. };
  5348. function CContextMenu_hideDownloadChartMenuItem(){
  5349. this.m_downloadChart.hide();
  5350. this.m_downloadChartSeperator.hide();
  5351. };
  5352. function CContextMenu_showDownloadChartMenuItem(){
  5353. this.m_downloadChart.show();
  5354. this.m_downloadChartSeperator.show();
  5355. };
  5356. function CContextMenu_update(_301){
  5357. if(_301 instanceof CSelectionController){
  5358. this.subject=_301;
  5359. var _302=this.m_mainWnd.getUIHide();
  5360. var _303=this.getCV().getDrillMgr();
  5361. if(_303){
  5362. var _304=this.getGoToMenuItem();
  5363. var _305=_304.getMenu();
  5364. if(_305){
  5365. _305.clear();
  5366. }
  5367. if(!_301.getSelectionBasedFeaturesEnabled()||_302.indexOf(" RV_CONTEXT_MENU_GOTO ")!=-1){
  5368. _304.hide();
  5369. }
  5370. var _306=this.getDrillDownMenuItem();
  5371. if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")!=-1){
  5372. _306.hide();
  5373. }else{
  5374. if(_303.canDrillDown()){
  5375. this.updateDrillMenu(_306,"DrillDown");
  5376. _306.enable();
  5377. }else{
  5378. if(!_301.getSelectionBasedFeaturesEnabled()){
  5379. _306.hide();
  5380. }else{
  5381. _306.disable();
  5382. }
  5383. }
  5384. }
  5385. var _307=this.getDrillUpMenuItem();
  5386. if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")!=-1){
  5387. _307.hide();
  5388. }
  5389. if(_303.canDrillUp()){
  5390. this.updateDrillMenu(_307,"DrillUp");
  5391. _307.enable();
  5392. }else{
  5393. if(!_301.getSelectionBasedFeaturesEnabled()){
  5394. _307.hide();
  5395. gMenuSeperator.hide();
  5396. }else{
  5397. _307.disable();
  5398. }
  5399. }
  5400. if(this.m_expand){
  5401. this.getCV().canExpand()?this.m_expand.enable():this.m_expand.disable();
  5402. }
  5403. if(this.m_collapse){
  5404. this.getCV().canCollapse()?this.m_collapse.enable():this.m_collapse.disable();
  5405. }
  5406. if(_302.indexOf(" RV_CONTEXT_MENU_DOWNLOAD_CHART ")!=-1){
  5407. this.hideDownloadChartMenuItem();
  5408. }else{
  5409. if(!_301.hasSelectedChartNodes()){
  5410. if(!_301.getSelectionBasedFeaturesEnabled()){
  5411. this.hide();
  5412. }else{
  5413. this.hideDownloadChartMenuItem();
  5414. }
  5415. }else{
  5416. this.showDownloadChartMenuItem();
  5417. }
  5418. }
  5419. }
  5420. var _308=false;
  5421. if(this.m_lineageItem||this.m_glossaryItem){
  5422. var _309=_301.getAllSelectedObjects();
  5423. if(_309!=null&&_309.length>0){
  5424. for(var i=0;i<_309.length;i++){
  5425. if(_309[i].hasContextInformation()){
  5426. _308=true;
  5427. break;
  5428. }
  5429. }
  5430. }
  5431. }
  5432. this.updateFreezeHeadings();
  5433. if(this.m_glossaryItem&&_308&&this.getCV().envParams["glossaryURI"]!=null&&this.getCV().envParams["glossaryURI"]!=""){
  5434. this.m_glossaryItem.enable();
  5435. }else{
  5436. if(this.m_glossaryItem){
  5437. this.m_glossaryItem.disable();
  5438. }
  5439. }
  5440. if(this.m_lineageItem&&_308){
  5441. this.m_lineageItem.enable();
  5442. }else{
  5443. if(this.m_lineageItem){
  5444. this.m_lineageItem.disable();
  5445. }
  5446. }
  5447. }
  5448. };
  5449. CContextMenu.prototype.updateDrillMenu=function(_30b,_30c){
  5450. _30b.clearCascadedMenu();
  5451. var _30d={};
  5452. DrillContextMenuHelper.updateDrillMenuItems(_30d,this.getCV(),_30c);
  5453. if(_30d.items){
  5454. var _30e=_30d.items;
  5455. var _30f=_30b.createCascadedMenu(gMenuStyle);
  5456. var _310=this.getCV().getWebContentRoot();
  5457. var _311=this.m_mainWnd.getCV().getSkin();
  5458. for(var i=0;i<_30e.length;i++){
  5459. var _313=_30e[i];
  5460. if(_313.separator){
  5461. if(i<(_30e.length-1)){
  5462. _30f.add(gMenuSeperator);
  5463. }
  5464. }else{
  5465. var _314=_313.action&&_313.action.payload&&_313.action.payload.userSelectedDrillItem?_313.action.payload.userSelectedDrillItem:"";
  5466. var _315=_314?"{\"userSelectedDrillItem\" : \""+_314+"\"}":"{}";
  5467. if(_30c=="DrillDown"){
  5468. new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillDown("+_315+");","",gMenuItemStyle,_310,_311);
  5469. }else{
  5470. new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillUp("+_315+");","",gMenuItemStyle,_310,_311);
  5471. }
  5472. }
  5473. }
  5474. }
  5475. };
  5476. function CContextMenu_updateSubscriptionContextMenuItem(){
  5477. var _316=this.m_mainWnd.getUIHide();
  5478. var _317=this.getCV().getSubscriptionManager();
  5479. if(_316.indexOf(" RV_CONTEXT_MENU_ALERT_USING_NEW_WATCH_RULE ")!=-1&&this.m_subscription){
  5480. this.m_subscription.hide();
  5481. }else{
  5482. if(_317&&this.m_subscription&&_317.CanCreateNewWatchRule()){
  5483. this.m_subscriptionSeperator.show();
  5484. this.m_subscription.show();
  5485. if(_317.IsValidSelectionForNewRule()){
  5486. this.m_subscription.enable();
  5487. }else{
  5488. this.m_subscription.disable();
  5489. }
  5490. }else{
  5491. if(this.m_subscription){
  5492. this.m_subscriptionSeperator.hide();
  5493. this.m_subscription.hide();
  5494. }
  5495. }
  5496. }
  5497. };
  5498. CContextMenu.prototype.draw=CContextMenu_draw;
  5499. CContextMenu.prototype.hide=CContextMenu_hide;
  5500. CContextMenu.prototype.closeMenuTabEvent=CContextMenu_closeMenuTabEvent;
  5501. CContextMenu.prototype.getDrillUpMenuItem=CContextMenu_getDrillUpMenuItem;
  5502. CContextMenu.prototype.getDrillDownMenuItem=CContextMenu_getDrillDownMenuItem;
  5503. CContextMenu.prototype.getGoToMenuItem=CContextMenu_getGoToMenuItem;
  5504. CContextMenu.prototype.hideDownloadChartMenuItem=CContextMenu_hideDownloadChartMenuItem;
  5505. CContextMenu.prototype.showDownloadChartMenuItem=CContextMenu_showDownloadChartMenuItem;
  5506. CContextMenu.prototype.update=CContextMenu_update;
  5507. CContextMenu.prototype.updateSubscriptionContextMenuItem=CContextMenu_updateSubscriptionContextMenuItem;
  5508. function CReportHistory(_318,_319,_31a,_31b){
  5509. this.m_mainWnd=_318;
  5510. this.m_stack_idx=_319;
  5511. this.m_reportName="";
  5512. if(typeof _31a=="undefined"||_31a==null||_31a.length==0){
  5513. if(typeof _318!="undefined"&&_318!=null){
  5514. var _31c=RV_RES.RV_PREVIOUS_REPORT;
  5515. this.m_reportName=_31c;
  5516. }
  5517. }else{
  5518. this.m_reportName=_31a;
  5519. }
  5520. this.m_params=_31b;
  5521. };
  5522. CReportHistory.prototype.getDropDownMenuIcon=function(){
  5523. var _31d="/ps/portal/images/";
  5524. if(this.m_params["ui.action"]=="view"){
  5525. _31d+="icon_result_";
  5526. if(this.m_params["ui.format"]=="PDF"){
  5527. _31d+="pdf.gif";
  5528. }else{
  5529. _31d+="html.gif";
  5530. }
  5531. }else{
  5532. _31d+="action_run.gif";
  5533. }
  5534. return _31d;
  5535. };
  5536. CReportHistory.prototype.addParamNode=function(_31e,_31f,_320){
  5537. var _321=_31e.ownerDocument.createElement("param");
  5538. _31e.appendChild(_321);
  5539. _321.setAttribute("name",_31f);
  5540. _321.appendChild(_31e.ownerDocument.createTextNode(_320));
  5541. };
  5542. CReportHistory.prototype.saveAsXML=function(_322){
  5543. var _323=_322.ownerDocument.createElement("previousReport");
  5544. _322.appendChild(_323);
  5545. for(var _324 in this.m_params){
  5546. this.addParamNode(_323,_324,this.m_params[_324]);
  5547. }
  5548. this.addParamNode(_323,"ui.name",this.getReportName());
  5549. };
  5550. CReportHistory.prototype.getIdx=function(){
  5551. return this.m_stack_idx;
  5552. };
  5553. CReportHistory.prototype.getReportName=function(){
  5554. return this.m_reportName;
  5555. };
  5556. CReportHistory.prototype.getParameters=function(){
  5557. return this.m_params;
  5558. };
  5559. CReportHistory.prototype.createRequestForm=function(){
  5560. var oCV=this.m_mainWnd.getCV();
  5561. var _326=document.getElementById("formWarpRequest"+oCV.getId());
  5562. var form=document.createElement("form");
  5563. form.setAttribute("id","previousReport");
  5564. form.setAttribute("name","previousReport");
  5565. form.setAttribute("target",_326.getAttribute("target")?_326.getAttribute("target"):"");
  5566. form.setAttribute("method","post");
  5567. form.setAttribute("action",_326.getAttribute("action"));
  5568. form.style.display="none";
  5569. document.body.appendChild(form);
  5570. for(var _328 in this.m_params){
  5571. if(_328!="m_tracking"){
  5572. form.appendChild(createHiddenFormField(_328,this.m_params[_328]));
  5573. }
  5574. }
  5575. for(var _329 in oCV.envParams){
  5576. if(_329.indexOf("cv.")==0&&_329!="cv.previousReports"&&_329!="m_tracking"&&_329!="cv.actionState"){
  5577. form.appendChild(createHiddenFormField(_329,oCV.envParams[_329]));
  5578. }
  5579. }
  5580. if(this.getIdx()>0){
  5581. this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx());
  5582. form.appendChild(createHiddenFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML()));
  5583. }
  5584. form.appendChild(createHiddenFormField("ui.name",this.getReportName()));
  5585. form.appendChild(createHiddenFormField("b_action","cognosViewer"));
  5586. var _32a=_326.getElementsByTagName("INPUT");
  5587. for(var _32b=0;_32b<_32a.length;++_32b){
  5588. if(typeof form[_32a[_32b].name]=="undefined"&&_32a[_32b].name!="cv.previousReports"&&_32a[_32b].name.length>0){
  5589. form.appendChild(createHiddenFormField(_32a[_32b].name,_32a[_32b].value));
  5590. }
  5591. }
  5592. return form;
  5593. };
  5594. CReportHistory.prototype.execute=function(){
  5595. var oCV=this.m_mainWnd.getCV();
  5596. if(typeof oCV.m_viewerFragment!="undefined"){
  5597. var _32d=new ViewerDispatcherEntry(oCV);
  5598. _32d.addFormField("ui.action",this.m_params["ui.action"]);
  5599. for(var _32e in this.m_params){
  5600. if(_32e!="ui.action"&&_32e!="m_tracking"&&_32e!="cv.actionState"){
  5601. _32d.addFormField(_32e,this.m_params[_32e]);
  5602. }
  5603. }
  5604. if(this.getIdx()>0){
  5605. this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx());
  5606. _32d.addFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML());
  5607. }else{
  5608. _32d.removeFormField("cv.previousReports");
  5609. }
  5610. if(this.m_reportName&&this.m_reportName.length>0){
  5611. _32d.addFormField("ui.name",this.m_reportName);
  5612. }
  5613. _32d.addFormField("cv.responseFormat","fragment");
  5614. _32d.addFormField("cv.ignoreState","true");
  5615. _32d.addFormField("cv.id","_THIS_");
  5616. _32d.addFormField("m_tracking","");
  5617. oCV.dispatchRequest(_32d);
  5618. }else{
  5619. var form=this.createRequestForm();
  5620. form.submit();
  5621. }
  5622. };
  5623. function CViewerManager(oCV){
  5624. this.setCV(oCV);
  5625. };
  5626. CViewerManager.prototype=new CViewerHelper();
  5627. CViewerManager.prototype.Print=function(){
  5628. var _331=document.getElementById("CVIFrame"+this.getCVId());
  5629. if(_331){
  5630. if(isIE()){
  5631. _331.contentWindow.document.execCommand("print",true,null);
  5632. }else{
  5633. _331.focus();
  5634. _331.contentWindow.print();
  5635. }
  5636. }
  5637. var cv=this.getCV();
  5638. var _333=cv.rvMainWnd;
  5639. var _334=_333.getToolbarControl();
  5640. if(typeof _334!="undefined"&&_334!=null){
  5641. var _335=_334.getItem("print");
  5642. if(_335){
  5643. _335.setFocus();
  5644. }
  5645. }
  5646. };
  5647. CViewerManager.prototype.DownloadReport=function(){
  5648. var _336="";
  5649. var f=document.forms["formWarpRequest"+this.getCVId()];
  5650. _336+="b_action=xts.run&m=portal/download.xts&m_obj=";
  5651. _336+=f["ui.object"].value;
  5652. _336+="&m_name=";
  5653. _336+=f["ui.name"].value;
  5654. if(f["ui.format"]&&f["ui.format"].value){
  5655. _336+="&format=";
  5656. _336+=f["ui.format"].value;
  5657. }
  5658. _336=constructGETRequestParamsString(_336);
  5659. _336=f.action+"?"+_336;
  5660. location.href=_336;
  5661. };
  5662. CViewerManager.prototype.SaveReport=function(_338){
  5663. var oCV=this.getCV();
  5664. var oReq=new ViewerDispatcherEntry(oCV);
  5665. oReq.setWorkingDialog(null);
  5666. oReq.addFormField("ui.action","save");
  5667. if(!_338){
  5668. oReq.addFormField("run.continueConversation","true");
  5669. }else{
  5670. this.getCV().closeActiveHTTPConnection();
  5671. if(oCV.getWorkingDialog()){
  5672. oCV.getWorkingDialog().hide();
  5673. }
  5674. this.getCV().setKeepSessionAlive(true);
  5675. oReq.addFormField("run.continueConversation","false");
  5676. var _33b=GUtil.generateCallback(executeBackURL,[this.getCV().getId()],null);
  5677. oReq.setCallbacks({"complete":{"method":_33b}});
  5678. }
  5679. oReq.addFormField("run.saveOutput","true");
  5680. this.getCV().dispatchRequest(oReq);
  5681. };
  5682. CViewerManager.prototype.SaveAsReportView=function(_33c){
  5683. var _33d=document.getElementById("formWarpRequest"+this.getCVId());
  5684. if(_33d){
  5685. var _33e=!_33c;
  5686. var _33f={"m":"portal/viewer-saveAs.xts"};
  5687. _33f["run.continueConversation"]=_33e;
  5688. _33f["initializeSave"]="true";
  5689. _33f["ui.object"]=_33d["ui.object"].value;
  5690. _33f["ui.backURL"]=_33d["ui.backURL"].value;
  5691. _33f["ui.routingServerGroup"]=this.getRoutingServerGroup();
  5692. cvLoadDialog(this.getCV(),_33f,600,425,RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE);
  5693. }
  5694. };
  5695. CViewerManager.prototype.init=function(_340){
  5696. if(_340&&typeof _340=="object"){
  5697. for(var _341 in _340){
  5698. this[_341]=_340[_341];
  5699. }
  5700. }
  5701. };
  5702. CViewerManager.prototype.SendReport=function(_342){
  5703. var _343=!_342;
  5704. var _344={"m":"portal/viewer-email.xts"};
  5705. _344["run.continueConversation"]=_343;
  5706. _344["ui.routingServerGroup"]=this.getRoutingServerGroup();
  5707. cvLoadDialog(this.getCV(),_344,800,550,RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE);
  5708. };
  5709. CViewerManager.prototype.validatePromptControls=function(){
  5710. if(typeof this.getCV().preProcessControlArray!="undefined"&&typeof preProcessForm!="undefined"){
  5711. preProcessForm(this.getCV().preProcessControlArray);
  5712. }
  5713. };
  5714. CViewerManager.prototype.RunReport=function(){
  5715. this.validatePromptControls();
  5716. var oReq=null;
  5717. var _346=this.getCV().envParams["ui.object"];
  5718. var _347=this.getCV().envParams["ui.spec"];
  5719. var _348=this.getCV().envParams["ui.action"];
  5720. var _349=document.forms["formWarpRequest"+this.getCVId()];
  5721. if(_347!=null&&_347!=""){
  5722. oReq=new ViewerDispatcherEntry(this.getCV());
  5723. oReq.addFormField("ui.action","runSpecification");
  5724. oReq.addFormField("ui.spec",_347);
  5725. var _34a=this.getCV().envParams["specificationType"];
  5726. if(_34a!=null){
  5727. oReq.addFormField("specificationType",_34a);
  5728. }
  5729. }else{
  5730. if(_346!=null&&_346!=""){
  5731. if(this.getCV().isBux){
  5732. oReq=new ViewerDispatcherEntry(this.getCV());
  5733. oReq.addFormField("ui.action","bux");
  5734. }else{
  5735. oReq=new ViewerDispatcherEntry(this.getCV());
  5736. oReq.addFormField("ui.action","run");
  5737. }
  5738. if(_348=="view"){
  5739. if(this.getCV().envParams["ui.reRunObj"]){
  5740. _346=this.getCV().envParams["ui.reRunObj"];
  5741. }else{
  5742. if(typeof _349["reRunObj"]!="undefined"&&_349["reRunObj"]!=null){
  5743. _346=_349["reRunObj"].value;
  5744. }
  5745. }
  5746. }
  5747. oReq.addFormField("ui.object",_346);
  5748. }
  5749. }
  5750. oReq.addFormField("run.outputFormat",this.getCV().rvMainWnd.getCurrentFormat());
  5751. oReq.addFormField("ui.primaryAction","");
  5752. var _34b=this.getCV().envParams["promptOnRerun"];
  5753. if(_34b!=null){
  5754. oReq.addFormField("run.prompt",_34b);
  5755. }else{
  5756. oReq.addFormField("run.prompt","true");
  5757. }
  5758. this.getCV().preparePromptValues(oReq);
  5759. this.getCV().dispatchRequest(oReq);
  5760. };
  5761. CViewerManager.prototype.viewReport=function(_34c){
  5762. if(this.getCV().rvMainWnd.getCurrentFormat()==_34c){
  5763. return;
  5764. }
  5765. var f=document.forms["formWarpRequest"+this.getCVId()];
  5766. if(f["ui.action"].value=="view"){
  5767. this.viewOutput(_34c);
  5768. }else{
  5769. var oReq=new ViewerDispatcherEntry(this.getCV());
  5770. oReq.addFormField("ui.action","render");
  5771. oReq.addFormField("run.outputFormat",_34c);
  5772. if(this.isExcelFormat(_34c)){
  5773. this.viewInExcel(oReq);
  5774. }else{
  5775. if(this.getCV().isAccessibleMode()&&_34c=="PDF"){
  5776. this.viewPDFInNewWindow(oReq);
  5777. }else{
  5778. if(isSafari()&&_34c=="PDF"){
  5779. oReq.addFormField("ui.reuseWindow","true");
  5780. this.viewPDFInNewWindow(oReq);
  5781. }else{
  5782. this.getCV().deleteTabs();
  5783. this.getCV().dispatchRequest(oReq);
  5784. }
  5785. }
  5786. }
  5787. }
  5788. };
  5789. CViewerManager.prototype.isExcelFormat=function(_34f){
  5790. if(_34f=="xlsxData"||_34f=="XLS"||_34f=="CSV"||_34f=="XLWA"||_34f=="singleXLS"||_34f=="spreadsheetML"){
  5791. return true;
  5792. }
  5793. return false;
  5794. };
  5795. CViewerManager.prototype.viewOutput=function(_350){
  5796. var oFWR=document.forms["formWarpRequest"+this.getCVId()];
  5797. var oReq=new ViewerDispatcherEntry(this.getCV());
  5798. oReq.addFormField("ui.action","view");
  5799. oReq.addFormField("cv.responseFormat","view");
  5800. oReq.addFormField("ui.format",_350);
  5801. var _353="";
  5802. switch(_350){
  5803. case "HTML":
  5804. _353=this.getCV().oOutputFormatPath.HTML;
  5805. break;
  5806. case "PDF":
  5807. _353=this.getCV().oOutputFormatPath.PDF;
  5808. break;
  5809. case "singleXLS":
  5810. _353=this.getCV().oOutputFormatPath.singleXLS;
  5811. break;
  5812. case "XLS":
  5813. _353=this.getCV().oOutputFormatPath.XLS;
  5814. break;
  5815. case "XLWA":
  5816. _353=this.getCV().oOutputFormatPath.XLWA;
  5817. break;
  5818. case "CSV":
  5819. _353=this.getCV().oOutputFormatPath.CSV;
  5820. break;
  5821. case "XML":
  5822. _353=this.getCV().oOutputFormatPath.XML;
  5823. break;
  5824. case "spreadsheetML":
  5825. _353=this.getCV().oOutputFormatPath.spreadsheetML;
  5826. break;
  5827. case "xlsxData":
  5828. _353=this.getCV().oOutputFormatPath.xlsxData;
  5829. break;
  5830. }
  5831. if(_353){
  5832. oReq.addFormField("ui.object",_353);
  5833. }
  5834. oReq.addFormField("reRunObj",oFWR.reRunObj.value);
  5835. oReq.addFormField("ui.format",_350);
  5836. oReq.addFormField("ui.name",oFWR["ui.name"].value);
  5837. if(this.isExcelFormat(_350)){
  5838. this.viewInExcel(oReq);
  5839. }else{
  5840. if(this.getCV().isAccessibleMode()&&_350=="PDF"){
  5841. this.viewPDFInNewWindow(oReq);
  5842. }else{
  5843. if(isSafari()&&_350=="PDF"){
  5844. oReq.addFormField("ui.reuseWindow","true");
  5845. this.viewPDFInNewWindow(oReq);
  5846. }else{
  5847. this.getCV().dispatchRequest(oReq);
  5848. }
  5849. }
  5850. }
  5851. };
  5852. CViewerManager.prototype.viewPDFInNewWindow=function(oReq){
  5853. this.viewInNewWindow(oReq,__pdf_win);
  5854. };
  5855. CViewerManager.prototype.viewInExcel=function(oReq){
  5856. this.viewInNewWindow(oReq,__excel_win);
  5857. };
  5858. CViewerManager.prototype.viewInNewWindow=function(oReq,_357){
  5859. var _358=window.onbeforeunload;
  5860. window.onbeforeunload=null;
  5861. if(_357!=null){
  5862. _357.close();
  5863. }
  5864. var _359="winNAT_"+(new Date()).getTime();
  5865. var _35a=this.getCV().getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
  5866. var _35b="viewForm"+this.getCVId();
  5867. var _35c=document.getElementById(_35b);
  5868. if(_35c){
  5869. _35c.parentNode.removeChild(_35c);
  5870. }
  5871. _35c=document.createElement("form");
  5872. _35c.setAttribute("method","post");
  5873. _35c.setAttribute("id",_35b);
  5874. _35c.setAttribute("action",this.getCV().getGateway());
  5875. _35c.style.display="inline";
  5876. var oFWR=document["formWarpRequest"+this.getCVId()];
  5877. if(oFWR&&oFWR["run.outputFormat"]){
  5878. oReq.addFormField("previousFormat",oFWR["run.outputFormat"].value);
  5879. }
  5880. var _35e=oReq.getFormFields().keys();
  5881. for(var _35f=0;_35f<_35e.length;_35f++){
  5882. var name=_35e[_35f];
  5883. if(name!="cv.responseFormat"&&name!="b_action"&&name!="m_tracking"){
  5884. _35c.appendChild(createHiddenFormField(name,oReq.getFormField(name)));
  5885. }
  5886. }
  5887. _35c.appendChild(createHiddenFormField("cv.responseFormat","page"));
  5888. _35c.appendChild(createHiddenFormField("b_action","cognosViewer"));
  5889. _35c.appendChild(createHiddenFormField("BIline1",RV_RES.RV_RUNNING));
  5890. _35c.appendChild(createHiddenFormField("BIline2",RV_RES.RV_PLEASE_WAIT));
  5891. if(this.getCV().envParams["ui.name"]){
  5892. _35c.appendChild(createHiddenFormField("ui.name",this.getCV().envParams["ui.name"]));
  5893. }
  5894. document.body.appendChild(_35c);
  5895. _35c.target=_359;
  5896. _357=window.open(_35a,_359,"rv");
  5897. window.onbeforeunload=_358;
  5898. };
  5899. CViewerManager.prototype.cancel=function(){
  5900. var oCV=this.getCV();
  5901. oCV.cancel();
  5902. };
  5903. CViewerManager.prototype.sXmlEncode=function(_362){
  5904. var _363=""+_362;
  5905. if((_363=="0")||((_362!=null)&&(_362!=false))){
  5906. _363=_363.replace(/&/g,"&amp;");
  5907. _363=_363.replace(/</g,"&lt;");
  5908. _363=_363.replace(/>/g,"&gt;");
  5909. _363=_363.replace(/"/g,"&quot;");
  5910. _363=_363.replace(/'/g,"&apos;");
  5911. }else{
  5912. if(_362==null){
  5913. _363="";
  5914. }
  5915. }
  5916. return _363;
  5917. };
  5918. CViewerManager.prototype.exit=function(_364){
  5919. var form=document.getElementById("formWarpRequest"+this.getCVId());
  5920. var oCV=this.getCV();
  5921. if(form&&form["ui.action"]&&form["ui.action"].value=="view"&&_364){
  5922. executeBackURL(this.getCVId());
  5923. }else{
  5924. if(oCV.getKeepSessionAlive()==false){
  5925. oCV.exit(_364);
  5926. }
  5927. }
  5928. };
  5929. function executeBackURL(_367){
  5930. var _368="";
  5931. if(_367){
  5932. _368=_367;
  5933. }
  5934. if(window["oCV"+_368]&&window["oCV"+_368].isBux){
  5935. return false;
  5936. }
  5937. var form=document.getElementById("formWarpRequest"+_368);
  5938. if(form["ui.backURL"].value.length<2048){
  5939. document.location.href=form["ui.backURL"].value;
  5940. return;
  5941. }
  5942. var _36a=decodeURIComponent(form["ui.backURL"].value);
  5943. var _36b=_36a.split("?");
  5944. var _36c=document.createElement("form");
  5945. _36c.style.display="none";
  5946. _36c.setAttribute("method","post");
  5947. _36c.setAttribute("action",_36b[0]);
  5948. _36c.setAttribute("target","_self");
  5949. var _36d=_36b[1].split("&");
  5950. for(var _36e=0;_36e<_36d.length;_36e++){
  5951. var _36f=_36d[_36e].indexOf("=");
  5952. var _370=_36d[_36e].substr(0,_36f);
  5953. var _371=_36d[_36e].substr(_36f+1);
  5954. var _372=document.createElement("input");
  5955. _372.setAttribute("type","hidden");
  5956. _372.setAttribute("name",decodeURIComponent(_370));
  5957. _372.setAttribute("value",decodeURIComponent(_371));
  5958. _36c.appendChild(_372);
  5959. }
  5960. document.body.appendChild(_36c);
  5961. _36c.submit();
  5962. };
  5963. CViewerManager.prototype.getRoutingServerGroup=function(){
  5964. var oCV=this.getCV();
  5965. if(oCV.envParams["ui.routingServerGroup"]){
  5966. return oCV.envParams["ui.routingServerGroup"];
  5967. }
  5968. return "";
  5969. };
  5970. CViewerManager.prototype.launchQS=function(){
  5971. var _374=document.forms["formWarpRequest"+this.getCVId()];
  5972. var oCV=this.getCV();
  5973. if(typeof oCV.m_viewerFragment!="undefined"){
  5974. cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
  5975. }else{
  5976. cognosLaunch("ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.backURL",_374["ui.backURL"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
  5977. }
  5978. };
  5979. CViewerManager.prototype.launchAS=function(){
  5980. var _376=document.forms["formWarpRequest"+this.getCVId()];
  5981. cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_376.action,"ui.tool","AnalysisStudio","ui.action","edit","ui.object",_376["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
  5982. };
  5983. CViewerManager.prototype.launchRS=function(){
  5984. var _377=document.forms["formWarpRequest"+this.getCVId()];
  5985. cognosLaunchInWindow("_blank","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_377.action,"ui.tool","ReportStudio","ui.action","edit","ui.profile","Professional","ui.object",_377["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
  5986. };
  5987. CViewerManager.prototype.returnHome=function(url){
  5988. var _379=document.forms["formWarpRequest"+this.getCVId()];
  5989. _379["ui.backURL"].value=url;
  5990. executeBackURL(this.getCVId());
  5991. };
  5992. CViewerManager.prototype.doPostBack=function(){
  5993. var f=document.forms["formWarpRequest"+this.getCVId()];
  5994. f.appendChild(createHiddenFormField("b_action","xts.run"));
  5995. f.appendChild(createHiddenFormField("m",f["ui.postBack"].value));
  5996. f.submit();
  5997. };
  5998. CViewerManager.prototype.hideAbout=function(){
  5999. this.getCV().removeTransparentBackgroundLayer();
  6000. var cvId=this.getCV().getId();
  6001. if(document.getElementById("viewerAboutDiv"+cvId)){
  6002. document.getElementById("viewerAboutDiv"+cvId).parentNode.removeChild(document.getElementById("viewerAboutDiv"+cvId));
  6003. }
  6004. if(document.getElementById("viewerAboutIframe"+cvId)){
  6005. document.getElementById("viewerAboutIframe"+cvId).parentNode.removeChild(document.getElementById("viewerAboutIframe"+cvId));
  6006. }
  6007. };
  6008. function viewerAboutOnKeyDown(evt){
  6009. evt=(evt)?evt:((event)?event:null);
  6010. var _37d=getCrossBrowserNode(evt);
  6011. if(evt.keyCode=="13"||evt.keyCode=="27"||evt.keyCode=="32"){
  6012. var oCV=window["oCV"+_37d.getAttribute("viewerId")];
  6013. oCV.m_oCVMgr.hideAbout();
  6014. return stopEventBubble(evt);
  6015. }
  6016. };
  6017. CViewerManager.prototype.fileExist=function(_37f){
  6018. var http=null;
  6019. if(window.XMLHttpRequest){
  6020. http=new XMLHttpRequest();
  6021. }else{
  6022. http=new ActiveXObject("Msxml2.XMLHTTP");
  6023. }
  6024. http.open("HEAD",_37f,false);
  6025. http.send();
  6026. return (http.status==200);
  6027. };
  6028. CViewerManager.prototype.getAboutBoxImageURL=function(){
  6029. var _381="about_"+this.getCV().getProductLocale()+".jpg";
  6030. var _382=this.getCV().getWebContentRoot()+"/rv/images/";
  6031. var _383=_382+_381;
  6032. if(!this.fileExist(_383)){
  6033. _383=_382+"about_en.jpg";
  6034. }
  6035. return _383;
  6036. };
  6037. CViewerManager.prototype.about=function(){
  6038. if(document.getElementById("viewerAbout"+this.getCV().getId())){
  6039. this.hideAbout();
  6040. }
  6041. this.getCV().createTransparentBackgroundLayer();
  6042. var _384=650;
  6043. var _385=522;
  6044. var _386=document.createElement("iframe");
  6045. _386.id="viewerAboutIframe"+this.getCV().getId();
  6046. _386.style.position="absolute";
  6047. _386.style.zIndex=99;
  6048. _386.style.width=_384+"px";
  6049. _386.style.height=_385+"px";
  6050. _386.setAttribute("src",this.getCV().getWebContentRoot()+"/common/blank.html");
  6051. _386.setAttribute("scrolling","no");
  6052. _386.setAttribute("frameborder","0");
  6053. _386.setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
  6054. _386.setAttribute("role","presentation");
  6055. document.body.appendChild(_386);
  6056. var id=this.getCV().getId();
  6057. var _388=document.createElement("div");
  6058. _388.tabIndex=0;
  6059. _388.onfocus=function(){
  6060. document.getElementById("viewerAboutOK"+id).focus();
  6061. };
  6062. document.body.appendChild(_388);
  6063. var div=document.createElement("div");
  6064. div.id="viewerAboutDiv"+this.getCV().getId();
  6065. div.style.position="absolute";
  6066. div.onkeydown=viewerAboutOnKeyDown;
  6067. div.style.zIndex=100;
  6068. div.style.width=_384+"px";
  6069. div.style.height=_385+"px";
  6070. div.style.outline="none";
  6071. div.setAttribute("role","dialog");
  6072. div.setAttribute("aria-label",RV_RES.RV_ABOUT_DESCRIPTION);
  6073. var _38a=this.getAboutBoxImageURL();
  6074. var _38b=RV_RES.RV_ABOUT_DESCRIPTION.replace(/"/g,"&quot;")+RV_RES.IDS_PROP_LEGAL.replace(/"/g,"&quot;");
  6075. div.innerHTML="<img role=\"img\" id=\"viewerAbout"+this.getCV().getId()+"\" tabIndex=\"0\" alt=\""+_38b+"\" title=\""+_38b+"\" src=\""+_38a+"\" onclick=\""+getCognosViewerObjectString(this.getCV().getId())+".m_oCVMgr.hideAbout()\"></img>";
  6076. div.setAttribute("viewerId",this.getCV().getId());
  6077. document.body.appendChild(div);
  6078. this.createOKButton(div);
  6079. var _38c=document.createElement("div");
  6080. _38c.tabIndex=0;
  6081. _38c.onfocus=function(){
  6082. document.getElementById("viewerAbout"+id).focus();
  6083. };
  6084. document.body.appendChild(_38c);
  6085. var _38d=0;
  6086. var _38e=0;
  6087. if(typeof window.innerHeight!="undefined"){
  6088. _38d=Math.round((window.innerHeight/2)-(_385/2));
  6089. _38e=Math.round((window.innerWidth/2)-(_384/2));
  6090. }else{
  6091. _38d=Math.round((document.body.clientHeight/2)-(_385/2));
  6092. _38e=Math.round((document.body.clientWidth/2)-(_384/2));
  6093. }
  6094. div.style.bottom=_386.style.bottom=_38d+"px";
  6095. div.style.left=_386.style.left=_38e+"px";
  6096. setTimeout("document.getElementById('viewerAbout"+id+"').focus();",1);
  6097. };
  6098. CViewerManager.prototype.createOKButton=function(_38f){
  6099. var _390=document.createElement("div");
  6100. _390.style.backgroundcolor="#FFFFFF";
  6101. _390.id="viewerAboutOK"+this.getCV().getId();
  6102. _390.setAttribute("role","button");
  6103. _390.setAttribute("viewerId",this.getCV().getId());
  6104. _390.setAttribute("tabIndex","0");
  6105. var _391=this;
  6106. _390.onclick=function(){
  6107. _391.hideAbout();
  6108. };
  6109. _390.onkeydown=viewerAboutOnKeyDown;
  6110. _390.className="aboutOkButton";
  6111. _38f.appendChild(_390);
  6112. var span=document.createElement("span");
  6113. span.style.padding="7px 30px 7px 30px";
  6114. span.appendChild(document.createTextNode(RV_RES.IDS_JS_OK));
  6115. _390.appendChild(span);
  6116. };
  6117. CViewerManager.prototype.updateUserName=function(){
  6118. var _393=new DataDispatcherEntry(this.getCV());
  6119. _393.addFormField("ui.action","CMRequest");
  6120. _393.addFormField("CMRequest","<CMRequest><searchPath>~</searchPath><properties><property>defaultName</property></properties></CMRequest>");
  6121. _393.addFormField("cv.responseFormat","CMRequest");
  6122. _393.addFormField("cv.catchLogOnFault","true");
  6123. _393.addFormField("cv.id",this.getCVId());
  6124. _393.setCallbacks({"complete":{"object":this,"method":this.updateUserNameCallback}});
  6125. _393.setCanBeQueued(true);
  6126. this.getCV().dispatchRequest(_393);
  6127. };
  6128. CViewerManager.prototype.updateUserNameCallback=function(_394){
  6129. var _395=this.getUserNameFromResponse(_394);
  6130. if(_395!=null){
  6131. var _396="userNameTD"+this.getCVId();
  6132. var _397=document.getElementById(_396);
  6133. if(_397!=null){
  6134. _397.innerHTML=html_encode(_395);
  6135. }
  6136. var _398=this.getCV().rvMainWnd.getBannerToolbar();
  6137. if(_398){
  6138. for(var _399=0;_399<_398.getNumItems();_399++){
  6139. if(typeof _398.get(_399).getId=="function"&&_398.get(_399).getId()==_396){
  6140. _398.get(_399).setText(html_encode(_395));
  6141. break;
  6142. }
  6143. }
  6144. }
  6145. }
  6146. };
  6147. CViewerManager.prototype.getUserNameFromResponse=function(_39a){
  6148. if(_39a){
  6149. var _39b=XMLBuilderLoadXMLFromString(_39a.getResult());
  6150. var _39c=XMLHelper_FindChildByTagName(_39b,"defaultName",true);
  6151. if(_39c!=null){
  6152. var _39d=XMLHelper_FindChildByTagName(_39c,"value",false);
  6153. if(_39d!=null){
  6154. return XMLHelper_GetText(_39d);
  6155. }
  6156. }
  6157. }
  6158. return null;
  6159. };
  6160. CViewerManager.prototype.getAvailableOutput=function(){
  6161. var oCV=this.getCV();
  6162. var _39f=document.getElementById("formWarpRequest"+this.getCVId());
  6163. var _3a0=new JSONDispatcherEntry(this.getCV());
  6164. _3a0.addFormField("ui.action","getAvailableOutputs");
  6165. _3a0.addFormField("cv.responseFormat","getAvailableOutputs");
  6166. _3a0.addFormField("ui.object",_39f["ui.object"].value);
  6167. _3a0.addFormField("ui.reportVersion",_39f["ui.reportVersion"].value);
  6168. _3a0.addFormField("reRunObj",_39f["reRunObj"].value);
  6169. _3a0.addFormField("ui.outputLocale",_39f["ui.outputLocale"].value);
  6170. _3a0.addFormField("ui.burstKey",_39f["ui.burstKey"].value);
  6171. _3a0.addFormField("cv.id",this.getCVId());
  6172. _3a0.setCallbacks({"complete":{"object":this,"method":this.getAvailableOutputResponseCallback}});
  6173. oCV.dispatchRequest(_3a0);
  6174. };
  6175. CViewerManager.prototype.getAvailableOutputResponseCallback=function(_3a1){
  6176. var oCV=this.getCV();
  6177. oCV.init(_3a1.getJSONResponseObject());
  6178. oCV.rvMainWnd.renderAvailableOutputs();
  6179. };
  6180. CViewerManager.prototype.authenticate=function(_3a3,url){
  6181. this.exit();
  6182. this.getCV().setKeepSessionAlive(true);
  6183. if(window.delCookie){
  6184. delCookie("cc_state");
  6185. }
  6186. if(_3a3=="logon"||_3a3=="relogon"){
  6187. location.href=url+"&h_CAM_action=logon&m_reload=";
  6188. }
  6189. if(_3a3=="logoff"){
  6190. location.href=url+"&h_CAM_action=logoff";
  6191. }
  6192. };
  6193. CViewerManager.prototype.launchNewGeneral=function(_3a5,_3a6){
  6194. var _3a7=document.getElementById("formWarpRequest"+this.getCVId());
  6195. if(_3a7){
  6196. var _3a8="";
  6197. if(_3a7["reRunObj"]){
  6198. _3a8=_3a7["reRunObj"].value;
  6199. }else{
  6200. _3a8=_3a7["ui.object"].value;
  6201. }
  6202. var _3a9=this.getCV().getGateway()+"?"+constructGETRequestParamsString("b_action=xts.run&m=portal/viewer-closeIframe.xts&cv.id="+this.getCVId());
  6203. var _3aa={"m":"portal/new_general.xts","m_new_class":_3a5,"so.searchPath":_3a6,"m_name":this.getCV().envParams["ui.name"],"m_obj_searchPath":_3a8,"m_obj":_3a8};
  6204. _3aa["ui.backURL"]=_3a9;
  6205. cvLoadDialog(this.getCV(),_3aa,500,425,RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE);
  6206. }
  6207. };
  6208. CViewerManager.prototype.addToBookmarks=function(){
  6209. var _3ab=document.getElementById("formWarpRequest"+this.getCVId());
  6210. var _3ac=this.getCV().envParams;
  6211. var _3ad="b_action=cognosViewer";
  6212. for(var _3ae in _3ac){
  6213. if(_3ae.indexOf("ui.")==0&&_3ae!="ui.primaryAction"&&_3ae!="ui.backURL"&&_3ac!="ui.spec"&&_3ae!="ui.conversation"&&_3ae!="ui.cafcontextid"){
  6214. _3ad+="&"+_3ae+"=";
  6215. if(_3ae=="ui.action"&&_3ac["ui.primaryAction"]!=""){
  6216. _3ad+=encodeURIComponent(_3ac["ui.primaryAction"]);
  6217. }else{
  6218. _3ad+=encodeURIComponent(_3ac[_3ae]);
  6219. }
  6220. }
  6221. if(_3ae.indexOf("run.")==0){
  6222. _3ad+="&"+_3ae+"="+encodeURIComponent(_3ac[_3ae]);
  6223. }
  6224. }
  6225. var sURL=this.getCV().sGateway+"?"+constructGETRequestParamsString(_3ad);
  6226. var _3b0="";
  6227. if(_3ab["ui.action"].value=="view"){
  6228. if(typeof _3ac["versionName"]!="undefined"&&_3ac["versionName"]!=""){
  6229. _3b0=RV_RES.RV_VIEW_REPORT;
  6230. }else{
  6231. _3b0=RV_RES.RV_VIEW_RECENT_REPORT;
  6232. }
  6233. }
  6234. if(_3ab["ui.action"].value=="run"){
  6235. _3b0=RV_RES.RV_RUN_REPORT;
  6236. }
  6237. if(_3b0!=""){
  6238. _3b0+=" - ";
  6239. }
  6240. _3b0+=_3ac["ui.name"];
  6241. window.external.AddFavorite(sURL,_3b0);
  6242. };
  6243. function leavingRV(){
  6244. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  6245. for(var _3b1=0;_3b1<window.gaRV_INSTANCES.length;_3b1++){
  6246. try{
  6247. var oCV=window.gaRV_INSTANCES[_3b1];
  6248. if(oCV){
  6249. var oRV=oCV.getRV();
  6250. if(oRV){
  6251. oRV.exit();
  6252. }
  6253. }
  6254. }
  6255. catch(e){
  6256. }
  6257. }
  6258. }
  6259. };
  6260. function viewerMainKeyPress(evt){
  6261. evt=(evt)?evt:((event)?event:null);
  6262. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  6263. for(var _3b5=0;_3b5<window.gaRV_INSTANCES.length;_3b5++){
  6264. try{
  6265. var oCV=window.gaRV_INSTANCES[_3b5];
  6266. if(oCV&&oCV.getId()=="_NS_"){
  6267. var _3b7=evt.keyCode;
  6268. if(_3b7==0&&typeof evt.charCode!="undefined"){
  6269. _3b7=evt.charCode;
  6270. }
  6271. if(!oCV.getViewerWidget()&&(_3b7=="64"||_3b7=="50")&&evt.shiftKey==true&&evt.ctrlKey==true){
  6272. if(oCV.focusBackToMainContent){
  6273. oCV.focusBackToMainContent(evt);
  6274. return stopEventBubble(evt);
  6275. }
  6276. }else{
  6277. if(!oCV.getViewerWidget()&&(_3b7=="51"||_3b7=="110")&&evt.shiftKey==true&&evt.ctrlKey==true){
  6278. var _3b8=document.getElementById("CVNavLinks"+oCV.getId());
  6279. if(_3b8){
  6280. _3b8.setAttribute("tabIndex","-1");
  6281. _3b8.focus();
  6282. return stopEventBubble(evt);
  6283. }
  6284. }else{
  6285. if(!oCV.getViewerWidget()&&_3b7=="49"&&evt.shiftKey==true&&evt.ctrlKey==true){
  6286. if(oCV.focusBackToContent){
  6287. oCV.focusBackToContent(evt);
  6288. return stopEventBubble(evt);
  6289. }
  6290. }
  6291. }
  6292. }
  6293. }
  6294. }
  6295. catch(e){
  6296. }
  6297. }
  6298. }
  6299. };
  6300. var g_ViewerResizeTimer=0;
  6301. function onResizeViewerEvent(evt){
  6302. clearTimeout(g_ViewerResizeTimer);
  6303. g_ViewerResizeTimer=setTimeout(resizePinnedContainers,200);
  6304. };
  6305. function constructGETRequestParamsString(_3ba){
  6306. if(typeof CAFXSSEncode=="function"){
  6307. if(_3ba.indexOf("?")>=0){
  6308. var _3bb=_3ba.split("?");
  6309. return _3bb[0]+"?"+CAFXSSEncode(_3bb[_3bb.length-1]);
  6310. }
  6311. return CAFXSSEncode(_3ba);
  6312. }else{
  6313. return _3ba;
  6314. }
  6315. };
  6316. function sortReportHistoryStackDescending(a,b){
  6317. return (b.getIdx()-a.getIdx());
  6318. };
  6319. function sortReportHistoryStackAscending(a,b){
  6320. return (b.getIdx()-a.getIdx());
  6321. };
  6322. gToolbarButtonStyle=new CUIStyle("toolbarButton","toolbarButtonOver","toolbarButtonPressed","toolbarButtonOverPressed","toolbarButton");
  6323. gToolbarStyle=new CUIStyle("mainViewerHeader3","","","","");
  6324. gBannerButtonStyle=new CUIStyle("bannerToolbarButton","bannerToolbarButtonOver","","","");
  6325. gBannerToolbarStyle=new CUIStyle("bannerButtonContainer","","","","");
  6326. gMenuItemStyle=new CUIStyle("menuItem_normal","menuItem_hover","","","menuItem_disabled");
  6327. gMenuStyle=new CUIStyle("clsMenu","","","","");
  6328. gMenuSeperatorStyle=new CUIStyle("menuHorizontalSeperator","","","","");
  6329. gBannerItemStyle=new CUIStyle("bannerMenuItem","bannerMenuItemOver","","","");
  6330. gBannerStaticText=new CUIStyle("bannerText","","","","");
  6331. gBannerLink=new CUIStyle("bannerLink","bannerLink","","","");
  6332. gMenuSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle);
  6333. gToolbarSeperator=new CSeperator("horizonal_blank","5");
  6334. function CMainWnd(oCV){
  6335. this.setCV(oCV);
  6336. this.m_contextMenu=null;
  6337. this.m_reportHistoryList=[];
  6338. this.m_currentFormat="";
  6339. this.m_toolbar=null;
  6340. this.m_bannerToolbar=null;
  6341. this.m_browserHistoryIndex=history.length;
  6342. this.m_showContextMenuOnClick=false;
  6343. if(oCV.getConfig&&oCV.getConfig()){
  6344. var _3c1=oCV.getConfig().getEventsConfig();
  6345. this.m_showContextMenuOnClick=_3c1?_3c1.getShowContextMenuOnClick():false;
  6346. }
  6347. };
  6348. CMainWnd.prototype=new CViewerHelper();
  6349. CMainWnd.prototype.setBannerToolbar=function(_3c2){
  6350. this.m_bannerToolbar=new CViewerToolbar();
  6351. this.m_bannerToolbar.init(_3c2);
  6352. };
  6353. CMainWnd.prototype.getBannerToolbar=function(){
  6354. if(this.m_bannerToolbar){
  6355. return this.m_bannerToolbar.getCBar();
  6356. }
  6357. return null;
  6358. };
  6359. CMainWnd.prototype.closeContextMenuAndToolbarMenus=function(){
  6360. var _3c3=this.getToolbar();
  6361. if(_3c3){
  6362. _3c3.closeMenus();
  6363. }
  6364. var cm=this.getContextMenu();
  6365. if(cm){
  6366. cm.m_contextMenu.remove();
  6367. }
  6368. };
  6369. CMainWnd.prototype.setToolbar=function(_3c5){
  6370. this.m_toolbar=new CViewerToolbar();
  6371. this.m_toolbar.init(_3c5);
  6372. };
  6373. CMainWnd.prototype.getToolbar=function(){
  6374. if(this.m_toolbar){
  6375. return this.m_toolbar.getCBar();
  6376. }
  6377. return null;
  6378. };
  6379. CMainWnd.prototype.getToolbarControl=function(){
  6380. return this.m_toolbar;
  6381. };
  6382. CMainWnd.prototype.setCurrentFormat=function(_3c6){
  6383. this.m_currentFormat=_3c6;
  6384. };
  6385. CMainWnd.prototype.updateToolbar=function(_3c7){
  6386. this.updateCurrentFormat(_3c7,this.getCV().getWebContentRoot());
  6387. this.updateKeepThisVersion();
  6388. };
  6389. CMainWnd.prototype.updateKeepThisVersion=function(){
  6390. if(this.getCV().getStatus()=="complete"){
  6391. var _3c8=this.getCV().getSecondaryRequests();
  6392. var _3c9=false;
  6393. var _3ca=false;
  6394. var _3cb=false;
  6395. if(_3c8){
  6396. for(var _3cc=0;_3cc<_3c8.length;_3cc++){
  6397. switch(_3c8[_3cc]){
  6398. case "save":
  6399. _3c9=true;
  6400. break;
  6401. case "saveAs":
  6402. _3ca=true;
  6403. break;
  6404. case "email":
  6405. _3cb=true;
  6406. break;
  6407. }
  6408. }
  6409. }
  6410. var _3cd=this.getToolbarControl();
  6411. if(_3cd){
  6412. var _3ce=_3cd.getItem("keepThisVersion");
  6413. if(_3ce){
  6414. if(!_3c9&&!_3ca&&!_3cb){
  6415. _3ce.hide();
  6416. }else{
  6417. _3ce.show();
  6418. }
  6419. var _3cf=_3ce.getMenu();
  6420. if(_3c9||_3ca||_3cb){
  6421. if(_3cf){
  6422. var _3d0=_3cf.getItem("saveReport");
  6423. if(_3d0){
  6424. if(_3c9){
  6425. _3d0.show();
  6426. }else{
  6427. _3d0.hide();
  6428. }
  6429. }
  6430. var _3d1=_3cf.getItem("saveAsReportView");
  6431. if(_3d1){
  6432. if(_3ca){
  6433. _3d1.show();
  6434. }else{
  6435. _3d1.hide();
  6436. }
  6437. }
  6438. var _3d2=_3cf.getItem("emailReport");
  6439. if(_3d2){
  6440. if(_3cb){
  6441. _3d2.show();
  6442. }else{
  6443. _3d2.hide();
  6444. }
  6445. }
  6446. }
  6447. }
  6448. }
  6449. }
  6450. }
  6451. };
  6452. function CMainWnd_updateCurrentFormat(_3d3,_3d4){
  6453. var _3d5="";
  6454. var _3d6="";
  6455. switch(_3d3){
  6456. case "HTML":
  6457. case "HTMLFragment":
  6458. case "XHTMLFRGMT":
  6459. _3d5=_3d4+"/rv/images/action_view_html.gif";
  6460. _3d6=RV_RES.RV_VIEW_HTML;
  6461. break;
  6462. case "PDF":
  6463. _3d5=_3d4+"/rv/images/action_view_pdf.gif";
  6464. _3d6=RV_RES.RV_VIEW_PDF;
  6465. break;
  6466. case "XML":
  6467. _3d5=_3d4+"/rv/images/action_view_xml.gif";
  6468. _3d6=RV_RES.RV_VIEW_XML;
  6469. break;
  6470. }
  6471. if(_3d5!=""&&_3d6!=""){
  6472. var _3d7=this.getToolbarControl();
  6473. if(_3d7){
  6474. var _3d8=this.getCV().envParams["ui.action"]=="view";
  6475. var _3d9=null;
  6476. if(_3d8){
  6477. _3d9=_3d7.getItem("viewIn");
  6478. }else{
  6479. _3d9=_3d7.getItem("runIn");
  6480. }
  6481. if(_3d9){
  6482. _3d9.setIcon(_3d5);
  6483. _3d9.setToolTip(_3d6);
  6484. var sRV=this.getCVObjectRef()+".getRV().";
  6485. _3d9.setAction("javascript:"+sRV+"viewReport('"+_3d3+"');");
  6486. }
  6487. }
  6488. }
  6489. this.setCurrentFormat(_3d3);
  6490. };
  6491. CMainWnd.prototype.getCurrentFormat=function(){
  6492. return this.m_currentFormat;
  6493. };
  6494. function CMainWnd_getSelectionController(){
  6495. var _3db;
  6496. try{
  6497. _3db=getCognosViewerSCObjectRef(this.getCV().getId());
  6498. }
  6499. catch(e){
  6500. _3db=null;
  6501. }
  6502. return _3db;
  6503. };
  6504. var g_oPressTimer=null;
  6505. var g_bLongPressDetected=false;
  6506. var g_oPreviousValues={};
  6507. if(window.attachEvent){
  6508. window.attachEvent("onmouseout",f_cancelLongTouch);
  6509. window.attachEvent("ontouchstart",onTouchStart);
  6510. window.attachEvent("ontouchend",f_cancelLongTouch);
  6511. window.attachEvent("ontouchleave",f_cancelLongTouch);
  6512. window.attachEvent("ontouchcancel",f_cancelLongTouch);
  6513. }else{
  6514. if(window.addEventListener){
  6515. window.addEventListener("mouseout",f_cancelLongTouch);
  6516. window.addEventListener("touchstart",onTouchStart);
  6517. window.addEventListener("touchend",f_cancelLongTouch);
  6518. window.addEventListener("touchleave",f_cancelLongTouch);
  6519. window.addEventListener("touchcancel",f_cancelLongTouch);
  6520. }
  6521. }
  6522. function f_cancelLongTouch(evt){
  6523. if(isIOS()){
  6524. if(g_oPressTimer!==null){
  6525. clearTimeout(g_oPressTimer);
  6526. g_oPressTimer=null;
  6527. }
  6528. }
  6529. };
  6530. function onTouchStart(evt){
  6531. if(isIOS()){
  6532. g_bLongPressDetected=false;
  6533. g_oPressTimer=setTimeout(function(){
  6534. var node=getNodeFromEvent(evt);
  6535. g_oPreviousValues.webkitTouchCallout=node.style.getPropertyValue("webkitTouchCallout");
  6536. g_oPreviousValues.webkitUserSelect=node.style.getPropertyValue("webkitUserSelect");
  6537. node.style.webkitTouchCallout="None";
  6538. node.style.webkitUserSelect="None";
  6539. g_bLongPressDetected=true;
  6540. },1500);
  6541. }
  6542. return false;
  6543. };
  6544. function CMainWnd_pageClicked(evt){
  6545. var oCV=this.getCV();
  6546. f_cancelLongTouch(evt);
  6547. if(this.m_showContextMenuOnClick||(isIOS()&&g_bLongPressDetected)){
  6548. var node=getNodeFromEvent(evt);
  6549. if(node&&typeof node.onclick!="function"&&(node.nodeName.toLowerCase()!="span"||typeof node.parentNode.onclick!="function")){
  6550. oCV.dcm(evt,true);
  6551. if(isIOS()&&g_bLongPressDetected){
  6552. node.style.webkitTouchCallout=g_oPreviousValues.webkitTouchCallout;
  6553. node.style.webkitUserSelect=g_oPreviousValues.webkitUserSelect;
  6554. }
  6555. return stopEventBubble(evt);
  6556. }
  6557. }
  6558. this.hideOpenMenus();
  6559. if(oCV!=null){
  6560. if(typeof oCV.sortColumn=="undefined"||!oCV.sortColumn(evt)){
  6561. var _3e2=oCV.getDrillMgr();
  6562. if(_3e2){
  6563. var _3e3=_3e2.singleClickDrillEvent(evt,"RV");
  6564. }
  6565. }
  6566. }
  6567. if(oCV.getViewerWidget()){
  6568. oCV.getViewerWidget().updateToolbar();
  6569. }
  6570. setNodeFocus(evt);
  6571. if(_3e3){
  6572. return stopEventBubble(evt);
  6573. }
  6574. };
  6575. function CMainWnd_hideOpenMenus(){
  6576. var cm=this.getContextMenu();
  6577. if(typeof cm!="undefined"&&cm!=null){
  6578. cm.hide();
  6579. }
  6580. var tb=this.getToolbar();
  6581. if(typeof tb!="undefined"&&tb!=null){
  6582. tb.closeMenus();
  6583. }
  6584. var _3e6=this.getBannerToolbar();
  6585. if(_3e6!="undefined"&&_3e6!=null){
  6586. _3e6.closeMenus();
  6587. }
  6588. };
  6589. function CMainWnd_draw(){
  6590. var _3e7=this.getToolbar();
  6591. if(_3e7&&this.m_uiBlackList.indexOf(" RV_TOOLBAR_BUTTONS ")){
  6592. var _3e8="";
  6593. var f=document.forms["formWarpRequest"+this.getCVId()];
  6594. if(f["run.outputFormat"]&&f["run.outputFormat"].value){
  6595. _3e8=f["run.outputFormat"].value;
  6596. }else{
  6597. if(f["ui.format"]&&f["ui.format"].value){
  6598. _3e8=f["ui.format"].value;
  6599. }
  6600. }
  6601. if(_3e8!=""){
  6602. this.updateCurrentFormat(_3e8,this.getCV().getWebContentRoot());
  6603. }
  6604. _3e7.draw();
  6605. }
  6606. var _3ea=this.getBannerToolbar();
  6607. if(_3ea){
  6608. _3ea.draw();
  6609. }
  6610. };
  6611. function CMainWnd_addToReportHistory(_3eb){
  6612. this.m_reportHistoryList[this.m_reportHistoryList.length]=_3eb;
  6613. };
  6614. function CMainWnd_getReportHistory(){
  6615. return this.m_reportHistoryList;
  6616. };
  6617. function CMainWnd_getContextMenu(){
  6618. return this.m_contextMenu;
  6619. };
  6620. function CMainWnd_displayContextMenu(evt,_3ed){
  6621. if(!this.getCV().bEnableContextMenu){
  6622. return false;
  6623. }
  6624. evt=(evt)?evt:((event)?event:null);
  6625. var _3ee=this.getSelectionController();
  6626. if(_3ee!=null){
  6627. var cm=this.getContextMenu();
  6628. if(_3ed&&this.getCV().bCanUseCognosViewerSelection==true){
  6629. if(!_3ee.pageContextClicked(evt)){
  6630. if(typeof cm!="undefined"&&cm!=null){
  6631. cm.m_contextMenu.remove();
  6632. }
  6633. return false;
  6634. }
  6635. }
  6636. cm=this.getContextMenu();
  6637. if(typeof cm!="undefined"&&cm!=null){
  6638. cm.draw(evt);
  6639. if(!isIE()){
  6640. cm.m_contextMenu.m_focusCell=getNodeFromEvent(evt);
  6641. }
  6642. }
  6643. var tb=this.getToolbar();
  6644. if(typeof tb!="undefined"&&tb!=null){
  6645. tb.closeMenus();
  6646. }
  6647. var _3f1=this.getBannerToolbar();
  6648. if(_3f1!="undefined"&&_3f1!=null){
  6649. _3f1.closeMenus();
  6650. }
  6651. }
  6652. };
  6653. function CMainWnd_getReportHistoryLength(){
  6654. return this.m_reportHistoryList.length;
  6655. };
  6656. function CMainWnd_executePreviousReport(_3f2){
  6657. if(_3f2==-1){
  6658. _3f2=this.getReportHistoryLength()-1;
  6659. }
  6660. for(var i=0;i<this.getReportHistoryLength();++i){
  6661. var _3f4=this.m_reportHistoryList[i];
  6662. if(_3f4.getIdx()==_3f2){
  6663. _3f4.execute();
  6664. return;
  6665. }
  6666. }
  6667. };
  6668. function CMainWnd_getReportHistoryConversations(){
  6669. var _3f5=[];
  6670. var _3f6=this.getReportHistory();
  6671. for(var _3f7=0;_3f7<_3f6.length;++_3f7){
  6672. var _3f8=_3f6[_3f7];
  6673. var _3f9=_3f8.getTrackingInfo();
  6674. if(_3f9!=""){
  6675. _3f5.push(_3f9);
  6676. }
  6677. }
  6678. return _3f5;
  6679. };
  6680. function CMainWnd_getUIHide(){
  6681. return this.m_uiBlackList;
  6682. };
  6683. CMainWnd.prototype.loadPreviousReports=function(){
  6684. var _3fa=this.getCV().envParams["cv.previousReports"];
  6685. if(typeof _3fa!="undefined"&&_3fa!=null){
  6686. var _3fb=XMLBuilderLoadXMLFromString(_3fa);
  6687. var _3fc=XMLHelper_GetFirstChildElement(_3fb);
  6688. if(XMLHelper_GetLocalName(_3fc)=="previousReports"){
  6689. var _3fd=_3fc.childNodes;
  6690. for(var _3fe=0;_3fe<_3fd.length;++_3fe){
  6691. var _3ff=_3fd[_3fe];
  6692. var _400=_3ff.childNodes;
  6693. var _401="";
  6694. var _402={};
  6695. for(var _403=0;_403<_400.length;++_403){
  6696. var _404=_400[_403].getAttribute("name");
  6697. switch(_404){
  6698. case "ui.name":
  6699. _401=XMLHelper_GetText(_400[_403]);
  6700. break;
  6701. default:
  6702. _402[_404]=XMLHelper_GetText(_400[_403]);
  6703. break;
  6704. }
  6705. }
  6706. this.addToReportHistory(new CReportHistory(this,_3fe,_401,_402));
  6707. }
  6708. }
  6709. }
  6710. };
  6711. CMainWnd.prototype.init=function(){
  6712. this.m_uiBlackList="";
  6713. if(typeof this.getCV().UIBlacklist=="string"){
  6714. this.m_uiBlackList=this.getCV().UIBlacklist;
  6715. }
  6716. if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["isTitan"])&&(gCognosViewer.envParams["isTitan"]==true)){
  6717. gMenuItemStyle=new CUIStyle("titanui menuItem_normal","titanui menuItem_hover","","","titanui menuItem_disabled");
  6718. }
  6719. this.m_contextMenu=null;
  6720. if(this.getCV().bEnableContextMenu&&typeof CContextMenu!="undefined"&&this.m_uiBlackList.indexOf(" RV_CONTEXT_MENU ")==-1){
  6721. this.m_contextMenu=new CContextMenu(this);
  6722. }
  6723. this.loadPreviousReports();
  6724. gMenuSeperator.setWebContentRoot(this.getCV().getWebContentRoot());
  6725. gToolbarSeperator.setWebContentRoot(this.getCV().getWebContentRoot());
  6726. };
  6727. CMainWnd.prototype.renderPreviousReports=function(){
  6728. var _405=this.getToolbarControl();
  6729. var _406=_405.getItem("previousReport");
  6730. var _407=this.getCV().getWebContentRoot();
  6731. var _408=this.getCV().getSkin();
  6732. if(_406){
  6733. var _409=_406.getMenu();
  6734. var _40a=this.getReportHistory();
  6735. for(var _40b=0;_40b<_40a.length;++_40b){
  6736. var _40c=_40a[_40b];
  6737. new CMenuItem(_409,_40c.getReportName(),"javascript:"+this.getCV().getObjectId()+".rvMainWnd.executePreviousReport("+_40b+");",_407+_40c.getDropDownMenuIcon(),gMenuItemStyle,_407,_408);
  6738. }
  6739. _409.draw();
  6740. }
  6741. };
  6742. function CMainWnd_update(_40d){
  6743. if(typeof _40d=="undefined"||_40d===null){
  6744. return;
  6745. }
  6746. if(_40d instanceof CSelectionController){
  6747. var _40e=this.getToolbarControl();
  6748. if(typeof _40e!="undefined"&&_40e!=null){
  6749. var _40f=this.getCV().getDrillMgr();
  6750. if(_40f){
  6751. var _410=_40e.getItem("goto");
  6752. if(_410){
  6753. var menu=_410.getMenu();
  6754. if(menu){
  6755. menu.clear();
  6756. }
  6757. }
  6758. var _412=_40e.getItem("drillDown");
  6759. if(_412){
  6760. if(_40f.canDrillDown()){
  6761. _412.enable();
  6762. }else{
  6763. _412.disable();
  6764. }
  6765. }
  6766. var _413=_40e.getItem("drillUp");
  6767. if(_413){
  6768. if(_40f.canDrillUp()){
  6769. _413.enable();
  6770. }else{
  6771. _413.disable();
  6772. }
  6773. }
  6774. }
  6775. var _414=_40e.getItem("lineage");
  6776. if(_414){
  6777. var _415=_40d.getAllSelectedObjects();
  6778. if(_415!=null&&_415.length>0){
  6779. _414.enable();
  6780. }else{
  6781. _414.disable();
  6782. }
  6783. }
  6784. }
  6785. var _416=this.getContextMenu();
  6786. if(typeof _416!="undefined"&&_416!=null){
  6787. _416.update(_40d);
  6788. }
  6789. }
  6790. };
  6791. function CMainWnd_addDrillTargets(_417){
  6792. this.m_oCV.addDrillTargets(_417);
  6793. };
  6794. function CMainWnd_getDrillTargets(){
  6795. return this.m_oCV.getDrillTargets();
  6796. };
  6797. function CMainWnd_getDrillTarget(idx){
  6798. return this.m_oCV.getDrillTarget(idx);
  6799. };
  6800. function CMainWnd_getNumberOfDrillTargets(){
  6801. return this.m_oCV.getNumberOfDrillTargets();
  6802. };
  6803. CMainWnd.prototype.renderAvailableOutputs=function(){
  6804. var _419=this.getCVObjectRef()+".getRV().";
  6805. var oCV=this.getCV();
  6806. var _41b=this.getToolbarControl();
  6807. var _41c=this.getUIHide();
  6808. var _41d=oCV.getWebContentRoot();
  6809. var _41e=oCV.getSkin();
  6810. var _41f=null;
  6811. var _420=null;
  6812. if(typeof _41b!="undefined"&&_41b!=null){
  6813. _41f=_41b.getItem("viewIn");
  6814. if(_41f){
  6815. _420=_41f.getMenu();
  6816. }
  6817. }
  6818. if(_420.getNumItems()==0){
  6819. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_HTML ")==-1){
  6820. this.m_viewInHtmlButton=new CMenuItem(_420,RV_RES.RV_VIEW_HTML,"javascript:"+_419+"viewReport('HTML');",_41d+"/rv/images/action_view_html.gif",gMenuItemStyle,_41d,_41e);
  6821. if(oCV.oOutputFormatPath.HTML==""){
  6822. this.m_viewInHtmlButton.disable();
  6823. }
  6824. }
  6825. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_PDF ")==-1){
  6826. this.m_viewInPDFButton=new CMenuItem(_420,RV_RES.RV_VIEW_PDF,"javascript:"+_419+"viewReport('PDF');",_41d+"/rv/images/action_view_pdf.gif",gMenuItemStyle,_41d,_41e);
  6827. if(oCV.oOutputFormatPath.PDF==""){
  6828. this.m_viewInPDFButton.disable();
  6829. }
  6830. }
  6831. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XML ")==-1){
  6832. this.m_viewInXMLButton=new CMenuItem(_420,RV_RES.RV_VIEW_XML,"javascript:"+_419+"viewReport('XML');",_41d+"/rv/images/action_view_xml.gif",gMenuItemStyle,_41d,_41e);
  6833. if(oCV.oOutputFormatPath.XML==""){
  6834. this.m_viewInXMLButton.disable();
  6835. }
  6836. }
  6837. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS ")==-1){
  6838. this.m_viewInXLSButton=new CMenuItem(_420,RV_RES.RV_VIEW_OPTIONS,"",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e);
  6839. this.excelFormatCascadedMenu=this.m_viewInXLSButton.createCascadedMenu(gMenuStyle,RV_RES.RV_VIEW_OPTIONS);
  6840. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML_DATA ")==-1){
  6841. this.viewInSpreadsheetMLDataMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML_DATA,"javascript:"+_419+"viewReport('xlsxData');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e);
  6842. if(oCV.oOutputFormatPath.xlsxData==""){
  6843. this.viewInSpreadsheetMLDataMenuItem.disable();
  6844. }
  6845. }
  6846. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML ")==-1){
  6847. this.viewInSpreadsheetMLMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML,"javascript:"+_419+"viewReport('spreadsheetML');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e);
  6848. if(oCV.oOutputFormatPath.spreadsheetML==""){
  6849. this.viewInSpreadsheetMLMenuItem.disable();
  6850. }
  6851. }
  6852. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLWA ")==-1){
  6853. this.viewInXLSWebArchiveMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_XLWA,"javascript:"+_419+"viewReport('XLWA');",_41d+"/rv/images/action_view_excel_2002.gif",gMenuItemStyle,_41d,_41e);
  6854. if(oCV.oOutputFormatPath.XLWA==""){
  6855. this.viewInXLSWebArchiveMenuItem.disable();
  6856. }
  6857. }
  6858. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SINGLEXLS ")==-1){
  6859. this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SINGLE_EXCEL,"javascript:"+_419+"viewReport('singleXLS');",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e);
  6860. if(oCV.oOutputFormatPath.singleXLS==""){
  6861. this.viewInSingleXLSMenuItem.disable();
  6862. }
  6863. }
  6864. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLS ")==-1){
  6865. this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_EXCEL,"javascript:"+_419+"viewReport('XLS');",_41d+"/rv/images/action_view_excel_2000.gif",gMenuItemStyle,_41d,_41e);
  6866. if(oCV.oOutputFormatPath.XLS==""){
  6867. this.viewInSingleXLSMenuItem.disable();
  6868. }
  6869. }
  6870. if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_CSV ")==-1){
  6871. var _421="";
  6872. if(getViewerDirection()=="rtl"){
  6873. _421="/rv/images/action_view_csv_rtl.gif";
  6874. }else{
  6875. _421="/rv/images/action_view_csv.gif";
  6876. }
  6877. this.viewInCSVMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_CSV,"javascript:"+_419+"viewReport('CSV');",_41d+_421,gMenuItemStyle,_41d,_41e);
  6878. if(oCV.oOutputFormatPath.CSV==""){
  6879. this.viewInCSVMenuItem.disable();
  6880. }
  6881. }
  6882. }
  6883. }
  6884. _420.draw();
  6885. if(_420.isVisible()){
  6886. _420.show();
  6887. }
  6888. };
  6889. CMainWnd.prototype.saveReportHistoryAsXML=function(){
  6890. var _422="";
  6891. var _423=this.getReportHistory();
  6892. if(_423.length>0){
  6893. var _424=self.XMLBuilderCreateXMLDocument("previousReports");
  6894. var _425=0;
  6895. if(_423.length>20){
  6896. _425=_423.length-20;
  6897. }
  6898. for(var _426=_425;_426<_423.length;++_426){
  6899. _423[_426].saveAsXML(_424.documentElement);
  6900. }
  6901. _422=XMLBuilderSerializeNode(_424);
  6902. }
  6903. return _422;
  6904. };
  6905. CMainWnd.prototype.addCurrentReportToReportHistory=function(){
  6906. var oCV=this.getCV();
  6907. var _428={};
  6908. var _429=oCV.envParams["ui.name"];
  6909. var _42a=oCV.envParams["ui.action"];
  6910. if(_42a=="view"){
  6911. _428["ui.action"]="view";
  6912. _428["ui.format"]=oCV.envParams["ui.format"];
  6913. }else{
  6914. _428["ui.action"]="currentPage";
  6915. _428["ui.conversation"]=oCV.getConversation();
  6916. _428["m_tracking"]=oCV.getTracking();
  6917. _428["run.outputFormat"]=oCV.envParams["run.outputFormat"];
  6918. if(oCV.envParams["rapReportInfo"]){
  6919. _428["rapReportInfo"]=oCV.envParams["rapReportInfo"];
  6920. }
  6921. if(oCV.envParams.limitedInteractiveMode){
  6922. _428.limitedInteractiveMode=oCV.envParams.limitedInteractiveMode;
  6923. }
  6924. if(oCV.envParams["ui.spec"]){
  6925. _428["ui.spec"]=oCV.envParams["ui.spec"];
  6926. }
  6927. if(oCV.envParams.uiSpecAddedFromRun){
  6928. _428.uiSpecAddedFromRun=oCV.envParams.uiSpecAddedFromRun;
  6929. }
  6930. }
  6931. if(typeof oCV.envParams["ui.object"]!="undefined"){
  6932. _428["ui.object"]=oCV.envParams["ui.object"];
  6933. }else{
  6934. _428["ui.spec"]=oCV.envParams["ui.spec"];
  6935. _428["ui.object"]="";
  6936. }
  6937. _428["ui.primaryAction"]=oCV.envParams["ui.primaryAction"];
  6938. if(oCV.envParams["ui.routingServerGroup"]){
  6939. _428["ui.routingServerGroup"]=oCV.envParams["ui.routingServerGroup"];
  6940. }
  6941. this.addToReportHistory(new CReportHistory(this,this.m_reportHistoryList.length,_429,_428));
  6942. };
  6943. CMainWnd.prototype.draw=CMainWnd_draw;
  6944. CMainWnd.prototype.addDrillTargets=CMainWnd_addDrillTargets;
  6945. CMainWnd.prototype.getDrillTarget=CMainWnd_getDrillTarget;
  6946. CMainWnd.prototype.getDrillTargets=CMainWnd_getDrillTargets;
  6947. CMainWnd.prototype.getNumberOfDrillTargets=CMainWnd_getNumberOfDrillTargets;
  6948. CMainWnd.prototype.addToReportHistory=CMainWnd_addToReportHistory;
  6949. CMainWnd.prototype.getReportHistoryLength=CMainWnd_getReportHistoryLength;
  6950. CMainWnd.prototype.getReportHistory=CMainWnd_getReportHistory;
  6951. CMainWnd.prototype.executePreviousReport=CMainWnd_executePreviousReport;
  6952. CMainWnd.prototype.getContextMenu=CMainWnd_getContextMenu;
  6953. CMainWnd.prototype.displayContextMenu=CMainWnd_displayContextMenu;
  6954. CMainWnd.prototype.hideOpenMenus=CMainWnd_hideOpenMenus;
  6955. CMainWnd.prototype.pageClicked=CMainWnd_pageClicked;
  6956. CMainWnd.prototype.getUIHide=CMainWnd_getUIHide;
  6957. CMainWnd.prototype.update=CMainWnd_update;
  6958. CMainWnd.prototype.getSelectionController=CMainWnd_getSelectionController;
  6959. CMainWnd.prototype.getReportHistoryConversations=CMainWnd_getReportHistoryConversations;
  6960. CMainWnd.prototype.updateCurrentFormat=CMainWnd_updateCurrentFormat;
  6961. function resizeIFrame(evt){
  6962. var oCV=window.gaRV_INSTANCES[0];
  6963. var _42d=document.getElementById("CVReport"+oCV.getId());
  6964. var _42e=document.getElementById("CVIFrame"+oCV.getId());
  6965. if(typeof _42d!="undefined"&&_42d!=null&&typeof _42e!="undefined"&&_42e!=null){
  6966. oCV.attachedOnResize=true;
  6967. oCV.setMaxContentSize();
  6968. _42e.style.height="99%";
  6969. }
  6970. };
  6971. function CognosViewerAction(){
  6972. this.m_oCV=null;
  6973. };
  6974. CognosViewerAction.prototype.setRequestParms=function(_42f){
  6975. };
  6976. CognosViewerAction.prototype.onMouseOver=function(evt){
  6977. return false;
  6978. };
  6979. CognosViewerAction.prototype.onMouseOut=function(evt){
  6980. return false;
  6981. };
  6982. CognosViewerAction.prototype.onMouseDown=function(evt){
  6983. return false;
  6984. };
  6985. CognosViewerAction.prototype.onClick=function(evt){
  6986. return false;
  6987. };
  6988. CognosViewerAction.prototype.onDoubleClick=function(evt){
  6989. return false;
  6990. };
  6991. CognosViewerAction.prototype.updateMenu=function(_435){
  6992. return _435;
  6993. };
  6994. CognosViewerAction.prototype.addAdditionalOptions=function(_436){
  6995. };
  6996. CognosViewerAction.prototype.genSelectionContextWithUniqueCTXIDs=function(){
  6997. return false;
  6998. };
  6999. CognosViewerAction.prototype.doUndo=function(){
  7000. if(typeof console!="undefined"){
  7001. console.log("Required method doUndo not implemented.");
  7002. }
  7003. };
  7004. CognosViewerAction.prototype.doRedo=function(){
  7005. if(typeof console!="undefined"){
  7006. console.log("Required method doRedo not implemented.");
  7007. }
  7008. };
  7009. CognosViewerAction.prototype.forceRunSpecRequest=function(){
  7010. return false;
  7011. };
  7012. CognosViewerAction.prototype.preProcess=function(){
  7013. };
  7014. CognosViewerAction.prototype.setCognosViewer=function(oCV){
  7015. this.m_oCV=oCV;
  7016. };
  7017. CognosViewerAction.prototype.getCognosViewer=function(){
  7018. return this.m_oCV;
  7019. };
  7020. CognosViewerAction.prototype.getUndoRedoQueue=function(){
  7021. if(this.getCognosViewer().getViewerWidget()){
  7022. return this.getCognosViewer().getViewerWidget().getUndoRedoQueue();
  7023. }
  7024. return null;
  7025. };
  7026. CognosViewerAction.prototype.getViewerWidget=function(){
  7027. return this.m_oCV.getViewerWidget();
  7028. };
  7029. CognosViewerAction.prototype.getObjectDisplayName=function(){
  7030. var _438="";
  7031. if(this.m_oCV!=null){
  7032. if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){
  7033. _438=this.m_oCV.envParams["reportpart_id"];
  7034. }else{
  7035. if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){
  7036. _438=this.m_oCV.envParams["ui.name"];
  7037. }
  7038. }
  7039. }
  7040. return _438;
  7041. };
  7042. CognosViewerAction.prototype.getContainerId=function(_439){
  7043. var _43a="";
  7044. if(_439&&_439.getAllSelectedObjects){
  7045. var _43b=_439.getAllSelectedObjects();
  7046. if(_43b){
  7047. var _43c=_43b[0];
  7048. if(_43c&&_43c.getLayoutElementId){
  7049. _43a=this.removeNamespace(_43c.getLayoutElementId());
  7050. }
  7051. }
  7052. }
  7053. return _43a;
  7054. };
  7055. CognosViewerAction.prototype.removeNamespace=function(_43d){
  7056. var _43e=_43d;
  7057. try{
  7058. if(_43d!=""){
  7059. var _43f=_43d.indexOf(this.m_oCV.getId());
  7060. if(_43f!=-1){
  7061. _43d=_43d.replace(this.m_oCV.getId(),"");
  7062. }
  7063. }
  7064. return _43d;
  7065. }
  7066. catch(e){
  7067. return _43e;
  7068. }
  7069. };
  7070. CognosViewerAction.prototype.doAddActionContext=function(){
  7071. return true;
  7072. };
  7073. CognosViewerAction.prototype.getSelectionContext=function(){
  7074. return getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(this.m_oCV.envParams["ui.object"]),this.genSelectionContextWithUniqueCTXIDs());
  7075. };
  7076. CognosViewerAction.prototype.getNumberOfSelections=function(){
  7077. var _440=-1;
  7078. if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){
  7079. _440=this.m_oCV.getSelectionController().getSelections().length;
  7080. }
  7081. return _440;
  7082. };
  7083. CognosViewerAction.prototype.buildDynamicMenuItem=function(_441,_442){
  7084. _441.action={name:"LoadMenu",payload:{action:_442}};
  7085. _441.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}];
  7086. return _441;
  7087. };
  7088. CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_443){
  7089. var oReq=new ViewerDispatcherEntry(this.getCognosViewer());
  7090. oReq.addFormField("ui.action",_443);
  7091. this.preProcess();
  7092. if(this.doAddActionContext()===true){
  7093. var _445=this.addActionContext();
  7094. oReq.addFormField("cv.actionContext",_445);
  7095. if(window.gViewerLogger){
  7096. window.gViewerLogger.log("Action context",_445,"xml");
  7097. }
  7098. }
  7099. oReq.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  7100. if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){
  7101. oReq.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
  7102. }
  7103. if(this.m_oCV.getModelPath()!==""){
  7104. oReq.addFormField("modelPath",this.m_oCV.getModelPath());
  7105. }
  7106. if(typeof this.m_oCV.envParams["packageBase"]!="undefined"){
  7107. oReq.addFormField("packageBase",this.m_oCV.envParams["packageBase"]);
  7108. }
  7109. if(typeof this.m_oCV.envParams["rap.state"]!="undefined"){
  7110. oReq.addFormField("rap.state",this.m_oCV.envParams["rap.state"]);
  7111. }
  7112. if(typeof this.m_oCV.envParams["rapReportInfo"]!="undefined"){
  7113. oReq.addFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
  7114. }
  7115. this.addAdditionalOptions(oReq);
  7116. return oReq;
  7117. };
  7118. CognosViewerAction.prototype.fireModifiedReportEvent=function(){
  7119. try{
  7120. var _446=this.getCognosViewer().getViewerWidget();
  7121. if(_446){
  7122. var _447={"modified":true};
  7123. _446.fireEvent("com.ibm.bux.widget.modified",null,_447);
  7124. }
  7125. }
  7126. catch(e){
  7127. }
  7128. };
  7129. CognosViewerAction.prototype.showCustomCursor=function(evt,id,_44a){
  7130. var _44b=document.getElementById(id);
  7131. if(_44b==null){
  7132. _44b=document.createElement("span");
  7133. _44b.className="customCursor";
  7134. _44b.setAttribute("id",id);
  7135. document.body.appendChild(_44b);
  7136. }
  7137. var _44c="<img src=\""+this.getCognosViewer().getWebContentRoot()+_44a+"\"/>";
  7138. _44b.innerHTML=_44c;
  7139. _44b.style.position="absolute";
  7140. _44b.style.left=(evt.clientX+15)+"px";
  7141. _44b.style.top=(evt.clientY+15)+"px";
  7142. _44b.style.display="inline";
  7143. };
  7144. CognosViewerAction.prototype.hideCustomCursor=function(id){
  7145. var _44e=document.getElementById(id);
  7146. if(_44e!=null){
  7147. _44e.style.display="none";
  7148. }
  7149. };
  7150. CognosViewerAction.prototype.selectionHasContext=function(){
  7151. var _44f=this.getCognosViewer().getSelectionController().getAllSelectedObjects();
  7152. var _450=false;
  7153. if(_44f!=null&&_44f.length>0){
  7154. for(var i=0;i<_44f.length;i++){
  7155. if(_44f[i].hasContextInformation()){
  7156. _450=true;
  7157. break;
  7158. }
  7159. }
  7160. }
  7161. return _450;
  7162. };
  7163. CognosViewerAction.prototype.isInteractiveDataContainer=function(_452){
  7164. var _453=false;
  7165. if(typeof _452!="undefined"&&_452!=null){
  7166. var id=_452.toLowerCase();
  7167. _453=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id);
  7168. }
  7169. return _453;
  7170. };
  7171. CognosViewerAction.prototype.getSelectedContainerId=function(){
  7172. var _455=this.getCognosViewer();
  7173. var _456=_455.getSelectionController();
  7174. var _457=null;
  7175. if(_456!=null&&typeof _456!="undefined"){
  7176. _457=this.getContainerId(_456);
  7177. }
  7178. return _457;
  7179. };
  7180. CognosViewerAction.prototype.getSelectedReportInfo=function(){
  7181. var _458=this.getCognosViewer();
  7182. var _459=this.getSelectedContainerId();
  7183. var _45a=this.getReportInfo(_459);
  7184. if(_45a==null){
  7185. var _45b=_458.getRAPReportInfo();
  7186. if(_45b.getContainerCount()==1){
  7187. _45a=_45b.getContainerFromPos(0);
  7188. }
  7189. }
  7190. return _45a;
  7191. };
  7192. CognosViewerAction.prototype.getReportInfo=function(_45c){
  7193. var _45d=null;
  7194. if(_45c!=null&&_45c.length>0){
  7195. var _45e=this.getCognosViewer();
  7196. var _45f=_45e.getRAPReportInfo();
  7197. _45d=_45f.getContainer(_45c);
  7198. }
  7199. return _45d;
  7200. };
  7201. CognosViewerAction.prototype.isSelectionOnChart=function(){
  7202. var _460=this.getCognosViewer();
  7203. if(_460.getSelectionController().hasSelectedChartNodes()){
  7204. return true;
  7205. }
  7206. var _461=this.getContainerId(_460.getSelectionController());
  7207. if(typeof _461!="undefined"){
  7208. var _462=this.getReportInfo(_461);
  7209. if(_462!=null&&_462.displayTypeId){
  7210. var _463=_462.displayTypeId.toLowerCase();
  7211. return _460.getRAPReportInfo().isChart(_463);
  7212. }
  7213. }
  7214. return false;
  7215. };
  7216. CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){
  7217. var _464=this.getCognosViewer().getRAPReportInfo();
  7218. if(_464){
  7219. return _464.containsInteractiveDataContainer();
  7220. }
  7221. return false;
  7222. };
  7223. CognosViewerAction.prototype.isPromptWidget=function(){
  7224. var oCV=this.getCognosViewer();
  7225. if(oCV.getRAPReportInfo()&&oCV.getRAPReportInfo().isPromptPart()){
  7226. return true;
  7227. }
  7228. return false;
  7229. };
  7230. CognosViewerAction.prototype.getLayoutComponents=function(){
  7231. var _466=[];
  7232. var _467=document.getElementById("rt"+this.m_oCV.getId());
  7233. if(_467!=null){
  7234. _466=getElementsByAttribute(_467,"*","lid");
  7235. }
  7236. return _466;
  7237. };
  7238. CognosViewerAction.prototype.addClientContextData=function(_468){
  7239. var _469=this.m_oCV.getSelectionController();
  7240. if(typeof _469!="undefined"&&_469!=null&&typeof _469.getCCDManager!="undefined"&&_469.getCCDManager()!=null){
  7241. var _46a=_469.getCCDManager();
  7242. return ("<md>"+xml_encode(_46a.MetadataToJSON())+"</md>"+"<cd>"+xml_encode(_46a.ContextDataSubsetToJSON(_468))+"</cd>");
  7243. }
  7244. return "";
  7245. };
  7246. CognosViewerAction.prototype.getDataItemInfoMap=function(){
  7247. var _46b=this.m_oCV.getSelectionController();
  7248. if(typeof _46b!="undefined"&&_46b!=null&&typeof _46b.getCCDManager!="undefined"&&_46b.getCCDManager()!=null){
  7249. var _46c=_46b.getCCDManager();
  7250. return ("<di>"+xml_encode(_46c.DataItemInfoToJSON())+"</di>");
  7251. }
  7252. return "";
  7253. };
  7254. CognosViewerAction.prototype.getRAPLayoutTag=function(_46d){
  7255. var _46e=null;
  7256. if(typeof _46d=="object"&&_46d!=null){
  7257. _46e=_46d.getAttribute("rap_layout_tag");
  7258. }
  7259. return _46e;
  7260. };
  7261. CognosViewerAction.prototype.addMenuItemChecked=function(_46f,_470,_471){
  7262. if(_46f){
  7263. if(this.getCognosViewer().isHighContrast()){
  7264. _470["class"]="menuItemSelected";
  7265. }
  7266. _470.iconClass="menuItemChecked";
  7267. }else{
  7268. if(_471&&_471.length>0){
  7269. _470.iconClass=_471;
  7270. }
  7271. }
  7272. };
  7273. CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_472){
  7274. var _473=this.getCognosViewer().getViewerWidget();
  7275. _473.filterRequiredAction=_472;
  7276. _473.clearRAPCache();
  7277. _473.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"});
  7278. };
  7279. CognosViewerAction.prototype.addClientSideUndo=function(_474,_475){
  7280. var _476=GUtil.generateCallback(_474.doUndo,_475,_474);
  7281. var _477=GUtil.generateCallback(_474.doRedo,_475,_474);
  7282. this.getUndoRedoQueue().addClientSideUndo({"tooltip":_474.getUndoHint(),"undoCallback":_476,"redoCallback":_477});
  7283. this.getCognosViewer().getViewerWidget().updateToolbar();
  7284. };
  7285. CognosViewerAction.prototype.isValidMenuItem=function(){
  7286. var _478=this.getCognosViewer();
  7287. var _479=_478.getViewerWidget();
  7288. if(this.isPromptWidget()){
  7289. return false;
  7290. }
  7291. return true;
  7292. };
  7293. CognosViewerAction.prototype.isPositiveInt=function(_47a){
  7294. if(typeof _47a==="undefined"||_47a===null){
  7295. return false;
  7296. }
  7297. var _47b=parseInt(_47a,10);
  7298. return _47a&&_47b===+_47a&&_47b>0&&_47a.indexOf(".")==-1;
  7299. };
  7300. CognosViewerAction.prototype.buildActionResponseObject=function(_47c,code,msg){
  7301. return {"status":_47c,"message":msg?msg:null,"code":code?code:null,getStatus:function(){
  7302. return this.status;
  7303. },getMessage:function(){
  7304. return this.message;
  7305. },getCode:function(){
  7306. return this.code;
  7307. }};
  7308. };
  7309. function LineageAction(){
  7310. };
  7311. LineageAction.prototype=new CognosViewerAction();
  7312. LineageAction.prototype.getCommonOptions=function(_47f){
  7313. _47f.addFormField("cv.responseFormat","asynchDetailMIMEAttachment");
  7314. _47f.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false");
  7315. _47f.addFormField("cv.id",this.m_oCV.envParams["cv.id"]);
  7316. };
  7317. LineageAction.prototype.getSelectionOptions=function(_480){
  7318. var _481=this.m_oCV.getSelectionController();
  7319. var _482=getSelectionContextIds(_481);
  7320. _480.addFormField("context.format","initializer");
  7321. _480.addFormField("context.type","reportService");
  7322. _480.addFormField("context.selection","metadata,"+_482.toString());
  7323. };
  7324. LineageAction.prototype.getPrimaryRequestOptions=function(_483){
  7325. _483.addFormField("specificationType","metadataServiceLineageSpecification");
  7326. _483.addFormField("ui.action","runLineageSpecification");
  7327. _483.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  7328. };
  7329. LineageAction.prototype.getSecondaryRequestOptions=function(_484){
  7330. _484.addFormField("ui.conversation",this.m_oCV.getConversation());
  7331. _484.addFormField("m_tracking",this.m_oCV.getTracking());
  7332. _484.addFormField("ui.action","lineage");
  7333. };
  7334. LineageAction.prototype.updateMenu=function(_485){
  7335. if(!this.getCognosViewer().bCanUseLineage){
  7336. return "";
  7337. }
  7338. _485.disabled=!this.selectionHasContext();
  7339. return _485;
  7340. };
  7341. LineageAction.prototype.execute=function(){
  7342. var oCV=this.getCognosViewer();
  7343. var _487=new AsynchDataDispatcherEntry(oCV);
  7344. this.getCommonOptions(_487);
  7345. this.getSelectionOptions(_487);
  7346. if(oCV.getConversation()==""){
  7347. this.getPrimaryRequestOptions(_487);
  7348. }else{
  7349. this.getSecondaryRequestOptions(_487);
  7350. }
  7351. _487.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}});
  7352. if(!oCV.m_viewerFragment){
  7353. _487.setRequestIndicator(oCV.getRequestIndicator());
  7354. var _488=new WorkingDialog(oCV);
  7355. _488.setSimpleWorkingDialogFlag(true);
  7356. _487.setWorkingDialog(_488);
  7357. }
  7358. oCV.dispatchRequest(_487);
  7359. };
  7360. LineageAction.prototype.handleLineageResponse=function(_489){
  7361. var oCV=this.getCognosViewer();
  7362. oCV.loadExtra();
  7363. oCV.setStatus(_489.getAsynchStatus());
  7364. oCV.setConversation(_489.getConversation());
  7365. oCV.setTracking(_489.getTracking());
  7366. var _48b=null;
  7367. if(typeof MDSRV_CognosConfiguration!="undefined"){
  7368. _48b=new MDSRV_CognosConfiguration();
  7369. var _48c="";
  7370. if(this.m_oCV.envParams["metadataInformationURI"]){
  7371. _48c=this.m_oCV.envParams["metadataInformationURI"];
  7372. }
  7373. _48b.addProperty("lineageURI",_48c);
  7374. _48b.addProperty("gatewayURI",this.m_oCV.getGateway());
  7375. }
  7376. var _48d=this.m_oCV.envParams["ui.object"];
  7377. var _48e=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_48d));
  7378. var _48f=new MDSRV_LineageFragmentContext(_48b,_48e);
  7379. _48f.setExecutionParameters(this.m_oCV.getExecutionParameters());
  7380. if(typeof _48d=="string"){
  7381. _48f.setReportPath(_48d);
  7382. }
  7383. _48f.setReportLineage(_489.getResult());
  7384. _48f.open();
  7385. };
  7386. function CSelectionDefaultStyles(_490){
  7387. this.m_primarySelectionColor=null;
  7388. this.m_highContrastBorderStyle="solid";
  7389. this.m_secondarySelectionIsDisabled=false;
  7390. if(_490){
  7391. this.m_selectionController=_490;
  7392. this.m_oCognosViewer=_490.m_oCognosViewer;
  7393. if(this.m_oCognosViewer){
  7394. var _491=this.m_oCognosViewer.getUIConfig();
  7395. if(_491){
  7396. if(_491.getPrimarySelectionColor()){
  7397. this.m_primarySelectionColor=_491.getPrimarySelectionColor();
  7398. }
  7399. if(!_491.getShowSecondarySelection()){
  7400. this.m_secondarySelectionIsDisabledConfig=true;
  7401. }else{
  7402. if(_491.getSeondarySelectionColor()){
  7403. this.m_secondarySelectionColor=_491.getSeondarySelectionColor();
  7404. }
  7405. }
  7406. }
  7407. }
  7408. }
  7409. };
  7410. CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_492){
  7411. return this.m_primarySelectionColor;
  7412. };
  7413. CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
  7414. return this.m_secondarySelectionColor;
  7415. };
  7416. CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
  7417. return this.m_highContrastBorderStyle;
  7418. };
  7419. CSelectionDefaultStyles.prototype.canApplyToSelection=function(_493){
  7420. return true;
  7421. };
  7422. CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
  7423. return this.m_secondarySelectionIsDisabled;
  7424. };
  7425. CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
  7426. };
  7427. function CSelectionFilterStyles(_494){
  7428. this.m_selectionController=_494;
  7429. this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD";
  7430. this.m_primarySelectionFilterColorForMeasure=null;
  7431. this.m_secondarySelectionColor=null;
  7432. this.m_highContrastBorderStyle="dotted";
  7433. this.m_secondarySelectionIsDisabled=true;
  7434. };
  7435. CSelectionFilterStyles.prototype=new CSelectionDefaultStyles();
  7436. CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_495){
  7437. return this.m_primarySelectionColor;
  7438. };
  7439. CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){
  7440. return this.m_secondarySelectionColor;
  7441. };
  7442. CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){
  7443. return this.m_highContrastBorderStyle;
  7444. };
  7445. CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){
  7446. return this.m_secondarySelectionIsDisabled;
  7447. };
  7448. CSelectionFilterStyles.prototype.canApplyToSelection=function(_496){
  7449. return !this.selectionHasOnlyMeasure(_496);
  7450. };
  7451. CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_497){
  7452. return (_497.length===1&&_497[0].length===1&&this.m_selectionController.isMeasure(_497[0][0]));
  7453. };
  7454. CSelectionFilterStyles.prototype.setStyleForSelection=function(_498){
  7455. this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_498))?null:this.m_primarySelectionFilterColor;
  7456. };
  7457. function CSelectionFilterContextMenuStyles(_499){
  7458. CSelectionDefaultStyles.call(this,_499);
  7459. this.m_secondarySelectionIsDisabled=true;
  7460. };
  7461. CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles();
  7462. function CSelectionObject(){
  7463. this.initialize();
  7464. };
  7465. CSelectionObject.prototype.initialize=function(){
  7466. this.m_oCellRef={};
  7467. this.m_sColumnRef="";
  7468. this.m_sColumnName="";
  7469. this.m_aDataItems=[];
  7470. this.m_aUseValues=[];
  7471. this.m_aDisplayValues=[];
  7472. this.m_sCellTypeId="";
  7473. this.m_sLayoutType="";
  7474. this.m_sTag="";
  7475. this.m_aMuns=[];
  7476. this.m_aRefQueries=[];
  7477. this.m_aMetadataItems=[];
  7478. this.m_aDrillOptions=[];
  7479. this.m_selectionController={};
  7480. this.m_contextIds=[];
  7481. this.m_ctxAttributeString="";
  7482. this.m_fetchedContextIds=false;
  7483. this.m_selectedClass=[];
  7484. this.m_cutClass=[];
  7485. this.m_dataContainerType="";
  7486. this.m_oJsonContext=null;
  7487. };
  7488. CSelectionObject.prototype.isSelectionOnVizChart=function(){
  7489. return false;
  7490. };
  7491. CSelectionObject.prototype.getCellRef=function(){
  7492. return this.m_oCellRef;
  7493. };
  7494. CSelectionObject.prototype.getColumnRP_Name=function(){
  7495. if(this.m_oCellRef!=null){
  7496. return this.m_oCellRef.getAttribute("rp_name");
  7497. }
  7498. };
  7499. CSelectionObject.prototype.getColumnRef=function(){
  7500. return this.m_sColumnRef;
  7501. };
  7502. CSelectionObject.prototype.getColumnName=function(){
  7503. if(this.m_sColumnName==""){
  7504. if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){
  7505. this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]);
  7506. }
  7507. }
  7508. return this.m_sColumnName;
  7509. };
  7510. CSelectionObject.prototype.getDataItemDisplayValue=function(_49a){
  7511. var _49b=this.getDataItems();
  7512. var item="";
  7513. if(_49b&&_49b[0]&&_49b[0][0]){
  7514. item=this.getDataItems()[0][0];
  7515. if(_49a&&_49a.itemInfo&&_49a.itemInfo.length){
  7516. var _49d=_49a.itemInfo;
  7517. for(var i=0;i<_49d.length;i++){
  7518. if(_49d[i].item===item&&_49d[i].itemLabel){
  7519. return _49d[i].itemLabel;
  7520. }
  7521. }
  7522. }
  7523. }
  7524. return item;
  7525. };
  7526. CSelectionObject.prototype.getDataItems=function(){
  7527. if(!this.m_aDataItems.length){
  7528. this.fetchContextIds();
  7529. for(var i=0;i<this.m_contextIds.length;++i){
  7530. this.m_aDataItems[this.m_aDataItems.length]=[];
  7531. for(var j=0;j<this.m_contextIds[i].length;++j){
  7532. var _4a1=this.m_contextIds[i][j];
  7533. this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_4a1)?this.m_selectionController.getRefDataItem(_4a1):"");
  7534. }
  7535. }
  7536. }
  7537. return this.m_aDataItems;
  7538. };
  7539. CSelectionObject.prototype.getUseValues=function(){
  7540. if(!this.m_aUseValues.length){
  7541. this.fetchContextIds();
  7542. for(var i=0;i<this.m_contextIds.length;++i){
  7543. this.m_aUseValues[this.m_aUseValues.length]=[];
  7544. for(var j=0;j<this.m_contextIds[i].length;++j){
  7545. var _4a4=this.m_contextIds[i][j];
  7546. this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_4a4)?this.m_selectionController.getUseValue(_4a4):"");
  7547. }
  7548. }
  7549. }
  7550. return this.m_aUseValues;
  7551. };
  7552. CSelectionObject.prototype.getCellTypeId=function(){
  7553. return this.m_sCellTypeId;
  7554. };
  7555. CSelectionObject.prototype.getDisplayValues=function(){
  7556. return this.m_aDisplayValues;
  7557. };
  7558. CSelectionObject.prototype.getLayoutType=function(){
  7559. return this.m_sLayoutType;
  7560. };
  7561. CSelectionObject.prototype.getTag=function(){
  7562. return this.m_sTag;
  7563. };
  7564. CSelectionObject.prototype.getMuns=function(){
  7565. if(!this.m_aMuns.length){
  7566. this.fetchContextIds();
  7567. for(var i=0;i<this.m_contextIds.length;++i){
  7568. this.m_aMuns[this.m_aMuns.length]=[];
  7569. for(var j=0;j<this.m_contextIds[i].length;++j){
  7570. var _4a7=this.m_contextIds[i][j];
  7571. this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_4a7)?this.m_selectionController.getMun(_4a7):"");
  7572. }
  7573. }
  7574. }
  7575. return this.m_aMuns;
  7576. };
  7577. CSelectionObject.prototype.getRefQueries=function(){
  7578. if(!this.m_aRefQueries.length){
  7579. this.fetchContextIds();
  7580. for(var i=0;i<this.m_contextIds.length;++i){
  7581. this.m_aRefQueries[this.m_aRefQueries.length]=[];
  7582. for(var j=0;j<this.m_contextIds[i].length;++j){
  7583. var _4aa=this.m_contextIds[i][j];
  7584. this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_4aa)?this.m_selectionController.getRefQuery(_4aa):"");
  7585. }
  7586. }
  7587. }
  7588. return this.m_aRefQueries;
  7589. };
  7590. CSelectionObject.prototype.getDimensionalItems=function(_4ab){
  7591. var _4ac=[];
  7592. this.fetchContextIds();
  7593. for(var i=0;i<this.m_contextIds.length;++i){
  7594. _4ac[_4ac.length]=[];
  7595. for(var j=0;j<this.m_contextIds[i].length;++j){
  7596. var _4af=this.m_contextIds[i][j];
  7597. var _4b0="";
  7598. if(this.m_selectionController.isContextId(_4af)){
  7599. switch(_4ab){
  7600. case "hun":
  7601. _4b0=this.m_selectionController.getHun(_4af);
  7602. break;
  7603. case "lun":
  7604. _4b0=this.m_selectionController.getLun(_4af);
  7605. break;
  7606. case "dun":
  7607. _4b0=this.m_selectionController.getDun(_4af);
  7608. break;
  7609. }
  7610. }
  7611. _4ac[_4ac.length-1].push(_4b0);
  7612. }
  7613. }
  7614. return _4ac;
  7615. };
  7616. CSelectionObject.prototype.getMetadataItems=function(){
  7617. if(!this.m_aMetadataItems.length){
  7618. this.fetchContextIds();
  7619. for(var i=0;i<this.m_contextIds.length;++i){
  7620. this.m_aMetadataItems[this.m_aMetadataItems.length]=[];
  7621. for(var j=0;j<this.m_contextIds[i].length;++j){
  7622. var _4b3=this.m_contextIds[i][j];
  7623. var _4b4="";
  7624. if(this.m_selectionController.isContextId(_4b3)){
  7625. var sLun=this.m_selectionController.getLun(_4b3);
  7626. var sHun=this.m_selectionController.getHun(_4b3);
  7627. if(sLun&&sLun!=""){
  7628. _4b4=sLun;
  7629. }else{
  7630. if(sHun&&sHun!=""){
  7631. _4b4=sHun;
  7632. }else{
  7633. _4b4=this.m_selectionController.getQueryModelId(_4b3);
  7634. }
  7635. }
  7636. }
  7637. this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_4b4);
  7638. }
  7639. }
  7640. }
  7641. return this.m_aMetadataItems;
  7642. };
  7643. CSelectionObject.prototype.getDrillOptions=function(){
  7644. if(!this.m_aDrillOptions.length){
  7645. this.fetchContextIds();
  7646. for(var i=0;i<this.m_contextIds.length;++i){
  7647. this.m_aDrillOptions[this.m_aDrillOptions.length]=[];
  7648. for(var j=0;j<this.m_contextIds[i].length;++j){
  7649. var _4b9=this.m_contextIds[i][j];
  7650. this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_4b9)?this.m_selectionController.getDrillFlag(_4b9):0);
  7651. }
  7652. }
  7653. }
  7654. return this.m_aDrillOptions;
  7655. };
  7656. CSelectionObject.prototype.getSelectedContextIds=function(){
  7657. return this.m_contextIds;
  7658. };
  7659. CSelectionObject.prototype.fetchContextIds=function(){
  7660. if(!this.m_fetchedContextIds&&this.m_contextIds.length&&this.m_selectionController.hasContextData()){
  7661. var _4ba=[];
  7662. for(var i=0;i<this.m_contextIds.length;i++){
  7663. for(var j=0;j<this.m_contextIds[i].length;j++){
  7664. _4ba.push(this.m_contextIds[i][j]);
  7665. }
  7666. }
  7667. this.m_selectionController.fetchContextData(_4ba);
  7668. this.m_fetchedContextIds=true;
  7669. }
  7670. };
  7671. CSelectionObject.prototype.setSelectionController=function(sc){
  7672. if(sc){
  7673. this.m_selectionController=sc;
  7674. }
  7675. };
  7676. CSelectionObject.prototype.getLayoutElementId=function(){
  7677. return this.m_layoutElementId;
  7678. };
  7679. CSelectionObject.prototype.hasContextInformation=function(){
  7680. for(var i=0;i<this.m_contextIds.length;i++){
  7681. for(var j=0;j<this.m_contextIds[i].length;j++){
  7682. if(this.m_contextIds[i][j].length>0){
  7683. return true;
  7684. }
  7685. }
  7686. }
  7687. return false;
  7688. };
  7689. CSelectionObject.prototype.isHomeCell=function(){
  7690. var _4c0=this.getCellRef().className;
  7691. if(_4c0&&(_4c0=="xm"||_4c0.indexOf("xm ")!=-1||_4c0.indexOf(" xm")!=-1)){
  7692. return true;
  7693. }
  7694. return false;
  7695. };
  7696. CSelectionObject.prototype.getDataContainerType=function(){
  7697. return this.m_dataContainerType;
  7698. };
  7699. CSelectionObject.prototype.getContextJsonObject=function(_4c1,_4c2){
  7700. if(this.m_oJsonContext===null){
  7701. var _4c3={};
  7702. var _4c4=[];
  7703. var _4c5=null;
  7704. this.getDataItems();
  7705. this.getUseValues();
  7706. if(this.m_contextIds.length==0){
  7707. return null;
  7708. }
  7709. var i=0,j=0;
  7710. var _4c8=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4c1);
  7711. _4c5=_4c8;
  7712. this._populateJsonContextObj(_4c8,this.m_aUseValues[i][j],_4c1.getDisplayValue(this.m_contextIds[i][j]),_4c1.getMun(this.m_contextIds[i][j]),_4c3,_4c4);
  7713. j++;
  7714. for(;i<this.m_aDataItems.length;i++,j=0){
  7715. for(;j<this.m_aDataItems[i].length;j++){
  7716. _4c8=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4c1);
  7717. if(!_4c5){
  7718. _4c5=_4c8;
  7719. }
  7720. this._populateJsonContextObj(_4c8,this.m_aUseValues[i][j],_4c1.getDisplayValue(this.m_contextIds[i][j]),_4c1.getMun(this.m_contextIds[i][j]),_4c3,_4c4);
  7721. }
  7722. }
  7723. this.m_oJsonContext=this._createGenericPayloadStructureJson(_4c5,_4c3,_4c4,_4c2);
  7724. }
  7725. return this.m_oJsonContext;
  7726. };
  7727. CSelectionObject.prototype._getBestPossibleItemName=function(_4c9,_4ca,_4cb){
  7728. var _4cc=null;
  7729. if(_4cb.isMeasure(_4ca)){
  7730. if(!_4cb.isValidColumnTitle(this.m_oCellRef)){
  7731. if(!_4cb.isRelational([_4ca])){
  7732. _4cc=_4cb.getCCDManager().GetBestPossibleDimensionMeasureName(_4ca);
  7733. }
  7734. return (_4cc)?_4cc:_4c9;
  7735. }
  7736. }
  7737. _4cc=_4cb.getCCDManager().GetBestPossibleItemName(_4ca);
  7738. return (_4cc)?_4cc:_4c9;
  7739. };
  7740. CSelectionObject.prototype._isTypeColumnTitle=function(){
  7741. if(this.m_oCellRef&&typeof this.m_oCellRef.getAttribute=="function"){
  7742. return (this.m_oCellRef.getAttribute("type")==="columnTitle");
  7743. }
  7744. return false;
  7745. };
  7746. CSelectionObject.prototype._populateJsonContextObj=function(_4cd,_4ce,_4cf,mun,_4d1,_4d2){
  7747. if(_4d1&&_4d2&&_4cd&&typeof _4d1[_4cd]=="undefined"){
  7748. var _4d3=_4cf?_4cf:_4ce;
  7749. _4d1[_4cd]=[_4d3];
  7750. var _4d4={};
  7751. if(_4cf){
  7752. _4d4["caption"]=_4cf;
  7753. }
  7754. if(mun){
  7755. _4d4["mun"]=mun;
  7756. }
  7757. if(_4ce){
  7758. _4d4["use"]=_4ce;
  7759. }
  7760. _4d2.push(_4d4);
  7761. }
  7762. };
  7763. CSelectionObject.prototype._createGenericPayloadStructureJson=function(_4d5,_4d6,_4d7,_4d8){
  7764. if(_4d5&&_4d6&&_4d7){
  7765. var _4d9=(_4d8)?_4d8:".";
  7766. var _4da={};
  7767. _4da[_4d9]={"values":_4d7};
  7768. var obj={"com.ibm.widget.context":{"values":_4d6},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_4d5,"itemSpecification":_4da}}};
  7769. return obj;
  7770. }
  7771. return null;
  7772. };
  7773. CSelectionObject.prototype.populateSelectionPayload=function(_4dc,_4dd,_4de){
  7774. this.getDataItems();
  7775. this.getUseValues();
  7776. if(this.m_contextIds.length==0){
  7777. return false;
  7778. }
  7779. _4de=((_4de===undefined)?false:_4de);
  7780. var _4df=this.m_selectionController;
  7781. for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
  7782. var _4e2=(_4de?1:this.m_aDataItems[i].length);
  7783. for(;j<_4e2;j++){
  7784. if(!_4df.isMeasure(this.m_contextIds[i][j])){
  7785. var _4e3=this.m_aDataItems[i][j];
  7786. this._populateItemInSelectionPayload(_4e3,this.m_aUseValues[i][j],_4df.getDisplayValue(this.m_contextIds[i][j]),_4df.getMun(this.m_contextIds[i][j]),_4dc,_4dd);
  7787. }
  7788. }
  7789. }
  7790. return true;
  7791. };
  7792. CSelectionObject.prototype._populateItemInSelectionPayload=function(_4e4,_4e5,_4e6,mun,_4e8,_4e9){
  7793. if(_4e8&&_4e4){
  7794. var _4ea=_4e5?_4e5:_4e6;
  7795. if(_4e8[_4e4]){
  7796. _4e8[_4e4].push(_4ea);
  7797. }else{
  7798. _4e8[_4e4]=[_4ea];
  7799. }
  7800. var _4eb={};
  7801. _4eb["caption"]=_4ea;
  7802. if(mun){
  7803. _4eb["mun"]=mun;
  7804. }
  7805. var _4ec=_4e9[_4e4];
  7806. if(!_4ec){
  7807. _4ec={"values":[]};
  7808. _4e9[_4e4]=_4ec;
  7809. }
  7810. _4ec.values.push(_4eb);
  7811. }
  7812. };
  7813. CSelectionObject.prototype.getCtxAttributeString=function(){
  7814. return this.m_ctxAttributeString;
  7815. };
  7816. CSelectionObject.prototype.isDataValueOrChartElement=function(){
  7817. return (this.m_sLayoutType==="datavalue"||this.m_sLayoutType==="chartElement");
  7818. };
  7819. CSelectionObject.prototype.marshal=function(_4ed,_4ee){
  7820. if(!this.m_oJsonForMarshal){
  7821. var _4ef={};
  7822. var _4f0=[];
  7823. var _4f1=null;
  7824. this.getDataItems();
  7825. this.getUseValues();
  7826. if(this.m_contextIds.length==0){
  7827. return null;
  7828. }
  7829. var i=0,j=0;
  7830. if(this.m_contextIds[i][j].length==0){
  7831. var _4f4=false;
  7832. do{
  7833. for(;j<this.m_contextIds[i].length;j++){
  7834. if(this.m_contextIds[i][j].length>0){
  7835. _4f4=true;
  7836. break;
  7837. }
  7838. }
  7839. if(!_4f4){
  7840. j=0;
  7841. i++;
  7842. }
  7843. }while(!_4f4);
  7844. }
  7845. var _4f5=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4ed);
  7846. var _4f6=_4ed.isMeasure(this.m_contextIds[i][j]);
  7847. var _4f7=this._getBestPossibleItemReference(this.m_contextIds[i][j],_4f6,_4ed.getCCDManager());
  7848. var _4f8=_4ed.getCCDManager().GetQuery(this.m_contextIds[i][j]);
  7849. var _4f9=this.isDataValueOrChartElement();
  7850. var _4fa=this._populateJsonForMarshal(_4f5,_4f7,_4f6,this.m_aUseValues[i][j],_4ed.getDisplayValue(this.m_contextIds[i][j]),_4ed.getMun(this.m_contextIds[i][j]),_4f9);
  7851. j++;
  7852. var _4fb=[];
  7853. for(;i<this.m_aDataItems.length;i++,j=0){
  7854. for(;j<this.m_aDataItems[i].length;j++){
  7855. _4f5=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4ed);
  7856. _4f6=_4ed.isMeasure(this.m_contextIds[i][j]);
  7857. _4f7=this._getBestPossibleItemReference(this.m_contextIds[i][j],_4f6,_4ed.getCCDManager());
  7858. var _4fc=this._populateJsonForMarshal(_4f5,_4f7,_4f6,this.m_aUseValues[i][j],_4ed.getDisplayValue(this.m_contextIds[i][j]),_4ed.getMun(this.m_contextIds[i][j]));
  7859. if(_4fc){
  7860. _4fb.push(_4fc);
  7861. }
  7862. }
  7863. }
  7864. var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
  7865. if(lid&&lid.indexOf(_4ee)>0){
  7866. lid=lid.substring(0,lid.indexOf(_4ee)-1);
  7867. }
  7868. this.m_oJsonForMarshal={"lid":lid,"query":_4f8,"selectedItem":_4fa,"context":_4fb};
  7869. }
  7870. return this.m_oJsonForMarshal;
  7871. };
  7872. CSelectionObject.prototype._populateJsonForMarshal=function(_4fe,_4ff,_500,_501,_502,mun,_504){
  7873. if(_4fe){
  7874. var _505={};
  7875. _505["itemName"]=_4fe;
  7876. _505["isMeasure"]=_500?"true":"false";
  7877. _505["mdProperty"]=_4ff.mdProperty;
  7878. _505["mdValue"]=_4ff.mdValue;
  7879. _505["isDataValueOrChartElement"]=_504?"true":"false";
  7880. if(mun){
  7881. _505["mun"]=mun;
  7882. }
  7883. if(_501){
  7884. _505["use"]=_501;
  7885. }
  7886. return _505;
  7887. }
  7888. return null;
  7889. };
  7890. CSelectionObject.prototype._getBestPossibleItemReference=function(_506,_507,_508){
  7891. var _509=null;
  7892. var _50a=null;
  7893. if(_507){
  7894. _50a="i";
  7895. _509=_508.GetQMID(_506);
  7896. if(_509==null){
  7897. _50a="m";
  7898. _509=_508.GetMUN(_506);
  7899. }
  7900. if(_509==null){
  7901. _50a="r";
  7902. _509=_508.GetRDIValue(_506);
  7903. }
  7904. }else{
  7905. _50a="l";
  7906. _509=_508.GetLUN(_506);
  7907. if(_509==null){
  7908. _50a="h";
  7909. _509=_508.GetHUN(_506);
  7910. }
  7911. if(_509==null){
  7912. _50a="i";
  7913. _509=_508.GetQMID(_506);
  7914. }
  7915. if(_509==null){
  7916. _50a="r";
  7917. _509=_508.GetRDIValue(_506);
  7918. }
  7919. }
  7920. return {"mdProperty":_50a,"mdValue":_509};
  7921. };
  7922. CSelectionChartObject.prototype=new CSelectionObject();
  7923. CSelectionChartObject.prototype.constructor=CSelectionChartObject;
  7924. CSelectionChartObject.baseclass=CSelectionObject.prototype;
  7925. function CSelectionChartObject(){
  7926. CSelectionChartObject.baseclass.initialize.call(this);
  7927. this.m_chartArea=null;
  7928. this.m_context="";
  7929. this.m_chartCtxAreas=[];
  7930. this.m_selectedVizChart=false;
  7931. };
  7932. CSelectionChartObject.prototype.isSelectionOnVizChart=function(){
  7933. return this.m_selectedVizChart;
  7934. };
  7935. CSelectionChartObject.prototype.setSelectionOnVizChart=function(_50b){
  7936. var _50c=this.m_selectionController.getSelectedChartImageFromChartArea(_50b);
  7937. if(_50c){
  7938. this.m_selectedVizChart=_50c.parentNode.getAttribute("vizchart")=="true"?true:false;
  7939. }
  7940. };
  7941. CSelectionChartObject.prototype.getArea=function(){
  7942. return this.m_chartArea;
  7943. };
  7944. CSelectionChartObject.prototype.getContext=function(){
  7945. return this.m_context;
  7946. };
  7947. CSelectionChartObject.prototype.getCtxAreas=function(){
  7948. return this.m_chartCtxAreas;
  7949. };
  7950. CSelectionChartObject.prototype.setCtxAreas=function(_50d){
  7951. this.m_chartCtxAreas=_50d;
  7952. };
  7953. CSelectionChartObject.prototype.getCtxAttributeString=function(){
  7954. return this.m_context;
  7955. };
  7956. function CChartHelper(_50e,_50f,_510){
  7957. var _511=_50e.parentNode;
  7958. this.m_selectionObjectFactory=_50f;
  7959. this.m_map=_511;
  7960. _510.loadExtra();
  7961. this.imageMapHighlighter=new CImageMapHighlight(_511,_510.sWebContentRoot);
  7962. this.initialize();
  7963. };
  7964. CChartHelper.prototype.initialize=function(){
  7965. this.buildMapCtxAreas();
  7966. this.m_chartCtxNodes={};
  7967. };
  7968. CChartHelper.prototype.buildMapCtxAreas=function(){
  7969. var _512={};
  7970. var _513=this.m_map.childNodes;
  7971. var _514=_513.length;
  7972. var _515=null;
  7973. for(var i=0;i<_514;i++){
  7974. var a=_513[i];
  7975. _515=a.getAttribute("ctx");
  7976. if(_515){
  7977. if(_512[_515]){
  7978. _512[_515].push(a);
  7979. }else{
  7980. _512[_515]=[a];
  7981. }
  7982. }
  7983. }
  7984. this.m_ctxAreas=_512;
  7985. };
  7986. CChartHelper.prototype.getChartNode=function(_518){
  7987. if(!this.isAreaInitialized(_518)){
  7988. var _519=_518.parentNode;
  7989. this.m_map=_519;
  7990. this.initialize();
  7991. this.imageMapHighlighter.initialize(_519);
  7992. }
  7993. var _51a=_518.getAttribute("ctx");
  7994. if(!this.m_chartCtxNodes[_51a]){
  7995. this.m_chartCtxNodes[_51a]=this.m_selectionObjectFactory.getSelectionChartObject(_518);
  7996. this.m_chartCtxNodes[_51a].setCtxAreas(this.m_ctxAreas[_51a]);
  7997. }
  7998. return this.m_chartCtxNodes[_51a];
  7999. };
  8000. CChartHelper.prototype.isAreaInitialized=function(_51b){
  8001. return this.imageMapHighlighter.isAreaInitialized(_51b);
  8002. };
  8003. CChartHelper.prototype.getImageMapHighlighter=function(){
  8004. return this.imageMapHighlighter;
  8005. };
  8006. function CSelectionObjectFactory(_51c){
  8007. this.m_selectionController=_51c;
  8008. };
  8009. CSelectionObjectFactory.prototype.getSelectionController=function(){
  8010. return this.m_selectionController;
  8011. };
  8012. CSelectionObjectFactory.prototype.getChildSpans=function(_51d){
  8013. var _51e=[];
  8014. for(var i=0;i<_51d.childNodes.length;i++){
  8015. var _520=_51d.childNodes[i];
  8016. if(!_520.getAttribute||_520.getAttribute("skipSelection")!="true"){
  8017. _51e.push(_51d.childNodes[i]);
  8018. }
  8019. }
  8020. var _521=_51d;
  8021. var _522="";
  8022. while(!_522&&_521){
  8023. _522=_521.attributes?_521.attributes["LID"]:"";
  8024. _521=_521.parentNode;
  8025. }
  8026. _522=_522?_522.value:"";
  8027. var _523=[];
  8028. while(_51e.length>0){
  8029. var _520=_51e.pop();
  8030. var lid=_520.attributes?_520.attributes["LID"]:"";
  8031. lid=lid?lid.value:"";
  8032. if(!lid||lid==_522){
  8033. if(_520.nodeName.toLowerCase()=="span"){
  8034. _523.push(_520);
  8035. }else{
  8036. for(i=0;i<_520.childNodes.length;i++){
  8037. _51e.push(_520.childNodes[i]);
  8038. }
  8039. }
  8040. }
  8041. }
  8042. return _523;
  8043. };
  8044. CSelectionObjectFactory.prototype.getSelectionObject=function(_525,_526){
  8045. var _527=new CSelectionObject();
  8046. try{
  8047. _527.setSelectionController(this.getSelectionController());
  8048. _527.m_oCellRef=_525;
  8049. _527.m_sColumnRef=_525.getAttribute("cid");
  8050. _527.m_sCellTypeId=_525.getAttribute("uid");
  8051. _527.m_sLayoutType=_525.getAttribute("type");
  8052. _527.m_sTag=_525.getAttribute("tag");
  8053. _527.m_layoutElementId=this.getLayoutElementId(_525);
  8054. _527.m_dataContainerType=this.getContainerType(_525);
  8055. if(typeof cf!="undefined"){
  8056. var _528=cf.cfgGet("MiniQueryObj");
  8057. if(_528){
  8058. var _529=_528.findChildWithAttribute("tag",_527.m_sTag);
  8059. if(_529&&_529.getAttribute("id")!=null){
  8060. _527.m_sColumnName=_529.getAttribute("id");
  8061. }
  8062. }
  8063. }
  8064. var _52a=this.getChildSpans(_525);
  8065. if(_52a.length>0){
  8066. for(var i=0;i<_52a.length;i++){
  8067. var _52c=_52a[i];
  8068. if(_52c.nodeType==1&&_52c.nodeName.toLowerCase()=="span"&&_52c.style.visibility!="hidden"){
  8069. var _52d=null;
  8070. if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""){
  8071. _52d=_525;
  8072. }else{
  8073. if(_52c.getAttribute("ctx")!=null&&_52c.getAttribute("ctx")!=""){
  8074. _52d=_52c;
  8075. }else{
  8076. if(_52c.getAttribute("dtTargets")&&_52c.childNodes&&_52c.childNodes.length){
  8077. for(var _52e=0;_52e<_52c.childNodes.length;_52e++){
  8078. if(_52c.childNodes[_52e].nodeType==1&&_52c.childNodes[_52e].style.visibility!="hidden"){
  8079. _52d=_52c.childNodes[_52e];
  8080. }
  8081. }
  8082. }else{
  8083. for(var _52f=0;_52f<_52c.childNodes.length;_52f++){
  8084. var _530=_52c.childNodes[_52f];
  8085. if(typeof _530.getAttribute!="undefined"&&_530.getAttribute("ctx")!=null&&_530.getAttribute("ctx")!=""){
  8086. _52d=_530;
  8087. break;
  8088. }
  8089. }
  8090. }
  8091. }
  8092. }
  8093. var _531="";
  8094. if(_52d&&_52d.getAttribute("ctx")){
  8095. _531=_52d.getAttribute("ctx");
  8096. }
  8097. _527.m_aDisplayValues[_527.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_531,_525.parentNode);
  8098. if(typeof _526!="undefined"&&_526!=_531){
  8099. continue;
  8100. }
  8101. _527=this.processCTX(_527,_531);
  8102. }
  8103. }
  8104. }else{
  8105. if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""&&_527.m_sLayoutType=="datavalue"){
  8106. _527=this.processCTX(_527,_525.getAttribute("ctx"));
  8107. }
  8108. }
  8109. this.getSelectionController().processColumnTitleNode(_527);
  8110. }
  8111. catch(ex){
  8112. }
  8113. return _527;
  8114. };
  8115. CSelectionObjectFactory.prototype.processCTX=function(_532,_533){
  8116. if(typeof _533!="string"||_533.length==0){
  8117. return _532;
  8118. }
  8119. var ctx;
  8120. if(typeof _532.m_contextIds=="object"&&_532.m_contextIds!==null&&_532.m_contextIds.length>0){
  8121. var _535=_533.split("::");
  8122. for(ctx=0;ctx<_532.m_contextIds.length;++ctx){
  8123. try{
  8124. if(_535[ctx]){
  8125. _532.m_contextIds[ctx]=_532.m_contextIds[ctx].concat(_535[ctx].split(":"));
  8126. }
  8127. }
  8128. catch(e){
  8129. }
  8130. }
  8131. }else{
  8132. _532.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_533);
  8133. }
  8134. _532.m_ctxAttributeString=_533;
  8135. return _532;
  8136. };
  8137. CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_537,_538){
  8138. if(!_538){
  8139. _538=document;
  8140. }
  8141. var _539=new CSelectionObject();
  8142. _539.setSelectionController(this.getSelectionController());
  8143. _539.m_oCellRef=null;
  8144. _539.m_sColumnRef=null;
  8145. _539.m_sCellTypeId=null;
  8146. _539.refQuery="";
  8147. var _53a=_538.getElementsByTagName("td");
  8148. for(var i=0;i<_53a.length;i++){
  8149. var _53c=_53a[i].getAttribute("tag");
  8150. if(_53c!=null&&_53c!=""){
  8151. if(tag==_53c){
  8152. var _53d=_53a[i].className;
  8153. if(_53d!=null&&_53c!=""){
  8154. if((_537=="columnTitle"&&_53d=="lt")||(_537=="datavalue"&&_53d=="lc")){
  8155. _539.m_sColumnRef=_53a[i].getAttribute("cid");
  8156. _539.m_sCellTypeId=_53a[i].getAttribute("uid");
  8157. break;
  8158. }
  8159. }
  8160. }
  8161. }
  8162. }
  8163. if(_539.m_sCellTypeId==null){
  8164. return null;
  8165. }
  8166. return _539;
  8167. };
  8168. CSelectionObjectFactory.prototype.getSelectionChartObject=function(_53e){
  8169. var _53f="";
  8170. if(_53e.getAttribute("flashChart")!=null){
  8171. if(typeof _53e.getCtx!="undefined"){
  8172. try{
  8173. _53f=_53e.getCtx();
  8174. }
  8175. catch(e){
  8176. _53f="";
  8177. }
  8178. }
  8179. }else{
  8180. _53f=_53e.getAttribute("ctx");
  8181. }
  8182. var _540=new CSelectionChartObject();
  8183. _540.setSelectionController(this.getSelectionController());
  8184. if(_53f!=null){
  8185. _540.m_contextIds=_53f.split("::");
  8186. for(var ctx=0;ctx<_540.m_contextIds.length;++ctx){
  8187. _540.m_contextIds[ctx]=_540.m_contextIds[ctx].split(":");
  8188. }
  8189. }
  8190. _540.m_layoutElementId=this.getLayoutElementId(_53e);
  8191. _540.m_sLayoutType=_53e.getAttribute("type");
  8192. _540.m_chartArea=_53e;
  8193. _540.m_context=_53f;
  8194. _540.setSelectionOnVizChart(_53e);
  8195. return _540;
  8196. };
  8197. CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_542){
  8198. var _543="";
  8199. switch(_542){
  8200. case "ls":
  8201. _543="list";
  8202. break;
  8203. case "xt":
  8204. _543="crosstab";
  8205. break;
  8206. case "rt":
  8207. _543="repeaterTable";
  8208. break;
  8209. }
  8210. return _543;
  8211. };
  8212. CSelectionObjectFactory.prototype.getContainerType=function(el){
  8213. var type="";
  8214. if(el){
  8215. if(el.className){
  8216. type=this.getContainerTypeFromClass(el.className);
  8217. }
  8218. if(!type){
  8219. var _546=el.parentNode;
  8220. if(_546){
  8221. type=this.getContainerType(_546);
  8222. }
  8223. }
  8224. }
  8225. return type;
  8226. };
  8227. CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
  8228. var id="";
  8229. var _549=this.getSelectionController().getNamespace();
  8230. if(el){
  8231. if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
  8232. for(var _54a=0;_54a<el.childNodes.length;_54a++){
  8233. var _54b=el.childNodes[_54a];
  8234. if(_54b.nodeName.toLowerCase()=="img"&&_54b.getAttribute("lid")!=null){
  8235. return _54b.getAttribute("lid");
  8236. }
  8237. }
  8238. }
  8239. id=(el.getAttribute&&el.getAttribute("LID"))||"";
  8240. if(!id){
  8241. var _54c=el.parentNode;
  8242. if(_54c){
  8243. id=this.getLayoutElementId(_54c);
  8244. }
  8245. }else{
  8246. if(el.tagName.toUpperCase()=="MAP"){
  8247. id=id.replace(_549,"");
  8248. id=_549+id;
  8249. var _54d="#"+id;
  8250. var _54e=getElementsByAttribute(el.parentNode,"IMG","usemap",_54d);
  8251. if(_54e.length>0){
  8252. id=_54e[0].getAttribute("LID");
  8253. }
  8254. }
  8255. }
  8256. }
  8257. return id;
  8258. };
  8259. function CSelectionController(_54f,_550){
  8260. this.m_bSelectionBasedFeaturesEnabled=false;
  8261. this.m_bDrillUpDownEnabled=false;
  8262. this.m_bModelDrillThroughEnabled=false;
  8263. this.m_oCognosViewer=null;
  8264. this.m_bSavedSelections=false;
  8265. if(_550){
  8266. this.m_oCognosViewer=_550;
  8267. }
  8268. this.initialize(_54f);
  8269. this.FILTER_SELECTION_STYLE=0;
  8270. this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
  8271. };
  8272. CSelectionController.prototype.initialize=function(_551){
  8273. this.m_sNamespace=_551;
  8274. this.m_aCutColumns=[];
  8275. this.m_aSelectedObjects=[];
  8276. this.m_selectedClass=[];
  8277. this.m_cutClass=[];
  8278. this.m_oObserver=new CObserver(this);
  8279. this.m_bSelectionArraysSetup=false;
  8280. this.m_aSelectionHoverNodes=[];
  8281. this.m_bUsingCCDManager=false;
  8282. this.m_aReportMetadataArray=[];
  8283. this.m_aReportContextDataArray=[];
  8284. this.m_oCDManager=new CCDManager();
  8285. this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this);
  8286. this.m_selectedChartArea=null;
  8287. this.m_selectedChartNodes=[];
  8288. this.m_selectionContainerMap=null;
  8289. this.m_chartHelpers={};
  8290. if(this.m_oCognosViewer!=null){
  8291. this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer);
  8292. }
  8293. this.m_maxSecondarySelection=-1;
  8294. this.c_usageMeasure="2";
  8295. this.m_ccl_dateTypes={59:"dateTime",60:"interval"};
  8296. this.m_selectionStyles=new CSelectionDefaultStyles(this);
  8297. this.m_originalSelectionStyles=this.m_selectionStyles;
  8298. this.m_bAllowHorizontalDataValueSelection=false;
  8299. };
  8300. CSelectionController.prototype.secondarySelectionIsDisabled=function(){
  8301. return this.m_selectionStyles.secondarySelectionIsDisabled();
  8302. };
  8303. CSelectionController.prototype.getPrimarySelectionColor=function(){
  8304. return this.m_selectionStyles.getPrimarySelectionColor();
  8305. };
  8306. CSelectionController.prototype.getHighContrastBorderStyle=function(){
  8307. return this.m_selectionStyles.getHighContrastBorderStyle();
  8308. };
  8309. CSelectionController.prototype.getSecondarySelectionColor=function(){
  8310. return this.m_selectionStyles.getSecondarySelectionColor();
  8311. };
  8312. CSelectionController.prototype.resetSelectionStyles=function(){
  8313. this.setSelectionStyles();
  8314. };
  8315. CSelectionController.prototype.setSelectionStyles=function(_552){
  8316. switch(_552){
  8317. case this.FILTER_SELECTION_STYLE:
  8318. if(!this.m_selectionFilterStyles){
  8319. this.m_selectionFilterStyles=new CSelectionFilterStyles(this);
  8320. }
  8321. this.m_selectionStyles=this.m_selectionFilterStyles;
  8322. break;
  8323. case this.FILTER_SELECTION_CONTEXT_MENU_STYLE:
  8324. if(!this.m_selectionFilterContextMenuStyles){
  8325. this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this);
  8326. }
  8327. this.m_selectionStyles=this.m_selectionFilterContextMenuStyles;
  8328. break;
  8329. default:
  8330. this.m_selectionStyles=this.m_originalSelectionStyles;
  8331. }
  8332. };
  8333. CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){
  8334. this.m_bAllowHorizontalDataValueSelection=false;
  8335. };
  8336. CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_553){
  8337. this.m_bAllowHorizontalDataValueSelection=_553;
  8338. };
  8339. CSelectionController.prototype.allowHorizontalDataValueSelection=function(){
  8340. return this.m_bAllowHorizontalDataValueSelection;
  8341. };
  8342. CSelectionController.prototype.clearSelectionData=function(){
  8343. this.m_aSelectedObjects=[];
  8344. this.m_selectedChartNodes=[];
  8345. this.m_oSelectedDrillThroughImage=null;
  8346. this.m_oSelectedDrillThroughSingleton=null;
  8347. };
  8348. CSelectionController.prototype.getCCDManager=function(){
  8349. return this.m_oCDManager;
  8350. };
  8351. CSelectionController.prototype.getCtxIdFromDisplayValue=function(_554){
  8352. if(!this.m_bUsingCCDManager){
  8353. var _555=this.getReportContextDataArray();
  8354. var _556=1;
  8355. for(var _557 in _555){
  8356. var _558=_555[_557];
  8357. if(_558[_556]==_554){
  8358. return _557;
  8359. }
  8360. }
  8361. return "";
  8362. }else{
  8363. var sId=this.m_oCDManager.GetContextIdForDisplayValue(_554);
  8364. return (sId==null)?"":sId;
  8365. }
  8366. };
  8367. CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_55c){
  8368. return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_55c);
  8369. };
  8370. CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){
  8371. var sLun=lun;
  8372. var sHun=hun;
  8373. if(mun&&mun.indexOf("->:[TM].")>0){
  8374. sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun);
  8375. sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun);
  8376. }
  8377. return {"lun":sLun,"hun":sHun};
  8378. };
  8379. CSelectionController.prototype.getCtxIdFromMun=function(sMun){
  8380. if(!this.m_bUsingCCDManager){
  8381. var _563=this.getReportMetadataArray();
  8382. var _564=0;
  8383. for(var sKey in _563){
  8384. var _566=_563[sKey];
  8385. if(_566[_564]==sMun){
  8386. var _567=2;
  8387. var _568=this.getReportContextDataArray();
  8388. for(var _569 in _568){
  8389. var _56a=_568[_569];
  8390. if(_56a[_567]==sKey){
  8391. return _569;
  8392. }
  8393. }
  8394. }
  8395. }
  8396. return "";
  8397. }else{
  8398. var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
  8399. return (sId==null)?"":sId;
  8400. }
  8401. };
  8402. CSelectionController.prototype.canDrillDown=function(_56c){
  8403. var _56d=this.getDrillFlagForMember(_56c);
  8404. return (_56d==3||_56d==2);
  8405. };
  8406. CSelectionController.prototype.canDrillUp=function(_56e){
  8407. var _56f=this.getDrillFlagForMember(_56e);
  8408. return (_56f==3||_56f==1);
  8409. };
  8410. CSelectionController.prototype.getQueryModelId=function(_570){
  8411. var qmid="";
  8412. if(!this.m_bUsingCCDManager){
  8413. var _572=this.m_aReportContextDataArray[_570];
  8414. if(_572&&typeof _572[3]!="undefined"){
  8415. var _573=_572[3];
  8416. var _574=this.m_aReportMetadataArray[_573];
  8417. if(typeof _574!="undefined"&&typeof _574[1]!="undefined"&&_574[1]=="I"){
  8418. qmid=_574[0];
  8419. }
  8420. }
  8421. }else{
  8422. qmid=this.m_oCDManager.GetQMID(_570);
  8423. }
  8424. return qmid;
  8425. };
  8426. CSelectionController.prototype.getRefQuery=function(_575){
  8427. if(!this.m_bUsingCCDManager){
  8428. return this.getMetaDataItemUseValue(4,_575);
  8429. }else{
  8430. var _576=this.m_oCDManager.GetQuery(_575);
  8431. return (_576==null)?"":_576;
  8432. }
  8433. };
  8434. CSelectionController.prototype.getRefDataItem=function(_577){
  8435. return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_577);
  8436. };
  8437. CSelectionController.prototype.getMun=function(_578){
  8438. return this.m_oCognosViewer.getReportContextHelper().getMun(_578);
  8439. };
  8440. CSelectionController.prototype.getHun=function(_579){
  8441. if(!this.m_bUsingCCDManager){
  8442. var sHun=null;
  8443. var _57b=this.getRDI(_579);
  8444. if(_57b&&_57b.length>4&&_57b[1]=="R"){
  8445. var _57c=_57b[4];
  8446. var _57d=this.getReportMetadataArray();
  8447. _57b=_57d[_57c];
  8448. }
  8449. if(_57b&&_57b.length>1&&_57b[1]=="H"){
  8450. sHun=_57b[0];
  8451. }
  8452. return sHun;
  8453. }else{
  8454. return this.m_oCDManager.GetHUN(_579);
  8455. }
  8456. };
  8457. CSelectionController.prototype.fetchContextData=function(_57e,_57f){
  8458. var _580=0;
  8459. if(this.m_bUsingCCDManager){
  8460. _580=this.m_oCDManager.FetchContextData(_57e,_57f);
  8461. }
  8462. return _580;
  8463. };
  8464. CSelectionController.prototype.getMetaDataItem=function(sKey){
  8465. var _582=this.getReportMetadataArray();
  8466. if(typeof _582[sKey]!="undefined"){
  8467. return _582[sKey];
  8468. }
  8469. return null;
  8470. };
  8471. CSelectionController.prototype.getContextDataItem=function(_583){
  8472. var _584=this.getReportContextDataArray();
  8473. if(typeof _584[_583]!="undefined"){
  8474. return _584[_583];
  8475. }
  8476. return null;
  8477. };
  8478. CSelectionController.prototype.getMetaDataItemUseValue=function(_585,_586){
  8479. var _587=this.getContextDataItem(_586);
  8480. if(_587!=null){
  8481. var _588=_587[_585];
  8482. if(_588!=""){
  8483. var _589=this.getMetaDataItem(_588);
  8484. if(_589!=null){
  8485. return _589[0];
  8486. }
  8487. }
  8488. }
  8489. return "";
  8490. };
  8491. CSelectionController.prototype.getRDI=function(_58a){
  8492. var _58b=this.getContextDataItem(_58a);
  8493. if(_58b!=null){
  8494. var _58c=_58b[0];
  8495. if(_58c!=""){
  8496. var _58d=this.getMetaDataItem(_58c);
  8497. if(_58d!=null){
  8498. return _58d;
  8499. }
  8500. }
  8501. }
  8502. };
  8503. CSelectionController.prototype.getNamespace=function(){
  8504. return this.m_sNamespace;
  8505. };
  8506. CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_58e){
  8507. this.m_bSelectionBasedFeaturesEnabled=_58e;
  8508. };
  8509. CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
  8510. return this.m_bSelectionBasedFeaturesEnabled;
  8511. };
  8512. CSelectionController.prototype.setDrillUpDownEnabled=function(_58f){
  8513. this.m_bDrillUpDownEnabled=_58f;
  8514. };
  8515. CSelectionController.prototype.getDrillUpDownEnabled=function(){
  8516. return this.m_bDrillUpDownEnabled;
  8517. };
  8518. CSelectionController.prototype.setModelDrillThroughEnabled=function(_590){
  8519. this.m_bModelDrillThroughEnabled=_590;
  8520. };
  8521. CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
  8522. var _591=this.getAllSelectedObjects();
  8523. if(_591&&_591.length>0){
  8524. var _592=_591[0];
  8525. if(_592.hasContextInformation()){
  8526. var _593=this.m_oCDManager.GetBIValue(_592.m_contextIds[0][0]);
  8527. if(!_593){
  8528. return null;
  8529. }
  8530. return _593;
  8531. }
  8532. }
  8533. return null;
  8534. };
  8535. CSelectionController.prototype.getModelPathForCurrentSelection=function(){
  8536. var _594=null;
  8537. var _595=this.getBookletItemForCurrentSelection();
  8538. if(_595){
  8539. var _594=this.m_oCDManager.getModelPathFromBookletItem(_595);
  8540. }
  8541. return _594;
  8542. };
  8543. CSelectionController.prototype.getModelDrillThroughEnabled=function(){
  8544. var _596=this.getBookletItemForCurrentSelection();
  8545. if(_596){
  8546. var _597=this.m_oCDManager.GetBookletModelBasedDrillThru(_596);
  8547. return _597==1?true:false;
  8548. }else{
  8549. return this.m_bModelDrillThroughEnabled;
  8550. }
  8551. };
  8552. CSelectionController.prototype.clearSelectedObjects=function(_598){
  8553. try{
  8554. if(!_598){
  8555. _598=document;
  8556. }
  8557. this.updateUI(_598,this.getSelections(),true,false);
  8558. this.m_aSelectedObjects=[];
  8559. if(typeof this.onSelectionChange=="function"){
  8560. this.onSelectionChange();
  8561. }
  8562. return true;
  8563. }
  8564. catch(e){
  8565. return false;
  8566. }
  8567. };
  8568. CSelectionController.prototype.resetSelections=function(_599){
  8569. try{
  8570. if(!_599){
  8571. _599=document;
  8572. }
  8573. if(this.hasSelectedChartNodes()){
  8574. this.resetChartSelections(_599);
  8575. }
  8576. this.m_oSelectedDrillThroughImage=null;
  8577. this.m_oSelectedDrillThroughSingleton=null;
  8578. if(this.getSelections()){
  8579. this.updateUI(_599,this.getSelections(),true,false);
  8580. this.updateUI(_599,this.getCutColumns(),true,false);
  8581. this.m_aCutColumns=[];
  8582. this.m_aSelectedObjects=[];
  8583. this.m_selectedClass=[];
  8584. this.m_cutClass=[];
  8585. if(typeof this.onSelectionChange=="function"){
  8586. this.onSelectionChange();
  8587. }
  8588. }
  8589. return true;
  8590. }
  8591. catch(e){
  8592. return false;
  8593. }
  8594. };
  8595. CSelectionController.prototype.resetChartSelections=function(_59a){
  8596. var _59b=this.m_chartHelpers;
  8597. for(var _59c in _59b){
  8598. if(_59b[_59c]){
  8599. var _59d=_59b[_59c].getImageMapHighlighter();
  8600. if(_59d.hideAllAreas){
  8601. _59d.hideAllAreas();
  8602. }
  8603. }
  8604. }
  8605. this.m_selectedChartNodes=[];
  8606. this.m_selectionContainerMap=null;
  8607. };
  8608. CSelectionController.prototype.addSelectionObject=function(_59e,_59f){
  8609. try{
  8610. if(!_59f){
  8611. _59f=document;
  8612. }
  8613. var _5a0=_59e.getCellRef();
  8614. if(this.isCellSelected(_5a0)!==true||(typeof _5a0!="object"||_5a0===null)){
  8615. if(this.isColumnCut(_59e.getTag())!==true){
  8616. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_59e;
  8617. if(typeof this.onSelectionChange=="function"){
  8618. this.onSelectionChange();
  8619. }
  8620. this.updateUI(_59f,this.getSelections(),false,false);
  8621. }
  8622. }
  8623. return true;
  8624. }
  8625. catch(e){
  8626. return false;
  8627. }
  8628. };
  8629. CSelectionController.prototype.removeSelectionObject=function(_5a1,_5a2){
  8630. try{
  8631. if(!_5a2){
  8632. _5a2=document;
  8633. }
  8634. var _5a3=[];
  8635. var _5a4;
  8636. for(_5a4=0;_5a4<this.m_aSelectedObjects.length;_5a4++){
  8637. var _5a5=this.m_aSelectedObjects[_5a4].getCellRef();
  8638. var _5a6=_5a1.getCellRef();
  8639. if(typeof _5a5=="object"&&typeof _5a6=="object"&&_5a5!==null&&_5a6!==null){
  8640. if(_5a5==_5a6){
  8641. _5a3[_5a3.length]=_5a4;
  8642. }
  8643. }
  8644. }
  8645. if(_5a3.length>0){
  8646. this.updateUI(_5a2,this.getSelections(),true,false);
  8647. var _5a7=[];
  8648. for(_5a4=0;_5a4<this.m_aSelectedObjects.length;_5a4++){
  8649. var _5a8=true;
  8650. for(var j=0;j<_5a3.length;j++){
  8651. if(_5a4==_5a3[j]){
  8652. _5a8=false;
  8653. }
  8654. }
  8655. if(_5a8){
  8656. _5a7[_5a7.length]=this.m_aSelectedObjects[_5a4];
  8657. }
  8658. }
  8659. this.m_aSelectedObjects=_5a7;
  8660. this.updateUI(_5a2,this.getSelections(),false,false);
  8661. }
  8662. if(typeof this.onSelectionChange=="function"){
  8663. this.onSelectionChange();
  8664. }
  8665. return true;
  8666. }
  8667. catch(e){
  8668. return false;
  8669. }
  8670. };
  8671. CSelectionController.prototype.isSavedCellSelected=function(_5aa){
  8672. return this.isCellSelectedHelper(_5aa,this.getSavedSelectedObjects());
  8673. };
  8674. CSelectionController.prototype.isCellSelected=function(_5ab){
  8675. return this.isCellSelectedHelper(_5ab,this.getSelections());
  8676. };
  8677. CSelectionController.prototype.isCellSelectedHelper=function(_5ac,_5ad){
  8678. try{
  8679. for(var i=0;i<_5ad.length;i++){
  8680. var _5af=_5ad[i].getCellRef();
  8681. if(typeof _5af=="object"&&_5af!==null){
  8682. if(_5af==_5ac){
  8683. return true;
  8684. }
  8685. }
  8686. }
  8687. }
  8688. catch(e){
  8689. }
  8690. return false;
  8691. };
  8692. CSelectionController.prototype.isColumnSelected=function(_5b0){
  8693. try{
  8694. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  8695. if(this.m_aSelectedObjects[i].getTag()==_5b0){
  8696. return true;
  8697. }
  8698. }
  8699. }
  8700. catch(e){
  8701. }
  8702. return false;
  8703. };
  8704. CSelectionController.prototype.isColumnCut=function(_5b2){
  8705. try{
  8706. for(var i=0;i<this.m_aCutColumns.length;i++){
  8707. if(this.m_aCutColumns[i].getTag()==_5b2){
  8708. return true;
  8709. }
  8710. }
  8711. }
  8712. catch(e){
  8713. }
  8714. return false;
  8715. };
  8716. CSelectionController.prototype.getSelections=function(){
  8717. return this.m_aSelectedObjects;
  8718. };
  8719. CSelectionController.prototype.selectSingleDomNode=function(_5b4){
  8720. this.clearSelectedObjects();
  8721. var _5b5=this.getSelectionObjectFactory().getSelectionObject(_5b4);
  8722. var _5b6=null;
  8723. if(isIE()){
  8724. _5b6=_5b4.document;
  8725. }else{
  8726. _5b6=_5b4.ownerDocument;
  8727. }
  8728. this.addSelectionObject(_5b5,_5b6);
  8729. };
  8730. CSelectionController.prototype.hasCutColumns=function(){
  8731. if(this.m_aCutColumns.length===0){
  8732. return false;
  8733. }else{
  8734. return true;
  8735. }
  8736. };
  8737. CSelectionController.prototype.setCutColumns=function(_5b7,_5b8){
  8738. try{
  8739. if(!_5b8){
  8740. _5b8=document;
  8741. }
  8742. this.updateUI(_5b8,this.getSelections(),true,false);
  8743. this.updateUI(_5b8,this.getCutColumns(),true,1);
  8744. this.m_aCutColumns=[];
  8745. if(_5b7===true){
  8746. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  8747. this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
  8748. }
  8749. this.m_aSelectedObjects=[];
  8750. }
  8751. this.updateUI(_5b8,this.getCutColumns(),false,2);
  8752. return true;
  8753. }
  8754. catch(e){
  8755. return false;
  8756. }
  8757. };
  8758. CSelectionController.prototype.getCutColumns=function(){
  8759. return this.m_aCutColumns;
  8760. };
  8761. CSelectionController.prototype.getObservers=function(){
  8762. return this.m_oObserver;
  8763. };
  8764. CSelectionController.prototype.attachObserver=function(_5ba){
  8765. this.m_oObserver.attach(_5ba);
  8766. };
  8767. CSelectionController.prototype.onSelectionChange=function(){
  8768. this.getObservers().notify();
  8769. };
  8770. CSelectionController.prototype.getSelectedColumns=function(_5bb){
  8771. var _5bc=[];
  8772. if(typeof _5bb=="undefined"){
  8773. _5bb=this.getSelections();
  8774. }
  8775. var _5bd=_5bb.length;
  8776. for(var i=0;i<_5bd;i++){
  8777. var _5bf=_5bb[i];
  8778. var _5c0=true;
  8779. for(var j=0;j<_5bc.length;j++){
  8780. if(_5bc[j][0]==_5bf.getColumnRef()&&_5bc[j][1]==_5bf.getCellTypeId()){
  8781. _5c0=false;
  8782. break;
  8783. }
  8784. }
  8785. if(_5c0){
  8786. _5bc[_5bc.length]=[_5bf.getColumnRef(),_5bf.getCellTypeId(),_5bf.getLayoutType(),_5bf.getTag(),_5bf.getColumnName()];
  8787. }
  8788. }
  8789. return _5bc;
  8790. };
  8791. CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
  8792. var _5c2=[];
  8793. var _5c3=this.getAllSelectedObjects();
  8794. for(var i=0;i<_5c3.length;i++){
  8795. var _5c5=false;
  8796. var _5c6=_5c3[i];
  8797. for(var ii=0;ii<_5c2.length;ii++){
  8798. if(_5c6.m_contextIds[0][0]==_5c2[ii].m_contextIds[0][0]){
  8799. _5c5=true;
  8800. break;
  8801. }
  8802. }
  8803. if(!_5c5){
  8804. _5c2.push(_5c6);
  8805. }
  8806. }
  8807. return _5c2;
  8808. };
  8809. CSelectionController.prototype.getAllSelectedObjects=function(){
  8810. var _5c8=this.getSelections();
  8811. if(this.hasSelectedChartNodes()){
  8812. _5c8=_5c8.concat(this.getSelectedChartNodes());
  8813. }
  8814. return _5c8;
  8815. };
  8816. CSelectionController.prototype.getSelectedColumnIds=function(_5c9){
  8817. var _5ca=[];
  8818. if(typeof _5c9=="undefined"){
  8819. _5c9=this.getSelections();
  8820. }
  8821. var _5cb=this.getSelectedColumns(_5c9);
  8822. for(var _5cc=0;_5cc<_5cb.length;_5cc++){
  8823. var _5cd=true;
  8824. for(var _5ce=0;_5ce<_5ca.length;_5ce++){
  8825. if(_5ca[_5ce]==_5cb[_5cc][4]){
  8826. _5cd=false;
  8827. break;
  8828. }
  8829. }
  8830. if(_5cd){
  8831. _5ca[_5ca.length]=_5cb[_5cc][4];
  8832. }
  8833. }
  8834. return _5ca;
  8835. };
  8836. var STYLE_SELECTION={};
  8837. CSelectionController.prototype.selecting=function(c,_5d0){
  8838. var _5d1="."+c+_5d0;
  8839. var doc=document;
  8840. var _5d3=document.getElementById("CVIFrame"+this.m_sNamespace);
  8841. if(_5d3){
  8842. doc=_5d3.contentWindow.document;
  8843. }
  8844. var _5d4=doc.createElement("style");
  8845. _5d4.setAttribute("type","text/css");
  8846. if(_5d4.styleSheet){
  8847. _5d4.styleSheet.cssText=_5d1;
  8848. }else{
  8849. _5d4.appendChild(doc.createTextNode(_5d1));
  8850. }
  8851. doc.getElementsByTagName("head").item(0).appendChild(_5d4);
  8852. STYLE_SELECTION[c]=_5d4;
  8853. };
  8854. CSelectionController.prototype.deselecting=function(_5d5){
  8855. for(var i=0;i<_5d5.length;++i){
  8856. if(STYLE_SELECTION[_5d5[i]]){
  8857. var node=STYLE_SELECTION[_5d5[i]];
  8858. node.parentNode.removeChild(node);
  8859. STYLE_SELECTION[_5d5[i]]=null;
  8860. }
  8861. }
  8862. if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
  8863. var _5d8=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
  8864. if(_5d8!=null){
  8865. var _5d9=_5d8.style.display;
  8866. _5d8.style.display="none";
  8867. _5d8.style.display=_5d9;
  8868. }
  8869. }
  8870. };
  8871. CSelectionController.prototype.showViewerContextMenu=function(){
  8872. if(this.hasSelectedChartNodes()){
  8873. return true;
  8874. }
  8875. if(this.m_aSelectedObjects&&this.m_aSelectedObjects.length>0){
  8876. return true;
  8877. }
  8878. return false;
  8879. };
  8880. function getStyleFromClass(c){
  8881. for(var i=0;i<document.styleSheets.length;i++){
  8882. var ss=document.styleSheets[i];
  8883. var _5dd=(ss.cssRules?ss.cssRules:ss.rules);
  8884. for(var j=0;j<_5dd.length;j++){
  8885. var cr=_5dd[j];
  8886. var _5e0=new RegExp("\\b"+c+"\\b","g");
  8887. if(cr.selectorText&&cr.selectorText.match(_5e0)){
  8888. return cr;
  8889. }
  8890. }
  8891. }
  8892. return 0;
  8893. };
  8894. CSelectionController.prototype.canUpdateSelection=function(_5e1){
  8895. return this.m_selectionStyles.canApplyToSelection(_5e1);
  8896. };
  8897. CSelectionController.prototype.setStyleForSelection=function(_5e2){
  8898. return this.m_selectionStyles.setStyleForSelection(_5e2);
  8899. };
  8900. CSelectionController.prototype.updateUI=function(_5e3,_5e4,_5e5,_5e6){
  8901. if(!_5e3){
  8902. _5e3=document;
  8903. }
  8904. try{
  8905. if(_5e4&&_5e4.length>0){
  8906. var _5e7,_5e8,_5e9;
  8907. if(_5e6==1||_5e6==2){
  8908. if(_5e5){
  8909. this.deselecting(this.m_cutClass);
  8910. }else{
  8911. var _5ea=getStyleFromClass("cutSelection").style.color;
  8912. var _5eb=getStyleFromClass("cutSelection").style.backgroundColor;
  8913. _5e7=_5e4.length;
  8914. for(_5e8=0;_5e8<_5e7;_5e8++){
  8915. _5e9=_5e4[_5e8].getCellRef();
  8916. var _5ec="cutQS"+_5e9.getAttribute("cid");
  8917. this.selecting(_5ec,"\n{ background-color: "+_5eb+"; color: "+_5ea+";}\n");
  8918. this.m_cutClass.push(_5ec);
  8919. }
  8920. }
  8921. }else{
  8922. if(this.m_oCognosViewer){
  8923. this.findSelectionURLs();
  8924. _5e9="";
  8925. _5e7=_5e4.length;
  8926. for(_5e8=0;_5e8<_5e7;_5e8++){
  8927. _5e9=_5e4[_5e8].getCellRef();
  8928. if(_5e9.getAttribute("oldClassName")!=null){
  8929. _5e9.className=_5e9.getAttribute("oldClassName");
  8930. _5e9.removeAttribute("oldClassName");
  8931. }
  8932. this.setStyleForSelection(_5e4[_5e8].m_contextIds);
  8933. if(!this.secondarySelectionIsDisabled()||_5e5){
  8934. var _5ed=document.getElementById("CVReport"+this.getNamespace());
  8935. var _5ee=getElementsByAttribute(_5ed,["td","th"],"name",_5e9.getAttribute("name"),this.m_maxSecondarySelection);
  8936. for(var _5ef=0;_5ef<_5ee.length;_5ef++){
  8937. var cell=_5ee[_5ef];
  8938. if(_5e5){
  8939. this.restoreOldBackgroundImage(cell);
  8940. }else{
  8941. if(cell.getAttribute("oldBackgroundImageStyle")==null){
  8942. this.saveOldCellStyles(cell);
  8943. this.setSecondarySelectionStyles(cell);
  8944. }
  8945. }
  8946. }
  8947. }
  8948. this.saveOldCellStyles(_5e9);
  8949. if(_5e5){
  8950. this.restoreOldBackgroundImage(_5e9);
  8951. if(this.m_oCognosViewer.isHighContrast()){
  8952. this.restoreOldBorder(_5e9);
  8953. this.restoreOldPadding(_5e9);
  8954. }
  8955. }else{
  8956. this.setPrimarySelectionStyles(_5e9);
  8957. if(this.m_oCognosViewer.isHighContrast()){
  8958. var size=getBoxInfo(_5e9,true);
  8959. this.saveOldBorder(_5e9);
  8960. this.saveOldPadding(_5e9,size);
  8961. var _5f2=3;
  8962. var _5f3=size.borderTopWidth+size.paddingTop-_5f2;
  8963. var _5f4=size.borderBottomWidth+size.paddingBottom-_5f2;
  8964. var _5f5=size.borderLeftWidth+size.paddingLeft-_5f2;
  8965. var _5f6=size.borderRightWidth+size.paddingRight-_5f2;
  8966. _5e9.style.border=_5f2+"px "+this.getHighContrastBorderStyle()+" black";
  8967. _5e9.style.padding=_5f3+"px "+_5f6+"px "+_5f4+"px "+_5f5+"px";
  8968. }
  8969. }
  8970. }
  8971. }
  8972. }
  8973. }
  8974. return true;
  8975. }
  8976. catch(e){
  8977. return false;
  8978. }
  8979. };
  8980. CSelectionController.prototype.findSelectionURLs=function(){
  8981. if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){
  8982. if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){
  8983. this.pS_backgroundImageURL="url(../common/images/selection_primary.png)";
  8984. this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)";
  8985. }else{
  8986. this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection"));
  8987. this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection"));
  8988. }
  8989. }
  8990. };
  8991. CSelectionController.prototype.setSelectedChartImgArea=function(_5f7){
  8992. var _5f8=true;
  8993. var _5f9=_5f7.getAttribute("rsvpChart");
  8994. var _5fa=_5f7.parentNode.getAttribute("chartContainer");
  8995. if(_5f9!="true"&&_5fa!="true"){
  8996. this.m_selectedChartNodes=[];
  8997. _5f8=false;
  8998. }else{
  8999. var _5fb=this.getSelectionObjectFactory().getSelectionChartObject(_5f7);
  9000. this.m_selectedChartNodes=[_5fb];
  9001. }
  9002. return _5f8;
  9003. };
  9004. CSelectionController.prototype.setSelectedChartArea=function(_5fc,e){
  9005. var _5fe=typeof this.m_oCognosViewer.isBux!=="undefined";
  9006. var _5ff=false;
  9007. if(_5fc!==null){
  9008. if(_5fc.tagName=="IMG"){
  9009. _5ff=this.setSelectedChartImgArea(_5fc);
  9010. }else{
  9011. if(_5fc.nodeName=="AREA"&&_5fc.attributes["ctx"]){
  9012. _5ff=true;
  9013. if(_5fe){
  9014. this.setBuxSelectedChartArea(_5fc,e);
  9015. }else{
  9016. this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_5fc)];
  9017. }
  9018. }
  9019. }
  9020. if(_5ff){
  9021. this.getObservers().notify();
  9022. }
  9023. }
  9024. return _5ff;
  9025. };
  9026. CSelectionController.prototype.setBuxSelectedChartArea=function(_600,e){
  9027. var _602=this.getChartHelper(_600);
  9028. var _603=_602.getChartNode(_600);
  9029. this.setStyleForSelection(_603.m_contextIds);
  9030. var _604=_602.getImageMapHighlighter();
  9031. _604.setFillColour(this.getPrimarySelectionColor());
  9032. _604.setStrokeColour(this.getPrimarySelectionColor());
  9033. if(typeof e=="undefined"){
  9034. e={};
  9035. }
  9036. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  9037. if(_604.isAreaHighlighted(_600)){
  9038. _604.hideAreas(_603.getCtxAreas());
  9039. var _605=_600.getAttribute("ctx");
  9040. var _606=this.m_selectedChartNodes.length;
  9041. for(var i=0;i<_606;i++){
  9042. var _608=this.m_selectedChartNodes[i];
  9043. if(_605==_608.getContext()){
  9044. this.m_selectedChartNodes.splice(i,1);
  9045. break;
  9046. }
  9047. }
  9048. }else{
  9049. this.updateSelectionContainer(_600);
  9050. _604.highlightAreas(_603.getCtxAreas(),true);
  9051. this.m_selectedChartNodes.push(_603);
  9052. }
  9053. }else{
  9054. if(this.hasSavedSelectedChartNodes()){
  9055. var _609=this.m_savedSelectedChartNodes.length;
  9056. var _60a=this.m_savedSelectedChartNodes;
  9057. for(var i=0;i<_609;i++){
  9058. var area=_60a[i].getArea();
  9059. var _60c=this.getSavedChartHelper(area);
  9060. var _60d=_60c.getImageMapHighlighter();
  9061. var _60e=_60d.getAreaId(area);
  9062. if(_604.getAreaId(_600)===_60e){
  9063. _60d.hideAreaById(_60e+this.m_savedPrimarySelectionColor);
  9064. break;
  9065. }
  9066. }
  9067. }
  9068. this.updateSelectionContainer(_600);
  9069. _604.highlightAreas(_603.getCtxAreas());
  9070. this.m_selectedChartNodes=[_603];
  9071. }
  9072. };
  9073. CSelectionController.prototype.updateSelectionContainer=function(_60f){
  9074. var _610=_60f.parentNode;
  9075. if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_610.name){
  9076. var _611=this.getChartHelper(_60f).getImageMapHighlighter();
  9077. _611.hideAllAreas();
  9078. }
  9079. this.m_selectionContainerMap=_610;
  9080. };
  9081. CSelectionController.prototype.getChartHelper=function(_612){
  9082. var _613=_612.parentNode;
  9083. var _614=_613.name;
  9084. if(!this.m_chartHelpers[_614]){
  9085. this.m_chartHelpers[_614]=new CChartHelper(_612,this.getSelectionObjectFactory(),this.m_oCognosViewer);
  9086. }
  9087. return this.m_chartHelpers[_614];
  9088. };
  9089. CSelectionController.prototype.getSavedChartHelper=function(_615){
  9090. var _616=_615.parentNode;
  9091. var _617=_616.name;
  9092. return this.m_savedChartHelpers[_617];
  9093. };
  9094. CSelectionController.prototype.getSelectedChartArea=function(){
  9095. return this.m_selectedChartArea;
  9096. };
  9097. CSelectionController.prototype.getSelectedChartNodes=function(){
  9098. return this.m_selectedChartNodes;
  9099. };
  9100. CSelectionController.prototype.hasSelectedChartNodes=function(){
  9101. return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0;
  9102. };
  9103. CSelectionController.prototype.getSelectedChartImage=function(){
  9104. var _618=null;
  9105. if(this.hasSelectedChartNodes()){
  9106. var _619=this.m_selectedChartNodes[0];
  9107. _618=_619.getArea();
  9108. }
  9109. if(_618===null){
  9110. return null;
  9111. }
  9112. if(_618.tagName=="IMG"){
  9113. return _618;
  9114. }
  9115. return this.getSelectedChartImageFromChartArea(_618);
  9116. };
  9117. CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_61a){
  9118. var _61b=_61a.parentNode;
  9119. var _61c="#"+_61b.getAttribute("name");
  9120. return this.checkChildrenForChart(_61b.parentNode,_61c);
  9121. };
  9122. CSelectionController.prototype.checkChildrenForChart=function(_61d,_61e){
  9123. var _61f=_61d.firstChild;
  9124. while(_61f!==null){
  9125. if(!_61f.tagName){
  9126. return null;
  9127. }else{
  9128. if(_61f.tagName=="IMG"&&_61f.getAttribute("usemap")==_61e){
  9129. return _61f;
  9130. }else{
  9131. if(_61f.tagName==="DIV"||_61f.tagName==="SPAN"){
  9132. var _620=this.checkChildrenForChart(_61f,_61e);
  9133. if(_620){
  9134. return _620;
  9135. }
  9136. }
  9137. }
  9138. }
  9139. _61f=_61f.nextSibling;
  9140. }
  9141. return null;
  9142. };
  9143. CSelectionController.prototype.downloadSelectedChartImage=function(_621){
  9144. var _622=this.getSelectedChartImage();
  9145. if(_622!==null){
  9146. var _623=this.getDocumentFromImage(_622);
  9147. var _624=_622.name.replace(".","_");
  9148. var _625=_624.substr(5);
  9149. var _626="?m_name=";
  9150. _626+=_625;
  9151. _626+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
  9152. if(isIE()){
  9153. _624=_623.parentWindow.eval("graphicSrc"+_625);
  9154. }else{
  9155. _624=_623.defaultView.eval("graphicSrc"+_625);
  9156. }
  9157. var _627="";
  9158. if(typeof _624!="undefined"&&_624!==null){
  9159. var _628=_624.split("&");
  9160. if(_628.length===0){
  9161. return;
  9162. }
  9163. if(_624.indexOf("/repository/")<0){
  9164. for(var i=0;i<_628.length;++i){
  9165. var _62a=_628[i];
  9166. var _62b=_62a.indexOf("=");
  9167. if(_62b!=-1){
  9168. var _62c=_62a.substr(0,_62b);
  9169. var _62d=_62a.slice(_62b+1);
  9170. if(_62c=="search"){
  9171. _627+=_62d;
  9172. break;
  9173. }
  9174. }
  9175. }
  9176. }
  9177. if(_627==""){
  9178. _626=_622.getAttribute("src");
  9179. if(_626.indexOf("?")!=-1){
  9180. _626+="&download=true";
  9181. }else{
  9182. _626+="?download=true";
  9183. }
  9184. }
  9185. if(typeof getConfigFrame=="function"){
  9186. _626+=_627;
  9187. _626=getConfigFrame().constructGETRequestParamsString(_626);
  9188. window.open(_626,"_blank","width=0,height=0");
  9189. }else{
  9190. _626=constructGETRequestParamsString(_626);
  9191. _626+=_627;
  9192. var _62e=this.m_oCognosViewer.getGateway();
  9193. var _62f=document.getElementById("CVIFrame"+this.m_sNamespace);
  9194. if(_62f){
  9195. var _630=_62f.src;
  9196. if(_630.indexOf("repository")>=0&&_626.indexOf("repository")<0){
  9197. var _631=_630.indexOf("content");
  9198. _626=_630.substring(0,_631)+_626;
  9199. }
  9200. }
  9201. if(_626.indexOf(_62e)==-1){
  9202. var _632=document.forms["formWarpRequest"+_621];
  9203. _626=_632.action+_626;
  9204. }
  9205. if(typeof window.detachLeavingRV=="function"){
  9206. window.detachLeavingRV();
  9207. }
  9208. location.href=_626;
  9209. if(typeof window.attachLeavingRV=="function"){
  9210. setTimeout(window.attachLeavingRV,100);
  9211. }
  9212. }
  9213. }
  9214. }
  9215. };
  9216. CSelectionController.prototype.getDocumentFromImage=function(_633){
  9217. var _634=null;
  9218. if(_633.ownerDocument){
  9219. _634=_633.ownerDocument;
  9220. }else{
  9221. _634=_633.document;
  9222. }
  9223. return _634;
  9224. };
  9225. CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
  9226. var _636=this.getSelections();
  9227. if(_636.length>1){
  9228. if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){
  9229. var node=getNodeFromEvent(e);
  9230. try{
  9231. while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){
  9232. node=node.parentNode;
  9233. }
  9234. }
  9235. catch(ex){
  9236. }
  9237. var _638=this.getSelectionObjectFactory().getContainerType(node);
  9238. if(_638==="list"){
  9239. for(var i=0;i<_636.length;i++){
  9240. if(_636[i].m_oCellRef==node){
  9241. return false;
  9242. }
  9243. }
  9244. }
  9245. }
  9246. }
  9247. return true;
  9248. };
  9249. CSelectionController.prototype.getContainerType=function(){
  9250. var _63a="";
  9251. if(this.hasSelectedChartNodes()){
  9252. _63a="chart";
  9253. }else{
  9254. if(this.getDataContainerType()==="list"){
  9255. _63a="list";
  9256. }else{
  9257. _63a="crosstab";
  9258. }
  9259. }
  9260. return _63a;
  9261. };
  9262. CSelectionController.prototype.getDisplayValues=function(){
  9263. var _63b={};
  9264. var _63c=this.getAllSelectedObjects()[0];
  9265. if(_63c){
  9266. var _63d=_63c.getSelectedContextIds();
  9267. if(_63d){
  9268. for(var axis=0;axis<_63d.length;axis++){
  9269. var _63f=[];
  9270. var _640=_63d[axis];
  9271. for(var _641=0;_641<_640.length;_641++){
  9272. var _642=_640[_641];
  9273. var _643=this.getDisplayValue(_642);
  9274. _63f.push(_643);
  9275. if(axis===0){
  9276. break;
  9277. }
  9278. }
  9279. var _644="";
  9280. switch(axis){
  9281. case 0:
  9282. _644="selected";
  9283. break;
  9284. case 1:
  9285. _644="rows";
  9286. break;
  9287. default:
  9288. _644="columns";
  9289. }
  9290. _63b[_644]=_63f;
  9291. }
  9292. }
  9293. }
  9294. return _63b;
  9295. };
  9296. CSelectionController.prototype.getChartTooltip=function(){
  9297. var _645=this.getAllSelectedObjects()[0];
  9298. if(_645){
  9299. var area=_645.getArea();
  9300. if(area){
  9301. var _647=area.getAttribute("title");
  9302. if(_647&&_647.length>0){
  9303. return area.getAttribute("title");
  9304. }
  9305. }
  9306. }
  9307. return "";
  9308. };
  9309. CSelectionController.prototype.pageClickedForMobile=function(e){
  9310. this.pageClicked(e);
  9311. var _649=this.getAllSelectedObjects().length;
  9312. if(_649==0){
  9313. var node=getNodeFromEvent(e,true);
  9314. if(!node){
  9315. return false;
  9316. }
  9317. if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){
  9318. this.selectDrillThroughImage(node);
  9319. return true;
  9320. }else{
  9321. if(node.getAttribute("dttargets")){
  9322. this.selectDrillThroughSingleton(node);
  9323. return true;
  9324. }else{
  9325. if(node.parentNode&&node.parentNode.getAttribute("dttargets")){
  9326. this.selectDrillThroughSingleton(node.parentNode);
  9327. return true;
  9328. }
  9329. }
  9330. }
  9331. return false;
  9332. }
  9333. return true;
  9334. };
  9335. CSelectionController.prototype.clearSavedSelections=function(){
  9336. this.m_bSavedSelections=false;
  9337. if(this.hasSavedSelectedObjects()){
  9338. this.updateUI(null,this.getSavedSelectedObjects(),true,false);
  9339. delete (this.m_aSavedSelectedObjects);
  9340. }
  9341. if(this.hasSavedSelectedChartNodes()){
  9342. var _64b=this.m_savedChartHelpers;
  9343. for(var _64c in _64b){
  9344. if(_64b[_64c]){
  9345. var _64d=_64b[_64c].getImageMapHighlighter();
  9346. if(_64d.hideAllAreas){
  9347. _64d.hideAllAreas();
  9348. }
  9349. }
  9350. }
  9351. delete this.m_savedChartHelpers;
  9352. delete this.m_savedSelectedChartNodes;
  9353. }
  9354. };
  9355. CSelectionController.prototype.hasSavedSelectedChartNodes=function(){
  9356. return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0);
  9357. };
  9358. CSelectionController.prototype.getSavedSelectedChartNodes=function(){
  9359. return this.m_savedSelectedChartNodes;
  9360. };
  9361. CSelectionController.prototype.saveSelections=function(){
  9362. this.m_savedSelectionStyles=this.m_selectionStyles;
  9363. if(this.m_aSelectedObjects.length>0){
  9364. this.m_aSavedSelectedObjects=[];
  9365. var _64e=this.m_aSelectedObjects.length;
  9366. var temp=[];
  9367. for(var i=0;i<_64e;i++){
  9368. if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){
  9369. temp.push(this.m_aSelectedObjects[i]);
  9370. }else{
  9371. this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]);
  9372. }
  9373. }
  9374. this.m_aSelectedObjects=temp;
  9375. }
  9376. if(this.hasSelectedChartNodes()){
  9377. this.m_savedChartHelpers=this.m_chartHelpers;
  9378. this.m_chartHelpers={};
  9379. this.m_savedSelectedChartNodes=[];
  9380. var _651=this.m_selectedChartNodes.length;
  9381. var temp=[];
  9382. for(var i=0;i<_651;i++){
  9383. if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
  9384. var _652=this.m_selectedChartNodes[i].getArea();
  9385. var _653=this.getImageMapName(_652);
  9386. this.m_chartHelpers[_653]=this.m_savedChartHelpers[_653];
  9387. delete this.m_savedChartHelpers[_653];
  9388. temp.push(this.m_selectedChartNodes[i]);
  9389. }else{
  9390. this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]);
  9391. }
  9392. }
  9393. this.m_selectedChartNodes=temp;
  9394. }
  9395. this.m_bSavedSelections=true;
  9396. };
  9397. CSelectionController.prototype.hasSavedSelections=function(){
  9398. return this.m_bSavedSelections;
  9399. };
  9400. CSelectionController.prototype.hasSavedSelectedObjects=function(){
  9401. return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes();
  9402. };
  9403. CSelectionController.prototype.getSavedSelectedObjects=function(){
  9404. return this.m_aSavedSelectedObjects;
  9405. };
  9406. CSelectionController.prototype.getImageMapName=function(_654){
  9407. var _655=_654.parentNode;
  9408. return _655.name;
  9409. };
  9410. CSelectionController.prototype.repaintBUXSelectedChartArea=function(_656,_657,_658){
  9411. var _659={};
  9412. var _65a=_656.length;
  9413. for(var i=0;i<_65a;i++){
  9414. var _65c=_656[i].getArea();
  9415. var _65d=this.getImageMapName(_65c);
  9416. var _65e;
  9417. if(!_659[_65d]){
  9418. _65e=(_657)?this.getSavedChartHelper(_65c):this.getChartHelper(_65c);
  9419. _659[_65d]=_65e;
  9420. var _65f=_65e.getImageMapHighlighter();
  9421. _65f.hideAllAreas();
  9422. _65f.setFillColour(this.getPrimarySelectionColor());
  9423. _65f.setStrokeColour(this.getPrimarySelectionColor());
  9424. }else{
  9425. _65e=_659[_65d];
  9426. }
  9427. var _660=_656[i].m_contextIds;
  9428. if(_658&&_660.length===1&&_660[0].length===1&&this.isMeasure(_660[0][0])){
  9429. continue;
  9430. }
  9431. _65f.highlightAreas(_656[i].getCtxAreas(),1);
  9432. }
  9433. };
  9434. CSelectionController.prototype.repaintSavedSelections=function(){
  9435. var _661=this.m_selectionStyles;
  9436. this.m_selectionStyles=this.m_savedSelectionStyles;
  9437. var _662=this.getSavedSelectedChartNodes();
  9438. var _663=false;
  9439. if(_662&&_662.length>0){
  9440. bIsChart=true;
  9441. }else{
  9442. _662=this.getSavedSelectedObjects();
  9443. }
  9444. this.repaintSelectionsHelper(_662,true,_663);
  9445. this.resetSelectionStyles();
  9446. this.m_selectionStyles=_661;
  9447. };
  9448. CSelectionController.prototype.repaintSelections=function(){
  9449. var _664=this.getSelectedChartNodes();
  9450. var _665=false;
  9451. if(_664&&_664.length>0){
  9452. _665=true;
  9453. }else{
  9454. _664=this.getSelections();
  9455. }
  9456. this.repaintSelectionsHelper(_664,false,_665);
  9457. };
  9458. CSelectionController.prototype.repaintSelectionsHelper=function(_666,_667,_668){
  9459. try{
  9460. if(_668){
  9461. this.repaintBUXSelectedChartArea(_666,_667);
  9462. }else{
  9463. this.updateUI(document,_666,true,false);
  9464. this.updateUI(document,_666,false,false);
  9465. }
  9466. }
  9467. catch(e){
  9468. return false;
  9469. }
  9470. };
  9471. CSelectionController.prototype.resetAll=function(){
  9472. this.resetSelectionStyles();
  9473. this.clearSavedSelections();
  9474. this.resetSelections();
  9475. this.resetAllowHorizontalDataValueSelection();
  9476. };
  9477. CSelectionController.prototype.pageClicked=function(e){
  9478. try{
  9479. var node=getNodeFromEvent(e);
  9480. if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){
  9481. var _66b=node;
  9482. if(!_66b.getAttribute("uid")){
  9483. var _66c=_66b.parentNode;
  9484. if(_66c&&_66c.nodeType==1&&typeof _66c.getAttribute!="undefined"&&_66c.getAttribute("uid")!=null){
  9485. _66b=_66c;
  9486. }
  9487. }
  9488. if(this.isCellSelected(_66b)){
  9489. if(typeof this.m_oCognosViewer.isBux!=="undefined"){
  9490. this.repaintSelections();
  9491. }
  9492. if(e.button!==0){
  9493. return false;
  9494. }
  9495. }
  9496. }
  9497. if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){
  9498. return true;
  9499. }
  9500. if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){
  9501. return false;
  9502. }
  9503. var _66d=getDocumentFromEvent(e);
  9504. if(!this.hasContextData()||!this.hasMetadata()){
  9505. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){
  9506. this.setSelectedChartArea(node,e);
  9507. }
  9508. this.getObservers().notify();
  9509. return false;
  9510. }
  9511. if(typeof node.selectedCell!="undefined"){
  9512. var _66e=node;
  9513. node=node.selectedCell;
  9514. _66e.removeAttribute("selectedCell");
  9515. }
  9516. if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){
  9517. cf.hidePickers();
  9518. }
  9519. if(e.keyCode==27){
  9520. if(typeof g_reportSelectionController!="undefined"){
  9521. g_reportSelectionController.clearSelections();
  9522. }
  9523. this.resetSelections(_66d);
  9524. }else{
  9525. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){
  9526. if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){
  9527. this.selectNode(node,e);
  9528. this.setSelectedChartArea(node,e);
  9529. }
  9530. }else{
  9531. if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){
  9532. var _66f=this.m_oCognosViewer.getViewerWidget();
  9533. this.selectNode(node,e);
  9534. }
  9535. }
  9536. }
  9537. if(window.gViewerLogger){
  9538. window.gViewerLogger.addContextInfo(this);
  9539. }
  9540. }
  9541. catch(e){
  9542. }
  9543. };
  9544. CSelectionController.prototype.getSelectionObjectFactory=function(){
  9545. return this.m_oSelectionObjectFactory;
  9546. };
  9547. CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){
  9548. return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null);
  9549. };
  9550. CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_674){
  9551. var _675=this.getCtxIdFromMun(sMun);
  9552. if(_675==""){
  9553. _675=this.getCtxIdFromMetaData(sLun,sHun,_674);
  9554. }
  9555. if(_675!=null&&this.m_oCDManager.GetUsage(_675)!="2"){
  9556. var _676=document.getElementById("rt"+this.getNamespace());
  9557. if(_676!=null){
  9558. var _677=getElementsByAttribute(_676,"*","ctx",_675);
  9559. if(_677&&_677.length===0){
  9560. var _678=new RegExp("(^|:)"+_675+"(:|$)","i");
  9561. _677=getElementsByAttribute(_676,"*","ctx",_675,-1,_678);
  9562. }
  9563. var _679=null;
  9564. if(_677!=null&&_677.length>0){
  9565. _679=new CSelectionObject();
  9566. _679.setSelectionController(this);
  9567. _679.m_sColumnRef=_677[0].getAttribute("cid");
  9568. _679.m_sCellTypeId=_677[0].getAttribute("uid");
  9569. _679.m_sLayoutType=_677[0].getAttribute("type");
  9570. _679.m_sTag=_677[0].getAttribute("tag");
  9571. _679.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_677[0]);
  9572. _679.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_677[0]);
  9573. _679.m_contextIds=[[_675]];
  9574. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679;
  9575. }else{
  9576. var _67a=getElementsByAttribute(_676,"*","flashChart","true");
  9577. if(_67a!=null){
  9578. for(var _67b=0;_67b<_67a.length;++_67b){
  9579. var ldx=_67a[_67b].getLDX();
  9580. if(ldx.indexOf("<ctx>"+_675+"</ctx>")!=-1){
  9581. _679=new CSelectionObject();
  9582. _679.setSelectionController(this);
  9583. var lid=_67a[_67b].getAttribute("lid");
  9584. _679.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
  9585. _679.m_dataContainerType="chart";
  9586. _679.m_contextIds=[[_675]];
  9587. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679;
  9588. }
  9589. }
  9590. }
  9591. }
  9592. }
  9593. }
  9594. };
  9595. CSelectionController.prototype.buildSelectionObject=function(node,e){
  9596. var _680=null;
  9597. try{
  9598. while(node.nodeType==3){
  9599. node=node.parentNode;
  9600. }
  9601. if(this.isDrillLinkOnCrosstabCell(node)){
  9602. node=node.parentNode;
  9603. }
  9604. var ctx=node.getAttribute("ctx");
  9605. var uid=node.getAttribute("uid");
  9606. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){
  9607. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  9608. return null;
  9609. }
  9610. node=node.parentNode;
  9611. if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){
  9612. node=node.parentNode;
  9613. }
  9614. uid=node.getAttribute("uid");
  9615. }
  9616. if(uid!=null){
  9617. var _683=node.childNodes;
  9618. for(var i=0;i<_683.length;i++){
  9619. if(_683[i].nodeName.toUpperCase()=="TABLE"&&(_683[i].className=="ls"||_683[i].className=="xt")){
  9620. var trs=_683[i].rows;
  9621. for(var j=0;j<trs.length;j++){
  9622. var tds=trs[j].cells;
  9623. for(var k=0;k<tds.length;k++){
  9624. if(tds[k].getAttribute("uid")!=null){
  9625. return null;
  9626. }
  9627. }
  9628. }
  9629. }
  9630. }
  9631. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  9632. _680=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  9633. }else{
  9634. _680=this.getSelectionObjectFactory().getSelectionObject(node);
  9635. }
  9636. }
  9637. }
  9638. catch(e){
  9639. }
  9640. return _680;
  9641. };
  9642. CSelectionController.prototype.shiftKeyPressed=function(e){
  9643. if(e.keyCode=="121"){
  9644. return false;
  9645. }
  9646. if(isSafari()){
  9647. if(e.button!=2){
  9648. return e.shiftKey?e.shiftKey:false;
  9649. }else{
  9650. return false;
  9651. }
  9652. }
  9653. return e.shiftKey?e.shiftKey:false;
  9654. };
  9655. CSelectionController.prototype.ctrlKeyPressed=function(e){
  9656. if(isSafari()){
  9657. if(e.button!=2){
  9658. return e.ctrlKey?e.ctrlKey:false;
  9659. }else{
  9660. return false;
  9661. }
  9662. }
  9663. return e.ctrlKey?e.ctrlKey:false;
  9664. };
  9665. CSelectionController.prototype.isSelectionsPreviouslySaved=function(_68b){
  9666. var _68c=false;
  9667. if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_68b||!_68b.length){
  9668. return false;
  9669. }
  9670. for(var i=0;i<_68b.length;i++){
  9671. if(this.isSavedCellSelected(_68b[i].getCellRef())){
  9672. return true;
  9673. }
  9674. }
  9675. return false;
  9676. };
  9677. CSelectionController.prototype.selectNode=function(node,e){
  9678. try{
  9679. while(node.nodeType==3){
  9680. node=node.parentNode;
  9681. }
  9682. if(this.isDrillLinkOnCrosstabCell(node)){
  9683. node=node.parentNode;
  9684. }
  9685. var _690=null;
  9686. if(isIE()){
  9687. _690=node.document;
  9688. }else{
  9689. _690=node.ownerDocument;
  9690. }
  9691. var ctx=node.getAttribute("ctx");
  9692. var uid=node.getAttribute("uid");
  9693. var _693=false;
  9694. if(typeof e=="undefined"){
  9695. e={};
  9696. }
  9697. var _694=false;
  9698. if(typeof g_reportSelectionController!="undefined"){
  9699. _694=this.checkForReportElementNode(node);
  9700. }
  9701. if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_694==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
  9702. if(this.getSelections().length>0){
  9703. _693=true;
  9704. }
  9705. if(this.hasCutColumns()==true){
  9706. this.clearSelectedObjects(_690);
  9707. }else{
  9708. this.resetSelections(_690);
  9709. this.repaintSavedSelections();
  9710. if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){
  9711. cf.removeAllSelectionsFromCfgVariables();
  9712. }
  9713. this.m_oCognosViewer.setCurrentNodeFocus(null);
  9714. }
  9715. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  9716. clearTextSelection(_690);
  9717. }
  9718. if(typeof g_reportSelectionController!="undefined"&&_694==false){
  9719. if(g_reportSelectionController.getSelections().length>0){
  9720. _693=true;
  9721. }
  9722. g_reportSelectionController.clearSelections();
  9723. }
  9724. }
  9725. var _695=node.getAttribute("dtTargets")?node:null;
  9726. var _696=(node.nodeName.toLowerCase()==="area");
  9727. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){
  9728. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  9729. return false;
  9730. }
  9731. var _697;
  9732. var _698=3;
  9733. do{
  9734. node=node.parentNode;
  9735. if(node){
  9736. _695=(!_695&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_695;
  9737. uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
  9738. _697=node.nodeName.toLowerCase();
  9739. }
  9740. }while((uid==null)&&node&&(--_698>0)&&(_697=="span"||_697=="div"));
  9741. }
  9742. if(uid!=null){
  9743. var _699=node.childNodes;
  9744. for(var i=0;i<_699.length;i++){
  9745. if(_699[i].nodeName.toUpperCase()=="TABLE"&&(_699[i].className=="ls"||_699[i].className=="xt")){
  9746. var trs=_699[i].rows;
  9747. for(var j=0;j<trs.length;j++){
  9748. var tds=trs[j].cells;
  9749. for(var k=0;k<tds.length;k++){
  9750. if(tds[k].getAttribute("uid")!=null){
  9751. return false;
  9752. }
  9753. }
  9754. }
  9755. }
  9756. }
  9757. var _69f;
  9758. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  9759. _69f=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  9760. }else{
  9761. _69f=this.getSelectionObjectFactory().getSelectionObject(node);
  9762. }
  9763. if(this.isCellSelected(node)==false){
  9764. if(this.shiftKeyPressed(e)){
  9765. var _6a0=this.getSelections();
  9766. if(_6a0.length>0){
  9767. var _6a1=_6a0[_6a0.length-1];
  9768. if(_6a1.getLayoutType()==_69f.getLayoutType()&&(_6a1.getCellRef().parentNode.parentNode==_69f.getCellRef().parentNode.parentNode)){
  9769. if(this.cellsAreInSameColumn(_6a1.getCellRef(),_69f.getCellRef())){
  9770. this.selectVertical(_6a1,_69f,_690);
  9771. }else{
  9772. if(_6a1.getCellRef().parentNode.rowIndex==_69f.getCellRef().parentNode.rowIndex){
  9773. this.selectHorizontal(_6a1,_69f,_690);
  9774. }
  9775. }
  9776. }
  9777. }
  9778. clearTextSelection(_690);
  9779. }else{
  9780. if(this.ctrlKeyPressed(e)){
  9781. clearTextSelection(_690);
  9782. }
  9783. }
  9784. this.addSelectionObject(_69f,_690);
  9785. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  9786. cf.addSelectionToCfgVariables(_69f.getColumnName());
  9787. }
  9788. this.m_oCognosViewer.setCurrentNodeFocus(node);
  9789. }else{
  9790. if(this.ctrlKeyPressed(e)){
  9791. this.removeSelectionObject(_69f,_690);
  9792. if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
  9793. if(!this.isColumnSelected(_69f.getTag())){
  9794. cf.removeSelectionFromCfgVariables(_69f.getTag());
  9795. }
  9796. }
  9797. clearTextSelection(_690);
  9798. }else{
  9799. if(this.shiftKeyPressed(e)){
  9800. clearTextSelection(_690);
  9801. }
  9802. }
  9803. }
  9804. _693=true;
  9805. }else{
  9806. if(_694){
  9807. var _6a2=null;
  9808. while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
  9809. node=node.parentNode;
  9810. }
  9811. if(node.id=="reportTitle"){
  9812. _6a2="TitleStyle";
  9813. }else{
  9814. if(node.id=="reportSubtitle"){
  9815. _6a2="SubtitleStyle";
  9816. }else{
  9817. if(node.id.indexOf("reportFilter")==0){
  9818. _6a2="FilterStyle";
  9819. }
  9820. }
  9821. }
  9822. if(_6a2!=null){
  9823. selectReportElement(e,node.id,_6a2);
  9824. _693=true;
  9825. }
  9826. }else{
  9827. if(_695!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_696){
  9828. var _69f=this.getSelectionObjectFactory().getSelectionObject(_695);
  9829. this.addSelectionObject(_69f,_690);
  9830. }
  9831. }
  9832. }
  9833. if(_693==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){
  9834. cf.refreshDialog();
  9835. }
  9836. }
  9837. catch(ex){
  9838. }
  9839. };
  9840. CSelectionController.prototype.selectDrillThroughImage=function(node){
  9841. this.m_oSelectedDrillThroughImage=node;
  9842. };
  9843. CSelectionController.prototype.getSelectedDrillThroughImage=function(){
  9844. return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null;
  9845. };
  9846. CSelectionController.prototype.selectDrillThroughSingleton=function(node){
  9847. this.m_oSelectedDrillThroughSingleton=node;
  9848. };
  9849. CSelectionController.prototype.getSelectDrillThroughSingleton=function(){
  9850. return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null;
  9851. };
  9852. CSelectionController.prototype.getReportContextDataArray=function(){
  9853. return this.m_aReportContextDataArray;
  9854. };
  9855. CSelectionController.prototype.getReportMetadataArray=function(){
  9856. return this.m_aReportMetadataArray;
  9857. };
  9858. CSelectionController.prototype.setupContextDataArray=function(_6a5){
  9859. this.m_aReportContextDataArray=_6a5;
  9860. };
  9861. CSelectionController.prototype.setupMetaDataArray=function(_6a6){
  9862. this.m_aReportMetadataArray=_6a6;
  9863. };
  9864. CSelectionController.prototype.addContextData=function(_6a7){
  9865. this.m_aSelectedObjects=[];
  9866. this.m_oCDManager.SetContextData(_6a7);
  9867. if(!this.m_bUsingCCDManager){
  9868. this.m_bUsingCCDManager=true;
  9869. }
  9870. for(var i=0;i<this.m_selectedClass.length;++i){
  9871. this.deselecting(this.m_selectedClass);
  9872. }
  9873. };
  9874. CSelectionController.prototype.addMetaData=function(_6a9){
  9875. this.m_aSelectedObjects=[];
  9876. this.m_oCDManager.SetMetadata(_6a9);
  9877. if(!this.m_bUsingCCDManager){
  9878. this.m_bUsingCCDManager=true;
  9879. }
  9880. };
  9881. CSelectionController.prototype.getDrillFlag=function(_6aa){
  9882. var _6ab="";
  9883. if(!this.m_bUsingCCDManager){
  9884. var _6ac=this.m_aReportContextDataArray[_6aa];
  9885. var _6ad=_6ac[0];
  9886. var _6ae=this.m_aReportMetadataArray[_6ad];
  9887. if(typeof _6ae!="undefined"&&typeof _6ae[3]!="undefined"){
  9888. _6ab=_6ae[3];
  9889. }
  9890. }else{
  9891. _6ab=this.m_oCDManager.GetDrillFlag(_6aa);
  9892. }
  9893. return _6ab;
  9894. };
  9895. CSelectionController.prototype.getDrillFlagForMember=function(_6af){
  9896. var _6b0="0";
  9897. if(!this.m_bUsingCCDManager){
  9898. var _6b1=this.getContextDataItem(_6af);
  9899. if(_6b1!=null){
  9900. var _6b2=_6b1[2];
  9901. if(_6b2!=""){
  9902. var _6b3=_6b1[0];
  9903. var _6b4=this.getMetaDataItem(_6b3);
  9904. if(_6b4!=null){
  9905. _6b0=_6b4[3];
  9906. }
  9907. }
  9908. }
  9909. }else{
  9910. _6b0=this.m_oCDManager.GetDrillFlagForMember(_6af);
  9911. }
  9912. return (_6b0==null)?0:_6b0;
  9913. };
  9914. CSelectionController.prototype.getDataType=function(_6b5){
  9915. var _6b6=null;
  9916. if(!this.m_bUsingCCDManager){
  9917. var _6b7=this.getRDI(_6b5);
  9918. if(_6b7&&_6b7.length>2){
  9919. _6b6=parseInt(_6b7[2],10);
  9920. }
  9921. }else{
  9922. _6b6=parseInt(this.m_oCDManager.GetDataType(_6b5),10);
  9923. }
  9924. return _6b6;
  9925. };
  9926. CSelectionController.prototype.getUsageInfo=function(_6b8){
  9927. if(this.m_bUsingCCDManager){
  9928. return this.m_oCDManager.GetUsage(_6b8);
  9929. }
  9930. };
  9931. CSelectionController.prototype.isMeasure=function(_6b9){
  9932. return (this.getUsageInfo(_6b9)==this.c_usageMeasure);
  9933. };
  9934. CSelectionController.prototype.getDepth=function(_6ba){
  9935. var _6bb=null;
  9936. if(!this.m_bUsingCCDManager){
  9937. var _6bc=this.getRDI(_6ba);
  9938. if(_6bc&&_6bc.length>5&&_6bc[1]=="R"){
  9939. _6bb=_6bc[5];
  9940. }
  9941. }else{
  9942. _6bb=this.m_oCDManager.GetDepth(_6ba);
  9943. }
  9944. return _6bb;
  9945. };
  9946. CSelectionController.prototype.getUseValue=function(_6bd){
  9947. var _6be="";
  9948. if(!this.m_bUsingCCDManager){
  9949. var _6bf=this.m_aReportContextDataArray[_6bd];
  9950. if(typeof _6bf[1]!="undefined"){
  9951. _6be=_6bf[1];
  9952. }
  9953. }else{
  9954. _6be=this.m_oCDManager.GetDisplayValue(_6bd);
  9955. }
  9956. return _6be;
  9957. };
  9958. CSelectionController.prototype.getTextValue=function(_6c0){
  9959. var _6c1=null;
  9960. for(var _6c2=0;_6c2<_6c0.length;_6c2++){
  9961. if(_6c0[_6c2].style.visisbility!="hidden"){
  9962. if(isIE()){
  9963. _6c1=_6c0[_6c2].innerText;
  9964. }else{
  9965. _6c1=_6c0[_6c2].textContent;
  9966. }
  9967. var _6c3=_6c0[_6c2].nextSibling;
  9968. while(_6c3!=null){
  9969. if(_6c3.nodeName.toUpperCase()=="SPAN"&&_6c3.style.visibility!="hidden"){
  9970. if(isIE()){
  9971. _6c1+=_6c3.innerText;
  9972. }else{
  9973. _6c1+=_6c3.textContent;
  9974. }
  9975. }
  9976. _6c3=_6c3.nextSibling;
  9977. }
  9978. break;
  9979. }
  9980. }
  9981. return _6c1;
  9982. };
  9983. CSelectionController.prototype.getDisplayValueFromDOM=function(_6c4,_6c5){
  9984. var _6c6=null;
  9985. var _6c7;
  9986. var _6c8=new RegExp("(^|\\s)"+_6c4+"(\\s|$|:)","i");
  9987. if(typeof _6c5!="undefined"){
  9988. _6c7=getElementsByAttribute(_6c5,["span","td","th"],"ctx",_6c4,1,_6c8);
  9989. }else{
  9990. var _6c9=document.getElementById("CVIFrame"+this.m_sNamespace);
  9991. if(typeof _6c9=="undefined"||_6c9==null){
  9992. var _6ca=document.getElementById("RVContent"+this.m_sNamespace);
  9993. if(typeof _6ca=="undefined"||_6ca==null){
  9994. _6c7=getElementsByAttribute(document.body,["span","td","th"],"ctx",_6c4,1,_6c8);
  9995. }else{
  9996. _6c7=getElementsByAttribute(_6ca,["span","td","th"],"ctx",_6c4,1,_6c8);
  9997. }
  9998. }else{
  9999. _6c7=getElementsByAttribute(_6c9.contentWindow.document.body,["span","td","th"],"ctx",_6c4,1,_6c8);
  10000. }
  10001. }
  10002. var _6cb;
  10003. if(_6c7.length>0&&(_6c7[0].nodeName.toUpperCase()=="TD"||_6c7[0].nodeName.toUpperCase()=="TH")){
  10004. _6cb=_6c7[0].childNodes;
  10005. }else{
  10006. _6cb=_6c7;
  10007. }
  10008. if(_6cb.length==0||(_6cb[0].className.indexOf("chart_area")==-1&&_6cb[0].className.indexOf("bux-comment")==-1)){
  10009. _6c6=this.getTextValue(_6cb);
  10010. }
  10011. return _6c6;
  10012. };
  10013. CSelectionController.prototype.getDisplayValue=function(_6cc,_6cd){
  10014. var _6ce=this.getDisplayValueFromDOM(_6cc,_6cd);
  10015. if(_6ce==null){
  10016. _6ce=this.getUseValue(_6cc);
  10017. }
  10018. return _6ce;
  10019. };
  10020. CSelectionController.prototype.getDun=function(_6cf){
  10021. if(this.m_bUsingCCDManager){
  10022. return this.m_oCDManager.GetDUN(_6cf);
  10023. }else{
  10024. var _6d0=this.m_aReportContextDataArray[_6cf];
  10025. if(_6d0&&typeof _6d0[5]!="undefined"){
  10026. var _6d1=_6d0[5];
  10027. var _6d2=this.m_aReportMetadataArray[_6d1];
  10028. if(typeof _6d2!="undefined"&&typeof _6d2[1]!="undefined"&&_6d2[1]=="D"){
  10029. return _6d2[0];
  10030. }
  10031. }
  10032. }
  10033. };
  10034. CSelectionController.prototype.getPun=function(_6d3){
  10035. if(this.m_bUsingCCDManager){
  10036. return this.m_oCDManager.GetPUN(_6d3);
  10037. }
  10038. };
  10039. CSelectionController.prototype.getLun=function(_6d4){
  10040. var lun="";
  10041. if(!this.m_bUsingCCDManager){
  10042. var _6d6=this.m_aReportContextDataArray[_6d4];
  10043. if(_6d6&&typeof _6d6[3]!="undefined"){
  10044. var _6d7=_6d6[3];
  10045. var _6d8=this.m_aReportMetadataArray[_6d7];
  10046. if(typeof _6d8!="undefined"&&typeof _6d8[1]!="undefined"&&_6d8[1]=="L"){
  10047. lun=_6d8[0];
  10048. }
  10049. }
  10050. }else{
  10051. lun=this.m_oCDManager.GetLUN(_6d4);
  10052. }
  10053. return lun;
  10054. };
  10055. CSelectionController.prototype.isContextId=function(_6d9){
  10056. var _6da=false;
  10057. if(!this.m_bUsingCCDManager){
  10058. var _6db=this.m_aReportContextDataArray[_6d9];
  10059. _6da=(typeof _6db=="object");
  10060. }else{
  10061. this.m_oCDManager.FetchContextData([_6d9]);
  10062. _6da=this.m_oCDManager.ContextIdExists(_6d9);
  10063. }
  10064. return _6da;
  10065. };
  10066. CSelectionController.prototype.hasContextData=function(){
  10067. var _6dc=false;
  10068. if(!this.m_bUsingCCDManager){
  10069. if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
  10070. return true;
  10071. }
  10072. }else{
  10073. _6dc=this.m_oCDManager.HasContextData();
  10074. }
  10075. return _6dc;
  10076. };
  10077. CSelectionController.prototype.hasMetadata=function(){
  10078. var _6dd=false;
  10079. if(!this.m_bUsingCCDManager){
  10080. if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
  10081. return true;
  10082. }
  10083. }else{
  10084. _6dd=this.m_oCDManager.HasMetadata();
  10085. }
  10086. return _6dd;
  10087. };
  10088. CSelectionController.prototype.getDifferentCellIndex=function(_6de,_6df,_6e0){
  10089. for(var i=0;i<_6de.cells.length;i++){
  10090. if(this.getSelectionObjectFactory().getSelectionObject(_6de.cells[i]).getLayoutType()=="datavalue"){
  10091. break;
  10092. }
  10093. }
  10094. if(_6e0=="relative"){
  10095. return (_6df-i);
  10096. }else{
  10097. if(_6e0=="actual"){
  10098. return (_6df+i);
  10099. }
  10100. }
  10101. };
  10102. CSelectionController.prototype.cellsAreInSameColumn=function(_6e2,_6e3){
  10103. if(_6e2.parentNode.rowIndex==_6e3.parentNode.rowIndex){
  10104. return false;
  10105. }
  10106. if(_6e2.getAttribute("cid")===null){
  10107. if(_6e2.getAttribute("uid")===_6e3.getAttribute("uid")){
  10108. if(_6e2.getAttribute("type")!="datavalue"){
  10109. return true;
  10110. }else{
  10111. if(this.getDifferentCellIndex(_6e2.parentNode,_6e2.cellIndex,"relative")==this.getDifferentCellIndex(_6e3.parentNode,_6e3.cellIndex,"relative")){
  10112. return true;
  10113. }
  10114. }
  10115. }else{
  10116. return false;
  10117. }
  10118. }else{
  10119. if(_6e2.getAttribute("cid")===_6e3.getAttribute("cid")){
  10120. return true;
  10121. }else{
  10122. return false;
  10123. }
  10124. }
  10125. };
  10126. CSelectionController.prototype.selectVertical=function(_6e4,_6e5,_6e6){
  10127. if(!_6e6){
  10128. _6e6=document;
  10129. }
  10130. var _6e7=_6e4.getCellRef().parentNode;
  10131. var _6e8,i;
  10132. var _6ea=(_6e4.getCellRef().parentNode.rowIndex<_6e5.getCellRef().parentNode.rowIndex);
  10133. var _6eb=(_6e4.getCellRef().parentNode.cells.length-_6e4.getCellRef().cellIndex);
  10134. while(_6e7.rowIndex!=_6e5.getCellRef().parentNode.rowIndex){
  10135. if(_6ea){
  10136. _6e7=_6e7.nextSibling;
  10137. }else{
  10138. _6e7=_6e7.previousSibling;
  10139. }
  10140. if(_6e7==null){
  10141. break;
  10142. }
  10143. if(_6e7.cells.length>=_6eb){
  10144. for(i=0;i<_6e7.cells.length;i++){
  10145. if((_6e7.cells[i].getAttribute("type")==_6e4.getLayoutType())&&this.cellsAreInSameColumn(_6e4.getCellRef(),_6e7.cells[i])){
  10146. _6e8=this.getSelectionObjectFactory().getSelectionObject(_6e7.cells[i]);
  10147. if(this.addSelectionObject(_6e8,_6e6)){
  10148. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  10149. cf.addSelectionToCfgVariables(_6e8.getColumnName());
  10150. }
  10151. }
  10152. break;
  10153. }
  10154. }
  10155. }
  10156. }
  10157. };
  10158. CSelectionController.prototype.selectHorizontal=function(_6ec,_6ed,_6ee){
  10159. var _6ef="";
  10160. if(_6ec.getColumnRef()==null){
  10161. if(_6ec.getCellRef().getAttribute("uid")==_6ed.getCellRef().getAttribute("uid")){
  10162. _6ef=_6ec.getCellRef().getAttribute("uid");
  10163. }else{
  10164. return;
  10165. }
  10166. }
  10167. var _6f0,_6f1;
  10168. var _6f2=_6ed.getCellRef().parentNode;
  10169. var _6f3;
  10170. if(_6ed.getCellRef().cellIndex<_6ec.getCellRef().cellIndex){
  10171. _6f0=_6ed.getCellRef().cellIndex;
  10172. _6f1=_6ec.getCellRef().cellIndex;
  10173. }else{
  10174. _6f1=_6ed.getCellRef().cellIndex;
  10175. _6f0=_6ec.getCellRef().cellIndex;
  10176. }
  10177. for(var i=_6f0+1;i<_6f1;i++){
  10178. if(((_6ec.getColumnRef()!=null)&&(_6ec.getLayoutType()==_6ed.getLayoutType())&&(_6ec.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_6ec.getColumnRef()==null)&&(_6f2.cells[i].getAttribute("uid")==_6ef))){
  10179. _6f3=this.getSelectionObjectFactory().getSelectionObject(_6f2.cells[i]);
  10180. if(this.addSelectionObject(_6f3,_6ee)){
  10181. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  10182. cf.addSelectionToCfgVariables(_6f3.getColumnName());
  10183. }
  10184. }
  10185. }
  10186. }
  10187. };
  10188. CSelectionController.prototype.pageDoubleClicked=function(e){
  10189. try{
  10190. var node=getNodeFromEvent(e);
  10191. if(typeof node.selectedCell!="undefined"){
  10192. var _6f7=node;
  10193. node=node.selectedCell;
  10194. _6f7.removeAttribute("selectedCell");
  10195. }
  10196. while(node.nodeType==3){
  10197. node=node.parentNode;
  10198. }
  10199. var ctx=node.getAttribute("ctx");
  10200. var uid=node.getAttribute("uid");
  10201. if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  10202. node=node.parentNode;
  10203. if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){
  10204. node=node.parentNode;
  10205. }
  10206. uid=node.getAttribute("uid");
  10207. }
  10208. if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){
  10209. if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){
  10210. goWindowManager.getFeatureManager().launchFeature("Rename");
  10211. }
  10212. }
  10213. if(typeof g_reportSelectionController!="undefined"){
  10214. g_reportSelectionController.clearSelections();
  10215. }
  10216. }
  10217. catch(ex){
  10218. }
  10219. };
  10220. CSelectionController.prototype.getSelectionHoverNodes=function(){
  10221. return this.m_aSelectionHoverNodes;
  10222. };
  10223. CSelectionController.prototype.setSelectionHoverNodes=function(_6fa){
  10224. this.m_aSelectionHoverNodes=_6fa;
  10225. };
  10226. CSelectionController.prototype.addSelectionHoverNode=function(node){
  10227. this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node;
  10228. };
  10229. CSelectionController.prototype.pageHover=function(e){
  10230. try{
  10231. var node=getNodeFromEvent(e);
  10232. while(node.nodeType==3){
  10233. node=node.parentNode;
  10234. }
  10235. if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  10236. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  10237. node=node.parentNode;
  10238. }
  10239. }
  10240. var _6fe=this.getSelectionHoverNodes();
  10241. var _6ff=this.getAllSelectedObjects().length;
  10242. if(!(_6fe.length==1&&_6fe[0]==node)){
  10243. for(var i=0;i<_6fe.length;i++){
  10244. this.sortIconHover(_6fe[i],true);
  10245. if(_6ff==0){
  10246. this.pageChangeHover(_6fe[i],true);
  10247. }
  10248. }
  10249. this.setSelectionHoverNodes([]);
  10250. if(_6ff==0){
  10251. this.sortIconHover(node,false);
  10252. if(this.pageChangeHover(node,false)){
  10253. this.addSelectionHoverNode(node);
  10254. }
  10255. }else{
  10256. if(this.sortIconHover(node,false)){
  10257. this.addSelectionHoverNode(node);
  10258. }
  10259. }
  10260. }
  10261. }
  10262. catch(ex){
  10263. }
  10264. };
  10265. CSelectionController.prototype.sortIconHover=function(node,_702){
  10266. if(!this.isValidColumnTitle(node)){
  10267. return false;
  10268. }
  10269. var _703=this.getSortImgNode(node);
  10270. if(_703!=null&&_703!="undefined"){
  10271. if(_703.getAttribute("sortOrder")==="nosort"){
  10272. if(_702){
  10273. _703.style.visibility="hidden";
  10274. }else{
  10275. _703.style.visibility="visible";
  10276. }
  10277. }
  10278. return true;
  10279. }
  10280. return false;
  10281. };
  10282. CSelectionController.prototype.isValidColumnTitle=function(node){
  10283. if(node&&node.parentNode){
  10284. var uid=node.getAttribute("uid");
  10285. 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")){
  10286. return true;
  10287. }
  10288. }
  10289. return false;
  10290. };
  10291. CSelectionController.prototype.pageChangeHover=function(node,_707){
  10292. try{
  10293. if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  10294. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  10295. node=node.parentNode;
  10296. }
  10297. }
  10298. if(this.isValidColumnTitle(node)){
  10299. var _708=this.isColumnSelected(node.getAttribute("tag"));
  10300. if(!_708){
  10301. _708=this.isColumnCut(node.getAttribute("tag"));
  10302. }
  10303. if(!_708){
  10304. if(_707){
  10305. if(node.getAttribute("oldClassName")!=null){
  10306. node.className=node.getAttribute("oldClassName");
  10307. node.removeAttribute("oldClassName");
  10308. }
  10309. this.restoreOldBackgroundImage(node);
  10310. }else{
  10311. if(node.getAttribute("oldClassName")!=null){
  10312. node.className=node.getAttribute("oldClassName");
  10313. }else{
  10314. node.setAttribute("oldClassName",node.className);
  10315. }
  10316. if(node.getAttribute("oldBackgroundImageStyle")!=null){
  10317. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  10318. }else{
  10319. this.saveOldCellStyles(node);
  10320. }
  10321. node.className+=" hoverSelection";
  10322. return true;
  10323. }
  10324. }
  10325. }
  10326. }
  10327. catch(ex){
  10328. }
  10329. return false;
  10330. };
  10331. CSelectionController.prototype.getSortImgNode=function(node){
  10332. var _70a=node.getElementsByTagName("img");
  10333. for(var i=0;i<_70a.length;i++){
  10334. var sId=_70a[i].id.toString();
  10335. if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
  10336. node=_70a[i];
  10337. return node;
  10338. }
  10339. }
  10340. return null;
  10341. };
  10342. CSelectionController.prototype.restoreOldPadding=function(node){
  10343. if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){
  10344. if(node.getAttribute("oldPaddingStyle").length>0){
  10345. node.style.padding=node.getAttribute("oldPaddingStyle");
  10346. }
  10347. node.removeAttribute("oldPaddingStyle");
  10348. }
  10349. };
  10350. CSelectionController.prototype.saveOldPadding=function(node,size){
  10351. if(node&&node.getAttribute("oldPaddingStyle")==null){
  10352. node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px");
  10353. }
  10354. };
  10355. CSelectionController.prototype.saveOldBorder=function(node){
  10356. if(node&&node.getAttribute("oldBorderStyle")==null){
  10357. node.setAttribute("oldBorderStyle",node.style.border);
  10358. }
  10359. };
  10360. CSelectionController.prototype.restoreOldBorder=function(node){
  10361. if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){
  10362. if(node.getAttribute("oldBorderStyle").length>0){
  10363. node.style.border=node.getAttribute("oldBorderStyle");
  10364. }else{
  10365. node.style.borderColor=node.style.borderWidth=node.style.borderStyle="";
  10366. }
  10367. node.removeAttribute("oldBorderStyle");
  10368. }
  10369. };
  10370. CSelectionController.prototype.setPrimarySelectionStyles=function(cell){
  10371. if(this.getPrimarySelectionColor()){
  10372. cell.style.backgroundColor=this.getPrimarySelectionColor();
  10373. }else{
  10374. cell.style.backgroundImage=this.pS_backgroundImageURL;
  10375. cell.style.backgroundRepeat="repeat";
  10376. }
  10377. };
  10378. CSelectionController.prototype.setSecondarySelectionStyles=function(cell){
  10379. if(this.getSecondarySelectionColor()){
  10380. cell.style.backgroundColor=this.getSecondarySelectionColor();
  10381. }else{
  10382. cell.style.backgroundImage=this.sS_backgroundImageURL;
  10383. cell.style.backgroundRepeat="repeat";
  10384. }
  10385. };
  10386. CSelectionController.prototype.saveOldCellStyles=function(node){
  10387. if(node&&node.getAttribute("oldBackgroundImageStyle")==null){
  10388. node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor"));
  10389. node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node));
  10390. node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat"));
  10391. node.style.backgroundImage="";
  10392. node.style.backgroundRepeat="";
  10393. }
  10394. };
  10395. CSelectionController.prototype.restoreOldBackgroundImage=function(node){
  10396. if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){
  10397. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  10398. node.removeAttribute("oldBackgroundImageStyle");
  10399. node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat");
  10400. node.removeAttribute("oldBackgroundRepeat");
  10401. node.style.backgroundColor=node.getAttribute("oldBackgroundColor");
  10402. node.removeAttribute("oldBackgroundColor");
  10403. }
  10404. };
  10405. CSelectionController.prototype.getStyleProperty=function(node,_717){
  10406. if(node&&node.style&&node.style[_717]){
  10407. return node.style[_717];
  10408. }
  10409. return "";
  10410. };
  10411. CSelectionController.prototype.getBackgroundImage=function(node){
  10412. if(node&&node.style){
  10413. return node.style.backgroundImage;
  10414. }
  10415. return "";
  10416. };
  10417. CSelectionController.prototype.pageContextClicked=function(e){
  10418. var node=getNodeFromEvent(e);
  10419. if(typeof node.selectedCell!="undefined"){
  10420. var _71b=node;
  10421. node=node.selectedCell;
  10422. _71b.removeAttribute("selectedCell");
  10423. }
  10424. while(node!=null&&node.tagName!="TD"){
  10425. node=node.parentNode;
  10426. }
  10427. if(node!=null){
  10428. var _71c=this.getBackgroundImage(node);
  10429. this.findSelectionURLs();
  10430. if(this.getSelections().length==0||_71c!=this.pS_backgroundImageURL){
  10431. this.pageClicked(e);
  10432. }
  10433. }
  10434. if(typeof populateContextMenu!="undefined"){
  10435. populateContextMenu();
  10436. moveContextMenu(e);
  10437. }
  10438. var _71d=false;
  10439. if(this.showViewerContextMenu()){
  10440. if(typeof e.preventDefault=="function"){
  10441. e.preventDefault();
  10442. }
  10443. _71d=true;
  10444. }
  10445. return _71d;
  10446. };
  10447. CSelectionController.prototype.chartContextMenu=function(e){
  10448. if(!this.hasSelectedChartNodes()){
  10449. return;
  10450. }
  10451. if(typeof populateContextMenu!="undefined"){
  10452. populateContextMenu();
  10453. moveContextMenu(e);
  10454. }
  10455. if(typeof e.preventDefault=="function"){
  10456. e.preventDefault();
  10457. }
  10458. return false;
  10459. };
  10460. CSelectionController.prototype.titleAreaContextMenu=function(e,_720,sId){
  10461. if(typeof populateContextMenu!="undefined"){
  10462. goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_720);
  10463. goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
  10464. populateContextMenu(_720.toUpperCase());
  10465. moveContextMenu(e,_720.toUpperCase());
  10466. }
  10467. if(typeof e.preventDefault=="function"){
  10468. e.preventDefault();
  10469. }
  10470. return false;
  10471. };
  10472. CSelectionController.prototype.selectionsAreAllSameType=function(){
  10473. var _722=this.getSelections();
  10474. if(_722.length>0){
  10475. var _723=_722[0].getLayoutType();
  10476. for(var i=1;i<_722.length;i++){
  10477. if(_723!=_722[i].getLayoutType()){
  10478. return 0;
  10479. }
  10480. }
  10481. return 1;
  10482. }
  10483. return -1;
  10484. };
  10485. CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
  10486. var _725=this.getSelections();
  10487. var i=0;
  10488. if(_725.length>0){
  10489. var _727=_725[0].getColumnRef();
  10490. if(_727!=null&&_727!=""){
  10491. for(i=1;i<_725.length;i++){
  10492. if(_727!=_725[i].getColumnRef()){
  10493. return false;
  10494. }
  10495. }
  10496. }else{
  10497. var _728=_725[0].getCellTypeId();
  10498. for(i=1;i<_725.length;i++){
  10499. if(_728!=_725[i].getCellTypeId()){
  10500. return false;
  10501. }
  10502. }
  10503. }
  10504. return true;
  10505. }
  10506. return false;
  10507. };
  10508. CSelectionController.prototype.checkForReportElementNode=function(node){
  10509. if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){
  10510. if(node.className=="tt"){
  10511. 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")){
  10512. node=node.parentNode.parentNode;
  10513. }else{
  10514. return false;
  10515. }
  10516. }else{
  10517. if(typeof node.parentNode!="undefined"&&node.parentNode!=null){
  10518. var _72a=node.parentNode;
  10519. while(typeof _72a!="undefined"&&_72a!=null){
  10520. if(typeof _72a.className!="undefined"&&_72a.className!=null&&_72a.className.substr(0,2)=="ft"){
  10521. node=_72a;
  10522. break;
  10523. }else{
  10524. _72a=_72a.parentNode;
  10525. }
  10526. }
  10527. }else{
  10528. return false;
  10529. }
  10530. }
  10531. var _72b=node.className.substr(0,2);
  10532. if(_72b=="ta"||_72b=="ts"||_72b=="ft"){
  10533. return true;
  10534. }
  10535. }
  10536. return false;
  10537. };
  10538. CSelectionController.prototype.chartClicked=function(_72c){
  10539. this.setSelectedChartArea(_72c);
  10540. };
  10541. CSelectionController.prototype.processColumnTitleNode=function(_72d){
  10542. if(!_72d||!this.m_oCognosViewer.isBux){
  10543. return;
  10544. }
  10545. var _72e=_72d.getCellRef();
  10546. if(_72e.getAttribute("contextAugmented")=="true"||"list"!=_72d.getDataContainerType()||"columnTitle"!=_72d.getLayoutType()){
  10547. return;
  10548. }
  10549. var _72f=_72d.getSelectedContextIds();
  10550. var _730=false;
  10551. if(typeof _72f=="object"&&_72f!=null&&_72f.length>0){
  10552. if(this.isRelational(_72f)&&this.getQueryModelId(_72f[0][0])==null){
  10553. _730=true;
  10554. }else{
  10555. return;
  10556. }
  10557. }
  10558. var lid=_72e.parentNode.parentNode.parentNode.getAttribute("lid");
  10559. var _732=_72e.parentNode.nextSibling;
  10560. var _733=getChildElementsByAttribute(_732,"td","cid",_72e.getAttribute("cid"));
  10561. var _734=null;
  10562. var _735=true;
  10563. var _736;
  10564. if(_733.length>0){
  10565. var _737=_733[0];
  10566. var _738=_737.childNodes.length;
  10567. for(var _739=0;_739<_738;_739++){
  10568. var _73a=_737.childNodes[_739];
  10569. if(_73a.getAttribute&&((_73a.nodeName.toLowerCase()=="table"&&typeof _73a.getAttribute("lid")=="string")||_73a.nodeName.toLowerCase()=="map"||_73a.nodeName.toLowerCase()=="img"||_73a.getAttribute("chartcontainer")=="true")){
  10570. if(_739==0){
  10571. _735=false;
  10572. }
  10573. }else{
  10574. _736=[];
  10575. if(_73a.nodeName.toLowerCase()=="span"){
  10576. _736.push(_73a);
  10577. }
  10578. var _73b=_73a.getElementsByTagName?_73a.getElementsByTagName("span"):[];
  10579. for(var _73c=0;_73c<_73b.length;++_73c){
  10580. if(lid==getImmediateLayoutContainerId(_73b[_73c])){
  10581. _736.push(_73b[_73c]);
  10582. }
  10583. }
  10584. for(var _73d=0;_73d<_736.length;++_73d){
  10585. var _73e=_736[_73d];
  10586. if(_73e.nodeType==1&&_73e.nodeName.toLowerCase()=="span"&&_73e.style.visibility!="hidden"){
  10587. if(_73e.getAttribute("ctx")!=null&&_73e.getAttribute("ctx")!=""){
  10588. _734=_73e.getAttribute("ctx");
  10589. break;
  10590. }
  10591. }
  10592. }
  10593. }
  10594. }
  10595. }
  10596. if(_734!=null){
  10597. var _73f=_734.split("::")[0].split(":")[0];
  10598. if(!_730){
  10599. _736=_72e.getElementsByTagName("span");
  10600. if(_736.length!=0){
  10601. var _740=this.m_oCDManager.m_cd[_73f];
  10602. var _741=this.getTextValue(_736);
  10603. var _742={"u":_741===null?"":_741};
  10604. if(typeof _740!="undefined"){
  10605. if(typeof _740["r"]!="undefined"){
  10606. _742.r=_740["r"];
  10607. }
  10608. if(typeof _740["q"]!="undefined"){
  10609. _742.q=_740["q"];
  10610. }
  10611. if(typeof _740["i"]!="undefined"){
  10612. _742.i=_740["i"];
  10613. }
  10614. }
  10615. var _743="cloned"+_73f;
  10616. this.m_oCDManager.m_cd[_743]=_742;
  10617. _736[0].setAttribute("ctx",_743);
  10618. _72d=this.getSelectionObjectFactory().processCTX(_72d,_743);
  10619. }
  10620. }else{
  10621. var qmid=this.getQueryModelId(_73f);
  10622. if(qmid==null){
  10623. }
  10624. if(qmid!=null){
  10625. var _745=_72f[0][0];
  10626. this.m_oCDManager.m_cd[_745].i=this.m_oCDManager.m_cd[_73f].i;
  10627. return false;
  10628. }
  10629. }
  10630. }else{
  10631. _735=false;
  10632. }
  10633. if(!_735){
  10634. _72e.setAttribute("canSort","false");
  10635. }
  10636. _72e.setAttribute("contextAugmented","true");
  10637. };
  10638. CSelectionController.prototype.selectionsInSameDataContainer=function(){
  10639. try{
  10640. var _746=this.getAllSelectedObjects();
  10641. var _747=_746[0].getLayoutElementId();
  10642. for(var _748=1;_748<_746.length;_748++){
  10643. if(_747!=_746[_748].getLayoutElementId()){
  10644. return false;
  10645. }
  10646. }
  10647. }
  10648. catch(e){
  10649. return false;
  10650. }
  10651. return true;
  10652. };
  10653. CSelectionController.prototype.selectionsFromSameDataItem=function(){
  10654. try{
  10655. var _749=this.getAllSelectedObjects();
  10656. var _74a=_749[0].getDataItems()[0][0];
  10657. for(var _74b=1;_74b<_749.length;_74b++){
  10658. if(_74a!=_749[_74b].getDataItems()[0][0]){
  10659. return false;
  10660. }
  10661. }
  10662. }
  10663. catch(e){
  10664. return false;
  10665. }
  10666. return true;
  10667. };
  10668. CSelectionController.prototype.isRelational=function(_74c){
  10669. try{
  10670. if(!_74c){
  10671. var _74d=this.getAllSelectedObjects()[0];
  10672. _74c=_74d.getSelectedContextIds();
  10673. }
  10674. for(var _74e=0;_74e<_74c.length;_74e++){
  10675. for(var _74f=0;_74f<_74c[_74e].length;_74f++){
  10676. var ctx=_74c[_74e][_74f];
  10677. var mun=this.getMun(ctx);
  10678. var lun=this.getLun(ctx);
  10679. var hun=this.getHun(ctx);
  10680. if(mun!=null&&typeof mun!="undefined"&&mun.length>0){
  10681. return false;
  10682. }
  10683. if(lun!=null&&typeof lun!="undefined"&&lun.length>0){
  10684. return false;
  10685. }
  10686. if(hun!=null&&typeof hun!="undefined"&&hun.length>0){
  10687. return false;
  10688. }
  10689. }
  10690. }
  10691. return true;
  10692. }
  10693. catch(e){
  10694. return true;
  10695. }
  10696. return true;
  10697. };
  10698. CSelectionController.prototype.getDataContainerType=function(){
  10699. try{
  10700. if(!this.getAllSelectedObjects()[0]){
  10701. return "";
  10702. }
  10703. return this.getAllSelectedObjects()[0].m_dataContainerType;
  10704. }
  10705. catch(e){
  10706. return "";
  10707. }
  10708. };
  10709. CSelectionController.prototype.areSelectionsColumnRowTitles=function(){
  10710. try{
  10711. var _754=this.getAllSelectedObjects();
  10712. for(var _755=0;_755<_754.length;_755++){
  10713. var _756=_754[_755];
  10714. if(_756.getLayoutType()!="columnTitle"||_756.isHomeCell()){
  10715. return false;
  10716. }
  10717. }
  10718. }
  10719. catch(e){
  10720. return false;
  10721. }
  10722. return true;
  10723. };
  10724. CSelectionController.prototype.selectionsAreMeasures=function(){
  10725. try{
  10726. var _757=this.getAllSelectedObjects();
  10727. for(var _758=0;_758<_757.length;_758++){
  10728. var _759=_757[_758];
  10729. if(this.getUsageInfo(_759.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
  10730. return false;
  10731. }
  10732. }
  10733. }
  10734. catch(e){
  10735. return false;
  10736. }
  10737. return true;
  10738. };
  10739. CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
  10740. var _75a=this.getAllSelectedObjects();
  10741. if(_75a.length==0){
  10742. return false;
  10743. }
  10744. for(var _75b=0;_75b<_75a.length;_75b++){
  10745. var _75c=_75a[0];
  10746. if(_75c.getSelectedContextIds().length==0){
  10747. return false;
  10748. }
  10749. var _75d=_75c.getSelectedContextIds()[0][0];
  10750. var mun=this.getMun(_75d);
  10751. var _75f=this.getUsageInfo(_75d);
  10752. if(mun==null||typeof mun=="undefined"||mun.length==0||_75f==this.c_usageMeasure){
  10753. return false;
  10754. }
  10755. }
  10756. return true;
  10757. };
  10758. CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
  10759. var _760=this.getAllSelectedObjects();
  10760. if(_760.length==0){
  10761. return false;
  10762. }
  10763. var _761=this.selectionsHaveCalculationMetadata();
  10764. for(var _762=0;_762<_760.length;_762++){
  10765. var _763=_760[_762];
  10766. var _764=_763.getSelectedContextIds()[0][0];
  10767. if(!this.isCalculationOrMeasure(_764,_761)){
  10768. return false;
  10769. }
  10770. }
  10771. return true;
  10772. };
  10773. CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
  10774. try{
  10775. var _765=this.getDataContainerType();
  10776. var _766=this.getAllSelectedObjects();
  10777. for(var _767=0;_767<_766.length;_767++){
  10778. var _768=_766[_767];
  10779. var _769=_768.getSelectedContextIds();
  10780. var _76a=_769[0][0];
  10781. var sHun=this.getHun(_76a);
  10782. if(!this.hasCalculationMetadata(_76a,_769,_765)){
  10783. return false;
  10784. }
  10785. }
  10786. }
  10787. catch(e){
  10788. return false;
  10789. }
  10790. return true;
  10791. };
  10792. CSelectionController.prototype.isCalculationOrMeasure=function(_76c,_76d){
  10793. var mun=this.getMun(_76c);
  10794. var _76f=this.getUsageInfo(_76c);
  10795. if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_76d)||_76f==this.c_usageMeasure)){
  10796. return false;
  10797. }
  10798. return true;
  10799. };
  10800. CSelectionController.prototype.hasCalculationMetadata=function(_770,_771,_772){
  10801. var sHun=this.getHun(_770);
  10802. if(this.getUsageInfo(_770)!=this.c_usageMeasure){
  10803. if((this.isRelational(_771)&&this.getQueryModelId(_770)!=null)||(!this.isRelational(_771)&&_772=="list"&&(sHun&&sHun!=""))){
  10804. return false;
  10805. }
  10806. }
  10807. return true;
  10808. };
  10809. CSelectionController.prototype.selectionsAreDateTime=function(){
  10810. try{
  10811. var _774=this.getAllSelectedObjects();
  10812. for(var _775=0;_775<_774.length;_775++){
  10813. var _776=_774[_775];
  10814. var _777=_776.getSelectedContextIds();
  10815. var _778=_777[0][0];
  10816. var _779=this.getDataType(_778);
  10817. if(_779&&typeof this.m_ccl_dateTypes[_779]!=="undefined"){
  10818. return true;
  10819. }
  10820. }
  10821. }
  10822. catch(e){
  10823. return false;
  10824. }
  10825. return false;
  10826. };
  10827. CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
  10828. try{
  10829. var _77a=this.getAllSelectedObjects();
  10830. if(_77a===null||_77a.length<=0){
  10831. return null;
  10832. }
  10833. var _77b=this.m_oCognosViewer.getModelPath();
  10834. var _77c=[];
  10835. for(var i=0;i<_77a.length;i++){
  10836. var obj=_77a[i].getContextJsonObject(this,_77b);
  10837. _77c.push(obj);
  10838. }
  10839. return _77c;
  10840. }
  10841. catch(e){
  10842. }
  10843. };
  10844. CSelectionController.prototype.destroy=function(){
  10845. delete this.m_oCognosViewer;
  10846. delete this.m_aCutColumns;
  10847. delete this.m_aSelectedObjects;
  10848. delete this.m_selectedClass;
  10849. delete this.m_cutClass;
  10850. if(this.m_oObserver&&this.m_oObserver.destroy){
  10851. this.m_oObserver.destroy();
  10852. }
  10853. delete this.m_oObserver;
  10854. delete this.m_aReportMetadataArray;
  10855. delete this.m_aReportContextDataArray;
  10856. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  10857. this.m_oCDManager.destroy();
  10858. }
  10859. delete this.m_oCDManager;
  10860. if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){
  10861. this.m_oSelectionObjectFactory.destroy();
  10862. }
  10863. delete this.m_oSelectionObjectFactory;
  10864. delete this.m_selectedChartArea;
  10865. delete this.m_selectedChartNodes;
  10866. delete this.m_selectionContainerMap;
  10867. delete this.m_chartHelpers;
  10868. delete this.m_oJsonForMarshal;
  10869. if(this.hasSavedSelections()){
  10870. this.clearSavedSelections();
  10871. }
  10872. };
  10873. function clearTextSelection(_77f){
  10874. if(!_77f){
  10875. _77f=document;
  10876. }
  10877. try{
  10878. if(typeof _77f.selection=="object"&&_77f.selection!==null){
  10879. _77f.selection.empty();
  10880. }else{
  10881. if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){
  10882. window.getSelection().removeAllRanges();
  10883. }
  10884. }
  10885. }
  10886. catch(e){
  10887. }
  10888. };
  10889. function CtxArrayPlaceHolder(){
  10890. };
  10891. var self=window;
  10892. function CDrillManager(oCV){
  10893. this.m_drawDrillTargets=false;
  10894. this.setCV(oCV);
  10895. };
  10896. CDrillManager.prototype=new CViewerHelper();
  10897. CDrillManager.prototype.getSelectionController=function(){
  10898. var _781;
  10899. try{
  10900. _781=getCognosViewerSCObjectRef(this.getCV().getId());
  10901. }
  10902. catch(e){
  10903. _781=null;
  10904. }
  10905. return _781;
  10906. };
  10907. CDrillManager.prototype.getSelectedObject=function(){
  10908. var _782=this.getSelectionController();
  10909. if(_782==null){
  10910. return null;
  10911. }
  10912. var _783=null;
  10913. var _784=null;
  10914. if(_782.hasSelectedChartNodes()){
  10915. _784=_782.getSelectedChartNodes();
  10916. }else{
  10917. _784=_782.getSelections();
  10918. }
  10919. if(_784&&_784.length==1){
  10920. _783=_784[0];
  10921. }
  10922. return _783;
  10923. };
  10924. CDrillManager.prototype.canDrillUp=function(){
  10925. if(this.getDrillOption("drillUp")==true&&this.hasMuns()){
  10926. return true;
  10927. }
  10928. return false;
  10929. };
  10930. CDrillManager.prototype.canDrillDown=function(){
  10931. if(this.getDrillOption("drillDown")==true){
  10932. return true;
  10933. }
  10934. return false;
  10935. };
  10936. CDrillManager.prototype.hasMuns=function(_785){
  10937. if(typeof _785=="undefined"){
  10938. _785=this.getSelectedObject();
  10939. }
  10940. if(_785==null){
  10941. return false;
  10942. }
  10943. var _786=_785.getMuns();
  10944. var muns="";
  10945. for(var _788=0;_788<_786.length&&muns=="";++_788){
  10946. if(typeof _786[_788][0]!="undefined"){
  10947. muns+=_786[_788][0];
  10948. }
  10949. }
  10950. return (muns!="");
  10951. };
  10952. CDrillManager.prototype.getRefQuery=function(){
  10953. var _789="";
  10954. var _78a=this.getSelectedObject();
  10955. if(_78a==null){
  10956. return "";
  10957. }
  10958. var _78b=_78a.getRefQueries();
  10959. for(var i=0;i<_78b.length;i++){
  10960. if(_78b[i]!=null){
  10961. for(var j=0;j<_78b[i].length;j++){
  10962. if(_78b[i][j]!=null&&_78b[i][j]!=""){
  10963. return _78b[i][j];
  10964. }
  10965. }
  10966. }
  10967. }
  10968. return _789;
  10969. };
  10970. CDrillManager.prototype.isIsolated=function(){
  10971. var _78e=this.getSelectionController();
  10972. if(_78e==null||_78e.getDrillUpDownEnabled()==false){
  10973. return false;
  10974. }
  10975. var _78f=this.getSelectedObject();
  10976. if(_78f==null){
  10977. return false;
  10978. }
  10979. if(_78f instanceof CSelectionChartObject&&_78e!=null){
  10980. var _790=_78f.getArea();
  10981. if(_790!=null){
  10982. var _791=_790.getAttribute("isolated");
  10983. if(typeof _791!="undefined"&&_791!=null&&_791=="true"){
  10984. return true;
  10985. }
  10986. }
  10987. }else{
  10988. var _792=_78f.getCellRef();
  10989. if(typeof _792=="object"&&_792!=null){
  10990. var _793=_792.getElementsByTagName("span");
  10991. if(_793!=null&&typeof _793!="undefined"&&_793.length>0){
  10992. var _794=_793[0].getAttribute("isolated");
  10993. if(_794!=null&&_794!="undefined"&&_794=="true"){
  10994. return true;
  10995. }
  10996. }
  10997. }
  10998. }
  10999. return false;
  11000. };
  11001. CDrillManager.prototype.getDrillOption=function(_795){
  11002. var _796=this.getSelectionController();
  11003. if(_796==null||_796.getDrillUpDownEnabled()==false||typeof _795=="undefined"){
  11004. return false;
  11005. }
  11006. var _797=this.getSelectedObject();
  11007. if(_797==null){
  11008. return false;
  11009. }
  11010. if(this.isIsolated()){
  11011. if(_795=="drillDown"){
  11012. return false;
  11013. }else{
  11014. if(_795=="drillUp"){
  11015. return true;
  11016. }
  11017. }
  11018. }
  11019. if(_795=="drillDown"){
  11020. if(_797 instanceof CSelectionChartObject&&_796!=null){
  11021. var _798=_797.getArea();
  11022. if(_798!=null){
  11023. var _799=_798.getAttribute("isChartTitle");
  11024. if(typeof _799!="undefined"&&_799!=null&&_799=="true"){
  11025. return false;
  11026. }
  11027. }
  11028. }
  11029. }
  11030. var _79a=_797.getDrillOptions();
  11031. var _79b=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV));
  11032. for(var idx=0;idx<_79a.length;++idx){
  11033. var _79d=(_79b)?_79a[idx].length:1;
  11034. for(var _79e=0;_79e<_79d;++_79e){
  11035. var _79f=_79a[idx][_79e];
  11036. if(_79f=="3"){
  11037. return true;
  11038. }else{
  11039. if(_795=="drillUp"&&_79f=="1"){
  11040. return true;
  11041. }else{
  11042. if(_795=="drillDown"&&_79f=="2"){
  11043. return true;
  11044. }
  11045. }
  11046. }
  11047. }
  11048. }
  11049. return false;
  11050. };
  11051. CDrillManager.prototype.canDrillThrough=function(){
  11052. var _7a0=this.getSelectionController();
  11053. if(_7a0==null||_7a0.getModelDrillThroughEnabled()==false){
  11054. return false;
  11055. }
  11056. return true;
  11057. };
  11058. CDrillManager.prototype.singleClickDrillEvent=function(evt,app){
  11059. var _7a3=this.getSelectionController();
  11060. if(_7a3!=null){
  11061. if(this.getCV().bCanUseCognosViewerSelection==true){
  11062. _7a3.pageClicked(evt);
  11063. }
  11064. }
  11065. var node=getCrossBrowserNode(evt);
  11066. try{
  11067. if(node.className&&node.className.indexOf("dl")==0){
  11068. if(this.canDrillDown()){
  11069. this.singleClickDrillDown(evt,app);
  11070. return true;
  11071. }else{
  11072. if(this.canDrillUp()){
  11073. this.singleClickDrillUp(evt,app);
  11074. return true;
  11075. }
  11076. }
  11077. }
  11078. }
  11079. catch(e){
  11080. }
  11081. if(app=="RV"){
  11082. return this.getDrillThroughParameters("execute",evt);
  11083. }
  11084. return false;
  11085. };
  11086. CDrillManager.prototype.singleClickDrillDown=function(evt,app){
  11087. if(app=="QS"){
  11088. this.qsDrillDown();
  11089. }else{
  11090. this.rvDrillDown();
  11091. }
  11092. };
  11093. CDrillManager.prototype.singleClickDrillUp=function(evt,app){
  11094. if(app=="QS"){
  11095. this.qsDrillUp();
  11096. }else{
  11097. this.rvDrillUp();
  11098. }
  11099. };
  11100. CDrillManager.prototype.getDrillParameters=function(_7a9,_7aa,_7ab,_7ac){
  11101. var _7ad=[];
  11102. var _7ae=this.getSelectedObject();
  11103. if(_7ae==null){
  11104. return _7ad;
  11105. }
  11106. if(typeof _7aa=="undefined"){
  11107. _7aa=true;
  11108. }
  11109. var _7af=_7ae.getDataItems();
  11110. var _7b0=_7ae.getMuns();
  11111. var _7b1=_7ae.getDimensionalItems("lun");
  11112. var _7b2=_7ae.getDimensionalItems("hun");
  11113. var _7b3=_7ae.getDrillOptions();
  11114. if(typeof _7af=="undefined"||typeof _7b0=="undefined"||typeof _7b3=="undefined"||_7b0==null||_7af==null||_7b3==null){
  11115. return _7ad;
  11116. }
  11117. if(_7b0.length!=_7af.length){
  11118. return _7ad;
  11119. }
  11120. var _7b4=_7b0.length;
  11121. for(var _7b5=0;_7b5<_7b4;++_7b5){
  11122. if(_7af[_7b5].length!=0){
  11123. var _7b6=(_7ac)?this.findUserSelectedDrillItem(_7ac,_7af[_7b5]):0;
  11124. if(_7b6<0){
  11125. continue;
  11126. }
  11127. if((_7ab===true)||this.getDrillOption(_7a9)){
  11128. if(_7b0[_7b5][_7b6]==""||_7ad.toString().indexOf(_7b0[_7b5][_7b6],0)==-1){
  11129. _7ad[_7ad.length]=_7af[_7b5][_7b6];
  11130. _7ad[_7ad.length]=_7b0[_7b5][_7b6];
  11131. if(_7aa===true){
  11132. _7ad[_7ad.length]=_7b1[_7b5][_7b6];
  11133. _7ad[_7ad.length]=_7b2[_7b5][_7b6];
  11134. }
  11135. }
  11136. }
  11137. }
  11138. }
  11139. return _7ad;
  11140. };
  11141. CDrillManager.prototype.findUserSelectedDrillItem=function(_7b7,_7b8){
  11142. for(var _7b9=0;_7b9<_7b8.length;++_7b9){
  11143. if(_7b7==_7b8[_7b9]){
  11144. return _7b9;
  11145. }
  11146. }
  11147. return -1;
  11148. };
  11149. CDrillManager.prototype.getModelDrillThroughContext=function(_7ba){
  11150. var _7bb="";
  11151. if(this.canDrillThrough()===true){
  11152. if(typeof gUseNewSelectionContext=="undefined"){
  11153. var _7bc="";
  11154. if(typeof getConfigFrame!="undefined"){
  11155. _7bc=decodeURIComponent(getConfigFrame().cfgGet("PackageBase"));
  11156. }else{
  11157. if(this.getCV().getModelPath()!==""){
  11158. _7bc=this.getCV().getModelPath();
  11159. }
  11160. }
  11161. _7bb=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_7bc));
  11162. }else{
  11163. var _7bd=new CParameterValues();
  11164. var _7be=this.getSelectionController();
  11165. if(_7be){
  11166. var _7bf=_7be.getAllSelectedObjects();
  11167. for(var _7c0=0;_7c0<_7bf.length;++_7c0){
  11168. var _7c1=_7bf[_7c0];
  11169. var _7c2=_7c1.getMuns();
  11170. var _7c3=_7c1.getMetadataItems();
  11171. var _7c4=_7c1.getUseValues();
  11172. for(var _7c5=0;_7c5<_7c3.length;++_7c5){
  11173. for(var idx=0;idx<_7c3[_7c5].length;++idx){
  11174. if(_7c3[_7c5][idx]==null||_7c3[_7c5][idx]==""){
  11175. continue;
  11176. }
  11177. var name=_7c3[_7c5][idx];
  11178. var _7c8;
  11179. if(_7c2[_7c5][idx]!=null&&_7c2[_7c5][idx]!=""){
  11180. _7c8=_7c2[_7c5][idx];
  11181. }else{
  11182. _7c8=_7c4[_7c5][idx];
  11183. }
  11184. var _7c9=_7c4[_7c5][idx];
  11185. _7bd.addSimpleParmValueItem(name,_7c8,_7c9,"true");
  11186. }
  11187. }
  11188. }
  11189. }
  11190. var _7ca=_7ba.XMLBuilderCreateXMLDocument("context");
  11191. _7bb=_7bd.generateXML(_7ba,_7ca);
  11192. }
  11193. }
  11194. return _7bb;
  11195. };
  11196. CDrillManager.prototype.rvDrillUp=function(_7cb){
  11197. this.getCV().executeAction("DrillUp",_7cb);
  11198. };
  11199. CDrillManager.prototype.rvDrillDown=function(_7cc){
  11200. this.getCV().executeAction("DrillDown",_7cc);
  11201. };
  11202. CDrillManager.prototype.rvBuildXMLDrillParameters=function(_7cd,_7ce){
  11203. var _7cf=this.getDrillParameters(_7cd,true,false,_7ce);
  11204. if(_7cf.length==0){
  11205. return drillParams;
  11206. }
  11207. return this.buildDrillParametersSpecification(_7cf);
  11208. };
  11209. CDrillManager.prototype.buildDrillParametersSpecification=function(_7d0){
  11210. var _7d1="<DrillParameters>";
  11211. var idx=0;
  11212. while(idx<_7d0.length){
  11213. _7d1+="<DrillGroup>";
  11214. _7d1+="<DataItem>";
  11215. _7d1+=sXmlEncode(_7d0[idx++]);
  11216. _7d1+="</DataItem>";
  11217. _7d1+="<MUN>";
  11218. _7d1+=sXmlEncode(_7d0[idx++]);
  11219. _7d1+="</MUN>";
  11220. _7d1+="<LUN>";
  11221. _7d1+=sXmlEncode(_7d0[idx++]);
  11222. _7d1+="</LUN>";
  11223. _7d1+="<HUN>";
  11224. _7d1+=sXmlEncode(_7d0[idx++]);
  11225. _7d1+="</HUN>";
  11226. _7d1+="</DrillGroup>";
  11227. }
  11228. _7d1+="</DrillParameters>";
  11229. return _7d1;
  11230. };
  11231. CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){
  11232. var _7d3=null;
  11233. var _7d4=this.getAuthoredDrillThroughTargets();
  11234. if(_7d4.length>0){
  11235. var _7d5="<AuthoredDrillTargets>";
  11236. for(var _7d6=0;_7d6<_7d4.length;++_7d6){
  11237. _7d5+=eval("\""+_7d4[_7d6]+"\"");
  11238. }
  11239. _7d5+="</AuthoredDrillTargets>";
  11240. var cv=this.getCV();
  11241. var _7d8=cv.getAction("AuthoredDrill");
  11242. var _7d9=cv.getDrillTargets();
  11243. if(_7d9.length>0){
  11244. _7d3=_7d8.getAuthoredDrillThroughContext(_7d5,_7d9);
  11245. }
  11246. }
  11247. return _7d3;
  11248. };
  11249. CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){
  11250. var _7da="";
  11251. var _7db=this.getAuthoredDrillsForCurrentSelection();
  11252. if(_7db){
  11253. _7da=XMLBuilderSerializeNode(_7db);
  11254. }
  11255. return _7da;
  11256. };
  11257. CDrillManager.prototype.launchGoToPage=function(_7dc,_7dd){
  11258. var _7de=this.getSelectionController();
  11259. if((_7de!=null&&_7de.getModelDrillThroughEnabled()==true)||(typeof _7dc!="undefined"&&_7dc!=null&&_7dc!="")){
  11260. var _7df=this.getAuthoredDrillsForGotoPage();
  11261. var _7e0=this.getModelDrillThroughContext(self);
  11262. var form=document.getElementById("drillForm");
  11263. if(form!=null){
  11264. document.body.removeChild(form);
  11265. }
  11266. form=document.createElement("form");
  11267. var cvid=this.getCVId();
  11268. var _7e3=document.forms["formWarpRequest"+cvid];
  11269. form.setAttribute("id","drillForm");
  11270. form.setAttribute("name","drillForm");
  11271. form.setAttribute("target",_7e3.getAttribute("target"));
  11272. form.setAttribute("method","post");
  11273. form.setAttribute("action",_7e3.getAttribute("action"));
  11274. form.style.display="none";
  11275. document.body.appendChild(form);
  11276. if(this.getCV().getModelPath()!==""){
  11277. form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath()));
  11278. }
  11279. if(typeof _7e3["ui.object"]!="undefined"&&_7e3["ui.object"].value!=""){
  11280. form.appendChild(createFormField("drillSource",_7e3["ui.object"].value));
  11281. }else{
  11282. if(typeof this.getCV().envParams["ui.spec"]!="undefined"){
  11283. form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"]));
  11284. }
  11285. }
  11286. if(_7df!=""){
  11287. form.appendChild(createHiddenFormField("m","portal/drillthrough.xts"));
  11288. form.appendChild(createFormField("invokeGotoPage","true"));
  11289. form.appendChild(createFormField("m","portal/drillthrough.xts"));
  11290. form.appendChild(createFormField("modelDrillEnabled",_7de.getModelDrillThroughEnabled()));
  11291. if(typeof gUseNewSelectionContext=="undefined"){
  11292. form.appendChild(createFormField("newSelectionContext","true"));
  11293. }
  11294. }else{
  11295. if(typeof gUseNewSelectionContext=="undefined"){
  11296. form.appendChild(createHiddenFormField("m","portal/goto2.xts"));
  11297. }else{
  11298. form.appendChild(createHiddenFormField("m","portal/goto.xts"));
  11299. }
  11300. }
  11301. form.appendChild(createHiddenFormField("b_action","xts.run"));
  11302. form.appendChild(createHiddenFormField("drillTargets",_7df));
  11303. if(typeof gUseNewSelectionContext=="undefined"){
  11304. form.appendChild(createHiddenFormField("drillContext",_7e0));
  11305. }else{
  11306. form.appendChild(createHiddenFormField("modeledDrillthru",_7e0));
  11307. }
  11308. form.appendChild(createHiddenFormField("errURL","javascript:window.close();"));
  11309. if(typeof _7dd!="undefined"&&_7dd==true){
  11310. form.appendChild(this.createFormField("directLaunch","true"));
  11311. }
  11312. var _7e4="";
  11313. if(this.getCV().envParams["ui.routingServerGroup"]){
  11314. _7e4=this.getCV().envParams["ui.routingServerGroup"];
  11315. }
  11316. form.appendChild(createHiddenFormField("ui.routingServerGroup",_7e4));
  11317. if(this.getCV().getExecutionParameters()!=""){
  11318. form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters()));
  11319. }
  11320. if(_7e3.lang&&_7e3.lang.value!=""){
  11321. form.appendChild(createHiddenFormField("lang",_7e3.lang.value));
  11322. }
  11323. if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){
  11324. if(typeof this.getCV().launchGotoPage==="function"){
  11325. this.getCV().launchGotoPage(form);
  11326. }else{
  11327. var _7e5="winNAT_"+(new Date()).getTime();
  11328. var _7e6=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid;
  11329. window.open(_7e6,_7e5,"toolbar,location,status,menubar,resizable,scrollbars=1");
  11330. form.target=_7e5;
  11331. }
  11332. }
  11333. }
  11334. };
  11335. CDrillManager.prototype.buildSearchPageXML=function(_7e7,pkg,_7e9,_7ea,_7eb,_7ec,_7ed){
  11336. var _7ee=null;
  11337. if(typeof _7e7.XMLElement=="function"){
  11338. _7ee=_7e7.XMLBuilderCreateXMLDocument("cognosSearch");
  11339. _7e7.XMLBuilderSetAttributeNodeNS(_7ee.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/");
  11340. var _7ef=_7ee.createElement("package");
  11341. if(typeof pkg=="string"&&pkg!==""){
  11342. _7ef.appendChild(_7ee.createTextNode(pkg));
  11343. }
  11344. _7ee.documentElement.appendChild(_7ef);
  11345. var _7f0=_7ee.createElement("model");
  11346. if(typeof _7e9=="string"&&_7e9!==""){
  11347. _7f0.appendChild(_7ee.createTextNode(_7e9));
  11348. }
  11349. _7ee.documentElement.appendChild(_7f0);
  11350. var _7f1=_7ee.createElement("selectedContext");
  11351. _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  11352. _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  11353. _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  11354. _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  11355. _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  11356. _7ee.documentElement.appendChild(_7f1);
  11357. for(var _7f2 in _7ea){
  11358. var _7f3=_7ee.createElement("item");
  11359. _7e7.XMLBuilderSetAttributeNodeNS(_7f3,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  11360. var _7f4=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_7ee);
  11361. _7e7.XMLBuilderSetAttributeNodeNS(_7f4,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  11362. _7f4.appendChild(_7ee.createTextNode(_7ea[_7f2].name));
  11363. var _7f5=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_7ee);
  11364. _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  11365. _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  11366. for(var j=0;j<_7ea[_7f2].values.length;j++){
  11367. var _7f7=_7ee.createElement("item");
  11368. _7e7.XMLBuilderSetAttributeNodeNS(_7f7,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  11369. var _7f8=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7ee);
  11370. _7e7.XMLBuilderSetAttributeNodeNS(_7f8,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  11371. _7f8.appendChild(_7ee.createTextNode(_7ea[_7f2].values[j][0]));
  11372. var _7f9=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7ee);
  11373. _7e7.XMLBuilderSetAttributeNodeNS(_7f9,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  11374. var _7fa=_7ea[_7f2].values[j][1]==null?"":_7ea[_7f2].values[j][1];
  11375. _7f9.appendChild(_7ee.createTextNode(_7fa));
  11376. _7f7.appendChild(_7f8);
  11377. _7f7.appendChild(_7f9);
  11378. _7f5.appendChild(_7f7);
  11379. }
  11380. _7f3.appendChild(_7f4);
  11381. _7f3.appendChild(_7f5);
  11382. _7f1.appendChild(_7f3);
  11383. }
  11384. var _7fb=_7ee.createElement("defaultMeasure");
  11385. _7ee.documentElement.appendChild(_7fb);
  11386. _7ec.buildXML(_7e7,_7ee,"data");
  11387. var _7fc=_7ee.createElement("filter");
  11388. _7ee.documentElement.appendChild(_7fc);
  11389. }
  11390. return _7ee;
  11391. };
  11392. CDrillManager.prototype.openSearchPage=function(_7fd,_7fe){
  11393. this.getModelDrillThroughContext(self);
  11394. var _7ff=document.getElementById("searchPage");
  11395. if(_7ff!=null){
  11396. document.body.removeChild(_7ff);
  11397. }
  11398. _7ff=document.createElement("form");
  11399. _7ff.setAttribute("id","searchPage");
  11400. _7ff.setAttribute("name","searchPage");
  11401. _7ff.setAttribute("method","post");
  11402. _7ff.setAttribute("target",_7ff.name);
  11403. _7ff.setAttribute("action",this.getCV().getGateway()+"/gosearch");
  11404. _7ff.style.display="none";
  11405. document.body.appendChild(_7ff);
  11406. _7ff.appendChild(createHiddenFormField("csn.action","search"));
  11407. _7ff.appendChild(createHiddenFormField("csn.drill",_7fe));
  11408. var _800=window.open("",_7ff.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640");
  11409. _800.focus();
  11410. _7ff.submit();
  11411. };
  11412. CDrillManager.prototype.launchSearchPage=function(){
  11413. var _801=this.getSelectionController();
  11414. var _802=document.forms["formWarpRequest"+this.getCVId()];
  11415. var _803=this.determineSelectionsForSearchPage(_801);
  11416. var _804=this.getSearchContextDataSpecfication(_801);
  11417. var _805=this.buildSearchPageXML(self,_802.packageBase.value,this.getCV().getModelPath(),_803,[],_804,[]);
  11418. this.openSearchPage(_802.packageBase.value,XMLBuilderSerializeNode(_805));
  11419. };
  11420. CDrillManager.prototype.qsDrillDown=function(){
  11421. if(!this.canDrillDown()){
  11422. getConfigFrame().dlgGenericSelectionMessage(false);
  11423. return;
  11424. }
  11425. var _806="DD:";
  11426. this.qsSendDrillCommand(_806);
  11427. };
  11428. CDrillManager.prototype.qsDrillUp=function(){
  11429. if(!this.canDrillUp()){
  11430. getConfigFrame().dlgGenericSelectionMessage(false);
  11431. return;
  11432. }
  11433. var _807="DU:";
  11434. this.qsSendDrillCommand(_807);
  11435. };
  11436. CDrillManager.prototype.qsSendDrillCommand=function(_808){
  11437. var _809;
  11438. if(_808=="DU:"){
  11439. _809="drillUp";
  11440. }else{
  11441. _809="drillDown";
  11442. }
  11443. var _80a=this.getDrillParameters(_809,false,false);
  11444. if(_80a.length==0){
  11445. getConfigFrame().dlgGenericSelectionMessage(false);
  11446. return;
  11447. }
  11448. for(var idx=0;idx<_80a.length;++idx){
  11449. _808+=getConfigFrame().escapeParam(_80a[idx]);
  11450. if(idx+1<_80a.length){
  11451. _808+=",";
  11452. }
  11453. }
  11454. getConfigFrame().sendCmd(_808,"",true);
  11455. };
  11456. CDrillManager.prototype.qsLaunchGoToPage=function(_80c){
  11457. var _80d=this.getSelectionController();
  11458. if(_80d!=null&&_80d.getModelDrillThroughEnabled()==true){
  11459. var _80e=this.getModelDrillThroughContext(cf);
  11460. if(_80e==""){
  11461. getConfigFrame().dlgGenericSelectionMessage(false);
  11462. return;
  11463. }
  11464. var _80f=document.getElementById("gotoPage");
  11465. if(_80f!=null){
  11466. document.body.removeChild(_80f);
  11467. }
  11468. _80f=document.createElement("form");
  11469. _80f.setAttribute("id","gotoPage");
  11470. _80f.setAttribute("name","gotoPage");
  11471. _80f.setAttribute("method","post");
  11472. _80f.style.display="none";
  11473. document.body.appendChild(_80f);
  11474. var _810=getConfigFrame();
  11475. _80f.appendChild(this.createFormField("objpath",decodeURIComponent(_810.cfgGet("PackageBase"))));
  11476. if(typeof gUseNewSelectionContext=="undefined"){
  11477. _80f.appendChild(this.createFormField("m","portal/goto2.xts"));
  11478. }else{
  11479. _80f.appendChild(this.createFormField("m","portal/goto.xts"));
  11480. }
  11481. _80f.appendChild(this.createFormField("b_action","xts.run"));
  11482. if(typeof gUseNewSelectionContext=="undefined"){
  11483. _80f.appendChild(this.createFormField("drillContext",_80e));
  11484. }else{
  11485. _80f.appendChild(this.createFormField("modeledDrillthru",_80e));
  11486. }
  11487. if(typeof getConfigFrame().routingServerGroup!="undefined"){
  11488. _80f.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup));
  11489. }
  11490. if(typeof _80c!="undefined"&&_80c==true){
  11491. _80f.appendChild(this.createFormField("directLaunch","true"));
  11492. }
  11493. var _811=_810.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters();
  11494. if(_811){
  11495. _80f.appendChild(this.createFormField("encExecutionParameters",_811));
  11496. }
  11497. var _812="winNAT_"+(new Date()).getTime();
  11498. var _813=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId();
  11499. window.open(_813,_812,"toolbar,location,status,menubar,resizable,scrollbars=1");
  11500. _80f.target=_812;
  11501. }
  11502. };
  11503. CDrillManager.prototype.qsLaunchSearchPage=function(){
  11504. var cf=getConfigFrame();
  11505. var _815=goWindowManager.getSelectionController();
  11506. var _816=this.determineSelectionsForSearchPage(_815);
  11507. var _817=this.getSearchContextDataSpecfication(_815);
  11508. var _818=decodeURIComponent(cf.cfgGet("PackageBase"));
  11509. var _819=this.buildSearchPageXML(cf,_818,decodeURIComponent(cf.cfgGet("cmLastModel")),_816,[],_817,[]);
  11510. this.openSearchPage(_818,cf.XMLBuilderSerializeNode(_819));
  11511. };
  11512. CDrillManager.prototype.determineSelectionsForSearchPage=function(_81a){
  11513. var _81b=new CtxArrayPlaceHolder();
  11514. var _81c=_81a.getAllSelectedObjects();
  11515. for(var i=0;i<_81c.length;i++){
  11516. var _81e=_81c[i].getColumnName();
  11517. if(!this.containsByIndiceInArray(_81b,_81e)){
  11518. _81b[_81e]={};
  11519. _81b[_81e].name=_81e;
  11520. _81b[_81e].values=[];
  11521. }
  11522. var idx0="";
  11523. var muns=_81c[i].getMuns();
  11524. if(muns!=null&&muns.length>0){
  11525. idx0=muns[0][0];
  11526. }
  11527. var idx1=_81c[i].getDisplayValues()[0];
  11528. if(!(this.containsInArray(_81b[_81e].values,0,idx0)&&this.containsInArray(_81b[_81e].values,1,idx1))){
  11529. _81b[_81e].values[_81b[_81e].values.length]=[idx0,idx1];
  11530. }
  11531. }
  11532. return _81b;
  11533. };
  11534. CDrillManager.prototype.getSearchContextDataSpecfication=function(_822){
  11535. var _823=new CParameterValues();
  11536. var _824=_822.getCCDManager();
  11537. var _825=_824.m_cd;
  11538. for(var _826 in _825){
  11539. var _827=_824.GetUsage(_826);
  11540. if(_827!="2"){
  11541. var _828=_824.GetRDIValue(_826);
  11542. var _829=_824.GetDisplayValue(_826);
  11543. _823.addSimpleParmValueItem(_828,_828,_829,"true");
  11544. }
  11545. }
  11546. return _823;
  11547. };
  11548. CDrillManager.prototype.containsByIndiceInArray=function(a,v){
  11549. for(var i in a){
  11550. if(i==v){
  11551. return true;
  11552. }
  11553. }
  11554. return false;
  11555. };
  11556. CDrillManager.prototype.containsInArray=function(a,idx,v){
  11557. for(var i in a){
  11558. if(a[i][idx]==v){
  11559. return true;
  11560. }
  11561. }
  11562. return false;
  11563. };
  11564. CDrillManager.prototype.createFormField=function(name,_832){
  11565. var _833=document.createElement("input");
  11566. _833.setAttribute("type","hidden");
  11567. _833.setAttribute("name",name);
  11568. _833.setAttribute("value",_832);
  11569. return (_833);
  11570. };
  11571. CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){
  11572. var _834=[];
  11573. var _835=this.getSelectionController();
  11574. var _836=null;
  11575. if(_835!=null){
  11576. if(_835.getSelectedColumnIds().length==1){
  11577. var _837=_835.getSelections();
  11578. for(var _838=0;_838<_837.length;++_838){
  11579. var _839=_837[_838];
  11580. _836=_839.getCellRef();
  11581. while(_836){
  11582. if(_836.getAttribute("dtTargets")!=null){
  11583. _834.push("<rvDrillTargets>"+_836.getAttribute("dtTargets")+"</rvDrillTargets>");
  11584. break;
  11585. }else{
  11586. if(_836.getAttribute("onclick")!=null){
  11587. var _83a=_836.getAttribute("onclick");
  11588. var _83b=null;
  11589. if(_83a.indexOf("doSingleDrillThrough")!=-1){
  11590. _83b=_83a.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough");
  11591. }else{
  11592. if(_83a.indexOf("doMultipleDrillThrough")!=-1){
  11593. _83b=_83a.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough");
  11594. }
  11595. }
  11596. if(_83b!=null){
  11597. var _83c=eval(_83b);
  11598. if(_83c!=null){
  11599. _834.push(_83c);
  11600. break;
  11601. }
  11602. }
  11603. }
  11604. }
  11605. _836=XMLHelper_GetFirstChildElement(_836);
  11606. }
  11607. }
  11608. }else{
  11609. if(_835.hasSelectedChartNodes()){
  11610. var _83d=_835.getSelectedChartNodes();
  11611. var _83e=_83d[0];
  11612. _836=_83e.getArea();
  11613. if(_836.getAttribute("dtTargets")!=null){
  11614. _834.push("<rvDrillTargets>"+_836.getAttribute("dtTargets")+"</rvDrillTargets>");
  11615. }
  11616. }else{
  11617. if(_835.getSelectedDrillThroughImage()!=null){
  11618. var _83f=_835.getSelectedDrillThroughImage();
  11619. if(_83f&&_83f.getAttribute("dtTargets")!=null){
  11620. _834.push("<rvDrillTargets>"+_83f.getAttribute("dtTargets")+"</rvDrillTargets>");
  11621. }
  11622. }else{
  11623. if(_835.getSelectDrillThroughSingleton()!=null){
  11624. var _840=_835.getSelectDrillThroughSingleton();
  11625. if(_840&&_840.getAttribute("dtTargets")!=null){
  11626. _834.push("<rvDrillTargets>"+_840.getAttribute("dtTargets")+"</rvDrillTargets>");
  11627. }
  11628. }
  11629. }
  11630. }
  11631. }
  11632. }
  11633. return _834;
  11634. };
  11635. CDrillManager.prototype.getDrillThroughParameters=function(_841,evt){
  11636. if(typeof _841=="undefined"){
  11637. _841="query";
  11638. }
  11639. var _843=[];
  11640. if(typeof evt!="undefined"){
  11641. var _844=getCrossBrowserNode(evt,true);
  11642. try{
  11643. while(_844){
  11644. if(typeof _844.getAttribute!="undefined"&&_844.getAttribute("dtTargets")){
  11645. _843.push("<rvDrillTargets>"+_844.getAttribute("dtTargets")+"</rvDrillTargets>");
  11646. break;
  11647. }
  11648. _844=_844.parentNode;
  11649. }
  11650. }
  11651. catch(e){
  11652. return false;
  11653. }
  11654. }else{
  11655. var oCV=this.getCV();
  11656. var _846=oCV.getDrillMgr();
  11657. var _847=_846.getSelectionController();
  11658. if(_847!=null){
  11659. var _848=null;
  11660. if(_847.hasSelectedChartNodes()){
  11661. var _849=_847.getSelectedChartNodes();
  11662. var _84a=_849[0];
  11663. _848=_84a.getArea();
  11664. }
  11665. if(_848!=null){
  11666. _843.push("<rvDrillTargets>"+_848.getAttribute("dtTargets")+"</rvDrillTargets>");
  11667. }else{
  11668. _843=this.getAuthoredDrillThroughTargets();
  11669. }
  11670. }
  11671. }
  11672. if(_843.length>0){
  11673. var _84b="<AuthoredDrillTargets>";
  11674. for(var _84c=0;_84c<_843.length;++_84c){
  11675. _84b+=eval("\""+_843[_84c]+"\"");
  11676. }
  11677. _84b+="</AuthoredDrillTargets>";
  11678. var _84d=this.getCV().getAction("AuthoredDrill");
  11679. if(_841=="query"){
  11680. _84d.populateContextMenu(_84b);
  11681. this.showOtherMenuItems();
  11682. }else{
  11683. if(this.getCV().envParams["cv.id"]=="AA"){
  11684. this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent();
  11685. }else{
  11686. _84d.execute(_84b);
  11687. }
  11688. }
  11689. return true;
  11690. }else{
  11691. if(_841=="query"){
  11692. this.showOtherMenuItems();
  11693. return true;
  11694. }else{
  11695. return false;
  11696. }
  11697. }
  11698. };
  11699. CDrillManager.prototype.executeAuthoredDrill=function(_84e){
  11700. var _84f=decodeURIComponent(_84e);
  11701. var _850=this.getCV().getAction("AuthoredDrill");
  11702. _850.executeDrillTarget(_84f);
  11703. };
  11704. CDrillManager.prototype.doesMoreExist=function(_851){
  11705. for(var i=0;i<_851.getNumItems();i++){
  11706. var _853=_851.get(i);
  11707. if(_853!=null){
  11708. if((_853 instanceof CMenuItem)&&(_853.getLabel()==RV_RES.RV_MORE)&&(_853.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){
  11709. return true;
  11710. }
  11711. }
  11712. }
  11713. return false;
  11714. };
  11715. CDrillManager.prototype.showOtherMenuItems=function(){
  11716. var cv=this.getCV();
  11717. var _855=cv.rvMainWnd;
  11718. var _856=_855.getToolbarControl();
  11719. var _857=null;
  11720. var _858=null;
  11721. if(typeof _856!="undefined"&&_856!=null){
  11722. _857=_856.getItem("goto");
  11723. if(_857){
  11724. _858=_857.getMenu();
  11725. }
  11726. }
  11727. var _859=_855.getContextMenu();
  11728. var _85a=_855.getUIHide();
  11729. var _85b=null;
  11730. if(typeof _859!="undefined"&&_859!=null&&_859.getGoToMenuItem()){
  11731. _85b=_859.getGoToMenuItem().getMenu();
  11732. }
  11733. var _85c=null;
  11734. var _85d=this.getSelectionController();
  11735. if(_858!=null){
  11736. if(this.doesMoreExist(_858)==false){
  11737. if(typeof gMenuSeperator!="undefined"&&_858.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){
  11738. _858.add(gMenuSeperator);
  11739. }
  11740. var _85e=new CMenuItem(_858,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
  11741. if(_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){
  11742. _85e.hide();
  11743. }else{
  11744. if(_85d==null||_85d.getModelDrillThroughEnabled()==false){
  11745. _85e.disable();
  11746. }
  11747. }
  11748. }
  11749. }
  11750. if(_85b!=null){
  11751. if(typeof gMenuSeperator!="undefined"&&_85b.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){
  11752. _85b.add(gMenuSeperator);
  11753. }
  11754. var _85f=new CMenuItem(_85b,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
  11755. if(_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){
  11756. _85f.hide();
  11757. }else{
  11758. if(_85d==null||_85d.getModelDrillThroughEnabled()==false){
  11759. _85f.disable();
  11760. }
  11761. }
  11762. }
  11763. if(_85c!=null&&_85d!=null){
  11764. var _860=_85d.getAllSelectedObjects();
  11765. if(_860==null||_860.length===0){
  11766. _85c.disable();
  11767. }
  11768. }
  11769. if(_858!=null){
  11770. _858.draw();
  11771. if(_858.isVisible()){
  11772. _858.show();
  11773. }
  11774. }
  11775. if(_85b!=null){
  11776. _85b.draw();
  11777. if(_85b.isVisible()){
  11778. _85b.show();
  11779. }
  11780. }
  11781. };
  11782. CDrillManager.prototype.ddc=function(evt){
  11783. var node=getNodeFromEvent(evt);
  11784. if(node!=null&&node.getAttribute("ddc")!=="1"){
  11785. node.setAttribute("ddc","1");
  11786. if(node.getAttribute("dtTargets")){
  11787. node.className="dl "+node.className;
  11788. node.setAttribute("href","#");
  11789. return;
  11790. }
  11791. var _863=this.getSelectionController();
  11792. if(_863!=null){
  11793. var _864=_863.getSelectionObjectFactory().getSelectionChartObject(node);
  11794. if(_864!=null){
  11795. var _865=_864.getDrillOptions();
  11796. for(var idx=0;idx<_865.length;++idx){
  11797. var _867=_865[idx][0];
  11798. if((node.getAttribute("isChartTitle")==="true"&&_867=="1")||_867=="3"||_867=="2"){
  11799. node.className="dl "+node.className;
  11800. node.setAttribute("href","#");
  11801. break;
  11802. }
  11803. }
  11804. }
  11805. }
  11806. }
  11807. };
  11808. CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_868){
  11809. if(typeof _868=="undefined"||_868==null){
  11810. return null;
  11811. }
  11812. var _869=this.getCV().getDrillTargets();
  11813. if(!_869||_869.length==0){
  11814. return null;
  11815. }
  11816. var _86a=_868[0][0];
  11817. if(typeof _86a=="undefined"||_86a==null){
  11818. return null;
  11819. }
  11820. var _86b=_869[_86a];
  11821. if(typeof _86b=="undefined"||_86b==null){
  11822. return null;
  11823. }
  11824. var _86c="<drillTarget drillIdx=\\\""+_86a+"\\\" label=\\\""+_86b.getLabel()+"\\\"/>";
  11825. return "<rvDrillTargets>"+_86c+"</rvDrillTargets>";
  11826. };
  11827. CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_86d){
  11828. if(typeof _86d=="undefined"||_86d==null){
  11829. return null;
  11830. }
  11831. var _86e=this.getCV().getDrillTargets();
  11832. if(!_86e||_86e.length==0){
  11833. return null;
  11834. }
  11835. var _86f="";
  11836. for(var _870=0;_870<_86d.length;++_870){
  11837. var _871=_86d[_870];
  11838. if(_871.length<2){
  11839. continue;
  11840. }
  11841. var _872=_871[0];
  11842. if(typeof _872=="undefined"||_872==null){
  11843. continue;
  11844. }
  11845. var _873=_871[1];
  11846. if(typeof _873=="undefined"||_873==null){
  11847. continue;
  11848. }
  11849. var _874=_86e[_872];
  11850. if(typeof _874=="undefined"||_874==null){
  11851. continue;
  11852. }
  11853. if(_873===null||_873===""){
  11854. _873=_874.getLabel();
  11855. }
  11856. _86f+="<drillTarget drillIdx=\\\""+_872+"\\\" label=\\\""+_873+"\\\"/>";
  11857. }
  11858. if(_86f.length>0){
  11859. return "<rvDrillTargets>"+_86f+"</rvDrillTargets>";
  11860. }
  11861. return null;
  11862. };
  11863. function CDrillThroughTarget(_875,_876,_877,_878,_879,path,_87b,_87c,_87d,_87e,_87f,_880){
  11864. this.m_label=_875;
  11865. this.m_outputFormat=_876;
  11866. this.m_outputLocale=_877;
  11867. this.m_showInNewWindow=_878;
  11868. this.m_method=_879;
  11869. this.m_path=path;
  11870. this.m_bookmark=_87b;
  11871. this.m_parameters=_87c;
  11872. this.m_objectPaths=_87d;
  11873. this.m_prompt="false";
  11874. this.m_dynamicDrillThrough=false;
  11875. this.m_parameterProperties=_880;
  11876. if(typeof _87e!="undefined"&&_87e!=null){
  11877. if(_87e=="yes"){
  11878. this.m_prompt="true";
  11879. }else{
  11880. if(_87e=="target"){
  11881. this.m_prompt="";
  11882. }
  11883. }
  11884. }
  11885. if(typeof _87f!="undefined"&&_87f!=null){
  11886. if(typeof _87f=="string"){
  11887. _87f=_87f=="true"?true:false;
  11888. }
  11889. this.m_dynamicDrillThrough=_87f;
  11890. }
  11891. };
  11892. function CDrillThroughTarget_getParameterProperties(){
  11893. return this.m_parameterProperties;
  11894. };
  11895. function CDrillThroughTarget_getLabel(){
  11896. return this.m_label;
  11897. };
  11898. function CDrillThroughTarget_getOutputFormat(){
  11899. return this.m_outputFormat;
  11900. };
  11901. function CDrillThroughTarget_getOutputLocale(){
  11902. return this.m_outputLocale;
  11903. };
  11904. function CDrillThroughTarget_getShowInNewWindow(){
  11905. return this.m_showInNewWindow;
  11906. };
  11907. function CDrillThroughTarget_getMethod(){
  11908. return this.m_method;
  11909. };
  11910. function CDrillThroughTarget_getPath(){
  11911. return this.m_path;
  11912. };
  11913. function CDrillThroughTarget_getBookmark(){
  11914. return this.m_bookmark;
  11915. };
  11916. function CDrillThroughTarget_getParameters(){
  11917. return this.m_parameters;
  11918. };
  11919. function CDrillThroughTarget_getObjectPaths(){
  11920. return this.m_objectPaths;
  11921. };
  11922. function CDrillThroughTarget_getPrompt(){
  11923. return this.m_prompt;
  11924. };
  11925. function CDrillThroughTarget_isDynamicDrillThrough(){
  11926. return this.m_dynamicDrillThrough;
  11927. };
  11928. CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel;
  11929. CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat;
  11930. CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale;
  11931. CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow;
  11932. CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod;
  11933. CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath;
  11934. CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark;
  11935. CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters;
  11936. CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths;
  11937. CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt;
  11938. CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough;
  11939. CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties;
  11940. function sXmlEncode(_881){
  11941. var _882=""+_881;
  11942. if((_882=="0")||((_881!=null)&&(_881!=false))){
  11943. _882=_882.replace(/&/g,"&amp;");
  11944. _882=_882.replace(/</g,"&lt;");
  11945. _882=_882.replace(/>/g,"&gt;");
  11946. _882=_882.replace(/"/g,"&quot;");
  11947. _882=_882.replace(/'/g,"&apos;");
  11948. }else{
  11949. if(_881==null){
  11950. _882="";
  11951. }
  11952. }
  11953. return _882;
  11954. };
  11955. function createFormField(name,_884){
  11956. var _885=document.createElement("input");
  11957. _885.setAttribute("type","hidden");
  11958. _885.setAttribute("name",name);
  11959. _885.setAttribute("value",_884);
  11960. return (_885);
  11961. };
  11962. function setBackURLToCloseWindow(_886){
  11963. var _887=_886.childNodes;
  11964. if(_887){
  11965. for(var _888=0;_888<_887.length;++_888){
  11966. var _889=_887[_888];
  11967. var _88a=_889.getAttribute("name");
  11968. if(_88a&&_88a=="ui.backURL"){
  11969. _886.removeChild(_889);
  11970. }
  11971. }
  11972. }
  11973. _886.appendChild(createFormField("ui.backURL","javascript:window.close();"));
  11974. };
  11975. function doMultipleDrills(_88b,cvId){
  11976. if(parent!=this&&parent.doMultipleDrills){
  11977. if(getCVId()!=""&&getCVId()!=cvId){
  11978. cvId=getCVId();
  11979. }
  11980. return parent.doMultipleDrills(_88b,cvId);
  11981. }else{
  11982. if(window.gViewerLogger){
  11983. window.gViewerLogger.log("Drill Targets",_88b,"text");
  11984. }
  11985. var oCV=null;
  11986. try{
  11987. oCV=getCognosViewerObjectRef(cvId);
  11988. }
  11989. catch(exception){
  11990. }
  11991. var _88e=buildDrillForm(oCV);
  11992. addDrillEnvironmentFormFields(_88e,oCV);
  11993. if(typeof oCV!="undefined"&&oCV!=null){
  11994. var _88f=oCV.getModelPath();
  11995. _88e.appendChild(createFormField("modelPath",_88f));
  11996. var _890=oCV.getSelectionController();
  11997. var _891="";
  11998. if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
  11999. _891=getViewerSelectionContext(_890,new CSelectionContext(_88f));
  12000. }
  12001. _88e.appendChild(createFormField("drillContext",_891));
  12002. _88e.appendChild(createFormField("modelDrillEnabled",_890.getModelDrillThroughEnabled()));
  12003. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  12004. _88e.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
  12005. }else{
  12006. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  12007. _88e.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
  12008. }
  12009. }
  12010. }
  12011. _88e.setAttribute("launchGotoPage","true");
  12012. _88e.appendChild(createFormField("drillTargets",_88b));
  12013. _88e.appendChild(createFormField("invokeGotoPage","true"));
  12014. _88e.appendChild(createFormField("m","portal/drillthrough.xts"));
  12015. _88e.appendChild(createFormField("b_action","xts.run"));
  12016. var _892="winNAT_"+(new Date()).getTime();
  12017. var _893="..";
  12018. if(oCV!=null){
  12019. _893=oCV.getWebContentRoot();
  12020. var _894=oCV.getExecutionParameters();
  12021. if(_894!=""){
  12022. _88e.appendChild(createFormField("encExecutionParameters",_894));
  12023. }
  12024. }
  12025. if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_88e)){
  12026. if(oCV&&typeof oCV.launchGotoPage==="function"){
  12027. oCV.launchGotoPage(_88e);
  12028. }else{
  12029. var _895=_893+"/rv/blankDrillWin.html";
  12030. _88e.target=_892;
  12031. window.open(_895,_892);
  12032. }
  12033. }
  12034. }
  12035. };
  12036. function buildDrillForm(oCV){
  12037. var _897=document.getElementById("drillForm");
  12038. if(_897){
  12039. document.body.removeChild(_897);
  12040. }
  12041. _897=document.createElement("form");
  12042. if(typeof oCV!="undefined"&&oCV!=null){
  12043. var _898=document.getElementById("formWarpRequest"+oCV.getId());
  12044. _897.setAttribute("target",_898.getAttribute("target"));
  12045. _897.setAttribute("action",_898.getAttribute("action"));
  12046. }else{
  12047. _897.setAttribute("action",location.pathname);
  12048. }
  12049. _897.setAttribute("id","drillForm");
  12050. _897.setAttribute("name","drillForm");
  12051. _897.setAttribute("method","post");
  12052. _897.style.display="none";
  12053. document.body.appendChild(_897);
  12054. return _897;
  12055. };
  12056. function addDrillEnvironmentFormFields(_899,oCV){
  12057. if(window.g_dfEmail){
  12058. _899.appendChild(createFormField("dfemail",window.g_dfEmail));
  12059. }
  12060. if(oCV!=null){
  12061. _899.appendChild(createFormField("cv.id",oCV.getId()));
  12062. if(typeof oCV.envParams["ui.sh"]!="undefined"){
  12063. _899.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
  12064. }
  12065. if(oCV.getViewerWidget()==null){
  12066. if(typeof oCV.envParams["cv.header"]!="undefined"){
  12067. _899.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
  12068. }
  12069. if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
  12070. _899.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
  12071. }else{
  12072. var _89b=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
  12073. if(oCV.m_viewerFragment&&_89b!=null&&_89b===true){
  12074. var _89c=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
  12075. _899.appendChild(createFormField("cv.toolbar",_89c));
  12076. }
  12077. }
  12078. }
  12079. if(typeof oCV.envParams["ui.backURL"]!="undefined"){
  12080. _899.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
  12081. }
  12082. if(typeof oCV.envParams["ui.postBack"]!="undefined"){
  12083. _899.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
  12084. }
  12085. if(typeof oCV.envParams["savedEnv"]!="undefined"){
  12086. _899.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
  12087. }
  12088. if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
  12089. _899.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
  12090. }
  12091. if(typeof oCV.envParams["lang"]!="undefined"){
  12092. _899.appendChild(createFormField("lang",oCV.envParams["lang"]));
  12093. }
  12094. if(typeof oCV.envParams["ui.errURL"]!="undefined"){
  12095. _899.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
  12096. }
  12097. var _89d="";
  12098. if(oCV.envParams["ui.routingServerGroup"]){
  12099. _89d=oCV.envParams["ui.routingServerGroup"];
  12100. }
  12101. _899.appendChild(createHiddenFormField("ui.routingServerGroup",_89d));
  12102. }else{
  12103. _899.appendChild(createFormField("cv.header","false"));
  12104. _899.appendChild(createFormField("cv.toolbar","false"));
  12105. }
  12106. };
  12107. function appendReportHistoryObjects(oCV,_89f){
  12108. if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_89f!=null){
  12109. oCV.rvMainWnd.addCurrentReportToReportHistory();
  12110. var _8a0=oCV.rvMainWnd.saveReportHistoryAsXML();
  12111. _89f.appendChild(createFormField("cv.previousReports",_8a0));
  12112. }
  12113. };
  12114. function doSingleDrill(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab){
  12115. var _8ac="";
  12116. if(typeof cvId=="string"){
  12117. _8ac=cvId;
  12118. }
  12119. var oCV=null;
  12120. try{
  12121. oCV=getCognosViewerObjectRef(cvId);
  12122. }
  12123. catch(exception){
  12124. }
  12125. if(!oCV&&parent!=this&&parent.doSingleDrill){
  12126. if(getCVId()!=""&&getCVId()!=cvId){
  12127. cvId=getCVId();
  12128. }
  12129. return parent.doSingleDrill(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab);
  12130. }else{
  12131. if(typeof _8a3=="undefined"){
  12132. _8a3="default";
  12133. }else{
  12134. if(_8a3=="execute"){
  12135. _8a3="run";
  12136. }
  12137. }
  12138. if(_8a3=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
  12139. _8a1="_blank";
  12140. }
  12141. var _8ae=buildDrillForm(oCV);
  12142. var _8af="<authoredDrillRequest>";
  12143. _8af+="<param name=\"action\">"+sXmlEncode(_8a3)+"</param>";
  12144. _8af+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
  12145. _8af+="<param name=\"format\">"+sXmlEncode(_8a4)+"</param>";
  12146. _8af+="<param name=\"locale\">"+sXmlEncode(_8a5)+"</param>";
  12147. _8af+="<param name=\"prompt\">"+sXmlEncode(_8aa)+"</param>";
  12148. _8af+="<param name=\"dynamicDrill\">"+sXmlEncode(_8ab)+"</param>";
  12149. if(typeof oCV!="undefined"&&oCV!=null){
  12150. _8af+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
  12151. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
  12152. _8af+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  12153. }
  12154. var _8b0=oCV.getModelPath();
  12155. _8af+="<param name=\"metadataModel\">"+sXmlEncode(_8b0)+"</param>";
  12156. _8af+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_8b0)))+"</param>";
  12157. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  12158. _8af+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  12159. }else{
  12160. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  12161. _8af+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
  12162. }
  12163. }
  12164. }
  12165. if(_8a6!=""){
  12166. _8af+="<param name=\"bookmark\">"+_8a6+"</param>";
  12167. }
  12168. if(_8a3!="view"){
  12169. if(typeof _8a7!="undefined"){
  12170. _8af+="<param name=\"sourceContext\">"+sXmlEncode(_8a7)+"</param>";
  12171. }
  12172. if(typeof _8a8!="undefined"){
  12173. _8af+="<param name=\"objectPaths\">"+sXmlEncode(_8a8)+"</param>";
  12174. }
  12175. }
  12176. var _8b1=0;
  12177. _8af+="<drillParameters>";
  12178. var _8b2=[];
  12179. for(_8b1=1;_8b1<args.length;_8b1++){
  12180. var sSel=args[_8b1][1];
  12181. if(_8a4=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
  12182. var _8b4=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_8b1][1])));
  12183. if(_8b4){
  12184. var sMun=_8b4.getAttribute("mun");
  12185. if(sMun!=null&&sMun!=""){
  12186. _8b4.setAttribute("useValue",sMun);
  12187. sSel="<selectChoices>"+XMLBuilderSerializeNode(_8b4)+"</selectChoices>";
  12188. }
  12189. }
  12190. }
  12191. var _8b6=args[_8b1][0];
  12192. var _8b7=false;
  12193. for(var i=0;i<_8b2.length;i++){
  12194. var _8b9=_8b2[i];
  12195. if(_8b9.name===_8b6&&_8b9.value===sSel){
  12196. _8b7=true;
  12197. break;
  12198. }
  12199. }
  12200. if(!_8b7){
  12201. _8b2.push({"name":_8b6,"value":sSel});
  12202. _8af+="<param name=\""+sXmlEncode(_8b6)+"\">"+sXmlEncode(sSel)+"</param>";
  12203. }
  12204. }
  12205. _8af+="</drillParameters>";
  12206. _8af+=getExecutionParamNode(oCV);
  12207. _8af+="</authoredDrillRequest>";
  12208. _8ae.appendChild(createFormField("authoredDrill.request",_8af));
  12209. _8ae.appendChild(createFormField("ui.action","authoredDrillThrough2"));
  12210. _8ae.appendChild(createFormField("b_action","cognosViewer"));
  12211. addDrillEnvironmentFormFields(_8ae,oCV);
  12212. if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_8ae)){
  12213. if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
  12214. oCV.sendDrillThroughRequest(_8ae);
  12215. }else{
  12216. if(_8a1==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
  12217. oCV.m_viewerFragment.raiseAuthoredDrillEvent(_8af);
  12218. }else{
  12219. if((oCV!=null&&oCV.getViewerWidget()!=null)||_8a1!=""){
  12220. setBackURLToCloseWindow(_8ae);
  12221. var _8ba="winNAT_"+(new Date()).getTime();
  12222. var _8bb="..";
  12223. if(oCV!=null){
  12224. _8bb=oCV.getWebContentRoot();
  12225. }
  12226. var _8bc=_8bb+"/rv/blankDrillWin.html";
  12227. if(_8ac){
  12228. _8bc+="?cv.id="+_8ac;
  12229. }
  12230. if(oCV==null){
  12231. _8bc=window.location.href.substring(0,window.location.href.indexOf("/v1"));
  12232. _8bc+="/?perspective=classicviewer";
  12233. _8bc+="&altDrillFlag=true";
  12234. _8bc+="&format="+sXmlEncode(_8a4);
  12235. var _8bd=_8ae.getAttribute("name")+Date.now().toString();
  12236. _8ae.setAttribute("name",_8bd);
  12237. if(typeof (Storage)!=="undefined"){
  12238. localStorage.setItem(_8bd,_8ae.outerHTML);
  12239. _8bc+="&drillFormLabel="+_8bd;
  12240. }else{
  12241. console.log("Sorry! No Web Storage support...");
  12242. }
  12243. }
  12244. if(window.gViewerLogger){
  12245. window.gViewerLogger.log("Drill Specification",_8af,"xml");
  12246. }
  12247. _8ae.target=_8ba;
  12248. newWindow=window.open(_8bc,_8ba);
  12249. }else{
  12250. appendReportHistoryObjects(oCV,_8ae);
  12251. if(window.gViewerLogger){
  12252. window.gViewerLogger.log("Drill Specification",_8af,"xml");
  12253. }
  12254. _8ae.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
  12255. _8ae.submit();
  12256. if(oCV!=null&&!oCV.getDrillFormTarget){
  12257. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
  12258. }
  12259. }
  12260. }
  12261. }
  12262. }
  12263. }
  12264. };
  12265. function getExecutionParamNode(oCV){
  12266. var _8bf="";
  12267. if(typeof oCV!="undefined"&&oCV!=null){
  12268. var _8c0=oCV.getExecutionParameters();
  12269. if(_8c0!=""){
  12270. _8bf+="<param name=\"executionParameters\">";
  12271. _8bf+=sXmlEncode(_8c0);
  12272. _8bf+="</param>";
  12273. }
  12274. }
  12275. return _8bf;
  12276. };
  12277. function doSingleDrillThrough(_8c1,_8c2,cvId){
  12278. var _8c4=_8c1[0][0];
  12279. if(typeof _8c4=="undefined"||_8c4==null){
  12280. return;
  12281. }
  12282. var _8c5=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8c4]:drillTargets[_8c4];
  12283. if(typeof _8c5=="undefined"){
  12284. return;
  12285. }
  12286. if(_8c2!=""&&_8c5.getPath()==""){
  12287. document.location="#"+_8c2;
  12288. }else{
  12289. var args=[];
  12290. args[args.length]=["ui.object",_8c5.getPath()];
  12291. for(var _8c7=1;_8c7<_8c1.length;++_8c7){
  12292. args[args.length]=_8c1[_8c7];
  12293. }
  12294. var _8c8="";
  12295. if(_8c5.getShowInNewWindow()=="true"){
  12296. _8c8="_blank";
  12297. }
  12298. var _8c9=_8c5.getParameters();
  12299. var _8ca=_8c5.getObjectPaths();
  12300. var _8cb=cvId;
  12301. if(!cvId){
  12302. _8cb=getCVId();
  12303. }
  12304. doSingleDrill(_8c8,args,_8c5.getMethod(),_8c5.getOutputFormat(),_8c5.getOutputLocale(),_8c2,_8c9,_8ca,_8cb,_8c5.getPrompt(),false);
  12305. }
  12306. };
  12307. function getCVId(){
  12308. var _8cc="";
  12309. try{
  12310. _8cc=this.frameElement.id.substring("CVIFrame".length);
  12311. }
  12312. catch(exception){
  12313. }
  12314. return _8cc;
  12315. };
  12316. function doMultipleDrillThrough(_8cd,cvId){
  12317. var _8cf="<rvDrillTargets>";
  12318. for(var _8d0=0;_8d0<_8cd.length;++_8d0){
  12319. var _8d1=_8cd[_8d0];
  12320. if(_8d1.length<3){
  12321. continue;
  12322. }
  12323. var _8d2=_8d1[0];
  12324. if(typeof _8d2=="undefined"||_8d2==null){
  12325. continue;
  12326. }
  12327. var _8d3=_8d1[1];
  12328. if(typeof _8d3=="undefined"||_8d3==null){
  12329. continue;
  12330. }
  12331. var _8d4=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8d2]:drillTargets[_8d2];
  12332. if(typeof _8d4=="undefined"||_8d4==null){
  12333. continue;
  12334. }
  12335. if(_8d3===null||_8d3===""){
  12336. _8d3=_8d4.getLabel();
  12337. }
  12338. _8cf+="<drillTarget ";
  12339. _8cf+="outputFormat=\"";
  12340. _8cf+=_8d4.getOutputFormat();
  12341. _8cf+="\" ";
  12342. _8cf+="outputLocale=\"";
  12343. _8cf+=_8d4.getOutputLocale();
  12344. _8cf+="\" ";
  12345. _8cf+="label=\"";
  12346. _8cf+=sXmlEncode(_8d3);
  12347. _8cf+="\" ";
  12348. _8cf+="path=\"";
  12349. _8cf+=sXmlEncode(_8d4.getPath());
  12350. _8cf+="\" ";
  12351. _8cf+="showInNewWindow=\"";
  12352. _8cf+=_8d4.getShowInNewWindow();
  12353. _8cf+="\" ";
  12354. _8cf+="method=\"";
  12355. _8cf+=_8d4.getMethod();
  12356. _8cf+="\" ";
  12357. _8cf+="prompt=\"";
  12358. _8cf+=_8d4.getPrompt();
  12359. _8cf+="\" ";
  12360. _8cf+="dynamicDrill=\"";
  12361. _8cf+=_8d4.isDynamicDrillThrough();
  12362. _8cf+="\">";
  12363. for(var _8d5=2;_8d5<_8d1.length;++_8d5){
  12364. _8cf+=_8d1[_8d5];
  12365. }
  12366. _8cf+=_8d4.getParameters();
  12367. _8cf+=_8d4.getObjectPaths();
  12368. _8cf+="</drillTarget>";
  12369. }
  12370. _8cf+="</rvDrillTargets>";
  12371. if(!cvId){
  12372. cvId=getCVId();
  12373. }
  12374. doMultipleDrills(_8cf,cvId);
  12375. };
  12376. function CScriptLoader(_8d6){
  12377. this.m_oFiles={};
  12378. this.m_aScripts=[];
  12379. this.m_aDocumentWriters=[];
  12380. this.m_ajaxWarnings=[];
  12381. this.m_bIgnoreAjaxWarnings=false;
  12382. this.m_bHandleStylesheetLimit=false;
  12383. this.m_iInterval=20;
  12384. this.m_reFindCssPath=new RegExp("<link[^>]*href=\"([^\"]*)\"","i");
  12385. this.m_reFindInlineStyle=/<style\b(\s|.)*?<\/style>/gi;
  12386. this.m_reHasCss=/<link .*?>/gi;
  12387. this.m_reIsCss=/\.css$/i;
  12388. this.m_reIsJavascript=/\.js$/i;
  12389. this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i;
  12390. this.m_reScriptTagClose=/\s*<\/script>.*?$/i;
  12391. this.m_reScriptTagOpen=/^.*?<script[^>]*>\s*/i;
  12392. this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi;
  12393. this.m_reStyleTagOpen=/^\s*<style[^>]*>(\s|<|!|-)*/gi;
  12394. this.m_reEscapedCharacters=/\\[\\"']/g;
  12395. this.m_reStringLiterals=/("|')[\s\S]*?\1/g;
  12396. this.m_sWebContentRoot=_8d6;
  12397. this.m_bHasCompletedExecution=false;
  12398. this.m_aScriptLoadQueue=[];
  12399. this.m_bBlockScriptLoading=false;
  12400. this.m_bUseScriptBlocking=false;
  12401. this.m_bBlockPromptingLocaleScripts=false;
  12402. this.m_aBlockedPromptingLocaleFileQueue=[];
  12403. };
  12404. CScriptLoader.prototype.hasCompletedExecution=function(){
  12405. return this.m_bHasCompletedExecution;
  12406. };
  12407. CScriptLoader.prototype.setHandlerStylesheetLimit=function(_8d7){
  12408. this.m_bHandleStylesheetLimit=_8d7;
  12409. };
  12410. CScriptLoader.prototype.executeScripts=function(_8d8,_8d9){
  12411. if(this.isReadyToExecute()){
  12412. for(var _8da=0;_8da<this.m_aScripts.length;_8da++){
  12413. if(this.m_aScripts[_8da]){
  12414. var _8db=document.createElement("script");
  12415. _8db.setAttribute("language","javascript");
  12416. _8db.setAttribute("type","text/javascript");
  12417. this.addNamespaceAttribute(_8db,_8d9);
  12418. _8db.text=this.m_aScripts[_8da];
  12419. document.getElementsByTagName("head").item(0).appendChild(_8db);
  12420. }
  12421. }
  12422. this.m_aScripts=[];
  12423. for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
  12424. var _8dd=this.m_aDocumentWriters[idx];
  12425. _8dd.execute();
  12426. }
  12427. this.m_aDocumentWriters=[];
  12428. if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
  12429. if(typeof _8d8=="function"){
  12430. _8d8();
  12431. }
  12432. this.m_bHasCompletedExecution=true;
  12433. }else{
  12434. setTimeout(function(){
  12435. window.gScriptLoader.executeScripts(_8d8,_8d9);
  12436. },this.m_iInterval);
  12437. }
  12438. }else{
  12439. setTimeout(function(){
  12440. window.gScriptLoader.executeScripts(_8d8,_8d9);
  12441. },this.m_iInterval);
  12442. }
  12443. };
  12444. CScriptLoader.prototype.isReadyToExecute=function(){
  12445. for(var _8de in this.m_oFiles){
  12446. if(this.m_oFiles[_8de]!="complete"){
  12447. return false;
  12448. }
  12449. }
  12450. if(this.m_aScriptLoadQueue.length>0){
  12451. return false;
  12452. }
  12453. return true;
  12454. };
  12455. CScriptLoader.prototype.loadCSS=function(_8df,_8e0,_8e1,_8e2){
  12456. var aM=_8df.match(this.m_reHasCss);
  12457. if(aM){
  12458. for(var i=0;i<aM.length;i++){
  12459. if(aM[i].match(this.m_reFindCssPath)){
  12460. var _8e5=RegExp.$1;
  12461. if(_8e5.indexOf("GlobalReportStyles")!=-1){
  12462. this.validateGlobalReportStyles(_8e5);
  12463. if(_8e1){
  12464. if(_8e5.indexOf("GlobalReportStyles.css")!=-1){
  12465. _8e5=_8e5.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
  12466. }
  12467. var _8e6=this.getGlobalReportStylesClassPrefix(_8e5);
  12468. _8e5=_8e5.replace(".css","_NS.css");
  12469. if(_8e0){
  12470. _8e0.className="buxReport "+_8e6;
  12471. }
  12472. }
  12473. }
  12474. this.loadObject(_8e5,_8e2);
  12475. }
  12476. _8df=_8df.replace(aM[i],"");
  12477. }
  12478. }
  12479. return _8df;
  12480. };
  12481. CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_8e7){
  12482. var _8e8=null;
  12483. if(_8e7.indexOf("GlobalReportStyles_11.4.css")!=-1){
  12484. _8e8="v114";
  12485. }
  12486. if(_8e7.indexOf("GlobalReportStyles_11.css")!=-1){
  12487. _8e8="v11";
  12488. }
  12489. if(_8e7.indexOf("GlobalReportStyles_10.css")!=-1){
  12490. _8e8="v10";
  12491. }else{
  12492. if(_8e7.indexOf("GlobalReportStyles_1.css")!=-1){
  12493. _8e8="v1";
  12494. }else{
  12495. if(_8e7.indexOf("GlobalReportStyles_none.css")!=-1){
  12496. _8e8="vnone";
  12497. }else{
  12498. if(_8e7.indexOf("GlobalReportStyles.css")!=-1){
  12499. _8e8="v8";
  12500. }
  12501. }
  12502. }
  12503. }
  12504. return _8e8;
  12505. };
  12506. CScriptLoader.prototype.validateGlobalReportStyles=function(_8e9){
  12507. var _8ea=document.getElementsByTagName("link");
  12508. for(var i=0;i<_8ea.length;++i){
  12509. var _8ec=_8ea[i];
  12510. if(_8ec.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
  12511. if(_8ec.getAttribute("href").toLowerCase()!=_8e9.toLowerCase()){
  12512. var _8ed=_8e9.split("/");
  12513. var _8ee=_8ec.getAttribute("href").split("/");
  12514. if(_8ed[_8ed.length-1]!=_8ee[_8ee.length-1]){
  12515. this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
  12516. }
  12517. }
  12518. break;
  12519. }
  12520. }
  12521. };
  12522. CScriptLoader.prototype.loadFile=function(_8ef,_8f0,_8f1){
  12523. var sURL="";
  12524. if(_8ef){
  12525. sURL=_8ef;
  12526. }
  12527. var _8f3=null;
  12528. if(typeof _8f0=="string"){
  12529. _8f3=_8f0;
  12530. }
  12531. var _8f4="POST";
  12532. if(_8f1=="GET"){
  12533. _8f4="GET";
  12534. }
  12535. var _8f5=null;
  12536. if(typeof ActiveXObject!="undefined"){
  12537. _8f5=new ActiveXObject("Msxml2.XMLHTTP");
  12538. }else{
  12539. _8f5=new XMLHttpRequest();
  12540. }
  12541. _8f5.open(_8f4,sURL,false);
  12542. _8f5.send(_8f3);
  12543. return _8f5.responseText;
  12544. };
  12545. function CScriptLoader_onReadyStateChange(){
  12546. if(typeof this.readyState=="undefined"){
  12547. this.readyState="complete";
  12548. }
  12549. if(this.readyState=="loaded"||this.readyState=="complete"){
  12550. var path=this.sFilePath;
  12551. if(!path&&this.getAttribute){
  12552. path=this.getAttribute("href");
  12553. }
  12554. window.gScriptLoader.setFileState(path,"complete");
  12555. window.gScriptLoader.m_bBlockScriptLoading=false;
  12556. if(this.sFilePath&&window.gScriptLoader.m_bBlockPromptingLocaleScripts&&this.sFilePath.match(window.gScriptLoader.m_reIsPromptingLocaleJavascript)){
  12557. window.gScriptLoader.m_bBlockPromptingLocaleScripts=false;
  12558. if(window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.length>0){
  12559. var _8f7=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
  12560. window.gScriptLoader.loadObject(_8f7.sName,_8f7.sNamespaceId);
  12561. }
  12562. }
  12563. if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
  12564. window.gScriptLoader.loadObject();
  12565. }
  12566. }
  12567. };
  12568. CScriptLoader.prototype.moveLinks=function(node){
  12569. if(!node){
  12570. return;
  12571. }
  12572. var _8f9=node.getAttribute("href");
  12573. if(!_8f9||this.m_oFiles[_8f9]){
  12574. return;
  12575. }
  12576. this.m_oFiles[_8f9]="complete";
  12577. document.getElementsByTagName("head").item(0).appendChild(node);
  12578. };
  12579. CScriptLoader.prototype.loadObject=function(_8fa,_8fb){
  12580. var _8fc=null;
  12581. if(typeof _8fa==="undefined"){
  12582. if(this.m_aScriptLoadQueue.length>0){
  12583. var _8fd=this.m_aScriptLoadQueue.shift();
  12584. _8fa=_8fd.name;
  12585. _8fb=_8fd.namespaceId;
  12586. }else{
  12587. return;
  12588. }
  12589. }
  12590. if(this.m_oFiles[_8fa]){
  12591. return;
  12592. }
  12593. if(this.m_bBlockScriptLoading){
  12594. this.m_aScriptLoadQueue.push({"name":_8fa,"namespaceId":_8fb});
  12595. }else{
  12596. if(_8fa.match(this.m_reIsCss)){
  12597. _8fc=document.createElement("link");
  12598. _8fc.setAttribute("rel","stylesheet");
  12599. _8fc.setAttribute("type","text/css");
  12600. _8fc.setAttribute("href",_8fa);
  12601. if(window.isIE&&window.isIE()){
  12602. _8fc.onreadystatechange=CScriptLoader_onReadyStateChange;
  12603. _8fc.onload=CScriptLoader_onReadyStateChange;
  12604. _8fc.onerror=CScriptLoader_onReadyStateChange;
  12605. this.m_oFiles[_8fa]="new";
  12606. }else{
  12607. this.m_oFiles[_8fa]="complete";
  12608. }
  12609. }else{
  12610. if(_8fa.match(this.m_reIsJavascript)){
  12611. if(_8fa.match(this.m_reIsPromptingLocaleJavascript)){
  12612. if(this.m_bBlockPromptingLocaleScripts){
  12613. this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_8fa,"sNamespaceId":_8fb});
  12614. return;
  12615. }
  12616. this.m_bBlockPromptingLocaleScripts=true;
  12617. }
  12618. this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
  12619. _8fc=document.createElement("script");
  12620. _8fc.setAttribute("language","javascript");
  12621. _8fc.setAttribute("type","text/javascript");
  12622. _8fc.setAttribute("src",_8fa);
  12623. _8fc.sFilePath=_8fa;
  12624. _8fc.onreadystatechange=CScriptLoader_onReadyStateChange;
  12625. _8fc.onload=CScriptLoader_onReadyStateChange;
  12626. _8fc.onerror=CScriptLoader_onReadyStateChange;
  12627. this.addNamespaceAttribute(_8fc,_8fb);
  12628. this.m_oFiles[_8fa]="new";
  12629. }
  12630. }
  12631. if(_8fc){
  12632. document.getElementsByTagName("head").item(0).appendChild(_8fc);
  12633. }
  12634. }
  12635. };
  12636. CScriptLoader.prototype.loadScriptsFromDOM=function(_8fe,_8ff,_900){
  12637. if(!_8fe){
  12638. return;
  12639. }
  12640. var _901=_8fe.getElementsByTagName("script");
  12641. while(_901.length>0){
  12642. var _902=_901[0];
  12643. if(_902.getAttribute("src")!=null&&_902.getAttribute("src").length>0){
  12644. this.loadObject(_902.getAttribute("src"),_8ff);
  12645. }else{
  12646. var _903=_902.innerHTML;
  12647. var _904=false;
  12648. if(_903.indexOf("document.write")!=-1){
  12649. var _905=_903.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
  12650. _904=(_905.indexOf("document.write")!=-1);
  12651. }
  12652. if(_904){
  12653. if(_900){
  12654. var sId="CVScriptFromDOMPlaceHolder"+_901.length+_8ff;
  12655. var _907=_902.ownerDocument.createElement("span");
  12656. _907.setAttribute("id",sId);
  12657. _902.parentNode.insertBefore(_907,_902);
  12658. this.m_aDocumentWriters.push(new CDocumentWriter(sId,_903));
  12659. }
  12660. }else{
  12661. if(_903.length>0){
  12662. this.m_aScripts.push(_903);
  12663. }
  12664. }
  12665. }
  12666. _902.parentNode.removeChild(_902);
  12667. }
  12668. };
  12669. CScriptLoader.prototype.loadStyles=function(_908,_909){
  12670. if(!_908||!_908.parentNode){
  12671. return;
  12672. }
  12673. var _90a=_908.parentNode.getElementsByTagName("style");
  12674. while(_90a.length>0){
  12675. var _90b=_90a[0];
  12676. if(_909){
  12677. this.addNamespaceAttribute(_90b,_909);
  12678. }
  12679. if(window.isIE&&window.isIE()&&window.getNavVer()<10){
  12680. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  12681. if(this.m_bHandleStylesheetLimit){
  12682. if(typeof window.gaRV_INSTANCES!="undefined"){
  12683. for(var i=0;i<window.gaRV_INSTANCES.length;i++){
  12684. window.gaRV_INSTANCES[i].cleanupStyles();
  12685. }
  12686. }
  12687. }
  12688. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  12689. if(typeof console!="undefined"&&console&&console.log){
  12690. console.log("Stylesheet limit reached.");
  12691. }
  12692. this.m_ajaxWarnings.push("Stylesheet limit reached.");
  12693. return;
  12694. }
  12695. }
  12696. }
  12697. document.getElementsByTagName("head").item(0).appendChild(_90b);
  12698. }
  12699. };
  12700. CScriptLoader.prototype.loadAll=function(_90d,_90e,_90f,_910){
  12701. this.m_bScriptLoaderCalled=true;
  12702. this.m_bHasCompletedExecution=false;
  12703. this.loadScriptsFromDOM(_90d,_90f,_910);
  12704. if(this.containsAjaxWarnings()){
  12705. return false;
  12706. }
  12707. this.loadStyles(_90d,_90f);
  12708. if(this.containsAjaxWarnings()){
  12709. return false;
  12710. }
  12711. this.executeScripts(_90e,_90f);
  12712. return true;
  12713. };
  12714. CScriptLoader.prototype.setFileState=function(_911,_912){
  12715. this.m_oFiles[_911]=_912;
  12716. };
  12717. CScriptLoader.prototype.containsAjaxWarnings=function(){
  12718. if(this.m_bIgnoreAjaxWarnings){
  12719. return false;
  12720. }else{
  12721. return (this.m_ajaxWarnings.length>0);
  12722. }
  12723. };
  12724. CScriptLoader.prototype.addNamespaceAttribute=function(_913,_914){
  12725. if(typeof _914==="string"){
  12726. _913.setAttribute("namespaceId",_914);
  12727. }
  12728. };
  12729. if(typeof window.gScriptLoader=="undefined"){
  12730. window.gScriptLoader=new CScriptLoader();
  12731. }
  12732. function ViewerA11YHelper(oCV){
  12733. this.m_oCV=oCV;
  12734. };
  12735. ViewerA11YHelper.prototype.onFocus=function(evt){
  12736. var _917=getCrossBrowserNode(evt);
  12737. _917=ViewerA11YHelper.findChildOfTableCell(_917);
  12738. this.updateCellAccessibility(_917,false);
  12739. };
  12740. ViewerA11YHelper.prototype.onKeyDown=function(evt){
  12741. evt=(evt)?evt:((event)?event:null);
  12742. var _919=getCrossBrowserNode(evt);
  12743. if(ViewerA11YHelper.isTableCell(_919)){
  12744. for(var i=0;i<_919.childNodes.length;i++){
  12745. if(_919.childNodes[i].nodeName.toLowerCase()=="span"){
  12746. _919=_919.childNodes[i];
  12747. break;
  12748. }
  12749. }
  12750. }
  12751. if(!this.isValidNodeToSelect(_919)){
  12752. return true;
  12753. }
  12754. _919=ViewerA11YHelper.findChildOfTableCell(_919);
  12755. if(_919){
  12756. if(evt.keyCode=="39"){
  12757. if(this.m_oCV.getState()&&this.m_oCV.getState().getFindState()&&evt.ctrlKey&&evt.shiftKey){
  12758. this.m_oCV.executeAction("FindNext");
  12759. }else{
  12760. this.moveRight(_919);
  12761. }
  12762. return stopEventBubble(evt);
  12763. }else{
  12764. if(evt.keyCode=="37"){
  12765. this.moveLeft(_919);
  12766. return stopEventBubble(evt);
  12767. }else{
  12768. if(evt.keyCode=="38"){
  12769. this.moveUp(_919);
  12770. return stopEventBubble(evt);
  12771. }else{
  12772. if(evt.keyCode=="40"){
  12773. this.moveDown(_919);
  12774. return stopEventBubble(evt);
  12775. }else{
  12776. if(evt.keyCode=="13"){
  12777. if(this.m_oCV.isBux){
  12778. if(this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
  12779. this.m_oCV.getViewerWidget().preprocessPageClicked(false,evt);
  12780. if(this.m_oCV.getSelectionController().pageClicked(evt)!==false){
  12781. this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
  12782. this.m_oCV.getViewerWidget().updateToolbar();
  12783. }
  12784. }else{
  12785. this.m_oCV.getSelectionController().pageClicked(evt);
  12786. var _91b=this.m_oCV.getActionFactory().load("Selection");
  12787. _91b.onKeyDown(evt);
  12788. }
  12789. this.m_oCV.getViewerWidget().onSelectionChange();
  12790. }else{
  12791. this.m_oCV.de(evt);
  12792. }
  12793. }else{
  12794. if(evt.keyCode=="32"){
  12795. if(this.m_oCV.isBux){
  12796. this.m_oCV.getViewerWidget().preprocessPageClicked(false);
  12797. if(this.m_oCV.getSelectionController().pageClicked(evt)!==false&&this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
  12798. this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
  12799. }
  12800. this.m_oCV.getViewerWidget().updateToolbar();
  12801. this.m_oCV.getViewerWidget().onSelectionChange();
  12802. }else{
  12803. this.m_oCV.getSelectionController().pageClicked(evt);
  12804. }
  12805. return stopEventBubble(evt);
  12806. }else{
  12807. if(evt.keyCode=="46"&&this.m_oCV.isBux){
  12808. 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()){
  12809. var _91c=this.m_oCV.getActionFactory().load("Delete");
  12810. if(!this.m_oCV.isBlacklisted("Delete")&&_91c.canDelete()){
  12811. _91c.execute();
  12812. return stopEventBubble(evt);
  12813. }
  12814. }
  12815. }else{
  12816. if(this.m_oCV.isBux&&evt.ctrlKey==true&&evt.shiftKey==true&&evt.keyCode=="49"){
  12817. var lid=this.m_oCV.getSelectionController().getSelectionObjectFactory().getLayoutElementId(_919);
  12818. if(lid!=""){
  12819. lid=lid.split(this.m_oCV.getId())[0];
  12820. var _91e=-1;
  12821. var _91f=this.m_oCV.getRAPReportInfo();
  12822. if(_91f){
  12823. var _920=_91f.getContainer(lid);
  12824. if(typeof _920.layoutIndex!="undefined"){
  12825. _91e=_920.layoutIndex;
  12826. }
  12827. }
  12828. var _921=document.getElementById("infoBarHeaderButton"+_91e+this.m_oCV.getId());
  12829. if(_921!==null){
  12830. this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt));
  12831. _921.focus();
  12832. }
  12833. }
  12834. return stopEventBubble(evt);
  12835. }else{
  12836. if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){
  12837. var ocv=this.m_oCV;
  12838. var _923=function(){
  12839. if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){
  12840. var _924=clientToScreenCoords(evt.target,document.body);
  12841. evt.clientX=_924.leftCoord;
  12842. evt.clientY=_924.topCoord;
  12843. }
  12844. ocv.dcm(evt,true);
  12845. };
  12846. if(isFF()){
  12847. setTimeout(_923,0);
  12848. }else{
  12849. _923.call();
  12850. }
  12851. return stopEventBubble(evt);
  12852. }else{
  12853. if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){
  12854. var _925=this.m_oCV.getViewerWidget();
  12855. var _926=this.m_oCV.getSelectionController();
  12856. _925.preprocessPageClicked(true);
  12857. _926.pageClicked(evt);
  12858. _925.updateToolbar();
  12859. _925.onContextMenu(evt);
  12860. }
  12861. }
  12862. }
  12863. }
  12864. }
  12865. }
  12866. }
  12867. }
  12868. }
  12869. }
  12870. }
  12871. };
  12872. ViewerA11YHelper.prototype.isValidNodeToSelect=function(node){
  12873. return this.getValidNodeToSelect(node)?true:false;
  12874. };
  12875. ViewerA11YHelper.prototype.getValidNodeToSelect=function(node){
  12876. if(node&&node.style&&node.style.visibility!="hidden"&&node.style.display!="none"){
  12877. var _929=node.nodeName.toLowerCase();
  12878. if((_929=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_929=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_929=="div"&&node.getAttribute("chartcontainer")=="true")||(_929=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){
  12879. return node;
  12880. }
  12881. if(ViewerA11YHelper.isSemanticNode(node)){
  12882. var _92a=node.childNodes&&node.childNodes.length?node.childNodes[0]:null;
  12883. if(_92a){
  12884. return this.getValidNodeToSelect(_92a);
  12885. }
  12886. }
  12887. }
  12888. return null;
  12889. };
  12890. ViewerA11YHelper.isSemanticNode=function(node){
  12891. if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){
  12892. ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"];
  12893. }
  12894. var _92c=node.nodeName.toLowerCase();
  12895. for(var i=0;i<ViewerA11YHelper.isSemanticNode._semanticNodeNames.length;i++){
  12896. if(_92c===ViewerA11YHelper.isSemanticNode._semanticNodeNames[i]){
  12897. return true;
  12898. }
  12899. }
  12900. return false;
  12901. };
  12902. ViewerA11YHelper.isTableCell=function(node){
  12903. var _92f=node.nodeName.toLowerCase();
  12904. return _92f==="td"||_92f==="th";
  12905. };
  12906. ViewerA11YHelper.findChildOfTableCell=function(_930){
  12907. var _931=_930;
  12908. while(_931&&_931.parentNode){
  12909. if(ViewerA11YHelper.getTableCell(_931)){
  12910. break;
  12911. }
  12912. _931=_931.parentNode;
  12913. }
  12914. return _931;
  12915. };
  12916. ViewerA11YHelper.getTableCell=function(node){
  12917. var _933=node.parentNode;
  12918. if(ViewerA11YHelper.isTableCell(_933)){
  12919. return _933;
  12920. }
  12921. if(ViewerA11YHelper.isSemanticNode(_933)&&ViewerA11YHelper.isTableCell(_933.parentNode)){
  12922. return _933.parentNode;
  12923. }
  12924. return null;
  12925. };
  12926. ViewerA11YHelper.prototype.moveRight=function(_934){
  12927. var _935=this.getNextNonTextSibling(_934);
  12928. _935=this.getValidNodeToSelect(_935);
  12929. if(_935){
  12930. this.setFocusToNode(_935);
  12931. return true;
  12932. }
  12933. var _936=ViewerA11YHelper.getTableCell(_934);
  12934. _936=this.getPfMainOutputCell(_936);
  12935. while(_936.nextSibling){
  12936. if(this.moveToTD(_936.nextSibling)){
  12937. return true;
  12938. }
  12939. _936=_936.nextSibling;
  12940. }
  12941. var _937=_936.parentNode;
  12942. while(_937.nextSibling){
  12943. var _938=_937.nextSibling;
  12944. if(this.moveToTD(_938.childNodes[0])){
  12945. return true;
  12946. }
  12947. _937=_937.nextSibling;
  12948. }
  12949. return false;
  12950. };
  12951. ViewerA11YHelper.prototype.moveLeft=function(_939){
  12952. var _93a=this.getPreviousNonTextSibling(_939);
  12953. _93a=this.getValidNodeToSelect(_93a);
  12954. if(_93a){
  12955. this.setFocusToNode(_93a);
  12956. return true;
  12957. }
  12958. var _93b=ViewerA11YHelper.getTableCell(_939);
  12959. _93b=this.getPfMainOutputCell(_93b);
  12960. while(_93b.previousSibling){
  12961. if(this.moveToTDFromTheRight(_93b.previousSibling)){
  12962. return true;
  12963. }
  12964. _93b=_93b.previousSibling;
  12965. }
  12966. var _93c=_93b.parentNode;
  12967. while(_93c.previousSibling){
  12968. var _93d=_93c.previousSibling;
  12969. if(this.moveToTDFromTheRight(_93d.lastChild)){
  12970. return true;
  12971. }
  12972. _93c=_93c.previousSibling;
  12973. }
  12974. return false;
  12975. };
  12976. ViewerA11YHelper.prototype.moveDown=function(_93e){
  12977. var _93f=ViewerA11YHelper.getTableCell(_93e);
  12978. _93f=this.getPfMainOutputCell(_93f);
  12979. var _940=this.getColumnIndex(_93f);
  12980. _940+=this.getColSpanFromRowSpans(_93f);
  12981. var _941=_93f.parentNode;
  12982. if(_93f.rowSpan&&_93f.rowSpan>1){
  12983. var _942=_93f.rowSpan;
  12984. for(var _943=1;_943<_942;_943++){
  12985. _941=_941.nextSibling;
  12986. }
  12987. }
  12988. var _944=false;
  12989. while(_941){
  12990. if(_941.nextSibling){
  12991. _941=_941.nextSibling;
  12992. }else{
  12993. if(_93f.nextSibling&&!_944){
  12994. _941=_941.parentNode.firstChild;
  12995. _944=true;
  12996. _940++;
  12997. }else{
  12998. return false;
  12999. }
  13000. }
  13001. if(this.doMoveUpDown(_941,_940)){
  13002. return true;
  13003. }
  13004. }
  13005. return false;
  13006. };
  13007. ViewerA11YHelper.prototype.moveUp=function(_945){
  13008. var _946=ViewerA11YHelper.getTableCell(_945);
  13009. _946=this.getPfMainOutputCell(_946);
  13010. var _947=_946.parentNode;
  13011. var _948=this.getColumnIndex(_946);
  13012. _948+=this.getColSpanFromRowSpans(_946);
  13013. var _949=false;
  13014. while(_947){
  13015. if(_947.previousSibling){
  13016. _947=_947.previousSibling;
  13017. }else{
  13018. if(_946.previousSibling&&!_949){
  13019. _947=_947.parentNode.lastChild;
  13020. _949=true;
  13021. _948--;
  13022. }else{
  13023. return false;
  13024. }
  13025. }
  13026. if(this.doMoveUpDown(_947,_948)){
  13027. return true;
  13028. }
  13029. }
  13030. return false;
  13031. };
  13032. ViewerA11YHelper.prototype.getNextNonTextSibling=function(node){
  13033. while(node.nextSibling){
  13034. node=node.nextSibling;
  13035. if(node.nodeName.toLowerCase()!="#text"){
  13036. return node;
  13037. }
  13038. }
  13039. if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
  13040. return this.getNextNonTextSibling(node.parentNode);
  13041. }
  13042. return null;
  13043. };
  13044. ViewerA11YHelper.prototype.doMoveUpDown=function(_94b,_94c){
  13045. if(_94b!=null){
  13046. var _94d=_94b.firstChild;
  13047. var pos=this.getColSpanFromRowSpans(_94d);
  13048. while(_94d){
  13049. if(pos==_94c){
  13050. return this.moveToTDFromTheRight(_94d);
  13051. }else{
  13052. if(pos>_94c){
  13053. break;
  13054. }
  13055. }
  13056. var _94f=0;
  13057. if(_94d.colSpan){
  13058. _94f=_94d.colSpan;
  13059. }else{
  13060. _94f++;
  13061. }
  13062. pos+=_94f;
  13063. _94d=_94d.nextSibling;
  13064. }
  13065. }
  13066. };
  13067. ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){
  13068. td=this.getPfVisibleCell(td);
  13069. var _951=td.childNodes;
  13070. for(var _952=_951.length-1;_952>=0;_952--){
  13071. var node=this.getValidNodeToSelect(_951[_952]);
  13072. if(node){
  13073. if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
  13074. node=node.childNodes[0];
  13075. }
  13076. if(node.tabIndex!=-1&&node.tabIndex!=0){
  13077. node.tabIndex=-1;
  13078. }
  13079. this.setFocusToNode(node);
  13080. return true;
  13081. }
  13082. }
  13083. return false;
  13084. };
  13085. ViewerA11YHelper.prototype.moveToTD=function(td){
  13086. td=this.getPfVisibleCell(td);
  13087. var _955=td.childNodes;
  13088. for(var _956=0;_956<_955.length;_956++){
  13089. var node=this.getValidNodeToSelect(_955[_956]);
  13090. if(node){
  13091. if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
  13092. node=node.childNodes[0];
  13093. }
  13094. if(node.tabIndex!=-1&&node.tabIndex!=0){
  13095. node.tabIndex=-1;
  13096. }
  13097. this.setFocusToNode(node);
  13098. return true;
  13099. }
  13100. }
  13101. return false;
  13102. };
  13103. ViewerA11YHelper.prototype.setFocusToNode=function(node){
  13104. this.m_oCV.setCurrentNodeFocus(node);
  13105. this.updateCellAccessibility(node,false);
  13106. node.focus();
  13107. if(this.m_oCV.m_pinFreezeManager){
  13108. var _959=this.m_oCV.m_pinFreezeManager.nodeToContainer(node);
  13109. if(_959){
  13110. _959.updateScroll(node);
  13111. }
  13112. }
  13113. };
  13114. ViewerA11YHelper.prototype.getPfMainOutputCell=function(_95a){
  13115. var main=null;
  13116. var slid=_95a.getAttribute("pfslid");
  13117. if(slid){
  13118. var lid=PinFreezeContainer.getLidFromSlid(slid);
  13119. if(lid&&this.m_oCV.m_pinFreezeManager){
  13120. lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
  13121. var _95e=this.m_oCV.m_pinFreezeManager.getContainer(lid);
  13122. if(_95e){
  13123. main=_95e.getMain(_95a);
  13124. }
  13125. }
  13126. }
  13127. return main?main:_95a;
  13128. };
  13129. ViewerA11YHelper.prototype.getPreviousNonTextSibling=function(node){
  13130. while(node.previousSibling){
  13131. node=node.previousSibling;
  13132. if(node.nodeName.toLowerCase()!="#text"){
  13133. return node;
  13134. }
  13135. }
  13136. if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
  13137. return this.getPreviousNonTextSibling(node.parentNode);
  13138. }
  13139. return null;
  13140. };
  13141. ViewerA11YHelper.prototype.getColumnIndex=function(node){
  13142. var _961=0;
  13143. while(node.previousSibling){
  13144. node=node.previousSibling;
  13145. if(node.rowSpan==1){
  13146. if(node.colSpan){
  13147. _961+=node.colSpan;
  13148. }else{
  13149. _961++;
  13150. }
  13151. }
  13152. }
  13153. return _961;
  13154. };
  13155. ViewerA11YHelper.prototype.getPfVisibleCell=function(_962){
  13156. var copy=null;
  13157. var slid=_962.getAttribute("pfslid");
  13158. if(slid){
  13159. var lid=PinFreezeContainer.getLidFromSlid(slid);
  13160. if(lid&&this.m_oCV.m_pinFreezeManager){
  13161. lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
  13162. var _966=this.m_oCV.m_pinFreezeManager.getContainer(lid);
  13163. if(_966){
  13164. copy=_966.getCopy(_962);
  13165. }
  13166. }
  13167. }
  13168. return copy?copy:_962;
  13169. };
  13170. ViewerA11YHelper.prototype.updateCellAccessibility=function(_967,_968){
  13171. if(!_967){
  13172. return false;
  13173. }
  13174. var _969=false;
  13175. var _96a=false;
  13176. var _96b=false;
  13177. var _96c=_967.getAttribute("ctx")!=null?_967:_967.parentNode;
  13178. if(_967.getAttribute("flashChartContainer")!="true"){
  13179. if(_96c.getAttribute("ctx")!=null){
  13180. if(this.m_oCV.isBux){
  13181. var _96d=this.m_oCV.getAction("DrillUpDown");
  13182. _96d.updateDrillability(this.m_oCV,_96c);
  13183. _969=_96d.canDrillDown();
  13184. _96a=_96d.canDrillUp();
  13185. }else{
  13186. var _96e=_96c.getAttribute("ctx");
  13187. var _96f=_96e.indexOf(":")==-1?_96e:_96e.substring(0,_96e.indexOf(":"));
  13188. var _970=this.m_oCV.getSelectionController();
  13189. _969=_970.canDrillDown(_96f);
  13190. _96a=_970.canDrillUp(_96f);
  13191. }
  13192. }
  13193. _96b=_967.parentNode.getAttribute("dtTargets")?true:false;
  13194. }
  13195. var _971=_967.nodeName.toLowerCase()=="img";
  13196. var _972=_967.parentNode.getAttribute("type")=="columnTitle";
  13197. if(!_971&&(_968||((_967.getAttribute("aria-labelledby")!=null||_972||this.m_oCV.isAccessibleMode())))){
  13198. var _973="";
  13199. if(_967.parentNode.getAttribute("cc")=="true"){
  13200. _973+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER;
  13201. }
  13202. if(_967.innerHTML.length===0){
  13203. _967.innerHTML="&nbsp;";
  13204. _973+=" "+RV_RES.IDS_JS_EMPTY_CELL;
  13205. }
  13206. if(_969&&_96a){
  13207. _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS;
  13208. }else{
  13209. if(_969){
  13210. _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS;
  13211. }else{
  13212. if(_96a){
  13213. _973+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS;
  13214. }
  13215. }
  13216. }
  13217. if(_96b){
  13218. _973+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS;
  13219. }
  13220. if(_967.altText&&_967.altText.length>0){
  13221. _973=_967.altText;
  13222. }else{
  13223. if(_967.getAttribute("flashChartContainer")=="true"){
  13224. _973=RV_RES.IDS_JS_CHART_IMAGE;
  13225. }
  13226. }
  13227. if(this.m_oCV.isBux){
  13228. var _974=_967.previousSibling;
  13229. if(_974){
  13230. var wid=_974.getAttribute("widgetid");
  13231. if(wid&&wid.indexOf("comment")){
  13232. _973+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS;
  13233. }
  13234. }
  13235. if(_967.getAttribute("rp_name")||_967.parentNode.getAttribute("rp_name")){
  13236. _973+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED;
  13237. }
  13238. if(_967.nextSibling&&_967.nextSibling.getAttribute("class")=="sortIconVisible"){
  13239. _973+=" "+_967.nextSibling.getAttribute("alt");
  13240. }
  13241. }
  13242. if(_973.length>0){
  13243. this.addAriaLabelledByOnCell(_967,_973);
  13244. }
  13245. }
  13246. if(_96a||_969||_96b){
  13247. this.addDrillAccessibilityAttributes(_967,_96b);
  13248. }
  13249. if(_967.attachEvent){
  13250. _967.attachEvent("onblur",this.onBlur);
  13251. }else{
  13252. _967.addEventListener("blur",this.onBlur,false);
  13253. }
  13254. if((isIE()&&_967.getAttribute("tabIndex")!=0)||_971){
  13255. _967.setAttribute("modifiedTabIndex","true");
  13256. _967.setAttribute("oldTabIndex",_967.getAttribute("tabIndex"));
  13257. _967.setAttribute("tabIndex",0);
  13258. }
  13259. };
  13260. ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_976,_977){
  13261. var _978=0;
  13262. var _979=_976;
  13263. while(_979.previousSibling){
  13264. _978++;
  13265. _979=_979.previousSibling;
  13266. }
  13267. var _97a=_976.getAttribute("ariaHiddenSpanId");
  13268. if(_97a&&document.getElementById(_97a)){
  13269. document.getElementById(_97a).innerHTML=_977;
  13270. }else{
  13271. if(!_976.parentNode.id&&!_976.id){
  13272. _976.parentNode.id=Math.random();
  13273. }
  13274. var _97b=document.createElement("span");
  13275. _97b.style.visibility="hidden";
  13276. _97b.style.display="none";
  13277. _97b.id=(_976.id==""?_976.parentNode.id:_976.id)+"_"+_978;
  13278. _97b.innerHTML=_977;
  13279. _976.parentNode.appendChild(_97b);
  13280. var _97c="";
  13281. if(_976.getAttribute("aria-labelledby")!=null){
  13282. _97c+=_976.getAttribute("aria-labelledby");
  13283. }else{
  13284. if(_976.id==""){
  13285. _976.id=_976.parentNode.id+"_main_"+_978;
  13286. }
  13287. _97c+=_976.id;
  13288. }
  13289. _97c+=" "+_97b.id;
  13290. _976.setAttribute("aria-labelledby",_97c);
  13291. _976.setAttribute("ariaHiddenSpanId",_97b.id);
  13292. }
  13293. };
  13294. ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_97d,_97e){
  13295. if(!_97d.getAttribute("oldClassName")){
  13296. if(!_97e){
  13297. _97d.setAttribute("oldClassName",_97d.className);
  13298. _97d.className="dl "+_97d.className;
  13299. }
  13300. if(!_97d.getAttribute("role")){
  13301. _97d.setAttribute("role","link");
  13302. }
  13303. }
  13304. };
  13305. ViewerA11YHelper.prototype.onBlur=function(evt){
  13306. var _980=null;
  13307. if(isIE()){
  13308. _980=getNodeFromEvent(evt,true);
  13309. }else{
  13310. _980=this;
  13311. }
  13312. _980=ViewerA11YHelper.findChildOfTableCell(_980);
  13313. if(_980){
  13314. if(_980.getAttribute("oldClassName")){
  13315. _980.className=_980.getAttribute("oldClassName");
  13316. _980.removeAttribute("oldClassName");
  13317. }
  13318. if(_980.getAttribute("modifiedTabIndex")=="true"){
  13319. _980.removeAttribute("modifiedTabIndex");
  13320. _980.removeAttribute("tabIndex");
  13321. if(_980.getAttribute("oldTabIndex")){
  13322. _980.setAttribute("tabIndex",_980.getAttribute("oldTabIndex"));
  13323. }
  13324. _980.removeAttribute("oldTabIndex");
  13325. }
  13326. var _981=_980.getAttribute("ariaHiddenSpanId");
  13327. if(_981){
  13328. var _982=document.getElementById(_981);
  13329. if(_982){
  13330. _982.innerHTML="";
  13331. }
  13332. }
  13333. }
  13334. };
  13335. ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_983){
  13336. var _984=0;
  13337. var _985=_983.parentNode;
  13338. var _986=0;
  13339. while(_985){
  13340. var _987=_985.firstChild;
  13341. var _988=this.getColumnCount(_985)-_986;
  13342. while(_987&&_987.rowSpan>1&&_988>0&&_987!=_983){
  13343. _984+=_987.colSpan;
  13344. _987=_987.nextSibling;
  13345. _988--;
  13346. }
  13347. if(_985.childNodes.length>_986){
  13348. _986=this.getColumnCount(_985);
  13349. }
  13350. _985=_985.previousSibling;
  13351. }
  13352. return _984;
  13353. };
  13354. ViewerA11YHelper.prototype.getColumnCount=function(_989){
  13355. var _98a=0;
  13356. var node=_989.firstChild;
  13357. while(node){
  13358. _98a+=node.colSpan;
  13359. node=node.nextSibling;
  13360. }
  13361. return _98a;
  13362. };
  13363. ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){
  13364. if(!this.m_oCV.isAccessibleMode()){
  13365. return;
  13366. }
  13367. var _98c=document.getElementById("RVContent"+this.m_oCV.getId());
  13368. if(!_98c){
  13369. return;
  13370. }
  13371. var _98d=getElementsByAttribute(_98c,"span","tabindex","0");
  13372. if(!_98d){
  13373. return;
  13374. }
  13375. for(var i=0;i<_98d.length;i++){
  13376. var span=_98d[i];
  13377. this.updateCellAccessibility(span,false);
  13378. }
  13379. };
  13380. var CV_BACKGROUND_LAYER_ID="CV_BACK";
  13381. if(typeof window.gaRV_INSTANCES=="undefined"){
  13382. window.gaRV_INSTANCES=[];
  13383. }
  13384. if(!window.gViewerLogger){
  13385. window.gViewerLogger={log:function(hint,_991,type){
  13386. },addContextInfo:function(_993){
  13387. }};
  13388. }
  13389. function CognosViewerSession(oCV){
  13390. this.m_sConversation=oCV.getConversation();
  13391. this.m_sParameters=oCV.getExecutionParameters();
  13392. this.m_envParams={};
  13393. applyJSONProperties(this.m_envParams,oCV.envParams);
  13394. this.m_bRefreshPage=false;
  13395. };
  13396. function CCognosViewer(sId,_996){
  13397. if(typeof window.gCognosViewer=="undefined"){
  13398. window.gCognosViewer=this;
  13399. }
  13400. if(typeof ViewerConfig=="function"){
  13401. this.m_viewerConfig=new ViewerConfig();
  13402. try{
  13403. if(typeof window.getViewerConfiguration=="function"){
  13404. this.m_viewerConfig.configure(window.getViewerConfiguration());
  13405. }else{
  13406. if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){
  13407. this.m_viewerConfig.configure(window.parent.getViewerConfiguration());
  13408. }
  13409. }
  13410. }
  13411. catch(e){
  13412. }
  13413. this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig();
  13414. }
  13415. this.m_sActionState="";
  13416. this.m_bKeepSessionAlive=false;
  13417. this.m_undoStack=[];
  13418. this.m_aSecRequests=[];
  13419. this.m_bDebug=false;
  13420. this.m_sCAFContext="";
  13421. this.m_sContextInfoXML="";
  13422. this.m_sConversation="";
  13423. this.m_sStatus="";
  13424. this.m_sGateway=_996;
  13425. this.m_sId=sId;
  13426. this.m_sMetadataInfoXML="";
  13427. this.m_sParameters="";
  13428. this.m_sReportState="";
  13429. this.envParams={};
  13430. this.m_sTracking="";
  13431. this.m_sSoapFault="";
  13432. this.m_sWaitHTML="";
  13433. this.m_oDrillMgr=null;
  13434. this.goDrillManager=null;
  13435. this.m_oWorkingDialog=null;
  13436. this.m_oRequestExecutedIndicator=null;
  13437. this.m_bUseWorkingDialog=true;
  13438. this.m_oSubscriptionManager=null;
  13439. this.m_oCVMgr=null;
  13440. this.m_bUseSafeMode=true;
  13441. if(typeof CViewerManager=="function"){
  13442. this.m_oCVMgr=new CViewerManager(this);
  13443. }
  13444. if(window.gaRV_INSTANCES){
  13445. var _997=false;
  13446. for(var _998=0;_998<window.gaRV_INSTANCES.length;_998++){
  13447. if(window.gaRV_INSTANCES[_998].m_sId==sId){
  13448. window.gaRV_INSTANCES[_998]=this;
  13449. _997=true;
  13450. break;
  13451. }
  13452. }
  13453. if(!_997){
  13454. window.gaRV_INSTANCES=window.gaRV_INSTANCES.concat(this);
  13455. }
  13456. }
  13457. this.m_bReportHasPrompts=false;
  13458. this.m_viewerWidget=null;
  13459. this.m_flashChartsObjectIds=[];
  13460. this.m_raiseSharePromptEvent=true;
  13461. this.m_actionFactory=null;
  13462. this.m_calculationCache={};
  13463. this.m_drillTargets=[];
  13464. this.m_reportRenderingDone=false;
  13465. if(typeof PinFreezeManager!=="undefined"){
  13466. this.m_pinFreezeManager=new PinFreezeManager(this);
  13467. }
  13468. if(typeof ViewerDispatcher!=="undefined"){
  13469. this.m_viewerDispatcher=new ViewerDispatcher();
  13470. }
  13471. this.m_retryDispatcherEntry=null;
  13472. this.m_RAPReportInfo=null;
  13473. if(typeof ViewerState=="function"){
  13474. this.m_viewerState=new ViewerState();
  13475. }
  13476. this.m_aInfoBar=null;
  13477. };
  13478. CCognosViewer.prototype.setScheduledMobileOutput=function(_999){
  13479. this.m_mobileScheduledOutput=_999;
  13480. if(_999){
  13481. this.m_sStatus="complete";
  13482. }
  13483. };
  13484. CCognosViewer.prototype.setTabInfo=function(_99a){
  13485. this.m_tabsPayload=_99a;
  13486. if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
  13487. var _99b=false;
  13488. for(var i=0;i<this.m_tabsPayload.tabs.length;i++){
  13489. var tab=this.m_tabsPayload.tabs[i];
  13490. if(tab.id==this._keepTabSelected){
  13491. this.m_tabsPayload.currentTabId=this._keepTabSelected;
  13492. break;
  13493. }
  13494. }
  13495. this._keepTabSelected=null;
  13496. }
  13497. };
  13498. CCognosViewer.prototype.setKeepTabSelected=function(_99e){
  13499. this._keepTabSelected=_99e;
  13500. };
  13501. CCognosViewer.prototype.getTabController=function(){
  13502. return this.m_tabControl;
  13503. };
  13504. CCognosViewer.prototype.getCurrentlySelectedTab=function(){
  13505. return this.m_currentlySelectedTab?this.m_currentlySelectedTab:null;
  13506. };
  13507. CCognosViewer.prototype.deleteTabs=function(){
  13508. if(this.m_tabControl){
  13509. this.m_tabControl.destroy();
  13510. delete this.m_tabControl;
  13511. this.m_tabControl=null;
  13512. }
  13513. this.m_tabsPayload=null;
  13514. };
  13515. CCognosViewer.prototype.renderTabs=function(){
  13516. if(!this.m_tabsPayload){
  13517. return;
  13518. }
  13519. var _99f=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
  13520. var _9a0=document.getElementById("CVNavLinks"+this.getId());
  13521. if(_9a0||!this.shouldWriteNavLinks()||_99f){
  13522. var _9a1=this.getReportDiv();
  13523. this.m_bHasTabs=true;
  13524. if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_99f){
  13525. this.deleteTabs();
  13526. }
  13527. if(!this.m_tabControl){
  13528. if(this.getStatus()!="complete"&&!_99f){
  13529. return;
  13530. }
  13531. var tr=document.createElement("tr");
  13532. var _9a3=document.createElement("td");
  13533. tr.appendChild(_9a3);
  13534. var _9a4=document.getElementById("mainViewerTR"+this.getId());
  13535. if(!_9a4){
  13536. return;
  13537. }
  13538. if(this.m_tabsPayload.position=="topLeft"){
  13539. _9a4.parentNode.insertBefore(tr,_9a4);
  13540. }else{
  13541. _9a4.parentNode.appendChild(tr);
  13542. }
  13543. var _9a5=null;
  13544. if(this.m_viewerWidget){
  13545. _9a5=this.m_viewerWidget.findContainerDiv().firstChild;
  13546. }else{
  13547. _9a5=_9a3;
  13548. }
  13549. var oCV=this;
  13550. if(_99f){
  13551. this.m_tabControl=new CognosTabControl(_9a5,function(_9a7){
  13552. oCV.switchSavedOutputTab(_9a7,true);
  13553. });
  13554. this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
  13555. }else{
  13556. this.m_tabControl=new CognosTabControl(_9a5,function(_9a8){
  13557. oCV.switchTabs(_9a8);
  13558. });
  13559. }
  13560. if(this.m_viewerWidget){
  13561. this.m_tabControl.setSpaceSaverContainer(_9a3);
  13562. this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
  13563. this.m_tabControl.useAbsolutePosition(true);
  13564. }
  13565. this.m_tabControl.setIsSavedOutput(_99f);
  13566. if(!window.gScriptLoader.m_bScriptLoaderCalled){
  13567. var _9a9=document.getElementById("RVContent"+this.getId());
  13568. var _9aa=this._getNodesWithViewerId(_9a9,"link",null);
  13569. for(var i=0;i<_9aa.length;i++){
  13570. window.gScriptLoader.moveLinks(_9aa[i]);
  13571. }
  13572. window.gScriptLoader.loadStyles(_9a9,this.getId());
  13573. this.repaintDiv(_9a9);
  13574. }
  13575. }
  13576. if(this.getStatus()=="prompting"){
  13577. this.previouslySelectedTab=null;
  13578. this.m_tabControl.hide();
  13579. }else{
  13580. if(this.isHighContrast()){
  13581. this.m_tabControl.setHighContrast(true);
  13582. }
  13583. this.m_tabControl.render(this.m_tabsPayload);
  13584. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  13585. if(this.m_switchingToTabId&&this.m_currentlySelectedTab!=this.m_switchingToTabId){
  13586. this._removeTabContent(_9a1.parentNode,this.m_switchingToTabId);
  13587. this._removeTabContent(_9a1.parentNode,this.m_currentlySelectedTab);
  13588. if(_9a0){
  13589. this._removeTabContent(_9a0.parentNode,this.m_switchingToTabId);
  13590. this._removeTabContent(_9a0.parentNode,this.m_currentlySelectedTab);
  13591. }
  13592. this.m_tabInfo={};
  13593. }
  13594. this.m_switchingToTabId=null;
  13595. _9a1.setAttribute("tabId",this.m_currentlySelectedTab);
  13596. if(_9a0){
  13597. _9a0.setAttribute("tabId",this.m_currentlySelectedTab);
  13598. }
  13599. if(isIE()&&_99f&&window.resizeIFrame&&!this.m_viewerFragment&&!this.m_viewerWidget){
  13600. window.resizeIFrame();
  13601. }
  13602. }
  13603. this.setMaxContentSize();
  13604. }else{
  13605. var obj=this;
  13606. setTimeout(function(){
  13607. obj.renderTabs();
  13608. },100);
  13609. }
  13610. };
  13611. CCognosViewer.prototype.cancelTabSwitch=function(){
  13612. var _9ad=this.getReportDiv();
  13613. var _9ae=this.m_switchingToTabId;
  13614. this.m_currentlySelectedTab=_9ae;
  13615. this.m_tabControl.selectTab(this.previouslySelectedTab,false);
  13616. this.switchTabs(this.previouslySelectedTab);
  13617. if(_9ad){
  13618. _9ad.parentNode.removeChild(_9ad);
  13619. }
  13620. if(this.m_tabInfo[this.m_currentlySelectedTab]&&this.m_tabInfo[this.m_currentlySelectedTab].styles){
  13621. this._addTabStylesToHead(this.m_tabInfo[this.m_currentlySelectedTab].styles);
  13622. }
  13623. this.previouslySelectedTab=null;
  13624. this.m_tabInfo[_9ae]=null;
  13625. };
  13626. CCognosViewer.prototype.switchSavedOutputTab=function(_9af,_9b0){
  13627. var _9b1=this.getSelectionController();
  13628. if(_9b1){
  13629. _9b1.clearSelectedObjects();
  13630. }
  13631. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  13632. if(_9b0){
  13633. this.notifyTabChange(_9af);
  13634. }
  13635. if(this.m_viewerWidget){
  13636. this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_9af,_9b0);
  13637. this.getTabController().resetPosition();
  13638. }else{
  13639. if(!this.savedOutputTabNodes){
  13640. var _9b2=document.getElementById("CVIFrame"+this.getId());
  13641. this.savedOutputTabNodes=getElementsByAttribute(_9b2.contentWindow.document.body,"*","tabid");
  13642. }
  13643. if(!this.savedOutputTabNodes){
  13644. return;
  13645. }
  13646. for(var i=0;i<this.savedOutputTabNodes.length;i++){
  13647. var _9b4=this.savedOutputTabNodes[i];
  13648. _9b4.style.display=_9b4.getAttribute("tabid")==_9af?"":"none";
  13649. }
  13650. this.setMaxContentSize();
  13651. }
  13652. };
  13653. CCognosViewer.prototype.notifyTabChange=function(_9b5){
  13654. };
  13655. CCognosViewer.prototype._getNodesWithViewerId=function(_9b6,_9b7,id){
  13656. var _9b9=[];
  13657. var _9ba=_9b6.getElementsByTagName(_9b7);
  13658. for(var i=0;i<_9ba.length;i++){
  13659. var node=_9ba[i];
  13660. if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
  13661. node.parentNode.removeChild(node);
  13662. _9b9.push(node);
  13663. i--;
  13664. }
  13665. }
  13666. return _9b9;
  13667. };
  13668. CCognosViewer.prototype._removeTabStylesFromHead=function(){
  13669. var id=this.getId();
  13670. return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
  13671. };
  13672. CCognosViewer.prototype._addTabStylesToHead=function(_9be){
  13673. if(!_9be){
  13674. return;
  13675. }
  13676. for(var i=0;i<_9be.length;i++){
  13677. document.getElementsByTagName("head").item(0).appendChild(_9be[i]);
  13678. }
  13679. };
  13680. CCognosViewer.prototype.switchTabs=function(_9c0){
  13681. if(this.m_currentlySelectedTab==_9c0){
  13682. return;
  13683. }
  13684. var _9c1=this.getSelectionController();
  13685. if(_9c1){
  13686. _9c1.clearSelectedObjects();
  13687. }
  13688. var _9c2=this.getReportDiv();
  13689. this.m_nReportDiv=null;
  13690. var _9c3=_9c2.clientHeight;
  13691. _9c2.removeAttribute("id");
  13692. _9c2.style.display="none";
  13693. if(!this.m_tabInfo){
  13694. this.m_tabInfo={};
  13695. }
  13696. var _9c4=this._removeTabStylesFromHead();
  13697. var _9c5=this.getSelectionController().getCCDManager();
  13698. this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_9c5.getClonedMetadataArray(),"contextdata":_9c5.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_9c4,"hasPromptControl":this.getHasPrompts()};
  13699. var _9c6=this._findChildWithTabId(_9c2.parentNode,_9c0);
  13700. this.previouslySelectedTab=this.m_currentlySelectedTab;
  13701. if(_9c6&&this.m_tabInfo[_9c0]&&this.m_tabInfo[_9c0].hasPromptControl){
  13702. if(_9c6){
  13703. _9c6.parentNode.removeChild(_9c6);
  13704. _9c6=null;
  13705. }
  13706. delete this.m_tabInfo[_9c0];
  13707. this.m_tabInfo[_9c0]=null;
  13708. }
  13709. if(_9c6){
  13710. this.m_currentlySelectedTab=_9c0;
  13711. _9c6.style.display="block";
  13712. _9c6.setAttribute("id","CVReport"+this.getId());
  13713. if(this.m_tabInfo&&this.m_tabInfo[_9c0]){
  13714. var _9c7=this.m_tabInfo[_9c0];
  13715. if(_9c7.conversation){
  13716. this.setConversation(_9c7.conversation);
  13717. }
  13718. if(_9c7.metadata){
  13719. _9c5.SetMetadata(_9c7.metadata);
  13720. }
  13721. if(_9c7.contextdata){
  13722. _9c5.SetContextData(_9c7.contextdata);
  13723. }
  13724. if(_9c7.secondaryRequests){
  13725. this.setSecondaryRequests(_9c7.secondaryRequests);
  13726. }
  13727. if(_9c7.styles){
  13728. this._addTabStylesToHead(_9c7.styles);
  13729. }
  13730. this.setHasPrompts(_9c7.hasPromptControl);
  13731. }
  13732. if(this.shouldWriteNavLinks()){
  13733. this.writeNavLinks(this.getSecondaryRequests().join(" "));
  13734. }
  13735. if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
  13736. this.getPinFreezeManager().rePaint();
  13737. if(isIE()){
  13738. var _9c8=document.getElementById("RVContent"+this.getId());
  13739. this.repaintDiv(_9c8);
  13740. }
  13741. }
  13742. if(this.m_viewerWidget){
  13743. this.m_viewerWidget.placeTabControlInView();
  13744. }
  13745. this._keepFocus=null;
  13746. this.doneLoadingUpdateA11Y("complete");
  13747. this.getTabController().resetPosition();
  13748. this.setMaxContentSize();
  13749. }else{
  13750. this.m_switchingToTabId=_9c0;
  13751. var _9c9=_9c2.cloneNode(false);
  13752. _9c9.style.display="block";
  13753. _9c9.setAttribute("id","CVReport"+this.getId());
  13754. _9c9.removeAttribute("tabId");
  13755. _9c2.parentNode.appendChild(_9c9);
  13756. _9c9.innerHTML="<table height='"+_9c3+"px'><tr><td height='100%'></td></tr></table>";
  13757. var _9ca=new ViewerDispatcherEntry(this);
  13758. _9ca.addFormField("ui.action","reportAction");
  13759. _9ca.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_9c0);
  13760. if(this.m_viewerWidget){
  13761. this.m_viewerWidget.placeTabControlInView();
  13762. }
  13763. this.dispatchRequest(_9ca);
  13764. }
  13765. };
  13766. CCognosViewer.prototype._removeTabContent=function(_9cb,_9cc){
  13767. var _9cd=this._findChildWithTabId(_9cb,_9cc);
  13768. while(_9cd){
  13769. _9cd.parentNode.removeChild(_9cd);
  13770. _9cd=this._findChildWithTabId(_9cb,_9cc);
  13771. }
  13772. };
  13773. CCognosViewer.prototype._findChildWithTabId=function(_9ce,_9cf){
  13774. var _9d0=null;
  13775. for(var i=0;i<_9ce.childNodes.length;i++){
  13776. var _9d2=_9ce.childNodes[i];
  13777. if(_9d2.getAttribute("tabId")==_9cf){
  13778. _9d0=_9d2;
  13779. break;
  13780. }
  13781. }
  13782. return _9d0;
  13783. };
  13784. CCognosViewer.prototype.clearTabs=function(){
  13785. if(!this.m_bHasTabs){
  13786. return;
  13787. }
  13788. this.m_tabInfo={};
  13789. var _9d3=this.getReportDiv();
  13790. var _9d4=_9d3.parentNode;
  13791. for(var i=0;i<_9d4.childNodes.length;i++){
  13792. var node=_9d4.childNodes[i];
  13793. if(node.getAttribute("id")!="CVReport"+this.m_sId){
  13794. _9d4.removeChild(node);
  13795. i--;
  13796. }
  13797. }
  13798. };
  13799. CCognosViewer.prototype.isSavedOutput=function(){
  13800. var _9d7=this.envParams["ui.action"];
  13801. return _9d7==="view"||_9d7==="buxView";
  13802. };
  13803. CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_9d9,_9da){
  13804. var _9db=document.getElementById("CVReport"+this.getId());
  13805. var _9dc=document.createElement("iframe");
  13806. _9dc.style.width="100%";
  13807. _9dc.style.height="99%";
  13808. _9dc.id="CVIFrame"+this.getId();
  13809. _9dc.title=_9d9;
  13810. _9dc.setAttribute("frameBorder","0");
  13811. _9db.appendChild(_9dc);
  13812. var obj=this;
  13813. var func=function(){
  13814. obj.renderTabs();
  13815. };
  13816. setTimeout(function(){
  13817. if(_9da){
  13818. if(_9dc.attachEvent){
  13819. _9dc.attachEvent("onload",func);
  13820. }else{
  13821. _9dc.addEventListener("load",func,true);
  13822. }
  13823. }
  13824. _9dc.src=url;
  13825. },1);
  13826. };
  13827. CCognosViewer.prototype.updatePageState=function(_9df){
  13828. if(_9df&&this.getState()){
  13829. this.getState().setPageState(_9df);
  13830. }
  13831. };
  13832. CCognosViewer.prototype.getPageInfo=function(){
  13833. if(this.m_viewerState&&this.m_viewerState.getPageState()){
  13834. var _9e0=this.m_viewerState.getPageState();
  13835. return {"currentPage":_9e0.getCurrentPage(),"pageCount":_9e0.getPageCount()};
  13836. }
  13837. return {};
  13838. };
  13839. CCognosViewer.prototype.isIWidgetMobile=function(){
  13840. return this.m_viewerWidget&&this.m_viewerWidget.isMobile();
  13841. };
  13842. CCognosViewer.prototype.isInteractiveViewer=function(){
  13843. return false;
  13844. };
  13845. CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){
  13846. if(this.isIWidgetMobile()){
  13847. this.m_viewerWidget.launchGotoPageForIWidgetMobile(form);
  13848. return true;
  13849. }
  13850. return false;
  13851. };
  13852. CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){
  13853. if(this.isIWidgetMobile()){
  13854. this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form);
  13855. return true;
  13856. }
  13857. return false;
  13858. };
  13859. CCognosViewer.prototype.getState=function(){
  13860. return this.m_viewerState;
  13861. };
  13862. CCognosViewer.prototype.getConfig=function(){
  13863. return this.m_viewerConfig;
  13864. };
  13865. CCognosViewer.prototype.getUIConfig=function(){
  13866. return this.m_viewerUIConfig;
  13867. };
  13868. CCognosViewer.prototype.setCurrentNodeFocus=function(node){
  13869. this.m_currentNodeFocus=node;
  13870. };
  13871. CCognosViewer.prototype.getCurrentNodeFocus=function(node){
  13872. return this.m_currentNodeFocus;
  13873. };
  13874. CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){
  13875. this.m_CurrentPromptControlFocus=node;
  13876. };
  13877. CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){
  13878. return this.m_CurrentPromptControlFocus;
  13879. };
  13880. CCognosViewer.prototype.loadExtra=function(){
  13881. };
  13882. CCognosViewer.prototype.setRetryDispatcherEntry=function(_9e7){
  13883. this.m_retryDispatcherEntry=_9e7;
  13884. };
  13885. CCognosViewer.prototype.getRetryDispatcherEntry=function(){
  13886. return this.m_retryDispatcherEntry;
  13887. };
  13888. CCognosViewer.prototype.resetViewerDispatcher=function(){
  13889. if(this.m_viewerDispatcher!==null){
  13890. delete this.m_viewerDispatcher;
  13891. this.m_viewerDispatcher=new ViewerDispatcher();
  13892. }
  13893. };
  13894. CCognosViewer.prototype.getViewerDispatcher=function(){
  13895. return this.m_viewerDispatcher;
  13896. };
  13897. CCognosViewer.prototype.setFaultDispatcherEntry=function(_9e8){
  13898. this.m_faultDispatcherEntry=_9e8;
  13899. };
  13900. CCognosViewer.prototype.getFaultDispatcherEntry=function(){
  13901. return this.m_faultDispatcherEntry;
  13902. };
  13903. CCognosViewer.prototype.dispatchRequest=function(_9e9){
  13904. this.setFaultDispatcherEntry(null);
  13905. this.getViewerDispatcher().dispatchRequest(_9e9);
  13906. };
  13907. CCognosViewer.prototype.getActiveRequest=function(){
  13908. return this.getViewerDispatcher().getActiveRequest();
  13909. };
  13910. CCognosViewer.prototype.getProductLocale=function(){
  13911. if(this.sProductLocale){
  13912. return this.sProductLocale;
  13913. }
  13914. return "en";
  13915. };
  13916. CCognosViewer.prototype.getDirection=function(){
  13917. if(this.sDirection){
  13918. return this.sDirection;
  13919. }
  13920. return "ltr";
  13921. };
  13922. CCognosViewer.prototype.isBidiEnabled=function(){
  13923. if(this.bIsBidiEnabled){
  13924. return true;
  13925. }
  13926. return false;
  13927. };
  13928. CCognosViewer.prototype.getBaseTextDirection=function(){
  13929. if(this.isBidiEnabled()){
  13930. if(this.sBaseTextDirection){
  13931. return this.sBaseTextDirection;
  13932. }
  13933. }
  13934. return "";
  13935. };
  13936. CCognosViewer.prototype.getActionFactory=function(){
  13937. if(!this.m_actionFactory){
  13938. this.m_actionFactory=new ActionFactory(this);
  13939. }
  13940. return this.m_actionFactory;
  13941. };
  13942. CCognosViewer.prototype.getAction=function(_9ea){
  13943. var _9ea=this.getActionFactory().load(_9ea);
  13944. _9ea.setCognosViewer(this);
  13945. return _9ea;
  13946. };
  13947. CCognosViewer.prototype.getCalculationCache=function(){
  13948. return this.m_calculationCache;
  13949. };
  13950. CCognosViewer.prototype.updateOutputForA11ySupport=function(){
  13951. this.updateBorderCollapse();
  13952. if(this.getA11YHelper()){
  13953. this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
  13954. }
  13955. var _9eb=navigator.userAgent.toLowerCase();
  13956. var _9ec=_9eb.indexOf("iphone")!=-1;
  13957. var _9ed=_9eb.indexOf("ipod")!=-1;
  13958. var _9ee=_9eb.indexOf("ipad")!=-1;
  13959. var _9ef=_9ec||_9ed||_9ee;
  13960. var _9f0=_9eb.indexOf("android")!=-1;
  13961. if(_9ef||_9f0){
  13962. document.body.classList.add("clsViewerMobile");
  13963. }
  13964. };
  13965. CCognosViewer.prototype.checkForHighContrast=function(){
  13966. if(this.isBux){
  13967. this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false;
  13968. }else{
  13969. var _9f1=document.createElement("div");
  13970. _9f1.id=this.m_sId+"hc";
  13971. _9f1.style.border="1px solid";
  13972. _9f1.style.borderColor="red green";
  13973. _9f1.style.height="10px";
  13974. _9f1.style.top="-999px";
  13975. _9f1.style.position="absolute";
  13976. document.body.appendChild(_9f1);
  13977. var _9f2=null;
  13978. if(isIE()){
  13979. _9f2=_9f1.currentStyle;
  13980. }else{
  13981. _9f2=_9f1.ownerDocument.defaultView.getComputedStyle(_9f1,null);
  13982. }
  13983. if(!_9f2){
  13984. return;
  13985. }
  13986. this.m_bHighContrast=_9f2.borderTopColor==_9f2.borderRightColor;
  13987. document.body.removeChild(_9f1);
  13988. }
  13989. };
  13990. CCognosViewer.prototype.isHighContrast=function(){
  13991. if(typeof this.m_bHighContrast==="undefined"){
  13992. this.checkForHighContrast();
  13993. }
  13994. return this.m_bHighContrast;
  13995. };
  13996. CCognosViewer.prototype.isLimitedInteractiveMode=function(){
  13997. return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true";
  13998. };
  13999. CCognosViewer.prototype.updateBorderCollapse=function(){
  14000. if(this.isHighContrast()==true){
  14001. var _9f3=null;
  14002. if(this.envParams["ui.action"]=="view"&&!this.isBux){
  14003. var _9f4=document.getElementById("CVIFrame"+this.getId());
  14004. _9f3=_9f4.contentWindow.document;
  14005. }else{
  14006. _9f3=document.getElementById("CVReport"+this.getId());
  14007. }
  14008. var _9f5=_9f3.getElementsByTagName("table");
  14009. for(var i=0;i<_9f5.length;i++){
  14010. if(_9f5[i].style.borderCollapse=="collapse"){
  14011. _9f5[i].style.borderCollapse="separate";
  14012. }
  14013. }
  14014. }
  14015. };
  14016. CCognosViewer.prototype.isAccessibleMode=function(){
  14017. if(this.m_bAccessibleMode==true){
  14018. return true;
  14019. }
  14020. return false;
  14021. };
  14022. CCognosViewer.prototype.isSinglePageReport=function(){
  14023. for(var _9f7 in this.m_aSecRequests){
  14024. if(this.m_aSecRequests[_9f7]=="nextPage"||this.m_aSecRequests[_9f7]=="previousPage"){
  14025. return false;
  14026. }
  14027. }
  14028. return true;
  14029. };
  14030. CCognosViewer.prototype.hasNextPage=function(){
  14031. for(var _9f8 in this.m_aSecRequests){
  14032. if(this.m_aSecRequests[_9f8]=="nextPage"){
  14033. return true;
  14034. }
  14035. }
  14036. return false;
  14037. };
  14038. CCognosViewer.prototype.hasPrevPage=function(){
  14039. for(var _9f9 in this.m_aSecRequests){
  14040. if(this.m_aSecRequests[_9f9]=="previousPage"){
  14041. return true;
  14042. }
  14043. }
  14044. return false;
  14045. };
  14046. CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
  14047. evt=(evt)?evt:((event)?event:null);
  14048. if(evt){
  14049. var node=getNodeFromEvent(evt);
  14050. var _9fc=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
  14051. if((evt.keyCode==8&&_9fc!="input"&&_9fc!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){
  14052. evt.returnValue=false;
  14053. evt.cancelBubble=true;
  14054. if(typeof evt.stopPropagation!="undefined"){
  14055. evt.stopPropagation();
  14056. }
  14057. if(typeof evt.preventDefault!="undefined"){
  14058. evt.preventDefault();
  14059. }
  14060. return false;
  14061. }
  14062. }
  14063. return true;
  14064. };
  14065. CCognosViewer.prototype.setUseWorkingDialog=function(_9fd){
  14066. this.m_bUseWorkingDialog=_9fd;
  14067. };
  14068. CCognosViewer.prototype.getWorkingDialog=function(){
  14069. if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){
  14070. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){
  14071. this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog();
  14072. }else{
  14073. this.m_oWorkingDialog=new WorkingDialog(this);
  14074. }
  14075. }
  14076. return this.m_oWorkingDialog;
  14077. };
  14078. CCognosViewer.prototype.getRequestIndicator=function(){
  14079. if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){
  14080. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){
  14081. this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator();
  14082. }else{
  14083. this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this);
  14084. }
  14085. }
  14086. return this.m_oRequestExecutedIndicator;
  14087. };
  14088. CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){
  14089. if(document.attachEvent){
  14090. document.attachEvent("onkeydown",this.captureHotkeyPageNavigation);
  14091. }else{
  14092. if(document.addEventListener){
  14093. document.addEventListener("keydown",this.captureHotkeyPageNavigation,false);
  14094. }
  14095. }
  14096. };
  14097. CCognosViewer.prototype.setHasPrompts=function(_9fe){
  14098. if(!_9fe){
  14099. this.preProcessControlArray=[];
  14100. }
  14101. this.m_bReportHasPrompts=_9fe;
  14102. };
  14103. CCognosViewer.prototype.getHasPrompts=function(){
  14104. return this.m_bReportHasPrompts;
  14105. };
  14106. CCognosViewer.prototype.setUsePageRequest=function(_9ff){
  14107. this.m_viewerDispatcher.setUsePageRequest(_9ff);
  14108. };
  14109. CCognosViewer.prototype.getUsePageRequest=function(){
  14110. return this.m_viewerDispatcher.getUsePageRequest();
  14111. };
  14112. CCognosViewer.prototype.setKeepSessionAlive=function(_a00){
  14113. this.m_bKeepSessionAlive=_a00;
  14114. };
  14115. CCognosViewer.prototype.getKeepSessionAlive=function(){
  14116. return this.m_bKeepSessionAlive;
  14117. };
  14118. CCognosViewer.prototype.getWebContentRoot=function(){
  14119. if(typeof this.sWebContentRoot!="undefined"){
  14120. return this.sWebContentRoot;
  14121. }else{
  14122. return "..";
  14123. }
  14124. };
  14125. CCognosViewer.prototype.getSkin=function(){
  14126. if(typeof this.sSkin!="undefined"){
  14127. return this.sSkin;
  14128. }else{
  14129. return this.getWebContentRoot()+"/skins/corporate";
  14130. }
  14131. };
  14132. CCognosViewer.prototype.getSelectionController=function(){
  14133. var _a01;
  14134. try{
  14135. _a01=getCognosViewerSCObjectRef(this.m_sId);
  14136. }
  14137. catch(e){
  14138. _a01=null;
  14139. }
  14140. return _a01;
  14141. };
  14142. CCognosViewer.prototype.addCallback=function(_a02,oFct,_a04){
  14143. if(!this.m_aCallback){
  14144. this.m_aCallback=[];
  14145. }
  14146. this.m_aCallback=this.m_aCallback.concat({m_sEvent:_a02,m_oCallback:oFct,m_bCaptureEvent:(_a04===true)});
  14147. };
  14148. CCognosViewer.prototype.canDrillDown=function(sId){
  14149. var sCtx=this.findCtx(sId).split("::")[0];
  14150. if(sCtx){
  14151. var _a07=this.getSelectionController();
  14152. if(_a07){
  14153. return (_a07.canDrillDown(sCtx));
  14154. }
  14155. }
  14156. return false;
  14157. };
  14158. CCognosViewer.prototype.canDrillUp=function(sId){
  14159. var sCtx=this.findCtx(sId).split("::")[0];
  14160. if(sCtx){
  14161. var _a0a=this.getSelectionController();
  14162. if(_a0a){
  14163. return (_a0a.canDrillUp(sCtx));
  14164. }
  14165. }
  14166. return false;
  14167. };
  14168. CCognosViewer.prototype.canSubmitPrompt=function(){
  14169. var _a0b=null;
  14170. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  14171. var _a0c=this.preProcessControlArray.length;
  14172. for(var k=0;k<_a0c;k++){
  14173. _a0b=eval(this.preProcessControlArray[k]);
  14174. if(_a0b.isValid()===false){
  14175. if(!this.m_reportRenderingDone||!_a0b.getCascadeOnParameter||!_a0b.getCascadeOnParameter()){
  14176. return false;
  14177. }
  14178. }
  14179. }
  14180. }
  14181. return true;
  14182. };
  14183. CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
  14184. if(this.rvMainWnd){
  14185. this.rvMainWnd.closeContextMenuAndToolbarMenus();
  14186. }
  14187. };
  14188. CCognosViewer.prototype.dcm=function(_a0e,_a0f){
  14189. if(this.canDisplayContextMenu()){
  14190. if(this.preSelectNode==true){
  14191. _a0f=false;
  14192. this.preSelectNode=false;
  14193. }
  14194. if(this.rvMainWnd.displayContextMenu(_a0e,_a0f)!=false){
  14195. return stopEventBubble(_a0e);
  14196. }
  14197. }
  14198. };
  14199. CCognosViewer.prototype.canDisplayContextMenu=function(){
  14200. if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){
  14201. return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu);
  14202. }
  14203. return false;
  14204. };
  14205. CCognosViewer.prototype.de=function(_a10){
  14206. var _a11=this.getDrillMgr();
  14207. if(_a11){
  14208. _a11.singleClickDrillEvent(_a10,"RV");
  14209. }
  14210. };
  14211. CCognosViewer.prototype.debug=function(sMsg){
  14212. if(this.m_bDebug){
  14213. var _a13="";
  14214. var _a14=this.debug.caller;
  14215. if(typeof _a14=="object"&&_a14!==null){
  14216. _a13=_a14.toString().match(/function (\w*)/)[1];
  14217. }
  14218. if(!_a13){
  14219. _a13="?";
  14220. }
  14221. alert(_a13+": "+sMsg);
  14222. }
  14223. };
  14224. CCognosViewer.prototype.callbackExists=function(_a15){
  14225. var _a16=false;
  14226. if(this.m_aCallback&&this.m_aCallback.length){
  14227. for(var _a17=0;_a17<this.m_aCallback.length;++_a17){
  14228. var oCB=this.m_aCallback[_a17];
  14229. if(oCB.m_sEvent==_a15){
  14230. return true;
  14231. }
  14232. }
  14233. }
  14234. return false;
  14235. };
  14236. CCognosViewer.prototype.executeCallback=function(_a19){
  14237. var _a1a=false;
  14238. if(this.m_aCallback&&this.m_aCallback.length){
  14239. for(var _a1b=0;_a1b<this.m_aCallback.length;++_a1b){
  14240. var oCB=this.m_aCallback[_a1b];
  14241. if(oCB.m_sEvent==_a19){
  14242. if(typeof oCB.m_oCallback=="function"){
  14243. oCB.m_oCallback();
  14244. }
  14245. if(oCB.m_bCaptureEvent){
  14246. _a1a=true;
  14247. }
  14248. }
  14249. }
  14250. }
  14251. return _a1a;
  14252. };
  14253. CCognosViewer.prototype.getCAFContext=function(){
  14254. return this.m_sCAFContext;
  14255. };
  14256. CCognosViewer.prototype.getSoapFault=function(){
  14257. return this.m_sSoapFault;
  14258. };
  14259. CCognosViewer.prototype.getColumnContextIds=function(sId){
  14260. return this.getContextIds(sId,2);
  14261. };
  14262. CCognosViewer.prototype.getConversation=function(){
  14263. return this.m_sConversation;
  14264. };
  14265. CCognosViewer.prototype.getStatus=function(){
  14266. return (this.m_sStatus?this.m_sStatus:"");
  14267. };
  14268. CCognosViewer.prototype.isWorking=function(_a1e){
  14269. if(typeof _a1e!="string"){
  14270. _a1e=this.getStatus();
  14271. }
  14272. return ((""+_a1e).match(/^(working|stillWorking)$/)?true:false);
  14273. };
  14274. CCognosViewer.prototype.isWorkingOrPrompting=function(){
  14275. return (this.getStatus().match(/^(working|stillWorking|prompting)$/)?true:false);
  14276. };
  14277. CCognosViewer.prototype.getActionState=function(){
  14278. return this.m_sActionState;
  14279. };
  14280. CCognosViewer.prototype.getDataItemName=function(sId){
  14281. var _a20=null;
  14282. var sCtx=this.findCtx(sId).split("::")[0];
  14283. if(sCtx){
  14284. var _a22=this.getSelectionController();
  14285. if(_a22){
  14286. var _a23=_a22.getRefDataItem(sCtx);
  14287. if(_a23){
  14288. _a20=_a23;
  14289. }
  14290. }
  14291. }
  14292. return _a20;
  14293. };
  14294. CCognosViewer.prototype.getDataType=function(sId){
  14295. var _a25=null;
  14296. var sCtx=this.findCtx(sId).split("::")[0];
  14297. if(sCtx){
  14298. var _a27=this.getSelectionController();
  14299. if(_a27){
  14300. var _a28=_a27.getDataType(sCtx);
  14301. if(_a28){
  14302. _a25=_a28;
  14303. }
  14304. }
  14305. }
  14306. return _a25;
  14307. };
  14308. CCognosViewer.prototype.getDepth=function(sId){
  14309. var _a2a=null;
  14310. var sCtx=this.findCtx(sId).split("::")[0];
  14311. if(sCtx){
  14312. var _a2c=this.getSelectionController();
  14313. if(_a2c){
  14314. var _a2d=_a2c.getDepth(sCtx);
  14315. if(_a2d){
  14316. _a2a=_a2d;
  14317. }
  14318. }
  14319. }
  14320. return _a2a;
  14321. };
  14322. CCognosViewer.prototype.getDrillMgr=function(){
  14323. if(!this.m_oDrillMgr){
  14324. this.loadExtra();
  14325. if(typeof CDrillManager=="function"){
  14326. this.m_oDrillMgr=new CDrillManager(this);
  14327. this.goDrillManager=this.m_oDrillMgr;
  14328. }
  14329. }
  14330. return this.m_oDrillMgr;
  14331. };
  14332. CCognosViewer.prototype.getSubscriptionManager=function(){
  14333. if(!this.m_oSubscriptionManager){
  14334. this.loadExtra();
  14335. if(typeof CSubscriptionManager=="function"){
  14336. this.m_oSubscriptionManager=new CSubscriptionManager(this);
  14337. }
  14338. }
  14339. return this.m_oSubscriptionManager;
  14340. };
  14341. CCognosViewer.prototype.updateGlobalParameters=function(_a2e){
  14342. var oReq=new ViewerDispatcherEntry(this);
  14343. oReq.addFormField("ui.action","forward");
  14344. oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_a2e);
  14345. oReq.addFormField("run.prompt",true);
  14346. oReq.addFormField("_promptControl","reprompt");
  14347. this.submitPromptValues(oReq);
  14348. };
  14349. CCognosViewer.prototype.getExecutionParameters=function(){
  14350. return this.m_sParameters;
  14351. };
  14352. CCognosViewer.prototype.getGateway=function(){
  14353. return this.m_sGateway;
  14354. };
  14355. CCognosViewer.prototype.getSpecification=function(){
  14356. return this.envParams["ui.spec"];
  14357. };
  14358. CCognosViewer.prototype.getHierarchyUniqueName=function(sId){
  14359. var sHun=null;
  14360. var sCtx=this.findCtx(sId).split("::")[0];
  14361. if(sCtx){
  14362. var _a33=this.getSelectionController();
  14363. if(_a33){
  14364. var aHUN=_a33.getHun(sCtx);
  14365. if(aHUN){
  14366. sHun=aHUN;
  14367. }
  14368. }
  14369. }
  14370. return sHun;
  14371. };
  14372. CCognosViewer.prototype.getDimensionUniqueName=function(sId){
  14373. var sCtx=this.findCtx(sId).split("::")[0];
  14374. if(sCtx){
  14375. var _a37=this.getSelectionController();
  14376. if(_a37){
  14377. var aDUN=_a37.getDun(sCtx);
  14378. if(aDUN){
  14379. return aDUN;
  14380. }
  14381. }
  14382. }
  14383. return null;
  14384. };
  14385. CCognosViewer.prototype.getId=function(){
  14386. return this.m_sId;
  14387. };
  14388. CCognosViewer.prototype.getLevelId=function(sId){
  14389. var _a3a=null;
  14390. var sCtx=this.findCtx(sId).split("::")[0];
  14391. if(sCtx){
  14392. var _a3c=this.getSelectionController();
  14393. if(_a3c){
  14394. var aLUN=_a3c.getLun(sCtx);
  14395. if(aLUN){
  14396. _a3a=aLUN;
  14397. }
  14398. }
  14399. }
  14400. return _a3a;
  14401. };
  14402. CCognosViewer.prototype.getMemberUniqueName=function(sId){
  14403. var sMUN=null;
  14404. var sCtx=this.findCtx(sId).split("::")[0];
  14405. if(sCtx){
  14406. var _a41=this.getSelectionController();
  14407. if(_a41){
  14408. var aMUN=_a41.getMun(sCtx);
  14409. if(aMUN){
  14410. sMUN=aMUN;
  14411. }
  14412. }
  14413. }
  14414. return sMUN;
  14415. };
  14416. CCognosViewer.prototype.getObjectId=function(){
  14417. var _a43="window";
  14418. if(typeof this.getId()=="string"){
  14419. _a43=getCognosViewerObjectRefAsString(this.getId());
  14420. }
  14421. return _a43;
  14422. };
  14423. CCognosViewer.prototype.getQueryModelId=function(sId){
  14424. var _a45=null;
  14425. var sCtx=this.findCtx(sId).split("::")[0];
  14426. if(sCtx){
  14427. var _a47=this.getSelectionController();
  14428. if(_a47){
  14429. var _a48=_a47.getQueryModelId(sCtx);
  14430. if(_a48){
  14431. _a45=_a48;
  14432. }
  14433. }
  14434. }
  14435. return _a45;
  14436. };
  14437. CCognosViewer.prototype.getQueryName=function(sId){
  14438. var _a4a=null;
  14439. var sCtx=this.findCtx(sId).split("::")[0];
  14440. if(sCtx){
  14441. var _a4c=this.getSelectionController();
  14442. if(_a4c){
  14443. var _a4d=_a4c.getRefQuery(sCtx);
  14444. if(_a4d){
  14445. _a4a=_a4d;
  14446. }
  14447. }
  14448. }
  14449. return _a4a;
  14450. };
  14451. CCognosViewer.prototype.getContextIds=function(sId,_a4f){
  14452. var aIds=[];
  14453. var sCtx=this.findCtx(sId);
  14454. if(sCtx){
  14455. var _a52=sCtx.split("::");
  14456. if(_a52&&_a52.length>1&&_a4f<_a52.length){
  14457. aIds=_a52[_a4f].split(":");
  14458. }
  14459. }
  14460. return aIds;
  14461. };
  14462. CCognosViewer.prototype.getRowContextIds=function(sId){
  14463. return this.getContextIds(sId,1);
  14464. };
  14465. CCognosViewer.prototype.getPageContextIds=function(sId){
  14466. return this.getContextIds(sId,3);
  14467. };
  14468. CCognosViewer.prototype.getString=function(sKey){
  14469. if(RV_RES&&RV_RES[sKey]){
  14470. return RV_RES[sKey];
  14471. }
  14472. return sKey;
  14473. };
  14474. CCognosViewer.prototype.getRV=function(){
  14475. if(typeof this.m_oCVMgr=="object"){
  14476. return this.m_oCVMgr;
  14477. }
  14478. return window;
  14479. };
  14480. CCognosViewer.prototype.getSecondaryRequests=function(){
  14481. return this.m_aSecRequests;
  14482. };
  14483. CCognosViewer.prototype.getTracking=function(){
  14484. return this.m_sTracking;
  14485. };
  14486. CCognosViewer.prototype.findCtx=function(sId){
  14487. var sCtx="";
  14488. if(typeof sId=="string"){
  14489. var aCtx=this.getReportContextHelper().processCtx(sId);
  14490. var _a59=aCtx[0][0];
  14491. var _a5a=this.getSelectionController();
  14492. if(_a5a){
  14493. if(_a5a.isContextId(_a59)){
  14494. sCtx=sId;
  14495. }
  14496. }
  14497. }
  14498. if(!sCtx){
  14499. var _a5b=this.findElementWithCtx(sId);
  14500. if(_a5b){
  14501. sCtx=_a5b.getAttribute("ctx");
  14502. }
  14503. }
  14504. return sCtx;
  14505. };
  14506. CCognosViewer.prototype.findElementWithCtx=function(sId){
  14507. var _a5d=sId;
  14508. if(typeof sId=="string"){
  14509. _a5d=this.findElementWithCtx(document.getElementById(sId));
  14510. }
  14511. if(_a5d){
  14512. if(_a5d.getAttribute&&_a5d.getAttribute("ctx")){
  14513. return _a5d;
  14514. }
  14515. for(var _a5e=0;_a5e<_a5d.childNodes.length;_a5e++){
  14516. var _a5f=this.findElementWithCtx(_a5d.childNodes[_a5e]);
  14517. if(_a5f){
  14518. return _a5f;
  14519. }
  14520. }
  14521. }
  14522. return null;
  14523. };
  14524. CCognosViewer.prototype.getUseValue=function(sId){
  14525. var sVal=null;
  14526. var sCtx=this.findCtx(sId).split("::")[0];
  14527. if(sCtx){
  14528. var _a63=this.getSelectionController();
  14529. if(_a63){
  14530. sVal=_a63.getUseValue(sCtx);
  14531. }
  14532. }
  14533. return sVal;
  14534. };
  14535. CCognosViewer.prototype.init=function(_a64){
  14536. if(_a64&&typeof _a64=="object"){
  14537. for(var _a65 in _a64){
  14538. this[_a65]=_a64[_a65];
  14539. }
  14540. }
  14541. };
  14542. CCognosViewer.prototype.initViewer=function(_a66){
  14543. var _a67=new RequestHandler(this);
  14544. var _a68=document.getElementById("formBackJax"+this.getId());
  14545. if(_a68&&typeof _a68.state!="undefined"&&_a68.state.value.length>0){
  14546. _a67.loadReportHTML(_a68.result.value);
  14547. var _a69=eval("("+_a68.state.value+")");
  14548. _a67.updateViewerState(_a69);
  14549. _a67.postComplete();
  14550. }else{
  14551. if(this.getUsePageRequest()){
  14552. var _a6a=_a66?_a66.m_sStatus:null;
  14553. if(isIE()){
  14554. if(window.location.hash=="#working"){
  14555. window.history.go(-2);
  14556. return;
  14557. }else{
  14558. if(_a6a==="working"||_a6a==="stillWorking"){
  14559. window.location.hash="#working";
  14560. }
  14561. }
  14562. }else{
  14563. if(_a68&&_a68.working){
  14564. if(_a68.working.value=="true"){
  14565. window.history.go(-1);
  14566. return;
  14567. }else{
  14568. if(_a6a==="working"||_a6a==="stillWorking"){
  14569. _a68.working.value="true";
  14570. }
  14571. }
  14572. }
  14573. }
  14574. }
  14575. _a67.processInitialResponse(_a66);
  14576. }
  14577. };
  14578. CCognosViewer.prototype.saveBackJaxInformation=function(_a6b){
  14579. var _a6c=document.getElementById("formBackJax"+this.getId());
  14580. if(_a6c){
  14581. if(typeof _a6c.state!="undefined"){
  14582. _a6c.state.value=_a6b.getResponseStateText();
  14583. }
  14584. if(typeof _a6c.result!="undefined"){
  14585. _a6c.result.value=_a6b.getResult();
  14586. }
  14587. }
  14588. };
  14589. CCognosViewer.prototype.pcc=function(evt){
  14590. if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
  14591. this.preSelectNode=true;
  14592. var _a6e=this.getSelectionController();
  14593. if(_a6e){
  14594. _a6e.pageContextClicked(evt);
  14595. }
  14596. }
  14597. };
  14598. CCognosViewer.prototype.isValidAjaxResponse=function(_a6f){
  14599. return (_a6f&&_a6f.childNodes&&_a6f.childNodes.length>0&&_a6f.childNodes[0].nodeName!="parsererror"?true:false);
  14600. };
  14601. CCognosViewer.prototype.resubmitInSafeMode=function(_a70){
  14602. if(this.m_bUseSafeMode){
  14603. this.resetViewerDispatcher();
  14604. this.setUsePageRequest(true);
  14605. this.envParams["cv.useAjax"]="false";
  14606. if(_a70){
  14607. _a70.retryRequest();
  14608. }
  14609. }
  14610. };
  14611. CCognosViewer.prototype.showLoadedContent=function(_a71){
  14612. if(_a71!==null&&typeof _a71!="undefined"){
  14613. _a71.style.display="block";
  14614. }
  14615. this.m_resizeReady=true;
  14616. this.doneLoading();
  14617. var obj=this;
  14618. setTimeout(function(){
  14619. obj.renderTabs();
  14620. },1);
  14621. };
  14622. CCognosViewer.prototype.doneLoading=function(){
  14623. var _a73=this.getViewerWidget();
  14624. if(_a73){
  14625. if(window.IBM&&window.IBM.perf){
  14626. window.IBM.perf.log("viewer_doneLoading",this);
  14627. }
  14628. var _a74=this.getStatus();
  14629. if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
  14630. var _a75=_a74=="working"||_a74=="stillWorking"||_a74=="fault";
  14631. _a73.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_a75});
  14632. if(_a74=="complete"){
  14633. if(window.IBM&&window.IBM.perf){
  14634. window.IBM.perf.log("viewer_doneLoading",this);
  14635. }
  14636. if(typeof _a73.postLoadContent=="function"){
  14637. _a73.postLoadContent();
  14638. }
  14639. this.m_reportRenderingDone=true;
  14640. if(!_a75){
  14641. var _a76=this;
  14642. setTimeout(function(){
  14643. _a76.m_readyToRespondToResizeEvent=true;
  14644. },20);
  14645. }
  14646. }
  14647. }
  14648. if(_a74!="fault"){
  14649. _a73.clearErrorDlg();
  14650. }
  14651. this.doneLoadingUpdateA11Y(_a74);
  14652. }else{
  14653. var _a74=this.getStatus();
  14654. if(_a74=="complete"){
  14655. this.m_reportRenderingDone=true;
  14656. this.JAWSTalk(RV_RES.IDS_JS_READY);
  14657. }else{
  14658. if(_a74=="working"){
  14659. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  14660. }
  14661. }
  14662. }
  14663. };
  14664. CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_a77){
  14665. if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
  14666. var _a78=this.getKeepFocus();
  14667. if(_a77=="complete"){
  14668. this.setKeepFocus(false);
  14669. }
  14670. var _a79=null;
  14671. if(this.getVisibleDialog()!==null){
  14672. _a79=this.getVisibleDialog().getDialogDiv();
  14673. }else{
  14674. if(_a78===true){
  14675. _a79=document.getElementById("CVReport"+this.getId());
  14676. }else{
  14677. if(typeof _a78=="string"){
  14678. _a79=document.getElementById(_a78);
  14679. }else{
  14680. if(_a78!==null){
  14681. _a79=_a78;
  14682. if(this.isBux){
  14683. dojo.window.scrollIntoView(_a79);
  14684. }
  14685. }
  14686. }
  14687. }
  14688. }
  14689. if(_a79){
  14690. setFocusToFirstTabItem(_a79);
  14691. }
  14692. if(_a77=="complete"){
  14693. this.JAWSTalk(RV_RES.IDS_JS_READY);
  14694. }else{
  14695. if(_a77=="working"||_a77=="stillWorking"){
  14696. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  14697. }
  14698. }
  14699. }
  14700. };
  14701. CCognosViewer.prototype.JAWSTalk=function(_a7a){
  14702. if(this.isMobile()||this.isIWidgetMobile()){
  14703. return;
  14704. }
  14705. var id=this.getId();
  14706. var div=document.getElementById("JAWS_Alert_"+id);
  14707. if(div){
  14708. div.parentNode.removeChild(div);
  14709. }
  14710. div=document.createElement("div");
  14711. div.id="JAWS_Alert_"+id;
  14712. div.style.position="absolute";
  14713. div.style.top="-9000px";
  14714. div.style.display="none";
  14715. div.setAttribute("role","alert");
  14716. div.appendChild(document.createTextNode(_a7a));
  14717. var _a7d=document.getElementById("RVContent"+id);
  14718. if(_a7d){
  14719. _a7d.appendChild(div);
  14720. }else{
  14721. if(typeof console!="undefined"&&console&&console.log){
  14722. console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert.");
  14723. }
  14724. }
  14725. };
  14726. CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){
  14727. if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){
  14728. return false;
  14729. }
  14730. var _a7e=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
  14731. if(_a7e===null){
  14732. return false;
  14733. }
  14734. var _a7f=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
  14735. return (_a7e.toLowerCase()==="on"&&_a7f!==false)||(_a7e.toLowerCase()==="off"&&_a7f===true);
  14736. };
  14737. CCognosViewer.prototype.setMaxContentSize=function(){
  14738. if("10"!=window.getIEVersion()){
  14739. return;
  14740. }
  14741. if(document.body.className==="viewer"){
  14742. var _a80=document.body.offsetHeight;
  14743. var _a81=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
  14744. var _a82=document.getElementById("mainViewerTable"+this.getId());
  14745. _a82.style.maxHeight=_a80-_a81-2+"px";
  14746. var _a83=GUtil.generateCallback(this.setMaxContentSize,[true],this);
  14747. if(!this.attachedOnResize){
  14748. this.attachedOnResize=true;
  14749. if(window.attachEvent){
  14750. window.attachEvent("onresize",_a83);
  14751. }else{
  14752. if(window.addEventListener){
  14753. window.addEventListener("resize",_a83,false);
  14754. }
  14755. }
  14756. }
  14757. }
  14758. };
  14759. CCognosViewer.prototype.getNonReportHeight=function(node){
  14760. var _a85=0;
  14761. var _a86=node.parentNode;
  14762. if(!_a86){
  14763. return _a85;
  14764. }
  14765. if(_a86.childNodes.length>1){
  14766. for(var i=0;i<_a86.childNodes.length;i++){
  14767. var _a88=_a86.childNodes[i];
  14768. if(_a88!=node&&!isNaN(_a88.clientHeight)&&_a88.style.display!="none"){
  14769. _a85+=_a88.clientHeight;
  14770. }
  14771. }
  14772. }
  14773. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  14774. _a85+=this.getNonReportHeight(_a86);
  14775. }
  14776. return _a85;
  14777. };
  14778. CCognosViewer.prototype.addPageAdornments=function(){
  14779. this.m_layoutElements=null;
  14780. this.m_lidToElement=null;
  14781. this.initFlashCharts();
  14782. this.insertSortIconsForAllLists();
  14783. var _a89=this.getViewerWidget().getProperties();
  14784. if(this.canInsertExpandIconsForAllCrosstabs()){
  14785. this.insertExpandIconsForAllCrosstabs();
  14786. }
  14787. var _a8a=document.getElementById("CVReport"+this.getId());
  14788. if(_a8a){
  14789. var oCV=this;
  14790. setTimeout(function(){
  14791. if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
  14792. oCV.getPinFreezeManager().renderReportWithFrozenContainers(_a8a);
  14793. }
  14794. oCV.addInfoBar();
  14795. },1);
  14796. }
  14797. this.getViewerWidget().reselectSelectionFilterObjects();
  14798. this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
  14799. };
  14800. CCognosViewer.prototype.addFlashChart=function(_a8c){
  14801. this.m_flashChartsObjectIds.push(_a8c);
  14802. };
  14803. CCognosViewer.prototype.flashChartError=function(_a8d){
  14804. var _a8e=this.getViewerWidget();
  14805. var _a8f=_a8e.getProperties();
  14806. _a8f.setProperty("flashCharts",false);
  14807. var _a90=this.getAction("Redraw");
  14808. _a90.isUndoable=function(){
  14809. return false;
  14810. };
  14811. _a90.execute();
  14812. };
  14813. CCognosViewer.prototype.initFlashCharts=function(){
  14814. var _a91=this.getViewerWidget();
  14815. if(this.m_flashChartsObjectIds.length>0){
  14816. var _a92=document.getElementById("rt"+this.getId());
  14817. if(window.addEventListener){
  14818. _a92.addEventListener("mousedown",onFlashChartRightClick,true);
  14819. }else{
  14820. var _a93={};
  14821. var _a94=function(){
  14822. this.releaseCapture();
  14823. };
  14824. var _a95=function(){
  14825. onFlashChartRightClick(event);
  14826. this.setCapture();
  14827. };
  14828. for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
  14829. var _a97=this.m_flashChartsObjectIds[i];
  14830. var _a98=document.getElementById(_a97);
  14831. _a93[_a97]=1;
  14832. _a98.parentNode.onmouseup=_a94;
  14833. _a98.parentNode.onmousedown=_a95;
  14834. }
  14835. if(this.m_flashChartsObjectIds.length>0){
  14836. _a92.attachEvent("oncontextmenu",function(){
  14837. if(_a93[window.event.srcElement.id]){
  14838. return false;
  14839. }
  14840. });
  14841. }
  14842. }
  14843. if(_a91){
  14844. _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
  14845. }
  14846. }else{
  14847. if(_a91){
  14848. _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
  14849. }
  14850. }
  14851. };
  14852. CCognosViewer.prototype.initializeLayoutElements=function(){
  14853. var _a99=document.getElementById("rt"+this.getId());
  14854. var _a9a=getElementsByAttribute(_a99,"*","lid");
  14855. this.m_lidToElement={};
  14856. this.m_layoutElements=[];
  14857. var _a9b=0;
  14858. var _a9c=this.getPinFreezeManager();
  14859. for(var i=0;i<_a9a.length;i++){
  14860. var e=_a9a[i];
  14861. if(!_a9c||!_a9c.getContainerElement(e)||_a9c.isElementInMainOutput(e)){
  14862. this.m_layoutElements[_a9b]=e;
  14863. this.m_lidToElement[e.getAttribute("lid")]=e;
  14864. _a9b++;
  14865. }
  14866. }
  14867. };
  14868. CCognosViewer.prototype.getLayoutElement=function(_a9f){
  14869. if(!this.m_layoutElements){
  14870. this.initializeLayoutElements();
  14871. }
  14872. if(this.m_layoutElements){
  14873. return this.m_layoutElements[_a9f];
  14874. }
  14875. return null;
  14876. };
  14877. CCognosViewer.prototype.getLayoutElementFromLid=function(lid){
  14878. if(!this.m_lidToElement){
  14879. this.initializeLayoutElements();
  14880. }
  14881. return this.m_lidToElement[lid];
  14882. };
  14883. CCognosViewer.prototype.getInfoBars=function(){
  14884. return this.m_aInfoBar?this.m_aInfoBar:null;
  14885. };
  14886. CCognosViewer.prototype.addInfoBar=function(){
  14887. if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){
  14888. return;
  14889. }
  14890. var _aa1=this.getRAPReportInfo();
  14891. if(_aa1){
  14892. var _aa2=document.getElementById("rt"+this.getId());
  14893. this.initializeLayoutElements();
  14894. var _aa3=[];
  14895. this.m_aInfoBar=[];
  14896. for(var _aa4=0;_aa4<this.m_layoutElements.length;++_aa4){
  14897. var _aa5=this.m_layoutElements[_aa4];
  14898. var lid=_aa5.getAttribute("lid");
  14899. if(lid){
  14900. if(lid.indexOf("RAP_NDH_")>-1){
  14901. lid=lid.substring(8);
  14902. }
  14903. lid=lid.substring(0,lid.indexOf(this.getId()));
  14904. }
  14905. var _aa7=_aa1.getContainer(lid);
  14906. if(_aa7&&typeof _aa7.parentContainer=="undefined"){
  14907. var _aa8=this.collectChildContainers(_aa7.container);
  14908. if(this.getPinFreezeManager()){
  14909. oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_aa5);
  14910. _aa5=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_aa5;
  14911. }
  14912. var _aa9=new InfoBar(this,_aa5,_aa7,_aa8,_aa4);
  14913. _aa9.setTimingDetails(_aa1._getEventTimings());
  14914. _aa9.render();
  14915. if(_aa9.hasSomethingRendered()){
  14916. _aa3.push(_aa9.getId());
  14917. }
  14918. this.m_aInfoBar.push(_aa9);
  14919. }
  14920. }
  14921. var _aaa=this.getViewerWidget();
  14922. if(_aaa){
  14923. _aaa.refreshInfoBarRenderedState(_aa3);
  14924. }
  14925. }
  14926. };
  14927. CCognosViewer.prototype.collectChildContainers=function(_aab){
  14928. var _aac=[];
  14929. var _aad=this.getRAPReportInfo();
  14930. if(_aad){
  14931. var _aae=_aad.getContainerCount();
  14932. for(var cidx=0;cidx<_aae;++cidx){
  14933. var _ab0=_aad.getContainerFromPos(cidx);
  14934. if(typeof _ab0.parentContainer!="undefined"&&_ab0.parentContainer==_aab){
  14935. _aac.push(_ab0);
  14936. }
  14937. }
  14938. }
  14939. return _aac;
  14940. };
  14941. CCognosViewer.prototype.addReportInfo=function(){
  14942. var _ab1=this.getViewerWidget();
  14943. if(typeof _ab1==="undefined"||_ab1===null){
  14944. return;
  14945. }
  14946. if(!_ab1.getAttributeValue("originalReport")||this.isIWidgetMobile()){
  14947. return;
  14948. }
  14949. var _ab2=this.envParams["baseReportModificationTime"];
  14950. var _ab3=_ab1.getAttributeValue("baseReportModificationTime");
  14951. if(typeof _ab2!=="undefined"&&typeof _ab3!=="undefined"&&_ab3&&_ab3!="<empty>"&&_ab2!==_ab3){
  14952. var cvid=this.getId();
  14953. var _ab5=document.getElementById("CVReport"+cvid);
  14954. var _ab6=_ab5.parentNode;
  14955. var id="ReportInfo"+cvid;
  14956. var _ab8=document.createElement("div");
  14957. _ab8.setAttribute("id",id+"_container");
  14958. _ab8.setAttribute("cvid",cvid);
  14959. _ab8.className="new-info-indicator BUXNoPrint";
  14960. var _ab9=document.createElement("img");
  14961. var img=null;
  14962. if(this.getDirection()==="rtl"){
  14963. img="/rv/images/action_show_info_rtl.png";
  14964. }else{
  14965. img="/rv/images/action_show_info.png";
  14966. }
  14967. _ab9.src=this.getWebContentRoot()+img;
  14968. _ab9.className="reportInfoIcon";
  14969. _ab9.setAttribute("tabIndex","0");
  14970. _ab9.setAttribute("alt","");
  14971. _ab9.setAttribute("title","");
  14972. _ab9.setAttribute("role","presentation");
  14973. var _abb=RV_RES.IDS_JS_REPORT_INFO_TITLE;
  14974. var _abc=RV_RES.IDS_JS_REPORT_INFO_TEXT;
  14975. var _abd=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
  14976. _ab8.appendChild(_ab9);
  14977. _ab6.insertBefore(_ab8,_ab5);
  14978. this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_ab9,position:["above","below"],title:_abb,text:_abc,linkText:_abd,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
  14979. }
  14980. };
  14981. CCognosViewer.prototype.reportInfoResetReport=function(){
  14982. this.executeAction("ResetToOriginal");
  14983. };
  14984. CCognosViewer.prototype.hideReportInfo=function(){
  14985. var _abe=document.getElementById("ReportInfo"+this.getId()+"_container");
  14986. if(typeof _abe!=="undefined"&&_abe!==null){
  14987. _abe.style.visibility="hidden";
  14988. }
  14989. };
  14990. CCognosViewer.prototype.insertSortIcons=function(){
  14991. var _abf=this.envParams?this.envParams.limitedInteractiveMode:true;
  14992. if(typeof _abf==="undefined"||_abf===true){
  14993. return;
  14994. }
  14995. if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
  14996. this.insertSortIconsForAllLists();
  14997. }
  14998. };
  14999. CCognosViewer.prototype._getContainers=function(_ac0){
  15000. var _ac1=[];
  15001. var _ac2="",_ac3="";
  15002. if(_ac0==="list"){
  15003. _ac2="list";
  15004. _ac3="ls";
  15005. }else{
  15006. if(_ac0==="crosstab"){
  15007. _ac2="crosstab";
  15008. _ac3="xt";
  15009. }
  15010. }
  15011. var _ac4=document.getElementById("CVReport"+this.getId());
  15012. if(this.getRAPReportInfo()){
  15013. var _ac5=this.getRAPReportInfo().getContainerIds(_ac2);
  15014. for(var i=0;i<_ac5.length;++i){
  15015. var _ac7=getElementsByAttribute(_ac4,"table","lid",_ac5[i]+this.getId(),1);
  15016. if(_ac7&&_ac7.length>0){
  15017. _ac1.push(_ac7[0]);
  15018. }
  15019. }
  15020. }else{
  15021. _ac1=getElementsByClassName(_ac4,"table",_ac3);
  15022. }
  15023. return _ac1;
  15024. };
  15025. CCognosViewer.prototype.insertSortIconsForAllLists=function(){
  15026. var _ac8=this._getContainers("list");
  15027. for(var i=0;i<_ac8.length;++i){
  15028. this.insertSortIconsToList(_ac8[i]);
  15029. }
  15030. };
  15031. CCognosViewer.prototype.insertSortIconsToList=function(_aca){
  15032. var _acb=getElementsByAttribute(_aca,"*","type","columnTitle");
  15033. for(var i=0;i<_acb.length;++i){
  15034. var _acd=_acb[i];
  15035. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_acd);
  15036. if(_acd.getAttribute("canSort")!="false"&&_acd.getAttribute("CTNM")===null&&_acd.getAttribute("CC")===null){
  15037. var _ace=false;
  15038. for(var _acf=0;_acf<_acd.childNodes.length;_acf++){
  15039. var _ad0=_acd.childNodes[_acf];
  15040. if(_ad0.nodeName.toLowerCase()=="img"){
  15041. if(_ad0.id&&_ad0.id.indexOf("sortimg")===0){
  15042. _ace=true;
  15043. break;
  15044. }
  15045. var sLid=_ad0.getAttribute("lid");
  15046. if(sLid&&sLid.indexOf("SortIcon")!==-1){
  15047. _acd.removeChild(_ad0);
  15048. break;
  15049. }
  15050. }
  15051. }
  15052. if(!_ace&&this.canInsertSortIcon(_acd)){
  15053. this.insertSortIconToColumnHeader(_acd);
  15054. }
  15055. }
  15056. }
  15057. };
  15058. CCognosViewer.prototype.isDrillBlackListed=function(){
  15059. if(typeof this.m_bDrillBlacklisted=="undefined"){
  15060. this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp");
  15061. }
  15062. return this.m_bDrillBlacklisted;
  15063. };
  15064. CCognosViewer.prototype.isBlacklisted=function(item){
  15065. return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0;
  15066. };
  15067. CCognosViewer.prototype.canInsertSortIcon=function(_ad3){
  15068. var _ad4=_ad3.getAttribute("rp_sort");
  15069. return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_ad4!==undefined&&_ad4!==null&&_ad4.length>0));
  15070. };
  15071. CCognosViewer.prototype.insertSortIconToColumnHeader=function(_ad5){
  15072. if(!_ad5.style.whiteSpace){
  15073. _ad5.style.whiteSpace="nowrap";
  15074. }
  15075. var _ad6=document.createElement("img");
  15076. _ad6.setAttribute("id","sortimg"+Math.random());
  15077. if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
  15078. _ad6.onmouseover=function(){
  15079. this.setAttribute("oldClassName",this.className);
  15080. this.className+=" sortIconOver";
  15081. };
  15082. _ad6.onmouseout=function(){
  15083. this.className=this.getAttribute("oldClassName");
  15084. this.removeAttribute("oldClassName");
  15085. };
  15086. }
  15087. _ad6.src=this.getImgSrc(_ad5);
  15088. var _ad7=this.getSortInfo(_ad5);
  15089. var _ad8=this.getSortOrder(_ad7);
  15090. _ad6.setAttribute("alt",this.getSortAltText(_ad8));
  15091. _ad6.setAttribute("title",this.getSortAltText(_ad8));
  15092. _ad6.className=this.getSortClass(_ad7);
  15093. _ad6.setAttribute("sortOrder",_ad8);
  15094. _ad5.appendChild(_ad6);
  15095. };
  15096. CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_ad9,_ada){
  15097. var _adb=this.getSelectionController();
  15098. var _adc=_adb.hasCalculationMetadata(_ada,[_ada],"crosstab");
  15099. return ((_adb.canDrillDown(_ada)||_ad9.alwaysCanExpandCollapse)&&!_adb.isCalculationOrMeasure(_ada,_adc));
  15100. };
  15101. CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
  15102. var _add=this._getContainers("crosstab");
  15103. var _ade=this;
  15104. var _adf=this.getRAPReportInfo();
  15105. var _ae0=this.getReportContextHelper();
  15106. for(var i=0;i<_add.length;i++){
  15107. var _ae2=_add[i];
  15108. var _ae3=_ae2.getAttribute("lid");
  15109. _ae3=_ae3.substring(0,_ae3.length-this.getId().length);
  15110. var _ae4=getElementsByAttribute(_ae2,["td","th"],"ctnm","true");
  15111. for(var j=0;j<_ae4.length;j++){
  15112. var _ae6=_ae4[j];
  15113. var sCtx=this.findCtx(_ae6);
  15114. var _ae8=_ae0.getDataItemName(sCtx);
  15115. if(_ae8){
  15116. var _ae9=_adf.getItemInfo(_ae3,_ae8);
  15117. var _aea=_ae0.processCtx(sCtx);
  15118. if(this.canInsertShowExpandCollapseIconForNode(_ae9,_aea[0][0])){
  15119. var sMun=_ae0.getMun(sCtx);
  15120. var _aec=sMun&&_ae9.expandedMembers&&_ae9.expandedMembers[sMun]===true;
  15121. var _aed=document.createElement("div");
  15122. _aed.setAttribute("skipSelection","true");
  15123. _aed.className="expandButton "+(_aec?"collapse":"expand");
  15124. _ae6.insertBefore(_aed,_ae6.firstChild);
  15125. var _aee=document.createElement("span");
  15126. _aee.className="expandButtonCaption";
  15127. _aee.innerHTML=(_aec?"[-]":"[+]");
  15128. _aed.appendChild(_aee);
  15129. }
  15130. }
  15131. }
  15132. }
  15133. };
  15134. CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
  15135. var _aef=this._getContainers("crosstab");
  15136. for(var i=0;i<_aef.length;i++){
  15137. var _af1=_aef[i];
  15138. var _af2=_af1.getAttribute("lid");
  15139. _af2=_af2.substring(0,_af2.length-this.getId().length);
  15140. var _af3=getElementsByAttribute(_af1,"td","ctnm","true");
  15141. for(var j=0;j<_af3.length;j++){
  15142. var _af5=_af3[j];
  15143. if(_af5.firstChild.className==="expandButton collapse"||_af5.firstChild.className==="expandButton expand"){
  15144. _af5.removeChild(_af5.firstChild);
  15145. }
  15146. }
  15147. }
  15148. };
  15149. CCognosViewer.prototype.fillInContextData=function(){
  15150. if(!this.isLimitedInteractiveMode()){
  15151. var _af6=document.getElementById("CVReport"+this.getId());
  15152. var _af7=getElementsByClassName(_af6,"table","ls");
  15153. for(var i=0;i<_af7.length;++i){
  15154. var _af9=getElementsByAttribute(_af7[i],"*","type","columnTitle");
  15155. for(var j=0;j<_af9.length;++j){
  15156. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_af9[j]);
  15157. }
  15158. }
  15159. }
  15160. };
  15161. CCognosViewer.prototype.getSortAltText=function(_afb){
  15162. if(_afb==="ascending"){
  15163. return RV_RES.IDS_JS_SORT_ASCENDING;
  15164. }else{
  15165. if(_afb==="descending"){
  15166. return RV_RES.IDS_JS_SORT_DESCENDING;
  15167. }else{
  15168. if(_afb==="nosort"){
  15169. return RV_RES.IDS_JS_NOT_SORTED;
  15170. }
  15171. }
  15172. }
  15173. };
  15174. CCognosViewer.prototype.getSortInfo=function(_afc){
  15175. var _afd=_afc.getAttribute("rp_sort");
  15176. if(_afd){
  15177. _afd=_afd.split(".");
  15178. }
  15179. return _afd;
  15180. };
  15181. CCognosViewer.prototype.getSortClass=function(_afe){
  15182. var _aff="sortIconHidden";
  15183. if(_afe){
  15184. if(_afe[0]==="d"||_afe[0]==="a"){
  15185. _aff="sortIconVisible";
  15186. }
  15187. }
  15188. return _aff;
  15189. };
  15190. CCognosViewer.prototype.getSortOrder=function(_b00){
  15191. var _b01="nosort";
  15192. if(_b00){
  15193. if(_b00[0]==="d"){
  15194. _b01="descending";
  15195. }else{
  15196. if(_b00[0]==="a"){
  15197. _b01="ascending";
  15198. }
  15199. }
  15200. }
  15201. return _b01;
  15202. };
  15203. CCognosViewer.prototype.getImgSrc=function(_b02){
  15204. var _b03=_b02.getAttribute("rp_sort");
  15205. var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_b03);
  15206. return src;
  15207. };
  15208. CCognosViewer.prototype.getSortIconName=function(_b05){
  15209. var _b06="sort_no.gif";
  15210. if(_b05){
  15211. _b05=_b05.split(".");
  15212. if(_b05[0]==="d"){
  15213. _b06="sort_descending.gif";
  15214. }else{
  15215. if(_b05[0]==="a"){
  15216. _b06="sort_ascending.gif";
  15217. }
  15218. }
  15219. }
  15220. return _b06;
  15221. };
  15222. CCognosViewer.prototype.shouldWriteNavLinks=function(){
  15223. if(this.envParams["cv.navlinks"]=="false"){
  15224. return false;
  15225. }else{
  15226. if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){
  15227. if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){
  15228. return true;
  15229. }
  15230. }
  15231. }
  15232. return false;
  15233. };
  15234. CCognosViewer.prototype.isActiveReport=function(){
  15235. if(this.envParams["cv.responseFormat"]==="activeReport"){
  15236. return true;
  15237. }
  15238. return false;
  15239. };
  15240. CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){
  15241. this.m_raiseSharePromptEvent=true;
  15242. };
  15243. CCognosViewer.prototype.resetbHasPromptFlag=function(){
  15244. this.m_bHasPrompt=null;
  15245. };
  15246. CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){
  15247. this.m_raiseSharePromptEvent=false;
  15248. };
  15249. CCognosViewer.prototype.widgetHasPromptParameters=function(){
  15250. var _b07=this.getViewerWidget();
  15251. return (_b07&&_b07.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
  15252. };
  15253. CCognosViewer.prototype.getPromptParametersInfo=function(){
  15254. var _b08=null;
  15255. if(this.widgetHasPromptParameters()){
  15256. _b08="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
  15257. }
  15258. return _b08;
  15259. };
  15260. CCognosViewer.prototype.raisePromptEvent=function(_b09,_b0a,_b0b){
  15261. try{
  15262. var _b0c=this.getViewerWidget();
  15263. _b0c.getWidgetContextManager().raisePromptEvent(_b09,_b0a,_b0a.get("ui.action"),this.getModelPath(),_b0b);
  15264. }
  15265. catch(e){
  15266. }
  15267. };
  15268. CCognosViewer.prototype.getModelPath=function(){
  15269. var _b0d=this.getSelectionController().getModelPathForCurrentSelection();
  15270. if(_b0d){
  15271. return _b0d;
  15272. }else{
  15273. if(this.envParams.modelPath){
  15274. return this.envParams.modelPath;
  15275. }else{
  15276. if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){
  15277. return document.forms["formWarpRequest"+this.getId()].modelPath.value;
  15278. }
  15279. }
  15280. }
  15281. return "";
  15282. };
  15283. CCognosViewer.prototype.setKeepFocus=function(_b0e){
  15284. this._keepFocus=_b0e;
  15285. };
  15286. CCognosViewer.prototype.getKeepFocus=function(){
  15287. if(typeof this._keepFocus!="undefined"){
  15288. return this._keepFocus;
  15289. }
  15290. return false;
  15291. };
  15292. CCognosViewer.prototype.onFocus=function(evt){
  15293. var _b10=this.getA11YHelper();
  15294. if(_b10){
  15295. _b10.onFocus(evt);
  15296. }
  15297. };
  15298. CCognosViewer.prototype.getA11YHelper=function(){
  15299. if(!this.a11yHelper){
  15300. this.loadExtra();
  15301. if(typeof ViewerA11YHelper=="function"){
  15302. this.a11yHelper=new ViewerA11YHelper(this);
  15303. }else{
  15304. if(typeof console!=="undefined"&&console.log){
  15305. console.log("CCognosViewer: Could not create ViewerA11YHelper object.");
  15306. }
  15307. return null;
  15308. }
  15309. }
  15310. return this.a11yHelper;
  15311. };
  15312. CCognosViewer.prototype.onKeyDown=function(evt){
  15313. if(this.getA11YHelper()){
  15314. this.getA11YHelper().onKeyDown(evt);
  15315. }
  15316. };
  15317. CCognosViewer.prototype.updateSkipToReportLink=function(){
  15318. var _b12=this.getStatus();
  15319. var _b13=document.getElementById("cvSkipToReport"+this.getId());
  15320. if(_b13){
  15321. _b13.style.display=_b12=="prompting"?"none":"";
  15322. }
  15323. };
  15324. CCognosViewer.prototype.updateSkipToNavigationLink=function(_b14){
  15325. var _b15=document.getElementById("cvSkipToNavigation"+this.getId());
  15326. if(_b15){
  15327. _b15.style.display=_b14?"none":"";
  15328. }
  15329. };
  15330. CCognosViewer.prototype.pageAction=function(_b16){
  15331. this.setKeepFocus("CVNavLinks"+this.getId());
  15332. var _b17=new ViewerDispatcherEntry(this);
  15333. _b17.addFormField("ui.action",_b16);
  15334. if(this.getCurrentlySelectedTab()){
  15335. _b17.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
  15336. }
  15337. this.dispatchRequest(_b17);
  15338. };
  15339. CCognosViewer.prototype.writeNavLink=function(_b18,_b19,_b1a,_b1b){
  15340. var _b1c="";
  15341. if(_b1a){
  15342. _b1c="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
  15343. if(_b1b){
  15344. _b1c+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
  15345. }else{
  15346. _b1c+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
  15347. }
  15348. _b1c+=">LINK_TEXT</a>&#160;"+"</td>";
  15349. }else{
  15350. _b1c="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">LINK_TEXT&#160;</td>";
  15351. }
  15352. var sImg=this.sSkin+(!_b1a&&_b18.sImgDisabled?_b18.sImgDisabled:_b18.sImg);
  15353. return _b1c.replace(/LINK_REQUEST/g,_b19).replace(/LINK_TEXT/g,_b18.sText).replace(/LINK_IMG/g,sImg);
  15354. };
  15355. CCognosViewer.prototype.loadNavLinks=function(){
  15356. var _b1e=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
  15357. if(_b1e){
  15358. this.init(eval("("+_b1e+")"));
  15359. }
  15360. };
  15361. CCognosViewer.prototype.writeNavLinks=function(sSR,_b20){
  15362. var _b21=document.getElementById("CVNavLinks"+this.getId());
  15363. if(_b21){
  15364. var _b22=document.getElementById("CVNavLinks_Container"+this.getId());
  15365. if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){
  15366. _b21.style.display="none";
  15367. if(_b22){
  15368. _b22.style.display="none";
  15369. }
  15370. this.updateSkipToNavigationLink(true);
  15371. return;
  15372. }
  15373. this.updateSkipToNavigationLink(false);
  15374. if(_b22){
  15375. _b22.style.display="";
  15376. }
  15377. _b21.style.display=(isIE()?"block":"table-cell");
  15378. var _b23="";
  15379. _b23+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
  15380. _b23+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_b20);
  15381. _b23+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_b20);
  15382. _b23+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_b20);
  15383. _b23+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_b20);
  15384. _b23+="</tr></tbody></table>";
  15385. var _b24=document.getElementById("CVNavLinks_label"+this.getId());
  15386. var _b25="";
  15387. if(_b24){
  15388. _b25+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_b24.innerHTML+"</span>";
  15389. }
  15390. _b21.innerHTML=_b25+_b23;
  15391. }else{
  15392. if(this.shouldWriteNavLinks()){
  15393. setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_b20+"\");",100);
  15394. }
  15395. }
  15396. };
  15397. function CVBackgroundLayer_ignoreMouseClick(e){
  15398. if(e.returnValue){
  15399. e.returnValue=false;
  15400. }else{
  15401. if(e.preventDefault){
  15402. e.preventDefault();
  15403. }else{
  15404. return false;
  15405. }
  15406. }
  15407. };
  15408. CCognosViewer.prototype.createTransparentBackgroundLayer=function(){
  15409. this.removeTransparentBackgroundLayer();
  15410. var oBL=document.createElement("div");
  15411. oBL.id=CV_BACKGROUND_LAYER_ID;
  15412. oBL.style.display="none";
  15413. oBL.style.position="absolute";
  15414. oBL.setAttribute("role","region");
  15415. oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT);
  15416. oBL.style.top="0px";
  15417. oBL.style.left="0px";
  15418. oBL.style.zIndex=98;
  15419. oBL.style.width="100%";
  15420. oBL.style.height="100%";
  15421. oBL.style.backgroundColor="rgb(238, 238, 238)";
  15422. oBL.style.opacity="0";
  15423. oBL.style.filter="alpha(opacity:0)";
  15424. oBL.innerHTML="<table tabindex=\"1\" width=\"100%\" height=\"100%\"><tr><td role=\"presentation\" onclick=\"CVBackgroundLayer_ignoreMouseClick(event)\"></td></tr></table>";
  15425. oBL.style.display="inline";
  15426. document.body.appendChild(oBL);
  15427. };
  15428. CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){
  15429. var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID);
  15430. if(oBL){
  15431. oBL.parentNode.removeChild(oBL);
  15432. }
  15433. };
  15434. CCognosViewer.prototype.closeActiveHTTPConnection=function(){
  15435. var _b29=this.getActiveRequest();
  15436. if(_b29){
  15437. _b29.abortHttpRequest();
  15438. }
  15439. };
  15440. CCognosViewer.prototype.canCancel=function(){
  15441. var _b2a=this.getTracking();
  15442. var _b2b=this.getStatus();
  15443. return _b2a!=""&&_b2b!="complete";
  15444. };
  15445. CCognosViewer.prototype.cancel=function(_b2c){
  15446. if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
  15447. this.getWorkingDialog().disableCancelButton(_b2c);
  15448. }
  15449. this.removeTransparentBackgroundLayer();
  15450. this.clearPrompts();
  15451. if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
  15452. this.envParams["fragment.fireEventWhenComplete"]="";
  15453. }
  15454. var _b2d=null;
  15455. if(this.m_undoStack.length>0){
  15456. _b2d=this.m_undoStack.pop();
  15457. }
  15458. var _b2e=this.getActiveRequest();
  15459. if(this.canCancel()===true||_b2e){
  15460. if(_b2e){
  15461. _b2e.cancelRequest(true);
  15462. }else{
  15463. var _b2f=null;
  15464. var _b30=_b2d!=null&&_b2d.m_bRefreshPage;
  15465. if(typeof this.getCancelDispatcherEntry=="function"){
  15466. _b2f=this.getCancelDispatcherEntry();
  15467. }else{
  15468. if(_b30||this.m_viewerFragment){
  15469. _b2f=new ViewerDispatcherEntry(this);
  15470. }else{
  15471. if(this.getId()=="RS"){
  15472. _b2f=new ViewerDispatcherEntry(this);
  15473. _b2f.addFormField("cv.responseFormat","rs");
  15474. }else{
  15475. _b2f=new DispatcherEntry(this);
  15476. _b2f.addFormField("cv.responseFormat","successfulRequest");
  15477. }
  15478. }
  15479. }
  15480. _b2f.forceSynchronous();
  15481. _b2f.addFormField("ui.action","cancel");
  15482. _b2f.addFormField("m_tracking",this.getTracking());
  15483. this.setTracking("");
  15484. if(_b30){
  15485. var _b31="<CognosViewerUndo><conversation>";
  15486. _b31+=_b2d.m_sConversation;
  15487. _b31+="</conversation></CognosViewerUndo>";
  15488. _b2f.addFormField("cv.previousSession",_b31);
  15489. }
  15490. this.dispatchRequest(_b2f);
  15491. if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
  15492. this.executeCallback("cancel");
  15493. }
  15494. }
  15495. this.setStatus("complete");
  15496. var _b32=this.envParams["ui.action"];
  15497. var _b33=this.getUsePageRequest();
  15498. var _b34=this.m_undoStack.length;
  15499. if(_b2d!=null){
  15500. this.m_sConversation=_b2d.m_sConversation;
  15501. this.m_sParameters=_b2d.m_sParameters;
  15502. this.envParams={};
  15503. applyJSONProperties(this.envParams,_b2d.m_envParams);
  15504. this.m_undoStack.push(_b2d);
  15505. }
  15506. this.setTracking("");
  15507. if(this.previouslySelectedTab){
  15508. this.cancelTabSwitch();
  15509. }else{
  15510. if(_b32!="view"&&_b34<=0&&this.rvMainWnd){
  15511. this.rvMainWnd.executePreviousReport(-1);
  15512. }
  15513. }
  15514. return true;
  15515. }else{
  15516. if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){
  15517. this.rvMainWnd.executePreviousReport(-1);
  15518. return true;
  15519. }else{
  15520. if(!this.isBux){
  15521. executeBackURL(this.getId());
  15522. }
  15523. return true;
  15524. }
  15525. }
  15526. return false;
  15527. };
  15528. CCognosViewer.prototype.clearPrompts=function(){
  15529. if(this.preProcessControlArray){
  15530. var _b35=this.preProcessControlArray.length;
  15531. var k=0;
  15532. for(k=0;k<_b35;k++){
  15533. var _b37=eval(this.preProcessControlArray[k]);
  15534. if(_b37){
  15535. if(_b37.clearSubmit){
  15536. _b37.clearSubmit();
  15537. }
  15538. }
  15539. }
  15540. }
  15541. };
  15542. CCognosViewer.prototype.wait=function(){
  15543. if(this.isWorking()){
  15544. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  15545. var _b38=new ViewerDispatcherEntry(this);
  15546. _b38.addFormField("ui.action","wait");
  15547. _b38.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  15548. _b38.addFormField("cv.actionState",this.envParams["cv.actionState"]);
  15549. _b38.addNonEmptyStringFormField("bux",this.envParams["bux"]);
  15550. _b38.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
  15551. this.dispatchRequest(_b38);
  15552. return true;
  15553. }
  15554. return false;
  15555. };
  15556. CCognosViewer.prototype.setCAFContext=function(_b39){
  15557. this.m_sCAFContext=_b39;
  15558. };
  15559. CCognosViewer.prototype.setContextInfo=function(sXML){
  15560. this.m_sContextInfoXML=sXML;
  15561. };
  15562. CCognosViewer.prototype.setConversation=function(_b3b){
  15563. this.m_sConversation=_b3b;
  15564. };
  15565. CCognosViewer.prototype.setActionState=function(_b3c){
  15566. this.m_sActionState=_b3c;
  15567. };
  15568. CCognosViewer.prototype.setStatus=function(_b3d){
  15569. this.m_sStatus=_b3d;
  15570. };
  15571. CCognosViewer.prototype.setDebug=function(_b3e){
  15572. this.m_bDebug=_b3e;
  15573. };
  15574. CCognosViewer.prototype.setExecutionParameters=function(_b3f){
  15575. this.m_sParameters=_b3f;
  15576. };
  15577. CCognosViewer.prototype.setMetadataInfo=function(sXML){
  15578. this.m_sMetadataInfoXML=sXML;
  15579. };
  15580. CCognosViewer.prototype.setSecondaryRequests=function(_b41){
  15581. if(_b41){
  15582. this.m_aSecRequests=_b41;
  15583. }else{
  15584. this.m_aSecRequests=[];
  15585. }
  15586. };
  15587. CCognosViewer.prototype.setTracking=function(_b42){
  15588. this.m_sTracking=_b42;
  15589. };
  15590. CCognosViewer.prototype.setSoapFault=function(_b43){
  15591. this.m_sSoapFault=_b43;
  15592. };
  15593. CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
  15594. var _b45=document.getElementById("formWarpRequest"+this.getId());
  15595. var _b46=_b45.elements["ui.postBack"];
  15596. var _b47=_b45.elements["ui.backURL"];
  15597. if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
  15598. window.detachLeavingRV();
  15599. }
  15600. if(window.opener||_b46||(_b47&&_b47.value!=="javascript:window.close();")){
  15601. window.open(sURL,"","");
  15602. this.updateNewBrowserWindow();
  15603. }else{
  15604. window.location=sURL;
  15605. }
  15606. };
  15607. CCognosViewer.prototype.hideToolbar=function(_b48){
  15608. this.m_bHideToolbar=_b48;
  15609. };
  15610. CCognosViewer.prototype.showExcel=function(sURL){
  15611. var _b4a=true;
  15612. var _b4b=document.getElementById("formWarpRequest"+this.getId());
  15613. var _b4c=_b4b.elements["ui.backURL"];
  15614. if(_b4c&&_b4c.value.indexOf("javascript:window.close()")!==0&&_b4c.value.indexOf("close.html")===-1){
  15615. _b4a=false;
  15616. }
  15617. if(window.detachLeavingRV){
  15618. window.detachLeavingRV();
  15619. }
  15620. var _b4d=window;
  15621. if(window.opener&&(isIE()||isFF())&&_b4a){
  15622. _b4d=window.opener?window.opener:window;
  15623. }else{
  15624. if(!window.opener&&_b4a){
  15625. window.location=sURL;
  15626. return;
  15627. }
  15628. }
  15629. var _b4e=null;
  15630. var _b4f="";
  15631. try{
  15632. if(this.envParams["cv.excelWindowOpenProperties"]){
  15633. _b4f=this.envParams["cv.excelWindowOpenProperties"];
  15634. }
  15635. _b4e=_b4d.open(sURL,"",_b4f);
  15636. }
  15637. catch(e){
  15638. _b4d=window;
  15639. _b4e=_b4d.open(sURL,"",_b4f);
  15640. }
  15641. if(!_b4e||_b4e.closed||typeof _b4e.closed=="undefined"){
  15642. alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
  15643. }
  15644. this.updateNewBrowserWindow();
  15645. };
  15646. CCognosViewer.prototype.updateNewBrowserWindow=function(){
  15647. var id=this.getId();
  15648. var _b51=document.forms["formWarpRequest"+id].elements["ui.postBack"];
  15649. var _b52=document.forms["formWarpRequest"+id].elements["ui.backURL"];
  15650. if(_b51&&_b51.value){
  15651. setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
  15652. }else{
  15653. if(_b52&&_b52.value){
  15654. if(_b52.value.length<2048){
  15655. setTimeout("location.replace(\""+_b52.value+"\");",100);
  15656. }else{
  15657. _b52=decodeURIComponent(_b52.value);
  15658. var _b53=_b52.split("?");
  15659. var _b54=document.createElement("form");
  15660. _b54.style.display="none";
  15661. _b54.setAttribute("target","_self");
  15662. _b54.setAttribute("method","post");
  15663. _b54.setAttribute("action",_b53[0]);
  15664. var _b55=_b53[1].split("&");
  15665. for(var _b56=0;_b56<_b55.length;_b56++){
  15666. var _b57=_b55[_b56].indexOf("=");
  15667. var _b58=_b55[_b56].substr(0,_b57);
  15668. var _b59=_b55[_b56].substr(_b57+1);
  15669. var _b5a=document.createElement("img");
  15670. _b5a.setAttribute("type","hidden");
  15671. _b5a.setAttribute("name",decodeURIComponent(_b58));
  15672. _b5a.setAttribute("value",decodeURIComponent(_b59));
  15673. _b54.appendChild(_b5a);
  15674. }
  15675. document.body.appendChild(_b54);
  15676. _b54.submit();
  15677. }
  15678. }else{
  15679. window.close();
  15680. }
  15681. }
  15682. };
  15683. CCognosViewer.prototype.showWaitPage=function(){
  15684. };
  15685. CCognosViewer.prototype.sendRequest=function(_b5b){
  15686. var _b5c=new ViewerDispatcherEntry(this);
  15687. _b5c.addFormField("ui.action",_b5b.getAction());
  15688. if(_b5b.getCallback()!=null){
  15689. _b5c.setCallbacks({"complete":{"object":null,"method":_b5b.getCallback()}});
  15690. }
  15691. var _b5d=_b5b.getFormFields().keys();
  15692. for(var _b5e=0;_b5e<_b5d.length;_b5e++){
  15693. _b5c.addFormField(_b5d[_b5e],_b5b.getFormFields().get(_b5d[_b5e]));
  15694. }
  15695. var _b5f=_b5b.m_oOptions.keys();
  15696. for(var _b60=0;_b60<_b5f.length;_b60++){
  15697. _b5c.addFormField(_b5f[_b60],_b5b.getOption(_b5f[_b60]));
  15698. }
  15699. var _b61=_b5b.m_oParams.keys();
  15700. for(var _b62=0;_b62<_b61.length;_b62++){
  15701. _b5c.addFormField(_b61[_b62],_b5b.getParameter(_b61[_b62]));
  15702. }
  15703. this.dispatchRequest(_b5c);
  15704. };
  15705. CCognosViewer.prototype.promptAction=function(_b63,sUrl){
  15706. this.setKeepFocus(true);
  15707. if(typeof datePickerObserverNotify=="function"){
  15708. datePickerObserverNotify();
  15709. }
  15710. var _b65=this.getViewerWidget();
  15711. if(_b63=="cancel"){
  15712. this.cancelPrompt(sUrl);
  15713. if(_b65){
  15714. if(!this.isReportRenderingDone()){
  15715. var _b66={action:"deleteWidget"};
  15716. _b65.fireEvent("com.ibm.bux.widget.action",null,_b66);
  15717. }
  15718. }
  15719. }else{
  15720. var oReq=new ViewerDispatcherEntry(this);
  15721. oReq.addFormField("ui.action",_b63=="back"?"back":"forward");
  15722. if(_b63=="finish"){
  15723. oReq.addFormField("run.prompt",false);
  15724. }else{
  15725. if(_b63=="back"||_b63=="next"){
  15726. oReq.addFormField("run.prompt",true);
  15727. }
  15728. }
  15729. if(_b63=="reprompt"){
  15730. if(typeof repromptObserverNotify=="function"){
  15731. repromptObserverNotify(this);
  15732. }
  15733. oReq.addFormField("_promptControl",_b63);
  15734. }else{
  15735. oReq.addFormField("_promptControl","prompt");
  15736. }
  15737. if(_b65){
  15738. _b65.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
  15739. if(_b65.isSelectionFilterEnabled){
  15740. _b65.clearSelectionFilter();
  15741. }
  15742. }
  15743. this.submitPromptValues(oReq);
  15744. }
  15745. };
  15746. CCognosViewer.prototype.cancelPrompt=function(sUrl){
  15747. this.cancel();
  15748. };
  15749. CCognosViewer.prototype.notify=function(_b69,_b6a){
  15750. var _b6b=0,k=0;
  15751. var _b6d=null;
  15752. if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
  15753. _b6b=this.rangeObserverArray.length;
  15754. for(k=0;k<_b6b;k++){
  15755. _b6d=eval(this.rangeObserverArray[k]);
  15756. if(_b6d&&typeof _b6d=="object"&&typeof _b6d.update=="function"){
  15757. _b6d.update();
  15758. }
  15759. }
  15760. }
  15761. var _b6e=true;
  15762. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  15763. _b6b=this.preProcessControlArray.length;
  15764. for(k=0;k<_b6b;k++){
  15765. _b6d=eval(this.preProcessControlArray[k]);
  15766. if((typeof _b6d.getValid=="function")&&!_b6d.getValid()){
  15767. _b6e=false;
  15768. break;
  15769. }
  15770. }
  15771. }
  15772. this.notifyPageNavEnabled(_b6e);
  15773. if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
  15774. _b6b=this.multipleObserverArray.length;
  15775. for(k=0;k<_b6b;k++){
  15776. _b6d=eval(this.multipleObserverArray[k]);
  15777. if(_b6d&&typeof _b6d=="object"&&typeof _b6d.checkInsertRemove=="function"){
  15778. _b6d.checkInsertRemove();
  15779. }
  15780. }
  15781. }
  15782. for(var _b6f=0;_b6f<gaNotifyTargets.length;_b6f++){
  15783. var _b70=gaNotifyTargets[_b6f];
  15784. if(typeof _b70!="undefined"&&typeof _b70.notify=="function"){
  15785. _b70.notify(_b69,_b6a);
  15786. }
  15787. }
  15788. };
  15789. CCognosViewer.prototype.notifyPageNavEnabled=function(_b71){
  15790. if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
  15791. var _b72=this.pageNavigationObserverArray.length;
  15792. var _b73=false;
  15793. var _b74=null;
  15794. var _b75=null;
  15795. var k=0;
  15796. for(k=0;k<_b72;k++){
  15797. try{
  15798. _b74=eval(this.pageNavigationObserverArray[k]);
  15799. _b75=_b74.getType();
  15800. if(_b75==PROMPTBUTTON_FINISH){
  15801. _b73=true;
  15802. break;
  15803. }
  15804. }
  15805. catch(e){
  15806. }
  15807. }
  15808. for(k=0;k<_b72;k++){
  15809. try{
  15810. _b74=eval(this.pageNavigationObserverArray[k]);
  15811. _b75=_b74.getType();
  15812. if(!_b71){
  15813. if((_b75==PROMPTBUTTON_NEXT)||(_b75==PROMPTBUTTON_OK)||(_b75==PROMPTBUTTON_FINISH)){
  15814. _b74.setEnabled(false);
  15815. }
  15816. }else{
  15817. if(_b75==PROMPTBUTTON_FINISH){
  15818. _b74.setEnabled(this.bCanFinish);
  15819. }else{
  15820. if(_b75==PROMPTBUTTON_NEXT){
  15821. _b74.setEnabled(this.bNextPage||!_b73);
  15822. }else{
  15823. if(_b75==PROMPTBUTTON_OK){
  15824. _b74.setEnabled(true);
  15825. }
  15826. }
  15827. }
  15828. }
  15829. }
  15830. catch(e2){
  15831. }
  15832. }
  15833. }
  15834. };
  15835. CCognosViewer.prototype.getDrillResetHUNs=function(_b77){
  15836. var _b78=null;
  15837. if(this.getRAPReportInfo()){
  15838. _b78=this.getRAPReportInfo().getDrilledOnHUNs();
  15839. }
  15840. if(!_b78){
  15841. return null;
  15842. }
  15843. var _b79=this.getExecutionParameters();
  15844. if(!_b79){
  15845. return null;
  15846. }
  15847. var _b7a=this._getListOfChangedPromptParameters(_b77);
  15848. if(!_b7a||_b7a.length===0){
  15849. return null;
  15850. }
  15851. var _b7b=[];
  15852. for(var i=0;i<_b78.length;i++){
  15853. for(var j=0;j<_b7a.length;j++){
  15854. if(_b7a[j].indexOf(_b78[i])!==-1){
  15855. _b7b.push(_b78[i]);
  15856. }
  15857. }
  15858. }
  15859. return _b7b;
  15860. };
  15861. CCognosViewer.prototype.getOldParameters=function(){
  15862. var _b7e=new CParameterValues();
  15863. var _b7f=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  15864. if(_b7f.childNodes.length==1){
  15865. _b7e.loadWithOptions(_b7f.childNodes[0],false);
  15866. }
  15867. if(!_b7e||!_b7e.m_parameterValues||!_b7e.m_parameterValues.m_aValues){
  15868. return null;
  15869. }
  15870. return _b7e.m_parameterValues.m_aValues;
  15871. };
  15872. CCognosViewer.prototype._createDummyRequest=function(){
  15873. var _b80=new ViewerDispatcherEntry(this);
  15874. return this.preparePromptValues(_b80);
  15875. };
  15876. CCognosViewer.prototype._getChangedPromptParametersValues=function(_b81,_b82,_b83){
  15877. var _b84=XMLBuilderLoadXMLFromString(_b82);
  15878. if(!_b84){
  15879. for(var j=0;j<_b81.length;j++){
  15880. var _b86=_b81[j].m_useValue;
  15881. if(_b82.indexOf(sXmlEncode(_b86))<0){
  15882. _b83.push(_b86);
  15883. }
  15884. }
  15885. return;
  15886. }
  15887. var _b87=_b84.getElementsByTagName("selectOption");
  15888. if(!_b87){
  15889. return;
  15890. }
  15891. var _b88=_b81.length;
  15892. var _b89=_b87.length;
  15893. for(var i=0;i<_b89;i++){
  15894. var _b82=_b87[i].attributes.getNamedItem("useValue").nodeValue;
  15895. bMatchOldParam=false;
  15896. for(var j=0;j<_b88;j++){
  15897. var _b86=_b81[j].m_useValue;
  15898. if(_b82.indexOf(_b86)===0){
  15899. bMatchOldParam=true;
  15900. break;
  15901. }
  15902. }
  15903. if(!bMatchOldParam){
  15904. _b83.push(_b82);
  15905. }
  15906. }
  15907. };
  15908. CCognosViewer.prototype._getListOfChangedPromptParameters=function(_b8b){
  15909. var _b8c=this.getOldParameters();
  15910. if(!_b8c){
  15911. return null;
  15912. }
  15913. var _b8d=[];
  15914. if(!_b8b){
  15915. var _b8e=this._createDummyRequest();
  15916. for(var _b8f in _b8c){
  15917. var _b90=_b8c[_b8f].m_parmValueItems;
  15918. var _b91=_b8e.getRequest().getFormFields().get("p_"+_b8f);
  15919. if(!_b91){
  15920. continue;
  15921. }
  15922. this._getChangedPromptParametersValues(_b90,_b91,_b8d);
  15923. }
  15924. }else{
  15925. if(!_b8b.parameters){
  15926. return null;
  15927. }
  15928. var _b92=_b8b.parameters;
  15929. for(var i=0;i<_b92.length;i++){
  15930. var _b94=_b92[i].parmName;
  15931. if(!_b94||!_b8c[_b94]){
  15932. continue;
  15933. }
  15934. var _b90=_b8c[_b94].m_parmValueItems;
  15935. if(!_b90||_b90.length==0){
  15936. continue;
  15937. }
  15938. this._getChangedPromptParametersValues(_b90,_b92[i].parmValue,_b8d);
  15939. }
  15940. }
  15941. return _b8d;
  15942. };
  15943. CCognosViewer.prototype.submitPromptValues=function(oReq){
  15944. if(this.gbPromptRequestSubmitted===true){
  15945. return false;
  15946. }
  15947. this.gbPromptRequestSubmitted=true;
  15948. if(this.isBux){
  15949. var _b96=this.getDrillResetHUNs(null);
  15950. if(_b96&&_b96.length!==0){
  15951. var _b97={"drilledResetHUNs":_b96};
  15952. this.executeAction("DrillReset",_b97);
  15953. return;
  15954. }
  15955. }
  15956. oReq=this.preparePromptValues(oReq);
  15957. if(window.portletSharePrompt){
  15958. var _b98=this.portletPromptParams(oReq);
  15959. if(_b98.length>0){
  15960. portletSharePrompt(_b98);
  15961. }
  15962. }
  15963. this.dispatchRequest(oReq);
  15964. };
  15965. CCognosViewer.prototype.portletPromptParams=function(oReq){
  15966. var _b9a=[];
  15967. var _b9b=null;
  15968. var _b9c=true;
  15969. var _b9d=oReq.getFormFields().keys();
  15970. for(var _b9e=0;_b9e<_b9d.length;_b9e++){
  15971. _b9b=_b9d[_b9e];
  15972. if(_b9b=="_promptControl"&&oReq.getFormField(_b9b)=="search"){
  15973. _b9c=false;
  15974. break;
  15975. }else{
  15976. if(_b9b.indexOf("p_")===0){
  15977. if(_b9b.indexOf("p_credential")===0){
  15978. _b9c=false;
  15979. break;
  15980. }else{
  15981. _b9a.push([_b9b,oReq.getFormField(_b9b)]);
  15982. }
  15983. }
  15984. }
  15985. }
  15986. if(_b9a&&!_b9c){
  15987. _b9a=[];
  15988. }
  15989. return _b9a;
  15990. };
  15991. CCognosViewer.prototype.preparePromptValues=function(oReq){
  15992. var _ba0=[];
  15993. if(this.preProcessControlArray){
  15994. var _ba1=this.preProcessControlArray.length;
  15995. var k=0;
  15996. for(k=0;k<_ba1;k++){
  15997. var _ba3=eval(this.preProcessControlArray[k]);
  15998. var _ba4=(typeof _ba3.isEnabled=="function"?_ba3.isEnabled():true);
  15999. if(_ba3&&typeof _ba3.preProcess=="function"&&_ba4){
  16000. _ba3.preProcess();
  16001. if(_ba3.m_oSubmit){
  16002. if(oReq.addParameter){
  16003. oReq.addParameter(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value);
  16004. }else{
  16005. oReq.addFormField(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value);
  16006. }
  16007. _ba0.push(_ba3.m_oSubmit);
  16008. if(_ba3.m_sPromptId&&_ba3.m_oForm&&_ba3.m_oForm.elements&&typeof _ba3.m_oForm.elements["p_"+_ba3.m_sRef]=="object"){
  16009. if(oReq.addParameter){
  16010. oReq.addParameter("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value);
  16011. }else{
  16012. oReq.addFormField("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value);
  16013. }
  16014. }
  16015. }
  16016. }
  16017. }
  16018. }
  16019. var _ba5=document.getElementById("formWarpRequest"+this.getId());
  16020. if(_ba5){
  16021. var _ba6=_ba5.elements;
  16022. for(var _ba7=0;_ba7<_ba6.length;_ba7++){
  16023. var _ba8=_ba6[_ba7];
  16024. if(!_ba8.name||!_ba8.name.match(/^p_/)){
  16025. continue;
  16026. }
  16027. var _ba9=true;
  16028. for(var _baa=0;_baa<_ba0.length;_baa++){
  16029. if(_ba0[_baa]==_ba8){
  16030. _ba9=false;
  16031. break;
  16032. }
  16033. }
  16034. if(_ba9){
  16035. oReq.addFormField(_ba8.name,_ba8.value);
  16036. _ba0.push(_ba8);
  16037. }
  16038. }
  16039. }
  16040. var oRM=this["CognosReport"];
  16041. if(oRM){
  16042. var _bac=oRM.prompt.getParameters();
  16043. for(var i=0;i<_bac.length;i++){
  16044. var _bae="p_"+_bac[i].getName();
  16045. if(!oReq.getFormField(_bae)){
  16046. oReq.addFormField(_bae,_bac[i].getXML());
  16047. }
  16048. }
  16049. }
  16050. return oReq;
  16051. };
  16052. CCognosViewer.prototype.setViewerWidget=function(_baf){
  16053. this.m_viewerWidget=_baf;
  16054. };
  16055. CCognosViewer.prototype.getViewerWidget=function(){
  16056. return this.m_viewerWidget;
  16057. };
  16058. CCognosViewer.prototype.getFlashChartOption=function(){
  16059. var _bb0=this.getViewerWidget();
  16060. var _bb1=null;
  16061. if(_bb0){
  16062. var _bb2=_bb0.getProperties();
  16063. if(_bb2){
  16064. _bb1=_bb2.getFlashCharts();
  16065. }
  16066. }
  16067. return _bb1;
  16068. };
  16069. CCognosViewer.prototype.fireWidgetEvent=function(evt,_bb4){
  16070. var _bb5=this.getViewerWidget();
  16071. if(_bb5!=null){
  16072. _bb5.fireEvent(evt,null,_bb4);
  16073. }
  16074. };
  16075. CCognosViewer.prototype.isMobile=function(){
  16076. return false;
  16077. };
  16078. CCognosViewer.prototype.setVisibleDialog=function(_bb6){
  16079. this.m_visibleDialog=_bb6;
  16080. };
  16081. CCognosViewer.prototype.getVisibleDialog=function(){
  16082. if(typeof this.m_visibleDialog!="undefined"){
  16083. return this.m_visibleDialog;
  16084. }
  16085. return null;
  16086. };
  16087. CCognosViewer.prototype.getContentLocale=function(){
  16088. var _bb7=document.getElementById("formWarpRequest"+this.getId());
  16089. if(_bb7&&_bb7["ui.contentLocale"]&&_bb7["reRunObj"]&&_bb7["reRunObj"].value.length>0){
  16090. return _bb7["ui.contentLocale"].value;
  16091. }
  16092. return null;
  16093. };
  16094. CCognosViewer.prototype.updateLayout=function(_bb8){
  16095. var cvid=this.getId();
  16096. var _bba=document.getElementById("CVHeader"+cvid);
  16097. var _bbb=document.getElementById("CVToolbar"+cvid);
  16098. if(!_bba&&!_bbb){
  16099. setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_bb8+"\");",100);
  16100. return;
  16101. }
  16102. if(_bba){
  16103. var _bbc=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
  16104. if((_bb8=="prompting"&&!this.bShowHeaderWithPrompts)||_bbc){
  16105. _bba.parentNode.style.display="none";
  16106. }else{
  16107. _bba.parentNode.style.display="";
  16108. }
  16109. }
  16110. if(_bbb){
  16111. if(_bb8=="prompting"||this.m_bHideToolbar==true){
  16112. _bbb.parentNode.style.display="none";
  16113. }else{
  16114. _bbb.parentNode.style.display="";
  16115. }
  16116. }
  16117. };
  16118. CCognosViewer.prototype.updateResponseSpecification=function(_bbd){
  16119. this.sResponseSpecification=_bbd;
  16120. };
  16121. CCognosViewer.prototype.getResponseSpecification=function(){
  16122. return this.sResponseSpecification;
  16123. };
  16124. CCognosViewer.prototype.release=function(_bbe){
  16125. if(this.getStatus()!="fault"){
  16126. this._release(_bbe);
  16127. }
  16128. };
  16129. CCognosViewer.prototype._release=function(_bbf){
  16130. var form=document.getElementById("formWarpRequest"+this.getId());
  16131. var _bc1=this.getTracking();
  16132. if(!_bc1&&form&&form["m_tracking"]&&form["m_tracking"].value){
  16133. _bc1=form["m_tracking"].value;
  16134. form["m_tracking"].value="";
  16135. }
  16136. this.setTracking("");
  16137. if(_bc1){
  16138. var _bc2=new DispatcherEntry(this);
  16139. if(this.isWorkingOrPrompting()){
  16140. _bc2.addFormField("ui.action","cancel");
  16141. }else{
  16142. _bc2.addFormField("ui.action","release");
  16143. }
  16144. _bc2.addFormField("cv.responseFormat","successfulRequest");
  16145. _bc2.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  16146. _bc2.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
  16147. _bc2.addFormField("m_tracking",_bc1);
  16148. if(_bbf!=true){
  16149. _bc2.forceSynchronous();
  16150. }
  16151. var _bc3=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
  16152. if(_bc3&&_bc3.getFormField("cv.outputKey")){
  16153. _bc2.addFormField("b_action","cvx.high");
  16154. _bc2.addFormField("cv.outputKey",_bc3.getFormField("cv.outputKey"));
  16155. _bc2.addFormField("cv.waitForResponse","false");
  16156. _bc2.setHeaders(_bc3.getHeaders());
  16157. }
  16158. var _bc4=_bc2.getRequest().getFormFields();
  16159. var _bc5=_bc4.keys();
  16160. var data=new URLSearchParams();
  16161. for(var _bc7=0;_bc7<_bc5.length;_bc7++){
  16162. data.append(_bc5[_bc7],_bc4.get(_bc5[_bc7]));
  16163. }
  16164. if(!navigator.sendBeacon(this.getGateway(),data)){
  16165. if(typeof console!=="undefined"&&console.log){
  16166. console.log("CCognosViewer: release sendBeacon failed.");
  16167. }
  16168. }
  16169. return true;
  16170. }
  16171. return false;
  16172. };
  16173. CCognosViewer.prototype.cleanupStyles=function(){
  16174. if(this.getViewerWidget()){
  16175. this.getViewerWidget().cleanupStyles();
  16176. }
  16177. };
  16178. CCognosViewer.prototype.destroy=function(_bc8){
  16179. this.release(_bc8);
  16180. if(!this.m_destroyed){
  16181. if(typeof window.gaRV_INSTANCES!="undefined"){
  16182. for(var _bc9=0;_bc9<window.gaRV_INSTANCES.length;_bc9++){
  16183. if(window.gaRV_INSTANCES[_bc9].m_sId==this.getId()){
  16184. window.gaRV_INSTANCES.splice(_bc9,1);
  16185. this.m_destroyed=true;
  16186. break;
  16187. }
  16188. }
  16189. }
  16190. if(this.m_layoutElements){
  16191. for(var i=0;i<this.m_layoutElements.length;i++){
  16192. var e=this.m_layoutElements[i];
  16193. var j=e.getAttribute("lid");
  16194. this.m_layoutElements.splice(i,1);
  16195. delete this.m_lidToElement[j];
  16196. var _bcd=e.parentNode;
  16197. if(_bcd){
  16198. _bcd.removeChild(e);
  16199. }
  16200. }
  16201. delete this.m_layoutElements;
  16202. delete this.m_lidToElement;
  16203. }
  16204. if(this.m_oDrillMgr){
  16205. this.m_oDrillMgr.setCV(null);
  16206. }
  16207. var _bce=this.getSelectionController();
  16208. if(_bce){
  16209. GUtil.destroyProperties(_bce);
  16210. }
  16211. var cvId=this.getId();
  16212. this.m_viewerDispatcher=null;
  16213. GUtil.destroyProperties(this,true);
  16214. cleanupGlobalObjects(cvId);
  16215. }
  16216. };
  16217. CCognosViewer.prototype.exit=function(){
  16218. this.release();
  16219. };
  16220. CCognosViewer.prototype.executeAction=function(_bd0,_bd1){
  16221. var _bd2=this.getAction(_bd0);
  16222. _bd2.setRequestParms(_bd1);
  16223. return _bd2.execute();
  16224. };
  16225. CCognosViewer.prototype.getCalculation=function(_bd3){
  16226. var calc=null;
  16227. var _bd5=this.getCalculationCache();
  16228. if(_bd5[_bd3]){
  16229. calc=_bd5[_bd3];
  16230. }else{
  16231. if(window[_bd3]&&typeof window[_bd3]=="function"){
  16232. calc=new window[_bd3]();
  16233. calc.setCognosViewer(this);
  16234. }
  16235. _bd5[_bd3]=calc;
  16236. }
  16237. return calc;
  16238. };
  16239. CCognosViewer.prototype.findBlueDotMenu=function(_bd6){
  16240. var root=null;
  16241. var _bd8=(_bd6)?_bd6:this.getToolbar();
  16242. for(var idx=0;idx<_bd8.length;++idx){
  16243. if(typeof _bd8[idx]._root!="undefined"){
  16244. root=_bd8[idx]._root;
  16245. break;
  16246. }
  16247. }
  16248. return root;
  16249. };
  16250. CCognosViewer.prototype.findToolbarItem=function(_bda,_bdb){
  16251. var spec=typeof _bdb=="undefined"||_bdb==null?this.getToolbar():_bdb;
  16252. var _bdd=null;
  16253. for(var _bde=0;_bde<spec.length;++_bde){
  16254. var name=spec[_bde]["name"];
  16255. if(typeof name!="undefined"&&name==_bda){
  16256. _bdd=spec[_bde];
  16257. break;
  16258. }
  16259. }
  16260. return _bdd;
  16261. };
  16262. CCognosViewer.prototype.findToolbarItemIndex=function(_be0,_be1){
  16263. var spec=typeof _be1=="undefined"||_be1==null?this.getToolbar():_be1;
  16264. var _be3=null;
  16265. for(var _be4=0;_be4<spec.length;++_be4){
  16266. var name=spec[_be4]["name"];
  16267. if(typeof name!="undefined"&&name==_be0){
  16268. _be3=_be4;
  16269. break;
  16270. }
  16271. }
  16272. return _be3;
  16273. };
  16274. CCognosViewer.prototype.addedButtonToToolbar=function(_be6,_be7,_be8,_be9){
  16275. if(typeof _be7!="undefined"&&_be7!=null){
  16276. if(this.findToolbarItem(_be7.name,_be6)==null){
  16277. _be8=this.findToolbarItemIndex(_be8,_be6);
  16278. if(typeof _be8!="undefined"&&_be8!=null){
  16279. _be6.splice(++_be8,0,_be7);
  16280. return true;
  16281. }else{
  16282. if(typeof _be9!="undefined"&&_be9!=null){
  16283. _be6.splice(_be9,0,_be7);
  16284. return true;
  16285. }
  16286. }
  16287. }
  16288. }
  16289. return false;
  16290. };
  16291. CCognosViewer.prototype.addDrillTargets=function(_bea){
  16292. this.m_drillTargets=_bea;
  16293. };
  16294. CCognosViewer.prototype.getDrillTargets=function(){
  16295. if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
  16296. var _beb=document.getElementById("CVIFrame"+this.getId());
  16297. if(typeof _beb!="undefined"&&_beb!=null){
  16298. if(_beb.contentWindow.drillTargets){
  16299. return _beb.contentWindow.drillTargets;
  16300. }
  16301. }
  16302. }
  16303. return this.m_drillTargets;
  16304. };
  16305. CCognosViewer.prototype.getDrillTarget=function(idx){
  16306. if(idx>=this.m_drillTargets.length){
  16307. return null;
  16308. }
  16309. return this.m_drillTargets[idx];
  16310. };
  16311. CCognosViewer.prototype.getNumberOfDrillTargets=function(){
  16312. return this.m_drillTargets.length;
  16313. };
  16314. CCognosViewer.prototype.isReportRenderingDone=function(){
  16315. return this.m_reportRenderingDone;
  16316. };
  16317. CCognosViewer.prototype.setReportRenderingDone=function(flag){
  16318. this.m_reportRenderingDone=flag;
  16319. };
  16320. CCognosViewer.prototype.hasAVSChart=function(){
  16321. var _bee=this.getRAPReportInfo();
  16322. if(_bee){
  16323. var _bef=_bee.getDisplayTypes();
  16324. return _bef.match("_v2")!=null||_bef.match("v2_")!=null;
  16325. }
  16326. return false;
  16327. };
  16328. CCognosViewer.prototype.getPinFreezeManager=function(){
  16329. return this.m_pinFreezeManager;
  16330. };
  16331. CCognosViewer.prototype.getReportContextHelper=function(){
  16332. if(!this.m_reportContextHelper){
  16333. this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager());
  16334. }
  16335. return this.m_reportContextHelper;
  16336. };
  16337. CCognosViewer.prototype.getRAPReportInfo=function(){
  16338. return this.m_RAPReportInfo;
  16339. };
  16340. CCognosViewer.prototype.setRAPReportInfo=function(_bf0){
  16341. this.m_RAPReportInfo=_bf0;
  16342. };
  16343. CCognosViewer.prototype.isNodeVisible=function(node){
  16344. if(this.m_pinFreezeManager){
  16345. return this.m_pinFreezeManager.isNodeVisible(node);
  16346. }
  16347. return true;
  16348. };
  16349. CCognosViewer.prototype.getWarpRequestForm=function(){
  16350. return document.getElementById("formWarpRequest"+this.getId());
  16351. };
  16352. CCognosViewer.prototype.getBrowser=function(){
  16353. return this.sBrowser;
  16354. };
  16355. CCognosViewer.prototype.repaintDiv=function(oDiv){
  16356. var _bf3=oDiv.style.display;
  16357. oDiv.style.display="none";
  16358. oDiv.style.display=_bf3;
  16359. };
  16360. CCognosViewer.prototype.isMetadataEmpty=function(){
  16361. var oSC=this.getSelectionController();
  16362. if(oSC){
  16363. var _bf5=oSC.getCCDManager();
  16364. if(_bf5){
  16365. return _bf5.isMetadataEmpty();
  16366. }
  16367. }
  16368. return true;
  16369. };
  16370. CCognosViewer.prototype.setContextMenu=function(_bf6){
  16371. this.m_contextMenu=_bf6;
  16372. };
  16373. CCognosViewer.prototype.getContextMenu=function(){
  16374. return this.m_contextMenu;
  16375. };
  16376. CCognosViewer.prototype.setToolbar=function(_bf7){
  16377. this.m_toolbar=_bf7;
  16378. };
  16379. CCognosViewer.prototype.getToolbar=function(){
  16380. return this.m_toolbar;
  16381. };
  16382. CCognosViewer.prototype.getAdvancedServerProperty=function(_bf8){
  16383. if(this.m_advancedProperties&&this.m_advancedProperties[_bf8]!==undefined&&this.m_advancedProperties[_bf8]!==null){
  16384. return this.m_advancedProperties[_bf8];
  16385. }else{
  16386. return null;
  16387. }
  16388. };
  16389. CCognosViewer.prototype.hasPrompt=function(){
  16390. if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
  16391. var _bf9=false;
  16392. if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
  16393. _bf9=true;
  16394. }else{
  16395. var _bfa=new CParameterValues();
  16396. var _bfb=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  16397. if(_bfb.childNodes.length==1){
  16398. _bfa.loadWithOptions(_bfb.childNodes[0],true);
  16399. var _bfc=_bfa.length();
  16400. for(var _bfd=0;_bfd<_bfc;++_bfd){
  16401. var _bfe=_bfa.getAt(_bfd);
  16402. if(_bfe!==null&&_bfe.length()>0&&_bfe.name().indexOf("credential:")!=-1){
  16403. _bf9=true;
  16404. break;
  16405. }
  16406. }
  16407. }
  16408. }
  16409. this.m_bHasPrompt=_bf9;
  16410. }
  16411. return this.m_bHasPrompt;
  16412. };
  16413. CCognosViewer.prototype.getDrillState=function(){
  16414. return this.m_sStateData?this.m_sStateData:"";
  16415. };
  16416. CCognosViewer.prototype.isSelectionFilterEnabled=function(){
  16417. if(typeof this.m_bSelectionFilterSwitch=="undefined"){
  16418. this.m_bSelectionFilterSwitch=false;
  16419. }
  16420. return this.m_bSelectionFilterSwitch;
  16421. };
  16422. CCognosViewer.prototype.broadcastContextChange=function(evt,_c00){
  16423. if(this.getViewerWidget()){
  16424. this.getViewerWidget().broadcastContextChange(_c00);
  16425. }
  16426. stopEventBubble(evt);
  16427. };
  16428. CCognosViewer.prototype.broadcastParameterChange=function(evt,_c02){
  16429. if(this.getViewerWidget()){
  16430. this.getViewerWidget().broadcastParameterChange(_c02);
  16431. }
  16432. stopEventBubble(evt);
  16433. };
  16434. CCognosViewer.prototype.getReportDiv=function(){
  16435. if(!this.m_nReportDiv){
  16436. this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId);
  16437. }
  16438. return this.m_nReportDiv;
  16439. };
  16440. function CDocumentWriter(sId,_c04){
  16441. this.m_sId=sId;
  16442. this.m_sText="";
  16443. this.m_sScript=_c04;
  16444. };
  16445. CDocumentWriter.prototype.isValid=function(){
  16446. if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){
  16447. return true;
  16448. }
  16449. return false;
  16450. };
  16451. CDocumentWriter.prototype.execute=function(){
  16452. if(this.isValid()&&window.gScriptLoader){
  16453. var _c05=/document\.write(ln)?\s*\(/gi;
  16454. var _c06=this.m_sScript.replace(_c05,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
  16455. try{
  16456. eval(_c06);
  16457. var _c07=document.getElementById(this.m_sId);
  16458. if(_c07){
  16459. _c07.innerHTML=this.m_sText;
  16460. return true;
  16461. }
  16462. }
  16463. catch(e){
  16464. }
  16465. }
  16466. return false;
  16467. };
  16468. CDocumentWriter.prototype.write=function(_c08){
  16469. var _c09="";
  16470. if(typeof _c08=="function"){
  16471. _c09=eval(_c08);
  16472. }else{
  16473. if(typeof _c08=="string"){
  16474. _c09=_c08;
  16475. }
  16476. }
  16477. this.m_sText+=_c09;
  16478. };
  16479. function setFocusToFirstTabItem(_c0a){
  16480. if(!window.dojo){
  16481. return;
  16482. }
  16483. var _c0b=dojo.query("*",_c0a);
  16484. var _c0c=_c0b.length;
  16485. for(var i=0;i<_c0c;i++){
  16486. var node=_c0b[i];
  16487. if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){
  16488. if(node.getAttribute("tabIndex")==0){
  16489. try{
  16490. node.focus();
  16491. }
  16492. catch(e){
  16493. }
  16494. break;
  16495. }
  16496. }
  16497. }
  16498. };
  16499. function ReportContextHelper(_c0f){
  16500. this.m_oCDManager=_c0f;
  16501. };
  16502. ReportContextHelper.prototype.destroy=function(){
  16503. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  16504. this.m_oCDManager.destroy();
  16505. }
  16506. delete this.m_oCDManager;
  16507. };
  16508. ReportContextHelper.prototype.processCtx=function(sCtx){
  16509. var _c11=sCtx.split("::");
  16510. var _c12=[];
  16511. for(var i=0;i<_c11.length;++i){
  16512. _c12[i]=_c11[i].split(":");
  16513. }
  16514. if(_c12&&_c12.length&&_c12[0].length){
  16515. return _c12;
  16516. }else{
  16517. return null;
  16518. }
  16519. };
  16520. ReportContextHelper.prototype.getDataItemName=function(sCtx){
  16521. var _c15=this.processCtx(sCtx);
  16522. if(_c15){
  16523. return this.getRefDataItem(_c15[0][0]);
  16524. }
  16525. return null;
  16526. };
  16527. ReportContextHelper.prototype.getRefDataItem=function(_c16){
  16528. var _c17=this.m_oCDManager.GetRDIValue(_c16);
  16529. return (_c17==null)?"":_c17;
  16530. };
  16531. ReportContextHelper.prototype.getMun=function(_c18){
  16532. var aCtx=null;
  16533. if(typeof _c18==="string"){
  16534. aCtx=this.processCtx(_c18);
  16535. }else{
  16536. if(typeof _c18==="number"){
  16537. aCtx=this.processCtx(_c18.toString());
  16538. }else{
  16539. aCtx=_c18;
  16540. }
  16541. }
  16542. if(aCtx){
  16543. var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]);
  16544. return (sMun==null)?"":sMun;
  16545. }
  16546. return "";
  16547. };
  16548. function ViewerConfig(){
  16549. this.uiConfig=new ViewerUIConfig();
  16550. this.findConfig=typeof ViewerFindActionConfig=="function"?new ViewerFindActionConfig():null;
  16551. this.httpRequestConfig=typeof ViewerHttpRequestConfig=="function"?new ViewerHttpRequestConfig():null;
  16552. this.eventsConfig=typeof ViewerEventsConfig=="function"?new ViewerEventsConfig():null;
  16553. };
  16554. ViewerConfig.prototype.configure=function(_c1b){
  16555. if(!_c1b){
  16556. return;
  16557. }
  16558. if(_c1b.findAction&&this.findConfig){
  16559. this.findConfig.configure(_c1b.findAction);
  16560. }
  16561. if(_c1b.UI){
  16562. this.uiConfig.configure(_c1b.UI);
  16563. }
  16564. if(_c1b.httpRequestCallbacks&&this.httpRequestConfig){
  16565. this.httpRequestConfig.configure(_c1b.httpRequestCallbacks);
  16566. }
  16567. if(_c1b.events&&this.eventsConfig){
  16568. this.eventsConfig.configure(_c1b.events);
  16569. }
  16570. };
  16571. ViewerConfig.prototype.getUIConfig=function(){
  16572. return this.uiConfig;
  16573. };
  16574. ViewerConfig.prototype.getFindActionConfig=function(){
  16575. return this.findConfig;
  16576. };
  16577. ViewerConfig.prototype.getHttpRequestConfig=function(){
  16578. return this.httpRequestConfig;
  16579. };
  16580. ViewerConfig.prototype.getEventsConfig=function(){
  16581. return this.eventsConfig;
  16582. };
  16583. function ViewerUIConfig(){
  16584. this.showBanner=true;
  16585. this.showToolbar=true;
  16586. this.showContextMenu=true;
  16587. this.showPageNavigation=true;
  16588. this.primarySelectionColor=null;
  16589. this.secondarySelectionColor=null;
  16590. this.showSecondarySelection=true;
  16591. };
  16592. ViewerUIConfig.prototype.configure=function(_c1c){
  16593. applyJSONProperties(this,_c1c);
  16594. };
  16595. ViewerUIConfig.prototype.getShowBanner=function(){
  16596. return this.showBanner;
  16597. };
  16598. ViewerUIConfig.prototype.getShowToolbar=function(){
  16599. return this.showToolbar;
  16600. };
  16601. ViewerUIConfig.prototype.getShowContextMenu=function(){
  16602. return this.showContextMenu;
  16603. };
  16604. ViewerUIConfig.prototype.getShowPageNavigation=function(){
  16605. return this.showPageNavigation;
  16606. };
  16607. ViewerUIConfig.prototype.getPrimarySelectionColor=function(){
  16608. return this.primarySelectionColor;
  16609. };
  16610. ViewerUIConfig.prototype.getSeondarySelectionColor=function(){
  16611. return this.secondarySelectionColor;
  16612. };
  16613. ViewerUIConfig.prototype.getShowSecondarySelection=function(){
  16614. return this.showSecondarySelection;
  16615. };
  16616. function ViewerHttpRequestConfig(){
  16617. this.reportStatus={};
  16618. this.UI={};
  16619. };
  16620. ViewerHttpRequestConfig.prototype.configure=function(_c1d){
  16621. applyJSONProperties(this,_c1d);
  16622. };
  16623. ViewerHttpRequestConfig.prototype.getRequestIndicator=function(){
  16624. if(this.UI){
  16625. return this.UI.requestIndicator?this.UI.requestIndicator:null;
  16626. }
  16627. };
  16628. ViewerHttpRequestConfig.prototype.getWorkingDialog=function(){
  16629. if(this.UI){
  16630. return this.UI.workingDialog?this.UI.workingDialog:null;
  16631. }
  16632. };
  16633. ViewerHttpRequestConfig.prototype.getReportStatusCallback=function(_c1e){
  16634. if(this.reportStatus){
  16635. var _c1f=this.reportStatus[_c1e];
  16636. if(_c1f){
  16637. return _c1f;
  16638. }
  16639. if(_c1e=="complete"&&this.reportStatus["initialComplete"]){
  16640. var _c20=this.reportStatus["initialComplete"];
  16641. this.reportStatus["initialComplete"]=null;
  16642. return _c20;
  16643. }
  16644. }
  16645. return null;
  16646. };
  16647. function ViewerEventsConfig(){
  16648. this.showContextMenuOnClick=false;
  16649. };
  16650. ViewerEventsConfig.prototype.configure=function(_c21){
  16651. applyJSONProperties(this,_c21);
  16652. };
  16653. ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){
  16654. return this.showContextMenuOnClick;
  16655. };
  16656. function ViewerState(){
  16657. this.findState=null;
  16658. this.pageState=null;
  16659. };
  16660. ViewerState.prototype.setFindState=function(_c22){
  16661. if(typeof ViewerFindState!="function"){
  16662. return;
  16663. }
  16664. if(!this.findState){
  16665. this.findState=new ViewerFindState();
  16666. }
  16667. this.findState.setState(_c22);
  16668. };
  16669. ViewerState.prototype.clearFindState=function(){
  16670. this.findState=null;
  16671. };
  16672. ViewerState.prototype.getFindState=function(){
  16673. return this.findState;
  16674. };
  16675. ViewerState.prototype.setPageState=function(_c23){
  16676. if(typeof ViewerPageState!="function"){
  16677. return;
  16678. }
  16679. if(!this.pageState){
  16680. this.pageState=new ViewerPageState();
  16681. }
  16682. this.pageState.setState(_c23);
  16683. };
  16684. ViewerState.prototype.clearPageState=function(){
  16685. this.pageState=null;
  16686. };
  16687. ViewerState.prototype.getPageState=function(){
  16688. return this.pageState;
  16689. };
  16690. function CCDManager(cv){
  16691. this.m_cd=null;
  16692. this.m_md=null;
  16693. this.m_oCV=null;
  16694. this.m_dataItemInfo=null;
  16695. };
  16696. CCDManager.prototype.SetContextData=function(CD){
  16697. if(this.m_cd){
  16698. this.m_cd=null;
  16699. }
  16700. this.m_cd=CD;
  16701. };
  16702. CCDManager.prototype.SetMetadata=function(MD){
  16703. if(this.m_md){
  16704. this.m_md=null;
  16705. }
  16706. this.m_md=MD;
  16707. };
  16708. CCDManager.prototype.AddContextData=function(CD){
  16709. if(!this.m_cd){
  16710. this.m_cd=CD;
  16711. }else{
  16712. for(var i in CD){
  16713. this.m_cd[i]=CD[i];
  16714. }
  16715. }
  16716. };
  16717. CCDManager.prototype.AddMetadata=function(MD){
  16718. if(!this.m_md){
  16719. this.m_md=MD;
  16720. }else{
  16721. for(var j in MD){
  16722. this.m_md[j]=MD[j];
  16723. }
  16724. }
  16725. };
  16726. CCDManager.prototype.getClonedMetadataArray=function(){
  16727. var _c2b={};
  16728. applyJSONProperties(_c2b,this.m_md);
  16729. return _c2b;
  16730. };
  16731. CCDManager.prototype.getClonedContextdataArray=function(){
  16732. var _c2c={};
  16733. applyJSONProperties(_c2c,this.m_cd);
  16734. return _c2c;
  16735. };
  16736. CCDManager.prototype.SetCognosViewer=function(_c2d){
  16737. if(_c2d){
  16738. this.m_oCV=_c2d;
  16739. }
  16740. };
  16741. CCDManager.prototype.onComplete_GetCDRequest=function(_c2e,_c2f){
  16742. if(_c2e){
  16743. var _c30=_c2e.getResult();
  16744. var _c31=XMLBuilderLoadXMLFromString(_c30);
  16745. if(_c31){
  16746. var _c32=_c31.getElementsByTagName("Block");
  16747. for(var i=0;i<_c32.length;i++){
  16748. var _c34="";
  16749. var _c35=_c32[i].firstChild;
  16750. while(_c35){
  16751. _c34+=_c35.nodeValue;
  16752. _c35=_c35.nextSibling;
  16753. }
  16754. var cd=eval("("+_c34+")");
  16755. this.AddContextData(cd);
  16756. }
  16757. }
  16758. }
  16759. if(_c2f&&typeof _c2f=="function"){
  16760. _c2f();
  16761. }
  16762. };
  16763. CCDManager.prototype.FetchContextData=function(_c37,_c38){
  16764. var _c39=[];
  16765. var c=null,_c3b=_c37.length;
  16766. for(var i=0;i<_c3b;++i){
  16767. c=_c37[i];
  16768. if(c!=""&&!this.ContextIdExists(c)){
  16769. _c39.push(c);
  16770. }
  16771. }
  16772. if(_c39.length){
  16773. if(this.m_oCV){
  16774. this.getContextData(_c39,_c38);
  16775. }
  16776. }
  16777. return _c39.length;
  16778. };
  16779. CCDManager.prototype.getContextData=function(_c3d,_c3e){
  16780. var oCV=this.m_oCV;
  16781. var _c40=new AsynchDataDispatcherEntry(oCV);
  16782. _c40.setCanBeQueued(false);
  16783. if(!oCV.isBux){
  16784. _c40.forceSynchronous();
  16785. }
  16786. var form=document["formWarpRequest"+oCV.getId()];
  16787. var _c42=oCV.getConversation();
  16788. var _c43=oCV.getTracking();
  16789. if(!_c43&&form&&form["m_tracking"]&&form["m_tracking"].value){
  16790. _c43=form["m_tracking"].value;
  16791. }
  16792. if(oCV.m_viewerFragment){
  16793. var _c44=oCV.getActiveRequest();
  16794. if(_c44&&_c44.getFormField("m_tracking")==_c43){
  16795. return;
  16796. }
  16797. }
  16798. var _c45={customArguments:[_c3e],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
  16799. if(oCV.getStatus()=="prompting"){
  16800. _c45["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
  16801. }
  16802. _c40.setCallbacks(_c45);
  16803. if(_c42&&oCV.envParams["ui.action"]!="view"){
  16804. _c40.addFormField("ui.action","getContext");
  16805. _c40.addFormField("ui.conversation",_c42);
  16806. }else{
  16807. var _c46=form["ui.object"];
  16808. if(typeof _c46.length!="undefined"&&_c46.length>1){
  16809. _c40.addFormField("ui.object",form["ui.object"][0].value);
  16810. }else{
  16811. _c40.addFormField("ui.object",form["ui.object"].value);
  16812. }
  16813. _c40.addFormField("ui.action","getObjectContext");
  16814. }
  16815. _c40.addFormField("cv.responseFormat","asynchDetailContext");
  16816. _c40.addFormField("context.format","initializer");
  16817. _c40.addFormField("context.type","reportService");
  16818. _c40.addFormField("context.selection",_c3d.join(","));
  16819. _c40.addNonEmptyStringFormField("m_tracking",_c43);
  16820. oCV.dispatchRequest(_c40);
  16821. };
  16822. CCDManager.prototype.ContextIdExists=function(_c47){
  16823. return (this.m_cd&&this.m_cd[_c47]?true:false);
  16824. };
  16825. CCDManager.prototype.HasContextData=function(){
  16826. return (this.m_cd?true:false);
  16827. };
  16828. CCDManager.prototype.HasMetadata=function(){
  16829. return (this.m_md?true:false);
  16830. };
  16831. CCDManager.prototype._getMDPropertyFromCD=function(_c48,_c49,_c4a){
  16832. var p=null;
  16833. this.FetchContextData([_c48]);
  16834. var cd=this.m_cd&&this.m_cd[_c48];
  16835. if(cd){
  16836. var md=this.m_md[cd[_c49]];
  16837. if(md){
  16838. p=md[_c4a];
  16839. }
  16840. }
  16841. return p;
  16842. };
  16843. CCDManager.prototype.GetDrillFlag=function(_c4e){
  16844. return this._getMDPropertyFromCD(_c4e,"r","drill");
  16845. };
  16846. CCDManager.prototype.getModelPathFromBookletItem=function(_c4f){
  16847. var mp=null;
  16848. var md=this.m_md[_c4f];
  16849. if(md){
  16850. mp=md.mp;
  16851. if(mp&&this.m_md[mp]){
  16852. mp=this.m_md[mp].mp;
  16853. }
  16854. }
  16855. return mp?mp:null;
  16856. };
  16857. CCDManager.prototype.GetBookletModelBasedDrillThru=function(_c52){
  16858. var p=null;
  16859. var md=this.m_md[_c52];
  16860. if(md){
  16861. p=md.modelBasedDrillThru;
  16862. }
  16863. return p?p:0;
  16864. };
  16865. CCDManager.prototype.GetDrillFlagForMember=function(_c55){
  16866. var _c56=null;
  16867. var d=this._getMDPropertyFromCD(_c55,"r","drill");
  16868. if(d!==null&&this.m_cd[_c55].m){
  16869. _c56=d;
  16870. }
  16871. return _c56;
  16872. };
  16873. CCDManager.prototype.GetDataType=function(_c58){
  16874. return this._getMDPropertyFromCD(_c58,"r","dtype");
  16875. };
  16876. CCDManager.prototype.GetUsage=function(_c59){
  16877. return this._getMDPropertyFromCD(_c59,"r","usage");
  16878. };
  16879. CCDManager.prototype.GetHUN=function(_c5a){
  16880. var hun=this._getMDPropertyFromCD(_c5a,"h","h");
  16881. if(!hun){
  16882. var h=this._getMDPropertyFromCD(_c5a,"r","h");
  16883. if(h){
  16884. hun=this.m_md[h].h;
  16885. }
  16886. }
  16887. if(hun!=null&&hun.indexOf("[__ns_")==0){
  16888. hun=null;
  16889. }
  16890. return hun;
  16891. };
  16892. CCDManager.prototype.GetQuery=function(_c5d){
  16893. var qry=null;
  16894. var q=this._getMDPropertyFromCD(_c5d,"r","q");
  16895. if(q){
  16896. qry=this.m_md[q].q;
  16897. }
  16898. return qry;
  16899. };
  16900. CCDManager.prototype.GetDepth=function(_c60){
  16901. return this._getMDPropertyFromCD(_c60,"r","level");
  16902. };
  16903. CCDManager.prototype.GetDisplayValue=function(_c61){
  16904. var _c62=null;
  16905. this.FetchContextData([_c61]);
  16906. if(this.ContextIdExists(_c61)&&this.m_cd[_c61]){
  16907. _c62=this.m_cd[_c61].u;
  16908. }
  16909. return _c62;
  16910. };
  16911. CCDManager.prototype.GetPUN=function(_c63){
  16912. return this._getMDPropertyFromCD(_c63,"p","p");
  16913. };
  16914. CCDManager.prototype.GetLUN=function(_c64){
  16915. return this._getMDPropertyFromCD(_c64,"l","l");
  16916. };
  16917. CCDManager.prototype.GetMUN=function(_c65){
  16918. return this._getMDPropertyFromCD(_c65,"m","m");
  16919. };
  16920. CCDManager.prototype.GetDUN=function(_c66){
  16921. return this._getMDPropertyFromCD(_c66,"d","d");
  16922. };
  16923. CCDManager.prototype.GetQMID=function(_c67){
  16924. return this._getMDPropertyFromCD(_c67,"i","i");
  16925. };
  16926. CCDManager.prototype.GetRDIValue=function(_c68){
  16927. return this._getMDPropertyFromCD(_c68,"r","r");
  16928. };
  16929. CCDManager.prototype.GetBIValue=function(_c69){
  16930. return this._getMDPropertyFromCD(_c69,"r","bi");
  16931. };
  16932. CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_c6c){
  16933. var _c6d=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
  16934. for(var _c6e=0;_c6e<_c6d.length;++_c6e){
  16935. var _c6f=_c6d[_c6e].expression;
  16936. var _c70=_c6d[_c6e].type;
  16937. if(_c6f==""){
  16938. continue;
  16939. }
  16940. for(var _c71 in this.m_md){
  16941. if(this.m_md[_c71][_c70]==_c6f){
  16942. for(var _c72 in this.m_md){
  16943. if(this.m_md[_c72].r&&this.m_md[_c72][_c70]==_c71){
  16944. if(this.m_md[_c72].drill!=0||_c6c==true){
  16945. for(var ctx in this.m_cd){
  16946. if(this.m_cd[ctx].r==_c72&&this.m_cd[ctx].m){
  16947. return ctx;
  16948. }
  16949. }
  16950. }
  16951. }
  16952. }
  16953. }
  16954. }
  16955. }
  16956. return "";
  16957. };
  16958. CCDManager.prototype.GetContextIdForMUN=function(mun){
  16959. var _c75=null;
  16960. var _c76=null;
  16961. for(var i in this.m_md){
  16962. if(this.m_md[i].m==mun){
  16963. _c75=i;
  16964. break;
  16965. }
  16966. }
  16967. if(_c75!=null){
  16968. for(var j in this.m_cd){
  16969. if(this.m_cd[j].m==_c75){
  16970. _c76=j;
  16971. break;
  16972. }
  16973. }
  16974. }
  16975. return _c76;
  16976. };
  16977. CCDManager.prototype.GetContextIdsForRDI=function(rdi){
  16978. var _c7a=[];
  16979. for(var i in this.m_md){
  16980. if(this.m_md[i].r==rdi){
  16981. _c7a.push(i);
  16982. }
  16983. }
  16984. return _c7a;
  16985. };
  16986. CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_c7d){
  16987. var _c7e=this.GetContextIdsForRDI(rdi);
  16988. for(var i in this.m_cd){
  16989. for(var j in _c7e){
  16990. if(this.m_cd[i].r==_c7e[j]&&this.m_cd[i].u==_c7d){
  16991. var _c81=this.m_cd[i].m;
  16992. if(_c81){
  16993. return this.m_md[_c81].m;
  16994. }
  16995. }
  16996. }
  16997. }
  16998. return null;
  16999. };
  17000. CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
  17001. var _c83=null;
  17002. var _c84=null;
  17003. var _c85=this.GetContextIdsForRDI(rdi);
  17004. this.FetchContextData([0]);
  17005. for(var i in this.m_cd){
  17006. for(var j in _c85){
  17007. if(this.m_cd[i].r==_c85[j]){
  17008. var _c88=parseFloat(this.m_cd[i].u);
  17009. if(_c88==this.m_cd[i].u){
  17010. if(_c83==null||_c88<_c83){
  17011. _c83=_c88;
  17012. }
  17013. if(_c84==null||_c88>_c84){
  17014. _c84=_c88;
  17015. }
  17016. }
  17017. }
  17018. }
  17019. }
  17020. if(_c83!=null&&_c84!=null){
  17021. return eval("({ pageMin: "+_c83+", pageMax: "+_c84+"})");
  17022. }
  17023. };
  17024. CCDManager.prototype.GetContextIdForDisplayValue=function(_c89){
  17025. var _c8a=null;
  17026. for(var i in this.m_cd){
  17027. if(this.m_cd[i].u==_c89){
  17028. _c8a=i;
  17029. break;
  17030. }
  17031. }
  17032. return _c8a;
  17033. };
  17034. CCDManager.prototype.GetContextIdForUseValue=function(_c8c){
  17035. var _c8d=null;
  17036. var _c8e=null;
  17037. var _c8f=null;
  17038. for(var i in this.m_md){
  17039. var md=this.m_md[i];
  17040. for(var j in md){
  17041. if(md[j]==_c8c){
  17042. _c8d=i;
  17043. _c8e=j;
  17044. break;
  17045. }
  17046. }
  17047. }
  17048. if(_c8d!=null){
  17049. for(var k in this.m_cd){
  17050. if(this.m_cd[k][_c8e]==_c8d){
  17051. _c8f=k;
  17052. break;
  17053. }
  17054. }
  17055. }
  17056. return _c8f;
  17057. };
  17058. CCDManager.prototype.getDataItemInfo=function(){
  17059. if(this.m_cd){
  17060. var _c94={};
  17061. this.m_dataItemInfo={};
  17062. for(var i in this.m_cd){
  17063. var _c96=this.m_cd[i].r;
  17064. if(typeof _c96!="undefined"){
  17065. var _c97=this.m_md[_c96].r;
  17066. if(this.m_dataItemInfo[_c97]==null){
  17067. this.m_dataItemInfo[_c97]=1;
  17068. }else{
  17069. this.m_dataItemInfo[_c97]++;
  17070. }
  17071. }
  17072. }
  17073. return CViewerCommon.toJSON(this.m_dataItemInfo);
  17074. }
  17075. return "";
  17076. };
  17077. CCDManager.prototype.DataItemInfoToJSON=function(){
  17078. return this.getDataItemInfo();
  17079. };
  17080. CCDManager.prototype.MetadataToJSON=function(){
  17081. if(this.m_md){
  17082. return CViewerCommon.toJSON(this.m_md);
  17083. }
  17084. return "";
  17085. };
  17086. CCDManager.prototype.ContextDataToJSON=function(){
  17087. if(this.m_cd){
  17088. return CViewerCommon.toJSON(this.m_cd);
  17089. }
  17090. return "";
  17091. };
  17092. CCDManager.prototype.ContextDataSubsetToJSON=function(_c98){
  17093. if(_c98<=0){
  17094. return this.ContextDataToJSON();
  17095. }
  17096. if(this.m_cd){
  17097. var _c99={};
  17098. var _c9a={};
  17099. for(var i in this.m_cd){
  17100. var _c9c=this.m_cd[i].r;
  17101. if(typeof _c9c!="undefined"){
  17102. if(_c99[_c9c]==null){
  17103. _c99[_c9c]=0;
  17104. }else{
  17105. _c99[_c9c]++;
  17106. }
  17107. if(_c99[_c9c]<_c98){
  17108. _c9a[i]=this.m_cd[i];
  17109. }
  17110. }
  17111. }
  17112. return CViewerCommon.toJSON(_c9a);
  17113. }
  17114. return "";
  17115. };
  17116. CCDManager.prototype.GetHUNForRDI=function(rdi,_c9e){
  17117. for(var i in this.m_md){
  17118. if(this.m_md[i].r==rdi&&this.m_md[i].q==_c9e){
  17119. var _ca0=this.m_md[i].h;
  17120. if(_ca0){
  17121. return this.m_md[_ca0].h;
  17122. }
  17123. }
  17124. }
  17125. return null;
  17126. };
  17127. CCDManager.prototype.GetMetadataIdForQueryName=function(_ca1){
  17128. for(var i in this.m_md){
  17129. if(this.m_md[i].q===_ca1){
  17130. return i;
  17131. }
  17132. }
  17133. return null;
  17134. };
  17135. CCDManager.prototype._isEmptyObject=function(obj){
  17136. for(var _ca4 in obj){
  17137. return false;
  17138. }
  17139. return true;
  17140. };
  17141. CCDManager.prototype.isMetadataEmpty=function(){
  17142. if(this.m_md){
  17143. return this._isEmptyObject(this.m_md);
  17144. }
  17145. return true;
  17146. };
  17147. CCDManager.prototype.GetBestPossibleItemName=function(_ca5){
  17148. var item=this.m_cd[_ca5];
  17149. if(!item){
  17150. return null;
  17151. }
  17152. if(item.l&&this.m_md[item.l].l){
  17153. return this._getStringInLastBracket(this.m_md[item.l].l);
  17154. }
  17155. if(item.r&&this.m_md[item.r].r){
  17156. return this._getStringInLastBracket(this.m_md[item.r].r);
  17157. }
  17158. if(item.h&&this.m_md[item.h].h){
  17159. return this._getStringInLastBracket(this.m_md[item.h].h);
  17160. }
  17161. if(item.i&&this.m_md[item.i].i){
  17162. return this._getStringInLastBracket(this.m_md[item.i].i);
  17163. }
  17164. return null;
  17165. };
  17166. CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_ca7){
  17167. var item=this.m_cd[_ca7];
  17168. if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){
  17169. return this._getStringInLastBracket(this.m_md[item.m].m);
  17170. }
  17171. return null;
  17172. };
  17173. CCDManager.prototype._getStringInLastBracket=function(str){
  17174. if(str&&str.indexOf("].[")>0){
  17175. var _caa=str.split("].[");
  17176. var _cab=_caa[_caa.length-1];
  17177. return _cab.substring(0,_cab.length-1);
  17178. }
  17179. return str;
  17180. };
  17181. CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_cac){
  17182. var _cad=this._getNamespaceAndDimensionFromUniqueName(_cac);
  17183. if(_cad&&this.m_md){
  17184. for(var _cae in this.m_md){
  17185. var sMun=this.m_md[_cae].m;
  17186. if(sMun&&sMun.length>0){
  17187. if(sMun.indexOf("->:[TM].")>0){
  17188. var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
  17189. if(oObj.dimension&&oObj.dimension===_cad.dimension&&oObj.namespace!==_cad.namespace){
  17190. var _cb1=_cac.indexOf(".");
  17191. return oObj.namespace+_cac.substr(_cb1,_cac.length);
  17192. }
  17193. }else{
  17194. var _cb2=sMun.indexOf("->:[");
  17195. if(_cb2>0){
  17196. if(sMun.substr(_cb2+4,4)!=="TM]."){
  17197. return _cac;
  17198. }
  17199. }
  17200. }
  17201. }
  17202. }
  17203. }
  17204. return _cac;
  17205. };
  17206. CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_cb3){
  17207. if(_cb3&&_cb3.length>0&&_cb3.indexOf("].[")>0){
  17208. var _cb4=_cb3.split("].[");
  17209. if(_cb4.length>1){
  17210. return {"namespace":_cb4[0]+"]","dimension":"["+_cb4[1]+"]"};
  17211. }
  17212. }
  17213. return null;
  17214. };
  17215. CCDManager.prototype.destroy=function(){
  17216. delete this.m_cd;
  17217. delete this.m_md;
  17218. delete this.m_oCV;
  17219. delete this.m_dataItemInfo;
  17220. };
  17221. function CSelectionXml(_cb5,_cb6,_cb7){
  17222. this.queries={};
  17223. this.burstContext=_cb5||"";
  17224. this.expressionLocale=_cb6||"";
  17225. this.contentLocale=_cb7||"";
  17226. };
  17227. function SC_SingleSelection(){
  17228. this.rows=[];
  17229. this.cols=[];
  17230. this.sections=[];
  17231. this.measures=[];
  17232. this.layoutElementId="";
  17233. };
  17234. function SC_SingleQuery(){
  17235. this.selections=[];
  17236. this.slicers=[];
  17237. this.filters=[];
  17238. };
  17239. function SC_SingleSlicer(){
  17240. };
  17241. function SC_SingleDetailFilter(){
  17242. };
  17243. function SC_SingleSummaryFilter(){
  17244. };
  17245. CSelectionXml.prototype.BuildSelectionFromController=function(sc){
  17246. if(sc){
  17247. var _cb9=sc.getAllSelectedObjects();
  17248. for(var s=0;s<_cb9.length;++s){
  17249. var _cbb=_cb9[s];
  17250. var _cbc=_cbb.getSelectedContextIds();
  17251. var muns=_cbb.getMuns();
  17252. var _cbe=muns.length;
  17253. var _cbf=new SC_SingleSelection();
  17254. _cbf.layoutElementId=_cbb.getLayoutElementId();
  17255. var _cc0=null;
  17256. for(var i=0;i<_cbe;++i){
  17257. var j,_cc3,_cc4;
  17258. if(i===0&&_cbe===1){
  17259. for(j=0;j<muns[i].length;++j){
  17260. _cc3=_cbc[i][j];
  17261. if(_cc3!=0){
  17262. if(j===0){
  17263. _cc0=sc.getRefQuery(_cc3);
  17264. _cc4=_cbb.getDisplayValues()[j];
  17265. this._buildMeasureSelection(sc,_cc3,_cbf.measures,_cc4,j,_cbb.getLayoutType());
  17266. }else{
  17267. if(sc.getUsageInfo(_cc3)!=2){
  17268. this._buildEdgeSelection(sc,_cc3,_cbf.cols,j);
  17269. }
  17270. }
  17271. }
  17272. }
  17273. }else{
  17274. for(j=0;j<muns[i].length;++j){
  17275. _cc3=_cbc[i][j];
  17276. if(_cc3!=0){
  17277. if(i===0){
  17278. _cc4=_cbb.getDisplayValues()[j];
  17279. _cc0=sc.getRefQuery(_cc3);
  17280. this._buildMeasureSelection(sc,_cc3,_cbf.measures,_cc4,j,_cbb.getLayoutType());
  17281. }else{
  17282. if(i===1){
  17283. this._buildEdgeSelection(sc,_cc3,_cbf.rows,j);
  17284. }else{
  17285. if(i===2){
  17286. this._buildEdgeSelection(sc,_cc3,_cbf.cols,j);
  17287. }else{
  17288. this._buildSectionSelection(sc,_cc3,_cbf.sections,j);
  17289. }
  17290. }
  17291. }
  17292. }
  17293. }
  17294. }
  17295. }
  17296. this.AddSelection(_cc0,_cbf);
  17297. }
  17298. }
  17299. };
  17300. CSelectionXml.prototype.AddSelection=function(_cc5,_cc6){
  17301. if(!this.queries[_cc5]){
  17302. this.queries[_cc5]=new SC_SingleQuery();
  17303. }
  17304. this.queries[_cc5].selections.push(_cc6);
  17305. };
  17306. CSelectionXml.prototype._buildMeasureSelection=function(sc,_cc8,_cc9,_cca,idx,_ccc){
  17307. if(_ccc==""||_ccc==null){
  17308. _ccc="datavalue";
  17309. }
  17310. if(_cc8){
  17311. _cc9.push({name:sc.getRefDataItem(_cc8),values:[{use:sc.getUseValue(_cc8),display:_cca}],order:idx,hun:sc.getHun(_cc8),dataType:_ccc,usage:sc.getUsageInfo(_cc8),dtype:sc.getDataType(_cc8),selection:"true"});
  17312. }
  17313. };
  17314. CSelectionXml.prototype._buildEdgeSelection=function(sc,_cce,_ccf,idx){
  17315. if(_cce){
  17316. _ccf.push({name:sc.getRefDataItem(_cce),values:[{use:this.getUseValue(sc,_cce),display:sc.getDisplayValue(_cce)}],order:idx,lun:sc.getLun(_cce),hun:sc.getHun(_cce),dataType:"columnTitle",usage:sc.getUsageInfo(_cce),dtype:sc.getDataType(_cce)});
  17317. }
  17318. };
  17319. CSelectionXml.prototype._buildSectionSelection=function(sc,_cd2,_cd3,idx){
  17320. if(_cd2){
  17321. _cd3.push({name:sc.getRefDataItem(_cd2),values:[{use:this.getUseValue(sc,_cd2),display:sc.getDisplayValue(_cd2)}],order:idx,lun:sc.getLun(_cd2),hun:sc.getHun(_cd2),dataType:"section",usage:sc.getUsageInfo(_cd2),dtype:sc.getDataType(_cd2),queryRef:sc.getRefQuery(_cd2)});
  17322. }
  17323. };
  17324. CSelectionXml.prototype.getUseValue=function(sc,_cd6){
  17325. var _cd7=sc.getMun(_cd6);
  17326. if(_cd7==""){
  17327. _cd7=sc.getUseValue(_cd6);
  17328. }
  17329. return _cd7;
  17330. };
  17331. CSelectionXml.prototype.toXml=function(){
  17332. var _cd8=XMLBuilderCreateXMLDocument("selections");
  17333. var _cd9=_cd8.documentElement;
  17334. XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  17335. XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  17336. XMLBuilderSetAttributeNodeNS(_cd9,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  17337. XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  17338. XMLBuilderSetAttributeNodeNS(_cd9,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  17339. _cd9.setAttribute("contentLocale",this.contentLocale);
  17340. _cd9.setAttribute("expressionLocale",this.expressionLocale);
  17341. for(var q in this.queries){
  17342. this._queryToXml(_cd9,q,this.queries[q]);
  17343. }
  17344. this._burstToXml(_cd9);
  17345. return XMLBuilderSerializeNode(_cd8);
  17346. };
  17347. CSelectionXml.prototype._queryToXml=function(_cdb,name,obj){
  17348. var _cde=_cdb.ownerDocument.createElement("query");
  17349. _cde.setAttribute("name",name);
  17350. for(var _cdf=0;_cdf<obj.selections.length;++_cdf){
  17351. this._selectionToXml(_cde,obj.selections[_cdf]);
  17352. }
  17353. for(var _ce0=0;_ce0<obj.slicers.length;++_ce0){
  17354. this._slicersToXml(_cde,obj.slicers[_ce0]);
  17355. }
  17356. for(var _ce1=0;_ce1<obj.selections.length;++_ce1){
  17357. this._filtersToXml(_cde,obj.selections[_ce1]);
  17358. }
  17359. _cdb.appendChild(_cde);
  17360. };
  17361. CSelectionXml.prototype._selectionToXml=function(_ce2,_ce3){
  17362. var doc=_ce2.ownerDocument;
  17363. var _ce5=doc.createElement("selection");
  17364. _ce2.appendChild(_ce5);
  17365. this._edgeToXml(_ce5,"row",_ce3.rows);
  17366. this._edgeToXml(_ce5,"column",_ce3.cols);
  17367. this._edgeToXml(_ce5,"measure",_ce3.measures);
  17368. this._edgeToXml(_ce5,"section",_ce3.sections);
  17369. var _ce6=doc.createElement("layoutElementId");
  17370. _ce6.appendChild(doc.createTextNode(_ce3.layoutElementId));
  17371. _ce5.appendChild(_ce6);
  17372. };
  17373. CSelectionXml.prototype._edgeToXml=function(_ce7,_ce8,_ce9){
  17374. var doc=_ce7.ownerDocument;
  17375. var _ceb=doc.createElement(_ce8+"s");
  17376. _ce7.appendChild(_ceb);
  17377. for(var i=0;i<_ce9.length;++i){
  17378. var _ced=doc.createElement(_ce8);
  17379. _ceb.appendChild(_ced);
  17380. var edge=_ce9[i];
  17381. for(var j in edge){
  17382. if(j!=="name"&&j!=="values"){
  17383. _ced.setAttribute(j,edge[j]!==null?edge[j]:"");
  17384. }
  17385. }
  17386. this._itemToXml(_ced,edge.name,edge.values);
  17387. }
  17388. };
  17389. CSelectionXml.prototype._itemToXml=function(_cf0,name,_cf2){
  17390. var doc=_cf0.ownerDocument;
  17391. var _cf4=doc.createElement("item");
  17392. XMLBuilderSetAttributeNodeNS(_cf4,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  17393. var _cf5=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",doc);
  17394. XMLBuilderSetAttributeNodeNS(_cf5,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  17395. _cf5.appendChild(doc.createTextNode(name));
  17396. _cf4.appendChild(_cf5);
  17397. var _cf6=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",doc);
  17398. XMLBuilderSetAttributeNodeNS(_cf6,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  17399. XMLBuilderSetAttributeNodeNS(_cf6,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  17400. _cf4.appendChild(_cf6);
  17401. for(var j=0;j<_cf2.length;j++){
  17402. var _cf8=doc.createElement("item");
  17403. XMLBuilderSetAttributeNodeNS(_cf8,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  17404. var _cf9=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",doc);
  17405. XMLBuilderSetAttributeNodeNS(_cf9,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  17406. if(_cf2[j].use){
  17407. _cf9.appendChild(doc.createTextNode(_cf2[j].use));
  17408. }else{
  17409. if(_cf2[j].display){
  17410. _cf9.appendChild(doc.createTextNode(_cf2[j].display));
  17411. }else{
  17412. _cf9.appendChild(doc.createTextNode(""));
  17413. }
  17414. }
  17415. var _cfa=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",doc);
  17416. XMLBuilderSetAttributeNodeNS(_cfa,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  17417. if(_cf2[j].display){
  17418. _cfa.appendChild(doc.createTextNode(_cf2[j].display));
  17419. }else{
  17420. _cfa.appendChild(doc.createTextNode(""));
  17421. }
  17422. _cf8.appendChild(_cf9);
  17423. _cf8.appendChild(_cfa);
  17424. _cf6.appendChild(_cf8);
  17425. }
  17426. _cf0.appendChild(_cf4);
  17427. };
  17428. CSelectionXml.prototype._burstToXml=function(_cfb){
  17429. var doc=_cfb.ownerDocument;
  17430. var _cfd=doc.createElement("burst-context");
  17431. _cfd.appendChild(doc.createTextNode(this.burstContext));
  17432. _cfb.appendChild(_cfd);
  17433. };
  17434. CSelectionXml.prototype._slicersToXml=function(_cfe,_cff){
  17435. };
  17436. CSelectionXml.prototype._filtersToXml=function(_d00,_d01){
  17437. };
  17438. CSubscriptionManager.k_SubscriptionWizardName="subscriptionWizard";
  17439. function CSubscriptionManager(cv){
  17440. this.m_cv=cv;
  17441. this.m_bInitialized=false;
  17442. this.m_aWatchRules=null;
  17443. this.m_sEmail="";
  17444. this.m_sAlertNewVersionConfirm="";
  17445. this.m_sQueryNotificationResponse="";
  17446. this.m_bAllowNotification=false;
  17447. this.m_bAllowSubscription=false;
  17448. this.m_bCanCreateNewWatchRule=false;
  17449. this.m_bCanGetNotified=false;
  17450. this.m_bAllowAnnotations=false;
  17451. this.m_bCanCreateAnnotations=false;
  17452. this.m_windowOptions="width=450,height=350,toolbar=0,location=0,status=0,menubar=0,resizable,scrollbars=1";
  17453. };
  17454. CSubscriptionManager.prototype.getViewer=function(){
  17455. return this.m_cv;
  17456. };
  17457. CSubscriptionManager.prototype.Initialize=function(_d03){
  17458. try{
  17459. var _d04=_d03.getJSONResponseObject();
  17460. var _d05=document.forms["formWarpRequest"+this.m_cv.getId()];
  17461. if(_d04["annotationInfo"]){
  17462. var _d06=_d04["annotationInfo"];
  17463. this.m_AnnotationsCount=_d06.annotations.length;
  17464. this.m_annotations=_d06.annotations;
  17465. this.m_bAllowAnnotations=_d06.allowAnnotations;
  17466. this.m_bCanCreateAnnotations=_d06.traverse=="true";
  17467. return true;
  17468. }
  17469. if(_d04["subscriptionInfo"]){
  17470. var _d07=_d04["subscriptionInfo"];
  17471. if(!this.m_bInitialized){
  17472. this.m_sEmail=_d07.sEmail;
  17473. this.m_bAllowNotification=_d07.bAllowNotification;
  17474. this.m_bAllowSubscription=_d07.bAllowSubscription;
  17475. this.m_sAlertNewVersionConfirm=_d07.sAlertNewVersionConfirm;
  17476. if(_d05["ui.action"]&&_d05["ui.action"].value=="view"){
  17477. if(_d05["ui.format"]){
  17478. this.m_bCanCreateNewWatchRule=(_d05["ui.format"].value=="HTML")&&this.m_cv.bCanUseCognosViewerConditionalSubscriptions&&this.m_bAllowSubscription;
  17479. }
  17480. this.m_bCanGetNotified=(!_d05["ui.burstKey"]||(_d05["ui.burstKey"]&&_d05["ui.burstKey"].value==""))&&this.m_bAllowNotification;
  17481. }
  17482. }
  17483. if(_d07.sQueryNotificationResponse){
  17484. this.m_sQueryNotificationResponse=_d07.sQueryNotificationResponse;
  17485. }
  17486. if(_d07.aWatchRules){
  17487. var _d08=_d07.aWatchRules;
  17488. this.m_aWatchRules=[];
  17489. for(var i=0;i<_d08.length;i++){
  17490. this.m_aWatchRules.push(_d08[i]);
  17491. }
  17492. }
  17493. this.m_bInitialized=true;
  17494. return true;
  17495. }
  17496. }
  17497. catch(exception){
  17498. return false;
  17499. }
  17500. return false;
  17501. };
  17502. CSubscriptionManager.prototype.IsValidSelectionForNewRule=function(){
  17503. var _d0a=this.m_cv.getSelectionController();
  17504. if(_d0a&&!_d0a.hasSelectedChartNodes()){
  17505. var _d0b=_d0a.getAllSelectedObjects();
  17506. if(_d0b.length===1){
  17507. if(_d0b[0]!=null&&_d0b[0].getLayoutType()!="columnTitle"){
  17508. return true;
  17509. }
  17510. }
  17511. }
  17512. return false;
  17513. };
  17514. CSubscriptionManager.prototype.CanCreateNewWatchRule=function(){
  17515. if(typeof this.m_cv.UIBlacklist!="undefined"&&this.m_cv.UIBlacklist.indexOf(" RV_TOOLBAR_BUTTONS_ALERT_USING_NEW_WATCH_RULE ")!=-1){
  17516. return false;
  17517. }
  17518. if(!this.m_bInitialized&&this.getViewer().envParams["ui.action"]=="view"){
  17519. var oCV=this.getViewer();
  17520. var _d0d=new JSONDispatcherEntry(oCV);
  17521. _d0d.setKey("subscriptionManager");
  17522. _d0d.forceSynchronous();
  17523. _d0d.addFormField("ui.action","getSubscriptionInfo");
  17524. _d0d.addFormField("cv.responseFormat","subscriptionManager");
  17525. _d0d.addFormField("contextMenu","true");
  17526. this.addCommonFormFields(_d0d);
  17527. _d0d.setCallbacks({"complete":{"object":this,"method":this.Initialize}});
  17528. oCV.dispatchRequest(_d0d);
  17529. }
  17530. return this.m_bCanCreateNewWatchRule;
  17531. };
  17532. CSubscriptionManager.prototype.CanModifyWatchRule=function(){
  17533. return this.m_cv.bCanUseCognosViewerConditionalSubscriptions&&this.m_bAllowSubscription;
  17534. };
  17535. CSubscriptionManager.prototype.CanGetNotified=function(){
  17536. if(typeof this.m_cv.UIBlacklist!="undefined"&&this.m_cv.UIBlacklist.indexOf(" RV_TOOLBAR_BUTTONS_ALERT_ABOUT_NEW_VERSIONS ")!=-1){
  17537. return false;
  17538. }
  17539. return this.m_bCanGetNotified;
  17540. };
  17541. CSubscriptionManager.prototype.UpdateSubscribeMenu=function(){
  17542. var _d0e=this.getStandaloneViewerToolbarControl();
  17543. var _d0f=_d0e?_d0e.getItem("watchNewVersions"):null;
  17544. var _d10=this.m_cv.getWebContentRoot();
  17545. var _d11=this.m_cv.getSkin();
  17546. if(_d0f){
  17547. var _d12=_d0f.getMenu();
  17548. this.ClearSubscriptionMenu();
  17549. var _d13=false;
  17550. if(this.CanGetNotified()){
  17551. if(this.m_sQueryNotificationResponse=="on"){
  17552. new CMenuItem(_d12,RV_RES.RV_DO_NOT_ALERT_NEW_VERSION,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().DeleteNotification();",_d10+"/rv/images/action_remove_from_list.gif",gMenuItemStyle,_d10,_d11);
  17553. _d13=true;
  17554. }else{
  17555. if(this.m_sQueryNotificationResponse=="off"&&this.m_sEmail!=""){
  17556. new CMenuItem(_d12,RV_RES.RV_ALERT_NEW_VERSION,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().AddNotification();",_d10+"/rv/images/action_add_to_list.gif",gMenuItemStyle,_d10,_d11);
  17557. _d13=true;
  17558. }
  17559. }
  17560. }
  17561. if(this.CanCreateNewWatchRule()){
  17562. if(_d13){
  17563. _d12.add(gMenuSeperator);
  17564. }
  17565. var _d14=new CMenuItem(_d12,RV_RES.RV_NEW_WATCH_RULE,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().NewSubscription();",_d10+"/rv/images/action_new_subscription.gif",gMenuItemStyle,_d10,_d11);
  17566. if(!this.IsValidSelectionForNewRule()){
  17567. _d14.disable();
  17568. }
  17569. _d13=true;
  17570. }
  17571. var _d15="";
  17572. if(typeof this.m_cv.UIBlacklist!="undefined"){
  17573. _d15=this.m_cv.UIBlacklist;
  17574. }
  17575. var _d16;
  17576. if(_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES ")==-1){
  17577. if(_d13){
  17578. _d12.add(gMenuSeperator);
  17579. }
  17580. if(this.m_aWatchRules&&this.m_aWatchRules.length>0){
  17581. var _d17=this.CanModifyWatchRule();
  17582. for(var sub=0;sub<this.m_aWatchRules.length;++sub){
  17583. var menu=new CMenuItem(_d12,this.m_aWatchRules[sub].name,"",_d10+"/rv/images/icon_subscription.gif",gMenuItemStyle,_d10,_d11);
  17584. var _d1a=menu.createCascadedMenu(gMenuStyle);
  17585. _d1a.m_oCV=this.m_cv;
  17586. if(_d17&&_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES_MODIFY ")==-1){
  17587. new CMenuItem(_d1a,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifySubscription("+sub+");",_d10+"/rv/images/action_edit.gif",gMenuItemStyle,_d10,_d11);
  17588. }
  17589. if(_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES_DELETE ")==-1){
  17590. new CMenuItem(_d1a,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteSubscription("+sub+");",_d10+"/rv/images/action_delete.gif",gMenuItemStyle,_d10,_d11);
  17591. }
  17592. }
  17593. }else{
  17594. _d16=new CMenuItem(_d12,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d10,_d11);
  17595. _d16.disable();
  17596. }
  17597. }
  17598. if(_d12.getNumItems()==0){
  17599. _d16=new CMenuItem(_d12,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d10,_d11);
  17600. _d16.disable();
  17601. }
  17602. _d12.setForceCallback(false);
  17603. _d12.draw();
  17604. if(_d12.isVisible()){
  17605. _d12.show();
  17606. }
  17607. _d12.setForceCallback(true);
  17608. }
  17609. };
  17610. CSubscriptionManager.prototype.UpdateAnnotationMenu=function(){
  17611. var _d1b=this.getStandaloneViewerToolbarControl();
  17612. var _d1c=_d1b?_d1b.getItem("addAnnotations"):null;
  17613. var _d1d=this.m_cv.getWebContentRoot();
  17614. var _d1e=this.m_cv.getSkin();
  17615. var _d1f=_d1c.getMenu();
  17616. this.ClearAnnotationMenu();
  17617. var menu=new CMenuItem(_d1f,RV_RES.RV_NEW_COMMENT,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().NewAnnotation();",_d1d+"/rv/images/action_comment_add.gif",gMenuItemStyle,_d1d,_d1e);
  17618. var _d21=this.m_annotations.length;
  17619. if(_d21>0){
  17620. _d1f.add(gMenuSeperator);
  17621. }
  17622. if(!this.m_bAllowAnnotations||!this.m_bCanCreateAnnotations){
  17623. menu.disable();
  17624. }
  17625. var _d22;
  17626. var bidi=isViewerBidiEnabled()?BidiUtils.getInstance():null;
  17627. for(var i=0;i<_d21;i++){
  17628. var _d25=this.m_annotations[i].defaultName;
  17629. _d22=_d25.length>60?_d25.substring(0,60)+"...":_d25;
  17630. if(isViewerBidiEnabled()){
  17631. _d22=bidi.btdInjectUCCIntoStr(_d22,getViewerBaseTextDirection());
  17632. }
  17633. var _d26=Boolean(this.m_annotations[i].permissions.read);
  17634. var _d27=Boolean(this.m_annotations[i].permissions.write);
  17635. var _d28=Boolean(this.m_annotations[i].permissions.traverse)&&Boolean(this.m_annotations[i].permissions.write);
  17636. var _d29="javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");";
  17637. var _d2a="javascript:alert('Permission denied')";
  17638. _d29=_d26?_d29:_d2a;
  17639. if(i>0&&this.m_annotations[i].layoutElementId!=this.m_annotations[i-1].layoutElementId){
  17640. _d1f.add(gMenuSeperator);
  17641. }
  17642. var _d2b="/rv/images/action_comment.gif";
  17643. if(this.m_annotations[i].layoutElementId!=""){
  17644. _d2b="/rv/images/action_subscribe.gif";
  17645. }
  17646. menu=new CMenuItem(_d1f,_d22,_d29,_d1d+_d2b,gMenuItemStyle,_d1d,_d1e);
  17647. var _d2c=menu.createCascadedMenu(gMenuStyle);
  17648. var _d2d=new CInfoPanel("300px",_d1d,_d2c.getId()+"_comments");
  17649. _d2d.setParent(_d2c);
  17650. _d25=this.m_annotations[i].defaultName;
  17651. var _d2e=_d25.length>60?_d25.substring(0,60)+"...":_d25;
  17652. if(isViewerBidiEnabled()){
  17653. _d2e=bidi.btdInjectUCCIntoStr(_d2e,getViewerBaseTextDirection());
  17654. }
  17655. _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_NAME,html_encode(_d2e));
  17656. _d2d.addSpacer(4);
  17657. var cmnt=this.m_annotations[i].description;
  17658. var _d30=cmnt.length>590?cmnt.substring(0,590)+"...":cmnt;
  17659. if(isViewerBidiEnabled()){
  17660. _d30=bidi.btdInjectUCCIntoStr(_d30,getViewerBaseTextDirection());
  17661. }
  17662. _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_CONTENTS,replaceNewLine(html_encode(_d30)));
  17663. _d2d.addSpacer(4);
  17664. var _d31=this.m_annotations[i].modificationTime;
  17665. if(isViewerBidiEnabled()){
  17666. _d31=bidi.btdInjectUCCIntoStr(_d31,getViewerBaseTextDirection());
  17667. }
  17668. _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_MODTIME,_d31);
  17669. var _d32=this.m_annotations[i].owner.defaultName;
  17670. if(isViewerBidiEnabled()){
  17671. _d32=bidi.btdInjectUCCIntoStr(_d32,getViewerBaseTextDirection());
  17672. }
  17673. _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_OWNER,_d32);
  17674. _d2c.add(_d2d);
  17675. if(_d27||_d28){
  17676. _d2c.add(gMenuSeperator);
  17677. }
  17678. new CMenuItem(_d2c,RV_RES.RV_VIEW_COMMENT,this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");",_d1d+"/rv/images/action_comment_view.gif",gMenuItemStyle,_d1d,_d1e);
  17679. if(_d27){
  17680. new CMenuItem(_d2c,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifyAnnotation("+i+");",_d1d+"/rv/images/action_comment_modify.gif",gMenuItemStyle,_d1d,_d1e);
  17681. }
  17682. if(_d28){
  17683. new CMenuItem(_d2c,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteAnnotation("+i+");",_d1d+"/rv/images/action_comment_delete.gif",gMenuItemStyle,_d1d,_d1e);
  17684. }
  17685. }
  17686. _d1f.setForceCallback(false);
  17687. _d1f.draw();
  17688. if(_d1f.isVisible()){
  17689. _d1f.show();
  17690. }
  17691. _d1f.setForceCallback(true);
  17692. };
  17693. CSubscriptionManager.prototype.AddNotification=function(){
  17694. alert(this.m_sAlertNewVersionConfirm);
  17695. var oCV=this.getViewer();
  17696. var _d34=new DataDispatcherEntry(oCV);
  17697. _d34.setKey("subscriptionManager");
  17698. _d34.addFormField("ui.action","addNotification");
  17699. _d34.addFormField("cv.responseFormat","data");
  17700. this.addCommonFormFields(_d34);
  17701. oCV.dispatchRequest(_d34);
  17702. };
  17703. CSubscriptionManager.prototype.DeleteNotification=function(){
  17704. alert(RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM);
  17705. var oCV=this.getViewer();
  17706. var _d36=new DataDispatcherEntry(oCV);
  17707. _d36.setKey("subscriptionManager");
  17708. _d36.addFormField("ui.action","deleteNotification");
  17709. _d36.addFormField("cv.responseFormat","data");
  17710. this.addCommonFormFields(_d36);
  17711. oCV.dispatchRequest(_d36);
  17712. };
  17713. CSubscriptionManager.prototype.NewAnnotation=function(){
  17714. var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()];
  17715. var _d38=oFWR["ui.object"].value;
  17716. var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
  17717. GUtil.createFormField(form,"ui.object",_d38);
  17718. GUtil.createFormField(form,"b_action","xts.run");
  17719. GUtil.createFormField(form,"m","rv/annotation1.xts");
  17720. GUtil.createFormField(form,"backURL","javascript:window.close();");
  17721. GUtil.createFormField(form,"action_hint","create");
  17722. var _d3a=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
  17723. window.open(_d3a,form.target,this.m_windowOptions);
  17724. };
  17725. CSubscriptionManager.prototype.ViewAnnotation=function(idx){
  17726. var sub=this.m_annotations[idx];
  17727. var _d3d=sub.searchPath;
  17728. var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
  17729. GUtil.createFormField(form,"ui.object",_d3d);
  17730. GUtil.createFormField(form,"b_action","xts.run");
  17731. GUtil.createFormField(form,"m","rv/annotation1.xts");
  17732. GUtil.createFormField(form,"backURL","javascript:window.close();");
  17733. var _d3f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
  17734. window.open(_d3f,form.target,this.m_windowOptions);
  17735. };
  17736. CSubscriptionManager.prototype.ModifyAnnotation=function(idx){
  17737. var sub=this.m_annotations[idx];
  17738. var _d42=this.m_annotations[idx].searchPath;
  17739. if(sub&&_d42){
  17740. var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
  17741. GUtil.createFormField(form,"ui.object",_d42);
  17742. GUtil.createFormField(form,"b_action","xts.run");
  17743. GUtil.createFormField(form,"m","rv/annotation1.xts");
  17744. GUtil.createFormField(form,"backURL","javascript:window.close();");
  17745. GUtil.createFormField(form,"action_hint","save");
  17746. var _d44=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
  17747. window.open(_d44,form.target,this.m_windowOptions);
  17748. }
  17749. };
  17750. CSubscriptionManager.prototype.DeleteAnnotation=function(idx){
  17751. var sub=this.m_annotations[idx];
  17752. if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){
  17753. var oCV=this.getViewer();
  17754. var _d48=new DataDispatcherEntry(oCV);
  17755. _d48.setKey("subscriptionManager");
  17756. _d48.addFormField("ui.action","deleteAnnotation");
  17757. _d48.addFormField("cv.responseFormat","data");
  17758. this.addCommonFormFields(_d48,sub.searchPath);
  17759. oCV.dispatchRequest(_d48);
  17760. }
  17761. };
  17762. CSubscriptionManager.prototype.NewSubscription=function(){
  17763. var sc=this.m_cv.getSelectionController();
  17764. var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()];
  17765. var _d4b=oFWR.reRunObj.value;
  17766. if(_d4b&&sc&&sc.getAllSelectedObjects().length===1){
  17767. var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
  17768. var fWR=document.getElementById("formWarpRequest"+this.m_cv.getId());
  17769. var _d4e=new CSelectionXml(fWR["ui.burstID"].value,fWR["ui.contentLocale"].value,fWR["ui.outputLocale"].value);
  17770. _d4e.BuildSelectionFromController(sc);
  17771. GUtil.createFormField(form,"rv.selectionSpecXML",_d4e.toXml());
  17772. GUtil.createFormField(form,"rv.periodicalProducer",_d4b);
  17773. GUtil.createFormField(form,"b_action","xts.run");
  17774. GUtil.createFormField(form,"m","subscribe/conditional_subscribe1.xts");
  17775. GUtil.createFormField(form,"backURL","javascript:window.close();");
  17776. var _d4f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
  17777. window.open(_d4f,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1");
  17778. }else{
  17779. }
  17780. };
  17781. CSubscriptionManager.prototype.DeleteSubscription=function(idx){
  17782. var sub=this.m_aWatchRules[idx];
  17783. if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){
  17784. var oCV=this.getViewer();
  17785. var _d53=new DataDispatcherEntry(oCV);
  17786. _d53.setKey("subscriptionManager");
  17787. _d53.addFormField("ui.action","deleteSubscription");
  17788. _d53.addFormField("cv.responseFormat","data");
  17789. this.addCommonFormFields(_d53,sub.searchPath);
  17790. oCV.dispatchRequest(_d53);
  17791. }
  17792. };
  17793. CSubscriptionManager.prototype.ModifySubscription=function(idx){
  17794. var sub=this.m_aWatchRules[idx];
  17795. if(sub&&sub.searchPath){
  17796. var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
  17797. GUtil.createFormField(form,"m_obj",sub.searchPath);
  17798. GUtil.createFormField(form,"m_name",sub.name);
  17799. GUtil.createFormField(form,"b_action","xts.run");
  17800. GUtil.createFormField(form,"m_class","reportDataServiceAgentDefinition");
  17801. GUtil.createFormField(form,"m","portal/properties_subscription.xts");
  17802. GUtil.createFormField(form,"backURL","javascript:window.close();");
  17803. var _d57=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
  17804. window.open(_d57,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1");
  17805. }
  17806. };
  17807. CSubscriptionManager.prototype.OpenSubscriptionMenu=function(){
  17808. var oCV=this.getViewer();
  17809. var _d59=new JSONDispatcherEntry(oCV);
  17810. _d59.setKey("subscriptionManager");
  17811. _d59.addFormField("ui.action","getSubscriptionInfo");
  17812. _d59.addFormField("cv.responseFormat","subscriptionManager");
  17813. this.addCommonFormFields(_d59);
  17814. _d59.setCallbacks({"complete":{"object":this,"method":this.OpenSubscriptionMenuResponse}});
  17815. oCV.dispatchRequest(_d59);
  17816. };
  17817. CSubscriptionManager.prototype.OpenAnnotationMenu=function(){
  17818. var oCV=this.getViewer();
  17819. var _d5b=new JSONDispatcherEntry(oCV);
  17820. _d5b.setKey("subscriptionManager");
  17821. _d5b.addFormField("ui.action","getAnnotationInfo");
  17822. _d5b.addFormField("cv.responseFormat","getAnnotations");
  17823. var _d5c=oCV.envParams["ui.object"];
  17824. this.addCommonFormFields(_d5b,_d5c?_d5c:"");
  17825. _d5b.setCallbacks({"complete":{"object":this,"method":this.OpenAnnotationMenuResponse}});
  17826. oCV.dispatchRequest(_d5b);
  17827. };
  17828. CSubscriptionManager.prototype.OpenAnnotationMenuResponse=function(_d5d){
  17829. if(this.Initialize(_d5d)){
  17830. this.UpdateAnnotationMenu();
  17831. }else{
  17832. this.ClearAnnotationMenu();
  17833. }
  17834. };
  17835. CSubscriptionManager.prototype.OpenSubscriptionMenuResponse=function(_d5e){
  17836. if(this.Initialize(_d5e)){
  17837. this.UpdateSubscribeMenu();
  17838. }else{
  17839. this.AddEmptySubscriptionMenuItem();
  17840. }
  17841. };
  17842. CSubscriptionManager.prototype.addCommonFormFields=function(_d5f,_d60){
  17843. if(_d60&&_d60!=""){
  17844. _d5f.addFormField("ui.object",_d60);
  17845. }else{
  17846. var _d61=document["formWarpRequest"+this.getViewer().getId()];
  17847. if(_d61&&_d61["reRunObj"]){
  17848. _d5f.addFormField("ui.object",_d61["reRunObj"].value);
  17849. }
  17850. }
  17851. if(_d5f.getFormField("ui.action")=="getSubscriptionInfo"){
  17852. _d5f.addFormField("initialized",this.m_bInitialized?"true":"false");
  17853. }
  17854. _d5f.addFormField("cv.id",this.getViewer().getId());
  17855. };
  17856. CSubscriptionManager.prototype.AddEmptySubscriptionMenuItem=function(){
  17857. var _d62=this.getStandaloneViewerToolbarControl();
  17858. if(_d62){
  17859. var _d63=_d62.getItem("watchNewVersions");
  17860. if(_d63){
  17861. _d63.getMenu().clear();
  17862. }
  17863. var _d64=this.m_cv.getWebContentRoot();
  17864. var _d65=this.m_cv.getSkin();
  17865. var _d66=_d63.getMenu();
  17866. var _d67=new CMenuItem(_d66,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d64,_d65);
  17867. _d67.disable();
  17868. _d66.setForceCallback(false);
  17869. _d66.draw();
  17870. if(_d66.isVisible()){
  17871. _d66.show();
  17872. }
  17873. _d66.setForceCallback(true);
  17874. }
  17875. };
  17876. CSubscriptionManager.prototype.ClearSubscriptionMenu=function(){
  17877. var _d68=this.getStandaloneViewerToolbarControl();
  17878. if(_d68){
  17879. var _d69=_d68.getItem("watchNewVersions");
  17880. if(_d69){
  17881. _d69.getMenu().clear();
  17882. }
  17883. }
  17884. };
  17885. CSubscriptionManager.prototype.ClearAnnotationMenu=function(){
  17886. var _d6a=this.getStandaloneViewerToolbarControl();
  17887. if(_d6a){
  17888. var _d6b=_d6a.getItem("addAnnotations");
  17889. if(_d6b){
  17890. _d6b.getMenu().clear();
  17891. }
  17892. }
  17893. };
  17894. CSubscriptionManager.prototype.ClearContextAnnotationMenu=function(){
  17895. var _d6c=this.getStandaloneViewerContextMenu();
  17896. if(_d6c){
  17897. var _d6d=_d6c.getFindCommentMenuItem();
  17898. if(_d6d){
  17899. _d6d.getMenu().clear();
  17900. }
  17901. }
  17902. };
  17903. CSubscriptionManager.prototype.getStandaloneViewerToolbarControl=function(){
  17904. if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getToolbarControl=="function"){
  17905. return this.m_cv.rvMainWnd.getToolbarControl();
  17906. }else{
  17907. return null;
  17908. }
  17909. };
  17910. CSubscriptionManager.prototype.getStandaloneViewerContextMenu=function(){
  17911. if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getContextMenu=="function"){
  17912. return this.m_cv.rvMainWnd.getContextMenu();
  17913. }else{
  17914. return null;
  17915. }
  17916. };
  17917. var GUtil={};
  17918. GUtil.createHiddenForm=function(name,_d6f,_d70,_d71){
  17919. var form=document.getElementById(name);
  17920. if(form){
  17921. document.body.removeChild(form);
  17922. }
  17923. form=document.createElement("form");
  17924. form.id=name;
  17925. form.name=name;
  17926. form.method=_d6f;
  17927. form.style.display="none";
  17928. form.action=document.forms["formWarpRequest"+_d70].action;
  17929. form.target=_d71+(new Date()).getTime();
  17930. document.body.appendChild(form);
  17931. return form;
  17932. };
  17933. GUtil.createFormField=function(el,name,_d75){
  17934. var _d76=document.createElement("input");
  17935. _d76.type="hidden";
  17936. _d76.name=name;
  17937. _d76.value=_d75;
  17938. el.appendChild(_d76);
  17939. };
  17940. GUtil.generateCallback=function(func,_d78,_d79){
  17941. if(func){
  17942. var _d7a=_d79||this;
  17943. _d78=(_d78 instanceof Array)?_d78:[];
  17944. return (function(_d7b){
  17945. if(typeof _d7b!="undefined"&&_d78.length==0){
  17946. _d78.push(_d7b);
  17947. }
  17948. return func.apply(_d7a,_d78);
  17949. });
  17950. }else{
  17951. return (function(){
  17952. });
  17953. }
  17954. };
  17955. GUtil.destroyProperties=function(_d7c,_d7d){
  17956. var _d7e;
  17957. if(_d7c instanceof Array){
  17958. for(var i=0;i<_d7c.length;i++){
  17959. _d7e=_d7c[i];
  17960. if(_d7e instanceof String){
  17961. _d7e=null;
  17962. }else{
  17963. if(_d7e&&_d7e.destroy&&!_d7e._beingDestroyed){
  17964. _d7e.destroy();
  17965. }
  17966. GUtil.destroyProperties(_d7e);
  17967. }
  17968. }
  17969. }else{
  17970. if(_d7c instanceof Object){
  17971. if(_d7c._beingDestroyed){
  17972. return;
  17973. }
  17974. var obj=_d7c;
  17975. obj._beingDestroyed=true;
  17976. for(var _d81 in obj){
  17977. _d7e=obj[_d81];
  17978. if(_d81==="_beingDestroyed"||_d81==="m_destroyed"||_d81==="_destroyed"||typeof _d7e=="function"){
  17979. continue;
  17980. }
  17981. if(_d7e instanceof Array){
  17982. GUtil.destroyProperties(_d7e);
  17983. }else{
  17984. if(_d7e instanceof Object){
  17985. if(typeof _d7e.destroy=="function"&&!_d7e._destroyed&&(_d7e!==CCognosViewer||_d7d)){
  17986. _d7e.destroy();
  17987. }
  17988. }
  17989. }
  17990. delete obj[_d81];
  17991. }
  17992. }
  17993. }
  17994. };
  17995. cvLoadDialog=function(_d82,_d83,_d84,_d85,_d86,_d87){
  17996. _d87=((_d87===undefined)?true:_d87);
  17997. var _d88=document.getElementById("formWarpRequest"+_d82.getId());
  17998. if(_d88&&_d82){
  17999. _d82.getWorkingDialog().hide();
  18000. var _d89="";
  18001. var _d8a="";
  18002. var _d8b=null;
  18003. if(_d82.isAccessibleMode()){
  18004. _d89="winNAT_"+(new Date()).getTime();
  18005. _d8a=_d82.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
  18006. }else{
  18007. var _d8c=document.body;
  18008. _d8b=new CModal("","",_d8c,null,null,_d85,_d84,true,true,false,true,_d82.getWebContentRoot());
  18009. if(typeof _d86=="string"){
  18010. document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_d86);
  18011. }
  18012. document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
  18013. _d89=CMODAL_CONTENT_ID;
  18014. }
  18015. var _d8d=document.createElement("FORM");
  18016. _d8d.method="POST";
  18017. _d8d.action=_d82.getGateway();
  18018. _d8d.target=_d89;
  18019. _d8d.style.margin="0px";
  18020. document.body.appendChild(_d8d);
  18021. for(var _d8e in _d83){
  18022. _d8d.appendChild(createHiddenFormField(_d8e,_d83[_d8e]));
  18023. }
  18024. if(_d87){
  18025. _d8d.appendChild(createHiddenFormField("cv.id",_d82.getId()));
  18026. _d8d.appendChild(createHiddenFormField("b_action","xts.run"));
  18027. _d8d.appendChild(createHiddenFormField("ui.action",_d88["ui.action"].value));
  18028. _d8d.appendChild(createHiddenFormField("ui.object",_d88["ui.object"].value));
  18029. if(typeof _d82.rvMainWnd!="undefined"){
  18030. _d8d.appendChild(createHiddenFormField("run.outputFormat",_d82.rvMainWnd.getCurrentFormat()));
  18031. }
  18032. if(typeof _d88["run.outputLocale"]!="undefined"){
  18033. _d8d.appendChild(createHiddenFormField("run.outputLocale",_d88["run.outputLocale"].value));
  18034. }
  18035. if(typeof _d8d["backURL"]=="undefined"&&typeof _d8d["ui.backURL"]=="undefined"&&typeof _d88["ui.backURL"]!="undefined"){
  18036. _d8d.appendChild(createHiddenFormField("ui.backURL",_d88["ui.backURL"].value));
  18037. }
  18038. if(typeof _d82!="undefined"&&typeof _d82.getConversation!="undefined"&&typeof _d82.getTracking!="undefined"){
  18039. _d8d.appendChild(createHiddenFormField("ui.conversation",_d82.getConversation()));
  18040. _d8d.appendChild(createHiddenFormField("m_tracking",_d82.getTracking()));
  18041. if(_d82.envParams["ui.name"]!="undefined"){
  18042. _d8d.appendChild(createHiddenFormField("ui.name",_d82.envParams["ui.name"]));
  18043. }
  18044. }
  18045. }
  18046. var _d8f=window.onbeforeunload;
  18047. window.onbeforeunload=null;
  18048. if(_d82.isAccessibleMode()){
  18049. window.open(_d8a,_d89,"rv");
  18050. _d8d.submit();
  18051. }else{
  18052. _d8d.submit();
  18053. _d8b.show();
  18054. }
  18055. window.onbeforeunload=_d8f;
  18056. document.body.removeChild(_d8d);
  18057. _d82.modalShown=true;
  18058. }
  18059. };
  18060. function createHiddenFormField(name,_d91){
  18061. var _d92=document.createElement("input");
  18062. _d92.setAttribute("type","hidden");
  18063. _d92.setAttribute("name",name);
  18064. _d92.setAttribute("id",name);
  18065. _d92.setAttribute("value",_d91);
  18066. return (_d92);
  18067. };
  18068. function isAuthenticationFault(_d93){
  18069. if(_d93!=null){
  18070. var _d94=XMLHelper_FindChildByTagName(_d93,"CAM",true);
  18071. return (_d94!=null&&XMLHelper_FindChildByTagName(_d94,"promptInfo",true)!=null);
  18072. }
  18073. };
  18074. function processAuthenticationFault(_d95,_d96){
  18075. if(isAuthenticationFault(_d95)){
  18076. launchLogOnDialog(_d96,_d95);
  18077. return true;
  18078. }
  18079. return false;
  18080. };
  18081. function isObjectEmpty(_d97){
  18082. for(var _d98 in _d97){
  18083. if(_d97.hasOwnProperty(_d98)){
  18084. return false;
  18085. }
  18086. }
  18087. return true;
  18088. };
  18089. function launchLogOnDialog(cvID,_d9a){
  18090. try{
  18091. var oCV=getCognosViewerObjectRef(cvID);
  18092. var _d9c={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
  18093. if(_d9a!=null){
  18094. var _d9d=XMLHelper_FindChildrenByTagName(_d9a,"namespace",true);
  18095. if(_d9d!=null){
  18096. for(var _d9e=0;_d9e<_d9d.length;++_d9e){
  18097. var _d9f=_d9d[_d9e];
  18098. if(_d9f!=null){
  18099. var _da0=XMLHelper_FindChildByTagName(_d9f,"name",false);
  18100. var _da1=XMLHelper_FindChildByTagName(_d9f,"value",false);
  18101. if(_da0!=null&&_da1!=null){
  18102. var _da2=XMLHelper_GetText(_da0);
  18103. var _da3=XMLHelper_GetText(_da1);
  18104. if(_da2!=null&&_da2.length>0){
  18105. _d9c[_da2]=_da3;
  18106. }
  18107. }
  18108. }
  18109. }
  18110. }
  18111. }
  18112. cvLoadDialog(oCV,_d9c,540,460,null,false);
  18113. }
  18114. catch(exception){
  18115. }
  18116. };
  18117. function getCVWaitingOnFault(){
  18118. var oCV=null;
  18119. for(var _da5=0;_da5<window.gaRV_INSTANCES.length;_da5++){
  18120. if(window.gaRV_INSTANCES[_da5].getRetryDispatcherEntry()!=null){
  18121. oCV=window.gaRV_INSTANCES[_da5];
  18122. break;
  18123. }
  18124. }
  18125. return oCV;
  18126. };
  18127. function ccModalCallBack(_da6,data){
  18128. var oCV=getCVWaitingOnFault();
  18129. destroyCModal();
  18130. if(typeof HiddenIframeDispatcherEntry=="function"&&HiddenIframeDispatcherEntry.hideIframe){
  18131. var oCV=window.gaRV_INSTANCES[0];
  18132. if(oCV){
  18133. HiddenIframeDispatcherEntry.hideIframe(oCV.getId());
  18134. }
  18135. }
  18136. if(oCV!=null){
  18137. if(typeof _da6!="undefined"&&_da6=="ok"){
  18138. var _da9=oCV.getRetryDispatcherEntry();
  18139. if(_da9){
  18140. _da9.retryRequest();
  18141. }
  18142. if(oCV.getRV()!=null){
  18143. oCV.getRV().updateUserName();
  18144. }
  18145. }else{
  18146. oCV.rvMainWnd.hideOpenMenus();
  18147. }
  18148. }
  18149. };
  18150. function closeErrorPage(){
  18151. var oCV=getCVWaitingOnFault();
  18152. destroyCModal();
  18153. if(oCV!=null){
  18154. oCV.setRetryDispatcherEntry(null);
  18155. oCV.rvMainWnd.hideOpenMenus();
  18156. }
  18157. };
  18158. function getCrossBrowserNode(evt,_dac){
  18159. var node=null;
  18160. if(_dac&&evt.explicitOriginalTarget){
  18161. node=evt.explicitOriginalTarget;
  18162. }else{
  18163. if(evt.originalTarget){
  18164. node=evt.originalTarget;
  18165. }else{
  18166. if(evt.target){
  18167. node=evt.target;
  18168. }else{
  18169. if(evt.srcElement){
  18170. node=evt.srcElement;
  18171. }
  18172. }
  18173. }
  18174. }
  18175. try{
  18176. if(node&&node.nodeType==3){
  18177. node=node.parentNode;
  18178. }
  18179. }
  18180. catch(ex){
  18181. }
  18182. return node;
  18183. };
  18184. function getNodeFromEvent(evt,_daf){
  18185. var node=getCrossBrowserNode(evt,true);
  18186. if(node&&node.getAttribute&&node.getAttribute("name")=="primarySelectionDiv"){
  18187. node=node.parentNode.firstChild;
  18188. }
  18189. if(node&&node.getAttribute&&node.getAttribute("flashChartContainer")=="true"){
  18190. node=node.firstChild;
  18191. }
  18192. if(node&&node.getAttribute&&node.getAttribute("chartContainer")=="true"&&node.childNodes){
  18193. for(var i=0;i<node.childNodes.length;i++){
  18194. if(node.childNodes[i].nodeName.toLowerCase()=="img"){
  18195. node=node.childNodes[i];
  18196. break;
  18197. }
  18198. }
  18199. }else{
  18200. if(!_daf&&node&&node.nodeName&&node.nodeName.toLowerCase()=="img"&&node.getAttribute("rsvpChart")!="true"){
  18201. node=node.parentNode;
  18202. }
  18203. }
  18204. return node;
  18205. };
  18206. function getCtxNodeFromEvent(evt){
  18207. try{
  18208. var node=getCrossBrowserNode(evt);
  18209. var _db4=node.nodeName.toUpperCase();
  18210. if((_db4=="SPAN"||_db4=="AREA"||_db4=="IMG")&&node.getAttribute("ctx")!=null){
  18211. return node;
  18212. }else{
  18213. if(_db4=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
  18214. return node.parentNode;
  18215. }
  18216. }
  18217. }
  18218. catch(exception){
  18219. }
  18220. return null;
  18221. };
  18222. function getDocumentFromEvent(evt){
  18223. var node=getCrossBrowserNode(evt,true);
  18224. var _db7=node.document?node.document:node.ownerDocument;
  18225. return _db7;
  18226. };
  18227. function stopEventBubble(evt){
  18228. evt.returnValue=false;
  18229. evt.cancelBubble=true;
  18230. if(typeof evt.stopPropagation!="undefined"){
  18231. evt.stopPropagation();
  18232. }
  18233. if(typeof evt.preventDefault!="undefined"){
  18234. evt.preventDefault();
  18235. }
  18236. return false;
  18237. };
  18238. function setNodeFocus(evt){
  18239. evt=(evt)?evt:((event)?event:null);
  18240. var _dba=getNodeFromEvent(evt);
  18241. if(_dba&&_dba.nodeName){
  18242. var _dbb=_dba.nodeName.toLowerCase();
  18243. if((_dbb=="td"||_dbb=="span")&&_dba.childNodes&&_dba.childNodes.length>0&&_dba.childNodes[0].className=="textItem"){
  18244. try{
  18245. _dba.childNodes[0].focus();
  18246. }
  18247. catch(e){
  18248. if(typeof console!=="undefined"&&console.log){
  18249. console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js");
  18250. }
  18251. }
  18252. }
  18253. }
  18254. };
  18255. function html_encode(str){
  18256. return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
  18257. };
  18258. function replaceNewLine(_dbd){
  18259. var regX=/\r\n|\r|\n/g;
  18260. var _dbf="<br/>";
  18261. return _dbd.replace(regX,_dbf);
  18262. };
  18263. function xml_encode(_dc0){
  18264. var _dc1=""+_dc0;
  18265. if((_dc1=="0")||((_dc0!=null)&&(_dc0!=false))){
  18266. _dc1=_dc1.replace(/&/g,"&amp;");
  18267. _dc1=_dc1.replace(/</g,"&lt;");
  18268. _dc1=_dc1.replace(/>/g,"&gt;");
  18269. _dc1=_dc1.replace(/"/g,"&quot;");
  18270. _dc1=_dc1.replace(/'/g,"&apos;");
  18271. }else{
  18272. if(_dc0==null){
  18273. _dc1="";
  18274. }
  18275. }
  18276. return _dc1;
  18277. };
  18278. function xml_decodeParser(sAll,_dc3){
  18279. var _dc4=sAll;
  18280. switch(_dc3){
  18281. case "amp":
  18282. _dc4="&";
  18283. break;
  18284. case "lt":
  18285. _dc4="<";
  18286. break;
  18287. case "gt":
  18288. _dc4=">";
  18289. break;
  18290. case "quot":
  18291. _dc4="\"";
  18292. break;
  18293. case "apos":
  18294. _dc4="'";
  18295. break;
  18296. }
  18297. return _dc4;
  18298. };
  18299. function xml_decode(_dc5){
  18300. var _dc6=""+_dc5;
  18301. if((_dc6=="0")||((_dc5!=null)&&(_dc5!=false))){
  18302. _dc6=_dc6.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
  18303. }else{
  18304. if(_dc5==null){
  18305. _dc6="";
  18306. }
  18307. }
  18308. return _dc6;
  18309. };
  18310. function xpath_attr_encode(_dc7){
  18311. var _dc8=null;
  18312. if(_dc7.indexOf("'")>=0&&_dc7.indexOf("\"")>=0){
  18313. var _dc9=_dc7.split("\"");
  18314. _dc8="concat(";
  18315. for(var i=0;i<_dc9.length;++i){
  18316. if(i>0){
  18317. _dc8+=",";
  18318. }
  18319. if(_dc9[i].length>0){
  18320. _dc8+=("\""+_dc9[i]+"\"");
  18321. }else{
  18322. _dc8+="'\"'";
  18323. }
  18324. }
  18325. _dc8+=")";
  18326. }else{
  18327. if(_dc7.indexOf("'")>=0){
  18328. _dc8="\""+_dc7+"\"";
  18329. }else{
  18330. _dc8="'"+_dc7+"'";
  18331. }
  18332. }
  18333. return _dc8;
  18334. };
  18335. function getCognosViewerObjectString(sId){
  18336. return "oCV"+sId;
  18337. };
  18338. function getCognosViewerObjectRefAsString(sId){
  18339. return "window."+getCognosViewerObjectString(sId);
  18340. };
  18341. function getCognosViewerObjectRef(sId){
  18342. return window[getCognosViewerObjectString(sId)];
  18343. };
  18344. function getCognosViewerSCObjectString(sId){
  18345. return "oCVSC"+sId;
  18346. };
  18347. function getCognosViewerSCObjectRefAsString(sId){
  18348. return "window."+getCognosViewerSCObjectString(sId);
  18349. };
  18350. function getCognosViewerSCObjectRef(sId){
  18351. return window[getCognosViewerSCObjectString(sId)];
  18352. };
  18353. function cleanupGlobalObjects(sId){
  18354. cleanupVariable(getCognosViewerObjectString(sId));
  18355. cleanupVariable(getCognosViewerSCObjectString(sId));
  18356. };
  18357. function cleanupVariable(_dd2){
  18358. if(typeof window[_dd2]!="undefined"&&window[_dd2]){
  18359. if(isIE()){
  18360. eval("delete "+_dd2);
  18361. }else{
  18362. delete window[_dd2];
  18363. }
  18364. }
  18365. };
  18366. function loadClass(_dd3){
  18367. try{
  18368. var _dd4=eval("new "+_dd3+"();");
  18369. return _dd4;
  18370. }
  18371. catch(e){
  18372. return null;
  18373. }
  18374. };
  18375. function getElementsByClassName(oElm,_dd6,_dd7){
  18376. var _dd8=(_dd6=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_dd6);
  18377. var _dd9=[];
  18378. var _dda=new RegExp("(^|\\s)"+_dd7+"(\\s|$)");
  18379. var _ddb=_dd8.length;
  18380. for(var i=0;i<_ddb;i++){
  18381. var _ddd=_dd8[i];
  18382. if(_dda.test(_ddd.className)){
  18383. _dd9.push(_ddd);
  18384. }
  18385. }
  18386. return _dd9;
  18387. };
  18388. function getImmediateLayoutContainerId(node){
  18389. var _ddf=node;
  18390. while(_ddf!=null){
  18391. if(_ddf.getAttribute&&_ddf.getAttribute("lid")!=null){
  18392. return _ddf.getAttribute("lid");
  18393. }
  18394. _ddf=_ddf.parentNode;
  18395. }
  18396. return null;
  18397. };
  18398. function getChildElementsByAttribute(oElm,_de1,_de2,_de3){
  18399. return getDescendantElementsByAttribute(oElm,_de1,_de2,_de3,true);
  18400. };
  18401. function getElementsByAttribute(oElm,_de5,_de6,_de7,_de8,_de9){
  18402. return getDescendantElementsByAttribute(oElm,_de5,_de6,_de7,false,_de8,_de9);
  18403. };
  18404. function getDescendantElementsByAttribute(oElm,_deb,_dec,_ded,_dee,_def,_df0){
  18405. var _df1=[];
  18406. var _df2=null;
  18407. if(typeof _df0==="undefined"){
  18408. _df2=(typeof _ded!="undefined")?new RegExp("(^|\\s)"+_ded+"(\\s|$)","i"):null;
  18409. }else{
  18410. _df2=_df0;
  18411. }
  18412. if(typeof _deb=="string"){
  18413. _deb=[_deb];
  18414. }
  18415. var _df3=(oElm?_deb.length:0);
  18416. for(var _df4=0;_df4<_df3;_df4++){
  18417. var _df5=null;
  18418. if(_dee){
  18419. if(_deb[_df4]=="*"&&oElm.all){
  18420. _df5=oElm.childNodes;
  18421. }else{
  18422. _df5=[];
  18423. var _df6=oElm.childNodes;
  18424. for(var i=0;i<_df6.length;++i){
  18425. if(_df6[i].nodeName.toLowerCase()==_deb[_df4].toLowerCase()){
  18426. _df5.push(_df6[i]);
  18427. }
  18428. }
  18429. }
  18430. }else{
  18431. _df5=(_deb[_df4]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_deb[_df4]);
  18432. }
  18433. var _df8=_df5.length;
  18434. for(var idx=0;idx<_df8;idx++){
  18435. var _dfa=_df5[idx];
  18436. var _dfb=_dfa.getAttribute&&_dfa.getAttribute(_dec);
  18437. if(_dfb!==null){
  18438. var _dfc=null;
  18439. if(typeof _dfb==="number"){
  18440. _dfc=String(_dfb);
  18441. }else{
  18442. if(typeof _dfb==="string"&&_dfb.length>0){
  18443. _dfc=_dfb;
  18444. }
  18445. }
  18446. if(_dfc!==null){
  18447. if(typeof _ded=="undefined"||(_df2&&_df2.test(_dfc))){
  18448. _df1.push(_dfa);
  18449. if(_def!=-1&&_df1.length>_def){
  18450. return [];
  18451. }else{
  18452. if(_def==1&&_df1.length==1){
  18453. return _df1;
  18454. }
  18455. }
  18456. }
  18457. }
  18458. }
  18459. }
  18460. }
  18461. return _df1;
  18462. };
  18463. function savedOutputDoneLoading(cvId,_dfe){
  18464. var oCV=window["oCV"+cvId];
  18465. var _e00=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
  18466. var _e01=(_e00?_e00.getSavedOutput():null);
  18467. if(_e01){
  18468. _e01.outputDoneLoading();
  18469. }else{
  18470. if(_dfe<5){
  18471. _dfe++;
  18472. var _e02=function(){
  18473. savedOutputDoneLoading(cvId,_dfe);
  18474. };
  18475. setTimeout(_e02,100);
  18476. }
  18477. }
  18478. };
  18479. function getNavVer(){
  18480. var temp;
  18481. if(isIE()){
  18482. return getIEVersion();
  18483. }else{
  18484. temp=navigator.userAgent.split("/");
  18485. return parseFloat(temp[temp.length-1]);
  18486. }
  18487. };
  18488. function isSafari(){
  18489. return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1);
  18490. };
  18491. function isIE(){
  18492. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  18493. };
  18494. function getIEVersion(){
  18495. var _e04=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
  18496. return _e04?parseFloat(_e04[1]):null;
  18497. };
  18498. function isFF(){
  18499. return (navigator.userAgent.indexOf("Firefox")!=-1);
  18500. };
  18501. function isIOS(){
  18502. return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1;
  18503. };
  18504. function displayChart(_e05,_e06,_e07,_e08){
  18505. if(_e06.length>1){
  18506. document.images[_e05].src=_e06;
  18507. }
  18508. };
  18509. function isFlashChartNode(evt){
  18510. var node=getNodeFromEvent(evt);
  18511. if(node!=null&&typeof node.getAttribute=="function"){
  18512. return node.getAttribute("flashChart")!=null;
  18513. }
  18514. return false;
  18515. };
  18516. function onFlashChartRightClick(evt){
  18517. if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){
  18518. return onViewerChartFocus(evt);
  18519. }
  18520. };
  18521. function onViewerChartFocus(evt){
  18522. if(evt.stopPropagation){
  18523. evt.stopPropagation();
  18524. }
  18525. if(evt.preventDefault){
  18526. evt.preventDefault();
  18527. }
  18528. if(evt.preventCapture){
  18529. evt.preventCapture();
  18530. }
  18531. if(evt.preventBubble){
  18532. evt.preventBubble();
  18533. }
  18534. var node=getNodeFromEvent(evt);
  18535. var _e0e=node.getAttribute("viewerId");
  18536. if(!_e0e){
  18537. _e0e=node.parentNode.getAttribute("viewerId");
  18538. }
  18539. if(!_e0e){
  18540. return;
  18541. }
  18542. var oCV=window["oCV"+_e0e];
  18543. var _e10=oCV.getAction("Selection");
  18544. _e10.pageClicked(evt);
  18545. return stopEventBubble(evt);
  18546. };
  18547. function clientToScreenCoords(_e11,_e12){
  18548. var _e13=_e11;
  18549. var _e14={topCoord:0,leftCoord:0};
  18550. while(_e13!=null&&_e13!=_e12){
  18551. _e14.topCoord+=_e13.offsetTop;
  18552. _e14.leftCoord+=_e13.offsetLeft;
  18553. _e13=_e13.offsetParent;
  18554. }
  18555. return _e14;
  18556. };
  18557. function getCurrentPosistionString(oCV,_e16,_e17){
  18558. var _e18=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
  18559. var _e19=/\{0\}/;
  18560. var _e1a=/\{1\}/;
  18561. _e18=_e18.replace(_e19,_e16);
  18562. _e18=" "+_e18.replace(_e1a,_e17)+" ";
  18563. return _e18;
  18564. };
  18565. function applyJSONProperties(obj,_e1c){
  18566. for(property in _e1c){
  18567. if(typeof _e1c[property]=="object"&&!(_e1c[property] instanceof Array)){
  18568. if(typeof obj[property]=="undefined"){
  18569. obj[property]={};
  18570. }
  18571. applyJSONProperties(obj[property],_e1c[property]);
  18572. }else{
  18573. obj[property]=_e1c[property];
  18574. }
  18575. }
  18576. };
  18577. function CViewerCommon(){
  18578. };
  18579. CViewerCommon.openNewWindowOrTab=function(sURL,_e1e){
  18580. return window.open(sURL,_e1e);
  18581. };
  18582. CViewerCommon.toJSON=function(obj){
  18583. var type=typeof (obj);
  18584. if(type!="object"||type===null){
  18585. if(type==="string"){
  18586. obj="\""+obj+"\"";
  18587. }
  18588. return String(obj);
  18589. }else{
  18590. var _e21;
  18591. var prop;
  18592. var json=[];
  18593. var _e24=(obj&&obj.constructor==Array);
  18594. for(_e21 in obj){
  18595. prop=obj[_e21];
  18596. type=typeof (prop);
  18597. if(type==="string"){
  18598. prop="\""+prop+"\"";
  18599. }else{
  18600. if(type=="object"&&prop!==null){
  18601. prop=CViewerCommon.toJSON(prop);
  18602. }
  18603. }
  18604. json.push((_e24?"":"\""+_e21+"\":")+String(prop));
  18605. }
  18606. return (_e24?"[":"{")+String(json)+(_e24?"]":"}");
  18607. }
  18608. };
  18609. function resizePinnedContainers(){
  18610. var oCV=window.gaRV_INSTANCES[0];
  18611. if(oCV&&!oCV.m_viewerFragment){
  18612. var _e26=oCV.getPinFreezeManager();
  18613. if(_e26&&_e26.hasFrozenContainers()){
  18614. var _e27=document.getElementById("RVContent"+oCV.getId());
  18615. var _e28=document.getElementById("mainViewerTable"+oCV.getId());
  18616. var _e29=_e27.clientWidth;
  18617. var _e2a=_e28.clientHeight;
  18618. _e26.resize(_e29,_e2a);
  18619. if(isIE()){
  18620. oCV.repaintDiv(_e27);
  18621. }
  18622. }
  18623. }
  18624. };
  18625. function setWindowHref(url){
  18626. var _e2c=window.onbeforeunload;
  18627. window.onbeforeunload=null;
  18628. window.location.href=url;
  18629. window.onbeforeunload=_e2c;
  18630. };
  18631. CViewerCommon.getMessage=function(msg,args){
  18632. if(typeof args=="undefined"){
  18633. return msg;
  18634. }else{
  18635. if(typeof args=="string"){
  18636. msg=msg.replace("{0}",args);
  18637. }else{
  18638. if(args.length){
  18639. for(var i=0;i<args.length;++i){
  18640. msg=msg.replace("{"+i+"}",args[i]);
  18641. }
  18642. }else{
  18643. msg=msg.replace("{0}",args);
  18644. }
  18645. }
  18646. }
  18647. return msg;
  18648. };
  18649. function getViewerDirection(){
  18650. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  18651. return gaRV_INSTANCES[0].getDirection();
  18652. }
  18653. return "ltr";
  18654. };
  18655. function isViewerBidiEnabled(){
  18656. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  18657. var _e30=gaRV_INSTANCES[0].isBidiEnabled();
  18658. if(_e30){
  18659. return true;
  18660. }
  18661. }
  18662. return false;
  18663. };
  18664. function getViewerBaseTextDirection(){
  18665. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  18666. return gaRV_INSTANCES[0].getBaseTextDirection();
  18667. }
  18668. return "";
  18669. };
  18670. function enforceTextDir(_e31){
  18671. if(isViewerBidiEnabled()&&_e31){
  18672. var sDir=getViewerBaseTextDirection();
  18673. var _e33=BidiUtils.getInstance();
  18674. if(sDir=="auto"){
  18675. sDir=_e33.resolveStrBtd(_e31);
  18676. }
  18677. var _e34=(!dojo._isBodyLtr())?_e33.RLM:_e33.LRM;
  18678. return _e34+((sDir==="rtl")?_e33.RLE:_e33.LRE)+_e31+_e33.PDF+_e34;
  18679. }
  18680. return _e31;
  18681. };
  18682. function getElementDirection(_e35){
  18683. var dir=null;
  18684. if(_e35.currentStyle){
  18685. dir=_e35.currentStyle.direction;
  18686. }else{
  18687. if(window.getComputedStyle){
  18688. var _e37=window.getComputedStyle(_e35,null);
  18689. if(_e37){
  18690. dir=_e37.getPropertyValue("direction");
  18691. }
  18692. }
  18693. }
  18694. if(dir){
  18695. dir=dir.toLowerCase();
  18696. }
  18697. return dir;
  18698. };
  18699. function getScrollLeft(_e38){
  18700. if(getElementDirection(_e38)==="rtl"&&isFF()){
  18701. return _e38.scrollWidth-_e38.offsetWidth+_e38.scrollLeft;
  18702. }
  18703. return _e38.scrollLeft;
  18704. };
  18705. function setScrollLeft(_e39,_e3a){
  18706. if(getElementDirection(_e39)==="rtl"&&isFF()){
  18707. _e39.scrollLeft=_e39.offsetWidth+_e3a-_e39.scrollWidth;
  18708. }else{
  18709. _e39.scrollLeft=_e3a;
  18710. }
  18711. };
  18712. function setScrollRight(_e3b,_e3c){
  18713. if(getElementDirection(_e3b)==="rtl"&&isFF()){
  18714. _e3b.scrollLeft=-_e3c;
  18715. }else{
  18716. _e3b.scrollLeft=_e3b.scrollWidth-_e3b.offsetWidth-_e3c;
  18717. }
  18718. };
  18719. function getBoxInfo(el,_e3e){
  18720. if(!getBoxInfo.aStyles){
  18721. 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"}];
  18722. }
  18723. var _e3f={};
  18724. var _e40=null;
  18725. if(el.currentStyle){
  18726. _e40=el.currentStyle;
  18727. }else{
  18728. if(window.getComputedStyle){
  18729. _e40=window.getComputedStyle(el,null);
  18730. }
  18731. }
  18732. if(!_e40){
  18733. return null;
  18734. }
  18735. for(i in getBoxInfo.aStyles){
  18736. var _e41=getBoxInfo.aStyles[i];
  18737. var size=null;
  18738. if(_e40.getPropertyValue){
  18739. size=_e40.getPropertyValue(_e41.ff);
  18740. }else{
  18741. size=_e40[_e41.ie];
  18742. }
  18743. if(size&&_e3e){
  18744. size=Number(size.replace("px",""));
  18745. }
  18746. _e3f[_e41.name]=size;
  18747. }
  18748. return _e3f;
  18749. };
  18750. function CSelectionMetadata(){
  18751. this.m_sContextId="";
  18752. this.m_sDataItem="";
  18753. this.m_sMetadataModelItem="";
  18754. this.m_sUseValue="";
  18755. this.m_sUseValueType="";
  18756. this.m_sType=null;
  18757. this.m_sDisplayValue="";
  18758. this.m_sUsage=null;
  18759. this.m_refQuery=null;
  18760. this.m_sHun=null;
  18761. this.m_sDun=null;
  18762. };
  18763. CSelectionMetadata.prototype.setContextId=function(_e43){
  18764. this.m_sContextId=_e43;
  18765. };
  18766. CSelectionMetadata.prototype.getContextId=function(){
  18767. return this.m_sContextId;
  18768. };
  18769. CSelectionMetadata.prototype.setRefQuery=function(_e44){
  18770. this.m_refQuery=_e44;
  18771. };
  18772. CSelectionMetadata.prototype.getRefQuery=function(){
  18773. return this.m_refQuery;
  18774. };
  18775. CSelectionMetadata.prototype.setDataItem=function(_e45){
  18776. this.m_sDataItem=_e45;
  18777. };
  18778. CSelectionMetadata.prototype.getDataItem=function(){
  18779. return this.m_sDataItem;
  18780. };
  18781. CSelectionMetadata.prototype.setMetadataModelItem=function(_e46){
  18782. this.m_sMetadataModelItem=_e46;
  18783. };
  18784. CSelectionMetadata.prototype.getMetadataModelItem=function(){
  18785. return this.m_sMetadataModelItem;
  18786. };
  18787. CSelectionMetadata.prototype.setUseValue=function(_e47){
  18788. this.m_sUseValue=_e47;
  18789. };
  18790. CSelectionMetadata.prototype.getUseValue=function(){
  18791. return this.m_sUseValue;
  18792. };
  18793. CSelectionMetadata.prototype.setUseValueType=function(_e48){
  18794. this.m_sUseValueType=_e48;
  18795. };
  18796. CSelectionMetadata.prototype.setType=function(_e49){
  18797. this.m_sType=_e49;
  18798. };
  18799. CSelectionMetadata.prototype.getType=function(){
  18800. var _e4a=null;
  18801. switch(this.m_sUseValueType){
  18802. case 25:
  18803. case 27:
  18804. case 30:
  18805. case 32:
  18806. _e4a="memberUniqueName";
  18807. break;
  18808. case 26:
  18809. _e4a="memberCaption";
  18810. break;
  18811. case 1:
  18812. case 55:
  18813. case 56:
  18814. _e4a="string";
  18815. break;
  18816. case 2:
  18817. case 3:
  18818. case 4:
  18819. case 5:
  18820. case 6:
  18821. case 7:
  18822. case 8:
  18823. case 9:
  18824. case 10:
  18825. case 11:
  18826. case 12:
  18827. case 16:
  18828. case 17:
  18829. case 18:
  18830. case 19:
  18831. case 20:
  18832. case 22:
  18833. case 21:
  18834. case 23:
  18835. case 24:
  18836. case 54:
  18837. _e4a=parseInt(this.m_sUseValueType,10);
  18838. break;
  18839. }
  18840. return _e4a;
  18841. };
  18842. CSelectionMetadata.prototype.getUseValueType=function(){
  18843. if(this.m_sType==null){
  18844. this.m_sType=this.getType();
  18845. }
  18846. return this.m_sType;
  18847. };
  18848. CSelectionMetadata.prototype.setDisplayValue=function(_e4b){
  18849. this.m_sDisplayValue=_e4b;
  18850. };
  18851. CSelectionMetadata.prototype.getDisplayValue=function(){
  18852. return this.m_sDisplayValue;
  18853. };
  18854. CSelectionMetadata.prototype.setUsage=function(_e4c){
  18855. this.m_sUsage=_e4c;
  18856. };
  18857. CSelectionMetadata.prototype.getUsage=function(){
  18858. if(this.m_sUsage=="2"){
  18859. return "measure";
  18860. }else{
  18861. return "nonMeasure";
  18862. }
  18863. };
  18864. CSelectionMetadata.prototype.setHun=function(sHun){
  18865. this.m_sHun=sHun;
  18866. };
  18867. CSelectionMetadata.prototype.getHun=function(){
  18868. return this.m_sHun;
  18869. };
  18870. CSelectionMetadata.prototype.setDun=function(sDun){
  18871. this.m_sDun=sDun;
  18872. };
  18873. CSelectionMetadata.prototype.getDun=function(){
  18874. return this.m_sDun;
  18875. };
  18876. function CSelectionMetadataIterator(_e4f,_e50){
  18877. this.m_axisIndex=_e50;
  18878. this.m_index=0;
  18879. this.m_selectionObject=_e4f;
  18880. };
  18881. CSelectionMetadataIterator.prototype.getSelectionAxis=function(){
  18882. var _e51=null;
  18883. if(typeof this.m_selectionObject=="object"&&this.m_axisIndex<this.m_selectionObject.getSelectedContextIds().length){
  18884. _e51=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex];
  18885. }
  18886. return _e51;
  18887. };
  18888. CSelectionMetadataIterator.prototype.hasNext=function(){
  18889. var _e52=this.getSelectionAxis();
  18890. if(_e52!=null){
  18891. return (this.m_index<_e52.length);
  18892. }else{
  18893. return false;
  18894. }
  18895. };
  18896. CSelectionMetadataIterator.prototype.next=function(){
  18897. var _e53=null;
  18898. if(this.hasNext()){
  18899. _e53=new CSelectionMetadata();
  18900. _e53.setContextId(this.m_selectionObject.m_contextIds[this.m_axisIndex][this.m_index]);
  18901. _e53.setDataItem(this.m_selectionObject.getDataItems()[this.m_axisIndex][this.m_index]);
  18902. _e53.setMetadataModelItem(this.m_selectionObject.getMetadataItems()[this.m_axisIndex][this.m_index]);
  18903. if(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=null&&this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=""){
  18904. _e53.setUseValue(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]);
  18905. _e53.setType("memberUniqueName");
  18906. }else{
  18907. _e53.setUseValue(this.m_selectionObject.getUseValues()[this.m_axisIndex][this.m_index]);
  18908. }
  18909. if(typeof this.m_selectionObject.m_selectionController=="object"){
  18910. var _e54=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex][this.m_index];
  18911. if(this.m_selectionObject.useDisplayValueFromObject){
  18912. _e53.setDisplayValue(this.m_selectionObject.getDisplayValues()[this.m_axisIndex]);
  18913. }else{
  18914. var _e55=null;
  18915. var _e56=null;
  18916. if(this.m_axisIndex===0){
  18917. var _e57=this.m_selectionObject.getCellRef();
  18918. if(_e57&&_e57.nodeName&&_e57.nodeName.toLowerCase()==="td"){
  18919. _e56=this.m_selectionObject.m_selectionController.getDisplayValueFromDOM(_e54,_e57.parentNode);
  18920. }
  18921. }
  18922. if(_e56==null){
  18923. _e56=this.m_selectionObject.m_selectionController.getDisplayValue(_e54);
  18924. }
  18925. if(_e56===""){
  18926. _e56=this.m_selectionObject.m_selectionController.getUseValue(_e54);
  18927. }
  18928. _e53.setDisplayValue(_e56);
  18929. }
  18930. _e53.setUseValueType(this.m_selectionObject.m_selectionController.getDataType(_e54));
  18931. _e53.setUsage(this.m_selectionObject.m_selectionController.getUsageInfo(_e54));
  18932. _e53.setRefQuery(this.m_selectionObject.m_selectionController.getRefQuery(_e54));
  18933. _e53.setHun(this.m_selectionObject.m_selectionController.getHun(_e54));
  18934. _e53.setDun(this.m_selectionObject.m_selectionController.getDun(_e54));
  18935. }
  18936. ++this.m_index;
  18937. }
  18938. return _e53;
  18939. };
  18940. function CAxisSelectionIterator(_e58){
  18941. this.m_index=0;
  18942. this.m_selectionObject=_e58;
  18943. };
  18944. CAxisSelectionIterator.prototype.hasNext=function(){
  18945. return ((typeof this.m_selectionObject=="object")&&(this.m_index<this.m_selectionObject.getSelectedContextIds().length));
  18946. };
  18947. CAxisSelectionIterator.prototype.next=function(){
  18948. var _e59=null;
  18949. if(this.hasNext()){
  18950. _e59=new CSelectionMetadataIterator(this.m_selectionObject,this.m_index);
  18951. ++this.m_index;
  18952. }
  18953. return _e59;
  18954. };
  18955. function getSelectionContextIds(_e5a){
  18956. var _e5b=[];
  18957. var _e5c=_e5a.getAllSelectedObjects();
  18958. if(_e5c!=null&&_e5c.length>0){
  18959. for(var _e5d=0;_e5d<_e5c.length;++_e5d){
  18960. var _e5e=_e5c[_e5d];
  18961. var _e5f=_e5e.getSelectedContextIds();
  18962. var _e60=[];
  18963. for(var item=0;item<_e5f.length;++item){
  18964. var _e62=_e5f[item].join(":");
  18965. _e60.push(_e62);
  18966. }
  18967. _e5b.push(_e60.join("::"));
  18968. }
  18969. }
  18970. return _e5b;
  18971. };
  18972. function getViewerSelectionContext(_e63,_e64,_e65){
  18973. var _e66=_e65==true?_e63.getAllSelectedObjectsWithUniqueCTXIDs():_e63.getAllSelectedObjects();
  18974. if(_e66!=null&&_e66.length>0){
  18975. for(var _e67=0;_e67<_e66.length;++_e67){
  18976. var _e68={};
  18977. var _e69=new CAxisSelectionIterator(_e66[_e67]);
  18978. if(_e69.hasNext()){
  18979. var _e6a=_e69.next();
  18980. if(_e6a.hasNext()){
  18981. var _e6b=_e6a.next();
  18982. var _e6c=_e6b.getContextId();
  18983. _e68[_e6c]=true;
  18984. var _e6d=_e64.addSelectedCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
  18985. if(_e6b.getHun()!=null){
  18986. _e6d.addProperty("HierarchyUniqueName",_e6b.getHun());
  18987. }
  18988. if(_e6b.getDun()!=null){
  18989. _e6d.addProperty("DimensionUniqueName",_e6b.getDun());
  18990. }
  18991. while(_e6a.hasNext()){
  18992. _e6b=_e6a.next();
  18993. _e6c=_e6b.getContextId();
  18994. if(typeof _e68[_e6c]=="undefined"||_e6c===""){
  18995. _e68[_e6c]=true;
  18996. var _e6e=_e6d.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
  18997. if(_e6b.getHun()!=null){
  18998. _e6e.addProperty("HierarchyUniqueName",_e6b.getHun());
  18999. }
  19000. if(_e6b.getDun()!=null){
  19001. _e6e.addProperty("DimensionUniqueName",_e6b.getDun());
  19002. }
  19003. }
  19004. }
  19005. while(_e69.hasNext()){
  19006. _e6a=_e69.next();
  19007. var _e6f=_e6d;
  19008. while(_e6a.hasNext()){
  19009. _e6b=_e6a.next();
  19010. _e6c=_e6b.getContextId();
  19011. if(typeof _e68[_e6c]=="undefined"||_e6c===""){
  19012. _e68[_e6c]=true;
  19013. _e6f=_e6f.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
  19014. if(_e6b.getHun()!=null){
  19015. _e6f.addProperty("HierarchyUniqueName",_e6b.getHun());
  19016. }
  19017. if(_e6b.getDun()!=null){
  19018. _e6f.addProperty("DimensionUniqueName",_e6b.getDun());
  19019. }
  19020. }
  19021. }
  19022. }
  19023. }
  19024. }
  19025. }
  19026. }
  19027. var _e70=_e64.toString();
  19028. if(window.gViewerLogger){
  19029. window.gViewerLogger.log("Selection context",_e70,"xml");
  19030. }
  19031. return _e70;
  19032. };
  19033. function PinFreezeContainer(_e71,lid,_e73,_e74,_e75,_e76,_e77){
  19034. this.m_pinFreezeManager=_e71;
  19035. this.m_lid=lid;
  19036. this.m_lidNS=lid+_e73+_e77;
  19037. this.m_viewerId=_e73;
  19038. this.m_freezeTop=_e74;
  19039. this.m_freezeSide=_e75;
  19040. this.m_cachedReportDiv=null;
  19041. this.m_cachedPFContainer=null;
  19042. this.m_cachedBaseContainer=_e76;
  19043. this.m_containerMargin={"top":0,"left":0};
  19044. if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){
  19045. if(this.m_cachedBaseContainer.style.marginTop){
  19046. this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px",""));
  19047. }
  19048. if(this.m_cachedBaseContainer.style.marginLeft){
  19049. this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px",""));
  19050. }
  19051. }
  19052. this.m_cachedContainerIndex=_e77;
  19053. this.m_sectionCache=null;
  19054. this.m_homeCellNodes={};
  19055. this.m_fixedWidth=null;
  19056. this.m_clientWidth=700;
  19057. this.m_scrollableClientWidth=700;
  19058. this.m_fixedHeight=null;
  19059. this.m_clientHeight=300;
  19060. this.m_scrollableClientHeight=300;
  19061. this.m_wrapFlag=false;
  19062. this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20;
  19063. this.touchScrollSections=false;
  19064. this.touchPreviousX=-1;
  19065. this.touchPreviousY=-1;
  19066. };
  19067. PinFreezeContainer.prototype.toJSONString=function(){
  19068. var _e78="{";
  19069. _e78+="\"m_clientWidth\":"+this.m_clientWidth+"";
  19070. _e78+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
  19071. _e78+=",\"m_clientHeight\":"+this.m_clientHeight+"";
  19072. _e78+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
  19073. _e78+="}";
  19074. return _e78;
  19075. };
  19076. PinFreezeContainer.prototype.copyProperties=function(_e79){
  19077. this.m_clientWidth=_e79.m_clientWidth;
  19078. this.m_scrollableClientWidth=_e79.m_scrollableClientWidth;
  19079. this.m_clientHeight=_e79.m_clientHeight;
  19080. this.m_scrollableClientHeight=_e79.m_scrollableClientHeight;
  19081. };
  19082. PinFreezeContainer.prototype.setViewerId=function(id){
  19083. this.m_viewerId=id;
  19084. };
  19085. PinFreezeContainer.prototype.getLid=function(){
  19086. return this.m_lid;
  19087. };
  19088. PinFreezeContainer.prototype.createPFContainer=function(_e7b,_e7c){
  19089. var _e7d=document.createElement("temp");
  19090. if(this.m_cachedBaseContainer){
  19091. this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
  19092. this.m_cachedReportDiv=_e7b;
  19093. var _e7e=this.m_cachedBaseContainer.parentNode;
  19094. var _e7f=this.loadTemplateHTML();
  19095. if(_e7f){
  19096. _e7d.innerHTML=_e7f;
  19097. var _e80=this.getContainerByLID(_e7d);
  19098. var _e81=this.getSectionByLID(_e7d.firstChild,"pfMainOutput");
  19099. if(_e81){
  19100. var i=this.getChildPosition(_e7e,this.m_cachedBaseContainer);
  19101. if(i!=-1){
  19102. var _e83=this.m_pinFreezeManager.m_oCV;
  19103. if(_e83&&_e83.envParams["freezeDefaultWrap"]){
  19104. if(this.m_cachedBaseContainer.style.whiteSpace===""&&_e83.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
  19105. var _e84=this.m_cachedBaseContainer.getElementsByTagName("span");
  19106. if(_e84){
  19107. for(var k=0;k<_e84.length;k++){
  19108. _e84[k].style.whiteSpace="nowrap";
  19109. }
  19110. }
  19111. this.m_wrapFlag=true;
  19112. }
  19113. }
  19114. if(!_e7c){
  19115. if(!this._getFixedWidth()){
  19116. this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false");
  19117. this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1;
  19118. this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px";
  19119. }
  19120. if(!this._getFixedHeight()){
  19121. this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false");
  19122. this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight;
  19123. this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px";
  19124. }
  19125. _e81.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
  19126. _e81.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
  19127. }
  19128. _e81.appendChild(this.m_cachedBaseContainer);
  19129. this.insertAt(_e7e,_e80,i);
  19130. }
  19131. if(this.m_cachedBaseContainer.style.border!==""){
  19132. _e80.style.border=this.m_cachedBaseContainer.style.border;
  19133. this.m_cachedBaseContainer.style.border="";
  19134. }
  19135. }
  19136. }
  19137. }
  19138. };
  19139. PinFreezeContainer.prototype._getFixedWidth=function(_e86){
  19140. if(_e86&&_e86.style.width&&!_e86.getAttribute("authoredFixedWidth")){
  19141. var _e87=Number(_e86.style.width.split("px")[0]);
  19142. return isNaN(_e87)?null:_e87;
  19143. }
  19144. return null;
  19145. };
  19146. PinFreezeContainer.prototype._getFixedHeight=function(_e88){
  19147. if(_e88&&_e88.style.height&&!_e88.getAttribute("authoredFixedHeight")){
  19148. var _e89=Number(_e88.style.height.split("px")[0]);
  19149. return isNaN(_e89)?null:_e89;
  19150. }
  19151. return null;
  19152. };
  19153. PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_e8a){
  19154. var _e8b=this._getFixedWidth(_e8a);
  19155. if(_e8b){
  19156. this.m_fixedWidth=_e8b;
  19157. this.m_clientWidth=this.m_fixedWidth;
  19158. this.m_scrollableClientWidth=this.m_fixedWidth;
  19159. }
  19160. var _e8c=this._getFixedHeight(_e8a);
  19161. if(_e8c){
  19162. this.m_fixedHeight=_e8c;
  19163. this.m_clientHeight=this.m_fixedHeight;
  19164. this.m_scrollableClientHeight=this.m_fixedHeight;
  19165. }
  19166. };
  19167. PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
  19168. var _e8d="<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>";
  19169. return _e8d;
  19170. };
  19171. PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
  19172. var _e8e="<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>";
  19173. return _e8e;
  19174. };
  19175. PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
  19176. var _e8f="<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>";
  19177. return _e8f;
  19178. };
  19179. PinFreezeContainer.prototype.loadTemplateHTML=function(){
  19180. if(this.m_freezeSide&&this.m_freezeTop){
  19181. return this.loadFreezeBothTemplateHTML();
  19182. }else{
  19183. if(this.m_freezeSide){
  19184. return this.loadFreezeSideTemplateHTML();
  19185. }else{
  19186. if(this.m_freezeTop){
  19187. return this.loadFreezeTopTemplateHTML();
  19188. }
  19189. }
  19190. }
  19191. return null;
  19192. };
  19193. PinFreezeContainer.prototype.createSideHeadings=function(_e90){
  19194. var _e91=this.getSection("pfMainOutput");
  19195. var _e92=_e91.getAttribute("pfslid");
  19196. var _e93=this.getSection("pfSideHeadings");
  19197. var _e94=_e93.getAttribute("pfslid");
  19198. var _e95=this.getMainOutputHomeCell();
  19199. if(!_e95){
  19200. return;
  19201. }
  19202. var _e96=_e90;
  19203. var _e97=_e93;
  19204. var _e98=this.isA11yEnabled(_e96);
  19205. var _e99=this.m_pinFreezeManager.deepCloneNode(_e96);
  19206. _e97.appendChild(_e99);
  19207. var _e9a=this.getSectionHomeCell(_e93);
  19208. if(!_e9a){
  19209. return;
  19210. }
  19211. var _e9b=_e96.getElementsByTagName("tbody");
  19212. var _e9c=_e99.getElementsByTagName("tbody");
  19213. if(_e9b.length>0&&_e9c.length>0){
  19214. var _e9d=_e9b[0];
  19215. var _e9e=_e9c[0];
  19216. var _e9f=_e9d.firstChild;
  19217. var _ea0=_e9e.firstChild;
  19218. var _ea1=_e95.rowSpan;
  19219. this.markAsCopy(_e95,_e9a,_e92,_e94);
  19220. for(var r=0;r<_ea1;++r){
  19221. var _ea3=_e9e.rows[r];
  19222. this.removeCTX(_ea3);
  19223. }
  19224. for(var r=_ea1;r<_e9e.rows.length;++r){
  19225. var _ea4=_e9d.rows[r];
  19226. var _ea3=_e9e.rows[r];
  19227. _ea3.style.visibility="hidden";
  19228. for(var c=0;c<_ea3.cells.length;++c){
  19229. var _ea6=_ea3.cells[c];
  19230. if(_e98){
  19231. _ea6=this.m_pinFreezeManager.removeIdAttribute(_ea6);
  19232. }
  19233. if(_ea6.getAttribute("type")=="datavalue"){
  19234. _ea6.removeAttribute("ctx");
  19235. _ea6.removeAttribute("uid");
  19236. _ea6.removeAttribute("name");
  19237. }else{
  19238. var _ea7=_ea4.cells[c];
  19239. this.markAsCopy(_ea7,_ea6,_e92,_e94);
  19240. }
  19241. }
  19242. _ea3.style.visibility="visible";
  19243. }
  19244. }
  19245. };
  19246. PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_ea8,_ea9){
  19247. if(isFF()||isIE()){
  19248. if(_ea8&&_ea8.length&&_ea8[0].cells&&_ea8[0].cells.length>1){
  19249. if(this.m_freezeSide){
  19250. var _eaa=this.getBorderInfo(_ea8[0].cells[1],"right");
  19251. if(_eaa){
  19252. _ea9.style.borderRightWidth=_eaa.borderRightWidth;
  19253. _ea9.style.borderRightStyle=_eaa.borderRightStyle;
  19254. _ea9.style.borderRightColor=_eaa.borderRightColor;
  19255. }
  19256. }
  19257. if(this.m_freezeTop){
  19258. var _eaa=this.getBorderInfo(_ea8[0].cells[1],"bottom");
  19259. if(_eaa){
  19260. _ea9.style.borderBottomWidth=_eaa.borderBottomWidth;
  19261. _ea9.style.borderBottomStyle=_eaa.borderBottomStyle;
  19262. _ea9.style.borderBottomColor=_eaa.borderBottomColor;
  19263. }
  19264. }
  19265. }
  19266. }
  19267. };
  19268. PinFreezeContainer.prototype.createTopHeadings=function(_eab){
  19269. var _eac=this.getSection("pfMainOutput");
  19270. var _ead=_eac.getAttribute("pfslid");
  19271. var _eae=this.getSection("pfTopHeadings");
  19272. var _eaf=_eae.getAttribute("pfslid");
  19273. var _eb0=this.getMainOutputHomeCell();
  19274. if(!_eb0){
  19275. return;
  19276. }
  19277. var _eb1=_eab;
  19278. var _eb2=_eae;
  19279. var _eb3=this.isA11yEnabled(_eb1);
  19280. var _eb4=this.m_pinFreezeManager.deepCloneNode(_eb1);
  19281. _eb4.setAttribute("clonednode","true");
  19282. _eb2.appendChild(_eb4);
  19283. var _eb5=_eb1.getElementsByTagName("tbody");
  19284. var _eb6=_eb4.getElementsByTagName("tbody");
  19285. if(_eb5.length>0&&_eb6.length>0){
  19286. var _eb7=_eb5[0];
  19287. var _eb8=_eb6[0];
  19288. var _eb9=_eb0.rowSpan;
  19289. for(var r=0;r<_eb8.rows.length;++r){
  19290. var _ebb=_eb7.rows[r];
  19291. var _ebc=_eb8.rows[r];
  19292. if(_eb3){
  19293. _ebc=this.m_pinFreezeManager.removeIdAttribute(_ebc);
  19294. }
  19295. _ebc.style.visibility="hidden";
  19296. for(var c=0;c<_ebc.cells.length;++c){
  19297. var _ebe=_ebc.cells[c];
  19298. if(r>_eb9||_ebe.getAttribute("type")=="datavalue"){
  19299. _ebe.removeAttribute("ctx");
  19300. _ebe.removeAttribute("uid");
  19301. _ebe.removeAttribute("name");
  19302. }else{
  19303. var _ebf=_ebb.cells[c];
  19304. this.markAsCopy(_ebf,_ebe,_ead,_eaf);
  19305. if(_ebf===_eb0){
  19306. this.initializeHomeCellTabIndex(_ebe);
  19307. this.applyNeighbouringBorderStylesToHomeCell(_eb7.rows,_ebe);
  19308. }
  19309. }
  19310. }
  19311. _ebc.style.visibility="visible";
  19312. }
  19313. }
  19314. };
  19315. PinFreezeContainer.prototype.createHomeCellHeading=function(){
  19316. var _ec0=this.getSection("pfMainOutput");
  19317. var _ec1=_ec0.getAttribute("pfslid");
  19318. var _ec2=this.getSection("pfHomeCell");
  19319. var _ec3=_ec2.parentNode;
  19320. var _ec4=_ec2.getAttribute("pfslid");
  19321. var _ec5=this.getMainOutputHomeCell();
  19322. if(!_ec5){
  19323. return;
  19324. }
  19325. _ec3.style.height="100%";
  19326. var _ec6=this.getTopHeadingSectionHeight(_ec5);
  19327. _ec2.style.height=_ec6-this.m_containerMargin.top+"px";
  19328. _ec2.style.width=this.getSideHeadingSectionWidth(_ec5)-this.m_containerMargin.left+"px";
  19329. _ec2.style.marginTop=this.m_containerMargin.top+"px";
  19330. _ec2.style.marginLeft=this.m_containerMargin.left+"px";
  19331. var _ec7=_ec5.parentNode;
  19332. var _ec8=_ec7.cloneNode(false);
  19333. var _ec9=this._findBestGuessHomeCell(_ec5);
  19334. var _eca=document.createElement("div");
  19335. _eca.style.width="100%";
  19336. _eca.style.height="100%";
  19337. while(_ec5.offsetLeft<=_ec9.offsetLeft){
  19338. oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_ec5);
  19339. if(isFF()||isIE()){
  19340. _ec5.appendChild(_eca);
  19341. oTargetHomeCell.style.width=_eca.clientWidth+"px";
  19342. _ec5.removeChild(_eca);
  19343. }else{
  19344. oTargetHomeCell.style.width=_ec5.clientWidth+1+"px";
  19345. }
  19346. oTargetHomeCell.style.borderBottomWidth="0px";
  19347. _ec8.appendChild(oTargetHomeCell);
  19348. this.markAsCopy(_ec5,oTargetHomeCell,_ec1,_ec4);
  19349. if(_ec5.nextSibling){
  19350. _ec5=_ec5.nextSibling;
  19351. }else{
  19352. break;
  19353. }
  19354. }
  19355. if(oTargetHomeCell){
  19356. oTargetHomeCell.style.borderRightWidth="0px";
  19357. }
  19358. var _ecb=_ec7.parentNode;
  19359. var _ecc=_ecb.cloneNode(false);
  19360. _ecc.appendChild(_ec8);
  19361. var _ecd=_ecb.parentNode;
  19362. var _ece=_ecd.cloneNode(false);
  19363. _ece.appendChild(_ecc);
  19364. _ece.style.width="100%";
  19365. _ece.style.height="100%";
  19366. _ece.style.marginLeft="";
  19367. _ece.style.marginTop="";
  19368. _ec2.appendChild(_ece);
  19369. this.initializeHomeCellTabIndex(oTargetHomeCell);
  19370. this.applyNeighbouringBorderStylesToHomeCell(_ec0.firstChild.rows,_ec2);
  19371. };
  19372. PinFreezeContainer.prototype.markAsCopy=function(main,copy,_ed1,_ed2){
  19373. if(!main.pfCopy){
  19374. main.setAttribute("pfslid",_ed1);
  19375. main.pfCopy=[];
  19376. }
  19377. main.pfCopy.push(copy);
  19378. copy.pfMain=main;
  19379. copy.setAttribute("pfslid",_ed2);
  19380. };
  19381. PinFreezeContainer.prototype.getCopy=function(_ed3){
  19382. if(_ed3.pfCopy){
  19383. var _ed4={};
  19384. for(var i in _ed3.pfCopy){
  19385. var copy=_ed3.pfCopy[i];
  19386. if(copy.getAttribute){
  19387. var _ed7=copy.getAttribute("pfslid");
  19388. if(_ed7){
  19389. var _ed8=PinFreezeContainer.getSectionNameFromSlid(_ed7);
  19390. var _ed9=this.getSection(_ed8);
  19391. if(_ed9&&PinFreezeContainer.isSectionVisible(_ed9)){
  19392. _ed4[_ed8]=copy;
  19393. }
  19394. }
  19395. }
  19396. }
  19397. if(_ed4["pfHomeCell"]){
  19398. return _ed4["pfHomeCell"];
  19399. }
  19400. for(i in _ed4){
  19401. return _ed4[i];
  19402. }
  19403. }
  19404. return null;
  19405. };
  19406. PinFreezeContainer.prototype.getMain=function(_eda){
  19407. if(_eda.pfMain){
  19408. return _eda.pfMain;
  19409. }
  19410. return null;
  19411. };
  19412. PinFreezeContainer.isSectionVisible=function(_edb){
  19413. var node=_edb;
  19414. if(!node){
  19415. return false;
  19416. }
  19417. while(node.parentNode&&!node.getAttribute("pfclid")){
  19418. if(node.style&&node.style.display==="none"){
  19419. return false;
  19420. }
  19421. node=node.parentNode;
  19422. }
  19423. return (!node.style||node.style.display!=="none");
  19424. };
  19425. PinFreezeContainer.prototype.getSectionStructure=function(){
  19426. var _edd={isSideFrozen:false,isTopFrozen:false};
  19427. if(this.m_freezeSide){
  19428. var side=this.getSection("pfSideHeadings");
  19429. if(side){
  19430. _edd.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
  19431. }
  19432. }
  19433. if(this.m_freezeTop){
  19434. var top=this.getSection("pfTopHeadings");
  19435. if(top){
  19436. _edd.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
  19437. }
  19438. }
  19439. return _edd;
  19440. };
  19441. PinFreezeContainer.prototype.checkSectionStructureChange=function(_ee0,_ee1){
  19442. if(_ee0.isSideFrozen!==_ee1.isSideFrozen||_ee0.isTopFrozen!==_ee1.isTopFrozen){
  19443. this.m_pinFreezeManager.sectionStructureChange();
  19444. }
  19445. };
  19446. PinFreezeContainer.prototype.freezeContainerInReport=function(_ee2){
  19447. this.cacheContainerAndSections(this.getContainerByLID(_ee2));
  19448. this.m_homeCellNodes={};
  19449. this.updateContainer();
  19450. };
  19451. PinFreezeContainer.prototype.frozenSectionsRequired=function(){
  19452. return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
  19453. };
  19454. PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
  19455. var _ee3=this.getSection("pfMainOutput");
  19456. if(_ee3){
  19457. if(this.m_freezeSide){
  19458. var _ee4=_ee3.scrollWidth;
  19459. return ((this.m_clientWidth<_ee4)||_ee4==0);
  19460. }
  19461. }
  19462. return false;
  19463. };
  19464. PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
  19465. var _ee5=this.getSection("pfMainOutput");
  19466. if(_ee5){
  19467. if(this.m_freezeTop){
  19468. var _ee6=_ee5.scrollHeight;
  19469. return ((this.m_clientHeight<_ee6)||_ee6==0);
  19470. }
  19471. }
  19472. return false;
  19473. };
  19474. PinFreezeContainer.prototype.showTemplatePart=function(_ee7,_ee8){
  19475. var _ee9=this.getContainer().rows;
  19476. for(var r=0;r<_ee9.length;++r){
  19477. if(_ee9[r].getAttribute("templatePart")===_ee7){
  19478. _ee9[r].style.display=((_ee8)?"":"none");
  19479. }else{
  19480. var _eeb=_ee9[r].cells;
  19481. for(var c=0;c<_eeb.length;++c){
  19482. if(_eeb[c].getAttribute("templatePart")===_ee7){
  19483. _eeb[c].style.display=((_ee8)?"":"none");
  19484. }
  19485. }
  19486. }
  19487. }
  19488. };
  19489. PinFreezeContainer.prototype.showFreezeTopOnly=function(_eed){
  19490. if(!(this.m_freezeTop&&this.m_freezeSide)){
  19491. return;
  19492. }
  19493. var _eee=(_eed.scrollWidth==0)?_eed.clientWidth:_eed.scrollWidth;
  19494. this.updateMainOutputWidth(_eee);
  19495. this.setScrollX(_eed,0);
  19496. if(this.getSection("pfTopHeadings")){
  19497. this.getSection("pfTopHeadings").style.width=_eee+"px";
  19498. this.setScrollX(this.getSection("pfTopHeadings"),0);
  19499. }
  19500. this.showTemplatePart("freezeSide",false);
  19501. };
  19502. PinFreezeContainer.prototype.showFreezeSideOnly=function(_eef){
  19503. if(!(this.m_freezeTop&&this.m_freezeSide)){
  19504. return;
  19505. }
  19506. var _ef0=(_eef.scrollHeight==0)?_eef.clientHeight:_eef.scrollHeight;
  19507. this.updateMainOutputHeight(_ef0);
  19508. this.setScrollY(_eef,0);
  19509. if(this.getSection("pfSideHeadings")){
  19510. this.getSection("pfSideHeadings").style.height=_ef0+"px";
  19511. this.setScrollY(this.getSection("pfSideHeadings"),0);
  19512. }
  19513. this.showTemplatePart("freezeTop",false);
  19514. };
  19515. PinFreezeContainer.prototype.showAll=function(){
  19516. if(!(this.m_freezeTop&&this.m_freezeSide)){
  19517. return;
  19518. }
  19519. this.showTemplatePart("freezeTop",true);
  19520. this.showTemplatePart("freezeSide",true);
  19521. };
  19522. PinFreezeContainer.prototype.showMainOutputOnly=function(_ef1){
  19523. this.updateMainOutputWidth((_ef1.scrollWidth==0)?_ef1.clientWidth:_ef1.scrollWidth);
  19524. this.updateMainOutputHeight((_ef1.scrollHeight==0)?_ef1.clientHeight:_ef1.scrollHeight);
  19525. this.setInitialScrollPosition(_ef1,0,0);
  19526. if(this.m_freezeSide&&this.m_freezeTop){
  19527. this.getSection("pfHomeCell").style.display="none";
  19528. }
  19529. if(this.m_freezeSide){
  19530. this.getSection("pfSideHeadings").style.display="none";
  19531. this.getSection("pfHorizontalScrollBar").style.display="none";
  19532. }
  19533. if(this.m_freezeTop){
  19534. this.getSection("pfTopHeadings").style.display="none";
  19535. this.getSection("pfVerticalScrollBar").style.display="none";
  19536. }
  19537. };
  19538. PinFreezeContainer.prototype.getWrap=function(el){
  19539. if(el.currentStyle){
  19540. return el.currentStyle.whiteSpace;
  19541. }else{
  19542. if(window.getComputedStyle){
  19543. return window.getComputedStyle(el,null).getPropertyValue("white-space");
  19544. }else{
  19545. return el.style.whiteSpace;
  19546. }
  19547. }
  19548. };
  19549. PinFreezeContainer.prototype.getStyleDisplay=function(el){
  19550. if(el.currentStyle){
  19551. return el.currentStyle.display;
  19552. }else{
  19553. if(window.getComputedStyle){
  19554. return window.getComputedStyle(el,null).getPropertyValue("display");
  19555. }else{
  19556. return el.style.display;
  19557. }
  19558. }
  19559. };
  19560. PinFreezeContainer.prototype.headingsCreated=function(_ef4){
  19561. return _ef4.firstChild?true:false;
  19562. };
  19563. PinFreezeContainer.prototype.updateContainer=function(){
  19564. var _ef5=this.getSection("pfMainOutput");
  19565. var _ef6=this.getMainOutputHomeCell();
  19566. if(_ef6){
  19567. if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
  19568. this.m_scrollableClientHeight-=_ef6.offsetHeight;
  19569. var _ef7=this.calculateMinCrossTabScrollableClientHeight();
  19570. if(_ef7>this.m_scrollableClientHeight){
  19571. this.m_scrollableClientHeight=_ef7;
  19572. }
  19573. }
  19574. if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
  19575. this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_ef6);
  19576. }
  19577. }
  19578. if(_ef5&&_ef6){
  19579. this.showAll();
  19580. if(this.frozenSectionsRequired()){
  19581. this.updateMainOutputSize();
  19582. this.initializeHomeCellTabIndex(_ef6);
  19583. if(this.m_freezeSide){
  19584. var _ef8=this.getSection("pfSideHeadings");
  19585. if(!this.headingsCreated(_ef8)){
  19586. this.createSideHeadings(this.m_cachedBaseContainer);
  19587. if(this.m_freezeTop){
  19588. this.initializeTouchScrolling(_ef8);
  19589. }
  19590. }
  19591. var _ef9=this.getSection("pfHorizontalScrollBar");
  19592. _ef9.scrollLeft="0px";
  19593. }
  19594. if(this.m_freezeTop){
  19595. var _efa=this.getSection("pfTopHeadings");
  19596. if(!this.headingsCreated(_efa)){
  19597. this.createTopHeadings(this.m_cachedBaseContainer);
  19598. if(this.m_freezeSide){
  19599. this.initializeTouchScrolling(_efa);
  19600. }
  19601. }
  19602. var _efb=this.getSection("pfVerticalScrollBar");
  19603. _efb.scrollTop="0px";
  19604. }
  19605. if(this.m_freezeSide&&this.m_freezeTop){
  19606. var _efc=this.getSection("pfHomeCell");
  19607. if(!this.headingsCreated(_efc)){
  19608. this.createHomeCellHeading();
  19609. }
  19610. _efc.style.display="";
  19611. }
  19612. var _efd=this.updateSideHeadingSize(_ef6);
  19613. var _efe=this.updateTopHeadingSize(_ef6);
  19614. if(!this.frozenSectionsRequired()){
  19615. this.showMainOutputOnly(_ef5);
  19616. }
  19617. this.setInitialScrollPosition(_ef5,_efd,_efe);
  19618. if(this.m_freezeTop&&this.m_freezeSide){
  19619. this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_efe);
  19620. this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_efd,0);
  19621. }
  19622. this.initializeTouchScrolling(_ef5);
  19623. }else{
  19624. this.showMainOutputOnly(_ef5);
  19625. this.removeTouchScrolling();
  19626. }
  19627. this.updateTabIndexValues();
  19628. }
  19629. };
  19630. PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
  19631. var _eff=0;
  19632. if(this.m_cachedPFContainer){
  19633. var _f00=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
  19634. if(_f00){
  19635. var _f01=0;
  19636. for(var r=0;r<_f00.rows.length;r++){
  19637. var row=_f00.rows[r];
  19638. for(var c=0;c<row.cells.length;c++){
  19639. var cell=row.cells[c];
  19640. if(cell.getAttribute("type")=="datavalue"){
  19641. _f01++;
  19642. if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
  19643. _eff=_eff+cell.offsetHeight;
  19644. }else{
  19645. _f01++;
  19646. var _f06=this.getSection("pfVerticalScrollBar");
  19647. if(_f06){
  19648. _eff=_f06.offsetWidth*2;
  19649. }
  19650. }
  19651. break;
  19652. }
  19653. }
  19654. if(_f01>=2){
  19655. break;
  19656. }
  19657. }
  19658. }
  19659. }
  19660. return _eff;
  19661. };
  19662. PinFreezeContainer.prototype.updateSideHeadingSize=function(_f07){
  19663. var _f08=0;
  19664. if(this.m_freezeSide){
  19665. var _f09=this.getSection("pfMainOutput");
  19666. if(!_f09){
  19667. return 0;
  19668. }
  19669. if(!this.frozenSideHeadingsRequired()){
  19670. this.showFreezeTopOnly(_f09);
  19671. return 0;
  19672. }
  19673. var _f0a=this.getSection("pfSideHeadings");
  19674. _f08=this.getSideHeadingSectionWidth(_f07);
  19675. var _f0b=this.getSection("pfHorizontalScrollBar");
  19676. var _f0c=this.getSectionHomeCell(_f0a);
  19677. if(_f0a.style.display=="none"){
  19678. _f0a.style.display="";
  19679. _f0b.style.display="";
  19680. }
  19681. _f0a.style.width=_f08+"px";
  19682. _f0a.style.height=_f09.clientHeight+"px";
  19683. }
  19684. return _f08;
  19685. };
  19686. PinFreezeContainer.prototype.updateTopHeadingSize=function(_f0d){
  19687. var _f0e=0;
  19688. if(this.m_freezeTop){
  19689. var _f0f=this.getSection("pfMainOutput");
  19690. if(!_f0f){
  19691. return 0;
  19692. }
  19693. if(!this.frozenTopHeadingsRequired()){
  19694. this.showFreezeSideOnly(_f0f);
  19695. return 0;
  19696. }
  19697. var _f10=this.getSection("pfTopHeadings");
  19698. _f0e=this.getTopHeadingSectionHeight(_f0d);
  19699. var _f11=this.getSection("pfVerticalScrollBar");
  19700. var _f12=this.getSectionHomeCell(_f10);
  19701. if(_f10.style.display=="none"){
  19702. _f10.style.display="";
  19703. _f11.style.display="";
  19704. }
  19705. _f10.style.height=_f0e+"px";
  19706. _f10.style.width=_f0f.clientWidth+"px";
  19707. }
  19708. return _f0e;
  19709. };
  19710. PinFreezeContainer.prototype.setScrollX=function(_f13,_f14){
  19711. if(getElementDirection(_f13)==="rtl"){
  19712. setScrollRight(_f13,_f14);
  19713. }else{
  19714. setScrollLeft(_f13,_f14);
  19715. }
  19716. };
  19717. PinFreezeContainer.prototype.setScrollY=function(_f15,_f16){
  19718. _f15.scrollTop=_f16;
  19719. };
  19720. PinFreezeContainer.prototype.setInitialScrollPosition=function(_f17,_f18,_f19){
  19721. if(getElementDirection(_f17)==="rtl"){
  19722. setScrollRight(_f17,_f18);
  19723. }else{
  19724. setScrollLeft(_f17,_f18);
  19725. }
  19726. _f17.scrollTop=_f19;
  19727. };
  19728. PinFreezeContainer.prototype.getScrollableClientWidth=function(){
  19729. return this.m_scrollableClientWidth;
  19730. };
  19731. PinFreezeContainer.prototype.setScrollableClientWidth=function(_f1a){
  19732. this.m_scrollableClientWidth=_f1a;
  19733. };
  19734. PinFreezeContainer.prototype.getContainerWidth=function(){
  19735. return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth;
  19736. };
  19737. PinFreezeContainer.prototype.getClientWidth=function(){
  19738. return this.m_clientWidth;
  19739. };
  19740. PinFreezeContainer.prototype.getScrollableClientHeight=function(){
  19741. return this.m_scrollableClientHeight;
  19742. };
  19743. PinFreezeContainer.prototype.setScrollableClientHeight=function(_f1b){
  19744. this.m_scrollableClientHeight=_f1b;
  19745. };
  19746. PinFreezeContainer.prototype.getClientHeight=function(){
  19747. return this.m_clientHeight;
  19748. };
  19749. PinFreezeContainer.prototype.clientHeight=function(_f1c){
  19750. return _f1c.clientHeight;
  19751. };
  19752. PinFreezeContainer.prototype.findBestContainerHeight=function(_f1d){
  19753. if(this.m_freezeTop&&this.m_cachedReportDiv){
  19754. var _f1e=this.m_cachedReportDiv.parentNode;
  19755. if(_f1e){
  19756. var _f1f=this._findRestOfPageHeight(this.getContainer());
  19757. return _f1d-_f1f-(this.c_pageMargin/2)-this.m_containerMargin.top;
  19758. }
  19759. }
  19760. return _f1d-this.c_pageMargin;
  19761. };
  19762. PinFreezeContainer.prototype.findBestContainerWidth=function(_f20){
  19763. var node=this.getContainer();
  19764. while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  19765. node=node.parentNode;
  19766. }
  19767. if(!node){
  19768. return -1;
  19769. }
  19770. if(node.nodeName.toLowerCase()=="td"){
  19771. var _f22=0;
  19772. var _f23=node.parentNode.childNodes;
  19773. for(var i=0;i<_f23.length;i++){
  19774. if(_f23[i]!==node){
  19775. _f22+=_f23[i].clientWidth;
  19776. }
  19777. }
  19778. return _f20-_f22-(this.c_pageMargin/2);
  19779. }
  19780. return _f20;
  19781. };
  19782. PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
  19783. var _f26=0;
  19784. var _f27=node.parentNode;
  19785. if(!_f27){
  19786. return _f26;
  19787. }
  19788. if(_f27.childNodes.length>1){
  19789. for(var i=0;i<_f27.childNodes.length;i++){
  19790. var _f29=_f27.childNodes[i];
  19791. if(_f29.nodeType==1){
  19792. var _f2a=this.getStyleDisplay(_f29);
  19793. if(_f29!=node&&!isNaN(_f29.clientHeight)&&_f2a!="none"&&_f2a!="table-cell"){
  19794. _f26+=this.clientHeight(_f29);
  19795. }
  19796. }
  19797. }
  19798. }
  19799. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  19800. _f26+=this._findRestOfPageHeight(_f27);
  19801. }
  19802. return _f26;
  19803. };
  19804. PinFreezeContainer.prototype.resize=function(_f2b,_f2c,_f2d,_f2e){
  19805. if(this.m_fixedWidth&&this.m_fixedHeight){
  19806. return;
  19807. }
  19808. _f2b=(this.m_fixedWidth)?this.m_fixedWidth:_f2b;
  19809. _f2c=(this.m_fixedHeight)?this.m_fixedHeight:_f2c;
  19810. var _f2f=this.getSectionStructure();
  19811. if(this.m_sectionCache&&this.m_cachedPFContainer){
  19812. var _f30=0;
  19813. if(_f2c!==0){
  19814. _f30=this.findBestContainerHeight(_f2c);
  19815. if(_f2d&&_f30<300){
  19816. _f30=300;
  19817. }else{
  19818. if(_f30<100){
  19819. _f30=100;
  19820. }
  19821. }
  19822. }
  19823. this.m_clientHeight=_f30>0?_f30:this.m_clientHeight;
  19824. var _f31=0;
  19825. if(_f2b!==0){
  19826. _f31=this.findBestContainerWidth(_f2b);
  19827. }
  19828. this.m_clientWidth=(_f31>0)?_f31-5-(this.c_pageMargin/2):this.m_clientWidth;
  19829. var _f32=this.getSection("pfMainOutput");
  19830. var _f33=this.getSectionHomeCell(_f32);
  19831. if(_f33){
  19832. this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_f33);
  19833. this.m_scrollableClientHeight=this.m_clientHeight-_f33.offsetHeight;
  19834. }
  19835. if(_f2e){
  19836. var _f34=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_f2e.lid);
  19837. if(_f34){
  19838. var node=_f34[0];
  19839. while(node.nodeName.toLowerCase()!="table"){
  19840. node=node.parentNode;
  19841. }
  19842. node.style.width=_f2e.width+"px";
  19843. }
  19844. }
  19845. this.updateContainer();
  19846. }else{
  19847. this.m_clientWidth=_f2b-this.c_pageMargin;
  19848. this.m_clientHeight=_f2c-this.c_pageMargin;
  19849. }
  19850. var _f36=this.getSectionStructure();
  19851. this.checkSectionStructureChange(_f2f,_f36);
  19852. };
  19853. PinFreezeContainer.prototype.updateMainOutputSize=function(){
  19854. if(this.m_freezeSide&&this.m_freezeTop){
  19855. if(this.frozenSideHeadingsRequired()){
  19856. this.updateMainOutputWidth(this.getScrollableClientWidth());
  19857. }
  19858. if(this.frozenTopHeadingsRequired()){
  19859. this.updateMainOutputHeight(this.getScrollableClientHeight());
  19860. }
  19861. }else{
  19862. if(this.m_freezeSide){
  19863. this.updateMainOutputWidth(this.getScrollableClientWidth());
  19864. }else{
  19865. if(this.m_freezeTop){
  19866. this.updateMainOutputHeight(this.getScrollableClientHeight());
  19867. }
  19868. }
  19869. }
  19870. };
  19871. PinFreezeContainer.prototype.updateMainOutputWidth=function(_f37){
  19872. var _f38=this.getSection("pfMainOutput");
  19873. if(!_f38){
  19874. return;
  19875. }
  19876. if(this.m_freezeSide==true){
  19877. _f38.style.width=(_f37+"px");
  19878. if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
  19879. _f38.style.height=_f38.firstChild.clientHeight+"px";
  19880. }
  19881. var _f39=this.getSection("pfHorizontalScrollBar");
  19882. if(_f39){
  19883. _f39.style.width=(_f37+"px");
  19884. var _f3a=_f39.firstChild;
  19885. if(_f3a){
  19886. var _f3b=this.getSectionHomeCell(_f38);
  19887. var _f3c=_f38.scrollWidth-this.getHomeCellOffsetWidth(_f3b);
  19888. _f3a.style.width=_f3c+"px";
  19889. }
  19890. }
  19891. }
  19892. };
  19893. PinFreezeContainer.prototype.updateMainOutputHeight=function(_f3d){
  19894. var _f3e=this.getSection("pfMainOutput");
  19895. if(!_f3e){
  19896. return;
  19897. }
  19898. _f3e.style.height=(_f3d+"px");
  19899. if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
  19900. _f3e.style.width=_f3e.firstChild.clientWidth+2+"px";
  19901. }
  19902. var _f3f=this.getSection("pfVerticalScrollBar");
  19903. if(_f3f){
  19904. _f3f.style.height=(_f3d+"px");
  19905. var _f40=_f3f.firstChild;
  19906. if(_f40){
  19907. var _f41=this.getSectionHomeCell(_f3e);
  19908. var _f42=_f3e.scrollHeight-_f41.offsetHeight;
  19909. _f40.style.height=_f42+"px";
  19910. }
  19911. }
  19912. };
  19913. PinFreezeContainer.prototype.getElementByLID=function(_f43,tag,lid){
  19914. var _f46=getElementsByAttribute(_f43,tag,"lid",lid);
  19915. if(_f46.length>0){
  19916. return _f46[0];
  19917. }
  19918. return null;
  19919. };
  19920. PinFreezeContainer.prototype.getContainerByLID=function(_f47){
  19921. var _f48=getElementsByAttribute(_f47,"table","pfclid","pfContainer_"+this.m_lidNS);
  19922. if(_f48.length>0){
  19923. return _f48[0];
  19924. }
  19925. return null;
  19926. };
  19927. PinFreezeContainer.prototype.getSectionByLID=function(_f49,_f4a){
  19928. var _f4b=getElementsByAttribute(_f49,"div","pfslid",_f4a+"_"+this.m_lidNS);
  19929. if(_f4b.length>0){
  19930. return _f4b[0];
  19931. }
  19932. return null;
  19933. };
  19934. PinFreezeContainer.getSectionNameFromSlid=function(slid){
  19935. return slid?slid.split("_")[0]:null;
  19936. };
  19937. PinFreezeContainer.getLidFromSlid=function(slid){
  19938. return slid.split("_")[1];
  19939. };
  19940. PinFreezeContainer.nodeToSlid=function(_f4e){
  19941. while(_f4e.parentNode&&!_f4e.getAttribute("pfslid")){
  19942. _f4e=_f4e.parentNode;
  19943. }
  19944. if(_f4e.getAttribute){
  19945. return _f4e.getAttribute("pfslid");
  19946. }
  19947. return null;
  19948. };
  19949. PinFreezeContainer.prototype.cacheContainerAndSections=function(_f4f){
  19950. if(!_f4f){
  19951. return _f4f;
  19952. }
  19953. this.m_cachedPFContainer=_f4f;
  19954. var _f50=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
  19955. this.m_sectionCache={};
  19956. for(var i=0;i<_f50.length;++i){
  19957. var key=_f50[i].getAttribute("pfslid");
  19958. key=key.split("_",1);
  19959. this.m_sectionCache[key]=_f50[i];
  19960. }
  19961. return _f4f;
  19962. };
  19963. PinFreezeContainer.prototype.getContainer=function(){
  19964. return this.m_cachedPFContainer;
  19965. };
  19966. PinFreezeContainer.prototype.getSection=function(key){
  19967. if(!this.m_sectionCache){
  19968. return null;
  19969. }
  19970. if(!this.m_sectionCache[key]){
  19971. this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key);
  19972. }
  19973. return this.m_sectionCache[key];
  19974. };
  19975. PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_f54){
  19976. var slid=PinFreezeContainer.nodeToSlid(_f54);
  19977. if(!this.m_homeCellNodes[slid]){
  19978. var _f56=getElementsByAttribute(_f54,"*","tabIndex","*");
  19979. for(var i in _f56){
  19980. if(!_f56[i].getAttribute("widgetid")){
  19981. this.m_homeCellNodes[slid]=_f56[i];
  19982. break;
  19983. }
  19984. }
  19985. }
  19986. };
  19987. PinFreezeContainer.prototype.updateTabIndexValues=function(){
  19988. if(this.isContainerFrozen()){
  19989. for(var slid in this.m_homeCellNodes){
  19990. var _f59=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
  19991. this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59);
  19992. }
  19993. }else{
  19994. for(var slid in this.m_homeCellNodes){
  19995. var _f59=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
  19996. this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59);
  19997. }
  19998. }
  19999. };
  20000. PinFreezeContainer.prototype.getSectionHomeCell=function(_f5a){
  20001. if(_f5a){
  20002. var _f5b=this.getElementByLID(_f5a,"table",this.m_lid+this.m_viewerId);
  20003. if(_f5b&&_f5b.rows.length&&_f5b.rows[0].cells.length){
  20004. return _f5b.rows[0].cells[0];
  20005. }
  20006. }
  20007. return null;
  20008. };
  20009. PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
  20010. var _f5c=this.getSection("pfMainOutput");
  20011. if(!_f5c){
  20012. _f5c=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
  20013. }
  20014. return this.getSectionHomeCell(_f5c);
  20015. };
  20016. PinFreezeContainer.prototype.getChildPosition=function(_f5d,_f5e){
  20017. for(var i=0;i<_f5d.childNodes.length;++i){
  20018. if(_f5d.childNodes[i]==_f5e){
  20019. return i;
  20020. }
  20021. }
  20022. return -1;
  20023. };
  20024. PinFreezeContainer.prototype.insertAt=function(_f60,_f61,_f62){
  20025. if(_f62==_f60.childNodes.length){
  20026. _f60.appendChild(_f61);
  20027. }else{
  20028. _f60.insertBefore(_f61,_f60.childNodes[_f62]);
  20029. }
  20030. };
  20031. PinFreezeContainer.prototype.synchScroll=function(){
  20032. if(!this.m_cachedPFContainer){
  20033. return;
  20034. }
  20035. var _f63=this.getMainOutputHomeCell();
  20036. var _f64=this.getSection("pfMainOutput");
  20037. var _f65=this.getSection("pfSideHeadings");
  20038. if(_f65!=null){
  20039. var _f66=this.getSection("pfHorizontalScrollBar");
  20040. if(_f66){
  20041. var _f67=this.getSideHeadingSectionWidth(_f63);
  20042. if(getElementDirection(_f64)==="rtl"){
  20043. _f67=0;
  20044. }
  20045. setScrollLeft(_f64,getScrollLeft(_f66)+_f67);
  20046. if(this.m_freezeTop){
  20047. setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_f66)+_f67);
  20048. }
  20049. }
  20050. }
  20051. };
  20052. PinFreezeContainer.prototype.updateScroll=function(_f68){
  20053. var slid=PinFreezeContainer.nodeToSlid(_f68);
  20054. if(!slid){
  20055. return;
  20056. }
  20057. var _f6a=PinFreezeContainer.getSectionNameFromSlid(slid);
  20058. if(!_f6a){
  20059. return;
  20060. }
  20061. var _f6b=document.getElementById("CVReport"+this.m_viewerId);
  20062. if(!_f6b){
  20063. return;
  20064. }
  20065. if(!this.m_cachedPFContainer){
  20066. return;
  20067. }
  20068. var _f6c=_f68.parentNode;
  20069. if(_f6c){
  20070. var _f6d=_f6c.tagName.toLowerCase();
  20071. if(_f6d==="td"||_f6d==="th"){
  20072. var _f6e=this.getMainOutputHomeCell();
  20073. var _f6f=this.getSection("pfMainOutput");
  20074. if(_f6a==="pfMainOutput"||_f6a==="pfTopHeadings"){
  20075. var _f70=this.getSection("pfHorizontalScrollBar");
  20076. if(_f70){
  20077. var _f71=PinFreezeContainer.calculateNewPosition(_f6c.offsetLeft,_f6c.offsetWidth,getScrollLeft(_f6f),_f6f.offsetWidth);
  20078. var _f72=this.getHomeCellOffsetWidth(_f6e);
  20079. if(getElementDirection(_f6f)==="rtl"){
  20080. _f72=0;
  20081. }
  20082. setScrollLeft(_f70,_f71-_f72);
  20083. setScrollLeft(_f6f,_f71);
  20084. }
  20085. }
  20086. if(_f6a==="pfMainOutput"||_f6a==="pfSideHeadings"){
  20087. var _f73=this.getSection("pfVerticalScrollBar");
  20088. if(_f73){
  20089. var _f74=PinFreezeContainer.calculateNewPosition(_f6c.offsetTop,_f6c.offsetHeight,_f6f.scrollTop,_f6f.offsetHeight);
  20090. _f73.scrollTop=_f74-_f6e.offsetHeight;
  20091. _f6f.scrollTop=_f74;
  20092. }
  20093. }
  20094. }
  20095. }
  20096. };
  20097. PinFreezeContainer.calculateNewPosition=function(_f75,_f76,_f77,_f78){
  20098. var _f79=_f75+_f76;
  20099. var _f7a=_f77+_f78;
  20100. if(_f77>_f75){
  20101. return _f75;
  20102. }else{
  20103. if(_f7a<_f79){
  20104. if(_f76>_f78){
  20105. return _f75;
  20106. }
  20107. return _f79-_f78;
  20108. }
  20109. }
  20110. return _f77;
  20111. };
  20112. PinFreezeContainer.prototype.synchVScroll=function(){
  20113. if(!this.m_cachedPFContainer){
  20114. return;
  20115. }
  20116. var _f7b=this.getMainOutputHomeCell();
  20117. var _f7c=this.getSection("pfMainOutput");
  20118. var _f7d=this.getSection("pfTopHeadings");
  20119. if(_f7d!=null){
  20120. var _f7e=this.getSection("pfVerticalScrollBar");
  20121. if(_f7e){
  20122. _f7c.scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b);
  20123. if(this.m_freezeSide){
  20124. this.getSection("pfSideHeadings").scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b);
  20125. }
  20126. }
  20127. }
  20128. };
  20129. PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_f7f){
  20130. return _f7f.offsetHeight+_f7f.offsetTop+this.m_containerMargin.top;
  20131. };
  20132. PinFreezeContainer.prototype._findBestGuessHomeCell=function(_f80){
  20133. if(this.m_bestGuessHomeCell){
  20134. return this.m_bestGuessHomeCell;
  20135. }
  20136. if(_f80){
  20137. var _f81=_f80.parentNode.parentNode;
  20138. var _f82=_f80.rowSpan?(_f80.rowSpan):1;
  20139. var tr=_f81.childNodes[_f82];
  20140. if(tr){
  20141. var _f84=tr.childNodes.length;
  20142. var _f85=null;
  20143. var td=null;
  20144. for(var i=0;i<_f84;i++){
  20145. td=tr.childNodes[i];
  20146. if(td.getAttribute("type")=="datavalue"){
  20147. break;
  20148. }
  20149. _f85=td;
  20150. }
  20151. if(_f85){
  20152. this.m_bestGuessHomeCell=_f85;
  20153. return this.m_bestGuessHomeCell;
  20154. }
  20155. }else{
  20156. return _f80;
  20157. }
  20158. }
  20159. return null;
  20160. };
  20161. PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_f88){
  20162. var _f89=this._findBestGuessHomeCell(_f88);
  20163. return _f89?_f89.offsetWidth:0;
  20164. };
  20165. PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_f8a){
  20166. var _f8b=this._findBestGuessHomeCell(_f8a);
  20167. if(_f8b){
  20168. return _f8b.offsetWidth+_f8b.offsetLeft+this.m_containerMargin.left;
  20169. }else{
  20170. return _f8a.offsetWidth+_f8a.offsetLeft;
  20171. }
  20172. };
  20173. PinFreezeContainer.prototype.isContainerFrozen=function(){
  20174. return (this.m_freezeTop||this.m_freezeSide);
  20175. };
  20176. PinFreezeContainer.prototype.unfreeze=function(_f8c){
  20177. var _f8d=this.getContainerByLID(_f8c);
  20178. this.m_freezeTop=false;
  20179. this.m_freezeSide=false;
  20180. if(_f8d){
  20181. var _f8e=_f8d.parentNode;
  20182. pfMainOutput=this.getSectionByLID(_f8d,"pfMainOutput");
  20183. if(pfMainOutput&&_f8e){
  20184. if(_f8d.style.border!==""){
  20185. pfMainOutput.firstChild.style.border=_f8d.style.border;
  20186. _f8d.style.border="";
  20187. }
  20188. if(this.m_wrapFlag){
  20189. var _f8f=pfMainOutput.firstChild.getElementsByTagName("span");
  20190. if(_f8f){
  20191. for(var k=0;k<_f8f.length;k++){
  20192. _f8f[k].style.whiteSpace="";
  20193. }
  20194. }
  20195. this.m_wrapFlag=false;
  20196. }
  20197. this.updateTabIndexValues();
  20198. if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){
  20199. this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth");
  20200. this.m_cachedBaseContainer.style.width="auto";
  20201. this.m_addedFixedWidth=null;
  20202. }
  20203. if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){
  20204. this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight");
  20205. this.m_cachedBaseContainer.style.height="auto";
  20206. this.m_addedFixedHeight=null;
  20207. }
  20208. _f8e.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_f8d);
  20209. }
  20210. }
  20211. };
  20212. PinFreezeContainer.prototype.getBorderInfo=function(el,_f92){
  20213. var _f93={};
  20214. var _f94="border-"+_f92+"-";
  20215. var _f95="border"+_f92.charAt(0).toUpperCase()+_f92.substring(1);
  20216. if(el.currentStyle){
  20217. _f93[_f95+"Width"]=el.currentStyle[_f95+"Width"];
  20218. _f93[_f95+"Style"]=el.currentStyle[_f95+"Style"];
  20219. _f93[_f95+"Color"]=el.currentStyle[_f95+"Color"];
  20220. }else{
  20221. if(window.getComputedStyle){
  20222. _f93[_f95+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"width");
  20223. _f93[_f95+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"style");
  20224. _f93[_f95+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"color");
  20225. }else{
  20226. return null;
  20227. }
  20228. }
  20229. return _f93;
  20230. };
  20231. PinFreezeContainer.prototype.isA11yEnabled=function(_f96){
  20232. return (_f96.getAttribute("role")==="grid");
  20233. };
  20234. PinFreezeContainer.isElementInMainOutput=function(_f97){
  20235. var _f98=PinFreezeContainer.nodeToSlid(_f97);
  20236. if(_f98){
  20237. return (_f98.indexOf("pfMainOutput_")===0);
  20238. }
  20239. return false;
  20240. };
  20241. PinFreezeContainer.prototype.removeCTX=function(_f99){
  20242. _f99.removeAttribute("ctx");
  20243. var _f9a=getElementsByAttribute(_f99,"*","ctx","*");
  20244. if(_f9a&&_f9a.length){
  20245. for(var i=0;i<_f9a.length;i++){
  20246. _f9a[i].removeAttribute("ctx");
  20247. }
  20248. }
  20249. };
  20250. PinFreezeContainer.prototype.initializeTouchScrolling=function(_f9c){
  20251. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  20252. return;
  20253. }
  20254. if(_f9c){
  20255. _f9c.m_pinFreezeContainer=this;
  20256. if(document.attachEvent){
  20257. _f9c.attachEvent("touchstart",this.touchStart);
  20258. _f9c.attachEvent("touchmove",this.touchMove);
  20259. _f9c.attachEvent("touchend",this.touchEnd);
  20260. }else{
  20261. _f9c.addEventListener("touchstart",this.touchStart,false);
  20262. _f9c.addEventListener("touchmove",this.touchMove,false);
  20263. _f9c.addEventListener("touchend",this.touchEnd,false);
  20264. }
  20265. }
  20266. };
  20267. PinFreezeContainer.prototype.removeTouchScrolling=function(){
  20268. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  20269. return;
  20270. }
  20271. this.removeTouchScrollingEvents(this.getSection("pfMainOutput"));
  20272. this.removeTouchScrollingEvents(this.getSection("pfSideHeadings"));
  20273. this.removeTouchScrollingEvents(this.getSection("pfTopHeadings"));
  20274. };
  20275. PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_f9d){
  20276. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  20277. return;
  20278. }
  20279. if(_f9d){
  20280. if(document.detachEvent){
  20281. _f9d.detachEvent("touchstart",this.touchStart);
  20282. _f9d.detachEvent("touchmove",this.touchMove);
  20283. _f9d.detachEvent("touchend",this.touchEnd);
  20284. }else{
  20285. _f9d.removeEventListener("touchstart",this.touchStart,false);
  20286. _f9d.removeEventListener("touchmove",this.touchMove,false);
  20287. _f9d.removeEventListener("touchend",this.touchEnd,false);
  20288. }
  20289. }
  20290. };
  20291. PinFreezeContainer.prototype.touchMove=function(e){
  20292. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  20293. var _f9f=e.changedTouches[0];
  20294. if(_f9f&&_f9f.clientX&&_f9f.clientY){
  20295. var _fa0=parseInt(_f9f.clientX);
  20296. var _fa1=parseInt(_f9f.clientY);
  20297. if(this.m_pinFreezeContainer.touchMoveHandler(_fa0,_fa1)){
  20298. return stopEventBubble(e);
  20299. }
  20300. }
  20301. }
  20302. };
  20303. PinFreezeContainer.prototype.touchStart=function(e){
  20304. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  20305. var _fa3=e.changedTouches[0];
  20306. if(_fa3&&_fa3.clientX&&_fa3.clientY){
  20307. var _fa4=parseInt(_fa3.clientX);
  20308. var _fa5=parseInt(_fa3.clientY);
  20309. this.m_pinFreezeContainer.touchStartHandler(_fa4,_fa5);
  20310. }
  20311. }
  20312. };
  20313. PinFreezeContainer.prototype.touchStartHandler=function(_fa6,_fa7){
  20314. this.touchScrollSections=false;
  20315. this.touchPreviousX=_fa6;
  20316. this.touchPreviousY=_fa7;
  20317. };
  20318. PinFreezeContainer.prototype.touchEnd=function(e){
  20319. if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
  20320. stopEventBubble(e);
  20321. }
  20322. };
  20323. PinFreezeContainer.prototype.touchEndHandler=function(){
  20324. var _fa9=this.touchScrollSections;
  20325. this.touchScrollSections=false;
  20326. this.touchPreviousX=-1;
  20327. this.touchPreviousY=-1;
  20328. return _fa9;
  20329. };
  20330. PinFreezeContainer.prototype.touchMoveHandler=function(_faa,_fab){
  20331. var _fac=this.getSection("pfMainOutput");
  20332. if(!_fac){
  20333. return;
  20334. }
  20335. var _fad=this.getSectionHomeCell(_fac);
  20336. var _fae=this.getTopHeadingSectionHeight(_fad);
  20337. var _faf=this.getSideHeadingSectionWidth(_fad);
  20338. var _fb0=_fab-this.touchPreviousY;
  20339. var _fb1=_faa-this.touchPreviousX;
  20340. if(this.touchScrollSections){
  20341. if(_fb0!=0){
  20342. var _fb2=_fac.scrollTop-_fb0;
  20343. _fb2=(_fb2>_fae)?_fb2:_fae;
  20344. _fac.scrollTop=_fb2;
  20345. var _fb3=this.getSection("pfSideHeadings");
  20346. if(_fb3){
  20347. _fb3.scrollTop=_fb2;
  20348. }
  20349. }
  20350. if(_fb1!=0){
  20351. var _fb4=_fac.scrollLeft-_fb1;
  20352. _fb4=(_fb4>_faf)?_fb4:_faf;
  20353. _fac.scrollLeft=_fb4;
  20354. var _fb5=this.getSection("pfTopHeadings");
  20355. if(_fb5){
  20356. _fb5.scrollLeft=_fb4;
  20357. }
  20358. }
  20359. }else{
  20360. this.firstTouchMove(_fac,_fb1,_fb0,_faf,_fae);
  20361. }
  20362. this.touchPreviousX=_faa;
  20363. this.touchPreviousY=_fab;
  20364. return this.touchScrollSections;
  20365. };
  20366. PinFreezeContainer.prototype.firstTouchMove=function(_fb6,_fb7,_fb8,_fb9,_fba){
  20367. var _fbb=this.mostlyVerticalTouchMove(_fb7,_fb8);
  20368. var _fbc=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
  20369. var _fbd=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
  20370. if(_fbb&&(!_fbc||(_fb8>0&&_fb6.scrollTop<=_fba)||(_fb8<0&&_fb6.scrollTop+_fb6.clientHeight>=_fb6.scrollHeight))){
  20371. this.touchScrollSections=false;
  20372. }else{
  20373. if(!_fbb&&(!_fbd||(_fb7>0&&_fb6.scrollLeft<=_fb9)||(_fb7<0&&_fb6.scrollLeft+_fb6.clientWidth>=_fb6.scrollWidth))){
  20374. this.touchScrollSections=false;
  20375. }else{
  20376. this.touchScrollSections=true;
  20377. }
  20378. }
  20379. };
  20380. PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_fbe,_fbf){
  20381. var _fc0=(_fbe>0)?_fbe:0-_fbe;
  20382. var _fc1=(_fbf>0)?_fbf:0-_fbf;
  20383. return (_fc1>_fc0);
  20384. };
  20385. PinFreezeContainer.prototype.destroy=function(){
  20386. this.removeTouchScrolling();
  20387. GUtil.destroyProperties(this);
  20388. };
  20389. function PinFreezeManager(oCV){
  20390. this.m_oCV=oCV;
  20391. this.m_viewerId=oCV.getId();
  20392. this.m_frozenInfo=null;
  20393. this.m_lastWidthProcessed=0;
  20394. this.m_lastHeightProcessed=0;
  20395. this.c_resizeTweekLimit=5;
  20396. this.m_repaintOnVisible=false;
  20397. };
  20398. PinFreezeManager.prototype.addContainerObject=function(lid,_fc4,_fc5,_fc6,_fc7){
  20399. if(_fc4||_fc5){
  20400. if(!this.m_frozenInfo){
  20401. this.m_frozenInfo={};
  20402. }
  20403. if(!this.m_frozenInfo[lid]){
  20404. this._createDefaultFrozenInfo(lid);
  20405. }
  20406. this.m_frozenInfo[lid].freezeTop=_fc4;
  20407. this.m_frozenInfo[lid].freezeSide=_fc5;
  20408. var _fc8=this.newContainer(lid,_fc4,_fc5,_fc6,_fc7);
  20409. this.m_frozenInfo[lid].pinFreezeContainers.push(_fc8);
  20410. return _fc8;
  20411. }
  20412. return null;
  20413. };
  20414. PinFreezeManager.prototype.newContainer=function(lid,_fca,_fcb,_fcc,_fcd){
  20415. return new PinFreezeContainer(this,lid,this.m_viewerId,_fca,_fcb,_fcc,_fcd);
  20416. };
  20417. PinFreezeManager.prototype.clearPinInfo=function(lid){
  20418. if(!this.m_frozenInfo){
  20419. return;
  20420. }
  20421. if(lid){
  20422. if(this.m_frozenInfo[lid]){
  20423. delete this.m_frozenInfo[lid];
  20424. }
  20425. }else{
  20426. delete this.m_frozenInfo;
  20427. this.m_frozenInfo=null;
  20428. }
  20429. };
  20430. PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){
  20431. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}};
  20432. };
  20433. PinFreezeManager.prototype._resetFrozenInfo=function(lid){
  20434. var _fd1=this.m_frozenInfo[lid];
  20435. if(_fd1){
  20436. delete _fd1.pinFreezeContainers;
  20437. _fd1.pinFreezeContainers=[];
  20438. _fd1.freezeTop=false;
  20439. _fd1.freezeSide=false;
  20440. }
  20441. };
  20442. PinFreezeManager.prototype.prepopulateFrozenInfo=function(_fd2){
  20443. var _fd3=getDescendantElementsByAttribute(_fd2,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  20444. if(_fd3){
  20445. if(!this.m_frozenInfo){
  20446. this.m_frozenInfo={};
  20447. }
  20448. for(var i=0;i<_fd3.length;i++){
  20449. var _fd5=_fd3[i];
  20450. if(_fd5.getAttribute("id")=="rt"+this.m_viewerId){
  20451. continue;
  20452. }
  20453. var lid=this.removeNamespace(_fd5.getAttribute("lid"));
  20454. if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){
  20455. continue;
  20456. }
  20457. if(!this.m_frozenInfo[lid]){
  20458. this._createDefaultFrozenInfo(lid);
  20459. }
  20460. if(!this.m_frozenInfo[lid].childContainers){
  20461. this.m_frozenInfo[lid].childContainers={};
  20462. }
  20463. var _fd7=getDescendantElementsByAttribute(_fd5,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  20464. if(_fd7){
  20465. for(var _fd8=0;_fd8<_fd7.length;_fd8++){
  20466. var _fd9=_fd7[_fd8];
  20467. var _fda=this.removeNamespace(_fd9.getAttribute("lid"));
  20468. if(!this.m_frozenInfo[lid].childContainers[_fda]){
  20469. var _fdb=_fd9.parentNode;
  20470. while(_fdb&&!_fdb.getAttribute("lid")){
  20471. _fdb=_fdb.parentNode;
  20472. }
  20473. if(_fdb&&this.removeNamespace(_fdb.getAttribute("lid"))==lid){
  20474. this.m_frozenInfo[lid].childContainers[_fda]=true;
  20475. }
  20476. }
  20477. }
  20478. }
  20479. }
  20480. this._updateParentContainerInfo();
  20481. }
  20482. };
  20483. PinFreezeManager.prototype._updateParentContainerInfo=function(){
  20484. for(var _fdc in this.m_frozenInfo){
  20485. var _fdd=this.m_frozenInfo[_fdc].childContainers;
  20486. if(_fdd){
  20487. for(var _fde in _fdd){
  20488. if(this.m_frozenInfo[_fde]){
  20489. this.m_frozenInfo[_fde].parentContainer=_fdc;
  20490. break;
  20491. }
  20492. }
  20493. }
  20494. }
  20495. };
  20496. PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){
  20497. if(this.m_frozenInfo[lid]){
  20498. while(this.m_frozenInfo[lid].parentContainer){
  20499. lid=this.m_frozenInfo[lid].parentContainer;
  20500. }
  20501. }
  20502. return lid;
  20503. };
  20504. PinFreezeManager.prototype.freezeContainer=function(lid,_fe1,_fe2){
  20505. var _fe3=document.getElementById("CVReport"+this.m_viewerId);
  20506. this.prepopulateFrozenInfo(_fe3);
  20507. var _fe4=this.getTopLevelContainerLID(lid);
  20508. this.unfreezeAllNestedContainers(_fe4,_fe3);
  20509. this.m_frozenInfo[lid].freezeTop=_fe1;
  20510. this.m_frozenInfo[lid].freezeSide=_fe2;
  20511. var _fe5=this._createPinAndFreezeObject(_fe3,_fe4);
  20512. this.m_lastWidthProcessed=0;
  20513. this.m_lastHeightProcessed=0;
  20514. this._resizePinFreezeObjects(_fe5);
  20515. this.sectionStructureChange();
  20516. if(isIE()){
  20517. var obj=this;
  20518. setTimeout(function(){
  20519. obj.refresh();
  20520. },1);
  20521. var _fe7=document.getElementById("RVContent"+this.m_viewerId);
  20522. this.m_oCV.repaintDiv(_fe7);
  20523. }
  20524. return _fe5;
  20525. };
  20526. PinFreezeManager.prototype.getInitialWidthThreshold=function(){
  20527. return document.body.clientWidth*3/4;
  20528. };
  20529. PinFreezeManager.prototype.getInitialHeightThreshold=function(){
  20530. return document.body.clientWidth*9/10;
  20531. };
  20532. PinFreezeManager.prototype.hasFrozenContainers=function(){
  20533. return ((this.m_frozenInfo)?true:false);
  20534. };
  20535. PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){
  20536. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  20537. return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false;
  20538. }
  20539. return false;
  20540. };
  20541. PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){
  20542. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  20543. return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false;
  20544. }
  20545. return false;
  20546. };
  20547. PinFreezeManager.prototype.removeNamespace=function(idNS){
  20548. if(idNS.length>this.m_viewerId.length){
  20549. if(idNS.indexOf(this.m_viewerId)>0){
  20550. return idNS.substring(0,idNS.indexOf(this.m_viewerId));
  20551. }
  20552. }
  20553. return idNS;
  20554. };
  20555. PinFreezeManager.prototype.getContainer=function(lid,_fec){
  20556. if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
  20557. _fec=_fec?_fec:0;
  20558. return this.m_frozenInfo[lid].pinFreezeContainers[_fec];
  20559. }
  20560. return null;
  20561. };
  20562. PinFreezeManager.prototype.nodeToContainer=function(node){
  20563. var slid=PinFreezeContainer.nodeToSlid(node);
  20564. var _fef=null;
  20565. if(slid){
  20566. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  20567. _fef=this.getContainer(lid);
  20568. }
  20569. return _fef;
  20570. };
  20571. PinFreezeManager.prototype.getContainerElement=function(_ff1){
  20572. var lid=this.removeNamespace(_ff1.getAttribute("lid"));
  20573. if(lid){
  20574. var _ff3=this.getContainer(lid);
  20575. if(_ff3){
  20576. return _ff3.getContainer();
  20577. }
  20578. }
  20579. return null;
  20580. };
  20581. PinFreezeManager.prototype._createPinAndFreezeObject=function(_ff4,lid){
  20582. var _ff6=null;
  20583. if(this.m_frozenInfo){
  20584. var _ff7=this.m_frozenInfo[lid];
  20585. var _ff8=_ff7.initialLoad;
  20586. if(_ff8){
  20587. delete _ff7.initialLoad;
  20588. }
  20589. var _ff9=_ff7.freezeTop;
  20590. var _ffa=_ff7.freezeSide;
  20591. var _ffb=null;
  20592. if(_ff8&&_ff7.pinFreezeContainers&&(_ff9||_ffa)){
  20593. _ffb=_ff7.pinFreezeContainers.slice(0);
  20594. }
  20595. var _ffc=_ff4;
  20596. if(_ff7&&_ff7.parentContainer){
  20597. var _ffd=getElementsByAttribute(_ff4,"table","lid",_ff7.parentContainer+this.m_viewerId);
  20598. if(_ffd){
  20599. for(parentIndex=0;parentIndex<_ffd.length;parentIndex++){
  20600. if(!_ffd[parentIndex].getAttribute("clonednode")){
  20601. _ffc=_ffd[parentIndex];
  20602. break;
  20603. }
  20604. }
  20605. }
  20606. }
  20607. if(_ff7.childContainers){
  20608. for(var _ffe in _ff7.childContainers){
  20609. var _fff=this._createPinAndFreezeObject(_ffc,_ffe);
  20610. _ff6=_ff6?_ff6:_fff;
  20611. }
  20612. }
  20613. var _1000=getElementsByAttribute(_ffc,"table","lid",lid+this.m_viewerId);
  20614. if(_1000&&_1000.length>0){
  20615. delete _ff7.pinFreezeContainers;
  20616. _ff7.pinFreezeContainers=[];
  20617. }else{
  20618. return null;
  20619. }
  20620. if(_1000&&(_ff9||_ffa)){
  20621. var _1001=(_ff6!==null);
  20622. for(var i=0;i<_1000.length;i++){
  20623. var _1003=_1000[i];
  20624. if(_1003.getAttribute("clonednode")=="true"){
  20625. continue;
  20626. }
  20627. _ff6=this.addContainerObject(lid,_ff9,_ffa,_1003,i);
  20628. if(_ff6){
  20629. _ff6.createPFContainer(_ffc,_1001);
  20630. if(_ff8){
  20631. _ff6.copyProperties(_ffb[0]);
  20632. }
  20633. _ff6.freezeContainerInReport(_ff4);
  20634. }
  20635. }
  20636. }
  20637. }
  20638. return _ff6;
  20639. };
  20640. PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_1004){
  20641. if(this.m_frozenInfo){
  20642. var _1005=false;
  20643. var _1006=null;
  20644. for(var _1007 in this.m_frozenInfo){
  20645. var _1008=this.m_frozenInfo[_1007];
  20646. if(!_1005){
  20647. _1005=_1008.initialLoad;
  20648. }
  20649. if(!_1008.parentContainer){
  20650. var temp=this._createPinAndFreezeObject(_1004,_1008.lid);
  20651. _1006=_1006?_1006:temp;
  20652. }
  20653. }
  20654. if(!_1005&&_1006){
  20655. this._resizePinFreezeObjects(_1006);
  20656. }
  20657. this.refresh();
  20658. }
  20659. };
  20660. PinFreezeManager.prototype._resizePinFreezeObjects=function(_100a){
  20661. var _100b,width;
  20662. var _100d=this.m_oCV.getViewerWidget();
  20663. if(_100d){
  20664. var size=_100d.getWidgetSize();
  20665. width=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_100a.getClientWidth();
  20666. _100b=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_100a.getClientHeight();
  20667. }else{
  20668. var _100f=document.getElementById("RVContent"+this.m_viewerId);
  20669. var _1010=document.getElementById("mainViewerTable"+this.m_viewerId);
  20670. width=_100f.clientWidth;
  20671. _100b=_1010.clientHeight;
  20672. }
  20673. this.m_lastWidthProcessed=0;
  20674. this.m_lastHeightProcessed=0;
  20675. this.resize(width,_100b);
  20676. };
  20677. PinFreezeManager.prototype.resize=function(width,_1012){
  20678. var _1013=(Math.abs(width-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
  20679. var _1014=(Math.abs(_1012-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
  20680. if(_1013&&_1014){
  20681. return;
  20682. }
  20683. var _1015=(Math.abs(width-this.m_lastWidthProcessed)>2)?width:0;
  20684. var _1016=(Math.abs(_1012-this.m_lastHeightProcessed)>2)?_1012:0;
  20685. for(var lid in this.m_frozenInfo){
  20686. if(!this.m_frozenInfo[lid].parentContainer){
  20687. this.resizeContainer(lid,_1015,_1016);
  20688. }
  20689. }
  20690. this.m_lastWidthProcessed=width;
  20691. this.m_lastHeightProcessed=_1012;
  20692. };
  20693. PinFreezeManager.prototype.resizeContainer=function(lid,width,_101a){
  20694. var _101b=this.m_frozenInfo[lid];
  20695. if(_101b){
  20696. var _101c=null;
  20697. if(_101b.childContainers){
  20698. var _101d=width>10?width-10:width;
  20699. var _101e=_101a>10?_101a-10:_101a;
  20700. for(var _101f in _101b.childContainers){
  20701. _101c=this.resizeContainer(_101f,_101d,_101e);
  20702. }
  20703. }
  20704. var _1020=_101b.pinFreezeContainers;
  20705. var _1021=null;
  20706. var _1022=null;
  20707. if(_1020){
  20708. for(var i=0;i<_1020.length;i++){
  20709. _1021=_1020[i];
  20710. _1021.resize(width,_101a,_101b.parentContainer,_101c);
  20711. var _1024=_1021.getContainer();
  20712. if(_1024&&(!_1022||(_1022.width<_1024.clientWidth))){
  20713. _1022={"width":_1024.clientWidth,"lid":_1021.m_lidNS};
  20714. }
  20715. }
  20716. }
  20717. return _1022;
  20718. }
  20719. };
  20720. PinFreezeManager.prototype.processAutoResize=function(width,_1026){
  20721. this.m_lastWidthProcessed=width;
  20722. this.m_lastHeightProcessed=_1026;
  20723. };
  20724. PinFreezeManager.prototype.onSetVisible=function(){
  20725. this.refresh();
  20726. if(this.m_repaintOnVisible){
  20727. this.rePaint();
  20728. this.m_repaintOnVisible=false;
  20729. }
  20730. };
  20731. PinFreezeManager.prototype.onResizeCanvas=function(_1027){
  20732. if(_1027){
  20733. this.rePaint();
  20734. }else{
  20735. this.m_repaintOnVisible=true;
  20736. }
  20737. };
  20738. PinFreezeManager.prototype.rePaint=function(){
  20739. for(var lid in this.m_frozenInfo){
  20740. if(!this.m_frozenInfo[lid].parentContainer){
  20741. this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed);
  20742. }
  20743. }
  20744. };
  20745. PinFreezeManager.prototype.refresh=function(){
  20746. for(var _1029 in this.m_frozenInfo){
  20747. var _102a=this.m_frozenInfo[_1029].pinFreezeContainers;
  20748. if(_102a){
  20749. for(var i=0;i<_102a.length;i++){
  20750. var _102c=_102a[i];
  20751. _102c.synchScroll();
  20752. _102c.synchVScroll();
  20753. }
  20754. }
  20755. }
  20756. };
  20757. PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){
  20758. return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true);
  20759. };
  20760. PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){
  20761. var lid=this.getValidSelectedContainerId(false);
  20762. if(lid){
  20763. this.m_oCV.getSelectionController().resetSelections();
  20764. return this.freezeContainerRowHeadings(lid);
  20765. }
  20766. return null;
  20767. };
  20768. PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){
  20769. var lid=this.getValidSelectedContainerId(false);
  20770. if(lid){
  20771. return (!this.hasFrozenRowHeadings(lid));
  20772. }
  20773. return false;
  20774. };
  20775. PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){
  20776. this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false);
  20777. };
  20778. PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){
  20779. var lid=this.getValidSelectedContainerId(false);
  20780. if(lid){
  20781. this.m_oCV.getSelectionController().resetSelections();
  20782. this.unfreezeContainerRowHeadings(lid);
  20783. }
  20784. };
  20785. PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){
  20786. var lid=this.getValidSelectedContainerId(false);
  20787. if(lid){
  20788. return (this.hasFrozenRowHeadings(lid));
  20789. }
  20790. return false;
  20791. };
  20792. PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){
  20793. return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid));
  20794. };
  20795. PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){
  20796. var lid=this.getValidSelectedContainerId(true);
  20797. if(lid){
  20798. this.m_oCV.getSelectionController().resetSelections();
  20799. return this.freezeContainerColumnHeadings(lid);
  20800. }
  20801. return null;
  20802. };
  20803. PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){
  20804. var lid=this.getValidSelectedContainerId(true);
  20805. if(lid){
  20806. return (!this.hasFrozenColumnHeadings(lid));
  20807. }
  20808. return false;
  20809. };
  20810. PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){
  20811. this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid));
  20812. };
  20813. PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){
  20814. var lid=this.getValidSelectedContainerId(true);
  20815. if(lid){
  20816. this.m_oCV.getSelectionController().resetSelections();
  20817. this.unfreezeContainerColumnHeadings(lid);
  20818. }
  20819. };
  20820. PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){
  20821. var lid=this.getValidSelectedContainerId(true);
  20822. if(lid){
  20823. return (this.hasFrozenColumnHeadings(lid));
  20824. }
  20825. return false;
  20826. };
  20827. PinFreezeManager.prototype.getValidSelectedContainerId=function(_1039){
  20828. var _103a=this.m_oCV.getSelectionController().getAllSelectedObjects();
  20829. if(_103a&&_103a.length&&(_103a[0].getDataContainerType()==="crosstab"||(_1039&&_103a[0].getDataContainerType()==="list"))){
  20830. var lid=(_103a[0].getLayoutElementId());
  20831. if(lid){
  20832. if(!this.hasPromptControlsInFreezableCells(lid)){
  20833. return this.removeNamespace(lid);
  20834. }
  20835. }
  20836. }
  20837. return null;
  20838. };
  20839. PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
  20840. var _103d=this.m_oCV.getLayoutElementFromLid(lid);
  20841. var _103e=getElementsByAttribute(_103d,["td","th"],"type","columnTitle");
  20842. var _103f=new RegExp("(^|[W])clsPromptComponent($|[W])");
  20843. var _1040=isIE()?"className":"class";
  20844. for(var j in _103e){
  20845. if(_103e.hasOwnProperty(j)){
  20846. var _1042=getElementsByAttribute(_103e[j],"*",_1040,null,1,_103f);
  20847. if(_1042.length>0){
  20848. return true;
  20849. }
  20850. }
  20851. }
  20852. return false;
  20853. };
  20854. PinFreezeManager.prototype.unfreeze=function(lid,_1044,reset){
  20855. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  20856. var _1046=this.m_frozenInfo[lid].pinFreezeContainers;
  20857. if(_1046){
  20858. for(var i=0;i<_1046.length;i++){
  20859. var _1048=_1046[i];
  20860. _1048.unfreeze(_1044);
  20861. }
  20862. if(reset){
  20863. this._resetFrozenInfo(lid);
  20864. }
  20865. }
  20866. }
  20867. };
  20868. PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_104a){
  20869. var _104b=this.m_frozenInfo[lid];
  20870. if(_104b){
  20871. if(_104b.freezeTop||_104b.freezeSide){
  20872. this.unfreeze(lid,_104a,false);
  20873. }
  20874. if(_104b.childContainers){
  20875. for(var _104c in _104b.childContainers){
  20876. this.unfreezeAllNestedContainers(_104c,_104a);
  20877. }
  20878. }
  20879. }
  20880. };
  20881. PinFreezeManager.prototype.isNodeVisible=function(node){
  20882. var slid=PinFreezeContainer.nodeToSlid(node);
  20883. if(!slid){
  20884. return true;
  20885. }
  20886. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  20887. var _1050=this.getContainer(lid);
  20888. if(!_1050){
  20889. return true;
  20890. }
  20891. var _1051=PinFreezeContainer.getSectionNameFromSlid(slid);
  20892. var _1052=_1050.getSection(_1051);
  20893. var _1053=null,_1054=null;
  20894. var nodeI=node;
  20895. var _1056=null;
  20896. while(nodeI&&nodeI!==_1052&&!_1053&&!_1054){
  20897. _1053=_1050.getMain(nodeI);
  20898. _1054=_1050.getCopy(nodeI);
  20899. _1056=nodeI;
  20900. nodeI=nodeI.parentNode;
  20901. }
  20902. var _1057=_1053?true:false;
  20903. var _1058=_1054?true:false;
  20904. if(_1057){
  20905. return _1050.getCopy(_1053)===_1056;
  20906. }else{
  20907. if(_1058){
  20908. return _1050.getCopy(_1056)?false:true;
  20909. }else{
  20910. return true;
  20911. }
  20912. }
  20913. };
  20914. PinFreezeManager.prototype.sectionStructureChange=function(){
  20915. var _1059=this.m_oCV.getViewerWidget();
  20916. if(_1059&&_1059.getAnnotationHelper()){
  20917. _1059.getAnnotationHelper().repositionCommentIndicators();
  20918. }
  20919. };
  20920. PinFreezeManager.prototype.deepCloneNode=function(_105a){
  20921. var copy=_105a.cloneNode(true);
  20922. var _105c=this.m_oCV.getViewerWidget();
  20923. if(_105c){
  20924. if(_105c.reportContainsDijits()){
  20925. var _105d=getElementsByAttribute(copy,"*","widgetid","*");
  20926. if(_105d&&_105d.length){
  20927. for(var i=0;i<_105d.length;i++){
  20928. _105d[i].parentNode.removeChild(_105d[i]);
  20929. }
  20930. }
  20931. }
  20932. }
  20933. return copy;
  20934. };
  20935. PinFreezeManager.prototype.toJSONString=function(){
  20936. var _105f="";
  20937. var _1060="";
  20938. for(var _1061 in this.m_frozenInfo){
  20939. if(_105f.length>0){
  20940. _105f+=",";
  20941. }
  20942. var _1062=this.m_frozenInfo[_1061];
  20943. _105f+="{";
  20944. _105f+="\"lid\":\""+_1062.lid.replace("\"","\\\"")+"\",";
  20945. _105f+="\"freezeTop\":"+_1062.freezeTop+",";
  20946. _105f+="\"freezeSide\":"+_1062.freezeSide+",";
  20947. if(_1062.parentContainer){
  20948. _105f+="\"parentContainer\":\""+_1062.parentContainer+"\",";
  20949. }
  20950. if(_1062.pinFreezeContainers&&_1062.pinFreezeContainers.length>0){
  20951. _105f+="\"properties\":"+_1062.pinFreezeContainers[0].toJSONString()+",";
  20952. }
  20953. _105f+="\"childContainers\": {";
  20954. if(_1062.childContainers){
  20955. var first=true;
  20956. for(var _1064 in _1062.childContainers){
  20957. if(!first){
  20958. _105f+=",";
  20959. }
  20960. _105f+="\""+_1064+"\":true";
  20961. first=false;
  20962. }
  20963. }
  20964. _105f+="}}";
  20965. }
  20966. if(_105f.length>0){
  20967. _1060="{\"version\":1, \"containers\":["+_105f+"]}";
  20968. }
  20969. return _1060;
  20970. };
  20971. PinFreezeManager.prototype.fromJSONString=function(sJSON){
  20972. if(!sJSON||sJSON.length===0){
  20973. return;
  20974. }
  20975. var oJSON=null;
  20976. try{
  20977. oJSON=eval("("+sJSON+")");
  20978. }
  20979. catch(e){
  20980. if(typeof console!="undefined"){
  20981. console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+sJSON);
  20982. console.log(e);
  20983. }
  20984. }
  20985. if(!oJSON){
  20986. return;
  20987. }
  20988. var _1067=oJSON.containers;
  20989. var _1068=oJSON.version;
  20990. if(_1067.length>0){
  20991. this.m_frozenInfo={};
  20992. }
  20993. for(var _1069=0;_1069<_1067.length;_1069++){
  20994. var _106a=_1067[_1069];
  20995. var lid=_106a.lid;
  20996. var _106c=_106a.freezeTop;
  20997. var _106d=_106a.freezeSide;
  20998. var _106e=document.getElementById("CVReport"+this.m_viewerId);
  20999. var _106f=getElementsByAttribute(_106e,"table","lid",lid+this.m_viewerId);
  21000. var _1070=[];
  21001. if(_106f&&(_106c||_106d)){
  21002. for(var i=0;i<_106f.length;i++){
  21003. var _1072=_106f[i];
  21004. var _1073=new PinFreezeContainer(this,lid,this.m_viewerId,_106a.freezeTop,_106a.freezeSide,_1072,i);
  21005. if(_106a.properties){
  21006. applyJSONProperties(_1073,_106a.properties);
  21007. }
  21008. _1070.push(_1073);
  21009. }
  21010. }
  21011. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_106c,"freezeSide":_106d,"pinFreezeContainers":_1070,"initialLoad":true};
  21012. if(_1068>=1){
  21013. if(_106a.childContainers){
  21014. this.m_frozenInfo[lid].childContainers=_106a.childContainers;
  21015. }
  21016. if(_106a.parentContainer){
  21017. this.m_frozenInfo[lid].parentContainer=_106a.parentContainer;
  21018. }
  21019. }
  21020. }
  21021. };
  21022. PinFreezeManager.prototype.removeIdAttribute=function(_1074){
  21023. var _1075=_1074.getAttribute("id");
  21024. if(_1075!==null&&_1075!==""){
  21025. _1074.removeAttribute("id");
  21026. }
  21027. var _1076=getElementsByAttribute(_1074,"*","id","*");
  21028. if(_1076&&_1076.length){
  21029. for(var i=0;i<_1076.length;i++){
  21030. _1076[i].removeAttribute("id");
  21031. }
  21032. }
  21033. return _1074;
  21034. };
  21035. PinFreezeManager.prototype.isElementInMainOutput=function(_1078){
  21036. return PinFreezeContainer.isElementInMainOutput(_1078);
  21037. };
  21038. PinFreezeManager.prototype.isIWidgetMobile=function(){
  21039. return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
  21040. };
  21041. PinFreezeManager.prototype.destroy=function(){
  21042. GUtil.destroyProperties(this);
  21043. };
  21044. function CViewerToolbar(){
  21045. this.m_specification=null;
  21046. this.m_oCBar=null;
  21047. this.m_sWebContentRoot=null;
  21048. this.m_sSkin=null;
  21049. };
  21050. CViewerToolbar.prototype.getNamespace=function(){
  21051. if(this.m_specification&&typeof this.m_specification.namespace!="undefined"){
  21052. return this.m_specification.namespace;
  21053. }
  21054. return "";
  21055. };
  21056. CViewerToolbar.prototype.getSkin=function(){
  21057. if(this.m_sSkin==null){
  21058. var oCV=null;
  21059. try{
  21060. oCV=getCognosViewerObjectRef(this.getNamespace());
  21061. }
  21062. catch(exception){
  21063. }
  21064. if(oCV){
  21065. this.m_sSkin=oCV.getSkin();
  21066. }else{
  21067. this.m_sSkin=this.getWebContentRoot()+"/skins/corporate";
  21068. }
  21069. }
  21070. return this.m_sSkin;
  21071. };
  21072. CViewerToolbar.prototype.getWebContentRoot=function(){
  21073. if(this.m_sWebContentRoot==null){
  21074. var oCV=null;
  21075. try{
  21076. oCV=getCognosViewerObjectRef(this.getNamespace());
  21077. }
  21078. catch(exception){
  21079. }
  21080. if(oCV){
  21081. this.m_sWebContentRoot=oCV.getWebContentRoot();
  21082. }else{
  21083. this.m_sWebContentRoot="..";
  21084. }
  21085. }
  21086. return this.m_sWebContentRoot;
  21087. };
  21088. CViewerToolbar.prototype.getDivId=function(){
  21089. if(this.m_specification&&typeof this.m_specification.divId!="undefined"){
  21090. return this.m_specification.divId;
  21091. }
  21092. return "";
  21093. };
  21094. CViewerToolbar.prototype.getStyle=function(){
  21095. if(this.m_specification&&typeof this.m_specification.style!="undefined"){
  21096. return this.m_specification.style;
  21097. }
  21098. return "";
  21099. };
  21100. CViewerToolbar.prototype.getToolbarSpecification=function(){
  21101. if(this.m_specification&&typeof this.m_specification.S!="undefined"){
  21102. return new CViewerToolbarSpecification(this,this.m_specification.S);
  21103. }
  21104. return null;
  21105. };
  21106. CViewerToolbar.prototype.getItem=function(sId){
  21107. if(this.m_oCBar){
  21108. var _107c=this.m_oCBar.getNumItems();
  21109. sId=this.getNamespace()+sId;
  21110. for(var index=0;index<_107c;++index){
  21111. var _107e=this.m_oCBar.get(index);
  21112. if(typeof _107e.getId=="function"&&_107e.getId()==sId){
  21113. return _107e;
  21114. }
  21115. }
  21116. }
  21117. return null;
  21118. };
  21119. CViewerToolbar.prototype.init=function(_107f){
  21120. if(typeof _107f!="undefined"&&typeof _107f=="object"&&_107f!=null){
  21121. this.m_specification=_107f;
  21122. }
  21123. };
  21124. CViewerToolbar.prototype.getCBar=function(){
  21125. if(!this.m_oCBar&&this.m_specification){
  21126. this.load();
  21127. }
  21128. return this.m_oCBar;
  21129. };
  21130. CViewerToolbar.prototype.load=function(){
  21131. var _1080=null;
  21132. if(this.m_specification!=null){
  21133. var divId=this.getDivId();
  21134. var _1082=document.getElementById(divId);
  21135. var _1083=this.getToolbarSpecification();
  21136. if(_1082&&_1083){
  21137. _1080=_1083.draw();
  21138. }
  21139. }
  21140. this.m_oCBar=_1080;
  21141. return _1080;
  21142. };
  21143. CViewerToolbar.prototype.draw=function(){
  21144. if(this.m_oCBar){
  21145. this.m_oCBar.draw();
  21146. }
  21147. };
  21148. function CViewerToolbarSpecification(_1084,_1085){
  21149. this.m_viewerToolbar=_1084;
  21150. this.m_toolbarSpecification=_1085;
  21151. };
  21152. CViewerToolbarSpecification.prototype.draw=function(){
  21153. if(this.m_toolbarSpecification){
  21154. var _1086=gToolbarStyle;
  21155. if(this.m_viewerToolbar.getStyle()==="banner"){
  21156. _1086=gBannerToolbarStyle;
  21157. }
  21158. var _1087=new CBar(this.m_viewerToolbar.getDivId(),_1086,null,this.m_viewerToolbar.getWebContentRoot());
  21159. _1087.setMenuType(cHorizonalBar);
  21160. _1087.style=this.m_viewerToolbar.getStyle();
  21161. _1087.setAlign("right");
  21162. var _1088=false;
  21163. var _1089=null;
  21164. var _108a=null;
  21165. for(var _108b=0;_108b<this.m_toolbarSpecification.length;_108b++){
  21166. for(var _108c in this.m_toolbarSpecification[_108b]){
  21167. try{
  21168. var _108d=eval("new "+_108c+"();");
  21169. if(_108c=="P"){
  21170. if(_1088&&_108a==null){
  21171. _1089=_108d;
  21172. _108a=this.m_toolbarSpecification[_108b][_108c];
  21173. }
  21174. }else{
  21175. var _108e=this.m_toolbarSpecification[_108b][_108c];
  21176. if(_108e.N!=="openWith"||!window.isIOS()){
  21177. _1088=true;
  21178. if(_108a!=null&&_1089!=null){
  21179. _1089.load(_1087,_108a,this.m_viewerToolbar);
  21180. _1089=null;
  21181. _108a=null;
  21182. }
  21183. _108d.load(_1087,_108e,this.m_viewerToolbar);
  21184. }
  21185. }
  21186. }
  21187. catch(exception){
  21188. }
  21189. }
  21190. }
  21191. return _1087;
  21192. }
  21193. return null;
  21194. };
  21195. function B(){
  21196. };
  21197. B.prototype.isValid=function(_108f){
  21198. if(_108f!=null){
  21199. return true;
  21200. }
  21201. return false;
  21202. };
  21203. B.prototype.load=function(_1090,_1091,_1092){
  21204. if(this.isValid(_1091)){
  21205. var _1093="";
  21206. var _1094="";
  21207. var _1095="";
  21208. var sName=_1091.N;
  21209. var _1097=null;
  21210. if(typeof _1091.M!="undefined"&&_1091.M.IS!="undefined"){
  21211. _1097=_1091.M.IS;
  21212. }
  21213. if(typeof _1091.C=="undefined"){
  21214. if(_1097){
  21215. var _1098=_1097[0]["I"];
  21216. if(_1098!=null&&this.isValid(_1098)){
  21217. _1093=_1098.O;
  21218. if(typeof _1093=="undefined"||_1093==""){
  21219. _1093=_1098.E;
  21220. }
  21221. _1094=_1098.C;
  21222. _1095=_1098.A;
  21223. }
  21224. }
  21225. }else{
  21226. _1093=_1091.O;
  21227. _1094=_1091.C;
  21228. _1095=_1091.A;
  21229. }
  21230. var _1099=null;
  21231. if(_1092.getStyle()==="banner"){
  21232. _1099=new CMenuItem(_1090,"",_1095,_1094,gBannerButtonStyle,_1092.getWebContentRoot(),_1092.getSkin());
  21233. _1099.setDropDownArrow("dropdown_arrow_banner.gif");
  21234. }else{
  21235. _1099=new CMenuItem(_1090,"",_1095,_1094,gMenuItemStyle,_1092.getWebContentRoot(),_1092.getSkin());
  21236. _1099.setDropDownArrow("dropdown_arrow_narrow.gif");
  21237. }
  21238. _1099.setId(_1092.getNamespace()+sName);
  21239. _1099.setToolTip(_1093);
  21240. if(typeof _1091.ALT!="undefined"){
  21241. _1099.setAltText(_1091.ALT);
  21242. }
  21243. if(typeof _1091.D!="undefined"&&_1091.D=="true"){
  21244. _1099.disable();
  21245. }
  21246. if(typeof _1091.M!="undefined"){
  21247. var _109a=_1091.M;
  21248. if(typeof _109a.Y!="undefined"&&(typeof _109a.A!="undefined"||(_1097&&_1097.length>1)||(typeof _109a.H=="undefined"||_109a.H=="false"))){
  21249. var menu=new M();
  21250. _1099.m_menu=menu.load(_1090,_109a,_1092);
  21251. _1099.m_menu.setParent(_1099);
  21252. _1099.m_menuType=_109a.Y;
  21253. }
  21254. }
  21255. return _1099;
  21256. }
  21257. return null;
  21258. };
  21259. function I(){
  21260. };
  21261. I.prototype.isValid=function(_109c){
  21262. if(typeof _109c!="undefined"&&_109c!=null){
  21263. return true;
  21264. }
  21265. return false;
  21266. };
  21267. I.prototype.load=function(_109d,_109e,_109f){
  21268. if(this.isValid(_109e)){
  21269. var sText=_109e.E;
  21270. var _10a1=_109e.C;
  21271. var _10a2=_109e.A;
  21272. var sName=_109e.N;
  21273. var _10a4=null;
  21274. if(typeof _109e.M!="undefined"&&_109e.M.IS!="undefined"){
  21275. _10a4=_109e.M.IS;
  21276. }
  21277. if(typeof _109e.E=="undefined"){
  21278. if(_10a4&&_10a4[0]){
  21279. var _10a5=_10a4[0]["I"];
  21280. if(_10a5!=null&&this.isValid(_10a5)){
  21281. sText=_10a5.E;
  21282. if(typeof sText=="undefined"||sText==""){
  21283. sText=_10a5.O;
  21284. }
  21285. _10a2=_10a5.A;
  21286. }
  21287. }else{
  21288. return null;
  21289. }
  21290. }else{
  21291. sText=_109e.E;
  21292. _10a1=_109e.C;
  21293. _10a2=_109e.A;
  21294. }
  21295. var _10a6=null;
  21296. if(_109d.style&&_109d.style==="banner"){
  21297. _10a6=gBannerItemStyle;
  21298. }else{
  21299. _10a6=gMenuItemStyle;
  21300. }
  21301. var _10a7=new CMenuItem(_109d,sText,_10a2,_10a1,_10a6,_109f.getWebContentRoot(),_109f.getSkin());
  21302. if(typeof _109e.ALT!="undefined"){
  21303. _10a7.setAltText(_109e.ALT);
  21304. }
  21305. if(_109d.style&&_109d.style==="banner"){
  21306. _10a7.setDropDownArrow("dropdown_arrow_banner.gif");
  21307. }else{
  21308. _10a7.setDropDownArrow("dropdown_arrow_narrow.gif");
  21309. }
  21310. _10a7.setId(_109f.getNamespace()+sName);
  21311. if(typeof _109e.D!="undefined"&&_109e.D=="true"){
  21312. _10a7.disable();
  21313. }
  21314. if(typeof _109e.M!="undefined"){
  21315. var _10a8=_109e.M;
  21316. if(typeof _10a8.Y!="undefined"&&(typeof _10a8.A!="undefined"||(_10a4&&_10a4.length>1)||(typeof _10a8.H=="undefined"||_10a8.H=="false"))){
  21317. var menu=new M();
  21318. _10a7.m_menu=menu.load(_109d,_10a8,_109f);
  21319. _10a7.m_menu.setParent(_10a7);
  21320. _10a7.m_menuType=_109e.M.Y;
  21321. }
  21322. }
  21323. return _10a7;
  21324. }
  21325. return null;
  21326. };
  21327. function M(){
  21328. };
  21329. M.prototype.isValid=function(_10aa){
  21330. return (typeof _10aa!="undefined"&&_10aa!=null&&typeof _10aa.id!="undefined");
  21331. };
  21332. M.prototype.load=function(_10ab,_10ac,_10ad){
  21333. if(this.isValid(_10ac)){
  21334. var menu=new CMenu(_10ac.id,gMenuStyle,_10ad.getWebContentRoot());
  21335. menu.setParent(_10ab);
  21336. if(typeof _10ac.ALT!="undefined"){
  21337. menu.setAltText(_10ac.ALT);
  21338. }
  21339. try{
  21340. menu.m_oCV=getCognosViewerObjectRef(_10ad.getNamespace());
  21341. }
  21342. catch(e){
  21343. }
  21344. if(typeof _10ac.A!="undefined"){
  21345. menu.registerCallback(_10ac.A);
  21346. }
  21347. var _10af=_10ac.IS;
  21348. if(_10af){
  21349. for(var _10b0=0;_10b0<_10af.length;_10b0++){
  21350. for(var _10b1 in _10af[_10b0]){
  21351. try{
  21352. var _10b2=new I();
  21353. _10b2.load(menu,_10af[_10b0][_10b1],_10ad);
  21354. }
  21355. catch(exception){
  21356. }
  21357. }
  21358. }
  21359. }
  21360. return menu;
  21361. }
  21362. return null;
  21363. };
  21364. function T(){
  21365. };
  21366. T.prototype.isValid=function(_10b3){
  21367. return (typeof _10b3!="undefined"&&_10b3!=null&&typeof _10b3.E!="undefined");
  21368. };
  21369. T.prototype.load=function(_10b4,_10b5,_10b6){
  21370. if(this.isValid(_10b5)){
  21371. var _10b7=null;
  21372. if(_10b6.getStyle()==="banner"){
  21373. _10b7=gBannerStaticText;
  21374. }else{
  21375. }
  21376. if(_10b5.E&&_10b5.E.length>0){
  21377. var _10b8=new CStaticText(_10b5.E,_10b7);
  21378. if(_10b5.N=="userName"){
  21379. _10b8.setId("userNameTD"+_10b6.getNamespace());
  21380. }
  21381. if(_10b5.ALT){
  21382. _10b8.setLabelledBy(_10b5.ALT+" "+_10b5.E);
  21383. }
  21384. _10b4.add(_10b8);
  21385. }
  21386. }
  21387. return null;
  21388. };
  21389. function L(){
  21390. };
  21391. L.prototype.isValid=function(_10b9){
  21392. return (typeof _10b9!="undefined"&&_10b9!=null&&typeof _10b9.E!="undefined");
  21393. };
  21394. L.prototype.load=function(_10ba,_10bb,_10bc){
  21395. if(this.isValid(_10bb)){
  21396. var _10bd=null;
  21397. if(_10bc.getStyle()==="banner"){
  21398. _10bd=gBannerLink;
  21399. }else{
  21400. }
  21401. var _10be=_10bb.A;
  21402. var _10bf=new CMenuItem(_10ba,_10bb.E,_10be,"",_10bd,_10bc.getWebContentRoot(),_10bc.getSkin());
  21403. _10bf.iconPlaceholder=false;
  21404. if(_10bb.ALT!="undefined"){
  21405. _10bf.setAltText(_10bb.ALT);
  21406. }
  21407. return _10bf;
  21408. }
  21409. return null;
  21410. };
  21411. function P(){
  21412. };
  21413. P.prototype.isValid=function(_10c0){
  21414. return (typeof _10c0!="undefined"&&_10c0!=null&&typeof _10c0.Y!="undefined");
  21415. };
  21416. P.prototype.load=function(_10c1,_10c2,_10c3){
  21417. if(this.isValid(_10c2)){
  21418. var _10c4=new CSeperator(_10c2.Y,"","",_10c3.getWebContentRoot());
  21419. if(_10c3.getStyle()==="banner"){
  21420. _10c4.setToolbarSeperatorClass("bannerDivider");
  21421. }else{
  21422. _10c4.setToolbarSeperatorClass("toolbarDivider");
  21423. }
  21424. _10c1.add(_10c4);
  21425. return _10c4;
  21426. }
  21427. return null;
  21428. };
  21429. function GlossaryAction(){
  21430. };
  21431. GlossaryAction.prototype=new CognosViewerAction();
  21432. GlossaryAction.prototype.execute=function(){
  21433. var _10c5=this.getCognosViewer();
  21434. _10c5.loadExtra();
  21435. var _10c6=_10c5.getSelectionController();
  21436. var _10c7=_10c6.getAllSelectedObjects();
  21437. if(_10c7.length>0){
  21438. var _10c8=null;
  21439. if(typeof MDSRV_CognosConfiguration!="undefined"){
  21440. _10c8=new MDSRV_CognosConfiguration();
  21441. var _10c9="";
  21442. if(_10c5.envParams["glossaryURI"]){
  21443. _10c9=_10c5.envParams["glossaryURI"];
  21444. }
  21445. _10c8.addProperty("glossaryURI",_10c9);
  21446. _10c8.addProperty("gatewayURI",_10c5.getGateway());
  21447. }
  21448. var _10ca=_10c5.envParams["ui.object"];
  21449. var _10cb=getViewerSelectionContext(_10c6,new CSelectionContext(_10ca));
  21450. var _10cc=new MDSRV_BusinessGlossary(_10c8,_10cb);
  21451. _10cc.open();
  21452. }
  21453. };
  21454. GlossaryAction.prototype.updateMenu=function(_10cd){
  21455. if(!this.getCognosViewer().bCanUseGlossary){
  21456. return "";
  21457. }
  21458. var _10ce=this.selectionHasContext();
  21459. if(!_10ce||this.getCognosViewer().envParams["glossaryURI"]==null||this.getCognosViewer().envParams["glossaryURI"]==""){
  21460. _10cd.disabled=true;
  21461. }else{
  21462. _10cd.disabled=false;
  21463. }
  21464. return _10cd;
  21465. };
  21466. function AuthoredDrillAction(){
  21467. this.m_drillTargetSpecification="";
  21468. };
  21469. AuthoredDrillAction.prototype=new CognosViewerAction();
  21470. AuthoredDrillAction.prototype.setRequestParms=function(_10cf){
  21471. this.m_drillTargetSpecification=_10cf;
  21472. };
  21473. AuthoredDrillAction.prototype.executeDrillTarget=function(_10d0){
  21474. var _10d1=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_10d0));
  21475. var _10d2=encodeURIComponent(_10d1.getAttribute("bookmarkRef"));
  21476. var _10d3=_10d1.getAttribute("path");
  21477. var _10d4=this._shouldShowInNewWindow(_10d1);
  21478. var oCV=this.getCognosViewer();
  21479. if((_10d2!==null&&_10d2!=="")&&(_10d3===null||_10d3==="")){
  21480. var _10d6=_10d1.getAttribute("bookmarkPage");
  21481. if(_10d6&&_10d6!==""){
  21482. oCV.executeAction("GotoPage",{"pageNumber":_10d6,"anchorName":_10d2});
  21483. }else{
  21484. document.location="#"+_10d2;
  21485. }
  21486. }else{
  21487. var _10d7="";
  21488. if(_10d4){
  21489. _10d7="_blank";
  21490. }
  21491. var _10d8=[];
  21492. var _10d9=[];
  21493. _10d9.push("obj");
  21494. _10d9.push(_10d3);
  21495. _10d8[_10d8.length]=_10d9;
  21496. var _10da=false;
  21497. var _10db,_10dc,_10dd,sName,sNil;
  21498. var _10e0=XMLHelper_FindChildrenByTagName(_10d1,"drillParameter",false);
  21499. for(var index=0;index<_10e0.length;++index){
  21500. _10db=[];
  21501. _10dc=_10e0[index];
  21502. _10dd=_10dc.getAttribute("value");
  21503. sName=_10dc.getAttribute("name");
  21504. if(_10dd!==null&&_10dd!==""){
  21505. _10db.push("p_"+sName);
  21506. _10db.push(this.buildSelectionChoicesSpecification(_10dc));
  21507. }
  21508. sNil=_10dc.getAttribute("nil");
  21509. if(sNil!==null&&sNil!==""){
  21510. _10db.push("p_"+sName);
  21511. _10db.push(this.buildSelectionChoicesNilSpecification());
  21512. }
  21513. if(_10db.length>0){
  21514. _10d8[_10d8.length]=_10db;
  21515. }
  21516. if(!_10da){
  21517. var _10e2=_10dc.getAttribute("propertyToPass");
  21518. _10da=(_10e2&&_10e2.length>0)?true:false;
  21519. }
  21520. }
  21521. var _10e3=_10d1.getAttribute("method");
  21522. var _10e4=_10d1.getAttribute("outputFormat");
  21523. var _10e5=_10d1.getAttribute("outputLocale");
  21524. var _10e6=_10d1.getAttribute("prompt");
  21525. var _10e7=_10d1.getAttribute("dynamicDrill");
  21526. var _10e8=this.getXMLNodeAsString(_10d1,"parameters");
  21527. var _10e9=this.getXMLNodeAsString(_10d1,"objectPaths");
  21528. var oCVId=oCV.getId();
  21529. var _10eb=document.forms["formWarpRequest"+oCVId];
  21530. var _10ec=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF");
  21531. if((!_10ec||_10ec.toLowerCase()!=="false")&&_10e6!="true"&&this.isSameReport(_10eb,_10d3)&&this.isSameReportFormat(_10e4)&&!_10d4&&!_10da){
  21532. var _10ed=new ViewerDispatcherEntry(oCV);
  21533. _10ed.addFormField("ui.action","forward");
  21534. if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){
  21535. oCV.rvMainWnd.addCurrentReportToReportHistory();
  21536. var _10ee=oCV.rvMainWnd.saveReportHistoryAsXML();
  21537. _10ed.addFormField("cv.previousReports",_10ee);
  21538. }
  21539. for(index=0;index<_10e0.length;++index){
  21540. _10db=[];
  21541. _10dc=_10e0[index];
  21542. _10dd=_10dc.getAttribute("value");
  21543. sName=_10dc.getAttribute("name");
  21544. sNil=_10dc.getAttribute("nil");
  21545. if((sNil===null||sNil==="")&&(_10dd===null||_10dd==="")){
  21546. _10db.push("p_"+sName);
  21547. _10db.push(this.buildSelectionChoicesNilSpecification());
  21548. }
  21549. if(_10db.length>0){
  21550. _10d8[_10d8.length]=_10db;
  21551. }
  21552. }
  21553. for(index=1;index<_10d8.length;index++){
  21554. _10ed.addFormField(_10d8[index][0],_10d8[index][1]);
  21555. }
  21556. _10ed.addFormField("_drillThroughToSelf","true");
  21557. if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){
  21558. _10ed.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id);
  21559. }
  21560. oCV.setUsePageRequest(true);
  21561. oCV.dispatchRequest(_10ed);
  21562. if(typeof oCV.m_viewerFragment=="undefined"){
  21563. var _10ef=getCognosViewerObjectRefAsString(oCVId);
  21564. setTimeout(_10ef+".getRequestIndicator().show()",10);
  21565. }
  21566. }else{
  21567. doSingleDrill(_10d7,_10d8,_10e3,_10e4,_10e5,_10d2,_10e8,_10e9,this.getCognosViewer().getId(),_10e6,_10e7);
  21568. }
  21569. }
  21570. };
  21571. AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_10f0){
  21572. return _10f0.getAttribute("showInNewWindow")=="true";
  21573. };
  21574. AuthoredDrillAction.prototype.isSameReport=function(_10f1,_10f2){
  21575. if(_10f1["ui.object"]&&_10f2==_10f1["ui.object"].value){
  21576. return true;
  21577. }
  21578. return false;
  21579. };
  21580. AuthoredDrillAction.prototype.isSameReportFormat=function(_10f3){
  21581. var _10f4=this.getCognosViewer().envParams["run.outputFormat"];
  21582. if(_10f4){
  21583. if(_10f3==_10f4){
  21584. return true;
  21585. }else{
  21586. if(_10f4=="HTML"&&_10f3=="HTMLFragment"){
  21587. return true;
  21588. }
  21589. }
  21590. }
  21591. return false;
  21592. };
  21593. AuthoredDrillAction.prototype.getXMLNodeAsString=function(_10f5,_10f6){
  21594. var sXML="";
  21595. if(_10f5!=null){
  21596. var node=XMLHelper_FindChildByTagName(_10f5,_10f6,false);
  21597. if(node!=null){
  21598. sXML=XMLBuilderSerializeNode(node);
  21599. }
  21600. }
  21601. return sXML;
  21602. };
  21603. AuthoredDrillAction.prototype.execute=function(_10f9){
  21604. if(this.m_drillTargetSpecification!=""){
  21605. this.executeDrillTarget(this.m_drillTargetSpecification);
  21606. }else{
  21607. if(typeof _10f9!="undefined"){
  21608. var _10fa=this.getCognosViewer().getDrillTargets();
  21609. var _10fb=this.getAuthoredDrillThroughContext(_10f9,_10fa);
  21610. var _10fc=_10fb.childNodes;
  21611. if(_10fc.length==1){
  21612. this.executeDrillTarget(XMLBuilderSerializeNode(_10fc[0]));
  21613. }else{
  21614. doMultipleDrills(XMLBuilderSerializeNode(_10fb),this.getCognosViewer().getId());
  21615. }
  21616. }
  21617. }
  21618. };
  21619. AuthoredDrillAction.prototype.showDrillTargets=function(_10fd){
  21620. var _10fe="<context>";
  21621. for(var index=0;index<_10fd.length;++index){
  21622. var _1100=_10fd[index];
  21623. _10fe+="<member>";
  21624. var sName=_1100.getAttribute("label");
  21625. _10fe+="<name>";
  21626. _10fe+=sXmlEncode(sName);
  21627. _10fe+="</name>";
  21628. var _1102=_1100.getAttribute("path");
  21629. _10fe+="<drillThroughSearchPath>";
  21630. _10fe+=sXmlEncode(_1102);
  21631. _10fe+="</drillThroughSearchPath>";
  21632. var _1103=_1100.getAttribute("method");
  21633. _10fe+="<drillThroughAction>";
  21634. _10fe+=sXmlEncode(_1103);
  21635. _10fe+="</drillThroughAction>";
  21636. var _1104=_1100.getAttribute("outputFormat");
  21637. _10fe+="<drillThroughFormat>";
  21638. _10fe+=sXmlEncode(_1104);
  21639. _10fe+="</drillThroughFormat>";
  21640. var sData="parent."+this.getTargetReportRequestString(_1100);
  21641. _10fe+="<data>";
  21642. _10fe+=sXmlEncode(sData);
  21643. _10fe+="</data>";
  21644. _10fe+="</member>";
  21645. }
  21646. _10fe+="</context>";
  21647. };
  21648. AuthoredDrillAction.prototype.populateContextMenu=function(_1106){
  21649. var _1107=this.getCognosViewer();
  21650. var _1108=_1107.rvMainWnd.getToolbarControl();
  21651. var _1109=null;
  21652. if(typeof _1108!="undefined"&&_1108!=null){
  21653. var _110a=_1108.getItem("goto");
  21654. if(_110a){
  21655. _1109=_110a.getMenu();
  21656. }
  21657. }
  21658. var _110b=_1107.rvMainWnd.getContextMenu();
  21659. var _110c=null;
  21660. if(typeof _110b!="undefined"&&_110b!=null){
  21661. _110c=_110b.getGoToMenuItem().getMenu();
  21662. }
  21663. if(_1109!=null||_110c!=null){
  21664. var _110d=this.getCognosViewer().getDrillTargets();
  21665. var _110e=this.getAuthoredDrillThroughContext(_1106,_110d);
  21666. var _110f=_110e.childNodes;
  21667. if(_110f.length>0){
  21668. for(var index=0;index<_110f.length;++index){
  21669. var _1111=_110f[index];
  21670. var _1112=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_1111))+"\");";
  21671. var _1113=this.getTargetReportIconPath(_1111);
  21672. var _1114=_1111.getAttribute("label");
  21673. if(isViewerBidiEnabled()){
  21674. var bidi=BidiUtils.getInstance();
  21675. _1114=bidi.btdInjectUCCIntoStr(_1114,getViewerBaseTextDirection());
  21676. }
  21677. if(_1109!=null){
  21678. new CMenuItem(_1109,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin());
  21679. }
  21680. if(_110c!=null){
  21681. new CMenuItem(_110c,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin());
  21682. }
  21683. }
  21684. }
  21685. }
  21686. };
  21687. AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){
  21688. return "<selectChoices/>";
  21689. };
  21690. AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_1116){
  21691. var _1117="";
  21692. var _1118=_1116.getAttribute("value");
  21693. if(_1118!=null){
  21694. var _1119=_1116.getAttribute("propertyToPass");
  21695. _1117+="<selectChoices";
  21696. if(_1119!=null&&_1119!=""){
  21697. _1117+=" propertyToPass=\"";
  21698. _1117+=sXmlEncode(_1119);
  21699. _1117+="\"";
  21700. }
  21701. _1117+=">";
  21702. if(_1118.indexOf("<selectChoices>")!=-1){
  21703. _1117+=_1118.substring(_1118.indexOf("<selectChoices>")+15);
  21704. }else{
  21705. if(_1118!=""){
  21706. _1117+="<selectOption ";
  21707. var sMun=_1116.getAttribute("mun");
  21708. if(sMun!=null&&sMun!=""){
  21709. var _111b=sXmlEncode(sMun);
  21710. _1117+="useValue=\"";
  21711. _1117+=_111b;
  21712. _1117+="\" ";
  21713. _1117+="mun=\"";
  21714. _1117+=_111b;
  21715. _1117+="\" ";
  21716. _1117+="displayValue=\"";
  21717. _1117+=sXmlEncode(_1118);
  21718. _1117+="\"";
  21719. }else{
  21720. _1117+="useValue=\"";
  21721. _1117+=sXmlEncode(_1118);
  21722. _1117+="\" ";
  21723. var _111c=_1116.getAttribute("displayValue");
  21724. if(_111c==null||_111c==""){
  21725. _111c=_1118;
  21726. }
  21727. _1117+="displayValue=\"";
  21728. _1117+=sXmlEncode(_111c);
  21729. _1117+="\"";
  21730. }
  21731. _1117+="/>";
  21732. _1117+="</selectChoices>";
  21733. }
  21734. }
  21735. }
  21736. return _1117;
  21737. };
  21738. AuthoredDrillAction.prototype.getPropertyToPass=function(_111d,_111e){
  21739. if(_111d!=null&&_111d!=""&&_111e!=null){
  21740. var _111f=_111e.childNodes;
  21741. if(_111f!=null){
  21742. for(var index=0;index<_111f.length;++index){
  21743. var _1121=_111f[index];
  21744. var sName="";
  21745. if(_1121.getAttribute("name")!=null){
  21746. sName=_1121.getAttribute("name");
  21747. }
  21748. if(sName==_111d){
  21749. return _1121.getAttribute("propertyToPass");
  21750. }
  21751. }
  21752. }
  21753. }
  21754. return "";
  21755. };
  21756. AuthoredDrillAction.prototype.getTargetReportRequestString=function(_1123){
  21757. var _1124="";
  21758. var _1125=_1123.getAttribute("bookmarkRef");
  21759. var _1126=_1123.getAttribute("path");
  21760. var _1127=_1123.getAttribute("showInNewWindow");
  21761. if((_1125!=null&&_1125!="")&&(_1126==null||_1126=="")){
  21762. _1124+="document.location=\"#";
  21763. _1124+=_1125;
  21764. _1124+="\";";
  21765. }else{
  21766. _1124+="doSingleDrill(";
  21767. if(_1127=="true"){
  21768. _1124+="\"_blank\",";
  21769. }else{
  21770. _1124+="\"\",";
  21771. }
  21772. _1124+="[[\"obj\",\"";
  21773. _1124+=encodeURIComponent(_1126);
  21774. _1124+="\"]";
  21775. var _1128=XMLHelper_FindChildrenByTagName(_1123,"drillParameter",false);
  21776. for(var index=0;index<_1128.length;++index){
  21777. var _112a=_1128[index];
  21778. var _112b=_112a.getAttribute("value");
  21779. var sName=_112a.getAttribute("name");
  21780. if(_112b!=null&&_112b!=""){
  21781. _1124+=", [\"p_"+sName+"\",\""+encodeURIComponent(this.buildSelectionChoicesSpecification(_112a))+"\"]";
  21782. }
  21783. var sNil=_112a.getAttribute("nil");
  21784. if(sNil!=null&&sNil!=""){
  21785. _1124+="\", [\"p_"+sName+"\",\""+encodeURIComponent(this.buildSelectionChoicesNilSpecification())+"\"]";
  21786. }
  21787. }
  21788. _1124+="],";
  21789. var _112e=_1123.getAttribute("method");
  21790. _1124+="\""+encodeURIComponent(_112e)+"\",";
  21791. var _112f=_1123.getAttribute("outputFormat");
  21792. _1124+="\""+encodeURIComponent(_112f)+"\",";
  21793. var _1130=_1123.getAttribute("outputLocale");
  21794. _1124+="\""+encodeURIComponent(_1130)+"\",";
  21795. _1124+="\""+encodeURIComponent(_1125)+"\",";
  21796. var _1131=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_1123,"parameters",false));
  21797. _1124+="\""+encodeURIComponent(_1131)+"\",";
  21798. var _1132=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_1123,"objectPaths",false));
  21799. _1124+="\""+encodeURIComponent(_1132)+"\",";
  21800. _1124+="\""+encodeURIComponent(this.getCognosViewer().getId())+"\",";
  21801. var _1133=_1123.getAttribute("prompt");
  21802. _1124+="\""+encodeURIComponent(_1133)+"\",";
  21803. var _1134=_1123.getAttribute("dynamicDrill");
  21804. _1124+=" "+encodeURIComponent(_1134);
  21805. _1124+=");";
  21806. }
  21807. return _1124;
  21808. };
  21809. AuthoredDrillAction.prototype.getTargetReportIconPath=function(_1135){
  21810. var _1136="";
  21811. var _1137=_1135.getAttribute("bookmarkRef");
  21812. var _1138=XMLHelper_FindChildByTagName(_1135,"drillParameter",false);
  21813. if((_1137!=null&&_1137!="")&&_1138==null){
  21814. _1136="/common/images/spacer.gif";
  21815. }else{
  21816. var _1139=_1135.getAttribute("method");
  21817. switch(_1139){
  21818. case "editAnalysis":
  21819. _1136="/ps/portal/images/icon_ps_analysis.gif";
  21820. break;
  21821. case "editQuery":
  21822. _1136="/ps/portal/images/icon_qs_query.gif";
  21823. break;
  21824. case "execute":
  21825. _1136="/ps/portal/images/action_run.gif";
  21826. break;
  21827. case "view":
  21828. var _113a=_1135.getAttribute("outputFormat");
  21829. switch(_113a){
  21830. case "HTML":
  21831. case "XHTML":
  21832. case "HTMLFragment":
  21833. _1136="/ps/portal/images/icon_result_html.gif";
  21834. break;
  21835. case "PDF":
  21836. _1136="/ps/portal/images/icon_result_pdf.gif";
  21837. break;
  21838. case "XML":
  21839. _1136="/ps/portal/images/icon_result_xml.gif";
  21840. break;
  21841. case "CSV":
  21842. _1136="/ps/portal/images/icon_result_csv.gif";
  21843. break;
  21844. case "XLS":
  21845. _1136="/ps/portal/images/icon_result_excel.gif";
  21846. break;
  21847. case "SingleXLS":
  21848. _1136="/ps/portal/images/icon_result_excel_single.gif";
  21849. break;
  21850. case "XLWA":
  21851. _1136="/ps/portal/images/icon_result_excel_web_arch.gif";
  21852. break;
  21853. default:
  21854. _1136="/common/images/spacer.gif";
  21855. }
  21856. break;
  21857. default:
  21858. _1136="/common/images/spacer.gif";
  21859. }
  21860. }
  21861. return this.getCognosViewer().getWebContentRoot()+_1136;
  21862. };
  21863. AuthoredDrillAction.prototype.getAuthoredDrillThroughContext=function(_113b,_113c){
  21864. if(typeof _113b!="string"||typeof _113c!="object"){
  21865. return null;
  21866. }
  21867. var _113d=XMLBuilderLoadXMLFromString(_113b);
  21868. if(_113d==null||_113d.firstChild==null){
  21869. return null;
  21870. }
  21871. var _113e=XMLHelper_GetFirstChildElement(_113d);
  21872. if(XMLHelper_GetLocalName(_113e)!="AuthoredDrillTargets"){
  21873. return null;
  21874. }
  21875. var _113f=XMLHelper_GetFirstChildElement(_113e);
  21876. if(XMLHelper_GetLocalName(_113f)!="rvDrillTargets"){
  21877. return null;
  21878. }
  21879. var _1140=_113f.childNodes;
  21880. if(_1140===null||_1140.length===0){
  21881. return null;
  21882. }
  21883. var _1141=self.XMLBuilderCreateXMLDocument("rvDrillTargets");
  21884. for(var _1142=0;_1142<_1140.length;++_1142){
  21885. if(typeof _1140[_1142].getAttribute=="undefined"){
  21886. continue;
  21887. }
  21888. var _1143=_1141.createElement("drillTarget");
  21889. _1141.documentElement.appendChild(_1143);
  21890. var _1144=_1140[_1142].getAttribute("bookmarkRef");
  21891. if(_1144===null){
  21892. _1143.setAttribute("bookmarkRef","");
  21893. }else{
  21894. _1143.setAttribute("bookmarkRef",_1144);
  21895. }
  21896. var _1145=_1140[_1142].getAttribute("bookmarkPage");
  21897. if(_1145===null){
  21898. _1143.setAttribute("bookmarkPage","");
  21899. }else{
  21900. _1143.setAttribute("bookmarkPage",_1145);
  21901. }
  21902. var _1146=_1140[_1142].getAttribute("drillIdx");
  21903. if(_1146==null){
  21904. continue;
  21905. }
  21906. if(_1146>=_113c.length){
  21907. continue;
  21908. }
  21909. var _1147=_113c[_1146];
  21910. if(typeof _1147!="object"){
  21911. continue;
  21912. }
  21913. _1143.setAttribute("outputFormat",_1147.getOutputFormat());
  21914. _1143.setAttribute("outputLocale",_1147.getOutputLocale());
  21915. _1143.setAttribute("prompt",_1147.getPrompt());
  21916. _1143.setAttribute("dynamicDrill",_1147.isDynamicDrillThrough()?"true":"false");
  21917. var _1148=_1140[_1142].getAttribute("label");
  21918. if(_1148===null||_1148===""){
  21919. _1148=_1147.getLabel();
  21920. }
  21921. _1143.setAttribute("label",_1148);
  21922. _1143.setAttribute("path",_1147.getPath());
  21923. _1143.setAttribute("showInNewWindow",_1147.getShowInNewWindow());
  21924. _1143.setAttribute("method",_1147.getMethod());
  21925. var _1149=_113f;
  21926. var _114a="";
  21927. var _114b=_1147.getParameterProperties();
  21928. if(typeof _114b!="undefined"&&_114b!=null&&_114b!=""){
  21929. _114a=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_1147.getParameterProperties()));
  21930. }
  21931. while(_1149){
  21932. var _114c=_1149.childNodes[_1142].childNodes;
  21933. for(var _114d=0;_114d<_114c.length;++_114d){
  21934. var _114e=_114c[_114d].cloneNode(true);
  21935. if(_114a){
  21936. var _114f=this.getPropertyToPass(_114e.getAttribute("name"),_114a);
  21937. if(_114f!=null&&_114f!=""){
  21938. _114e.setAttribute("propertyToPass",_114f);
  21939. }
  21940. }
  21941. _1143.appendChild(_114e);
  21942. }
  21943. _1149=_1149.nextSibling;
  21944. }
  21945. var _1150="<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\">";
  21946. var _1151="</root>";
  21947. var _1152=_1150+_1147.getParameters()+_1151;
  21948. var _1153=XMLBuilderLoadXMLFromString(_1152);
  21949. var _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1153));
  21950. if(_1154){
  21951. _1143.appendChild(_1154.cloneNode(true));
  21952. }
  21953. var _1155=_1150+_1147.getObjectPaths()+_1151;
  21954. var _1156=XMLBuilderLoadXMLFromString(_1155);
  21955. _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1156));
  21956. if(_1154){
  21957. _1143.appendChild(_1154.cloneNode(true));
  21958. }
  21959. }
  21960. return XMLHelper_GetFirstChildElement(_1141);
  21961. };
  21962. function DrillContextMenuHelper(){
  21963. };
  21964. DrillContextMenuHelper.updateDrillMenuItems=function(_1157,oCV,_1159){
  21965. var _115a=[];
  21966. if(DrillContextMenuHelper.needsDrillSubMenu(oCV)){
  21967. var _115b=oCV.getSelectionController();
  21968. var _115c=_115b.getAllSelectedObjects();
  21969. var _115d=_115c[0];
  21970. if(_115d.getUseValues().length>1&&typeof RV_RES!="undefined"){
  21971. var _115e={name:_1159,label:RV_RES.RV_DRILL_DEFAULT,action:{name:_1159,payload:{}}};
  21972. _115a.push(_115e);
  21973. }
  21974. var _115f=(_115d.getUseValues().length>1)?1:0;
  21975. var _1160=_115d.getUseValues().length-1;
  21976. _1160=(_1160>2)?2:_1160;
  21977. for(var iDim=_115f;iDim<=_1160;++iDim){
  21978. DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,0);
  21979. }
  21980. var _1162=false;
  21981. for(var iDim=_115f;iDim<=_1160;++iDim){
  21982. for(var _1163=1;_1163<_115d.getUseValues()[iDim].length;++_1163){
  21983. if(_1162==false){
  21984. _115a.push({separator:true});
  21985. _1162=true;
  21986. }
  21987. DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,_1163);
  21988. }
  21989. }
  21990. }
  21991. DrillContextMenuHelper.completeDrillMenu(_1159,_115a,_1157);
  21992. };
  21993. DrillContextMenuHelper.needsDrillSubMenu=function(oCV){
  21994. var _1165=(oCV&&oCV.getSelectionController());
  21995. if(_1165){
  21996. var _1166=_1165.getAllSelectedObjects();
  21997. if(_1166.length==1&&_1166[0].isHomeCell&&_1166[0].isHomeCell()==false){
  21998. var _1167=_1166[0].isSelectionOnVizChart();
  21999. if(!_1167){
  22000. var _1168=oCV.getAdvancedServerProperty("VIEWER_JS_ENABLE_DRILL_SUBMENU");
  22001. _1167=(_1168=="charts"&&_1165.hasSelectedChartNodes());
  22002. }
  22003. if(_1167){
  22004. var _1169=_1166[0];
  22005. return (_1167&&_1169.getUseValues()&&(_1169.getUseValues().length>1||_1169.getUseValues()[0].length>1));
  22006. }
  22007. }
  22008. }
  22009. return false;
  22010. };
  22011. DrillContextMenuHelper.addSubMenuItem=function(_116a,_116b,_116c,iDim,_116e){
  22012. var _116f=_116c.getDrillOptions()[iDim][_116e];
  22013. if(DrillContextMenuHelper.isOptionDrillable(_116a,_116f)){
  22014. var _1170=DrillContextMenuHelper.getItemValue(_116c,iDim,_116e);
  22015. if(_1170){
  22016. var _1171=_116c.getDataItems()[iDim][_116e];
  22017. var _1172={name:_116a,label:_1170,action:{name:_116a,payload:{userSelectedDrillItem:_1171}}};
  22018. _116b.push(_1172);
  22019. }
  22020. }
  22021. };
  22022. DrillContextMenuHelper.completeDrillMenu=function(_1173,_1174,_1175){
  22023. if(_1174.length>0){
  22024. _1175.items=_1174;
  22025. }else{
  22026. _1175.items=null;
  22027. if(_1175.action==null){
  22028. _1175.action={name:_1173,action:{name:_1173}};
  22029. }
  22030. }
  22031. };
  22032. DrillContextMenuHelper.isOptionDrillable=function(_1176,_1177){
  22033. return (_1177>=3||(_1176=="DrillDown"&&_1177==2)||(_1176=="DrillUp"&&_1177==1));
  22034. };
  22035. DrillContextMenuHelper.getItemValue=function(_1178,iDim,_117a){
  22036. var _117b=(_117a==0)?_1178.getDisplayValues()[iDim]:null;
  22037. return ((_117b)?_117b:_1178.getUseValues()[iDim][_117a]);
  22038. };
  22039. function DrillAction(){
  22040. };
  22041. DrillAction.prototype=new CognosViewerAction();
  22042. DrillAction.prototype.setRequestParms=function(parms){
  22043. if(parms&&parms.userSelectedDrillItem){
  22044. this.m_userSelectedDrillItem=parms.userSelectedDrillItem;
  22045. }
  22046. };
  22047. DrillAction.prototype.submitDrillRequest=function(_117d,_117e,_117f){
  22048. var oCV=this.getCognosViewer();
  22049. var oReq=new ViewerDispatcherEntry(oCV);
  22050. oReq.addFormField("ui.action","drill");
  22051. oReq.addFormField("rv_drillOption",_117e);
  22052. oReq.addFormField("rv_drillparams",_117d);
  22053. oReq.addFormField("rv_drillRefQuery",_117f);
  22054. oCV.dispatchRequest(oReq);
  22055. };
  22056. function DrillDownAction(){
  22057. this.m_sAction="DrillDown";
  22058. };
  22059. DrillDownAction.prototype=new DrillAction();
  22060. DrillDownAction.prototype.updateMenu=function(_1182){
  22061. return _1182;
  22062. };
  22063. DrillDownAction.prototype.execute=function(){
  22064. var oCV=this.getCognosViewer();
  22065. var _1184=oCV.getDrillMgr();
  22066. if(_1184.canDrillDown()==false){
  22067. return;
  22068. }
  22069. var _1185=_1184.rvBuildXMLDrillParameters("drillDown",this.m_userSelectedDrillItem);
  22070. var _1186=_1184.getRefQuery();
  22071. if(oCV.envParams["cv.id"]=="AA"){
  22072. oCV.m_viewerFragment.raiseAADrillDownEvent();
  22073. }
  22074. this.submitDrillRequest(_1185,"down",_1186);
  22075. };
  22076. function DrillUpAction(){
  22077. this.m_sAction="DrillUp";
  22078. };
  22079. DrillUpAction.prototype=new DrillAction();
  22080. DrillUpAction.prototype.updateMenu=function(_1187){
  22081. return _1187;
  22082. };
  22083. DrillUpAction.prototype.execute=function(){
  22084. var oCV=this.getCognosViewer();
  22085. var _1189=oCV.getDrillMgr();
  22086. if(_1189.canDrillUp()==false){
  22087. return;
  22088. }
  22089. var _118a=_1189.rvBuildXMLDrillParameters("drillUp",this.m_userSelectedDrillItem);
  22090. var _118b=_1189.getRefQuery();
  22091. if(oCV.envParams["cv.containerApp"]=="AA"){
  22092. oCV.m_viewerFragment.raiseAADrillUpEvent();
  22093. }
  22094. this.submitDrillRequest(_118a,"up",_118b);
  22095. };
  22096. function ResizeChartAction(){
  22097. this.m_width=0;
  22098. this.m_height=0;
  22099. this.m_actionContext=null;
  22100. };
  22101. ResizeChartAction.prototype=new CognosViewerAction();
  22102. ResizeChartAction.prototype.setRequestParms=function(_118c){
  22103. if(_118c&&_118c.resize){
  22104. this.m_width=_118c.resize.w;
  22105. this.m_height=_118c.resize.h;
  22106. this.m_actionContext=_118c.resize.actionContext;
  22107. }
  22108. };
  22109. ResizeChartAction.prototype.execute=function(){
  22110. var oCV=this.getCognosViewer();
  22111. var oReq=new ViewerDispatcherEntry(oCV);
  22112. oReq.addFormField("ui.action","modifyReport");
  22113. if(!this.m_actionContext){
  22114. this.m_actionContext="<reportActions><ChangeDataContainerSize><idSelectAll/><height>"+this.m_height+"</height><width>"+this.m_width+"</width></ChangeDataContainerSize></reportActions>";
  22115. }
  22116. oReq.addFormField("cv.actionContext",this.m_actionContext);
  22117. oReq.addFormField("keepIterators","true");
  22118. oReq.addFormField("cv.reuseConversation","true");
  22119. oReq.addFormField("reuseResults","true");
  22120. oReq.addDefinedFormField("ui.spec",oCV.envParams["ui.spec"]);
  22121. oReq.addDefinedFormField("modelPath",oCV.getModelPath());
  22122. oReq.addDefinedFormField("packageBase",oCV.envParams["packageBase"]);
  22123. oReq.setCanBeQueued(true);
  22124. oCV.dispatchRequest(oReq);
  22125. };
  22126. function CCognosViewerSaveReport(_118f,_1190){
  22127. this.m_cognosViewer=_118f;
  22128. this.m_params=null;
  22129. this.dashboardToSaveIn=_1190.cm$storeID;
  22130. this.m_doSaveAsOnFault=false;
  22131. };
  22132. CCognosViewerSaveReport.prototype.canSave=function(_1191){
  22133. return (this.doSaveAs()||_1191&&_1191.indexOf("write")!==-1);
  22134. };
  22135. CCognosViewerSaveReport.prototype.isSavedOutput=function(){
  22136. var _1192=this.m_cognosViewer.envParams["ui.action"];
  22137. return (typeof _1192!=="undefined"&&_1192==="view");
  22138. };
  22139. CCognosViewerSaveReport.prototype.doSaveAs=function(){
  22140. var _1193=(this.m_doSaveAsOnFault||!this.m_cognosViewer.envParams["savedReportName"]||!this.isSameDashboard());
  22141. return _1193;
  22142. };
  22143. CCognosViewerSaveReport.prototype.isSameDashboard=function(){
  22144. var _1194=(this.m_cognosViewer.envParams["ui.object"].indexOf(this.dashboardToSaveIn)!==-1);
  22145. return _1194;
  22146. };
  22147. CCognosViewerSaveReport.prototype.getUIAction=function(){
  22148. return (this.doSaveAs()?"saveInDashboard":"updateSavedReport");
  22149. };
  22150. CCognosViewerSaveReport.prototype.populateRequestParams=function(_1195){
  22151. _1195.addFormField("ui.action",this.getUIAction());
  22152. _1195.addFormField("cv.ignoreState","true");
  22153. _1195.addFormField("dashboard-id",this.dashboardToSaveIn);
  22154. _1195.addNonEmptyStringFormField("executionParameters",this.m_cognosViewer.m_sParameters);
  22155. for(var param in this.m_cognosViewer.envParams){
  22156. if(param.indexOf("frag-")==0||param=="cv.actionState"||param=="ui.primaryAction"||param=="dashboard"||param=="ui.action"||param=="cv.responseFormat"||param=="b_action"){
  22157. continue;
  22158. }
  22159. _1195.addFormField(param,this.m_cognosViewer.envParams[param]);
  22160. }
  22161. };
  22162. CCognosViewerSaveReport.prototype.getCognosViewer=function(){
  22163. return this.m_cognosViewer;
  22164. };
  22165. CCognosViewerSaveReport.prototype.getViewerWidget=function(){
  22166. return this.getCognosViewer().getViewerWidget();
  22167. };
  22168. CCognosViewerSaveReport.prototype.dispatchRequest=function(){
  22169. var _1197=this.m_cognosViewer;
  22170. var _1198=this.getViewerWidget();
  22171. var _1199={"complete":{"object":_1198,"method":_1198.handleWidgetSaveDone},"fault":{"object":this,"method":this.onFault}};
  22172. var _119a=new AsynchJSONDispatcherEntry(_1197);
  22173. _119a.setCallbacks(_1199);
  22174. this.populateRequestParams(_119a);
  22175. _1197.dispatchRequest(_119a);
  22176. };
  22177. CCognosViewerSaveReport.prototype.onFault=function(_119b,arg1){
  22178. var _119d=this.m_cognosViewer;
  22179. var _119e=this.getViewerWidget();
  22180. var _119f=_119b.getSoapFault();
  22181. var _11a0=XMLHelper_FindChildByTagName(_119f,"Fault",true);
  22182. if(this.ifIsEmptySelectionFault(_11a0)){
  22183. this.handleEmptySelectionFault();
  22184. return;
  22185. }
  22186. var _11a1=_119f.createElement("allowRetry");
  22187. _11a1.appendChild(_119f.createTextNode("false"));
  22188. _11a0.appendChild(_11a1);
  22189. var _11a2=XMLBuilderSerializeNode(_11a0);
  22190. _119d.setSoapFault(_11a2);
  22191. _119e.handleFault();
  22192. var _11a3={"status":false};
  22193. _119e.iContext.iEvents.fireEvent("com.ibm.bux.widget.save.done",null,_11a3);
  22194. };
  22195. CCognosViewerSaveReport.prototype.ifIsEmptySelectionFault=function(_11a4){
  22196. if(_11a4){
  22197. var _11a5=XMLHelper_FindChildByTagName(_11a4,"errorCode",true);
  22198. if(_11a5){
  22199. var _11a6=XMLHelper_GetText(_11a5,false);
  22200. return (_11a6==="cmEmptySelection");
  22201. }
  22202. }
  22203. return false;
  22204. };
  22205. CCognosViewerSaveReport.prototype.handleEmptySelectionFault=function(){
  22206. delete (this.m_cognosViewer.envParams["savedReportName"]);
  22207. this.m_doSaveAsOnFault=true;
  22208. this.dispatchRequest();
  22209. };
  22210. function XmlHttpObject(){
  22211. this.m_formFields=new CDictionary();
  22212. this.xmlHttp=XmlHttpObject.createRequestObject();
  22213. this.m_requestIndicator=null;
  22214. this.m_httpCallbacks={};
  22215. this.m_asynch=true;
  22216. this.m_headers=null;
  22217. };
  22218. XmlHttpObject.prototype.setHeaders=function(_11a7){
  22219. this.m_headers=_11a7;
  22220. };
  22221. XmlHttpObject.prototype.getHeaders=function(){
  22222. return this.m_headers;
  22223. };
  22224. XmlHttpObject.prototype.newRequest=function(){
  22225. var _11a8=new XmlHttpObject();
  22226. _11a8.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  22227. this.executeHttpCallback("newRequest");
  22228. return _11a8;
  22229. };
  22230. XmlHttpObject.prototype.abortHttpRequest=function(){
  22231. if(this.xmlHttp!=null){
  22232. this.xmlHttp.abort();
  22233. this.xmlHttp=null;
  22234. this.executeHttpCallback("cancel");
  22235. this.m_httpCallbacks={};
  22236. }
  22237. };
  22238. XmlHttpObject.prototype.cancel=function(){
  22239. this.abortHttpRequest();
  22240. };
  22241. XmlHttpObject.prototype.executeHttpCallback=function(_11a9){
  22242. if(this.m_httpCallbacks&&this.m_httpCallbacks[_11a9]){
  22243. var _11aa=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
  22244. var _11ab=GUtil.generateCallback(this.m_httpCallbacks[_11a9].method,_11aa,this.m_httpCallbacks[_11a9].object);
  22245. _11ab();
  22246. return true;
  22247. }
  22248. return false;
  22249. };
  22250. XmlHttpObject.prototype.setCallbacks=function(_11ac){
  22251. if(!this.m_httpCallbacks){
  22252. this.m_httpCallbacks={};
  22253. }
  22254. for(callback in _11ac){
  22255. this.m_httpCallbacks[callback]=_11ac[callback];
  22256. }
  22257. };
  22258. XmlHttpObject.prototype.getCallbacks=function(){
  22259. return this.m_httpCallbacks;
  22260. };
  22261. XmlHttpObject.createRequestObject=function(){
  22262. var _11ad=null;
  22263. if(window.XMLHttpRequest){
  22264. _11ad=new XMLHttpRequest();
  22265. }else{
  22266. if(window.ActiveXObject){
  22267. _11ad=new ActiveXObject("Msxml2.XMLHTTP");
  22268. }else{
  22269. }
  22270. }
  22271. return _11ad;
  22272. };
  22273. XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
  22274. var _11ae=this.xmlHttp;
  22275. if(_11ae&&_11ae.readyState===4){
  22276. if(_11ae.status===200){
  22277. this.httpSuccess();
  22278. }else{
  22279. this.httpError();
  22280. }
  22281. }else{
  22282. }
  22283. };
  22284. XmlHttpObject.prototype.init=function(_11af,_11b0,url,_11b2){
  22285. this.m_action=_11af;
  22286. this.m_gateway=_11b0;
  22287. this.m_url=url;
  22288. this.m_asynch=_11b2;
  22289. };
  22290. XmlHttpObject.prototype.httpSuccess=function(){
  22291. this.executeHttpCallback("postHttpRequest");
  22292. this.executeHttpCallback("entryComplete");
  22293. this.executeHttpCallback("complete");
  22294. this.m_httpCallbacks=null;
  22295. };
  22296. XmlHttpObject.prototype.httpError=function(){
  22297. this.executeHttpCallback("entryFault");
  22298. this.executeHttpCallback("fault");
  22299. this.m_httpCallbacks=null;
  22300. };
  22301. XmlHttpObject.prototype.forceSynchronous=function(){
  22302. this.m_asynch=false;
  22303. };
  22304. XmlHttpObject.prototype.sendRequest=function(){
  22305. this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  22306. };
  22307. XmlHttpObject.prototype.sendHtmlRequest=function(_11b3,_11b4,url,async){
  22308. var _11b7=this.xmlHttp;
  22309. if(_11b7){
  22310. _11b7.open(_11b3,_11b4,async);
  22311. if(async){
  22312. _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  22313. }else{
  22314. _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  22315. if(!isIE()){
  22316. _11b7.onload=GUtil.generateCallback(this.httpSuccess,[],this);
  22317. _11b7.onerror=GUtil.generateCallback(this.httpError,[],this);
  22318. }
  22319. }
  22320. _11b7.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  22321. if(this.m_headers){
  22322. for(header in this.m_headers){
  22323. _11b7.setRequestHeader(header,this.m_headers[header]);
  22324. }
  22325. }
  22326. this.executeHttpCallback("preHttpRequest");
  22327. var _11b8=this.convertFormFieldsToUrl();
  22328. if(url){
  22329. _11b8+=url;
  22330. }
  22331. _11b7.send(_11b8);
  22332. }
  22333. };
  22334. XmlHttpObject.prototype.getResponseXml=function(){
  22335. return (this.xmlHttp)?this.xmlHttp.responseXML:null;
  22336. };
  22337. XmlHttpObject.prototype.getResponseText=function(){
  22338. return (this.xmlHttp)?this.xmlHttp.responseText:"";
  22339. };
  22340. XmlHttpObject.prototype.getResponseHeader=function(item){
  22341. return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null;
  22342. };
  22343. XmlHttpObject.prototype.getStatus=function(){
  22344. return this.xmlHttp.status;
  22345. };
  22346. XmlHttpObject.prototype.addFormField=function(name,value){
  22347. this.m_formFields.add(name,value);
  22348. };
  22349. XmlHttpObject.prototype.getFormFields=function(){
  22350. return this.m_formFields;
  22351. };
  22352. XmlHttpObject.prototype.getFormField=function(_11bc){
  22353. return this.m_formFields.get(_11bc);
  22354. };
  22355. XmlHttpObject.prototype.clearFormFields=function(){
  22356. this.m_formFields=new CDictionary();
  22357. };
  22358. XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
  22359. var url="";
  22360. var _11be=this.m_formFields.keys();
  22361. for(var index=0;index<_11be.length;index++){
  22362. if(index>0){
  22363. url+="&";
  22364. }
  22365. url+=encodeURIComponent(_11be[index])+"="+encodeURIComponent(this.m_formFields.get(_11be[index]));
  22366. }
  22367. return url;
  22368. };
  22369. XmlHttpObject.prototype.concatResponseArguments=function(_11c0){
  22370. var _11c1=[this];
  22371. if(_11c0){
  22372. _11c1=_11c1.concat(_11c0);
  22373. }
  22374. return _11c1;
  22375. };
  22376. function AsynchRequest(_11c2,_11c3){
  22377. AsynchRequest.baseConstructor.call(this);
  22378. this.m_gateway=_11c2;
  22379. this.m_webContentRoot=_11c3;
  22380. this.m_callbacks={};
  22381. this.m_soapFault=null;
  22382. this.m_faultDialog=null;
  22383. this.m_promptDialog=null;
  22384. this.m_logonDialog=null;
  22385. };
  22386. AsynchRequest.prototype=new XmlHttpObject();
  22387. AsynchRequest.baseConstructor=XmlHttpObject;
  22388. AsynchRequest.prototype.parent=XmlHttpObject.prototype;
  22389. AsynchRequest.prototype.getTracking=function(){
  22390. return "";
  22391. };
  22392. AsynchRequest.prototype.getConversation=function(){
  22393. return "";
  22394. };
  22395. AsynchRequest.prototype.getPrimaryAction=function(){
  22396. return "";
  22397. };
  22398. AsynchRequest.prototype.getActionState=function(){
  22399. return "";
  22400. };
  22401. AsynchRequest.prototype.getAsynchStatus=function(){
  22402. return "";
  22403. };
  22404. AsynchRequest.prototype.getResult=function(){
  22405. return null;
  22406. };
  22407. AsynchRequest.prototype.getSoapFault=function(){
  22408. return this.m_soapFault;
  22409. };
  22410. AsynchRequest.prototype.constructFaultEnvelope=function(){
  22411. return null;
  22412. };
  22413. AsynchRequest.prototype.getPromptHTMLFragment=function(){
  22414. return "";
  22415. };
  22416. AsynchRequest.prototype.isRAPWaitTrue=function(){
  22417. return false;
  22418. };
  22419. AsynchRequest.prototype.getRAPRequestCache=function(){
  22420. return null;
  22421. };
  22422. AsynchRequest.prototype.getMainConversation=function(){
  22423. return null;
  22424. };
  22425. AsynchRequest.prototype.getMainTracking=function(){
  22426. return null;
  22427. };
  22428. AsynchRequest.prototype.construct=function(){
  22429. };
  22430. AsynchRequest.prototype.executeCallback=function(_11c4){
  22431. if(this.m_callbacks[_11c4]){
  22432. var _11c5=this.concatResponseArguments(this.m_callbacks.customArguments);
  22433. var _11c6=GUtil.generateCallback(this.m_callbacks[_11c4].method,_11c5,this.m_callbacks[_11c4].object);
  22434. _11c6();
  22435. return true;
  22436. }
  22437. return false;
  22438. };
  22439. AsynchRequest.prototype.setCallbacks=function(_11c7){
  22440. if(!this.m_callbacks){
  22441. this.m_callbacks={};
  22442. }
  22443. for(callback in _11c7){
  22444. this.m_callbacks[callback]=_11c7[callback];
  22445. }
  22446. };
  22447. AsynchRequest.prototype.getCallbacks=function(){
  22448. return this.m_callbacks;
  22449. };
  22450. AsynchRequest.prototype.newRequest=function(){
  22451. var _11c8=this.construct();
  22452. _11c8.setHeaders(this.getHeaders());
  22453. if(this.getFormFields().exists("b_action")){
  22454. _11c8.addFormField("b_action",this.getFormField("b_action"));
  22455. }
  22456. if(this.getFormFields().exists("cv.catchLogOnFault")){
  22457. _11c8.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  22458. }
  22459. _11c8.setPromptDialog(this.m_promptDialog);
  22460. _11c8.setFaultDialog(this.m_faultDialog);
  22461. _11c8.setLogonDialog(this.m_logonDialog);
  22462. _11c8.m_asynch=this.m_asynch;
  22463. if(this.m_callbacks.newRequest){
  22464. var _11c9=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_11c8],this.m_callbacks.newRequest.object);
  22465. _11c9();
  22466. }
  22467. return _11c8;
  22468. };
  22469. AsynchRequest.prototype.success=function(){
  22470. var _11ca=this.getAsynchStatus();
  22471. switch(_11ca){
  22472. case "stillWorking":
  22473. case "working":
  22474. this.working();
  22475. break;
  22476. case "prompting":
  22477. this.prompting();
  22478. break;
  22479. case "fault":
  22480. case "complete":
  22481. case "conversationComplete":
  22482. this.complete();
  22483. break;
  22484. default:
  22485. this.complete();
  22486. break;
  22487. }
  22488. };
  22489. AsynchRequest.prototype.setFaultDialog=function(_11cb){
  22490. if(_11cb instanceof IFaultDialog){
  22491. if(typeof console!="undefined"){
  22492. console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
  22493. }
  22494. this.m_faultDialog=_11cb;
  22495. }else{
  22496. if(_11cb&&typeof console!="undefined"){
  22497. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  22498. }
  22499. }
  22500. };
  22501. AsynchRequest.prototype.setPromptDialog=function(_11cc){
  22502. if(_11cc instanceof IPromptDialog){
  22503. if(typeof console!="undefined"){
  22504. console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
  22505. }
  22506. this.m_promptDialog=_11cc;
  22507. }else{
  22508. if(_11cc&&typeof console!="undefined"){
  22509. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  22510. }
  22511. }
  22512. };
  22513. AsynchRequest.prototype.setLogonDialog=function(_11cd){
  22514. if(_11cd instanceof ILogOnDialog){
  22515. if(typeof console!="undefined"){
  22516. console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
  22517. }
  22518. this.m_logonDialog=_11cd;
  22519. }else{
  22520. if(_11cd&&typeof console!="undefined"){
  22521. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  22522. }
  22523. }
  22524. };
  22525. AsynchRequest.prototype.resubmitRequest=function(){
  22526. var _11ce=this.newRequest();
  22527. _11ce.m_formFields=this.m_formFields;
  22528. _11ce.sendRequest();
  22529. return _11ce;
  22530. };
  22531. AsynchRequest.prototype.sendRequest=function(){
  22532. var _11cf=this;
  22533. var _11d0={"complete":{"object":_11cf,"method":_11cf.successHandler},"fault":{"object":_11cf,"method":_11cf.errorHandler}};
  22534. this.init("POST",this.m_gateway,"",this.m_asynch);
  22535. this.executeCallback("preHttpRequest");
  22536. this.parent.setCallbacks.call(this,_11d0);
  22537. this.parent.sendRequest.call(this);
  22538. };
  22539. AsynchRequest.prototype.errorHandler=function(){
  22540. this.executeCallback("postHttpRequest");
  22541. this.executeCallback("entryFault");
  22542. this.executeCallback("error");
  22543. };
  22544. AsynchRequest.prototype.successHandler=function(){
  22545. this.executeCallback("postHttpRequest");
  22546. if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){
  22547. window["AsynchRequestPromptDialog"].hide();
  22548. window["AsynchRequestPromptDialog"]=null;
  22549. }
  22550. if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  22551. var _11d1=this.getResponseText();
  22552. if(_11d1.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
  22553. this.passportTimeout();
  22554. }else{
  22555. if((_11d1.indexOf("http-equiv=\"refresh\"")!=-1)||(_11d1.indexOf("http-equiv='refresh'")!=-1)){
  22556. this.passportTimeout();
  22557. }else{
  22558. this.executeCallback("entryFault");
  22559. if(!this.executeCallback("fault")){
  22560. var _11d2=window.open("","","height=400,width=500");
  22561. if(_11d2!=null){
  22562. _11d2.document.write(_11d1);
  22563. }
  22564. }
  22565. }
  22566. }
  22567. }else{
  22568. this.m_soapFault=this.constructFaultEnvelope();
  22569. if(this.m_soapFault!=null){
  22570. var _11d3=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
  22571. if(_11d3!=null&&XMLHelper_FindChildByTagName(_11d3,"promptInfo",true)){
  22572. this.passportTimeout();
  22573. }else{
  22574. this.fault();
  22575. }
  22576. }else{
  22577. this.success();
  22578. }
  22579. }
  22580. };
  22581. AsynchRequest.prototype.cancel=function(){
  22582. this.parent.cancel.call(this);
  22583. var _11d4=this.getFormField("m_tracking");
  22584. if(_11d4){
  22585. var _11d5=new XmlHttpObject();
  22586. _11d5.init("POST",this.m_gateway,"",false);
  22587. if(this.getFormField("cv.outputKey")){
  22588. _11d5.addFormField("b_action","cvx.high");
  22589. _11d5.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  22590. _11d5.setHeaders(this.getHeaders());
  22591. }else{
  22592. _11d5.addFormField("b_action","cognosViewer");
  22593. }
  22594. _11d5.addFormField("cv.responseFormat","successfulRequest");
  22595. _11d5.addFormField("ui.action","cancel");
  22596. _11d5.addFormField("m_tracking",_11d4);
  22597. if(this.getFormField("cv.debugDirectory")){
  22598. _11d5.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  22599. }
  22600. _11d5.sendRequest();
  22601. this.executeCallback("cancel");
  22602. }
  22603. };
  22604. AsynchRequest.prototype.working=function(){
  22605. this.executeCallback("working");
  22606. var _11d6=this.newRequest();
  22607. _11d6.addFormField("m_tracking",this.getTracking());
  22608. if(this.getFormField("cv.outputKey")){
  22609. _11d6.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  22610. _11d6.addFormField("b_action","cvx.high");
  22611. }
  22612. if(this.isRAPWaitTrue()){
  22613. _11d6.m_formFields=this.m_formFields;
  22614. _11d6.addFormField("m_tracking",this.getTracking());
  22615. _11d6.addFormField("rapWait","true");
  22616. var _11d7=this.getRAPRequestCache();
  22617. if(_11d7!==null&&typeof _11d7!="undefined"){
  22618. _11d6.addFormField("rapRequestCache",_11d7);
  22619. }
  22620. var _11d8=this.getMainConversation();
  22621. if(_11d8){
  22622. _11d6.addFormField("mainConversation",_11d8);
  22623. }
  22624. var _11d9=this.getMainTracking();
  22625. if(_11d9){
  22626. _11d6.addFormField("mainTracking",_11d9);
  22627. }
  22628. }else{
  22629. _11d6.addFormField("ui.action","wait");
  22630. _11d6.addFormField("ui.primaryAction",this.getPrimaryAction());
  22631. _11d6.addFormField("cv.actionState",this.getActionState());
  22632. if(this.getFormField("ui.preserveRapTags")){
  22633. _11d6.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
  22634. }
  22635. if(this.getFormField("ui.backURL")){
  22636. _11d6.addFormField("ui.backURL",this.getFormField("ui.backURL"));
  22637. }
  22638. if(this.getFormField("errURL")){
  22639. _11d6.addFormField("errURL",this.getFormField("errURL"));
  22640. }
  22641. if(this.getFormField("cv.showFaultPage")){
  22642. _11d6.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
  22643. }
  22644. if(this.getFormField("cv.catchLogOnFault")){
  22645. _11d6.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  22646. }
  22647. }
  22648. if(this.getFormField("bux")){
  22649. _11d6.addFormField("bux",this.getFormField("bux"));
  22650. }
  22651. if(this.getFormField("cv.debugDirectory")){
  22652. _11d6.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  22653. }
  22654. _11d6.sendRequest();
  22655. };
  22656. AsynchRequest.prototype.prompting=function(){
  22657. this.executeCallback("entryComplete");
  22658. if(!this.executeCallback("prompting")){
  22659. if(this.m_promptDialog!=null){
  22660. this.showPromptPage();
  22661. }else{
  22662. if(typeof console!="undefined"){
  22663. console.log("An unhandled prompt response was returned: %o",this.xmlHttp);
  22664. }
  22665. }
  22666. }
  22667. this.executeCallback("postEntryComplete");
  22668. };
  22669. AsynchRequest.prototype.promptPageOkCallback=function(_11da){
  22670. var _11db=this.newRequest();
  22671. _11db.addFormField("ui.action","forward");
  22672. _11db.addFormField("m_tracking",this.getTracking());
  22673. _11db.addFormField("ui.conversation",this.getConversation());
  22674. _11db.addFormField("ui.primaryAction",this.getPrimaryAction());
  22675. _11db.addFormField("cv.actionState",this.getActionState());
  22676. for(var _11dc in _11da){
  22677. _11db.addFormField(_11dc,_11da[_11dc]);
  22678. }
  22679. _11db.sendRequest();
  22680. window["AsynchRequestObject"]=null;
  22681. };
  22682. AsynchRequest.prototype.promptPageCancelCallback=function(){
  22683. window["AsynchRequestPromptDialog"].hide();
  22684. this.complete();
  22685. };
  22686. AsynchRequest.prototype.showPromptPage=function(){
  22687. window["AsynchRequestObject"]=this;
  22688. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  22689. var _11dd=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
  22690. window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_11dd,400,400);
  22691. window["AsynchRequestPromptDialog"].show();
  22692. };
  22693. AsynchRequest.prototype.passportTimeout=function(){
  22694. this.executeCallback("entryFault");
  22695. if(!this.executeCallback("passportTimeout")){
  22696. if(this.m_logonDialog!=null){
  22697. this.m_logonDialog.show(response.getSoapFault());
  22698. }else{
  22699. if(typeof console!="undefined"){
  22700. console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault());
  22701. }
  22702. }
  22703. }
  22704. };
  22705. AsynchRequest.prototype.fault=function(){
  22706. this.executeCallback("entryFault");
  22707. if(!this.executeCallback("fault")){
  22708. if(this.m_faultDialog!=null){
  22709. this.m_faultDialog.show(this.getSoapFault());
  22710. }else{
  22711. if(typeof console!="undefined"){
  22712. console.log("An unhandled soap fault was returned: %o",this.getSoapFault());
  22713. }
  22714. }
  22715. }
  22716. };
  22717. AsynchRequest.prototype.complete=function(){
  22718. this.executeCallback("entryComplete");
  22719. this.executeCallback("complete");
  22720. this.executeCallback("postEntryComplete");
  22721. };
  22722. AsynchRequest.prototype.getSoapFaultCode=function(){
  22723. var _11de=this.constructFaultEnvelope();
  22724. if(_11de){
  22725. var _11df=XMLHelper_FindChildByTagName(_11de,"faultcode",true);
  22726. if(_11df!=null){
  22727. return XMLHelper_GetText(_11df);
  22728. }
  22729. }
  22730. return null;
  22731. };
  22732. AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
  22733. var _11e0=this.constructFaultEnvelope();
  22734. if(_11e0){
  22735. var entry=XMLHelper_FindChildByTagName(_11e0,"messageString",true);
  22736. if(entry!=null){
  22737. return XMLHelper_GetText(entry);
  22738. }
  22739. }
  22740. return null;
  22741. };
  22742. function AsynchDATARequest(_11e2,_11e3){
  22743. AsynchDATARequest.baseConstructor.call(this,_11e2,_11e3);
  22744. this.m_oResponseState=null;
  22745. this.m_sResponseState=null;
  22746. this.m_endOfStateIdx=-1;
  22747. this.cStatePrefix="<xml><state>";
  22748. this.cStateSuffix="</state></xml>";
  22749. };
  22750. AsynchDATARequest.prototype=new AsynchRequest();
  22751. AsynchDATARequest.baseConstructor=AsynchRequest;
  22752. AsynchDATARequest.prototype.getEndOfStateIdx=function(){
  22753. if(this.m_endOfStateIdx==-1){
  22754. var _11e4=this.getResponseText().substring(0,12);
  22755. if(_11e4==this.cStatePrefix){
  22756. this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix);
  22757. if(this.m_endOfStateIdx!=-1){
  22758. this.m_endOfStateIdx+=this.cStateSuffix.length;
  22759. }
  22760. }
  22761. }
  22762. return this.m_endOfStateIdx;
  22763. };
  22764. AsynchDATARequest.prototype.getResponseStateText=function(){
  22765. if(!this.m_sResponseState){
  22766. this.getResponseState();
  22767. }
  22768. return this.m_sResponseState;
  22769. };
  22770. AsynchDATARequest.prototype.getResponseState=function(){
  22771. if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){
  22772. this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length);
  22773. if(this.m_sResponseState!=null){
  22774. this.m_sResponseState=xml_decode(this.m_sResponseState);
  22775. this.m_oResponseState=eval("("+this.m_sResponseState+")");
  22776. }
  22777. }
  22778. return this.m_oResponseState;
  22779. };
  22780. AsynchDATARequest.prototype.getAsynchStatus=function(){
  22781. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){
  22782. return this.getResponseState().m_sStatus;
  22783. }
  22784. return "unknown";
  22785. };
  22786. AsynchDATARequest.prototype.getTracking=function(){
  22787. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){
  22788. return this.getResponseState().m_sTracking;
  22789. }
  22790. return "";
  22791. };
  22792. AsynchDATARequest.prototype.getConversation=function(){
  22793. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){
  22794. return this.getResponseState().m_sConversation;
  22795. }
  22796. return "";
  22797. };
  22798. AsynchDATARequest.prototype.getPrimaryAction=function(){
  22799. if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){
  22800. return this.getResponseState().envParams["ui.primaryAction"];
  22801. }
  22802. return "";
  22803. };
  22804. AsynchDATARequest.prototype.getActionState=function(){
  22805. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){
  22806. return this.getResponseState().m_sActionState;
  22807. }
  22808. return "";
  22809. };
  22810. AsynchDATARequest.prototype.getResult=function(){
  22811. if(this.getEndOfStateIdx()!=-1){
  22812. return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length);
  22813. }
  22814. return "";
  22815. };
  22816. AsynchDATARequest.prototype.getDebugLogs=function(){
  22817. if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){
  22818. return this.getResponseState().debugLogs;
  22819. }
  22820. return "";
  22821. };
  22822. AsynchDATARequest.prototype.getPromptHTMLFragment=function(){
  22823. return this.getResult();
  22824. };
  22825. AsynchDATARequest.prototype.constructFaultEnvelope=function(){
  22826. if(this.m_soapFault==null){
  22827. var state=this.getResponseState();
  22828. if(state!=null){
  22829. if(state.m_sSoapFault){
  22830. var _11e6=state.m_sSoapFault;
  22831. this.m_soapFault=XMLBuilderLoadXMLFromString(_11e6);
  22832. }
  22833. }
  22834. }
  22835. return this.m_soapFault;
  22836. };
  22837. AsynchDATARequest.prototype.construct=function(){
  22838. var _11e7=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
  22839. _11e7.setCallbacks(this.m_callbacks);
  22840. if(this.getFormFields().exists("cv.responseFormat")){
  22841. _11e7.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  22842. }else{
  22843. _11e7.addFormField("cv.responseFormat","data");
  22844. }
  22845. return _11e7;
  22846. };
  22847. AsynchDATARequest.prototype.getEnvParam=function(param){
  22848. var _11e9=this.getResponseState();
  22849. if(_11e9&&typeof _11e9.envParams!="undefined"&&typeof _11e9.envParams[param]!="undefined"){
  22850. return _11e9.envParams[param];
  22851. }
  22852. return null;
  22853. };
  22854. AsynchDATARequest.prototype.isRAPWaitTrue=function(){
  22855. var _11ea=this.getEnvParam("rapWait");
  22856. if(_11ea!=null){
  22857. return _11ea=="true"?true:false;
  22858. }
  22859. return false;
  22860. };
  22861. AsynchDATARequest.prototype.getRAPRequestCache=function(){
  22862. return this.getEnvParam("rapRequestCache");
  22863. };
  22864. AsynchDATARequest.prototype.getMainConversation=function(){
  22865. return this.getEnvParam("mainConversation");
  22866. };
  22867. AsynchDATARequest.prototype.getMainTracking=function(){
  22868. return this.getEnvParam("mainTracking");
  22869. };
  22870. function AsynchJSONRequest(_11eb,_11ec){
  22871. AsynchJSONRequest.baseConstructor.call(this,_11eb,_11ec);
  22872. this.m_jsonResponse=null;
  22873. };
  22874. AsynchJSONRequest.prototype=new AsynchRequest();
  22875. AsynchJSONRequest.baseConstructor=AsynchRequest;
  22876. AsynchJSONRequest.prototype.getJSONResponseObject=function(){
  22877. if(this.m_jsonResponse==null){
  22878. if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){
  22879. var text=this.getResponseText();
  22880. if(text!=null){
  22881. var _11ee=this.removeInvalidCharacters(text);
  22882. this.m_jsonResponse=eval("("+_11ee+")");
  22883. }
  22884. }
  22885. }
  22886. return this.m_jsonResponse;
  22887. };
  22888. AsynchJSONRequest.prototype.getTracking=function(){
  22889. var _11ef=this.getJSONResponseObject();
  22890. if(_11ef){
  22891. return _11ef.tracking;
  22892. }
  22893. return "";
  22894. };
  22895. AsynchJSONRequest.prototype.getConversation=function(){
  22896. var _11f0=this.getJSONResponseObject();
  22897. if(_11f0){
  22898. return _11f0.conversation;
  22899. }
  22900. return "";
  22901. };
  22902. AsynchJSONRequest.prototype.getAsynchStatus=function(){
  22903. var _11f1=this.getJSONResponseObject();
  22904. if(_11f1){
  22905. return _11f1.status;
  22906. }
  22907. return "unknown";
  22908. };
  22909. AsynchJSONRequest.prototype.getPrimaryAction=function(){
  22910. var _11f2=this.getJSONResponseObject();
  22911. if(_11f2){
  22912. return _11f2.primaryAction;
  22913. }
  22914. return "";
  22915. };
  22916. AsynchJSONRequest.prototype.getActionState=function(){
  22917. var _11f3=this.getJSONResponseObject();
  22918. if(_11f3){
  22919. return _11f3.actionState;
  22920. }
  22921. return "";
  22922. };
  22923. AsynchJSONRequest.prototype.getDebugLogs=function(){
  22924. var _11f4=this.getJSONResponseObject();
  22925. if(_11f4){
  22926. return _11f4.debugLogs;
  22927. }
  22928. return "";
  22929. };
  22930. AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
  22931. var _11f5=this.getJSONResponseObject();
  22932. if(_11f5){
  22933. return (_11f5.rapWait==="true");
  22934. }
  22935. return false;
  22936. };
  22937. AsynchJSONRequest.prototype.getRAPRequestCache=function(){
  22938. var _11f6=this.getJSONResponseObject();
  22939. if(_11f6){
  22940. var _11f7=_11f6.rapRequestCache;
  22941. if(_11f7!==null&&typeof _11f7!="undefined"){
  22942. return _11f7;
  22943. }
  22944. }
  22945. return null;
  22946. };
  22947. AsynchJSONRequest.prototype.getMainConversation=function(){
  22948. var _11f8=this.getJSONResponseObject();
  22949. if(_11f8){
  22950. return _11f8.mainConversation;
  22951. }
  22952. return null;
  22953. };
  22954. AsynchJSONRequest.prototype.getMainTracking=function(){
  22955. var _11f9=this.getJSONResponseObject();
  22956. if(_11f9){
  22957. return _11f9.mainTracking;
  22958. }
  22959. return null;
  22960. };
  22961. AsynchJSONRequest.prototype.getResult=function(){
  22962. var _11fa=this.getJSONResponseObject();
  22963. if(_11fa&&_11fa.json){
  22964. var _11fb=this.removeInvalidCharacters(_11fa.json);
  22965. return eval("("+_11fb+")");
  22966. }
  22967. return null;
  22968. };
  22969. AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
  22970. if(text){
  22971. text=text.replace(/(\n|\r|\t)+/g,"");
  22972. }
  22973. return text;
  22974. };
  22975. AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
  22976. var _11fd=this.getJSONResponseObject();
  22977. if(_11fd&&_11fd.promptHTMLFragment){
  22978. return _11fd.promptHTMLFragment;
  22979. }
  22980. return "";
  22981. };
  22982. AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
  22983. if(this.m_soapFault==null){
  22984. var _11fe=this.getJSONResponseObject();
  22985. if(_11fe.status=="fault"){
  22986. this.m_soapFault=XMLBuilderLoadXMLFromString(_11fe.fault);
  22987. }
  22988. }
  22989. return this.m_soapFault;
  22990. };
  22991. AsynchJSONRequest.prototype.construct=function(){
  22992. var _11ff=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
  22993. _11ff.setCallbacks(this.m_callbacks);
  22994. if(this.getFormFields().exists("cv.responseFormat")){
  22995. _11ff.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  22996. }else{
  22997. _11ff.addFormField("cv.responseFormat","asynchJSON");
  22998. }
  22999. return _11ff;
  23000. };
  23001. function IFaultDialog(){
  23002. };
  23003. IFaultDialog.prototype.show=function(){
  23004. if(typeof console!="undefined"){
  23005. console.log("Required method IFaultDialog:show not implemented.");
  23006. }
  23007. };
  23008. IFaultDialog.prototype.handleUnknownHTMLResponse=function(){
  23009. if(typeof console!="undefined"){
  23010. console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented.");
  23011. }
  23012. };
  23013. function ILogOnDialog(){
  23014. };
  23015. ILogOnDialog.prototype.show=function(_1200){
  23016. if(typeof console!="undefined"){
  23017. console.log("Required method ILogOnDialog:show not implemented.");
  23018. }
  23019. };
  23020. ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_1201){
  23021. if(typeof console!="undefined"){
  23022. console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
  23023. }
  23024. };
  23025. function IPromptDialog(){
  23026. };
  23027. IPromptDialog.prototype.initialize=function(url,width,_1204){
  23028. if(typeof console!="undefined"){
  23029. console.log("Required method IModalDialog:initialize not implemented.");
  23030. }
  23031. };
  23032. IPromptDialog.prototype.show=function(){
  23033. if(typeof console!="undefined"){
  23034. console.log("Required method IModalDialog:show not implemented.");
  23035. }
  23036. };
  23037. IPromptDialog.prototype.hide=function(){
  23038. if(typeof console!="undefined"){
  23039. console.log("Required method IModalDialog:hide not implemented.");
  23040. }
  23041. };
  23042. function IRequestHandler(){
  23043. };
  23044. IRequestHandler.prototype.preHttpRequest=function(_1205){
  23045. if(typeof console!="undefined"){
  23046. console.log("Required method IRequestHandler:preHttpRequest not implemented.");
  23047. }
  23048. };
  23049. IRequestHandler.prototype.postHttpRequest=function(_1206){
  23050. if(typeof console!="undefined"){
  23051. console.log("Required method IRequestHandler:postHttpRequest not implemented.");
  23052. }
  23053. };
  23054. IRequestHandler.prototype.postComplete=function(_1207){
  23055. if(typeof console!="undefined"){
  23056. console.log("Required method IRequestHandler:postComplete not implemented.");
  23057. }
  23058. };
  23059. IRequestHandler.prototype.onComplete=function(_1208){
  23060. if(typeof console!="undefined"){
  23061. console.log("Required method IRequestHandler:onComplete not implemented.");
  23062. }
  23063. };
  23064. IRequestHandler.prototype.onPostEntryComplete=function(_1209){
  23065. if(typeof console!="undefined"){
  23066. console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
  23067. }
  23068. };
  23069. IRequestHandler.prototype.onFault=function(_120a){
  23070. if(typeof console!="undefined"){
  23071. console.log("Required method IRequestHandler:onFault not implemented.");
  23072. }
  23073. };
  23074. IRequestHandler.prototype.onPrompting=function(_120b){
  23075. if(typeof console!="undefined"){
  23076. console.log("Required method IRequestHandler:onPrompting not implemented.");
  23077. }
  23078. };
  23079. IRequestHandler.prototype.onWorking=function(_120c){
  23080. if(typeof console!="undefined"){
  23081. console.log("Required method IRequestHandler:onWorking not implemented.");
  23082. }
  23083. };
  23084. IRequestHandler.prototype.setWorkingDialog=function(_120d){
  23085. if(typeof console!="undefined"){
  23086. console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
  23087. }
  23088. };
  23089. IRequestHandler.prototype.setRequestIndicator=function(_120e){
  23090. if(typeof console!="undefined"){
  23091. console.log("Required method IRequestHandler:setExecutionCursor not implemented.");
  23092. }
  23093. };
  23094. function IRequestIndicator(){
  23095. };
  23096. IRequestIndicator.prototype.show=function(){
  23097. if(typeof console!="undefined"){
  23098. console.log("Required method IRequestIndicator:show not implemented.");
  23099. }
  23100. };
  23101. IRequestIndicator.prototype.hide=function(){
  23102. if(typeof console!="undefined"){
  23103. console.log("Required method IRequestIndicator:hide not implemented.");
  23104. }
  23105. };
  23106. function BaseRequestHandler(oCV){
  23107. if(oCV){
  23108. this.m_oCV=oCV;
  23109. this.m_workingDialog=null;
  23110. this.m_requestIndicator=null;
  23111. this.m_faultDialog=null;
  23112. this.m_logOnDialog=null;
  23113. this.m_promptDialog=null;
  23114. this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null;
  23115. }
  23116. };
  23117. BaseRequestHandler.prototype=new IRequestHandler();
  23118. BaseRequestHandler.prototype.onError=function(_1210){
  23119. };
  23120. BaseRequestHandler.prototype.onComplete=function(){
  23121. };
  23122. BaseRequestHandler.prototype.onPrompting=function(){
  23123. };
  23124. BaseRequestHandler.prototype.resubmitInSafeMode=function(){
  23125. };
  23126. BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
  23127. };
  23128. BaseRequestHandler.prototype.onPostEntryComplete=function(){
  23129. this._processDelayedLoadingQueue();
  23130. };
  23131. BaseRequestHandler.prototype.getViewer=function(){
  23132. return this.m_oCV;
  23133. };
  23134. BaseRequestHandler.prototype.setDispatcherEntry=function(_1211){
  23135. this.m_oDispatcherEntry=_1211;
  23136. };
  23137. BaseRequestHandler.prototype.getDispatcherEntry=function(){
  23138. return this.m_oDispatcherEntry;
  23139. };
  23140. BaseRequestHandler.prototype.processInitialResponse=function(_1212){
  23141. this.updateViewerState(_1212);
  23142. };
  23143. BaseRequestHandler.prototype.setLogOnDialog=function(_1213){
  23144. if(_1213==null){
  23145. this.m_logOnDialog=null;
  23146. }else{
  23147. if(_1213 instanceof ILogOnDialog){
  23148. this.m_logOnDialog=_1213;
  23149. }else{
  23150. if(_1213&&typeof console!="undefined"){
  23151. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  23152. }
  23153. }
  23154. }
  23155. };
  23156. BaseRequestHandler.prototype.setWorkingDialog=function(_1214){
  23157. if(_1214==null){
  23158. this.m_workingDialog=null;
  23159. }else{
  23160. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
  23161. this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
  23162. }else{
  23163. if(_1214 instanceof IRequestIndicator){
  23164. this.m_workingDialog=_1214;
  23165. }else{
  23166. if(_1214&&typeof console!="undefined"){
  23167. console.log("The parameter workingDialog must be an instance of IRequestIndicator");
  23168. }
  23169. }
  23170. }
  23171. }
  23172. };
  23173. BaseRequestHandler.prototype.getWorkingDialog=function(){
  23174. return this.m_workingDialog;
  23175. };
  23176. BaseRequestHandler.prototype.setRequestIndicator=function(_1215){
  23177. if(_1215==null){
  23178. this.m_requestIndicator=null;
  23179. }else{
  23180. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
  23181. this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
  23182. }else{
  23183. if(_1215 instanceof IRequestIndicator){
  23184. this.m_requestIndicator=_1215;
  23185. }else{
  23186. if(_1215&&typeof console!="undefined"){
  23187. console.log("The parameter requestIndicator must be an instance of IRequestIndicator");
  23188. }
  23189. }
  23190. }
  23191. }
  23192. };
  23193. BaseRequestHandler.prototype.getRequestIndicator=function(){
  23194. return this.m_requestIndicator;
  23195. };
  23196. BaseRequestHandler.prototype.setFaultDialog=function(_1216){
  23197. if(_1216==null){
  23198. this.m_faultDialog=null;
  23199. }else{
  23200. if(_1216 instanceof IFaultDialog){
  23201. this.m_faultDialog=_1216;
  23202. }else{
  23203. if(_1216&&typeof console!="undefined"){
  23204. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  23205. }
  23206. }
  23207. }
  23208. };
  23209. BaseRequestHandler.prototype.setPromptDialog=function(_1217){
  23210. if(_1217==null){
  23211. this.m_promptDialog=null;
  23212. }else{
  23213. if(_1217 instanceof IPromptDialog){
  23214. this.m_promptDialog=_1217;
  23215. }else{
  23216. if(_1217&&typeof console!="undefined"){
  23217. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  23218. }
  23219. }
  23220. }
  23221. };
  23222. BaseRequestHandler.prototype.preHttpRequest=function(_1218){
  23223. if(_1218&&typeof _1218.getFormField=="function"){
  23224. if(_1218.getFormField("ui.action")!="wait"&&_1218.getFormField("rapWait")!="true"){
  23225. if(this.m_requestIndicator){
  23226. this.m_requestIndicator.show();
  23227. }
  23228. }
  23229. }
  23230. };
  23231. BaseRequestHandler.prototype.postHttpRequest=function(_1219){
  23232. if(_1219&&typeof _1219.getAsynchStatus=="function"){
  23233. var _121a=_1219.getAsynchStatus();
  23234. if(_121a!="working"&&_121a!="stillWorking"){
  23235. if(this.m_workingDialog){
  23236. this.m_workingDialog.hide();
  23237. }
  23238. if(this.m_requestIndicator){
  23239. this.m_requestIndicator.hide();
  23240. }
  23241. }
  23242. }else{
  23243. if(this.m_workingDialog){
  23244. this.m_workingDialog.hide();
  23245. }
  23246. if(this.m_requestIndicator){
  23247. this.m_requestIndicator.hide();
  23248. }
  23249. }
  23250. };
  23251. BaseRequestHandler.prototype.onFault=function(_121b){
  23252. var oCV=this.getViewer();
  23253. if(this.m_workingDialog){
  23254. this.m_workingDialog.hide();
  23255. }
  23256. if(this.m_requestIndicator){
  23257. this.m_requestIndicator.hide();
  23258. }
  23259. if(typeof FaultDialog=="undefined"){
  23260. if(typeof console!="undefined"){
  23261. console.log("An unhandled fault was returned: %o",_121b);
  23262. }
  23263. return;
  23264. }
  23265. if(!this.m_faultDialog){
  23266. this.m_faultDialog=new FaultDialog(this.getViewer());
  23267. }
  23268. if(_121b&&_121b.getResponseHeader&&_121b.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  23269. this.m_faultDialog.handleUnknownHTMLResponse(_121b.getResponseText());
  23270. }else{
  23271. if(_121b&&_121b.getSoapFault){
  23272. this.m_faultDialog.show(_121b.getSoapFault());
  23273. }else{
  23274. if(oCV.getSoapFault()){
  23275. var _121d=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  23276. this.m_faultDialog.show(_121d);
  23277. oCV.setSoapFault("");
  23278. }else{
  23279. if(typeof console!="undefined"){
  23280. console.log("An unhandled fault was returned: %o",_121b);
  23281. }
  23282. }
  23283. }
  23284. }
  23285. };
  23286. BaseRequestHandler.prototype.isAuthenticationFault=function(_121e){
  23287. var oCV=this.getViewer();
  23288. var _1220=null;
  23289. if(_121e&&_121e.getSoapFault){
  23290. _1220=_121e.getSoapFault();
  23291. }else{
  23292. if(oCV.getSoapFault()){
  23293. _1220=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  23294. }
  23295. }
  23296. if(_1220!=null){
  23297. var _1221=XMLHelper_FindChildByTagName(_1220,"CAM",true);
  23298. return (_1221!=null&&XMLHelper_FindChildByTagName(_1221,"promptInfo",true)!=null);
  23299. }
  23300. return false;
  23301. };
  23302. BaseRequestHandler.prototype.onPassportTimeout=function(_1222){
  23303. var oCV=this.getViewer();
  23304. if(this.m_workingDialog){
  23305. this.m_workingDialog.hide();
  23306. }
  23307. if(this.m_requestIndicator){
  23308. this.m_requestIndicator.hide();
  23309. }
  23310. if(!this.m_logOnDialog){
  23311. this.m_logOnDialog=new LogOnDialog(this.getViewer());
  23312. }
  23313. if(_1222&&_1222.getResponseHeader&&_1222.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  23314. var _1224="";
  23315. if(_1222.getResponseText){
  23316. _1224=_1222.getResponseText();
  23317. }
  23318. if((_1224.indexOf("http-equiv=\"refresh\"")!=-1)||(_1224.indexOf("http-equiv='refresh'")!=-1)){
  23319. this.m_logOnDialog.show(null);
  23320. }else{
  23321. this.m_logOnDialog.handleUnknownHTMLResponse(_1224);
  23322. }
  23323. }else{
  23324. if(_1222&&_1222.getSoapFault){
  23325. this.m_logOnDialog.show(_1222.getSoapFault());
  23326. }else{
  23327. if(oCV.getSoapFault()){
  23328. var _1225=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  23329. this.m_logOnDialog.show(_1225);
  23330. oCV.setSoapFault("");
  23331. }else{
  23332. if(typeof console!="undefined"){
  23333. console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_1222);
  23334. }
  23335. }
  23336. }
  23337. }
  23338. };
  23339. BaseRequestHandler.prototype.onWorking=function(_1226){
  23340. if(this.m_workingDialog){
  23341. var _1227=_1226&&typeof _1226.getAsynchStatus=="function"&&_1226.getAsynchStatus()=="stillWorking"?true:false;
  23342. if(!_1227){
  23343. if(this.m_requestIndicator){
  23344. this.m_requestIndicator.hide();
  23345. }
  23346. this.m_workingDialog.show();
  23347. }
  23348. }
  23349. };
  23350. BaseRequestHandler.prototype.onCancel=function(){
  23351. if(this.m_workingDialog){
  23352. this.m_workingDialog.hide();
  23353. }
  23354. if(this.m_requestIndicator){
  23355. this.m_requestIndicator.hide();
  23356. }
  23357. var oCV=this.getViewer();
  23358. oCV.gbPromptRequestSubmitted=false;
  23359. this._processDelayedLoadingQueue();
  23360. };
  23361. BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){
  23362. var oCV=this.getViewer();
  23363. if(oCV&&oCV.getViewerWidget()){
  23364. var _122a=oCV.getViewerWidget();
  23365. if(_122a.getLoadManager()){
  23366. _122a.getLoadManager().processQueue();
  23367. }
  23368. }
  23369. };
  23370. BaseRequestHandler.prototype.onPrompting=function(_122b){
  23371. var oCV=this.getViewer();
  23372. if(this.m_workingDialog){
  23373. this.m_workingDialog.hide();
  23374. }
  23375. if(this.m_requestIndicator){
  23376. this.m_requestIndicator.hide();
  23377. }
  23378. if(!this.m_promptDialog){
  23379. this.m_promptDialog=new PromptDialog(this.getViewer());
  23380. }
  23381. window["AsynchRequestObject"]=_122b;
  23382. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  23383. var _122d="?cv.id="+oCV.getId();
  23384. window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_122d,400,400);
  23385. window["AsynchRequestPromptDialog"].show();
  23386. };
  23387. BaseRequestHandler.prototype.processDATAReportResponse=function(_122e){
  23388. var oCV=this.getViewer();
  23389. if(!oCV||oCV.m_destroyed){
  23390. if(console){
  23391. console.warn("Tried to process a data response on an invalid CCognosViewer",oCV);
  23392. }
  23393. return;
  23394. }
  23395. var _1230=_122e.getResponseState();
  23396. if(!_1230){
  23397. this.resubmitInSafeMode();
  23398. }
  23399. if(this.loadReportHTML(_122e.getResult())===false){
  23400. this.resubmitInSafeMode();
  23401. }
  23402. this.updateViewerState(_1230);
  23403. };
  23404. BaseRequestHandler.prototype.updateViewerState=function(_1231){
  23405. var oCV=this.getViewer();
  23406. applyJSONProperties(oCV,_1231);
  23407. var _1233=oCV.getStatus();
  23408. if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("&lt;")===0){
  23409. oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]);
  23410. }
  23411. if(_1233!="fault"){
  23412. if(oCV.envParams["rapReportInfo"]){
  23413. this._processRapReportInfo(oCV);
  23414. }
  23415. if(typeof _1231.clientunencodedexecutionparameters!="undefined"){
  23416. var _1234=document.getElementById("formWarpRequest"+oCV.getId());
  23417. if(_1234!=null&&typeof _1234["clientunencodedexecutionparameters"]!="undefined"){
  23418. _1234["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters;
  23419. }
  23420. if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
  23421. document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters;
  23422. }
  23423. }
  23424. }else{
  23425. oCV.setTracking("");
  23426. }
  23427. };
  23428. BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
  23429. if(oCV.envParams["rapReportInfo"]){
  23430. var _1236=eval("("+oCV.envParams["rapReportInfo"]+")");
  23431. if(typeof RAPReportInfo!="undefined"){
  23432. var _1237=new RAPReportInfo(_1236,oCV);
  23433. oCV.setRAPReportInfo(_1237);
  23434. }
  23435. }
  23436. };
  23437. BaseRequestHandler.prototype.loadReportHTML=function(_1238){
  23438. if(!_1238){
  23439. return true;
  23440. }
  23441. var oCV=this.getViewer();
  23442. if(window.IBM&&window.IBM.perf){
  23443. window.IBM.perf.log("viewer_gotHtml",oCV);
  23444. }
  23445. if(oCV.m_undoStack.length>0){
  23446. oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true;
  23447. }
  23448. oCV.pageNavigationObserverArray=[];
  23449. oCV.m_flashChartsObjectIds=[];
  23450. var sHTML=_1238.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
  23451. oCV.m_sHTML=sHTML;
  23452. oCV.setHasPrompts(false);
  23453. var id=oCV.getId();
  23454. var _123c=document.getElementById("RVContent"+id);
  23455. var _123d=document.getElementById("CVReport"+id);
  23456. if(window.gScriptLoader){
  23457. var _123e=oCV.getViewerWidget()?true:false;
  23458. var _123f=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_123d;
  23459. sHTML=window.gScriptLoader.loadCSS(sHTML,_123f,_123e,id);
  23460. }
  23461. if(oCV.sBrowser=="ie"){
  23462. sHTML="<span style='display:none'>&nbsp;</span>"+sHTML;
  23463. }
  23464. _123d.innerHTML=sHTML;
  23465. this.massageHtmlBeforeDisplayed();
  23466. if(window.gScriptLoader){
  23467. var _1240=GUtil.generateCallback(oCV.showLoadedContent,[_123c],oCV);
  23468. oCV.m_resizeReady=false;
  23469. if(!window.gScriptLoader.loadAll(_123d,_1240,id,true)){
  23470. if(window.gScriptLoader.containsAjaxWarnings()){
  23471. return false;
  23472. }
  23473. }
  23474. }else{
  23475. _123c.style.display="block";
  23476. }
  23477. var _1241=document.querySelectorAll("button");
  23478. var _1242=_1241.length;
  23479. for(var k=0;k<_1242;k++){
  23480. var _1244=_1241[k];
  23481. var id=_1244.id;
  23482. var _1245=id.match(/reprompt/);
  23483. if(_1245){
  23484. var _1246=_1244.outerHTML;
  23485. var _1247=_1246.match(/layoutname="\w+"/);
  23486. if(_1247!==null){
  23487. var _1248=_1247[0];
  23488. var _1249=/".*"/;
  23489. var _124a=_1249.exec(_1248);
  23490. if(oCV.getCurrentPromptControlFocus()==_124a){
  23491. _1244.focus();
  23492. oCV.setCurrentPromptControlFocus(null);
  23493. _1244=null;
  23494. }
  23495. }else{
  23496. oCV.setCurrentPromptControlFocus(null);
  23497. _1244=null;
  23498. }
  23499. }
  23500. }
  23501. oCV.updateOutputForA11ySupport();
  23502. this._clearFindState();
  23503. return true;
  23504. };
  23505. BaseRequestHandler.prototype._clearFindState=function(){
  23506. var oCV=this.getViewer();
  23507. var _124c=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
  23508. if(_124c&&!_124c.findOnServerInProgress()){
  23509. oCV.getState().clearFindState();
  23510. }
  23511. };
  23512. BaseRequestHandler.prototype.showReport=function(){
  23513. var oCV=this.getViewer();
  23514. var _124e=document.getElementById("CVReport"+oCV.getId());
  23515. if(_124e){
  23516. _124e.style.display="";
  23517. }
  23518. };
  23519. BaseRequestHandler.prototype.postComplete=function(){
  23520. var oCV=this.getViewer();
  23521. if(oCV.shouldWriteNavLinks()){
  23522. oCV.writeNavLinks(oCV.getSecondaryRequests().join(" "));
  23523. }
  23524. if(oCV.getStatus()==="complete"){
  23525. oCV.m_undoStack=[new CognosViewerSession(oCV)];
  23526. }
  23527. };
  23528. BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_1250){
  23529. if(this.m_httpRequestConfig){
  23530. var _1251=this.m_httpRequestConfig.getReportStatusCallback(_1250);
  23531. if(_1251){
  23532. _1251();
  23533. }
  23534. }
  23535. };
  23536. BaseRequestHandler.prototype.addCallbackHooks=function(){
  23537. if(!this.m_httpRequestConfig){
  23538. return;
  23539. }
  23540. this._addCallback("complete","onComplete");
  23541. this._addCallback("working","onWorking");
  23542. this._addCallback("prompting","onPrompting");
  23543. };
  23544. BaseRequestHandler.prototype._addCallback=function(_1252,_1253){
  23545. var _1254=_1252;
  23546. var _1255=this[_1253];
  23547. this[_1253]=function(_1256){
  23548. _1255.apply(this,arguments);
  23549. var _1257=null;
  23550. if(_1256&&typeof _1256.getAsynchStatus=="function"){
  23551. _1257=_1256.getAsynchStatus();
  23552. }else{
  23553. _1257=_1254=="complete"?this.getViewer().getStatus():_1254;
  23554. }
  23555. if(_1257=="stillWorking"){
  23556. return;
  23557. }
  23558. var _1258=this.m_httpRequestConfig.getReportStatusCallback(_1257);
  23559. if(typeof _1258=="function"){
  23560. setTimeout(_1258,10);
  23561. }
  23562. };
  23563. };
  23564. function ViewerBaseWorkingDialog(_1259){
  23565. if(!_1259){
  23566. return;
  23567. }
  23568. this.setCognosViewer(_1259);
  23569. this.m_oCV=_1259;
  23570. this.m_sNamespace=_1259.getId();
  23571. this.m_sGateway=_1259.getGateway();
  23572. this.m_UIBlacklist=null;
  23573. this.m_bUse=true;
  23574. this.m_bCancelSubmitted=false;
  23575. };
  23576. ViewerBaseWorkingDialog.prototype=new IRequestIndicator();
  23577. ViewerBaseWorkingDialog.prototype.setCognosViewer=function(oCV){
  23578. this.m_oCV=oCV;
  23579. };
  23580. ViewerBaseWorkingDialog.prototype.getCognosViewer=function(){
  23581. return this.m_oCV;
  23582. };
  23583. ViewerBaseWorkingDialog.prototype.getGateway=function(){
  23584. return this.m_sGateway;
  23585. };
  23586. ViewerBaseWorkingDialog.prototype.getNamespace=function(){
  23587. return this.m_sNamespace;
  23588. };
  23589. ViewerBaseWorkingDialog.prototype.cancelSubmitted=function(){
  23590. return this.m_bCancelSubmitted;
  23591. };
  23592. ViewerBaseWorkingDialog.prototype.setCancelSubmitted=function(_125b){
  23593. this.m_bCancelSubmitted=_125b;
  23594. };
  23595. ViewerBaseWorkingDialog.prototype.show=function(){
  23596. var _125c=document.getElementById(this.getContainerId());
  23597. if(_125c){
  23598. _125c.style.display="block";
  23599. this.enableCancelButton();
  23600. }else{
  23601. this.create();
  23602. }
  23603. var _125d=document.getElementById("reportBlocker"+this.m_oCV.getId());
  23604. if(_125d){
  23605. _125d.style.display="block";
  23606. }
  23607. };
  23608. ViewerBaseWorkingDialog.prototype.create=function(){
  23609. if(typeof document.body!="undefined"){
  23610. if(this.isModal()){
  23611. this.createModalWaitDialog();
  23612. }else{
  23613. this.createInlineWaitDialog();
  23614. }
  23615. }
  23616. };
  23617. ViewerBaseWorkingDialog.prototype.createContainer=function(_125e){
  23618. var _125f=document.createElement("div");
  23619. _125f.setAttribute("id",this.getContainerId());
  23620. _125f.className=_125e?"modalWaitPage":"inlineWaitPage";
  23621. return _125f;
  23622. };
  23623. ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){
  23624. this._createBlocker();
  23625. var _1260=this.createContainer(true);
  23626. _1260.innerHTML=this.renderHTML();
  23627. _1260.style.zIndex="7002";
  23628. _1260.setAttribute("role","region");
  23629. _1260.setAttribute("aria-label",RV_RES.GOTO_WORKING);
  23630. document.body.appendChild(_1260);
  23631. var _1261=this.createModalIframeBackground();
  23632. document.body.appendChild(_1261);
  23633. var _1262=0;
  23634. var iLeft=0;
  23635. if(typeof window.innerHeight!="undefined"){
  23636. _1262=Math.round((window.innerHeight/2)-(_1260.offsetHeight/2));
  23637. iLeft=Math.round((window.innerWidth/2)-(_1260.offsetWidth/2));
  23638. }else{
  23639. _1262=Math.round((document.body.clientHeight/2)-(_1260.offsetHeight/2));
  23640. iLeft=Math.round((document.body.clientWidth/2)-(_1260.offsetWidth/2));
  23641. }
  23642. _1260.style.bottom=_1262+"px";
  23643. _1260.style.left=iLeft+"px";
  23644. _1261.style.left=iLeft-1+"px";
  23645. _1261.style.bottom=_1262-1+"px";
  23646. _1261.style.width=_1260.offsetWidth+2+"px";
  23647. _1261.style.height=_1260.offsetHeight+2+"px";
  23648. };
  23649. ViewerBaseWorkingDialog.prototype._createBlocker=function(){
  23650. var _1264=document.getElementById("reportBlocker"+this.m_oCV.getId());
  23651. if(_1264){
  23652. return;
  23653. }
  23654. var _1265=document.getElementById("mainViewerTable"+this.m_oCV.getId());
  23655. if(_1265){
  23656. _1264=document.createElement("div");
  23657. _1265.parentNode.appendChild(_1264);
  23658. _1264.id="reportBlocker"+this.m_oCV.getId();
  23659. _1264.style.zIndex="6001";
  23660. _1264.style.position="absolute";
  23661. _1264.style.top="0px";
  23662. _1264.style.left="0px";
  23663. _1264.style.width="100%";
  23664. _1264.style.height="100%";
  23665. _1264.style.display="none";
  23666. _1264.style.opacity="0";
  23667. _1264.style.backgroundColor="#FFFFFF";
  23668. _1264.style.filter="alpha(opacity:0)";
  23669. }
  23670. };
  23671. ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){
  23672. var _1266=this.m_oCV.getId();
  23673. var _1267=document.getElementById("CVReport"+_1266);
  23674. if(_1267){
  23675. var _1268=this.createContainer(false);
  23676. _1268.innerHTML="<table width=\"100%\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\" role=\"presentation\">"+this.renderHTML()+"</td></tr></table>";
  23677. _1267.appendChild(_1268);
  23678. }
  23679. };
  23680. ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){
  23681. var _1269=document.createElement("iframe");
  23682. var _126a="..";
  23683. var oCV=this.getCognosViewer();
  23684. if(oCV!==null){
  23685. _126a=oCV.getWebContentRoot();
  23686. }
  23687. _1269.setAttribute("id",this.getContainerId()+"Iframe");
  23688. _1269.setAttribute("title","Empty iframe");
  23689. _1269.setAttribute("src",_126a+"/common/images/spacer.gif");
  23690. _1269.setAttribute("scrolling","no");
  23691. _1269.setAttribute("frameborder","0");
  23692. _1269.style.position="absolute";
  23693. _1269.style.zIndex="6002";
  23694. _1269.style.display="block";
  23695. return _1269;
  23696. };
  23697. ViewerBaseWorkingDialog.prototype.updateCoords=function(_126c,_126d){
  23698. if(this.m_container!==null&&m_iframeBackground!==null){
  23699. var _126e=0;
  23700. var iLeft=0;
  23701. if(typeof window.innerHeight!="undefined"){
  23702. _126e=Math.round((window.innerHeight/2)-(_126c.offsetHeight/2));
  23703. iLeft=Math.round((window.innerWidth/2)-(_126c.offsetWidth/2));
  23704. }else{
  23705. _126e=Math.round((document.body.clientHeight/2)-(_126c.offsetHeight/2));
  23706. iLeft=Math.round((document.body.clientWidth/2)-(_126c.offsetWidth/2));
  23707. }
  23708. _126c.style.bottom=_126e+"px";
  23709. _126c.style.left=iLeft+"px";
  23710. _126d.style.left=_126c.style.left;
  23711. _126d.style.bottom=_126c.style.bottom;
  23712. _126d.style.width=_126c.offsetWidth+"px";
  23713. _126d.style.height=_126c.offsetHeight+"px";
  23714. }
  23715. };
  23716. ViewerBaseWorkingDialog.prototype.hide=function(){
  23717. var _1270=document.getElementById(this.getContainerId());
  23718. if(_1270){
  23719. _1270.parentNode.removeChild(_1270);
  23720. }
  23721. var _1271=document.getElementById(this.getContainerId()+"Iframe");
  23722. if(_1271){
  23723. _1271.parentNode.removeChild(_1271);
  23724. }
  23725. var _1272=document.getElementById("reportBlocker"+this.m_oCV.getId());
  23726. if(_1272){
  23727. _1272.parentNode.removeChild(_1272);
  23728. }
  23729. };
  23730. ViewerBaseWorkingDialog.prototype.isModal=function(){
  23731. var _1273=this.m_oCV.getId();
  23732. var _1274=document.getElementById("CVReport"+_1273);
  23733. var _1275=true;
  23734. if(_1274&&_1274.innerHTML===""){
  23735. _1275=false;
  23736. }
  23737. return _1275;
  23738. };
  23739. ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_1276){
  23740. };
  23741. ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){
  23742. };
  23743. function FaultDialog(oCV){
  23744. this.m_oCV=oCV;
  23745. };
  23746. FaultDialog.prototype=new IFaultDialog();
  23747. FaultDialog.prototype.show=function(_1278){
  23748. if(typeof console!="undefined"){
  23749. console.log("FaultDialog - an unhandled soap fault was returned: %o",_1278);
  23750. }
  23751. };
  23752. FaultDialog.prototype.handleUnknownHTMLResponse=function(_1279){
  23753. this.m_oCV.setTracking("");
  23754. this.m_oCV.setConversation("");
  23755. if(_1279){
  23756. if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){
  23757. var _127a=document.getElementsByTagName("head")[0];
  23758. var _127b=_1279.match(/<body[^>]*>([\s\S]*)<\/body>/im)[1];
  23759. var _127c=/<script[^>]*>([\s\S]*?)<\/script>/igm;
  23760. var _127d=_127c.exec(_1279);
  23761. while(_127d!=null){
  23762. var _127e=document.createElement("script");
  23763. _127e.type="text/javascript";
  23764. var _127f=_127d[0].match(/src="([\s\S]*?)"/i);
  23765. if(_127f==null){
  23766. _127e.text=_127d[1];
  23767. }else{
  23768. _127e.src=_127f[1];
  23769. }
  23770. _127a.appendChild(_127e);
  23771. _127d=_127c.exec(_1279);
  23772. }
  23773. document.body.innerHTML=_127b;
  23774. }else{
  23775. document.write(_1279);
  23776. }
  23777. }
  23778. };
  23779. function LogOnDialog(oCV){
  23780. this.m_oCV=oCV;
  23781. };
  23782. LogOnDialog.prototype=new ILogOnDialog();
  23783. LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1281){
  23784. if(_1281){
  23785. document.write(_1281);
  23786. }
  23787. };
  23788. LogOnDialog.prototype.show=function(_1282){
  23789. launchLogOnDialog(this.m_oCV.getId(),_1282);
  23790. };
  23791. LogOnDialog.prototype.hide=function(){
  23792. };
  23793. function PromptDialog(oCV){
  23794. this.m_oCV=oCV;
  23795. this.m_dialogImpl=null;
  23796. };
  23797. PromptDialog.prototype=new IPromptDialog();
  23798. PromptDialog.prototype.initialize=function(url,width,_1286){
  23799. this.m_dialogImpl=new CModal("","",document.body,null,null,width,_1286,true,true,false,true,this.m_oCV.getWebContentRoot());
  23800. var _1287=document.getElementById(CMODAL_CONTENT_ID);
  23801. _1287.src=url;
  23802. };
  23803. PromptDialog.prototype.show=function(){
  23804. this.m_dialogImpl.show();
  23805. };
  23806. PromptDialog.prototype.hide=function(){
  23807. this.m_dialogImpl.hide();
  23808. destroyCModal();
  23809. };
  23810. function WorkingDialog(_1288){
  23811. if(_1288){
  23812. this.m_bSimpleWorkingDialog=false;
  23813. this.m_bShowCancelButton=(_1288.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true;
  23814. WorkingDialog.baseConstructor.call(this,_1288);
  23815. this.m_secondaryRequests=_1288.getSecondaryRequests();
  23816. }
  23817. };
  23818. WorkingDialog.prototype=new ViewerBaseWorkingDialog();
  23819. WorkingDialog.baseConstructor=ViewerBaseWorkingDialog;
  23820. WorkingDialog.prototype.setSecondaryRequests=function(_1289){
  23821. this.m_secondaryRequests=_1289;
  23822. };
  23823. WorkingDialog.prototype._getSecondaryRequests=function(){
  23824. return this.m_secondaryRequests;
  23825. };
  23826. WorkingDialog.prototype.getIsSavedReport=function(){
  23827. return this.getCognosViewer().bIsSavedReport;
  23828. };
  23829. WorkingDialog.prototype.setSimpleWorkingDialogFlag=function(flag){
  23830. this.m_bSimpleWorkingDialog=flag;
  23831. };
  23832. WorkingDialog.prototype.getSimpleWorkingDialogFlag=function(){
  23833. return this.m_bSimpleWorkingDialog;
  23834. };
  23835. WorkingDialog.prototype.showDeliveryOptions=function(bShow){
  23836. var _128c=this.getNamespace();
  23837. var _128d=document.getElementById("DeliveryOptionsVisible"+_128c);
  23838. if(_128d){
  23839. _128d.style.display=(bShow===false?"none":"block");
  23840. if(bShow){
  23841. var links=_128d.getElementsByTagName("a");
  23842. for(var i=links.length;i>0;i--){
  23843. if(links[i]&&links[i].getAttribute("tabIndex")=="0"){
  23844. links[i].focus();
  23845. }
  23846. }
  23847. }
  23848. }
  23849. _128d=document.getElementById("OptionsLinkSelected"+_128c);
  23850. if(_128d){
  23851. _128d.style.display=(bShow===false?"none":"block");
  23852. }
  23853. _128d=document.getElementById("OptionsLinkUnselected"+_128c);
  23854. if(_128d){
  23855. _128d.style.display=(bShow===false?"block":"none");
  23856. }
  23857. };
  23858. WorkingDialog.prototype.renderHTML=function(){
  23859. var _1290=this.getNamespace();
  23860. var _1291=_1290+"_workingMsg "+_1290+"_workingMsg2";
  23861. var html="<table class=\"viewerWorkingDialog\" id=\"CVWaitTable"+_1290+"\""+" role=\"presentation\">";
  23862. html+=("<tr>"+"<td align=\"center\">"+"<div tabIndex=\"0\" role=\"presentation\" aria-labelledby=\""+_1291+"\""+" class=\"body_dialog_modal workingDialogDiv\">");
  23863. html+=this.renderFirstInnerTable();
  23864. html+=this.renderSecondInnerTable();
  23865. html+=("</div>"+"</td>"+"</tr>"+"</table>");
  23866. return html;
  23867. };
  23868. WorkingDialog.prototype.renderFirstInnerTable=function(){
  23869. var _1293=this.getSimpleWorkingDialogFlag();
  23870. var _1294=_1293?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING;
  23871. var _1295=this.m_sNamespace;
  23872. var _1296="<table class=\"workingDialogInnerTable\" role=\"presentation\">"+"<tr>"+"<td valign=\"middle\">";
  23873. var _1297=this.getCognosViewer().getSkin()+"/branding/";
  23874. _1296+="<img src=\""+_1297+"progress.gif\"";
  23875. if(isIE()){
  23876. _1296+=" width=\"48\" height=\"48\" border=\"0\"";
  23877. }
  23878. _1296+=" name=\"progress\"";
  23879. if(isIE()){
  23880. _1296+=" align=\"top\"";
  23881. }
  23882. _1296+=" alt=\"";
  23883. _1296+=_1294;
  23884. _1296+="\"/></td>";
  23885. _1296+="<td width=\"20\">&nbsp;</td>";
  23886. _1296+="<td style=\"padding-top: 5px;\" class=\"tableText\">";
  23887. _1296+="<span id=\""+_1295+"_workingMsg\">";
  23888. _1296+=_1294;
  23889. _1296+="</span>";
  23890. _1296+="<br/><br/>";
  23891. var _1298=this.getCognosViewer().envParams["cv.responseFormat"];
  23892. if(_1293||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_1298&&("qs"===_1298||"fragment"===_1298))){
  23893. _1296+=RV_RES.RV_PLEASE_WAIT;
  23894. }else{
  23895. var _1299=this.canShowDeliveryOptions();
  23896. if(_1299){
  23897. _1296+=this.optionLinkSelectedDiv();
  23898. _1296+=this.optionLinkUnselectedDiv();
  23899. }else{
  23900. _1296+=RV_RES.RV_PLEASE_WAIT;
  23901. }
  23902. }
  23903. _1296+="</td></tr><tr><td colspan=\"3\">&nbsp;</td></tr></table>";
  23904. return _1296;
  23905. };
  23906. WorkingDialog.prototype.optionLinkSelectedDiv=function(){
  23907. var _129a="";
  23908. _129a+="<div id=\"OptionsLinkSelected"+this.getNamespace()+"\" style=\"display: none\">";
  23909. _129a+=RV_RES.RV_BUSY_OPTIONS_SELECTED;
  23910. _129a+="</div>";
  23911. return _129a;
  23912. };
  23913. WorkingDialog.prototype.optionLinkUnselectedDiv=function(){
  23914. var _129b="";
  23915. var _129c=this.getNamespace();
  23916. var _129d="window.oCV"+_129c+".getWorkingDialog()";
  23917. _129b+="<div id=\"OptionsLinkUnselected"+_129c+"\">";
  23918. _129b+="<span id=\""+_129c+"_workingMsg2\">";
  23919. _129b+=RV_RES.RV_BUSY_OPTIONS_UNSELECTED;
  23920. _129b+="</span><br/>";
  23921. _129b+="<a href=\"#\" class=\"deliveryOptionLink\" onclick=\"javascript:"+_129d+".showDeliveryOptions(true)\">";
  23922. _129b+=RV_RES.RV_BUSY_OPTIONS_LINK;
  23923. _129b+="</a></div>";
  23924. return _129b;
  23925. };
  23926. WorkingDialog.prototype.canShowDeliveryOptions=function(){
  23927. var _129e=this.getCognosViewer().envParams["ui.primaryAction"];
  23928. if("saveAs"!==_129e&&"email"!==_129e&&this.getIsSavedReport()){
  23929. return true;
  23930. }
  23931. return false;
  23932. };
  23933. WorkingDialog.prototype.isUIBlacklisted=function(item){
  23934. var _12a0=this.getUIBlacklist();
  23935. for(var index in _12a0){
  23936. if(_12a0[index]===item){
  23937. return true;
  23938. }
  23939. }
  23940. return false;
  23941. };
  23942. WorkingDialog.prototype.getUIBlacklist=function(){
  23943. if(!this.m_UIBlacklist&&this.getCognosViewer().UIBlacklist){
  23944. this.m_UIBlacklist=this.getCognosViewer().UIBlacklist.split(" ");
  23945. }
  23946. return this.m_UIBlacklist;
  23947. };
  23948. WorkingDialog.prototype.deliverySectionIsNeeded=function(){
  23949. return !this._isSaveBlackListed()||!this._isSaveAsBlackListed()||!this._isEmailBlackListed();
  23950. };
  23951. WorkingDialog.prototype._isSaveBlackListed=function(){
  23952. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVE")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVE")||!this._hasSecondaryRequest("save");
  23953. };
  23954. WorkingDialog.prototype._isSaveAsBlackListed=function(){
  23955. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVEAS")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVEAS")||!this._hasSecondaryRequest("saveAs");
  23956. };
  23957. WorkingDialog.prototype._isEmailBlackListed=function(){
  23958. return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SEND")||this.isUIBlacklisted("RV_WORKING_DIALOG_SEND")||!this._hasSecondaryRequest("email");
  23959. };
  23960. WorkingDialog.prototype.showCancelButton=function(){
  23961. return this.m_bShowCancelButton;
  23962. };
  23963. WorkingDialog.prototype._hasSecondaryRequest=function(_12a2){
  23964. var _12a3=this._getSecondaryRequests();
  23965. if(_12a3){
  23966. var _12a4=_12a3.length;
  23967. for(var i=0;i<_12a4;i++){
  23968. if(_12a3[i]==_12a2){
  23969. return true;
  23970. }
  23971. }
  23972. }
  23973. return false;
  23974. };
  23975. WorkingDialog.prototype.renderSecondInnerTable=function(){
  23976. var _12a6="";
  23977. var _12a7=this.getCognosViewer().getWebContentRoot();
  23978. _12a6+="<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">";
  23979. _12a6+="<tr id=\"DeliveryOptionsVisible"+this.getNamespace()+"\" class=\"workingDialogOptions\">";
  23980. _12a6+="<td align=\"left\">";
  23981. _12a6+="<table class=\"workingDialogInnerTable workingDialogLinks\" role=\"presentation\">";
  23982. var _12a8=this.canShowDeliveryOptions();
  23983. if(_12a8&&this.deliverySectionIsNeeded()){
  23984. if(!this._isSaveBlackListed()){
  23985. _12a6+=this.addDeliverOption("/rv/images/action_save_report_output.gif",RV_RES.RV_SAVE_REPORT,"SaveReport(true);");
  23986. }
  23987. if("reportView"!==this.getCognosViewer().envParams["ui.objectClass"]&&!this._isSaveAsBlackListed()){
  23988. _12a6+=this.addDeliverOption("/rv/images/action_save_report_view.gif",RV_RES.RV_SAVE_AS_REPORT_VIEW,"SaveAsReportView(true);");
  23989. }
  23990. if(!this.isUIBlacklisted("CC_RUN_OPTIONS_EMAIL_ATTACHMENT")&&!this._isEmailBlackListed()){
  23991. _12a6+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);");
  23992. }
  23993. }
  23994. _12a6+="</table></td></tr> ";
  23995. _12a6+="<tr style=\"padding-top: 5px\"> ";
  23996. _12a6+="<td align=\"left\" colspan=\"3\" id=\"cancelButtonContainer"+this.getNamespace()+"\"> ";
  23997. if(this.showCancelButton()){
  23998. _12a6+=this.addCancelButton();
  23999. }
  24000. _12a6+="</td></tr> ";
  24001. _12a6+="</table> ";
  24002. return _12a6;
  24003. };
  24004. WorkingDialog.prototype.addDeliverOption=function(_12a9,sText,_12ab){
  24005. var _12ac="";
  24006. var _12ad=this.getCognosViewer().getWebContentRoot();
  24007. var _12ae="javascript: window.oCV"+this.getNamespace()+".getRV().";
  24008. var _12af=_12ae+_12ab;
  24009. _12ac+="<tr><td> ";
  24010. _12ac+="<a tabIndex=\"-1\" href=\""+_12ab+"\"> ";
  24011. _12ac+="<img border=\"0\" src=\""+_12ad+_12a9+"\" alt=\" "+html_encode(sText)+"\"/></a> ";
  24012. _12ac+="</td><td width=\"100%\" valign=\"middle\" class=\"tableText\"> ";
  24013. _12ac+="<a tabIndex=\"0\" role=\"link\" href=\"#\" onclick=\""+_12af+"\" style=\"padding-left: 5px\" class=\"deliveryOptionLink\"> ";
  24014. _12ac+=(sText+"</a></td></tr>");
  24015. return _12ac;
  24016. };
  24017. WorkingDialog.prototype.addCancelButton=function(){
  24018. var _12b0="";
  24019. var _12b1=this.getCognosViewer().getWebContentRoot();
  24020. _12b0+="<table role=\"presentation\"><tr><td> ";
  24021. _12b0+="<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\"> ";
  24022. _12b0+="<tr> ";
  24023. _12b0+="<td valign=\"middle\" align=\"center\" nowrap=\"nowrap\" class=\"workingDialogCancelButton\" ";
  24024. if(isIE()){
  24025. _12b0+="id=\"btnAnchorIE\" ";
  24026. }else{
  24027. _12b0+="id=\"btnAnchor\" ";
  24028. }
  24029. _12b0+="> ";
  24030. var _12b2="window.oCV"+this.m_sNamespace+".cancel(this)";
  24031. _12b0+="<a href=\"#\" onclick=\""+_12b2+"\"> ";
  24032. _12b0+=RV_RES.CANCEL;
  24033. _12b0+="</a> ";
  24034. _12b0+="</td></tr></table></td> ";
  24035. _12b0+="<td><img alt=\"\" height=\"1\" ";
  24036. if(isIE()){
  24037. _12b0+="width=\"10\" ";
  24038. }
  24039. _12b0+="src=\""+_12b1+"/ps/images/space.gif\"/></td> ";
  24040. _12b0+="</tr></table> ";
  24041. return _12b0;
  24042. };
  24043. WorkingDialog.prototype.disableCancelButton=function(_12b3){
  24044. this.cancelButtonDisabled=true;
  24045. var _12b4=document.getElementById("cvWorkingDialog"+this.getNamespace());
  24046. if(_12b4){
  24047. _12b4.style.cursor="default";
  24048. _12b4.className="commandButtonOver";
  24049. _12b4.removeAttribute("onmouseover");
  24050. _12b4.removeAttribute("onmouseout");
  24051. }
  24052. if(_12b3){
  24053. _12b3.removeAttribute("href");
  24054. _12b3.removeAttribute("onclick");
  24055. _12b3.style.cursor="default";
  24056. }
  24057. };
  24058. WorkingDialog.prototype.enableCancelButton=function(){
  24059. if(this.cancelButtonDisabled){
  24060. var _12b5=document.getElementById("cancelButtonContainer"+this.getNamespace());
  24061. if(_12b5){
  24062. _12b5.innerHTML=this.addCancelButton();
  24063. }
  24064. this.cancelButtonDisabled=false;
  24065. }
  24066. };
  24067. WorkingDialog.prototype.getContainerId=function(){
  24068. return "CVWait"+this.getNamespace();
  24069. };
  24070. function RequestExecutedIndicator(_12b6){
  24071. if(_12b6){
  24072. RequestExecutedIndicator.baseConstructor.call(this,_12b6);
  24073. }
  24074. };
  24075. RequestExecutedIndicator.baseConstructor=WorkingDialog;
  24076. RequestExecutedIndicator.prototype=new WorkingDialog();
  24077. RequestExecutedIndicator.prototype.renderHTML=function(){
  24078. var _12b7="<table id=\"CVWaitTable"+this.getNamespace()+"\" requestExecutionIndicator=\"true\" class=\"viewerWorkingDialog\" role=\"presentation\">";
  24079. _12b7+="<tr><td align=\"center\">";
  24080. _12b7+="<div class=\"body_dialog_modal\">";
  24081. _12b7+="<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" style=\"vertical-align:middle; text-align: left;\" role=\"presentation\">";
  24082. _12b7+="<tr><td rowspan=\"2\">";
  24083. _12b7+="<img alt=\""+RV_RES.GOTO_WORKING+"\" src=\""+this.getCognosViewer().getSkin()+"/branding/progress.gif\" style=\"margin:5px;\" width=\"48\" height=\"48\" name=\"progress\"/>";
  24084. _12b7+="</td><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
  24085. _12b7+=RV_RES.GOTO_WORKING;
  24086. _12b7+="</span></td></tr><tr><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
  24087. _12b7+=RV_RES.RV_PLEASE_WAIT;
  24088. _12b7+="</span></td></tr><tr><td style=\"height:7px;\" colspan=\"2\"></td></tr></table></div></td></tr></table>";
  24089. return _12b7;
  24090. };
  24091. RequestExecutedIndicator.prototype.getContainerId=function(){
  24092. return "CVWaitindicator"+this.getNamespace();
  24093. };
  24094. function RequestHandler(oCV){
  24095. if(oCV){
  24096. RequestHandler.baseConstructor.call(this,oCV);
  24097. }
  24098. };
  24099. RequestHandler.prototype=new BaseRequestHandler();
  24100. RequestHandler.baseConstructor=BaseRequestHandler;
  24101. RequestHandler.prototype.parent=BaseRequestHandler.prototype;
  24102. RequestHandler.prototype.resubmitInSafeMode=function(){
  24103. this.getViewer().resubmitInSafeMode(this.getDispatcherEntry());
  24104. };
  24105. RequestHandler.prototype.onComplete=function(_12b9){
  24106. this.parent.onComplete.call(this,_12b9);
  24107. this.processDATAReportResponse(_12b9);
  24108. this.postComplete();
  24109. };
  24110. RequestHandler.prototype.processInitialResponse=function(_12ba){
  24111. this.parent.processInitialResponse.call(this,_12ba);
  24112. var oCV=this.getViewer();
  24113. var _12bc=oCV.getStatus();
  24114. oCV.setMaxContentSize();
  24115. var _12bd=(oCV.isWorking(_12bc)||_12bc=="default");
  24116. if(_12bd){
  24117. if(oCV.getWorkingDialog()){
  24118. oCV.getWorkingDialog().show();
  24119. }
  24120. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
  24121. }else{
  24122. if(_12bc=="fault"){
  24123. oCV.setSoapFault(_12ba.m_sSoapFault);
  24124. oCV.executeCallback("fault");
  24125. }else{
  24126. if(_12ba.status=="cancel"){
  24127. oCV.executeCallback("cancel");
  24128. }else{
  24129. oCV.updateSkipToReportLink();
  24130. if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){
  24131. var _12be=oCV.getPinFreezeManager();
  24132. _12be.fromJSONString(oCV.envParams["pinFreezeInfo"]);
  24133. delete oCV.envParams["pinFreezeInfo"];
  24134. }
  24135. if(_12bc!="prompting"||!oCV.executeCallback("prompt")){
  24136. this.postComplete();
  24137. }else{
  24138. oCV.updateSkipToNavigationLink(true);
  24139. }
  24140. }
  24141. }
  24142. }
  24143. this.showReport();
  24144. this.getViewer().renderTabs();
  24145. this.onAsynchStatusUpdate(_12bc);
  24146. };
  24147. RequestHandler.prototype.postComplete=function(){
  24148. this.parent.postComplete.call(this);
  24149. var oCV=this.getViewer();
  24150. var _12c0=document.getElementById("RVContent"+oCV.getId());
  24151. if(_12c0){
  24152. _12c0.scrollTop=0;
  24153. }
  24154. oCV.updateSkipToReportLink();
  24155. if(oCV.rvMainWnd){
  24156. oCV.updateLayout(oCV.getStatus());
  24157. if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){
  24158. var _12c1=oCV.rvMainWnd.getToolbar();
  24159. if(_12c1){
  24160. oCV.rvMainWnd.updateToolbar(oCV.outputFormat);
  24161. _12c1.draw();
  24162. }
  24163. }
  24164. if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){
  24165. var _12c2=oCV.rvMainWnd.getBannerToolbar();
  24166. if(_12c2){
  24167. _12c2.draw();
  24168. }
  24169. }
  24170. }
  24171. if(oCV.getBrowser()=="moz"){
  24172. if(_12c0){
  24173. if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){
  24174. _12c0.style.overflow="hidden";
  24175. }else{
  24176. _12c0.style.overflow="auto";
  24177. }
  24178. }
  24179. }
  24180. oCV.gbPromptRequestSubmitted=false;
  24181. this.showReport();
  24182. if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
  24183. var _12c3=document.getElementById("CVReport"+oCV.getId());
  24184. if(_12c3){
  24185. setTimeout(function(){
  24186. oCV.getPinFreezeManager().renderReportWithFrozenContainers(_12c3);
  24187. if(isIE()){
  24188. oCV.repaintDiv(_12c0);
  24189. }
  24190. },1);
  24191. }
  24192. }
  24193. oCV.setMaxContentSize();
  24194. oCV.executeCallback("done");
  24195. oCV.doneLoading();
  24196. };
  24197. function ActionFormFields(_12c4){
  24198. this.m_dispatcherEntry=_12c4;
  24199. this.m_oCV=_12c4.getViewer();
  24200. };
  24201. ActionFormFields.prototype.addFormFields=function(){
  24202. var _12c5=this.m_dispatcherEntry;
  24203. var _12c6=_12c5.getAction();
  24204. _12c6.preProcess();
  24205. _12c5.addFormField("ui.action","modifyReport");
  24206. if(this.m_oCV.getModelPath()!==""){
  24207. _12c5.addFormField("modelPath",this.m_oCV.getModelPath());
  24208. if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){
  24209. _12c5.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]);
  24210. }
  24211. }
  24212. if(_12c6.doAddActionContext()===true){
  24213. var _12c7=_12c6.addActionContext();
  24214. _12c5.addFormField("cv.actionContext",_12c7);
  24215. if(window.gViewerLogger){
  24216. window.gViewerLogger.log("Action context",_12c7,"xml");
  24217. }
  24218. }
  24219. var isBux=this.m_oCV.envParams["bux"]=="true";
  24220. if(isBux){
  24221. _12c5.addFormField("cv.showFaultPage","false");
  24222. }else{
  24223. _12c5.addFormField("cv.showFaultPage","true");
  24224. }
  24225. _12c5.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
  24226. _12c5.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
  24227. _12c5.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]);
  24228. _12c5.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]);
  24229. _12c5.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]);
  24230. _12c5.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
  24231. _12c5.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]);
  24232. _12c5.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]);
  24233. _12c5.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]);
  24234. _12c5.addNonNullFormField("bux",this.m_oCV.envParams["bux"]);
  24235. _12c5.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]);
  24236. _12c5.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]);
  24237. var _12c9=this.m_oCV.getFlashChartOption();
  24238. if(_12c9!=null){
  24239. _12c5.addFormField("savedFlashChartOption",_12c9);
  24240. if(_12c9&&_12c6!=null&&typeof (_12c6.m_requestParams)!="undefined"&&typeof (_12c6.m_requestParams.targetType)!="undefined"){
  24241. var _12ca=false;
  24242. var _12cb=null;
  24243. if(typeof (_12c6.m_requestParams.targetType.targetType)!="undefined"){
  24244. _12cb=_12c6.m_requestParams.targetType.targetType;
  24245. }else{
  24246. _12cb=_12c6.m_requestParams.targetType;
  24247. }
  24248. if(_12cb.match("v2_")!=null||_12cb.match("_v2")!=null){
  24249. _12ca=true;
  24250. }else{
  24251. var _12cc=this.m_oCV.getRAPReportInfo();
  24252. var _12cd=_12c6.getSelectedReportInfo();
  24253. if(_12cc&&_12cd){
  24254. var _12ce=_12cc.getDisplayTypes(_12cd.container);
  24255. if(_12ce.match("v2_")!=null||_12ce.match("_v2")!=null){
  24256. _12ca=true;
  24257. }
  24258. }
  24259. }
  24260. _12c5.addFormField("hasAVSChart",_12ca);
  24261. }else{
  24262. _12c5.addFormField("hasAVSChart",this.m_oCV.hasAVSChart());
  24263. }
  24264. }
  24265. var sEP=this.m_oCV.getExecutionParameters();
  24266. if(sEP){
  24267. _12c5.addFormField("executionParameters",encodeURIComponent(sEP));
  24268. }
  24269. _12c5.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation()));
  24270. _12c5.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking()));
  24271. var sCAF=this.m_oCV.getCAFContext();
  24272. if(sCAF){
  24273. _12c5.addFormField("ui.cafcontextid",sCAF);
  24274. }
  24275. if(_12c6.forceRunSpecRequest()){
  24276. _12c5.addFormField("widget.forceRunSpec","true");
  24277. }
  24278. };
  24279. function ViewerDispatcher(){
  24280. this.m_activeRequest=null;
  24281. this.m_requestQueue=[];
  24282. this.m_bUsePageRequest=false;
  24283. };
  24284. ViewerDispatcher.prototype.getActiveRequest=function(){
  24285. return this.m_activeRequest;
  24286. };
  24287. ViewerDispatcher.prototype.setUsePageRequest=function(_12d1){
  24288. this.m_bUsePageRequest=_12d1;
  24289. };
  24290. ViewerDispatcher.prototype.getUsePageRequest=function(){
  24291. return this.m_bUsePageRequest;
  24292. };
  24293. ViewerDispatcher.prototype.dispatchRequest=function(_12d2){
  24294. if(this.m_activeRequest==null){
  24295. this.startRequest(_12d2);
  24296. }else{
  24297. if(_12d2.canBeQueued()==true){
  24298. this.m_requestQueue.push(_12d2);
  24299. }else{
  24300. if(window.cognosViewerDebug&&console&&console.warn){
  24301. console.warn("Warning! Dropped a dispatcher entry!");
  24302. }
  24303. }
  24304. }
  24305. };
  24306. ViewerDispatcher.prototype.startRequest=function(_12d3){
  24307. this.m_activeRequest=_12d3;
  24308. if(_12d3!=null){
  24309. _12d3.setUsePageRequest(this.m_bUsePageRequest);
  24310. _12d3.sendRequest();
  24311. }
  24312. };
  24313. ViewerDispatcher.prototype.cancelRequest=function(key){
  24314. for(var i=0;i<this.m_requestQueue.length;i++){
  24315. var _12d6=this.m_requestQueue[i];
  24316. if(_12d6.getKey()===key){
  24317. _12d6.setCallbacks({"onEntryComplete":null});
  24318. _12d6.cancelRequest(false);
  24319. this.m_requestQueue.splice(i,1);
  24320. i--;
  24321. }
  24322. }
  24323. if(this.m_activeRequest&&this.m_activeRequest.getKey()===key){
  24324. this.m_activeRequest.setCallbacks({"onEntryComplete":null});
  24325. this.m_activeRequest.cancelRequest(false);
  24326. this.requestComplete();
  24327. }
  24328. };
  24329. ViewerDispatcher.prototype.possibleUnloadEvent=function(){
  24330. if(this.m_activeRequest){
  24331. this.m_activeRequest.possibleUnloadEvent();
  24332. }
  24333. };
  24334. ViewerDispatcher.prototype.requestComplete=function(_12d7){
  24335. this.startRequest(this.nextRequest());
  24336. };
  24337. ViewerDispatcher.prototype.nextRequest=function(){
  24338. var _12d8=null;
  24339. if(this.m_requestQueue.length>0){
  24340. _12d8=this.m_requestQueue.shift();
  24341. if(_12d8.getKey()!=null){
  24342. while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12d8.getKey()){
  24343. _12d8=this.m_requestQueue.shift();
  24344. }
  24345. }
  24346. }
  24347. return _12d8;
  24348. };
  24349. ViewerDispatcher.prototype.queueIsEmpty=function(){
  24350. return (this.m_requestQueue.length==0);
  24351. };
  24352. function DispatcherEntry(oCV){
  24353. this.m_oCV=oCV;
  24354. this.m_requestKey=null;
  24355. this.m_canBeQueued=false;
  24356. this.m_originalFormFields=null;
  24357. this.m_bUsePageRequest=false;
  24358. if(oCV){
  24359. if(!this.m_request){
  24360. this.m_request=new XmlHttpObject();
  24361. this.m_request.init("POST",this.m_oCV.getGateway(),"",true);
  24362. }
  24363. if(!this.m_requestHandler){
  24364. this.setRequestHandler(new BaseRequestHandler(oCV));
  24365. }
  24366. DispatcherEntry.prototype.setDefaultFormFields.call(this);
  24367. 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}});
  24368. }
  24369. };
  24370. DispatcherEntry.prototype.setHeaders=function(_12da){
  24371. this.m_request.setHeaders(_12da);
  24372. };
  24373. DispatcherEntry.prototype.getHeaders=function(){
  24374. return this.m_request.getHeaders();
  24375. };
  24376. DispatcherEntry.prototype.setOriginalFormFields=function(_12db){
  24377. this.m_originalFormFields=_12db;
  24378. };
  24379. DispatcherEntry.prototype.getOriginalFormFields=function(){
  24380. return this.m_originalFormFields;
  24381. };
  24382. DispatcherEntry.prototype.setRequestHandler=function(_12dc){
  24383. _12dc.addCallbackHooks();
  24384. this.m_requestHandler=_12dc;
  24385. };
  24386. DispatcherEntry.prototype.getRequestHandler=function(){
  24387. return this.m_requestHandler;
  24388. };
  24389. DispatcherEntry.prototype.setWorkingDialog=function(_12dd){
  24390. if(this.getRequestHandler()){
  24391. this.m_requestHandler.setWorkingDialog(_12dd);
  24392. }
  24393. };
  24394. DispatcherEntry.prototype.setRequestIndicator=function(_12de){
  24395. if(this.getRequestHandler()){
  24396. this.getRequestHandler().setRequestIndicator(_12de);
  24397. }
  24398. };
  24399. DispatcherEntry.prototype.forceSynchronous=function(){
  24400. this.getRequest().forceSynchronous();
  24401. };
  24402. DispatcherEntry.prototype.setUsePageRequest=function(_12df){
  24403. this.m_bUsePageRequest=_12df;
  24404. };
  24405. DispatcherEntry.prototype.getUsePageRequest=function(){
  24406. return this.m_bUsePageRequest;
  24407. };
  24408. DispatcherEntry.prototype.setDefaultFormFields=function(){
  24409. var _12e0=this.getViewer().envParams;
  24410. this.addFormField("b_action","cognosViewer");
  24411. this.addFormField("cv.catchLogOnFault","true");
  24412. this.addDefinedNonNullFormField("protectParameters",_12e0["protectParameters"]);
  24413. this.addDefinedNonNullFormField("ui.routingServerGroup",_12e0["ui.routingServerGroup"]);
  24414. this.addDefinedNonNullFormField("cv.debugDirectory",_12e0["cv.debugDirectory"]);
  24415. this.addDefinedNonNullFormField("cv.showFaultPage",_12e0["cv.showFaultPage"]);
  24416. this.addDefinedNonNullFormField("cv.useRAPDrill",_12e0["cv.useRAPDrill"]);
  24417. this.addDefinedNonNullFormField("container",_12e0["container"]);
  24418. this.addNonEmptyStringFormField("cv.objectPermissions",_12e0["cv.objectPermissions"]);
  24419. };
  24420. DispatcherEntry.prototype.getViewer=function(){
  24421. return this.m_oCV;
  24422. };
  24423. DispatcherEntry.prototype.prepareRequest=function(){
  24424. };
  24425. DispatcherEntry.addWidgetInfoToFormFields=function(_12e1,_12e2){
  24426. if(_12e1){
  24427. var _12e3=_12e1.getBUXRTStateInfoMap();
  24428. if(_12e3){
  24429. _12e2.addFormField("cv.buxRTStateInfo",_12e3);
  24430. }
  24431. var _12e4=_12e1.getDisplayName();
  24432. if(_12e4&&_12e4.length>0){
  24433. _12e2.addFormField("displayTitle",_12e4);
  24434. }
  24435. }
  24436. };
  24437. DispatcherEntry.prototype.canBeQueued=function(){
  24438. return this.m_canBeQueued;
  24439. };
  24440. DispatcherEntry.prototype.setCanBeQueued=function(_12e5){
  24441. this.m_canBeQueued=_12e5;
  24442. };
  24443. DispatcherEntry.prototype.getKey=function(){
  24444. return this.m_requestKey;
  24445. };
  24446. DispatcherEntry.prototype.setKey=function(key){
  24447. this.m_requestKey=key;
  24448. };
  24449. DispatcherEntry.prototype.setRequest=function(_12e7){
  24450. this.m_request=_12e7;
  24451. };
  24452. DispatcherEntry.prototype.getRequest=function(){
  24453. return this.m_request;
  24454. };
  24455. DispatcherEntry.prototype.setCallbacks=function(_12e8){
  24456. this.getRequest().setCallbacks(_12e8);
  24457. };
  24458. DispatcherEntry.prototype.getCallbacks=function(){
  24459. return this.getRequest().getCallbacks();
  24460. };
  24461. DispatcherEntry.prototype.sendRequest=function(){
  24462. this.prepareRequest();
  24463. var _12e9=this.getRequest().getFormFields();
  24464. var _12ea=_12e9.keys();
  24465. if(!this.m_originalFormFields){
  24466. this.m_originalFormFields=new CDictionary();
  24467. for(var index=0;index<_12ea.length;index++){
  24468. this.m_originalFormFields.add(_12ea[index],_12e9.get(_12ea[index]));
  24469. }
  24470. }
  24471. this.getRequest().sendRequest();
  24472. };
  24473. DispatcherEntry.prototype.onNewRequest=function(_12ec){
  24474. this.setRequest(_12ec);
  24475. };
  24476. DispatcherEntry.prototype.retryRequest=function(){
  24477. var oCV=this.getViewer();
  24478. oCV.setRetryDispatcherEntry(null);
  24479. var _12ee=this.getRequest().newRequest();
  24480. _12ee.setHeaders(null);
  24481. this.setRequest(_12ee);
  24482. var _12ef=this.m_originalFormFields.keys();
  24483. for(var index=0;index<_12ef.length;index++){
  24484. var _12f1=_12ef[index];
  24485. var _12f2=this.m_originalFormFields.get(_12f1);
  24486. if(_12f1=="cv.responseFormat"&&_12f2=="iWidget"){
  24487. this.addFormField("cv.responseFormat","data");
  24488. }else{
  24489. if(_12f1=="ui.action"&&_12f2=="wait"){
  24490. this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
  24491. }else{
  24492. if(_12f1!="m_tracking"&&_12f1!="cv.outputKey"){
  24493. this.addFormField(_12f1,_12f2);
  24494. }
  24495. }
  24496. }
  24497. }
  24498. this.addFormField("widget.reloadToolbar","true");
  24499. if(this.m_oCV.getViewerWidget()){
  24500. this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole());
  24501. }
  24502. this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]);
  24503. this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]);
  24504. this.m_oCV.getViewerDispatcher().dispatchRequest(this);
  24505. };
  24506. DispatcherEntry.prototype.abortHttpRequest=function(){
  24507. if(!this.m_bCancelCalled){
  24508. if(this.getRequestHandler()){
  24509. this.getRequestHandler().onCancel();
  24510. }
  24511. this.m_bCancelCalled=true;
  24512. this.getRequest().abortHttpRequest();
  24513. this.onEntryComplete();
  24514. }
  24515. };
  24516. DispatcherEntry.prototype.cancelRequest=function(_12f3){
  24517. if(!this.m_bCancelCalled){
  24518. this.m_bCancelCalled=true;
  24519. if(this.getRequestHandler()){
  24520. this.getRequestHandler().onCancel();
  24521. }
  24522. if(_12f3){
  24523. this.getRequest().forceSynchronous();
  24524. }
  24525. this.getRequest().cancel();
  24526. this.onEntryComplete();
  24527. }
  24528. };
  24529. DispatcherEntry.prototype.getFormFields=function(){
  24530. return this.m_request.getFormFields();
  24531. };
  24532. DispatcherEntry.prototype.getFormField=function(name){
  24533. if(this.m_request){
  24534. return this.m_request.getFormField(name);
  24535. }else{
  24536. return "";
  24537. }
  24538. };
  24539. DispatcherEntry.prototype.clearFormFields=function(){
  24540. this.m_request.clearFormFields();
  24541. };
  24542. DispatcherEntry.prototype.formFieldExists=function(name){
  24543. if(this.m_request){
  24544. return this.m_request.getFormFields().exists(name);
  24545. }
  24546. return false;
  24547. };
  24548. DispatcherEntry.prototype.removeFormField=function(name){
  24549. if(this.formFieldExists(name)){
  24550. this.m_request.getFormFields().remove(name);
  24551. }
  24552. };
  24553. DispatcherEntry.prototype.addFormField=function(name,value){
  24554. this.m_request.addFormField(name,value);
  24555. };
  24556. DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,value){
  24557. if(typeof value!="undefined"&&value!=null){
  24558. this.addFormField(name,value);
  24559. }
  24560. };
  24561. DispatcherEntry.prototype.addDefinedFormField=function(name,value){
  24562. if(typeof value!="undefined"){
  24563. this.addFormField(name,value);
  24564. }
  24565. };
  24566. DispatcherEntry.prototype.addNonNullFormField=function(name,value){
  24567. if(value!=null){
  24568. this.addFormField(name,value);
  24569. }
  24570. };
  24571. DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,value){
  24572. if(typeof value!="undefined"&&value!=null&&value!=""){
  24573. this.addFormField(name,value);
  24574. }
  24575. };
  24576. DispatcherEntry.prototype.onWorking=function(_1301,arg1){
  24577. if(this.getRequestHandler()){
  24578. this.getRequestHandler().onWorking(_1301);
  24579. }
  24580. };
  24581. DispatcherEntry.prototype.onFault=function(_1303){
  24582. if(this.getRequestHandler()){
  24583. this.getRequestHandler().onFault(_1303);
  24584. }
  24585. };
  24586. DispatcherEntry.prototype.onError=function(_1304){
  24587. if(this.m_bCancelCalled){
  24588. return;
  24589. }
  24590. if(this.getRequestHandler()){
  24591. this.getRequestHandler().onError(_1304);
  24592. }
  24593. };
  24594. DispatcherEntry.prototype.possibleUnloadEvent=function(){
  24595. this.setCallbacks({"error":{}});
  24596. };
  24597. DispatcherEntry.prototype.onPreHttpRequest=function(_1305){
  24598. if(this.getRequestHandler()){
  24599. this.getRequestHandler().preHttpRequest(_1305);
  24600. }
  24601. };
  24602. DispatcherEntry.prototype.onPostHttpRequest=function(_1306){
  24603. if(this.getRequestHandler()){
  24604. this.getRequestHandler().postHttpRequest(_1306);
  24605. }
  24606. };
  24607. DispatcherEntry.prototype.onPassportTimeout=function(_1307){
  24608. if(this.getRequestHandler()){
  24609. this.getRequestHandler().onPassportTimeout(_1307);
  24610. }
  24611. };
  24612. DispatcherEntry.prototype.onPrompting=function(_1308){
  24613. if(this.getRequestHandler()){
  24614. this.getRequestHandler().onPrompting(_1308);
  24615. }
  24616. };
  24617. DispatcherEntry.prototype.onEntryComplete=function(_1309){
  24618. if(!this.m_oCV._beingDestroyed){
  24619. this.m_oCV.getViewerDispatcher().requestComplete(this);
  24620. }
  24621. };
  24622. DispatcherEntry.prototype.onEntryFault=function(_130a){
  24623. this.m_oCV.setFaultDispatcherEntry(this);
  24624. this.m_oCV.resetViewerDispatcher();
  24625. if(!this.m_bCancelCalled){
  24626. this.m_oCV.setRetryDispatcherEntry(this);
  24627. }
  24628. };
  24629. DispatcherEntry.prototype.onCloseErrorDlg=function(){
  24630. var _130b=this.getCallbacks();
  24631. if(_130b["closeErrorDlg"]){
  24632. var _130c=GUtil.generateCallback(_130b["closeErrorDlg"].method,[],_130b["closeErrorDlg"].object);
  24633. _130c();
  24634. }
  24635. };
  24636. DispatcherEntry.prototype.onPostEntryComplete=function(){
  24637. if(this.getRequestHandler()){
  24638. this.getRequestHandler().onPostEntryComplete();
  24639. }
  24640. this.executeCallback("postComplete");
  24641. };
  24642. DispatcherEntry.prototype.executeCallback=function(_130d){
  24643. var _130e=this.getCallbacks();
  24644. if(_130e[_130d]){
  24645. var _130f=(_130e.customArguments)?[this,_130e.customArguments]:[this];
  24646. var _1310=GUtil.generateCallback(_130e[_130d].method,_130f,_130e[_130d].object);
  24647. _1310();
  24648. return true;
  24649. }
  24650. return false;
  24651. };
  24652. function DataDispatcherEntry(oCV){
  24653. if(oCV){
  24654. this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()));
  24655. }
  24656. DataDispatcherEntry.baseConstructor.call(this,oCV);
  24657. };
  24658. DataDispatcherEntry.prototype=new DispatcherEntry();
  24659. DataDispatcherEntry.baseConstructor=DispatcherEntry;
  24660. function JSONDispatcherEntry(oCV){
  24661. if(oCV){
  24662. this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()));
  24663. }
  24664. JSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  24665. JSONDispatcherEntry.baseConstructor.call(this,oCV);
  24666. };
  24667. JSONDispatcherEntry.prototype=new DispatcherEntry();
  24668. JSONDispatcherEntry.baseConstructor=DispatcherEntry;
  24669. JSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  24670. this.addFormField("cv.responseFormat","JSON");
  24671. };
  24672. function AsynchDataDispatcherEntry(oCV){
  24673. if(oCV){
  24674. var _1314=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
  24675. this.setRequest(_1314);
  24676. AsynchDataDispatcherEntry.baseConstructor.call(this,oCV);
  24677. AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this);
  24678. }
  24679. };
  24680. AsynchDataDispatcherEntry.prototype=new DispatcherEntry();
  24681. AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry;
  24682. AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){
  24683. this.addFormField("cv.responseFormat","data");
  24684. };
  24685. function AsynchJSONDispatcherEntry(oCV){
  24686. if(oCV){
  24687. var _1316=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
  24688. this.setRequest(_1316);
  24689. AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV);
  24690. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  24691. }
  24692. };
  24693. AsynchJSONDispatcherEntry.prototype=new DispatcherEntry();
  24694. AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry;
  24695. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  24696. this.addFormField("cv.responseFormat","asynchJSON");
  24697. };
  24698. function ReportDispatcherEntry(oCV){
  24699. ReportDispatcherEntry.baseConstructor.call(this,oCV);
  24700. if(oCV){
  24701. ReportDispatcherEntry.prototype.setDefaultFormFields.call(this);
  24702. this.setRequestHandler(new RequestHandler(oCV));
  24703. this.setWorkingDialog(oCV.getWorkingDialog());
  24704. this.setRequestIndicator(oCV.getRequestIndicator());
  24705. this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}});
  24706. }
  24707. };
  24708. ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry();
  24709. ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry;
  24710. ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype;
  24711. ReportDispatcherEntry.prototype.prepareRequest=function(){
  24712. var _1318=this.getFormField("ui.action");
  24713. var _1319=this.getViewer().getActionState();
  24714. if(_1319!==""&&(_1318=="wait"||_1318=="forward"||_1318=="back")){
  24715. this.addFormField("cv.actionState",_1319);
  24716. }
  24717. var _131a=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
  24718. var _131b=true;
  24719. for(var i=0;i<_131a.length;i++){
  24720. if(_131a[i]==_1318){
  24721. _131b=false;
  24722. break;
  24723. }
  24724. }
  24725. if(_131b){
  24726. this.getViewer().clearTabs();
  24727. }
  24728. if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){
  24729. this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab());
  24730. }
  24731. };
  24732. ReportDispatcherEntry.prototype.setDefaultFormFields=function(){
  24733. var oCV=this.getViewer();
  24734. var _131e=oCV.envParams;
  24735. this.addFormField("cv.id",oCV.getId());
  24736. if(_131e["cv.showFaultPage"]){
  24737. this.addFormField("cv.showFaultPage",_131e["cv.showFaultPage"]);
  24738. }else{
  24739. this.addFormField("cv.showFaultPage","false");
  24740. }
  24741. this.addDefinedNonNullFormField("ui.object",_131e["ui.object"]);
  24742. this.addDefinedNonNullFormField("ui.primaryAction",_131e["ui.primaryAction"]);
  24743. this.addDefinedNonNullFormField("ui.objectClass",_131e["ui.objectClass"]);
  24744. this.addNonEmptyStringFormField("specificationType",_131e["specificationType"]);
  24745. this.addNonEmptyStringFormField("cv.promptForDownload",_131e["cv.promptForDownload"]);
  24746. this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
  24747. this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
  24748. var _131f=oCV.getExecutionParameters();
  24749. this.addNonEmptyStringFormField("executionParameters",_131f);
  24750. var sCAF=oCV.getCAFContext();
  24751. this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
  24752. };
  24753. ReportDispatcherEntry.prototype.onWorking=function(_1321,arg1){
  24754. var _1323=_1321.getResponseState();
  24755. var _1324=this.getRequestHandler();
  24756. if(_1324){
  24757. var _1325=_1324.getWorkingDialog();
  24758. if(_1325&&_1325.setSecondaryRequests&&_1323.m_aSecRequests){
  24759. _1325.setSecondaryRequests(_1323.m_aSecRequests);
  24760. }
  24761. }
  24762. DispatcherEntry.prototype.onWorking.call(this,_1321,arg1);
  24763. if(_1324){
  24764. this.getRequestHandler().updateViewerState(_1323);
  24765. }
  24766. };
  24767. ReportDispatcherEntry.prototype.onComplete=function(_1326,arg1){
  24768. if(this.getRequestHandler()){
  24769. this.getRequestHandler().onComplete(_1326);
  24770. }
  24771. };
  24772. function ViewerDispatcherEntry(oCV){
  24773. ViewerDispatcherEntry.baseConstructor.call(this,oCV);
  24774. if(oCV){
  24775. ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this);
  24776. this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onPrompting},"cancel":{"object":this,"method":this.onCancel}});
  24777. }
  24778. };
  24779. ViewerDispatcherEntry.prototype=new ReportDispatcherEntry();
  24780. ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry;
  24781. ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype;
  24782. ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){
  24783. var oCV=this.getViewer();
  24784. var _132a=oCV.envParams;
  24785. this.addFormField("cv.showFaultPage","true");
  24786. this.addDefinedNonNullFormField("cv.header",_132a["cv.header"]);
  24787. this.addDefinedNonNullFormField("cv.toolbar",_132a["cv.toolbar"]);
  24788. this.addDefinedNonNullFormField("ui.backURL",_132a["ui.backURL"]);
  24789. this.addDefinedNonNullFormField("errURL",_132a["ui.backURL"]);
  24790. this.addDefinedNonNullFormField("errURL",_132a["ui.errURL"]);
  24791. this.addDefinedNonNullFormField("cv.catchLogOnFault","true");
  24792. this.addDefinedNonNullFormField("m_sessionConv",_132a["m_sessionConv"]);
  24793. if(_132a["m_session"]){
  24794. this.addFormField("m_session",_132a["m_session"]);
  24795. this.addFormField("cv.ignoreState","true");
  24796. }
  24797. };
  24798. ViewerDispatcherEntry.prototype.prepareRequest=function(){
  24799. this.parent.prepareRequest.call(this);
  24800. if(this.getUsePageRequest()){
  24801. this.m_oCV.setKeepSessionAlive(true);
  24802. if(typeof this.m_oCV.envParams["cv.responseFormat"]!="undefined"&&this.m_oCV.envParams["cv.responseFormat"]!=null&&this.m_oCV.envParams["cv.responseFormat"]!=""){
  24803. this.addFormField("cv.responseFormat",this.m_oCV.envParams["cv.responseFormat"]);
  24804. }else{
  24805. if(this.getFormField("cv.responseFormat")!="view"){
  24806. this.addFormField("cv.responseFormat","page");
  24807. }
  24808. }
  24809. var _132b=this.m_oCV.getPinFreezeManager();
  24810. if(_132b&&_132b.hasFrozenContainers()){
  24811. this.addFormField("pinFreezeInfo",_132b.toJSONString());
  24812. }
  24813. if(this.m_oCV.envParams["cv.createCallback"]){
  24814. this.addFormField("cv.createCallback",this.m_oCV.envParams["cv.createCallback"]);
  24815. }
  24816. }
  24817. };
  24818. ViewerDispatcherEntry.prototype.sendRequest=function(){
  24819. if(this.getUsePageRequest()){
  24820. this.prepareRequest();
  24821. var _132c=this.buildRequestForm();
  24822. if(typeof document.progress!="undefined"){
  24823. setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1);
  24824. }
  24825. _132c.submit();
  24826. }else{
  24827. this.getViewer().closeContextMenuAndToolbarMenus();
  24828. this.parent.sendRequest.call(this);
  24829. }
  24830. };
  24831. ViewerDispatcherEntry.prototype.buildRequestForm=function(){
  24832. var oCV=this.getViewer();
  24833. var _132e=document.createElement("form");
  24834. _132e.setAttribute("id","requestForm");
  24835. _132e.setAttribute("name","requestForm");
  24836. _132e.setAttribute("method","post");
  24837. _132e.setAttribute("target","_self");
  24838. _132e.setAttribute("action",oCV.getGateway());
  24839. _132e.style.display="none";
  24840. document.body.appendChild(_132e);
  24841. var _132f=this.getRequest().getFormFields();
  24842. var _1330=_132f.keys();
  24843. for(var index=0;index<_1330.length;index++){
  24844. _132e.appendChild(this.createHiddenFormField(_1330[index],_132f.get(_1330[index])));
  24845. }
  24846. for(param in oCV.envParams){
  24847. if(!_132f.exists(param)&&param!="cv.actionState"){
  24848. _132e.appendChild(this.createHiddenFormField(param,oCV.envParams[param]));
  24849. }
  24850. }
  24851. return _132e;
  24852. };
  24853. ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,value){
  24854. var _1334=document.createElement("input");
  24855. _1334.setAttribute("type","hidden");
  24856. _1334.setAttribute("name",name);
  24857. _1334.setAttribute("id",name);
  24858. _1334.setAttribute("value",value);
  24859. return (_1334);
  24860. };
  24861. ViewerDispatcherEntry.prototype.onCancel=function(){
  24862. var oCV=this.getViewer();
  24863. oCV.setStatus("complete");
  24864. if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){
  24865. oCV.executeCallback("cancel");
  24866. }
  24867. };
  24868. ViewerDispatcherEntry.prototype.onFault=function(_1336){
  24869. if(this.getViewer().callbackExists("fault")){
  24870. this.getViewer().setSoapFault(_1336.getSoapFault());
  24871. this.getViewer().executeCallback("fault");
  24872. }else{
  24873. this.parent.onFault.call(this,_1336);
  24874. }
  24875. };
  24876. ViewerDispatcherEntry.prototype.onComplete=function(_1337){
  24877. var oCV=this.getViewer();
  24878. oCV.saveBackJaxInformation(_1337);
  24879. if(oCV.isReportRenderingDone()){
  24880. this.getViewer().getSelectionController().resetSelections();
  24881. }
  24882. this.parent.onComplete.call(this,_1337);
  24883. };
  24884. ViewerDispatcherEntry.prototype.onPrompting=function(_1339){
  24885. var oCV=this.getViewer();
  24886. oCV.updateSkipToNavigationLink(true);
  24887. if(!oCV.executeCallback("prompt")){
  24888. this.onComplete(_1339);
  24889. }
  24890. };
  24891. ViewerDispatcherEntry.prototype.onEntryComplete=function(_133b){
  24892. if(this.getRequestHandler()){
  24893. this.getRequestHandler().setDispatcherEntry(this);
  24894. }
  24895. this.parent.onEntryComplete.call(this,_133b);
  24896. };