viewer.core.base.js 660 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979
  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. /*
  13. *+------------------------------------------------------------------------+
  14. *| Licensed Materials - Property of IBM
  15. *| IBM Cognos Products: Viewer
  16. *| (C) Copyright IBM Corp. 2013
  17. *|
  18. *| US Government Users Restricted Rights - Use, duplication or
  19. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  20. *|
  21. *+------------------------------------------------------------------------+
  22. */
  23. if (!RV_RES) {
  24. var RV_RES = {};
  25. }
  26. RV_RES.RV_BROWSER_POPUP_IS_ENABLED = "Your software to block pop-up windows is enabled. Change the settings in your web browser to allow pop-up windows from this website to be displayed.";
  27. RV_RES.RV_RUNNING = "Your report is running.";
  28. RV_RES.RV_PLEASE_WAIT = "Please wait...";
  29. RV_RES.CANCEL = "Cancel";
  30. RV_RES.IDS_JS_OK = "OK";
  31. RV_RES.IDS_JS_RETRY = "Retry";
  32. RV_RES.IDS_JS_DETAILS = "Details";
  33. RV_RES.RV_BUSY_OPTIONS_SELECTED = "Instead of waiting, you can set it to run in the background with one of the following delivery options:";
  34. RV_RES.RV_BUSY_OPTIONS_UNSELECTED = "Instead of waiting, you can select a delivery method to run the report in the background.";
  35. RV_RES.RV_BUSY_OPTIONS_LINK = "Select a delivery method.";
  36. RV_RES.PRINT_AS_PDF = "Print as PDF";
  37. RV_RES.COPY = "Copy Widget";
  38. RV_RES.CUT = "Cut Widget";
  39. RV_RES.IDS_PRINT_AS_PDF = "Print as PDF";
  40. RV_RES.RV_EMAIL_REPORT = "Email Report...";
  41. RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE = "Set the email options dialog";
  42. RV_RES.RV_SAVE_REPORT = "Save Report";
  43. RV_RES.RV_SAVE_AS_REPORT_VIEW = "Save as Report View...";
  44. RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE = "Save as report view dialog";
  45. RV_RES.RV_RUN = "Run Report";
  46. RV_RES.RV_VIEW = "View";
  47. RV_RES.RV_VIEW_HTML = "View in HTML Format";
  48. RV_RES.RV_VIEW_PDF = "View in PDF Format";
  49. RV_RES.RV_VIEW_CSV = "View in CSV Format";
  50. RV_RES.RV_PDF = "PDF";
  51. RV_RES.RV_CSV = "CSV";
  52. RV_RES.RV_XML = "XML";
  53. RV_RES.RV_EXCEL_2000 = "Excel 2000";
  54. RV_RES.RV_EXCEL_2000SF = "Excel 2000 Single Sheet";
  55. RV_RES.RV_EXCEL_2002 = "Excel 2002";
  56. RV_RES.RV_EXCEL_2007 = "Excel 2007";
  57. RV_RES.RV_EXCEL_2007_DATA = "Excel 2007 Data";
  58. RV_RES.RV_VIEW_OPTIONS = "View in Excel Options";
  59. RV_RES.RV_VIEW_EXCEL = "View in Excel 2000 Format";
  60. RV_RES.RV_VIEW_XML = "View in XML Format";
  61. RV_RES.RV_VIEW_XLWA = "View in Excel 2002 Format";
  62. RV_RES.RV_VIEW_SINGLE_EXCEL = "View in Excel 2000 Single Sheet Format";
  63. RV_RES.RV_VIEW_SPREADSHEETML = "View in Excel 2007 Format";
  64. RV_RES.RV_VIEW_SPREADSHEETML_DATA = "View in Excel 2007 Data";
  65. RV_RES.RV_PREVIOUS_REPORT = "Previous Report";
  66. RV_RES.RV_DRILL_UP = "Drill Up";
  67. RV_RES.RV_DRILL_DOWN = "Drill Down";
  68. RV_RES.RV_DRILL_DEFAULT = "Default";
  69. RV_RES.RV_NEW = "New";
  70. RV_RES.RV_GO_TO = "Go To";
  71. RV_RES.RV_MORE = "Related Links...";
  72. RV_RES.RV_SEARCH = "Search...";
  73. RV_RES.RV_DOWNLOAD_CHART = "Download Chart";
  74. RV_RES.RV_ALERT_NEW_VERSION = "Alert Me About New Versions";
  75. RV_RES.RV_DO_NOT_ALERT_NEW_VERSION = "Do Not Alert Me About New Versions";
  76. RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM = "You will no longer be alerted when new versions of this report become available.";
  77. RV_RES.RV_NEW_WATCH_RULE = "Alert Using New Watch Rule...";
  78. RV_RES.RV_NO_WATCH_RULES = "No entries";
  79. RV_RES.RV_MODIFY_WATCH_RULE = "Modify...";
  80. RV_RES.RV_DELETE_WATCH_RULE = "Delete";
  81. RV_RES.RV_CONFIRM_DELETE_WATCH_RULE = "Are you sure you want to delete this entry?";
  82. RV_RES.GOTO_LOADING = "Loading...";
  83. RV_RES.GOTO_WORKING = "Working.";
  84. RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE = "Add to My Folders dialog";
  85. RV_RES.RV_VIEW_RECENT_REPORT = "View the most recent report";
  86. RV_RES.RV_RUN_REPORT = "Run the report";
  87. RV_RES.RV_VIEW_REPORT = "View the report version";
  88. RV_RES.RV_NEW_COMMENT = "Add a comment...";
  89. RV_RES.RV_VIEW_COMMENT_NAME = "Name:";
  90. RV_RES.RV_VIEW_COMMENT_CONTENTS = "Comment:";
  91. RV_RES.RV_VIEW_COMMENT_MODTIME = "Modification Time:";
  92. RV_RES.RV_VIEW_COMMENT_OWNER = "Owner:";
  93. RV_RES.RV_VIEW_COMMENT = "View";
  94. RV_RES.RV_ABOUT_DESCRIPTION = "About IBM Cognos Viewer";
  95. RV_RES.RV_LINEAGE = "Lineage";
  96. RV_RES.RV_GLOSSARY = "Glossary";
  97. RV_RES.IDS_JS_CALCULATE = "Calculate";
  98. RV_RES.IDS_JS_CALCULATION = "Calculation";
  99. RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE = "% Difference";
  100. RV_RES.IDS_JS_CALCULATE_NUMBER = "number";
  101. RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_TITLE = "Enter the number";
  102. RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_DESCRIPTION = "Specify the number to use in the calculation '{0}'";
  103. RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER = "Number:";
  104. RV_RES.IDS_JS_SORT = "Sort";
  105. RV_RES.IDS_JS_DONT_SORT = "Don't Sort";
  106. RV_RES.IDS_JS_NOT_SORTED = "Not Sorted";
  107. RV_RES.IDS_JS_SORT_ASCENDING = "Sort Ascending";
  108. RV_RES.IDS_JS_SORT_DESCENDING = "Sort Descending";
  109. RV_RES.IDS_JS_SORT_BY_ASCENDING = "Ascending";
  110. RV_RES.IDS_JS_SORT_BY_DESCENDING = "Descending";
  111. RV_RES.IDS_JS_SORT_BY_LABEL = "Sort By Label";
  112. RV_RES.IDS_JS_SORT_BY_VALUE = "Sort By Value";
  113. RV_RES.IDS_JS_SORT_APPLIED = "Sort applied";
  114. RV_RES.IDS_JS_SORTED_BY_LABEL = "Sorted by label";
  115. RV_RES.IDS_JS_SORTED_BY_VALUE = "Sorted by value";
  116. RV_RES.IDS_JS_SORT_ASCENDING_ORDER = "ascending";
  117. RV_RES.IDS_JS_SORT_DESCENDING_ORDER = "descending";
  118. RV_RES.IDS_JS_FILTER = "Filter";
  119. RV_RES.IDS_JS_REMOVE_FILTER = "Remove Filter";
  120. RV_RES.IDS_JS_FILTER_INCLUDE = "Include {0}";
  121. RV_RES.IDS_JS_FILTER_EXCLUDE = "Exclude {0}";
  122. RV_RES.IDS_JS_FILTER_GREATER_THAN = ">";
  123. RV_RES.IDS_JS_FILTER_LESS_THAN = "<";
  124. RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL = "≥";
  125. RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL = "≤";
  126. RV_RES.IDS_JS_FILTER_BETWEEN = "Between {0} and {1}";
  127. RV_RES.IDS_JS_FILTER_NOT_BETWEEN = "Not between {0} and {1}";
  128. RV_RES.IDS_JS_FILTER_ENDS_WITH = "ends with";
  129. RV_RES.IDS_JS_FILTER_BEGINS_WITH = "starts with";
  130. RV_RES.IDS_JS_FILTER_CONTAINS = "contains";
  131. RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER = "matches SQL pattern";
  132. RV_RES.IDS_JS_FILTER_IS_NOT = "not";
  133. RV_RES.IDS_JS_FILTER_APPLIED = "Filter applied";
  134. RV_RES.IDS_JS_REMOVE_FILTER_FOR = "Remove filter for";
  135. RV_RES.IDS_JS_REMOVE_ALL_FILTERS = "Remove all filters";
  136. RV_RES.IDS_JS_REMOVE_ALL_FILTERS_FOR_WIDGET = "Remove all filters for this widget";
  137. RV_RES.IDS_JS_DELETE = "Delete";
  138. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE = "Change Display Type";
  139. RV_RES.IDS_JS_ANNOTATIONS = "Comments";
  140. RV_RES.IDS_JS_ANNOTATION = "Comment";
  141. RV_RES.IDS_JS_ANNOTATION_WIDGET = "Comment Widget";
  142. RV_RES.IDS_JS_ANNOTATION_NEW = "Add";
  143. RV_RES.IDS_JS_ANNOTATION_EDIT = "Edit Last";
  144. RV_RES.IDS_JS_ANNOTATION_DELETE = "Delete Last";
  145. RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW = "Add";
  146. RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT = "Edit Last";
  147. RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE = "Delete Last";
  148. RV_RES.IDS_JS_GROUP_UNGROUP = "Group / Ungroup";
  149. RV_RES.IDS_JS_SWAP_ROWS_AND_COLUMNS = "Swap Rows and Columns";
  150. RV_RES.IDS_JS_MODAL_BACK_IFRAME = "Empty frame";
  151. RV_RES.IDS_JS_EMPTY_CELL = "Empty cell";
  152. RV_RES.IDS_JS_NO_ENABLED_MENU_ITEMS = "No active links in the opened menu.";
  153. RV_RES.IDS_JS_CHANGE_PALETTE = "Change Color Palette";
  154. RV_RES.IDS_JS_SELECTION_FILTER_SWITCH = "Turn on Master filter";
  155. RV_RES.IDS_JS_SELECTION_FILTER_SWITCH_DISABLE = "Turn off Master filter";
  156. RV_RES.IDS_JS_UNDO = "Undo";
  157. RV_RES.IDS_JS_REDO = "Redo";
  158. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_BAR = "Bar Chart";
  159. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_COLUMN = "Column Chart";
  160. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LINE = "Line Chart";
  161. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE = "Pie Chart";
  162. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB = "Crosstab";
  163. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST = "List Table";
  164. RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE = "More...";
  165. RV_RES.IDS_JS_CHANGE_DISPLAY_RECOMMENDED = "Recommended";
  166. RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT = "includes {0}";
  167. RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT = "excludes {0}";
  168. RV_RES.IDS_JS_INFOBAR_AND_TEXT = "and";
  169. RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT = "between {0} and {1}";
  170. RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT = "not between {0} and {1}";
  171. RV_RES.IDS_JS_INFOBAR_EXPAND = "Expand";
  172. RV_RES.IDS_JS_INFOBAR_COLLAPSE = "Collapse";
  173. RV_RES.IDS_JS_INFOBAR_ITEM_COUNT = "{0} of {1}";
  174. RV_RES.IDS_JS_INFOBAR_EXPLANATION = "Use the up and down arrow keys to review the filters and sorts applied to the report. You can remove sorts and filters with the delete key.";
  175. RV_RES.IDS_JS_INFOBAR_LOCKED = "cannot be deleted";
  176. RV_RES.IDS_JS_INFOBAR_PROMPT = "Prompt details";
  177. RV_RES.IDS_JS_INFOBAR_SLIDER = "Slider filter";
  178. RV_RES.IDS_JS_ANNO_INFOBAR_SHOW = "Show";
  179. RV_RES.IDS_JS_ANNO_INFOBAR_HIDE = "Hide";
  180. RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION = "Filter was applied. Hit tab to focus show/hide button.";
  181. RV_RES.IDS_JS_COMMENT_DLG_TITLE = "Add Comment";
  182. RV_RES.IDS_JS_COMMENT_DLG_MESSAGE = "Do you want to save this workspace?";
  183. RV_RES.IDS_JS_COMMENT_DLG_DETAILS = "You must save the workspace to add comments.";
  184. RV_RES.IDS_JS_CHANGE_DISPLAY = "Change Display";
  185. RV_RES.IDS_JS_CHANGE_DISPLAY_SELECT_DATA = "Select data first before changing display";
  186. RV_RES.IDS_JS_ADVANCED_EDITING = "Do More";
  187. RV_RES.IDS_JS_RENAME = "Rename";
  188. RV_RES.IDS_JS_FREEZEROWHEADINGS = "Freeze Row Headings";
  189. RV_RES.IDS_JS_UNFREEZEROWHEADINGS = "Unfreeze Row Headings";
  190. RV_RES.IDS_JS_FREEZECOLUMNHEADINGS = "Freeze Column Headings";
  191. RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS = "Unfreeze Column Headings";
  192. RV_RES.IDS_JS_EXPAND_MEMBER = "Expand";
  193. RV_RES.IDS_JS_COLLAPSE_MEMBER = "Collapse";
  194. RV_RES.IDS_JS_RENAMED_ITEM = "Renamed item";
  195. RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL = "Original label :";
  196. RV_RES.IDS_JS_MOVE = "Move";
  197. RV_RES.IDS_JS_LEFT = "Left";
  198. RV_RES.IDS_JS_RIGHT = "Right";
  199. RV_RES.IDS_JS_CROSSTAB_CORNER = "Crosstab Corner";
  200. RV_RES.IDS_JS_RENAME_LABEL = "Rename type and text";
  201. RV_RES.IDS_JS_LOADING_EDITING_TOOLS = "Loading additional actions";
  202. RV_RES.IDS_JS_DRILL_DOWN_JAWS = "Drill down available.";
  203. RV_RES.IDS_JS_DRILL_UP_JAWS = "Drill up available.";
  204. RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS = "Drill down and up available.";
  205. RV_RES.IDS_JS_DRILL_THROUGH_JAWS = "Drill through available.";
  206. RV_RES.IDS_JS_RESET_TO_ORIGINAL = "Reset";
  207. RV_RES.IDS_JS_WIDGET_PROPERTIES = "Set Properties";
  208. RV_RES.IDS_JS_REPORT_INFO_TITLE = "Info";
  209. RV_RES.IDS_JS_REPORT_INFO_TEXT = "A new version of this report is available.";
  210. RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT = "Get new version";
  211. RV_RES.IDS_JS_VIEW_ALL_SNAPSHOTS = "More...";
  212. RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_TITLE = "Report Versions";
  213. RV_RES.IDS_JS_SNAPSHOTS_LIVE = "Live";
  214. RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_DESC = "Select a different version of this report.";
  215. RV_RES.IDS_JS_MOST_RECENT_SNAPSHOT = "Most Recent";
  216. RV_RES.IDS_JS_LIST_SEPARATOR = ",";
  217. RV_RES.IDS_JS_CHART_IMAGE = "Chart image";
  218. RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE = "Maximum number of rows to show per page (maximum: 1000):";
  219. RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR = "This value is out of range.";
  220. RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD = "Prompt when workspace is opened (prompted reports only)";
  221. RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON = "Enable expand and collapse controls";
  222. RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT = "Retrieve entire report (saved output only)";
  223. RV_RES.IDS_JS_PROPERTY_DRILL_OPTIONS_LABEL = "Drill options:";
  224. RV_RES.IDS_JS_PROPERTY_ADD_SUMMARY_MEMBERS = "Add summary members";
  225. RV_RES.IDS_JS_PROPERTY_BACKWARDS_COMPATIBLE = "Backwards compatible";
  226. RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION = "Location:";
  227. RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE = "Unavailable";
  228. RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION = "Output Version:";
  229. RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE = "Unavailable";
  230. RV_RES.IDS_JS_CALCULATION_SELECT_DATA = "Select data first before calculating";
  231. RV_RES.IDS_JS_PROPERTY_FLASHCHARTS = "Enable chart animation for applicable charts";
  232. RV_RES.IDS_JS_SHOW_REPORT_SPEC = "View report specification";
  233. RV_RES.IDS_JS_ANNOTATION_JAWS = "Comments are available";
  234. RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED = "Label has been renamed";
  235. RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING = "Do you want to reset the widget to the most recent available version?";
  236. RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING_DESC = "Reset replaces the widget content and any changes are lost.";
  237. RV_RES.IDS_JS_CHART_TABLE = "Table";
  238. RV_RES.IDS_JS_CHART_CROSSTAB = "Crosstab";
  239. RV_RES.IDS_JS_CHART_LIST_TABLE = "List Table";
  240. RV_RES.IDS_JS_CHART_COLUMN = "Column";
  241. RV_RES.IDS_JS_CHART_COLUMN_3D = "Column with 3-D Visual Effect";
  242. RV_RES.IDS_JS_CHART_STACKED_COLUMN = "Stacked Column";
  243. RV_RES.IDS_JS_CHART_STACKED_COLUMN_3D = "Stacked Column with 3-D Visual Effect";
  244. RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN = "100% Stacked Column";
  245. RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN_3D = "100% Stacked Column with 3-D Visual Effect";
  246. RV_RES.IDS_JS_CHART_3D_AXIS_COLUMN = "3-D Axis Column";
  247. RV_RES.IDS_JS_CHART_BAR = "Bar";
  248. RV_RES.IDS_JS_CHART_BAR_3D = "Bar with 3-D Visual Effect";
  249. RV_RES.IDS_JS_CHART_STACKED_BAR = "Stacked Bar";
  250. RV_RES.IDS_JS_CHART_STACKED_BAR_3D = "Stacked Bar with 3-D Visual Effect";
  251. RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR = "100% Stacked Bar";
  252. RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR_3D = "100% Stacked Bar with 3-D Visual Effect";
  253. RV_RES.IDS_JS_CHART_LINE = "Line";
  254. RV_RES.IDS_JS_CHART_LINE_WITH_MARKERS = "Line with Markers";
  255. RV_RES.IDS_JS_CHART_LINE_3D = "Line with 3-D Visual Effect";
  256. RV_RES.IDS_JS_CHART_LINE_WITH_3D_MARKERS = "Line with 3-D Visual Effect Markers";
  257. RV_RES.IDS_JS_CHART_STEP_LINE_MARKERS = "Step Line with Markers";
  258. RV_RES.IDS_JS_CHART_STEP_LINE = "Step Line";
  259. RV_RES.IDS_JS_CHART_STEP_LINE_3D = "Step Line with 3-D Visual Effect";
  260. RV_RES.IDS_JS_CHART_STACKED_LINE_MARKERS = "Stacked Line with Markers";
  261. RV_RES.IDS_JS_CHART_STACKED_LINE = "Stacked Line";
  262. RV_RES.IDS_JS_CHART_STACKED_LINE_3D = "Stacked Line with 3-D Visual Effect";
  263. RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE_MARKERS = "100% Stacked Line with Markers";
  264. RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE = "100% Stacked Line";
  265. RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE__3D = "100% Stacked Line with 3-D Visual Effect";
  266. RV_RES.IDS_JS_CHART_3D_AXIS_LINE = "3-D Axis Line";
  267. RV_RES.IDS_JS_CHART_PIE_DONUT = "Pie, Donut";
  268. RV_RES.IDS_JS_CHART_PIE = "Pie";
  269. RV_RES.IDS_JS_CHART_DONUT = "Donut";
  270. RV_RES.IDS_JS_CHART_PIE_3D = "Pie with 3-D Visual Effect";
  271. RV_RES.IDS_JS_CHART_DONUT_3D = "Donut with 3-D Visual Effect";
  272. RV_RES.IDS_JS_CHART_AREA = "Area";
  273. RV_RES.IDS_JS_CHART_AREA_3D = "Area with 3-D Visual Effect";
  274. RV_RES.IDS_JS_CHART_STACKED_AREA = "Stacked Area";
  275. RV_RES.IDS_JS_CHART_STACKED_AREA_3D = "Stacked Area with 3-D Visual Effect";
  276. RV_RES.IDS_JS_CHART_PERCENT_AREA = "100% Stacked Area";
  277. RV_RES.IDS_JS_CHART_PERCENT_AREA_3D = "100% Stacked Area with 3-D Visual Effect";
  278. RV_RES.IDS_JS_CHART_3D_AXIS_AREA = "3-D Axis Area";
  279. RV_RES.IDS_JS_CHART_SCATTER_BUBBLE_POINT = "Scatter, Bubble, Point";
  280. RV_RES.IDS_JS_CHART_SCATTER = "Scatter";
  281. RV_RES.IDS_JS_CHART_BUBBLE = "Bubble";
  282. RV_RES.IDS_JS_CHART_BUBBLE_3D = "Bubble with 3-D Visual Effect";
  283. RV_RES.IDS_JS_CHART_BUBBLE_WITH_EXCEL_BUBBLE_SIZING = "Bubble with Excel Bubble Sizing";
  284. RV_RES.IDS_JS_CHART_POINT = "Point";
  285. RV_RES.IDS_JS_CHART_POINT_3D = "Point with 3-D Markers";
  286. RV_RES.IDS_JS_CHART_3D_SCATTER = "3-D Scatter";
  287. RV_RES.IDS_JS_CHART_GAUGE = "Gauge";
  288. RV_RES.IDS_JS_CHART_DIAL_GAUGE = "Dial Gauge";
  289. RV_RES.IDS_BROWSER_SUPPORT_ERROR = "The content cannot be displayed in the current web browser. Try using another web browser.";
  290. RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR = "The content cannot be saved. You do not have sufficient privileges.";
  291. RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR = "Cannot load annotations. The widget or workspace was deleted after this workspace was opened.";
  292. RV_RES.IDS_JS_NULL = "Null";
  293. RV_RES.IDS_JS_GLOBAL_PROMPTS_NOT_RESPONDING_WARNING = "To prevent unexpected results, this widget is not currently responding to prompts.\n\nSet the prompts you want this widget to respond to using the Listen for Widget Events.";
  294. RV_RES.IDS_JS_WAIT_PAGE_LOADING = "Loading...";
  295. RV_RES.IDS_JS_ERROR = "Error";
  296. RV_RES.IDS_JS_READY = "Ready";
  297. RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Report";
  298. RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Active Report";
  299. RV_RES.IDS_CONV_CANCELED_ERROR = "Cannot complete your request.";
  300. RV_RES.IDS_JS_CLIPBOARD = "Clipboard";
  301. RV_RES.IDS_JS_NO_SAVED_OUTPUTS = "There are no available saved report output versions.";
  302. RV_RES.UNAVAILABLE = "Unavailable";
  303. RV_RES.IDS_PROP_LEGAL = "Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation and other(s) 2001, 2016. IBM, the IBM logo, ibm.com and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. A current list of IBM trademarks is available on the Web at www.ibm.com/legal/copytrade.shtml. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Other product and service names might be trademarks of IBM or other companies. This Program is licensed under the terms of the license agreement accompanying the Program. This license agreement may be either located in a Program directory folder or library identified as \"License\" or \"Non_IBM_License\", if applicable, or provided as a printed license agreement. Please read the agreement carefully before using the Program. By using the Program you agree to these terms.";
  304. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TITLE = "Business Processes";
  305. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_DESC = "Select a process:";
  306. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TABLE_HEADER = "Process";
  307. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_START_BUTTON_LABEL = "Start";
  308. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS = "None";
  309. RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS_A11Y = "No process is available";
  310. RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_LINK_LABEL = "View input values";
  311. RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_DESCRIPTION = "Input values:";
  312. RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DATA_ITEM = "Data item";
  313. RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DISPLAY_VALUE_HEADER = "Display value";
  314. RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_NO_INPUT_VALUE_MSG = "No input value selected";
  315. RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG = "The process, {0}, failed to start.";
  316. RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG = "The process, {0}, started successfully.";
  317. RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_DETAIL = "To view the status of the process, open your business process application.";
  318. RV_RES.IDS_JS_BUSINESS_PROCESS_GET_PROCESSES_FAIL_MSG = "An error had occured while trying to get processes.";
  319. RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_TITLE = "Start process";
  320. RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_A11Y_DESC_VALUE = "value";
  321. RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_WITH_NO_BUA = "Some data referenced in the report no longer exists. Contact the report author.";
  322. RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_FOR_SPEC_PARAM = "Some data referenced in the report no longer exists. The affected report areas are report specification and parameter value. Click Edit to update the referenced data now. You can also click Close to dismiss this message.";
  323. RV_RES.IDS_JS_EDIT = "Edit";
  324. RV_RES.IDS_JS_CLOSE = "Close";
  325. RV_RES.IDS_JS_ERROR_INVALID_INT = "Page number provided is not a positive integer.";
  326. RV_RES.IDS_JS_ERROR_REPORT_NOT_COMPLETE = "Report status is not complete.";
  327. RV_RES.IDS_JS_ERROR_INVALID_PAGE_RANGE = "Page range is invalid.";
  328. RV_RES.IDS_JS_CWA_DIALOG_TITLE = "Report - Design";
  329. RV_RES.IDS_JS_SAVE_AS_FDG_TITLE = "Save As";
  330. RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS = "Filter applied to related widgets.";
  331. RV_RES.IDS_JS_A11Y_DYNAMIC_MENU = "Dynamic menu";
  332. function CViewerHelper(){
  333. this.m_oCV=null;
  334. };
  335. CViewerHelper.prototype.getCVObjectRef=function(){
  336. return this.getCV().getObjectId();
  337. };
  338. CViewerHelper.prototype.getCV=function(){
  339. if(this.m_oCV){
  340. return this.m_oCV;
  341. }
  342. return window;
  343. };
  344. CViewerHelper.prototype.getCVId=function(){
  345. var _1="";
  346. if(this.m_oCV){
  347. _1=this.m_oCV.getId();
  348. }
  349. return _1;
  350. };
  351. CViewerHelper.prototype.setCV=function(_2){
  352. this.m_oCV=_2;
  353. };
  354. function CObserver(_3){
  355. this.m_subject=_3;
  356. this.m_observers=[];
  357. };
  358. function CObserver_attach(_4,_5,_6){
  359. if(_4==null||typeof _4.update!="function"){
  360. alert("Notification Frame Work Error : attach failed");
  361. return false;
  362. }
  363. var _7=new CState(this.m_subject,_4,_5?_5:null,_6?_6:null);
  364. this.m_observers[this.m_observers.length]=_7;
  365. return true;
  366. };
  367. function CObserver_detach(_8){
  368. };
  369. function CObserver_hasObserver(_9){
  370. var _a=false;
  371. for(var _b=0;_b<this.m_observers.length;_b++){
  372. if(this.m_observers[_b].getObserver()==_9){
  373. _a=true;
  374. break;
  375. }
  376. }
  377. return _a;
  378. };
  379. function CObserver_notify(_c){
  380. var i=0;
  381. if(typeof _c!="undefined"&&_c!=null){
  382. for(i=0;i<this.m_observers.length;++i){
  383. if(this.m_observers[i].getEvt()==_c){
  384. var _e=this.m_observers[i].getObserver();
  385. var _f=this.m_observers[i].getCallback();
  386. var _10=_e.update;
  387. _e.update=_f;
  388. _e.update(this.m_observers[i]);
  389. _e.update=_10;
  390. }
  391. }
  392. }else{
  393. for(i=0;i<this.m_observers.length;++i){
  394. this.m_observers[i].getObserver().update(this.m_observers[i].getSubject());
  395. }
  396. }
  397. };
  398. CObserver.prototype.attach=CObserver_attach;
  399. CObserver.prototype.detach=CObserver_detach;
  400. CObserver.prototype.notify=CObserver_notify;
  401. CObserver.prototype.hasObserver=CObserver_hasObserver;
  402. function CState(_11,_12,_13,evt){
  403. this.m_subject=_11;
  404. this.m_observer=_12;
  405. this.m_callback=_13;
  406. this.m_evt=evt;
  407. };
  408. function CState_getObserver(){
  409. return this.m_observer;
  410. };
  411. function CState_getCallback(){
  412. return this.m_callback;
  413. };
  414. function CState_getSubject(){
  415. return this.m_subject;
  416. };
  417. function CState_getEvt(){
  418. return this.m_evt;
  419. };
  420. CState.prototype.getObserver=CState_getObserver;
  421. CState.prototype.getCallback=CState_getCallback;
  422. CState.prototype.getSubject=CState_getSubject;
  423. CState.prototype.getEvt=CState_getEvt;
  424. function CParameterValueStringOperators(_15,_16,_17,_18){
  425. this.m_sBetween=_15;
  426. this.m_sNotBetween=_16;
  427. this.m_sLessThan=_17;
  428. this.m_sGreaterThan=_18;
  429. };
  430. function CParameterValues(){
  431. this.m_parameterValues=new CDictionary();
  432. };
  433. CParameterValues.prototype.length=function(){
  434. var _19=this.m_parameterValues.keys();
  435. if(typeof _19=="undefined"||_19==null){
  436. return 0;
  437. }
  438. return _19.length;
  439. };
  440. CParameterValues.prototype.getParameterValue=function(_1a){
  441. if(typeof _1a!="string"||_1a==""){
  442. return null;
  443. }
  444. if(this.m_parameterValues.exists(_1a)){
  445. return this.m_parameterValues.get(_1a);
  446. }
  447. return null;
  448. };
  449. CParameterValues.prototype.getAt=function(_1b){
  450. if(_1b<this.length()){
  451. var _1c=this.m_parameterValues.keys();
  452. if(this.m_parameterValues.exists(_1c[_1b])){
  453. return this.m_parameterValues.get(_1c[_1b]);
  454. }
  455. }
  456. return null;
  457. };
  458. CParameterValues.prototype.addParameterValue=function(_1d,_1e){
  459. var _1f=this.getParameterValue(_1d);
  460. if(_1f==null){
  461. _1f=new CParameterValue();
  462. _1f.setName(_1d);
  463. }
  464. _1f.addParmValueItem(_1e);
  465. this.m_parameterValues.add(_1d,_1f);
  466. };
  467. CParameterValues.prototype.removeParameterValue=function(_20){
  468. return (this.m_parameterValues.remove(_20)!=null);
  469. };
  470. CParameterValues.prototype.removeSimpleParmValueItem=function(_21,_22){
  471. var _23=this.getParameterValue(_21);
  472. if(_23==null){
  473. return false;
  474. }
  475. return _23.removeSimpleParmValueItem(_22);
  476. };
  477. CParameterValues.prototype.addSimpleParmValueItem=function(_24,_25,_26,_27){
  478. if(typeof _24!="string"||_24==""){
  479. return null;
  480. }
  481. if(typeof _25!="string"||_25==""){
  482. return null;
  483. }
  484. if(typeof _26!="string"){
  485. return null;
  486. }
  487. if(typeof _27!="string"||(_27!="false"&&_27!="true")){
  488. return null;
  489. }
  490. var _28=null;
  491. if(this.m_parameterValues.exists(_24)==false){
  492. _28=new CParameterValue(_24);
  493. this.m_parameterValues.add(_24,_28);
  494. }
  495. _28=this.m_parameterValues.get(_24);
  496. if(typeof _28=="undefined"||_28==null){
  497. return null;
  498. }
  499. var _29=_28.getParmValueItems();
  500. for(var _2a=0;_2a<_29.length;++_2a){
  501. var _2b=_29[_2a];
  502. if(_2b.getDisplayValue()==_26&&_2b.getUseValue()==_25){
  503. return;
  504. }
  505. }
  506. return _28.addSimpleParmValueItem(_25,_26,_27);
  507. };
  508. CParameterValues.prototype.getSimpleParmValueItem=function(_2c,_2d){
  509. var _2e=this.getParameterValue(_2c);
  510. if(_2e!=null){
  511. return _2e.getSimpleParmValueItem(_2d);
  512. }
  513. return null;
  514. };
  515. CParameterValues.prototype.load=function(_2f){
  516. return this.loadWithOptions(_2f,true);
  517. };
  518. CParameterValues.prototype.loadWithOptions=function(_30,_31){
  519. try{
  520. var _32=_30.childNodes;
  521. for(var _33=0;_33<_32.length;++_33){
  522. var _34=_32[_33];
  523. if(_34.nodeType==3){
  524. continue;
  525. }
  526. var _35=new CParameterValue();
  527. if(_35.load(_34)){
  528. var _36=_35.name();
  529. if(_36!=""){
  530. if(_31==true||_36.indexOf("credential:")!=0){
  531. this.m_parameterValues.add(_36,_35);
  532. }
  533. }
  534. }else{
  535. delete _35;
  536. }
  537. }
  538. }
  539. catch(e){
  540. return false;
  541. }
  542. return true;
  543. };
  544. CParameterValues.prototype.buildXML=function(_37,_38,_39){
  545. var _3a=_38.createElement(_39);
  546. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
  547. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
  548. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
  549. _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");
  550. _37.XMLBuilderSetAttributeNodeNS(_3a,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
  551. _37.XMLBuilderSetAttributeNodeNS(_3a,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  552. _38.documentElement.appendChild(_3a);
  553. var _3b=this.m_parameterValues.keys();
  554. for(var _3c=0;_3c<_3b.length;++_3c){
  555. if(this.m_parameterValues.exists(_3b[_3c])){
  556. var _3d=this.m_parameterValues.get(_3b[_3c]);
  557. _3d.generateXML(_37,_3a);
  558. }
  559. }
  560. return _3a;
  561. };
  562. CParameterValues.prototype.generateXML=function(_3e,_3f,_40){
  563. var _41="parameterValues";
  564. if(typeof _40!="undefined"&&_40!=null){
  565. _41=_40;
  566. }
  567. XMLBuilderSerializeNode(this.buildXML(_3e,_3f,_41));
  568. return XMLBuilderSerializeNode(_3f);
  569. };
  570. function CParameterValue(_42){
  571. this.m_name=_42;
  572. this.m_parmValueItems=[];
  573. };
  574. CParameterValue.prototype.name=function(){
  575. return this.m_name;
  576. };
  577. CParameterValue.prototype.setName=function(_43){
  578. this.m_name=_43;
  579. };
  580. CParameterValue.prototype.getParmValueItems=function(){
  581. return this.m_parmValueItems;
  582. };
  583. CParameterValue.prototype.length=function(){
  584. return this.m_parmValueItems.length;
  585. };
  586. CParameterValue.prototype.addParmValueItem=function(_44){
  587. this.m_parmValueItems.push(_44);
  588. };
  589. CParameterValue.prototype.addSimpleParmValueItem=function(_45,_46,_47){
  590. if(typeof _45!="string"||_45==""){
  591. return null;
  592. }
  593. if(typeof _46!="string"){
  594. return null;
  595. }
  596. if(typeof _47!="string"||(_47!="false"&&_47!="true")){
  597. return null;
  598. }
  599. var _48=new CSimpleParmValueItem(_45,_46,_47);
  600. this.m_parmValueItems.push(_48);
  601. return _48;
  602. };
  603. CParameterValue.prototype.removeSimpleParmValueItem=function(_49){
  604. if(typeof _49!="string"||_49==""){
  605. return false;
  606. }
  607. var _4a=[];
  608. var _4b=false;
  609. for(var _4c=0;_4c<this.length();++_4c){
  610. var _4d=this.m_parmValueItems[_4c];
  611. if(_4d instanceof CSimpleParmValueItem){
  612. if(_4d.getUseValue()==_49){
  613. _4b=true;
  614. continue;
  615. }
  616. }
  617. _4a.push(_4d);
  618. }
  619. this.m_parmValueItems=_4a;
  620. return _4b;
  621. };
  622. CParameterValue.prototype.getSimpleParmValueItem=function(_4e){
  623. if(typeof _4e!="string"||_4e==""){
  624. return null;
  625. }
  626. for(var _4f=0;_4f<this.length();++_4f){
  627. var _50=this.m_parmValueItems[_4f];
  628. if(_50 instanceof CSimpleParmValueItem){
  629. if(_50.getUseValue()==_4e){
  630. return _50;
  631. }
  632. }
  633. }
  634. return null;
  635. };
  636. CParameterValue.prototype.load=function(_51){
  637. var _52=_51.getAttributeNode("xsi:type");
  638. if(_52==null||_52.nodeValue!="bus:parameterValue"){
  639. return false;
  640. }
  641. var _53=XMLHelper_FindChildByTagName(_51,"name",false);
  642. if(_53==null){
  643. return false;
  644. }
  645. this.m_name=XMLHelper_GetText(_53);
  646. if(this.m_name==""){
  647. return false;
  648. }
  649. var _54=XMLHelper_FindChildByTagName(_51,"value",false);
  650. if(_54==null){
  651. return false;
  652. }
  653. var _55=_54.getAttributeNode("xsi:type");
  654. if(_55==null||_55.nodeValue!="SOAP-ENC:Array"){
  655. return false;
  656. }
  657. var _56=_54.getAttributeNode("SOAP-ENC:arrayType");
  658. if(_56==null||_56.nodeValue.indexOf("bus:parmValueItem[")==-1){
  659. return false;
  660. }
  661. var _57=_54.childNodes;
  662. for(var _58=0;_58<_57.length;++_58){
  663. var _59=_57[_58];
  664. if(_59.nodeType==3){
  665. continue;
  666. }
  667. var _5a=_59.getAttributeNode("xsi:type");
  668. if(_5a!=null){
  669. var _5b;
  670. var _5c;
  671. switch(_5a.nodeValue){
  672. case "bus:simpleParmValueItem":
  673. _5b=new CSimpleParmValueItem("","","");
  674. break;
  675. case "bus:boundRangeParmValueItem":
  676. _5b=new CBoundRangeParmValueItem();
  677. break;
  678. case "bus:unboundedEndRangeParmValueItem":
  679. _5b=new CUnboundedEndRangeParmValueItem();
  680. break;
  681. case "bus:unboundedStartRangeParmValueItem":
  682. _5b=new CUnboundedStartRangeParmValueItem();
  683. break;
  684. case "bus:hierarchicalParmValueItem":
  685. _5b=new CHierarchicalParmValueItem();
  686. break;
  687. default:
  688. return false;
  689. }
  690. _5c=_5b.load(_59);
  691. if(_5c){
  692. this.m_parmValueItems.push(_5b);
  693. }else{
  694. delete _5b;
  695. }
  696. }
  697. }
  698. return true;
  699. };
  700. CParameterValue.prototype.generateXML=function(_5d,_5e){
  701. var _5f=_5e.ownerDocument;
  702. var _60=_5f.createElement("item");
  703. _5d.XMLBuilderSetAttributeNodeNS(_60,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
  704. _5e.appendChild(_60);
  705. var _61=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_5f);
  706. _5d.XMLBuilderSetAttributeNodeNS(_61,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  707. _61.appendChild(_5f.createTextNode(this.m_name));
  708. _60.appendChild(_61);
  709. var _62=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_5f);
  710. _5d.XMLBuilderSetAttributeNodeNS(_62,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  711. _5d.XMLBuilderSetAttributeNodeNS(_62,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  712. _60.appendChild(_62);
  713. for(var _63=0;_63<this.m_parmValueItems.length;++_63){
  714. if(typeof this.m_parmValueItems[_63].generateXML!="undefined"){
  715. this.m_parmValueItems[_63].generateXML(_5d,_62);
  716. }
  717. }
  718. };
  719. CParameterValue.prototype.toString=function(_64){
  720. var _65="";
  721. for(var _66=0;_66<this.m_parmValueItems.length;++_66){
  722. if(_65!=""){
  723. _65+=", ";
  724. }
  725. if(typeof this.m_parmValueItems[_66].toString!="undefined"){
  726. _65+=this.m_parmValueItems[_66].toString(_64);
  727. }
  728. }
  729. return _65;
  730. };
  731. function CParmValueItem(){
  732. this.initialize("true");
  733. };
  734. CParmValueItem.prototype.getInclusiveValue=function(){
  735. return this.m_inclusiveValue;
  736. };
  737. CParmValueItem.prototype.setInclusiveValue=function(_67){
  738. this.m_inclusiveValue=_67;
  739. };
  740. CParmValueItem.prototype.initialize=function(_68){
  741. this.m_inclusiveValue=_68;
  742. };
  743. CParmValueItem.prototype.load=function(_69){
  744. this.m_inclusiveValue="true";
  745. var _6a=XMLHelper_FindChildByTagName(_69,"inclusive",false);
  746. if(_6a!=null){
  747. var _6b=XMLHelper_GetText(_6a);
  748. if(_6b=="true"||_6b=="false"){
  749. this.m_inclusiveValue=_6b;
  750. }
  751. }
  752. };
  753. CParmValueItem.prototype.generateXML=function(_6c,_6d){
  754. var _6e=_6d.ownerDocument;
  755. var _6f=_6c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:inclusive",_6e);
  756. _6c.XMLBuilderSetAttributeNodeNS(_6f,"xsi:type","xs:boolean","http://www.w3.org/2001/XMLSchema-instance");
  757. _6f.appendChild(_6e.createTextNode(this.m_inclusiveValue));
  758. _6d.appendChild(_6f);
  759. };
  760. function CSimpleParmValueItem(_70,_71,_72){
  761. CSimpleParmValueItem.baseclass.initialize.call(this,_72);
  762. this.m_useValue=_70;
  763. this.m_displayValue=_71;
  764. };
  765. CSimpleParmValueItem.prototype=new CParmValueItem();
  766. CSimpleParmValueItem.prototype.constructor=CSimpleParmValueItem;
  767. CSimpleParmValueItem.baseclass=CParmValueItem.prototype;
  768. CSimpleParmValueItem.prototype.getUseValue=function(){
  769. return this.m_useValue;
  770. };
  771. CSimpleParmValueItem.prototype.getDisplayValue=function(){
  772. return this.m_displayValue;
  773. };
  774. CSimpleParmValueItem.prototype.getParmValueItem=function(){
  775. return this.m_parmValueItem;
  776. };
  777. CSimpleParmValueItem.prototype.setDisplayValue=function(_73){
  778. this.m_displayValue=_73;
  779. };
  780. CSimpleParmValueItem.prototype.setUseValue=function(_74){
  781. this.m_useValue=_74;
  782. };
  783. CSimpleParmValueItem.prototype.toString=function(_75){
  784. return this.getDisplayValue();
  785. };
  786. CSimpleParmValueItem.prototype.load=function(_76){
  787. CSimpleParmValueItem.baseclass.load.call(this,_76);
  788. var _77=XMLHelper_FindChildByTagName(_76,"use",false);
  789. if(_77==null){
  790. return false;
  791. }
  792. var _78=XMLHelper_GetText(_77);
  793. if(_78==""){
  794. return false;
  795. }
  796. this.m_useValue=_78;
  797. var _79=XMLHelper_FindChildByTagName(_76,"display",false);
  798. if(_79!=null){
  799. this.m_displayValue=XMLHelper_GetText(_79);
  800. }
  801. return true;
  802. };
  803. CSimpleParmValueItem.prototype.generateXML=function(_7a,_7b){
  804. var _7c=_7b.ownerDocument;
  805. var _7d=_7c.createElement("item");
  806. _7a.XMLBuilderSetAttributeNodeNS(_7d,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  807. _7b.appendChild(_7d);
  808. CSimpleParmValueItem.baseclass.generateXML.call(this,_7a,_7d);
  809. var _7e=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7c);
  810. _7a.XMLBuilderSetAttributeNodeNS(_7e,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  811. _7e.appendChild(_7c.createTextNode(this.m_useValue));
  812. _7d.appendChild(_7e);
  813. var _7f=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7c);
  814. _7a.XMLBuilderSetAttributeNodeNS(_7f,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
  815. _7f.appendChild(_7c.createTextNode(this.m_displayValue));
  816. _7d.appendChild(_7f);
  817. };
  818. function CBoundRangeParmValueItem(){
  819. CBoundRangeParmValueItem.baseclass.initialize.call(this,"true");
  820. this.m_start=null;
  821. this.m_end=null;
  822. };
  823. CBoundRangeParmValueItem.prototype=new CParmValueItem();
  824. CBoundRangeParmValueItem.prototype.constructor=CBoundRangeParmValueItem;
  825. CBoundRangeParmValueItem.baseclass=CParmValueItem.prototype;
  826. CBoundRangeParmValueItem.prototype.setStart=function(_80){
  827. this.m_start=_80;
  828. };
  829. CBoundRangeParmValueItem.prototype.getStart=function(){
  830. return this.m_start;
  831. };
  832. CBoundRangeParmValueItem.prototype.setEnd=function(end){
  833. this.m_end=end;
  834. };
  835. CBoundRangeParmValueItem.prototype.getEnd=function(){
  836. return this.m_end;
  837. };
  838. CBoundRangeParmValueItem.prototype.toString=function(_82){
  839. return CViewerCommon.getMessage(_82.m_sBetween,[this.m_start.getDisplayValue(),this.m_end.getDisplayValue()]);
  840. };
  841. CBoundRangeParmValueItem.prototype.load=function(_83){
  842. CBoundRangeParmValueItem.baseclass.load.call(this,_83);
  843. this.m_start=new CSimpleParmValueItem("","","");
  844. this.m_start.load(XMLHelper_FindChildByTagName(_83,"start",false));
  845. this.m_end=new CSimpleParmValueItem("","","");
  846. this.m_end.load(XMLHelper_FindChildByTagName(_83,"end",false));
  847. return true;
  848. };
  849. CBoundRangeParmValueItem.prototype.generateXML=function(_84,_85){
  850. var _86=_85.ownerDocument;
  851. var _87=_86.createElement("item");
  852. _84.XMLBuilderSetAttributeNodeNS(_87,"xsi:type","bus:boundRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  853. _85.appendChild(_87);
  854. CBoundRangeParmValueItem.baseclass.generateXML.call(this,_84,_87);
  855. var _88=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_86);
  856. _87.appendChild(_88);
  857. this.m_start.generateXML(_84,_88);
  858. var _89=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_86);
  859. _87.appendChild(_89);
  860. this.m_end.generateXML(_84,_89);
  861. };
  862. function CUnboundedStartRangeParmValueItem(){
  863. CUnboundedStartRangeParmValueItem.baseclass.initialize.call(this,"true");
  864. this.m_end=null;
  865. };
  866. CUnboundedStartRangeParmValueItem.prototype=new CParmValueItem();
  867. CUnboundedStartRangeParmValueItem.prototype.constructor=CUnboundedStartRangeParmValueItem;
  868. CUnboundedStartRangeParmValueItem.baseclass=CParmValueItem.prototype;
  869. CUnboundedStartRangeParmValueItem.prototype.setEnd=function(end){
  870. this.m_end=end;
  871. };
  872. CUnboundedStartRangeParmValueItem.prototype.getEnd=function(){
  873. return this.m_end;
  874. };
  875. CUnboundedStartRangeParmValueItem.prototype.load=function(_8b){
  876. CUnboundedStartRangeParmValueItem.baseclass.load.call(this,_8b);
  877. this.m_end=new CSimpleParmValueItem("","","");
  878. this.m_end.load(XMLHelper_FindChildByTagName(_8b,"end",false));
  879. return true;
  880. };
  881. CUnboundedStartRangeParmValueItem.prototype.generateXML=function(_8c,_8d){
  882. var _8e=_8d.ownerDocument;
  883. var _8f=_8e.createElement("item");
  884. _8c.XMLBuilderSetAttributeNodeNS(_8f,"xsi:type","bus:unboundedStartRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  885. _8d.appendChild(_8f);
  886. CUnboundedStartRangeParmValueItem.baseclass.generateXML.call(this,_8c,_8f);
  887. var _90=_8c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_8e);
  888. _8f.appendChild(_90);
  889. this.m_end.generateXML(_8c,_90);
  890. };
  891. CUnboundedStartRangeParmValueItem.prototype.toString=function(_91){
  892. return _91.m_sLessThan+" "+this.m_end.getDisplayValue();
  893. };
  894. function CUnboundedEndRangeParmValueItem(){
  895. CUnboundedEndRangeParmValueItem.baseclass.initialize.call(this,"true");
  896. this.m_start=null;
  897. };
  898. CUnboundedEndRangeParmValueItem.prototype=new CParmValueItem();
  899. CUnboundedEndRangeParmValueItem.prototype.constructor=CUnboundedEndRangeParmValueItem;
  900. CUnboundedEndRangeParmValueItem.baseclass=CParmValueItem.prototype;
  901. CUnboundedEndRangeParmValueItem.prototype.setStart=function(_92){
  902. this.m_start=_92;
  903. };
  904. CUnboundedEndRangeParmValueItem.prototype.getStart=function(){
  905. return this.m_start;
  906. };
  907. CUnboundedEndRangeParmValueItem.prototype.load=function(_93){
  908. CUnboundedEndRangeParmValueItem.baseclass.load.call(this,_93);
  909. this.m_start=new CSimpleParmValueItem("","","");
  910. this.m_start.load(XMLHelper_FindChildByTagName(_93,"start",false));
  911. return true;
  912. };
  913. CUnboundedEndRangeParmValueItem.prototype.generateXML=function(_94,_95){
  914. var _96=_95.ownerDocument;
  915. var _97=_96.createElement("item");
  916. _94.XMLBuilderSetAttributeNodeNS(_97,"xsi:type","bus:unboundedEndRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  917. _95.appendChild(_97);
  918. CUnboundedEndRangeParmValueItem.baseclass.generateXML.call(this,_94,_97);
  919. var _98=_94.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_96);
  920. _97.appendChild(_98);
  921. this.m_start.generateXML(_94,_98);
  922. };
  923. CUnboundedEndRangeParmValueItem.prototype.toString=function(_99){
  924. return _99.m_sGreaterThan+" "+this.m_start.getDisplayValue();
  925. };
  926. function CHierarchicalParmValueItem(){
  927. CHierarchicalParmValueItem.baseclass.initialize.call(this,"true");
  928. this.m_value=null;
  929. this.m_subNodes=[];
  930. };
  931. CHierarchicalParmValueItem.prototype=new CParmValueItem();
  932. CHierarchicalParmValueItem.prototype.constructor=CHierarchicalParmValueItem;
  933. CHierarchicalParmValueItem.baseclass=CParmValueItem.prototype;
  934. CHierarchicalParmValueItem.prototype.getValue=function(){
  935. return this.m_value;
  936. };
  937. CHierarchicalParmValueItem.prototype.getSubNodes=function(){
  938. return this.m_subNodes;
  939. };
  940. CHierarchicalParmValueItem.prototype.setValue=function(_9a){
  941. this.m_value=_9a;
  942. };
  943. CHierarchicalParmValueItem.prototype.setSubNodes=function(_9b){
  944. this.m_subNodes=_9b;
  945. };
  946. CHierarchicalParmValueItem.prototype.load=function(_9c){
  947. CHierarchicalParmValueItem.baseclass.load.call(this,_9c);
  948. this.m_value=new CSimpleParmValueItem("","","");
  949. this.m_value.load(XMLHelper_FindChildByTagName(_9c,"value",false));
  950. var _9d=XMLHelper_FindChildByTagName(_9c,"subNodes",false);
  951. if(_9d==null){
  952. return false;
  953. }
  954. var _9e=_9d.getAttributeNode("xsi:type");
  955. if(_9e==null||_9e.nodeValue!="SOAP-ENC:Array"){
  956. return false;
  957. }
  958. var _9f=_9d.getAttributeNode("SOAP-ENC:arrayType");
  959. if(_9f==null||_9f.nodeValue!="bus:hierarchicalParmValueItem[]"){
  960. return false;
  961. }
  962. var _a0=_9d.childNodes;
  963. for(var _a1=0;_a1<_a0.length;++_a1){
  964. var _a2=new CHierarchicalParmValueItem();
  965. _a2.load(_a0[_a1]);
  966. this.m_subNodes.push(_a2);
  967. }
  968. return true;
  969. };
  970. CHierarchicalParmValueItem.prototype.generateXML=function(_a3,_a4){
  971. var _a5=_a4.ownerDocument;
  972. var _a6=_a5.createElement("item");
  973. _a3.XMLBuilderSetAttributeNodeNS(_a6,"xsi:type","bus:hierarchicalParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
  974. _a4.appendChild(_a6);
  975. CHierarchicalParmValueItem.baseclass.generateXML.call(this,_a3,_a6);
  976. var _a7=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_a5);
  977. _a6.appendChild(_a7);
  978. this.m_value.generateXML(_a3,_a7);
  979. var _a8=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:subNodes",_a5);
  980. _a3.XMLBuilderSetAttributeNodeNS(_a8,"SOAP-ENC:arrayType","bus:hierarchicalParmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
  981. _a3.XMLBuilderSetAttributeNodeNS(_a8,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
  982. _a6.appendChild(_a8);
  983. for(var _a9=0;_a9<this.m_subNodes.length;++_a9){
  984. this.m_subNodes[_a9].generateXML(_a3,_a8);
  985. }
  986. };
  987. CHierarchicalParmValueItem.prototype.toString=function(){
  988. return "";
  989. };
  990. function XMLParser(s,_ab){
  991. if(s==null){
  992. return null;
  993. }
  994. if(/^\s*</.test(s)){
  995. s=s.replace(/^\s*/,"");
  996. if(s.charAt(1)=="/"){
  997. var _ac=new RegExp("^</"+_ab.getName()+"\\s*>","gi");
  998. if(!_ac.test(s)){
  999. alert("invalid XML "+_ab.getName()+"\n"+s);
  1000. return null;
  1001. }
  1002. return XMLParser(s.replace(RegExp.lastMatch,""),_ab.parentNode);
  1003. }else{
  1004. var _ad=/^\s*<([\w:\-_\.]+)/;
  1005. if(_ad.test(s)){
  1006. var _ae=RegExp.$1;
  1007. var e=new XMLElement(_ae,_ab);
  1008. var _b0=new RegExp("^<"+_ae+"[^>]*>");
  1009. s=s.replace(_b0,"");
  1010. var _b1=RegExp.lastMatch;
  1011. var _b2=/([\w:\-_\.]+)="([^"]*)"/gi;
  1012. var _b3=_b1.match(_b2);
  1013. if(_b3!=null){
  1014. for(var i=0;i<_b3.length;i++){
  1015. var _b5=_b3[i];
  1016. (/([\w:\-_\.]+)\s*=\s*"(.*)"/).test(_b5);
  1017. e.setAttribute(RegExp.$1,RegExp.$2);
  1018. }
  1019. }
  1020. if(!(/\/>$/).test(_b1)){
  1021. XMLParser(s,e);
  1022. return e;
  1023. }else{
  1024. XMLParser(s,_ab);
  1025. return e;
  1026. }
  1027. }
  1028. }
  1029. }else{
  1030. if(s&&_ab){
  1031. var _b6=new RegExp("([^<]*)</"+_ab.getName()+"\\s*[^>]*>","gi");
  1032. _b6.test(s);
  1033. var _b7=RegExp.$1;
  1034. _ab.setValue(_b7);
  1035. return (XMLParser(s.replace(_b7,""),_ab));
  1036. }
  1037. }
  1038. return null;
  1039. };
  1040. function XMLElement(s,_b9){
  1041. this.nodeName=s;
  1042. this.nodeValue="";
  1043. this.attributes=[];
  1044. this.childNodes=[];
  1045. this.parentNode=_b9;
  1046. if(this.parentNode){
  1047. this.parentNode.appendChild(this);
  1048. }
  1049. };
  1050. XMLElement.prototype.appendChild=function(e){
  1051. this.childNodes[this.childNodes.length]=e;
  1052. };
  1053. XMLElement.prototype.hasChildNodes=function(){
  1054. if(this.childNodes.length>0){
  1055. return true;
  1056. }else{
  1057. return false;
  1058. }
  1059. };
  1060. XMLElement.prototype.findChildByName=function(n,_bc){
  1061. if(this.getName()==n){
  1062. return (this);
  1063. }
  1064. for(var i=0;i<this.childNodes.length;i++){
  1065. if(this.childNodes[i].getName()==n){
  1066. return this.childNodes[i];
  1067. }
  1068. }
  1069. if(_bc!=false){
  1070. for(i=0;i<this.childNodes.length;i++){
  1071. var _be=this.childNodes[i].findChildByName(n,_bc);
  1072. if(_be){
  1073. return _be;
  1074. }
  1075. }
  1076. }
  1077. return null;
  1078. };
  1079. XMLElement.prototype.findChildWithAttribute=function(_bf,val){
  1080. for(var i=0;i<this.childNodes.length;i++){
  1081. if(this.childNodes[i].getAttribute(_bf)==val){
  1082. return this.childNodes[i];
  1083. }
  1084. }
  1085. return null;
  1086. };
  1087. XMLElement.prototype.getElementsByTagName=function(s,_c3){
  1088. var a=[];
  1089. for(var i=0;i<this.childNodes.length;i++){
  1090. if(this.childNodes[i].getName()==s){
  1091. a[a.length]=this.childNodes[i];
  1092. }
  1093. }
  1094. if(_c3!=false){
  1095. for(i=0;i<this.childNodes.length;i++){
  1096. var _c6=this.childNodes[i].getElementsByTagName(s);
  1097. for(var j=0;j<_c6.length;j++){
  1098. a[a.length]=_c6[j];
  1099. }
  1100. }
  1101. }
  1102. return a;
  1103. };
  1104. XMLElement.prototype.getName=function(){
  1105. return this.nodeName;
  1106. };
  1107. XMLElement.prototype.getValue=function(){
  1108. return this.nodeValue;
  1109. };
  1110. XMLElement.prototype.setAttribute=function(a,v){
  1111. this.attributes["_"+a]=v;
  1112. };
  1113. XMLElement.prototype.setValue=function(v){
  1114. this.nodeValue=v;
  1115. };
  1116. XMLElement.prototype.getAttribute=function(a){
  1117. var _cc="";
  1118. if(typeof sXmlDecode=="function"){
  1119. _cc=sXmlDecode(this.attributes["_"+a]);
  1120. }else{
  1121. _cc=this.attributes["_"+a];
  1122. }
  1123. return (_cc==null?"":_cc);
  1124. };
  1125. XMLElement.prototype.toString=function(){
  1126. var s="<"+this.getName();
  1127. for(var i in this.attributes){
  1128. s+=" "+i.substring(1)+"=\""+this.attributes[i]+"\"";
  1129. }
  1130. s+=">"+this.getValue();
  1131. for(var j=0;j<this.childNodes.length;j++){
  1132. s+=this.childNodes[j].toString();
  1133. }
  1134. s+="</"+this.getName()+">";
  1135. return s;
  1136. };
  1137. function XMLBuilderLoadXMLFromString(_d0,_d1){
  1138. var _d2=null;
  1139. if(typeof DOMParser!="undefined"){
  1140. _d2=new DOMParser().parseFromString(_d0,"application/xml");
  1141. }else{
  1142. if(typeof ActiveXObject!="undefined"){
  1143. try{
  1144. _d2=new ActiveXObject("Microsoft.XMLDOM");
  1145. _d2.loadXML(_d0);
  1146. }
  1147. catch(e){
  1148. }
  1149. }
  1150. }
  1151. return _d2;
  1152. };
  1153. function XMLBuilderCreateXMLDocument(_d3,_d4,_d5){
  1154. var _d6=null;
  1155. _d4=_d4||"";
  1156. _d5=_d5||null;
  1157. if(document.implementation&&document.implementation.createDocument){
  1158. if(typeof _d4=="undefined"){
  1159. _d4="http://www.w3.org/2000/xmlns/";
  1160. }
  1161. _d6=document.implementation.createDocument(_d4,_d3,_d5);
  1162. }else{
  1163. if(typeof ActiveXObject!="undefined"){
  1164. try{
  1165. _d6=new ActiveXObject("Microsoft.XMLDOM");
  1166. var _d7=_d6.createNode(1,_d3,_d4);
  1167. _d6.appendChild(_d7);
  1168. }
  1169. catch(e){
  1170. }
  1171. }
  1172. }
  1173. return _d6;
  1174. };
  1175. function XMLBuilderCreateElementNS(_d8,_d9,_da){
  1176. var _db=null;
  1177. if(typeof _da.createElementNS!="undefined"){
  1178. if(typeof _d8=="undefined"){
  1179. _d8="http://www.w3.org/2000/xmlns/";
  1180. }
  1181. _db=_da.createElementNS(_d8,_d9);
  1182. }else{
  1183. if(typeof _da.createNode!="undefined"){
  1184. _db=_da.createNode(1,_d9,_d8);
  1185. }
  1186. }
  1187. return _db;
  1188. };
  1189. function XMLBuilderSetAttributeNodeNS(_dc,_dd,_de,_df){
  1190. if(typeof _dc.setAttributeNS!="undefined"){
  1191. if(typeof _df=="undefined"){
  1192. _df="http://www.w3.org/2000/xmlns/";
  1193. }
  1194. _dc.setAttributeNS(_df,_dd,_de);
  1195. }else{
  1196. if(typeof _dc.ownerDocument!="undefined"&&typeof _dc.ownerDocument.createNode!="undefined"){
  1197. var _e0=_dc.ownerDocument.createNode(2,_dd,_df);
  1198. _e0.nodeValue=_de;
  1199. _dc.setAttributeNode(_e0);
  1200. }
  1201. }
  1202. };
  1203. function XMLBuilderSerializeNode(_e1){
  1204. var _e2="";
  1205. if(typeof XMLSerializer!="undefined"){
  1206. try{
  1207. _e2=new XMLSerializer().serializeToString(_e1);
  1208. }
  1209. catch(e){
  1210. }
  1211. }else{
  1212. if(typeof _e1=="object"&&typeof _e1.xml!="undefined"){
  1213. _e2=_e1.xml;
  1214. }
  1215. }
  1216. return _e2.replace(/^\s+/g,"").replace(/\s+$/g,"");
  1217. };
  1218. function XMLHelper_GetText(_e3,_e4){
  1219. var _e5="";
  1220. var _e6=_e3.childNodes;
  1221. for(var i=0;i<_e6.length;++i){
  1222. if(_e6[i].nodeType==3){
  1223. _e5+=_e6[i].nodeValue;
  1224. }else{
  1225. if(_e6[i].nodeName=="Value"){
  1226. _e5+=_e6[i].getAttribute("display");
  1227. }else{
  1228. if(_e4){
  1229. _e5+=XMLHelper_GetText(_e6[i],true);
  1230. }
  1231. }
  1232. }
  1233. }
  1234. return _e5;
  1235. };
  1236. function XMLHelper_GetLocalName(_e8){
  1237. if(typeof _e8.baseName!="undefined"){
  1238. return _e8.baseName;
  1239. }
  1240. return _e8.localName;
  1241. };
  1242. function XMLHelper_FindChildByTagName(_e9,_ea,_eb){
  1243. if(typeof _eb=="undefined"||(_eb!=true&&_eb!=false)){
  1244. _eb=true;
  1245. }
  1246. if(XMLHelper_GetLocalName(_e9)==_ea){
  1247. return (_e9);
  1248. }
  1249. var i;
  1250. for(i=0;i<_e9.childNodes.length;i++){
  1251. if(XMLHelper_GetLocalName(_e9.childNodes[i])==_ea){
  1252. return _e9.childNodes[i];
  1253. }
  1254. }
  1255. if(_eb!=false){
  1256. for(i=0;i<_e9.childNodes.length;i++){
  1257. var _ed=XMLHelper_FindChildByTagName(_e9.childNodes[i],_ea,_eb);
  1258. if(_ed){
  1259. return _ed;
  1260. }
  1261. }
  1262. }
  1263. return null;
  1264. };
  1265. function XMLHelper_FindChildrenByTagName(_ee,_ef,_f0){
  1266. if(typeof _f0=="undefined"||(_f0!=true&&_f0!=false)){
  1267. _f0=true;
  1268. }
  1269. var _f1=[];
  1270. var _f2=_ee.childNodes;
  1271. for(var _f3=0;_f3<_f2.length;_f3++){
  1272. if(XMLHelper_GetLocalName(_f2[_f3])==_ef){
  1273. _f1[_f1.length]=_f2[_f3];
  1274. }
  1275. if(_f0===true){
  1276. var _f4=XMLHelper_FindChildrenByTagName(_f2[_f3],_ef,_f0);
  1277. if(_f4.length>0){
  1278. _f1=_f1.concat(_f4);
  1279. }
  1280. }
  1281. }
  1282. return _f1;
  1283. };
  1284. function XMLHelper_GetFirstChildElement(oEl){
  1285. var _f6=null;
  1286. if(oEl&&oEl.childNodes&&oEl.childNodes.length){
  1287. for(var i=0;i<oEl.childNodes.length;i++){
  1288. if(oEl.childNodes[i].nodeType==1){
  1289. _f6=oEl.childNodes[i];
  1290. break;
  1291. }
  1292. }
  1293. }
  1294. return _f6;
  1295. };
  1296. function XMLHelper_FindChildrenByAttribute(_f8,_f9,_fa,_fb,_fc){
  1297. if(typeof _fb=="undefined"||(_fb!=true&&_fb!=false)){
  1298. _fb=true;
  1299. }
  1300. if(typeof _fa!="string"&&typeof _fa!="number"){
  1301. _fa=null;
  1302. }else{
  1303. _fa=_fa.toString();
  1304. }
  1305. var _fd=[];
  1306. var _fe=_f8.childNodes;
  1307. for(var _ff=0;_ff<_fe.length;_ff++){
  1308. var _100=_fe[_ff];
  1309. if(_100.nodeType==1){
  1310. var _101=_100.getAttribute(_f9);
  1311. if(_101!==null){
  1312. if(_fa===null||_101==_fa){
  1313. if(_fc){
  1314. return [_100];
  1315. }else{
  1316. _fd[_fd.length]=_100;
  1317. }
  1318. }
  1319. }
  1320. if(_fb===true){
  1321. var _102=XMLHelper_FindChildrenByAttribute(_100,_f9,_fa,_fb,_fc);
  1322. if(_102.length>0){
  1323. if(_fc){
  1324. if(_102.length==1){
  1325. return _102;
  1326. }else{
  1327. return [_102[0]];
  1328. }
  1329. }else{
  1330. _fd=_fd.concat(_102);
  1331. }
  1332. }
  1333. }
  1334. }
  1335. }
  1336. return _fd;
  1337. };
  1338. var DICTIONARY_INVALID_KEY=-1;
  1339. var DICTIONARY_SUCCESS=1;
  1340. function CDictionary(){
  1341. this.m_aValues={};
  1342. };
  1343. function CDictionary_add(sKey,_104){
  1344. if(typeof sKey!="string"&&typeof sKey!="number"){
  1345. return DICTIONARY_INVALID_KEY;
  1346. }
  1347. this.m_aValues[sKey]=_104;
  1348. return DICTIONARY_SUCCESS;
  1349. };
  1350. function CDictionary_exists(sKey){
  1351. if(typeof sKey!="string"&&typeof sKey!="number"){
  1352. return false;
  1353. }
  1354. return (typeof this.m_aValues[sKey]!="undefined");
  1355. };
  1356. function CDictionary_get(sKey){
  1357. if(typeof sKey!="string"&&typeof sKey!="number"){
  1358. return null;
  1359. }
  1360. if(this.exists(sKey)===true){
  1361. return this.m_aValues[sKey];
  1362. }else{
  1363. return null;
  1364. }
  1365. };
  1366. function CDictionary_keys(){
  1367. var _107=[];
  1368. for(var _108 in this.m_aValues){
  1369. _107.push(_108);
  1370. }
  1371. return _107.sort();
  1372. };
  1373. function CDictionary_remove(sKey){
  1374. if(typeof sKey!="string"&&typeof sKey!="number"){
  1375. return DICTIONARY_INVALID_KEY;
  1376. }
  1377. var _10a=this.get(sKey);
  1378. delete this.m_aValues[sKey];
  1379. return _10a;
  1380. };
  1381. function CDictionary_removeAll(){
  1382. this.m_aValues=[];
  1383. return DICTIONARY_SUCCESS;
  1384. };
  1385. function CDictionary_append(_10b){
  1386. if(_10b instanceof CDictionary&&_10b.keys().length>0){
  1387. var _10c=_10b.keys();
  1388. for(var _10d=0;_10d<_10c.length;_10d++){
  1389. this.add(_10c[_10d],_10b.get(_10c[_10d]));
  1390. }
  1391. }
  1392. };
  1393. CDictionary.prototype.add=CDictionary_add;
  1394. CDictionary.prototype.exists=CDictionary_exists;
  1395. CDictionary.prototype.get=CDictionary_get;
  1396. CDictionary.prototype.keys=CDictionary_keys;
  1397. CDictionary.prototype.remove=CDictionary_remove;
  1398. CDictionary.prototype.removeAll=CDictionary_removeAll;
  1399. CDictionary.prototype.append=CDictionary_append;
  1400. function CognosTabControl(_10e,_10f){
  1401. this._init();
  1402. this._outsideContainer=_10e;
  1403. this._callback=_10f;
  1404. };
  1405. CognosTabControl.prototype._init=function(){
  1406. this._tabs=null;
  1407. this._tabControlNode=null;
  1408. this._scrollButtonsVisible=false;
  1409. this._scrollLeftButton=null;
  1410. this._scrollRightButton=null;
  1411. this._selectedTab=null;
  1412. this._wrapperDiv=null;
  1413. this._topContainer=null;
  1414. this._seperator=null;
  1415. this._isSavedOutput=false;
  1416. this._isHighContrast=false;
  1417. };
  1418. CognosTabControl.prototype.destroy=function(){
  1419. if(this._wrapperDiv){
  1420. this._wrapperDiv.parentNode.removeChild(this._wrapperDiv);
  1421. delete this._wrapperDiv;
  1422. this._wrapperDiv=null;
  1423. }
  1424. };
  1425. CognosTabControl.prototype.setHighContrast=function(_110){
  1426. this._isHighContrast=_110;
  1427. };
  1428. CognosTabControl.prototype.isHighContrast=function(){
  1429. return this._isHighContrast;
  1430. };
  1431. CognosTabControl.prototype.setSpaceSaverContainer=function(node){
  1432. this._spaceSaverContainer=node;
  1433. };
  1434. CognosTabControl.prototype.useAbsolutePosition=function(_112){
  1435. this._useAbsolutePosition=_112;
  1436. };
  1437. CognosTabControl.prototype.setScrollAttachNode=function(node){
  1438. this._scrollAttachNode=node;
  1439. };
  1440. CognosTabControl.prototype.setIsSavedOutput=function(_114){
  1441. this._isSavedOutput=_114;
  1442. };
  1443. CognosTabControl.prototype.isSavedOutput=function(){
  1444. return this._isSavedOutput;
  1445. };
  1446. CognosTabControl.prototype.getSelectedTabId=function(){
  1447. if(this._selectedTab){
  1448. return this._selectedTab.getId();
  1449. }
  1450. return null;
  1451. };
  1452. CognosTabControl.prototype.getSelectedTab=function(){
  1453. return this._selectedTab?this._selectedTab:null;
  1454. };
  1455. CognosTabControl.prototype.isTopAligned=function(){
  1456. return this._isTopAligned;
  1457. };
  1458. CognosTabControl.prototype.getWrapperDiv=function(){
  1459. return this._wrapperDiv;
  1460. };
  1461. CognosTabControl.prototype.getVisibleWidth=function(){
  1462. var _115=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
  1463. return this._wrapperDiv.clientWidth-_115;
  1464. };
  1465. CognosTabControl.prototype.getMaxRightScroll=function(){
  1466. var _116=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
  1467. return this._totalWrapperWidth+_116+8-this._wrapperDiv.clientWidth;
  1468. };
  1469. CognosTabControl.prototype.hide=function(){
  1470. this._topContainer.style.display="none";
  1471. };
  1472. CognosTabControl.prototype.resetPosition=function(){
  1473. if(this._useAbsolutePosition===true){
  1474. this._outsideContainer.srollLeft="0px";
  1475. this._outsideContainer.scrollTop="0px";
  1476. this._topContainer.style.top="";
  1477. this._topContainer.style.bottom="";
  1478. this._topContainer.style.left="0px";
  1479. if(this._isTopAligned){
  1480. this._topContainer.style.top="0px";
  1481. }else{
  1482. this._topContainer.style.bottom="0px";
  1483. }
  1484. }
  1485. };
  1486. CognosTabControl.prototype.render=function(_117){
  1487. this._updateTabInfo(_117);
  1488. if(!this._tabControlNode){
  1489. var _118=this;
  1490. var _119=this._scrollAttachNode?this._scrollAttachNode:this._outsideContainer;
  1491. if(window.attachEvent){
  1492. window.attachEvent("onresize",function(){
  1493. _118.onResize();
  1494. });
  1495. if(this._useAbsolutePosition===true){
  1496. _119.attachEvent("onscroll",function(){
  1497. _118.onContainerScroll();
  1498. });
  1499. }
  1500. }else{
  1501. window.addEventListener("resize",function(){
  1502. _118.onResize();
  1503. },false);
  1504. if(this._useAbsolutePosition===true){
  1505. _119.addEventListener("scroll",function(){
  1506. _118.onContainerScroll();
  1507. },false);
  1508. }
  1509. }
  1510. this._outsideContainer.originalClassName=this._outsideContainer.className;
  1511. this._outsideContainer.className=this._outsideContainer.className+(this._isTopAligned?" ct_controlTop":" ct_controlBottom");
  1512. this._topContainer=document.createElement("div");
  1513. this._topContainer.className="ct_wrapperDiv";
  1514. if(this._useAbsolutePosition===true){
  1515. this._topContainer.style.width="100%";
  1516. this._topContainer.style.position="absolute";
  1517. this._topContainer.style.left="0px";
  1518. if(this._isTopAligned){
  1519. this._topContainer.style.top="0px";
  1520. }else{
  1521. this._topContainer.style.bottom="0px";
  1522. }
  1523. }
  1524. if(this._isTopAligned&&this._outsideContainer.firstChild){
  1525. this._outsideContainer.insertBefore(this._topContainer,this._outsideContainer.firstChild);
  1526. }else{
  1527. this._outsideContainer.appendChild(this._topContainer);
  1528. }
  1529. this._wrapperDiv=document.createElement("div");
  1530. this._wrapperDiv.setAttribute("role","presentation");
  1531. this._wrapperDiv.className="ct_wrapperDiv";
  1532. this._topContainer.appendChild(this._wrapperDiv);
  1533. this._tabControlNode=document.createElement("div");
  1534. this._tabControlNode.setAttribute("role","tablist");
  1535. this._tabControlNode.className="ct_control";
  1536. this._wrapperDiv.appendChild(this._tabControlNode);
  1537. this._totalWrapperWidth=0;
  1538. for(var i=0;i<this._tabs.length;i++){
  1539. var tab=this._tabs[i];
  1540. tab.render(this._tabControlNode);
  1541. this._totalWrapperWidth+=this._tabs[i].getWidth();
  1542. }
  1543. var _11c=0;
  1544. if(this._tabs[0]){
  1545. _11c=this._tabs[0].getHeight();
  1546. }
  1547. this._wrapperDiv.style.height=_11c+5+"px";
  1548. if(this._spaceSaverContainer){
  1549. this.spaceSaverDiv=document.createElement("div");
  1550. this.spaceSaverDiv.style.height=_11c+5+"px";
  1551. this.spaceSaverDiv.style.position="relative";
  1552. this.spaceSaverDiv.style.display="block";
  1553. this._spaceSaverContainer.appendChild(this.spaceSaverDiv);
  1554. }
  1555. this._createSeperator();
  1556. }else{
  1557. this.resetPosition();
  1558. }
  1559. this._topContainer.style.display="";
  1560. this.onResize();
  1561. this.selectTab(_117.currentTabId,false);
  1562. if(this._selectedTab){
  1563. this._selectedTab.scrollIntoView();
  1564. this.updateScrollButtons();
  1565. }
  1566. };
  1567. CognosTabControl.prototype.onContainerScroll=function(){
  1568. var _11d=this._scrollAttachNode?this._scrollAttachNode:this._topContainer;
  1569. this._topContainer.style.left=_11d.scrollLeft+"px";
  1570. if(this._isTopAligned){
  1571. this._topContainer.style.top=_11d.scrollTop+"px";
  1572. }else{
  1573. this._topContainer.style.bottom=(-_11d.scrollTop)+"px";
  1574. }
  1575. };
  1576. CognosTabControl.prototype._resetTabControl=function(){
  1577. if(this._outsideContainer.originalClassName){
  1578. this._outsideContainer.className=this._outsideContainer.originalClassName;
  1579. }else{
  1580. this._outsideContainer.className="";
  1581. }
  1582. if(this._topContainer){
  1583. var node=this._outsideContainer.removeChild(this._topContainer);
  1584. node=null;
  1585. }
  1586. this._init();
  1587. };
  1588. CognosTabControl.prototype._updateTabInfo=function(_11f){
  1589. this._isTopAligned=_11f.position=="topLeft"?true:false;
  1590. var tabs=_11f.tabs;
  1591. if(this._tabs){
  1592. if(this._tabs.length!=tabs.length){
  1593. this._resetTabControl();
  1594. }else{
  1595. for(var i=0;i<this._tabs.length;i++){
  1596. if(tabs[i].id!=this._tabs[i].getId()){
  1597. this._resetTabControl();
  1598. break;
  1599. }
  1600. }
  1601. }
  1602. }
  1603. if(!this._tabs){
  1604. this._tabs=[];
  1605. if(!tabs){
  1606. return;
  1607. }
  1608. for(var ii=0;ii<tabs.length;ii++){
  1609. var tab=new CognosTab(tabs[ii],this,ii);
  1610. this._tabs.push(tab);
  1611. }
  1612. }
  1613. };
  1614. CognosTabControl.prototype.getScrollPos=function(){
  1615. return this._wrapperDiv.scrollLeft;
  1616. };
  1617. CognosTabControl.prototype.scrollTo=function(_124){
  1618. this._wrapperDiv.scrollLeft=_124;
  1619. this.updateScrollButtons();
  1620. };
  1621. CognosTabControl.prototype.onResize=function(evt){
  1622. if(this._wrapperDiv.offsetWidth<this._totalWrapperWidth){
  1623. this._showScrollButtons();
  1624. this.updateScrollButtons();
  1625. if(this._selectedTab){
  1626. this._selectedTab.scrollIntoView();
  1627. }
  1628. if(this._scrollRightButton.isDisabled()){
  1629. this.scrollTo(this.getMaxRightScroll());
  1630. }
  1631. }else{
  1632. this._hideScrollButtons();
  1633. this.scrollTo(0);
  1634. }
  1635. };
  1636. CognosTabControl.prototype._showScrollButtons=function(){
  1637. if(this._scrollButtonsVisible){
  1638. return;
  1639. }
  1640. if(!this._scrollLeftButton){
  1641. var _126=0;
  1642. if(this._tabs[0]){
  1643. _126=this._tabs[0].getHeight();
  1644. }
  1645. this._scrollLeftButton=new CognosScrollButton("left",_126,this);
  1646. this._scrollLeftButton.render(this._topContainer);
  1647. this._scrollRightButton=new CognosScrollButton("right",_126,this);
  1648. this._scrollRightButton.render(this._topContainer);
  1649. }
  1650. this._scrollButtonsVisible=true;
  1651. this._scrollLeftButton.show();
  1652. this._scrollRightButton.show();
  1653. this._tabControlNode.style.left=this._scrollLeftButton.getWidth()-2+"px";
  1654. };
  1655. CognosTabControl.prototype.updateScrollButtons=function(){
  1656. if(this._scrollLeftButton){
  1657. this._scrollLeftButton.update();
  1658. }
  1659. if(this._scrollRightButton){
  1660. this._scrollRightButton.update();
  1661. }
  1662. };
  1663. CognosTabControl.prototype._hideScrollButtons=function(){
  1664. if(!this._scrollButtonsVisible){
  1665. return;
  1666. }
  1667. this._scrollButtonsVisible=false;
  1668. this._tabControlNode.style.left="0px";
  1669. this._scrollLeftButton.hide();
  1670. this._scrollRightButton.hide();
  1671. };
  1672. CognosTabControl.prototype._createSeperator=function(){
  1673. this._seperator=document.createElement("div");
  1674. this._seperator.setAttribute("role","presendation");
  1675. this._seperator.setAttribute("style","");
  1676. this._seperator.className="ct_verticalLine";
  1677. this._seperator.setAttribute("role","presentation");
  1678. this._tabControlNode.appendChild(this._seperator);
  1679. };
  1680. CognosTabControl.prototype.selectTab=function(_127,_128,evt){
  1681. if(!evt){
  1682. evt=window.event;
  1683. }
  1684. for(var i=0;i<this._tabs.length;i++){
  1685. var tab=this._tabs[i];
  1686. var _12c=tab.getId()==_127;
  1687. tab.select(_12c);
  1688. if(_12c){
  1689. this._selectedTab=tab;
  1690. if(_128&&this._callback){
  1691. this._callback(_127);
  1692. }
  1693. }
  1694. if(_128){
  1695. tab.focus(_12c);
  1696. }
  1697. }
  1698. if(evt&&window.stopEventBubble){
  1699. window.stopEventBubble(evt);
  1700. }
  1701. return false;
  1702. };
  1703. CognosTabControl.prototype.handleKeyDown=function(evt,_12e){
  1704. if(!evt){
  1705. evt=window.event;
  1706. }
  1707. if(!evt){
  1708. return;
  1709. }
  1710. if(evt.keyCode=="39"||evt.keyCode=="37"){
  1711. if(evt.keyCode=="39"){
  1712. _12e++;
  1713. if(_12e>=this._tabs.length){
  1714. _12e=0;
  1715. }
  1716. }else{
  1717. _12e--;
  1718. if(_12e<0){
  1719. _12e=this._tabs.length-1;
  1720. }
  1721. }
  1722. this._tabs[_12e].focus();
  1723. this._tabs[_12e].scrollIntoView();
  1724. }else{
  1725. if(evt.keyCode=="32"||evt.keyCode=="13"){
  1726. var _12f=this._tabs[_12e].getId();
  1727. this.selectTab(_12f,true);
  1728. }
  1729. }
  1730. };
  1731. function CognosTab(_130,_131,_132){
  1732. if(!_130){
  1733. return;
  1734. }
  1735. this._id=_130.id;
  1736. this._label=_130.label;
  1737. this._position=_132;
  1738. this._contentClassName=_130.className;
  1739. this._imgURL=_130.img;
  1740. this._selected=false;
  1741. this._tabControl=_131;
  1742. this._outerTabDiv=null;
  1743. this._focusDiv=null;
  1744. };
  1745. CognosTab.prototype.getWidth=function(){
  1746. return this._outerTabDiv.offsetWidth+1;
  1747. };
  1748. CognosTab.prototype.getHeight=function(){
  1749. return this._outerTabDiv.clientHeight;
  1750. };
  1751. CognosTab.prototype.getId=function(){
  1752. return this._id;
  1753. };
  1754. CognosTab.prototype.select=function(_133){
  1755. if(_133!=this._selected){
  1756. this._selected=_133;
  1757. if(_133){
  1758. this.scrollIntoView();
  1759. }
  1760. if(this._outerTabDiv){
  1761. this._updateSelectedClass();
  1762. this._updateAriaSelected();
  1763. }
  1764. }
  1765. };
  1766. CognosTab.prototype.scrollIntoView=function(){
  1767. var _134=this._outerTabDiv.offsetLeft+this._outerTabDiv.clientWidth;
  1768. var _135=this._tabControl.getVisibleWidth();
  1769. var _136=this._tabControl.getScrollPos();
  1770. var _137=this._outerTabDiv.offsetLeft;
  1771. if(_137===0){
  1772. this._tabControl.scrollTo(0);
  1773. }else{
  1774. if((_137>=_136)&&(_134<=(_136+_135))){
  1775. }else{
  1776. if(_137<_136){
  1777. var _138=_137<3?0:_137-3;
  1778. this._tabControl.scrollTo(_138);
  1779. }else{
  1780. if(_134-_135>0||_134<_136){
  1781. this._tabControl.scrollTo(_134-_135+10);
  1782. }
  1783. }
  1784. }
  1785. }
  1786. };
  1787. CognosTab.prototype.render=function(_139){
  1788. if(!this._outerTabDiv){
  1789. var _13a=this._id;
  1790. var _13b=this._tabControl;
  1791. var tab=this;
  1792. this._outerTabDiv=document.createElement("div");
  1793. this._outerTabDiv.onmousedown=function(_13d){
  1794. _13b.selectTab(_13a,true,_13d);
  1795. };
  1796. this._outerTabDiv.onmouseover=function(){
  1797. this.className=this.className+" ct_highlight";
  1798. };
  1799. this._outerTabDiv.onmouseout=function(){
  1800. tab._updateSelectedClass();
  1801. };
  1802. this._outerTabDiv.setAttribute("style","");
  1803. this._outerTabDiv.setAttribute("role","presentation");
  1804. this._updateSelectedClass();
  1805. _139.appendChild(this._outerTabDiv);
  1806. var _13e=document.createElement("div");
  1807. _13e.className="ct_content";
  1808. _13e.setAttribute("role","presentation");
  1809. this._outerTabDiv.appendChild(_13e);
  1810. this._focusDiv=document.createElement("span");
  1811. this._focusDiv.innerHTML=this._label?this._label:"&nbsp;";
  1812. this._focusDiv.className="ct_text";
  1813. this._focusDiv.setAttribute("tabIndex",this._position===0?"0":"-1");
  1814. this._focusDiv.setAttribute("role","tab");
  1815. this._focusDiv.onkeydown=function(_13f){
  1816. _13b.handleKeyDown(_13f,tab._position);
  1817. };
  1818. this._updateAriaSelected();
  1819. _13e.appendChild(this._focusDiv);
  1820. if(this.isIE()&&this.getWidth()<75){
  1821. this._outerTabDiv.style.width="75px";
  1822. }
  1823. }else{
  1824. this._updateSelectedClass();
  1825. this._updateAriaSelected();
  1826. }
  1827. };
  1828. CognosTab.prototype.isIE=function(){
  1829. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  1830. };
  1831. CognosTab.prototype.getFocusableDiv=function(){
  1832. return this._focusDiv;
  1833. };
  1834. CognosTab.prototype.focus=function(_140){
  1835. if(typeof _140==="undefined"){
  1836. _140=true;
  1837. }
  1838. this._focusDiv.setAttribute("tabIndex",_140?"0":"-1");
  1839. if(_140&&this._focusDiv.focus){
  1840. this._focusDiv.focus();
  1841. }
  1842. };
  1843. CognosTab.prototype._updateSelectedClass=function(){
  1844. this._outerTabDiv.className=this._selected?"ct_outerDiv ct_highlight ct_selected":"ct_outerDiv";
  1845. };
  1846. CognosTab.prototype._updateAriaSelected=function(){
  1847. this._focusDiv.setAttribute("aria-selected",this._selected?"true":"false");
  1848. };
  1849. function CognosScrollButton(_141,_142,_143){
  1850. this._direction=_141;
  1851. this._height=_142;
  1852. this._tabControl=_143;
  1853. this._disabled=true;
  1854. this._scrolling=false;
  1855. };
  1856. CognosScrollButton.prototype.getWidth=function(){
  1857. return this._scrollButtonDiv.offsetWidth+1;
  1858. };
  1859. CognosScrollButton.prototype.show=function(){
  1860. this._wrapperDiv.style.display="block";
  1861. };
  1862. CognosScrollButton.prototype.hide=function(){
  1863. this._wrapperDiv.style.display="none";
  1864. };
  1865. CognosScrollButton.prototype.update=function(){
  1866. var _144=this._tabControl.getWrapperDiv();
  1867. var _145=false;
  1868. if(this._direction=="left"){
  1869. if(_144.scrollLeft===0){
  1870. _145=true;
  1871. }
  1872. }else{
  1873. if(_144.scrollLeft>=(this._tabControl.getMaxRightScroll()-2)){
  1874. _145=true;
  1875. }
  1876. }
  1877. if(_145){
  1878. this._disable();
  1879. }else{
  1880. this._enable();
  1881. }
  1882. };
  1883. CognosScrollButton.prototype.isDisabled=function(){
  1884. return this._disabled;
  1885. };
  1886. CognosScrollButton.prototype._disable=function(){
  1887. this._disabled=true;
  1888. this._outerDiv.className="ct_outerDiv ct_scrollDisabled";
  1889. };
  1890. CognosScrollButton.prototype._enable=function(){
  1891. this._disabled=false;
  1892. this._outerDiv.className="ct_outerDiv ct_scrollEnabled";
  1893. };
  1894. CognosScrollButton.prototype.scroll=function(){
  1895. if(!this._scrolling){
  1896. this._scrolling=true;
  1897. var _146=this._tabControl.getWrapperDiv().clientWidth;
  1898. this._doAnimateScroll(_146,this._tabControl.getMaxRightScroll());
  1899. }
  1900. };
  1901. CognosScrollButton.prototype._doAnimateScroll=function(_147,_148){
  1902. if(_147>0){
  1903. var _149=10;
  1904. var _14a=this._tabControl.getWrapperDiv();
  1905. if(this._direction=="left"){
  1906. if(_14a.scrollLeft>_149){
  1907. this._tabControl.scrollTo(_14a.scrollLeft-_149);
  1908. }else{
  1909. this._tabControl.scrollTo(0);
  1910. this._scrolling=false;
  1911. return;
  1912. }
  1913. }else{
  1914. if(_14a.scrollLeft+_149<_148){
  1915. this._tabControl.scrollTo(_14a.scrollLeft+_149);
  1916. }else{
  1917. this._scrolling=false;
  1918. this._tabControl.scrollTo(_148);
  1919. this._tabControl.updateScrollButtons();
  1920. return;
  1921. }
  1922. }
  1923. _147-=_149;
  1924. var _14b=this;
  1925. setTimeout(function(){
  1926. _14b._doAnimateScroll(_147,_148);
  1927. },3);
  1928. }else{
  1929. this._scrolling=false;
  1930. this._tabControl.updateScrollButtons();
  1931. }
  1932. };
  1933. CognosScrollButton.prototype.isIE=function(){
  1934. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  1935. };
  1936. CognosScrollButton.prototype.render=function(_14c){
  1937. this._scrollButtonDiv=document.createElement("div");
  1938. this._scrollButtonDiv.className="ct_scrollButton";
  1939. var _14d=-1;
  1940. if(this.isIE()&&document.compatMode!="CSS1Compat"){
  1941. _14d=1;
  1942. }
  1943. this._scrollButtonDiv.style.height=this._height+_14d+"px";
  1944. if(this._tabControl.isHighContrast()){
  1945. this._scrollButtonDiv.innerHTML=this._direction=="left"?"&laquo;":"&raquo;";
  1946. }
  1947. this._outerDiv=document.createElement("div");
  1948. this._outerDiv.className="ct_scrollDisabled";
  1949. this._outerDiv.appendChild(this._scrollButtonDiv);
  1950. this._outerDiv.style.height=this._height+"px";
  1951. var _14e=this;
  1952. this._outerDiv.onclick=function(){
  1953. _14e.scroll();
  1954. };
  1955. this._wrapperDiv=document.createElement("div");
  1956. this._wrapperDiv.style.height=this._height+"px";
  1957. this._wrapperDiv.className="ct_scroll "+(this._direction=="left"?"ct_left":"ct_right")+(this._tabControl.isHighContrast()?" a11y":"");
  1958. this._wrapperDiv.appendChild(this._outerDiv);
  1959. if(this._direction=="left"){
  1960. _14c.insertBefore(this._wrapperDiv,_14c.firstChild);
  1961. this._wrapperDiv.style.left="0px";
  1962. }else{
  1963. _14c.appendChild(this._wrapperDiv);
  1964. this._wrapperDiv.style.right="0px";
  1965. }
  1966. };
  1967. function ActionFactory(_14f){
  1968. this.m_cognosViewer=_14f;
  1969. };
  1970. ActionFactory.prototype.load=function(_150){
  1971. this.m_cognosViewer.loadExtra();
  1972. var _151=null;
  1973. try{
  1974. var _152=_150+"Action";
  1975. _151=eval("(typeof "+_152+"=='function'? new "+_152+"():null);");
  1976. if(_151){
  1977. _151.setCognosViewer(this.m_cognosViewer);
  1978. }
  1979. }
  1980. catch(exception){
  1981. _151=null;
  1982. }
  1983. return _151;
  1984. };
  1985. function ActionFactory_loadActionHandler(evt,_154){
  1986. var _155=getCtxNodeFromEvent(evt);
  1987. var _156=_154.getSelectionController();
  1988. var _157=null;
  1989. if(_155!==null){
  1990. var _158=_155.getAttribute("ctx");
  1991. _158=_158.split("::")[0].split(":")[0];
  1992. var _159=_155.getAttribute("type")!=null?_155:_155.parentNode;
  1993. var type=_159.getAttribute("type");
  1994. switch(type){
  1995. case "columnTitle":
  1996. var _15b=(_155.getAttribute("dttargets")!=null);
  1997. var _15c=(_159.getAttribute("CTNM")!=null&&_156.getMun(_158)!=""&&_156.getUsageInfo(_158)!="2");
  1998. if(_15b||_15c){
  1999. _157=_154.getAction("DrillUpDownOrThrough");
  2000. _157.init(_15b,_15c);
  2001. _157.updateDrillabilityInfo(_154,_155);
  2002. }else{
  2003. _157=_154.getAction("RenameDataItem");
  2004. }
  2005. break;
  2006. case "datavalue":
  2007. case "chartElement":
  2008. case "ordinalAxisLabel":
  2009. case "legendLabel":
  2010. case "legendTitle":
  2011. case "ordinalAxisTitle":
  2012. var _15b=(_155.getAttribute("dttargets")!=null);
  2013. var _15c=(_156.getHun(_158)!="");
  2014. if(_15b||_15c){
  2015. _157=_154.getAction("DrillUpDownOrThrough");
  2016. _157.init(_15b,_15c);
  2017. _157.updateDrillabilityInfo(_154,_155);
  2018. }
  2019. break;
  2020. }
  2021. }
  2022. if(_157===null){
  2023. _157=_154.getAction("Selection");
  2024. }
  2025. _157.setCognosViewer(_154);
  2026. return _157;
  2027. };
  2028. ActionFactory.prototype.destroy=function(){
  2029. delete this.m_cognosViewer;
  2030. };
  2031. function CSelectionDefaultStyles(_15d){
  2032. this.m_primarySelectionColor=null;
  2033. this.m_highContrastBorderStyle="solid";
  2034. this.m_secondarySelectionIsDisabled=false;
  2035. if(_15d){
  2036. this.m_selectionController=_15d;
  2037. this.m_oCognosViewer=_15d.m_oCognosViewer;
  2038. if(this.m_oCognosViewer){
  2039. var _15e=this.m_oCognosViewer.getUIConfig();
  2040. if(_15e){
  2041. if(_15e.getPrimarySelectionColor()){
  2042. this.m_primarySelectionColor=_15e.getPrimarySelectionColor();
  2043. }
  2044. if(!_15e.getShowSecondarySelection()){
  2045. this.m_secondarySelectionIsDisabledConfig=true;
  2046. }else{
  2047. if(_15e.getSeondarySelectionColor()){
  2048. this.m_secondarySelectionColor=_15e.getSeondarySelectionColor();
  2049. }
  2050. }
  2051. }
  2052. }
  2053. }
  2054. };
  2055. CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_15f){
  2056. return this.m_primarySelectionColor;
  2057. };
  2058. CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
  2059. return this.m_secondarySelectionColor;
  2060. };
  2061. CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
  2062. return this.m_highContrastBorderStyle;
  2063. };
  2064. CSelectionDefaultStyles.prototype.canApplyToSelection=function(_160){
  2065. return true;
  2066. };
  2067. CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
  2068. return this.m_secondarySelectionIsDisabled;
  2069. };
  2070. CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
  2071. };
  2072. function CSelectionFilterStyles(_161){
  2073. this.m_selectionController=_161;
  2074. this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD";
  2075. this.m_primarySelectionFilterColorForMeasure=null;
  2076. this.m_secondarySelectionColor=null;
  2077. this.m_highContrastBorderStyle="dotted";
  2078. this.m_secondarySelectionIsDisabled=true;
  2079. };
  2080. CSelectionFilterStyles.prototype=new CSelectionDefaultStyles();
  2081. CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_162){
  2082. return this.m_primarySelectionColor;
  2083. };
  2084. CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){
  2085. return this.m_secondarySelectionColor;
  2086. };
  2087. CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){
  2088. return this.m_highContrastBorderStyle;
  2089. };
  2090. CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){
  2091. return this.m_secondarySelectionIsDisabled;
  2092. };
  2093. CSelectionFilterStyles.prototype.canApplyToSelection=function(_163){
  2094. return !this.selectionHasOnlyMeasure(_163);
  2095. };
  2096. CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_164){
  2097. return (_164.length===1&&_164[0].length===1&&this.m_selectionController.isMeasure(_164[0][0]));
  2098. };
  2099. CSelectionFilterStyles.prototype.setStyleForSelection=function(_165){
  2100. this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_165))?null:this.m_primarySelectionFilterColor;
  2101. };
  2102. function CSelectionFilterContextMenuStyles(_166){
  2103. CSelectionDefaultStyles.call(this,_166);
  2104. this.m_secondarySelectionIsDisabled=true;
  2105. };
  2106. CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles();
  2107. function CSelectionObject(){
  2108. this.initialize();
  2109. };
  2110. CSelectionObject.prototype.initialize=function(){
  2111. this.m_oCellRef={};
  2112. this.m_sColumnRef="";
  2113. this.m_sColumnName="";
  2114. this.m_aDataItems=[];
  2115. this.m_aUseValues=[];
  2116. this.m_aDisplayValues=[];
  2117. this.m_sCellTypeId="";
  2118. this.m_sLayoutType="";
  2119. this.m_sTag="";
  2120. this.m_aMuns=[];
  2121. this.m_aRefQueries=[];
  2122. this.m_aMetadataItems=[];
  2123. this.m_aDrillOptions=[];
  2124. this.m_selectionController={};
  2125. this.m_contextIds=[];
  2126. this.m_ctxAttributeString="";
  2127. this.m_fetchedContextIds=false;
  2128. this.m_selectedClass=[];
  2129. this.m_cutClass=[];
  2130. this.m_dataContainerType="";
  2131. this.m_oJsonContext=null;
  2132. };
  2133. CSelectionObject.prototype.isSelectionOnVizChart=function(){
  2134. return false;
  2135. };
  2136. CSelectionObject.prototype.getCellRef=function(){
  2137. return this.m_oCellRef;
  2138. };
  2139. CSelectionObject.prototype.getColumnRP_Name=function(){
  2140. if(this.m_oCellRef!=null){
  2141. return this.m_oCellRef.getAttribute("rp_name");
  2142. }
  2143. };
  2144. CSelectionObject.prototype.getColumnRef=function(){
  2145. return this.m_sColumnRef;
  2146. };
  2147. CSelectionObject.prototype.getColumnName=function(){
  2148. if(this.m_sColumnName==""){
  2149. if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){
  2150. this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]);
  2151. }
  2152. }
  2153. return this.m_sColumnName;
  2154. };
  2155. CSelectionObject.prototype.getDataItemDisplayValue=function(_167){
  2156. var _168=this.getDataItems();
  2157. var item="";
  2158. if(_168&&_168[0]&&_168[0][0]){
  2159. item=this.getDataItems()[0][0];
  2160. if(_167&&_167.itemInfo&&_167.itemInfo.length){
  2161. var _16a=_167.itemInfo;
  2162. for(var i=0;i<_16a.length;i++){
  2163. if(_16a[i].item===item&&_16a[i].itemLabel){
  2164. return _16a[i].itemLabel;
  2165. }
  2166. }
  2167. }
  2168. }
  2169. return item;
  2170. };
  2171. CSelectionObject.prototype.getDataItems=function(){
  2172. if(!this.m_aDataItems.length){
  2173. this.fetchContextIds();
  2174. for(var i=0;i<this.m_contextIds.length;++i){
  2175. this.m_aDataItems[this.m_aDataItems.length]=[];
  2176. for(var j=0;j<this.m_contextIds[i].length;++j){
  2177. var _16e=this.m_contextIds[i][j];
  2178. this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_16e)?this.m_selectionController.getRefDataItem(_16e):"");
  2179. }
  2180. }
  2181. }
  2182. return this.m_aDataItems;
  2183. };
  2184. CSelectionObject.prototype.getUseValues=function(){
  2185. if(!this.m_aUseValues.length){
  2186. this.fetchContextIds();
  2187. for(var i=0;i<this.m_contextIds.length;++i){
  2188. this.m_aUseValues[this.m_aUseValues.length]=[];
  2189. for(var j=0;j<this.m_contextIds[i].length;++j){
  2190. var _171=this.m_contextIds[i][j];
  2191. this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_171)?this.m_selectionController.getUseValue(_171):"");
  2192. }
  2193. }
  2194. }
  2195. return this.m_aUseValues;
  2196. };
  2197. CSelectionObject.prototype.getCellTypeId=function(){
  2198. return this.m_sCellTypeId;
  2199. };
  2200. CSelectionObject.prototype.getDisplayValues=function(){
  2201. return this.m_aDisplayValues;
  2202. };
  2203. CSelectionObject.prototype.getLayoutType=function(){
  2204. return this.m_sLayoutType;
  2205. };
  2206. CSelectionObject.prototype.getTag=function(){
  2207. return this.m_sTag;
  2208. };
  2209. CSelectionObject.prototype.getMuns=function(){
  2210. if(!this.m_aMuns.length){
  2211. this.fetchContextIds();
  2212. for(var i=0;i<this.m_contextIds.length;++i){
  2213. this.m_aMuns[this.m_aMuns.length]=[];
  2214. for(var j=0;j<this.m_contextIds[i].length;++j){
  2215. var _174=this.m_contextIds[i][j];
  2216. this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_174)?this.m_selectionController.getMun(_174):"");
  2217. }
  2218. }
  2219. }
  2220. return this.m_aMuns;
  2221. };
  2222. CSelectionObject.prototype.getRefQueries=function(){
  2223. if(!this.m_aRefQueries.length){
  2224. this.fetchContextIds();
  2225. for(var i=0;i<this.m_contextIds.length;++i){
  2226. this.m_aRefQueries[this.m_aRefQueries.length]=[];
  2227. for(var j=0;j<this.m_contextIds[i].length;++j){
  2228. var _177=this.m_contextIds[i][j];
  2229. this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_177)?this.m_selectionController.getRefQuery(_177):"");
  2230. }
  2231. }
  2232. }
  2233. return this.m_aRefQueries;
  2234. };
  2235. CSelectionObject.prototype.getDimensionalItems=function(_178){
  2236. var _179=[];
  2237. this.fetchContextIds();
  2238. for(var i=0;i<this.m_contextIds.length;++i){
  2239. _179[_179.length]=[];
  2240. for(var j=0;j<this.m_contextIds[i].length;++j){
  2241. var _17c=this.m_contextIds[i][j];
  2242. var _17d="";
  2243. if(this.m_selectionController.isContextId(_17c)){
  2244. switch(_178){
  2245. case "hun":
  2246. _17d=this.m_selectionController.getHun(_17c);
  2247. break;
  2248. case "lun":
  2249. _17d=this.m_selectionController.getLun(_17c);
  2250. break;
  2251. case "dun":
  2252. _17d=this.m_selectionController.getDun(_17c);
  2253. break;
  2254. }
  2255. }
  2256. _179[_179.length-1].push(_17d);
  2257. }
  2258. }
  2259. return _179;
  2260. };
  2261. CSelectionObject.prototype.getMetadataItems=function(){
  2262. if(!this.m_aMetadataItems.length){
  2263. this.fetchContextIds();
  2264. for(var i=0;i<this.m_contextIds.length;++i){
  2265. this.m_aMetadataItems[this.m_aMetadataItems.length]=[];
  2266. for(var j=0;j<this.m_contextIds[i].length;++j){
  2267. var _180=this.m_contextIds[i][j];
  2268. var _181="";
  2269. if(this.m_selectionController.isContextId(_180)){
  2270. var sLun=this.m_selectionController.getLun(_180);
  2271. var sHun=this.m_selectionController.getHun(_180);
  2272. if(sLun&&sLun!=""){
  2273. _181=sLun;
  2274. }else{
  2275. if(sHun&&sHun!=""){
  2276. _181=sHun;
  2277. }else{
  2278. _181=this.m_selectionController.getQueryModelId(_180);
  2279. }
  2280. }
  2281. }
  2282. this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_181);
  2283. }
  2284. }
  2285. }
  2286. return this.m_aMetadataItems;
  2287. };
  2288. CSelectionObject.prototype.getDrillOptions=function(){
  2289. if(!this.m_aDrillOptions.length){
  2290. this.fetchContextIds();
  2291. for(var i=0;i<this.m_contextIds.length;++i){
  2292. this.m_aDrillOptions[this.m_aDrillOptions.length]=[];
  2293. for(var j=0;j<this.m_contextIds[i].length;++j){
  2294. var _186=this.m_contextIds[i][j];
  2295. this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_186)?this.m_selectionController.getDrillFlag(_186):0);
  2296. }
  2297. }
  2298. }
  2299. return this.m_aDrillOptions;
  2300. };
  2301. CSelectionObject.prototype.getSelectedContextIds=function(){
  2302. return this.m_contextIds;
  2303. };
  2304. CSelectionObject.prototype.fetchContextIds=function(){
  2305. if(!this.m_fetchedContextIds&&this.m_contextIds.length&&this.m_selectionController.hasContextData()){
  2306. var _187=[];
  2307. for(var i=0;i<this.m_contextIds.length;i++){
  2308. for(var j=0;j<this.m_contextIds[i].length;j++){
  2309. _187.push(this.m_contextIds[i][j]);
  2310. }
  2311. }
  2312. this.m_selectionController.fetchContextData(_187);
  2313. this.m_fetchedContextIds=true;
  2314. }
  2315. };
  2316. CSelectionObject.prototype.setSelectionController=function(sc){
  2317. if(sc){
  2318. this.m_selectionController=sc;
  2319. }
  2320. };
  2321. CSelectionObject.prototype.getLayoutElementId=function(){
  2322. return this.m_layoutElementId;
  2323. };
  2324. CSelectionObject.prototype.hasContextInformation=function(){
  2325. for(var i=0;i<this.m_contextIds.length;i++){
  2326. for(var j=0;j<this.m_contextIds[i].length;j++){
  2327. if(this.m_contextIds[i][j].length>0){
  2328. return true;
  2329. }
  2330. }
  2331. }
  2332. return false;
  2333. };
  2334. CSelectionObject.prototype.isHomeCell=function(){
  2335. var _18d=this.getCellRef().className;
  2336. if(_18d&&(_18d=="xm"||_18d.indexOf("xm ")!=-1||_18d.indexOf(" xm")!=-1)){
  2337. return true;
  2338. }
  2339. return false;
  2340. };
  2341. CSelectionObject.prototype.getDataContainerType=function(){
  2342. return this.m_dataContainerType;
  2343. };
  2344. CSelectionObject.prototype.getContextJsonObject=function(_18e,_18f){
  2345. if(this.m_oJsonContext===null){
  2346. var _190={};
  2347. var _191=[];
  2348. var _192=null;
  2349. this.getDataItems();
  2350. this.getUseValues();
  2351. if(this.m_contextIds.length==0){
  2352. return null;
  2353. }
  2354. var i=0,j=0;
  2355. var _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e);
  2356. _192=_195;
  2357. this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191);
  2358. j++;
  2359. for(;i<this.m_aDataItems.length;i++,j=0){
  2360. for(;j<this.m_aDataItems[i].length;j++){
  2361. _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e);
  2362. if(!_192){
  2363. _192=_195;
  2364. }
  2365. this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191);
  2366. }
  2367. }
  2368. this.m_oJsonContext=this._createGenericPayloadStructureJson(_192,_190,_191,_18f);
  2369. }
  2370. return this.m_oJsonContext;
  2371. };
  2372. CSelectionObject.prototype._getBestPossibleItemName=function(_196,_197,_198){
  2373. var _199=null;
  2374. if(_198.isMeasure(_197)){
  2375. if(!_198.isValidColumnTitle(this.m_oCellRef)){
  2376. if(!_198.isRelational([_197])){
  2377. _199=_198.getCCDManager().GetBestPossibleDimensionMeasureName(_197);
  2378. }
  2379. return (_199)?_199:_196;
  2380. }
  2381. }
  2382. _199=_198.getCCDManager().GetBestPossibleItemName(_197);
  2383. return (_199)?_199:_196;
  2384. };
  2385. CSelectionObject.prototype._isTypeColumnTitle=function(){
  2386. if(this.m_oCellRef&&typeof this.m_oCellRef.getAttribute=="function"){
  2387. return (this.m_oCellRef.getAttribute("type")==="columnTitle");
  2388. }
  2389. return false;
  2390. };
  2391. CSelectionObject.prototype._populateJsonContextObj=function(_19a,_19b,_19c,mun,_19e,_19f){
  2392. if(_19e&&_19f&&_19a&&typeof _19e[_19a]=="undefined"){
  2393. var _1a0=_19c?_19c:_19b;
  2394. _19e[_19a]=[_1a0];
  2395. var _1a1={};
  2396. if(_19c){
  2397. _1a1["caption"]=_19c;
  2398. }
  2399. if(mun){
  2400. _1a1["mun"]=mun;
  2401. }
  2402. if(_19b){
  2403. _1a1["use"]=_19b;
  2404. }
  2405. _19f.push(_1a1);
  2406. }
  2407. };
  2408. CSelectionObject.prototype._createGenericPayloadStructureJson=function(_1a2,_1a3,_1a4,_1a5){
  2409. if(_1a2&&_1a3&&_1a4){
  2410. var _1a6=(_1a5)?_1a5:".";
  2411. var _1a7={};
  2412. _1a7[_1a6]={"values":_1a4};
  2413. var obj={"com.ibm.widget.context":{"values":_1a3},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_1a2,"itemSpecification":_1a7}}};
  2414. return obj;
  2415. }
  2416. return null;
  2417. };
  2418. CSelectionObject.prototype.populateSelectionPayload=function(_1a9,_1aa,_1ab){
  2419. this.getDataItems();
  2420. this.getUseValues();
  2421. if(this.m_contextIds.length==0){
  2422. return false;
  2423. }
  2424. _1ab=((_1ab===undefined)?false:_1ab);
  2425. var _1ac=this.m_selectionController;
  2426. for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
  2427. var _1af=(_1ab?1:this.m_aDataItems[i].length);
  2428. for(;j<_1af;j++){
  2429. if(!_1ac.isMeasure(this.m_contextIds[i][j])){
  2430. var _1b0=this.m_aDataItems[i][j];
  2431. this._populateItemInSelectionPayload(_1b0,this.m_aUseValues[i][j],_1ac.getDisplayValue(this.m_contextIds[i][j]),_1ac.getMun(this.m_contextIds[i][j]),_1a9,_1aa);
  2432. }
  2433. }
  2434. }
  2435. return true;
  2436. };
  2437. CSelectionObject.prototype._populateItemInSelectionPayload=function(_1b1,_1b2,_1b3,mun,_1b5,_1b6){
  2438. if(_1b5&&_1b1){
  2439. var _1b7=_1b2?_1b2:_1b3;
  2440. if(_1b5[_1b1]){
  2441. _1b5[_1b1].push(_1b7);
  2442. }else{
  2443. _1b5[_1b1]=[_1b7];
  2444. }
  2445. var _1b8={};
  2446. _1b8["caption"]=_1b7;
  2447. if(mun){
  2448. _1b8["mun"]=mun;
  2449. }
  2450. var _1b9=_1b6[_1b1];
  2451. if(!_1b9){
  2452. _1b9={"values":[]};
  2453. _1b6[_1b1]=_1b9;
  2454. }
  2455. _1b9.values.push(_1b8);
  2456. }
  2457. };
  2458. CSelectionObject.prototype.getCtxAttributeString=function(){
  2459. return this.m_ctxAttributeString;
  2460. };
  2461. CSelectionObject.prototype.isDataValueOrChartElement=function(){
  2462. return (this.m_sLayoutType==="datavalue"||this.m_sLayoutType==="chartElement");
  2463. };
  2464. CSelectionObject.prototype.marshal=function(_1ba,_1bb){
  2465. if(!this.m_oJsonForMarshal){
  2466. var _1bc={};
  2467. var _1bd=[];
  2468. var _1be=null;
  2469. this.getDataItems();
  2470. this.getUseValues();
  2471. if(this.m_contextIds.length==0){
  2472. return null;
  2473. }
  2474. var i=0,j=0;
  2475. if(this.m_contextIds[i][j].length==0){
  2476. var _1c1=false;
  2477. do{
  2478. for(;j<this.m_contextIds[i].length;j++){
  2479. if(this.m_contextIds[i][j].length>0){
  2480. _1c1=true;
  2481. break;
  2482. }
  2483. }
  2484. if(!_1c1){
  2485. j=0;
  2486. i++;
  2487. }
  2488. }while(!_1c1);
  2489. }
  2490. var _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba);
  2491. var _1c3=_1ba.isMeasure(this.m_contextIds[i][j]);
  2492. var _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager());
  2493. var _1c5=_1ba.getCCDManager().GetQuery(this.m_contextIds[i][j]);
  2494. var _1c6=this.isDataValueOrChartElement();
  2495. var _1c7=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]),_1c6);
  2496. j++;
  2497. var _1c8=[];
  2498. for(;i<this.m_aDataItems.length;i++,j=0){
  2499. for(;j<this.m_aDataItems[i].length;j++){
  2500. _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba);
  2501. _1c3=_1ba.isMeasure(this.m_contextIds[i][j]);
  2502. _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager());
  2503. var _1c9=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]));
  2504. if(_1c9){
  2505. _1c8.push(_1c9);
  2506. }
  2507. }
  2508. }
  2509. var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
  2510. if(lid&&lid.indexOf(_1bb)>0){
  2511. lid=lid.substring(0,lid.indexOf(_1bb)-1);
  2512. }
  2513. this.m_oJsonForMarshal={"lid":lid,"query":_1c5,"selectedItem":_1c7,"context":_1c8};
  2514. }
  2515. return this.m_oJsonForMarshal;
  2516. };
  2517. CSelectionObject.prototype._populateJsonForMarshal=function(_1cb,_1cc,_1cd,_1ce,_1cf,mun,_1d1){
  2518. if(_1cb){
  2519. var _1d2={};
  2520. _1d2["itemName"]=_1cb;
  2521. _1d2["isMeasure"]=_1cd?"true":"false";
  2522. _1d2["mdProperty"]=_1cc.mdProperty;
  2523. _1d2["mdValue"]=_1cc.mdValue;
  2524. _1d2["isDataValueOrChartElement"]=_1d1?"true":"false";
  2525. if(mun){
  2526. _1d2["mun"]=mun;
  2527. }
  2528. if(_1ce){
  2529. _1d2["use"]=_1ce;
  2530. }
  2531. return _1d2;
  2532. }
  2533. return null;
  2534. };
  2535. CSelectionObject.prototype._getBestPossibleItemReference=function(_1d3,_1d4,_1d5){
  2536. var _1d6=null;
  2537. var _1d7=null;
  2538. if(_1d4){
  2539. _1d7="i";
  2540. _1d6=_1d5.GetQMID(_1d3);
  2541. if(_1d6==null){
  2542. _1d7="m";
  2543. _1d6=_1d5.GetMUN(_1d3);
  2544. }
  2545. if(_1d6==null){
  2546. _1d7="r";
  2547. _1d6=_1d5.GetRDIValue(_1d3);
  2548. }
  2549. }else{
  2550. _1d7="l";
  2551. _1d6=_1d5.GetLUN(_1d3);
  2552. if(_1d6==null){
  2553. _1d7="h";
  2554. _1d6=_1d5.GetHUN(_1d3);
  2555. }
  2556. if(_1d6==null){
  2557. _1d7="i";
  2558. _1d6=_1d5.GetQMID(_1d3);
  2559. }
  2560. if(_1d6==null){
  2561. _1d7="r";
  2562. _1d6=_1d5.GetRDIValue(_1d3);
  2563. }
  2564. }
  2565. return {"mdProperty":_1d7,"mdValue":_1d6};
  2566. };
  2567. CSelectionChartObject.prototype=new CSelectionObject();
  2568. CSelectionChartObject.prototype.constructor=CSelectionChartObject;
  2569. CSelectionChartObject.baseclass=CSelectionObject.prototype;
  2570. function CSelectionChartObject(){
  2571. CSelectionChartObject.baseclass.initialize.call(this);
  2572. this.m_chartArea=null;
  2573. this.m_context="";
  2574. this.m_chartCtxAreas=[];
  2575. this.m_selectedVizChart=false;
  2576. };
  2577. CSelectionChartObject.prototype.isSelectionOnVizChart=function(){
  2578. return this.m_selectedVizChart;
  2579. };
  2580. CSelectionChartObject.prototype.setSelectionOnVizChart=function(_1d8){
  2581. var _1d9=this.m_selectionController.getSelectedChartImageFromChartArea(_1d8);
  2582. if(_1d9){
  2583. this.m_selectedVizChart=_1d9.parentNode.getAttribute("vizchart")=="true"?true:false;
  2584. }
  2585. };
  2586. CSelectionChartObject.prototype.getArea=function(){
  2587. return this.m_chartArea;
  2588. };
  2589. CSelectionChartObject.prototype.getContext=function(){
  2590. return this.m_context;
  2591. };
  2592. CSelectionChartObject.prototype.getCtxAreas=function(){
  2593. return this.m_chartCtxAreas;
  2594. };
  2595. CSelectionChartObject.prototype.setCtxAreas=function(_1da){
  2596. this.m_chartCtxAreas=_1da;
  2597. };
  2598. CSelectionChartObject.prototype.getCtxAttributeString=function(){
  2599. return this.m_context;
  2600. };
  2601. function CChartHelper(_1db,_1dc,_1dd){
  2602. var _1de=_1db.parentNode;
  2603. this.m_selectionObjectFactory=_1dc;
  2604. this.m_map=_1de;
  2605. _1dd.loadExtra();
  2606. this.imageMapHighlighter=new CImageMapHighlight(_1de,_1dd.sWebContentRoot);
  2607. this.initialize();
  2608. };
  2609. CChartHelper.prototype.initialize=function(){
  2610. this.buildMapCtxAreas();
  2611. this.m_chartCtxNodes={};
  2612. };
  2613. CChartHelper.prototype.buildMapCtxAreas=function(){
  2614. var _1df={};
  2615. var _1e0=this.m_map.childNodes;
  2616. var _1e1=_1e0.length;
  2617. var _1e2=null;
  2618. for(var i=0;i<_1e1;i++){
  2619. var a=_1e0[i];
  2620. _1e2=a.getAttribute("ctx");
  2621. if(_1e2){
  2622. if(_1df[_1e2]){
  2623. _1df[_1e2].push(a);
  2624. }else{
  2625. _1df[_1e2]=[a];
  2626. }
  2627. }
  2628. }
  2629. this.m_ctxAreas=_1df;
  2630. };
  2631. CChartHelper.prototype.getChartNode=function(_1e5){
  2632. if(!this.isAreaInitialized(_1e5)){
  2633. var _1e6=_1e5.parentNode;
  2634. this.m_map=_1e6;
  2635. this.initialize();
  2636. this.imageMapHighlighter.initialize(_1e6);
  2637. }
  2638. var _1e7=_1e5.getAttribute("ctx");
  2639. if(!this.m_chartCtxNodes[_1e7]){
  2640. this.m_chartCtxNodes[_1e7]=this.m_selectionObjectFactory.getSelectionChartObject(_1e5);
  2641. this.m_chartCtxNodes[_1e7].setCtxAreas(this.m_ctxAreas[_1e7]);
  2642. }
  2643. return this.m_chartCtxNodes[_1e7];
  2644. };
  2645. CChartHelper.prototype.isAreaInitialized=function(_1e8){
  2646. return this.imageMapHighlighter.isAreaInitialized(_1e8);
  2647. };
  2648. CChartHelper.prototype.getImageMapHighlighter=function(){
  2649. return this.imageMapHighlighter;
  2650. };
  2651. function CSelectionObjectFactory(_1e9){
  2652. this.m_selectionController=_1e9;
  2653. };
  2654. CSelectionObjectFactory.prototype.getSelectionController=function(){
  2655. return this.m_selectionController;
  2656. };
  2657. CSelectionObjectFactory.prototype.getChildSpans=function(_1ea){
  2658. var _1eb=[];
  2659. for(var i=0;i<_1ea.childNodes.length;i++){
  2660. var _1ed=_1ea.childNodes[i];
  2661. if(!_1ed.getAttribute||_1ed.getAttribute("skipSelection")!="true"){
  2662. _1eb.push(_1ea.childNodes[i]);
  2663. }
  2664. }
  2665. var _1ee=_1ea;
  2666. var _1ef="";
  2667. while(!_1ef&&_1ee){
  2668. _1ef=_1ee.attributes?_1ee.attributes["LID"]:"";
  2669. _1ee=_1ee.parentNode;
  2670. }
  2671. _1ef=_1ef?_1ef.value:"";
  2672. var _1f0=[];
  2673. while(_1eb.length>0){
  2674. var _1ed=_1eb.pop();
  2675. var lid=_1ed.attributes?_1ed.attributes["LID"]:"";
  2676. lid=lid?lid.value:"";
  2677. if(!lid||lid==_1ef){
  2678. if(_1ed.nodeName.toLowerCase()=="span"){
  2679. _1f0.push(_1ed);
  2680. }else{
  2681. for(i=0;i<_1ed.childNodes.length;i++){
  2682. _1eb.push(_1ed.childNodes[i]);
  2683. }
  2684. }
  2685. }
  2686. }
  2687. return _1f0;
  2688. };
  2689. CSelectionObjectFactory.prototype.getSelectionObject=function(_1f2,_1f3){
  2690. var _1f4=new CSelectionObject();
  2691. try{
  2692. _1f4.setSelectionController(this.getSelectionController());
  2693. _1f4.m_oCellRef=_1f2;
  2694. _1f4.m_sColumnRef=_1f2.getAttribute("cid");
  2695. _1f4.m_sCellTypeId=_1f2.getAttribute("uid");
  2696. _1f4.m_sLayoutType=_1f2.getAttribute("type");
  2697. _1f4.m_sTag=_1f2.getAttribute("tag");
  2698. _1f4.m_layoutElementId=this.getLayoutElementId(_1f2);
  2699. _1f4.m_dataContainerType=this.getContainerType(_1f2);
  2700. if(typeof cf!="undefined"){
  2701. var _1f5=cf.cfgGet("MiniQueryObj");
  2702. if(_1f5){
  2703. var _1f6=_1f5.findChildWithAttribute("tag",_1f4.m_sTag);
  2704. if(_1f6&&_1f6.getAttribute("id")!=null){
  2705. _1f4.m_sColumnName=_1f6.getAttribute("id");
  2706. }
  2707. }
  2708. }
  2709. var _1f7=this.getChildSpans(_1f2);
  2710. if(_1f7.length>0){
  2711. for(var i=0;i<_1f7.length;i++){
  2712. var _1f9=_1f7[i];
  2713. if(_1f9.nodeType==1&&_1f9.nodeName.toLowerCase()=="span"&&_1f9.style.visibility!="hidden"){
  2714. var _1fa=null;
  2715. if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""){
  2716. _1fa=_1f2;
  2717. }else{
  2718. if(_1f9.getAttribute("ctx")!=null&&_1f9.getAttribute("ctx")!=""){
  2719. _1fa=_1f9;
  2720. }else{
  2721. if(_1f9.getAttribute("dtTargets")&&_1f9.childNodes&&_1f9.childNodes.length){
  2722. for(var _1fb=0;_1fb<_1f9.childNodes.length;_1fb++){
  2723. if(_1f9.childNodes[_1fb].nodeType==1&&_1f9.childNodes[_1fb].style.visibility!="hidden"){
  2724. _1fa=_1f9.childNodes[_1fb];
  2725. }
  2726. }
  2727. }else{
  2728. for(var _1fc=0;_1fc<_1f9.childNodes.length;_1fc++){
  2729. var _1fd=_1f9.childNodes[_1fc];
  2730. if(typeof _1fd.getAttribute!="undefined"&&_1fd.getAttribute("ctx")!=null&&_1fd.getAttribute("ctx")!=""){
  2731. _1fa=_1fd;
  2732. break;
  2733. }
  2734. }
  2735. }
  2736. }
  2737. }
  2738. var _1fe="";
  2739. if(_1fa&&_1fa.getAttribute("ctx")){
  2740. _1fe=_1fa.getAttribute("ctx");
  2741. }
  2742. _1f4.m_aDisplayValues[_1f4.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_1fe,_1f2.parentNode);
  2743. if(typeof _1f3!="undefined"&&_1f3!=_1fe){
  2744. continue;
  2745. }
  2746. _1f4=this.processCTX(_1f4,_1fe);
  2747. }
  2748. }
  2749. }else{
  2750. if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""&&_1f4.m_sLayoutType=="datavalue"){
  2751. _1f4=this.processCTX(_1f4,_1f2.getAttribute("ctx"));
  2752. }
  2753. }
  2754. this.getSelectionController().processColumnTitleNode(_1f4);
  2755. }
  2756. catch(ex){
  2757. }
  2758. return _1f4;
  2759. };
  2760. CSelectionObjectFactory.prototype.processCTX=function(_1ff,_200){
  2761. if(typeof _200!="string"||_200.length==0){
  2762. return _1ff;
  2763. }
  2764. var ctx;
  2765. if(typeof _1ff.m_contextIds=="object"&&_1ff.m_contextIds!==null&&_1ff.m_contextIds.length>0){
  2766. var _202=_200.split("::");
  2767. for(ctx=0;ctx<_1ff.m_contextIds.length;++ctx){
  2768. try{
  2769. if(_202[ctx]){
  2770. _1ff.m_contextIds[ctx]=_1ff.m_contextIds[ctx].concat(_202[ctx].split(":"));
  2771. }
  2772. }
  2773. catch(e){
  2774. }
  2775. }
  2776. }else{
  2777. _1ff.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_200);
  2778. }
  2779. _1ff.m_ctxAttributeString=_200;
  2780. return _1ff;
  2781. };
  2782. CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_204,_205){
  2783. if(!_205){
  2784. _205=document;
  2785. }
  2786. var _206=new CSelectionObject();
  2787. _206.setSelectionController(this.getSelectionController());
  2788. _206.m_oCellRef=null;
  2789. _206.m_sColumnRef=null;
  2790. _206.m_sCellTypeId=null;
  2791. _206.refQuery="";
  2792. var _207=_205.getElementsByTagName("td");
  2793. for(var i=0;i<_207.length;i++){
  2794. var _209=_207[i].getAttribute("tag");
  2795. if(_209!=null&&_209!=""){
  2796. if(tag==_209){
  2797. var _20a=_207[i].className;
  2798. if(_20a!=null&&_209!=""){
  2799. if((_204=="columnTitle"&&_20a=="lt")||(_204=="datavalue"&&_20a=="lc")){
  2800. _206.m_sColumnRef=_207[i].getAttribute("cid");
  2801. _206.m_sCellTypeId=_207[i].getAttribute("uid");
  2802. break;
  2803. }
  2804. }
  2805. }
  2806. }
  2807. }
  2808. if(_206.m_sCellTypeId==null){
  2809. return null;
  2810. }
  2811. return _206;
  2812. };
  2813. CSelectionObjectFactory.prototype.getSelectionChartObject=function(_20b){
  2814. var _20c="";
  2815. if(_20b.getAttribute("flashChart")!=null){
  2816. if(typeof _20b.getCtx!="undefined"){
  2817. try{
  2818. _20c=_20b.getCtx();
  2819. }
  2820. catch(e){
  2821. _20c="";
  2822. }
  2823. }
  2824. }else{
  2825. _20c=_20b.getAttribute("ctx");
  2826. }
  2827. var _20d=new CSelectionChartObject();
  2828. _20d.setSelectionController(this.getSelectionController());
  2829. if(_20c!=null){
  2830. _20d.m_contextIds=_20c.split("::");
  2831. for(var ctx=0;ctx<_20d.m_contextIds.length;++ctx){
  2832. _20d.m_contextIds[ctx]=_20d.m_contextIds[ctx].split(":");
  2833. }
  2834. }
  2835. _20d.m_layoutElementId=this.getLayoutElementId(_20b);
  2836. _20d.m_sLayoutType=_20b.getAttribute("type");
  2837. _20d.m_chartArea=_20b;
  2838. _20d.m_context=_20c;
  2839. _20d.setSelectionOnVizChart(_20b);
  2840. return _20d;
  2841. };
  2842. CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_20f){
  2843. var _210="";
  2844. switch(_20f){
  2845. case "ls":
  2846. _210="list";
  2847. break;
  2848. case "xt":
  2849. _210="crosstab";
  2850. break;
  2851. case "rt":
  2852. _210="repeaterTable";
  2853. break;
  2854. }
  2855. return _210;
  2856. };
  2857. CSelectionObjectFactory.prototype.getContainerType=function(el){
  2858. var type="";
  2859. if(el){
  2860. if(el.className){
  2861. type=this.getContainerTypeFromClass(el.className);
  2862. }
  2863. if(!type){
  2864. var _213=el.parentNode;
  2865. if(_213){
  2866. type=this.getContainerType(_213);
  2867. }
  2868. }
  2869. }
  2870. return type;
  2871. };
  2872. CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
  2873. var id="";
  2874. var _216=this.getSelectionController().getNamespace();
  2875. if(el){
  2876. if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
  2877. for(var _217=0;_217<el.childNodes.length;_217++){
  2878. var _218=el.childNodes[_217];
  2879. if(_218.nodeName.toLowerCase()=="img"&&_218.getAttribute("lid")!=null){
  2880. return _218.getAttribute("lid");
  2881. }
  2882. }
  2883. }
  2884. id=(el.getAttribute&&el.getAttribute("LID"))||"";
  2885. if(!id){
  2886. var _219=el.parentNode;
  2887. if(_219){
  2888. id=this.getLayoutElementId(_219);
  2889. }
  2890. }else{
  2891. if(el.tagName.toUpperCase()=="MAP"){
  2892. id=id.replace(_216,"");
  2893. id=_216+id;
  2894. var _21a="#"+id;
  2895. var _21b=getElementsByAttribute(el.parentNode,"IMG","usemap",_21a);
  2896. if(_21b.length>0){
  2897. id=_21b[0].getAttribute("LID");
  2898. }
  2899. }
  2900. }
  2901. }
  2902. return id;
  2903. };
  2904. function CSelectionController(_21c,_21d){
  2905. this.m_bSelectionBasedFeaturesEnabled=false;
  2906. this.m_bDrillUpDownEnabled=false;
  2907. this.m_bModelDrillThroughEnabled=false;
  2908. this.m_oCognosViewer=null;
  2909. this.m_bSavedSelections=false;
  2910. if(_21d){
  2911. this.m_oCognosViewer=_21d;
  2912. }
  2913. this.initialize(_21c);
  2914. this.FILTER_SELECTION_STYLE=0;
  2915. this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
  2916. };
  2917. CSelectionController.prototype.initialize=function(_21e){
  2918. this.m_sNamespace=_21e;
  2919. this.m_aCutColumns=[];
  2920. this.m_aSelectedObjects=[];
  2921. this.m_selectedClass=[];
  2922. this.m_cutClass=[];
  2923. this.m_oObserver=new CObserver(this);
  2924. this.m_bSelectionArraysSetup=false;
  2925. this.m_aSelectionHoverNodes=[];
  2926. this.m_bUsingCCDManager=false;
  2927. this.m_aReportMetadataArray=[];
  2928. this.m_aReportContextDataArray=[];
  2929. this.m_oCDManager=new CCDManager();
  2930. this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this);
  2931. this.m_selectedChartArea=null;
  2932. this.m_selectedChartNodes=[];
  2933. this.m_selectionContainerMap=null;
  2934. this.m_chartHelpers={};
  2935. if(this.m_oCognosViewer!=null){
  2936. this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer);
  2937. }
  2938. this.m_maxSecondarySelection=-1;
  2939. this.c_usageMeasure="2";
  2940. this.m_ccl_dateTypes={59:"dateTime",60:"interval"};
  2941. this.m_selectionStyles=new CSelectionDefaultStyles(this);
  2942. this.m_originalSelectionStyles=this.m_selectionStyles;
  2943. this.m_bAllowHorizontalDataValueSelection=false;
  2944. };
  2945. CSelectionController.prototype.secondarySelectionIsDisabled=function(){
  2946. return this.m_selectionStyles.secondarySelectionIsDisabled();
  2947. };
  2948. CSelectionController.prototype.getPrimarySelectionColor=function(){
  2949. return this.m_selectionStyles.getPrimarySelectionColor();
  2950. };
  2951. CSelectionController.prototype.getHighContrastBorderStyle=function(){
  2952. return this.m_selectionStyles.getHighContrastBorderStyle();
  2953. };
  2954. CSelectionController.prototype.getSecondarySelectionColor=function(){
  2955. return this.m_selectionStyles.getSecondarySelectionColor();
  2956. };
  2957. CSelectionController.prototype.resetSelectionStyles=function(){
  2958. this.setSelectionStyles();
  2959. };
  2960. CSelectionController.prototype.setSelectionStyles=function(_21f){
  2961. switch(_21f){
  2962. case this.FILTER_SELECTION_STYLE:
  2963. if(!this.m_selectionFilterStyles){
  2964. this.m_selectionFilterStyles=new CSelectionFilterStyles(this);
  2965. }
  2966. this.m_selectionStyles=this.m_selectionFilterStyles;
  2967. break;
  2968. case this.FILTER_SELECTION_CONTEXT_MENU_STYLE:
  2969. if(!this.m_selectionFilterContextMenuStyles){
  2970. this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this);
  2971. }
  2972. this.m_selectionStyles=this.m_selectionFilterContextMenuStyles;
  2973. break;
  2974. default:
  2975. this.m_selectionStyles=this.m_originalSelectionStyles;
  2976. }
  2977. };
  2978. CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){
  2979. this.m_bAllowHorizontalDataValueSelection=false;
  2980. };
  2981. CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_220){
  2982. this.m_bAllowHorizontalDataValueSelection=_220;
  2983. };
  2984. CSelectionController.prototype.allowHorizontalDataValueSelection=function(){
  2985. return this.m_bAllowHorizontalDataValueSelection;
  2986. };
  2987. CSelectionController.prototype.clearSelectionData=function(){
  2988. this.m_aSelectedObjects=[];
  2989. this.m_selectedChartNodes=[];
  2990. this.m_oSelectedDrillThroughImage=null;
  2991. this.m_oSelectedDrillThroughSingleton=null;
  2992. };
  2993. CSelectionController.prototype.getCCDManager=function(){
  2994. return this.m_oCDManager;
  2995. };
  2996. CSelectionController.prototype.getCtxIdFromDisplayValue=function(_221){
  2997. if(!this.m_bUsingCCDManager){
  2998. var _222=this.getReportContextDataArray();
  2999. var _223=1;
  3000. for(var _224 in _222){
  3001. var _225=_222[_224];
  3002. if(_225[_223]==_221){
  3003. return _224;
  3004. }
  3005. }
  3006. return "";
  3007. }else{
  3008. var sId=this.m_oCDManager.GetContextIdForDisplayValue(_221);
  3009. return (sId==null)?"":sId;
  3010. }
  3011. };
  3012. CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_229){
  3013. return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_229);
  3014. };
  3015. CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){
  3016. var sLun=lun;
  3017. var sHun=hun;
  3018. if(mun&&mun.indexOf("->:[TM].")>0){
  3019. sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun);
  3020. sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun);
  3021. }
  3022. return {"lun":sLun,"hun":sHun};
  3023. };
  3024. CSelectionController.prototype.getCtxIdFromMun=function(sMun){
  3025. if(!this.m_bUsingCCDManager){
  3026. var _230=this.getReportMetadataArray();
  3027. var _231=0;
  3028. for(var sKey in _230){
  3029. var _233=_230[sKey];
  3030. if(_233[_231]==sMun){
  3031. var _234=2;
  3032. var _235=this.getReportContextDataArray();
  3033. for(var _236 in _235){
  3034. var _237=_235[_236];
  3035. if(_237[_234]==sKey){
  3036. return _236;
  3037. }
  3038. }
  3039. }
  3040. }
  3041. return "";
  3042. }else{
  3043. var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
  3044. return (sId==null)?"":sId;
  3045. }
  3046. };
  3047. CSelectionController.prototype.canDrillDown=function(_239){
  3048. var _23a=this.getDrillFlagForMember(_239);
  3049. return (_23a==3||_23a==2);
  3050. };
  3051. CSelectionController.prototype.canDrillUp=function(_23b){
  3052. var _23c=this.getDrillFlagForMember(_23b);
  3053. return (_23c==3||_23c==1);
  3054. };
  3055. CSelectionController.prototype.getQueryModelId=function(_23d){
  3056. var qmid="";
  3057. if(!this.m_bUsingCCDManager){
  3058. var _23f=this.m_aReportContextDataArray[_23d];
  3059. if(_23f&&typeof _23f[3]!="undefined"){
  3060. var _240=_23f[3];
  3061. var _241=this.m_aReportMetadataArray[_240];
  3062. if(typeof _241!="undefined"&&typeof _241[1]!="undefined"&&_241[1]=="I"){
  3063. qmid=_241[0];
  3064. }
  3065. }
  3066. }else{
  3067. qmid=this.m_oCDManager.GetQMID(_23d);
  3068. }
  3069. return qmid;
  3070. };
  3071. CSelectionController.prototype.getRefQuery=function(_242){
  3072. if(!this.m_bUsingCCDManager){
  3073. return this.getMetaDataItemUseValue(4,_242);
  3074. }else{
  3075. var _243=this.m_oCDManager.GetQuery(_242);
  3076. return (_243==null)?"":_243;
  3077. }
  3078. };
  3079. CSelectionController.prototype.getRefDataItem=function(_244){
  3080. return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_244);
  3081. };
  3082. CSelectionController.prototype.getMun=function(_245){
  3083. return this.m_oCognosViewer.getReportContextHelper().getMun(_245);
  3084. };
  3085. CSelectionController.prototype.getHun=function(_246){
  3086. if(!this.m_bUsingCCDManager){
  3087. var sHun=null;
  3088. var _248=this.getRDI(_246);
  3089. if(_248&&_248.length>4&&_248[1]=="R"){
  3090. var _249=_248[4];
  3091. var _24a=this.getReportMetadataArray();
  3092. _248=_24a[_249];
  3093. }
  3094. if(_248&&_248.length>1&&_248[1]=="H"){
  3095. sHun=_248[0];
  3096. }
  3097. return sHun;
  3098. }else{
  3099. return this.m_oCDManager.GetHUN(_246);
  3100. }
  3101. };
  3102. CSelectionController.prototype.fetchContextData=function(_24b,_24c){
  3103. var _24d=0;
  3104. if(this.m_bUsingCCDManager){
  3105. _24d=this.m_oCDManager.FetchContextData(_24b,_24c);
  3106. }
  3107. return _24d;
  3108. };
  3109. CSelectionController.prototype.getMetaDataItem=function(sKey){
  3110. var _24f=this.getReportMetadataArray();
  3111. if(typeof _24f[sKey]!="undefined"){
  3112. return _24f[sKey];
  3113. }
  3114. return null;
  3115. };
  3116. CSelectionController.prototype.getContextDataItem=function(_250){
  3117. var _251=this.getReportContextDataArray();
  3118. if(typeof _251[_250]!="undefined"){
  3119. return _251[_250];
  3120. }
  3121. return null;
  3122. };
  3123. CSelectionController.prototype.getMetaDataItemUseValue=function(_252,_253){
  3124. var _254=this.getContextDataItem(_253);
  3125. if(_254!=null){
  3126. var _255=_254[_252];
  3127. if(_255!=""){
  3128. var _256=this.getMetaDataItem(_255);
  3129. if(_256!=null){
  3130. return _256[0];
  3131. }
  3132. }
  3133. }
  3134. return "";
  3135. };
  3136. CSelectionController.prototype.getRDI=function(_257){
  3137. var _258=this.getContextDataItem(_257);
  3138. if(_258!=null){
  3139. var _259=_258[0];
  3140. if(_259!=""){
  3141. var _25a=this.getMetaDataItem(_259);
  3142. if(_25a!=null){
  3143. return _25a;
  3144. }
  3145. }
  3146. }
  3147. };
  3148. CSelectionController.prototype.getNamespace=function(){
  3149. return this.m_sNamespace;
  3150. };
  3151. CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_25b){
  3152. this.m_bSelectionBasedFeaturesEnabled=_25b;
  3153. };
  3154. CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
  3155. return this.m_bSelectionBasedFeaturesEnabled;
  3156. };
  3157. CSelectionController.prototype.setDrillUpDownEnabled=function(_25c){
  3158. this.m_bDrillUpDownEnabled=_25c;
  3159. };
  3160. CSelectionController.prototype.getDrillUpDownEnabled=function(){
  3161. return this.m_bDrillUpDownEnabled;
  3162. };
  3163. CSelectionController.prototype.setModelDrillThroughEnabled=function(_25d){
  3164. this.m_bModelDrillThroughEnabled=_25d;
  3165. };
  3166. CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
  3167. var _25e=this.getAllSelectedObjects();
  3168. if(_25e&&_25e.length>0){
  3169. var _25f=_25e[0];
  3170. if(_25f.hasContextInformation()){
  3171. var _260=this.m_oCDManager.GetBIValue(_25f.m_contextIds[0][0]);
  3172. if(!_260){
  3173. return null;
  3174. }
  3175. return _260;
  3176. }
  3177. }
  3178. return null;
  3179. };
  3180. CSelectionController.prototype.getModelPathForCurrentSelection=function(){
  3181. var _261=null;
  3182. var _262=this.getBookletItemForCurrentSelection();
  3183. if(_262){
  3184. var _261=this.m_oCDManager.getModelPathFromBookletItem(_262);
  3185. }
  3186. return _261;
  3187. };
  3188. CSelectionController.prototype.getModelDrillThroughEnabled=function(){
  3189. var _263=this.getBookletItemForCurrentSelection();
  3190. if(_263){
  3191. var _264=this.m_oCDManager.GetBookletModelBasedDrillThru(_263);
  3192. return _264==1?true:false;
  3193. }else{
  3194. return this.m_bModelDrillThroughEnabled;
  3195. }
  3196. };
  3197. CSelectionController.prototype.clearSelectedObjects=function(_265){
  3198. try{
  3199. if(!_265){
  3200. _265=document;
  3201. }
  3202. this.updateUI(_265,this.getSelections(),true,false);
  3203. this.m_aSelectedObjects=[];
  3204. if(typeof this.onSelectionChange=="function"){
  3205. this.onSelectionChange();
  3206. }
  3207. return true;
  3208. }
  3209. catch(e){
  3210. return false;
  3211. }
  3212. };
  3213. CSelectionController.prototype.resetSelections=function(_266){
  3214. try{
  3215. if(!_266){
  3216. _266=document;
  3217. }
  3218. if(this.hasSelectedChartNodes()){
  3219. this.resetChartSelections(_266);
  3220. }
  3221. this.m_oSelectedDrillThroughImage=null;
  3222. this.m_oSelectedDrillThroughSingleton=null;
  3223. if(this.getSelections()){
  3224. this.updateUI(_266,this.getSelections(),true,false);
  3225. this.updateUI(_266,this.getCutColumns(),true,false);
  3226. this.m_aCutColumns=[];
  3227. this.m_aSelectedObjects=[];
  3228. this.m_selectedClass=[];
  3229. this.m_cutClass=[];
  3230. if(typeof this.onSelectionChange=="function"){
  3231. this.onSelectionChange();
  3232. }
  3233. }
  3234. return true;
  3235. }
  3236. catch(e){
  3237. return false;
  3238. }
  3239. };
  3240. CSelectionController.prototype.resetChartSelections=function(_267){
  3241. var _268=this.m_chartHelpers;
  3242. for(var _269 in _268){
  3243. if(_268[_269]){
  3244. var _26a=_268[_269].getImageMapHighlighter();
  3245. if(_26a.hideAllAreas){
  3246. _26a.hideAllAreas();
  3247. }
  3248. }
  3249. }
  3250. this.m_selectedChartNodes=[];
  3251. this.m_selectionContainerMap=null;
  3252. };
  3253. CSelectionController.prototype.addSelectionObject=function(_26b,_26c){
  3254. try{
  3255. if(!_26c){
  3256. _26c=document;
  3257. }
  3258. var _26d=_26b.getCellRef();
  3259. if(this.isCellSelected(_26d)!==true||(typeof _26d!="object"||_26d===null)){
  3260. if(this.isColumnCut(_26b.getTag())!==true){
  3261. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_26b;
  3262. if(typeof this.onSelectionChange=="function"){
  3263. this.onSelectionChange();
  3264. }
  3265. this.updateUI(_26c,this.getSelections(),false,false);
  3266. }
  3267. }
  3268. return true;
  3269. }
  3270. catch(e){
  3271. return false;
  3272. }
  3273. };
  3274. CSelectionController.prototype.removeSelectionObject=function(_26e,_26f){
  3275. try{
  3276. if(!_26f){
  3277. _26f=document;
  3278. }
  3279. var _270=[];
  3280. var _271;
  3281. for(_271=0;_271<this.m_aSelectedObjects.length;_271++){
  3282. var _272=this.m_aSelectedObjects[_271].getCellRef();
  3283. var _273=_26e.getCellRef();
  3284. if(typeof _272=="object"&&typeof _273=="object"&&_272!==null&&_273!==null){
  3285. if(_272==_273){
  3286. _270[_270.length]=_271;
  3287. }
  3288. }
  3289. }
  3290. if(_270.length>0){
  3291. this.updateUI(_26f,this.getSelections(),true,false);
  3292. var _274=[];
  3293. for(_271=0;_271<this.m_aSelectedObjects.length;_271++){
  3294. var _275=true;
  3295. for(var j=0;j<_270.length;j++){
  3296. if(_271==_270[j]){
  3297. _275=false;
  3298. }
  3299. }
  3300. if(_275){
  3301. _274[_274.length]=this.m_aSelectedObjects[_271];
  3302. }
  3303. }
  3304. this.m_aSelectedObjects=_274;
  3305. this.updateUI(_26f,this.getSelections(),false,false);
  3306. }
  3307. if(typeof this.onSelectionChange=="function"){
  3308. this.onSelectionChange();
  3309. }
  3310. return true;
  3311. }
  3312. catch(e){
  3313. return false;
  3314. }
  3315. };
  3316. CSelectionController.prototype.isSavedCellSelected=function(_277){
  3317. return this.isCellSelectedHelper(_277,this.getSavedSelectedObjects());
  3318. };
  3319. CSelectionController.prototype.isCellSelected=function(_278){
  3320. return this.isCellSelectedHelper(_278,this.getSelections());
  3321. };
  3322. CSelectionController.prototype.isCellSelectedHelper=function(_279,_27a){
  3323. try{
  3324. for(var i=0;i<_27a.length;i++){
  3325. var _27c=_27a[i].getCellRef();
  3326. if(typeof _27c=="object"&&_27c!==null){
  3327. if(_27c==_279){
  3328. return true;
  3329. }
  3330. }
  3331. }
  3332. }
  3333. catch(e){
  3334. }
  3335. return false;
  3336. };
  3337. CSelectionController.prototype.isColumnSelected=function(_27d){
  3338. try{
  3339. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  3340. if(this.m_aSelectedObjects[i].getTag()==_27d){
  3341. return true;
  3342. }
  3343. }
  3344. }
  3345. catch(e){
  3346. }
  3347. return false;
  3348. };
  3349. CSelectionController.prototype.isColumnCut=function(_27f){
  3350. try{
  3351. for(var i=0;i<this.m_aCutColumns.length;i++){
  3352. if(this.m_aCutColumns[i].getTag()==_27f){
  3353. return true;
  3354. }
  3355. }
  3356. }
  3357. catch(e){
  3358. }
  3359. return false;
  3360. };
  3361. CSelectionController.prototype.getSelections=function(){
  3362. return this.m_aSelectedObjects;
  3363. };
  3364. CSelectionController.prototype.selectSingleDomNode=function(_281){
  3365. this.clearSelectedObjects();
  3366. var _282=this.getSelectionObjectFactory().getSelectionObject(_281);
  3367. var _283=null;
  3368. if(isIE()){
  3369. _283=_281.document;
  3370. }else{
  3371. _283=_281.ownerDocument;
  3372. }
  3373. this.addSelectionObject(_282,_283);
  3374. };
  3375. CSelectionController.prototype.hasCutColumns=function(){
  3376. if(this.m_aCutColumns.length===0){
  3377. return false;
  3378. }else{
  3379. return true;
  3380. }
  3381. };
  3382. CSelectionController.prototype.setCutColumns=function(_284,_285){
  3383. try{
  3384. if(!_285){
  3385. _285=document;
  3386. }
  3387. this.updateUI(_285,this.getSelections(),true,false);
  3388. this.updateUI(_285,this.getCutColumns(),true,1);
  3389. this.m_aCutColumns=[];
  3390. if(_284===true){
  3391. for(var i=0;i<this.m_aSelectedObjects.length;i++){
  3392. this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
  3393. }
  3394. this.m_aSelectedObjects=[];
  3395. }
  3396. this.updateUI(_285,this.getCutColumns(),false,2);
  3397. return true;
  3398. }
  3399. catch(e){
  3400. return false;
  3401. }
  3402. };
  3403. CSelectionController.prototype.getCutColumns=function(){
  3404. return this.m_aCutColumns;
  3405. };
  3406. CSelectionController.prototype.getObservers=function(){
  3407. return this.m_oObserver;
  3408. };
  3409. CSelectionController.prototype.attachObserver=function(_287){
  3410. this.m_oObserver.attach(_287);
  3411. };
  3412. CSelectionController.prototype.onSelectionChange=function(){
  3413. this.getObservers().notify();
  3414. };
  3415. CSelectionController.prototype.getSelectedColumns=function(_288){
  3416. var _289=[];
  3417. if(typeof _288=="undefined"){
  3418. _288=this.getSelections();
  3419. }
  3420. var _28a=_288.length;
  3421. for(var i=0;i<_28a;i++){
  3422. var _28c=_288[i];
  3423. var _28d=true;
  3424. for(var j=0;j<_289.length;j++){
  3425. if(_289[j][0]==_28c.getColumnRef()&&_289[j][1]==_28c.getCellTypeId()){
  3426. _28d=false;
  3427. break;
  3428. }
  3429. }
  3430. if(_28d){
  3431. _289[_289.length]=[_28c.getColumnRef(),_28c.getCellTypeId(),_28c.getLayoutType(),_28c.getTag(),_28c.getColumnName()];
  3432. }
  3433. }
  3434. return _289;
  3435. };
  3436. CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
  3437. var _28f=[];
  3438. var _290=this.getAllSelectedObjects();
  3439. for(var i=0;i<_290.length;i++){
  3440. var _292=false;
  3441. var _293=_290[i];
  3442. for(var ii=0;ii<_28f.length;ii++){
  3443. if(_293.m_contextIds[0][0]==_28f[ii].m_contextIds[0][0]){
  3444. _292=true;
  3445. break;
  3446. }
  3447. }
  3448. if(!_292){
  3449. _28f.push(_293);
  3450. }
  3451. }
  3452. return _28f;
  3453. };
  3454. CSelectionController.prototype.getAllSelectedObjects=function(){
  3455. var _295=this.getSelections();
  3456. if(this.hasSelectedChartNodes()){
  3457. _295=_295.concat(this.getSelectedChartNodes());
  3458. }
  3459. return _295;
  3460. };
  3461. CSelectionController.prototype.getSelectedColumnIds=function(_296){
  3462. var _297=[];
  3463. if(typeof _296=="undefined"){
  3464. _296=this.getSelections();
  3465. }
  3466. var _298=this.getSelectedColumns(_296);
  3467. for(var _299=0;_299<_298.length;_299++){
  3468. var _29a=true;
  3469. for(var _29b=0;_29b<_297.length;_29b++){
  3470. if(_297[_29b]==_298[_299][4]){
  3471. _29a=false;
  3472. break;
  3473. }
  3474. }
  3475. if(_29a){
  3476. _297[_297.length]=_298[_299][4];
  3477. }
  3478. }
  3479. return _297;
  3480. };
  3481. var STYLE_SELECTION={};
  3482. CSelectionController.prototype.selecting=function(c,_29d){
  3483. var _29e="."+c+_29d;
  3484. var doc=document;
  3485. var _2a0=document.getElementById("CVIFrame"+this.m_sNamespace);
  3486. if(_2a0){
  3487. doc=_2a0.contentWindow.document;
  3488. }
  3489. var _2a1=doc.createElement("style");
  3490. _2a1.setAttribute("type","text/css");
  3491. if(_2a1.styleSheet){
  3492. _2a1.styleSheet.cssText=_29e;
  3493. }else{
  3494. _2a1.appendChild(doc.createTextNode(_29e));
  3495. }
  3496. doc.getElementsByTagName("head").item(0).appendChild(_2a1);
  3497. STYLE_SELECTION[c]=_2a1;
  3498. };
  3499. CSelectionController.prototype.deselecting=function(_2a2){
  3500. for(var i=0;i<_2a2.length;++i){
  3501. if(STYLE_SELECTION[_2a2[i]]){
  3502. var node=STYLE_SELECTION[_2a2[i]];
  3503. node.parentNode.removeChild(node);
  3504. STYLE_SELECTION[_2a2[i]]=null;
  3505. }
  3506. }
  3507. if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
  3508. var _2a5=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
  3509. if(_2a5!=null){
  3510. var _2a6=_2a5.style.display;
  3511. _2a5.style.display="none";
  3512. _2a5.style.display=_2a6;
  3513. }
  3514. }
  3515. };
  3516. CSelectionController.prototype.showViewerContextMenu=function(){
  3517. if(this.hasSelectedChartNodes()){
  3518. return true;
  3519. }
  3520. if(this.m_aSelectedObjects&&this.m_aSelectedObjects.length>0){
  3521. return true;
  3522. }
  3523. return false;
  3524. };
  3525. function getStyleFromClass(c){
  3526. for(var i=0;i<document.styleSheets.length;i++){
  3527. var ss=document.styleSheets[i];
  3528. var _2aa=(ss.cssRules?ss.cssRules:ss.rules);
  3529. for(var j=0;j<_2aa.length;j++){
  3530. var cr=_2aa[j];
  3531. var _2ad=new RegExp("\\b"+c+"\\b","g");
  3532. if(cr.selectorText&&cr.selectorText.match(_2ad)){
  3533. return cr;
  3534. }
  3535. }
  3536. }
  3537. return 0;
  3538. };
  3539. CSelectionController.prototype.canUpdateSelection=function(_2ae){
  3540. return this.m_selectionStyles.canApplyToSelection(_2ae);
  3541. };
  3542. CSelectionController.prototype.setStyleForSelection=function(_2af){
  3543. return this.m_selectionStyles.setStyleForSelection(_2af);
  3544. };
  3545. CSelectionController.prototype.updateUI=function(_2b0,_2b1,_2b2,_2b3){
  3546. if(!_2b0){
  3547. _2b0=document;
  3548. }
  3549. try{
  3550. if(_2b1&&_2b1.length>0){
  3551. var _2b4,_2b5,_2b6;
  3552. if(_2b3==1||_2b3==2){
  3553. if(_2b2){
  3554. this.deselecting(this.m_cutClass);
  3555. }else{
  3556. var _2b7=getStyleFromClass("cutSelection").style.color;
  3557. var _2b8=getStyleFromClass("cutSelection").style.backgroundColor;
  3558. _2b4=_2b1.length;
  3559. for(_2b5=0;_2b5<_2b4;_2b5++){
  3560. _2b6=_2b1[_2b5].getCellRef();
  3561. var _2b9="cutQS"+_2b6.getAttribute("cid");
  3562. this.selecting(_2b9,"\n{ background-color: "+_2b8+"; color: "+_2b7+";}\n");
  3563. this.m_cutClass.push(_2b9);
  3564. }
  3565. }
  3566. }else{
  3567. if(this.m_oCognosViewer){
  3568. this.findSelectionURLs();
  3569. _2b6="";
  3570. _2b4=_2b1.length;
  3571. for(_2b5=0;_2b5<_2b4;_2b5++){
  3572. _2b6=_2b1[_2b5].getCellRef();
  3573. if(_2b6.getAttribute("oldClassName")!=null){
  3574. _2b6.className=_2b6.getAttribute("oldClassName");
  3575. _2b6.removeAttribute("oldClassName");
  3576. }
  3577. this.setStyleForSelection(_2b1[_2b5].m_contextIds);
  3578. if(!this.secondarySelectionIsDisabled()||_2b2){
  3579. var _2ba=document.getElementById("CVReport"+this.getNamespace());
  3580. var _2bb=getElementsByAttribute(_2ba,["td","th"],"name",_2b6.getAttribute("name"),this.m_maxSecondarySelection);
  3581. for(var _2bc=0;_2bc<_2bb.length;_2bc++){
  3582. var cell=_2bb[_2bc];
  3583. if(_2b2){
  3584. this.restoreOldBackgroundImage(cell);
  3585. }else{
  3586. if(cell.getAttribute("oldBackgroundImageStyle")==null){
  3587. this.saveOldCellStyles(cell);
  3588. this.setSecondarySelectionStyles(cell);
  3589. }
  3590. }
  3591. }
  3592. }
  3593. this.saveOldCellStyles(_2b6);
  3594. if(_2b2){
  3595. this.restoreOldBackgroundImage(_2b6);
  3596. if(this.m_oCognosViewer.isHighContrast()){
  3597. this.restoreOldBorder(_2b6);
  3598. this.restoreOldPadding(_2b6);
  3599. }
  3600. }else{
  3601. this.setPrimarySelectionStyles(_2b6);
  3602. if(this.m_oCognosViewer.isHighContrast()){
  3603. var size=getBoxInfo(_2b6,true);
  3604. this.saveOldBorder(_2b6);
  3605. this.saveOldPadding(_2b6,size);
  3606. var _2bf=3;
  3607. var _2c0=size.borderTopWidth+size.paddingTop-_2bf;
  3608. var _2c1=size.borderBottomWidth+size.paddingBottom-_2bf;
  3609. var _2c2=size.borderLeftWidth+size.paddingLeft-_2bf;
  3610. var _2c3=size.borderRightWidth+size.paddingRight-_2bf;
  3611. _2b6.style.border=_2bf+"px "+this.getHighContrastBorderStyle()+" black";
  3612. _2b6.style.padding=_2c0+"px "+_2c3+"px "+_2c1+"px "+_2c2+"px";
  3613. }
  3614. }
  3615. }
  3616. }
  3617. }
  3618. }
  3619. return true;
  3620. }
  3621. catch(e){
  3622. return false;
  3623. }
  3624. };
  3625. CSelectionController.prototype.findSelectionURLs=function(){
  3626. if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){
  3627. if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){
  3628. this.pS_backgroundImageURL="url(../common/images/selection_primary.png)";
  3629. this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)";
  3630. }else{
  3631. this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection"));
  3632. this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection"));
  3633. }
  3634. }
  3635. };
  3636. CSelectionController.prototype.setSelectedChartImgArea=function(_2c4){
  3637. var _2c5=true;
  3638. var _2c6=_2c4.getAttribute("rsvpChart");
  3639. var _2c7=_2c4.parentNode.getAttribute("chartContainer");
  3640. if(_2c6!="true"&&_2c7!="true"){
  3641. this.m_selectedChartNodes=[];
  3642. _2c5=false;
  3643. }else{
  3644. var _2c8=this.getSelectionObjectFactory().getSelectionChartObject(_2c4);
  3645. this.m_selectedChartNodes=[_2c8];
  3646. }
  3647. return _2c5;
  3648. };
  3649. CSelectionController.prototype.setSelectedChartArea=function(_2c9,e){
  3650. var _2cb=typeof this.m_oCognosViewer.isBux!=="undefined";
  3651. var _2cc=false;
  3652. if(_2c9!==null){
  3653. if(_2c9.tagName=="IMG"){
  3654. _2cc=this.setSelectedChartImgArea(_2c9);
  3655. }else{
  3656. if(_2c9.nodeName=="AREA"&&_2c9.attributes["ctx"]){
  3657. _2cc=true;
  3658. if(_2cb){
  3659. this.setBuxSelectedChartArea(_2c9,e);
  3660. }else{
  3661. this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_2c9)];
  3662. }
  3663. }
  3664. }
  3665. if(_2cc){
  3666. this.getObservers().notify();
  3667. }
  3668. }
  3669. return _2cc;
  3670. };
  3671. CSelectionController.prototype.setBuxSelectedChartArea=function(_2cd,e){
  3672. var _2cf=this.getChartHelper(_2cd);
  3673. var _2d0=_2cf.getChartNode(_2cd);
  3674. this.setStyleForSelection(_2d0.m_contextIds);
  3675. var _2d1=_2cf.getImageMapHighlighter();
  3676. _2d1.setFillColour(this.getPrimarySelectionColor());
  3677. _2d1.setStrokeColour(this.getPrimarySelectionColor());
  3678. if(typeof e=="undefined"){
  3679. e={};
  3680. }
  3681. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  3682. if(_2d1.isAreaHighlighted(_2cd)){
  3683. _2d1.hideAreas(_2d0.getCtxAreas());
  3684. var _2d2=_2cd.getAttribute("ctx");
  3685. var _2d3=this.m_selectedChartNodes.length;
  3686. for(var i=0;i<_2d3;i++){
  3687. var _2d5=this.m_selectedChartNodes[i];
  3688. if(_2d2==_2d5.getContext()){
  3689. this.m_selectedChartNodes.splice(i,1);
  3690. break;
  3691. }
  3692. }
  3693. }else{
  3694. this.updateSelectionContainer(_2cd);
  3695. _2d1.highlightAreas(_2d0.getCtxAreas(),true);
  3696. this.m_selectedChartNodes.push(_2d0);
  3697. }
  3698. }else{
  3699. if(this.hasSavedSelectedChartNodes()){
  3700. var _2d6=this.m_savedSelectedChartNodes.length;
  3701. var _2d7=this.m_savedSelectedChartNodes;
  3702. for(var i=0;i<_2d6;i++){
  3703. var area=_2d7[i].getArea();
  3704. var _2d9=this.getSavedChartHelper(area);
  3705. var _2da=_2d9.getImageMapHighlighter();
  3706. var _2db=_2da.getAreaId(area);
  3707. if(_2d1.getAreaId(_2cd)===_2db){
  3708. _2da.hideAreaById(_2db+this.m_savedPrimarySelectionColor);
  3709. break;
  3710. }
  3711. }
  3712. }
  3713. this.updateSelectionContainer(_2cd);
  3714. _2d1.highlightAreas(_2d0.getCtxAreas());
  3715. this.m_selectedChartNodes=[_2d0];
  3716. }
  3717. };
  3718. CSelectionController.prototype.updateSelectionContainer=function(_2dc){
  3719. var _2dd=_2dc.parentNode;
  3720. if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_2dd.name){
  3721. var _2de=this.getChartHelper(_2dc).getImageMapHighlighter();
  3722. _2de.hideAllAreas();
  3723. }
  3724. this.m_selectionContainerMap=_2dd;
  3725. };
  3726. CSelectionController.prototype.getChartHelper=function(_2df){
  3727. var _2e0=_2df.parentNode;
  3728. var _2e1=_2e0.name;
  3729. if(!this.m_chartHelpers[_2e1]){
  3730. this.m_chartHelpers[_2e1]=new CChartHelper(_2df,this.getSelectionObjectFactory(),this.m_oCognosViewer);
  3731. }
  3732. return this.m_chartHelpers[_2e1];
  3733. };
  3734. CSelectionController.prototype.getSavedChartHelper=function(_2e2){
  3735. var _2e3=_2e2.parentNode;
  3736. var _2e4=_2e3.name;
  3737. return this.m_savedChartHelpers[_2e4];
  3738. };
  3739. CSelectionController.prototype.getSelectedChartArea=function(){
  3740. return this.m_selectedChartArea;
  3741. };
  3742. CSelectionController.prototype.getSelectedChartNodes=function(){
  3743. return this.m_selectedChartNodes;
  3744. };
  3745. CSelectionController.prototype.hasSelectedChartNodes=function(){
  3746. return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0;
  3747. };
  3748. CSelectionController.prototype.getSelectedChartImage=function(){
  3749. var _2e5=null;
  3750. if(this.hasSelectedChartNodes()){
  3751. var _2e6=this.m_selectedChartNodes[0];
  3752. _2e5=_2e6.getArea();
  3753. }
  3754. if(_2e5===null){
  3755. return null;
  3756. }
  3757. if(_2e5.tagName=="IMG"){
  3758. return _2e5;
  3759. }
  3760. return this.getSelectedChartImageFromChartArea(_2e5);
  3761. };
  3762. CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_2e7){
  3763. var _2e8=_2e7.parentNode;
  3764. var _2e9="#"+_2e8.getAttribute("name");
  3765. return this.checkChildrenForChart(_2e8.parentNode,_2e9);
  3766. };
  3767. CSelectionController.prototype.checkChildrenForChart=function(_2ea,_2eb){
  3768. var _2ec=_2ea.firstChild;
  3769. while(_2ec!==null){
  3770. if(!_2ec.tagName){
  3771. return null;
  3772. }else{
  3773. if(_2ec.tagName=="IMG"&&_2ec.getAttribute("usemap")==_2eb){
  3774. return _2ec;
  3775. }else{
  3776. if(_2ec.tagName==="DIV"||_2ec.tagName==="SPAN"){
  3777. var _2ed=this.checkChildrenForChart(_2ec,_2eb);
  3778. if(_2ed){
  3779. return _2ed;
  3780. }
  3781. }
  3782. }
  3783. }
  3784. _2ec=_2ec.nextSibling;
  3785. }
  3786. return null;
  3787. };
  3788. CSelectionController.prototype.downloadSelectedChartImage=function(_2ee){
  3789. var _2ef=this.getSelectedChartImage();
  3790. if(_2ef!==null){
  3791. var _2f0=this.getDocumentFromImage(_2ef);
  3792. var _2f1=_2ef.name.replace(".","_");
  3793. var _2f2=_2f1.substr(5);
  3794. var _2f3="?m_name=";
  3795. _2f3+=_2f2;
  3796. _2f3+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
  3797. if(isIE()){
  3798. _2f1=_2f0.parentWindow.eval("graphicSrc"+_2f2);
  3799. }else{
  3800. _2f1=_2f0.defaultView.eval("graphicSrc"+_2f2);
  3801. }
  3802. var _2f4="";
  3803. if(typeof _2f1!="undefined"&&_2f1!==null){
  3804. var _2f5=_2f1.split("&");
  3805. if(_2f5.length===0){
  3806. return;
  3807. }
  3808. if(_2f1.indexOf("/repository/")<0){
  3809. for(var i=0;i<_2f5.length;++i){
  3810. var _2f7=_2f5[i];
  3811. var _2f8=_2f7.indexOf("=");
  3812. if(_2f8!=-1){
  3813. var _2f9=_2f7.substr(0,_2f8);
  3814. var _2fa=_2f7.slice(_2f8+1);
  3815. if(_2f9=="search"){
  3816. _2f4+=_2fa;
  3817. break;
  3818. }
  3819. }
  3820. }
  3821. }
  3822. if(_2f4==""){
  3823. _2f3=_2ef.getAttribute("src");
  3824. if(_2f3.indexOf("?")!=-1){
  3825. _2f3+="&download=true";
  3826. }else{
  3827. _2f3+="?download=true";
  3828. }
  3829. }
  3830. if(typeof getConfigFrame=="function"){
  3831. _2f3+=_2f4;
  3832. _2f3=getConfigFrame().constructGETRequestParamsString(_2f3);
  3833. window.open(_2f3,"_blank","width=0,height=0");
  3834. }else{
  3835. _2f3=constructGETRequestParamsString(_2f3);
  3836. _2f3+=_2f4;
  3837. var _2fb=this.m_oCognosViewer.getGateway();
  3838. var _2fc=document.getElementById("CVIFrame"+this.m_sNamespace);
  3839. if(_2fc){
  3840. var _2fd=_2fc.src;
  3841. if(_2fd.indexOf("repository")>=0&&_2f3.indexOf("repository")<0){
  3842. var _2fe=_2fd.indexOf("content");
  3843. _2f3=_2fd.substring(0,_2fe)+_2f3;
  3844. }
  3845. }
  3846. if(_2f3.indexOf(_2fb)==-1){
  3847. var _2ff=document.forms["formWarpRequest"+_2ee];
  3848. _2f3=_2ff.action+_2f3;
  3849. }
  3850. if(typeof window.detachLeavingRV=="function"){
  3851. window.detachLeavingRV();
  3852. }
  3853. location.href=_2f3;
  3854. if(typeof window.attachLeavingRV=="function"){
  3855. setTimeout(window.attachLeavingRV,100);
  3856. }
  3857. }
  3858. }
  3859. }
  3860. };
  3861. CSelectionController.prototype.getDocumentFromImage=function(_300){
  3862. var _301=null;
  3863. if(_300.ownerDocument){
  3864. _301=_300.ownerDocument;
  3865. }else{
  3866. _301=_300.document;
  3867. }
  3868. return _301;
  3869. };
  3870. CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
  3871. var _303=this.getSelections();
  3872. if(_303.length>1){
  3873. if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){
  3874. var node=getNodeFromEvent(e);
  3875. try{
  3876. while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){
  3877. node=node.parentNode;
  3878. }
  3879. }
  3880. catch(ex){
  3881. }
  3882. var _305=this.getSelectionObjectFactory().getContainerType(node);
  3883. if(_305==="list"){
  3884. for(var i=0;i<_303.length;i++){
  3885. if(_303[i].m_oCellRef==node){
  3886. return false;
  3887. }
  3888. }
  3889. }
  3890. }
  3891. }
  3892. return true;
  3893. };
  3894. CSelectionController.prototype.getContainerType=function(){
  3895. var _307="";
  3896. if(this.hasSelectedChartNodes()){
  3897. _307="chart";
  3898. }else{
  3899. if(this.getDataContainerType()==="list"){
  3900. _307="list";
  3901. }else{
  3902. _307="crosstab";
  3903. }
  3904. }
  3905. return _307;
  3906. };
  3907. CSelectionController.prototype.getDisplayValues=function(){
  3908. var _308={};
  3909. var _309=this.getAllSelectedObjects()[0];
  3910. if(_309){
  3911. var _30a=_309.getSelectedContextIds();
  3912. if(_30a){
  3913. for(var axis=0;axis<_30a.length;axis++){
  3914. var _30c=[];
  3915. var _30d=_30a[axis];
  3916. for(var _30e=0;_30e<_30d.length;_30e++){
  3917. var _30f=_30d[_30e];
  3918. var _310=this.getDisplayValue(_30f);
  3919. _30c.push(_310);
  3920. if(axis===0){
  3921. break;
  3922. }
  3923. }
  3924. var _311="";
  3925. switch(axis){
  3926. case 0:
  3927. _311="selected";
  3928. break;
  3929. case 1:
  3930. _311="rows";
  3931. break;
  3932. default:
  3933. _311="columns";
  3934. }
  3935. _308[_311]=_30c;
  3936. }
  3937. }
  3938. }
  3939. return _308;
  3940. };
  3941. CSelectionController.prototype.getChartTooltip=function(){
  3942. var _312=this.getAllSelectedObjects()[0];
  3943. if(_312){
  3944. var area=_312.getArea();
  3945. if(area){
  3946. var _314=area.getAttribute("title");
  3947. if(_314&&_314.length>0){
  3948. return area.getAttribute("title");
  3949. }
  3950. }
  3951. }
  3952. return "";
  3953. };
  3954. CSelectionController.prototype.pageClickedForMobile=function(e){
  3955. this.pageClicked(e);
  3956. var _316=this.getAllSelectedObjects().length;
  3957. if(_316==0){
  3958. var node=getNodeFromEvent(e,true);
  3959. if(!node){
  3960. return false;
  3961. }
  3962. if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){
  3963. this.selectDrillThroughImage(node);
  3964. return true;
  3965. }else{
  3966. if(node.getAttribute("dttargets")){
  3967. this.selectDrillThroughSingleton(node);
  3968. return true;
  3969. }else{
  3970. if(node.parentNode&&node.parentNode.getAttribute("dttargets")){
  3971. this.selectDrillThroughSingleton(node.parentNode);
  3972. return true;
  3973. }
  3974. }
  3975. }
  3976. return false;
  3977. }
  3978. return true;
  3979. };
  3980. CSelectionController.prototype.clearSavedSelections=function(){
  3981. this.m_bSavedSelections=false;
  3982. if(this.hasSavedSelectedObjects()){
  3983. this.updateUI(null,this.getSavedSelectedObjects(),true,false);
  3984. delete (this.m_aSavedSelectedObjects);
  3985. }
  3986. if(this.hasSavedSelectedChartNodes()){
  3987. var _318=this.m_savedChartHelpers;
  3988. for(var _319 in _318){
  3989. if(_318[_319]){
  3990. var _31a=_318[_319].getImageMapHighlighter();
  3991. if(_31a.hideAllAreas){
  3992. _31a.hideAllAreas();
  3993. }
  3994. }
  3995. }
  3996. delete this.m_savedChartHelpers;
  3997. delete this.m_savedSelectedChartNodes;
  3998. }
  3999. };
  4000. CSelectionController.prototype.hasSavedSelectedChartNodes=function(){
  4001. return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0);
  4002. };
  4003. CSelectionController.prototype.getSavedSelectedChartNodes=function(){
  4004. return this.m_savedSelectedChartNodes;
  4005. };
  4006. CSelectionController.prototype.saveSelections=function(){
  4007. this.m_savedSelectionStyles=this.m_selectionStyles;
  4008. if(this.m_aSelectedObjects.length>0){
  4009. this.m_aSavedSelectedObjects=[];
  4010. var _31b=this.m_aSelectedObjects.length;
  4011. var temp=[];
  4012. for(var i=0;i<_31b;i++){
  4013. if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){
  4014. temp.push(this.m_aSelectedObjects[i]);
  4015. }else{
  4016. this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]);
  4017. }
  4018. }
  4019. this.m_aSelectedObjects=temp;
  4020. }
  4021. if(this.hasSelectedChartNodes()){
  4022. this.m_savedChartHelpers=this.m_chartHelpers;
  4023. this.m_chartHelpers={};
  4024. this.m_savedSelectedChartNodes=[];
  4025. var _31e=this.m_selectedChartNodes.length;
  4026. var temp=[];
  4027. for(var i=0;i<_31e;i++){
  4028. if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
  4029. var _31f=this.m_selectedChartNodes[i].getArea();
  4030. var _320=this.getImageMapName(_31f);
  4031. this.m_chartHelpers[_320]=this.m_savedChartHelpers[_320];
  4032. delete this.m_savedChartHelpers[_320];
  4033. temp.push(this.m_selectedChartNodes[i]);
  4034. }else{
  4035. this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]);
  4036. }
  4037. }
  4038. this.m_selectedChartNodes=temp;
  4039. }
  4040. this.m_bSavedSelections=true;
  4041. };
  4042. CSelectionController.prototype.hasSavedSelections=function(){
  4043. return this.m_bSavedSelections;
  4044. };
  4045. CSelectionController.prototype.hasSavedSelectedObjects=function(){
  4046. return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes();
  4047. };
  4048. CSelectionController.prototype.getSavedSelectedObjects=function(){
  4049. return this.m_aSavedSelectedObjects;
  4050. };
  4051. CSelectionController.prototype.getImageMapName=function(_321){
  4052. var _322=_321.parentNode;
  4053. return _322.name;
  4054. };
  4055. CSelectionController.prototype.repaintBUXSelectedChartArea=function(_323,_324,_325){
  4056. var _326={};
  4057. var _327=_323.length;
  4058. for(var i=0;i<_327;i++){
  4059. var _329=_323[i].getArea();
  4060. var _32a=this.getImageMapName(_329);
  4061. var _32b;
  4062. if(!_326[_32a]){
  4063. _32b=(_324)?this.getSavedChartHelper(_329):this.getChartHelper(_329);
  4064. _326[_32a]=_32b;
  4065. var _32c=_32b.getImageMapHighlighter();
  4066. _32c.hideAllAreas();
  4067. _32c.setFillColour(this.getPrimarySelectionColor());
  4068. _32c.setStrokeColour(this.getPrimarySelectionColor());
  4069. }else{
  4070. _32b=_326[_32a];
  4071. }
  4072. var _32d=_323[i].m_contextIds;
  4073. if(_325&&_32d.length===1&&_32d[0].length===1&&this.isMeasure(_32d[0][0])){
  4074. continue;
  4075. }
  4076. _32c.highlightAreas(_323[i].getCtxAreas(),1);
  4077. }
  4078. };
  4079. CSelectionController.prototype.repaintSavedSelections=function(){
  4080. var _32e=this.m_selectionStyles;
  4081. this.m_selectionStyles=this.m_savedSelectionStyles;
  4082. var _32f=this.getSavedSelectedChartNodes();
  4083. var _330=false;
  4084. if(_32f&&_32f.length>0){
  4085. bIsChart=true;
  4086. }else{
  4087. _32f=this.getSavedSelectedObjects();
  4088. }
  4089. this.repaintSelectionsHelper(_32f,true,_330);
  4090. this.resetSelectionStyles();
  4091. this.m_selectionStyles=_32e;
  4092. };
  4093. CSelectionController.prototype.repaintSelections=function(){
  4094. var _331=this.getSelectedChartNodes();
  4095. var _332=false;
  4096. if(_331&&_331.length>0){
  4097. _332=true;
  4098. }else{
  4099. _331=this.getSelections();
  4100. }
  4101. this.repaintSelectionsHelper(_331,false,_332);
  4102. };
  4103. CSelectionController.prototype.repaintSelectionsHelper=function(_333,_334,_335){
  4104. try{
  4105. if(_335){
  4106. this.repaintBUXSelectedChartArea(_333,_334);
  4107. }else{
  4108. this.updateUI(document,_333,true,false);
  4109. this.updateUI(document,_333,false,false);
  4110. }
  4111. }
  4112. catch(e){
  4113. return false;
  4114. }
  4115. };
  4116. CSelectionController.prototype.resetAll=function(){
  4117. this.resetSelectionStyles();
  4118. this.clearSavedSelections();
  4119. this.resetSelections();
  4120. this.resetAllowHorizontalDataValueSelection();
  4121. };
  4122. CSelectionController.prototype.pageClicked=function(e){
  4123. try{
  4124. var node=getNodeFromEvent(e);
  4125. if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){
  4126. var _338=node;
  4127. if(!_338.getAttribute("uid")){
  4128. var _339=_338.parentNode;
  4129. if(_339&&_339.nodeType==1&&typeof _339.getAttribute!="undefined"&&_339.getAttribute("uid")!=null){
  4130. _338=_339;
  4131. }
  4132. }
  4133. if(this.isCellSelected(_338)){
  4134. if(typeof this.m_oCognosViewer.isBux!=="undefined"){
  4135. this.repaintSelections();
  4136. }
  4137. if(e.button!==0){
  4138. return false;
  4139. }
  4140. }
  4141. }
  4142. if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){
  4143. return true;
  4144. }
  4145. if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){
  4146. return false;
  4147. }
  4148. var _33a=getDocumentFromEvent(e);
  4149. if(!this.hasContextData()||!this.hasMetadata()){
  4150. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){
  4151. this.setSelectedChartArea(node,e);
  4152. }
  4153. this.getObservers().notify();
  4154. return false;
  4155. }
  4156. if(typeof node.selectedCell!="undefined"){
  4157. var _33b=node;
  4158. node=node.selectedCell;
  4159. _33b.removeAttribute("selectedCell");
  4160. }
  4161. if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){
  4162. cf.hidePickers();
  4163. }
  4164. if(e.keyCode==27){
  4165. if(typeof g_reportSelectionController!="undefined"){
  4166. g_reportSelectionController.clearSelections();
  4167. }
  4168. this.resetSelections(_33a);
  4169. }else{
  4170. if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){
  4171. if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){
  4172. this.selectNode(node,e);
  4173. this.setSelectedChartArea(node,e);
  4174. }
  4175. }else{
  4176. if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){
  4177. var _33c=this.m_oCognosViewer.getViewerWidget();
  4178. this.selectNode(node,e);
  4179. }
  4180. }
  4181. }
  4182. if(window.gViewerLogger){
  4183. window.gViewerLogger.addContextInfo(this);
  4184. }
  4185. }
  4186. catch(e){
  4187. }
  4188. };
  4189. CSelectionController.prototype.getSelectionObjectFactory=function(){
  4190. return this.m_oSelectionObjectFactory;
  4191. };
  4192. CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){
  4193. return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null);
  4194. };
  4195. CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_341){
  4196. var _342=this.getCtxIdFromMun(sMun);
  4197. if(_342==""){
  4198. _342=this.getCtxIdFromMetaData(sLun,sHun,_341);
  4199. }
  4200. if(_342!=null&&this.m_oCDManager.GetUsage(_342)!="2"){
  4201. var _343=document.getElementById("rt"+this.getNamespace());
  4202. if(_343!=null){
  4203. var _344=getElementsByAttribute(_343,"*","ctx",_342);
  4204. if(_344&&_344.length===0){
  4205. var _345=new RegExp("(^|:)"+_342+"(:|$)","i");
  4206. _344=getElementsByAttribute(_343,"*","ctx",_342,-1,_345);
  4207. }
  4208. var _346=null;
  4209. if(_344!=null&&_344.length>0){
  4210. _346=new CSelectionObject();
  4211. _346.setSelectionController(this);
  4212. _346.m_sColumnRef=_344[0].getAttribute("cid");
  4213. _346.m_sCellTypeId=_344[0].getAttribute("uid");
  4214. _346.m_sLayoutType=_344[0].getAttribute("type");
  4215. _346.m_sTag=_344[0].getAttribute("tag");
  4216. _346.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_344[0]);
  4217. _346.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_344[0]);
  4218. _346.m_contextIds=[[_342]];
  4219. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346;
  4220. }else{
  4221. var _347=getElementsByAttribute(_343,"*","flashChart","true");
  4222. if(_347!=null){
  4223. for(var _348=0;_348<_347.length;++_348){
  4224. var ldx=_347[_348].getLDX();
  4225. if(ldx.indexOf("<ctx>"+_342+"</ctx>")!=-1){
  4226. _346=new CSelectionObject();
  4227. _346.setSelectionController(this);
  4228. var lid=_347[_348].getAttribute("lid");
  4229. _346.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
  4230. _346.m_dataContainerType="chart";
  4231. _346.m_contextIds=[[_342]];
  4232. this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346;
  4233. }
  4234. }
  4235. }
  4236. }
  4237. }
  4238. }
  4239. };
  4240. CSelectionController.prototype.buildSelectionObject=function(node,e){
  4241. var _34d=null;
  4242. try{
  4243. while(node.nodeType==3){
  4244. node=node.parentNode;
  4245. }
  4246. if(this.isDrillLinkOnCrosstabCell(node)){
  4247. node=node.parentNode;
  4248. }
  4249. var ctx=node.getAttribute("ctx");
  4250. var uid=node.getAttribute("uid");
  4251. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){
  4252. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  4253. return null;
  4254. }
  4255. node=node.parentNode;
  4256. if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){
  4257. node=node.parentNode;
  4258. }
  4259. uid=node.getAttribute("uid");
  4260. }
  4261. if(uid!=null){
  4262. var _350=node.childNodes;
  4263. for(var i=0;i<_350.length;i++){
  4264. if(_350[i].nodeName.toUpperCase()=="TABLE"&&(_350[i].className=="ls"||_350[i].className=="xt")){
  4265. var trs=_350[i].rows;
  4266. for(var j=0;j<trs.length;j++){
  4267. var tds=trs[j].cells;
  4268. for(var k=0;k<tds.length;k++){
  4269. if(tds[k].getAttribute("uid")!=null){
  4270. return null;
  4271. }
  4272. }
  4273. }
  4274. }
  4275. }
  4276. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  4277. _34d=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  4278. }else{
  4279. _34d=this.getSelectionObjectFactory().getSelectionObject(node);
  4280. }
  4281. }
  4282. }
  4283. catch(e){
  4284. }
  4285. return _34d;
  4286. };
  4287. CSelectionController.prototype.shiftKeyPressed=function(e){
  4288. if(e.keyCode=="121"){
  4289. return false;
  4290. }
  4291. if(isSafari()){
  4292. if(e.button!=2){
  4293. return e.shiftKey?e.shiftKey:false;
  4294. }else{
  4295. return false;
  4296. }
  4297. }
  4298. return e.shiftKey?e.shiftKey:false;
  4299. };
  4300. CSelectionController.prototype.ctrlKeyPressed=function(e){
  4301. if(isSafari()){
  4302. if(e.button!=2){
  4303. return e.ctrlKey?e.ctrlKey:false;
  4304. }else{
  4305. return false;
  4306. }
  4307. }
  4308. return e.ctrlKey?e.ctrlKey:false;
  4309. };
  4310. CSelectionController.prototype.isSelectionsPreviouslySaved=function(_358){
  4311. var _359=false;
  4312. if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_358||!_358.length){
  4313. return false;
  4314. }
  4315. for(var i=0;i<_358.length;i++){
  4316. if(this.isSavedCellSelected(_358[i].getCellRef())){
  4317. return true;
  4318. }
  4319. }
  4320. return false;
  4321. };
  4322. CSelectionController.prototype.selectNode=function(node,e){
  4323. try{
  4324. while(node.nodeType==3){
  4325. node=node.parentNode;
  4326. }
  4327. if(this.isDrillLinkOnCrosstabCell(node)){
  4328. node=node.parentNode;
  4329. }
  4330. var _35d=null;
  4331. if(isIE()){
  4332. _35d=node.document;
  4333. }else{
  4334. _35d=node.ownerDocument;
  4335. }
  4336. var ctx=node.getAttribute("ctx");
  4337. var uid=node.getAttribute("uid");
  4338. var _360=false;
  4339. if(typeof e=="undefined"){
  4340. e={};
  4341. }
  4342. var _361=false;
  4343. if(typeof g_reportSelectionController!="undefined"){
  4344. _361=this.checkForReportElementNode(node);
  4345. }
  4346. if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_361==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
  4347. if(this.getSelections().length>0){
  4348. _360=true;
  4349. }
  4350. if(this.hasCutColumns()==true){
  4351. this.clearSelectedObjects(_35d);
  4352. }else{
  4353. this.resetSelections(_35d);
  4354. this.repaintSavedSelections();
  4355. if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){
  4356. cf.removeAllSelectionsFromCfgVariables();
  4357. }
  4358. this.m_oCognosViewer.setCurrentNodeFocus(null);
  4359. }
  4360. if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
  4361. clearTextSelection(_35d);
  4362. }
  4363. if(typeof g_reportSelectionController!="undefined"&&_361==false){
  4364. if(g_reportSelectionController.getSelections().length>0){
  4365. _360=true;
  4366. }
  4367. g_reportSelectionController.clearSelections();
  4368. }
  4369. }
  4370. var _362=node.getAttribute("dtTargets")?node:null;
  4371. var _363=(node.nodeName.toLowerCase()==="area");
  4372. if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){
  4373. if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
  4374. return false;
  4375. }
  4376. var _364;
  4377. var _365=3;
  4378. do{
  4379. node=node.parentNode;
  4380. if(node){
  4381. _362=(!_362&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_362;
  4382. uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
  4383. _364=node.nodeName.toLowerCase();
  4384. }
  4385. }while((uid==null)&&node&&(--_365>0)&&(_364=="span"||_364=="div"));
  4386. }
  4387. if(uid!=null){
  4388. var _366=node.childNodes;
  4389. for(var i=0;i<_366.length;i++){
  4390. if(_366[i].nodeName.toUpperCase()=="TABLE"&&(_366[i].className=="ls"||_366[i].className=="xt")){
  4391. var trs=_366[i].rows;
  4392. for(var j=0;j<trs.length;j++){
  4393. var tds=trs[j].cells;
  4394. for(var k=0;k<tds.length;k++){
  4395. if(tds[k].getAttribute("uid")!=null){
  4396. return false;
  4397. }
  4398. }
  4399. }
  4400. }
  4401. }
  4402. var _36c;
  4403. if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
  4404. _36c=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
  4405. }else{
  4406. _36c=this.getSelectionObjectFactory().getSelectionObject(node);
  4407. }
  4408. if(this.isCellSelected(node)==false){
  4409. if(this.shiftKeyPressed(e)){
  4410. var _36d=this.getSelections();
  4411. if(_36d.length>0){
  4412. var _36e=_36d[_36d.length-1];
  4413. if(_36e.getLayoutType()==_36c.getLayoutType()&&(_36e.getCellRef().parentNode.parentNode==_36c.getCellRef().parentNode.parentNode)){
  4414. if(this.cellsAreInSameColumn(_36e.getCellRef(),_36c.getCellRef())){
  4415. this.selectVertical(_36e,_36c,_35d);
  4416. }else{
  4417. if(_36e.getCellRef().parentNode.rowIndex==_36c.getCellRef().parentNode.rowIndex){
  4418. this.selectHorizontal(_36e,_36c,_35d);
  4419. }
  4420. }
  4421. }
  4422. }
  4423. clearTextSelection(_35d);
  4424. }else{
  4425. if(this.ctrlKeyPressed(e)){
  4426. clearTextSelection(_35d);
  4427. }
  4428. }
  4429. this.addSelectionObject(_36c,_35d);
  4430. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4431. cf.addSelectionToCfgVariables(_36c.getColumnName());
  4432. }
  4433. this.m_oCognosViewer.setCurrentNodeFocus(node);
  4434. }else{
  4435. if(this.ctrlKeyPressed(e)){
  4436. this.removeSelectionObject(_36c,_35d);
  4437. if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
  4438. if(!this.isColumnSelected(_36c.getTag())){
  4439. cf.removeSelectionFromCfgVariables(_36c.getTag());
  4440. }
  4441. }
  4442. clearTextSelection(_35d);
  4443. }else{
  4444. if(this.shiftKeyPressed(e)){
  4445. clearTextSelection(_35d);
  4446. }
  4447. }
  4448. }
  4449. _360=true;
  4450. }else{
  4451. if(_361){
  4452. var _36f=null;
  4453. while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
  4454. node=node.parentNode;
  4455. }
  4456. if(node.id=="reportTitle"){
  4457. _36f="TitleStyle";
  4458. }else{
  4459. if(node.id=="reportSubtitle"){
  4460. _36f="SubtitleStyle";
  4461. }else{
  4462. if(node.id.indexOf("reportFilter")==0){
  4463. _36f="FilterStyle";
  4464. }
  4465. }
  4466. }
  4467. if(_36f!=null){
  4468. selectReportElement(e,node.id,_36f);
  4469. _360=true;
  4470. }
  4471. }else{
  4472. if(_362!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_363){
  4473. var _36c=this.getSelectionObjectFactory().getSelectionObject(_362);
  4474. this.addSelectionObject(_36c,_35d);
  4475. }
  4476. }
  4477. }
  4478. if(_360==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){
  4479. cf.refreshDialog();
  4480. }
  4481. }
  4482. catch(ex){
  4483. }
  4484. };
  4485. CSelectionController.prototype.selectDrillThroughImage=function(node){
  4486. this.m_oSelectedDrillThroughImage=node;
  4487. };
  4488. CSelectionController.prototype.getSelectedDrillThroughImage=function(){
  4489. return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null;
  4490. };
  4491. CSelectionController.prototype.selectDrillThroughSingleton=function(node){
  4492. this.m_oSelectedDrillThroughSingleton=node;
  4493. };
  4494. CSelectionController.prototype.getSelectDrillThroughSingleton=function(){
  4495. return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null;
  4496. };
  4497. CSelectionController.prototype.getReportContextDataArray=function(){
  4498. return this.m_aReportContextDataArray;
  4499. };
  4500. CSelectionController.prototype.getReportMetadataArray=function(){
  4501. return this.m_aReportMetadataArray;
  4502. };
  4503. CSelectionController.prototype.setupContextDataArray=function(_372){
  4504. this.m_aReportContextDataArray=_372;
  4505. };
  4506. CSelectionController.prototype.setupMetaDataArray=function(_373){
  4507. this.m_aReportMetadataArray=_373;
  4508. };
  4509. CSelectionController.prototype.addContextData=function(_374){
  4510. this.m_aSelectedObjects=[];
  4511. this.m_oCDManager.SetContextData(_374);
  4512. if(!this.m_bUsingCCDManager){
  4513. this.m_bUsingCCDManager=true;
  4514. }
  4515. for(var i=0;i<this.m_selectedClass.length;++i){
  4516. this.deselecting(this.m_selectedClass);
  4517. }
  4518. };
  4519. CSelectionController.prototype.addMetaData=function(_376){
  4520. this.m_aSelectedObjects=[];
  4521. this.m_oCDManager.SetMetadata(_376);
  4522. if(!this.m_bUsingCCDManager){
  4523. this.m_bUsingCCDManager=true;
  4524. }
  4525. };
  4526. CSelectionController.prototype.getDrillFlag=function(_377){
  4527. var _378="";
  4528. if(!this.m_bUsingCCDManager){
  4529. var _379=this.m_aReportContextDataArray[_377];
  4530. var _37a=_379[0];
  4531. var _37b=this.m_aReportMetadataArray[_37a];
  4532. if(typeof _37b!="undefined"&&typeof _37b[3]!="undefined"){
  4533. _378=_37b[3];
  4534. }
  4535. }else{
  4536. _378=this.m_oCDManager.GetDrillFlag(_377);
  4537. }
  4538. return _378;
  4539. };
  4540. CSelectionController.prototype.getDrillFlagForMember=function(_37c){
  4541. var _37d="0";
  4542. if(!this.m_bUsingCCDManager){
  4543. var _37e=this.getContextDataItem(_37c);
  4544. if(_37e!=null){
  4545. var _37f=_37e[2];
  4546. if(_37f!=""){
  4547. var _380=_37e[0];
  4548. var _381=this.getMetaDataItem(_380);
  4549. if(_381!=null){
  4550. _37d=_381[3];
  4551. }
  4552. }
  4553. }
  4554. }else{
  4555. _37d=this.m_oCDManager.GetDrillFlagForMember(_37c);
  4556. }
  4557. return (_37d==null)?0:_37d;
  4558. };
  4559. CSelectionController.prototype.getDataType=function(_382){
  4560. var _383=null;
  4561. if(!this.m_bUsingCCDManager){
  4562. var _384=this.getRDI(_382);
  4563. if(_384&&_384.length>2){
  4564. _383=parseInt(_384[2],10);
  4565. }
  4566. }else{
  4567. _383=parseInt(this.m_oCDManager.GetDataType(_382),10);
  4568. }
  4569. return _383;
  4570. };
  4571. CSelectionController.prototype.getUsageInfo=function(_385){
  4572. if(this.m_bUsingCCDManager){
  4573. return this.m_oCDManager.GetUsage(_385);
  4574. }
  4575. };
  4576. CSelectionController.prototype.isMeasure=function(_386){
  4577. return (this.getUsageInfo(_386)==this.c_usageMeasure);
  4578. };
  4579. CSelectionController.prototype.getDepth=function(_387){
  4580. var _388=null;
  4581. if(!this.m_bUsingCCDManager){
  4582. var _389=this.getRDI(_387);
  4583. if(_389&&_389.length>5&&_389[1]=="R"){
  4584. _388=_389[5];
  4585. }
  4586. }else{
  4587. _388=this.m_oCDManager.GetDepth(_387);
  4588. }
  4589. return _388;
  4590. };
  4591. CSelectionController.prototype.getUseValue=function(_38a){
  4592. var _38b="";
  4593. if(!this.m_bUsingCCDManager){
  4594. var _38c=this.m_aReportContextDataArray[_38a];
  4595. if(typeof _38c[1]!="undefined"){
  4596. _38b=_38c[1];
  4597. }
  4598. }else{
  4599. _38b=this.m_oCDManager.GetDisplayValue(_38a);
  4600. }
  4601. return _38b;
  4602. };
  4603. CSelectionController.prototype.getTextValue=function(_38d){
  4604. var _38e=null;
  4605. for(var _38f=0;_38f<_38d.length;_38f++){
  4606. if(_38d[_38f].style.visisbility!="hidden"){
  4607. if(isIE()){
  4608. _38e=_38d[_38f].innerText;
  4609. }else{
  4610. _38e=_38d[_38f].textContent;
  4611. }
  4612. var _390=_38d[_38f].nextSibling;
  4613. while(_390!=null){
  4614. if(_390.nodeName.toUpperCase()=="SPAN"&&_390.style.visibility!="hidden"){
  4615. if(isIE()){
  4616. _38e+=_390.innerText;
  4617. }else{
  4618. _38e+=_390.textContent;
  4619. }
  4620. }
  4621. _390=_390.nextSibling;
  4622. }
  4623. break;
  4624. }
  4625. }
  4626. return _38e;
  4627. };
  4628. CSelectionController.prototype.getDisplayValueFromDOM=function(_391,_392){
  4629. var _393=null;
  4630. var _394;
  4631. var _395=new RegExp("(^|\\s)"+_391+"(\\s|$|:)","i");
  4632. if(typeof _392!="undefined"){
  4633. _394=getElementsByAttribute(_392,["span","td","th"],"ctx",_391,1,_395);
  4634. }else{
  4635. var _396=document.getElementById("CVIFrame"+this.m_sNamespace);
  4636. if(typeof _396=="undefined"||_396==null){
  4637. var _397=document.getElementById("RVContent"+this.m_sNamespace);
  4638. if(typeof _397=="undefined"||_397==null){
  4639. _394=getElementsByAttribute(document.body,["span","td","th"],"ctx",_391,1,_395);
  4640. }else{
  4641. _394=getElementsByAttribute(_397,["span","td","th"],"ctx",_391,1,_395);
  4642. }
  4643. }else{
  4644. _394=getElementsByAttribute(_396.contentWindow.document.body,["span","td","th"],"ctx",_391,1,_395);
  4645. }
  4646. }
  4647. var _398;
  4648. if(_394.length>0&&(_394[0].nodeName.toUpperCase()=="TD"||_394[0].nodeName.toUpperCase()=="TH")){
  4649. _398=_394[0].childNodes;
  4650. }else{
  4651. _398=_394;
  4652. }
  4653. if(_398.length==0||(_398[0].className.indexOf("chart_area")==-1&&_398[0].className.indexOf("bux-comment")==-1)){
  4654. _393=this.getTextValue(_398);
  4655. }
  4656. return _393;
  4657. };
  4658. CSelectionController.prototype.getDisplayValue=function(_399,_39a){
  4659. var _39b=this.getDisplayValueFromDOM(_399,_39a);
  4660. if(_39b==null){
  4661. _39b=this.getUseValue(_399);
  4662. }
  4663. return _39b;
  4664. };
  4665. CSelectionController.prototype.getDun=function(_39c){
  4666. if(this.m_bUsingCCDManager){
  4667. return this.m_oCDManager.GetDUN(_39c);
  4668. }else{
  4669. var _39d=this.m_aReportContextDataArray[_39c];
  4670. if(_39d&&typeof _39d[5]!="undefined"){
  4671. var _39e=_39d[5];
  4672. var _39f=this.m_aReportMetadataArray[_39e];
  4673. if(typeof _39f!="undefined"&&typeof _39f[1]!="undefined"&&_39f[1]=="D"){
  4674. return _39f[0];
  4675. }
  4676. }
  4677. }
  4678. };
  4679. CSelectionController.prototype.getPun=function(_3a0){
  4680. if(this.m_bUsingCCDManager){
  4681. return this.m_oCDManager.GetPUN(_3a0);
  4682. }
  4683. };
  4684. CSelectionController.prototype.getLun=function(_3a1){
  4685. var lun="";
  4686. if(!this.m_bUsingCCDManager){
  4687. var _3a3=this.m_aReportContextDataArray[_3a1];
  4688. if(_3a3&&typeof _3a3[3]!="undefined"){
  4689. var _3a4=_3a3[3];
  4690. var _3a5=this.m_aReportMetadataArray[_3a4];
  4691. if(typeof _3a5!="undefined"&&typeof _3a5[1]!="undefined"&&_3a5[1]=="L"){
  4692. lun=_3a5[0];
  4693. }
  4694. }
  4695. }else{
  4696. lun=this.m_oCDManager.GetLUN(_3a1);
  4697. }
  4698. return lun;
  4699. };
  4700. CSelectionController.prototype.isContextId=function(_3a6){
  4701. var _3a7=false;
  4702. if(!this.m_bUsingCCDManager){
  4703. var _3a8=this.m_aReportContextDataArray[_3a6];
  4704. _3a7=(typeof _3a8=="object");
  4705. }else{
  4706. this.m_oCDManager.FetchContextData([_3a6]);
  4707. _3a7=this.m_oCDManager.ContextIdExists(_3a6);
  4708. }
  4709. return _3a7;
  4710. };
  4711. CSelectionController.prototype.hasContextData=function(){
  4712. var _3a9=false;
  4713. if(!this.m_bUsingCCDManager){
  4714. if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
  4715. return true;
  4716. }
  4717. }else{
  4718. _3a9=this.m_oCDManager.HasContextData();
  4719. }
  4720. return _3a9;
  4721. };
  4722. CSelectionController.prototype.hasMetadata=function(){
  4723. var _3aa=false;
  4724. if(!this.m_bUsingCCDManager){
  4725. if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
  4726. return true;
  4727. }
  4728. }else{
  4729. _3aa=this.m_oCDManager.HasMetadata();
  4730. }
  4731. return _3aa;
  4732. };
  4733. CSelectionController.prototype.getDifferentCellIndex=function(_3ab,_3ac,_3ad){
  4734. for(var i=0;i<_3ab.cells.length;i++){
  4735. if(this.getSelectionObjectFactory().getSelectionObject(_3ab.cells[i]).getLayoutType()=="datavalue"){
  4736. break;
  4737. }
  4738. }
  4739. if(_3ad=="relative"){
  4740. return (_3ac-i);
  4741. }else{
  4742. if(_3ad=="actual"){
  4743. return (_3ac+i);
  4744. }
  4745. }
  4746. };
  4747. CSelectionController.prototype.cellsAreInSameColumn=function(_3af,_3b0){
  4748. if(_3af.parentNode.rowIndex==_3b0.parentNode.rowIndex){
  4749. return false;
  4750. }
  4751. if(_3af.getAttribute("cid")===null){
  4752. if(_3af.getAttribute("uid")===_3b0.getAttribute("uid")){
  4753. if(_3af.getAttribute("type")!="datavalue"){
  4754. return true;
  4755. }else{
  4756. if(this.getDifferentCellIndex(_3af.parentNode,_3af.cellIndex,"relative")==this.getDifferentCellIndex(_3b0.parentNode,_3b0.cellIndex,"relative")){
  4757. return true;
  4758. }
  4759. }
  4760. }else{
  4761. return false;
  4762. }
  4763. }else{
  4764. if(_3af.getAttribute("cid")===_3b0.getAttribute("cid")){
  4765. return true;
  4766. }else{
  4767. return false;
  4768. }
  4769. }
  4770. };
  4771. CSelectionController.prototype.selectVertical=function(_3b1,_3b2,_3b3){
  4772. if(!_3b3){
  4773. _3b3=document;
  4774. }
  4775. var _3b4=_3b1.getCellRef().parentNode;
  4776. var _3b5,i;
  4777. var _3b7=(_3b1.getCellRef().parentNode.rowIndex<_3b2.getCellRef().parentNode.rowIndex);
  4778. var _3b8=(_3b1.getCellRef().parentNode.cells.length-_3b1.getCellRef().cellIndex);
  4779. while(_3b4.rowIndex!=_3b2.getCellRef().parentNode.rowIndex){
  4780. if(_3b7){
  4781. _3b4=_3b4.nextSibling;
  4782. }else{
  4783. _3b4=_3b4.previousSibling;
  4784. }
  4785. if(_3b4==null){
  4786. break;
  4787. }
  4788. if(_3b4.cells.length>=_3b8){
  4789. for(i=0;i<_3b4.cells.length;i++){
  4790. if((_3b4.cells[i].getAttribute("type")==_3b1.getLayoutType())&&this.cellsAreInSameColumn(_3b1.getCellRef(),_3b4.cells[i])){
  4791. _3b5=this.getSelectionObjectFactory().getSelectionObject(_3b4.cells[i]);
  4792. if(this.addSelectionObject(_3b5,_3b3)){
  4793. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4794. cf.addSelectionToCfgVariables(_3b5.getColumnName());
  4795. }
  4796. }
  4797. break;
  4798. }
  4799. }
  4800. }
  4801. }
  4802. };
  4803. CSelectionController.prototype.selectHorizontal=function(_3b9,_3ba,_3bb){
  4804. var _3bc="";
  4805. if(_3b9.getColumnRef()==null){
  4806. if(_3b9.getCellRef().getAttribute("uid")==_3ba.getCellRef().getAttribute("uid")){
  4807. _3bc=_3b9.getCellRef().getAttribute("uid");
  4808. }else{
  4809. return;
  4810. }
  4811. }
  4812. var _3bd,_3be;
  4813. var _3bf=_3ba.getCellRef().parentNode;
  4814. var _3c0;
  4815. if(_3ba.getCellRef().cellIndex<_3b9.getCellRef().cellIndex){
  4816. _3bd=_3ba.getCellRef().cellIndex;
  4817. _3be=_3b9.getCellRef().cellIndex;
  4818. }else{
  4819. _3be=_3ba.getCellRef().cellIndex;
  4820. _3bd=_3b9.getCellRef().cellIndex;
  4821. }
  4822. for(var i=_3bd+1;i<_3be;i++){
  4823. if(((_3b9.getColumnRef()!=null)&&(_3b9.getLayoutType()==_3ba.getLayoutType())&&(_3b9.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_3b9.getColumnRef()==null)&&(_3bf.cells[i].getAttribute("uid")==_3bc))){
  4824. _3c0=this.getSelectionObjectFactory().getSelectionObject(_3bf.cells[i]);
  4825. if(this.addSelectionObject(_3c0,_3bb)){
  4826. if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
  4827. cf.addSelectionToCfgVariables(_3c0.getColumnName());
  4828. }
  4829. }
  4830. }
  4831. }
  4832. };
  4833. CSelectionController.prototype.pageDoubleClicked=function(e){
  4834. try{
  4835. var node=getNodeFromEvent(e);
  4836. if(typeof node.selectedCell!="undefined"){
  4837. var _3c4=node;
  4838. node=node.selectedCell;
  4839. _3c4.removeAttribute("selectedCell");
  4840. }
  4841. while(node.nodeType==3){
  4842. node=node.parentNode;
  4843. }
  4844. var ctx=node.getAttribute("ctx");
  4845. var uid=node.getAttribute("uid");
  4846. if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  4847. node=node.parentNode;
  4848. if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){
  4849. node=node.parentNode;
  4850. }
  4851. uid=node.getAttribute("uid");
  4852. }
  4853. if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){
  4854. if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){
  4855. goWindowManager.getFeatureManager().launchFeature("Rename");
  4856. }
  4857. }
  4858. if(typeof g_reportSelectionController!="undefined"){
  4859. g_reportSelectionController.clearSelections();
  4860. }
  4861. }
  4862. catch(ex){
  4863. }
  4864. };
  4865. CSelectionController.prototype.getSelectionHoverNodes=function(){
  4866. return this.m_aSelectionHoverNodes;
  4867. };
  4868. CSelectionController.prototype.setSelectionHoverNodes=function(_3c7){
  4869. this.m_aSelectionHoverNodes=_3c7;
  4870. };
  4871. CSelectionController.prototype.addSelectionHoverNode=function(node){
  4872. this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node;
  4873. };
  4874. CSelectionController.prototype.pageHover=function(e){
  4875. try{
  4876. var node=getNodeFromEvent(e);
  4877. while(node.nodeType==3){
  4878. node=node.parentNode;
  4879. }
  4880. if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  4881. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  4882. node=node.parentNode;
  4883. }
  4884. }
  4885. var _3cb=this.getSelectionHoverNodes();
  4886. var _3cc=this.getAllSelectedObjects().length;
  4887. if(!(_3cb.length==1&&_3cb[0]==node)){
  4888. for(var i=0;i<_3cb.length;i++){
  4889. this.sortIconHover(_3cb[i],true);
  4890. if(_3cc==0){
  4891. this.pageChangeHover(_3cb[i],true);
  4892. }
  4893. }
  4894. this.setSelectionHoverNodes([]);
  4895. if(_3cc==0){
  4896. this.sortIconHover(node,false);
  4897. if(this.pageChangeHover(node,false)){
  4898. this.addSelectionHoverNode(node);
  4899. }
  4900. }else{
  4901. if(this.sortIconHover(node,false)){
  4902. this.addSelectionHoverNode(node);
  4903. }
  4904. }
  4905. }
  4906. }
  4907. catch(ex){
  4908. }
  4909. };
  4910. CSelectionController.prototype.sortIconHover=function(node,_3cf){
  4911. if(!this.isValidColumnTitle(node)){
  4912. return false;
  4913. }
  4914. var _3d0=this.getSortImgNode(node);
  4915. if(_3d0!=null&&_3d0!="undefined"){
  4916. if(_3d0.getAttribute("sortOrder")==="nosort"){
  4917. if(_3cf){
  4918. _3d0.style.visibility="hidden";
  4919. }else{
  4920. _3d0.style.visibility="visible";
  4921. }
  4922. }
  4923. return true;
  4924. }
  4925. return false;
  4926. };
  4927. CSelectionController.prototype.isValidColumnTitle=function(node){
  4928. if(node&&node.parentNode){
  4929. var uid=node.getAttribute("uid");
  4930. 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")){
  4931. return true;
  4932. }
  4933. }
  4934. return false;
  4935. };
  4936. CSelectionController.prototype.pageChangeHover=function(node,_3d4){
  4937. try{
  4938. if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
  4939. if(node.parentNode.nodeName.toLowerCase()!="tr"){
  4940. node=node.parentNode;
  4941. }
  4942. }
  4943. if(this.isValidColumnTitle(node)){
  4944. var _3d5=this.isColumnSelected(node.getAttribute("tag"));
  4945. if(!_3d5){
  4946. _3d5=this.isColumnCut(node.getAttribute("tag"));
  4947. }
  4948. if(!_3d5){
  4949. if(_3d4){
  4950. if(node.getAttribute("oldClassName")!=null){
  4951. node.className=node.getAttribute("oldClassName");
  4952. node.removeAttribute("oldClassName");
  4953. }
  4954. this.restoreOldBackgroundImage(node);
  4955. }else{
  4956. if(node.getAttribute("oldClassName")!=null){
  4957. node.className=node.getAttribute("oldClassName");
  4958. }else{
  4959. node.setAttribute("oldClassName",node.className);
  4960. }
  4961. if(node.getAttribute("oldBackgroundImageStyle")!=null){
  4962. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  4963. }else{
  4964. this.saveOldCellStyles(node);
  4965. }
  4966. node.className+=" hoverSelection";
  4967. return true;
  4968. }
  4969. }
  4970. }
  4971. }
  4972. catch(ex){
  4973. }
  4974. return false;
  4975. };
  4976. CSelectionController.prototype.getSortImgNode=function(node){
  4977. var _3d7=node.getElementsByTagName("img");
  4978. for(var i=0;i<_3d7.length;i++){
  4979. var sId=_3d7[i].id.toString();
  4980. if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
  4981. node=_3d7[i];
  4982. return node;
  4983. }
  4984. }
  4985. return null;
  4986. };
  4987. CSelectionController.prototype.restoreOldPadding=function(node){
  4988. if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){
  4989. if(node.getAttribute("oldPaddingStyle").length>0){
  4990. node.style.padding=node.getAttribute("oldPaddingStyle");
  4991. }
  4992. node.removeAttribute("oldPaddingStyle");
  4993. }
  4994. };
  4995. CSelectionController.prototype.saveOldPadding=function(node,size){
  4996. if(node&&node.getAttribute("oldPaddingStyle")==null){
  4997. node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px");
  4998. }
  4999. };
  5000. CSelectionController.prototype.saveOldBorder=function(node){
  5001. if(node&&node.getAttribute("oldBorderStyle")==null){
  5002. node.setAttribute("oldBorderStyle",node.style.border);
  5003. }
  5004. };
  5005. CSelectionController.prototype.restoreOldBorder=function(node){
  5006. if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){
  5007. if(node.getAttribute("oldBorderStyle").length>0){
  5008. node.style.border=node.getAttribute("oldBorderStyle");
  5009. }else{
  5010. node.style.borderColor=node.style.borderWidth=node.style.borderStyle="";
  5011. }
  5012. node.removeAttribute("oldBorderStyle");
  5013. }
  5014. };
  5015. CSelectionController.prototype.setPrimarySelectionStyles=function(cell){
  5016. if(this.getPrimarySelectionColor()){
  5017. cell.style.backgroundColor=this.getPrimarySelectionColor();
  5018. }else{
  5019. cell.style.backgroundImage=this.pS_backgroundImageURL;
  5020. cell.style.backgroundRepeat="repeat";
  5021. }
  5022. };
  5023. CSelectionController.prototype.setSecondarySelectionStyles=function(cell){
  5024. if(this.getSecondarySelectionColor()){
  5025. cell.style.backgroundColor=this.getSecondarySelectionColor();
  5026. }else{
  5027. cell.style.backgroundImage=this.sS_backgroundImageURL;
  5028. cell.style.backgroundRepeat="repeat";
  5029. }
  5030. };
  5031. CSelectionController.prototype.saveOldCellStyles=function(node){
  5032. if(node&&node.getAttribute("oldBackgroundImageStyle")==null){
  5033. node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor"));
  5034. node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node));
  5035. node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat"));
  5036. node.style.backgroundImage="";
  5037. node.style.backgroundRepeat="";
  5038. }
  5039. };
  5040. CSelectionController.prototype.restoreOldBackgroundImage=function(node){
  5041. if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){
  5042. node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
  5043. node.removeAttribute("oldBackgroundImageStyle");
  5044. node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat");
  5045. node.removeAttribute("oldBackgroundRepeat");
  5046. node.style.backgroundColor=node.getAttribute("oldBackgroundColor");
  5047. node.removeAttribute("oldBackgroundColor");
  5048. }
  5049. };
  5050. CSelectionController.prototype.getStyleProperty=function(node,_3e4){
  5051. if(node&&node.style&&node.style[_3e4]){
  5052. return node.style[_3e4];
  5053. }
  5054. return "";
  5055. };
  5056. CSelectionController.prototype.getBackgroundImage=function(node){
  5057. if(node&&node.style){
  5058. return node.style.backgroundImage;
  5059. }
  5060. return "";
  5061. };
  5062. CSelectionController.prototype.pageContextClicked=function(e){
  5063. var node=getNodeFromEvent(e);
  5064. if(typeof node.selectedCell!="undefined"){
  5065. var _3e8=node;
  5066. node=node.selectedCell;
  5067. _3e8.removeAttribute("selectedCell");
  5068. }
  5069. while(node!=null&&node.tagName!="TD"){
  5070. node=node.parentNode;
  5071. }
  5072. if(node!=null){
  5073. var _3e9=this.getBackgroundImage(node);
  5074. this.findSelectionURLs();
  5075. if(this.getSelections().length==0||_3e9!=this.pS_backgroundImageURL){
  5076. this.pageClicked(e);
  5077. }
  5078. }
  5079. if(typeof populateContextMenu!="undefined"){
  5080. populateContextMenu();
  5081. moveContextMenu(e);
  5082. }
  5083. var _3ea=false;
  5084. if(this.showViewerContextMenu()){
  5085. if(typeof e.preventDefault=="function"){
  5086. e.preventDefault();
  5087. }
  5088. _3ea=true;
  5089. }
  5090. return _3ea;
  5091. };
  5092. CSelectionController.prototype.chartContextMenu=function(e){
  5093. if(!this.hasSelectedChartNodes()){
  5094. return;
  5095. }
  5096. if(typeof populateContextMenu!="undefined"){
  5097. populateContextMenu();
  5098. moveContextMenu(e);
  5099. }
  5100. if(typeof e.preventDefault=="function"){
  5101. e.preventDefault();
  5102. }
  5103. return false;
  5104. };
  5105. CSelectionController.prototype.titleAreaContextMenu=function(e,_3ed,sId){
  5106. if(typeof populateContextMenu!="undefined"){
  5107. goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_3ed);
  5108. goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
  5109. populateContextMenu(_3ed.toUpperCase());
  5110. moveContextMenu(e,_3ed.toUpperCase());
  5111. }
  5112. if(typeof e.preventDefault=="function"){
  5113. e.preventDefault();
  5114. }
  5115. return false;
  5116. };
  5117. CSelectionController.prototype.selectionsAreAllSameType=function(){
  5118. var _3ef=this.getSelections();
  5119. if(_3ef.length>0){
  5120. var _3f0=_3ef[0].getLayoutType();
  5121. for(var i=1;i<_3ef.length;i++){
  5122. if(_3f0!=_3ef[i].getLayoutType()){
  5123. return 0;
  5124. }
  5125. }
  5126. return 1;
  5127. }
  5128. return -1;
  5129. };
  5130. CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
  5131. var _3f2=this.getSelections();
  5132. var i=0;
  5133. if(_3f2.length>0){
  5134. var _3f4=_3f2[0].getColumnRef();
  5135. if(_3f4!=null&&_3f4!=""){
  5136. for(i=1;i<_3f2.length;i++){
  5137. if(_3f4!=_3f2[i].getColumnRef()){
  5138. return false;
  5139. }
  5140. }
  5141. }else{
  5142. var _3f5=_3f2[0].getCellTypeId();
  5143. for(i=1;i<_3f2.length;i++){
  5144. if(_3f5!=_3f2[i].getCellTypeId()){
  5145. return false;
  5146. }
  5147. }
  5148. }
  5149. return true;
  5150. }
  5151. return false;
  5152. };
  5153. CSelectionController.prototype.checkForReportElementNode=function(node){
  5154. if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){
  5155. if(node.className=="tt"){
  5156. 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")){
  5157. node=node.parentNode.parentNode;
  5158. }else{
  5159. return false;
  5160. }
  5161. }else{
  5162. if(typeof node.parentNode!="undefined"&&node.parentNode!=null){
  5163. var _3f7=node.parentNode;
  5164. while(typeof _3f7!="undefined"&&_3f7!=null){
  5165. if(typeof _3f7.className!="undefined"&&_3f7.className!=null&&_3f7.className.substr(0,2)=="ft"){
  5166. node=_3f7;
  5167. break;
  5168. }else{
  5169. _3f7=_3f7.parentNode;
  5170. }
  5171. }
  5172. }else{
  5173. return false;
  5174. }
  5175. }
  5176. var _3f8=node.className.substr(0,2);
  5177. if(_3f8=="ta"||_3f8=="ts"||_3f8=="ft"){
  5178. return true;
  5179. }
  5180. }
  5181. return false;
  5182. };
  5183. CSelectionController.prototype.chartClicked=function(_3f9){
  5184. this.setSelectedChartArea(_3f9);
  5185. };
  5186. CSelectionController.prototype.processColumnTitleNode=function(_3fa){
  5187. if(!_3fa||!this.m_oCognosViewer.isBux){
  5188. return;
  5189. }
  5190. var _3fb=_3fa.getCellRef();
  5191. if(_3fb.getAttribute("contextAugmented")=="true"||"list"!=_3fa.getDataContainerType()||"columnTitle"!=_3fa.getLayoutType()){
  5192. return;
  5193. }
  5194. var _3fc=_3fa.getSelectedContextIds();
  5195. var _3fd=false;
  5196. if(typeof _3fc=="object"&&_3fc!=null&&_3fc.length>0){
  5197. if(this.isRelational(_3fc)&&this.getQueryModelId(_3fc[0][0])==null){
  5198. _3fd=true;
  5199. }else{
  5200. return;
  5201. }
  5202. }
  5203. var lid=_3fb.parentNode.parentNode.parentNode.getAttribute("lid");
  5204. var _3ff=_3fb.parentNode.nextSibling;
  5205. var _400=getChildElementsByAttribute(_3ff,"td","cid",_3fb.getAttribute("cid"));
  5206. var _401=null;
  5207. var _402=true;
  5208. var _403;
  5209. if(_400.length>0){
  5210. var _404=_400[0];
  5211. var _405=_404.childNodes.length;
  5212. for(var _406=0;_406<_405;_406++){
  5213. var _407=_404.childNodes[_406];
  5214. if(_407.getAttribute&&((_407.nodeName.toLowerCase()=="table"&&typeof _407.getAttribute("lid")=="string")||_407.nodeName.toLowerCase()=="map"||_407.nodeName.toLowerCase()=="img"||_407.getAttribute("chartcontainer")=="true")){
  5215. if(_406==0){
  5216. _402=false;
  5217. }
  5218. }else{
  5219. _403=[];
  5220. if(_407.nodeName.toLowerCase()=="span"){
  5221. _403.push(_407);
  5222. }
  5223. var _408=_407.getElementsByTagName?_407.getElementsByTagName("span"):[];
  5224. for(var _409=0;_409<_408.length;++_409){
  5225. if(lid==getImmediateLayoutContainerId(_408[_409])){
  5226. _403.push(_408[_409]);
  5227. }
  5228. }
  5229. for(var _40a=0;_40a<_403.length;++_40a){
  5230. var _40b=_403[_40a];
  5231. if(_40b.nodeType==1&&_40b.nodeName.toLowerCase()=="span"&&_40b.style.visibility!="hidden"){
  5232. if(_40b.getAttribute("ctx")!=null&&_40b.getAttribute("ctx")!=""){
  5233. _401=_40b.getAttribute("ctx");
  5234. break;
  5235. }
  5236. }
  5237. }
  5238. }
  5239. }
  5240. }
  5241. if(_401!=null){
  5242. var _40c=_401.split("::")[0].split(":")[0];
  5243. if(!_3fd){
  5244. _403=_3fb.getElementsByTagName("span");
  5245. if(_403.length!=0){
  5246. var _40d=this.m_oCDManager.m_cd[_40c];
  5247. var _40e=this.getTextValue(_403);
  5248. var _40f={"u":_40e===null?"":_40e};
  5249. if(typeof _40d!="undefined"){
  5250. if(typeof _40d["r"]!="undefined"){
  5251. _40f.r=_40d["r"];
  5252. }
  5253. if(typeof _40d["q"]!="undefined"){
  5254. _40f.q=_40d["q"];
  5255. }
  5256. if(typeof _40d["i"]!="undefined"){
  5257. _40f.i=_40d["i"];
  5258. }
  5259. }
  5260. var _410="cloned"+_40c;
  5261. this.m_oCDManager.m_cd[_410]=_40f;
  5262. _403[0].setAttribute("ctx",_410);
  5263. _3fa=this.getSelectionObjectFactory().processCTX(_3fa,_410);
  5264. }
  5265. }else{
  5266. var qmid=this.getQueryModelId(_40c);
  5267. if(qmid==null){
  5268. }
  5269. if(qmid!=null){
  5270. var _412=_3fc[0][0];
  5271. this.m_oCDManager.m_cd[_412].i=this.m_oCDManager.m_cd[_40c].i;
  5272. return false;
  5273. }
  5274. }
  5275. }else{
  5276. _402=false;
  5277. }
  5278. if(!_402){
  5279. _3fb.setAttribute("canSort","false");
  5280. }
  5281. _3fb.setAttribute("contextAugmented","true");
  5282. };
  5283. CSelectionController.prototype.selectionsInSameDataContainer=function(){
  5284. try{
  5285. var _413=this.getAllSelectedObjects();
  5286. var _414=_413[0].getLayoutElementId();
  5287. for(var _415=1;_415<_413.length;_415++){
  5288. if(_414!=_413[_415].getLayoutElementId()){
  5289. return false;
  5290. }
  5291. }
  5292. }
  5293. catch(e){
  5294. return false;
  5295. }
  5296. return true;
  5297. };
  5298. CSelectionController.prototype.selectionsFromSameDataItem=function(){
  5299. try{
  5300. var _416=this.getAllSelectedObjects();
  5301. var _417=_416[0].getDataItems()[0][0];
  5302. for(var _418=1;_418<_416.length;_418++){
  5303. if(_417!=_416[_418].getDataItems()[0][0]){
  5304. return false;
  5305. }
  5306. }
  5307. }
  5308. catch(e){
  5309. return false;
  5310. }
  5311. return true;
  5312. };
  5313. CSelectionController.prototype.isRelational=function(_419){
  5314. try{
  5315. if(!_419){
  5316. var _41a=this.getAllSelectedObjects()[0];
  5317. _419=_41a.getSelectedContextIds();
  5318. }
  5319. for(var _41b=0;_41b<_419.length;_41b++){
  5320. for(var _41c=0;_41c<_419[_41b].length;_41c++){
  5321. var ctx=_419[_41b][_41c];
  5322. var mun=this.getMun(ctx);
  5323. var lun=this.getLun(ctx);
  5324. var hun=this.getHun(ctx);
  5325. if(mun!=null&&typeof mun!="undefined"&&mun.length>0){
  5326. return false;
  5327. }
  5328. if(lun!=null&&typeof lun!="undefined"&&lun.length>0){
  5329. return false;
  5330. }
  5331. if(hun!=null&&typeof hun!="undefined"&&hun.length>0){
  5332. return false;
  5333. }
  5334. }
  5335. }
  5336. return true;
  5337. }
  5338. catch(e){
  5339. return true;
  5340. }
  5341. return true;
  5342. };
  5343. CSelectionController.prototype.getDataContainerType=function(){
  5344. try{
  5345. if(!this.getAllSelectedObjects()[0]){
  5346. return "";
  5347. }
  5348. return this.getAllSelectedObjects()[0].m_dataContainerType;
  5349. }
  5350. catch(e){
  5351. return "";
  5352. }
  5353. };
  5354. CSelectionController.prototype.areSelectionsColumnRowTitles=function(){
  5355. try{
  5356. var _421=this.getAllSelectedObjects();
  5357. for(var _422=0;_422<_421.length;_422++){
  5358. var _423=_421[_422];
  5359. if(_423.getLayoutType()!="columnTitle"||_423.isHomeCell()){
  5360. return false;
  5361. }
  5362. }
  5363. }
  5364. catch(e){
  5365. return false;
  5366. }
  5367. return true;
  5368. };
  5369. CSelectionController.prototype.selectionsAreMeasures=function(){
  5370. try{
  5371. var _424=this.getAllSelectedObjects();
  5372. for(var _425=0;_425<_424.length;_425++){
  5373. var _426=_424[_425];
  5374. if(this.getUsageInfo(_426.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
  5375. return false;
  5376. }
  5377. }
  5378. }
  5379. catch(e){
  5380. return false;
  5381. }
  5382. return true;
  5383. };
  5384. CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
  5385. var _427=this.getAllSelectedObjects();
  5386. if(_427.length==0){
  5387. return false;
  5388. }
  5389. for(var _428=0;_428<_427.length;_428++){
  5390. var _429=_427[0];
  5391. if(_429.getSelectedContextIds().length==0){
  5392. return false;
  5393. }
  5394. var _42a=_429.getSelectedContextIds()[0][0];
  5395. var mun=this.getMun(_42a);
  5396. var _42c=this.getUsageInfo(_42a);
  5397. if(mun==null||typeof mun=="undefined"||mun.length==0||_42c==this.c_usageMeasure){
  5398. return false;
  5399. }
  5400. }
  5401. return true;
  5402. };
  5403. CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
  5404. var _42d=this.getAllSelectedObjects();
  5405. if(_42d.length==0){
  5406. return false;
  5407. }
  5408. var _42e=this.selectionsHaveCalculationMetadata();
  5409. for(var _42f=0;_42f<_42d.length;_42f++){
  5410. var _430=_42d[_42f];
  5411. var _431=_430.getSelectedContextIds()[0][0];
  5412. if(!this.isCalculationOrMeasure(_431,_42e)){
  5413. return false;
  5414. }
  5415. }
  5416. return true;
  5417. };
  5418. CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
  5419. try{
  5420. var _432=this.getDataContainerType();
  5421. var _433=this.getAllSelectedObjects();
  5422. for(var _434=0;_434<_433.length;_434++){
  5423. var _435=_433[_434];
  5424. var _436=_435.getSelectedContextIds();
  5425. var _437=_436[0][0];
  5426. var sHun=this.getHun(_437);
  5427. if(!this.hasCalculationMetadata(_437,_436,_432)){
  5428. return false;
  5429. }
  5430. }
  5431. }
  5432. catch(e){
  5433. return false;
  5434. }
  5435. return true;
  5436. };
  5437. CSelectionController.prototype.isCalculationOrMeasure=function(_439,_43a){
  5438. var mun=this.getMun(_439);
  5439. var _43c=this.getUsageInfo(_439);
  5440. if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_43a)||_43c==this.c_usageMeasure)){
  5441. return false;
  5442. }
  5443. return true;
  5444. };
  5445. CSelectionController.prototype.hasCalculationMetadata=function(_43d,_43e,_43f){
  5446. var sHun=this.getHun(_43d);
  5447. if(this.getUsageInfo(_43d)!=this.c_usageMeasure){
  5448. if((this.isRelational(_43e)&&this.getQueryModelId(_43d)!=null)||(!this.isRelational(_43e)&&_43f=="list"&&(sHun&&sHun!=""))){
  5449. return false;
  5450. }
  5451. }
  5452. return true;
  5453. };
  5454. CSelectionController.prototype.selectionsAreDateTime=function(){
  5455. try{
  5456. var _441=this.getAllSelectedObjects();
  5457. for(var _442=0;_442<_441.length;_442++){
  5458. var _443=_441[_442];
  5459. var _444=_443.getSelectedContextIds();
  5460. var _445=_444[0][0];
  5461. var _446=this.getDataType(_445);
  5462. if(_446&&typeof this.m_ccl_dateTypes[_446]!=="undefined"){
  5463. return true;
  5464. }
  5465. }
  5466. }
  5467. catch(e){
  5468. return false;
  5469. }
  5470. return false;
  5471. };
  5472. CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
  5473. try{
  5474. var _447=this.getAllSelectedObjects();
  5475. if(_447===null||_447.length<=0){
  5476. return null;
  5477. }
  5478. var _448=this.m_oCognosViewer.getModelPath();
  5479. var _449=[];
  5480. for(var i=0;i<_447.length;i++){
  5481. var obj=_447[i].getContextJsonObject(this,_448);
  5482. _449.push(obj);
  5483. }
  5484. return _449;
  5485. }
  5486. catch(e){
  5487. }
  5488. };
  5489. CSelectionController.prototype.destroy=function(){
  5490. delete this.m_oCognosViewer;
  5491. delete this.m_aCutColumns;
  5492. delete this.m_aSelectedObjects;
  5493. delete this.m_selectedClass;
  5494. delete this.m_cutClass;
  5495. if(this.m_oObserver&&this.m_oObserver.destroy){
  5496. this.m_oObserver.destroy();
  5497. }
  5498. delete this.m_oObserver;
  5499. delete this.m_aReportMetadataArray;
  5500. delete this.m_aReportContextDataArray;
  5501. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  5502. this.m_oCDManager.destroy();
  5503. }
  5504. delete this.m_oCDManager;
  5505. if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){
  5506. this.m_oSelectionObjectFactory.destroy();
  5507. }
  5508. delete this.m_oSelectionObjectFactory;
  5509. delete this.m_selectedChartArea;
  5510. delete this.m_selectedChartNodes;
  5511. delete this.m_selectionContainerMap;
  5512. delete this.m_chartHelpers;
  5513. delete this.m_oJsonForMarshal;
  5514. if(this.hasSavedSelections()){
  5515. this.clearSavedSelections();
  5516. }
  5517. };
  5518. function clearTextSelection(_44c){
  5519. if(!_44c){
  5520. _44c=document;
  5521. }
  5522. try{
  5523. if(typeof _44c.selection=="object"&&_44c.selection!==null){
  5524. _44c.selection.empty();
  5525. }else{
  5526. if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){
  5527. window.getSelection().removeAllRanges();
  5528. }
  5529. }
  5530. }
  5531. catch(e){
  5532. }
  5533. };
  5534. function CDrillThroughTarget(_44d,_44e,_44f,_450,_451,path,_453,_454,_455,_456,_457,_458){
  5535. this.m_label=_44d;
  5536. this.m_outputFormat=_44e;
  5537. this.m_outputLocale=_44f;
  5538. this.m_showInNewWindow=_450;
  5539. this.m_method=_451;
  5540. this.m_path=path;
  5541. this.m_bookmark=_453;
  5542. this.m_parameters=_454;
  5543. this.m_objectPaths=_455;
  5544. this.m_prompt="false";
  5545. this.m_dynamicDrillThrough=false;
  5546. this.m_parameterProperties=_458;
  5547. if(typeof _456!="undefined"&&_456!=null){
  5548. if(_456=="yes"){
  5549. this.m_prompt="true";
  5550. }else{
  5551. if(_456=="target"){
  5552. this.m_prompt="";
  5553. }
  5554. }
  5555. }
  5556. if(typeof _457!="undefined"&&_457!=null){
  5557. if(typeof _457=="string"){
  5558. _457=_457=="true"?true:false;
  5559. }
  5560. this.m_dynamicDrillThrough=_457;
  5561. }
  5562. };
  5563. function CDrillThroughTarget_getParameterProperties(){
  5564. return this.m_parameterProperties;
  5565. };
  5566. function CDrillThroughTarget_getLabel(){
  5567. return this.m_label;
  5568. };
  5569. function CDrillThroughTarget_getOutputFormat(){
  5570. return this.m_outputFormat;
  5571. };
  5572. function CDrillThroughTarget_getOutputLocale(){
  5573. return this.m_outputLocale;
  5574. };
  5575. function CDrillThroughTarget_getShowInNewWindow(){
  5576. return this.m_showInNewWindow;
  5577. };
  5578. function CDrillThroughTarget_getMethod(){
  5579. return this.m_method;
  5580. };
  5581. function CDrillThroughTarget_getPath(){
  5582. return this.m_path;
  5583. };
  5584. function CDrillThroughTarget_getBookmark(){
  5585. return this.m_bookmark;
  5586. };
  5587. function CDrillThroughTarget_getParameters(){
  5588. return this.m_parameters;
  5589. };
  5590. function CDrillThroughTarget_getObjectPaths(){
  5591. return this.m_objectPaths;
  5592. };
  5593. function CDrillThroughTarget_getPrompt(){
  5594. return this.m_prompt;
  5595. };
  5596. function CDrillThroughTarget_isDynamicDrillThrough(){
  5597. return this.m_dynamicDrillThrough;
  5598. };
  5599. CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel;
  5600. CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat;
  5601. CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale;
  5602. CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow;
  5603. CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod;
  5604. CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath;
  5605. CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark;
  5606. CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters;
  5607. CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths;
  5608. CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt;
  5609. CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough;
  5610. CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties;
  5611. function sXmlEncode(_459){
  5612. var _45a=""+_459;
  5613. if((_45a=="0")||((_459!=null)&&(_459!=false))){
  5614. _45a=_45a.replace(/&/g,"&amp;");
  5615. _45a=_45a.replace(/</g,"&lt;");
  5616. _45a=_45a.replace(/>/g,"&gt;");
  5617. _45a=_45a.replace(/"/g,"&quot;");
  5618. _45a=_45a.replace(/'/g,"&apos;");
  5619. }else{
  5620. if(_459==null){
  5621. _45a="";
  5622. }
  5623. }
  5624. return _45a;
  5625. };
  5626. function createFormField(name,_45c){
  5627. var _45d=document.createElement("input");
  5628. _45d.setAttribute("type","hidden");
  5629. _45d.setAttribute("name",name);
  5630. _45d.setAttribute("value",_45c);
  5631. return (_45d);
  5632. };
  5633. function setBackURLToCloseWindow(_45e){
  5634. var _45f=_45e.childNodes;
  5635. if(_45f){
  5636. for(var _460=0;_460<_45f.length;++_460){
  5637. var _461=_45f[_460];
  5638. var _462=_461.getAttribute("name");
  5639. if(_462&&_462=="ui.backURL"){
  5640. _45e.removeChild(_461);
  5641. }
  5642. }
  5643. }
  5644. _45e.appendChild(createFormField("ui.backURL","javascript:window.close();"));
  5645. };
  5646. function doMultipleDrills(_463,cvId){
  5647. if(parent!=this&&parent.doMultipleDrills){
  5648. if(getCVId()!=""&&getCVId()!=cvId){
  5649. cvId=getCVId();
  5650. }
  5651. return parent.doMultipleDrills(_463,cvId);
  5652. }else{
  5653. if(window.gViewerLogger){
  5654. window.gViewerLogger.log("Drill Targets",_463,"text");
  5655. }
  5656. var oCV=null;
  5657. try{
  5658. oCV=getCognosViewerObjectRef(cvId);
  5659. }
  5660. catch(exception){
  5661. }
  5662. var _466=buildDrillForm(oCV);
  5663. addDrillEnvironmentFormFields(_466,oCV);
  5664. if(typeof oCV!="undefined"&&oCV!=null){
  5665. var _467=oCV.getModelPath();
  5666. _466.appendChild(createFormField("modelPath",_467));
  5667. var _468=oCV.getSelectionController();
  5668. var _469="";
  5669. if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
  5670. _469=getViewerSelectionContext(_468,new CSelectionContext(_467));
  5671. }
  5672. _466.appendChild(createFormField("drillContext",_469));
  5673. _466.appendChild(createFormField("modelDrillEnabled",_468.getModelDrillThroughEnabled()));
  5674. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  5675. _466.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
  5676. }else{
  5677. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  5678. _466.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
  5679. }
  5680. }
  5681. }
  5682. _466.setAttribute("launchGotoPage","true");
  5683. _466.appendChild(createFormField("drillTargets",_463));
  5684. _466.appendChild(createFormField("invokeGotoPage","true"));
  5685. _466.appendChild(createFormField("m","portal/drillthrough.xts"));
  5686. _466.appendChild(createFormField("b_action","xts.run"));
  5687. var _46a="winNAT_"+(new Date()).getTime();
  5688. var _46b="..";
  5689. if(oCV!=null){
  5690. _46b=oCV.getWebContentRoot();
  5691. var _46c=oCV.getExecutionParameters();
  5692. if(_46c!=""){
  5693. _466.appendChild(createFormField("encExecutionParameters",_46c));
  5694. }
  5695. }
  5696. if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_466)){
  5697. if(oCV&&typeof oCV.launchGotoPage==="function"){
  5698. oCV.launchGotoPage(_466);
  5699. }else{
  5700. var _46d=_46b+"/rv/blankDrillWin.html";
  5701. _466.target=_46a;
  5702. window.open(_46d,_46a);
  5703. }
  5704. }
  5705. }
  5706. };
  5707. function buildDrillForm(oCV){
  5708. var _46f=document.getElementById("drillForm");
  5709. if(_46f){
  5710. document.body.removeChild(_46f);
  5711. }
  5712. _46f=document.createElement("form");
  5713. if(typeof oCV!="undefined"&&oCV!=null){
  5714. var _470=document.getElementById("formWarpRequest"+oCV.getId());
  5715. _46f.setAttribute("target",_470.getAttribute("target"));
  5716. _46f.setAttribute("action",_470.getAttribute("action"));
  5717. }else{
  5718. _46f.setAttribute("action",location.pathname);
  5719. }
  5720. _46f.setAttribute("id","drillForm");
  5721. _46f.setAttribute("name","drillForm");
  5722. _46f.setAttribute("method","post");
  5723. _46f.style.display="none";
  5724. document.body.appendChild(_46f);
  5725. return _46f;
  5726. };
  5727. function addDrillEnvironmentFormFields(_471,oCV){
  5728. if(window.g_dfEmail){
  5729. _471.appendChild(createFormField("dfemail",window.g_dfEmail));
  5730. }
  5731. if(oCV!=null){
  5732. _471.appendChild(createFormField("cv.id",oCV.getId()));
  5733. if(typeof oCV.envParams["ui.sh"]!="undefined"){
  5734. _471.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
  5735. }
  5736. if(oCV.getViewerWidget()==null){
  5737. if(typeof oCV.envParams["cv.header"]!="undefined"){
  5738. _471.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
  5739. }
  5740. if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
  5741. _471.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
  5742. }else{
  5743. var _473=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
  5744. if(oCV.m_viewerFragment&&_473!=null&&_473===true){
  5745. var _474=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
  5746. _471.appendChild(createFormField("cv.toolbar",_474));
  5747. }
  5748. }
  5749. }
  5750. if(typeof oCV.envParams["ui.backURL"]!="undefined"){
  5751. _471.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
  5752. }
  5753. if(typeof oCV.envParams["ui.postBack"]!="undefined"){
  5754. _471.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
  5755. }
  5756. if(typeof oCV.envParams["savedEnv"]!="undefined"){
  5757. _471.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
  5758. }
  5759. if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
  5760. _471.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
  5761. }
  5762. if(typeof oCV.envParams["lang"]!="undefined"){
  5763. _471.appendChild(createFormField("lang",oCV.envParams["lang"]));
  5764. }
  5765. if(typeof oCV.envParams["ui.errURL"]!="undefined"){
  5766. _471.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
  5767. }
  5768. var _475="";
  5769. if(oCV.envParams["ui.routingServerGroup"]){
  5770. _475=oCV.envParams["ui.routingServerGroup"];
  5771. }
  5772. _471.appendChild(createHiddenFormField("ui.routingServerGroup",_475));
  5773. }else{
  5774. _471.appendChild(createFormField("cv.header","false"));
  5775. _471.appendChild(createFormField("cv.toolbar","false"));
  5776. }
  5777. };
  5778. function appendReportHistoryObjects(oCV,_477){
  5779. if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_477!=null){
  5780. oCV.rvMainWnd.addCurrentReportToReportHistory();
  5781. var _478=oCV.rvMainWnd.saveReportHistoryAsXML();
  5782. _477.appendChild(createFormField("cv.previousReports",_478));
  5783. }
  5784. };
  5785. function doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483){
  5786. var _484="";
  5787. if(typeof cvId=="string"){
  5788. _484=cvId;
  5789. }
  5790. var oCV=null;
  5791. try{
  5792. oCV=getCognosViewerObjectRef(cvId);
  5793. }
  5794. catch(exception){
  5795. }
  5796. if(!oCV&&parent!=this&&parent.doSingleDrill){
  5797. if(getCVId()!=""&&getCVId()!=cvId){
  5798. cvId=getCVId();
  5799. }
  5800. return parent.doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483);
  5801. }else{
  5802. if(typeof _47b=="undefined"){
  5803. _47b="default";
  5804. }else{
  5805. if(_47b=="execute"){
  5806. _47b="run";
  5807. }
  5808. }
  5809. if(_47b=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
  5810. _479="_blank";
  5811. }
  5812. var _486=buildDrillForm(oCV);
  5813. var _487="<authoredDrillRequest>";
  5814. _487+="<param name=\"action\">"+sXmlEncode(_47b)+"</param>";
  5815. _487+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
  5816. _487+="<param name=\"format\">"+sXmlEncode(_47c)+"</param>";
  5817. _487+="<param name=\"locale\">"+sXmlEncode(_47d)+"</param>";
  5818. _487+="<param name=\"prompt\">"+sXmlEncode(_482)+"</param>";
  5819. _487+="<param name=\"dynamicDrill\">"+sXmlEncode(_483)+"</param>";
  5820. if(typeof oCV!="undefined"&&oCV!=null){
  5821. _487+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
  5822. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
  5823. _487+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  5824. }
  5825. var _488=oCV.getModelPath();
  5826. _487+="<param name=\"metadataModel\">"+sXmlEncode(_488)+"</param>";
  5827. _487+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_488)))+"</param>";
  5828. if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
  5829. _487+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
  5830. }else{
  5831. if(typeof oCV.envParams["ui.spec"]!="undefined"){
  5832. _487+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
  5833. }
  5834. }
  5835. }
  5836. if(_47e!=""){
  5837. _487+="<param name=\"bookmark\">"+_47e+"</param>";
  5838. }
  5839. if(_47b!="view"){
  5840. if(typeof _47f!="undefined"){
  5841. _487+="<param name=\"sourceContext\">"+sXmlEncode(_47f)+"</param>";
  5842. }
  5843. if(typeof _480!="undefined"){
  5844. _487+="<param name=\"objectPaths\">"+sXmlEncode(_480)+"</param>";
  5845. }
  5846. }
  5847. var _489=0;
  5848. _487+="<drillParameters>";
  5849. var _48a=[];
  5850. for(_489=1;_489<args.length;_489++){
  5851. var sSel=args[_489][1];
  5852. if(_47c=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
  5853. var _48c=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_489][1])));
  5854. if(_48c){
  5855. var sMun=_48c.getAttribute("mun");
  5856. if(sMun!=null&&sMun!=""){
  5857. _48c.setAttribute("useValue",sMun);
  5858. sSel="<selectChoices>"+XMLBuilderSerializeNode(_48c)+"</selectChoices>";
  5859. }
  5860. }
  5861. }
  5862. var _48e=args[_489][0];
  5863. var _48f=false;
  5864. for(var i=0;i<_48a.length;i++){
  5865. var _491=_48a[i];
  5866. if(_491.name===_48e&&_491.value===sSel){
  5867. _48f=true;
  5868. break;
  5869. }
  5870. }
  5871. if(!_48f){
  5872. _48a.push({"name":_48e,"value":sSel});
  5873. _487+="<param name=\""+sXmlEncode(_48e)+"\">"+sXmlEncode(sSel)+"</param>";
  5874. }
  5875. }
  5876. _487+="</drillParameters>";
  5877. _487+=getExecutionParamNode(oCV);
  5878. _487+="</authoredDrillRequest>";
  5879. _486.appendChild(createFormField("authoredDrill.request",_487));
  5880. _486.appendChild(createFormField("ui.action","authoredDrillThrough2"));
  5881. _486.appendChild(createFormField("b_action","cognosViewer"));
  5882. addDrillEnvironmentFormFields(_486,oCV);
  5883. if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_486)){
  5884. if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
  5885. oCV.sendDrillThroughRequest(_486);
  5886. }else{
  5887. if(_479==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
  5888. oCV.m_viewerFragment.raiseAuthoredDrillEvent(_487);
  5889. }else{
  5890. if((oCV!=null&&oCV.getViewerWidget()!=null)||_479!=""){
  5891. setBackURLToCloseWindow(_486);
  5892. var _492="winNAT_"+(new Date()).getTime();
  5893. var _493="..";
  5894. if(oCV!=null){
  5895. _493=oCV.getWebContentRoot();
  5896. }
  5897. var _494=_493+"/rv/blankDrillWin.html";
  5898. if(_484){
  5899. _494+="?cv.id="+_484;
  5900. }
  5901. if(oCV==null){
  5902. _494=window.location.href.substring(0,window.location.href.indexOf("/v1"));
  5903. _494+="/?perspective=classicviewer";
  5904. _494+="&altDrillFlag=true";
  5905. _494+="&format="+sXmlEncode(_47c);
  5906. var _495=_486.getAttribute("name")+Date.now().toString();
  5907. _486.setAttribute("name",_495);
  5908. if(typeof (Storage)!=="undefined"){
  5909. localStorage.setItem(_495,_486.outerHTML);
  5910. _494+="&drillFormLabel="+_495;
  5911. }else{
  5912. console.log("Sorry! No Web Storage support...");
  5913. }
  5914. }
  5915. if(window.gViewerLogger){
  5916. window.gViewerLogger.log("Drill Specification",_487,"xml");
  5917. }
  5918. _486.target=_492;
  5919. newWindow=window.open(_494,_492);
  5920. }else{
  5921. appendReportHistoryObjects(oCV,_486);
  5922. if(window.gViewerLogger){
  5923. window.gViewerLogger.log("Drill Specification",_487,"xml");
  5924. }
  5925. _486.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
  5926. _486.submit();
  5927. if(oCV!=null&&!oCV.getDrillFormTarget){
  5928. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
  5929. }
  5930. }
  5931. }
  5932. }
  5933. }
  5934. }
  5935. };
  5936. function getExecutionParamNode(oCV){
  5937. var _497="";
  5938. if(typeof oCV!="undefined"&&oCV!=null){
  5939. var _498=oCV.getExecutionParameters();
  5940. if(_498!=""){
  5941. _497+="<param name=\"executionParameters\">";
  5942. _497+=sXmlEncode(_498);
  5943. _497+="</param>";
  5944. }
  5945. }
  5946. return _497;
  5947. };
  5948. function doSingleDrillThrough(_499,_49a,cvId){
  5949. var _49c=_499[0][0];
  5950. if(typeof _49c=="undefined"||_49c==null){
  5951. return;
  5952. }
  5953. var _49d=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_49c]:drillTargets[_49c];
  5954. if(typeof _49d=="undefined"){
  5955. return;
  5956. }
  5957. if(_49a!=""&&_49d.getPath()==""){
  5958. document.location="#"+_49a;
  5959. }else{
  5960. var args=[];
  5961. args[args.length]=["ui.object",_49d.getPath()];
  5962. for(var _49f=1;_49f<_499.length;++_49f){
  5963. args[args.length]=_499[_49f];
  5964. }
  5965. var _4a0="";
  5966. if(_49d.getShowInNewWindow()=="true"){
  5967. _4a0="_blank";
  5968. }
  5969. var _4a1=_49d.getParameters();
  5970. var _4a2=_49d.getObjectPaths();
  5971. var _4a3=cvId;
  5972. if(!cvId){
  5973. _4a3=getCVId();
  5974. }
  5975. doSingleDrill(_4a0,args,_49d.getMethod(),_49d.getOutputFormat(),_49d.getOutputLocale(),_49a,_4a1,_4a2,_4a3,_49d.getPrompt(),false);
  5976. }
  5977. };
  5978. function getCVId(){
  5979. var _4a4="";
  5980. try{
  5981. _4a4=this.frameElement.id.substring("CVIFrame".length);
  5982. }
  5983. catch(exception){
  5984. }
  5985. return _4a4;
  5986. };
  5987. function doMultipleDrillThrough(_4a5,cvId){
  5988. var _4a7="<rvDrillTargets>";
  5989. for(var _4a8=0;_4a8<_4a5.length;++_4a8){
  5990. var _4a9=_4a5[_4a8];
  5991. if(_4a9.length<3){
  5992. continue;
  5993. }
  5994. var _4aa=_4a9[0];
  5995. if(typeof _4aa=="undefined"||_4aa==null){
  5996. continue;
  5997. }
  5998. var _4ab=_4a9[1];
  5999. if(typeof _4ab=="undefined"||_4ab==null){
  6000. continue;
  6001. }
  6002. var _4ac=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_4aa]:drillTargets[_4aa];
  6003. if(typeof _4ac=="undefined"||_4ac==null){
  6004. continue;
  6005. }
  6006. if(_4ab===null||_4ab===""){
  6007. _4ab=_4ac.getLabel();
  6008. }
  6009. _4a7+="<drillTarget ";
  6010. _4a7+="outputFormat=\"";
  6011. _4a7+=_4ac.getOutputFormat();
  6012. _4a7+="\" ";
  6013. _4a7+="outputLocale=\"";
  6014. _4a7+=_4ac.getOutputLocale();
  6015. _4a7+="\" ";
  6016. _4a7+="label=\"";
  6017. _4a7+=sXmlEncode(_4ab);
  6018. _4a7+="\" ";
  6019. _4a7+="path=\"";
  6020. _4a7+=sXmlEncode(_4ac.getPath());
  6021. _4a7+="\" ";
  6022. _4a7+="showInNewWindow=\"";
  6023. _4a7+=_4ac.getShowInNewWindow();
  6024. _4a7+="\" ";
  6025. _4a7+="method=\"";
  6026. _4a7+=_4ac.getMethod();
  6027. _4a7+="\" ";
  6028. _4a7+="prompt=\"";
  6029. _4a7+=_4ac.getPrompt();
  6030. _4a7+="\" ";
  6031. _4a7+="dynamicDrill=\"";
  6032. _4a7+=_4ac.isDynamicDrillThrough();
  6033. _4a7+="\">";
  6034. for(var _4ad=2;_4ad<_4a9.length;++_4ad){
  6035. _4a7+=_4a9[_4ad];
  6036. }
  6037. _4a7+=_4ac.getParameters();
  6038. _4a7+=_4ac.getObjectPaths();
  6039. _4a7+="</drillTarget>";
  6040. }
  6041. _4a7+="</rvDrillTargets>";
  6042. if(!cvId){
  6043. cvId=getCVId();
  6044. }
  6045. doMultipleDrills(_4a7,cvId);
  6046. };
  6047. function CScriptLoader(_4ae){
  6048. this.m_oFiles={};
  6049. this.m_aScripts=[];
  6050. this.m_aDocumentWriters=[];
  6051. this.m_ajaxWarnings=[];
  6052. this.m_bIgnoreAjaxWarnings=false;
  6053. this.m_bHandleStylesheetLimit=false;
  6054. this.m_iInterval=20;
  6055. this.m_reFindCssPath=new RegExp("<link[^>]*href=\"([^\"]*)\"","i");
  6056. this.m_reFindInlineStyle=/<style\b(\s|.)*?<\/style>/gi;
  6057. this.m_reHasCss=/<link .*?>/gi;
  6058. this.m_reIsCss=/\.css$/i;
  6059. this.m_reIsJavascript=/\.js$/i;
  6060. this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i;
  6061. this.m_reScriptTagClose=/\s*<\/script>.*?$/i;
  6062. this.m_reScriptTagOpen=/^.*?<script[^>]*>\s*/i;
  6063. this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi;
  6064. this.m_reStyleTagOpen=/^\s*<style[^>]*>(\s|<|!|-)*/gi;
  6065. this.m_reEscapedCharacters=/\\[\\"']/g;
  6066. this.m_reStringLiterals=/("|')[\s\S]*?\1/g;
  6067. this.m_sWebContentRoot=_4ae;
  6068. this.m_bHasCompletedExecution=false;
  6069. this.m_aScriptLoadQueue=[];
  6070. this.m_bBlockScriptLoading=false;
  6071. this.m_bUseScriptBlocking=false;
  6072. this.m_bBlockPromptingLocaleScripts=false;
  6073. this.m_aBlockedPromptingLocaleFileQueue=[];
  6074. };
  6075. CScriptLoader.prototype.hasCompletedExecution=function(){
  6076. return this.m_bHasCompletedExecution;
  6077. };
  6078. CScriptLoader.prototype.setHandlerStylesheetLimit=function(_4af){
  6079. this.m_bHandleStylesheetLimit=_4af;
  6080. };
  6081. CScriptLoader.prototype.executeScripts=function(_4b0,_4b1){
  6082. if(this.isReadyToExecute()){
  6083. for(var _4b2=0;_4b2<this.m_aScripts.length;_4b2++){
  6084. if(this.m_aScripts[_4b2]){
  6085. var _4b3=document.createElement("script");
  6086. _4b3.setAttribute("language","javascript");
  6087. _4b3.setAttribute("type","text/javascript");
  6088. this.addNamespaceAttribute(_4b3,_4b1);
  6089. _4b3.text=this.m_aScripts[_4b2];
  6090. document.getElementsByTagName("head").item(0).appendChild(_4b3);
  6091. }
  6092. }
  6093. this.m_aScripts=[];
  6094. for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
  6095. var _4b5=this.m_aDocumentWriters[idx];
  6096. _4b5.execute();
  6097. }
  6098. this.m_aDocumentWriters=[];
  6099. if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
  6100. if(typeof _4b0=="function"){
  6101. _4b0();
  6102. }
  6103. this.m_bHasCompletedExecution=true;
  6104. }else{
  6105. setTimeout(function(){
  6106. window.gScriptLoader.executeScripts(_4b0,_4b1);
  6107. },this.m_iInterval);
  6108. }
  6109. }else{
  6110. setTimeout(function(){
  6111. window.gScriptLoader.executeScripts(_4b0,_4b1);
  6112. },this.m_iInterval);
  6113. }
  6114. };
  6115. CScriptLoader.prototype.isReadyToExecute=function(){
  6116. for(var _4b6 in this.m_oFiles){
  6117. if(this.m_oFiles[_4b6]!="complete"){
  6118. return false;
  6119. }
  6120. }
  6121. if(this.m_aScriptLoadQueue.length>0){
  6122. return false;
  6123. }
  6124. return true;
  6125. };
  6126. CScriptLoader.prototype.loadCSS=function(_4b7,_4b8,_4b9,_4ba){
  6127. var aM=_4b7.match(this.m_reHasCss);
  6128. if(aM){
  6129. for(var i=0;i<aM.length;i++){
  6130. if(aM[i].match(this.m_reFindCssPath)){
  6131. var _4bd=RegExp.$1;
  6132. if(_4bd.indexOf("GlobalReportStyles")!=-1){
  6133. this.validateGlobalReportStyles(_4bd);
  6134. if(_4b9){
  6135. if(_4bd.indexOf("GlobalReportStyles.css")!=-1){
  6136. _4bd=_4bd.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
  6137. }
  6138. var _4be=this.getGlobalReportStylesClassPrefix(_4bd);
  6139. _4bd=_4bd.replace(".css","_NS.css");
  6140. if(_4b8){
  6141. _4b8.className="buxReport "+_4be;
  6142. }
  6143. }
  6144. }
  6145. this.loadObject(_4bd,_4ba);
  6146. }
  6147. _4b7=_4b7.replace(aM[i],"");
  6148. }
  6149. }
  6150. return _4b7;
  6151. };
  6152. CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_4bf){
  6153. var _4c0=null;
  6154. if(_4bf.indexOf("GlobalReportStyles_11.4.css")!=-1){
  6155. _4c0="v114";
  6156. }
  6157. if(_4bf.indexOf("GlobalReportStyles_11.css")!=-1){
  6158. _4c0="v11";
  6159. }
  6160. if(_4bf.indexOf("GlobalReportStyles_10.css")!=-1){
  6161. _4c0="v10";
  6162. }else{
  6163. if(_4bf.indexOf("GlobalReportStyles_1.css")!=-1){
  6164. _4c0="v1";
  6165. }else{
  6166. if(_4bf.indexOf("GlobalReportStyles_none.css")!=-1){
  6167. _4c0="vnone";
  6168. }else{
  6169. if(_4bf.indexOf("GlobalReportStyles.css")!=-1){
  6170. _4c0="v8";
  6171. }
  6172. }
  6173. }
  6174. }
  6175. return _4c0;
  6176. };
  6177. CScriptLoader.prototype.validateGlobalReportStyles=function(_4c1){
  6178. var _4c2=document.getElementsByTagName("link");
  6179. for(var i=0;i<_4c2.length;++i){
  6180. var _4c4=_4c2[i];
  6181. if(_4c4.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
  6182. if(_4c4.getAttribute("href").toLowerCase()!=_4c1.toLowerCase()){
  6183. var _4c5=_4c1.split("/");
  6184. var _4c6=_4c4.getAttribute("href").split("/");
  6185. if(_4c5[_4c5.length-1]!=_4c6[_4c6.length-1]){
  6186. this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
  6187. }
  6188. }
  6189. break;
  6190. }
  6191. }
  6192. };
  6193. CScriptLoader.prototype.loadFile=function(_4c7,_4c8,_4c9){
  6194. var sURL="";
  6195. if(_4c7){
  6196. sURL=_4c7;
  6197. }
  6198. var _4cb=null;
  6199. if(typeof _4c8=="string"){
  6200. _4cb=_4c8;
  6201. }
  6202. var _4cc="POST";
  6203. if(_4c9=="GET"){
  6204. _4cc="GET";
  6205. }
  6206. var _4cd=null;
  6207. if(typeof ActiveXObject!="undefined"){
  6208. _4cd=new ActiveXObject("Msxml2.XMLHTTP");
  6209. }else{
  6210. _4cd=new XMLHttpRequest();
  6211. }
  6212. _4cd.open(_4cc,sURL,false);
  6213. _4cd.send(_4cb);
  6214. return _4cd.responseText;
  6215. };
  6216. function CScriptLoader_onReadyStateChange(){
  6217. if(typeof this.readyState=="undefined"){
  6218. this.readyState="complete";
  6219. }
  6220. if(this.readyState=="loaded"||this.readyState=="complete"){
  6221. var path=this.sFilePath;
  6222. if(!path&&this.getAttribute){
  6223. path=this.getAttribute("href");
  6224. }
  6225. window.gScriptLoader.setFileState(path,"complete");
  6226. window.gScriptLoader.m_bBlockScriptLoading=false;
  6227. if(this.sFilePath&&window.gScriptLoader.m_bBlockPromptingLocaleScripts&&this.sFilePath.match(window.gScriptLoader.m_reIsPromptingLocaleJavascript)){
  6228. window.gScriptLoader.m_bBlockPromptingLocaleScripts=false;
  6229. if(window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.length>0){
  6230. var _4cf=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
  6231. window.gScriptLoader.loadObject(_4cf.sName,_4cf.sNamespaceId);
  6232. }
  6233. }
  6234. if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
  6235. window.gScriptLoader.loadObject();
  6236. }
  6237. }
  6238. };
  6239. CScriptLoader.prototype.moveLinks=function(node){
  6240. if(!node){
  6241. return;
  6242. }
  6243. var _4d1=node.getAttribute("href");
  6244. if(!_4d1||this.m_oFiles[_4d1]){
  6245. return;
  6246. }
  6247. this.m_oFiles[_4d1]="complete";
  6248. document.getElementsByTagName("head").item(0).appendChild(node);
  6249. };
  6250. CScriptLoader.prototype.loadObject=function(_4d2,_4d3){
  6251. var _4d4=null;
  6252. if(typeof _4d2==="undefined"){
  6253. if(this.m_aScriptLoadQueue.length>0){
  6254. var _4d5=this.m_aScriptLoadQueue.shift();
  6255. _4d2=_4d5.name;
  6256. _4d3=_4d5.namespaceId;
  6257. }else{
  6258. return;
  6259. }
  6260. }
  6261. if(this.m_oFiles[_4d2]){
  6262. return;
  6263. }
  6264. if(this.m_bBlockScriptLoading){
  6265. this.m_aScriptLoadQueue.push({"name":_4d2,"namespaceId":_4d3});
  6266. }else{
  6267. if(_4d2.match(this.m_reIsCss)){
  6268. _4d4=document.createElement("link");
  6269. _4d4.setAttribute("rel","stylesheet");
  6270. _4d4.setAttribute("type","text/css");
  6271. _4d4.setAttribute("href",_4d2);
  6272. if(window.isIE&&window.isIE()){
  6273. _4d4.onreadystatechange=CScriptLoader_onReadyStateChange;
  6274. _4d4.onload=CScriptLoader_onReadyStateChange;
  6275. _4d4.onerror=CScriptLoader_onReadyStateChange;
  6276. this.m_oFiles[_4d2]="new";
  6277. }else{
  6278. this.m_oFiles[_4d2]="complete";
  6279. }
  6280. }else{
  6281. if(_4d2.match(this.m_reIsJavascript)){
  6282. if(_4d2.match(this.m_reIsPromptingLocaleJavascript)){
  6283. if(this.m_bBlockPromptingLocaleScripts){
  6284. this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_4d2,"sNamespaceId":_4d3});
  6285. return;
  6286. }
  6287. this.m_bBlockPromptingLocaleScripts=true;
  6288. }
  6289. this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
  6290. _4d4=document.createElement("script");
  6291. _4d4.setAttribute("language","javascript");
  6292. _4d4.setAttribute("type","text/javascript");
  6293. _4d4.setAttribute("src",_4d2);
  6294. _4d4.sFilePath=_4d2;
  6295. _4d4.onreadystatechange=CScriptLoader_onReadyStateChange;
  6296. _4d4.onload=CScriptLoader_onReadyStateChange;
  6297. _4d4.onerror=CScriptLoader_onReadyStateChange;
  6298. this.addNamespaceAttribute(_4d4,_4d3);
  6299. this.m_oFiles[_4d2]="new";
  6300. }
  6301. }
  6302. if(_4d4){
  6303. document.getElementsByTagName("head").item(0).appendChild(_4d4);
  6304. }
  6305. }
  6306. };
  6307. CScriptLoader.prototype.loadScriptsFromDOM=function(_4d6,_4d7,_4d8){
  6308. if(!_4d6){
  6309. return;
  6310. }
  6311. var _4d9=_4d6.getElementsByTagName("script");
  6312. while(_4d9.length>0){
  6313. var _4da=_4d9[0];
  6314. if(_4da.getAttribute("src")!=null&&_4da.getAttribute("src").length>0){
  6315. this.loadObject(_4da.getAttribute("src"),_4d7);
  6316. }else{
  6317. var _4db=_4da.innerHTML;
  6318. var _4dc=false;
  6319. if(_4db.indexOf("document.write")!=-1){
  6320. var _4dd=_4db.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
  6321. _4dc=(_4dd.indexOf("document.write")!=-1);
  6322. }
  6323. if(_4dc){
  6324. if(_4d8){
  6325. var sId="CVScriptFromDOMPlaceHolder"+_4d9.length+_4d7;
  6326. var _4df=_4da.ownerDocument.createElement("span");
  6327. _4df.setAttribute("id",sId);
  6328. _4da.parentNode.insertBefore(_4df,_4da);
  6329. this.m_aDocumentWriters.push(new CDocumentWriter(sId,_4db));
  6330. }
  6331. }else{
  6332. if(_4db.length>0){
  6333. this.m_aScripts.push(_4db);
  6334. }
  6335. }
  6336. }
  6337. _4da.parentNode.removeChild(_4da);
  6338. }
  6339. };
  6340. CScriptLoader.prototype.loadStyles=function(_4e0,_4e1){
  6341. if(!_4e0||!_4e0.parentNode){
  6342. return;
  6343. }
  6344. var _4e2=_4e0.parentNode.getElementsByTagName("style");
  6345. while(_4e2.length>0){
  6346. var _4e3=_4e2[0];
  6347. if(_4e1){
  6348. this.addNamespaceAttribute(_4e3,_4e1);
  6349. }
  6350. if(window.isIE&&window.isIE()&&window.getNavVer()<10){
  6351. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  6352. if(this.m_bHandleStylesheetLimit){
  6353. if(typeof window.gaRV_INSTANCES!="undefined"){
  6354. for(var i=0;i<window.gaRV_INSTANCES.length;i++){
  6355. window.gaRV_INSTANCES[i].cleanupStyles();
  6356. }
  6357. }
  6358. }
  6359. if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
  6360. if(typeof console!="undefined"&&console&&console.log){
  6361. console.log("Stylesheet limit reached.");
  6362. }
  6363. this.m_ajaxWarnings.push("Stylesheet limit reached.");
  6364. return;
  6365. }
  6366. }
  6367. }
  6368. document.getElementsByTagName("head").item(0).appendChild(_4e3);
  6369. }
  6370. };
  6371. CScriptLoader.prototype.loadAll=function(_4e5,_4e6,_4e7,_4e8){
  6372. this.m_bScriptLoaderCalled=true;
  6373. this.m_bHasCompletedExecution=false;
  6374. this.loadScriptsFromDOM(_4e5,_4e7,_4e8);
  6375. if(this.containsAjaxWarnings()){
  6376. return false;
  6377. }
  6378. this.loadStyles(_4e5,_4e7);
  6379. if(this.containsAjaxWarnings()){
  6380. return false;
  6381. }
  6382. this.executeScripts(_4e6,_4e7);
  6383. return true;
  6384. };
  6385. CScriptLoader.prototype.setFileState=function(_4e9,_4ea){
  6386. this.m_oFiles[_4e9]=_4ea;
  6387. };
  6388. CScriptLoader.prototype.containsAjaxWarnings=function(){
  6389. if(this.m_bIgnoreAjaxWarnings){
  6390. return false;
  6391. }else{
  6392. return (this.m_ajaxWarnings.length>0);
  6393. }
  6394. };
  6395. CScriptLoader.prototype.addNamespaceAttribute=function(_4eb,_4ec){
  6396. if(typeof _4ec==="string"){
  6397. _4eb.setAttribute("namespaceId",_4ec);
  6398. }
  6399. };
  6400. if(typeof window.gScriptLoader=="undefined"){
  6401. window.gScriptLoader=new CScriptLoader();
  6402. }
  6403. var InfoBarHelper={};
  6404. InfoBarHelper.getContainerId=function(oCV,_4ee){
  6405. var _4ef=oCV.getLayoutElement(_4ee);
  6406. var lid=_4ef.getAttribute("lid");
  6407. var _4f1=lid===null?"":lid;
  6408. _4f1=_4f1.replace(oCV.getViewerWidget().getViewerId(),"").replace("RAP_NDH_","");
  6409. return _4f1;
  6410. };
  6411. InfoBarHelper.infoBarRemoveFilter=function(_4f2,_4f3,_4f4,_4f5){
  6412. var oCV=eval("window.oCV"+_4f2);
  6413. if(typeof oCV!="undefined"){
  6414. var _4f7=this.getContainerId(oCV,_4f3);
  6415. oCV.executeAction("Filter",{type:"remove",id:_4f7,item:_4f4,details:_4f5});
  6416. }
  6417. };
  6418. InfoBarHelper.infoBarRemoveSlider=function(_4f8,_4f9){
  6419. var oCV=eval("window.oCV"+_4f8);
  6420. var _4fb={};
  6421. _4fb[_4f9]={blockedEvents:["*"]};
  6422. oCV.fireWidgetEvent("com.ibm.bux.widget.updateEventFilter",_4fb);
  6423. if(typeof oCV!="undefined"){
  6424. oCV.executeAction("UpdateDataFilter",{"filterPayload":"{ \"clientId\" :\""+_4f9+"\"}"});
  6425. }
  6426. };
  6427. InfoBarHelper.infoBarRemoveSort=function(_4fc,_4fd,_4fe,_4ff){
  6428. var oCV=eval("window.oCV"+_4fc);
  6429. if(typeof oCV!="undefined"){
  6430. var _501=this.getContainerId(oCV,_4fd);
  6431. if(_4ff=="true"){
  6432. oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe,type:"label"});
  6433. }else{
  6434. oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe});
  6435. }
  6436. }
  6437. };
  6438. dojo.provide("InfoBarBase");
  6439. dojo.declare("InfoBarBase",null,{constructor:function(_502){
  6440. this.m_cognosViewer=_502;
  6441. this.m_parameterValues=new CParameterValues();
  6442. var _503=XMLBuilderLoadXMLFromString(this.m_cognosViewer.getExecutionParameters());
  6443. if(_503.childNodes.length==1){
  6444. this.m_parameterValues.loadWithOptions(_503.childNodes[0],false);
  6445. }
  6446. this.m_parameterStringOperators=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN,RV_RES.IDS_JS_INFOBAR_AND_TEXT,RV_RES.IDS_JS_FILTER_EXCLUDE);
  6447. this.c_SliderCheckboxParameterPrefix="BusinessInsight.";
  6448. this.m_containerInfo=null;
  6449. this.m_editableFilters=null;
  6450. this.m_editableSorts=null;
  6451. this.m_editableSliders=null;
  6452. this.m_id=null;
  6453. this.m_layoutIndex=null;
  6454. this.m_timingDetails=null;
  6455. },setContainerInfo:function(_504){
  6456. this.m_containerInfo=_504;
  6457. },setTimingDetails:function(_505){
  6458. this.m_timingDetails=_505;
  6459. },setEditableFilters:function(_506){
  6460. this.m_editableFilters=_506;
  6461. },setId:function(_507){
  6462. this.m_id=_507;
  6463. },getId:function(){
  6464. return this.m_id;
  6465. },hasPrompts:function(){
  6466. var _508=this.m_parameterValues.length();
  6467. for(var _509=0;_509<_508;++_509){
  6468. var _50a=this.m_parameterValues.getAt(_509);
  6469. if(_50a!==null&&_50a.length()>0&&_50a.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
  6470. return true;
  6471. }
  6472. }
  6473. return false;
  6474. },addPromptDetails:function(_50b){
  6475. var _50c="";
  6476. var _50d=(_50b!==true);
  6477. if(this.hasPrompts()){
  6478. var _50e=this.m_id+"instructions "+this.m_id+"_promptString "+this.m_id+"_lockedString ";
  6479. for(var _50f=0,_510=this.m_parameterValues.length();_50f<_510;++_50f){
  6480. var _511=_50e+this.m_id+_50f+"_promptDetail";
  6481. var _512=this.m_parameterValues.getAt(_50f);
  6482. var _513=_512.length();
  6483. if(_512!==null&&_513>0&&_512.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
  6484. _50c+="<div class=\"infoBarDetailRow\" aria-labelledby=\""+_511+"\" role=\"listitem\""+(!_50d?">":" tabindex=\"-1\">");
  6485. _50c+="<table role=\"presentation\"><tr>";
  6486. _50c+=this.addInfoBarIcon("infobar_filter.gif",true);
  6487. _50c+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_50f+"_promptDetail\">";
  6488. _50c+="<span class=\"bibi\">";
  6489. _50c+=html_encode(_512.name());
  6490. _50c+="</span>";
  6491. _50c+=" : ";
  6492. _50c+=_512.toString(this.m_parameterStringOperators);
  6493. _50c+="</td>";
  6494. _50c+=(_50d?this.addInfoBarIcon("infobar_locked.gif",false):"");
  6495. _50c+="</tr></table></div>";
  6496. }
  6497. }
  6498. }
  6499. return _50c;
  6500. },getPromptDetailsInJSON:function(){
  6501. var _514=[];
  6502. if(this.hasPrompts()){
  6503. for(var _515=0,_516=this.m_parameterValues.length();_515<_516;++_515){
  6504. var _517=this.m_parameterValues.getAt(_515);
  6505. var _518=_517.length();
  6506. if(_517!==null&&_518>0&&_517.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
  6507. _514.push({"type":"prompt","label":_517.name(),"description":_517.toString(this.m_parameterStringOperators)});
  6508. }
  6509. }
  6510. }
  6511. return _514;
  6512. },addSliderDetails:function(_519){
  6513. var _51a="";
  6514. var _51b=(_519!==true);
  6515. if(this.m_containerInfo!==null&&this.m_editableSliders){
  6516. var _51c=this.m_id+"instructions "+this.m_id+"_sliderString ";
  6517. var _51d=this.m_editableSliders.length;
  6518. for(var _51e=0;_51e<_51d;++_51e){
  6519. var _51f=_51c+this.m_id+_51e+"_sliderDetail";
  6520. var _520=this.m_editableSliders[_51e];
  6521. if(_520&&_520.name){
  6522. _51a+="<div class=\"infoBarDetailRow\" type=\"slider\" aria-labelledby=\""+_51f+"\" role=\"listitem\""+(!_51b?">":" tabindex=\"-1\">");
  6523. _51a+="<table role=\"presentation\"><tr>";
  6524. if(typeof _520.controlType!="undefined"&&_520.controlType=="checkbox"){
  6525. _51a+=this.addInfoBarIcon("infobar_select.gif",true);
  6526. }else{
  6527. _51a+=this.addInfoBarIcon("infobar_slider.gif",true);
  6528. }
  6529. _51a+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_51e+"_sliderDetail\">";
  6530. _51a+="<span class=\"bibi\">";
  6531. _51a+=(_520.label?_520.label:_520.name);
  6532. _51a+=(_520.attributeName)?(" - "+_520.attributeName):"";
  6533. _51a+="</span>";
  6534. _51a+=" : ";
  6535. if(typeof _520.values!="undefined"){
  6536. _51a+=this.processFilterOperatorItems(_520.values);
  6537. }else{
  6538. if(_520.min==_520.max){
  6539. _51a+=_520.min;
  6540. }else{
  6541. _51a+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_520.min,_520.max);
  6542. }
  6543. }
  6544. _51a+="</td>";
  6545. _51a+=(_51b?this.addRemoveSliderButton(_520.clientId):"");
  6546. _51a+="</tr></table></div>";
  6547. }
  6548. }
  6549. }
  6550. return _51a;
  6551. },getSliderDetailsInJSON:function(){
  6552. var _521=[];
  6553. if(this.m_containerInfo!==null&&this.m_editableSliders){
  6554. var _522=this.m_id+"instructions "+this.m_id+"_sliderString ";
  6555. var _523=this.m_editableSliders.length;
  6556. for(var _524=0;_524<_523;++_524){
  6557. var _525=this.m_editableSliders[_524];
  6558. if(_525&&_525.name){
  6559. var _526=(_525.label?_525.label:_525.name);
  6560. if(_525.attributeName){
  6561. _526+=(" "+_525.attributeName);
  6562. }
  6563. var _527="";
  6564. if(typeof _525.values!="undefined"){
  6565. _527+=this.processFilterOperatorItems(_525.values);
  6566. }else{
  6567. if(_525.min==_525.max){
  6568. _527+=_525.min;
  6569. }else{
  6570. _527+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_525.min,_525.max);
  6571. }
  6572. }
  6573. _521.push({"type":"slider","label":_526,"description":_527});
  6574. }
  6575. }
  6576. }
  6577. return _521;
  6578. },hasLockedFilters:function(){
  6579. var _528=false;
  6580. if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){
  6581. var _529=this.m_containerInfo.lockedFilters.length;
  6582. for(var _52a=0;_52a<_529;++_52a){
  6583. var _52b=this.m_containerInfo.lockedFilters[_52a];
  6584. if(typeof _52b.staticText!="undefined"&&_52b.staticText.charAt(0)!==" "){
  6585. _528=true;
  6586. }
  6587. }
  6588. }
  6589. return _528;
  6590. },addLockedFilterDetails:function(_52c){
  6591. var _52d="";
  6592. var _52e=(_52c!==true);
  6593. if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){
  6594. var _52f=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+"_lockedString ";
  6595. var _530=this.m_containerInfo.lockedFilters.length;
  6596. for(var _531=0;_531<_530;++_531){
  6597. var _532=_52f+this.m_id+_531+"_lockedFilterDetail";
  6598. var _533=this.m_containerInfo.lockedFilters[_531];
  6599. if(typeof _533.staticText!="undefined"&&_533.staticText.charAt(0)!==" "){
  6600. _52d+="<div class=\"infoBarDetailRow\" aria-labelledby=\""+_532+"\" role=\"listitem\""+(!_52e?">":" tabindex=\"-1\">");
  6601. _52d+="<table role=\"presentation\"><tr>";
  6602. _52d+=this.addInfoBarIcon("infobar_filter.gif",true);
  6603. _52d+="</td>";
  6604. _52d+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_531+"_lockedFilterDetail\">";
  6605. _52d+="<span class=\"bibi\">";
  6606. _52d+=html_encode(_533.staticText);
  6607. _52d+="</span>";
  6608. _52d+="</td>";
  6609. _52d+=(_52e?this.addInfoBarIcon("infobar_locked.gif",false):"");
  6610. _52d+="</tr></table></div>";
  6611. }
  6612. }
  6613. }
  6614. return _52d;
  6615. },addFilteredItemsDetails:function(_534){
  6616. var _535="";
  6617. var _536=(_534!==true);
  6618. if(this.m_editableFilters){
  6619. for(var _537=0,_538=this.m_editableFilters.length;_537<_538;++_537){
  6620. var _539=this.m_editableFilters[_537];
  6621. var _53a=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+_537+"_filterDetail";
  6622. var _53b=(typeof _539.itemLabel=="string")?_539.itemLabel:_539.item;
  6623. _535+="<div class=\"infoBarDetailRow\" type=\"filter\" aria-labelledby=\""+_53a+"\" role=\"listitem\""+(!_536?">":" tabindex=\"-1\">");
  6624. _535+="<table role=\"presentation\"><tr>";
  6625. _535+=this.addInfoBarIcon("infobar_filter.gif",true);
  6626. _535+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_537+"_filterDetail\">";
  6627. _535+=this.createHiddenSpan(this.m_id+_537+"_filterPosition",getCurrentPosistionString(this.m_cognosViewer,_537+1,_538));
  6628. _535+=html_encode(enforceTextDir(_53b));
  6629. _535+=this.processFilterOperator(_539);
  6630. _535+="</td>";
  6631. _535+=(_536?this.addRemoveFilterButton(_539.item,this.processFilterDetails(_539)):"");
  6632. _535+="</tr></table></div>";
  6633. }
  6634. }
  6635. return _535;
  6636. },getFilteredItemsDetailsInJSON:function(){
  6637. var _53c=[];
  6638. if(this.m_editableFilters){
  6639. for(var _53d=0,_53e=this.m_editableFilters.length;_53d<_53e;++_53d){
  6640. var _53f=this.m_editableFilters[_53d];
  6641. var _540=(typeof _53f.itemLabel=="string")?_53f.itemLabel:_53f.item;
  6642. _53c.push({"type":"filter","label":enforceTextDir(_540)+this.processFilterOperator(_53f),"description":""});
  6643. }
  6644. }
  6645. return _53c;
  6646. },addSortDetails:function(_541){
  6647. var _542="";
  6648. var _543=(_541!==true);
  6649. if(this.m_editableSorts){
  6650. for(var _544=0,_545=this.m_editableSorts.length;_544<_545;++_544){
  6651. var _546=this.m_editableSorts[_544];
  6652. var _547=this.m_id+"instructions "+this.m_id+"_sortString "+this.m_id+_544+"_sortDetail";
  6653. _542+="<div class=\"infoBarDetailRow\" type=\"sort\" aria-labelledby=\""+_547+"\" role=\"listitem\""+(!_543?">":" tabindex=\"-1\">");
  6654. _542+="<table role=\"presentation\"><tr>";
  6655. _542+=this.addInfoBarIcon("infobar_sort.gif",true);
  6656. var _548;
  6657. if(typeof _546.labels=="string"||typeof _546.valuesOf=="string"){
  6658. var _549=(typeof _546.labels=="string")?_546.labels:_546.valuesOf;
  6659. _548=(typeof _546.itemLabel=="string")?_546.itemLabel:_549;
  6660. _542+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_544+"_sortDetail\">";
  6661. _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545));
  6662. _542+=html_encode(_548);
  6663. _542+=" : ";
  6664. if(_546.byItems instanceof Array){
  6665. for(var _54a=0;_54a<_546.byItems.length;++_54a){
  6666. _542+=(_54a>0)?" - ":"";
  6667. _542+=_546.byItems[_54a].item;
  6668. _542+=", ";
  6669. _542+=this.m_sortStrings[_546.byItems[_54a].order];
  6670. }
  6671. }else{
  6672. if(typeof _546.valuesOf=="string"){
  6673. _542+=this.m_sortStrings["byValue"];
  6674. }else{
  6675. _542+=this.m_sortStrings["byLabel"];
  6676. }
  6677. _542+=", ";
  6678. _542+=this.m_sortStrings[_546.order];
  6679. }
  6680. _542+="</td>";
  6681. _542+=(_543?this.addRemoveSortButton(_549,"true"):"");
  6682. }else{
  6683. if(_546.valuesOf instanceof Array){
  6684. if(_546.valuesOf.length>0&&typeof _546.valuesOf[0].item=="string"){
  6685. _542+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_544+"_sortDetail\">";
  6686. _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545));
  6687. _548="";
  6688. if(typeof _546.itemLabel=="string"){
  6689. _548=_546.itemLabel;
  6690. }else{
  6691. for(var _54b=0;_54b<_546.valuesOf.length;++_54b){
  6692. _548+=" - ";
  6693. _548+=_546.valuesOf[_54b].item;
  6694. }
  6695. _548=_548.substring(3);
  6696. }
  6697. _542+=_548;
  6698. _542+=" : ";
  6699. _542+=this.m_sortStrings["byValue"];
  6700. _542+=", ";
  6701. _542+=this.m_sortStrings[_546.order];
  6702. _542+="</td>";
  6703. _542+=(_543?this.addRemoveSortButton(_546.valuesOf[0].item,"false"):"");
  6704. }
  6705. }
  6706. }
  6707. _542+="</tr></table></div>";
  6708. }
  6709. }
  6710. return _542;
  6711. },addInfoBarIcon:function(_54c,_54d){
  6712. return "<td class=\"infoBar"+(_54d?"Left":"Right")+"Icon\">"+"<img alt=\"\" src=\""+this.m_cognosViewer.getWebContentRoot()+"/rv/images/"+_54c+"\"/>"+"</td>";
  6713. },createHiddenSpan:function(id,text){
  6714. return "<span style=\"display:none\" id=\""+id+"\"> "+text+" </span>";
  6715. },addRemoveFilterButton:function(item,_551){
  6716. var _552="";
  6717. var _553=this.m_cognosViewer.getViewerWidget();
  6718. if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_553.isConsumeUser()){
  6719. var _554=RV_RES.IDS_JS_DELETE;
  6720. var _555=this.m_id+"_delete";
  6721. _552="<td class=\"infoBarRightIcon\" filterItem=\""+item+"\""+(_551?" details=\""+_551+"\"":"")+">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveFilter('"+this.m_cognosViewer.getId()+"',"+this.m_layoutIndex+",'"+item+"'"+(_551?",'"+_551+"'":"")+");\" aria-labelledby=\""+_555+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_554+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_554+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
  6722. }
  6723. return _552;
  6724. },addRemoveSliderButton:function(_556){
  6725. var _557="";
  6726. var _558=this.m_cognosViewer.getViewerWidget();
  6727. if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_558.isConsumeUser()){
  6728. var _559=RV_RES.IDS_JS_DELETE;
  6729. var _55a=this.m_id+"_delete";
  6730. _557="<td class=\"infoBarRightIcon\" slider=\""+_556+"\">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveSlider('"+this.m_cognosViewer.getId()+"','"+_556+"');\" aria-labelledby=\""+_55a+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_559+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_559+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
  6731. }
  6732. return _557;
  6733. },addRemoveSortButton:function(item,_55c){
  6734. var _55d="";
  6735. var _55e=this.m_cognosViewer.getViewerWidget();
  6736. if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!this.m_cognosViewer.isBlacklisted("Sort")){
  6737. var _55f=RV_RES.IDS_JS_DELETE;
  6738. var _560=this.m_id+"_delete";
  6739. _55d="<td class=\"infoBarRightIcon\" sortItem=\""+item+"\" byLabel=\""+_55c+"\">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveSort('"+this.m_cognosViewer.getId()+"',"+this.m_layoutIndex+",'"+item+"','"+_55c+"');\" aria-labelledby=\""+_560+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_55f+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_55f+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
  6740. }
  6741. return _55d;
  6742. },processFilterOperator:function(_561){
  6743. var _562="";
  6744. if(typeof _561["in"]!="undefined"){
  6745. _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT,this.processFilterOperatorItems(_561["in"]));
  6746. }else{
  6747. if(typeof _561["notIn"]!="undefined"){
  6748. _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT,this.processFilterOperatorItems(_561["notIn"]));
  6749. }else{
  6750. if(typeof _561["range"]!="undefined"||typeof _561["notRange"]!="undefined"){
  6751. var _563=typeof _561["range"]!="undefined"?RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT:RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT;
  6752. var _564=typeof _561["range"]!="undefined"?_561["range"]:_561["notRange"];
  6753. for(var _565=0;_565<_564.length;++_565){
  6754. var _566=_564[_565];
  6755. _562+=" "+CViewerCommon.getMessage(_563,[_566.from,_566.to]);
  6756. }
  6757. }else{
  6758. if(typeof _561["lessThan"]!="undefined"){
  6759. _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_561["lessThan"];
  6760. }else{
  6761. if(typeof _561["lessThanEqual"]!="undefined"){
  6762. _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_561["lessThanEqual"];
  6763. }else{
  6764. if(typeof _561["greaterThan"]!="undefined"){
  6765. _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_561["greaterThan"];
  6766. }else{
  6767. if(typeof _561["greaterThanEqual"]!="undefined"){
  6768. _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_561["greaterThanEqual"];
  6769. }else{
  6770. if(typeof _561["not"]!="undefined"&&_561["not"]=="true"){
  6771. _562+=" "+RV_RES.IDS_JS_FILTER_IS_NOT;
  6772. }
  6773. if(typeof _561["endsWith"]!="undefined"){
  6774. _562+=" "+RV_RES.IDS_JS_FILTER_ENDS_WITH+" "+_561["endsWith"];
  6775. }else{
  6776. if(typeof _561["beginsWith"]!="undefined"){
  6777. _562+=" "+RV_RES.IDS_JS_FILTER_BEGINS_WITH+" "+_561["beginsWith"];
  6778. }else{
  6779. if(typeof _561["contains"]!="undefined"){
  6780. _562+=" "+RV_RES.IDS_JS_FILTER_CONTAINS+" "+_561["contains"];
  6781. }else{
  6782. if(typeof _561["isMatchesSQLPatternFilter"]!="undefined"){
  6783. _562+=" "+RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER+" "+_561["isMatchesSQLPatternFilter"];
  6784. }
  6785. }
  6786. }
  6787. }
  6788. }
  6789. }
  6790. }
  6791. }
  6792. }
  6793. }
  6794. }
  6795. return _562;
  6796. },processFilterDetails:function(_567){
  6797. return html_encode("["+dojo.toJson(_567)+"]");
  6798. },processFilterOperatorItems:function(_568){
  6799. var _569="";
  6800. for(var _56a=0;_56a<_568.length;++_56a){
  6801. if(_56a!==0){
  6802. _569+=(RV_RES.IDS_JS_LIST_SEPARATOR+" ");
  6803. }
  6804. _569+=enforceTextDir(_568[_56a]);
  6805. }
  6806. return _569;
  6807. },processFilterOperatorRange:function(_56b,_56c,_56d){
  6808. if(typeof _56c=="undefined"){
  6809. _56c=" ";
  6810. }
  6811. if(typeof _56d=="undefined"){
  6812. _56d=" ";
  6813. }
  6814. return CViewerCommon.getMessage(_56b,[_56c,_56d]);
  6815. }});
  6816. dojo.declare("InfoBar",InfoBarBase,{constructor:function(_56e,_56f,_570,_571,_572){
  6817. this.m_layoutElement=_56f;
  6818. this.m_containerInfo=_570;
  6819. this.m_bRendered=false;
  6820. this.initializeEditableSorts(_571);
  6821. this.initializeEditableFilters(_571);
  6822. this.initializeEditableSliders(_571);
  6823. this.m_id=_572+_56e.getId();
  6824. this.m_layoutIndex=_572;
  6825. this.m_sortStrings={byLabel:RV_RES.IDS_JS_SORTED_BY_LABEL,byValue:RV_RES.IDS_JS_SORTED_BY_VALUE,descending:RV_RES.IDS_JS_SORT_DESCENDING_ORDER,ascending:RV_RES.IDS_JS_SORT_ASCENDING_ORDER};
  6826. this.connections=[];
  6827. },getLayoutElement:function(){
  6828. var _573=this.m_layoutElement;
  6829. var _574=_573.getAttribute("lid");
  6830. if(_574==null){
  6831. _574=_573.getAttribute("pflid");
  6832. }
  6833. if(_574!==null){
  6834. if(_573.tagName.toUpperCase()=="MAP"){
  6835. var _575=_573.parentNode.childNodes;
  6836. for(var _576=0;_576<_575.length;++_576){
  6837. var _577=_575[_576].getAttribute("usemap");
  6838. if(_577!==null&&_577==("#"+this.m_cognosViewer.getId()+_574)){
  6839. return _575[_576];
  6840. }
  6841. }
  6842. }else{
  6843. if(_573.parentNode.getAttribute("chartcontainer")=="true"){
  6844. return _573.parentNode;
  6845. }
  6846. }
  6847. return _573;
  6848. }
  6849. return null;
  6850. },initializeEditableSorts:function(_578){
  6851. if(this.m_containerInfo!==null){
  6852. if(typeof this.m_containerInfo.sort!=="undefined"){
  6853. this.m_editableSorts=this.m_containerInfo.sort;
  6854. }
  6855. if(typeof _578!=="undefined"){
  6856. for(var i=0;i<_578.length;++i){
  6857. this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"labels");
  6858. this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"valuesOf");
  6859. }
  6860. }
  6861. }
  6862. },initializeEditableFilters:function(_57a){
  6863. if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){
  6864. if(typeof this.m_containerInfo.filter!=="undefined"){
  6865. this.m_editableFilters=this.m_containerInfo.filter;
  6866. }
  6867. if(typeof _57a!=="undefined"){
  6868. for(var i=0;i<_57a.length;++i){
  6869. this.m_editableFilters=this.mergeChildInfo(this.m_editableFilters,_57a[i].filter,"item");
  6870. }
  6871. }
  6872. }
  6873. },initializeEditableSliders:function(_57c){
  6874. if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){
  6875. if(typeof this.m_containerInfo.sliders!=="undefined"){
  6876. this.m_editableSliders=this.m_containerInfo.sliders;
  6877. }
  6878. if(typeof _57c!=="undefined"){
  6879. for(var i=0;i<_57c.length;++i){
  6880. this.m_editableSliders=this.mergeChildInfo(this.m_editableSliders,_57c[i].sliders,"name");
  6881. }
  6882. }
  6883. }
  6884. },mergeChildInfo:function(_57e,_57f,key){
  6885. if(typeof _57f!="undefined"){
  6886. if(typeof _57e==="undefined"||_57e===null){
  6887. _57e=_57f;
  6888. }else{
  6889. var _581=[];
  6890. for(var i=0;i<_57e.length;++i){
  6891. _581[_57e[i][key]]=_57e[i];
  6892. }
  6893. for(var j=0;j<_57f.length;++j){
  6894. var _584=_57f[j];
  6895. if(typeof _581[_584[key]]=="undefined"){
  6896. _57e.push(_584);
  6897. _581[_584.item]=_584;
  6898. }
  6899. }
  6900. }
  6901. }
  6902. return _57e;
  6903. },hasSomethingRendered:function(){
  6904. return this.m_bRendered;
  6905. },render:function(){
  6906. var _585=document.getElementById("infoBar"+this.m_id);
  6907. if(_585===null){
  6908. var _586=(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton")?true:false;
  6909. if(_586&&!this.m_editableFilters&&!this.m_editableSliders){
  6910. return;
  6911. }
  6912. if(this.m_timingDetails||this.m_editableSorts||this.m_editableFilters||this.m_editableSliders||this.hasPrompts()||this.hasLockedFilters()){
  6913. var _587=this.getLayoutElement();
  6914. var _588=document.createElement("div");
  6915. _588.setAttribute("dir",this.m_cognosViewer.getDirection()==="rtl"?"rtl":"ltr");
  6916. _585=document.createElement("div");
  6917. _585.className="infoBar";
  6918. _585.setAttribute("id","infoBar"+this.m_id);
  6919. _585.setAttribute("cvid",this.m_cognosViewer.getId());
  6920. _585.setAttribute("layoutid",this.m_id);
  6921. _585.setAttribute("containerid",this.m_layoutIndex);
  6922. _585.setAttribute("role","region");
  6923. _585.setAttribute("aria-label",RV_RES.IDS_JS_REPORT_INFO_TITLE);
  6924. if(_586){
  6925. dojo.style(_585,{opacity:"0.6"});
  6926. }
  6927. _585.appendChild(this.renderHeader());
  6928. _585.appendChild(this.renderDetails());
  6929. _588.appendChild(_585);
  6930. _587.parentNode.insertBefore(_588,_587);
  6931. this.connections.push(dojo.connect(_585,"onkeydown",this,this.onKeyDown));
  6932. this.connections.push(dojo.query(".infoBarHeader",_585).connect("onmousedown",this,this.toggle));
  6933. this.connections.push(dojo.query(".infoBarLeftIcon",_585).connect("onmousedown",this,this.ignoreEvent));
  6934. this.connections.push(dojo.query(".infoBarDetailsText",_585).connect("onmousedown",this,this.ignoreEvent));
  6935. this.connections.push(dojo.query(".infoBarLockedItems",_585).connect("onmousedown",this,this.ignoreEvent));
  6936. this.m_bRendered=true;
  6937. if(this.wasInfoBarExpanded(this.m_id)){
  6938. this.show();
  6939. }
  6940. }
  6941. }
  6942. },renderHeader:function(){
  6943. var _589=this.isFilterApplied();
  6944. var _58a=this.isSortApplied();
  6945. var _58b=document.createElement("div");
  6946. _58b.id="infoBarHeader"+this.m_id;
  6947. _58b.className="infoBarHeaderDiv";
  6948. var _58c="<div role=\"presentation\" class=\"infoBarHeader BUXNoPrint\" style=\"width:100%\">"+this.addHeaderCloseButton()+this.addHeaderNavigationButton(_589,_58a)+this.addHeaderText(_589,_58a)+"</div>";
  6949. _58b.innerHTML=_58c;
  6950. return _58b;
  6951. },addHeaderNavigationButton:function(_58d,_58e){
  6952. var _58f=RV_RES.IDS_JS_INFOBAR_EXPAND;
  6953. var _590="infoBarIcon"+(_58d?"Filter":"")+(_58e?"Sort":"")+"Applied";
  6954. var _591="infoBarHeaderButton"+this.m_id+" infoBarHeaderText"+this.m_id;
  6955. return "<button class=\"dijitStretch infoBarHeaderButton\" id=\"infoBarHeaderButton"+this.m_id+"\" aria-labelledby=\""+_591+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_58f+"\">"+"<span class=\"dijitInline "+_590+"\" title=\""+_58f+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarHeaderButtonText\">!</span>"+"</button>";
  6956. },addHeaderText:function(_592,_593){
  6957. var _594=[];
  6958. if(_592){
  6959. _594.push(RV_RES.IDS_JS_FILTER_APPLIED);
  6960. }
  6961. if(_593){
  6962. _594.push(RV_RES.IDS_JS_SORT_APPLIED);
  6963. }
  6964. return "<span class=\"infoBarHeaderText\" id=\"infoBarHeaderText"+this.m_id+"\">"+_594.join(", ")+"</span>";
  6965. },addHeaderCloseButton:function(){
  6966. var _595=RV_RES.IDS_JS_INFOBAR_COLLAPSE;
  6967. var _596=this.m_id+"_collapse";
  6968. return "<button class=\"dijitStretch infoBarHeaderCloseButton\" id=\"infoBarHeaderCloseButton"+this.m_id+"\" aria-labelledby=\""+_596+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_595+"\">"+"<span class=\"dijitInline infoBarIconClose BUXNoPrint\" title=\""+_595+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarCloseButtonText\">x</span>"+"</button>";
  6969. },isFilterApplied:function(){
  6970. if(this.m_editableFilters||this.m_editableSliders||typeof this.m_containerInfo.lockedFilters!=="undefined"||this.hasPrompts()){
  6971. return true;
  6972. }
  6973. return false;
  6974. },isSortApplied:function(){
  6975. if(this.m_editableSorts){
  6976. return true;
  6977. }
  6978. return false;
  6979. },renderDetails:function(){
  6980. var _597=document.getElementById("infoBarFlyout"+this.m_id);
  6981. var _598=document.getElementById(this.m_id+"instructions");
  6982. if(_597===null){
  6983. this.getLayoutElement();
  6984. _597=document.createElement("div");
  6985. _597.setAttribute("id","infoBarFlyout"+this.m_id);
  6986. _597.setAttribute("cvid",this.m_cognosViewer.getId());
  6987. _597.setAttribute("layoutid",this.m_id);
  6988. _597.setAttribute("containerid",this.m_layoutIndex);
  6989. _597.className="infoBarFlyout";
  6990. _597.style.display="none";
  6991. _597.innerHTML="<div class=\"infoBarFlyoutContent\" id=\"infoBarFlyoutContent"+this.m_id+"\" role=\"list\">"+this.addLockedInfoBarDetails()+this.addEditableInfoBarDetails()+this.addRAPTimingDetails()+"</div>"+this.createHiddenSpan(this.m_id+"_filterString",RV_RES.IDS_JS_FILTER)+this.createHiddenSpan(this.m_id+"_sortString",RV_RES.IDS_JS_SORT)+this.createHiddenSpan(this.m_id+"_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.createHiddenSpan(this.m_id+"_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER)+this.createHiddenSpan(this.m_id+"_lockedString",RV_RES.IDS_JS_INFOBAR_LOCKED)+this.createHiddenSpan(this.m_id+"_collapse",RV_RES.IDS_JS_INFOBAR_COLLAPSE)+this.createHiddenSpan(this.m_id+"_delete",RV_RES.IDS_JS_DELETE);
  6992. this.connections.push(dojo.connect(_597,"onkeydown",this,this.onKeyDown));
  6993. this.connections.push(dojo.query(".infoBarDetailRow",_597).forEach(function(item,_59a,_59b){
  6994. dojo.attr(item,{"aria-setsize":_59b.length,"aria-posinset":_59a+1});
  6995. }).connect("onfocus",function(e){
  6996. dojo.query(e.currentTarget).addClass("infoBarDetailRowHover");
  6997. }).connect("onblur",function(e){
  6998. var el=typeof e.explicitOriginalTarget!=="undefined"?e.explicitOriginalTarget:document.activeElement;
  6999. if(dojo.hasClass(el,"infoBarDeleteButton")){
  7000. return true;
  7001. }
  7002. dojo.query(e.currentTarget).removeClass("infoBarDetailRowHover");
  7003. }).connect("onmouseover",this,function(e){
  7004. this.focusDetailRow(e.currentTarget);
  7005. }));
  7006. }
  7007. if(_598===null){
  7008. _598=document.createElement("span");
  7009. _598.id=this.m_id+"instructions";
  7010. _598.setAttribute("role","presentation");
  7011. _598.style.visibility="hidden";
  7012. _598.style.display="none";
  7013. document.body.appendChild(_598);
  7014. _598.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION;
  7015. }
  7016. return _597;
  7017. },addRAPTimingDetails:function(){
  7018. if(this.m_timingDetails){
  7019. var _5a0=this.m_timingDetails.length-1;
  7020. var _5a1=this.m_timingDetails[_5a0].time-this.m_timingDetails[0].time;
  7021. return "<div><table role=\"presentation\" class=\"infoBarLockedItems\">"+"<tr>"+this.addTimingIcon(_5a1,250,500)+"<td colspan=\"2\" class=\"bibi inforBarDetailsText\" role=\"presentation\" id=\""+this.m_id+"_timingDetail\" style=\"background-color:LightGray\"><b>RAP Total Time: ("+_5a1+")</b></td>"+"</tr>"+this.addRAPTimingItemDetails()+"</table></div>";
  7022. }
  7023. return "";
  7024. },addRAPTimingItemDetails:function(){
  7025. var _5a2="";
  7026. if(this.m_timingDetails){
  7027. for(var _5a3=0;_5a3<=this.m_timingDetails.length-1;++_5a3){
  7028. var _5a4=this.m_timingDetails[_5a3];
  7029. var _5a5=this.getTimeDiff(_5a3);
  7030. _5a2+="<tr class=\"infoBarDetailRow\" type=\"filter\" tabindex=\"-1\">";
  7031. if(_5a4.level){
  7032. _5a2+="<td colspan=3><font size=\"1\">"+_5a5+":"+html_encode(_5a4.event)+"</font></td></tr>";
  7033. }else{
  7034. _5a2+=this.addTimingIcon(_5a5,100,500);
  7035. _5a2+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_5a3+"_timingDetail\">";
  7036. _5a2+=html_encode(_5a4.event);
  7037. _5a2+="</td><td align=\"right\">"+_5a5+"</td>";
  7038. }
  7039. _5a2+="</tr>";
  7040. }
  7041. }
  7042. return _5a2;
  7043. },getTimeDiff:function(_5a6){
  7044. var _5a7=_5a6+1;
  7045. if(_5a7>=this.m_timingDetails.length){
  7046. return 0;
  7047. }
  7048. var _5a8=this.m_timingDetails[_5a6].level;
  7049. if(!(_5a8==this.m_timingDetails[_5a7].level)){
  7050. while(_5a7<this.m_timingDetails.length&&this.m_timingDetails[_5a7].level!=_5a8&&typeof this.m_timingDetails[_5a7].level!="undefined"){
  7051. _5a7++;
  7052. }
  7053. }
  7054. return (this.m_timingDetails[_5a7].time-this.m_timingDetails[_5a6].time);
  7055. },addTimingIcon:function(_5a9,_5aa,red){
  7056. var _5ac="icon_excellent_traffic.gif";
  7057. if(_5a9>red){
  7058. _5ac="icon_poor_traffic.gif";
  7059. }else{
  7060. if(_5a9>_5aa){
  7061. _5ac="icon_average_traffic.gif";
  7062. }
  7063. }
  7064. return this.addInfoBarIcon(_5ac,true);
  7065. },addLockedInfoBarDetails:function(){
  7066. if(this.hasPrompts()||typeof this.m_containerInfo.lockedFilters!=="undefined"){
  7067. return "<div role=\"presentation\" class=\"infoBarLockedItems\">"+this.addPromptDetails()+this.addLockedFilterDetails()+"</div>";
  7068. }
  7069. return "";
  7070. },addEditableInfoBarDetails:function(){
  7071. if(this.m_editableFilters||this.m_editableSorts||this.m_editableSliders){
  7072. return "<div role=\"presentation\" class=\"infoBarEditableItems\">"+this.addFilteredItemsDetails()+this.addSliderDetails()+this.addSortDetails()+"</div>";
  7073. }
  7074. return "";
  7075. },onKeyDown:function(evt){
  7076. var _5ae=evt.target;
  7077. var cvId=this.m_cognosViewer.getId();
  7078. var _5b0=document.getElementById("infoBarHeaderButton"+this.m_id);
  7079. var _5b1=document.getElementById(this.m_id+"instructions");
  7080. var node;
  7081. if(evt.keyCode=="13"){
  7082. _5b1.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION;
  7083. if(_5ae===_5b0){
  7084. this.toggle();
  7085. return stopEventBubble(evt);
  7086. }
  7087. }else{
  7088. if(evt.keyCode=="27"){
  7089. var _5b3=this.m_cognosViewer.getA11YHelper();
  7090. if(this.m_cognosViewer.getCurrentNodeFocus()){
  7091. node=this.m_cognosViewer.getCurrentNodeFocus();
  7092. if(node.nodeName.toLowerCase()!="span"){
  7093. var _5b4=node.getElementsByTagName("span");
  7094. for(var _5b5=0;_5b5<_5b4.length;_5b5++){
  7095. if(_5b4[_5b5].style.display!="hidden"){
  7096. node=_5b4[_5b5];
  7097. break;
  7098. }
  7099. }
  7100. }
  7101. this.hide(false);
  7102. _5b3.setFocusToNode(node);
  7103. }else{
  7104. this.hide();
  7105. }
  7106. return stopEventBubble(evt);
  7107. }else{
  7108. if(evt.keyCode=="46"){
  7109. if(dojo.hasClass(_5ae,"infoBarDetailRow")){
  7110. node=dojo.query("td.infoBarRightIcon",_5ae)[0];
  7111. if(typeof node!=="undefined"){
  7112. if(_5ae.getAttribute("type")=="filter"){
  7113. InfoBarHelper.infoBarRemoveFilter(cvId,this.m_layoutIndex,node.getAttribute("filterItem"),node.getAttribute("details"));
  7114. }else{
  7115. if(_5ae.getAttribute("type")=="sort"){
  7116. InfoBarHelper.infoBarRemoveSort(cvId,this.m_layoutIndex,node.getAttribute("sortItem"),node.getAttribute("byLabel"));
  7117. }else{
  7118. if(_5ae.getAttribute("type")=="slider"){
  7119. InfoBarHelper.infoBarRemoveSlider(cvId,node.getAttribute("slider"));
  7120. }
  7121. }
  7122. }
  7123. }
  7124. }
  7125. }else{
  7126. if(evt.keyCode=="38"){
  7127. if(dojo.hasClass(_5ae,"infoBarDetailRow")){
  7128. this.focusDetailRow(_5ae,"prev");
  7129. }else{
  7130. this.focusDetailRow();
  7131. }
  7132. _5b1.innerHTML="";
  7133. return stopEventBubble(evt);
  7134. }else{
  7135. if(evt.keyCode=="40"){
  7136. if(dojo.hasClass(_5ae,"infoBarDetailRow")){
  7137. this.focusDetailRow(_5ae,"next");
  7138. }else{
  7139. this.focusDetailRow();
  7140. }
  7141. _5b1.innerHTML="";
  7142. return stopEventBubble(evt);
  7143. }else{
  7144. if(evt.keyCode=="9"){
  7145. var _5b6=document.getElementById("infoBar"+this.m_id);
  7146. if(dojo.hasClass(_5b6,"infoBarExpanded")){
  7147. if(dojo.hasClass(_5ae,"infoBarDetailRow")){
  7148. dojo.byId("infoBarHeaderCloseButton"+this.m_id).focus();
  7149. }else{
  7150. this.focusDetailRow();
  7151. }
  7152. return stopEventBubble(evt);
  7153. }
  7154. }
  7155. }
  7156. }
  7157. }
  7158. }
  7159. }
  7160. },focusDetailRow:function(_5b7,dir){
  7161. var _5b9=document.getElementById("infoBarFlyout"+this.m_id);
  7162. var _5ba=document.getElementById("infoBar"+this.m_id);
  7163. if(!dojo.hasClass(_5ba,"infoBarExpanded")){
  7164. return;
  7165. }
  7166. if(typeof _5b7=="undefined"||_5b7===null){
  7167. var _5bb=dojo.query(".infoBarLockedItems .infoBarDetailRow, .infoBarEditableItems .infoBarDetailRow",_5b9);
  7168. _5b7=_5bb[0];
  7169. }
  7170. if(_5b7&&dojo.hasClass(_5b7,"infoBarDetailRow")){
  7171. var _5bc,rows,len,i;
  7172. if(dir==="prev"){
  7173. if(_5b7.parentNode.previousSibling){
  7174. _5bc=_5b7.parentNode.previousSibling.childNodes[1];
  7175. }else{
  7176. rows=dojo.query(".infoBarDetailRow",_5b9);
  7177. len=rows.length;
  7178. if(_5b7===rows[0]){
  7179. _5bc=rows[len-1];
  7180. }else{
  7181. for(i=1;i<len;i++){
  7182. if(_5b7===rows[i]){
  7183. _5bc=rows[i-1];
  7184. break;
  7185. }
  7186. }
  7187. }
  7188. }
  7189. }else{
  7190. if(dir==="next"){
  7191. if(_5b7.parentNode.nextSibling){
  7192. _5bc=_5b7.parentNode.nextSibling.childNodes[1];
  7193. }else{
  7194. rows=dojo.query(".infoBarDetailRow",_5b9);
  7195. len=rows.length;
  7196. if(_5b7===rows[len-1]){
  7197. _5bc=rows[0];
  7198. }else{
  7199. for(i=0;i<len-1;i++){
  7200. if(_5b7===rows[i]){
  7201. _5bc=rows[i+1];
  7202. break;
  7203. }
  7204. }
  7205. }
  7206. }
  7207. }else{
  7208. _5bc=_5b7;
  7209. }
  7210. }
  7211. _5bc.focus();
  7212. }
  7213. },toggle:function(evt){
  7214. var _5c1=document.getElementById("infoBar"+this.m_id);
  7215. if(dojo.hasClass(_5c1,"infoBarExpanded")){
  7216. this.hide();
  7217. }else{
  7218. this.show();
  7219. }
  7220. stopEventBubble(evt);
  7221. },ignoreEvent:function(evt){
  7222. stopEventBubble(evt);
  7223. },show:function(){
  7224. var _5c3=document.getElementById("infoBar"+this.m_id);
  7225. if(!dojo.hasClass(_5c3,"infoBarExpanded")){
  7226. var _5c4=document.getElementById("infoBarHeader"+this.m_id);
  7227. var _5c5=document.getElementById("infoBarFlyout"+this.m_id);
  7228. var _5c6=document.getElementById("infoBarHeaderButton"+this.m_id);
  7229. var _5c7,_5c8,_5c9;
  7230. var _5ca=dojo.fx.wipeIn({node:_5c5,duration:300,onEnd:dojo.hitch(this,function(){
  7231. this.focusDetailRow();
  7232. _5c6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_COLLAPSE);
  7233. _5c6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_COLLAPSE);
  7234. })});
  7235. this.updateInfoBarRenderedState(this.m_id,"true");
  7236. dojo.addClass(_5c3,"infoBarExpanded");
  7237. if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){
  7238. dojo.style(_5c3,{opacity:"1"});
  7239. }
  7240. dojo.style(_5c3,"width","auto");
  7241. _5ca.play();
  7242. var _5cb=document.getElementById("infoBarHeaderText"+this.m_id).innerHTML;
  7243. var _5cc=this._getTextWidth(_5cb)+40;
  7244. if(_5cc<500){
  7245. _5cc=500;
  7246. }
  7247. var _5cd=this.m_cognosViewer.getViewerWidget();
  7248. var _5ce=_5cd.findContainerDiv().clientWidth;
  7249. if(_5cc>_5ce){
  7250. _5cc=_5ce-5;
  7251. }
  7252. _5c3.style.width=_5cc+"px";
  7253. dojo.removeClass(_5c4,"BUXNoPrint");
  7254. }
  7255. },_getTextWidth:function(text){
  7256. var div=document.createElement("div");
  7257. div.className="infoBar infoBarHeader";
  7258. div.style.fontWeight="bold";
  7259. div.style.position="absolute";
  7260. div.style.visibility="hidden";
  7261. div.style.height="auto";
  7262. div.style.width="auto";
  7263. document.body.appendChild(div);
  7264. div.innerHTML=text;
  7265. var _5d1=div.clientWidth;
  7266. document.body.removeChild(div);
  7267. return _5d1;
  7268. },hide:function(_5d2){
  7269. var _5d3=document.getElementById("infoBar"+this.m_id);
  7270. if(dojo.hasClass(_5d3,"infoBarExpanded")){
  7271. this.updateInfoBarRenderedState(this.m_id,"false");
  7272. var _5d4=document.getElementById("infoBarHeader"+this.m_id);
  7273. var _5d5=document.getElementById("infoBarFlyout"+this.m_id);
  7274. var _5d6=document.getElementById("infoBarHeaderButton"+this.m_id);
  7275. dojo.addClass(_5d4,"BUXNoPrint");
  7276. dojo.fx.wipeOut({node:_5d5,duration:300,onEnd:dojo.hitch(this,function(){
  7277. dojo.removeClass(_5d3,"infoBarExpanded");
  7278. dojo.style(_5d3,"width","auto");
  7279. if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){
  7280. dojo.style(_5d3,{opacity:"0.6"});
  7281. }
  7282. _5d6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND);
  7283. _5d6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND);
  7284. if(!_5d2){
  7285. _5d6.focus();
  7286. }
  7287. })}).play();
  7288. }
  7289. },updateInfoBarRenderedState:function(_5d7,_5d8){
  7290. var _5d9=this.m_cognosViewer.getViewerWidget();
  7291. if(_5d9){
  7292. var _5da=_5d9.getInfoBarRenderedState();
  7293. _5da[_5d7]=_5d8;
  7294. }
  7295. },wasInfoBarExpanded:function(_5db){
  7296. var _5dc=this.m_cognosViewer.getViewerWidget();
  7297. if(_5dc){
  7298. var _5dd=_5dc.getInfoBarRenderedState();
  7299. if(_5dd){
  7300. if(_5dd[_5db]){
  7301. if("true"===_5dd[_5db]){
  7302. return true;
  7303. }
  7304. }
  7305. }
  7306. }
  7307. return false;
  7308. },destroy:function(){
  7309. for(var i=0;i<this.connections.length;i++){
  7310. var _5df=this.connections[i];
  7311. if(_5df&&_5df.remove){
  7312. dojo.disconnect(_5df);
  7313. }
  7314. }
  7315. var _5e0=document.getElementById("infoBar"+this.m_id);
  7316. if(_5e0){
  7317. var _5e1=_5e0.parentNode;
  7318. if(_5e1){
  7319. _5e1.removeChild(_5e0);
  7320. }
  7321. }
  7322. _5e0=document.getElementById(this.m_id+"instructions");
  7323. if(_5e0){
  7324. _5e0.parentNode.removeChild(_5e0);
  7325. }
  7326. delete this.m_layoutElement;
  7327. delete this.m_containerInfo;
  7328. }});
  7329. dojo.declare("AnnotationFilterContext",null,{m_parameterValuesString:null,m_parameterValuesSpec:null,m_slidersJSON:null,m_filterJSON:null,constructor:function(_5e2,_5e3,_5e4,_5e5){
  7330. this.m_parameterValuesString=_5e2;
  7331. this.m_parameterValuesSpec=_5e3;
  7332. this.m_slidersJSON=_5e4;
  7333. this.m_filterJSON=_5e5;
  7334. },setParameterValuesString:function(_5e6){
  7335. this.m_parameterValuesString=_5e6;
  7336. },setParameterValuesSpec:function(_5e7){
  7337. this.m_parameterValuesSpec=_5e7;
  7338. },setSlidersJSON:function(_5e8){
  7339. this.m_slidersJSON=_5e8;
  7340. },setFilterJSON:function(_5e9){
  7341. this.m_filterJSON=_5e9;
  7342. },getParameterValuesString:function(){
  7343. return this.m_parameterValuesString||null;
  7344. },getParameterValuesSpec:function(){
  7345. return this.m_parameterValuesSpec||null;
  7346. },getPromptsJSON:function(){
  7347. var _5ea=null;
  7348. if(this.m_parameterValuesString){
  7349. _5ea={};
  7350. _5ea.parameterValuesString=this.m_parameterValuesString;
  7351. }
  7352. if(this.m_parameterValuesString){
  7353. _5ea=_5ea||{};
  7354. _5ea.parameterValuesSpec=this.m_parameterValuesSpec;
  7355. }
  7356. return _5ea;
  7357. },getSlidersJSON:function(){
  7358. return this.m_slidersJSON||null;
  7359. },getFilterJSON:function(){
  7360. return this.m_filterJSON||null;
  7361. },isEmpty:function(){
  7362. if(this.m_parameterValuesString||this.m_parameterValuesSpec||this.m_slidersJSON||this.m_filterJSON){
  7363. return false;
  7364. }
  7365. return true;
  7366. }});
  7367. dojo.declare("AnnotationInfoBar",InfoBarBase,{constructor:function(_5eb,lid){
  7368. this.m_id="annoInfoBar_"+lid;
  7369. this.m_layoutElementId=lid;
  7370. },createFilterContext:function(){
  7371. var _5ed=null;
  7372. var _5ee=null;
  7373. var _5ef=null;
  7374. var _5f0=null;
  7375. if(this.m_cognosViewer.getRAPReportInfo()){
  7376. var _5f1=this.m_cognosViewer.getRAPReportInfo();
  7377. if(_5f1.getContainers()){
  7378. var _5f2=_5f1.getContainers();
  7379. if(_5f2[this.m_layoutElementId]){
  7380. var _5f3=_5f2[this.m_layoutElementId];
  7381. if(typeof _5f3.filter!=="undefined"){
  7382. _5ed=_5f3.filter;
  7383. }
  7384. if(typeof _5f3.sliders!=="undefined"){
  7385. _5ee=_5f3.sliders;
  7386. }
  7387. }
  7388. }
  7389. }
  7390. if(this.hasPrompts()){
  7391. _5ef=CViewerCommon.buildParameterValuesSpec(this.m_cognosViewer);
  7392. _5f0=this.m_cognosViewer.getExecutionParameters();
  7393. }
  7394. if(_5ed||_5ee||_5ef||_5f0){
  7395. return new AnnotationFilterContext(_5f0,_5ef,_5ee,_5ed);
  7396. }
  7397. return null;
  7398. }});
  7399. dojo.declare("AnnotationInfoBarRenderer",null,{m_AnnotationInfoBar:null,m_id:null,m_labelledByHideButton:"",miniCognosViewer:null,m_editableSliders:null,constructor:function(_5f4,lid,_5f6,_5f7){
  7400. this.m_AnnotationInfoBar=null;
  7401. this.miniCognosViewer={};
  7402. this.miniCognosViewer.m_sId=_5f4.id;
  7403. this.miniCognosViewer.getId=_5f4.getId;
  7404. this.miniCognosViewer.m_sParameters=(_5f6===null||_5f6.getParameterValuesString()===null)?"":_5f6.getParameterValuesString();
  7405. this.miniCognosViewer.getExecutionParameters=_5f4.getExecutionParameters;
  7406. this.miniCognosViewer.getWebContentRoot=_5f4.getWebContentRoot;
  7407. this.m_AnnotationInfoBar=new AnnotationInfoBar(this.miniCognosViewer,lid);
  7408. this.m_AnnotationInfoBar.setId("annoInfoBar_"+_5f7+lid);
  7409. this.m_id="annoInfoBar_"+_5f7+lid+"_renderer";
  7410. if(_5f6){
  7411. if(_5f6.getSlidersJSON()){
  7412. this.m_AnnotationInfoBar.setContainerInfo({"sliders":_5f6.getSlidersJSON()});
  7413. this.m_AnnotationInfoBar.m_editableSliders=_5f6.getSlidersJSON();
  7414. }
  7415. if(_5f6.getFilterJSON()){
  7416. this.m_AnnotationInfoBar.setEditableFilters(_5f6.getFilterJSON());
  7417. }
  7418. }
  7419. },render:function(){
  7420. var _5f8="<div class=\"infoBar infoBarCollapsed\" id=\"infoBarHeaderCollapsed"+this.m_id+"\" >"+this.renderHeader(false)+"</div>";
  7421. var _5f9="<div class=\"infoBar infoBarExpanded\" id=\"infoBarHeaderExpanded"+this.m_id+"\" style=\"display:none;\" >"+this.renderHeader(true)+this.renderDetails()+"</div>";
  7422. _5f9=this.updateHideButtonLabelledBy(_5f9);
  7423. var _5fa=document.getElementById("annotationInfoBarInstructions");
  7424. if(_5fa===null){
  7425. _5fa=document.createElement("span");
  7426. _5fa.id="annotationInfoBarInstructions";
  7427. _5fa.setAttribute("role","presentation");
  7428. _5fa.style.visibility="hidden";
  7429. _5fa.style.display="none";
  7430. var _5fb=this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBarButtonInstruction",RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_filterString",RV_RES.IDS_JS_FILTER)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER);
  7431. document.body.appendChild(_5fa);
  7432. _5fa.innerHTML=_5fb;
  7433. }
  7434. return _5f8+_5f9;
  7435. },renderInJSON:function(){
  7436. var _5fc=[];
  7437. return _5fc.concat(this.m_AnnotationInfoBar.getPromptDetailsInJSON(),this.m_AnnotationInfoBar.getFilteredItemsDetailsInJSON(),this.m_AnnotationInfoBar.getSliderDetailsInJSON());
  7438. },renderHeader:function(_5fd){
  7439. var mode=(_5fd)?"Hide":"Show";
  7440. var _5ff=(_5fd)?RV_RES.IDS_JS_ANNO_INFOBAR_HIDE:RV_RES.IDS_JS_ANNO_INFOBAR_SHOW;
  7441. var _600=(_5fd)?("XXREPLACEXX"):" annoInfoBarHeaderControlButtonText"+mode+this.m_id;
  7442. var _601="<table class=\"annoInfoBarHeader\" id=\"annoInfoBarHeader"+mode+this.m_id+"\" role=\"presentation\">"+"<tr>"+"<td class=\"annoInfoBarHeaderText\" id=\"infoBarHeaderText"+this.m_id+"\" >"+RV_RES.IDS_JS_FILTER_APPLIED+"</td>"+"<td class=\"annoInfoBarHeaderControl\" id=\"infoBarHeader"+mode+this.m_id+"\" >"+"<button id=\"annoInfoBarHeaderControl"+mode+this.m_id+"\" aria-labelledby=\""+_600+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_5ff+"\""+" onmousedown=\"annotationInfoBarToggle('"+this.m_id+"', '"+mode+"');\">"+"<span id=\"annoInfoBarHeaderControlButtonText"+mode+this.m_id+"\"class=\"dijitInline annoInfoBarHeaderControlText\" title=\""+_5ff+"\" >"+_5ff+"</span>"+"</button>"+"</td>"+"</tr>"+"</table>";
  7443. return _601;
  7444. },renderDetails:function(){
  7445. var _602=this.m_AnnotationInfoBar.addPromptDetails(true);
  7446. var _603=this.m_AnnotationInfoBar.addFilteredItemsDetails(true);
  7447. var _604=this.m_AnnotationInfoBar.addSliderDetails(true);
  7448. var _605="<div class=\"annoInfoBarDetails\" id=\"annoInfoBarDetails"+this.m_id+"\" role=\"presentation\">"+_602+_603+_604+"</div>";
  7449. this.m_labelledByHideButton=(_602.length===0)?"":(" annoInfoBar_promptString "+this.m_AnnotationInfoBar.getId()+"0_promptDetail ");
  7450. this.m_labelledByHideButton+=(_603.length===0)?"":(" annoInfoBar_filterString "+this.m_AnnotationInfoBar.getId()+"0_filterDetail ");
  7451. this.m_labelledByHideButton+=(_604.length===0)?"":(" annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"0_sliderDetail annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"1_sliderDetail ");
  7452. this.m_labelledByHideButton+=" annoInfoBarHeaderControlButtonTextHide"+this.m_id;
  7453. return _605;
  7454. },updateHideButtonLabelledBy:function(_606){
  7455. return _606.replace("XXREPLACEXX",this.m_labelledByHideButton);
  7456. }});
  7457. function annotationInfoBarToggle(mId,_608){
  7458. var _609=document.getElementById("infoBarHeaderExpanded"+mId);
  7459. var _60a=document.getElementById("infoBarHeaderCollapsed"+mId);
  7460. var _60b=null;
  7461. if("Show"===_608){
  7462. dojo.style(_609,{display:""});
  7463. dojo.style(_60a,{display:"none"});
  7464. _60b=document.getElementById("annoInfoBarHeaderControlHide"+mId);
  7465. }else{
  7466. dojo.style(_60a,{display:""});
  7467. dojo.style(_609,{display:"none"});
  7468. _60b=document.getElementById("annoInfoBarHeaderControlShow"+mId);
  7469. }
  7470. if(_60b){
  7471. _60b.focus();
  7472. }
  7473. };
  7474. var CV_BACKGROUND_LAYER_ID="CV_BACK";
  7475. if(typeof window.gaRV_INSTANCES=="undefined"){
  7476. window.gaRV_INSTANCES=[];
  7477. }
  7478. if(!window.gViewerLogger){
  7479. window.gViewerLogger={log:function(hint,_60d,type){
  7480. },addContextInfo:function(_60f){
  7481. }};
  7482. }
  7483. function CognosViewerSession(oCV){
  7484. this.m_sConversation=oCV.getConversation();
  7485. this.m_sParameters=oCV.getExecutionParameters();
  7486. this.m_envParams={};
  7487. applyJSONProperties(this.m_envParams,oCV.envParams);
  7488. this.m_bRefreshPage=false;
  7489. };
  7490. function CCognosViewer(sId,_612){
  7491. if(typeof window.gCognosViewer=="undefined"){
  7492. window.gCognosViewer=this;
  7493. }
  7494. if(typeof ViewerConfig=="function"){
  7495. this.m_viewerConfig=new ViewerConfig();
  7496. try{
  7497. if(typeof window.getViewerConfiguration=="function"){
  7498. this.m_viewerConfig.configure(window.getViewerConfiguration());
  7499. }else{
  7500. if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){
  7501. this.m_viewerConfig.configure(window.parent.getViewerConfiguration());
  7502. }
  7503. }
  7504. }
  7505. catch(e){
  7506. }
  7507. this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig();
  7508. }
  7509. this.m_sActionState="";
  7510. this.m_bKeepSessionAlive=false;
  7511. this.m_undoStack=[];
  7512. this.m_aSecRequests=[];
  7513. this.m_bDebug=false;
  7514. this.m_sCAFContext="";
  7515. this.m_sContextInfoXML="";
  7516. this.m_sConversation="";
  7517. this.m_sStatus="";
  7518. this.m_sGateway=_612;
  7519. this.m_sId=sId;
  7520. this.m_sMetadataInfoXML="";
  7521. this.m_sParameters="";
  7522. this.m_sReportState="";
  7523. this.envParams={};
  7524. this.m_sTracking="";
  7525. this.m_sSoapFault="";
  7526. this.m_sWaitHTML="";
  7527. this.m_oDrillMgr=null;
  7528. this.goDrillManager=null;
  7529. this.m_oWorkingDialog=null;
  7530. this.m_oRequestExecutedIndicator=null;
  7531. this.m_bUseWorkingDialog=true;
  7532. this.m_oSubscriptionManager=null;
  7533. this.m_oCVMgr=null;
  7534. this.m_bUseSafeMode=true;
  7535. if(typeof CViewerManager=="function"){
  7536. this.m_oCVMgr=new CViewerManager(this);
  7537. }
  7538. if(window.gaRV_INSTANCES){
  7539. var _613=false;
  7540. for(var _614=0;_614<window.gaRV_INSTANCES.length;_614++){
  7541. if(window.gaRV_INSTANCES[_614].m_sId==sId){
  7542. window.gaRV_INSTANCES[_614]=this;
  7543. _613=true;
  7544. break;
  7545. }
  7546. }
  7547. if(!_613){
  7548. window.gaRV_INSTANCES=window.gaRV_INSTANCES.concat(this);
  7549. }
  7550. }
  7551. this.m_bReportHasPrompts=false;
  7552. this.m_viewerWidget=null;
  7553. this.m_flashChartsObjectIds=[];
  7554. this.m_raiseSharePromptEvent=true;
  7555. this.m_actionFactory=null;
  7556. this.m_calculationCache={};
  7557. this.m_drillTargets=[];
  7558. this.m_reportRenderingDone=false;
  7559. if(typeof PinFreezeManager!=="undefined"){
  7560. this.m_pinFreezeManager=new PinFreezeManager(this);
  7561. }
  7562. if(typeof ViewerDispatcher!=="undefined"){
  7563. this.m_viewerDispatcher=new ViewerDispatcher();
  7564. }
  7565. this.m_retryDispatcherEntry=null;
  7566. this.m_RAPReportInfo=null;
  7567. if(typeof ViewerState=="function"){
  7568. this.m_viewerState=new ViewerState();
  7569. }
  7570. this.m_aInfoBar=null;
  7571. };
  7572. CCognosViewer.prototype.setScheduledMobileOutput=function(_615){
  7573. this.m_mobileScheduledOutput=_615;
  7574. if(_615){
  7575. this.m_sStatus="complete";
  7576. }
  7577. };
  7578. CCognosViewer.prototype.setTabInfo=function(_616){
  7579. this.m_tabsPayload=_616;
  7580. if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
  7581. var _617=false;
  7582. for(var i=0;i<this.m_tabsPayload.tabs.length;i++){
  7583. var tab=this.m_tabsPayload.tabs[i];
  7584. if(tab.id==this._keepTabSelected){
  7585. this.m_tabsPayload.currentTabId=this._keepTabSelected;
  7586. break;
  7587. }
  7588. }
  7589. this._keepTabSelected=null;
  7590. }
  7591. };
  7592. CCognosViewer.prototype.setKeepTabSelected=function(_61a){
  7593. this._keepTabSelected=_61a;
  7594. };
  7595. CCognosViewer.prototype.getTabController=function(){
  7596. return this.m_tabControl;
  7597. };
  7598. CCognosViewer.prototype.getCurrentlySelectedTab=function(){
  7599. return this.m_currentlySelectedTab?this.m_currentlySelectedTab:null;
  7600. };
  7601. CCognosViewer.prototype.deleteTabs=function(){
  7602. if(this.m_tabControl){
  7603. this.m_tabControl.destroy();
  7604. delete this.m_tabControl;
  7605. this.m_tabControl=null;
  7606. }
  7607. this.m_tabsPayload=null;
  7608. };
  7609. CCognosViewer.prototype.renderTabs=function(){
  7610. if(!this.m_tabsPayload){
  7611. return;
  7612. }
  7613. var _61b=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
  7614. var _61c=document.getElementById("CVNavLinks"+this.getId());
  7615. if(_61c||!this.shouldWriteNavLinks()||_61b){
  7616. var _61d=this.getReportDiv();
  7617. this.m_bHasTabs=true;
  7618. if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_61b){
  7619. this.deleteTabs();
  7620. }
  7621. if(!this.m_tabControl){
  7622. if(this.getStatus()!="complete"&&!_61b){
  7623. return;
  7624. }
  7625. var tr=document.createElement("tr");
  7626. var _61f=document.createElement("td");
  7627. tr.appendChild(_61f);
  7628. var _620=document.getElementById("mainViewerTR"+this.getId());
  7629. if(!_620){
  7630. return;
  7631. }
  7632. if(this.m_tabsPayload.position=="topLeft"){
  7633. _620.parentNode.insertBefore(tr,_620);
  7634. }else{
  7635. _620.parentNode.appendChild(tr);
  7636. }
  7637. var _621=null;
  7638. if(this.m_viewerWidget){
  7639. _621=this.m_viewerWidget.findContainerDiv().firstChild;
  7640. }else{
  7641. _621=_61f;
  7642. }
  7643. var oCV=this;
  7644. if(_61b){
  7645. this.m_tabControl=new CognosTabControl(_621,function(_623){
  7646. oCV.switchSavedOutputTab(_623,true);
  7647. });
  7648. this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
  7649. }else{
  7650. this.m_tabControl=new CognosTabControl(_621,function(_624){
  7651. oCV.switchTabs(_624);
  7652. });
  7653. }
  7654. if(this.m_viewerWidget){
  7655. this.m_tabControl.setSpaceSaverContainer(_61f);
  7656. this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
  7657. this.m_tabControl.useAbsolutePosition(true);
  7658. }
  7659. this.m_tabControl.setIsSavedOutput(_61b);
  7660. if(!window.gScriptLoader.m_bScriptLoaderCalled){
  7661. var _625=document.getElementById("RVContent"+this.getId());
  7662. var _626=this._getNodesWithViewerId(_625,"link",null);
  7663. for(var i=0;i<_626.length;i++){
  7664. window.gScriptLoader.moveLinks(_626[i]);
  7665. }
  7666. window.gScriptLoader.loadStyles(_625,this.getId());
  7667. this.repaintDiv(_625);
  7668. }
  7669. }
  7670. if(this.getStatus()=="prompting"){
  7671. this.previouslySelectedTab=null;
  7672. this.m_tabControl.hide();
  7673. }else{
  7674. if(this.isHighContrast()){
  7675. this.m_tabControl.setHighContrast(true);
  7676. }
  7677. this.m_tabControl.render(this.m_tabsPayload);
  7678. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  7679. if(this.m_switchingToTabId&&this.m_currentlySelectedTab!=this.m_switchingToTabId){
  7680. this._removeTabContent(_61d.parentNode,this.m_switchingToTabId);
  7681. this._removeTabContent(_61d.parentNode,this.m_currentlySelectedTab);
  7682. if(_61c){
  7683. this._removeTabContent(_61c.parentNode,this.m_switchingToTabId);
  7684. this._removeTabContent(_61c.parentNode,this.m_currentlySelectedTab);
  7685. }
  7686. this.m_tabInfo={};
  7687. }
  7688. this.m_switchingToTabId=null;
  7689. _61d.setAttribute("tabId",this.m_currentlySelectedTab);
  7690. if(_61c){
  7691. _61c.setAttribute("tabId",this.m_currentlySelectedTab);
  7692. }
  7693. if(isIE()&&_61b&&window.resizeIFrame&&!this.m_viewerFragment&&!this.m_viewerWidget){
  7694. window.resizeIFrame();
  7695. }
  7696. }
  7697. this.setMaxContentSize();
  7698. }else{
  7699. var obj=this;
  7700. setTimeout(function(){
  7701. obj.renderTabs();
  7702. },100);
  7703. }
  7704. };
  7705. CCognosViewer.prototype.cancelTabSwitch=function(){
  7706. var _629=this.getReportDiv();
  7707. var _62a=this.m_switchingToTabId;
  7708. this.m_currentlySelectedTab=_62a;
  7709. this.m_tabControl.selectTab(this.previouslySelectedTab,false);
  7710. this.switchTabs(this.previouslySelectedTab);
  7711. if(_629){
  7712. _629.parentNode.removeChild(_629);
  7713. }
  7714. if(this.m_tabInfo[this.m_currentlySelectedTab]&&this.m_tabInfo[this.m_currentlySelectedTab].styles){
  7715. this._addTabStylesToHead(this.m_tabInfo[this.m_currentlySelectedTab].styles);
  7716. }
  7717. this.previouslySelectedTab=null;
  7718. this.m_tabInfo[_62a]=null;
  7719. };
  7720. CCognosViewer.prototype.switchSavedOutputTab=function(_62b,_62c){
  7721. var _62d=this.getSelectionController();
  7722. if(_62d){
  7723. _62d.clearSelectedObjects();
  7724. }
  7725. this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
  7726. if(_62c){
  7727. this.notifyTabChange(_62b);
  7728. }
  7729. if(this.m_viewerWidget){
  7730. this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_62b,_62c);
  7731. this.getTabController().resetPosition();
  7732. }else{
  7733. if(!this.savedOutputTabNodes){
  7734. var _62e=document.getElementById("CVIFrame"+this.getId());
  7735. this.savedOutputTabNodes=getElementsByAttribute(_62e.contentWindow.document.body,"*","tabid");
  7736. }
  7737. if(!this.savedOutputTabNodes){
  7738. return;
  7739. }
  7740. for(var i=0;i<this.savedOutputTabNodes.length;i++){
  7741. var _630=this.savedOutputTabNodes[i];
  7742. _630.style.display=_630.getAttribute("tabid")==_62b?"":"none";
  7743. }
  7744. this.setMaxContentSize();
  7745. }
  7746. };
  7747. CCognosViewer.prototype.notifyTabChange=function(_631){
  7748. };
  7749. CCognosViewer.prototype._getNodesWithViewerId=function(_632,_633,id){
  7750. var _635=[];
  7751. var _636=_632.getElementsByTagName(_633);
  7752. for(var i=0;i<_636.length;i++){
  7753. var node=_636[i];
  7754. if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
  7755. node.parentNode.removeChild(node);
  7756. _635.push(node);
  7757. i--;
  7758. }
  7759. }
  7760. return _635;
  7761. };
  7762. CCognosViewer.prototype._removeTabStylesFromHead=function(){
  7763. var id=this.getId();
  7764. return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
  7765. };
  7766. CCognosViewer.prototype._addTabStylesToHead=function(_63a){
  7767. if(!_63a){
  7768. return;
  7769. }
  7770. for(var i=0;i<_63a.length;i++){
  7771. document.getElementsByTagName("head").item(0).appendChild(_63a[i]);
  7772. }
  7773. };
  7774. CCognosViewer.prototype.switchTabs=function(_63c){
  7775. if(this.m_currentlySelectedTab==_63c){
  7776. return;
  7777. }
  7778. var _63d=this.getSelectionController();
  7779. if(_63d){
  7780. _63d.clearSelectedObjects();
  7781. }
  7782. var _63e=this.getReportDiv();
  7783. this.m_nReportDiv=null;
  7784. var _63f=_63e.clientHeight;
  7785. _63e.removeAttribute("id");
  7786. _63e.style.display="none";
  7787. if(!this.m_tabInfo){
  7788. this.m_tabInfo={};
  7789. }
  7790. var _640=this._removeTabStylesFromHead();
  7791. var _641=this.getSelectionController().getCCDManager();
  7792. this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_641.getClonedMetadataArray(),"contextdata":_641.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_640,"hasPromptControl":this.getHasPrompts()};
  7793. var _642=this._findChildWithTabId(_63e.parentNode,_63c);
  7794. this.previouslySelectedTab=this.m_currentlySelectedTab;
  7795. if(_642&&this.m_tabInfo[_63c]&&this.m_tabInfo[_63c].hasPromptControl){
  7796. if(_642){
  7797. _642.parentNode.removeChild(_642);
  7798. _642=null;
  7799. }
  7800. delete this.m_tabInfo[_63c];
  7801. this.m_tabInfo[_63c]=null;
  7802. }
  7803. if(_642){
  7804. this.m_currentlySelectedTab=_63c;
  7805. _642.style.display="block";
  7806. _642.setAttribute("id","CVReport"+this.getId());
  7807. if(this.m_tabInfo&&this.m_tabInfo[_63c]){
  7808. var _643=this.m_tabInfo[_63c];
  7809. if(_643.conversation){
  7810. this.setConversation(_643.conversation);
  7811. }
  7812. if(_643.metadata){
  7813. _641.SetMetadata(_643.metadata);
  7814. }
  7815. if(_643.contextdata){
  7816. _641.SetContextData(_643.contextdata);
  7817. }
  7818. if(_643.secondaryRequests){
  7819. this.setSecondaryRequests(_643.secondaryRequests);
  7820. }
  7821. if(_643.styles){
  7822. this._addTabStylesToHead(_643.styles);
  7823. }
  7824. this.setHasPrompts(_643.hasPromptControl);
  7825. }
  7826. if(this.shouldWriteNavLinks()){
  7827. this.writeNavLinks(this.getSecondaryRequests().join(" "));
  7828. }
  7829. if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
  7830. this.getPinFreezeManager().rePaint();
  7831. if(isIE()){
  7832. var _644=document.getElementById("RVContent"+this.getId());
  7833. this.repaintDiv(_644);
  7834. }
  7835. }
  7836. if(this.m_viewerWidget){
  7837. this.m_viewerWidget.placeTabControlInView();
  7838. }
  7839. this._keepFocus=null;
  7840. this.doneLoadingUpdateA11Y("complete");
  7841. this.getTabController().resetPosition();
  7842. this.setMaxContentSize();
  7843. }else{
  7844. this.m_switchingToTabId=_63c;
  7845. var _645=_63e.cloneNode(false);
  7846. _645.style.display="block";
  7847. _645.setAttribute("id","CVReport"+this.getId());
  7848. _645.removeAttribute("tabId");
  7849. _63e.parentNode.appendChild(_645);
  7850. _645.innerHTML="<table height='"+_63f+"px'><tr><td height='100%'></td></tr></table>";
  7851. var _646=new ViewerDispatcherEntry(this);
  7852. _646.addFormField("ui.action","reportAction");
  7853. _646.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_63c);
  7854. if(this.m_viewerWidget){
  7855. this.m_viewerWidget.placeTabControlInView();
  7856. }
  7857. this.dispatchRequest(_646);
  7858. }
  7859. };
  7860. CCognosViewer.prototype._removeTabContent=function(_647,_648){
  7861. var _649=this._findChildWithTabId(_647,_648);
  7862. while(_649){
  7863. _649.parentNode.removeChild(_649);
  7864. _649=this._findChildWithTabId(_647,_648);
  7865. }
  7866. };
  7867. CCognosViewer.prototype._findChildWithTabId=function(_64a,_64b){
  7868. var _64c=null;
  7869. for(var i=0;i<_64a.childNodes.length;i++){
  7870. var _64e=_64a.childNodes[i];
  7871. if(_64e.getAttribute("tabId")==_64b){
  7872. _64c=_64e;
  7873. break;
  7874. }
  7875. }
  7876. return _64c;
  7877. };
  7878. CCognosViewer.prototype.clearTabs=function(){
  7879. if(!this.m_bHasTabs){
  7880. return;
  7881. }
  7882. this.m_tabInfo={};
  7883. var _64f=this.getReportDiv();
  7884. var _650=_64f.parentNode;
  7885. for(var i=0;i<_650.childNodes.length;i++){
  7886. var node=_650.childNodes[i];
  7887. if(node.getAttribute("id")!="CVReport"+this.m_sId){
  7888. _650.removeChild(node);
  7889. i--;
  7890. }
  7891. }
  7892. };
  7893. CCognosViewer.prototype.isSavedOutput=function(){
  7894. var _653=this.envParams["ui.action"];
  7895. return _653==="view"||_653==="buxView";
  7896. };
  7897. CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_655,_656){
  7898. var _657=document.getElementById("CVReport"+this.getId());
  7899. var _658=document.createElement("iframe");
  7900. _658.style.width="100%";
  7901. _658.style.height="99%";
  7902. _658.id="CVIFrame"+this.getId();
  7903. _658.title=_655;
  7904. _658.setAttribute("frameBorder","0");
  7905. _657.appendChild(_658);
  7906. var obj=this;
  7907. var func=function(){
  7908. obj.renderTabs();
  7909. };
  7910. setTimeout(function(){
  7911. if(_656){
  7912. if(_658.attachEvent){
  7913. _658.attachEvent("onload",func);
  7914. }else{
  7915. _658.addEventListener("load",func,true);
  7916. }
  7917. }
  7918. _658.src=url;
  7919. },1);
  7920. };
  7921. CCognosViewer.prototype.updatePageState=function(_65b){
  7922. if(_65b&&this.getState()){
  7923. this.getState().setPageState(_65b);
  7924. }
  7925. };
  7926. CCognosViewer.prototype.getPageInfo=function(){
  7927. if(this.m_viewerState&&this.m_viewerState.getPageState()){
  7928. var _65c=this.m_viewerState.getPageState();
  7929. return {"currentPage":_65c.getCurrentPage(),"pageCount":_65c.getPageCount()};
  7930. }
  7931. return {};
  7932. };
  7933. CCognosViewer.prototype.isIWidgetMobile=function(){
  7934. return this.m_viewerWidget&&this.m_viewerWidget.isMobile();
  7935. };
  7936. CCognosViewer.prototype.isInteractiveViewer=function(){
  7937. return false;
  7938. };
  7939. CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){
  7940. if(this.isIWidgetMobile()){
  7941. this.m_viewerWidget.launchGotoPageForIWidgetMobile(form);
  7942. return true;
  7943. }
  7944. return false;
  7945. };
  7946. CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){
  7947. if(this.isIWidgetMobile()){
  7948. this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form);
  7949. return true;
  7950. }
  7951. return false;
  7952. };
  7953. CCognosViewer.prototype.getState=function(){
  7954. return this.m_viewerState;
  7955. };
  7956. CCognosViewer.prototype.getConfig=function(){
  7957. return this.m_viewerConfig;
  7958. };
  7959. CCognosViewer.prototype.getUIConfig=function(){
  7960. return this.m_viewerUIConfig;
  7961. };
  7962. CCognosViewer.prototype.setCurrentNodeFocus=function(node){
  7963. this.m_currentNodeFocus=node;
  7964. };
  7965. CCognosViewer.prototype.getCurrentNodeFocus=function(node){
  7966. return this.m_currentNodeFocus;
  7967. };
  7968. CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){
  7969. this.m_CurrentPromptControlFocus=node;
  7970. };
  7971. CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){
  7972. return this.m_CurrentPromptControlFocus;
  7973. };
  7974. CCognosViewer.prototype.loadExtra=function(){
  7975. };
  7976. CCognosViewer.prototype.setRetryDispatcherEntry=function(_663){
  7977. this.m_retryDispatcherEntry=_663;
  7978. };
  7979. CCognosViewer.prototype.getRetryDispatcherEntry=function(){
  7980. return this.m_retryDispatcherEntry;
  7981. };
  7982. CCognosViewer.prototype.resetViewerDispatcher=function(){
  7983. if(this.m_viewerDispatcher!==null){
  7984. delete this.m_viewerDispatcher;
  7985. this.m_viewerDispatcher=new ViewerDispatcher();
  7986. }
  7987. };
  7988. CCognosViewer.prototype.getViewerDispatcher=function(){
  7989. return this.m_viewerDispatcher;
  7990. };
  7991. CCognosViewer.prototype.setFaultDispatcherEntry=function(_664){
  7992. this.m_faultDispatcherEntry=_664;
  7993. };
  7994. CCognosViewer.prototype.getFaultDispatcherEntry=function(){
  7995. return this.m_faultDispatcherEntry;
  7996. };
  7997. CCognosViewer.prototype.dispatchRequest=function(_665){
  7998. this.setFaultDispatcherEntry(null);
  7999. this.getViewerDispatcher().dispatchRequest(_665);
  8000. };
  8001. CCognosViewer.prototype.getActiveRequest=function(){
  8002. return this.getViewerDispatcher().getActiveRequest();
  8003. };
  8004. CCognosViewer.prototype.getProductLocale=function(){
  8005. if(this.sProductLocale){
  8006. return this.sProductLocale;
  8007. }
  8008. return "en";
  8009. };
  8010. CCognosViewer.prototype.getDirection=function(){
  8011. if(this.sDirection){
  8012. return this.sDirection;
  8013. }
  8014. return "ltr";
  8015. };
  8016. CCognosViewer.prototype.isBidiEnabled=function(){
  8017. if(this.bIsBidiEnabled){
  8018. return true;
  8019. }
  8020. return false;
  8021. };
  8022. CCognosViewer.prototype.getBaseTextDirection=function(){
  8023. if(this.isBidiEnabled()){
  8024. if(this.sBaseTextDirection){
  8025. return this.sBaseTextDirection;
  8026. }
  8027. }
  8028. return "";
  8029. };
  8030. CCognosViewer.prototype.getActionFactory=function(){
  8031. if(!this.m_actionFactory){
  8032. this.m_actionFactory=new ActionFactory(this);
  8033. }
  8034. return this.m_actionFactory;
  8035. };
  8036. CCognosViewer.prototype.getAction=function(_666){
  8037. var _666=this.getActionFactory().load(_666);
  8038. _666.setCognosViewer(this);
  8039. return _666;
  8040. };
  8041. CCognosViewer.prototype.getCalculationCache=function(){
  8042. return this.m_calculationCache;
  8043. };
  8044. CCognosViewer.prototype.updateOutputForA11ySupport=function(){
  8045. this.updateBorderCollapse();
  8046. if(this.getA11YHelper()){
  8047. this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
  8048. }
  8049. var _667=navigator.userAgent.toLowerCase();
  8050. var _668=_667.indexOf("iphone")!=-1;
  8051. var _669=_667.indexOf("ipod")!=-1;
  8052. var _66a=_667.indexOf("ipad")!=-1;
  8053. var _66b=_668||_669||_66a;
  8054. var _66c=_667.indexOf("android")!=-1;
  8055. if(_66b||_66c){
  8056. document.body.classList.add("clsViewerMobile");
  8057. }
  8058. };
  8059. CCognosViewer.prototype.checkForHighContrast=function(){
  8060. if(this.isBux){
  8061. this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false;
  8062. }else{
  8063. var _66d=document.createElement("div");
  8064. _66d.id=this.m_sId+"hc";
  8065. _66d.style.border="1px solid";
  8066. _66d.style.borderColor="red green";
  8067. _66d.style.height="10px";
  8068. _66d.style.top="-999px";
  8069. _66d.style.position="absolute";
  8070. document.body.appendChild(_66d);
  8071. var _66e=null;
  8072. if(isIE()){
  8073. _66e=_66d.currentStyle;
  8074. }else{
  8075. _66e=_66d.ownerDocument.defaultView.getComputedStyle(_66d,null);
  8076. }
  8077. if(!_66e){
  8078. return;
  8079. }
  8080. this.m_bHighContrast=_66e.borderTopColor==_66e.borderRightColor;
  8081. document.body.removeChild(_66d);
  8082. }
  8083. };
  8084. CCognosViewer.prototype.isHighContrast=function(){
  8085. if(typeof this.m_bHighContrast==="undefined"){
  8086. this.checkForHighContrast();
  8087. }
  8088. return this.m_bHighContrast;
  8089. };
  8090. CCognosViewer.prototype.isLimitedInteractiveMode=function(){
  8091. return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true";
  8092. };
  8093. CCognosViewer.prototype.updateBorderCollapse=function(){
  8094. if(this.isHighContrast()==true){
  8095. var _66f=null;
  8096. if(this.envParams["ui.action"]=="view"&&!this.isBux){
  8097. var _670=document.getElementById("CVIFrame"+this.getId());
  8098. _66f=_670.contentWindow.document;
  8099. }else{
  8100. _66f=document.getElementById("CVReport"+this.getId());
  8101. }
  8102. var _671=_66f.getElementsByTagName("table");
  8103. for(var i=0;i<_671.length;i++){
  8104. if(_671[i].style.borderCollapse=="collapse"){
  8105. _671[i].style.borderCollapse="separate";
  8106. }
  8107. }
  8108. }
  8109. };
  8110. CCognosViewer.prototype.isAccessibleMode=function(){
  8111. if(this.m_bAccessibleMode==true){
  8112. return true;
  8113. }
  8114. return false;
  8115. };
  8116. CCognosViewer.prototype.isSinglePageReport=function(){
  8117. for(var _673 in this.m_aSecRequests){
  8118. if(this.m_aSecRequests[_673]=="nextPage"||this.m_aSecRequests[_673]=="previousPage"){
  8119. return false;
  8120. }
  8121. }
  8122. return true;
  8123. };
  8124. CCognosViewer.prototype.hasNextPage=function(){
  8125. for(var _674 in this.m_aSecRequests){
  8126. if(this.m_aSecRequests[_674]=="nextPage"){
  8127. return true;
  8128. }
  8129. }
  8130. return false;
  8131. };
  8132. CCognosViewer.prototype.hasPrevPage=function(){
  8133. for(var _675 in this.m_aSecRequests){
  8134. if(this.m_aSecRequests[_675]=="previousPage"){
  8135. return true;
  8136. }
  8137. }
  8138. return false;
  8139. };
  8140. CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
  8141. evt=(evt)?evt:((event)?event:null);
  8142. if(evt){
  8143. var node=getNodeFromEvent(evt);
  8144. var _678=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
  8145. if((evt.keyCode==8&&_678!="input"&&_678!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){
  8146. evt.returnValue=false;
  8147. evt.cancelBubble=true;
  8148. if(typeof evt.stopPropagation!="undefined"){
  8149. evt.stopPropagation();
  8150. }
  8151. if(typeof evt.preventDefault!="undefined"){
  8152. evt.preventDefault();
  8153. }
  8154. return false;
  8155. }
  8156. }
  8157. return true;
  8158. };
  8159. CCognosViewer.prototype.setUseWorkingDialog=function(_679){
  8160. this.m_bUseWorkingDialog=_679;
  8161. };
  8162. CCognosViewer.prototype.getWorkingDialog=function(){
  8163. if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){
  8164. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){
  8165. this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog();
  8166. }else{
  8167. this.m_oWorkingDialog=new WorkingDialog(this);
  8168. }
  8169. }
  8170. return this.m_oWorkingDialog;
  8171. };
  8172. CCognosViewer.prototype.getRequestIndicator=function(){
  8173. if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){
  8174. if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){
  8175. this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator();
  8176. }else{
  8177. this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this);
  8178. }
  8179. }
  8180. return this.m_oRequestExecutedIndicator;
  8181. };
  8182. CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){
  8183. if(document.attachEvent){
  8184. document.attachEvent("onkeydown",this.captureHotkeyPageNavigation);
  8185. }else{
  8186. if(document.addEventListener){
  8187. document.addEventListener("keydown",this.captureHotkeyPageNavigation,false);
  8188. }
  8189. }
  8190. };
  8191. CCognosViewer.prototype.setHasPrompts=function(_67a){
  8192. if(!_67a){
  8193. this.preProcessControlArray=[];
  8194. }
  8195. this.m_bReportHasPrompts=_67a;
  8196. };
  8197. CCognosViewer.prototype.getHasPrompts=function(){
  8198. return this.m_bReportHasPrompts;
  8199. };
  8200. CCognosViewer.prototype.setUsePageRequest=function(_67b){
  8201. this.m_viewerDispatcher.setUsePageRequest(_67b);
  8202. };
  8203. CCognosViewer.prototype.getUsePageRequest=function(){
  8204. return this.m_viewerDispatcher.getUsePageRequest();
  8205. };
  8206. CCognosViewer.prototype.setKeepSessionAlive=function(_67c){
  8207. this.m_bKeepSessionAlive=_67c;
  8208. };
  8209. CCognosViewer.prototype.getKeepSessionAlive=function(){
  8210. return this.m_bKeepSessionAlive;
  8211. };
  8212. CCognosViewer.prototype.getWebContentRoot=function(){
  8213. if(typeof this.sWebContentRoot!="undefined"){
  8214. return this.sWebContentRoot;
  8215. }else{
  8216. return "..";
  8217. }
  8218. };
  8219. CCognosViewer.prototype.getSkin=function(){
  8220. if(typeof this.sSkin!="undefined"){
  8221. return this.sSkin;
  8222. }else{
  8223. return this.getWebContentRoot()+"/skins/corporate";
  8224. }
  8225. };
  8226. CCognosViewer.prototype.getSelectionController=function(){
  8227. var _67d;
  8228. try{
  8229. _67d=getCognosViewerSCObjectRef(this.m_sId);
  8230. }
  8231. catch(e){
  8232. _67d=null;
  8233. }
  8234. return _67d;
  8235. };
  8236. CCognosViewer.prototype.addCallback=function(_67e,oFct,_680){
  8237. if(!this.m_aCallback){
  8238. this.m_aCallback=[];
  8239. }
  8240. this.m_aCallback=this.m_aCallback.concat({m_sEvent:_67e,m_oCallback:oFct,m_bCaptureEvent:(_680===true)});
  8241. };
  8242. CCognosViewer.prototype.canDrillDown=function(sId){
  8243. var sCtx=this.findCtx(sId).split("::")[0];
  8244. if(sCtx){
  8245. var _683=this.getSelectionController();
  8246. if(_683){
  8247. return (_683.canDrillDown(sCtx));
  8248. }
  8249. }
  8250. return false;
  8251. };
  8252. CCognosViewer.prototype.canDrillUp=function(sId){
  8253. var sCtx=this.findCtx(sId).split("::")[0];
  8254. if(sCtx){
  8255. var _686=this.getSelectionController();
  8256. if(_686){
  8257. return (_686.canDrillUp(sCtx));
  8258. }
  8259. }
  8260. return false;
  8261. };
  8262. CCognosViewer.prototype.canSubmitPrompt=function(){
  8263. var _687=null;
  8264. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  8265. var _688=this.preProcessControlArray.length;
  8266. for(var k=0;k<_688;k++){
  8267. _687=eval(this.preProcessControlArray[k]);
  8268. if(_687.isValid()===false){
  8269. if(!this.m_reportRenderingDone||!_687.getCascadeOnParameter||!_687.getCascadeOnParameter()){
  8270. return false;
  8271. }
  8272. }
  8273. }
  8274. }
  8275. return true;
  8276. };
  8277. CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
  8278. if(this.rvMainWnd){
  8279. this.rvMainWnd.closeContextMenuAndToolbarMenus();
  8280. }
  8281. };
  8282. CCognosViewer.prototype.dcm=function(_68a,_68b){
  8283. if(this.canDisplayContextMenu()){
  8284. if(this.preSelectNode==true){
  8285. _68b=false;
  8286. this.preSelectNode=false;
  8287. }
  8288. if(this.rvMainWnd.displayContextMenu(_68a,_68b)!=false){
  8289. return stopEventBubble(_68a);
  8290. }
  8291. }
  8292. };
  8293. CCognosViewer.prototype.canDisplayContextMenu=function(){
  8294. if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){
  8295. return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu);
  8296. }
  8297. return false;
  8298. };
  8299. CCognosViewer.prototype.de=function(_68c){
  8300. var _68d=this.getDrillMgr();
  8301. if(_68d){
  8302. _68d.singleClickDrillEvent(_68c,"RV");
  8303. }
  8304. };
  8305. CCognosViewer.prototype.debug=function(sMsg){
  8306. if(this.m_bDebug){
  8307. var _68f="";
  8308. var _690=this.debug.caller;
  8309. if(typeof _690=="object"&&_690!==null){
  8310. _68f=_690.toString().match(/function (\w*)/)[1];
  8311. }
  8312. if(!_68f){
  8313. _68f="?";
  8314. }
  8315. alert(_68f+": "+sMsg);
  8316. }
  8317. };
  8318. CCognosViewer.prototype.callbackExists=function(_691){
  8319. var _692=false;
  8320. if(this.m_aCallback&&this.m_aCallback.length){
  8321. for(var _693=0;_693<this.m_aCallback.length;++_693){
  8322. var oCB=this.m_aCallback[_693];
  8323. if(oCB.m_sEvent==_691){
  8324. return true;
  8325. }
  8326. }
  8327. }
  8328. return false;
  8329. };
  8330. CCognosViewer.prototype.executeCallback=function(_695){
  8331. var _696=false;
  8332. if(this.m_aCallback&&this.m_aCallback.length){
  8333. for(var _697=0;_697<this.m_aCallback.length;++_697){
  8334. var oCB=this.m_aCallback[_697];
  8335. if(oCB.m_sEvent==_695){
  8336. if(typeof oCB.m_oCallback=="function"){
  8337. oCB.m_oCallback();
  8338. }
  8339. if(oCB.m_bCaptureEvent){
  8340. _696=true;
  8341. }
  8342. }
  8343. }
  8344. }
  8345. return _696;
  8346. };
  8347. CCognosViewer.prototype.getCAFContext=function(){
  8348. return this.m_sCAFContext;
  8349. };
  8350. CCognosViewer.prototype.getSoapFault=function(){
  8351. return this.m_sSoapFault;
  8352. };
  8353. CCognosViewer.prototype.getColumnContextIds=function(sId){
  8354. return this.getContextIds(sId,2);
  8355. };
  8356. CCognosViewer.prototype.getConversation=function(){
  8357. return this.m_sConversation;
  8358. };
  8359. CCognosViewer.prototype.getStatus=function(){
  8360. return (this.m_sStatus?this.m_sStatus:"");
  8361. };
  8362. CCognosViewer.prototype.isWorking=function(_69a){
  8363. if(typeof _69a!="string"){
  8364. _69a=this.getStatus();
  8365. }
  8366. return ((""+_69a).match(/^(working|stillWorking)$/)?true:false);
  8367. };
  8368. CCognosViewer.prototype.isWorkingOrPrompting=function(){
  8369. return (this.getStatus().match(/^(working|stillWorking|prompting)$/)?true:false);
  8370. };
  8371. CCognosViewer.prototype.getActionState=function(){
  8372. return this.m_sActionState;
  8373. };
  8374. CCognosViewer.prototype.getDataItemName=function(sId){
  8375. var _69c=null;
  8376. var sCtx=this.findCtx(sId).split("::")[0];
  8377. if(sCtx){
  8378. var _69e=this.getSelectionController();
  8379. if(_69e){
  8380. var _69f=_69e.getRefDataItem(sCtx);
  8381. if(_69f){
  8382. _69c=_69f;
  8383. }
  8384. }
  8385. }
  8386. return _69c;
  8387. };
  8388. CCognosViewer.prototype.getDataType=function(sId){
  8389. var _6a1=null;
  8390. var sCtx=this.findCtx(sId).split("::")[0];
  8391. if(sCtx){
  8392. var _6a3=this.getSelectionController();
  8393. if(_6a3){
  8394. var _6a4=_6a3.getDataType(sCtx);
  8395. if(_6a4){
  8396. _6a1=_6a4;
  8397. }
  8398. }
  8399. }
  8400. return _6a1;
  8401. };
  8402. CCognosViewer.prototype.getDepth=function(sId){
  8403. var _6a6=null;
  8404. var sCtx=this.findCtx(sId).split("::")[0];
  8405. if(sCtx){
  8406. var _6a8=this.getSelectionController();
  8407. if(_6a8){
  8408. var _6a9=_6a8.getDepth(sCtx);
  8409. if(_6a9){
  8410. _6a6=_6a9;
  8411. }
  8412. }
  8413. }
  8414. return _6a6;
  8415. };
  8416. CCognosViewer.prototype.getDrillMgr=function(){
  8417. if(!this.m_oDrillMgr){
  8418. this.loadExtra();
  8419. if(typeof CDrillManager=="function"){
  8420. this.m_oDrillMgr=new CDrillManager(this);
  8421. this.goDrillManager=this.m_oDrillMgr;
  8422. }
  8423. }
  8424. return this.m_oDrillMgr;
  8425. };
  8426. CCognosViewer.prototype.getSubscriptionManager=function(){
  8427. if(!this.m_oSubscriptionManager){
  8428. this.loadExtra();
  8429. if(typeof CSubscriptionManager=="function"){
  8430. this.m_oSubscriptionManager=new CSubscriptionManager(this);
  8431. }
  8432. }
  8433. return this.m_oSubscriptionManager;
  8434. };
  8435. CCognosViewer.prototype.updateGlobalParameters=function(_6aa){
  8436. var oReq=new ViewerDispatcherEntry(this);
  8437. oReq.addFormField("ui.action","forward");
  8438. oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_6aa);
  8439. oReq.addFormField("run.prompt",true);
  8440. oReq.addFormField("_promptControl","reprompt");
  8441. this.submitPromptValues(oReq);
  8442. };
  8443. CCognosViewer.prototype.getExecutionParameters=function(){
  8444. return this.m_sParameters;
  8445. };
  8446. CCognosViewer.prototype.getGateway=function(){
  8447. return this.m_sGateway;
  8448. };
  8449. CCognosViewer.prototype.getSpecification=function(){
  8450. return this.envParams["ui.spec"];
  8451. };
  8452. CCognosViewer.prototype.getHierarchyUniqueName=function(sId){
  8453. var sHun=null;
  8454. var sCtx=this.findCtx(sId).split("::")[0];
  8455. if(sCtx){
  8456. var _6af=this.getSelectionController();
  8457. if(_6af){
  8458. var aHUN=_6af.getHun(sCtx);
  8459. if(aHUN){
  8460. sHun=aHUN;
  8461. }
  8462. }
  8463. }
  8464. return sHun;
  8465. };
  8466. CCognosViewer.prototype.getDimensionUniqueName=function(sId){
  8467. var sCtx=this.findCtx(sId).split("::")[0];
  8468. if(sCtx){
  8469. var _6b3=this.getSelectionController();
  8470. if(_6b3){
  8471. var aDUN=_6b3.getDun(sCtx);
  8472. if(aDUN){
  8473. return aDUN;
  8474. }
  8475. }
  8476. }
  8477. return null;
  8478. };
  8479. CCognosViewer.prototype.getId=function(){
  8480. return this.m_sId;
  8481. };
  8482. CCognosViewer.prototype.getLevelId=function(sId){
  8483. var _6b6=null;
  8484. var sCtx=this.findCtx(sId).split("::")[0];
  8485. if(sCtx){
  8486. var _6b8=this.getSelectionController();
  8487. if(_6b8){
  8488. var aLUN=_6b8.getLun(sCtx);
  8489. if(aLUN){
  8490. _6b6=aLUN;
  8491. }
  8492. }
  8493. }
  8494. return _6b6;
  8495. };
  8496. CCognosViewer.prototype.getMemberUniqueName=function(sId){
  8497. var sMUN=null;
  8498. var sCtx=this.findCtx(sId).split("::")[0];
  8499. if(sCtx){
  8500. var _6bd=this.getSelectionController();
  8501. if(_6bd){
  8502. var aMUN=_6bd.getMun(sCtx);
  8503. if(aMUN){
  8504. sMUN=aMUN;
  8505. }
  8506. }
  8507. }
  8508. return sMUN;
  8509. };
  8510. CCognosViewer.prototype.getObjectId=function(){
  8511. var _6bf="window";
  8512. if(typeof this.getId()=="string"){
  8513. _6bf=getCognosViewerObjectRefAsString(this.getId());
  8514. }
  8515. return _6bf;
  8516. };
  8517. CCognosViewer.prototype.getQueryModelId=function(sId){
  8518. var _6c1=null;
  8519. var sCtx=this.findCtx(sId).split("::")[0];
  8520. if(sCtx){
  8521. var _6c3=this.getSelectionController();
  8522. if(_6c3){
  8523. var _6c4=_6c3.getQueryModelId(sCtx);
  8524. if(_6c4){
  8525. _6c1=_6c4;
  8526. }
  8527. }
  8528. }
  8529. return _6c1;
  8530. };
  8531. CCognosViewer.prototype.getQueryName=function(sId){
  8532. var _6c6=null;
  8533. var sCtx=this.findCtx(sId).split("::")[0];
  8534. if(sCtx){
  8535. var _6c8=this.getSelectionController();
  8536. if(_6c8){
  8537. var _6c9=_6c8.getRefQuery(sCtx);
  8538. if(_6c9){
  8539. _6c6=_6c9;
  8540. }
  8541. }
  8542. }
  8543. return _6c6;
  8544. };
  8545. CCognosViewer.prototype.getContextIds=function(sId,_6cb){
  8546. var aIds=[];
  8547. var sCtx=this.findCtx(sId);
  8548. if(sCtx){
  8549. var _6ce=sCtx.split("::");
  8550. if(_6ce&&_6ce.length>1&&_6cb<_6ce.length){
  8551. aIds=_6ce[_6cb].split(":");
  8552. }
  8553. }
  8554. return aIds;
  8555. };
  8556. CCognosViewer.prototype.getRowContextIds=function(sId){
  8557. return this.getContextIds(sId,1);
  8558. };
  8559. CCognosViewer.prototype.getPageContextIds=function(sId){
  8560. return this.getContextIds(sId,3);
  8561. };
  8562. CCognosViewer.prototype.getString=function(sKey){
  8563. if(RV_RES&&RV_RES[sKey]){
  8564. return RV_RES[sKey];
  8565. }
  8566. return sKey;
  8567. };
  8568. CCognosViewer.prototype.getRV=function(){
  8569. if(typeof this.m_oCVMgr=="object"){
  8570. return this.m_oCVMgr;
  8571. }
  8572. return window;
  8573. };
  8574. CCognosViewer.prototype.getSecondaryRequests=function(){
  8575. return this.m_aSecRequests;
  8576. };
  8577. CCognosViewer.prototype.getTracking=function(){
  8578. return this.m_sTracking;
  8579. };
  8580. CCognosViewer.prototype.findCtx=function(sId){
  8581. var sCtx="";
  8582. if(typeof sId=="string"){
  8583. var aCtx=this.getReportContextHelper().processCtx(sId);
  8584. var _6d5=aCtx[0][0];
  8585. var _6d6=this.getSelectionController();
  8586. if(_6d6){
  8587. if(_6d6.isContextId(_6d5)){
  8588. sCtx=sId;
  8589. }
  8590. }
  8591. }
  8592. if(!sCtx){
  8593. var _6d7=this.findElementWithCtx(sId);
  8594. if(_6d7){
  8595. sCtx=_6d7.getAttribute("ctx");
  8596. }
  8597. }
  8598. return sCtx;
  8599. };
  8600. CCognosViewer.prototype.findElementWithCtx=function(sId){
  8601. var _6d9=sId;
  8602. if(typeof sId=="string"){
  8603. _6d9=this.findElementWithCtx(document.getElementById(sId));
  8604. }
  8605. if(_6d9){
  8606. if(_6d9.getAttribute&&_6d9.getAttribute("ctx")){
  8607. return _6d9;
  8608. }
  8609. for(var _6da=0;_6da<_6d9.childNodes.length;_6da++){
  8610. var _6db=this.findElementWithCtx(_6d9.childNodes[_6da]);
  8611. if(_6db){
  8612. return _6db;
  8613. }
  8614. }
  8615. }
  8616. return null;
  8617. };
  8618. CCognosViewer.prototype.getUseValue=function(sId){
  8619. var sVal=null;
  8620. var sCtx=this.findCtx(sId).split("::")[0];
  8621. if(sCtx){
  8622. var _6df=this.getSelectionController();
  8623. if(_6df){
  8624. sVal=_6df.getUseValue(sCtx);
  8625. }
  8626. }
  8627. return sVal;
  8628. };
  8629. CCognosViewer.prototype.init=function(_6e0){
  8630. if(_6e0&&typeof _6e0=="object"){
  8631. for(var _6e1 in _6e0){
  8632. this[_6e1]=_6e0[_6e1];
  8633. }
  8634. }
  8635. };
  8636. CCognosViewer.prototype.initViewer=function(_6e2){
  8637. var _6e3=new RequestHandler(this);
  8638. var _6e4=document.getElementById("formBackJax"+this.getId());
  8639. if(_6e4&&typeof _6e4.state!="undefined"&&_6e4.state.value.length>0){
  8640. _6e3.loadReportHTML(_6e4.result.value);
  8641. var _6e5=eval("("+_6e4.state.value+")");
  8642. _6e3.updateViewerState(_6e5);
  8643. _6e3.postComplete();
  8644. }else{
  8645. if(this.getUsePageRequest()){
  8646. var _6e6=_6e2?_6e2.m_sStatus:null;
  8647. if(isIE()){
  8648. if(window.location.hash=="#working"){
  8649. window.history.go(-2);
  8650. return;
  8651. }else{
  8652. if(_6e6==="working"||_6e6==="stillWorking"){
  8653. window.location.hash="#working";
  8654. }
  8655. }
  8656. }else{
  8657. if(_6e4&&_6e4.working){
  8658. if(_6e4.working.value=="true"){
  8659. window.history.go(-1);
  8660. return;
  8661. }else{
  8662. if(_6e6==="working"||_6e6==="stillWorking"){
  8663. _6e4.working.value="true";
  8664. }
  8665. }
  8666. }
  8667. }
  8668. }
  8669. _6e3.processInitialResponse(_6e2);
  8670. }
  8671. };
  8672. CCognosViewer.prototype.saveBackJaxInformation=function(_6e7){
  8673. var _6e8=document.getElementById("formBackJax"+this.getId());
  8674. if(_6e8){
  8675. if(typeof _6e8.state!="undefined"){
  8676. _6e8.state.value=_6e7.getResponseStateText();
  8677. }
  8678. if(typeof _6e8.result!="undefined"){
  8679. _6e8.result.value=_6e7.getResult();
  8680. }
  8681. }
  8682. };
  8683. CCognosViewer.prototype.pcc=function(evt){
  8684. if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
  8685. this.preSelectNode=true;
  8686. var _6ea=this.getSelectionController();
  8687. if(_6ea){
  8688. _6ea.pageContextClicked(evt);
  8689. }
  8690. }
  8691. };
  8692. CCognosViewer.prototype.isValidAjaxResponse=function(_6eb){
  8693. return (_6eb&&_6eb.childNodes&&_6eb.childNodes.length>0&&_6eb.childNodes[0].nodeName!="parsererror"?true:false);
  8694. };
  8695. CCognosViewer.prototype.resubmitInSafeMode=function(_6ec){
  8696. if(this.m_bUseSafeMode){
  8697. this.resetViewerDispatcher();
  8698. this.setUsePageRequest(true);
  8699. this.envParams["cv.useAjax"]="false";
  8700. if(_6ec){
  8701. _6ec.retryRequest();
  8702. }
  8703. }
  8704. };
  8705. CCognosViewer.prototype.showLoadedContent=function(_6ed){
  8706. if(_6ed!==null&&typeof _6ed!="undefined"){
  8707. _6ed.style.display="block";
  8708. }
  8709. this.m_resizeReady=true;
  8710. this.doneLoading();
  8711. var obj=this;
  8712. setTimeout(function(){
  8713. obj.renderTabs();
  8714. },1);
  8715. };
  8716. CCognosViewer.prototype.doneLoading=function(){
  8717. var _6ef=this.getViewerWidget();
  8718. if(_6ef){
  8719. if(window.IBM&&window.IBM.perf){
  8720. window.IBM.perf.log("viewer_doneLoading",this);
  8721. }
  8722. var _6f0=this.getStatus();
  8723. if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
  8724. var _6f1=_6f0=="working"||_6f0=="stillWorking"||_6f0=="fault";
  8725. _6ef.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_6f1});
  8726. if(_6f0=="complete"){
  8727. if(window.IBM&&window.IBM.perf){
  8728. window.IBM.perf.log("viewer_doneLoading",this);
  8729. }
  8730. if(typeof _6ef.postLoadContent=="function"){
  8731. _6ef.postLoadContent();
  8732. }
  8733. this.m_reportRenderingDone=true;
  8734. if(!_6f1){
  8735. var _6f2=this;
  8736. setTimeout(function(){
  8737. _6f2.m_readyToRespondToResizeEvent=true;
  8738. },20);
  8739. }
  8740. }
  8741. }
  8742. if(_6f0!="fault"){
  8743. _6ef.clearErrorDlg();
  8744. }
  8745. this.doneLoadingUpdateA11Y(_6f0);
  8746. }else{
  8747. var _6f0=this.getStatus();
  8748. if(_6f0=="complete"){
  8749. this.m_reportRenderingDone=true;
  8750. this.JAWSTalk(RV_RES.IDS_JS_READY);
  8751. }else{
  8752. if(_6f0=="working"){
  8753. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  8754. }
  8755. }
  8756. }
  8757. };
  8758. CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_6f3){
  8759. if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
  8760. var _6f4=this.getKeepFocus();
  8761. if(_6f3=="complete"){
  8762. this.setKeepFocus(false);
  8763. }
  8764. var _6f5=null;
  8765. if(this.getVisibleDialog()!==null){
  8766. _6f5=this.getVisibleDialog().getDialogDiv();
  8767. }else{
  8768. if(_6f4===true){
  8769. _6f5=document.getElementById("CVReport"+this.getId());
  8770. }else{
  8771. if(typeof _6f4=="string"){
  8772. _6f5=document.getElementById(_6f4);
  8773. }else{
  8774. if(_6f4!==null){
  8775. _6f5=_6f4;
  8776. if(this.isBux){
  8777. dojo.window.scrollIntoView(_6f5);
  8778. }
  8779. }
  8780. }
  8781. }
  8782. }
  8783. if(_6f5){
  8784. setFocusToFirstTabItem(_6f5);
  8785. }
  8786. if(_6f3=="complete"){
  8787. this.JAWSTalk(RV_RES.IDS_JS_READY);
  8788. }else{
  8789. if(_6f3=="working"||_6f3=="stillWorking"){
  8790. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  8791. }
  8792. }
  8793. }
  8794. };
  8795. CCognosViewer.prototype.JAWSTalk=function(_6f6){
  8796. if(this.isMobile()||this.isIWidgetMobile()){
  8797. return;
  8798. }
  8799. var id=this.getId();
  8800. var div=document.getElementById("JAWS_Alert_"+id);
  8801. if(div){
  8802. div.parentNode.removeChild(div);
  8803. }
  8804. div=document.createElement("div");
  8805. div.id="JAWS_Alert_"+id;
  8806. div.style.position="absolute";
  8807. div.style.top="-9000px";
  8808. div.style.display="none";
  8809. div.setAttribute("role","alert");
  8810. div.appendChild(document.createTextNode(_6f6));
  8811. var _6f9=document.getElementById("RVContent"+id);
  8812. if(_6f9){
  8813. _6f9.appendChild(div);
  8814. }else{
  8815. if(typeof console!="undefined"&&console&&console.log){
  8816. console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert.");
  8817. }
  8818. }
  8819. };
  8820. CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){
  8821. if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){
  8822. return false;
  8823. }
  8824. var _6fa=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
  8825. if(_6fa===null){
  8826. return false;
  8827. }
  8828. var _6fb=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
  8829. return (_6fa.toLowerCase()==="on"&&_6fb!==false)||(_6fa.toLowerCase()==="off"&&_6fb===true);
  8830. };
  8831. CCognosViewer.prototype.setMaxContentSize=function(){
  8832. if("10"!=window.getIEVersion()){
  8833. return;
  8834. }
  8835. if(document.body.className==="viewer"){
  8836. var _6fc=document.body.offsetHeight;
  8837. var _6fd=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
  8838. var _6fe=document.getElementById("mainViewerTable"+this.getId());
  8839. _6fe.style.maxHeight=_6fc-_6fd-2+"px";
  8840. var _6ff=GUtil.generateCallback(this.setMaxContentSize,[true],this);
  8841. if(!this.attachedOnResize){
  8842. this.attachedOnResize=true;
  8843. if(window.attachEvent){
  8844. window.attachEvent("onresize",_6ff);
  8845. }else{
  8846. if(window.addEventListener){
  8847. window.addEventListener("resize",_6ff,false);
  8848. }
  8849. }
  8850. }
  8851. }
  8852. };
  8853. CCognosViewer.prototype.getNonReportHeight=function(node){
  8854. var _701=0;
  8855. var _702=node.parentNode;
  8856. if(!_702){
  8857. return _701;
  8858. }
  8859. if(_702.childNodes.length>1){
  8860. for(var i=0;i<_702.childNodes.length;i++){
  8861. var _704=_702.childNodes[i];
  8862. if(_704!=node&&!isNaN(_704.clientHeight)&&_704.style.display!="none"){
  8863. _701+=_704.clientHeight;
  8864. }
  8865. }
  8866. }
  8867. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  8868. _701+=this.getNonReportHeight(_702);
  8869. }
  8870. return _701;
  8871. };
  8872. CCognosViewer.prototype.addPageAdornments=function(){
  8873. this.m_layoutElements=null;
  8874. this.m_lidToElement=null;
  8875. this.initFlashCharts();
  8876. this.insertSortIconsForAllLists();
  8877. var _705=this.getViewerWidget().getProperties();
  8878. if(this.canInsertExpandIconsForAllCrosstabs()){
  8879. this.insertExpandIconsForAllCrosstabs();
  8880. }
  8881. var _706=document.getElementById("CVReport"+this.getId());
  8882. if(_706){
  8883. var oCV=this;
  8884. setTimeout(function(){
  8885. if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
  8886. oCV.getPinFreezeManager().renderReportWithFrozenContainers(_706);
  8887. }
  8888. oCV.addInfoBar();
  8889. },1);
  8890. }
  8891. this.getViewerWidget().reselectSelectionFilterObjects();
  8892. this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
  8893. };
  8894. CCognosViewer.prototype.addFlashChart=function(_708){
  8895. this.m_flashChartsObjectIds.push(_708);
  8896. };
  8897. CCognosViewer.prototype.flashChartError=function(_709){
  8898. var _70a=this.getViewerWidget();
  8899. var _70b=_70a.getProperties();
  8900. _70b.setProperty("flashCharts",false);
  8901. var _70c=this.getAction("Redraw");
  8902. _70c.isUndoable=function(){
  8903. return false;
  8904. };
  8905. _70c.execute();
  8906. };
  8907. CCognosViewer.prototype.initFlashCharts=function(){
  8908. var _70d=this.getViewerWidget();
  8909. if(this.m_flashChartsObjectIds.length>0){
  8910. var _70e=document.getElementById("rt"+this.getId());
  8911. if(window.addEventListener){
  8912. _70e.addEventListener("mousedown",onFlashChartRightClick,true);
  8913. }else{
  8914. var _70f={};
  8915. var _710=function(){
  8916. this.releaseCapture();
  8917. };
  8918. var _711=function(){
  8919. onFlashChartRightClick(event);
  8920. this.setCapture();
  8921. };
  8922. for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
  8923. var _713=this.m_flashChartsObjectIds[i];
  8924. var _714=document.getElementById(_713);
  8925. _70f[_713]=1;
  8926. _714.parentNode.onmouseup=_710;
  8927. _714.parentNode.onmousedown=_711;
  8928. }
  8929. if(this.m_flashChartsObjectIds.length>0){
  8930. _70e.attachEvent("oncontextmenu",function(){
  8931. if(_70f[window.event.srcElement.id]){
  8932. return false;
  8933. }
  8934. });
  8935. }
  8936. }
  8937. if(_70d){
  8938. _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
  8939. }
  8940. }else{
  8941. if(_70d){
  8942. _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
  8943. }
  8944. }
  8945. };
  8946. CCognosViewer.prototype.initializeLayoutElements=function(){
  8947. var _715=document.getElementById("rt"+this.getId());
  8948. var _716=getElementsByAttribute(_715,"*","lid");
  8949. this.m_lidToElement={};
  8950. this.m_layoutElements=[];
  8951. var _717=0;
  8952. var _718=this.getPinFreezeManager();
  8953. for(var i=0;i<_716.length;i++){
  8954. var e=_716[i];
  8955. if(!_718||!_718.getContainerElement(e)||_718.isElementInMainOutput(e)){
  8956. this.m_layoutElements[_717]=e;
  8957. this.m_lidToElement[e.getAttribute("lid")]=e;
  8958. _717++;
  8959. }
  8960. }
  8961. };
  8962. CCognosViewer.prototype.getLayoutElement=function(_71b){
  8963. if(!this.m_layoutElements){
  8964. this.initializeLayoutElements();
  8965. }
  8966. if(this.m_layoutElements){
  8967. return this.m_layoutElements[_71b];
  8968. }
  8969. return null;
  8970. };
  8971. CCognosViewer.prototype.getLayoutElementFromLid=function(lid){
  8972. if(!this.m_lidToElement){
  8973. this.initializeLayoutElements();
  8974. }
  8975. return this.m_lidToElement[lid];
  8976. };
  8977. CCognosViewer.prototype.getInfoBars=function(){
  8978. return this.m_aInfoBar?this.m_aInfoBar:null;
  8979. };
  8980. CCognosViewer.prototype.addInfoBar=function(){
  8981. if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){
  8982. return;
  8983. }
  8984. var _71d=this.getRAPReportInfo();
  8985. if(_71d){
  8986. var _71e=document.getElementById("rt"+this.getId());
  8987. this.initializeLayoutElements();
  8988. var _71f=[];
  8989. this.m_aInfoBar=[];
  8990. for(var _720=0;_720<this.m_layoutElements.length;++_720){
  8991. var _721=this.m_layoutElements[_720];
  8992. var lid=_721.getAttribute("lid");
  8993. if(lid){
  8994. if(lid.indexOf("RAP_NDH_")>-1){
  8995. lid=lid.substring(8);
  8996. }
  8997. lid=lid.substring(0,lid.indexOf(this.getId()));
  8998. }
  8999. var _723=_71d.getContainer(lid);
  9000. if(_723&&typeof _723.parentContainer=="undefined"){
  9001. var _724=this.collectChildContainers(_723.container);
  9002. if(this.getPinFreezeManager()){
  9003. oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_721);
  9004. _721=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_721;
  9005. }
  9006. var _725=new InfoBar(this,_721,_723,_724,_720);
  9007. _725.setTimingDetails(_71d._getEventTimings());
  9008. _725.render();
  9009. if(_725.hasSomethingRendered()){
  9010. _71f.push(_725.getId());
  9011. }
  9012. this.m_aInfoBar.push(_725);
  9013. }
  9014. }
  9015. var _726=this.getViewerWidget();
  9016. if(_726){
  9017. _726.refreshInfoBarRenderedState(_71f);
  9018. }
  9019. }
  9020. };
  9021. CCognosViewer.prototype.collectChildContainers=function(_727){
  9022. var _728=[];
  9023. var _729=this.getRAPReportInfo();
  9024. if(_729){
  9025. var _72a=_729.getContainerCount();
  9026. for(var cidx=0;cidx<_72a;++cidx){
  9027. var _72c=_729.getContainerFromPos(cidx);
  9028. if(typeof _72c.parentContainer!="undefined"&&_72c.parentContainer==_727){
  9029. _728.push(_72c);
  9030. }
  9031. }
  9032. }
  9033. return _728;
  9034. };
  9035. CCognosViewer.prototype.addReportInfo=function(){
  9036. var _72d=this.getViewerWidget();
  9037. if(typeof _72d==="undefined"||_72d===null){
  9038. return;
  9039. }
  9040. if(!_72d.getAttributeValue("originalReport")||this.isIWidgetMobile()){
  9041. return;
  9042. }
  9043. var _72e=this.envParams["baseReportModificationTime"];
  9044. var _72f=_72d.getAttributeValue("baseReportModificationTime");
  9045. if(typeof _72e!=="undefined"&&typeof _72f!=="undefined"&&_72f&&_72f!="<empty>"&&_72e!==_72f){
  9046. var cvid=this.getId();
  9047. var _731=document.getElementById("CVReport"+cvid);
  9048. var _732=_731.parentNode;
  9049. var id="ReportInfo"+cvid;
  9050. var _734=document.createElement("div");
  9051. _734.setAttribute("id",id+"_container");
  9052. _734.setAttribute("cvid",cvid);
  9053. _734.className="new-info-indicator BUXNoPrint";
  9054. var _735=document.createElement("img");
  9055. var img=null;
  9056. if(this.getDirection()==="rtl"){
  9057. img="/rv/images/action_show_info_rtl.png";
  9058. }else{
  9059. img="/rv/images/action_show_info.png";
  9060. }
  9061. _735.src=this.getWebContentRoot()+img;
  9062. _735.className="reportInfoIcon";
  9063. _735.setAttribute("tabIndex","0");
  9064. _735.setAttribute("alt","");
  9065. _735.setAttribute("title","");
  9066. _735.setAttribute("role","presentation");
  9067. var _737=RV_RES.IDS_JS_REPORT_INFO_TITLE;
  9068. var _738=RV_RES.IDS_JS_REPORT_INFO_TEXT;
  9069. var _739=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
  9070. _734.appendChild(_735);
  9071. _732.insertBefore(_734,_731);
  9072. this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_735,position:["above","below"],title:_737,text:_738,linkText:_739,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
  9073. }
  9074. };
  9075. CCognosViewer.prototype.reportInfoResetReport=function(){
  9076. this.executeAction("ResetToOriginal");
  9077. };
  9078. CCognosViewer.prototype.hideReportInfo=function(){
  9079. var _73a=document.getElementById("ReportInfo"+this.getId()+"_container");
  9080. if(typeof _73a!=="undefined"&&_73a!==null){
  9081. _73a.style.visibility="hidden";
  9082. }
  9083. };
  9084. CCognosViewer.prototype.insertSortIcons=function(){
  9085. var _73b=this.envParams?this.envParams.limitedInteractiveMode:true;
  9086. if(typeof _73b==="undefined"||_73b===true){
  9087. return;
  9088. }
  9089. if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
  9090. this.insertSortIconsForAllLists();
  9091. }
  9092. };
  9093. CCognosViewer.prototype._getContainers=function(_73c){
  9094. var _73d=[];
  9095. var _73e="",_73f="";
  9096. if(_73c==="list"){
  9097. _73e="list";
  9098. _73f="ls";
  9099. }else{
  9100. if(_73c==="crosstab"){
  9101. _73e="crosstab";
  9102. _73f="xt";
  9103. }
  9104. }
  9105. var _740=document.getElementById("CVReport"+this.getId());
  9106. if(this.getRAPReportInfo()){
  9107. var _741=this.getRAPReportInfo().getContainerIds(_73e);
  9108. for(var i=0;i<_741.length;++i){
  9109. var _743=getElementsByAttribute(_740,"table","lid",_741[i]+this.getId(),1);
  9110. if(_743&&_743.length>0){
  9111. _73d.push(_743[0]);
  9112. }
  9113. }
  9114. }else{
  9115. _73d=getElementsByClassName(_740,"table",_73f);
  9116. }
  9117. return _73d;
  9118. };
  9119. CCognosViewer.prototype.insertSortIconsForAllLists=function(){
  9120. var _744=this._getContainers("list");
  9121. for(var i=0;i<_744.length;++i){
  9122. this.insertSortIconsToList(_744[i]);
  9123. }
  9124. };
  9125. CCognosViewer.prototype.insertSortIconsToList=function(_746){
  9126. var _747=getElementsByAttribute(_746,"*","type","columnTitle");
  9127. for(var i=0;i<_747.length;++i){
  9128. var _749=_747[i];
  9129. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_749);
  9130. if(_749.getAttribute("canSort")!="false"&&_749.getAttribute("CTNM")===null&&_749.getAttribute("CC")===null){
  9131. var _74a=false;
  9132. for(var _74b=0;_74b<_749.childNodes.length;_74b++){
  9133. var _74c=_749.childNodes[_74b];
  9134. if(_74c.nodeName.toLowerCase()=="img"){
  9135. if(_74c.id&&_74c.id.indexOf("sortimg")===0){
  9136. _74a=true;
  9137. break;
  9138. }
  9139. var sLid=_74c.getAttribute("lid");
  9140. if(sLid&&sLid.indexOf("SortIcon")!==-1){
  9141. _749.removeChild(_74c);
  9142. break;
  9143. }
  9144. }
  9145. }
  9146. if(!_74a&&this.canInsertSortIcon(_749)){
  9147. this.insertSortIconToColumnHeader(_749);
  9148. }
  9149. }
  9150. }
  9151. };
  9152. CCognosViewer.prototype.isDrillBlackListed=function(){
  9153. if(typeof this.m_bDrillBlacklisted=="undefined"){
  9154. this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp");
  9155. }
  9156. return this.m_bDrillBlacklisted;
  9157. };
  9158. CCognosViewer.prototype.isBlacklisted=function(item){
  9159. return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0;
  9160. };
  9161. CCognosViewer.prototype.canInsertSortIcon=function(_74f){
  9162. var _750=_74f.getAttribute("rp_sort");
  9163. return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_750!==undefined&&_750!==null&&_750.length>0));
  9164. };
  9165. CCognosViewer.prototype.insertSortIconToColumnHeader=function(_751){
  9166. if(!_751.style.whiteSpace){
  9167. _751.style.whiteSpace="nowrap";
  9168. }
  9169. var _752=document.createElement("img");
  9170. _752.setAttribute("id","sortimg"+Math.random());
  9171. if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
  9172. _752.onmouseover=function(){
  9173. this.setAttribute("oldClassName",this.className);
  9174. this.className+=" sortIconOver";
  9175. };
  9176. _752.onmouseout=function(){
  9177. this.className=this.getAttribute("oldClassName");
  9178. this.removeAttribute("oldClassName");
  9179. };
  9180. }
  9181. _752.src=this.getImgSrc(_751);
  9182. var _753=this.getSortInfo(_751);
  9183. var _754=this.getSortOrder(_753);
  9184. _752.setAttribute("alt",this.getSortAltText(_754));
  9185. _752.setAttribute("title",this.getSortAltText(_754));
  9186. _752.className=this.getSortClass(_753);
  9187. _752.setAttribute("sortOrder",_754);
  9188. _751.appendChild(_752);
  9189. };
  9190. CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_755,_756){
  9191. var _757=this.getSelectionController();
  9192. var _758=_757.hasCalculationMetadata(_756,[_756],"crosstab");
  9193. return ((_757.canDrillDown(_756)||_755.alwaysCanExpandCollapse)&&!_757.isCalculationOrMeasure(_756,_758));
  9194. };
  9195. CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
  9196. var _759=this._getContainers("crosstab");
  9197. var _75a=this;
  9198. var _75b=this.getRAPReportInfo();
  9199. var _75c=this.getReportContextHelper();
  9200. for(var i=0;i<_759.length;i++){
  9201. var _75e=_759[i];
  9202. var _75f=_75e.getAttribute("lid");
  9203. _75f=_75f.substring(0,_75f.length-this.getId().length);
  9204. var _760=getElementsByAttribute(_75e,["td","th"],"ctnm","true");
  9205. for(var j=0;j<_760.length;j++){
  9206. var _762=_760[j];
  9207. var sCtx=this.findCtx(_762);
  9208. var _764=_75c.getDataItemName(sCtx);
  9209. if(_764){
  9210. var _765=_75b.getItemInfo(_75f,_764);
  9211. var _766=_75c.processCtx(sCtx);
  9212. if(this.canInsertShowExpandCollapseIconForNode(_765,_766[0][0])){
  9213. var sMun=_75c.getMun(sCtx);
  9214. var _768=sMun&&_765.expandedMembers&&_765.expandedMembers[sMun]===true;
  9215. var _769=document.createElement("div");
  9216. _769.setAttribute("skipSelection","true");
  9217. _769.className="expandButton "+(_768?"collapse":"expand");
  9218. _762.insertBefore(_769,_762.firstChild);
  9219. var _76a=document.createElement("span");
  9220. _76a.className="expandButtonCaption";
  9221. _76a.innerHTML=(_768?"[-]":"[+]");
  9222. _769.appendChild(_76a);
  9223. }
  9224. }
  9225. }
  9226. }
  9227. };
  9228. CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
  9229. var _76b=this._getContainers("crosstab");
  9230. for(var i=0;i<_76b.length;i++){
  9231. var _76d=_76b[i];
  9232. var _76e=_76d.getAttribute("lid");
  9233. _76e=_76e.substring(0,_76e.length-this.getId().length);
  9234. var _76f=getElementsByAttribute(_76d,"td","ctnm","true");
  9235. for(var j=0;j<_76f.length;j++){
  9236. var _771=_76f[j];
  9237. if(_771.firstChild.className==="expandButton collapse"||_771.firstChild.className==="expandButton expand"){
  9238. _771.removeChild(_771.firstChild);
  9239. }
  9240. }
  9241. }
  9242. };
  9243. CCognosViewer.prototype.fillInContextData=function(){
  9244. if(!this.isLimitedInteractiveMode()){
  9245. var _772=document.getElementById("CVReport"+this.getId());
  9246. var _773=getElementsByClassName(_772,"table","ls");
  9247. for(var i=0;i<_773.length;++i){
  9248. var _775=getElementsByAttribute(_773[i],"*","type","columnTitle");
  9249. for(var j=0;j<_775.length;++j){
  9250. this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_775[j]);
  9251. }
  9252. }
  9253. }
  9254. };
  9255. CCognosViewer.prototype.getSortAltText=function(_777){
  9256. if(_777==="ascending"){
  9257. return RV_RES.IDS_JS_SORT_ASCENDING;
  9258. }else{
  9259. if(_777==="descending"){
  9260. return RV_RES.IDS_JS_SORT_DESCENDING;
  9261. }else{
  9262. if(_777==="nosort"){
  9263. return RV_RES.IDS_JS_NOT_SORTED;
  9264. }
  9265. }
  9266. }
  9267. };
  9268. CCognosViewer.prototype.getSortInfo=function(_778){
  9269. var _779=_778.getAttribute("rp_sort");
  9270. if(_779){
  9271. _779=_779.split(".");
  9272. }
  9273. return _779;
  9274. };
  9275. CCognosViewer.prototype.getSortClass=function(_77a){
  9276. var _77b="sortIconHidden";
  9277. if(_77a){
  9278. if(_77a[0]==="d"||_77a[0]==="a"){
  9279. _77b="sortIconVisible";
  9280. }
  9281. }
  9282. return _77b;
  9283. };
  9284. CCognosViewer.prototype.getSortOrder=function(_77c){
  9285. var _77d="nosort";
  9286. if(_77c){
  9287. if(_77c[0]==="d"){
  9288. _77d="descending";
  9289. }else{
  9290. if(_77c[0]==="a"){
  9291. _77d="ascending";
  9292. }
  9293. }
  9294. }
  9295. return _77d;
  9296. };
  9297. CCognosViewer.prototype.getImgSrc=function(_77e){
  9298. var _77f=_77e.getAttribute("rp_sort");
  9299. var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_77f);
  9300. return src;
  9301. };
  9302. CCognosViewer.prototype.getSortIconName=function(_781){
  9303. var _782="sort_no.gif";
  9304. if(_781){
  9305. _781=_781.split(".");
  9306. if(_781[0]==="d"){
  9307. _782="sort_descending.gif";
  9308. }else{
  9309. if(_781[0]==="a"){
  9310. _782="sort_ascending.gif";
  9311. }
  9312. }
  9313. }
  9314. return _782;
  9315. };
  9316. CCognosViewer.prototype.shouldWriteNavLinks=function(){
  9317. if(this.envParams["cv.navlinks"]=="false"){
  9318. return false;
  9319. }else{
  9320. if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){
  9321. if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){
  9322. return true;
  9323. }
  9324. }
  9325. }
  9326. return false;
  9327. };
  9328. CCognosViewer.prototype.isActiveReport=function(){
  9329. if(this.envParams["cv.responseFormat"]==="activeReport"){
  9330. return true;
  9331. }
  9332. return false;
  9333. };
  9334. CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){
  9335. this.m_raiseSharePromptEvent=true;
  9336. };
  9337. CCognosViewer.prototype.resetbHasPromptFlag=function(){
  9338. this.m_bHasPrompt=null;
  9339. };
  9340. CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){
  9341. this.m_raiseSharePromptEvent=false;
  9342. };
  9343. CCognosViewer.prototype.widgetHasPromptParameters=function(){
  9344. var _783=this.getViewerWidget();
  9345. return (_783&&_783.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
  9346. };
  9347. CCognosViewer.prototype.getPromptParametersInfo=function(){
  9348. var _784=null;
  9349. if(this.widgetHasPromptParameters()){
  9350. _784="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
  9351. }
  9352. return _784;
  9353. };
  9354. CCognosViewer.prototype.raisePromptEvent=function(_785,_786,_787){
  9355. try{
  9356. var _788=this.getViewerWidget();
  9357. _788.getWidgetContextManager().raisePromptEvent(_785,_786,_786.get("ui.action"),this.getModelPath(),_787);
  9358. }
  9359. catch(e){
  9360. }
  9361. };
  9362. CCognosViewer.prototype.getModelPath=function(){
  9363. var _789=this.getSelectionController().getModelPathForCurrentSelection();
  9364. if(_789){
  9365. return _789;
  9366. }else{
  9367. if(this.envParams.modelPath){
  9368. return this.envParams.modelPath;
  9369. }else{
  9370. if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){
  9371. return document.forms["formWarpRequest"+this.getId()].modelPath.value;
  9372. }
  9373. }
  9374. }
  9375. return "";
  9376. };
  9377. CCognosViewer.prototype.setKeepFocus=function(_78a){
  9378. this._keepFocus=_78a;
  9379. };
  9380. CCognosViewer.prototype.getKeepFocus=function(){
  9381. if(typeof this._keepFocus!="undefined"){
  9382. return this._keepFocus;
  9383. }
  9384. return false;
  9385. };
  9386. CCognosViewer.prototype.onFocus=function(evt){
  9387. var _78c=this.getA11YHelper();
  9388. if(_78c){
  9389. _78c.onFocus(evt);
  9390. }
  9391. };
  9392. CCognosViewer.prototype.getA11YHelper=function(){
  9393. if(!this.a11yHelper){
  9394. this.loadExtra();
  9395. if(typeof ViewerA11YHelper=="function"){
  9396. this.a11yHelper=new ViewerA11YHelper(this);
  9397. }else{
  9398. if(typeof console!=="undefined"&&console.log){
  9399. console.log("CCognosViewer: Could not create ViewerA11YHelper object.");
  9400. }
  9401. return null;
  9402. }
  9403. }
  9404. return this.a11yHelper;
  9405. };
  9406. CCognosViewer.prototype.onKeyDown=function(evt){
  9407. if(this.getA11YHelper()){
  9408. this.getA11YHelper().onKeyDown(evt);
  9409. }
  9410. };
  9411. CCognosViewer.prototype.updateSkipToReportLink=function(){
  9412. var _78e=this.getStatus();
  9413. var _78f=document.getElementById("cvSkipToReport"+this.getId());
  9414. if(_78f){
  9415. _78f.style.display=_78e=="prompting"?"none":"";
  9416. }
  9417. };
  9418. CCognosViewer.prototype.updateSkipToNavigationLink=function(_790){
  9419. var _791=document.getElementById("cvSkipToNavigation"+this.getId());
  9420. if(_791){
  9421. _791.style.display=_790?"none":"";
  9422. }
  9423. };
  9424. CCognosViewer.prototype.pageAction=function(_792){
  9425. this.setKeepFocus("CVNavLinks"+this.getId());
  9426. var _793=new ViewerDispatcherEntry(this);
  9427. _793.addFormField("ui.action",_792);
  9428. if(this.getCurrentlySelectedTab()){
  9429. _793.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
  9430. }
  9431. this.dispatchRequest(_793);
  9432. };
  9433. CCognosViewer.prototype.writeNavLink=function(_794,_795,_796,_797){
  9434. var _798="";
  9435. if(_796){
  9436. _798="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
  9437. if(_797){
  9438. _798+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
  9439. }else{
  9440. _798+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
  9441. }
  9442. _798+=">LINK_TEXT</a>&#160;"+"</td>";
  9443. }else{
  9444. _798="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">LINK_TEXT&#160;</td>";
  9445. }
  9446. var sImg=this.sSkin+(!_796&&_794.sImgDisabled?_794.sImgDisabled:_794.sImg);
  9447. return _798.replace(/LINK_REQUEST/g,_795).replace(/LINK_TEXT/g,_794.sText).replace(/LINK_IMG/g,sImg);
  9448. };
  9449. CCognosViewer.prototype.loadNavLinks=function(){
  9450. var _79a=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
  9451. if(_79a){
  9452. this.init(eval("("+_79a+")"));
  9453. }
  9454. };
  9455. CCognosViewer.prototype.writeNavLinks=function(sSR,_79c){
  9456. var _79d=document.getElementById("CVNavLinks"+this.getId());
  9457. if(_79d){
  9458. var _79e=document.getElementById("CVNavLinks_Container"+this.getId());
  9459. if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){
  9460. _79d.style.display="none";
  9461. if(_79e){
  9462. _79e.style.display="none";
  9463. }
  9464. this.updateSkipToNavigationLink(true);
  9465. return;
  9466. }
  9467. this.updateSkipToNavigationLink(false);
  9468. if(_79e){
  9469. _79e.style.display="";
  9470. }
  9471. _79d.style.display=(isIE()?"block":"table-cell");
  9472. var _79f="";
  9473. _79f+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
  9474. _79f+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_79c);
  9475. _79f+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_79c);
  9476. _79f+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_79c);
  9477. _79f+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_79c);
  9478. _79f+="</tr></tbody></table>";
  9479. var _7a0=document.getElementById("CVNavLinks_label"+this.getId());
  9480. var _7a1="";
  9481. if(_7a0){
  9482. _7a1+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_7a0.innerHTML+"</span>";
  9483. }
  9484. _79d.innerHTML=_7a1+_79f;
  9485. }else{
  9486. if(this.shouldWriteNavLinks()){
  9487. setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_79c+"\");",100);
  9488. }
  9489. }
  9490. };
  9491. function CVBackgroundLayer_ignoreMouseClick(e){
  9492. if(e.returnValue){
  9493. e.returnValue=false;
  9494. }else{
  9495. if(e.preventDefault){
  9496. e.preventDefault();
  9497. }else{
  9498. return false;
  9499. }
  9500. }
  9501. };
  9502. CCognosViewer.prototype.createTransparentBackgroundLayer=function(){
  9503. this.removeTransparentBackgroundLayer();
  9504. var oBL=document.createElement("div");
  9505. oBL.id=CV_BACKGROUND_LAYER_ID;
  9506. oBL.style.display="none";
  9507. oBL.style.position="absolute";
  9508. oBL.setAttribute("role","region");
  9509. oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT);
  9510. oBL.style.top="0px";
  9511. oBL.style.left="0px";
  9512. oBL.style.zIndex=98;
  9513. oBL.style.width="100%";
  9514. oBL.style.height="100%";
  9515. oBL.style.backgroundColor="rgb(238, 238, 238)";
  9516. oBL.style.opacity="0";
  9517. oBL.style.filter="alpha(opacity:0)";
  9518. oBL.innerHTML="<table tabindex=\"1\" width=\"100%\" height=\"100%\"><tr><td role=\"presentation\" onclick=\"CVBackgroundLayer_ignoreMouseClick(event)\"></td></tr></table>";
  9519. oBL.style.display="inline";
  9520. document.body.appendChild(oBL);
  9521. };
  9522. CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){
  9523. var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID);
  9524. if(oBL){
  9525. oBL.parentNode.removeChild(oBL);
  9526. }
  9527. };
  9528. CCognosViewer.prototype.closeActiveHTTPConnection=function(){
  9529. var _7a5=this.getActiveRequest();
  9530. if(_7a5){
  9531. _7a5.abortHttpRequest();
  9532. }
  9533. };
  9534. CCognosViewer.prototype.canCancel=function(){
  9535. var _7a6=this.getTracking();
  9536. var _7a7=this.getStatus();
  9537. return _7a6!=""&&_7a7!="complete";
  9538. };
  9539. CCognosViewer.prototype.cancel=function(_7a8){
  9540. if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
  9541. this.getWorkingDialog().disableCancelButton(_7a8);
  9542. }
  9543. this.removeTransparentBackgroundLayer();
  9544. this.clearPrompts();
  9545. if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
  9546. this.envParams["fragment.fireEventWhenComplete"]="";
  9547. }
  9548. var _7a9=null;
  9549. if(this.m_undoStack.length>0){
  9550. _7a9=this.m_undoStack.pop();
  9551. }
  9552. var _7aa=this.getActiveRequest();
  9553. if(this.canCancel()===true||_7aa){
  9554. if(_7aa){
  9555. _7aa.cancelRequest(true);
  9556. }else{
  9557. var _7ab=null;
  9558. var _7ac=_7a9!=null&&_7a9.m_bRefreshPage;
  9559. if(typeof this.getCancelDispatcherEntry=="function"){
  9560. _7ab=this.getCancelDispatcherEntry();
  9561. }else{
  9562. if(_7ac||this.m_viewerFragment){
  9563. _7ab=new ViewerDispatcherEntry(this);
  9564. }else{
  9565. if(this.getId()=="RS"){
  9566. _7ab=new ViewerDispatcherEntry(this);
  9567. _7ab.addFormField("cv.responseFormat","rs");
  9568. }else{
  9569. _7ab=new DispatcherEntry(this);
  9570. _7ab.addFormField("cv.responseFormat","successfulRequest");
  9571. }
  9572. }
  9573. }
  9574. _7ab.forceSynchronous();
  9575. _7ab.addFormField("ui.action","cancel");
  9576. _7ab.addFormField("m_tracking",this.getTracking());
  9577. this.setTracking("");
  9578. if(_7ac){
  9579. var _7ad="<CognosViewerUndo><conversation>";
  9580. _7ad+=_7a9.m_sConversation;
  9581. _7ad+="</conversation></CognosViewerUndo>";
  9582. _7ab.addFormField("cv.previousSession",_7ad);
  9583. }
  9584. this.dispatchRequest(_7ab);
  9585. if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
  9586. this.executeCallback("cancel");
  9587. }
  9588. }
  9589. this.setStatus("complete");
  9590. var _7ae=this.envParams["ui.action"];
  9591. var _7af=this.getUsePageRequest();
  9592. var _7b0=this.m_undoStack.length;
  9593. if(_7a9!=null){
  9594. this.m_sConversation=_7a9.m_sConversation;
  9595. this.m_sParameters=_7a9.m_sParameters;
  9596. this.envParams={};
  9597. applyJSONProperties(this.envParams,_7a9.m_envParams);
  9598. this.m_undoStack.push(_7a9);
  9599. }
  9600. this.setTracking("");
  9601. if(this.previouslySelectedTab){
  9602. this.cancelTabSwitch();
  9603. }else{
  9604. if(_7ae!="view"&&_7b0<=0&&this.rvMainWnd){
  9605. this.rvMainWnd.executePreviousReport(-1);
  9606. }
  9607. }
  9608. return true;
  9609. }else{
  9610. if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){
  9611. this.rvMainWnd.executePreviousReport(-1);
  9612. return true;
  9613. }else{
  9614. if(!this.isBux){
  9615. executeBackURL(this.getId());
  9616. }
  9617. return true;
  9618. }
  9619. }
  9620. return false;
  9621. };
  9622. CCognosViewer.prototype.clearPrompts=function(){
  9623. if(this.preProcessControlArray){
  9624. var _7b1=this.preProcessControlArray.length;
  9625. var k=0;
  9626. for(k=0;k<_7b1;k++){
  9627. var _7b3=eval(this.preProcessControlArray[k]);
  9628. if(_7b3){
  9629. if(_7b3.clearSubmit){
  9630. _7b3.clearSubmit();
  9631. }
  9632. }
  9633. }
  9634. }
  9635. };
  9636. CCognosViewer.prototype.wait=function(){
  9637. if(this.isWorking()){
  9638. this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
  9639. var _7b4=new ViewerDispatcherEntry(this);
  9640. _7b4.addFormField("ui.action","wait");
  9641. _7b4.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  9642. _7b4.addFormField("cv.actionState",this.envParams["cv.actionState"]);
  9643. _7b4.addNonEmptyStringFormField("bux",this.envParams["bux"]);
  9644. _7b4.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
  9645. this.dispatchRequest(_7b4);
  9646. return true;
  9647. }
  9648. return false;
  9649. };
  9650. CCognosViewer.prototype.setCAFContext=function(_7b5){
  9651. this.m_sCAFContext=_7b5;
  9652. };
  9653. CCognosViewer.prototype.setContextInfo=function(sXML){
  9654. this.m_sContextInfoXML=sXML;
  9655. };
  9656. CCognosViewer.prototype.setConversation=function(_7b7){
  9657. this.m_sConversation=_7b7;
  9658. };
  9659. CCognosViewer.prototype.setActionState=function(_7b8){
  9660. this.m_sActionState=_7b8;
  9661. };
  9662. CCognosViewer.prototype.setStatus=function(_7b9){
  9663. this.m_sStatus=_7b9;
  9664. };
  9665. CCognosViewer.prototype.setDebug=function(_7ba){
  9666. this.m_bDebug=_7ba;
  9667. };
  9668. CCognosViewer.prototype.setExecutionParameters=function(_7bb){
  9669. this.m_sParameters=_7bb;
  9670. };
  9671. CCognosViewer.prototype.setMetadataInfo=function(sXML){
  9672. this.m_sMetadataInfoXML=sXML;
  9673. };
  9674. CCognosViewer.prototype.setSecondaryRequests=function(_7bd){
  9675. if(_7bd){
  9676. this.m_aSecRequests=_7bd;
  9677. }else{
  9678. this.m_aSecRequests=[];
  9679. }
  9680. };
  9681. CCognosViewer.prototype.setTracking=function(_7be){
  9682. this.m_sTracking=_7be;
  9683. };
  9684. CCognosViewer.prototype.setSoapFault=function(_7bf){
  9685. this.m_sSoapFault=_7bf;
  9686. };
  9687. CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
  9688. var _7c1=document.getElementById("formWarpRequest"+this.getId());
  9689. var _7c2=_7c1.elements["ui.postBack"];
  9690. var _7c3=_7c1.elements["ui.backURL"];
  9691. if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
  9692. window.detachLeavingRV();
  9693. }
  9694. if(window.opener||_7c2||(_7c3&&_7c3.value!=="javascript:window.close();")){
  9695. window.open(sURL,"","");
  9696. this.updateNewBrowserWindow();
  9697. }else{
  9698. window.location=sURL;
  9699. }
  9700. };
  9701. CCognosViewer.prototype.hideToolbar=function(_7c4){
  9702. this.m_bHideToolbar=_7c4;
  9703. };
  9704. CCognosViewer.prototype.showExcel=function(sURL){
  9705. var _7c6=true;
  9706. var _7c7=document.getElementById("formWarpRequest"+this.getId());
  9707. var _7c8=_7c7.elements["ui.backURL"];
  9708. if(_7c8&&_7c8.value.indexOf("javascript:window.close()")!==0&&_7c8.value.indexOf("close.html")===-1){
  9709. _7c6=false;
  9710. }
  9711. if(window.detachLeavingRV){
  9712. window.detachLeavingRV();
  9713. }
  9714. var _7c9=window;
  9715. if(window.opener&&(isIE()||isFF())&&_7c6){
  9716. _7c9=window.opener?window.opener:window;
  9717. }else{
  9718. if(!window.opener&&_7c6){
  9719. window.location=sURL;
  9720. return;
  9721. }
  9722. }
  9723. var _7ca=null;
  9724. var _7cb="";
  9725. try{
  9726. if(this.envParams["cv.excelWindowOpenProperties"]){
  9727. _7cb=this.envParams["cv.excelWindowOpenProperties"];
  9728. }
  9729. _7ca=_7c9.open(sURL,"",_7cb);
  9730. }
  9731. catch(e){
  9732. _7c9=window;
  9733. _7ca=_7c9.open(sURL,"",_7cb);
  9734. }
  9735. if(!_7ca||_7ca.closed||typeof _7ca.closed=="undefined"){
  9736. alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
  9737. }
  9738. this.updateNewBrowserWindow();
  9739. };
  9740. CCognosViewer.prototype.updateNewBrowserWindow=function(){
  9741. var id=this.getId();
  9742. var _7cd=document.forms["formWarpRequest"+id].elements["ui.postBack"];
  9743. var _7ce=document.forms["formWarpRequest"+id].elements["ui.backURL"];
  9744. if(_7cd&&_7cd.value){
  9745. setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
  9746. }else{
  9747. if(_7ce&&_7ce.value){
  9748. if(_7ce.value.length<2048){
  9749. setTimeout("location.replace(\""+_7ce.value+"\");",100);
  9750. }else{
  9751. _7ce=decodeURIComponent(_7ce.value);
  9752. var _7cf=_7ce.split("?");
  9753. var _7d0=document.createElement("form");
  9754. _7d0.style.display="none";
  9755. _7d0.setAttribute("target","_self");
  9756. _7d0.setAttribute("method","post");
  9757. _7d0.setAttribute("action",_7cf[0]);
  9758. var _7d1=_7cf[1].split("&");
  9759. for(var _7d2=0;_7d2<_7d1.length;_7d2++){
  9760. var _7d3=_7d1[_7d2].indexOf("=");
  9761. var _7d4=_7d1[_7d2].substr(0,_7d3);
  9762. var _7d5=_7d1[_7d2].substr(_7d3+1);
  9763. var _7d6=document.createElement("img");
  9764. _7d6.setAttribute("type","hidden");
  9765. _7d6.setAttribute("name",decodeURIComponent(_7d4));
  9766. _7d6.setAttribute("value",decodeURIComponent(_7d5));
  9767. _7d0.appendChild(_7d6);
  9768. }
  9769. document.body.appendChild(_7d0);
  9770. _7d0.submit();
  9771. }
  9772. }else{
  9773. window.close();
  9774. }
  9775. }
  9776. };
  9777. CCognosViewer.prototype.showWaitPage=function(){
  9778. };
  9779. CCognosViewer.prototype.sendRequest=function(_7d7){
  9780. var _7d8=new ViewerDispatcherEntry(this);
  9781. _7d8.addFormField("ui.action",_7d7.getAction());
  9782. if(_7d7.getCallback()!=null){
  9783. _7d8.setCallbacks({"complete":{"object":null,"method":_7d7.getCallback()}});
  9784. }
  9785. var _7d9=_7d7.getFormFields().keys();
  9786. for(var _7da=0;_7da<_7d9.length;_7da++){
  9787. _7d8.addFormField(_7d9[_7da],_7d7.getFormFields().get(_7d9[_7da]));
  9788. }
  9789. var _7db=_7d7.m_oOptions.keys();
  9790. for(var _7dc=0;_7dc<_7db.length;_7dc++){
  9791. _7d8.addFormField(_7db[_7dc],_7d7.getOption(_7db[_7dc]));
  9792. }
  9793. var _7dd=_7d7.m_oParams.keys();
  9794. for(var _7de=0;_7de<_7dd.length;_7de++){
  9795. _7d8.addFormField(_7dd[_7de],_7d7.getParameter(_7dd[_7de]));
  9796. }
  9797. this.dispatchRequest(_7d8);
  9798. };
  9799. CCognosViewer.prototype.promptAction=function(_7df,sUrl){
  9800. this.setKeepFocus(true);
  9801. if(typeof datePickerObserverNotify=="function"){
  9802. datePickerObserverNotify();
  9803. }
  9804. var _7e1=this.getViewerWidget();
  9805. if(_7df=="cancel"){
  9806. this.cancelPrompt(sUrl);
  9807. if(_7e1){
  9808. if(!this.isReportRenderingDone()){
  9809. var _7e2={action:"deleteWidget"};
  9810. _7e1.fireEvent("com.ibm.bux.widget.action",null,_7e2);
  9811. }
  9812. }
  9813. }else{
  9814. var oReq=new ViewerDispatcherEntry(this);
  9815. oReq.addFormField("ui.action",_7df=="back"?"back":"forward");
  9816. if(_7df=="finish"){
  9817. oReq.addFormField("run.prompt",false);
  9818. }else{
  9819. if(_7df=="back"||_7df=="next"){
  9820. oReq.addFormField("run.prompt",true);
  9821. }
  9822. }
  9823. if(_7df=="reprompt"){
  9824. if(typeof repromptObserverNotify=="function"){
  9825. repromptObserverNotify(this);
  9826. }
  9827. oReq.addFormField("_promptControl",_7df);
  9828. }else{
  9829. oReq.addFormField("_promptControl","prompt");
  9830. }
  9831. if(_7e1){
  9832. _7e1.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
  9833. if(_7e1.isSelectionFilterEnabled){
  9834. _7e1.clearSelectionFilter();
  9835. }
  9836. }
  9837. this.submitPromptValues(oReq);
  9838. }
  9839. };
  9840. CCognosViewer.prototype.cancelPrompt=function(sUrl){
  9841. this.cancel();
  9842. };
  9843. CCognosViewer.prototype.notify=function(_7e5,_7e6){
  9844. var _7e7=0,k=0;
  9845. var _7e9=null;
  9846. if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
  9847. _7e7=this.rangeObserverArray.length;
  9848. for(k=0;k<_7e7;k++){
  9849. _7e9=eval(this.rangeObserverArray[k]);
  9850. if(_7e9&&typeof _7e9=="object"&&typeof _7e9.update=="function"){
  9851. _7e9.update();
  9852. }
  9853. }
  9854. }
  9855. var _7ea=true;
  9856. if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
  9857. _7e7=this.preProcessControlArray.length;
  9858. for(k=0;k<_7e7;k++){
  9859. _7e9=eval(this.preProcessControlArray[k]);
  9860. if((typeof _7e9.getValid=="function")&&!_7e9.getValid()){
  9861. _7ea=false;
  9862. break;
  9863. }
  9864. }
  9865. }
  9866. this.notifyPageNavEnabled(_7ea);
  9867. if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
  9868. _7e7=this.multipleObserverArray.length;
  9869. for(k=0;k<_7e7;k++){
  9870. _7e9=eval(this.multipleObserverArray[k]);
  9871. if(_7e9&&typeof _7e9=="object"&&typeof _7e9.checkInsertRemove=="function"){
  9872. _7e9.checkInsertRemove();
  9873. }
  9874. }
  9875. }
  9876. for(var _7eb=0;_7eb<gaNotifyTargets.length;_7eb++){
  9877. var _7ec=gaNotifyTargets[_7eb];
  9878. if(typeof _7ec!="undefined"&&typeof _7ec.notify=="function"){
  9879. _7ec.notify(_7e5,_7e6);
  9880. }
  9881. }
  9882. };
  9883. CCognosViewer.prototype.notifyPageNavEnabled=function(_7ed){
  9884. if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
  9885. var _7ee=this.pageNavigationObserverArray.length;
  9886. var _7ef=false;
  9887. var _7f0=null;
  9888. var _7f1=null;
  9889. var k=0;
  9890. for(k=0;k<_7ee;k++){
  9891. try{
  9892. _7f0=eval(this.pageNavigationObserverArray[k]);
  9893. _7f1=_7f0.getType();
  9894. if(_7f1==PROMPTBUTTON_FINISH){
  9895. _7ef=true;
  9896. break;
  9897. }
  9898. }
  9899. catch(e){
  9900. }
  9901. }
  9902. for(k=0;k<_7ee;k++){
  9903. try{
  9904. _7f0=eval(this.pageNavigationObserverArray[k]);
  9905. _7f1=_7f0.getType();
  9906. if(!_7ed){
  9907. if((_7f1==PROMPTBUTTON_NEXT)||(_7f1==PROMPTBUTTON_OK)||(_7f1==PROMPTBUTTON_FINISH)){
  9908. _7f0.setEnabled(false);
  9909. }
  9910. }else{
  9911. if(_7f1==PROMPTBUTTON_FINISH){
  9912. _7f0.setEnabled(this.bCanFinish);
  9913. }else{
  9914. if(_7f1==PROMPTBUTTON_NEXT){
  9915. _7f0.setEnabled(this.bNextPage||!_7ef);
  9916. }else{
  9917. if(_7f1==PROMPTBUTTON_OK){
  9918. _7f0.setEnabled(true);
  9919. }
  9920. }
  9921. }
  9922. }
  9923. }
  9924. catch(e2){
  9925. }
  9926. }
  9927. }
  9928. };
  9929. CCognosViewer.prototype.getDrillResetHUNs=function(_7f3){
  9930. var _7f4=null;
  9931. if(this.getRAPReportInfo()){
  9932. _7f4=this.getRAPReportInfo().getDrilledOnHUNs();
  9933. }
  9934. if(!_7f4){
  9935. return null;
  9936. }
  9937. var _7f5=this.getExecutionParameters();
  9938. if(!_7f5){
  9939. return null;
  9940. }
  9941. var _7f6=this._getListOfChangedPromptParameters(_7f3);
  9942. if(!_7f6||_7f6.length===0){
  9943. return null;
  9944. }
  9945. var _7f7=[];
  9946. for(var i=0;i<_7f4.length;i++){
  9947. for(var j=0;j<_7f6.length;j++){
  9948. if(_7f6[j].indexOf(_7f4[i])!==-1){
  9949. _7f7.push(_7f4[i]);
  9950. }
  9951. }
  9952. }
  9953. return _7f7;
  9954. };
  9955. CCognosViewer.prototype.getOldParameters=function(){
  9956. var _7fa=new CParameterValues();
  9957. var _7fb=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  9958. if(_7fb.childNodes.length==1){
  9959. _7fa.loadWithOptions(_7fb.childNodes[0],false);
  9960. }
  9961. if(!_7fa||!_7fa.m_parameterValues||!_7fa.m_parameterValues.m_aValues){
  9962. return null;
  9963. }
  9964. return _7fa.m_parameterValues.m_aValues;
  9965. };
  9966. CCognosViewer.prototype._createDummyRequest=function(){
  9967. var _7fc=new ViewerDispatcherEntry(this);
  9968. return this.preparePromptValues(_7fc);
  9969. };
  9970. CCognosViewer.prototype._getChangedPromptParametersValues=function(_7fd,_7fe,_7ff){
  9971. var _800=XMLBuilderLoadXMLFromString(_7fe);
  9972. if(!_800){
  9973. for(var j=0;j<_7fd.length;j++){
  9974. var _802=_7fd[j].m_useValue;
  9975. if(_7fe.indexOf(sXmlEncode(_802))<0){
  9976. _7ff.push(_802);
  9977. }
  9978. }
  9979. return;
  9980. }
  9981. var _803=_800.getElementsByTagName("selectOption");
  9982. if(!_803){
  9983. return;
  9984. }
  9985. var _804=_7fd.length;
  9986. var _805=_803.length;
  9987. for(var i=0;i<_805;i++){
  9988. var _7fe=_803[i].attributes.getNamedItem("useValue").nodeValue;
  9989. bMatchOldParam=false;
  9990. for(var j=0;j<_804;j++){
  9991. var _802=_7fd[j].m_useValue;
  9992. if(_7fe.indexOf(_802)===0){
  9993. bMatchOldParam=true;
  9994. break;
  9995. }
  9996. }
  9997. if(!bMatchOldParam){
  9998. _7ff.push(_7fe);
  9999. }
  10000. }
  10001. };
  10002. CCognosViewer.prototype._getListOfChangedPromptParameters=function(_807){
  10003. var _808=this.getOldParameters();
  10004. if(!_808){
  10005. return null;
  10006. }
  10007. var _809=[];
  10008. if(!_807){
  10009. var _80a=this._createDummyRequest();
  10010. for(var _80b in _808){
  10011. var _80c=_808[_80b].m_parmValueItems;
  10012. var _80d=_80a.getRequest().getFormFields().get("p_"+_80b);
  10013. if(!_80d){
  10014. continue;
  10015. }
  10016. this._getChangedPromptParametersValues(_80c,_80d,_809);
  10017. }
  10018. }else{
  10019. if(!_807.parameters){
  10020. return null;
  10021. }
  10022. var _80e=_807.parameters;
  10023. for(var i=0;i<_80e.length;i++){
  10024. var _810=_80e[i].parmName;
  10025. if(!_810||!_808[_810]){
  10026. continue;
  10027. }
  10028. var _80c=_808[_810].m_parmValueItems;
  10029. if(!_80c||_80c.length==0){
  10030. continue;
  10031. }
  10032. this._getChangedPromptParametersValues(_80c,_80e[i].parmValue,_809);
  10033. }
  10034. }
  10035. return _809;
  10036. };
  10037. CCognosViewer.prototype.submitPromptValues=function(oReq){
  10038. if(this.gbPromptRequestSubmitted===true){
  10039. return false;
  10040. }
  10041. this.gbPromptRequestSubmitted=true;
  10042. if(this.isBux){
  10043. var _812=this.getDrillResetHUNs(null);
  10044. if(_812&&_812.length!==0){
  10045. var _813={"drilledResetHUNs":_812};
  10046. this.executeAction("DrillReset",_813);
  10047. return;
  10048. }
  10049. }
  10050. oReq=this.preparePromptValues(oReq);
  10051. if(window.portletSharePrompt){
  10052. var _814=this.portletPromptParams(oReq);
  10053. if(_814.length>0){
  10054. portletSharePrompt(_814);
  10055. }
  10056. }
  10057. this.dispatchRequest(oReq);
  10058. };
  10059. CCognosViewer.prototype.portletPromptParams=function(oReq){
  10060. var _816=[];
  10061. var _817=null;
  10062. var _818=true;
  10063. var _819=oReq.getFormFields().keys();
  10064. for(var _81a=0;_81a<_819.length;_81a++){
  10065. _817=_819[_81a];
  10066. if(_817=="_promptControl"&&oReq.getFormField(_817)=="search"){
  10067. _818=false;
  10068. break;
  10069. }else{
  10070. if(_817.indexOf("p_")===0){
  10071. if(_817.indexOf("p_credential")===0){
  10072. _818=false;
  10073. break;
  10074. }else{
  10075. _816.push([_817,oReq.getFormField(_817)]);
  10076. }
  10077. }
  10078. }
  10079. }
  10080. if(_816&&!_818){
  10081. _816=[];
  10082. }
  10083. return _816;
  10084. };
  10085. CCognosViewer.prototype.preparePromptValues=function(oReq){
  10086. var _81c=[];
  10087. if(this.preProcessControlArray){
  10088. var _81d=this.preProcessControlArray.length;
  10089. var k=0;
  10090. for(k=0;k<_81d;k++){
  10091. var _81f=eval(this.preProcessControlArray[k]);
  10092. var _820=(typeof _81f.isEnabled=="function"?_81f.isEnabled():true);
  10093. if(_81f&&typeof _81f.preProcess=="function"&&_820){
  10094. _81f.preProcess();
  10095. if(_81f.m_oSubmit){
  10096. if(oReq.addParameter){
  10097. oReq.addParameter(_81f.m_oSubmit.name,_81f.m_oSubmit.value);
  10098. }else{
  10099. oReq.addFormField(_81f.m_oSubmit.name,_81f.m_oSubmit.value);
  10100. }
  10101. _81c.push(_81f.m_oSubmit);
  10102. if(_81f.m_sPromptId&&_81f.m_oForm&&_81f.m_oForm.elements&&typeof _81f.m_oForm.elements["p_"+_81f.m_sRef]=="object"){
  10103. if(oReq.addParameter){
  10104. oReq.addParameter("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value);
  10105. }else{
  10106. oReq.addFormField("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value);
  10107. }
  10108. }
  10109. }
  10110. }
  10111. }
  10112. }
  10113. var _821=document.getElementById("formWarpRequest"+this.getId());
  10114. if(_821){
  10115. var _822=_821.elements;
  10116. for(var _823=0;_823<_822.length;_823++){
  10117. var _824=_822[_823];
  10118. if(!_824.name||!_824.name.match(/^p_/)){
  10119. continue;
  10120. }
  10121. var _825=true;
  10122. for(var _826=0;_826<_81c.length;_826++){
  10123. if(_81c[_826]==_824){
  10124. _825=false;
  10125. break;
  10126. }
  10127. }
  10128. if(_825){
  10129. oReq.addFormField(_824.name,_824.value);
  10130. _81c.push(_824);
  10131. }
  10132. }
  10133. }
  10134. var oRM=this["CognosReport"];
  10135. if(oRM){
  10136. var _828=oRM.prompt.getParameters();
  10137. for(var i=0;i<_828.length;i++){
  10138. var _82a="p_"+_828[i].getName();
  10139. if(!oReq.getFormField(_82a)){
  10140. oReq.addFormField(_82a,_828[i].getXML());
  10141. }
  10142. }
  10143. }
  10144. return oReq;
  10145. };
  10146. CCognosViewer.prototype.setViewerWidget=function(_82b){
  10147. this.m_viewerWidget=_82b;
  10148. };
  10149. CCognosViewer.prototype.getViewerWidget=function(){
  10150. return this.m_viewerWidget;
  10151. };
  10152. CCognosViewer.prototype.getFlashChartOption=function(){
  10153. var _82c=this.getViewerWidget();
  10154. var _82d=null;
  10155. if(_82c){
  10156. var _82e=_82c.getProperties();
  10157. if(_82e){
  10158. _82d=_82e.getFlashCharts();
  10159. }
  10160. }
  10161. return _82d;
  10162. };
  10163. CCognosViewer.prototype.fireWidgetEvent=function(evt,_830){
  10164. var _831=this.getViewerWidget();
  10165. if(_831!=null){
  10166. _831.fireEvent(evt,null,_830);
  10167. }
  10168. };
  10169. CCognosViewer.prototype.isMobile=function(){
  10170. return false;
  10171. };
  10172. CCognosViewer.prototype.setVisibleDialog=function(_832){
  10173. this.m_visibleDialog=_832;
  10174. };
  10175. CCognosViewer.prototype.getVisibleDialog=function(){
  10176. if(typeof this.m_visibleDialog!="undefined"){
  10177. return this.m_visibleDialog;
  10178. }
  10179. return null;
  10180. };
  10181. CCognosViewer.prototype.getContentLocale=function(){
  10182. var _833=document.getElementById("formWarpRequest"+this.getId());
  10183. if(_833&&_833["ui.contentLocale"]&&_833["reRunObj"]&&_833["reRunObj"].value.length>0){
  10184. return _833["ui.contentLocale"].value;
  10185. }
  10186. return null;
  10187. };
  10188. CCognosViewer.prototype.updateLayout=function(_834){
  10189. var cvid=this.getId();
  10190. var _836=document.getElementById("CVHeader"+cvid);
  10191. var _837=document.getElementById("CVToolbar"+cvid);
  10192. if(!_836&&!_837){
  10193. setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_834+"\");",100);
  10194. return;
  10195. }
  10196. if(_836){
  10197. var _838=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
  10198. if((_834=="prompting"&&!this.bShowHeaderWithPrompts)||_838){
  10199. _836.parentNode.style.display="none";
  10200. }else{
  10201. _836.parentNode.style.display="";
  10202. }
  10203. }
  10204. if(_837){
  10205. if(_834=="prompting"||this.m_bHideToolbar==true){
  10206. _837.parentNode.style.display="none";
  10207. }else{
  10208. _837.parentNode.style.display="";
  10209. }
  10210. }
  10211. };
  10212. CCognosViewer.prototype.updateResponseSpecification=function(_839){
  10213. this.sResponseSpecification=_839;
  10214. };
  10215. CCognosViewer.prototype.getResponseSpecification=function(){
  10216. return this.sResponseSpecification;
  10217. };
  10218. CCognosViewer.prototype.release=function(_83a){
  10219. if(this.getStatus()!="fault"){
  10220. this._release(_83a);
  10221. }
  10222. };
  10223. CCognosViewer.prototype._release=function(_83b){
  10224. var form=document.getElementById("formWarpRequest"+this.getId());
  10225. var _83d=this.getTracking();
  10226. if(!_83d&&form&&form["m_tracking"]&&form["m_tracking"].value){
  10227. _83d=form["m_tracking"].value;
  10228. form["m_tracking"].value="";
  10229. }
  10230. this.setTracking("");
  10231. if(_83d){
  10232. var _83e=new DispatcherEntry(this);
  10233. if(this.isWorkingOrPrompting()){
  10234. _83e.addFormField("ui.action","cancel");
  10235. }else{
  10236. _83e.addFormField("ui.action","release");
  10237. }
  10238. _83e.addFormField("cv.responseFormat","successfulRequest");
  10239. _83e.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
  10240. _83e.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
  10241. _83e.addFormField("m_tracking",_83d);
  10242. if(_83b!=true){
  10243. _83e.forceSynchronous();
  10244. }
  10245. var _83f=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
  10246. if(_83f&&_83f.getFormField("cv.outputKey")){
  10247. _83e.addFormField("b_action","cvx.high");
  10248. _83e.addFormField("cv.outputKey",_83f.getFormField("cv.outputKey"));
  10249. _83e.addFormField("cv.waitForResponse","false");
  10250. _83e.setHeaders(_83f.getHeaders());
  10251. }
  10252. var _840=_83e.getRequest().getFormFields();
  10253. var _841=_840.keys();
  10254. var data=new URLSearchParams();
  10255. for(var _843=0;_843<_841.length;_843++){
  10256. data.append(_841[_843],_840.get(_841[_843]));
  10257. }
  10258. if(!navigator.sendBeacon(this.getGateway(),data)){
  10259. if(typeof console!=="undefined"&&console.log){
  10260. console.log("CCognosViewer: release sendBeacon failed.");
  10261. }
  10262. }
  10263. return true;
  10264. }
  10265. return false;
  10266. };
  10267. CCognosViewer.prototype.cleanupStyles=function(){
  10268. if(this.getViewerWidget()){
  10269. this.getViewerWidget().cleanupStyles();
  10270. }
  10271. };
  10272. CCognosViewer.prototype.destroy=function(_844){
  10273. this.release(_844);
  10274. if(!this.m_destroyed){
  10275. if(typeof window.gaRV_INSTANCES!="undefined"){
  10276. for(var _845=0;_845<window.gaRV_INSTANCES.length;_845++){
  10277. if(window.gaRV_INSTANCES[_845].m_sId==this.getId()){
  10278. window.gaRV_INSTANCES.splice(_845,1);
  10279. this.m_destroyed=true;
  10280. break;
  10281. }
  10282. }
  10283. }
  10284. if(this.m_layoutElements){
  10285. for(var i=0;i<this.m_layoutElements.length;i++){
  10286. var e=this.m_layoutElements[i];
  10287. var j=e.getAttribute("lid");
  10288. this.m_layoutElements.splice(i,1);
  10289. delete this.m_lidToElement[j];
  10290. var _849=e.parentNode;
  10291. if(_849){
  10292. _849.removeChild(e);
  10293. }
  10294. }
  10295. delete this.m_layoutElements;
  10296. delete this.m_lidToElement;
  10297. }
  10298. if(this.m_oDrillMgr){
  10299. this.m_oDrillMgr.setCV(null);
  10300. }
  10301. var _84a=this.getSelectionController();
  10302. if(_84a){
  10303. GUtil.destroyProperties(_84a);
  10304. }
  10305. var cvId=this.getId();
  10306. this.m_viewerDispatcher=null;
  10307. GUtil.destroyProperties(this,true);
  10308. cleanupGlobalObjects(cvId);
  10309. }
  10310. };
  10311. CCognosViewer.prototype.exit=function(){
  10312. this.release();
  10313. };
  10314. CCognosViewer.prototype.executeAction=function(_84c,_84d){
  10315. var _84e=this.getAction(_84c);
  10316. _84e.setRequestParms(_84d);
  10317. return _84e.execute();
  10318. };
  10319. CCognosViewer.prototype.getCalculation=function(_84f){
  10320. var calc=null;
  10321. var _851=this.getCalculationCache();
  10322. if(_851[_84f]){
  10323. calc=_851[_84f];
  10324. }else{
  10325. if(window[_84f]&&typeof window[_84f]=="function"){
  10326. calc=new window[_84f]();
  10327. calc.setCognosViewer(this);
  10328. }
  10329. _851[_84f]=calc;
  10330. }
  10331. return calc;
  10332. };
  10333. CCognosViewer.prototype.findBlueDotMenu=function(_852){
  10334. var root=null;
  10335. var _854=(_852)?_852:this.getToolbar();
  10336. for(var idx=0;idx<_854.length;++idx){
  10337. if(typeof _854[idx]._root!="undefined"){
  10338. root=_854[idx]._root;
  10339. break;
  10340. }
  10341. }
  10342. return root;
  10343. };
  10344. CCognosViewer.prototype.findToolbarItem=function(_856,_857){
  10345. var spec=typeof _857=="undefined"||_857==null?this.getToolbar():_857;
  10346. var _859=null;
  10347. for(var _85a=0;_85a<spec.length;++_85a){
  10348. var name=spec[_85a]["name"];
  10349. if(typeof name!="undefined"&&name==_856){
  10350. _859=spec[_85a];
  10351. break;
  10352. }
  10353. }
  10354. return _859;
  10355. };
  10356. CCognosViewer.prototype.findToolbarItemIndex=function(_85c,_85d){
  10357. var spec=typeof _85d=="undefined"||_85d==null?this.getToolbar():_85d;
  10358. var _85f=null;
  10359. for(var _860=0;_860<spec.length;++_860){
  10360. var name=spec[_860]["name"];
  10361. if(typeof name!="undefined"&&name==_85c){
  10362. _85f=_860;
  10363. break;
  10364. }
  10365. }
  10366. return _85f;
  10367. };
  10368. CCognosViewer.prototype.addedButtonToToolbar=function(_862,_863,_864,_865){
  10369. if(typeof _863!="undefined"&&_863!=null){
  10370. if(this.findToolbarItem(_863.name,_862)==null){
  10371. _864=this.findToolbarItemIndex(_864,_862);
  10372. if(typeof _864!="undefined"&&_864!=null){
  10373. _862.splice(++_864,0,_863);
  10374. return true;
  10375. }else{
  10376. if(typeof _865!="undefined"&&_865!=null){
  10377. _862.splice(_865,0,_863);
  10378. return true;
  10379. }
  10380. }
  10381. }
  10382. }
  10383. return false;
  10384. };
  10385. CCognosViewer.prototype.addDrillTargets=function(_866){
  10386. this.m_drillTargets=_866;
  10387. };
  10388. CCognosViewer.prototype.getDrillTargets=function(){
  10389. if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
  10390. var _867=document.getElementById("CVIFrame"+this.getId());
  10391. if(typeof _867!="undefined"&&_867!=null){
  10392. if(_867.contentWindow.drillTargets){
  10393. return _867.contentWindow.drillTargets;
  10394. }
  10395. }
  10396. }
  10397. return this.m_drillTargets;
  10398. };
  10399. CCognosViewer.prototype.getDrillTarget=function(idx){
  10400. if(idx>=this.m_drillTargets.length){
  10401. return null;
  10402. }
  10403. return this.m_drillTargets[idx];
  10404. };
  10405. CCognosViewer.prototype.getNumberOfDrillTargets=function(){
  10406. return this.m_drillTargets.length;
  10407. };
  10408. CCognosViewer.prototype.isReportRenderingDone=function(){
  10409. return this.m_reportRenderingDone;
  10410. };
  10411. CCognosViewer.prototype.setReportRenderingDone=function(flag){
  10412. this.m_reportRenderingDone=flag;
  10413. };
  10414. CCognosViewer.prototype.hasAVSChart=function(){
  10415. var _86a=this.getRAPReportInfo();
  10416. if(_86a){
  10417. var _86b=_86a.getDisplayTypes();
  10418. return _86b.match("_v2")!=null||_86b.match("v2_")!=null;
  10419. }
  10420. return false;
  10421. };
  10422. CCognosViewer.prototype.getPinFreezeManager=function(){
  10423. return this.m_pinFreezeManager;
  10424. };
  10425. CCognosViewer.prototype.getReportContextHelper=function(){
  10426. if(!this.m_reportContextHelper){
  10427. this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager());
  10428. }
  10429. return this.m_reportContextHelper;
  10430. };
  10431. CCognosViewer.prototype.getRAPReportInfo=function(){
  10432. return this.m_RAPReportInfo;
  10433. };
  10434. CCognosViewer.prototype.setRAPReportInfo=function(_86c){
  10435. this.m_RAPReportInfo=_86c;
  10436. };
  10437. CCognosViewer.prototype.isNodeVisible=function(node){
  10438. if(this.m_pinFreezeManager){
  10439. return this.m_pinFreezeManager.isNodeVisible(node);
  10440. }
  10441. return true;
  10442. };
  10443. CCognosViewer.prototype.getWarpRequestForm=function(){
  10444. return document.getElementById("formWarpRequest"+this.getId());
  10445. };
  10446. CCognosViewer.prototype.getBrowser=function(){
  10447. return this.sBrowser;
  10448. };
  10449. CCognosViewer.prototype.repaintDiv=function(oDiv){
  10450. var _86f=oDiv.style.display;
  10451. oDiv.style.display="none";
  10452. oDiv.style.display=_86f;
  10453. };
  10454. CCognosViewer.prototype.isMetadataEmpty=function(){
  10455. var oSC=this.getSelectionController();
  10456. if(oSC){
  10457. var _871=oSC.getCCDManager();
  10458. if(_871){
  10459. return _871.isMetadataEmpty();
  10460. }
  10461. }
  10462. return true;
  10463. };
  10464. CCognosViewer.prototype.setContextMenu=function(_872){
  10465. this.m_contextMenu=_872;
  10466. };
  10467. CCognosViewer.prototype.getContextMenu=function(){
  10468. return this.m_contextMenu;
  10469. };
  10470. CCognosViewer.prototype.setToolbar=function(_873){
  10471. this.m_toolbar=_873;
  10472. };
  10473. CCognosViewer.prototype.getToolbar=function(){
  10474. return this.m_toolbar;
  10475. };
  10476. CCognosViewer.prototype.getAdvancedServerProperty=function(_874){
  10477. if(this.m_advancedProperties&&this.m_advancedProperties[_874]!==undefined&&this.m_advancedProperties[_874]!==null){
  10478. return this.m_advancedProperties[_874];
  10479. }else{
  10480. return null;
  10481. }
  10482. };
  10483. CCognosViewer.prototype.hasPrompt=function(){
  10484. if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
  10485. var _875=false;
  10486. if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
  10487. _875=true;
  10488. }else{
  10489. var _876=new CParameterValues();
  10490. var _877=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
  10491. if(_877.childNodes.length==1){
  10492. _876.loadWithOptions(_877.childNodes[0],true);
  10493. var _878=_876.length();
  10494. for(var _879=0;_879<_878;++_879){
  10495. var _87a=_876.getAt(_879);
  10496. if(_87a!==null&&_87a.length()>0&&_87a.name().indexOf("credential:")!=-1){
  10497. _875=true;
  10498. break;
  10499. }
  10500. }
  10501. }
  10502. }
  10503. this.m_bHasPrompt=_875;
  10504. }
  10505. return this.m_bHasPrompt;
  10506. };
  10507. CCognosViewer.prototype.getDrillState=function(){
  10508. return this.m_sStateData?this.m_sStateData:"";
  10509. };
  10510. CCognosViewer.prototype.isSelectionFilterEnabled=function(){
  10511. if(typeof this.m_bSelectionFilterSwitch=="undefined"){
  10512. this.m_bSelectionFilterSwitch=false;
  10513. }
  10514. return this.m_bSelectionFilterSwitch;
  10515. };
  10516. CCognosViewer.prototype.broadcastContextChange=function(evt,_87c){
  10517. if(this.getViewerWidget()){
  10518. this.getViewerWidget().broadcastContextChange(_87c);
  10519. }
  10520. stopEventBubble(evt);
  10521. };
  10522. CCognosViewer.prototype.broadcastParameterChange=function(evt,_87e){
  10523. if(this.getViewerWidget()){
  10524. this.getViewerWidget().broadcastParameterChange(_87e);
  10525. }
  10526. stopEventBubble(evt);
  10527. };
  10528. CCognosViewer.prototype.getReportDiv=function(){
  10529. if(!this.m_nReportDiv){
  10530. this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId);
  10531. }
  10532. return this.m_nReportDiv;
  10533. };
  10534. function CDocumentWriter(sId,_880){
  10535. this.m_sId=sId;
  10536. this.m_sText="";
  10537. this.m_sScript=_880;
  10538. };
  10539. CDocumentWriter.prototype.isValid=function(){
  10540. if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){
  10541. return true;
  10542. }
  10543. return false;
  10544. };
  10545. CDocumentWriter.prototype.execute=function(){
  10546. if(this.isValid()&&window.gScriptLoader){
  10547. var _881=/document\.write(ln)?\s*\(/gi;
  10548. var _882=this.m_sScript.replace(_881,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
  10549. try{
  10550. eval(_882);
  10551. var _883=document.getElementById(this.m_sId);
  10552. if(_883){
  10553. _883.innerHTML=this.m_sText;
  10554. return true;
  10555. }
  10556. }
  10557. catch(e){
  10558. }
  10559. }
  10560. return false;
  10561. };
  10562. CDocumentWriter.prototype.write=function(_884){
  10563. var _885="";
  10564. if(typeof _884=="function"){
  10565. _885=eval(_884);
  10566. }else{
  10567. if(typeof _884=="string"){
  10568. _885=_884;
  10569. }
  10570. }
  10571. this.m_sText+=_885;
  10572. };
  10573. function setFocusToFirstTabItem(_886){
  10574. if(!window.dojo){
  10575. return;
  10576. }
  10577. var _887=dojo.query("*",_886);
  10578. var _888=_887.length;
  10579. for(var i=0;i<_888;i++){
  10580. var node=_887[i];
  10581. if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){
  10582. if(node.getAttribute("tabIndex")==0){
  10583. try{
  10584. node.focus();
  10585. }
  10586. catch(e){
  10587. }
  10588. break;
  10589. }
  10590. }
  10591. }
  10592. };
  10593. function ReportContextHelper(_88b){
  10594. this.m_oCDManager=_88b;
  10595. };
  10596. ReportContextHelper.prototype.destroy=function(){
  10597. if(this.m_oCDManager&&this.m_oCDManager.destroy){
  10598. this.m_oCDManager.destroy();
  10599. }
  10600. delete this.m_oCDManager;
  10601. };
  10602. ReportContextHelper.prototype.processCtx=function(sCtx){
  10603. var _88d=sCtx.split("::");
  10604. var _88e=[];
  10605. for(var i=0;i<_88d.length;++i){
  10606. _88e[i]=_88d[i].split(":");
  10607. }
  10608. if(_88e&&_88e.length&&_88e[0].length){
  10609. return _88e;
  10610. }else{
  10611. return null;
  10612. }
  10613. };
  10614. ReportContextHelper.prototype.getDataItemName=function(sCtx){
  10615. var _891=this.processCtx(sCtx);
  10616. if(_891){
  10617. return this.getRefDataItem(_891[0][0]);
  10618. }
  10619. return null;
  10620. };
  10621. ReportContextHelper.prototype.getRefDataItem=function(_892){
  10622. var _893=this.m_oCDManager.GetRDIValue(_892);
  10623. return (_893==null)?"":_893;
  10624. };
  10625. ReportContextHelper.prototype.getMun=function(_894){
  10626. var aCtx=null;
  10627. if(typeof _894==="string"){
  10628. aCtx=this.processCtx(_894);
  10629. }else{
  10630. if(typeof _894==="number"){
  10631. aCtx=this.processCtx(_894.toString());
  10632. }else{
  10633. aCtx=_894;
  10634. }
  10635. }
  10636. if(aCtx){
  10637. var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]);
  10638. return (sMun==null)?"":sMun;
  10639. }
  10640. return "";
  10641. };
  10642. function ViewerConfig(){
  10643. this.uiConfig=new ViewerUIConfig();
  10644. this.findConfig=typeof ViewerFindActionConfig=="function"?new ViewerFindActionConfig():null;
  10645. this.httpRequestConfig=typeof ViewerHttpRequestConfig=="function"?new ViewerHttpRequestConfig():null;
  10646. this.eventsConfig=typeof ViewerEventsConfig=="function"?new ViewerEventsConfig():null;
  10647. };
  10648. ViewerConfig.prototype.configure=function(_897){
  10649. if(!_897){
  10650. return;
  10651. }
  10652. if(_897.findAction&&this.findConfig){
  10653. this.findConfig.configure(_897.findAction);
  10654. }
  10655. if(_897.UI){
  10656. this.uiConfig.configure(_897.UI);
  10657. }
  10658. if(_897.httpRequestCallbacks&&this.httpRequestConfig){
  10659. this.httpRequestConfig.configure(_897.httpRequestCallbacks);
  10660. }
  10661. if(_897.events&&this.eventsConfig){
  10662. this.eventsConfig.configure(_897.events);
  10663. }
  10664. };
  10665. ViewerConfig.prototype.getUIConfig=function(){
  10666. return this.uiConfig;
  10667. };
  10668. ViewerConfig.prototype.getFindActionConfig=function(){
  10669. return this.findConfig;
  10670. };
  10671. ViewerConfig.prototype.getHttpRequestConfig=function(){
  10672. return this.httpRequestConfig;
  10673. };
  10674. ViewerConfig.prototype.getEventsConfig=function(){
  10675. return this.eventsConfig;
  10676. };
  10677. function ViewerUIConfig(){
  10678. this.showBanner=true;
  10679. this.showToolbar=true;
  10680. this.showContextMenu=true;
  10681. this.showPageNavigation=true;
  10682. this.primarySelectionColor=null;
  10683. this.secondarySelectionColor=null;
  10684. this.showSecondarySelection=true;
  10685. };
  10686. ViewerUIConfig.prototype.configure=function(_898){
  10687. applyJSONProperties(this,_898);
  10688. };
  10689. ViewerUIConfig.prototype.getShowBanner=function(){
  10690. return this.showBanner;
  10691. };
  10692. ViewerUIConfig.prototype.getShowToolbar=function(){
  10693. return this.showToolbar;
  10694. };
  10695. ViewerUIConfig.prototype.getShowContextMenu=function(){
  10696. return this.showContextMenu;
  10697. };
  10698. ViewerUIConfig.prototype.getShowPageNavigation=function(){
  10699. return this.showPageNavigation;
  10700. };
  10701. ViewerUIConfig.prototype.getPrimarySelectionColor=function(){
  10702. return this.primarySelectionColor;
  10703. };
  10704. ViewerUIConfig.prototype.getSeondarySelectionColor=function(){
  10705. return this.secondarySelectionColor;
  10706. };
  10707. ViewerUIConfig.prototype.getShowSecondarySelection=function(){
  10708. return this.showSecondarySelection;
  10709. };
  10710. function ViewerHttpRequestConfig(){
  10711. this.reportStatus={};
  10712. this.UI={};
  10713. };
  10714. ViewerHttpRequestConfig.prototype.configure=function(_899){
  10715. applyJSONProperties(this,_899);
  10716. };
  10717. ViewerHttpRequestConfig.prototype.getRequestIndicator=function(){
  10718. if(this.UI){
  10719. return this.UI.requestIndicator?this.UI.requestIndicator:null;
  10720. }
  10721. };
  10722. ViewerHttpRequestConfig.prototype.getWorkingDialog=function(){
  10723. if(this.UI){
  10724. return this.UI.workingDialog?this.UI.workingDialog:null;
  10725. }
  10726. };
  10727. ViewerHttpRequestConfig.prototype.getReportStatusCallback=function(_89a){
  10728. if(this.reportStatus){
  10729. var _89b=this.reportStatus[_89a];
  10730. if(_89b){
  10731. return _89b;
  10732. }
  10733. if(_89a=="complete"&&this.reportStatus["initialComplete"]){
  10734. var _89c=this.reportStatus["initialComplete"];
  10735. this.reportStatus["initialComplete"]=null;
  10736. return _89c;
  10737. }
  10738. }
  10739. return null;
  10740. };
  10741. function ViewerState(){
  10742. this.findState=null;
  10743. this.pageState=null;
  10744. };
  10745. ViewerState.prototype.setFindState=function(_89d){
  10746. if(typeof ViewerFindState!="function"){
  10747. return;
  10748. }
  10749. if(!this.findState){
  10750. this.findState=new ViewerFindState();
  10751. }
  10752. this.findState.setState(_89d);
  10753. };
  10754. ViewerState.prototype.clearFindState=function(){
  10755. this.findState=null;
  10756. };
  10757. ViewerState.prototype.getFindState=function(){
  10758. return this.findState;
  10759. };
  10760. ViewerState.prototype.setPageState=function(_89e){
  10761. if(typeof ViewerPageState!="function"){
  10762. return;
  10763. }
  10764. if(!this.pageState){
  10765. this.pageState=new ViewerPageState();
  10766. }
  10767. this.pageState.setState(_89e);
  10768. };
  10769. ViewerState.prototype.clearPageState=function(){
  10770. this.pageState=null;
  10771. };
  10772. ViewerState.prototype.getPageState=function(){
  10773. return this.pageState;
  10774. };
  10775. function ViewerEventsConfig(){
  10776. this.showContextMenuOnClick=false;
  10777. };
  10778. ViewerEventsConfig.prototype.configure=function(_89f){
  10779. applyJSONProperties(this,_89f);
  10780. };
  10781. ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){
  10782. return this.showContextMenuOnClick;
  10783. };
  10784. CCognosViewer.prototype.loadExtra=function(){
  10785. var _8a0=this.getViewerWidget();
  10786. if(_8a0){
  10787. _8a0.loadExtraJavascriptFiles(this.getWebContentRoot());
  10788. }
  10789. };
  10790. function CCognosViewerToolbarHelper(){
  10791. };
  10792. CCognosViewerToolbarHelper.updateToolbarForCurrentSelection=function(oCV,_8a2){
  10793. if(_8a2){
  10794. var _8a3=oCV.getActionFactory();
  10795. for(var _8a4=0;_8a4<_8a2.length;++_8a4){
  10796. var name=_8a2[_8a4]["name"];
  10797. if(typeof name!="undefined"&&name!=null){
  10798. var _8a6=_8a3.load(name);
  10799. if(_8a6!=null&&typeof _8a6!="undefined"){
  10800. var _8a7=_8a6.updateMenu(_8a2[_8a4]);
  10801. if(_8a7.visible==false){
  10802. if(_8a7.save){
  10803. oCV.getViewerWidget().addButtonToSavedToolbarButtons(name,_8a2[_8a4],_8a4);
  10804. }
  10805. _8a2.splice(_8a4,1);
  10806. --_8a4;
  10807. }else{
  10808. _8a2[_8a4]=_8a7;
  10809. }
  10810. }
  10811. }else{
  10812. if(typeof _8a2[_8a4]._root!="undefined"){
  10813. CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(oCV,_8a2[_8a4]._root);
  10814. }else{
  10815. if(_8a2[_8a4].separator){
  10816. if(_8a4==0||(_8a4>0&&_8a2[_8a4-1].separator)||_8a4==_8a2.length){
  10817. _8a2.splice(_8a4,1);
  10818. --_8a4;
  10819. }
  10820. }
  10821. }
  10822. }
  10823. }
  10824. }
  10825. };
  10826. CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection=function(oCV,_8a9){
  10827. var _8aa=[];
  10828. if(_8a9){
  10829. var _8ab=oCV.getActionFactory();
  10830. for(var _8ac=0;_8ac<_8a9.length;++_8ac){
  10831. var _8ad=_8a9[_8ac];
  10832. var name=_8a9[_8ac]["name"];
  10833. var _8af=true;
  10834. if(typeof name!="undefined"){
  10835. var _8b0=_8ab.load(name);
  10836. if(!_8b0){
  10837. if(name=="drillDown"){
  10838. _8b0=_8ab.load("DrillDown");
  10839. }else{
  10840. if(name=="drillUp"){
  10841. _8b0=_8ab.load("DrillUp");
  10842. }
  10843. }
  10844. }
  10845. if(_8b0!=null&&typeof _8b0!="undefined"){
  10846. if(typeof _8b0.buildMenu=="function"){
  10847. _8ad=_8b0.buildMenu(_8a9[_8ac]);
  10848. }else{
  10849. _8ad=_8b0.updateMenu(_8a9[_8ac]);
  10850. }
  10851. _8af=_8b0.isValidMenuItem();
  10852. }else{
  10853. if(typeof _8ad.items!="undefined"){
  10854. _8ad.items=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad.items);
  10855. _8af=(_8ad.items&&_8ad.items.length>0)?true:false;
  10856. if(_8af&&_8ad.items.length==1){
  10857. _8ad=_8ad.items[0];
  10858. }
  10859. }
  10860. }
  10861. }
  10862. if(_8ad&&_8ad.visible!==false&&_8af){
  10863. if(_8ad.separator===true){
  10864. if(_8aa.length>0&&typeof _8aa[_8aa.length-1].separator=="undefined"){
  10865. _8aa[_8aa.length]=_8ad;
  10866. }
  10867. }else{
  10868. if(_8ad.useChildrenItems==true&&_8ad.items&&_8ad.items.length>0){
  10869. if(!_8ad.disabled){
  10870. for(var _8b1=0;_8b1<_8ad.items.length;_8b1++){
  10871. _8aa[_8aa.length]=_8ad.items[_8b1];
  10872. }
  10873. }
  10874. }else{
  10875. if(typeof _8ad._root!="undefined"){
  10876. _8aa[_8aa.length]={"_root":CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad._root)};
  10877. }else{
  10878. _8aa[_8aa.length]=_8ad;
  10879. }
  10880. }
  10881. }
  10882. }
  10883. }
  10884. if(_8aa.length>1){
  10885. if(_8aa[_8aa.length-1].separator){
  10886. _8aa=_8aa.splice(0,_8aa.length-1);
  10887. }
  10888. }
  10889. }
  10890. return _8aa;
  10891. };
  10892. function CCDManager(cv){
  10893. this.m_cd=null;
  10894. this.m_md=null;
  10895. this.m_oCV=null;
  10896. this.m_dataItemInfo=null;
  10897. };
  10898. CCDManager.prototype.SetContextData=function(CD){
  10899. if(this.m_cd){
  10900. this.m_cd=null;
  10901. }
  10902. this.m_cd=CD;
  10903. };
  10904. CCDManager.prototype.SetMetadata=function(MD){
  10905. if(this.m_md){
  10906. this.m_md=null;
  10907. }
  10908. this.m_md=MD;
  10909. };
  10910. CCDManager.prototype.AddContextData=function(CD){
  10911. if(!this.m_cd){
  10912. this.m_cd=CD;
  10913. }else{
  10914. for(var i in CD){
  10915. this.m_cd[i]=CD[i];
  10916. }
  10917. }
  10918. };
  10919. CCDManager.prototype.AddMetadata=function(MD){
  10920. if(!this.m_md){
  10921. this.m_md=MD;
  10922. }else{
  10923. for(var j in MD){
  10924. this.m_md[j]=MD[j];
  10925. }
  10926. }
  10927. };
  10928. CCDManager.prototype.getClonedMetadataArray=function(){
  10929. var _8b9={};
  10930. applyJSONProperties(_8b9,this.m_md);
  10931. return _8b9;
  10932. };
  10933. CCDManager.prototype.getClonedContextdataArray=function(){
  10934. var _8ba={};
  10935. applyJSONProperties(_8ba,this.m_cd);
  10936. return _8ba;
  10937. };
  10938. CCDManager.prototype.SetCognosViewer=function(_8bb){
  10939. if(_8bb){
  10940. this.m_oCV=_8bb;
  10941. }
  10942. };
  10943. CCDManager.prototype.onComplete_GetCDRequest=function(_8bc,_8bd){
  10944. if(_8bc){
  10945. var _8be=_8bc.getResult();
  10946. var _8bf=XMLBuilderLoadXMLFromString(_8be);
  10947. if(_8bf){
  10948. var _8c0=_8bf.getElementsByTagName("Block");
  10949. for(var i=0;i<_8c0.length;i++){
  10950. var _8c2="";
  10951. var _8c3=_8c0[i].firstChild;
  10952. while(_8c3){
  10953. _8c2+=_8c3.nodeValue;
  10954. _8c3=_8c3.nextSibling;
  10955. }
  10956. var cd=eval("("+_8c2+")");
  10957. this.AddContextData(cd);
  10958. }
  10959. }
  10960. }
  10961. if(_8bd&&typeof _8bd=="function"){
  10962. _8bd();
  10963. }
  10964. };
  10965. CCDManager.prototype.FetchContextData=function(_8c5,_8c6){
  10966. var _8c7=[];
  10967. var c=null,_8c9=_8c5.length;
  10968. for(var i=0;i<_8c9;++i){
  10969. c=_8c5[i];
  10970. if(c!=""&&!this.ContextIdExists(c)){
  10971. _8c7.push(c);
  10972. }
  10973. }
  10974. if(_8c7.length){
  10975. if(this.m_oCV){
  10976. this.getContextData(_8c7,_8c6);
  10977. }
  10978. }
  10979. return _8c7.length;
  10980. };
  10981. CCDManager.prototype.getContextData=function(_8cb,_8cc){
  10982. var oCV=this.m_oCV;
  10983. var _8ce=new AsynchDataDispatcherEntry(oCV);
  10984. _8ce.setCanBeQueued(false);
  10985. if(!oCV.isBux){
  10986. _8ce.forceSynchronous();
  10987. }
  10988. var form=document["formWarpRequest"+oCV.getId()];
  10989. var _8d0=oCV.getConversation();
  10990. var _8d1=oCV.getTracking();
  10991. if(!_8d1&&form&&form["m_tracking"]&&form["m_tracking"].value){
  10992. _8d1=form["m_tracking"].value;
  10993. }
  10994. if(oCV.m_viewerFragment){
  10995. var _8d2=oCV.getActiveRequest();
  10996. if(_8d2&&_8d2.getFormField("m_tracking")==_8d1){
  10997. return;
  10998. }
  10999. }
  11000. var _8d3={customArguments:[_8cc],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
  11001. if(oCV.getStatus()=="prompting"){
  11002. _8d3["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
  11003. }
  11004. _8ce.setCallbacks(_8d3);
  11005. if(_8d0&&oCV.envParams["ui.action"]!="view"){
  11006. _8ce.addFormField("ui.action","getContext");
  11007. _8ce.addFormField("ui.conversation",_8d0);
  11008. }else{
  11009. var _8d4=form["ui.object"];
  11010. if(typeof _8d4.length!="undefined"&&_8d4.length>1){
  11011. _8ce.addFormField("ui.object",form["ui.object"][0].value);
  11012. }else{
  11013. _8ce.addFormField("ui.object",form["ui.object"].value);
  11014. }
  11015. _8ce.addFormField("ui.action","getObjectContext");
  11016. }
  11017. _8ce.addFormField("cv.responseFormat","asynchDetailContext");
  11018. _8ce.addFormField("context.format","initializer");
  11019. _8ce.addFormField("context.type","reportService");
  11020. _8ce.addFormField("context.selection",_8cb.join(","));
  11021. _8ce.addNonEmptyStringFormField("m_tracking",_8d1);
  11022. oCV.dispatchRequest(_8ce);
  11023. };
  11024. CCDManager.prototype.ContextIdExists=function(_8d5){
  11025. return (this.m_cd&&this.m_cd[_8d5]?true:false);
  11026. };
  11027. CCDManager.prototype.HasContextData=function(){
  11028. return (this.m_cd?true:false);
  11029. };
  11030. CCDManager.prototype.HasMetadata=function(){
  11031. return (this.m_md?true:false);
  11032. };
  11033. CCDManager.prototype._getMDPropertyFromCD=function(_8d6,_8d7,_8d8){
  11034. var p=null;
  11035. this.FetchContextData([_8d6]);
  11036. var cd=this.m_cd&&this.m_cd[_8d6];
  11037. if(cd){
  11038. var md=this.m_md[cd[_8d7]];
  11039. if(md){
  11040. p=md[_8d8];
  11041. }
  11042. }
  11043. return p;
  11044. };
  11045. CCDManager.prototype.GetDrillFlag=function(_8dc){
  11046. return this._getMDPropertyFromCD(_8dc,"r","drill");
  11047. };
  11048. CCDManager.prototype.getModelPathFromBookletItem=function(_8dd){
  11049. var mp=null;
  11050. var md=this.m_md[_8dd];
  11051. if(md){
  11052. mp=md.mp;
  11053. if(mp&&this.m_md[mp]){
  11054. mp=this.m_md[mp].mp;
  11055. }
  11056. }
  11057. return mp?mp:null;
  11058. };
  11059. CCDManager.prototype.GetBookletModelBasedDrillThru=function(_8e0){
  11060. var p=null;
  11061. var md=this.m_md[_8e0];
  11062. if(md){
  11063. p=md.modelBasedDrillThru;
  11064. }
  11065. return p?p:0;
  11066. };
  11067. CCDManager.prototype.GetDrillFlagForMember=function(_8e3){
  11068. var _8e4=null;
  11069. var d=this._getMDPropertyFromCD(_8e3,"r","drill");
  11070. if(d!==null&&this.m_cd[_8e3].m){
  11071. _8e4=d;
  11072. }
  11073. return _8e4;
  11074. };
  11075. CCDManager.prototype.GetDataType=function(_8e6){
  11076. return this._getMDPropertyFromCD(_8e6,"r","dtype");
  11077. };
  11078. CCDManager.prototype.GetUsage=function(_8e7){
  11079. return this._getMDPropertyFromCD(_8e7,"r","usage");
  11080. };
  11081. CCDManager.prototype.GetHUN=function(_8e8){
  11082. var hun=this._getMDPropertyFromCD(_8e8,"h","h");
  11083. if(!hun){
  11084. var h=this._getMDPropertyFromCD(_8e8,"r","h");
  11085. if(h){
  11086. hun=this.m_md[h].h;
  11087. }
  11088. }
  11089. if(hun!=null&&hun.indexOf("[__ns_")==0){
  11090. hun=null;
  11091. }
  11092. return hun;
  11093. };
  11094. CCDManager.prototype.GetQuery=function(_8eb){
  11095. var qry=null;
  11096. var q=this._getMDPropertyFromCD(_8eb,"r","q");
  11097. if(q){
  11098. qry=this.m_md[q].q;
  11099. }
  11100. return qry;
  11101. };
  11102. CCDManager.prototype.GetDepth=function(_8ee){
  11103. return this._getMDPropertyFromCD(_8ee,"r","level");
  11104. };
  11105. CCDManager.prototype.GetDisplayValue=function(_8ef){
  11106. var _8f0=null;
  11107. this.FetchContextData([_8ef]);
  11108. if(this.ContextIdExists(_8ef)&&this.m_cd[_8ef]){
  11109. _8f0=this.m_cd[_8ef].u;
  11110. }
  11111. return _8f0;
  11112. };
  11113. CCDManager.prototype.GetPUN=function(_8f1){
  11114. return this._getMDPropertyFromCD(_8f1,"p","p");
  11115. };
  11116. CCDManager.prototype.GetLUN=function(_8f2){
  11117. return this._getMDPropertyFromCD(_8f2,"l","l");
  11118. };
  11119. CCDManager.prototype.GetMUN=function(_8f3){
  11120. return this._getMDPropertyFromCD(_8f3,"m","m");
  11121. };
  11122. CCDManager.prototype.GetDUN=function(_8f4){
  11123. return this._getMDPropertyFromCD(_8f4,"d","d");
  11124. };
  11125. CCDManager.prototype.GetQMID=function(_8f5){
  11126. return this._getMDPropertyFromCD(_8f5,"i","i");
  11127. };
  11128. CCDManager.prototype.GetRDIValue=function(_8f6){
  11129. return this._getMDPropertyFromCD(_8f6,"r","r");
  11130. };
  11131. CCDManager.prototype.GetBIValue=function(_8f7){
  11132. return this._getMDPropertyFromCD(_8f7,"r","bi");
  11133. };
  11134. CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_8fa){
  11135. var _8fb=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
  11136. for(var _8fc=0;_8fc<_8fb.length;++_8fc){
  11137. var _8fd=_8fb[_8fc].expression;
  11138. var _8fe=_8fb[_8fc].type;
  11139. if(_8fd==""){
  11140. continue;
  11141. }
  11142. for(var _8ff in this.m_md){
  11143. if(this.m_md[_8ff][_8fe]==_8fd){
  11144. for(var _900 in this.m_md){
  11145. if(this.m_md[_900].r&&this.m_md[_900][_8fe]==_8ff){
  11146. if(this.m_md[_900].drill!=0||_8fa==true){
  11147. for(var ctx in this.m_cd){
  11148. if(this.m_cd[ctx].r==_900&&this.m_cd[ctx].m){
  11149. return ctx;
  11150. }
  11151. }
  11152. }
  11153. }
  11154. }
  11155. }
  11156. }
  11157. }
  11158. return "";
  11159. };
  11160. CCDManager.prototype.GetContextIdForMUN=function(mun){
  11161. var _903=null;
  11162. var _904=null;
  11163. for(var i in this.m_md){
  11164. if(this.m_md[i].m==mun){
  11165. _903=i;
  11166. break;
  11167. }
  11168. }
  11169. if(_903!=null){
  11170. for(var j in this.m_cd){
  11171. if(this.m_cd[j].m==_903){
  11172. _904=j;
  11173. break;
  11174. }
  11175. }
  11176. }
  11177. return _904;
  11178. };
  11179. CCDManager.prototype.GetContextIdsForRDI=function(rdi){
  11180. var _908=[];
  11181. for(var i in this.m_md){
  11182. if(this.m_md[i].r==rdi){
  11183. _908.push(i);
  11184. }
  11185. }
  11186. return _908;
  11187. };
  11188. CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_90b){
  11189. var _90c=this.GetContextIdsForRDI(rdi);
  11190. for(var i in this.m_cd){
  11191. for(var j in _90c){
  11192. if(this.m_cd[i].r==_90c[j]&&this.m_cd[i].u==_90b){
  11193. var _90f=this.m_cd[i].m;
  11194. if(_90f){
  11195. return this.m_md[_90f].m;
  11196. }
  11197. }
  11198. }
  11199. }
  11200. return null;
  11201. };
  11202. CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
  11203. var _911=null;
  11204. var _912=null;
  11205. var _913=this.GetContextIdsForRDI(rdi);
  11206. this.FetchContextData([0]);
  11207. for(var i in this.m_cd){
  11208. for(var j in _913){
  11209. if(this.m_cd[i].r==_913[j]){
  11210. var _916=parseFloat(this.m_cd[i].u);
  11211. if(_916==this.m_cd[i].u){
  11212. if(_911==null||_916<_911){
  11213. _911=_916;
  11214. }
  11215. if(_912==null||_916>_912){
  11216. _912=_916;
  11217. }
  11218. }
  11219. }
  11220. }
  11221. }
  11222. if(_911!=null&&_912!=null){
  11223. return eval("({ pageMin: "+_911+", pageMax: "+_912+"})");
  11224. }
  11225. };
  11226. CCDManager.prototype.GetContextIdForDisplayValue=function(_917){
  11227. var _918=null;
  11228. for(var i in this.m_cd){
  11229. if(this.m_cd[i].u==_917){
  11230. _918=i;
  11231. break;
  11232. }
  11233. }
  11234. return _918;
  11235. };
  11236. CCDManager.prototype.GetContextIdForUseValue=function(_91a){
  11237. var _91b=null;
  11238. var _91c=null;
  11239. var _91d=null;
  11240. for(var i in this.m_md){
  11241. var md=this.m_md[i];
  11242. for(var j in md){
  11243. if(md[j]==_91a){
  11244. _91b=i;
  11245. _91c=j;
  11246. break;
  11247. }
  11248. }
  11249. }
  11250. if(_91b!=null){
  11251. for(var k in this.m_cd){
  11252. if(this.m_cd[k][_91c]==_91b){
  11253. _91d=k;
  11254. break;
  11255. }
  11256. }
  11257. }
  11258. return _91d;
  11259. };
  11260. CCDManager.prototype.getDataItemInfo=function(){
  11261. if(this.m_cd){
  11262. var _922={};
  11263. this.m_dataItemInfo={};
  11264. for(var i in this.m_cd){
  11265. var _924=this.m_cd[i].r;
  11266. if(typeof _924!="undefined"){
  11267. var _925=this.m_md[_924].r;
  11268. if(this.m_dataItemInfo[_925]==null){
  11269. this.m_dataItemInfo[_925]=1;
  11270. }else{
  11271. this.m_dataItemInfo[_925]++;
  11272. }
  11273. }
  11274. }
  11275. return CViewerCommon.toJSON(this.m_dataItemInfo);
  11276. }
  11277. return "";
  11278. };
  11279. CCDManager.prototype.DataItemInfoToJSON=function(){
  11280. return this.getDataItemInfo();
  11281. };
  11282. CCDManager.prototype.MetadataToJSON=function(){
  11283. if(this.m_md){
  11284. return CViewerCommon.toJSON(this.m_md);
  11285. }
  11286. return "";
  11287. };
  11288. CCDManager.prototype.ContextDataToJSON=function(){
  11289. if(this.m_cd){
  11290. return CViewerCommon.toJSON(this.m_cd);
  11291. }
  11292. return "";
  11293. };
  11294. CCDManager.prototype.ContextDataSubsetToJSON=function(_926){
  11295. if(_926<=0){
  11296. return this.ContextDataToJSON();
  11297. }
  11298. if(this.m_cd){
  11299. var _927={};
  11300. var _928={};
  11301. for(var i in this.m_cd){
  11302. var _92a=this.m_cd[i].r;
  11303. if(typeof _92a!="undefined"){
  11304. if(_927[_92a]==null){
  11305. _927[_92a]=0;
  11306. }else{
  11307. _927[_92a]++;
  11308. }
  11309. if(_927[_92a]<_926){
  11310. _928[i]=this.m_cd[i];
  11311. }
  11312. }
  11313. }
  11314. return CViewerCommon.toJSON(_928);
  11315. }
  11316. return "";
  11317. };
  11318. CCDManager.prototype.GetHUNForRDI=function(rdi,_92c){
  11319. for(var i in this.m_md){
  11320. if(this.m_md[i].r==rdi&&this.m_md[i].q==_92c){
  11321. var _92e=this.m_md[i].h;
  11322. if(_92e){
  11323. return this.m_md[_92e].h;
  11324. }
  11325. }
  11326. }
  11327. return null;
  11328. };
  11329. CCDManager.prototype.GetMetadataIdForQueryName=function(_92f){
  11330. for(var i in this.m_md){
  11331. if(this.m_md[i].q===_92f){
  11332. return i;
  11333. }
  11334. }
  11335. return null;
  11336. };
  11337. CCDManager.prototype._isEmptyObject=function(obj){
  11338. for(var _932 in obj){
  11339. return false;
  11340. }
  11341. return true;
  11342. };
  11343. CCDManager.prototype.isMetadataEmpty=function(){
  11344. if(this.m_md){
  11345. return this._isEmptyObject(this.m_md);
  11346. }
  11347. return true;
  11348. };
  11349. CCDManager.prototype.GetBestPossibleItemName=function(_933){
  11350. var item=this.m_cd[_933];
  11351. if(!item){
  11352. return null;
  11353. }
  11354. if(item.l&&this.m_md[item.l].l){
  11355. return this._getStringInLastBracket(this.m_md[item.l].l);
  11356. }
  11357. if(item.r&&this.m_md[item.r].r){
  11358. return this._getStringInLastBracket(this.m_md[item.r].r);
  11359. }
  11360. if(item.h&&this.m_md[item.h].h){
  11361. return this._getStringInLastBracket(this.m_md[item.h].h);
  11362. }
  11363. if(item.i&&this.m_md[item.i].i){
  11364. return this._getStringInLastBracket(this.m_md[item.i].i);
  11365. }
  11366. return null;
  11367. };
  11368. CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_935){
  11369. var item=this.m_cd[_935];
  11370. if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){
  11371. return this._getStringInLastBracket(this.m_md[item.m].m);
  11372. }
  11373. return null;
  11374. };
  11375. CCDManager.prototype._getStringInLastBracket=function(str){
  11376. if(str&&str.indexOf("].[")>0){
  11377. var _938=str.split("].[");
  11378. var _939=_938[_938.length-1];
  11379. return _939.substring(0,_939.length-1);
  11380. }
  11381. return str;
  11382. };
  11383. CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_93a){
  11384. var _93b=this._getNamespaceAndDimensionFromUniqueName(_93a);
  11385. if(_93b&&this.m_md){
  11386. for(var _93c in this.m_md){
  11387. var sMun=this.m_md[_93c].m;
  11388. if(sMun&&sMun.length>0){
  11389. if(sMun.indexOf("->:[TM].")>0){
  11390. var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
  11391. if(oObj.dimension&&oObj.dimension===_93b.dimension&&oObj.namespace!==_93b.namespace){
  11392. var _93f=_93a.indexOf(".");
  11393. return oObj.namespace+_93a.substr(_93f,_93a.length);
  11394. }
  11395. }else{
  11396. var _940=sMun.indexOf("->:[");
  11397. if(_940>0){
  11398. if(sMun.substr(_940+4,4)!=="TM]."){
  11399. return _93a;
  11400. }
  11401. }
  11402. }
  11403. }
  11404. }
  11405. }
  11406. return _93a;
  11407. };
  11408. CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_941){
  11409. if(_941&&_941.length>0&&_941.indexOf("].[")>0){
  11410. var _942=_941.split("].[");
  11411. if(_942.length>1){
  11412. return {"namespace":_942[0]+"]","dimension":"["+_942[1]+"]"};
  11413. }
  11414. }
  11415. return null;
  11416. };
  11417. CCDManager.prototype.destroy=function(){
  11418. delete this.m_cd;
  11419. delete this.m_md;
  11420. delete this.m_oCV;
  11421. delete this.m_dataItemInfo;
  11422. };
  11423. var GUtil={};
  11424. GUtil.createHiddenForm=function(name,_944,_945,_946){
  11425. var form=document.getElementById(name);
  11426. if(form){
  11427. document.body.removeChild(form);
  11428. }
  11429. form=document.createElement("form");
  11430. form.id=name;
  11431. form.name=name;
  11432. form.method=_944;
  11433. form.style.display="none";
  11434. form.action=document.forms["formWarpRequest"+_945].action;
  11435. form.target=_946+(new Date()).getTime();
  11436. document.body.appendChild(form);
  11437. return form;
  11438. };
  11439. GUtil.createFormField=function(el,name,_94a){
  11440. var _94b=document.createElement("input");
  11441. _94b.type="hidden";
  11442. _94b.name=name;
  11443. _94b.value=_94a;
  11444. el.appendChild(_94b);
  11445. };
  11446. GUtil.generateCallback=function(func,_94d,_94e){
  11447. if(func){
  11448. var _94f=_94e||this;
  11449. _94d=(_94d instanceof Array)?_94d:[];
  11450. return (function(_950){
  11451. if(typeof _950!="undefined"&&_94d.length==0){
  11452. _94d.push(_950);
  11453. }
  11454. return func.apply(_94f,_94d);
  11455. });
  11456. }else{
  11457. return (function(){
  11458. });
  11459. }
  11460. };
  11461. GUtil.destroyProperties=function(_951,_952){
  11462. var _953;
  11463. if(_951 instanceof Array){
  11464. for(var i=0;i<_951.length;i++){
  11465. _953=_951[i];
  11466. if(_953 instanceof String){
  11467. _953=null;
  11468. }else{
  11469. if(_953&&_953.destroy&&!_953._beingDestroyed){
  11470. _953.destroy();
  11471. }
  11472. GUtil.destroyProperties(_953);
  11473. }
  11474. }
  11475. }else{
  11476. if(_951 instanceof Object){
  11477. if(_951._beingDestroyed){
  11478. return;
  11479. }
  11480. var obj=_951;
  11481. obj._beingDestroyed=true;
  11482. for(var _956 in obj){
  11483. _953=obj[_956];
  11484. if(_956==="_beingDestroyed"||_956==="m_destroyed"||_956==="_destroyed"||typeof _953=="function"){
  11485. continue;
  11486. }
  11487. if(_953 instanceof Array){
  11488. GUtil.destroyProperties(_953);
  11489. }else{
  11490. if(_953 instanceof Object){
  11491. if(typeof _953.destroy=="function"&&!_953._destroyed&&(_953!==CCognosViewer||_952)){
  11492. _953.destroy();
  11493. }
  11494. }
  11495. }
  11496. delete obj[_956];
  11497. }
  11498. }
  11499. }
  11500. };
  11501. cvLoadDialog=function(_957,_958,_959,_95a,_95b,_95c){
  11502. _95c=((_95c===undefined)?true:_95c);
  11503. var _95d=document.getElementById("formWarpRequest"+_957.getId());
  11504. if(_95d&&_957){
  11505. _957.getWorkingDialog().hide();
  11506. var _95e="";
  11507. var _95f="";
  11508. var _960=null;
  11509. if(_957.isAccessibleMode()){
  11510. _95e="winNAT_"+(new Date()).getTime();
  11511. _95f=_957.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
  11512. }else{
  11513. var _961=document.body;
  11514. _960=new CModal("","",_961,null,null,_95a,_959,true,true,false,true,_957.getWebContentRoot());
  11515. if(typeof _95b=="string"){
  11516. document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_95b);
  11517. }
  11518. document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
  11519. _95e=CMODAL_CONTENT_ID;
  11520. }
  11521. var _962=document.createElement("FORM");
  11522. _962.method="POST";
  11523. _962.action=_957.getGateway();
  11524. _962.target=_95e;
  11525. _962.style.margin="0px";
  11526. document.body.appendChild(_962);
  11527. for(var _963 in _958){
  11528. _962.appendChild(createHiddenFormField(_963,_958[_963]));
  11529. }
  11530. if(_95c){
  11531. _962.appendChild(createHiddenFormField("cv.id",_957.getId()));
  11532. _962.appendChild(createHiddenFormField("b_action","xts.run"));
  11533. _962.appendChild(createHiddenFormField("ui.action",_95d["ui.action"].value));
  11534. _962.appendChild(createHiddenFormField("ui.object",_95d["ui.object"].value));
  11535. if(typeof _957.rvMainWnd!="undefined"){
  11536. _962.appendChild(createHiddenFormField("run.outputFormat",_957.rvMainWnd.getCurrentFormat()));
  11537. }
  11538. if(typeof _95d["run.outputLocale"]!="undefined"){
  11539. _962.appendChild(createHiddenFormField("run.outputLocale",_95d["run.outputLocale"].value));
  11540. }
  11541. if(typeof _962["backURL"]=="undefined"&&typeof _962["ui.backURL"]=="undefined"&&typeof _95d["ui.backURL"]!="undefined"){
  11542. _962.appendChild(createHiddenFormField("ui.backURL",_95d["ui.backURL"].value));
  11543. }
  11544. if(typeof _957!="undefined"&&typeof _957.getConversation!="undefined"&&typeof _957.getTracking!="undefined"){
  11545. _962.appendChild(createHiddenFormField("ui.conversation",_957.getConversation()));
  11546. _962.appendChild(createHiddenFormField("m_tracking",_957.getTracking()));
  11547. if(_957.envParams["ui.name"]!="undefined"){
  11548. _962.appendChild(createHiddenFormField("ui.name",_957.envParams["ui.name"]));
  11549. }
  11550. }
  11551. }
  11552. var _964=window.onbeforeunload;
  11553. window.onbeforeunload=null;
  11554. if(_957.isAccessibleMode()){
  11555. window.open(_95f,_95e,"rv");
  11556. _962.submit();
  11557. }else{
  11558. _962.submit();
  11559. _960.show();
  11560. }
  11561. window.onbeforeunload=_964;
  11562. document.body.removeChild(_962);
  11563. _957.modalShown=true;
  11564. }
  11565. };
  11566. function createHiddenFormField(name,_966){
  11567. var _967=document.createElement("input");
  11568. _967.setAttribute("type","hidden");
  11569. _967.setAttribute("name",name);
  11570. _967.setAttribute("id",name);
  11571. _967.setAttribute("value",_966);
  11572. return (_967);
  11573. };
  11574. function isAuthenticationFault(_968){
  11575. if(_968!=null){
  11576. var _969=XMLHelper_FindChildByTagName(_968,"CAM",true);
  11577. return (_969!=null&&XMLHelper_FindChildByTagName(_969,"promptInfo",true)!=null);
  11578. }
  11579. };
  11580. function processAuthenticationFault(_96a,_96b){
  11581. if(isAuthenticationFault(_96a)){
  11582. launchLogOnDialog(_96b,_96a);
  11583. return true;
  11584. }
  11585. return false;
  11586. };
  11587. function isObjectEmpty(_96c){
  11588. for(var _96d in _96c){
  11589. if(_96c.hasOwnProperty(_96d)){
  11590. return false;
  11591. }
  11592. }
  11593. return true;
  11594. };
  11595. function launchLogOnDialog(cvID,_96f){
  11596. try{
  11597. var oCV=getCognosViewerObjectRef(cvID);
  11598. var _971={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
  11599. if(_96f!=null){
  11600. var _972=XMLHelper_FindChildrenByTagName(_96f,"namespace",true);
  11601. if(_972!=null){
  11602. for(var _973=0;_973<_972.length;++_973){
  11603. var _974=_972[_973];
  11604. if(_974!=null){
  11605. var _975=XMLHelper_FindChildByTagName(_974,"name",false);
  11606. var _976=XMLHelper_FindChildByTagName(_974,"value",false);
  11607. if(_975!=null&&_976!=null){
  11608. var _977=XMLHelper_GetText(_975);
  11609. var _978=XMLHelper_GetText(_976);
  11610. if(_977!=null&&_977.length>0){
  11611. _971[_977]=_978;
  11612. }
  11613. }
  11614. }
  11615. }
  11616. }
  11617. }
  11618. cvLoadDialog(oCV,_971,540,460,null,false);
  11619. }
  11620. catch(exception){
  11621. }
  11622. };
  11623. function getCVWaitingOnFault(){
  11624. var oCV=null;
  11625. for(var _97a=0;_97a<window.gaRV_INSTANCES.length;_97a++){
  11626. if(window.gaRV_INSTANCES[_97a].getRetryDispatcherEntry()!=null){
  11627. oCV=window.gaRV_INSTANCES[_97a];
  11628. break;
  11629. }
  11630. }
  11631. return oCV;
  11632. };
  11633. function ccModalCallBack(_97b,data){
  11634. var oCV=getCVWaitingOnFault();
  11635. destroyCModal();
  11636. if(typeof HiddenIframeDispatcherEntry=="function"&&HiddenIframeDispatcherEntry.hideIframe){
  11637. var oCV=window.gaRV_INSTANCES[0];
  11638. if(oCV){
  11639. HiddenIframeDispatcherEntry.hideIframe(oCV.getId());
  11640. }
  11641. }
  11642. if(oCV!=null){
  11643. if(typeof _97b!="undefined"&&_97b=="ok"){
  11644. var _97e=oCV.getRetryDispatcherEntry();
  11645. if(_97e){
  11646. _97e.retryRequest();
  11647. }
  11648. if(oCV.getRV()!=null){
  11649. oCV.getRV().updateUserName();
  11650. }
  11651. }else{
  11652. oCV.rvMainWnd.hideOpenMenus();
  11653. }
  11654. }
  11655. };
  11656. function closeErrorPage(){
  11657. var oCV=getCVWaitingOnFault();
  11658. destroyCModal();
  11659. if(oCV!=null){
  11660. oCV.setRetryDispatcherEntry(null);
  11661. oCV.rvMainWnd.hideOpenMenus();
  11662. }
  11663. };
  11664. function getCrossBrowserNode(evt,_981){
  11665. var node=null;
  11666. if(_981&&evt.explicitOriginalTarget){
  11667. node=evt.explicitOriginalTarget;
  11668. }else{
  11669. if(evt.originalTarget){
  11670. node=evt.originalTarget;
  11671. }else{
  11672. if(evt.target){
  11673. node=evt.target;
  11674. }else{
  11675. if(evt.srcElement){
  11676. node=evt.srcElement;
  11677. }
  11678. }
  11679. }
  11680. }
  11681. try{
  11682. if(node&&node.nodeType==3){
  11683. node=node.parentNode;
  11684. }
  11685. }
  11686. catch(ex){
  11687. }
  11688. return node;
  11689. };
  11690. function getNodeFromEvent(evt,_984){
  11691. var node=getCrossBrowserNode(evt,true);
  11692. if(node&&node.getAttribute&&node.getAttribute("name")=="primarySelectionDiv"){
  11693. node=node.parentNode.firstChild;
  11694. }
  11695. if(node&&node.getAttribute&&node.getAttribute("flashChartContainer")=="true"){
  11696. node=node.firstChild;
  11697. }
  11698. if(node&&node.getAttribute&&node.getAttribute("chartContainer")=="true"&&node.childNodes){
  11699. for(var i=0;i<node.childNodes.length;i++){
  11700. if(node.childNodes[i].nodeName.toLowerCase()=="img"){
  11701. node=node.childNodes[i];
  11702. break;
  11703. }
  11704. }
  11705. }else{
  11706. if(!_984&&node&&node.nodeName&&node.nodeName.toLowerCase()=="img"&&node.getAttribute("rsvpChart")!="true"){
  11707. node=node.parentNode;
  11708. }
  11709. }
  11710. return node;
  11711. };
  11712. function getCtxNodeFromEvent(evt){
  11713. try{
  11714. var node=getCrossBrowserNode(evt);
  11715. var _989=node.nodeName.toUpperCase();
  11716. if((_989=="SPAN"||_989=="AREA"||_989=="IMG")&&node.getAttribute("ctx")!=null){
  11717. return node;
  11718. }else{
  11719. if(_989=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
  11720. return node.parentNode;
  11721. }
  11722. }
  11723. }
  11724. catch(exception){
  11725. }
  11726. return null;
  11727. };
  11728. function getDocumentFromEvent(evt){
  11729. var node=getCrossBrowserNode(evt,true);
  11730. var _98c=node.document?node.document:node.ownerDocument;
  11731. return _98c;
  11732. };
  11733. function stopEventBubble(evt){
  11734. evt.returnValue=false;
  11735. evt.cancelBubble=true;
  11736. if(typeof evt.stopPropagation!="undefined"){
  11737. evt.stopPropagation();
  11738. }
  11739. if(typeof evt.preventDefault!="undefined"){
  11740. evt.preventDefault();
  11741. }
  11742. return false;
  11743. };
  11744. function setNodeFocus(evt){
  11745. evt=(evt)?evt:((event)?event:null);
  11746. var _98f=getNodeFromEvent(evt);
  11747. if(_98f&&_98f.nodeName){
  11748. var _990=_98f.nodeName.toLowerCase();
  11749. if((_990=="td"||_990=="span")&&_98f.childNodes&&_98f.childNodes.length>0&&_98f.childNodes[0].className=="textItem"){
  11750. try{
  11751. _98f.childNodes[0].focus();
  11752. }
  11753. catch(e){
  11754. if(typeof console!=="undefined"&&console.log){
  11755. console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js");
  11756. }
  11757. }
  11758. }
  11759. }
  11760. };
  11761. function html_encode(str){
  11762. return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
  11763. };
  11764. function replaceNewLine(_992){
  11765. var regX=/\r\n|\r|\n/g;
  11766. var _994="<br/>";
  11767. return _992.replace(regX,_994);
  11768. };
  11769. function xml_encode(_995){
  11770. var _996=""+_995;
  11771. if((_996=="0")||((_995!=null)&&(_995!=false))){
  11772. _996=_996.replace(/&/g,"&amp;");
  11773. _996=_996.replace(/</g,"&lt;");
  11774. _996=_996.replace(/>/g,"&gt;");
  11775. _996=_996.replace(/"/g,"&quot;");
  11776. _996=_996.replace(/'/g,"&apos;");
  11777. }else{
  11778. if(_995==null){
  11779. _996="";
  11780. }
  11781. }
  11782. return _996;
  11783. };
  11784. function xml_decodeParser(sAll,_998){
  11785. var _999=sAll;
  11786. switch(_998){
  11787. case "amp":
  11788. _999="&";
  11789. break;
  11790. case "lt":
  11791. _999="<";
  11792. break;
  11793. case "gt":
  11794. _999=">";
  11795. break;
  11796. case "quot":
  11797. _999="\"";
  11798. break;
  11799. case "apos":
  11800. _999="'";
  11801. break;
  11802. }
  11803. return _999;
  11804. };
  11805. function xml_decode(_99a){
  11806. var _99b=""+_99a;
  11807. if((_99b=="0")||((_99a!=null)&&(_99a!=false))){
  11808. _99b=_99b.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
  11809. }else{
  11810. if(_99a==null){
  11811. _99b="";
  11812. }
  11813. }
  11814. return _99b;
  11815. };
  11816. function xpath_attr_encode(_99c){
  11817. var _99d=null;
  11818. if(_99c.indexOf("'")>=0&&_99c.indexOf("\"")>=0){
  11819. var _99e=_99c.split("\"");
  11820. _99d="concat(";
  11821. for(var i=0;i<_99e.length;++i){
  11822. if(i>0){
  11823. _99d+=",";
  11824. }
  11825. if(_99e[i].length>0){
  11826. _99d+=("\""+_99e[i]+"\"");
  11827. }else{
  11828. _99d+="'\"'";
  11829. }
  11830. }
  11831. _99d+=")";
  11832. }else{
  11833. if(_99c.indexOf("'")>=0){
  11834. _99d="\""+_99c+"\"";
  11835. }else{
  11836. _99d="'"+_99c+"'";
  11837. }
  11838. }
  11839. return _99d;
  11840. };
  11841. function getCognosViewerObjectString(sId){
  11842. return "oCV"+sId;
  11843. };
  11844. function getCognosViewerObjectRefAsString(sId){
  11845. return "window."+getCognosViewerObjectString(sId);
  11846. };
  11847. function getCognosViewerObjectRef(sId){
  11848. return window[getCognosViewerObjectString(sId)];
  11849. };
  11850. function getCognosViewerSCObjectString(sId){
  11851. return "oCVSC"+sId;
  11852. };
  11853. function getCognosViewerSCObjectRefAsString(sId){
  11854. return "window."+getCognosViewerSCObjectString(sId);
  11855. };
  11856. function getCognosViewerSCObjectRef(sId){
  11857. return window[getCognosViewerSCObjectString(sId)];
  11858. };
  11859. function cleanupGlobalObjects(sId){
  11860. cleanupVariable(getCognosViewerObjectString(sId));
  11861. cleanupVariable(getCognosViewerSCObjectString(sId));
  11862. };
  11863. function cleanupVariable(_9a7){
  11864. if(typeof window[_9a7]!="undefined"&&window[_9a7]){
  11865. if(isIE()){
  11866. eval("delete "+_9a7);
  11867. }else{
  11868. delete window[_9a7];
  11869. }
  11870. }
  11871. };
  11872. function loadClass(_9a8){
  11873. try{
  11874. var _9a9=eval("new "+_9a8+"();");
  11875. return _9a9;
  11876. }
  11877. catch(e){
  11878. return null;
  11879. }
  11880. };
  11881. function getElementsByClassName(oElm,_9ab,_9ac){
  11882. var _9ad=(_9ab=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9ab);
  11883. var _9ae=[];
  11884. var _9af=new RegExp("(^|\\s)"+_9ac+"(\\s|$)");
  11885. var _9b0=_9ad.length;
  11886. for(var i=0;i<_9b0;i++){
  11887. var _9b2=_9ad[i];
  11888. if(_9af.test(_9b2.className)){
  11889. _9ae.push(_9b2);
  11890. }
  11891. }
  11892. return _9ae;
  11893. };
  11894. function getImmediateLayoutContainerId(node){
  11895. var _9b4=node;
  11896. while(_9b4!=null){
  11897. if(_9b4.getAttribute&&_9b4.getAttribute("lid")!=null){
  11898. return _9b4.getAttribute("lid");
  11899. }
  11900. _9b4=_9b4.parentNode;
  11901. }
  11902. return null;
  11903. };
  11904. function getChildElementsByAttribute(oElm,_9b6,_9b7,_9b8){
  11905. return getDescendantElementsByAttribute(oElm,_9b6,_9b7,_9b8,true);
  11906. };
  11907. function getElementsByAttribute(oElm,_9ba,_9bb,_9bc,_9bd,_9be){
  11908. return getDescendantElementsByAttribute(oElm,_9ba,_9bb,_9bc,false,_9bd,_9be);
  11909. };
  11910. function getDescendantElementsByAttribute(oElm,_9c0,_9c1,_9c2,_9c3,_9c4,_9c5){
  11911. var _9c6=[];
  11912. var _9c7=null;
  11913. if(typeof _9c5==="undefined"){
  11914. _9c7=(typeof _9c2!="undefined")?new RegExp("(^|\\s)"+_9c2+"(\\s|$)","i"):null;
  11915. }else{
  11916. _9c7=_9c5;
  11917. }
  11918. if(typeof _9c0=="string"){
  11919. _9c0=[_9c0];
  11920. }
  11921. var _9c8=(oElm?_9c0.length:0);
  11922. for(var _9c9=0;_9c9<_9c8;_9c9++){
  11923. var _9ca=null;
  11924. if(_9c3){
  11925. if(_9c0[_9c9]=="*"&&oElm.all){
  11926. _9ca=oElm.childNodes;
  11927. }else{
  11928. _9ca=[];
  11929. var _9cb=oElm.childNodes;
  11930. for(var i=0;i<_9cb.length;++i){
  11931. if(_9cb[i].nodeName.toLowerCase()==_9c0[_9c9].toLowerCase()){
  11932. _9ca.push(_9cb[i]);
  11933. }
  11934. }
  11935. }
  11936. }else{
  11937. _9ca=(_9c0[_9c9]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9c0[_9c9]);
  11938. }
  11939. var _9cd=_9ca.length;
  11940. for(var idx=0;idx<_9cd;idx++){
  11941. var _9cf=_9ca[idx];
  11942. var _9d0=_9cf.getAttribute&&_9cf.getAttribute(_9c1);
  11943. if(_9d0!==null){
  11944. var _9d1=null;
  11945. if(typeof _9d0==="number"){
  11946. _9d1=String(_9d0);
  11947. }else{
  11948. if(typeof _9d0==="string"&&_9d0.length>0){
  11949. _9d1=_9d0;
  11950. }
  11951. }
  11952. if(_9d1!==null){
  11953. if(typeof _9c2=="undefined"||(_9c7&&_9c7.test(_9d1))){
  11954. _9c6.push(_9cf);
  11955. if(_9c4!=-1&&_9c6.length>_9c4){
  11956. return [];
  11957. }else{
  11958. if(_9c4==1&&_9c6.length==1){
  11959. return _9c6;
  11960. }
  11961. }
  11962. }
  11963. }
  11964. }
  11965. }
  11966. }
  11967. return _9c6;
  11968. };
  11969. function savedOutputDoneLoading(cvId,_9d3){
  11970. var oCV=window["oCV"+cvId];
  11971. var _9d5=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
  11972. var _9d6=(_9d5?_9d5.getSavedOutput():null);
  11973. if(_9d6){
  11974. _9d6.outputDoneLoading();
  11975. }else{
  11976. if(_9d3<5){
  11977. _9d3++;
  11978. var _9d7=function(){
  11979. savedOutputDoneLoading(cvId,_9d3);
  11980. };
  11981. setTimeout(_9d7,100);
  11982. }
  11983. }
  11984. };
  11985. function getNavVer(){
  11986. var temp;
  11987. if(isIE()){
  11988. return getIEVersion();
  11989. }else{
  11990. temp=navigator.userAgent.split("/");
  11991. return parseFloat(temp[temp.length-1]);
  11992. }
  11993. };
  11994. function isSafari(){
  11995. return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1);
  11996. };
  11997. function isIE(){
  11998. return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
  11999. };
  12000. function getIEVersion(){
  12001. var _9d9=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
  12002. return _9d9?parseFloat(_9d9[1]):null;
  12003. };
  12004. function isFF(){
  12005. return (navigator.userAgent.indexOf("Firefox")!=-1);
  12006. };
  12007. function isIOS(){
  12008. return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1;
  12009. };
  12010. function displayChart(_9da,_9db,_9dc,_9dd){
  12011. if(_9db.length>1){
  12012. document.images[_9da].src=_9db;
  12013. }
  12014. };
  12015. function isFlashChartNode(evt){
  12016. var node=getNodeFromEvent(evt);
  12017. if(node!=null&&typeof node.getAttribute=="function"){
  12018. return node.getAttribute("flashChart")!=null;
  12019. }
  12020. return false;
  12021. };
  12022. function onFlashChartRightClick(evt){
  12023. if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){
  12024. return onViewerChartFocus(evt);
  12025. }
  12026. };
  12027. function onViewerChartFocus(evt){
  12028. if(evt.stopPropagation){
  12029. evt.stopPropagation();
  12030. }
  12031. if(evt.preventDefault){
  12032. evt.preventDefault();
  12033. }
  12034. if(evt.preventCapture){
  12035. evt.preventCapture();
  12036. }
  12037. if(evt.preventBubble){
  12038. evt.preventBubble();
  12039. }
  12040. var node=getNodeFromEvent(evt);
  12041. var _9e3=node.getAttribute("viewerId");
  12042. if(!_9e3){
  12043. _9e3=node.parentNode.getAttribute("viewerId");
  12044. }
  12045. if(!_9e3){
  12046. return;
  12047. }
  12048. var oCV=window["oCV"+_9e3];
  12049. var _9e5=oCV.getAction("Selection");
  12050. _9e5.pageClicked(evt);
  12051. return stopEventBubble(evt);
  12052. };
  12053. function clientToScreenCoords(_9e6,_9e7){
  12054. var _9e8=_9e6;
  12055. var _9e9={topCoord:0,leftCoord:0};
  12056. while(_9e8!=null&&_9e8!=_9e7){
  12057. _9e9.topCoord+=_9e8.offsetTop;
  12058. _9e9.leftCoord+=_9e8.offsetLeft;
  12059. _9e8=_9e8.offsetParent;
  12060. }
  12061. return _9e9;
  12062. };
  12063. function getCurrentPosistionString(oCV,_9eb,_9ec){
  12064. var _9ed=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
  12065. var _9ee=/\{0\}/;
  12066. var _9ef=/\{1\}/;
  12067. _9ed=_9ed.replace(_9ee,_9eb);
  12068. _9ed=" "+_9ed.replace(_9ef,_9ec)+" ";
  12069. return _9ed;
  12070. };
  12071. function applyJSONProperties(obj,_9f1){
  12072. for(property in _9f1){
  12073. if(typeof _9f1[property]=="object"&&!(_9f1[property] instanceof Array)){
  12074. if(typeof obj[property]=="undefined"){
  12075. obj[property]={};
  12076. }
  12077. applyJSONProperties(obj[property],_9f1[property]);
  12078. }else{
  12079. obj[property]=_9f1[property];
  12080. }
  12081. }
  12082. };
  12083. function CViewerCommon(){
  12084. };
  12085. CViewerCommon.openNewWindowOrTab=function(sURL,_9f3){
  12086. return window.open(sURL,_9f3);
  12087. };
  12088. CViewerCommon.toJSON=function(obj){
  12089. var type=typeof (obj);
  12090. if(type!="object"||type===null){
  12091. if(type==="string"){
  12092. obj="\""+obj+"\"";
  12093. }
  12094. return String(obj);
  12095. }else{
  12096. var _9f6;
  12097. var prop;
  12098. var json=[];
  12099. var _9f9=(obj&&obj.constructor==Array);
  12100. for(_9f6 in obj){
  12101. prop=obj[_9f6];
  12102. type=typeof (prop);
  12103. if(type==="string"){
  12104. prop="\""+prop+"\"";
  12105. }else{
  12106. if(type=="object"&&prop!==null){
  12107. prop=CViewerCommon.toJSON(prop);
  12108. }
  12109. }
  12110. json.push((_9f9?"":"\""+_9f6+"\":")+String(prop));
  12111. }
  12112. return (_9f9?"[":"{")+String(json)+(_9f9?"]":"}");
  12113. }
  12114. };
  12115. function resizePinnedContainers(){
  12116. var oCV=window.gaRV_INSTANCES[0];
  12117. if(oCV&&!oCV.m_viewerFragment){
  12118. var _9fb=oCV.getPinFreezeManager();
  12119. if(_9fb&&_9fb.hasFrozenContainers()){
  12120. var _9fc=document.getElementById("RVContent"+oCV.getId());
  12121. var _9fd=document.getElementById("mainViewerTable"+oCV.getId());
  12122. var _9fe=_9fc.clientWidth;
  12123. var _9ff=_9fd.clientHeight;
  12124. _9fb.resize(_9fe,_9ff);
  12125. if(isIE()){
  12126. oCV.repaintDiv(_9fc);
  12127. }
  12128. }
  12129. }
  12130. };
  12131. function setWindowHref(url){
  12132. var _a01=window.onbeforeunload;
  12133. window.onbeforeunload=null;
  12134. window.location.href=url;
  12135. window.onbeforeunload=_a01;
  12136. };
  12137. CViewerCommon.getMessage=function(msg,args){
  12138. if(typeof args=="undefined"){
  12139. return msg;
  12140. }else{
  12141. if(typeof args=="string"){
  12142. msg=msg.replace("{0}",args);
  12143. }else{
  12144. if(args.length){
  12145. for(var i=0;i<args.length;++i){
  12146. msg=msg.replace("{"+i+"}",args[i]);
  12147. }
  12148. }else{
  12149. msg=msg.replace("{0}",args);
  12150. }
  12151. }
  12152. }
  12153. return msg;
  12154. };
  12155. function getViewerDirection(){
  12156. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12157. return gaRV_INSTANCES[0].getDirection();
  12158. }
  12159. return "ltr";
  12160. };
  12161. function isViewerBidiEnabled(){
  12162. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12163. var _a05=gaRV_INSTANCES[0].isBidiEnabled();
  12164. if(_a05){
  12165. return true;
  12166. }
  12167. }
  12168. return false;
  12169. };
  12170. function getViewerBaseTextDirection(){
  12171. if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
  12172. return gaRV_INSTANCES[0].getBaseTextDirection();
  12173. }
  12174. return "";
  12175. };
  12176. function enforceTextDir(_a06){
  12177. if(isViewerBidiEnabled()&&_a06){
  12178. var sDir=getViewerBaseTextDirection();
  12179. var _a08=BidiUtils.getInstance();
  12180. if(sDir=="auto"){
  12181. sDir=_a08.resolveStrBtd(_a06);
  12182. }
  12183. var _a09=(!dojo._isBodyLtr())?_a08.RLM:_a08.LRM;
  12184. return _a09+((sDir==="rtl")?_a08.RLE:_a08.LRE)+_a06+_a08.PDF+_a09;
  12185. }
  12186. return _a06;
  12187. };
  12188. function getElementDirection(_a0a){
  12189. var dir=null;
  12190. if(_a0a.currentStyle){
  12191. dir=_a0a.currentStyle.direction;
  12192. }else{
  12193. if(window.getComputedStyle){
  12194. var _a0c=window.getComputedStyle(_a0a,null);
  12195. if(_a0c){
  12196. dir=_a0c.getPropertyValue("direction");
  12197. }
  12198. }
  12199. }
  12200. if(dir){
  12201. dir=dir.toLowerCase();
  12202. }
  12203. return dir;
  12204. };
  12205. function getScrollLeft(_a0d){
  12206. if(getElementDirection(_a0d)==="rtl"&&isFF()){
  12207. return _a0d.scrollWidth-_a0d.offsetWidth+_a0d.scrollLeft;
  12208. }
  12209. return _a0d.scrollLeft;
  12210. };
  12211. function setScrollLeft(_a0e,_a0f){
  12212. if(getElementDirection(_a0e)==="rtl"&&isFF()){
  12213. _a0e.scrollLeft=_a0e.offsetWidth+_a0f-_a0e.scrollWidth;
  12214. }else{
  12215. _a0e.scrollLeft=_a0f;
  12216. }
  12217. };
  12218. function setScrollRight(_a10,_a11){
  12219. if(getElementDirection(_a10)==="rtl"&&isFF()){
  12220. _a10.scrollLeft=-_a11;
  12221. }else{
  12222. _a10.scrollLeft=_a10.scrollWidth-_a10.offsetWidth-_a11;
  12223. }
  12224. };
  12225. function getBoxInfo(el,_a13){
  12226. if(!getBoxInfo.aStyles){
  12227. 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"}];
  12228. }
  12229. var _a14={};
  12230. var _a15=null;
  12231. if(el.currentStyle){
  12232. _a15=el.currentStyle;
  12233. }else{
  12234. if(window.getComputedStyle){
  12235. _a15=window.getComputedStyle(el,null);
  12236. }
  12237. }
  12238. if(!_a15){
  12239. return null;
  12240. }
  12241. for(i in getBoxInfo.aStyles){
  12242. var _a16=getBoxInfo.aStyles[i];
  12243. var size=null;
  12244. if(_a15.getPropertyValue){
  12245. size=_a15.getPropertyValue(_a16.ff);
  12246. }else{
  12247. size=_a15[_a16.ie];
  12248. }
  12249. if(size&&_a13){
  12250. size=Number(size.replace("px",""));
  12251. }
  12252. _a14[_a16.name]=size;
  12253. }
  12254. return _a14;
  12255. };
  12256. if(!CViewerCommon){
  12257. var CViewerCommon={};
  12258. }
  12259. CViewerCommon.buildParameterValuesSpec=function(oCV){
  12260. var _a19=XMLBuilderLoadXMLFromString(oCV.getExecutionParameters());
  12261. var _a1a=new CParameterValues();
  12262. if(_a19.childNodes.length==1){
  12263. _a1a.loadWithOptions(_a19.childNodes[0],false);
  12264. }
  12265. var _a1b=_a1a.length();
  12266. var _a1c="<pvs>";
  12267. if(_a1b>0){
  12268. var _a1d=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN);
  12269. for(var _a1e=0;_a1e<_a1b;++_a1e){
  12270. var _a1f=_a1a.getAt(_a1e);
  12271. if(_a1f!=null){
  12272. _a1c+="<pv>";
  12273. _a1c+="<name>";
  12274. _a1c+=xml_encode(_a1f.name());
  12275. _a1c+="</name>";
  12276. _a1c+="<value>";
  12277. _a1c+=xml_encode(_a1f.toString(_a1d));
  12278. _a1c+="</value>";
  12279. _a1c+="</pv>";
  12280. }
  12281. }
  12282. }
  12283. _a1c+="</pvs>";
  12284. return _a1c;
  12285. };
  12286. function PinFreezeContainer(_a20,lid,_a22,_a23,_a24,_a25,_a26){
  12287. this.m_pinFreezeManager=_a20;
  12288. this.m_lid=lid;
  12289. this.m_lidNS=lid+_a22+_a26;
  12290. this.m_viewerId=_a22;
  12291. this.m_freezeTop=_a23;
  12292. this.m_freezeSide=_a24;
  12293. this.m_cachedReportDiv=null;
  12294. this.m_cachedPFContainer=null;
  12295. this.m_cachedBaseContainer=_a25;
  12296. this.m_containerMargin={"top":0,"left":0};
  12297. if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){
  12298. if(this.m_cachedBaseContainer.style.marginTop){
  12299. this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px",""));
  12300. }
  12301. if(this.m_cachedBaseContainer.style.marginLeft){
  12302. this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px",""));
  12303. }
  12304. }
  12305. this.m_cachedContainerIndex=_a26;
  12306. this.m_sectionCache=null;
  12307. this.m_homeCellNodes={};
  12308. this.m_fixedWidth=null;
  12309. this.m_clientWidth=700;
  12310. this.m_scrollableClientWidth=700;
  12311. this.m_fixedHeight=null;
  12312. this.m_clientHeight=300;
  12313. this.m_scrollableClientHeight=300;
  12314. this.m_wrapFlag=false;
  12315. this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20;
  12316. this.touchScrollSections=false;
  12317. this.touchPreviousX=-1;
  12318. this.touchPreviousY=-1;
  12319. };
  12320. PinFreezeContainer.prototype.toJSONString=function(){
  12321. var _a27="{";
  12322. _a27+="\"m_clientWidth\":"+this.m_clientWidth+"";
  12323. _a27+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
  12324. _a27+=",\"m_clientHeight\":"+this.m_clientHeight+"";
  12325. _a27+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
  12326. _a27+="}";
  12327. return _a27;
  12328. };
  12329. PinFreezeContainer.prototype.copyProperties=function(_a28){
  12330. this.m_clientWidth=_a28.m_clientWidth;
  12331. this.m_scrollableClientWidth=_a28.m_scrollableClientWidth;
  12332. this.m_clientHeight=_a28.m_clientHeight;
  12333. this.m_scrollableClientHeight=_a28.m_scrollableClientHeight;
  12334. };
  12335. PinFreezeContainer.prototype.setViewerId=function(id){
  12336. this.m_viewerId=id;
  12337. };
  12338. PinFreezeContainer.prototype.getLid=function(){
  12339. return this.m_lid;
  12340. };
  12341. PinFreezeContainer.prototype.createPFContainer=function(_a2a,_a2b){
  12342. var _a2c=document.createElement("temp");
  12343. if(this.m_cachedBaseContainer){
  12344. this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
  12345. this.m_cachedReportDiv=_a2a;
  12346. var _a2d=this.m_cachedBaseContainer.parentNode;
  12347. var _a2e=this.loadTemplateHTML();
  12348. if(_a2e){
  12349. _a2c.innerHTML=_a2e;
  12350. var _a2f=this.getContainerByLID(_a2c);
  12351. var _a30=this.getSectionByLID(_a2c.firstChild,"pfMainOutput");
  12352. if(_a30){
  12353. var i=this.getChildPosition(_a2d,this.m_cachedBaseContainer);
  12354. if(i!=-1){
  12355. var _a32=this.m_pinFreezeManager.m_oCV;
  12356. if(_a32&&_a32.envParams["freezeDefaultWrap"]){
  12357. if(this.m_cachedBaseContainer.style.whiteSpace===""&&_a32.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
  12358. var _a33=this.m_cachedBaseContainer.getElementsByTagName("span");
  12359. if(_a33){
  12360. for(var k=0;k<_a33.length;k++){
  12361. _a33[k].style.whiteSpace="nowrap";
  12362. }
  12363. }
  12364. this.m_wrapFlag=true;
  12365. }
  12366. }
  12367. if(!_a2b){
  12368. if(!this._getFixedWidth()){
  12369. this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false");
  12370. this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1;
  12371. this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px";
  12372. }
  12373. if(!this._getFixedHeight()){
  12374. this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false");
  12375. this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight;
  12376. this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px";
  12377. }
  12378. _a30.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
  12379. _a30.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
  12380. }
  12381. _a30.appendChild(this.m_cachedBaseContainer);
  12382. this.insertAt(_a2d,_a2f,i);
  12383. }
  12384. if(this.m_cachedBaseContainer.style.border!==""){
  12385. _a2f.style.border=this.m_cachedBaseContainer.style.border;
  12386. this.m_cachedBaseContainer.style.border="";
  12387. }
  12388. }
  12389. }
  12390. }
  12391. };
  12392. PinFreezeContainer.prototype._getFixedWidth=function(_a35){
  12393. if(_a35&&_a35.style.width&&!_a35.getAttribute("authoredFixedWidth")){
  12394. var _a36=Number(_a35.style.width.split("px")[0]);
  12395. return isNaN(_a36)?null:_a36;
  12396. }
  12397. return null;
  12398. };
  12399. PinFreezeContainer.prototype._getFixedHeight=function(_a37){
  12400. if(_a37&&_a37.style.height&&!_a37.getAttribute("authoredFixedHeight")){
  12401. var _a38=Number(_a37.style.height.split("px")[0]);
  12402. return isNaN(_a38)?null:_a38;
  12403. }
  12404. return null;
  12405. };
  12406. PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_a39){
  12407. var _a3a=this._getFixedWidth(_a39);
  12408. if(_a3a){
  12409. this.m_fixedWidth=_a3a;
  12410. this.m_clientWidth=this.m_fixedWidth;
  12411. this.m_scrollableClientWidth=this.m_fixedWidth;
  12412. }
  12413. var _a3b=this._getFixedHeight(_a39);
  12414. if(_a3b){
  12415. this.m_fixedHeight=_a3b;
  12416. this.m_clientHeight=this.m_fixedHeight;
  12417. this.m_scrollableClientHeight=this.m_fixedHeight;
  12418. }
  12419. };
  12420. PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
  12421. var _a3c="<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>";
  12422. return _a3c;
  12423. };
  12424. PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
  12425. var _a3d="<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>";
  12426. return _a3d;
  12427. };
  12428. PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
  12429. var _a3e="<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>";
  12430. return _a3e;
  12431. };
  12432. PinFreezeContainer.prototype.loadTemplateHTML=function(){
  12433. if(this.m_freezeSide&&this.m_freezeTop){
  12434. return this.loadFreezeBothTemplateHTML();
  12435. }else{
  12436. if(this.m_freezeSide){
  12437. return this.loadFreezeSideTemplateHTML();
  12438. }else{
  12439. if(this.m_freezeTop){
  12440. return this.loadFreezeTopTemplateHTML();
  12441. }
  12442. }
  12443. }
  12444. return null;
  12445. };
  12446. PinFreezeContainer.prototype.createSideHeadings=function(_a3f){
  12447. var _a40=this.getSection("pfMainOutput");
  12448. var _a41=_a40.getAttribute("pfslid");
  12449. var _a42=this.getSection("pfSideHeadings");
  12450. var _a43=_a42.getAttribute("pfslid");
  12451. var _a44=this.getMainOutputHomeCell();
  12452. if(!_a44){
  12453. return;
  12454. }
  12455. var _a45=_a3f;
  12456. var _a46=_a42;
  12457. var _a47=this.isA11yEnabled(_a45);
  12458. var _a48=this.m_pinFreezeManager.deepCloneNode(_a45);
  12459. _a46.appendChild(_a48);
  12460. var _a49=this.getSectionHomeCell(_a42);
  12461. if(!_a49){
  12462. return;
  12463. }
  12464. var _a4a=_a45.getElementsByTagName("tbody");
  12465. var _a4b=_a48.getElementsByTagName("tbody");
  12466. if(_a4a.length>0&&_a4b.length>0){
  12467. var _a4c=_a4a[0];
  12468. var _a4d=_a4b[0];
  12469. var _a4e=_a4c.firstChild;
  12470. var _a4f=_a4d.firstChild;
  12471. var _a50=_a44.rowSpan;
  12472. this.markAsCopy(_a44,_a49,_a41,_a43);
  12473. for(var r=0;r<_a50;++r){
  12474. var _a52=_a4d.rows[r];
  12475. this.removeCTX(_a52);
  12476. }
  12477. for(var r=_a50;r<_a4d.rows.length;++r){
  12478. var _a53=_a4c.rows[r];
  12479. var _a52=_a4d.rows[r];
  12480. _a52.style.visibility="hidden";
  12481. for(var c=0;c<_a52.cells.length;++c){
  12482. var _a55=_a52.cells[c];
  12483. if(_a47){
  12484. _a55=this.m_pinFreezeManager.removeIdAttribute(_a55);
  12485. }
  12486. if(_a55.getAttribute("type")=="datavalue"){
  12487. _a55.removeAttribute("ctx");
  12488. _a55.removeAttribute("uid");
  12489. _a55.removeAttribute("name");
  12490. }else{
  12491. var _a56=_a53.cells[c];
  12492. this.markAsCopy(_a56,_a55,_a41,_a43);
  12493. }
  12494. }
  12495. _a52.style.visibility="visible";
  12496. }
  12497. }
  12498. };
  12499. PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_a57,_a58){
  12500. if(isFF()||isIE()){
  12501. if(_a57&&_a57.length&&_a57[0].cells&&_a57[0].cells.length>1){
  12502. if(this.m_freezeSide){
  12503. var _a59=this.getBorderInfo(_a57[0].cells[1],"right");
  12504. if(_a59){
  12505. _a58.style.borderRightWidth=_a59.borderRightWidth;
  12506. _a58.style.borderRightStyle=_a59.borderRightStyle;
  12507. _a58.style.borderRightColor=_a59.borderRightColor;
  12508. }
  12509. }
  12510. if(this.m_freezeTop){
  12511. var _a59=this.getBorderInfo(_a57[0].cells[1],"bottom");
  12512. if(_a59){
  12513. _a58.style.borderBottomWidth=_a59.borderBottomWidth;
  12514. _a58.style.borderBottomStyle=_a59.borderBottomStyle;
  12515. _a58.style.borderBottomColor=_a59.borderBottomColor;
  12516. }
  12517. }
  12518. }
  12519. }
  12520. };
  12521. PinFreezeContainer.prototype.createTopHeadings=function(_a5a){
  12522. var _a5b=this.getSection("pfMainOutput");
  12523. var _a5c=_a5b.getAttribute("pfslid");
  12524. var _a5d=this.getSection("pfTopHeadings");
  12525. var _a5e=_a5d.getAttribute("pfslid");
  12526. var _a5f=this.getMainOutputHomeCell();
  12527. if(!_a5f){
  12528. return;
  12529. }
  12530. var _a60=_a5a;
  12531. var _a61=_a5d;
  12532. var _a62=this.isA11yEnabled(_a60);
  12533. var _a63=this.m_pinFreezeManager.deepCloneNode(_a60);
  12534. _a63.setAttribute("clonednode","true");
  12535. _a61.appendChild(_a63);
  12536. var _a64=_a60.getElementsByTagName("tbody");
  12537. var _a65=_a63.getElementsByTagName("tbody");
  12538. if(_a64.length>0&&_a65.length>0){
  12539. var _a66=_a64[0];
  12540. var _a67=_a65[0];
  12541. var _a68=_a5f.rowSpan;
  12542. for(var r=0;r<_a67.rows.length;++r){
  12543. var _a6a=_a66.rows[r];
  12544. var _a6b=_a67.rows[r];
  12545. if(_a62){
  12546. _a6b=this.m_pinFreezeManager.removeIdAttribute(_a6b);
  12547. }
  12548. _a6b.style.visibility="hidden";
  12549. for(var c=0;c<_a6b.cells.length;++c){
  12550. var _a6d=_a6b.cells[c];
  12551. if(r>_a68||_a6d.getAttribute("type")=="datavalue"){
  12552. _a6d.removeAttribute("ctx");
  12553. _a6d.removeAttribute("uid");
  12554. _a6d.removeAttribute("name");
  12555. }else{
  12556. var _a6e=_a6a.cells[c];
  12557. this.markAsCopy(_a6e,_a6d,_a5c,_a5e);
  12558. if(_a6e===_a5f){
  12559. this.initializeHomeCellTabIndex(_a6d);
  12560. this.applyNeighbouringBorderStylesToHomeCell(_a66.rows,_a6d);
  12561. }
  12562. }
  12563. }
  12564. _a6b.style.visibility="visible";
  12565. }
  12566. }
  12567. };
  12568. PinFreezeContainer.prototype.createHomeCellHeading=function(){
  12569. var _a6f=this.getSection("pfMainOutput");
  12570. var _a70=_a6f.getAttribute("pfslid");
  12571. var _a71=this.getSection("pfHomeCell");
  12572. var _a72=_a71.parentNode;
  12573. var _a73=_a71.getAttribute("pfslid");
  12574. var _a74=this.getMainOutputHomeCell();
  12575. if(!_a74){
  12576. return;
  12577. }
  12578. _a72.style.height="100%";
  12579. var _a75=this.getTopHeadingSectionHeight(_a74);
  12580. _a71.style.height=_a75-this.m_containerMargin.top+"px";
  12581. _a71.style.width=this.getSideHeadingSectionWidth(_a74)-this.m_containerMargin.left+"px";
  12582. _a71.style.marginTop=this.m_containerMargin.top+"px";
  12583. _a71.style.marginLeft=this.m_containerMargin.left+"px";
  12584. var _a76=_a74.parentNode;
  12585. var _a77=_a76.cloneNode(false);
  12586. var _a78=this._findBestGuessHomeCell(_a74);
  12587. var _a79=document.createElement("div");
  12588. _a79.style.width="100%";
  12589. _a79.style.height="100%";
  12590. while(_a74.offsetLeft<=_a78.offsetLeft){
  12591. oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_a74);
  12592. if(isFF()||isIE()){
  12593. _a74.appendChild(_a79);
  12594. oTargetHomeCell.style.width=_a79.clientWidth+"px";
  12595. _a74.removeChild(_a79);
  12596. }else{
  12597. oTargetHomeCell.style.width=_a74.clientWidth+1+"px";
  12598. }
  12599. oTargetHomeCell.style.borderBottomWidth="0px";
  12600. _a77.appendChild(oTargetHomeCell);
  12601. this.markAsCopy(_a74,oTargetHomeCell,_a70,_a73);
  12602. if(_a74.nextSibling){
  12603. _a74=_a74.nextSibling;
  12604. }else{
  12605. break;
  12606. }
  12607. }
  12608. if(oTargetHomeCell){
  12609. oTargetHomeCell.style.borderRightWidth="0px";
  12610. }
  12611. var _a7a=_a76.parentNode;
  12612. var _a7b=_a7a.cloneNode(false);
  12613. _a7b.appendChild(_a77);
  12614. var _a7c=_a7a.parentNode;
  12615. var _a7d=_a7c.cloneNode(false);
  12616. _a7d.appendChild(_a7b);
  12617. _a7d.style.width="100%";
  12618. _a7d.style.height="100%";
  12619. _a7d.style.marginLeft="";
  12620. _a7d.style.marginTop="";
  12621. _a71.appendChild(_a7d);
  12622. this.initializeHomeCellTabIndex(oTargetHomeCell);
  12623. this.applyNeighbouringBorderStylesToHomeCell(_a6f.firstChild.rows,_a71);
  12624. };
  12625. PinFreezeContainer.prototype.markAsCopy=function(main,copy,_a80,_a81){
  12626. if(!main.pfCopy){
  12627. main.setAttribute("pfslid",_a80);
  12628. main.pfCopy=[];
  12629. }
  12630. main.pfCopy.push(copy);
  12631. copy.pfMain=main;
  12632. copy.setAttribute("pfslid",_a81);
  12633. };
  12634. PinFreezeContainer.prototype.getCopy=function(_a82){
  12635. if(_a82.pfCopy){
  12636. var _a83={};
  12637. for(var i in _a82.pfCopy){
  12638. var copy=_a82.pfCopy[i];
  12639. if(copy.getAttribute){
  12640. var _a86=copy.getAttribute("pfslid");
  12641. if(_a86){
  12642. var _a87=PinFreezeContainer.getSectionNameFromSlid(_a86);
  12643. var _a88=this.getSection(_a87);
  12644. if(_a88&&PinFreezeContainer.isSectionVisible(_a88)){
  12645. _a83[_a87]=copy;
  12646. }
  12647. }
  12648. }
  12649. }
  12650. if(_a83["pfHomeCell"]){
  12651. return _a83["pfHomeCell"];
  12652. }
  12653. for(i in _a83){
  12654. return _a83[i];
  12655. }
  12656. }
  12657. return null;
  12658. };
  12659. PinFreezeContainer.prototype.getMain=function(_a89){
  12660. if(_a89.pfMain){
  12661. return _a89.pfMain;
  12662. }
  12663. return null;
  12664. };
  12665. PinFreezeContainer.isSectionVisible=function(_a8a){
  12666. var node=_a8a;
  12667. if(!node){
  12668. return false;
  12669. }
  12670. while(node.parentNode&&!node.getAttribute("pfclid")){
  12671. if(node.style&&node.style.display==="none"){
  12672. return false;
  12673. }
  12674. node=node.parentNode;
  12675. }
  12676. return (!node.style||node.style.display!=="none");
  12677. };
  12678. PinFreezeContainer.prototype.getSectionStructure=function(){
  12679. var _a8c={isSideFrozen:false,isTopFrozen:false};
  12680. if(this.m_freezeSide){
  12681. var side=this.getSection("pfSideHeadings");
  12682. if(side){
  12683. _a8c.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
  12684. }
  12685. }
  12686. if(this.m_freezeTop){
  12687. var top=this.getSection("pfTopHeadings");
  12688. if(top){
  12689. _a8c.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
  12690. }
  12691. }
  12692. return _a8c;
  12693. };
  12694. PinFreezeContainer.prototype.checkSectionStructureChange=function(_a8f,_a90){
  12695. if(_a8f.isSideFrozen!==_a90.isSideFrozen||_a8f.isTopFrozen!==_a90.isTopFrozen){
  12696. this.m_pinFreezeManager.sectionStructureChange();
  12697. }
  12698. };
  12699. PinFreezeContainer.prototype.freezeContainerInReport=function(_a91){
  12700. this.cacheContainerAndSections(this.getContainerByLID(_a91));
  12701. this.m_homeCellNodes={};
  12702. this.updateContainer();
  12703. };
  12704. PinFreezeContainer.prototype.frozenSectionsRequired=function(){
  12705. return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
  12706. };
  12707. PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
  12708. var _a92=this.getSection("pfMainOutput");
  12709. if(_a92){
  12710. if(this.m_freezeSide){
  12711. var _a93=_a92.scrollWidth;
  12712. return ((this.m_clientWidth<_a93)||_a93==0);
  12713. }
  12714. }
  12715. return false;
  12716. };
  12717. PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
  12718. var _a94=this.getSection("pfMainOutput");
  12719. if(_a94){
  12720. if(this.m_freezeTop){
  12721. var _a95=_a94.scrollHeight;
  12722. return ((this.m_clientHeight<_a95)||_a95==0);
  12723. }
  12724. }
  12725. return false;
  12726. };
  12727. PinFreezeContainer.prototype.showTemplatePart=function(_a96,_a97){
  12728. var _a98=this.getContainer().rows;
  12729. for(var r=0;r<_a98.length;++r){
  12730. if(_a98[r].getAttribute("templatePart")===_a96){
  12731. _a98[r].style.display=((_a97)?"":"none");
  12732. }else{
  12733. var _a9a=_a98[r].cells;
  12734. for(var c=0;c<_a9a.length;++c){
  12735. if(_a9a[c].getAttribute("templatePart")===_a96){
  12736. _a9a[c].style.display=((_a97)?"":"none");
  12737. }
  12738. }
  12739. }
  12740. }
  12741. };
  12742. PinFreezeContainer.prototype.showFreezeTopOnly=function(_a9c){
  12743. if(!(this.m_freezeTop&&this.m_freezeSide)){
  12744. return;
  12745. }
  12746. var _a9d=(_a9c.scrollWidth==0)?_a9c.clientWidth:_a9c.scrollWidth;
  12747. this.updateMainOutputWidth(_a9d);
  12748. this.setScrollX(_a9c,0);
  12749. if(this.getSection("pfTopHeadings")){
  12750. this.getSection("pfTopHeadings").style.width=_a9d+"px";
  12751. this.setScrollX(this.getSection("pfTopHeadings"),0);
  12752. }
  12753. this.showTemplatePart("freezeSide",false);
  12754. };
  12755. PinFreezeContainer.prototype.showFreezeSideOnly=function(_a9e){
  12756. if(!(this.m_freezeTop&&this.m_freezeSide)){
  12757. return;
  12758. }
  12759. var _a9f=(_a9e.scrollHeight==0)?_a9e.clientHeight:_a9e.scrollHeight;
  12760. this.updateMainOutputHeight(_a9f);
  12761. this.setScrollY(_a9e,0);
  12762. if(this.getSection("pfSideHeadings")){
  12763. this.getSection("pfSideHeadings").style.height=_a9f+"px";
  12764. this.setScrollY(this.getSection("pfSideHeadings"),0);
  12765. }
  12766. this.showTemplatePart("freezeTop",false);
  12767. };
  12768. PinFreezeContainer.prototype.showAll=function(){
  12769. if(!(this.m_freezeTop&&this.m_freezeSide)){
  12770. return;
  12771. }
  12772. this.showTemplatePart("freezeTop",true);
  12773. this.showTemplatePart("freezeSide",true);
  12774. };
  12775. PinFreezeContainer.prototype.showMainOutputOnly=function(_aa0){
  12776. this.updateMainOutputWidth((_aa0.scrollWidth==0)?_aa0.clientWidth:_aa0.scrollWidth);
  12777. this.updateMainOutputHeight((_aa0.scrollHeight==0)?_aa0.clientHeight:_aa0.scrollHeight);
  12778. this.setInitialScrollPosition(_aa0,0,0);
  12779. if(this.m_freezeSide&&this.m_freezeTop){
  12780. this.getSection("pfHomeCell").style.display="none";
  12781. }
  12782. if(this.m_freezeSide){
  12783. this.getSection("pfSideHeadings").style.display="none";
  12784. this.getSection("pfHorizontalScrollBar").style.display="none";
  12785. }
  12786. if(this.m_freezeTop){
  12787. this.getSection("pfTopHeadings").style.display="none";
  12788. this.getSection("pfVerticalScrollBar").style.display="none";
  12789. }
  12790. };
  12791. PinFreezeContainer.prototype.getWrap=function(el){
  12792. if(el.currentStyle){
  12793. return el.currentStyle.whiteSpace;
  12794. }else{
  12795. if(window.getComputedStyle){
  12796. return window.getComputedStyle(el,null).getPropertyValue("white-space");
  12797. }else{
  12798. return el.style.whiteSpace;
  12799. }
  12800. }
  12801. };
  12802. PinFreezeContainer.prototype.getStyleDisplay=function(el){
  12803. if(el.currentStyle){
  12804. return el.currentStyle.display;
  12805. }else{
  12806. if(window.getComputedStyle){
  12807. return window.getComputedStyle(el,null).getPropertyValue("display");
  12808. }else{
  12809. return el.style.display;
  12810. }
  12811. }
  12812. };
  12813. PinFreezeContainer.prototype.headingsCreated=function(_aa3){
  12814. return _aa3.firstChild?true:false;
  12815. };
  12816. PinFreezeContainer.prototype.updateContainer=function(){
  12817. var _aa4=this.getSection("pfMainOutput");
  12818. var _aa5=this.getMainOutputHomeCell();
  12819. if(_aa5){
  12820. if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
  12821. this.m_scrollableClientHeight-=_aa5.offsetHeight;
  12822. var _aa6=this.calculateMinCrossTabScrollableClientHeight();
  12823. if(_aa6>this.m_scrollableClientHeight){
  12824. this.m_scrollableClientHeight=_aa6;
  12825. }
  12826. }
  12827. if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
  12828. this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_aa5);
  12829. }
  12830. }
  12831. if(_aa4&&_aa5){
  12832. this.showAll();
  12833. if(this.frozenSectionsRequired()){
  12834. this.updateMainOutputSize();
  12835. this.initializeHomeCellTabIndex(_aa5);
  12836. if(this.m_freezeSide){
  12837. var _aa7=this.getSection("pfSideHeadings");
  12838. if(!this.headingsCreated(_aa7)){
  12839. this.createSideHeadings(this.m_cachedBaseContainer);
  12840. if(this.m_freezeTop){
  12841. this.initializeTouchScrolling(_aa7);
  12842. }
  12843. }
  12844. var _aa8=this.getSection("pfHorizontalScrollBar");
  12845. _aa8.scrollLeft="0px";
  12846. }
  12847. if(this.m_freezeTop){
  12848. var _aa9=this.getSection("pfTopHeadings");
  12849. if(!this.headingsCreated(_aa9)){
  12850. this.createTopHeadings(this.m_cachedBaseContainer);
  12851. if(this.m_freezeSide){
  12852. this.initializeTouchScrolling(_aa9);
  12853. }
  12854. }
  12855. var _aaa=this.getSection("pfVerticalScrollBar");
  12856. _aaa.scrollTop="0px";
  12857. }
  12858. if(this.m_freezeSide&&this.m_freezeTop){
  12859. var _aab=this.getSection("pfHomeCell");
  12860. if(!this.headingsCreated(_aab)){
  12861. this.createHomeCellHeading();
  12862. }
  12863. _aab.style.display="";
  12864. }
  12865. var _aac=this.updateSideHeadingSize(_aa5);
  12866. var _aad=this.updateTopHeadingSize(_aa5);
  12867. if(!this.frozenSectionsRequired()){
  12868. this.showMainOutputOnly(_aa4);
  12869. }
  12870. this.setInitialScrollPosition(_aa4,_aac,_aad);
  12871. if(this.m_freezeTop&&this.m_freezeSide){
  12872. this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_aad);
  12873. this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_aac,0);
  12874. }
  12875. this.initializeTouchScrolling(_aa4);
  12876. }else{
  12877. this.showMainOutputOnly(_aa4);
  12878. this.removeTouchScrolling();
  12879. }
  12880. this.updateTabIndexValues();
  12881. }
  12882. };
  12883. PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
  12884. var _aae=0;
  12885. if(this.m_cachedPFContainer){
  12886. var _aaf=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
  12887. if(_aaf){
  12888. var _ab0=0;
  12889. for(var r=0;r<_aaf.rows.length;r++){
  12890. var row=_aaf.rows[r];
  12891. for(var c=0;c<row.cells.length;c++){
  12892. var cell=row.cells[c];
  12893. if(cell.getAttribute("type")=="datavalue"){
  12894. _ab0++;
  12895. if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
  12896. _aae=_aae+cell.offsetHeight;
  12897. }else{
  12898. _ab0++;
  12899. var _ab5=this.getSection("pfVerticalScrollBar");
  12900. if(_ab5){
  12901. _aae=_ab5.offsetWidth*2;
  12902. }
  12903. }
  12904. break;
  12905. }
  12906. }
  12907. if(_ab0>=2){
  12908. break;
  12909. }
  12910. }
  12911. }
  12912. }
  12913. return _aae;
  12914. };
  12915. PinFreezeContainer.prototype.updateSideHeadingSize=function(_ab6){
  12916. var _ab7=0;
  12917. if(this.m_freezeSide){
  12918. var _ab8=this.getSection("pfMainOutput");
  12919. if(!_ab8){
  12920. return 0;
  12921. }
  12922. if(!this.frozenSideHeadingsRequired()){
  12923. this.showFreezeTopOnly(_ab8);
  12924. return 0;
  12925. }
  12926. var _ab9=this.getSection("pfSideHeadings");
  12927. _ab7=this.getSideHeadingSectionWidth(_ab6);
  12928. var _aba=this.getSection("pfHorizontalScrollBar");
  12929. var _abb=this.getSectionHomeCell(_ab9);
  12930. if(_ab9.style.display=="none"){
  12931. _ab9.style.display="";
  12932. _aba.style.display="";
  12933. }
  12934. _ab9.style.width=_ab7+"px";
  12935. _ab9.style.height=_ab8.clientHeight+"px";
  12936. }
  12937. return _ab7;
  12938. };
  12939. PinFreezeContainer.prototype.updateTopHeadingSize=function(_abc){
  12940. var _abd=0;
  12941. if(this.m_freezeTop){
  12942. var _abe=this.getSection("pfMainOutput");
  12943. if(!_abe){
  12944. return 0;
  12945. }
  12946. if(!this.frozenTopHeadingsRequired()){
  12947. this.showFreezeSideOnly(_abe);
  12948. return 0;
  12949. }
  12950. var _abf=this.getSection("pfTopHeadings");
  12951. _abd=this.getTopHeadingSectionHeight(_abc);
  12952. var _ac0=this.getSection("pfVerticalScrollBar");
  12953. var _ac1=this.getSectionHomeCell(_abf);
  12954. if(_abf.style.display=="none"){
  12955. _abf.style.display="";
  12956. _ac0.style.display="";
  12957. }
  12958. _abf.style.height=_abd+"px";
  12959. _abf.style.width=_abe.clientWidth+"px";
  12960. }
  12961. return _abd;
  12962. };
  12963. PinFreezeContainer.prototype.setScrollX=function(_ac2,_ac3){
  12964. if(getElementDirection(_ac2)==="rtl"){
  12965. setScrollRight(_ac2,_ac3);
  12966. }else{
  12967. setScrollLeft(_ac2,_ac3);
  12968. }
  12969. };
  12970. PinFreezeContainer.prototype.setScrollY=function(_ac4,_ac5){
  12971. _ac4.scrollTop=_ac5;
  12972. };
  12973. PinFreezeContainer.prototype.setInitialScrollPosition=function(_ac6,_ac7,_ac8){
  12974. if(getElementDirection(_ac6)==="rtl"){
  12975. setScrollRight(_ac6,_ac7);
  12976. }else{
  12977. setScrollLeft(_ac6,_ac7);
  12978. }
  12979. _ac6.scrollTop=_ac8;
  12980. };
  12981. PinFreezeContainer.prototype.getScrollableClientWidth=function(){
  12982. return this.m_scrollableClientWidth;
  12983. };
  12984. PinFreezeContainer.prototype.setScrollableClientWidth=function(_ac9){
  12985. this.m_scrollableClientWidth=_ac9;
  12986. };
  12987. PinFreezeContainer.prototype.getContainerWidth=function(){
  12988. return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth;
  12989. };
  12990. PinFreezeContainer.prototype.getClientWidth=function(){
  12991. return this.m_clientWidth;
  12992. };
  12993. PinFreezeContainer.prototype.getScrollableClientHeight=function(){
  12994. return this.m_scrollableClientHeight;
  12995. };
  12996. PinFreezeContainer.prototype.setScrollableClientHeight=function(_aca){
  12997. this.m_scrollableClientHeight=_aca;
  12998. };
  12999. PinFreezeContainer.prototype.getClientHeight=function(){
  13000. return this.m_clientHeight;
  13001. };
  13002. PinFreezeContainer.prototype.clientHeight=function(_acb){
  13003. return _acb.clientHeight;
  13004. };
  13005. PinFreezeContainer.prototype.findBestContainerHeight=function(_acc){
  13006. if(this.m_freezeTop&&this.m_cachedReportDiv){
  13007. var _acd=this.m_cachedReportDiv.parentNode;
  13008. if(_acd){
  13009. var _ace=this._findRestOfPageHeight(this.getContainer());
  13010. return _acc-_ace-(this.c_pageMargin/2)-this.m_containerMargin.top;
  13011. }
  13012. }
  13013. return _acc-this.c_pageMargin;
  13014. };
  13015. PinFreezeContainer.prototype.findBestContainerWidth=function(_acf){
  13016. var node=this.getContainer();
  13017. while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  13018. node=node.parentNode;
  13019. }
  13020. if(!node){
  13021. return -1;
  13022. }
  13023. if(node.nodeName.toLowerCase()=="td"){
  13024. var _ad1=0;
  13025. var _ad2=node.parentNode.childNodes;
  13026. for(var i=0;i<_ad2.length;i++){
  13027. if(_ad2[i]!==node){
  13028. _ad1+=_ad2[i].clientWidth;
  13029. }
  13030. }
  13031. return _acf-_ad1-(this.c_pageMargin/2);
  13032. }
  13033. return _acf;
  13034. };
  13035. PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
  13036. var _ad5=0;
  13037. var _ad6=node.parentNode;
  13038. if(!_ad6){
  13039. return _ad5;
  13040. }
  13041. if(_ad6.childNodes.length>1){
  13042. for(var i=0;i<_ad6.childNodes.length;i++){
  13043. var _ad8=_ad6.childNodes[i];
  13044. if(_ad8.nodeType==1){
  13045. var _ad9=this.getStyleDisplay(_ad8);
  13046. if(_ad8!=node&&!isNaN(_ad8.clientHeight)&&_ad9!="none"&&_ad9!="table-cell"){
  13047. _ad5+=this.clientHeight(_ad8);
  13048. }
  13049. }
  13050. }
  13051. }
  13052. if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
  13053. _ad5+=this._findRestOfPageHeight(_ad6);
  13054. }
  13055. return _ad5;
  13056. };
  13057. PinFreezeContainer.prototype.resize=function(_ada,_adb,_adc,_add){
  13058. if(this.m_fixedWidth&&this.m_fixedHeight){
  13059. return;
  13060. }
  13061. _ada=(this.m_fixedWidth)?this.m_fixedWidth:_ada;
  13062. _adb=(this.m_fixedHeight)?this.m_fixedHeight:_adb;
  13063. var _ade=this.getSectionStructure();
  13064. if(this.m_sectionCache&&this.m_cachedPFContainer){
  13065. var _adf=0;
  13066. if(_adb!==0){
  13067. _adf=this.findBestContainerHeight(_adb);
  13068. if(_adc&&_adf<300){
  13069. _adf=300;
  13070. }else{
  13071. if(_adf<100){
  13072. _adf=100;
  13073. }
  13074. }
  13075. }
  13076. this.m_clientHeight=_adf>0?_adf:this.m_clientHeight;
  13077. var _ae0=0;
  13078. if(_ada!==0){
  13079. _ae0=this.findBestContainerWidth(_ada);
  13080. }
  13081. this.m_clientWidth=(_ae0>0)?_ae0-5-(this.c_pageMargin/2):this.m_clientWidth;
  13082. var _ae1=this.getSection("pfMainOutput");
  13083. var _ae2=this.getSectionHomeCell(_ae1);
  13084. if(_ae2){
  13085. this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_ae2);
  13086. this.m_scrollableClientHeight=this.m_clientHeight-_ae2.offsetHeight;
  13087. }
  13088. if(_add){
  13089. var _ae3=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_add.lid);
  13090. if(_ae3){
  13091. var node=_ae3[0];
  13092. while(node.nodeName.toLowerCase()!="table"){
  13093. node=node.parentNode;
  13094. }
  13095. node.style.width=_add.width+"px";
  13096. }
  13097. }
  13098. this.updateContainer();
  13099. }else{
  13100. this.m_clientWidth=_ada-this.c_pageMargin;
  13101. this.m_clientHeight=_adb-this.c_pageMargin;
  13102. }
  13103. var _ae5=this.getSectionStructure();
  13104. this.checkSectionStructureChange(_ade,_ae5);
  13105. };
  13106. PinFreezeContainer.prototype.updateMainOutputSize=function(){
  13107. if(this.m_freezeSide&&this.m_freezeTop){
  13108. if(this.frozenSideHeadingsRequired()){
  13109. this.updateMainOutputWidth(this.getScrollableClientWidth());
  13110. }
  13111. if(this.frozenTopHeadingsRequired()){
  13112. this.updateMainOutputHeight(this.getScrollableClientHeight());
  13113. }
  13114. }else{
  13115. if(this.m_freezeSide){
  13116. this.updateMainOutputWidth(this.getScrollableClientWidth());
  13117. }else{
  13118. if(this.m_freezeTop){
  13119. this.updateMainOutputHeight(this.getScrollableClientHeight());
  13120. }
  13121. }
  13122. }
  13123. };
  13124. PinFreezeContainer.prototype.updateMainOutputWidth=function(_ae6){
  13125. var _ae7=this.getSection("pfMainOutput");
  13126. if(!_ae7){
  13127. return;
  13128. }
  13129. if(this.m_freezeSide==true){
  13130. _ae7.style.width=(_ae6+"px");
  13131. if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
  13132. _ae7.style.height=_ae7.firstChild.clientHeight+"px";
  13133. }
  13134. var _ae8=this.getSection("pfHorizontalScrollBar");
  13135. if(_ae8){
  13136. _ae8.style.width=(_ae6+"px");
  13137. var _ae9=_ae8.firstChild;
  13138. if(_ae9){
  13139. var _aea=this.getSectionHomeCell(_ae7);
  13140. var _aeb=_ae7.scrollWidth-this.getHomeCellOffsetWidth(_aea);
  13141. _ae9.style.width=_aeb+"px";
  13142. }
  13143. }
  13144. }
  13145. };
  13146. PinFreezeContainer.prototype.updateMainOutputHeight=function(_aec){
  13147. var _aed=this.getSection("pfMainOutput");
  13148. if(!_aed){
  13149. return;
  13150. }
  13151. _aed.style.height=(_aec+"px");
  13152. if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
  13153. _aed.style.width=_aed.firstChild.clientWidth+2+"px";
  13154. }
  13155. var _aee=this.getSection("pfVerticalScrollBar");
  13156. if(_aee){
  13157. _aee.style.height=(_aec+"px");
  13158. var _aef=_aee.firstChild;
  13159. if(_aef){
  13160. var _af0=this.getSectionHomeCell(_aed);
  13161. var _af1=_aed.scrollHeight-_af0.offsetHeight;
  13162. _aef.style.height=_af1+"px";
  13163. }
  13164. }
  13165. };
  13166. PinFreezeContainer.prototype.getElementByLID=function(_af2,tag,lid){
  13167. var _af5=getElementsByAttribute(_af2,tag,"lid",lid);
  13168. if(_af5.length>0){
  13169. return _af5[0];
  13170. }
  13171. return null;
  13172. };
  13173. PinFreezeContainer.prototype.getContainerByLID=function(_af6){
  13174. var _af7=getElementsByAttribute(_af6,"table","pfclid","pfContainer_"+this.m_lidNS);
  13175. if(_af7.length>0){
  13176. return _af7[0];
  13177. }
  13178. return null;
  13179. };
  13180. PinFreezeContainer.prototype.getSectionByLID=function(_af8,_af9){
  13181. var _afa=getElementsByAttribute(_af8,"div","pfslid",_af9+"_"+this.m_lidNS);
  13182. if(_afa.length>0){
  13183. return _afa[0];
  13184. }
  13185. return null;
  13186. };
  13187. PinFreezeContainer.getSectionNameFromSlid=function(slid){
  13188. return slid?slid.split("_")[0]:null;
  13189. };
  13190. PinFreezeContainer.getLidFromSlid=function(slid){
  13191. return slid.split("_")[1];
  13192. };
  13193. PinFreezeContainer.nodeToSlid=function(_afd){
  13194. while(_afd.parentNode&&!_afd.getAttribute("pfslid")){
  13195. _afd=_afd.parentNode;
  13196. }
  13197. if(_afd.getAttribute){
  13198. return _afd.getAttribute("pfslid");
  13199. }
  13200. return null;
  13201. };
  13202. PinFreezeContainer.prototype.cacheContainerAndSections=function(_afe){
  13203. if(!_afe){
  13204. return _afe;
  13205. }
  13206. this.m_cachedPFContainer=_afe;
  13207. var _aff=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
  13208. this.m_sectionCache={};
  13209. for(var i=0;i<_aff.length;++i){
  13210. var key=_aff[i].getAttribute("pfslid");
  13211. key=key.split("_",1);
  13212. this.m_sectionCache[key]=_aff[i];
  13213. }
  13214. return _afe;
  13215. };
  13216. PinFreezeContainer.prototype.getContainer=function(){
  13217. return this.m_cachedPFContainer;
  13218. };
  13219. PinFreezeContainer.prototype.getSection=function(key){
  13220. if(!this.m_sectionCache){
  13221. return null;
  13222. }
  13223. if(!this.m_sectionCache[key]){
  13224. this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key);
  13225. }
  13226. return this.m_sectionCache[key];
  13227. };
  13228. PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_b03){
  13229. var slid=PinFreezeContainer.nodeToSlid(_b03);
  13230. if(!this.m_homeCellNodes[slid]){
  13231. var _b05=getElementsByAttribute(_b03,"*","tabIndex","*");
  13232. for(var i in _b05){
  13233. if(!_b05[i].getAttribute("widgetid")){
  13234. this.m_homeCellNodes[slid]=_b05[i];
  13235. break;
  13236. }
  13237. }
  13238. }
  13239. };
  13240. PinFreezeContainer.prototype.updateTabIndexValues=function(){
  13241. if(this.isContainerFrozen()){
  13242. for(var slid in this.m_homeCellNodes){
  13243. var _b08=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
  13244. this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08);
  13245. }
  13246. }else{
  13247. for(var slid in this.m_homeCellNodes){
  13248. var _b08=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
  13249. this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08);
  13250. }
  13251. }
  13252. };
  13253. PinFreezeContainer.prototype.getSectionHomeCell=function(_b09){
  13254. if(_b09){
  13255. var _b0a=this.getElementByLID(_b09,"table",this.m_lid+this.m_viewerId);
  13256. if(_b0a&&_b0a.rows.length&&_b0a.rows[0].cells.length){
  13257. return _b0a.rows[0].cells[0];
  13258. }
  13259. }
  13260. return null;
  13261. };
  13262. PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
  13263. var _b0b=this.getSection("pfMainOutput");
  13264. if(!_b0b){
  13265. _b0b=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
  13266. }
  13267. return this.getSectionHomeCell(_b0b);
  13268. };
  13269. PinFreezeContainer.prototype.getChildPosition=function(_b0c,_b0d){
  13270. for(var i=0;i<_b0c.childNodes.length;++i){
  13271. if(_b0c.childNodes[i]==_b0d){
  13272. return i;
  13273. }
  13274. }
  13275. return -1;
  13276. };
  13277. PinFreezeContainer.prototype.insertAt=function(_b0f,_b10,_b11){
  13278. if(_b11==_b0f.childNodes.length){
  13279. _b0f.appendChild(_b10);
  13280. }else{
  13281. _b0f.insertBefore(_b10,_b0f.childNodes[_b11]);
  13282. }
  13283. };
  13284. PinFreezeContainer.prototype.synchScroll=function(){
  13285. if(!this.m_cachedPFContainer){
  13286. return;
  13287. }
  13288. var _b12=this.getMainOutputHomeCell();
  13289. var _b13=this.getSection("pfMainOutput");
  13290. var _b14=this.getSection("pfSideHeadings");
  13291. if(_b14!=null){
  13292. var _b15=this.getSection("pfHorizontalScrollBar");
  13293. if(_b15){
  13294. var _b16=this.getSideHeadingSectionWidth(_b12);
  13295. if(getElementDirection(_b13)==="rtl"){
  13296. _b16=0;
  13297. }
  13298. setScrollLeft(_b13,getScrollLeft(_b15)+_b16);
  13299. if(this.m_freezeTop){
  13300. setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_b15)+_b16);
  13301. }
  13302. }
  13303. }
  13304. };
  13305. PinFreezeContainer.prototype.updateScroll=function(_b17){
  13306. var slid=PinFreezeContainer.nodeToSlid(_b17);
  13307. if(!slid){
  13308. return;
  13309. }
  13310. var _b19=PinFreezeContainer.getSectionNameFromSlid(slid);
  13311. if(!_b19){
  13312. return;
  13313. }
  13314. var _b1a=document.getElementById("CVReport"+this.m_viewerId);
  13315. if(!_b1a){
  13316. return;
  13317. }
  13318. if(!this.m_cachedPFContainer){
  13319. return;
  13320. }
  13321. var _b1b=_b17.parentNode;
  13322. if(_b1b){
  13323. var _b1c=_b1b.tagName.toLowerCase();
  13324. if(_b1c==="td"||_b1c==="th"){
  13325. var _b1d=this.getMainOutputHomeCell();
  13326. var _b1e=this.getSection("pfMainOutput");
  13327. if(_b19==="pfMainOutput"||_b19==="pfTopHeadings"){
  13328. var _b1f=this.getSection("pfHorizontalScrollBar");
  13329. if(_b1f){
  13330. var _b20=PinFreezeContainer.calculateNewPosition(_b1b.offsetLeft,_b1b.offsetWidth,getScrollLeft(_b1e),_b1e.offsetWidth);
  13331. var _b21=this.getHomeCellOffsetWidth(_b1d);
  13332. if(getElementDirection(_b1e)==="rtl"){
  13333. _b21=0;
  13334. }
  13335. setScrollLeft(_b1f,_b20-_b21);
  13336. setScrollLeft(_b1e,_b20);
  13337. }
  13338. }
  13339. if(_b19==="pfMainOutput"||_b19==="pfSideHeadings"){
  13340. var _b22=this.getSection("pfVerticalScrollBar");
  13341. if(_b22){
  13342. var _b23=PinFreezeContainer.calculateNewPosition(_b1b.offsetTop,_b1b.offsetHeight,_b1e.scrollTop,_b1e.offsetHeight);
  13343. _b22.scrollTop=_b23-_b1d.offsetHeight;
  13344. _b1e.scrollTop=_b23;
  13345. }
  13346. }
  13347. }
  13348. }
  13349. };
  13350. PinFreezeContainer.calculateNewPosition=function(_b24,_b25,_b26,_b27){
  13351. var _b28=_b24+_b25;
  13352. var _b29=_b26+_b27;
  13353. if(_b26>_b24){
  13354. return _b24;
  13355. }else{
  13356. if(_b29<_b28){
  13357. if(_b25>_b27){
  13358. return _b24;
  13359. }
  13360. return _b28-_b27;
  13361. }
  13362. }
  13363. return _b26;
  13364. };
  13365. PinFreezeContainer.prototype.synchVScroll=function(){
  13366. if(!this.m_cachedPFContainer){
  13367. return;
  13368. }
  13369. var _b2a=this.getMainOutputHomeCell();
  13370. var _b2b=this.getSection("pfMainOutput");
  13371. var _b2c=this.getSection("pfTopHeadings");
  13372. if(_b2c!=null){
  13373. var _b2d=this.getSection("pfVerticalScrollBar");
  13374. if(_b2d){
  13375. _b2b.scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a);
  13376. if(this.m_freezeSide){
  13377. this.getSection("pfSideHeadings").scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a);
  13378. }
  13379. }
  13380. }
  13381. };
  13382. PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_b2e){
  13383. return _b2e.offsetHeight+_b2e.offsetTop+this.m_containerMargin.top;
  13384. };
  13385. PinFreezeContainer.prototype._findBestGuessHomeCell=function(_b2f){
  13386. if(this.m_bestGuessHomeCell){
  13387. return this.m_bestGuessHomeCell;
  13388. }
  13389. if(_b2f){
  13390. var _b30=_b2f.parentNode.parentNode;
  13391. var _b31=_b2f.rowSpan?(_b2f.rowSpan):1;
  13392. var tr=_b30.childNodes[_b31];
  13393. if(tr){
  13394. var _b33=tr.childNodes.length;
  13395. var _b34=null;
  13396. var td=null;
  13397. for(var i=0;i<_b33;i++){
  13398. td=tr.childNodes[i];
  13399. if(td.getAttribute("type")=="datavalue"){
  13400. break;
  13401. }
  13402. _b34=td;
  13403. }
  13404. if(_b34){
  13405. this.m_bestGuessHomeCell=_b34;
  13406. return this.m_bestGuessHomeCell;
  13407. }
  13408. }else{
  13409. return _b2f;
  13410. }
  13411. }
  13412. return null;
  13413. };
  13414. PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_b37){
  13415. var _b38=this._findBestGuessHomeCell(_b37);
  13416. return _b38?_b38.offsetWidth:0;
  13417. };
  13418. PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_b39){
  13419. var _b3a=this._findBestGuessHomeCell(_b39);
  13420. if(_b3a){
  13421. return _b3a.offsetWidth+_b3a.offsetLeft+this.m_containerMargin.left;
  13422. }else{
  13423. return _b39.offsetWidth+_b39.offsetLeft;
  13424. }
  13425. };
  13426. PinFreezeContainer.prototype.isContainerFrozen=function(){
  13427. return (this.m_freezeTop||this.m_freezeSide);
  13428. };
  13429. PinFreezeContainer.prototype.unfreeze=function(_b3b){
  13430. var _b3c=this.getContainerByLID(_b3b);
  13431. this.m_freezeTop=false;
  13432. this.m_freezeSide=false;
  13433. if(_b3c){
  13434. var _b3d=_b3c.parentNode;
  13435. pfMainOutput=this.getSectionByLID(_b3c,"pfMainOutput");
  13436. if(pfMainOutput&&_b3d){
  13437. if(_b3c.style.border!==""){
  13438. pfMainOutput.firstChild.style.border=_b3c.style.border;
  13439. _b3c.style.border="";
  13440. }
  13441. if(this.m_wrapFlag){
  13442. var _b3e=pfMainOutput.firstChild.getElementsByTagName("span");
  13443. if(_b3e){
  13444. for(var k=0;k<_b3e.length;k++){
  13445. _b3e[k].style.whiteSpace="";
  13446. }
  13447. }
  13448. this.m_wrapFlag=false;
  13449. }
  13450. this.updateTabIndexValues();
  13451. if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){
  13452. this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth");
  13453. this.m_cachedBaseContainer.style.width="auto";
  13454. this.m_addedFixedWidth=null;
  13455. }
  13456. if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){
  13457. this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight");
  13458. this.m_cachedBaseContainer.style.height="auto";
  13459. this.m_addedFixedHeight=null;
  13460. }
  13461. _b3d.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_b3c);
  13462. }
  13463. }
  13464. };
  13465. PinFreezeContainer.prototype.getBorderInfo=function(el,_b41){
  13466. var _b42={};
  13467. var _b43="border-"+_b41+"-";
  13468. var _b44="border"+_b41.charAt(0).toUpperCase()+_b41.substring(1);
  13469. if(el.currentStyle){
  13470. _b42[_b44+"Width"]=el.currentStyle[_b44+"Width"];
  13471. _b42[_b44+"Style"]=el.currentStyle[_b44+"Style"];
  13472. _b42[_b44+"Color"]=el.currentStyle[_b44+"Color"];
  13473. }else{
  13474. if(window.getComputedStyle){
  13475. _b42[_b44+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"width");
  13476. _b42[_b44+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"style");
  13477. _b42[_b44+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"color");
  13478. }else{
  13479. return null;
  13480. }
  13481. }
  13482. return _b42;
  13483. };
  13484. PinFreezeContainer.prototype.isA11yEnabled=function(_b45){
  13485. return (_b45.getAttribute("role")==="grid");
  13486. };
  13487. PinFreezeContainer.isElementInMainOutput=function(_b46){
  13488. var _b47=PinFreezeContainer.nodeToSlid(_b46);
  13489. if(_b47){
  13490. return (_b47.indexOf("pfMainOutput_")===0);
  13491. }
  13492. return false;
  13493. };
  13494. PinFreezeContainer.prototype.removeCTX=function(_b48){
  13495. _b48.removeAttribute("ctx");
  13496. var _b49=getElementsByAttribute(_b48,"*","ctx","*");
  13497. if(_b49&&_b49.length){
  13498. for(var i=0;i<_b49.length;i++){
  13499. _b49[i].removeAttribute("ctx");
  13500. }
  13501. }
  13502. };
  13503. PinFreezeContainer.prototype.initializeTouchScrolling=function(_b4b){
  13504. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  13505. return;
  13506. }
  13507. if(_b4b){
  13508. _b4b.m_pinFreezeContainer=this;
  13509. if(document.attachEvent){
  13510. _b4b.attachEvent("touchstart",this.touchStart);
  13511. _b4b.attachEvent("touchmove",this.touchMove);
  13512. _b4b.attachEvent("touchend",this.touchEnd);
  13513. }else{
  13514. _b4b.addEventListener("touchstart",this.touchStart,false);
  13515. _b4b.addEventListener("touchmove",this.touchMove,false);
  13516. _b4b.addEventListener("touchend",this.touchEnd,false);
  13517. }
  13518. }
  13519. };
  13520. PinFreezeContainer.prototype.removeTouchScrolling=function(){
  13521. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  13522. return;
  13523. }
  13524. this.removeTouchScrollingEvents(this.getSection("pfMainOutput"));
  13525. this.removeTouchScrollingEvents(this.getSection("pfSideHeadings"));
  13526. this.removeTouchScrollingEvents(this.getSection("pfTopHeadings"));
  13527. };
  13528. PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_b4c){
  13529. if(!this.m_pinFreezeManager.isIWidgetMobile()){
  13530. return;
  13531. }
  13532. if(_b4c){
  13533. if(document.detachEvent){
  13534. _b4c.detachEvent("touchstart",this.touchStart);
  13535. _b4c.detachEvent("touchmove",this.touchMove);
  13536. _b4c.detachEvent("touchend",this.touchEnd);
  13537. }else{
  13538. _b4c.removeEventListener("touchstart",this.touchStart,false);
  13539. _b4c.removeEventListener("touchmove",this.touchMove,false);
  13540. _b4c.removeEventListener("touchend",this.touchEnd,false);
  13541. }
  13542. }
  13543. };
  13544. PinFreezeContainer.prototype.touchMove=function(e){
  13545. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  13546. var _b4e=e.changedTouches[0];
  13547. if(_b4e&&_b4e.clientX&&_b4e.clientY){
  13548. var _b4f=parseInt(_b4e.clientX);
  13549. var _b50=parseInt(_b4e.clientY);
  13550. if(this.m_pinFreezeContainer.touchMoveHandler(_b4f,_b50)){
  13551. return stopEventBubble(e);
  13552. }
  13553. }
  13554. }
  13555. };
  13556. PinFreezeContainer.prototype.touchStart=function(e){
  13557. if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  13558. var _b52=e.changedTouches[0];
  13559. if(_b52&&_b52.clientX&&_b52.clientY){
  13560. var _b53=parseInt(_b52.clientX);
  13561. var _b54=parseInt(_b52.clientY);
  13562. this.m_pinFreezeContainer.touchStartHandler(_b53,_b54);
  13563. }
  13564. }
  13565. };
  13566. PinFreezeContainer.prototype.touchStartHandler=function(_b55,_b56){
  13567. this.touchScrollSections=false;
  13568. this.touchPreviousX=_b55;
  13569. this.touchPreviousY=_b56;
  13570. };
  13571. PinFreezeContainer.prototype.touchEnd=function(e){
  13572. if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
  13573. stopEventBubble(e);
  13574. }
  13575. };
  13576. PinFreezeContainer.prototype.touchEndHandler=function(){
  13577. var _b58=this.touchScrollSections;
  13578. this.touchScrollSections=false;
  13579. this.touchPreviousX=-1;
  13580. this.touchPreviousY=-1;
  13581. return _b58;
  13582. };
  13583. PinFreezeContainer.prototype.touchMoveHandler=function(_b59,_b5a){
  13584. var _b5b=this.getSection("pfMainOutput");
  13585. if(!_b5b){
  13586. return;
  13587. }
  13588. var _b5c=this.getSectionHomeCell(_b5b);
  13589. var _b5d=this.getTopHeadingSectionHeight(_b5c);
  13590. var _b5e=this.getSideHeadingSectionWidth(_b5c);
  13591. var _b5f=_b5a-this.touchPreviousY;
  13592. var _b60=_b59-this.touchPreviousX;
  13593. if(this.touchScrollSections){
  13594. if(_b5f!=0){
  13595. var _b61=_b5b.scrollTop-_b5f;
  13596. _b61=(_b61>_b5d)?_b61:_b5d;
  13597. _b5b.scrollTop=_b61;
  13598. var _b62=this.getSection("pfSideHeadings");
  13599. if(_b62){
  13600. _b62.scrollTop=_b61;
  13601. }
  13602. }
  13603. if(_b60!=0){
  13604. var _b63=_b5b.scrollLeft-_b60;
  13605. _b63=(_b63>_b5e)?_b63:_b5e;
  13606. _b5b.scrollLeft=_b63;
  13607. var _b64=this.getSection("pfTopHeadings");
  13608. if(_b64){
  13609. _b64.scrollLeft=_b63;
  13610. }
  13611. }
  13612. }else{
  13613. this.firstTouchMove(_b5b,_b60,_b5f,_b5e,_b5d);
  13614. }
  13615. this.touchPreviousX=_b59;
  13616. this.touchPreviousY=_b5a;
  13617. return this.touchScrollSections;
  13618. };
  13619. PinFreezeContainer.prototype.firstTouchMove=function(_b65,_b66,_b67,_b68,_b69){
  13620. var _b6a=this.mostlyVerticalTouchMove(_b66,_b67);
  13621. var _b6b=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
  13622. var _b6c=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
  13623. if(_b6a&&(!_b6b||(_b67>0&&_b65.scrollTop<=_b69)||(_b67<0&&_b65.scrollTop+_b65.clientHeight>=_b65.scrollHeight))){
  13624. this.touchScrollSections=false;
  13625. }else{
  13626. if(!_b6a&&(!_b6c||(_b66>0&&_b65.scrollLeft<=_b68)||(_b66<0&&_b65.scrollLeft+_b65.clientWidth>=_b65.scrollWidth))){
  13627. this.touchScrollSections=false;
  13628. }else{
  13629. this.touchScrollSections=true;
  13630. }
  13631. }
  13632. };
  13633. PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_b6d,_b6e){
  13634. var _b6f=(_b6d>0)?_b6d:0-_b6d;
  13635. var _b70=(_b6e>0)?_b6e:0-_b6e;
  13636. return (_b70>_b6f);
  13637. };
  13638. PinFreezeContainer.prototype.destroy=function(){
  13639. this.removeTouchScrolling();
  13640. GUtil.destroyProperties(this);
  13641. };
  13642. function PinFreezeManager(oCV){
  13643. this.m_oCV=oCV;
  13644. this.m_viewerId=oCV.getId();
  13645. this.m_frozenInfo=null;
  13646. this.m_lastWidthProcessed=0;
  13647. this.m_lastHeightProcessed=0;
  13648. this.c_resizeTweekLimit=5;
  13649. this.m_repaintOnVisible=false;
  13650. };
  13651. PinFreezeManager.prototype.addContainerObject=function(lid,_b73,_b74,_b75,_b76){
  13652. if(_b73||_b74){
  13653. if(!this.m_frozenInfo){
  13654. this.m_frozenInfo={};
  13655. }
  13656. if(!this.m_frozenInfo[lid]){
  13657. this._createDefaultFrozenInfo(lid);
  13658. }
  13659. this.m_frozenInfo[lid].freezeTop=_b73;
  13660. this.m_frozenInfo[lid].freezeSide=_b74;
  13661. var _b77=this.newContainer(lid,_b73,_b74,_b75,_b76);
  13662. this.m_frozenInfo[lid].pinFreezeContainers.push(_b77);
  13663. return _b77;
  13664. }
  13665. return null;
  13666. };
  13667. PinFreezeManager.prototype.newContainer=function(lid,_b79,_b7a,_b7b,_b7c){
  13668. return new PinFreezeContainer(this,lid,this.m_viewerId,_b79,_b7a,_b7b,_b7c);
  13669. };
  13670. PinFreezeManager.prototype.clearPinInfo=function(lid){
  13671. if(!this.m_frozenInfo){
  13672. return;
  13673. }
  13674. if(lid){
  13675. if(this.m_frozenInfo[lid]){
  13676. delete this.m_frozenInfo[lid];
  13677. }
  13678. }else{
  13679. delete this.m_frozenInfo;
  13680. this.m_frozenInfo=null;
  13681. }
  13682. };
  13683. PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){
  13684. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}};
  13685. };
  13686. PinFreezeManager.prototype._resetFrozenInfo=function(lid){
  13687. var _b80=this.m_frozenInfo[lid];
  13688. if(_b80){
  13689. delete _b80.pinFreezeContainers;
  13690. _b80.pinFreezeContainers=[];
  13691. _b80.freezeTop=false;
  13692. _b80.freezeSide=false;
  13693. }
  13694. };
  13695. PinFreezeManager.prototype.prepopulateFrozenInfo=function(_b81){
  13696. var _b82=getDescendantElementsByAttribute(_b81,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  13697. if(_b82){
  13698. if(!this.m_frozenInfo){
  13699. this.m_frozenInfo={};
  13700. }
  13701. for(var i=0;i<_b82.length;i++){
  13702. var _b84=_b82[i];
  13703. if(_b84.getAttribute("id")=="rt"+this.m_viewerId){
  13704. continue;
  13705. }
  13706. var lid=this.removeNamespace(_b84.getAttribute("lid"));
  13707. if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){
  13708. continue;
  13709. }
  13710. if(!this.m_frozenInfo[lid]){
  13711. this._createDefaultFrozenInfo(lid);
  13712. }
  13713. if(!this.m_frozenInfo[lid].childContainers){
  13714. this.m_frozenInfo[lid].childContainers={};
  13715. }
  13716. var _b86=getDescendantElementsByAttribute(_b84,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
  13717. if(_b86){
  13718. for(var _b87=0;_b87<_b86.length;_b87++){
  13719. var _b88=_b86[_b87];
  13720. var _b89=this.removeNamespace(_b88.getAttribute("lid"));
  13721. if(!this.m_frozenInfo[lid].childContainers[_b89]){
  13722. var _b8a=_b88.parentNode;
  13723. while(_b8a&&!_b8a.getAttribute("lid")){
  13724. _b8a=_b8a.parentNode;
  13725. }
  13726. if(_b8a&&this.removeNamespace(_b8a.getAttribute("lid"))==lid){
  13727. this.m_frozenInfo[lid].childContainers[_b89]=true;
  13728. }
  13729. }
  13730. }
  13731. }
  13732. }
  13733. this._updateParentContainerInfo();
  13734. }
  13735. };
  13736. PinFreezeManager.prototype._updateParentContainerInfo=function(){
  13737. for(var _b8b in this.m_frozenInfo){
  13738. var _b8c=this.m_frozenInfo[_b8b].childContainers;
  13739. if(_b8c){
  13740. for(var _b8d in _b8c){
  13741. if(this.m_frozenInfo[_b8d]){
  13742. this.m_frozenInfo[_b8d].parentContainer=_b8b;
  13743. break;
  13744. }
  13745. }
  13746. }
  13747. }
  13748. };
  13749. PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){
  13750. if(this.m_frozenInfo[lid]){
  13751. while(this.m_frozenInfo[lid].parentContainer){
  13752. lid=this.m_frozenInfo[lid].parentContainer;
  13753. }
  13754. }
  13755. return lid;
  13756. };
  13757. PinFreezeManager.prototype.freezeContainer=function(lid,_b90,_b91){
  13758. var _b92=document.getElementById("CVReport"+this.m_viewerId);
  13759. this.prepopulateFrozenInfo(_b92);
  13760. var _b93=this.getTopLevelContainerLID(lid);
  13761. this.unfreezeAllNestedContainers(_b93,_b92);
  13762. this.m_frozenInfo[lid].freezeTop=_b90;
  13763. this.m_frozenInfo[lid].freezeSide=_b91;
  13764. var _b94=this._createPinAndFreezeObject(_b92,_b93);
  13765. this.m_lastWidthProcessed=0;
  13766. this.m_lastHeightProcessed=0;
  13767. this._resizePinFreezeObjects(_b94);
  13768. this.sectionStructureChange();
  13769. if(isIE()){
  13770. var obj=this;
  13771. setTimeout(function(){
  13772. obj.refresh();
  13773. },1);
  13774. var _b96=document.getElementById("RVContent"+this.m_viewerId);
  13775. this.m_oCV.repaintDiv(_b96);
  13776. }
  13777. return _b94;
  13778. };
  13779. PinFreezeManager.prototype.getInitialWidthThreshold=function(){
  13780. return document.body.clientWidth*3/4;
  13781. };
  13782. PinFreezeManager.prototype.getInitialHeightThreshold=function(){
  13783. return document.body.clientWidth*9/10;
  13784. };
  13785. PinFreezeManager.prototype.hasFrozenContainers=function(){
  13786. return ((this.m_frozenInfo)?true:false);
  13787. };
  13788. PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){
  13789. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  13790. return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false;
  13791. }
  13792. return false;
  13793. };
  13794. PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){
  13795. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  13796. return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false;
  13797. }
  13798. return false;
  13799. };
  13800. PinFreezeManager.prototype.removeNamespace=function(idNS){
  13801. if(idNS.length>this.m_viewerId.length){
  13802. if(idNS.indexOf(this.m_viewerId)>0){
  13803. return idNS.substring(0,idNS.indexOf(this.m_viewerId));
  13804. }
  13805. }
  13806. return idNS;
  13807. };
  13808. PinFreezeManager.prototype.getContainer=function(lid,_b9b){
  13809. if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
  13810. _b9b=_b9b?_b9b:0;
  13811. return this.m_frozenInfo[lid].pinFreezeContainers[_b9b];
  13812. }
  13813. return null;
  13814. };
  13815. PinFreezeManager.prototype.nodeToContainer=function(node){
  13816. var slid=PinFreezeContainer.nodeToSlid(node);
  13817. var _b9e=null;
  13818. if(slid){
  13819. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  13820. _b9e=this.getContainer(lid);
  13821. }
  13822. return _b9e;
  13823. };
  13824. PinFreezeManager.prototype.getContainerElement=function(_ba0){
  13825. var lid=this.removeNamespace(_ba0.getAttribute("lid"));
  13826. if(lid){
  13827. var _ba2=this.getContainer(lid);
  13828. if(_ba2){
  13829. return _ba2.getContainer();
  13830. }
  13831. }
  13832. return null;
  13833. };
  13834. PinFreezeManager.prototype._createPinAndFreezeObject=function(_ba3,lid){
  13835. var _ba5=null;
  13836. if(this.m_frozenInfo){
  13837. var _ba6=this.m_frozenInfo[lid];
  13838. var _ba7=_ba6.initialLoad;
  13839. if(_ba7){
  13840. delete _ba6.initialLoad;
  13841. }
  13842. var _ba8=_ba6.freezeTop;
  13843. var _ba9=_ba6.freezeSide;
  13844. var _baa=null;
  13845. if(_ba7&&_ba6.pinFreezeContainers&&(_ba8||_ba9)){
  13846. _baa=_ba6.pinFreezeContainers.slice(0);
  13847. }
  13848. var _bab=_ba3;
  13849. if(_ba6&&_ba6.parentContainer){
  13850. var _bac=getElementsByAttribute(_ba3,"table","lid",_ba6.parentContainer+this.m_viewerId);
  13851. if(_bac){
  13852. for(parentIndex=0;parentIndex<_bac.length;parentIndex++){
  13853. if(!_bac[parentIndex].getAttribute("clonednode")){
  13854. _bab=_bac[parentIndex];
  13855. break;
  13856. }
  13857. }
  13858. }
  13859. }
  13860. if(_ba6.childContainers){
  13861. for(var _bad in _ba6.childContainers){
  13862. var _bae=this._createPinAndFreezeObject(_bab,_bad);
  13863. _ba5=_ba5?_ba5:_bae;
  13864. }
  13865. }
  13866. var _baf=getElementsByAttribute(_bab,"table","lid",lid+this.m_viewerId);
  13867. if(_baf&&_baf.length>0){
  13868. delete _ba6.pinFreezeContainers;
  13869. _ba6.pinFreezeContainers=[];
  13870. }else{
  13871. return null;
  13872. }
  13873. if(_baf&&(_ba8||_ba9)){
  13874. var _bb0=(_ba5!==null);
  13875. for(var i=0;i<_baf.length;i++){
  13876. var _bb2=_baf[i];
  13877. if(_bb2.getAttribute("clonednode")=="true"){
  13878. continue;
  13879. }
  13880. _ba5=this.addContainerObject(lid,_ba8,_ba9,_bb2,i);
  13881. if(_ba5){
  13882. _ba5.createPFContainer(_bab,_bb0);
  13883. if(_ba7){
  13884. _ba5.copyProperties(_baa[0]);
  13885. }
  13886. _ba5.freezeContainerInReport(_ba3);
  13887. }
  13888. }
  13889. }
  13890. }
  13891. return _ba5;
  13892. };
  13893. PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_bb3){
  13894. if(this.m_frozenInfo){
  13895. var _bb4=false;
  13896. var _bb5=null;
  13897. for(var _bb6 in this.m_frozenInfo){
  13898. var _bb7=this.m_frozenInfo[_bb6];
  13899. if(!_bb4){
  13900. _bb4=_bb7.initialLoad;
  13901. }
  13902. if(!_bb7.parentContainer){
  13903. var temp=this._createPinAndFreezeObject(_bb3,_bb7.lid);
  13904. _bb5=_bb5?_bb5:temp;
  13905. }
  13906. }
  13907. if(!_bb4&&_bb5){
  13908. this._resizePinFreezeObjects(_bb5);
  13909. }
  13910. this.refresh();
  13911. }
  13912. };
  13913. PinFreezeManager.prototype._resizePinFreezeObjects=function(_bb9){
  13914. var _bba,_bbb;
  13915. var _bbc=this.m_oCV.getViewerWidget();
  13916. if(_bbc){
  13917. var size=_bbc.getWidgetSize();
  13918. _bbb=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_bb9.getClientWidth();
  13919. _bba=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_bb9.getClientHeight();
  13920. }else{
  13921. var _bbe=document.getElementById("RVContent"+this.m_viewerId);
  13922. var _bbf=document.getElementById("mainViewerTable"+this.m_viewerId);
  13923. _bbb=_bbe.clientWidth;
  13924. _bba=_bbf.clientHeight;
  13925. }
  13926. this.m_lastWidthProcessed=0;
  13927. this.m_lastHeightProcessed=0;
  13928. this.resize(_bbb,_bba);
  13929. };
  13930. PinFreezeManager.prototype.resize=function(_bc0,_bc1){
  13931. var _bc2=(Math.abs(_bc0-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
  13932. var _bc3=(Math.abs(_bc1-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
  13933. if(_bc2&&_bc3){
  13934. return;
  13935. }
  13936. var _bc4=(Math.abs(_bc0-this.m_lastWidthProcessed)>2)?_bc0:0;
  13937. var _bc5=(Math.abs(_bc1-this.m_lastHeightProcessed)>2)?_bc1:0;
  13938. for(var lid in this.m_frozenInfo){
  13939. if(!this.m_frozenInfo[lid].parentContainer){
  13940. this.resizeContainer(lid,_bc4,_bc5);
  13941. }
  13942. }
  13943. this.m_lastWidthProcessed=_bc0;
  13944. this.m_lastHeightProcessed=_bc1;
  13945. };
  13946. PinFreezeManager.prototype.resizeContainer=function(lid,_bc8,_bc9){
  13947. var _bca=this.m_frozenInfo[lid];
  13948. if(_bca){
  13949. var _bcb=null;
  13950. if(_bca.childContainers){
  13951. var _bcc=_bc8>10?_bc8-10:_bc8;
  13952. var _bcd=_bc9>10?_bc9-10:_bc9;
  13953. for(var _bce in _bca.childContainers){
  13954. _bcb=this.resizeContainer(_bce,_bcc,_bcd);
  13955. }
  13956. }
  13957. var _bcf=_bca.pinFreezeContainers;
  13958. var _bd0=null;
  13959. var _bd1=null;
  13960. if(_bcf){
  13961. for(var i=0;i<_bcf.length;i++){
  13962. _bd0=_bcf[i];
  13963. _bd0.resize(_bc8,_bc9,_bca.parentContainer,_bcb);
  13964. var _bd3=_bd0.getContainer();
  13965. if(_bd3&&(!_bd1||(_bd1.width<_bd3.clientWidth))){
  13966. _bd1={"width":_bd3.clientWidth,"lid":_bd0.m_lidNS};
  13967. }
  13968. }
  13969. }
  13970. return _bd1;
  13971. }
  13972. };
  13973. PinFreezeManager.prototype.processAutoResize=function(_bd4,_bd5){
  13974. this.m_lastWidthProcessed=_bd4;
  13975. this.m_lastHeightProcessed=_bd5;
  13976. };
  13977. PinFreezeManager.prototype.onSetVisible=function(){
  13978. this.refresh();
  13979. if(this.m_repaintOnVisible){
  13980. this.rePaint();
  13981. this.m_repaintOnVisible=false;
  13982. }
  13983. };
  13984. PinFreezeManager.prototype.onResizeCanvas=function(_bd6){
  13985. if(_bd6){
  13986. this.rePaint();
  13987. }else{
  13988. this.m_repaintOnVisible=true;
  13989. }
  13990. };
  13991. PinFreezeManager.prototype.rePaint=function(){
  13992. for(var lid in this.m_frozenInfo){
  13993. if(!this.m_frozenInfo[lid].parentContainer){
  13994. this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed);
  13995. }
  13996. }
  13997. };
  13998. PinFreezeManager.prototype.refresh=function(){
  13999. for(var _bd8 in this.m_frozenInfo){
  14000. var _bd9=this.m_frozenInfo[_bd8].pinFreezeContainers;
  14001. if(_bd9){
  14002. for(var i=0;i<_bd9.length;i++){
  14003. var _bdb=_bd9[i];
  14004. _bdb.synchScroll();
  14005. _bdb.synchVScroll();
  14006. }
  14007. }
  14008. }
  14009. };
  14010. PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){
  14011. return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true);
  14012. };
  14013. PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){
  14014. var lid=this.getValidSelectedContainerId(false);
  14015. if(lid){
  14016. this.m_oCV.getSelectionController().resetSelections();
  14017. return this.freezeContainerRowHeadings(lid);
  14018. }
  14019. return null;
  14020. };
  14021. PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){
  14022. var lid=this.getValidSelectedContainerId(false);
  14023. if(lid){
  14024. return (!this.hasFrozenRowHeadings(lid));
  14025. }
  14026. return false;
  14027. };
  14028. PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){
  14029. this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false);
  14030. };
  14031. PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){
  14032. var lid=this.getValidSelectedContainerId(false);
  14033. if(lid){
  14034. this.m_oCV.getSelectionController().resetSelections();
  14035. this.unfreezeContainerRowHeadings(lid);
  14036. }
  14037. };
  14038. PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){
  14039. var lid=this.getValidSelectedContainerId(false);
  14040. if(lid){
  14041. return (this.hasFrozenRowHeadings(lid));
  14042. }
  14043. return false;
  14044. };
  14045. PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){
  14046. return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid));
  14047. };
  14048. PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){
  14049. var lid=this.getValidSelectedContainerId(true);
  14050. if(lid){
  14051. this.m_oCV.getSelectionController().resetSelections();
  14052. return this.freezeContainerColumnHeadings(lid);
  14053. }
  14054. return null;
  14055. };
  14056. PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){
  14057. var lid=this.getValidSelectedContainerId(true);
  14058. if(lid){
  14059. return (!this.hasFrozenColumnHeadings(lid));
  14060. }
  14061. return false;
  14062. };
  14063. PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){
  14064. this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid));
  14065. };
  14066. PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){
  14067. var lid=this.getValidSelectedContainerId(true);
  14068. if(lid){
  14069. this.m_oCV.getSelectionController().resetSelections();
  14070. this.unfreezeContainerColumnHeadings(lid);
  14071. }
  14072. };
  14073. PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){
  14074. var lid=this.getValidSelectedContainerId(true);
  14075. if(lid){
  14076. return (this.hasFrozenColumnHeadings(lid));
  14077. }
  14078. return false;
  14079. };
  14080. PinFreezeManager.prototype.getValidSelectedContainerId=function(_be8){
  14081. var _be9=this.m_oCV.getSelectionController().getAllSelectedObjects();
  14082. if(_be9&&_be9.length&&(_be9[0].getDataContainerType()==="crosstab"||(_be8&&_be9[0].getDataContainerType()==="list"))){
  14083. var lid=(_be9[0].getLayoutElementId());
  14084. if(lid){
  14085. if(!this.hasPromptControlsInFreezableCells(lid)){
  14086. return this.removeNamespace(lid);
  14087. }
  14088. }
  14089. }
  14090. return null;
  14091. };
  14092. PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
  14093. var _bec=this.m_oCV.getLayoutElementFromLid(lid);
  14094. var _bed=getElementsByAttribute(_bec,["td","th"],"type","columnTitle");
  14095. var _bee=new RegExp("(^|[W])clsPromptComponent($|[W])");
  14096. var _bef=isIE()?"className":"class";
  14097. for(var j in _bed){
  14098. if(_bed.hasOwnProperty(j)){
  14099. var _bf1=getElementsByAttribute(_bed[j],"*",_bef,null,1,_bee);
  14100. if(_bf1.length>0){
  14101. return true;
  14102. }
  14103. }
  14104. }
  14105. return false;
  14106. };
  14107. PinFreezeManager.prototype.unfreeze=function(lid,_bf3,_bf4){
  14108. if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
  14109. var _bf5=this.m_frozenInfo[lid].pinFreezeContainers;
  14110. if(_bf5){
  14111. for(var i=0;i<_bf5.length;i++){
  14112. var _bf7=_bf5[i];
  14113. _bf7.unfreeze(_bf3);
  14114. }
  14115. if(_bf4){
  14116. this._resetFrozenInfo(lid);
  14117. }
  14118. }
  14119. }
  14120. };
  14121. PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_bf9){
  14122. var _bfa=this.m_frozenInfo[lid];
  14123. if(_bfa){
  14124. if(_bfa.freezeTop||_bfa.freezeSide){
  14125. this.unfreeze(lid,_bf9,false);
  14126. }
  14127. if(_bfa.childContainers){
  14128. for(var _bfb in _bfa.childContainers){
  14129. this.unfreezeAllNestedContainers(_bfb,_bf9);
  14130. }
  14131. }
  14132. }
  14133. };
  14134. PinFreezeManager.prototype.isNodeVisible=function(node){
  14135. var slid=PinFreezeContainer.nodeToSlid(node);
  14136. if(!slid){
  14137. return true;
  14138. }
  14139. var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
  14140. var _bff=this.getContainer(lid);
  14141. if(!_bff){
  14142. return true;
  14143. }
  14144. var _c00=PinFreezeContainer.getSectionNameFromSlid(slid);
  14145. var _c01=_bff.getSection(_c00);
  14146. var _c02=null,_c03=null;
  14147. var _c04=node;
  14148. var _c05=null;
  14149. while(_c04&&_c04!==_c01&&!_c02&&!_c03){
  14150. _c02=_bff.getMain(_c04);
  14151. _c03=_bff.getCopy(_c04);
  14152. _c05=_c04;
  14153. _c04=_c04.parentNode;
  14154. }
  14155. var _c06=_c02?true:false;
  14156. var _c07=_c03?true:false;
  14157. if(_c06){
  14158. return _bff.getCopy(_c02)===_c05;
  14159. }else{
  14160. if(_c07){
  14161. return _bff.getCopy(_c05)?false:true;
  14162. }else{
  14163. return true;
  14164. }
  14165. }
  14166. };
  14167. PinFreezeManager.prototype.sectionStructureChange=function(){
  14168. var _c08=this.m_oCV.getViewerWidget();
  14169. if(_c08&&_c08.getAnnotationHelper()){
  14170. _c08.getAnnotationHelper().repositionCommentIndicators();
  14171. }
  14172. };
  14173. PinFreezeManager.prototype.deepCloneNode=function(_c09){
  14174. var copy=_c09.cloneNode(true);
  14175. var _c0b=this.m_oCV.getViewerWidget();
  14176. if(_c0b){
  14177. if(_c0b.reportContainsDijits()){
  14178. var _c0c=getElementsByAttribute(copy,"*","widgetid","*");
  14179. if(_c0c&&_c0c.length){
  14180. for(var i=0;i<_c0c.length;i++){
  14181. _c0c[i].parentNode.removeChild(_c0c[i]);
  14182. }
  14183. }
  14184. }
  14185. }
  14186. return copy;
  14187. };
  14188. PinFreezeManager.prototype.toJSONString=function(){
  14189. var _c0e="";
  14190. var _c0f="";
  14191. for(var _c10 in this.m_frozenInfo){
  14192. if(_c0e.length>0){
  14193. _c0e+=",";
  14194. }
  14195. var _c11=this.m_frozenInfo[_c10];
  14196. _c0e+="{";
  14197. _c0e+="\"lid\":\""+_c11.lid.replace("\"","\\\"")+"\",";
  14198. _c0e+="\"freezeTop\":"+_c11.freezeTop+",";
  14199. _c0e+="\"freezeSide\":"+_c11.freezeSide+",";
  14200. if(_c11.parentContainer){
  14201. _c0e+="\"parentContainer\":\""+_c11.parentContainer+"\",";
  14202. }
  14203. if(_c11.pinFreezeContainers&&_c11.pinFreezeContainers.length>0){
  14204. _c0e+="\"properties\":"+_c11.pinFreezeContainers[0].toJSONString()+",";
  14205. }
  14206. _c0e+="\"childContainers\": {";
  14207. if(_c11.childContainers){
  14208. var _c12=true;
  14209. for(var _c13 in _c11.childContainers){
  14210. if(!_c12){
  14211. _c0e+=",";
  14212. }
  14213. _c0e+="\""+_c13+"\":true";
  14214. _c12=false;
  14215. }
  14216. }
  14217. _c0e+="}}";
  14218. }
  14219. if(_c0e.length>0){
  14220. _c0f="{\"version\":1, \"containers\":["+_c0e+"]}";
  14221. }
  14222. return _c0f;
  14223. };
  14224. PinFreezeManager.prototype.fromJSONString=function(_c14){
  14225. if(!_c14||_c14.length===0){
  14226. return;
  14227. }
  14228. var _c15=null;
  14229. try{
  14230. _c15=eval("("+_c14+")");
  14231. }
  14232. catch(e){
  14233. if(typeof console!="undefined"){
  14234. console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_c14);
  14235. console.log(e);
  14236. }
  14237. }
  14238. if(!_c15){
  14239. return;
  14240. }
  14241. var _c16=_c15.containers;
  14242. var _c17=_c15.version;
  14243. if(_c16.length>0){
  14244. this.m_frozenInfo={};
  14245. }
  14246. for(var _c18=0;_c18<_c16.length;_c18++){
  14247. var _c19=_c16[_c18];
  14248. var lid=_c19.lid;
  14249. var _c1b=_c19.freezeTop;
  14250. var _c1c=_c19.freezeSide;
  14251. var _c1d=document.getElementById("CVReport"+this.m_viewerId);
  14252. var _c1e=getElementsByAttribute(_c1d,"table","lid",lid+this.m_viewerId);
  14253. var _c1f=[];
  14254. if(_c1e&&(_c1b||_c1c)){
  14255. for(var i=0;i<_c1e.length;i++){
  14256. var _c21=_c1e[i];
  14257. var _c22=new PinFreezeContainer(this,lid,this.m_viewerId,_c19.freezeTop,_c19.freezeSide,_c21,i);
  14258. if(_c19.properties){
  14259. applyJSONProperties(_c22,_c19.properties);
  14260. }
  14261. _c1f.push(_c22);
  14262. }
  14263. }
  14264. this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_c1b,"freezeSide":_c1c,"pinFreezeContainers":_c1f,"initialLoad":true};
  14265. if(_c17>=1){
  14266. if(_c19.childContainers){
  14267. this.m_frozenInfo[lid].childContainers=_c19.childContainers;
  14268. }
  14269. if(_c19.parentContainer){
  14270. this.m_frozenInfo[lid].parentContainer=_c19.parentContainer;
  14271. }
  14272. }
  14273. }
  14274. };
  14275. PinFreezeManager.prototype.removeIdAttribute=function(_c23){
  14276. var _c24=_c23.getAttribute("id");
  14277. if(_c24!==null&&_c24!==""){
  14278. _c23.removeAttribute("id");
  14279. }
  14280. var _c25=getElementsByAttribute(_c23,"*","id","*");
  14281. if(_c25&&_c25.length){
  14282. for(var i=0;i<_c25.length;i++){
  14283. _c25[i].removeAttribute("id");
  14284. }
  14285. }
  14286. return _c23;
  14287. };
  14288. PinFreezeManager.prototype.isElementInMainOutput=function(_c27){
  14289. return PinFreezeContainer.isElementInMainOutput(_c27);
  14290. };
  14291. PinFreezeManager.prototype.isIWidgetMobile=function(){
  14292. return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
  14293. };
  14294. PinFreezeManager.prototype.destroy=function(){
  14295. GUtil.destroyProperties(this);
  14296. };
  14297. dojo.provide("WidgetContextManager");
  14298. dojo.declare("WidgetContextManager",null,{PP_WIDGET_CONTEXT:"com.ibm.widget.context",PP_REPORT_PROMPT_CONTEXT:"com.ibm.widget.context.report.prompt",PP_REPORT_DRILL_CONTEXT:"com.ibm.widget.context.report.drill",PP_VALUES:"values",PP_RANGES:"ranges",PP_MULTIVALUED:"multivalued",PP_MODELITEM:"modelItem",PP_MODELINFO:"modelInfo",PP_PROMPT:"prompt",PP_DRILL:"drill",PP_SELECT_CHOICES:"selectChoices",PP_BUX_SELECTVALUECONTROL_CONTEXT:"com.ibm.widget.context.bux.selectValueControl",PP_BUX_SELECTION_CONTEXT:"com.ibm.widget.context.bux.selection",PP_CASCADEPROMPT_CLEAR:"clearCascadePromptParams",EVENT_NAME_PROMPT:"com.ibm.widget.contextChanged.prompt",EVENT_NAME_DRILL:"com.ibm.widget.contextChanged.drill",EVENT_NAME_SELECTVALUECONTROL:"com.ibm.widget.contextChanged.selectValueControl",DEFAULT_MODEL_PATH:".",m_widget:null,m_oWidgetContextContainer:null,m_oPromptContextContainer:null,m_oDrillContextContainer:null,m_oPromptGenericContext:null,m_oDrillGenericContext:null,m_oFilterGenericContext:null,m_oSelectionFilterContext:null,m_oContextCollection:null,m_oWidgetContextObject:null,m_oPromptContextObject:null,m_oDrillContextObject:null,m_aSelectionFilterObjects:null,constructor:function(_c28){
  14299. this.m_widget=_c28;
  14300. this.m_oWidgetContextContainer={};
  14301. this.m_oPromptContextContainer={};
  14302. this.m_oDrillContextContainer={};
  14303. this.m_oPromptGenericContext={};
  14304. this.m_oDrillGenericContext={};
  14305. this.m_oFilterGenericContext={};
  14306. this.m_oSelectionFilterContext={};
  14307. this.m_oContextCollection={};
  14308. this.m_oWidgetContextObject={};
  14309. this.m_oPromptContextObject={};
  14310. this.m_oDrillContextObject={};
  14311. this.m_aSelectionFilterObjects=null;
  14312. },getWidgetContextObject:function(){
  14313. var _c29={};
  14314. if(this.m_oWidgetContextContainer){
  14315. _c29[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextContainer;
  14316. if(this.m_widget){
  14317. _c29.clientId=this.m_widget.getWidgetId();
  14318. }
  14319. }
  14320. return _c29;
  14321. },getFilterFirstItemName:function(){
  14322. var _c2a=this.m_oFilterGenericContext;
  14323. if(_c2a){
  14324. var _c2b=(_c2a.values?_c2a.values:_c2a.ranges);
  14325. for(_c2c in _c2b){
  14326. return _c2c;
  14327. }
  14328. }
  14329. for(var _c2c in _c2a){
  14330. return _c2c;
  14331. }
  14332. return null;
  14333. },getItemNames:function(_c2d){
  14334. var _c2e=[];
  14335. var _c2f=_c2d[this.PP_WIDGET_CONTEXT];
  14336. if(_c2f){
  14337. var _c30=(_c2f.values?_c2f.values:_c2f.ranges);
  14338. for(var _c31 in _c30){
  14339. _c2e.push(_c31);
  14340. }
  14341. return _c2e;
  14342. }
  14343. for(var _c31 in _c2f){
  14344. _c2e.push(_c31);
  14345. }
  14346. return _c2e;
  14347. },raisePromptEvent:function(_c32,_c33,_c34,_c35,_c36){
  14348. var _c37=this._buildGeneralizedPromptPayload(_c32,_c33,_c34,_c35,_c36);
  14349. if(_c37){
  14350. this.m_widget.fireEvent(this.EVENT_NAME_PROMPT,null,_c37);
  14351. this._updatePromptContext(_c37);
  14352. this._updateWidgetContextContainer();
  14353. }
  14354. },_updatePromptContext:function(_c38){
  14355. this._updatePromptGenericContext(_c38);
  14356. this._updatePromptContextContainer(_c38);
  14357. },_resetWorkingMembers:function(){
  14358. this.m_oWidgetContextObject={};
  14359. this.m_oPromptContextObject={};
  14360. this.m_oDrillContextObject={};
  14361. },updateFilterContext:function(_c39){
  14362. this.m_oFilterGenericContext=_c39[this.PP_WIDGET_CONTEXT];
  14363. this._updateWidgetContextContainer();
  14364. },getSelectValueControlTypeFromPayload:function(_c3a){
  14365. var _c3b=_c3a[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
  14366. if(_c3b&&_c3b["selectValueControl"]){
  14367. return _c3b["selectValueControl"]["controlType"];
  14368. }
  14369. return null;
  14370. },getSelectValuePropertyFromPayload:function(_c3c,_c3d){
  14371. var _c3e=_c3c[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
  14372. if(_c3e&&_c3e["selectValueControl"]){
  14373. return _c3e["selectValueControl"][_c3d];
  14374. }
  14375. return null;
  14376. },_updateWidgetContextContainer:function(){
  14377. this.m_oWidgetContextContainer={};
  14378. var _c3f=null;
  14379. if(this.m_oDrillGenericContext[this.PP_VALUES]){
  14380. _c3f=dojo.mixin(_c3f,this.m_oDrillGenericContext[this.PP_VALUES]);
  14381. }
  14382. if(this.m_oPromptGenericContext[this.PP_VALUES]){
  14383. _c3f=dojo.mixin(_c3f,this.m_oPromptGenericContext[this.PP_VALUES]);
  14384. }
  14385. if(this.m_oFilterGenericContext[this.PP_VALUES]){
  14386. _c3f=dojo.mixin(_c3f,this.m_oFilterGenericContext[this.PP_VALUES]);
  14387. }
  14388. if(this.m_oSelectionFilterContext[this.PP_VALUES]){
  14389. _c3f=dojo.mixin(_c3f,this.m_oSelectionFilterContext[this.PP_VALUES]);
  14390. }
  14391. if(_c3f){
  14392. this.m_oWidgetContextContainer[this.PP_VALUES]=_c3f;
  14393. }
  14394. var _c40=null;
  14395. if(this.m_oPromptGenericContext[this.PP_RANGES]){
  14396. _c40=dojo.mixin(_c40,this.m_oPromptGenericContext[this.PP_RANGES]);
  14397. }
  14398. if(this.m_oFilterGenericContext[this.PP_RANGES]){
  14399. _c40=dojo.mixin(_c40,this.m_oFilterGenericContext[this.PP_RANGES]);
  14400. }
  14401. if(_c40){
  14402. this.m_oWidgetContextContainer[this.PP_RANGES]=_c40;
  14403. }
  14404. },_updatePromptGenericContext:function(_c41){
  14405. if(_c41[this.PP_WIDGET_CONTEXT]){
  14406. this.m_oPromptGenericContext=_c41[this.PP_WIDGET_CONTEXT];
  14407. }
  14408. },_updatePromptContextContainer:function(_c42){
  14409. if(_c42[this.PP_REPORT_PROMPT_CONTEXT]&&_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]){
  14410. this.m_oPromptContextContainer=_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT];
  14411. }
  14412. },_buildGeneralizedPromptPayload:function(_c43,_c44,_c45,_c46,_c47){
  14413. var _c48=null;
  14414. this._resetWorkingMembers();
  14415. var _c49=this._buildContextsFromPrompt(_c43,_c44);
  14416. if(_c49){
  14417. _c48={};
  14418. _c48[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextObject;
  14419. var _c4a={};
  14420. _c4a[_c46]=this.m_oPromptContextObject;
  14421. _c48[this.PP_REPORT_PROMPT_CONTEXT]={"prompt":{"id":this.m_widget.iContext.widgetId,"action":_c45,"itemSpecification":_c4a}};
  14422. _c48[this.PP_CASCADEPROMPT_CLEAR]=_c47;
  14423. }
  14424. return _c48;
  14425. },_getReportParameterNodes:function(_c4b){
  14426. var _c4c=XMLBuilderLoadXMLFromString(_c4b);
  14427. if(!_c4c){
  14428. return null;
  14429. }
  14430. var _c4d=_c4c.firstChild;
  14431. if(!_c4d){
  14432. return null;
  14433. }
  14434. var _c4e=XMLHelper_FindChildByTagName(_c4d,"reportParameters",true);
  14435. if(!_c4e){
  14436. return null;
  14437. }
  14438. var _c4f=XMLHelper_FindChildrenByTagName(_c4e,"reportParameter",false);
  14439. if(!_c4f){
  14440. return null;
  14441. }
  14442. return _c4f;
  14443. },_getSelectChoicesXMLString:function(_c50,_c51){
  14444. var _c52=null;
  14445. var _c53="p_"+_c50;
  14446. if(_c51.get(_c53)){
  14447. _c52=_c51.get(_c53);
  14448. }
  14449. return _c52;
  14450. },_getSelectChoicesNode:function(_c54){
  14451. var _c55=null;
  14452. if(_c54){
  14453. var _c56=XMLBuilderLoadXMLFromString(_c54,true);
  14454. if(_c56&&_c56.firstChild){
  14455. _c55=_c56.firstChild;
  14456. }
  14457. }
  14458. return _c55;
  14459. },_buildContextsFromPrompt:function(_c57,_c58){
  14460. var _c59=this._getReportParameterNodes(_c57);
  14461. if(_c59===null){
  14462. return false;
  14463. }
  14464. for(var i in _c59){
  14465. var _c5b=_c59[i];
  14466. var _c5c=_c5b.getAttribute("parameterName");
  14467. var _c5d=this._getSelectChoicesXMLString(_c5c,_c58);
  14468. var _c5e=this._getSelectChoicesNode(_c5d);
  14469. if(_c5e){
  14470. var _c5f,_c60,_c61;
  14471. if(!this._isPromptRangeType(_c5d)){
  14472. var _c62=this._buildReportContextValuesFromPromptSelectOption(_c5e);
  14473. _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c62);
  14474. _c60=this._buildValuesArrayFromReportContextValueArray(_c62);
  14475. _c61=this.PP_VALUES;
  14476. }else{
  14477. _c60=this._buildMinMaxArrayFromRangePrompt(_c5e);
  14478. _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c60);
  14479. _c61=this.PP_RANGES;
  14480. }
  14481. this.m_oPromptContextObject[_c5c]=_c5f;
  14482. if(!this.m_oWidgetContextObject[_c61]){
  14483. this.m_oWidgetContextObject[_c61]={};
  14484. }
  14485. this.m_oWidgetContextObject[_c61][_c5c]=_c60;
  14486. }
  14487. }
  14488. return true;
  14489. },_createPromptDetailObject:function(_c63,_c64,_c65,_c66){
  14490. var _c67={};
  14491. _c67[this.PP_SELECT_CHOICES]=_c63;
  14492. if(_c64!==null){
  14493. _c67[this.PP_MODELITEM]=_c64;
  14494. }
  14495. if(_c65!==null){
  14496. _c67[this.PP_MULTIVALUED]=true;
  14497. }
  14498. _c67[this.PP_VALUES]=_c66;
  14499. return _c67;
  14500. },_isPromptRangeType:function(_c68){
  14501. var _c69=new RegExp(/^<selectChoices><select[\s\S]*Range/);
  14502. return _c69.test(_c68);
  14503. },_buildReportContextValuesFromPromptSelectOption:function(_c6a){
  14504. var _c6b=[];
  14505. if(_c6a){
  14506. var _c6c=dojo.query("selectOption[displayValue]",_c6a);
  14507. if(_c6c.length>0){
  14508. for(var i=0;i<_c6c.length;i++){
  14509. var _c6e=_c6c[i].getAttribute("displayValue");
  14510. var _c6f=_c6c[i].getAttribute("useValue");
  14511. var _c70={"caption":_c6e,"use":_c6f};
  14512. _c6b.push(_c70);
  14513. }
  14514. }
  14515. }
  14516. return _c6b;
  14517. },_buildValuesArrayFromReportContextValueArray:function(_c71){
  14518. var _c72=[];
  14519. if(_c71&&_c71.length>0){
  14520. for(var i=0;i<_c71.length;i++){
  14521. var _c74=_c71[i].caption;
  14522. if(_c74){
  14523. _c72.push(_c74);
  14524. }
  14525. }
  14526. }
  14527. return _c72;
  14528. },_buildMinMaxArrayFromRangePrompt:function(_c75){
  14529. var _c76=[];
  14530. if(_c75&&_c75.childNodes&&_c75.childNodes.length>0){
  14531. var _c77=_c75.childNodes.length;
  14532. for(var i=0;i<_c77;i++){
  14533. var _c79=this._buildMinMaxFromSelectAnyRange(_c75.childNodes[i]);
  14534. if(_c79){
  14535. _c76.push(_c79);
  14536. }
  14537. }
  14538. }
  14539. return _c76;
  14540. },_buildMinMaxFromSelectAnyRange:function(_c7a){
  14541. var _c7b=null;
  14542. if(_c7a){
  14543. var _c7c=dojo.query("[displayValue]",_c7a);
  14544. if(_c7c.length>0){
  14545. _c7b={};
  14546. for(var i=0;i<_c7c.length;i++){
  14547. var node=_c7c[i];
  14548. var _c7f=(node.nodeName==="start")?"min":"max";
  14549. _c7b[_c7f]=node.getAttribute("useValue");
  14550. _c7b[_c7f+"Display"]=node.getAttribute("displayValue");
  14551. }
  14552. }
  14553. }
  14554. return _c7b;
  14555. },handleIncomingPromptEvent:function(evt){
  14556. if(!evt||!evt.payload){
  14557. return;
  14558. }
  14559. var _c81=this._convertToLegacyPromptPayload(evt.payload);
  14560. if(_c81){
  14561. var _c82={"payload":_c81};
  14562. this.m_widget.onPromptLegacyPayload(_c82);
  14563. }
  14564. },_convertToLegacyPromptPayload:function(_c83){
  14565. var _c84=null;
  14566. var _c85=_c83[this.PP_REPORT_PROMPT_CONTEXT];
  14567. if(_c85&&_c85.prompt){
  14568. _c85=_c85.prompt;
  14569. _c84={};
  14570. _c84.cv_id=_c85.id;
  14571. _c84.parameters=this._genLegacyPromptParameterArrayFromItemSpec(_c85.itemSpecification);
  14572. _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR];
  14573. }else{
  14574. if(_c83[this.PP_WIDGET_CONTEXT]&&_c83[this.PP_WIDGET_CONTEXT].values){
  14575. _c84={};
  14576. _c84.parameters=[];
  14577. var _c86=_c83[this.PP_WIDGET_CONTEXT].values;
  14578. for(var _c87 in _c86){
  14579. var _c88=_c86[_c87];
  14580. if(_c88&&_c88.length>0){
  14581. if(_c88.length==1&&_c88[0].indexOf("<selectChoices>")===0){
  14582. _c84.parameters.push({"parmName":_c87,"parmValue":_c88[0]});
  14583. }else{
  14584. var _c89="<selectChoices>";
  14585. for(var i=0;i<_c88.length;i++){
  14586. _c89+="<selectOption useValue=\""+_c88[i]+"\" displayValue=\""+_c88[i]+"\"/>";
  14587. }
  14588. _c89+="</selectChoices>";
  14589. _c84.parameters.push({"parmName":_c87,"parmValue":_c89});
  14590. }
  14591. }
  14592. }
  14593. _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR];
  14594. }
  14595. }
  14596. return _c84;
  14597. },_genLegacyPromptParameterArrayFromItemSpec:function(_c8b){
  14598. if(!_c8b){
  14599. return null;
  14600. }
  14601. var _c8c=this._getFirstPropertyOfObject(_c8b);
  14602. var _c8d=[];
  14603. for(var _c8e in _c8c){
  14604. var _c8f=_c8c[_c8e];
  14605. var _c90={parmName:_c8e,parmValue:_c8f[this.PP_SELECT_CHOICES],modelItem:_c8f[this.PP_MODELITEM]};
  14606. if(_c8f[this.PP_MULTIVALUES]!==null){
  14607. _c90.multivalued=true;
  14608. }
  14609. _c8d.push(_c90);
  14610. }
  14611. return _c8d;
  14612. },_isRangeTypeValues:function(_c91){
  14613. if(_c91){
  14614. if(_c91.min||_c91.max){
  14615. return true;
  14616. }
  14617. }
  14618. return false;
  14619. },_getFirstPropertyOfObject:function(_c92){
  14620. var _c93=null;
  14621. for(var _c94 in _c92){
  14622. _c93=_c92[_c94];
  14623. break;
  14624. }
  14625. return _c93;
  14626. },_getFirstPropertyNameOfObject:function(_c95){
  14627. var _c96=null;
  14628. for(var _c97 in _c95){
  14629. _c96=_c97;
  14630. break;
  14631. }
  14632. return _c96;
  14633. },extractWidgetContextObject:function(_c98){
  14634. if(_c98){
  14635. var _c99=_c98[this.PP_WIDGET_CONTEXT];
  14636. if(_c99){
  14637. var obj={};
  14638. obj[this.PP_WIDGET_CONTEXT]=_c99;
  14639. return obj;
  14640. }
  14641. }
  14642. return null;
  14643. },genMergedWidgetContextObject:function(){
  14644. var _c9b=null;
  14645. var _c9c=null;
  14646. for(var key in this.m_oContextCollection){
  14647. var _c9e=this.m_oContextCollection[key];
  14648. if(_c9e){
  14649. var _c9f=_c9e[this.PP_WIDGET_CONTEXT];
  14650. if(_c9f){
  14651. if(_c9f[this.PP_VALUES]){
  14652. _c9b=dojo.mixin(_c9b,_c9f[this.PP_VALUES]);
  14653. }
  14654. if(_c9f[this.PP_RANGES]){
  14655. _c9c=dojo.mixin(_c9c,this._convertRangeArrayToObjectForActiveReport(_c9f[this.PP_RANGES]));
  14656. }
  14657. }
  14658. }
  14659. }
  14660. if(_c9b||_c9c){
  14661. var obj={};
  14662. obj[this.PP_WIDGET_CONTEXT]={};
  14663. if(_c9b){
  14664. obj[this.PP_WIDGET_CONTEXT][this.PP_VALUES]=_c9b;
  14665. }
  14666. if(_c9c){
  14667. obj[this.PP_WIDGET_CONTEXT][this.PP_RANGES]=_c9c;
  14668. }
  14669. return obj;
  14670. }
  14671. return null;
  14672. },raiseDrillEvent:function(_ca1,_ca2,_ca3){
  14673. var _ca4=this._buildGeneralizedDrillPayload(_ca1,_ca2,_ca3);
  14674. if(_ca4){
  14675. this.m_widget.fireEvent(this.EVENT_NAME_DRILL,null,_ca4);
  14676. this._updateDrillContext(_ca4);
  14677. this._updateWidgetContextContainer();
  14678. }
  14679. },_updateDrillContext:function(_ca5){
  14680. this._updateDrillGenericContext(_ca5);
  14681. this._updateDrillContextContainer(_ca5);
  14682. },_updateDrillGenericContext:function(_ca6){
  14683. if(_ca6[this.PP_WIDGET_CONTEXT]){
  14684. this.m_oDrillGenericContext=_ca6[this.PP_WIDGET_CONTEXT];
  14685. }
  14686. },_updateDrillContextContainer:function(_ca7){
  14687. if(_ca7[this.PP_REPORT_DRILL_CONTEXT]&&_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]){
  14688. this.m_oDrillContextContainer=_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL];
  14689. }
  14690. },_buildGeneralizedDrillPayload:function(_ca8,_ca9,_caa){
  14691. if(!_ca8||!_ca9){
  14692. return null;
  14693. }
  14694. var _cab={};
  14695. var _cac={};
  14696. for(var i in _ca8){
  14697. var _cae=_ca8[i];
  14698. var mun=(_cae.mun)?_cae.mun:"";
  14699. var lun=(_cae.lun)?_cae.lun:"";
  14700. var hun=(_cae.hun)?_cae.hun:"";
  14701. var _cb2={};
  14702. _cb2[this.PP_VALUES]=[{"caption":_cae.displayValue,"mun":mun,"lun":lun,"hun":hun}];
  14703. if(_cae.summary){
  14704. _cb2["summary"]=_cae.summary;
  14705. }
  14706. _cab[_cae.dataItem]=_cb2;
  14707. _cac[_cae.dataItem]=[_cae.displayValue];
  14708. }
  14709. var _cb3={};
  14710. _cb3[this.PP_VALUES]=_cac;
  14711. var _cb4={};
  14712. _cb4[_caa]=_cab;
  14713. var _cb5={};
  14714. _cb5[_ca9]={"id":this.m_widget.iContext.widgetId,"action":_ca9,"itemSpecification":_cb4};
  14715. var _cb6={};
  14716. _cb6[this.PP_WIDGET_CONTEXT]=_cb3;
  14717. _cb6[this.PP_REPORT_DRILL_CONTEXT]=_cb5;
  14718. return _cb6;
  14719. },genDrillSpecObjects:function(_cb7){
  14720. if(!_cb7||!_cb7[this.PP_REPORT_DRILL_CONTEXT]){
  14721. return null;
  14722. }
  14723. var _cb8=[];
  14724. var _cb9=_cb7[this.PP_REPORT_DRILL_CONTEXT];
  14725. var _cba=this._getFirstPropertyOfObject(_cb9);
  14726. var _cbb=this._getFirstPropertyOfObject(_cba.itemSpecification);
  14727. for(var _cbc in _cbb){
  14728. var _cbd=_cbb[_cbc];
  14729. var _cbe=_cbd[this.PP_VALUES];
  14730. if(_cbe&&_cbe.length>0){
  14731. var _cbf=_cbe[0];
  14732. var _cc0={"dataItem":_cbc,"displayValue":_cbf.caption,"mun":_cbf.mun,"lun":_cbf.lun,"hun":_cbf.hun};
  14733. if(_cbf.summary){
  14734. _cc0["summary"]=_cbf.summary;
  14735. }
  14736. _cb8.push(_cc0);
  14737. }
  14738. }
  14739. return (_cb8.length>0)?_cb8:null;
  14740. },getDrillActionType:function(_cc1){
  14741. if(!_cc1||!_cc1[this.PP_REPORT_DRILL_CONTEXT]){
  14742. return null;
  14743. }
  14744. return this._getFirstPropertyNameOfObject(_cc1[this.PP_REPORT_DRILL_CONTEXT]);
  14745. },_convertRangeArrayToObjectForActiveReport:function(_cc2){
  14746. if(_cc2){
  14747. var _cc3={};
  14748. for(var name in _cc2){
  14749. var _cc5=_cc2[name];
  14750. if(_cc5&&_cc5.length>0){
  14751. _cc3[name]=_cc5[0];
  14752. }else{
  14753. _cc3[name]=_cc5;
  14754. }
  14755. }
  14756. return _cc3;
  14757. }
  14758. return _cc2;
  14759. },getItemsInItemSpecification:function(_cc6){
  14760. var _cc7=_cc6[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
  14761. if(_cc7&&_cc7["selectValueControl"]&&_cc7["selectValueControl"]["itemSpecification"]){
  14762. return this._getFirstPropertyOfObject(_cc7["selectValueControl"]["itemSpecification"]);
  14763. }
  14764. return null;
  14765. },genRemoveDiscreteFilterPayload:function(_cc8){
  14766. var _cc9={"clientId":_cc8,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selectValueControl":{"selectValueControl":{"id":_cc8,"controlType":"selectValueFilter","type":"discrete","valueType":"string"}}};
  14767. return _cc9;
  14768. },genEmptySelectionPayload:function(oCV,_ccb){
  14769. var obj={"clientId":_ccb,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selection":{"selection":{"id":_ccb,"valueType":"string"}}};
  14770. this.m_oSelectionFilterContext={};
  14771. this._updateWidgetContextContainer();
  14772. this.setSelectionFilterObjects(null);
  14773. return obj;
  14774. },genSelectionPayload:function(oCV,_cce,_ccf){
  14775. var _cd0={};
  14776. var _cd1={"id":_cce,"valueType":"string"};
  14777. var obj={"clientId":_cce,"com.ibm.widget.context":_cd0,"com.ibm.widget.context.bux.selection":{"selection":_cd1}};
  14778. var _cd3=false;
  14779. var _cd4=[];
  14780. var oSC=oCV.getSelectionController();
  14781. var _cd6=oSC.getAllSelectedObjects();
  14782. if(_cd6&&_cd6.length>0){
  14783. var _cd7={};
  14784. var _cd8=null;
  14785. var _cd9={};
  14786. var _cda={};
  14787. for(var i=0;i<_cd6.length;i++){
  14788. if(_cd6[i].populateSelectionPayload(_cd9,_cda,_ccf)){
  14789. _cd3=true;
  14790. _cd8=_cd6[i].getCtxAttributeString();
  14791. if(typeof _cd7[_cd8]=="undefined"){
  14792. _cd7[_cd8]=true;
  14793. _cd4.push(_cd6[i].marshal(oSC,oCV.getId()));
  14794. }
  14795. }
  14796. }
  14797. if(_cd3){
  14798. _cd0.values=_cd9;
  14799. var _cdc={};
  14800. var _cdd=oCV.getModelPath();
  14801. var _cde=(_cdd)?_cdd:".";
  14802. _cdc[_cde]=_cda;
  14803. _cd1.itemSpecification=_cdc;
  14804. }
  14805. }
  14806. this.m_oSelectionFilterContext=obj[this.PP_WIDGET_CONTEXT];
  14807. this._updateWidgetContextContainer();
  14808. this.setSelectionFilterObjects(_cd4.length>0?_cd4:null);
  14809. return obj;
  14810. },isSelectionPayloadForReset:function(obj){
  14811. if(obj&&obj[this.PP_WIDGET_CONTEXT]){
  14812. return this.isEmptyObject(obj[this.PP_WIDGET_CONTEXT]);
  14813. }
  14814. return true;
  14815. },setSelectionFilterObjects:function(_ce0){
  14816. this.m_aSelectionFilterObjects=_ce0;
  14817. },getSelectionFilterObjects:function(){
  14818. return this.m_aSelectionFilterObjects;
  14819. },toStringSelectionFilterObjects:function(){
  14820. var str="";
  14821. for(var idx in this.m_aSelectionFilterObjects){
  14822. if(str.length>0){
  14823. str+=",";
  14824. }
  14825. str+=JSON.stringify(this.m_aSelectionFilterObjects[idx]);
  14826. }
  14827. return "["+str+"]";
  14828. },convertSelectionToSelectValueControlPayload:function(_ce3){
  14829. if(_ce3["com.ibm.widget.context.bux.selection"]){
  14830. var _ce4=_ce3["com.ibm.widget.context.bux.selection"]["selection"];
  14831. _ce4.controlType="selectValueFilter";
  14832. _ce4.type="discrete";
  14833. _ce3["com.ibm.widget.context.bux.selectValueControl"]={"selectValueControl":_ce4};
  14834. delete _ce3["com.ibm.widget.context.bux.selection"];
  14835. }
  14836. return _ce3;
  14837. },convertGenericToSelectValueControlPayload:function(_ce5){
  14838. if(this._hasItemSpecification(_ce5)){
  14839. return;
  14840. }
  14841. if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
  14842. var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
  14843. for(dataItem in _ce6){
  14844. if(_ce6[dataItem].length==0){
  14845. delete _ce6[dataItem];
  14846. }
  14847. }
  14848. var _ce7=true;
  14849. for(dataItem in _ce6){
  14850. _ce7=false;
  14851. break;
  14852. }
  14853. if(_ce7){
  14854. delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
  14855. }
  14856. }
  14857. if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]){
  14858. var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
  14859. var _ce7=true;
  14860. for(dataItem in _ce6){
  14861. _ce7=false;
  14862. break;
  14863. }
  14864. if(_ce7){
  14865. delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
  14866. }
  14867. }
  14868. var _ce6=null;
  14869. if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
  14870. key=this.PP_VALUES;
  14871. _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
  14872. }else{
  14873. key=this.PP_RANGES;
  14874. _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
  14875. }
  14876. var cv=this.m_widget.getViewerObject();
  14877. var _ce9=null;
  14878. if(cv){
  14879. var sc=cv.getSelectionController();
  14880. _ce9=sc.getCCDManager();
  14881. }
  14882. for(dataItem in _ce6){
  14883. var _ceb=true;
  14884. var _cec={};
  14885. for(var _ced in _ce6){
  14886. var _cee=[];
  14887. for(var i=0;i<_ce6[_ced].length;i++){
  14888. var _cf0=_ce6[_ced][i];
  14889. var _cf1={"caption":_cf0};
  14890. if(_ceb){
  14891. var mun=_ce9?_ce9.getMUNForRDIAndUseValue(_ced,_cf0):null;
  14892. if(mun!=null){
  14893. _cf1.mun=mun;
  14894. }else{
  14895. _ceb=false;
  14896. for(var i=0;i<_cee.length;i++){
  14897. delete _cee[i].mun;
  14898. }
  14899. }
  14900. }
  14901. _cee.push(_cf1);
  14902. }
  14903. _cec[_ced]={"values":_cee};
  14904. }
  14905. var _cf3={};
  14906. var _cf4=cv?cv.getModelPath():null;
  14907. var _cf5=(_cf4)?_cf4:"unknown";
  14908. _cf3[_cf5]=_cec;
  14909. _ce5[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]={"selectValueControl":{"valueType":"string","type":"discrete","controlType":"selectValueFilter","id":_ce5.clientId?_ce5.clientId:"","itemSpecification":_cf3}};
  14910. }
  14911. },getMUNOfItemValueInItemSpecification:function(_cf6,_cf7){
  14912. var _cf8=this.getItemsInItemSpecification(_cf6);
  14913. if(_cf8&&_cf8[_cf7]){
  14914. var _cf9=_cf8[_cf7];
  14915. if(_cf9.values&&_cf9.values.length>0){
  14916. return _cf9.values[0].mun;
  14917. }
  14918. }
  14919. return null;
  14920. },_hasItemSpecification:function(_cfa){
  14921. if(_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["itemSpecification"]){
  14922. return true;
  14923. }
  14924. if(_cfa[this.PP_BUX_SELECTION_CONTEXT]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]["itemSpecification"]){
  14925. return true;
  14926. }
  14927. return false;
  14928. },getSourceUniqueId:function(_cfb,_cfc){
  14929. var id=null;
  14930. var _cfe=null;
  14931. if(_cfb["clientId"]){
  14932. id=_cfb["clientId"];
  14933. }
  14934. if(_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]){
  14935. _cfe="selectValueControl";
  14936. if(!id&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]){
  14937. id=_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"];
  14938. }
  14939. }else{
  14940. if(_cfb[this.PP_BUX_SELECTION_CONTEXT]){
  14941. _cfe="selection";
  14942. if(!id&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]){
  14943. id=_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"];
  14944. }
  14945. }else{
  14946. if(_cfb[this.PP_REPORT_PROMPT_CONTEXT]){
  14947. _cfe="prompt";
  14948. if(!id&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]){
  14949. id=_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"];
  14950. }
  14951. }else{
  14952. if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){
  14953. _cfe="drill";
  14954. if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]){
  14955. id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"];
  14956. }
  14957. }else{
  14958. if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){
  14959. _cfe="drill";
  14960. if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]){
  14961. id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"];
  14962. }
  14963. }
  14964. }
  14965. }
  14966. }
  14967. }
  14968. if(!id){
  14969. id="unknown";
  14970. }
  14971. if(!_cfe){
  14972. _cfe="unknown";
  14973. }
  14974. if(typeof _cfc=="string"){
  14975. _cfe=_cfc;
  14976. }
  14977. return id+"_"+_cfe;
  14978. },isWidgetContextEmpty:function(_cff){
  14979. return (this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT])||(this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_VALUES])&&this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_RANGES])));
  14980. },isEmptyObject:function(obj){
  14981. var _d01=true;
  14982. if(obj){
  14983. for(var _d02 in obj){
  14984. _d01=false;
  14985. break;
  14986. }
  14987. }
  14988. return _d01;
  14989. },updateContextCollection:function(_d03){
  14990. if(!this.isEmptyObject(_d03)){
  14991. var _d04=this.getSourceUniqueId(_d03);
  14992. if(this.isWidgetContextEmpty(_d03)){
  14993. if(this.m_oContextCollection[_d04]){
  14994. this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d04]);
  14995. }else{
  14996. var _d05=this.getSourceUniqueId(_d03,"unknown");
  14997. if(this.m_oContextCollection[_d05]){
  14998. this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d05]);
  14999. }
  15000. }
  15001. }else{
  15002. if(_d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
  15003. for(var name in _d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
  15004. for(var key in this.m_oContextCollection){
  15005. var _d08=this.m_oContextCollection[key];
  15006. if(_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES]&&_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]){
  15007. delete _d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name];
  15008. }
  15009. }
  15010. }
  15011. }
  15012. this.m_oContextCollection[_d04]=dojo.clone(_d03);
  15013. }
  15014. return this.m_oContextCollection;
  15015. }
  15016. },setEmptyArrayToWidgetContextValues:function(_d09){
  15017. if(_d09&&_d09[this.PP_WIDGET_CONTEXT]&&_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
  15018. var _d0a=_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
  15019. for(var name in _d0a){
  15020. _d0a[name]=[];
  15021. }
  15022. }
  15023. }});
  15024. dojo.provide("viewer.AnnotationHelper");
  15025. dojo.declare("viewer.AnnotationHelper",null,{m_loadAnnotationsDfd:null,m_bCallGetAnnotations:true,m_bAnnotationsEnabled:null,constructor:function(_d0c){
  15026. this.m_viewerIWidget=_d0c;
  15027. this.m_bCallGetAnnotations=true;
  15028. this.m_bAnnotationsEnabled=null;
  15029. },getAnnotationStore:function(){
  15030. return this.m_viewerIWidget.getAnnotationStore();
  15031. },setCallGetAnnotations:function(flag){
  15032. this.m_bCallGetAnnotations=flag;
  15033. },isEnabled:function(){
  15034. if(this.m_bAnnotationsEnabled===null){
  15035. this.m_bAnnotationsEnabled=this.m_viewerIWidget.getViewerObject().bBuxAnnotationsAvailable;
  15036. }
  15037. return this.m_bAnnotationsEnabled;
  15038. },refreshAnnotationData:function(){
  15039. if(this.m_loadAnnotationsDfd){
  15040. return null;
  15041. }
  15042. this.m_loadAnnotationsDfd=new dojo.Deferred();
  15043. this.fetchAnnotationData();
  15044. return this.m_loadAnnotationsDfd;
  15045. },fetchAnnotationData:function(){
  15046. var _d0e=this.m_viewerIWidget;
  15047. if(!this.m_bCallGetAnnotations||!this.isEnabled()){
  15048. return;
  15049. }
  15050. dojo.when(_d0e.getWidgetStoreID(),dojo.hitch(this,function(_d0f){
  15051. if(!_d0f){
  15052. return;
  15053. }
  15054. this.m_viewerIWidget.getLoadManager().runWhenHasViewer(dojo.hitch(this,this._fetchAnnotationData,_d0f));
  15055. }));
  15056. },_fetchAnnotationData:function(_d10){
  15057. var _d11=this.m_viewerIWidget.getViewerObject();
  15058. var _d12=_d11.getSelectionController();
  15059. var _d13=_d12.getCCDManager().m_md;
  15060. if(!_d13){
  15061. _d13={};
  15062. }
  15063. _d13=dojo.toJson(_d13);
  15064. var _d14=_d12.getCCDManager().m_cd;
  15065. if(!_d14){
  15066. _d14={};
  15067. }
  15068. _d14=dojo.toJson(_d14);
  15069. var _d15={"complete":{},"fault":{}};
  15070. _d15.complete["object"]=this;
  15071. _d15.complete["method"]=this.fetchAnnotationDataResponse;
  15072. _d15.fault["object"]=this;
  15073. _d15.fault["method"]=this.fetchAnnotationDataResponseFault;
  15074. var _d16=new AsynchJSONDispatcherEntry(_d11);
  15075. _d16.setCallbacks(_d15);
  15076. _d16.addFormField("widgetStoreID",_d10);
  15077. _d16.addFormField("ui.action","getAnnotations");
  15078. _d16.addFormField("cv.metatdata",_d13);
  15079. _d16.addFormField("cv.context",_d14);
  15080. _d16.sendRequest();
  15081. },fetchAnnotationDataResponseFault:function(_d17){
  15082. this.m_bCallGetAnnotations=false;
  15083. var _d18=new FaultDialog(this.m_viewerIWidget.getViewerObject());
  15084. var _d19=_d17.getSoapFault();
  15085. var _d1a=null;
  15086. var _d1b=XMLHelper_FindChildByTagName(_d19,"exception",true);
  15087. if(_d1b){
  15088. var _d1c=XMLHelper_FindChildByTagName(_d1b,"errorCode",false);
  15089. if(_d1c){
  15090. _d1a=XMLHelper_GetText(_d1c);
  15091. }
  15092. }
  15093. if(_d1a==="0"){
  15094. var _d1d=null;
  15095. var _d1e=XMLHelper_FindChildByTagName(_d1b,"message",false);
  15096. if(_d1e){
  15097. var _d1f=XMLHelper_FindChildByTagName(_d1e,"messageString",true);
  15098. if(_d1f){
  15099. _d1d=XMLHelper_GetText(_d1f,false);
  15100. }
  15101. }
  15102. if(_d1d){
  15103. var _d20=/ANS-GEN-(\d{2,4})/;
  15104. var _d21=_d20.exec(_d1d);
  15105. if(_d21&&_d21.length&&_d21.length>1){
  15106. var _d22=_d21[1];
  15107. if(_d22==="0075"){
  15108. _d18.setErrorMessage(RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR);
  15109. }
  15110. }
  15111. }
  15112. }
  15113. this._cleanupPreviousAnnotations();
  15114. this.getAnnotationStore().clear();
  15115. _d18.show(_d19);
  15116. if(this.m_loadAnnotationsDfd){
  15117. this.m_loadAnnotationsDfd.errback();
  15118. this.m_loadAnnotationsDfd=null;
  15119. }
  15120. },fetchAnnotationDataResponse:function(_d23){
  15121. var _d24=window["CVEditContentActionInstance"];
  15122. var _d25=_d23.getResult();
  15123. this.m_bCallGetAnnotations=this.m_bCallGetAnnotations&&_d25!==null;
  15124. if(_d25===null){
  15125. _d25=[];
  15126. }
  15127. var _d26=this.m_viewerIWidget.getViewerObject();
  15128. _d26.envParams["cv.annotationData"]=_d25;
  15129. this._cleanupPreviousAnnotations();
  15130. if(_d25.length>0){
  15131. if(this.getAnnotationStore()){
  15132. var _d27=this._generateMatchedAnnotationsFromViewerObject();
  15133. this.getAnnotationStore().load(_d27);
  15134. this.displayCommentIndicators();
  15135. }
  15136. }
  15137. if(this.m_loadAnnotationsDfd){
  15138. this.m_loadAnnotationsDfd.callback();
  15139. this.m_loadAnnotationsDfd=null;
  15140. }
  15141. },_cleanupPreviousAnnotations:function(){
  15142. var _d28=this.getAnnotationStore();
  15143. if(_d28){
  15144. var _d29=_d28.getAll();
  15145. for(var _d2a in _d29){
  15146. var _d2b=this.m_viewerIWidget.getWidgetId()+"_"+_d2a+"_comment";
  15147. var _d2c=dijit.byId(_d2b);
  15148. if(typeof _d2c!="undefined"&&_d2c!=null){
  15149. _d2c.destroy();
  15150. delete _d2c;
  15151. }
  15152. _d28.clear(_d2a);
  15153. }
  15154. }
  15155. },_generateMatchedAnnotationsFromViewerObject:function(){
  15156. var _d2d=this.m_viewerIWidget.getViewerObject();
  15157. var _d2e=[];
  15158. if(_d2d&&_d2d.envParams&&_d2d.envParams["cv.annotationData"]){
  15159. _d2e=eval(_d2d.envParams["cv.annotationData"]);
  15160. }
  15161. var _d2f=this._generateAnnotationListWithoutORoperator(_d2e);
  15162. return this._updateAnnotationCtxWithMatchedCellCtx(_d2f,_d2d);
  15163. },_generateAnnotationListWithoutORoperator:function(_d30){
  15164. var _d31=[];
  15165. for(var i=0,len=_d30.length;i<len;i++){
  15166. var anno=_d30[i];
  15167. if(anno.ctx){
  15168. var _d35=bux.AnnotationHelper.generateCTXList(anno.ctx);
  15169. for(var j=0,jLen=_d35.length;j<jLen;j++){
  15170. var _d38={ann:anno.ann,lmt:anno.lmt,lmtf:anno.lmtf,ctx:anno.ctx,desc:anno.desc,fd:anno.fd,layoutElementId:anno.layoutElementId,owner:anno.owner,ownerSearchPath:anno.ownerSearchPath,pv:anno.pv,rdi:anno.rdi,sd:anno.sd,version:anno.version||1};
  15171. _d38.ctx=_d35[j];
  15172. _d31.splice(0,0,_d38);
  15173. }
  15174. }else{
  15175. _d31.splice(0,0,anno);
  15176. }
  15177. }
  15178. return _d31;
  15179. },_updateAnnotationCtxWithMatchedCellCtx:function(_d39,_d3a){
  15180. var _d3b=[];
  15181. var _d3c=new AnnotationCTXLookup(this.m_viewerIWidget.getViewerObject().getSelectionController().getCCDManager());
  15182. _d3c.populateCtxDetailsForAllAnnotations(_d39);
  15183. var _d3d=[];
  15184. for(var i=0,len=_d39.length;i<len;i++){
  15185. var anno=_d39[i];
  15186. if(anno.ctx){
  15187. if(_d3d.length===0){
  15188. _d3d=dojo.query("[ctx]",this.m_viewerIWidget.iContext.getRootElement());
  15189. }
  15190. for(var j=0,jLen=_d3d.length;j<jLen;j++){
  15191. var _d43=_d3d[j].getAttribute("ctx");
  15192. if(_d3c.isAnnotatedCell(anno,_d43)){
  15193. anno.ctx=_d43;
  15194. _d3b.splice(0,0,anno);
  15195. break;
  15196. }
  15197. }
  15198. }else{
  15199. _d3b.splice(0,0,anno);
  15200. }
  15201. }
  15202. return _d3b;
  15203. },displayCommentIndicators:function(){
  15204. var _d44=this.getAnnotationStore();
  15205. var _d45=_d44.getAll();
  15206. for(var cell in _d45){
  15207. var _d47=new bux.AnnotationIndicator({annotationStore:_d44,context:cell,iWidgetContainer:this.m_viewerIWidget,dir:this.m_viewerIWidget.getViewerObject().getDirection()});
  15208. _d47.addExistingCommentToCell();
  15209. }
  15210. },repositionCommentIndicators:function(){
  15211. var _d48=this.getAnnotationStore();
  15212. var _d49=_d48.getAll();
  15213. for(var id in _d49){
  15214. var _d4b=_d49[id];
  15215. var ctx=_d4b[0].getContext();
  15216. var _d4d=_d48.getIndicatorWidgetId(ctx);
  15217. if(_d4d!==null){
  15218. var _d4e=dijit.byId(_d4d);
  15219. _d4e.addToPage();
  15220. }
  15221. }
  15222. },promptForSave:function(_d4f){
  15223. dojo["require"]("bux.dialogs.InformationDialog");
  15224. var _d50=new bux.dialogs.InformationDialog({title:RV_RES.IDS_JS_COMMENT_DLG_TITLE,sMainMessage:RV_RES.IDS_JS_COMMENT_DLG_MESSAGE,sDescription:RV_RES.IDS_JS_COMMENT_DLG_DETAILS,sInfoIconClass:"bux-informationDialog-warning-icon",buttons:["YES","NO"],yesOKHandler:_d4f});
  15225. _d50.startup();
  15226. _d50.show();
  15227. },addComment:function(_d51,_d52){
  15228. if(this.m_viewerIWidget.isSaveNecessary()){
  15229. this.promptForSave(dojo.hitch(this,this.onCommentSaveAcknowledge,_d51,_d52));
  15230. }else{
  15231. this.addNewComment(_d51,_d52);
  15232. }
  15233. },editComment:function(_d53){
  15234. var _d54=bux.getComment(this.m_viewerIWidget.iContext,this.getAnnotationStore().getEffectiveIds(_d53));
  15235. if(_d54&&_d54.edit){
  15236. _d54.edit();
  15237. }
  15238. },deleteComment:function(_d55){
  15239. this.getAnnotationStore().deleteOneComment(_d55);
  15240. },addNewComment:function(_d56,_d57){
  15241. this.addAsNewComment(_d56,(_d57==null)?"":(_d57+" - "));
  15242. },addAsNewComment:function(_d58,text){
  15243. var _d5a=null;
  15244. var _d5b=(_d58===null)?this.getAnnotationStore().WIDGET_CONTEXT:_d58;
  15245. var _d5c=this.getAnnotationStore().getIndicatorWidgetId(_d5b);
  15246. if(_d5c!=null){
  15247. _d5a=dijit.byId(_d5c);
  15248. }
  15249. if(_d5a==null){
  15250. dojo["require"]("bux.AnnotationIndicator");
  15251. _d5a=new bux.AnnotationIndicator({annotationStore:this.getAnnotationStore(),context:_d5b,iWidgetContainer:this.m_viewerIWidget,dir:this.m_viewerIWidget.getViewerObject().getDirection()});
  15252. window.setTimeout(function(){
  15253. _d5a.addNewCommentToCell(text);
  15254. },0);
  15255. }else{
  15256. window.setTimeout(function(){
  15257. _d5a.comment.editNewComment(_d5b,text);
  15258. },0);
  15259. }
  15260. },onCommentSaveAcknowledge:function(_d5d,_d5e){
  15261. this.m_viewerIWidget._pendingContextId=_d5d;
  15262. this.m_viewerIWidget._pendingCellValue=_d5e;
  15263. this.m_viewerIWidget.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.save"});
  15264. },addWidgetComment:function(){
  15265. if(this.m_viewerIWidget.isSaveNecessary()){
  15266. this.promptForSave(dojo.hitch(this,this.onCommentSaveAcknowledge,null,this.m_viewerIWidget.getDisplayName()));
  15267. }else{
  15268. this.addNewComment(null,this.m_viewerIWidget.getDisplayName());
  15269. }
  15270. },editWidgetComment:function(){
  15271. var _d5f=bux.getComment(this.m_viewerIWidget.iContext,[this.getAnnotationStore().WIDGET_CONTEXT]);
  15272. if(_d5f&&_d5f.edit){
  15273. _d5f.edit();
  15274. }
  15275. },deleteWidgetComment:function(){
  15276. this.deleteComment(this.getAnnotationStore().WIDGET_CONTEXT);
  15277. },commitComment:function(_d60){
  15278. if(_d60.getContext()!==this.getAnnotationStore().WIDGET_CONTEXT){
  15279. return this.commitCellComment(_d60);
  15280. }else{
  15281. return this.commitWidgetComment(_d60,this.getAnnotationStore());
  15282. }
  15283. },commitCellComment:function(_d61){
  15284. var _d62=new dojo.Deferred();
  15285. var _d63=this.m_viewerIWidget.getViewerObject();
  15286. var _d64={customArguments:[_d61,_d62],"complete":{"object":this,"method":this.handleCellCommentSaveResponse},"fault":{"object":this,"method":this.handleCellCommentSaveErrorResponse},"error":{"object":this,"method":this.handleCellCommentSaveServerErrorResponse}};
  15287. var _d65=new AsynchJSONDispatcherEntry(_d63);
  15288. _d65.setCallbacks(_d64);
  15289. this.preparePostForCommitCellComment(_d65,_d61).then(function(){
  15290. _d63.dispatchRequest(_d65);
  15291. });
  15292. return _d62;
  15293. },preparePostForCommitCellComment:function(_d66,_d67){
  15294. var dfd=new dojo.Deferred();
  15295. dojo.when(this.m_viewerIWidget.getWidgetStoreID(),dojo.hitch(this,function(_d69){
  15296. var _d6a=this.m_viewerIWidget.getViewerObject();
  15297. var _d6b=_d6a.getSelectionController();
  15298. _d66.addFormField("widgetStoreID",_d69);
  15299. _d66.addFormField("ui.action","commentSave");
  15300. _d66.addFormField("cv.metatdata",dojo.toJson(_d6b.getCCDManager().m_md));
  15301. _d66.addFormField("cv.context",dojo.toJson(_d6b.getCCDManager().m_cd));
  15302. _d66.addFormField("cv.commentId",_d67.getContext());
  15303. _d66.addFormField("cv.commentDesc",xml_encode(_d67.getDescription()));
  15304. var lid=_d6b.getAllSelectedObjects()[0].getLayoutElementId();
  15305. if(lid){
  15306. lid=lid.replace(this.m_viewerIWidget.getViewerId(),"");
  15307. _d67.setParentId(lid);
  15308. _d66.addFormField("cv.commentLayoutId",_d67.getParentId());
  15309. var _d6d=new AnnotationInfoBar(_d6a,lid);
  15310. var _d6e=_d6d.createFilterContext();
  15311. if(_d6e!=null){
  15312. _d67.setFilterContext(_d6e);
  15313. if(_d6e.getPromptsJSON()){
  15314. _d66.addFormField("cv.filterContext_prompts",dojo.toJson(_d6e.getPromptsJSON()));
  15315. }
  15316. if(_d6e.getFilterJSON()){
  15317. _d66.addFormField("cv.filterContext_filter",dojo.toJson(_d6e.getFilterJSON()));
  15318. }
  15319. if(_d6e.getSlidersJSON()){
  15320. _d66.addFormField("cv.filterContext_sliders",dojo.toJson(_d6e.getSlidersJSON()));
  15321. }
  15322. }
  15323. }
  15324. dfd.callback();
  15325. }));
  15326. return dfd;
  15327. },commitWidgetComment:function(_d6f){
  15328. dojo["require"]("bux.Services");
  15329. var _d70=bux.Services.getGateway()+"/annotationService/creation";
  15330. var _d71={};
  15331. _d71["annotationName"]=_d6f.getName();
  15332. if(_d71["annotationName"]==null){
  15333. _d71["annotationName"]="";
  15334. }
  15335. _d71["annotationDescription"]=_d6f.getDescription();
  15336. var dfd=new dojo.Deferred();
  15337. dojo.when(this.m_viewerIWidget.getWidgetStoreID(),dojo.hitch(this,function(_d73){
  15338. _d71["annotationParentID"]=_d73;
  15339. bux.xhrPost({url:_d70,sync:true,content:_d71}).then(dojo.hitch(this,function(_d74){
  15340. this.handleCommentSaveDone(_d74,_d6f,this.getAnnotationStore(),this.m_viewerIWidget);
  15341. _d6f.loadDetails();
  15342. dfd.callback();
  15343. }));
  15344. }));
  15345. return dfd;
  15346. },handleCellCommentSaveResponse:function(_d75,_d76,_d77){
  15347. var _d78=_d75.getJSONResponseObject();
  15348. if(_d78){
  15349. var _d79=_d78.json;
  15350. if(_d79){
  15351. var _d7a=this.handleCommentSaveDone(_d79,_d76,this.getAnnotationStore(),this.m_viewerIWidget);
  15352. if(typeof _d7a!="Error"){
  15353. _d76.loadDetails();
  15354. }
  15355. }
  15356. }
  15357. _d77.callback(_d75);
  15358. },handleCellCommentSaveErrorResponse:function(_d7b,_d7c,_d7d){
  15359. _d7d.errback(new Error(_d7b.getSoapFaultDetailMessageString()));
  15360. },handleCellCommentSaveServerErrorResponse:function(_d7e,_d7f,_d80){
  15361. var _d81=new Error(_d7e.xmlHttp.statusText);
  15362. _d81.xhr=_d7e.xmlHttp;
  15363. _d80.errback(_d81);
  15364. },handleCommentSaveDone:function(_d82,_d83,_d84,_d85){
  15365. var _d86=XMLBuilderLoadXMLFromString(_d82);
  15366. if(_d86){
  15367. var _d87=_d86.firstChild;
  15368. var _d88=XMLHelper_FindChildByTagName(_d87,"annotation",false);
  15369. if(_d88){
  15370. var _d89=XMLHelper_FindChildByTagName(_d88,"id",false);
  15371. if(_d89){
  15372. var _d8a=XMLHelper_GetText(_d89);
  15373. _d83.setServiceId(_d8a);
  15374. _d83.setIWidgetContainer(_d85);
  15375. _d84.setWidgetContainer(_d85);
  15376. this.setCallGetAnnotations(true);
  15377. return _d82;
  15378. }
  15379. }
  15380. }
  15381. return new Error(_d82.toString());
  15382. }});
  15383. dojo.provide("bux.reportViewer");
  15384. dojo.require("dojo.buxViewer");
  15385. dojo.require("bux.AnnotationHelper");
  15386. dojo.require("bux.AnnotationIndicator");
  15387. dojo.require("viewer.AnnotationHelper");
  15388. dojo.require("bux.data.AnnotationStore");
  15389. dojo.require("bux.iwidget.common.MultilingualWidgetBase");
  15390. dojo.require("InfoBarBase");
  15391. dojo.require("WidgetContextManager");
  15392. var globalViewerIdentifier=1;
  15393. dojo.declare("bux.reportViewer",bux.iwidget.common.MultilingualWidgetBase,{annotationStore:null,annotationHelper:null,savedOutput:null,undoRedoQueue:null,dojoConnections:null,properties:null,promptParametersRetrieved:false,viewerId:null,xNodeId:null,namespacePrefix:"x",timer:null,timerInterval:20,GODASHBOARD_REPORT_VERSION:"1.0.0.0",BUX_REPORT_VERSION:"4.0.0.0.0",BUX_REPORT_CASPIAN_RP1_VERSION:"3.0.0.0.0",RAP_REPORT_INFO_VERSION:"1.0.0.0",viewerWidgetLastAction:null,sliderState:null,sViewerIWidgetId:null,bToolbarInitialized:false,m_oWidgetContextManager:null,m_oInfoBarRenderedState:{},m_bRunReportOption:null,m_oLoadManager:null,m_visible:null,m_debugDelayedViewerLoadingMode:0,m_delayedLoadingContext:null,m_doGetParametersOnLoad:null,widgetSize:null,copyPasteResource:null,_pastedWidget:false,ciPublishedReportPath:null,touchStartX:-1,touchPaging:false,_BUXDBInfoArray:null,m_bSelectionFilterSwitch:false,savedToolbarButtons:null,constructor:function(){
  15394. this.onUnloadInProgress=false;
  15395. this.annotationHelper=new viewer.AnnotationHelper(this);
  15396. this.savedOutput=new CIWidgetSavedOutput(this);
  15397. this.undoRedoQueue=new UndoRedoQueue(this);
  15398. this.viewerIdentifier=(globalViewerIdentifier++).toString();
  15399. this.m_oCV=null;
  15400. this.m_oLoadManager=new ViewerLoadManager(this);
  15401. this.m_doGetParametersOnLoad=false;
  15402. this._isMobile=false;
  15403. this.m_bSelectionFilterSwitch=false;
  15404. this.m_oWidgetContextManager=new WidgetContextManager(this);
  15405. this.addWindowEventListeners();
  15406. this.m_bReportDropped=false;
  15407. this.sliderState={};
  15408. this.savedToolbarButtons={};
  15409. },getWidgetId:function(){
  15410. return this.sViewerIWidgetId;
  15411. },getAnnotationHelper:function(){
  15412. return this.annotationHelper;
  15413. },getUndoRedoQueue:function(){
  15414. return this.undoRedoQueue;
  15415. },getDisplayName:function(){
  15416. var _d8b=this.iContext.getItemSet("buxrtstate",false);
  15417. if(_d8b){
  15418. var _d8c=_d8b.getItemValue("displayTitle");
  15419. return _d8c?_d8c:"";
  15420. }
  15421. return "";
  15422. },getSavedOutput:function(){
  15423. return this.savedOutput;
  15424. },getAttributeValue:function(name){
  15425. return this.iContext.getiWidgetAttributes().getItemValue(name);
  15426. },setAttributeValue:function(name,_d8f){
  15427. this.iContext.getiWidgetAttributes().setItemValue(name,_d8f);
  15428. },removeAttributeValue:function(name){
  15429. this.iContext.getiWidgetAttributes().removeItem(name);
  15430. },getViewerObject:function(){
  15431. if(!this.m_oCV){
  15432. try{
  15433. this.m_oCV=window["oCV"+this.getViewerId()];
  15434. }
  15435. catch(ex){
  15436. return null;
  15437. }
  15438. if(!this.m_oCV){
  15439. var _d91=this.getWidgetId();
  15440. for(var _d92=0;_d92<window.gaRV_INSTANCES.length;_d92++){
  15441. if(window.gaRV_INSTANCES[_d92].widgetId==_d91){
  15442. this.m_oCV=window.gaRV_INSTANCES[_d92];
  15443. var _d93=this.getViewerId();
  15444. var _d94=this.m_oCV.getId();
  15445. this.setViewerId(_d94);
  15446. var _d95=document.getElementsByTagName("head").item(0).childNodes;
  15447. for(var i=0;i<_d95.length;i++){
  15448. var node=_d95[i];
  15449. if(node.getAttribute&&node.getAttribute("namespaceId")==_d93){
  15450. node.setAttribute("namespaceId",_d94);
  15451. }
  15452. }
  15453. break;
  15454. }
  15455. }
  15456. }
  15457. }
  15458. return this.m_oCV;
  15459. },setViewerId:function(id){
  15460. this.viewerId=id;
  15461. },getViewerId:function(){
  15462. if(!this.viewerId){
  15463. this.viewerId=this.namespacePrefix+this.viewerIdentifier;
  15464. }
  15465. return this.viewerId;
  15466. },getLoadManager:function(){
  15467. return this.m_oLoadManager;
  15468. },getReportBlocker:function(){
  15469. if(!this.m_reportBlocker){
  15470. this.m_reportBlocker=new Blocker(this.m_oCV.getId());
  15471. }
  15472. return this.m_reportBlocker;
  15473. },placeTabControlInView:function(){
  15474. var oCV=this.getViewerObject();
  15475. if(oCV&&oCV.getTabController()){
  15476. if(oCV.getTabController().getSelectedTab()&&oCV.getTabController().getSelectedTab().getFocusableDiv()){
  15477. oCV.setKeepFocus(oCV.getTabController().getSelectedTab().getFocusableDiv());
  15478. }
  15479. dojo.window.scrollIntoView(oCV.getTabController().getWrapperDiv());
  15480. }
  15481. },setReportBlocker:function(_d9a){
  15482. this.m_reportBlocker=_d9a;
  15483. },isSavedOutput:function(){
  15484. var _d9b=this.getViewerObject();
  15485. if(typeof _d9b!=="undefined"&&_d9b!==null){
  15486. var _d9c=(_d9b.envParams["ui.action"]);
  15487. return (_d9c==="view"||_d9c==="buxView");
  15488. }
  15489. return false;
  15490. },isMobile:function(){
  15491. return this._isMobile;
  15492. },getEmbeddedMobileItem:function(){
  15493. var _d9d=false;
  15494. var _d9e=this.iContext.getItemSet("buxrtstate",false);
  15495. if(_d9e){
  15496. _d9d=_d9e.getItemValue("embeddedMobile")=="true"?true:false;
  15497. }
  15498. return _d9d;
  15499. },getBUXRTStateInfoMap:function(_d9f){
  15500. if(!window.icdConfig||!window.icdConfig.ZIPIMode||window.icdConfig.ZIPIMode==="0"){
  15501. return "";
  15502. }
  15503. var _da0=["<RTStateInfo>"];
  15504. if(_d9f&&_d9f.length>0){
  15505. _da0.push(_d9f);
  15506. }
  15507. var _da1=this.getDisplayName();
  15508. if(_da1&&_da1.length>0){
  15509. _da0.push("<widgetTitle>",xml_encode(_da1),"</widgetTitle>");
  15510. }
  15511. if(this._BUXDBInfoArray&&this._BUXDBInfoArray.length>0){
  15512. _da0=_da0.concat(this._BUXDBInfoArray);
  15513. }
  15514. _da0.push("</RTStateInfo>");
  15515. return _da0.length>2?_da0.join(""):"";
  15516. },getBUXDBInfoArray:function(_da2){
  15517. var _da3=null;
  15518. var _da4=null;
  15519. if(_da2){
  15520. _da3=_da2.dbTitle;
  15521. _da4=_da2.dbSearchPath;
  15522. }else{
  15523. var _da5=this.iContext.getItemSet("buxrtstate",false);
  15524. if(_da5){
  15525. _da3=_da5.getItemValue("dbTitle");
  15526. _da4=_da5.getItemValue("dbSearchPath");
  15527. }
  15528. }
  15529. var _da6=[];
  15530. if(_da3&&_da4&&_da4.length>0){
  15531. _da6.push("<dbTitle>",xml_encode(_da3),"</dbTitle><dbSearchPath>",xml_encode(_da4),"</dbSearchPath>");
  15532. }
  15533. return _da6;
  15534. },loadExtraJavascriptFiles:function(_da7){
  15535. if(typeof CSelectionContext=="undefined"){
  15536. this._loadFile("/drill/CSelectionContextBuilder.js",_da7);
  15537. }
  15538. this._loadFile("/mdsrv/lineage.js",_da7);
  15539. if(window.cognosViewerDebug){
  15540. this._loadFile("/rv/viewer.extra.debug.js",_da7);
  15541. }else{
  15542. this._loadFile("/rv/viewer.extra.js",_da7);
  15543. }
  15544. },_loadFile:function(_da8,_da9){
  15545. if(dojo.isIE||dojo.isTrident||_da9.indexOf("..")==0){
  15546. var _daa=window.gScriptLoader.loadFile(_da9+_da8,"","GET");
  15547. var _dab=document.createElement("script");
  15548. _dab.type="text/javascript";
  15549. _dab.text=_daa;
  15550. document.getElementsByTagName("head")[0].appendChild(_dab);
  15551. }else{
  15552. dojo._loadPath(_da9+_da8,null);
  15553. }
  15554. },_getCWALaunchInformation:function(){
  15555. var args={url:this.buildPostUrl(),sync:false,handleAs:"json",preventCache:true,content:{"b_action":"cognosViewer","ui.action":"noOp","cv.responseFormat":"getCWALaunchParameters"},error:dojo.hitch(this,function(_dad){
  15556. this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
  15557. this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dad.message,description:_dad.description});
  15558. }),load:dojo.hitch(this,function(_dae,_daf){
  15559. var _db0=_daf.xhr.getResponseHeader("Content-Type");
  15560. if(_db0&&_db0.indexOf("text/html")!=-1&&_dae&&_dae.match(/<ERROR_CODE>CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){
  15561. this.handlePassportErrorFromDispatcher();
  15562. }else{
  15563. this._launchCWA(_dae);
  15564. }
  15565. })};
  15566. dojo.xhrPost(args);
  15567. },_launchCWA:function(_db1){
  15568. if(_db1){
  15569. if(typeof NewReportAction=="undefined"){
  15570. this.loadExtraJavascriptFiles(_db1.webContentRoot);
  15571. if(_db1.productLocale!="en"){
  15572. this._loadFile("rv/res/viewer_"+_db1.productLocale+".js",_db1.webContentRoot);
  15573. }
  15574. }
  15575. var _db2=new NewReportAction();
  15576. _db2.setRequestParms({"packageSearchPath":this.getAttributeValue("packageSearchPath"),"viewerIWidget":this,"webContentRoot":_db1.webContentRoot,"gateway":_db1.gateway,"capabilitiesXml":_db1.capabilitiesXML,"cafContextId":_db1.cafContextId});
  15577. this.removeAttributeValue("packageSearchPath");
  15578. _db2.execute();
  15579. }
  15580. },setNewReportInfo:function(info){
  15581. this._newReportInfo=info;
  15582. },_handleFileDialogCancel:function(){
  15583. this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"});
  15584. },_handleFileDialogOk:function(_db4){
  15585. this.removeAttributeValue("newReport");
  15586. this.setAttributeValue("packageSearchPath","storeID(\""+_db4+"\")");
  15587. this.onLoad();
  15588. },onLoad:function(){
  15589. this.sViewerIWidgetId=this.iContext.getRootElement().id;
  15590. if(this.getAttributeValue("packageSearchPath")){
  15591. this._getCWALaunchInformation();
  15592. return;
  15593. }else{
  15594. if(this.getAttributeValue("newReport")==="true"){
  15595. dojo["require"]("bux.dialogs.FileDialog");
  15596. var oDlg=new bux.dialogs.PackageDialog({onCancelHandler:dojo.hitch(this,this._handleFileDialogCancel),selectPackageHandler:dojo.hitch(this,this._handleFileDialogOk)});
  15597. oDlg.startup();
  15598. oDlg.show();
  15599. return;
  15600. }
  15601. }
  15602. var _db6=this.getAttributeValue("ViewerConcurrentRequestLimit");
  15603. if(_db6){
  15604. this.removeAttributeValue("ViewerConcurrentRequestLimit");
  15605. if(!window["gReportWidgetLoadQueue"]){
  15606. window["gReportWidgetLoadQueue"]=new ReportWidgetLoadQueue(_db6);
  15607. }
  15608. }
  15609. this._isMobile=this.getEmbeddedMobileItem();
  15610. this._BUXDBInfoArray=this.getBUXDBInfoArray();
  15611. var _db7=this.getAttributeValue("viewerProperties");
  15612. var _db8=this.getAttributeValue("promptParametersRetrieved");
  15613. if(_db8!==null&&_db8=="true"){
  15614. this.promptParametersRetrieved=true;
  15615. }
  15616. this.properties=this.createProperties(_db7);
  15617. this.savedOutput.setPagedOutput(!this.properties.getRetrieveAll());
  15618. this.setWidgetCopyPasteParameters();
  15619. this.m_bSelectionFilterSwitch=this.getAttributeValue("selectionFilterEnabled")=="true"?true:false;
  15620. if(this.isOpeningSavedDashboard()&&this.copyPasteResource==null){
  15621. this.disableListenToIfFullReportUpgraded();
  15622. this.enableFlashChartsToIfReportPartUpgraded();
  15623. this.disableListenToIfReportPartUpgraded();
  15624. if(this.isVisible()){
  15625. if(window["gReportWidgetLoadQueue"]){
  15626. window["gReportWidgetLoadQueue"].add(this);
  15627. }else{
  15628. this.postReport(null);
  15629. }
  15630. }
  15631. }else{
  15632. var _db9={action:"canvas.filters"};
  15633. this.fireEvent("com.ibm.bux.widget.action",null,_db9);
  15634. this.getLoadManager().viewerLoadInitiated();
  15635. this.m_visible=true;
  15636. }
  15637. this.addWidgetEventListeners();
  15638. this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.widget.contextChanged","widgetBuxCanvasTabs","com.ibm.widget.contextChanged");
  15639. this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.bux.data.filterCache.init","widgetBuxCanvasTabs","com.ibm.bux.data.filterCache.init");
  15640. this.fireEvent("com.ibm.bux.widget.updateStoreID",null,{});
  15641. },addWindowEventListeners:function(){
  15642. if(!this.dojoConnections){
  15643. this.dojoConnections=[];
  15644. }
  15645. this.dojoConnections.push(dojo.connect(window,"onresize",this,this.onBrowserResize));
  15646. this.dojoConnections.push(dojo.connect(window,"onbeforeunload",this,this.possibleUnloadEvent));
  15647. },addWidgetEventListeners:function(){
  15648. if(this.isMobile()){
  15649. this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchstart",this,this.onTouchStart));
  15650. this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchmove",this,this.onTouchMove));
  15651. }
  15652. },addChromeWhitespaceHandler:function(_dba){
  15653. if(isIE()){
  15654. var _dbb=document.getElementById("mainViewerTR"+_dba);
  15655. if(_dbb){
  15656. this.dojoConnections.push(dojo.connect(_dbb,"onmousedown",this,this.onMouseDownOnChromeDiv));
  15657. }
  15658. }
  15659. },onMouseDownOnChromeDiv:function(evt){
  15660. if(evt.srcElement.id.indexOf("PRMT",0)===0){
  15661. return;
  15662. }
  15663. var oCV=this.getViewerObject();
  15664. if(oCV){
  15665. var _dbe=oCV.getReportDiv();
  15666. if(_dbe){
  15667. var _dbf=_dbe.getBoundingClientRect();
  15668. var _dc0=_dbf.top+_dbe.offsetHeight;
  15669. if(evt.clientY>_dc0&&evt.button!==2){
  15670. if(oCV.getSelectionController()){
  15671. oCV.getSelectionController().clearSelectedObjects();
  15672. this.onSelectionChange();
  15673. stopEventBubble(evt);
  15674. }
  15675. }
  15676. }
  15677. }
  15678. },removeWindowEventListeners:function(){
  15679. if(this.dojoConnections){
  15680. for(var i=0;i<this.dojoConnections.length;++i){
  15681. dojo.disconnect(this.dojoConnections[i]);
  15682. }
  15683. delete this.dojoConnections;
  15684. }
  15685. },onBrowserResize:function(){
  15686. var oCV=this.getViewerObject();
  15687. if(oCV&&oCV.getPinFreezeManager()){
  15688. oCV.getPinFreezeManager().onResizeCanvas(this.isVisible());
  15689. }
  15690. },onTouchStart:function(e){
  15691. this.touchPaging=false;
  15692. if(this.m_oCV&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  15693. var _dc4=e.changedTouches[0];
  15694. if(_dc4&&_dc4.clientX){
  15695. this.touchStartX=parseInt(_dc4.clientX);
  15696. }
  15697. }
  15698. },onTouchMove:function(e){
  15699. if(!this.touchPaging&&this.touchStartX!=-1&&this.m_oCV&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
  15700. var _dc6=e.changedTouches[0];
  15701. if(_dc6&&_dc6.clientX){
  15702. var _dc7=parseInt(_dc6.clientX);
  15703. if(this.m_oCV.hasNextPage()&&this.touchStartX-_dc7>10){
  15704. this.touchPaging=true;
  15705. this.m_oCV.pageAction("nextPage");
  15706. this.m_oCV.setKeepFocus(false);
  15707. }else{
  15708. if(this.m_oCV.hasPrevPage()&&_dc7-this.touchStartX>10){
  15709. this.touchPaging=true;
  15710. this.m_oCV.pageAction("previousPage");
  15711. this.m_oCV.setKeepFocus(false);
  15712. }else{
  15713. this.touchPaging=false;
  15714. this.touchStartX=-1;
  15715. }
  15716. }
  15717. }
  15718. }
  15719. if(this.touchStartX>0){
  15720. stopEventBubble(e);
  15721. }
  15722. },isLiveReport:function(){
  15723. return this.isSavedOutput()===false&&!this.isLimitedInteractiveMode();
  15724. },createProperties:function(_dc8){
  15725. return new bux.reportViewer.Properties(this,_dc8);
  15726. },disableListenToIfFullReportUpgraded:function(){
  15727. if(this.isGoDashboardReportUpgrade()){
  15728. if(this.getAttributeValue("flexParam_properties")==null){
  15729. var _dc9={};
  15730. _dc9["*"]={blockedEvents:["com.ibm.bux.data.filter","com.ibm.bux.filter.values.get","com.ibm.bux.filter.items.get"]};
  15731. this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dc9);
  15732. }
  15733. }
  15734. },enableFlashChartsToIfReportPartUpgraded:function(){
  15735. if(this.isGoDashboardReportUpgrade()){
  15736. var _dca=this.getAttributeValue("originalReportPart");
  15737. if(typeof _dca!=="undefined"&&_dca!==null){
  15738. this.properties.setProperty("flashCharts","true");
  15739. }
  15740. }
  15741. },disableListenToIfReportPartUpgraded:function(){
  15742. if(this.isGoDashboardReportUpgrade()){
  15743. var _dcb=this.getAttributeValue("originalReportPart");
  15744. if(typeof _dcb!=="undefined"&&_dcb!==null){
  15745. var _dcc={};
  15746. _dcc["*"]={blockedEvents:["com.ibm.bux.viewer.drill","com.ibm.bux.viewer.prompt"]};
  15747. this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dcc);
  15748. }
  15749. }
  15750. },possibleUnloadEvent:function(){
  15751. var oCV=this.getViewerObject();
  15752. if(oCV){
  15753. oCV.getViewerDispatcher().possibleUnloadEvent();
  15754. }
  15755. },onUnload:function(){
  15756. this.onUnloadInProgress=true;
  15757. this.destroy();
  15758. this.iContext=null;
  15759. },onGetFiltersDone:function(evt){
  15760. if(typeof this.filterRequiredAction!="undefined"&&this.filterRequiredAction!=null){
  15761. var _dcf=this.buildDataFiltersParam(evt.payload.filters);
  15762. var _dd0=new ActionFactory(this.getViewerObject());
  15763. var _dd1=_dd0.load(this.filterRequiredAction);
  15764. _dd1.dispatchRequest(_dcf,this.filterRequiredAction);
  15765. this.filterRequiredAction=null;
  15766. }else{
  15767. this.postReport(evt.payload.filters);
  15768. this.postSetWidgetCopyPasteParameters();
  15769. }
  15770. },getOriginalFormFields:function(){
  15771. return this.m_originalFormFields;
  15772. },setOriginalFormFields:function(_dd2){
  15773. this.m_originalFormFields=_dd2;
  15774. },getXNodeId:function(){
  15775. return this.xNodeId;
  15776. },setXNodeId:function(_dd3){
  15777. this.xNodeId=_dd3;
  15778. },postReport:function(_dd4){
  15779. this.getLoadManager().viewerLoadInitiated();
  15780. this.viewerWidgetLastAction={"functionName":"postReport","param":[_dd4]};
  15781. if(this.getRunReportOption()!==false){
  15782. this.m_oLoadManager.runningReport();
  15783. }
  15784. var _dd5=this.buildPostContent(_dd4);
  15785. if(_dd5["ui.reportDrop"]=="true"){
  15786. this.m_bReportDropped=true;
  15787. }
  15788. this.m_originalFormFields=new CDictionary();
  15789. for(var _dd6 in _dd5){
  15790. if(_dd6!="cv.outputKey"){
  15791. this.m_originalFormFields.add(_dd6,_dd5[_dd6]);
  15792. }
  15793. }
  15794. var _dd7={};
  15795. if(this.getAttributeValue("X-Node-ID")){
  15796. this.setXNodeId(this.getAttributeValue("X-Node-ID"));
  15797. _dd7["X-Node-ID"]=this.getAttributeValue("X-Node-ID");
  15798. this.removeAttributeValue("X-Node-ID");
  15799. }
  15800. var args={url:this.buildPostUrl(),sync:false,preventCache:true,content:_dd5,headers:_dd7,error:dojo.hitch(this,function(_dd9){
  15801. this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
  15802. this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dd9.message,description:_dd9.description});
  15803. })};
  15804. if(typeof xhrMultiPart!=="undefined"&&xhrMultiPart.active){
  15805. args.load=dojo.hitch(this,function(_dda){
  15806. this.loadContent(_dda.responseText);
  15807. });
  15808. xhrMultiPart.Post(args);
  15809. }else{
  15810. args.load=dojo.hitch(this,function(_ddb,_ddc){
  15811. var _ddd=_ddc.xhr.getResponseHeader("Content-Type");
  15812. if(_ddd&&_ddd.indexOf("text/html")!=-1&&_ddb&&_ddb.match(/<ERROR_CODE>CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){
  15813. this.handlePassportErrorFromDispatcher();
  15814. }else{
  15815. this.loadContent(_ddb);
  15816. }
  15817. });
  15818. dojo.xhrPost(args);
  15819. }
  15820. },isDropped:function(){
  15821. return this.m_bReportDropped;
  15822. },cleanupStyles:function(){
  15823. this._cssLimitReached=true;
  15824. if(!this.isVisible()){
  15825. if(!this._styles){
  15826. this._styles=[];
  15827. }
  15828. var id=this.getViewerId();
  15829. var _ddf=document.getElementsByTagName("head").item(0).getElementsByTagName("style");
  15830. for(var i=0;i<_ddf.length;i++){
  15831. var _de1=_ddf[i];
  15832. if(_de1.getAttribute&&_de1.getAttribute("namespaceId")==id){
  15833. _de1.parentNode.removeChild(_de1);
  15834. this._styles.push(_de1);
  15835. i--;
  15836. }
  15837. }
  15838. }
  15839. },reloadStyles:function(){
  15840. if(this._styles){
  15841. while(this._styles.length>0){
  15842. var _de2=this._styles.pop();
  15843. document.getElementsByTagName("head").item(0).appendChild(_de2);
  15844. }
  15845. }
  15846. },loadStylesAndScripts:function(_de3,_de4,_de5){
  15847. window.gScriptLoader.m_bIgnoreAjaxWarnings=true;
  15848. window.gScriptLoader.setHandlerStylesheetLimit(true);
  15849. var _de6=this.iContext.getRootElement();
  15850. if(!_de6){
  15851. return;
  15852. }
  15853. _de3=window.gScriptLoader.loadCSS(_de3,_de4,true,this.getViewerId());
  15854. if(dojo.isIE||dojo.isTrident){
  15855. _de3="<span style='display:none'>&nbsp;</span>"+_de3;
  15856. }
  15857. _de4.innerHTML=_de3;
  15858. if(this.isSelectionFilterEnabled()){
  15859. this.updateDrillThroughLinks();
  15860. }
  15861. var _de7=GUtil.generateCallback(this.fireResizeEvent,[],this);
  15862. this.m_sScriptLoaderNamespace=this.getViewerId();
  15863. window.gScriptLoader.loadAll(_de4,_de7,this.m_sScriptLoaderNamespace,_de5);
  15864. },fireResizeEvent:function(){
  15865. var _de8=this.getViewerObject();
  15866. if(_de8==null){
  15867. this.fireEvent("com.ibm.bux.widget.render.done",null,{});
  15868. }else{
  15869. var _de9=_de8.getViewerWidget();
  15870. if(_de9){
  15871. _de8.m_resizeReady=true;
  15872. _de8.doneLoading();
  15873. }else{
  15874. var _dea=this;
  15875. setTimeout(function(){
  15876. _dea.fireResizeEvent();
  15877. },100);
  15878. }
  15879. }
  15880. },getSavedReportSearchPath:function(_deb){
  15881. var _dec=this.getAttributeValue("savedReportPath");
  15882. if(_dec){
  15883. return _dec;
  15884. }
  15885. var _ded=this.getAttributeValue("dashboardID");
  15886. _ded=_ded.substr("$$dbid$$".length);
  15887. var _dee="storeID(\""+_ded+"\")/*[@name="+xpath_attr_encode(_deb)+"]";
  15888. return _dee;
  15889. },isSavedReport:function(_def,_df0){
  15890. return (typeof _df0!=="undefined"&&_df0!==null&&_df0.length>0&&_def!==_df0);
  15891. },getGlobalPromptsInfo:function(){
  15892. var _df1=null;
  15893. var oCV=null;
  15894. var _df3=[];
  15895. var _df4=null;
  15896. if(window.gaRV_INSTANCES){
  15897. for(var _df5=0;_df5<window.gaRV_INSTANCES.length;_df5++){
  15898. oCV=window.gaRV_INSTANCES[_df5];
  15899. _df4=oCV.getPromptParametersInfo();
  15900. if(_df4!=null){
  15901. _df3.push(_df4);
  15902. }
  15903. }
  15904. }
  15905. if(_df3.length>0){
  15906. _df1="<globalPromptInfo>"+_df3.join("")+"</globalPromptInfo>";
  15907. }
  15908. return _df1;
  15909. },buildPostUrl:function(){
  15910. return this.getAttributeValue("gateway");
  15911. },getSavedItem:function(){
  15912. var _df6=this.getAttributeValue("savedReportPath");
  15913. if(!_df6){
  15914. _df6=this.getAttributeValue("savedReportName");
  15915. }
  15916. return _df6;
  15917. },setRunReportOption:function(_df7){
  15918. this.m_bRunReportOption=_df7;
  15919. },getRunReportOption:function(){
  15920. return this.m_bRunReportOption;
  15921. },resetRunReportOption:function(){
  15922. this.m_bRunReportOption=null;
  15923. },buildPostContent:function(_df8){
  15924. var _df9=this.getAttributeValue("originalReport");
  15925. var _dfa=this.getSavedItem();
  15926. var _dfb=this.getAttributeValue("originalReportPart");
  15927. var _dfc=this.getAttributeValue("flexParam_properties");
  15928. var _dfd=this.getAttributeValue("flexParam_promptData");
  15929. var _dfe=this.isSavedReport(_df9,_dfa);
  15930. var _dff=this.getPromptRunOption(_dfd,_dfe);
  15931. var _e00=this.getAttributeValue("cv.outputKey")?"cvx.high":"cognosViewer";
  15932. var _e01={"b_action":_e00,"run.outputFormat":"HTML","bux":"true","cv.responseFormat":"iWidget","cv.id":this.getViewerId()};
  15933. if(this.isMobile()){
  15934. _e01["container"]="mobile";
  15935. }
  15936. if(this.getAttributeValue("cv.outputKey")){
  15937. _e01["cv.outputKey"]=this.getAttributeValue("cv.outputKey");
  15938. this.removeAttributeValue("cv.outputKey");
  15939. _e01["widget.id"]=this.getWidgetId();
  15940. }
  15941. if(this.getAttributeValue("gateway")){
  15942. _e01["cv.gateway"]=this.getAttributeValue("gateway");
  15943. }
  15944. if(this.getAttributeValue("webcontent")){
  15945. _e01["cv.webcontent"]=this.getAttributeValue("webcontent");
  15946. }
  15947. this.sInitialSpec=this.getAttributeValue("specification");
  15948. if(_dfe){
  15949. this.addUserParamsToContent(_e01);
  15950. }
  15951. if(!this.sInitialSpec||this.copyPasteResource){
  15952. if(_dfe){
  15953. _e01["ui.object"]=this.getSavedReportSearchPath(_dfa);
  15954. if(!this.getAttributeValue("savedReportPath")&&this.getAttributeValue("savedReportName")){
  15955. _e01["savedReportName"]=_dfa;
  15956. }
  15957. _e01["widget.isSavedReport"]="true";
  15958. _e01["ui.reRunObj"]=this.getSavedReportSearchPath(_dfa);
  15959. }else{
  15960. _e01["ui.object"]=_df9;
  15961. if(_dfc&&_dfc.length>0){
  15962. _e01["flexParamProperties"]=_dfc;
  15963. }
  15964. if(_dfd&&_dfd.length>0){
  15965. _e01["gdPromptAnswers"]=_dfd;
  15966. }
  15967. }
  15968. _e01["originalReport"]=_df9;
  15969. }
  15970. if(this.getAttributeValue("savedOutputSearchPath")!=null){
  15971. this.setSavedOutputSearchPath(this.getAttributeValue("savedOutputSearchPath"));
  15972. _e01["ui.savedOutputSearchPath"]=this.getAttributeValue("savedOutputSearchPath");
  15973. _e01["ui.action"]="buxView";
  15974. }else{
  15975. if(this.getAttributeValue("mostRecentSavedOutput")=="true"){
  15976. _e01["ui.action"]="buxView";
  15977. }else{
  15978. if(_dfe){
  15979. if(this.getAttributeValue("limitedInteractiveMode")==="true"){
  15980. _e01["limitedInteractiveMode"]="true";
  15981. _e01["ui.action"]="run";
  15982. _e01["run.xslURL"]="bux.xsl";
  15983. }else{
  15984. _e01["ui.action"]="bux";
  15985. }
  15986. if(this.getRunReportOption()!==null){
  15987. _e01["widget.runReport"]=(this.getRunReportOption())?"true":"false";
  15988. if(this.getDoGetParametersOnLoad()){
  15989. _e01["widget.globalPromptInfo"]="<globalPromptInfo></globalPromptInfo>";
  15990. }
  15991. this.resetRunReportOption();
  15992. }
  15993. }else{
  15994. if(_dfb&&_dfb.length>0&&this.copyPasteResource==null){
  15995. _e01["ui.reportDrop"]="true";
  15996. _e01["ui.action"]="bux";
  15997. _e01["reportpart_id"]=_dfb;
  15998. }else{
  15999. if(this.copyPasteResource){
  16000. if(this.ciPublishedReportPath!=null){
  16001. _e01["ui.object"]=this.ciPublishedReportPath;
  16002. }
  16003. var _e02=dojo.fromJson(this.copyPasteResource);
  16004. if(_e02[0]&&_e02[0].body){
  16005. var _e03=this.getAttributeValue("copy.conversation");
  16006. if(_e03){
  16007. _e01["ui.conversation"]=_e03;
  16008. }
  16009. if(_e02[0].body.specification){
  16010. _e01["ui.spec"]=_e02[0].body.specification;
  16011. _e01["ui.action"]="buxCopyPaste";
  16012. if(this.getAttributeValue("reportCreatedInCW")==="true"){
  16013. _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
  16014. }
  16015. }else{
  16016. _e01["ui.reportDrop"]="true";
  16017. _e01["ui.action"]="buxDropReportOnCanvas";
  16018. }
  16019. }
  16020. }else{
  16021. if(this.sInitialSpec){
  16022. _e01["ui.spec"]=this.sInitialSpec;
  16023. _e01["ui.action"]="buxRunSpecification";
  16024. _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
  16025. }else{
  16026. if(this._newReportInfo){
  16027. for(prop in this._newReportInfo){
  16028. _e01[prop]=this._newReportInfo[prop];
  16029. }
  16030. _e01["ui.reportDrop"]="true";
  16031. _e01["ui.action"]="bux";
  16032. _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
  16033. _e01["ui.objectClass"]="report";
  16034. _e01["openReportFromClipboard"]="true";
  16035. }else{
  16036. _e01["ui.reportDrop"]="true";
  16037. _e01["ui.action"]="buxDropReportOnCanvas";
  16038. }
  16039. }
  16040. }
  16041. }
  16042. }
  16043. }
  16044. }
  16045. if(_dff!==null){
  16046. _e01["run.prompt"]=(_dff?"true":"false");
  16047. }
  16048. if(this.getAttributeValue("lastLocaleSaved")!=null){
  16049. _e01["lastLocaleSaved"]=this.getAttributeValue("lastLocaleSaved");
  16050. }
  16051. var _e04="";
  16052. if(this.copyPasteResource){
  16053. _e04=this.updateCopyPasteFilters(_df8);
  16054. }else{
  16055. _e04=this.buildDataFiltersParam(_df8);
  16056. if(typeof _df8=="undefined"||_df8==null){
  16057. _e04=this.buildFiltersParamFromLoadedSliderState();
  16058. }
  16059. }
  16060. if(_e04!=""){
  16061. _e01["cv.updateDataFilters"]=_e04;
  16062. }
  16063. if(this.properties&&this.properties.getFlashCharts()!==null){
  16064. _e01["savedFlashChartOption"]=(this.properties.getFlashCharts()?"true":"false");
  16065. var _e05=this.getAttributeValue("hasAVSChart");
  16066. if(_e05=="true"){
  16067. _e01["hasAVSChart"]="true";
  16068. }else{
  16069. _e01["hasAVSChart"]="false";
  16070. }
  16071. }
  16072. if(this.properties.getRowsPerPage()!=null){
  16073. _e01["run.verticalElements"]=this.properties.getRowsPerPage();
  16074. }
  16075. var _e06=this.getAttributeValue("syncNewWidgets");
  16076. if(_e06===null||_e06==="true"){
  16077. _e06=true;
  16078. }else{
  16079. _e06=false;
  16080. }
  16081. if(!_dfe&&_e06){
  16082. var _e07=this.getGlobalPromptsInfo();
  16083. if(_e07!==null){
  16084. _e01["widget.globalPromptInfo"]=_e07;
  16085. }
  16086. }
  16087. if(this.isOpeningSavedDashboard()){
  16088. _e01["ui.preserveRapTags"]="true";
  16089. }
  16090. if(_dfe===true&&this.getAttributeValue("limitedInteractiveMode")!=="true"){
  16091. this.getUserId();
  16092. }
  16093. if(window.cognosViewerDebug){
  16094. _e01.debug=true;
  16095. }
  16096. _e01["cv.buxCurrentUserRole"]=this.getUserRole();
  16097. if(this.shouldUseSavedReportInfo()){
  16098. _e01["rap.getReportInfo"]="false";
  16099. }
  16100. if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){
  16101. this.addBUXRTStateInfoToContent(_e01);
  16102. }
  16103. this.addBUXWidgetTitleToContent(_e01);
  16104. return _e01;
  16105. },addBUXRTStateInfoToContent:function(_e08){
  16106. if(_e08!=null){
  16107. var _e09=this.getBUXRTStateInfoMap();
  16108. if(_e09&&_e09.length>0){
  16109. _e08["cv.buxRTStateInfo"]=_e09;
  16110. }
  16111. }
  16112. },addBUXWidgetTitleToContent:function(_e0a){
  16113. if(_e0a!=null){
  16114. var _e0b=this.getAttributeValue("widgetTitle");
  16115. if(_e0b&&_e0b.length>0){
  16116. _e0a["widgetTitle"]=_e0b;
  16117. }
  16118. var _e0c=this.getDisplayName();
  16119. if(_e0c&&_e0c.length>0){
  16120. _e0a["displayTitle"]=_e0c;
  16121. }
  16122. }
  16123. },addUserParamsToContent:function(_e0d){
  16124. var _e0e=this.getAttributeValue("userParams");
  16125. if(!_e0e){
  16126. return;
  16127. }
  16128. var doc=XMLBuilderLoadXMLFromString(_e0e);
  16129. if(!doc){
  16130. return;
  16131. }
  16132. var _e10=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false);
  16133. var _e11=_e10.length;
  16134. for(var i=0;i<_e11;i++){
  16135. if(!_e10[i]){
  16136. continue;
  16137. }
  16138. var _e13=XMLHelper_FindChildByTagName(_e10[i],"name",false);
  16139. if(!_e13){
  16140. continue;
  16141. }
  16142. var _e14=XMLHelper_FindChildByTagName(_e10[i],"value",false);
  16143. _e0d[XMLHelper_GetText(_e13)]=(!_e14?"":XMLHelper_GetText(_e14));
  16144. }
  16145. if(_e11>0){
  16146. _e0d["widget.userParameters"]="true";
  16147. if(this.getAttributeValue("viewerReportPrompts")){
  16148. _e0d["viewerReportPrompts"]=this.getAttributeValue("viewerReportPrompts");
  16149. }
  16150. }
  16151. this.removeAttributeValue("userParams");
  16152. },shouldUseSavedReportInfo:function(){
  16153. return this.getAttributeValue("rapReportInfoVersion")===this.RAP_REPORT_INFO_VERSION&&this.getAttributeValue("rapReportInfo")!=null;
  16154. },isConsumeUser:function(){
  16155. return this.getUserRole()==="consume";
  16156. },getUserRole:function(){
  16157. var _e15=null;
  16158. var _e16=this.iContext.getItemSet("buxuserprofile",false);
  16159. if(_e16){
  16160. _e15=_e16.getItemValue("currentUserRole");
  16161. }
  16162. return _e15==null?"assemble":_e15;
  16163. },getUserId:function(){
  16164. dojo["require"]("bux.UserAccount");
  16165. return bux.UserAccount.getUserAccount().then(dojo.hitch(this,function(_e17){
  16166. this.m_sUserId=_e17.cm$searchPath;
  16167. return this.m_sUserId;
  16168. }));
  16169. },_genMobileFormFieldPayload:function(form){
  16170. var _e19={};
  16171. var _e1a=form.getElementsByTagName("input");
  16172. if(_e1a){
  16173. for(var i=0;i<_e1a.length;i++){
  16174. var name=_e1a[i].getAttribute("name");
  16175. var _e1d=_e1a[i].getAttribute("value");
  16176. if(name&&_e1d){
  16177. _e19[name]=_e1d;
  16178. }
  16179. }
  16180. }
  16181. return _e19;
  16182. },launchGotoPageForIWidgetMobile:function(form){
  16183. var _e1f={"action":"goto","payload":this._genMobileFormFieldPayload(form)};
  16184. if(typeof console!="undefined"&&console&&console.log){
  16185. console.log(_e1f);
  16186. }
  16187. this.fireEvent("com.ibm.bux.widget.openView",null,_e1f);
  16188. },executeDrillThroughForIWidgetMobile:function(form){
  16189. var _e21=getChildElementsByAttribute(form,"input","name","ui.action");
  16190. if(_e21&&_e21.length>0){
  16191. _e21[0].setAttribute("value","authoredDrillThroughMobile");
  16192. }
  16193. var _e22={"action":"drillThrough","payload":this._genMobileFormFieldPayload(form)};
  16194. if(typeof console!="undefined"&&console&&console.log){
  16195. console.log(_e22);
  16196. }
  16197. this.fireEvent("com.ibm.bux.widget.openView",null,_e22);
  16198. },isBuxAvailable:function(){
  16199. return (this.bux&&this.bux._base?true:false);
  16200. },getDrillOptions:function(){
  16201. return this.properties.getDrillOptions();
  16202. },getPromptRunOption:function(_e23,_e24){
  16203. if(!_e24&&_e23&&_e23.length>0){
  16204. return false;
  16205. }else{
  16206. if(_e24){
  16207. return this.properties.getPromptUserOnLoad();
  16208. }else{
  16209. return null;
  16210. }
  16211. }
  16212. },buildDataFiltersParam:function(_e25){
  16213. var _e26="";
  16214. if(_e25&&_e25.length>0){
  16215. this.sliderState={};
  16216. _e26="<UpdateDataFilters>";
  16217. for(var _e27=0;_e27<_e25.length;++_e27){
  16218. var _e28=_e25[_e27];
  16219. var _e29=dojo.fromJson(_e28);
  16220. if(_e29.clientId==this.getWidgetId()){
  16221. continue;
  16222. }
  16223. if(!(_e29["com.ibm.widget.context.bux.selectValueControl"])){
  16224. this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e29);
  16225. this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e29);
  16226. _e28=dojo.toJson(_e29);
  16227. }
  16228. _e26+="<filter>"+xml_encode(_e28)+"</filter>";
  16229. this.sliderState[_e29.clientId]=_e28;
  16230. }
  16231. _e26+="</UpdateDataFilters>";
  16232. }
  16233. return _e26;
  16234. },updateCopyPasteFilters:function(_e2a){
  16235. this.loadSliderState();
  16236. if(this.sliderState){
  16237. for(var _e2b in this.sliderState){
  16238. this.sliderState[_e2b]="{'clientId':'"+_e2b+"',\t'com.ibm.widget.context':{},'com.ibm.widget.context.bux.selectValueControl':"+"{'selectValueControl':{'id':'"+_e2b+"','controlType':'slider','type':'discrete','valueType':'string'}}}";
  16239. }
  16240. }
  16241. if(_e2a&&_e2a.length>0){
  16242. for(var _e2c=0;_e2c<_e2a.length;++_e2c){
  16243. var _e2d=_e2a[_e2c];
  16244. var _e2e=dojo.fromJson(_e2d);
  16245. if(_e2e["com.ibm.widget.context.bux.selection"]){
  16246. this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e2e);
  16247. this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e2e);
  16248. _e2d=dojo.toJson(_e2e);
  16249. }
  16250. this.sliderState[_e2e.clientId]=_e2d;
  16251. }
  16252. }
  16253. return this.buildDataFiltersParam_fromState();
  16254. },buildFiltersParamFromLoadedSliderState:function(){
  16255. var _e2f="";
  16256. this.loadSliderState();
  16257. _e2f=this.buildDataFiltersParam_fromState();
  16258. return _e2f;
  16259. },loadSliderState:function(){
  16260. this.sliderState={};
  16261. var _e30=dojo.fromJson(this.getAttributeValue("sliderIDs"));
  16262. if(_e30){
  16263. for(var i=0;i<_e30.length;++i){
  16264. var _e32=_e30[i];
  16265. var _e33=this.getItemValue("sliderState_"+_e32);
  16266. if(_e33!=null&&_e33!=""){
  16267. this.sliderState[_e32]=_e33;
  16268. }
  16269. }
  16270. }
  16271. },buildDataFiltersParam_fromState:function(){
  16272. var _e34="";
  16273. if(this.sliderState){
  16274. for(var _e35 in this.sliderState){
  16275. _e34+="<filter>"+xml_encode(this.sliderState[_e35])+"</filter>";
  16276. }
  16277. if(_e34!==""){
  16278. return ("<UpdateDataFilters>"+_e34+"</UpdateDataFilters>");
  16279. }
  16280. }
  16281. return _e34;
  16282. },loadContent:function(_e36){
  16283. var _e37=dojo.byId("_"+this.iContext.widgetId+"_cv");
  16284. this.loadStylesAndScripts(_e36,_e37,true);
  16285. if(!window.gScriptLoader.hasCompletedExecution()){
  16286. var obj=this;
  16287. this.timer=setInterval(function(){
  16288. window.gInitializeViewer(obj);
  16289. },this.timerInterval);
  16290. }else{
  16291. window.gInitializeViewer(this);
  16292. }
  16293. this.viewerWidgetLastAction=null;
  16294. },executeAction:function(evt,_e3a){
  16295. var _e3b=this.getViewerObject();
  16296. if(evt&&_e3b){
  16297. var _e3c=_e3a?_e3a:evt.payload.name;
  16298. var _e3d=evt.payload;
  16299. if(_e3c&&typeof _e3d!="undefined"&&_e3d!=null){
  16300. if(evt.payload.payload){
  16301. _e3d=evt.payload.payload;
  16302. }
  16303. _e3b.executeAction(_e3c,_e3d);
  16304. }
  16305. }
  16306. },onContextMenuAction:function(evt){
  16307. this.executeAction(evt);
  16308. },onToolbarAction:function(evt){
  16309. this.executeAction(evt);
  16310. },updateToolbar:function(){
  16311. var _e40=this.getViewerObject();
  16312. if(!_e40||(!this.bToolbarInitialized&&typeof CognosViewerAction!="function")){
  16313. return;
  16314. }
  16315. if(_e40.getStatus()==="prompting"){
  16316. return;
  16317. }
  16318. var _e41=_e40.getToolbar();
  16319. CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(_e40,_e41);
  16320. this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init",null,_e40.getToolbar());
  16321. },onSelect:function(){
  16322. if(!this.bToolbarInitialized){
  16323. this.bToolbarInitialized=true;
  16324. var _e42=this.getViewerObject();
  16325. if(_e42){
  16326. var _e43=_e42.getStatus();
  16327. if(_e43!=="prompting"&&_e43!=="working"&&_e43!="stillWorking"){
  16328. this.updateToolbar();
  16329. }
  16330. }
  16331. }
  16332. this.fireEvent("com.ibm.bux.widget.select.done",null,{});
  16333. },hideToolbarAndContextMenu:function(){
  16334. this.fireEvent("com.ibm.bux.widget.contextMenu.update");
  16335. this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init");
  16336. },updateSavedAttributes:function(_e44){
  16337. this.setAttributeValue("version",this.BUX_REPORT_VERSION);
  16338. this.setAttributeValue("viewerProperties",this.properties.toString());
  16339. if(this.m_oWidgetContextManager.getSelectionFilterObjects()){
  16340. this.setAttributeValue("selectionObjects",this.m_oWidgetContextManager.toStringSelectionFilterObjects());
  16341. }
  16342. if(_e44==="live"){
  16343. var oCV=this.getViewerObject();
  16344. var _e46=this.getEnvParam("reportPrompts");
  16345. if(this.promptParametersRetrieved==true&&_e46&&_e46.length>0){
  16346. this.setAttributeValue("viewerReportPrompts",this.getEnvParam("reportPrompts"));
  16347. }
  16348. this.setAttributeValue("promptParametersRetrieved",(this.promptParametersRetrieved?"true":"false"));
  16349. this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false");
  16350. if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){
  16351. this.setAttributeValue("fromReportPart","true");
  16352. }
  16353. if(this.isLimitedInteractiveMode()){
  16354. this.setAttributeValue("limitedInteractiveMode","true");
  16355. }else{
  16356. this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]);
  16357. }
  16358. var _e47=oCV.envParams["contentLocale"];
  16359. if(_e47!=null){
  16360. this.saveSliderState();
  16361. this.setAttributeValue("lastLocaleSaved",_e47);
  16362. }
  16363. this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]);
  16364. this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false");
  16365. this.setAttributeValue("displayTypes",this.getDisplayTypes());
  16366. this.setSavedOutputsCMResponse(null);
  16367. if(oCV.getPinFreezeManager()){
  16368. var _e48=oCV.getPinFreezeManager().toJSONString();
  16369. this.setAttributeValue("PinFreezeInfo",_e48);
  16370. }
  16371. if(oCV.envParams["rapReportInfo"]){
  16372. this.setAttributeValue("rapReportInfoVersion",this.RAP_REPORT_INFO_VERSION);
  16373. this.setAttributeValue("rapReportInfo",oCV.envParams["rapReportInfo"]);
  16374. }
  16375. }
  16376. if(_e44==="savedOutput"){
  16377. if(this.getSavedOutputSearchPath()==null){
  16378. this.setAttributeValue("mostRecentSavedOutput","true");
  16379. }else{
  16380. this.setAttributeValue("savedOutputSearchPath",this.getSavedOutputSearchPath());
  16381. }
  16382. this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false");
  16383. }
  16384. },onItemSetChanged:function(_e49){
  16385. if(this.getViewerObject()){
  16386. var _e4a=_e49.payload.changes;
  16387. for(var i in _e4a){
  16388. if(_e4a[i].id==="savedReportPath"&&_e4a[i].newVal){
  16389. this.updateCVEnvParam();
  16390. }
  16391. }
  16392. }
  16393. },updateCVEnvParam:function(){
  16394. var oCV=this.getViewerObject();
  16395. oCV.envParams["ui.objectClass"]=this.isSavedOutput()?"reportView":"report";
  16396. oCV.envParams["widget.isSavedReport"]="true";
  16397. var _e4d=this.getAttributeValue("savedReportName");
  16398. if(_e4d){
  16399. oCV.envParams["ui.object"]=_e4d;
  16400. oCV.envParams["savedReportName"]=_e4d;
  16401. }else{
  16402. oCV.envParams["ui.object"]=this.getAttributeValue("savedReportPath");
  16403. }
  16404. },onWidgetSave:function(evt){
  16405. var _e4f=this.getViewerObject();
  16406. var _e50={"status":false};
  16407. if(evt&&evt.payload&&evt.payload.isCopy===true){
  16408. this.setAttributeValue("copy.conversation",_e4f.getConversation());
  16409. }else{
  16410. this.removeItem("copy.conversation");
  16411. this.removeItem("copy.ciPublishedReportPath");
  16412. }
  16413. var _e51=evt&&evt.payload&&evt.payload.operation=="saveAs"?true:false;
  16414. if(!_e4f&&!_e51){
  16415. this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
  16416. return;
  16417. }
  16418. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  16419. var _e52=this.getViewerObject();
  16420. _e52.loadExtra();
  16421. if(this.isSavedOutput()){
  16422. this.cleanSavedAttributes();
  16423. this.updateSavedAttributes("savedOutput");
  16424. _e50.status=true;
  16425. this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
  16426. }else{
  16427. if(this.sInitialSpec){
  16428. _e50.status=true;
  16429. this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
  16430. }else{
  16431. var _e53=this.getEnvParam("cv.objectPermissions");
  16432. var _e54=new ViewerIWidgetSave(this,evt.payload);
  16433. if(!_e54.canSave(_e53)){
  16434. this.showErrorMessage(RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR);
  16435. this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
  16436. return;
  16437. }
  16438. if(this.isLimitedInteractiveMode()||(_e52.envParams["ui.spec"]&&_e52.envParams["ui.spec"].length>0)){
  16439. this.cleanSavedAttributes();
  16440. this.updateSavedAttributes("live");
  16441. if(_e54.doGetSavePropertiesFromServer()){
  16442. _e54.getSavePropertiesFromServer();
  16443. }else{
  16444. this.doWidgetSaveDone(_e54);
  16445. }
  16446. }else{
  16447. if(!_e52.envParams["ui.spec"]){
  16448. _e54.setDoCWCopy(true);
  16449. this.doWidgetSaveDone(_e54);
  16450. }else{
  16451. this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
  16452. }
  16453. }
  16454. }
  16455. }
  16456. }),evt);
  16457. },doWidgetSaveDone:function(_e55){
  16458. var _e56=_e55.getPayload();
  16459. _e56.status=true;
  16460. if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){
  16461. var _e57=_e55.m_payload.dashboard;
  16462. if(_e57){
  16463. this._BUXDBInfoArray=this.getBUXDBInfoArray({dbTitle:_e57.title._text,dbSearchPath:_e57.cm$searchPath});
  16464. }
  16465. }
  16466. this.fireEvent("com.ibm.bux.widget.save.done",null,_e56);
  16467. },handleGetSavePropertiesFromServerResponse:function(_e58,_e59){
  16468. var _e5a=new ViewerIWidgetSave(this,_e59);
  16469. if(_e58&&_e58.getJSONResponseObject()){
  16470. applyJSONProperties(this.getViewerObject(),_e58.getJSONResponseObject());
  16471. }
  16472. this.doWidgetSaveDone(_e5a);
  16473. },isPreCaspianRP1BUXReport:function(){
  16474. var _e5b=this.getAttributeValue("version");
  16475. if(!_e5b||_e5b<this.BUX_REPORT_CASPIAN_RP1_VERSION){
  16476. return true;
  16477. }
  16478. return false;
  16479. },isGoDashboardReportUpgrade:function(){
  16480. var _e5c=this.getAttributeValue("version");
  16481. if(_e5c==this.GODASHBOARD_REPORT_VERSION){
  16482. return true;
  16483. }
  16484. return false;
  16485. },isOpeningSavedDashboard:function(){
  16486. var _e5d=this.getAttributeValue("viewerProperties");
  16487. if((_e5d&&_e5d.indexOf("{")===0)||this.isGoDashboardReportUpgrade()){
  16488. return true;
  16489. }
  16490. return false;
  16491. },cleanSavedAttributes:function(){
  16492. this.removeAttributeValue("savedOutputSearchPath");
  16493. this.removeAttributeValue("mostRecentSavedOutput");
  16494. this.removeAttributeValue("savedReportName");
  16495. this.removeAttributeValue("dashboardID");
  16496. this.removeAttributeValue("savedReportId");
  16497. this.removeAttributeValue("baseReportModificationTime");
  16498. this.removeAttributeValue("viewerReportPrompts");
  16499. this.removeAttributeValue("promptParametersRetrieved");
  16500. this.removeAttributeValue("selectionFilterEnabled");
  16501. this.removeAttributeValue("PinFreezeInfo");
  16502. this.removeAttributeValue("rapReportInfoVersion");
  16503. this.removeAttributeValue("rapReportInfo");
  16504. this.removeAttributeValue("selectionObjects");
  16505. if(this.isSavedOutput()){
  16506. this.removeAttributeValue("savedReportPath");
  16507. }
  16508. },handleWidgetSaveDone:function(_e5e){
  16509. var oCV=this.getViewerObject();
  16510. var _e60=_e5e.getResult();
  16511. if(_e60===null){
  16512. _e60={};
  16513. }
  16514. this.cleanSavedAttributes();
  16515. this.updateSavedAttributes("live");
  16516. var _e61=_e60.reportName;
  16517. var _e62=_e60.dashboard_id;
  16518. this.setAttributeValue("savedReportName",_e61);
  16519. this.setAttributeValue("dashboardID","$$dbid$$"+_e62);
  16520. if(_e60.permissions){
  16521. oCV.envParams["cv.objectPermissions"]=_e60.permissions;
  16522. }
  16523. if(_e60.objectClass){
  16524. oCV.envParams["ui.objectClass"]=_e60.objectClass;
  16525. }
  16526. if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){
  16527. this.setAttributeValue("fromReportPart","true");
  16528. }
  16529. if(this.isLimitedInteractiveMode()){
  16530. this.setAttributeValue("limitedInteractiveMode","true");
  16531. }else{
  16532. this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]);
  16533. }
  16534. var _e63=oCV.envParams["contentLocale"];
  16535. if(_e63!=null){
  16536. this.saveSliderState();
  16537. this.setAttributeValue("lastLocaleSaved",_e63);
  16538. }
  16539. this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]);
  16540. oCV.envParams["ui.object"]=this.getSavedReportSearchPath(_e61);
  16541. oCV.envParams["savedReportName"]=_e61;
  16542. this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false");
  16543. this.setAttributeValue("displayTypes",this.getDisplayTypes());
  16544. this.setSavedOutputsCMResponse(null);
  16545. var _e64={"status":true};
  16546. this.fireEvent("com.ibm.bux.widget.save.done",null,_e64);
  16547. },getDisplayTypes:function(){
  16548. var oCV=this.getViewerObject();
  16549. if(oCV.getRAPReportInfo()){
  16550. return oCV.getRAPReportInfo().getDisplayTypes();
  16551. }
  16552. },saveSliderState:function(){
  16553. var _e66=this.getViewerObject();
  16554. var _e67=_e66.getRAPReportInfo();
  16555. var _e68={};
  16556. if(_e67){
  16557. _e68=_e67.collectSliderSetFromReportInfo();
  16558. }
  16559. var i=0;
  16560. var _e6a=[];
  16561. for(var _e6b in this.sliderState){
  16562. if(typeof _e68[_e6b]!="undefined"){
  16563. this.setItemValue("sliderState_"+_e6b,this.sliderState[_e6b]);
  16564. _e6a[i++]=_e6b;
  16565. }else{
  16566. this.removeItem("sliderState_"+_e6b);
  16567. }
  16568. }
  16569. this.setAttributeValue("sliderIDs",dojo.toJson(_e6a));
  16570. },onWidgetRefresh:function(evt){
  16571. var _e6d={};
  16572. var _e6e=this.getViewerObject();
  16573. if(evt&&_e6e){
  16574. if(_e6e.envParams["ui.action"]=="view"||_e6e.envParams["ui.action"]=="buxView"){
  16575. _e6e.executeAction("RefreshViewEvent");
  16576. }else{
  16577. if(evt.payload&&evt.payload.refreshType=="preferencesChanged"){
  16578. this.clearRAPCache();
  16579. _e6e.executeAction("EditContent",{"preferencesChanged":true});
  16580. _e6e.executeAction("Reprompt",{"preferencesChanged":true});
  16581. }else{
  16582. if(!this.isVisible()){
  16583. this.getDelayedLoadingContext().setForceRunReport(true);
  16584. }else{
  16585. _e6e.executeAction("Refresh");
  16586. }
  16587. }
  16588. }
  16589. this.fireEvent("com.ibm.bux.widget.refresh.done",null,_e6d);
  16590. }
  16591. },invokeDisplayTypeDialog:function(_e6f,_e70){
  16592. if(!this.m_chart){
  16593. this.m_chart=new bux.reportViewer.chart();
  16594. }
  16595. var _e71=this.m_chart.getDisplayTypeDialogDefinition(_e6f);
  16596. var _e72={"supportedChartTypes":_e71,"suggestedDisplayTypes":_e70};
  16597. this.fireEvent("com.ibm.bux.widget.invokeDisplayTypeDialog",null,_e72);
  16598. },onChangeDisplayType:function(evt){
  16599. var _e74=this.getViewerObject();
  16600. if(evt&&_e74){
  16601. _e74.executeAction("ChangeDisplayType",evt.payload);
  16602. }
  16603. },onDisplayTypeDialogVariations:function(evt){
  16604. var _e76=this.getViewerObject();
  16605. if(evt&&_e76){
  16606. _e76.executeAction("ChangeDisplayVariations",evt.payload);
  16607. }
  16608. },updateDisplayTypeDialogVariations:function(_e77,_e78){
  16609. if(!this.m_chart){
  16610. this.m_chart=new bux.reportViewer.chart();
  16611. }
  16612. var _e79=this.m_chart.getDisplayTypeDialogDefinition(_e77);
  16613. var _e7a={"supportedChartTypes":_e79,"variationGroups":_e78};
  16614. this.fireEvent("com.ibm.bux.widget.updateDisplayTypeDialogVariations",null,_e7a);
  16615. },onGetDisplayTitleDone:function(evt){
  16616. if(evt&&evt.payload&&evt.payload.callback){
  16617. evt.payload.callback(evt.payload.title);
  16618. }
  16619. },getWidgetStoreID:function(){
  16620. if(typeof this.widgetStoreId==="undefined"){
  16621. if(!this.widgetStoreIdDfd){
  16622. this.widgetStoreIdDfd=new dojo.Deferred();
  16623. }
  16624. return this.widgetStoreIdDfd;
  16625. }
  16626. return this.widgetStoreId;
  16627. },setWidgetStoreID:function(_e7c){
  16628. this.widgetStoreId=_e7c;
  16629. if(this.widgetStoreIdDfd){
  16630. this.widgetStoreIdDfd.callback(this.widgetStoreId);
  16631. this.widgetStoreIdDfd=null;
  16632. }
  16633. },onUpdateWidgetStoreIDDone:function(evt){
  16634. var _e7e=evt.payload.storeID;
  16635. var _e7f="storeID(\"";
  16636. if(_e7e&&(_e7e.indexOf(_e7f)>-1)){
  16637. _e7e=_e7e.substr(_e7f.length,_e7e.length-_e7f.length-1);
  16638. }
  16639. dojo.when(this.getWidgetStoreID(),dojo.hitch(this,function(_e80){
  16640. if(_e80&&_e80!=_e7e){
  16641. this._copyComments(_e80,_e7e);
  16642. }
  16643. }));
  16644. this.setWidgetStoreID(_e7e);
  16645. },_copyComments:function(_e81,_e82){
  16646. var _e83=this.buildPostUrl();
  16647. if(_e83){
  16648. var _e84=new XmlHttpObject();
  16649. _e84.addFormField("b_action","cognosViewer");
  16650. _e84.addFormField("widgetOldStoreID",_e81);
  16651. _e84.addFormField("widgetStoreID",_e82);
  16652. _e84.addFormField("ui.action","cloneAnnotations");
  16653. _e84.addFormField("cv.responseFormat","json");
  16654. _e84.sendHtmlRequest("POST",_e83,"",true);
  16655. }
  16656. },onRemoveDone:function(evt){
  16657. this.destroy();
  16658. },onGetProperties:function(evt){
  16659. this.initializeProperties();
  16660. this.fireEvent("com.ibm.bux.widget.properties.get.done",null,this.properties.onGet());
  16661. },onSetProperties:function(evt){
  16662. if(evt&&evt.payload&&evt.payload.properties){
  16663. this.properties.onSet(evt.payload);
  16664. }
  16665. this.fireEvent("com.ibm.bux.widget.properties.set.done");
  16666. var _e88={"modified":true};
  16667. this.fireEvent("com.ibm.bux.widget.modified",null,_e88);
  16668. },getProperties:function(){
  16669. return this.properties;
  16670. },clearPropertiesDialog:function(){
  16671. if(this.properties){
  16672. this.properties.clearDialogSpec();
  16673. }
  16674. },onGenericSelectValueControl:function(evt,_e8a){
  16675. if(evt){
  16676. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  16677. var _e8b=false;
  16678. var _e8c=this._getFilterPayload(evt);
  16679. var _e8d=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e8c):null;
  16680. if(_e8d&&_e8d!=="facet"){
  16681. var _e8e=dojo.clone(evt);
  16682. this.preProcessFilterValues(_e8e);
  16683. this.m_oWidgetContextManager.updateFilterContext(_e8e.payload);
  16684. _e8b=this.onFilter(_e8e,_e8a);
  16685. }else{
  16686. this.m_oWidgetContextManager.updateFilterContext(_e8c);
  16687. _e8b=this.onFilter(evt,_e8a);
  16688. }
  16689. return _e8b;
  16690. }),evt.source);
  16691. }
  16692. },onFilter:function(evt,_e90){
  16693. if(evt){
  16694. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  16695. var _e91=false;
  16696. if(this.isLiveReport()===false){
  16697. return _e91;
  16698. }
  16699. var _e92=this._getFilterPayload(evt);
  16700. var _e93=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e92):null;
  16701. var _e94=null;
  16702. var _e95=this.m_oWidgetContextManager.getItemNames(_e92);
  16703. var _e96=false;
  16704. for(var i=0;!_e96&&i<_e95.length;i++){
  16705. _e94=_e95[i];
  16706. _e96=this.canFilter(_e92,_e94,_e93,evt);
  16707. }
  16708. if(_e94==null&&!_e96){
  16709. _e96=this.canFilter(_e92,_e94,_e93,evt);
  16710. }
  16711. if(_e96){
  16712. var _e98={};
  16713. var _e99=this._getDrillResetHUNForFacet(_e94,_e93);
  16714. if(_e99&&_e99.length>0){
  16715. _e98.drillResetHUN=_e99;
  16716. }
  16717. var _e9a=(evt.type=="string")?evt.payload:dojo.toJson(evt.payload);
  16718. this.sliderState[evt.source]=_e9a;
  16719. _e98.filterPayload=_e9a;
  16720. _e98.isFacet=("facet"===_e93);
  16721. if(_e90){
  16722. _e98.forceCleanup=this.m_oWidgetContextManager.genRemoveDiscreteFilterPayload(this.getWidgetId());
  16723. }
  16724. this.getViewerObject().executeAction("UpdateDataFilter",_e98);
  16725. if(!this.shouldReportBeRunOnAction()){
  16726. this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true);
  16727. }
  16728. _e91=true;
  16729. }
  16730. return _e91;
  16731. }),evt.source);
  16732. }
  16733. },clearSelectionFilter:function(){
  16734. if(this.m_oWidgetContextManager){
  16735. var _e9b=this.m_oWidgetContextManager.genEmptySelectionPayload(this.getViewerObject(),this.getWidgetId());
  16736. this._fireContextChangedEvent(_e9b,false);
  16737. }
  16738. },broadcastSelectionFilter:function(){
  16739. this.onSelectionChange();
  16740. },onSelectionChange:function(){
  16741. if(this.isSelectionFilterEnabled()){
  16742. var _e9c=(this.getContainerTypeForSelection()==="list");
  16743. var _e9d=this.m_oWidgetContextManager.genSelectionPayload(this.getViewerObject(),this.getWidgetId(),_e9c);
  16744. this._fireContextChangedEvent(_e9d,!this.m_oWidgetContextManager.isSelectionPayloadForReset(_e9d));
  16745. }
  16746. },_fireContextChangedEvent:function(_e9e,_e9f){
  16747. this.setSelectionFilterSent(_e9f);
  16748. this.fireEvent("com.ibm.widget.contextChanged",null,_e9e);
  16749. },somethingSelected:function(){
  16750. var oCV=this.getViewerObject();
  16751. return (oCV&&oCV.getSelectionController()&&oCV.getSelectionController().getAllSelectedObjects().length>0);
  16752. },selectionFilterSent:function(){
  16753. return this.m_bSelectionFilterSent;
  16754. },setSelectionFilterSent:function(flag){
  16755. this.m_bSelectionFilterSent=flag;
  16756. },reselectSelectionFilterObjects:function(){
  16757. if(this.isSelectionFilterEnabled()){
  16758. var oCV=this.getViewerObject();
  16759. var _ea3=oCV.getSelectionController();
  16760. var _ea4=this.m_oWidgetContextManager.getSelectionFilterObjects();
  16761. if(!_ea4){
  16762. var str=this.getAttributeValue("selectionObjects");
  16763. if(str&&str.length>0){
  16764. _ea4=eval(str);
  16765. this.m_oWidgetContextManager.setSelectionFilterObjects(_ea4);
  16766. this.removeAttributeValue("selectionObjects");
  16767. }
  16768. }
  16769. if(_ea4&&_ea4.length>0){
  16770. var _ea6=new ReselectAction(oCV,_ea4);
  16771. _ea6.executeAction();
  16772. }
  16773. }
  16774. },_getFilterPayload:function(evt){
  16775. return (evt.type=="string"?dojo.fromJson(evt.payload):evt.payload);
  16776. },_getFilterPayloadItemName:function(_ea8){
  16777. var _ea9=_ea8.name;
  16778. if(!_ea8.name){
  16779. _ea9=this.m_oWidgetContextManager.getFilterFirstItemName();
  16780. }
  16781. return _ea9;
  16782. },canFilter:function(_eaa,_eab,_eac,evt){
  16783. var _eae;
  16784. var _eaf=this.getRAPCachedItem("filterableItems");
  16785. if(_eac!=="facet"&&typeof _eab!="undefined"&&_eab!=null&&_eaf!=null){
  16786. for(var type in _eaf){
  16787. for(_eae=0;_eae<_eaf[type].length;++_eae){
  16788. if(_eaf[type][_eae].name==_eab||_eaf[type][_eae].label==_eab){
  16789. return true;
  16790. }
  16791. }
  16792. }
  16793. }else{
  16794. var _eb1=this.getViewerObject();
  16795. var _eb2=_eb1.getRAPReportInfo();
  16796. if(_eb2){
  16797. var _eb3=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"dimension"):null;
  16798. var _eb4=_eb2.getContainers();
  16799. for(var lid in _eb4){
  16800. var _eb6=_eb4[lid];
  16801. var _eb7=_eb6.sliders;
  16802. if(_eb7&&_eb7.length){
  16803. for(var _eb8=0;_eb8<_eb7.length;++_eb8){
  16804. var _eb9=_eb7[_eb8];
  16805. if(_eb9.clientId==_eaa.clientId||(_eb9.clientId==evt.source)||(_eb9.clientId==_eb9.name&&_eb9.name==_eab)){
  16806. return true;
  16807. }
  16808. }
  16809. }
  16810. var _eba=_eb6.itemInfo;
  16811. if(_eba&&_eba.length){
  16812. for(var _ebb=0;_ebb<_eba.length;++_ebb){
  16813. if(_eba[_ebb].item==_eab){
  16814. return true;
  16815. }
  16816. if(_eac==="facet"&&_eba[_ebb].dimensionName==_eab){
  16817. return true;
  16818. }
  16819. if(_eac==="facet"&&_eba[_ebb].dimensionName===_eb3){
  16820. return true;
  16821. }
  16822. }
  16823. }
  16824. if(_eac==="facet"){
  16825. var _ebc=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"filterType"):null;
  16826. if(_eac==="facet"&&_ebc==="attribute"){
  16827. return true;
  16828. }
  16829. var _ebd=_eb6.filter;
  16830. if(_ebd&&_ebd.length){
  16831. for(var _ebe=0;_ebe<_ebd.length;++_ebe){
  16832. if(_ebd[_ebe].hierarchyName===_eab){
  16833. return true;
  16834. }
  16835. }
  16836. }
  16837. }else{
  16838. if(_eb2.getFilterObjectFromContainer(lid,_eab,false)){
  16839. return true;
  16840. }
  16841. }
  16842. }
  16843. if(_eb2.isReportLevel_nonVisibleFilterItem(_eab)){
  16844. return true;
  16845. }
  16846. }
  16847. }
  16848. return false;
  16849. },_getDrillResetHUNForFacet:function(_ebf,_ec0){
  16850. if(_ec0!=="facet"){
  16851. return null;
  16852. }
  16853. var _ec1=null;
  16854. var _ec2=this.getViewerObject();
  16855. if(_ec2.getRAPReportInfo()){
  16856. _ec1=_ec2.getRAPReportInfo().getDrilledOnHUNs();
  16857. }
  16858. if(!_ec1){
  16859. return null;
  16860. }
  16861. var _ec3=[];
  16862. for(var i=0;i<_ec1.length;i++){
  16863. if(_ec1[i].indexOf(_ebf)!==-1){
  16864. _ec3.push(_ec1[i]);
  16865. break;
  16866. }
  16867. }
  16868. return _ec3;
  16869. },preProcessFilterValues:function(evt){
  16870. var _ec6=evt.payload["com.ibm.widget.context"]["values"];
  16871. _ec6=(_ec6)?_ec6:evt.payload["com.ibm.widget.context"]["ranges"];
  16872. var _ec7=this.m_oWidgetContextManager.getItemsInItemSpecification(evt.payload);
  16873. var _ec8=(_ec6)?false:true;
  16874. if(_ec8){
  16875. _ec6=evt.payload["com.ibm.widget.context"];
  16876. }
  16877. var _ec9=this.getViewerObject();
  16878. if(_ec9){
  16879. var _eca=_ec9.getRAPReportInfo();
  16880. for(var _ecb in _ec6){
  16881. if(!_eca.isReferenced(_ecb)||_ec8){
  16882. delete _ec6[_ecb];
  16883. if(_ec7&&_ec7[_ecb]){
  16884. delete _ec7[_ecb];
  16885. }
  16886. }
  16887. }
  16888. }
  16889. if(isObjectEmpty(_ec6)){
  16890. evt.payload["com.ibm.widget.context"]={};
  16891. }
  16892. },isLimitedInteractiveMode:function(){
  16893. var _ecc=this.getViewerObject();
  16894. if(_ecc){
  16895. return _ecc.isLimitedInteractiveMode();
  16896. }
  16897. return false;
  16898. },onMouseOver:function(evt){
  16899. if(DragDropAction_isDragging(evt)==false&&this.getViewerObject().getStatus()=="complete"){
  16900. var _ece=ActionFactory_loadActionHandler(evt,this.getViewerObject());
  16901. if(_ece){
  16902. return _ece.onMouseOver(evt);
  16903. }
  16904. }
  16905. return true;
  16906. },onMouseOut:function(evt){
  16907. var _ed0=ActionFactory_loadActionHandler(evt,this.getViewerObject());
  16908. if(_ed0&&this.getViewerObject().getStatus()=="complete"){
  16909. return _ed0.onMouseOut(evt);
  16910. }
  16911. return true;
  16912. },onMouseOverRenamedItem:function(evt){
  16913. var node=getNodeFromEvent(evt);
  16914. if(node.getAttribute){
  16915. var _ed3=node.getAttribute("rp_name");
  16916. if(_ed3!=null){
  16917. var _ed4=this.getViewerObject().getSelectionController().getTextValue(node.childNodes);
  16918. if(_ed3!=_ed4){
  16919. var id=node.getAttribute("id");
  16920. node.m_tooltip=new bux.reportViewer.ReportInfo({connectId:[id],position:["above","below"],title:RV_RES.IDS_JS_RENAMED_ITEM,text:RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL+" "+node.getAttribute("rp_name")});
  16921. node.m_tooltip.open();
  16922. }
  16923. }
  16924. }
  16925. },onMouseOutRenamedItem:function(evt){
  16926. var node=getNodeFromEvent(evt);
  16927. node.m_tooltip=null;
  16928. },onDoubleClick:function(evt){
  16929. var _ed9=ActionFactory_loadActionHandler(evt,this.getViewerObject());
  16930. if(_ed9&&this.getViewerObject().getStatus()=="complete"){
  16931. return _ed9.onDoubleClick(evt);
  16932. }
  16933. return true;
  16934. },onMouseDown:function(evt){
  16935. var oCV=this.getViewerObject();
  16936. var _edc=oCV.getActionFactory();
  16937. this._selectionAction=_edc.load("Selection");
  16938. if(this.isMobile()){
  16939. var _edd=oCV.getSelectionController();
  16940. var _ede=_edd.pageClickedForMobile(evt);
  16941. if(this.isSelectionFilterEnabled()){
  16942. this.onSelectionChange();
  16943. }else{
  16944. if(_ede){
  16945. this.onContextMenu(evt);
  16946. }
  16947. }
  16948. }else{
  16949. if(oCV.envParams["ui.action"]=="view"){
  16950. this._selectionAction.onMouseDown(evt);
  16951. }else{
  16952. if(oCV.getStatus()=="complete"){
  16953. if((evt.button==1||evt.button==0)){
  16954. if(!this._selectionAction.onMouseDown(evt)&&!_edc.load("RenameDataItem").onMouseDown(evt)){
  16955. this.initDragAndDrop();
  16956. _edc.load("DragDrop").onMouseDown(evt);
  16957. }
  16958. }else{
  16959. this._selectionAction.onMouseDown(evt);
  16960. }
  16961. }
  16962. }
  16963. }
  16964. },onMouseUp:function(evt){
  16965. if(this.isMobile()){
  16966. return;
  16967. }
  16968. var _ee0=getCrossBrowserNode(evt);
  16969. try{
  16970. var _ee1=_ee0.nodeName.toLowerCase();
  16971. if(_ee1=="input"||_ee1=="textarea"){
  16972. evt.cancelBubble=true;
  16973. return false;
  16974. }
  16975. }
  16976. catch(ex){
  16977. }
  16978. var _ee2=false;
  16979. if(this.getViewerObject().envParams["ui.action"]=="view"){
  16980. setNodeFocus(evt);
  16981. }else{
  16982. if(this.getViewerObject().getStatus()=="complete"){
  16983. _ee2|=DragDropAction_isDragging(evt);
  16984. DragDropAction_onmouseup(evt);
  16985. this.removeDragAndDrop();
  16986. setNodeFocus(evt);
  16987. }
  16988. }
  16989. if(!this._selectionAction){
  16990. var oCV=this.getViewerObject();
  16991. var _ee4=oCV.getActionFactory();
  16992. this._selectionAction=_ee4.load("Selection");
  16993. }
  16994. this._selectionAction.onMouseUp(evt,_ee2);
  16995. clearTextSelection();
  16996. },getContainerTypeForSelection:function(){
  16997. var _ee5=this.getViewerObject();
  16998. if(_ee5){
  16999. var _ee6=_ee5.getSelectionController();
  17000. return _ee6.getDataContainerType();
  17001. }
  17002. return null;
  17003. },onContextMenu:function(evt){
  17004. var _ee8=this.getViewerObject();
  17005. if(_ee8.getStatus()=="complete"||this.isSavedOutput()){
  17006. var _ee9=_ee8.getContextMenu();
  17007. var _eea=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(_ee8,_ee9);
  17008. if(this.isMobile()){
  17009. var _eeb=_ee8.getSelectionController();
  17010. var _eec=_eeb.getContainerType();
  17011. var _eed=_eec==="chart"?_eeb.getChartTooltip():null;
  17012. if(this.getAnnotationStore()&&this.getAnnotationStore().hasAnnotation()){
  17013. var _eee=this._genMobileCommentMenuItem(_eeb);
  17014. if(_eee){
  17015. _eea.push(_eee);
  17016. }
  17017. var _eef=this._genMobileCommentMenuItem();
  17018. if(_eef){
  17019. var _ef0=_ee8.findBlueDotMenu(_eea);
  17020. if(_ef0){
  17021. _ef0.push(_eef);
  17022. }
  17023. }
  17024. }
  17025. var _ef1={"context":{"event":evt,"viewerContext":{"displayValues":_eeb.getDisplayValues(),"chartTooltip":_eed,"containerType":_eec}},"menuItems":_eea};
  17026. if(typeof console!="undefined"&&console&&console.log){
  17027. console.log(_ef1);
  17028. }
  17029. this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_ef1);
  17030. }else{
  17031. this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_eea);
  17032. }
  17033. }
  17034. },_genMobileCommentMenuItem:function(_ef2){
  17035. var ctx=null;
  17036. if(_ef2){
  17037. if(_ef2.getSelections().length==1){
  17038. ctx=_ef2.getSelections()[0].getCtxAttributeString();
  17039. }
  17040. if(!ctx){
  17041. return null;
  17042. }
  17043. }
  17044. var _ef4=this.getAnnotationStore().getAsJSON(ctx);
  17045. if(_ef4.length>0){
  17046. return {"name":RV_RES.IDS_JS_ANNOTATIONS,"label":RV_RES.IDS_JS_ANNOTATIONS,"flatten":false,"comments":_ef4};
  17047. }
  17048. return null;
  17049. },initDragAndDrop:function(){
  17050. if(window.attachEvent){
  17051. document.attachEvent("onmouseup",DragDropAction_onmouseup);
  17052. document.attachEvent("onmousemove",DragDropAction_onmousemove);
  17053. }else{
  17054. if(document.addEventListener){
  17055. document.addEventListener("mouseup",DragDropAction_onmouseup,false);
  17056. document.addEventListener("mousemove",DragDropAction_onmousemove,false);
  17057. }
  17058. }
  17059. },removeDragAndDrop:function(){
  17060. if(window.detachEvent){
  17061. document.detachEvent("onmouseup",DragDropAction_onmouseup);
  17062. document.detachEvent("onmousemove",DragDropAction_onmousemove);
  17063. }else{
  17064. if(document.removeEventListener){
  17065. document.removeEventListener("mouseup",DragDropAction_onmouseup,false);
  17066. document.removeEventListener("mousemove",DragDropAction_onmousemove,false);
  17067. }
  17068. }
  17069. },onWidgetResize:function(evt){
  17070. var _ef6=evt.payload.resize;
  17071. if(_ef6){
  17072. if(!this.m_visible||(this.widgetSize&&this.widgetSize.h===_ef6.h&&this.widgetSize.w===_ef6.w)){
  17073. return;
  17074. }
  17075. var _ef7=!this.widgetSize;
  17076. this.widgetSize={h:_ef6.h,w:_ef6.w};
  17077. if(_ef7){
  17078. return;
  17079. }
  17080. if(!_ef6.autoResize){
  17081. this.executeAction(evt,"ResizeChart");
  17082. }
  17083. var oCV=this.getViewerObject();
  17084. if(oCV&&oCV.getPinFreezeManager()){
  17085. if(_ef6.autoResize){
  17086. oCV.getPinFreezeManager().processAutoResize(_ef6.w,_ef6.h);
  17087. }
  17088. setTimeout(function(){
  17089. oCV.getPinFreezeManager().refresh();
  17090. },100);
  17091. }
  17092. if(oCV.getTabController()){
  17093. oCV.getTabController().onResize(evt);
  17094. }
  17095. }
  17096. },getWidgetSize:function(){
  17097. return this.widgetSize;
  17098. },refreshAnnotationData:function(){
  17099. return this.getAnnotationHelper().refreshAnnotationData();
  17100. },fetchAnnotationData:function(){
  17101. this.getAnnotationHelper().fetchAnnotationData();
  17102. },reportContainsDijits:function(){
  17103. var _ef9=this.getAnnotationStore();
  17104. var _efa=_ef9.getAll();
  17105. for(var key in _efa){
  17106. if(typeof _efa[key]!=="function"){
  17107. return true;
  17108. }
  17109. }
  17110. return false;
  17111. },isSaveNecessary:function(){
  17112. var _efc=false;
  17113. if(this.isSavedOutput()){
  17114. var _efd=this.getAttributeValue("mostRecentSavedOutput");
  17115. var _efe=_efd==="true"||_efd===true;
  17116. var _eff=this.getAttributeValue("savedOutputSearchPath");
  17117. _efc=!_efe&&_eff==null;
  17118. }else{
  17119. var _f00=this.getAttributeValue("originalReport");
  17120. var _f01=this.getAttributeValue("savedReportName")||this.getAttributeValue("savedReportPath");
  17121. if(!this.isSavedReport(_f00,_f01)){
  17122. _efc=true;
  17123. }
  17124. }
  17125. return _efc;
  17126. },addAsNewComment:function(_f02,text){
  17127. this.getAnnotationHelper().addAsNewComment(_f02,text);
  17128. },onWidgetActionDone:function(_f04){
  17129. if(_f04&&_f04.payload&&_f04.payload.status===true){
  17130. this.getAnnotationHelper().addNewComment(this._pendingContextId,this._pendingCellValue);
  17131. }
  17132. this._pendingContextId=null;
  17133. this._pendingCellValue=null;
  17134. },commitComment:function(_f05){
  17135. if(!_f05.isNew){
  17136. return null;
  17137. }
  17138. if(!_f05.isLoaded){
  17139. return this.getAnnotationHelper().commitComment(_f05);
  17140. }
  17141. return null;
  17142. },getAnnotationStore:function(){
  17143. if(!this.annotationStore){
  17144. dojo["require"]("bux.data.AnnotationStore");
  17145. this.annotationStore=new bux.data.AnnotationStore(this,this.commitComment,this);
  17146. }
  17147. return this.annotationStore;
  17148. },fireEvent:function(_f06,arg,_f08){
  17149. if(window.gViewerLogger){
  17150. var id=this.getViewerObject()?this.getViewerObject().getId()+" ":"";
  17151. window.gViewerLogger.log(id+_f06,_f08,"json");
  17152. }
  17153. this.iContext.iEvents.fireEvent(_f06,arg,_f08);
  17154. },onGetFilterableItems:function(evt){
  17155. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  17156. var _f0b=false;
  17157. var _f0c=this.getRAPCachedItem("filterableItems");
  17158. if(_f0c==null&&this.isLiveReport()&&(this.getViewerObject().getStatus()=="complete"||this.isFaultStatusWithSpec())){
  17159. this.executeAction(evt,"GetFilterableItems");
  17160. _f0b=true;
  17161. }else{
  17162. if(!_f0c){
  17163. _f0c={visible:[],hidden:[]};
  17164. }
  17165. if(this.isLiveReport()){
  17166. this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f0c);
  17167. }else{
  17168. this.savedOutputResponseHandler("com.ibm.bux.filter.items.get.done",_f0c);
  17169. }
  17170. }
  17171. return _f0b;
  17172. }));
  17173. },isFaultStatusWithSpec:function(){
  17174. var oVO=this.getViewerObject();
  17175. if(oVO.getStatus()==="fault"){
  17176. if(oVO.envParams["ui.spec"]){
  17177. return true;
  17178. }
  17179. }
  17180. return false;
  17181. },onGetFilterValues:function(oEvt){
  17182. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  17183. var _f0f=oEvt.payload;
  17184. if(typeof oEvt.source!="undefined"&&typeof _f0f!="undefined"){
  17185. if(typeof _f0f.payload!="undefined"){
  17186. _f0f=_f0f.payload;
  17187. }
  17188. if(typeof _f0f.source=="undefined"){
  17189. _f0f.source=oEvt.source;
  17190. }
  17191. }
  17192. var _f10=false;
  17193. var _f11=this.isLiveReport();
  17194. var _f12=this.getViewerObject().getStatus();
  17195. var _f13=this.isFaultStatusWithSpec();
  17196. if(_f11&&(_f12==="complete"||_f13)){
  17197. var _f14=null;
  17198. if(!_f0f.forceRefresh&&_f0f.name){
  17199. _f14=this.getRAPCachedItem("filterValues."+_f0f.name);
  17200. }
  17201. if(_f14){
  17202. this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f14);
  17203. }else{
  17204. this.executeAction(oEvt,"GetFilterValues");
  17205. _f10=true;
  17206. }
  17207. }else{
  17208. if(this.getViewerObject().isWorking(_f12)){
  17209. var self=this;
  17210. var _f16=function(){
  17211. self.onGetFilterValues(oEvt);
  17212. };
  17213. setTimeout(_f16,10);
  17214. }else{
  17215. var _f17={};
  17216. if(_f0f.name){
  17217. _f17.name=_f0f.name;
  17218. }
  17219. this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f17);
  17220. }
  17221. }
  17222. return _f10;
  17223. }));
  17224. },onGetFilterValuesCancel:function(evt){
  17225. if(evt&&evt.payload){
  17226. var oCV=this.getViewerObject();
  17227. var _f1a=oCV.getAction("GetFilterValues");
  17228. _f1a.setRequestParms(evt);
  17229. var _f1b=_f1a.getActionKey();
  17230. if(_f1b){
  17231. oCV.getViewerDispatcher().cancelRequest(_f1b);
  17232. }
  17233. }
  17234. },savedOutputResponseHandler:function(_f1c,_f1d){
  17235. var oCV=this.getViewerObject();
  17236. var _f1f=dojo.toJson(_f1d);
  17237. var _f20="window[\"oCV"+oCV.getId()+"\"].getViewerWidget().fireEvent(\""+_f1c+"\", null, "+_f1f+");";
  17238. if(oCV){
  17239. var _f21=window["oCV"+oCV.getId()];
  17240. if(typeof _f21=="object"){
  17241. setTimeout(_f20,1);
  17242. }
  17243. }
  17244. return _f20;
  17245. },handleGetFilterableItemsResponse:function(_f22){
  17246. var _f23={};
  17247. var json=this.getJsonFromResponse(_f22);
  17248. if(json){
  17249. _f23=json.filterableItems;
  17250. if(!_f23){
  17251. _f23={"visible":[],"invisible":[]};
  17252. }
  17253. this.addToRAPCache("filterableItems",_f23);
  17254. }
  17255. this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f23);
  17256. },handleGetFilterValuesResponse:function(_f25,_f26){
  17257. var _f27={};
  17258. var json=this.getJsonFromResponse(_f25);
  17259. if(json&&json.filterValues){
  17260. _f27=json.filterValues;
  17261. if(_f27&&_f27.name){
  17262. this.addToRAPCache("filterValues."+_f27.name,_f27);
  17263. }
  17264. }
  17265. if(_f26&&_f26.name&&!_f27.name){
  17266. _f27.name=_f26.name;
  17267. }
  17268. _f27=dojo.clone(_f27);
  17269. this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f27);
  17270. },getJsonFromResponse:function(_f29){
  17271. var json=null;
  17272. if(_f29&&_f29.m_jsonResponse&&_f29.m_jsonResponse.json){
  17273. json=dojo.eval("("+_f29.m_jsonResponse.json+")");
  17274. }else{
  17275. if(_f29&&_f29.responseText){
  17276. json=dojo.eval("["+_f29.responseText+"]");
  17277. if(json&&json[0]){
  17278. json=json[0];
  17279. }
  17280. }
  17281. }
  17282. return json;
  17283. },onContextChanged:function(evt){
  17284. if(evt){
  17285. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  17286. var _f2c=false;
  17287. var _f2d=dojo.clone(evt);
  17288. var _f2e=this._getFilterPayload(_f2d);
  17289. this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_f2e);
  17290. this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_f2e);
  17291. var _f2f=this.getViewerObject();
  17292. var _f30=_f2f.getRAPReportInfo();
  17293. if(_f30&&(_f30.containsFilters()||_f30.hasSlider())){
  17294. var _f31=_f2e["com.ibm.widget.context"].values;
  17295. var _f32=this.m_oWidgetContextManager.getItemsInItemSpecification(_f2e);
  17296. var _f33=dojo.clone(_f32);
  17297. for(var _f34 in _f33){
  17298. if(!_f30.isReferenced(_f34)&&_f32[_f34].values){
  17299. var mun=_f32[_f34].values[0].mun;
  17300. var _f36=_f30.hunHasFilterOrSlider(mun);
  17301. if(_f36&&!_f32[_f36]){
  17302. _f32[_f36]=_f32[_f34];
  17303. delete _f32[_f34];
  17304. _f31[_f36]=_f31[_f34];
  17305. delete _f31[_f34];
  17306. }
  17307. }
  17308. }
  17309. }
  17310. _f2d.payload=_f2e;
  17311. _f2c=this.onGenericSelectValueControl(_f2d,true);
  17312. return _f2c;
  17313. }),evt.source);
  17314. }
  17315. },broadcastParameterChange:function(_f37){
  17316. var _f38={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f37};
  17317. this.fireEvent("com.ibm.widget.contextChanged.prompt",null,_f38);
  17318. },broadcastContextChange:function(_f39){
  17319. if(this.isSelectionFilterEnabled()){
  17320. var _f3a={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f39,"com.ibm.widget.context.bux.selection":{"selection":{"id":this.getWidgetId(),"valueType":"string"}}};
  17321. this.m_oWidgetContextManager.updateFilterContext(_f3a);
  17322. this.m_oWidgetContextManager.setSelectionFilterObjects(null);
  17323. this._fireContextChangedEvent(_f3a,true);
  17324. }
  17325. },onGenericDrill:function(evt){
  17326. this.m_handleDrill=false;
  17327. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
  17328. var _f3c=false;
  17329. if(!(evt&&evt.payload)||this.isLimitedInteractiveMode()){
  17330. return _f3c;
  17331. }
  17332. if(evt.payload.cv_id===this.iContext.widgetId){
  17333. return _f3c;
  17334. }
  17335. var _f3d=this.m_oWidgetContextManager.getDrillActionType(evt.payload);
  17336. var _f3e=this.m_oWidgetContextManager.genDrillSpecObjects(evt.payload);
  17337. var _f3f=null;
  17338. if(_f3d==="DrillDown"){
  17339. _f3f=this.getViewerObject().getAction("DrillDown");
  17340. }else{
  17341. if(_f3d==="DrillUp"){
  17342. _f3f=this.getViewerObject().getAction("DrillUp");
  17343. }else{
  17344. return _f3c;
  17345. }
  17346. }
  17347. _f3f.setKeepFocusOnWidget(false);
  17348. if(this.getViewerObject().isMetadataEmpty()||!this.shouldReportBeRunOnAction()){
  17349. _f3f.setUseReportInfoSelection(true);
  17350. }
  17351. if(_f3f.parseDrillSpecObjects(_f3e)){
  17352. if(!this.shouldReportBeRunOnAction()){
  17353. this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true);
  17354. }
  17355. _f3f.execute();
  17356. _f3c=true;
  17357. }
  17358. this.m_handleDrill=true;
  17359. return _f3c;
  17360. }));
  17361. },setDoGetParametersOnLoad:function(_f40){
  17362. this.m_doGetParametersOnLoad=_f40;
  17363. },getDoGetParametersOnLoad:function(){
  17364. return this.m_doGetParametersOnLoad;
  17365. },onPromptLegacyPayload:function(evt){
  17366. try{
  17367. if(evt.payload.cv_id===this.iContext.widgetId){
  17368. return false;
  17369. }
  17370. var _f42=null;
  17371. this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(_f43){
  17372. _f42=false;
  17373. if(this.isSavedOutput()){
  17374. return _f42;
  17375. }
  17376. if(this.promptParametersRetrieved===false){
  17377. var _f44=this.getViewerObject().getAction("GetParameters");
  17378. _f44.setRequestParms(evt.payload);
  17379. _f44.execute();
  17380. _f42=true;
  17381. }else{
  17382. _f42=this.sharePrompts(evt.payload);
  17383. }
  17384. return _f42;
  17385. }));
  17386. return _f42;
  17387. }
  17388. catch(e){
  17389. return false;
  17390. }
  17391. },sharePrompts:function(_f45){
  17392. var _f46=this.getViewerObject().getAction("SharePrompt");
  17393. _f46.setRequestParms(_f45);
  17394. if(this.shouldReportBeRunOnAction()){
  17395. var _f47=this.getViewerObject().getDrillResetHUNs(_f45);
  17396. if(!_f47||_f47.length===0){
  17397. return _f46.executePrompt();
  17398. }else{
  17399. var _f48={"drilledResetHUNs":_f47,"promptValues":_f46.getPromptValues()};
  17400. this.getViewerObject().executeAction("DrillReset",_f48);
  17401. }
  17402. return true;
  17403. }
  17404. var _f49=this.getLoadManager().getDelayedLoadingContext();
  17405. _f49.setPromptValues(_f46.getPromptValues());
  17406. _f49.setCascadingPromptParamsToClear(_f45.clearCascadePromptParams);
  17407. return false;
  17408. },onGenericPrompt:function(evt){
  17409. this.clearRAPCacheFilterValues();
  17410. this.m_oWidgetContextManager.handleIncomingPromptEvent(evt);
  17411. },setPromptParametersRetrieved:function(_f4b){
  17412. this.promptParametersRetrieved=_f4b;
  17413. },getEnvParam:function(_f4c){
  17414. return this.getViewerObject().envParams[_f4c];
  17415. },destroy:function(){
  17416. var _f4d=this.getViewerObject();
  17417. if(_f4d){
  17418. if(this.isSelectionFilterEnabled()){
  17419. if(this.selectionFilterSent()){
  17420. this.clearSelectionFilter();
  17421. }
  17422. }
  17423. if(this.onUnloadInProgress){
  17424. _f4d.destroy(false);
  17425. }else{
  17426. _f4d.destroy(true);
  17427. }
  17428. var _f4e=function(_f4f){
  17429. if(_f4f&&_f4f.parentNode&&_f4f.parentNode.removeChild){
  17430. _f4f.parentNode.removeChild(_f4f);
  17431. }
  17432. };
  17433. var _f50=dojo.query("[namespaceId='"+this.getViewerId()+"'],[namespaceId='"+this.m_sScriptLoaderNamespace+"']",document.getElementsByTagName("head").item(0));
  17434. if(_f50&&_f50.length>0){
  17435. _f50.forEach(_f4e);
  17436. }
  17437. _f50=dojo.query("> [namespaceId=\""+this.getViewerId()+"\"]",document.getElementsByTagName("body").item(0));
  17438. if(typeof _f50!="undefined"&&_f50&&_f50.length>0){
  17439. _f50.forEach(_f4e);
  17440. }
  17441. if(this.getAnnotationHelper()){
  17442. this.getAnnotationHelper()._cleanupPreviousAnnotations();
  17443. }
  17444. }
  17445. if(this.annotationHelper){
  17446. this.annotationHelper.m_viewerIWidget=null;
  17447. }
  17448. this.annotationHelper=null;
  17449. if(this.savedOutput){
  17450. this.savedOutput.iWidget=null;
  17451. }
  17452. this.savedOutput=null;
  17453. if(this.m_oLoadManager){
  17454. this.m_oLoadManager.m_oWidget=null;
  17455. }
  17456. this.m_oLoadManager=null;
  17457. if(this.m_oWidgetContextManager){
  17458. this.m_oWidgetContextManager.m_widget=null;
  17459. }
  17460. this.m_oWidgetContextManager=null;
  17461. this.removeWindowEventListeners();
  17462. if(this.undoRedoQueue){
  17463. GUtil.destroyProperties(this.undoRedoQueue);
  17464. delete this.undoRedoQueue;
  17465. }
  17466. GUtil.destroyProperties(this.getAnnotationStore());
  17467. delete this.getAnnotationStore();
  17468. GUtil.destroyProperties(this.savedOutput);
  17469. delete this.savedOutput;
  17470. delete this.m_oCV;
  17471. _f4d=null;
  17472. },setSavedOutputsCMResponse:function(_f51){
  17473. this.savedOutputsCMResponse=_f51;
  17474. if(_f51==null){
  17475. var _f52=this.getViewerObject().getActionFactory();
  17476. var _f53=_f52.load("Snapshots");
  17477. _f53.resetMenu();
  17478. }
  17479. },getSavedOutputsCMResponse:function(){
  17480. if(typeof this.savedOutputsCMResponse=="undefined"||this.savedOutputsCMResponse==null){
  17481. return null;
  17482. }
  17483. return this.savedOutputsCMResponse;
  17484. },setSavedOutputSearchPath:function(_f54){
  17485. this.m_savedOutputSearchPath=_f54;
  17486. },getSavedOutputSearchPath:function(){
  17487. if(typeof this.m_savedOutputSearchPath=="undefined"){
  17488. return null;
  17489. }
  17490. return this.m_savedOutputSearchPath;
  17491. },initializeProperties:function(){
  17492. if(this.properties){
  17493. var _f55=this.getViewerObject();
  17494. this.properties.initialize(_f55.envParams);
  17495. }
  17496. },addToRAPCache:function(name,_f57){
  17497. if(!this.m_RAPCache){
  17498. this.m_RAPCache={};
  17499. }
  17500. this.m_RAPCache[name]=_f57;
  17501. },getRAPCachedItem:function(name){
  17502. if(this.m_RAPCache&&typeof this.m_RAPCache[name]!="undefined"){
  17503. return this.m_RAPCache[name];
  17504. }
  17505. return null;
  17506. },clearRAPCacheFilterValues:function(){
  17507. for(var key in this.m_RAPCache){
  17508. if(key.indexOf("filterValues.")===0){
  17509. delete this.m_RAPCache[key];
  17510. }
  17511. }
  17512. },clearRAPCache:function(){
  17513. this.m_RAPCache=null;
  17514. },reset:function(){
  17515. this.m_bCallGetAnnotations=true;
  17516. this.promptParametersRetrieved=false;
  17517. this.getViewerObject().envParams["reportPrompts"]="";
  17518. this.setSavedOutputsCMResponse(null);
  17519. this.getUndoRedoQueue().clearQueue();
  17520. if(this.isSelectionFilterEnabled){
  17521. this.clearSelectionFilter();
  17522. }
  17523. this.m_bSelectionFilterSwitch=false;
  17524. },handleFault:function(){
  17525. if(typeof console!="undefined"&&console&&console.log){
  17526. console.log("ViewrIWidget:handle fault is deprecated and should not be used anymore.");
  17527. }
  17528. var _f5a=this.getViewerObject();
  17529. var _f5b=new RequestHandler(_f5a);
  17530. _f5b.onFault();
  17531. },disableListenToForGlobalPrompt:function(){
  17532. this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:["com.ibm.widget.contextChanged.prompt"]}});
  17533. var _f5c=this.getViewerObject();
  17534. if(window.gaRV_INSTANCES){
  17535. var _f5d={};
  17536. _f5d[this.iContext.widgetId]={blockedEvents:["com.ibm.widget.contextChanged.prompt"]};
  17537. for(var _f5e=0;_f5e<window.gaRV_INSTANCES.length;_f5e++){
  17538. if(window.gaRV_INSTANCES[_f5e].getId()!=_f5c.getId()){
  17539. var _f5f=window.gaRV_INSTANCES[_f5e].getViewerWidget();
  17540. if(_f5f){
  17541. _f5f.iContext.iEvents.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_f5d);
  17542. }
  17543. }
  17544. }
  17545. }
  17546. },disableListenToForEvent:function(_f60){
  17547. this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:_f60}});
  17548. var _f61=this.getViewerObject();
  17549. if(window.gaRV_INSTANCES){
  17550. var _f62={};
  17551. _f62[this.iContext.widgetId]={blockedEvents:_f60};
  17552. for(var _f63=0;_f63<window.gaRV_INSTANCES.length;_f63++){
  17553. if(window.gaRV_INSTANCES[_f63].getId()!=_f61.getId()){
  17554. var _f64=window.gaRV_INSTANCES[_f63].getViewerWidget();
  17555. if(_f64){
  17556. _f64.iContext.iEvents.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_f62);
  17557. }
  17558. }
  17559. }
  17560. }
  17561. },handlePassportErrorFromDispatcher:function(){
  17562. if(this.viewerWidgetLastAction){
  17563. var _f65=GUtil.generateCallback(this[this.viewerWidgetLastAction.functionName],this.viewerWidgetLastAction.param,this);
  17564. dojo["require"]("bux.dialogs.IFrameDialog");
  17565. var _f66=new bux.dialogs.LogonDialog({okHandler:_f65,cancelHandler:dojo.hitch(this,function(){
  17566. this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"});
  17567. })});
  17568. _f66.startup();
  17569. _f66.show();
  17570. }
  17571. },showErrorMessage:function(_f67){
  17572. var _f68=this.getViewerObject();
  17573. if(_f68){
  17574. this.m_widgetErrorDlg=new FaultMessageDialog(_f68,_f67);
  17575. this.m_widgetErrorDlg.renderInlineDialog();
  17576. }
  17577. },getErrorDlg:function(){
  17578. if(this.m_widgetErrorDlg){
  17579. return this.m_widgetErrorDlg;
  17580. }
  17581. return null;
  17582. },setErrorDlg:function(dlg){
  17583. this.m_widgetErrorDlg=dlg;
  17584. },clearErrorDlg:function(dlg){
  17585. if(this.getErrorDlg()!==null){
  17586. this.m_widgetErrorDlg.ok();
  17587. }
  17588. },onOpen:function(evt){
  17589. if(evt&&evt.payload&&evt.payload.author){
  17590. this.m_sDashboardOwnerId=evt.payload.author.cm$searchPath;
  17591. }
  17592. },onNotifyPreviousEventsAreDone:function(evt){
  17593. this.m_resizeReady=true;
  17594. },isDashboardOwner:function(){
  17595. if(typeof this.m_sDashboardOwnerId!=="undefined"&&typeof this.m_sUserId!=="undefined"){
  17596. return this.m_sDashboardOwnerId===this.m_sUserId;
  17597. }
  17598. },isCurrentUser:function(user){
  17599. return this.m_sUserId===user;
  17600. },findContainerDiv:function(){
  17601. var _f6e=dojo.byId("RVContent"+this.getViewerObject().getId());
  17602. var _f6f=_f6e;
  17603. while(_f6f){
  17604. if(_f6f.style&&_f6f.style.height&&_f6f.style.height.indexOf("px")!=-1){
  17605. return _f6f;
  17606. }
  17607. _f6f=_f6f.parentNode;
  17608. }
  17609. if(typeof console!="undefined"&&console&&console.log){
  17610. console.log("ViewrIWidget: Could not find the container div.");
  17611. }
  17612. return _f6e;
  17613. },getPaneOnRight:function(){
  17614. return this.getAttributeValue("paneOnRight");
  17615. },getWidgetContextManager:function(){
  17616. return this.m_oWidgetContextManager;
  17617. },getInfoBarRenderedState:function(){
  17618. return this.m_oInfoBarRenderedState;
  17619. },refreshInfoBarRenderedState:function(_f70){
  17620. var len=_f70.length;
  17621. var _f72={};
  17622. for(var idx=0;idx<len;idx++){
  17623. var sId=_f70[idx];
  17624. if(this.m_oInfoBarRenderedState[sId]){
  17625. _f72[sId]=this.m_oInfoBarRenderedState[sId];
  17626. }
  17627. }
  17628. this.m_oInfoBarRenderedState=_f72;
  17629. },onGetWidgetContext:function(_f75){
  17630. var _f76=this.getWidgetContextManager().getWidgetContextObject();
  17631. if(!_f76){
  17632. _f76={};
  17633. }
  17634. this.fireEvent("com.ibm.widget.context.get.done",null,_f76);
  17635. },onGetCanvasContextDone:function(evt){
  17636. },onSetVisible:function(evt){
  17637. if(this.m_debugDelayedViewerLoadingMode===2){
  17638. return;
  17639. }
  17640. if(evt&&evt.payload){
  17641. this.m_visible=evt.payload.isVisible?true:false;
  17642. if(!this.m_visible){
  17643. if(this._cssLimitReached){
  17644. this.cleanupStyles();
  17645. }
  17646. return;
  17647. }
  17648. if(!this.getLoadManager().isViewerLoadInitiated()){
  17649. this.postReport(null);
  17650. }else{
  17651. this._updateOnVisible();
  17652. }
  17653. }
  17654. },_updateOnVisible:function(){
  17655. var _f79=this.getLoadManager();
  17656. if(_f79.isViewerReady()){
  17657. var oCV=this.getViewerObject();
  17658. if(this._cssLimitReached){
  17659. this.reloadStyles();
  17660. }
  17661. if(this.isSavedOutput()){
  17662. _f79.getDelayedLoadingContext().setForceRunReport(false);
  17663. return;
  17664. }
  17665. if(!_f79.getDelayedLoadingContext().isEmpty()){
  17666. _f79.runWhenHasViewer(function(){
  17667. _f79.runningReport();
  17668. var _f7b=oCV.getActionFactory();
  17669. var _f7c=_f7b.load("BuxRunReport");
  17670. var _f7d=_f79.getDelayedLoadingContext();
  17671. var _f7e={promptValues:_f7d.getPromptValues(),clearCascadeParamsList:_f7d.getCascadingPromptParamsToClear()};
  17672. _f7c.setRequestParams(_f7e);
  17673. if(!oCV.getConversation()){
  17674. _f7c.setSendParameterValues(true);
  17675. }
  17676. var _f7f=_f7c.execute();
  17677. _f79.getDelayedLoadingContext().reset();
  17678. return _f7f;
  17679. });
  17680. }else{
  17681. if(oCV.getPinFreezeManager()){
  17682. oCV.getPinFreezeManager().onSetVisible();
  17683. }
  17684. }
  17685. }else{
  17686. _f79.setOnEmptyCallback(dojo.hitch(this,function(){
  17687. if(this.isVisible()){
  17688. this._updateOnVisible();
  17689. }
  17690. }));
  17691. }
  17692. },shouldReportBeRunOnAction:function(){
  17693. return (this.isVisible()&&this.getLoadManager().isViewerLoaded()&&this.getLoadManager().canRunReports());
  17694. },isVisible:function(){
  17695. if(this.m_debugDelayedViewerLoadingMode===2){
  17696. return true;
  17697. }
  17698. if(this.m_visible===null){
  17699. var _f80=this.iContext.getItemSet("buxdelayedload",false);
  17700. if(_f80){
  17701. this.m_visible=(_f80.getItemValue("widgetVisible")==="true");
  17702. }else{
  17703. this.m_visible=true;
  17704. }
  17705. }
  17706. return this.m_visible;
  17707. },isPastedWidget:function(){
  17708. return this._pastedWidget;
  17709. },setWidgetCopyPasteParameters:function(){
  17710. this.copyPasteResource=this.getAttributeValue("resource");
  17711. if(this.copyPasteResource){
  17712. this._pastedWidget=true;
  17713. if(this.getAttributeValue("copy.ciPublishedReportPath")&&this.getAttributeValue("originalReport")==null&&this.getSavedItem()==null){
  17714. this.ciPublishedReportPath=this.getAttributeValue("copy.ciPublishedReportPath");
  17715. }else{
  17716. if(this.getAttributeValue("originalReport")==null){
  17717. this.ciPublishedReportPath=this.getSavedItem();
  17718. this.setAttributeValue("copy.ciPublishedReportPath",this.ciPublishedReportPath);
  17719. }
  17720. }
  17721. this.removeAttributeValue("savedReportPath");
  17722. this.removeAttributeValue("savedReportPath.resource");
  17723. this.removeAttributeValue("resource");
  17724. }
  17725. },postSetWidgetCopyPasteParameters:function(){
  17726. if(this.copyPasteResource){
  17727. this.removeAttributeValue("copy.conversation");
  17728. this.copyPasteResource=null;
  17729. }
  17730. },isSelectionFilterEnabled:function(){
  17731. return this.m_bSelectionFilterSwitch;
  17732. },toggleSelectionFilterSwitch:function(){
  17733. this.m_bSelectionFilterSwitch=!this.isSelectionFilterEnabled();
  17734. var _f81=this.getViewerObject().getSelectionController();
  17735. if(_f81){
  17736. if(this.isSelectionFilterEnabled()){
  17737. _f81.setSelectionStyles(_f81.FILTER_SELECTION_STYLE);
  17738. _f81.repaintSelections();
  17739. }else{
  17740. _f81.resetAll();
  17741. }
  17742. }
  17743. },preprocessPageClicked:function(_f82,evt){
  17744. if(!this.isSelectionFilterEnabled()){
  17745. return;
  17746. }
  17747. var _f84=this.getViewerObject().getSelectionController();
  17748. _f84.setAllowHorizontalDataValueSelection(true);
  17749. if(_f82){
  17750. if(!_f84.hasSavedSelections()){
  17751. _f84.saveSelections();
  17752. }
  17753. _f84.setSelectionStyles(_f84.FILTER_SELECTION_CONTEXT_MENU_STYLE);
  17754. }else{
  17755. _f84.setSelectionStyles(_f84.FILTER_SELECTION_STYLE);
  17756. _f84.clearSavedSelections();
  17757. }
  17758. },ignoreEvent:function(evt){
  17759. stopEventBubble(evt);
  17760. },updateDrillThroughLinks:function(){
  17761. var oCV=this.getViewerObject();
  17762. if(!oCV){
  17763. return;
  17764. }
  17765. var _f87=this.isSelectionFilterEnabled();
  17766. var _f88=oCV.envParams["ui.action"]=="view"||oCV.envParams["ui.action"]=="buxView";
  17767. var _f89=_f87?"":"_temp";
  17768. var _f8a=_f87?"_temp":"";
  17769. var _f8b=["onclick","onkeypress","style"];
  17770. var _f8c=_f88?"onclick"+_f89:"dttargets";
  17771. var _f8d=document.getElementById("RVContent"+oCV.getId());
  17772. var _f8e=getElementsByAttribute(_f8d,"*",_f8c);
  17773. if(!_f8e){
  17774. return;
  17775. }
  17776. for(var i=0;i<_f8e.length;i++){
  17777. var node=_f8e[i];
  17778. if(node.nodeName.toLowerCase()!=="area"){
  17779. if(_f88){
  17780. var _f91=node.getAttribute("onclick"+_f89);
  17781. if(!_f91||(_f91.indexOf("doSingleDrillThrough")==-1&&_f91.indexOf("doMultipleDrillThrough"))){
  17782. continue;
  17783. }
  17784. for(var ii=0;ii<_f8b.length;ii++){
  17785. var _f93=_f8b[ii];
  17786. if(node.getAttribute(_f93+_f89)){
  17787. this._renameAttribute(node,_f93+_f89,_f93+_f8a);
  17788. }
  17789. }
  17790. }
  17791. this._updateCellStyle(node,_f87);
  17792. }
  17793. }
  17794. },_updateCellStyle:function(node,_f95){
  17795. if(node.nodeType==3){
  17796. return;
  17797. }
  17798. if(_f95&&node.className==="hy"){
  17799. this._renameAttribute(node,"class","class_temp");
  17800. }else{
  17801. if(!_f95&&node.getAttribute("class_temp")){
  17802. this._renameAttribute(node,"class_temp","class");
  17803. }
  17804. }
  17805. if(node.childNodes){
  17806. for(i=0;i<node.childNodes.length;i++){
  17807. this._updateCellStyle(node.childNodes[i],_f95);
  17808. }
  17809. }
  17810. },_renameAttribute:function(node,_f97,_f98){
  17811. node.setAttribute(_f98,node.getAttribute(_f97));
  17812. node.removeAttribute(_f97);
  17813. },addButtonToSavedToolbarButtons:function(name,_f9a,_f9b){
  17814. if(typeof name!="undefined"&&name!=null){
  17815. this.savedToolbarButtons[name]={};
  17816. this.savedToolbarButtons[name]["button"]=_f9a;
  17817. this.savedToolbarButtons[name]["position"]=_f9b;
  17818. }
  17819. },getButtonFromSavedToolbarButtons:function(name){
  17820. return this.savedToolbarButtons[name];
  17821. },removeFromSavedToolbarButtons:function(name){
  17822. if(typeof this.savedToolbarButtons[name]!="undefined"&&this.savedToolbarButtons[name]!=null){
  17823. delete this.savedToolbarButtons[name];
  17824. }
  17825. }});
  17826. function UndoRedoQueue(_f9e){
  17827. this.m_queue=[];
  17828. this.m_queueLimit=20;
  17829. this.m_iCurrentPos=0;
  17830. this.m_widget=_f9e;
  17831. this.m_bUndoRedoCalled=false;
  17832. this.m_lastAction=null;
  17833. this.currentUndoObj=null;
  17834. this.beenUsed=false;
  17835. this.m_originalSpec=null;
  17836. };
  17837. UndoRedoQueue.prototype.setOriginalSpec=function(spec){
  17838. if(this.m_queue.length==0){
  17839. this.m_originalSpec=spec;
  17840. }
  17841. };
  17842. UndoRedoQueue.prototype.clearQueue=function(){
  17843. while(this.m_queue.length>0){
  17844. this.m_queue.pop();
  17845. }
  17846. this.m_iCurrentPos=0;
  17847. };
  17848. UndoRedoQueue.prototype.getPosition=function(){
  17849. return this.m_iCurrentPos;
  17850. };
  17851. UndoRedoQueue.prototype.hasBeenUsed=function(){
  17852. return this.beenUsed;
  17853. };
  17854. UndoRedoQueue.prototype.getLength=function(){
  17855. return this.m_queue.length;
  17856. };
  17857. UndoRedoQueue.prototype.initUndoObj=function(obj){
  17858. if(this.m_queue.length==0){
  17859. var oCV=this.m_widget.getViewerObject();
  17860. var spec=this.m_originalSpec==null?oCV.envParams["ui.spec"]:this.m_originalSpec;
  17861. this.m_originalSpec=null;
  17862. this.m_queue.push({"spec":spec,"parameters":oCV.getExecutionParameters(),"tooltip":obj.tooltip,"infoBar":oCV.envParams["rapReportInfo"],"widgetProperties":this.m_widget.getProperties().getOldProperties(),"hasAVSChart":oCV.hasAVSChart(),"undoType":"server"});
  17863. this.m_iCurrentPos=this.m_queue.length-1;
  17864. this.beenUsed=true;
  17865. }
  17866. this.currentUndoObj=obj;
  17867. };
  17868. UndoRedoQueue.prototype.add=function(obj){
  17869. if(this.m_bUndoRedoCalled){
  17870. this.m_bUndoRedoCalled=false;
  17871. return;
  17872. }else{
  17873. if(this.currentUndoObj==null){
  17874. return;
  17875. }else{
  17876. if(obj.reportUpdated==true){
  17877. while(this.m_queue.length>this.m_queueLimit){
  17878. this.m_queue.shift();
  17879. }
  17880. this.clearEnd();
  17881. var _fa4=this.m_widget.getViewerObject();
  17882. if(this.currentUndoObj.saveSpec==true||_fa4.envParams["ui.doNotUseConversationForUndo"]==="true"){
  17883. this.currentUndoObj.spec=_fa4.envParams["ui.spec"];
  17884. this.currentUndoObj.parameters=_fa4.getExecutionParameters();
  17885. }else{
  17886. this.currentUndoObj.conversation=_fa4.getConversation();
  17887. }
  17888. if(_fa4.envParams["rapReportInfo"]){
  17889. this.currentUndoObj.infoBar=_fa4.envParams["rapReportInfo"];
  17890. }
  17891. this.currentUndoObj.widgetProperties=this.m_widget.getProperties().getUndoInfo();
  17892. this.currentUndoObj.palette=_fa4.m_sPalette;
  17893. if(this.m_widget.getProperties().getFlashCharts()){
  17894. this.currentUndoObj.hasAVSChart=_fa4.hasAVSChart();
  17895. }
  17896. this.currentUndoObj.undoType="server";
  17897. this.finalizeAdd();
  17898. }
  17899. }
  17900. }
  17901. };
  17902. UndoRedoQueue.prototype.addClientSideUndo=function(obj){
  17903. if(this.m_bUndoRedoCalled){
  17904. this.m_bUndoRedoCalled=false;
  17905. return;
  17906. }
  17907. if(obj.undoCallback&&obj.redoCallback){
  17908. this.initUndoObj(obj);
  17909. this.currentUndoObj.undoType="client";
  17910. this.finalizeAdd();
  17911. }
  17912. };
  17913. UndoRedoQueue.prototype.finalizeAdd=function(){
  17914. this.m_queue.push(this.currentUndoObj);
  17915. this.m_iCurrentPos=this.m_queue.length-1;
  17916. this.m_bUndoRedoCalled=false;
  17917. this.m_lastAction="";
  17918. this.currentUndoObj=null;
  17919. this.beenUsed=true;
  17920. };
  17921. UndoRedoQueue.prototype.moveBack=function(){
  17922. if(this.m_iCurrentPos<=0){
  17923. return null;
  17924. }
  17925. var _fa6=this.m_queue[this.m_iCurrentPos].undoType;
  17926. this.m_bUndoRedoCalled=true;
  17927. this.m_lastAction="undo";
  17928. this.m_iCurrentPos--;
  17929. this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]};
  17930. if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){
  17931. this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette;
  17932. if(_fa6=="client"){
  17933. return this.m_queue[this.m_iCurrentPos+1];
  17934. }
  17935. var _fa7=this.m_iCurrentPos;
  17936. while(_fa7>0&&this.m_queue[_fa7]&&this.m_queue[_fa7].undoType!="server"){
  17937. _fa7--;
  17938. }
  17939. return this.m_queue[_fa7];
  17940. }
  17941. return null;
  17942. };
  17943. UndoRedoQueue.prototype.moveForward=function(){
  17944. if(this.m_iCurrentPos>=this.m_queue.length){
  17945. return null;
  17946. }
  17947. this.m_bUndoRedoCalled=true;
  17948. this.m_iCurrentPos++;
  17949. this.m_lastAction="redo";
  17950. this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]};
  17951. if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){
  17952. this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette;
  17953. return this.m_queue[this.m_iCurrentPos];
  17954. }
  17955. return null;
  17956. };
  17957. UndoRedoQueue.prototype.clearEnd=function(){
  17958. while(this.m_queue.length-1>this.m_iCurrentPos){
  17959. this.m_queue.pop();
  17960. }
  17961. };
  17962. UndoRedoQueue.prototype.handleCancel=function(){
  17963. if(this.m_lastAction=="undo"){
  17964. this.m_iCurrentPos++;
  17965. }else{
  17966. if(this.m_lastAction=="redo"){
  17967. this.m_iCurrentPos--;
  17968. }
  17969. }
  17970. if(this.m_lastAction=="redo"||this.m_lastAction=="undo"){
  17971. var _fa8=this.m_widget.getProperties();
  17972. var _fa9=this.m_queue[this.m_iCurrentPos];
  17973. if(_fa8&&_fa9&&_fa9.widgetProperties){
  17974. _fa8.doUndo(_fa9.widgetProperties);
  17975. }
  17976. }
  17977. this.m_lastAction="";
  17978. this.m_bUndoRedoCalled=false;
  17979. this.currentUndoObj=null;
  17980. };
  17981. UndoRedoQueue.prototype.handleFault=function(){
  17982. this.currentUndoObj=null;
  17983. this.m_bUndoRedoCalled=false;
  17984. };
  17985. UndoRedoQueue.prototype.getUndoTooltip=function(){
  17986. if(this.m_iCurrentPos>0){
  17987. return RV_RES.IDS_JS_UNDO+" "+this.m_queue[this.m_iCurrentPos].tooltip;
  17988. }
  17989. return RV_RES.IDS_JS_UNDO;
  17990. };
  17991. UndoRedoQueue.prototype.getRedoTooltip=function(){
  17992. if(this.m_iCurrentPos<(this.m_queue.length-1)){
  17993. return RV_RES.IDS_JS_REDO+" "+this.m_queue[this.m_iCurrentPos+1].tooltip;
  17994. }
  17995. return RV_RES.IDS_JS_REDO;
  17996. };
  17997. function CIWidgetSavedOutput(_faa){
  17998. this.iWidget=_faa;
  17999. this.bContainsChart=false;
  18000. this.bContainsDrillThrough=false;
  18001. this.bPagedOutput=true;
  18002. };
  18003. CIWidgetSavedOutput.prototype.getIWidget=function(){
  18004. return this.iWidget;
  18005. };
  18006. CIWidgetSavedOutput.prototype.isPagedOutput=function(){
  18007. return this.bPagedOutput;
  18008. };
  18009. CIWidgetSavedOutput.prototype.setPagedOutput=function(_fab){
  18010. this.bPagedOutput=_fab;
  18011. };
  18012. CIWidgetSavedOutput.prototype.getCognosViewer=function(){
  18013. return this.getIWidget().getViewerObject();
  18014. };
  18015. CIWidgetSavedOutput.prototype.getIframeWindow=function(){
  18016. return this.savedOutputWindow;
  18017. };
  18018. CIWidgetSavedOutput.prototype.getSavedOutputDiv=function(){
  18019. return this.savedOutputDiv;
  18020. };
  18021. CIWidgetSavedOutput.prototype.render=function(){
  18022. if(this.isPagedOutput()&&this.getFirstPage()){
  18023. this.currentPageIndex=0;
  18024. this._showPages([this.getFirstPage()]);
  18025. }else{
  18026. if(this.tabbedSavedOutput&&this.currentPageIndex&&this.pageNodes){
  18027. var _fac=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
  18028. this.switchSavedOutputTab(_fac);
  18029. }else{
  18030. if(this.getCognosViewer()&&this.getCognosViewer().getCurrentlySelectedTab()){
  18031. this.switchSavedOutputTab(this.getCognosViewer().getCurrentlySelectedTab());
  18032. }else{
  18033. this.showHTMLFragment(this.getIframeWindow().document.body.innerHTML);
  18034. }
  18035. }
  18036. }
  18037. };
  18038. CIWidgetSavedOutput.prototype.outputDoneLoading=function(){
  18039. if(window["gReportWidgetLoadQueue"]){
  18040. window["gReportWidgetLoadQueue"].widgetDoneLoading(this.getIWidget());
  18041. }
  18042. this.getIWidget().setOriginalFormFields(null);
  18043. var _fad=this.getCognosViewer();
  18044. var _fae=_fad.getId();
  18045. this.savedOutputWindow=dojo.byId("CVHiddenIFrame"+_fae).contentWindow;
  18046. this.savedOutputDiv=dojo.byId("CVSavedOutputDiv"+_fae);
  18047. var sc=_fad.getSelectionController();
  18048. if(!sc.hasContextData()&&this.savedOutputWindow.onLoadEvent){
  18049. this.savedOutputWindow.onLoadEvent();
  18050. }
  18051. this._populatePageNode();
  18052. var _fb0=dojo.byId("_"+this.iWidget.iContext.widgetId+"_cv");
  18053. this.loadStyleInfoFromIframe(_fb0);
  18054. this.bContainsChart=typeof this.savedOutputWindow.displayChart=="function"?true:false;
  18055. this.bContainsDrillThrough=typeof this.savedOutputWindow.drillThroughTarget!="undefined"?true:false;
  18056. this.render();
  18057. this.getMetaDataFromIFrame();
  18058. if(this.bContainsDrillThrough){
  18059. window[_fae+"drillTargets"]=this.getIframeWindow().drillTargets;
  18060. }
  18061. _fad.fillInContextData();
  18062. _fad.updateBorderCollapse();
  18063. this.getIWidget().updateToolbar();
  18064. _fad.setReportRenderingDone(true);
  18065. var _fb1=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget());
  18066. var _fb2=this.getPageContextData(_fb1);
  18067. if(_fb2==0){
  18068. this.getIWidget().fetchAnnotationData();
  18069. }
  18070. this.fixDuplicateFormFields();
  18071. this.getIWidget().getLoadManager().processQueue();
  18072. delete _fad.envParams["cv.outputKey"];
  18073. this.getIWidget().setXNodeId(null);
  18074. var _fb3=this.getIWidget();
  18075. var _fb4=function(){
  18076. _fb3.iContext.iEvents.fireEvent("com.ibm.bux.widget.render.done",null,{});
  18077. _fad.renderTabs();
  18078. if(_fad.getCurrentlySelectedTab()!=null){
  18079. _fb3.getSavedOutput().tabbedSavedOutput=true;
  18080. _fb3.getSavedOutput().switchSavedOutputTab(_fad.getCurrentlySelectedTab());
  18081. }
  18082. };
  18083. setTimeout(_fb4,100);
  18084. };
  18085. CIWidgetSavedOutput.prototype._populatePageNode=function(){
  18086. this.pageNodes=[];
  18087. var node=this.getIframeWindow().document.body.firstChild;
  18088. while(node){
  18089. if(node.nodeName.toLowerCase()=="table"){
  18090. this.pageNodes.push(node);
  18091. }
  18092. node=node.nextSibling;
  18093. }
  18094. };
  18095. CIWidgetSavedOutput.prototype.switchSavedOutputTab=function(_fb6,_fb7){
  18096. if(!this.pageNodes){
  18097. return;
  18098. }
  18099. if(_fb7){
  18100. if(!this.lastVisitedPage){
  18101. this.lastVisitedPage={};
  18102. }
  18103. if(this.isPagedOutput()){
  18104. var _fb8=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
  18105. this.lastVisitedPage[_fb8]=this.currentPageIndex;
  18106. if(this.lastVisitedPage[_fb6]){
  18107. this.currentPageIndex=this.lastVisitedPage[_fb6];
  18108. this._showPages([this.pageNodes[this.currentPageIndex]]);
  18109. return;
  18110. }
  18111. }
  18112. }
  18113. var _fb9=[];
  18114. for(var i=0;i<this.pageNodes.length;i++){
  18115. var node=this.pageNodes[i];
  18116. if(node&&node.getAttribute&&node.getAttribute("tabid")==_fb6){
  18117. _fb9.push(node);
  18118. this.currentPageIndex=i;
  18119. if(this.isPagedOutput()){
  18120. break;
  18121. }
  18122. }
  18123. }
  18124. this._showPages(_fb9);
  18125. };
  18126. CIWidgetSavedOutput.prototype.fixDuplicateFormFields=function(){
  18127. var _fbc=document.getElementById("formWarpRequest"+this.getCognosViewer().getId());
  18128. if(_fbc){
  18129. for(var _fbd=0;_fbd<_fbc.elements.length;_fbd++){
  18130. var name=_fbc.elements[_fbd].name;
  18131. if(name&&name.length>0){
  18132. if(_fbc[name].length>1){
  18133. var _fbf=_fbc[name][_fbc[name].length-1].value;
  18134. while(_fbc[name].length>1){
  18135. _fbc[name][1].parentNode.removeChild(_fbc[name][1]);
  18136. }
  18137. if(_fbc[name][0]){
  18138. _fbc[name][0].value=_fbf;
  18139. }
  18140. _fbc[name].value=_fbf;
  18141. }
  18142. }
  18143. }
  18144. }
  18145. };
  18146. CIWidgetSavedOutput.prototype.getPageContextData=function(_fc0){
  18147. var _fc1={};
  18148. dojo.query("[ctx]",this.getSavedOutputDiv()).forEach(function(item){
  18149. var ctx=item.getAttribute("ctx");
  18150. var _fc4=ctx.split(":");
  18151. for(var i=0;i<_fc4.length;i++){
  18152. var _fc6=_fc4[i];
  18153. if(_fc6&&_fc6.length>0){
  18154. _fc1[_fc6]=true;
  18155. }
  18156. }
  18157. });
  18158. var _fc7=[];
  18159. for(var item in _fc1){
  18160. _fc7.push(item);
  18161. }
  18162. return this.getCognosViewer().getSelectionController().fetchContextData(_fc7,_fc0);
  18163. };
  18164. CIWidgetSavedOutput.prototype.loadStyleInfoFromIframe=function(_fc9){
  18165. var _fca=null;
  18166. var _fcb=this.savedOutputWindow.document;
  18167. for(var _fcc=0;_fcc<_fcb.childNodes.length;_fcc++){
  18168. if(_fcb.childNodes[_fcc].childNodes&&_fcb.childNodes[_fcc].childNodes.length>0){
  18169. _fca=_fcb.childNodes[_fcc];
  18170. break;
  18171. }
  18172. }
  18173. window.gScriptLoader.loadStyles(_fca.firstChild,this.iWidget.getViewerId());
  18174. var _fcd=dojo.query("link",_fca);
  18175. var _fce="";
  18176. for(i=0;i<_fcd.length;i++){
  18177. var href=_fcd[i].getAttribute("href");
  18178. if(href){
  18179. _fce+="<link href=\""+href+"\" />";
  18180. }
  18181. }
  18182. window.gScriptLoader.loadCSS(_fce,_fc9,true,this.iWidget.getViewerId());
  18183. };
  18184. CIWidgetSavedOutput.prototype.getFirstPage=function(){
  18185. return this.pageNodes[0];
  18186. };
  18187. CIWidgetSavedOutput.prototype.getLastPage=function(){
  18188. return this.pageNodes?this.pageNodes[this.pageNodes.length-1]:null;
  18189. };
  18190. CIWidgetSavedOutput.prototype.writeNavLinks=function(){
  18191. var _fd0="";
  18192. if(this.isPagedOutput()){
  18193. if(this.tabbedSavedOutput&&!isNaN(this.currentPageIndex)){
  18194. var _fd1=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
  18195. if(this.currentPageIndex>0&&this.pageNodes[this.currentPageIndex-1].getAttribute("tabid")==_fd1){
  18196. _fd0+=" firstPage previousPage ";
  18197. }
  18198. if(this.currentPageIndex<(this.pageNodes.length-1)&&this.pageNodes[this.currentPageIndex+1].getAttribute("tabid")==_fd1){
  18199. _fd0+=" nextPage lastPage ";
  18200. }
  18201. }else{
  18202. if(this.currentPageIndex>0){
  18203. _fd0+=" firstPage previousPage ";
  18204. }
  18205. if(this.currentPageIndex<(this.pageNodes.length-1)){
  18206. _fd0+=" nextPage lastPage ";
  18207. }
  18208. }
  18209. }
  18210. this.getCognosViewer().writeNavLinks(_fd0,true);
  18211. };
  18212. CIWidgetSavedOutput.prototype.pageAction=function(_fd2){
  18213. switch(_fd2){
  18214. case "firstPage":
  18215. if(this.tabbedSavedOutput){
  18216. var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
  18217. for(var i=0;i<this.pageNodes.length;i++){
  18218. var node=this.pageNodes[i];
  18219. if(node&&node.getAttribute&&node.getAttribute("tabid")==_fd3){
  18220. this.currentPageIndex=i;
  18221. break;
  18222. }
  18223. }
  18224. }else{
  18225. this.currentPageIndex=0;
  18226. }
  18227. break;
  18228. case "previousPage":
  18229. this.currentPageIndex=this.currentPageIndex-1;
  18230. break;
  18231. case "nextPage":
  18232. this.currentPageIndex=this.currentPageIndex+1;
  18233. break;
  18234. case "lastPage":
  18235. if(this.tabbedSavedOutput){
  18236. var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
  18237. var _fd6=false;
  18238. for(var i=0;i<this.pageNodes.length;i++){
  18239. var node=this.pageNodes[i];
  18240. if(node&&node.getAttribute&&node.getAttribute("tabid")==_fd3){
  18241. _fd6=true;
  18242. }else{
  18243. if(_fd6){
  18244. this.currentPageIndex=i-1;
  18245. break;
  18246. }
  18247. }
  18248. }
  18249. }else{
  18250. this.currentPageIndex=this.pageNodes.length-1;
  18251. }
  18252. break;
  18253. }
  18254. this._showPages([this.pageNodes[this.currentPageIndex]]);
  18255. };
  18256. CIWidgetSavedOutput.prototype._showPages=function(_fd7){
  18257. var oCV=this.getCognosViewer();
  18258. oCV.getSelectionController().clearSelectedObjects();
  18259. if(_fd7.length==1){
  18260. this.showHTMLFragment(_fd7[0].innerHTML);
  18261. }else{
  18262. var _fd9="";
  18263. for(var i=0;i<_fd7.length;i++){
  18264. _fd9+=_fd7[i].innerHTML;
  18265. }
  18266. this.showHTMLFragment(_fd9);
  18267. }
  18268. this.writeNavLinks();
  18269. if(this.tabbedSavedOutput&&this.lastVisitedPage){
  18270. this.getIWidget().placeTabControlInView();
  18271. }else{
  18272. oCV.setKeepFocus(true);
  18273. }
  18274. oCV.doneLoadingUpdateA11Y("complete");
  18275. var _fdb=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget());
  18276. var _fdc=this.getPageContextData(_fdb);
  18277. if(_fdc==0){
  18278. this.getIWidget().fetchAnnotationData();
  18279. }
  18280. };
  18281. CIWidgetSavedOutput.prototype.getMetaDataFromIFrame=function(){
  18282. if(typeof this.getIframeWindow().getSelectionController=="function"){
  18283. var _fdd=this.getIframeWindow().getSelectionController();
  18284. if(_fdd){
  18285. var _fde=this.getCognosViewer().getSelectionController();
  18286. _fde.addMetaData(_fdd.getCCDManager().m_md);
  18287. _fde.addContextData(_fdd.getCCDManager().m_cd);
  18288. _fde.setSelectionBasedFeaturesEnabled(true);
  18289. }
  18290. }
  18291. };
  18292. CIWidgetSavedOutput.prototype.processDrillThrough=function(_fdf){
  18293. if(this.bContainsDrillThrough&&(typeof this.bOldOutput=="undefined"||this.bOldOutput==true)){
  18294. var _fe0=new RegExp("onclick=\"doSingleDrillThrough[^\"]*\"|onclick='doMultipleDrillThrough[^']*'","gim");
  18295. var aM=_fdf.match(_fe0);
  18296. if(aM){
  18297. if(typeof this.bOldOutput=="undefined"&&aM.length>0&&aM[0].indexOf("'_THIS_'")>0){
  18298. this.bOldOutput=false;
  18299. }else{
  18300. this.bOldOutput=true;
  18301. var _fe2="";
  18302. var quot="'";
  18303. if(aM.length>0){
  18304. _fe2=aM[0].charAt(aM[0].length-1);
  18305. }
  18306. if(_fe2=="'"){
  18307. quot="\"";
  18308. }
  18309. for(var i=0;i<aM.length;i++){
  18310. _fdf=_fdf.replace(aM[i],aM[i].substring(0,aM[i].length-3)+","+quot+this.getCognosViewer().getId()+quot+");"+_fe2);
  18311. }
  18312. }
  18313. }
  18314. }
  18315. return _fdf;
  18316. };
  18317. CIWidgetSavedOutput.prototype.processChart=function(_fe5){
  18318. if(isIE()){
  18319. _fe5=_fe5.replace(/preSelectNode\(event\);/g,getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".pcc(event);");
  18320. }else{
  18321. _fe5=_fe5.replace(/preSelectNode\(event\);/g,"");
  18322. }
  18323. var _fe6=this.getCognosViewer().getId();
  18324. var _fe7=document.getElementById("CVHiddenIFrame"+_fe6);
  18325. var _fe8=_fe7.src;
  18326. if(_fe8.indexOf("repository")>=0){
  18327. var _fe9=_fe8.indexOf("content");
  18328. var _fea=_fe8.substring(0,_fe9);
  18329. _fe5=_fe5.replace(/src\=\"images\//g,"src=\""+_fea+"images/");
  18330. }
  18331. _fe5=this.fixupChartUseMapValue(_fe5);
  18332. return _fe5.replace(/displayChart[^;].*;|var graphicSrc[^;].*;|var graphicName[^;].*;/g,"");
  18333. };
  18334. CIWidgetSavedOutput.prototype.fixupChartUseMapValue=function(_feb){
  18335. var re=/usemap\s*=\s*"*#(\w+)"*/gi;
  18336. var _fed,_fee=[];
  18337. while((_fed=re.exec(_feb))){
  18338. _fee.push(_fed[1]);
  18339. }
  18340. for(var i=0;i<_fee.length;i++){
  18341. var _ff0=new RegExp(_fee[i],"g");
  18342. _feb=_feb.replace(_ff0,_fee[i]+this.getCognosViewer().getId());
  18343. }
  18344. return _feb;
  18345. };
  18346. CIWidgetSavedOutput.prototype.showHTMLFragment=function(_ff1){
  18347. if(this.bContainsChart){
  18348. _ff1=this.processChart(_ff1);
  18349. }
  18350. _ff1=this.processDrillThrough(_ff1);
  18351. _ff1=_ff1.replace(/_THIS_/g,this.getCognosViewer().getId());
  18352. this.getIWidget().loadStylesAndScripts(_ff1,this.getSavedOutputDiv(),false);
  18353. this.getIWidget().reselectSelectionFilterObjects();
  18354. this.getIWidget().addChromeWhitespaceHandler(this.getCognosViewer().getId());
  18355. };
  18356. function gInitializeViewer(obj){
  18357. if(window.gScriptLoader.hasCompletedExecution()){
  18358. var _ff3=obj.getViewerObject();
  18359. if(_ff3&&_ff3.inlineScriptsDoneExecuting==true){
  18360. clearInterval(obj.timer);
  18361. if(typeof _ff3.errorOccured!="undefined"){
  18362. obj.fireEvent("com.ibm.bux.widget.render.done",null,{});
  18363. }else{
  18364. if(typeof _ff3.getToolbar()!="undefined"){
  18365. _ff3.setViewerWidget(obj);
  18366. if(obj.isSelectionFilterEnabled()){
  18367. obj.updateDrillThroughLinks();
  18368. }
  18369. if(obj.isDashboardOwner()){
  18370. _ff3.addReportInfo();
  18371. }
  18372. if(obj.promptParametersRetrieved==true){
  18373. var _ff4=obj.getAttributeValue("viewerReportPrompts");
  18374. _ff3.envParams["reportPrompts"]=_ff4;
  18375. }else{
  18376. if(_ff3.envParams&&_ff3.envParams["widget.promptParametersRetrievedOnDrop"]=="true"){
  18377. obj.promptParametersRetrieved=true;
  18378. }
  18379. }
  18380. var _ff5=obj.getAttributeValue("syncNewWidgets");
  18381. if(_ff5===null||_ff5==="true"){
  18382. _ff5=true;
  18383. }else{
  18384. _ff5=false;
  18385. }
  18386. if(!_ff5&&(obj.isPastedWidget()||obj.isOpeningSavedDashboard()==false)){
  18387. obj.disableListenToForEvent(["com.ibm.widget.contextChanged.drill","com.ibm.widget.contextChanged.prompt","com.ibm.widget.contextChanged"]);
  18388. }
  18389. obj.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,(_ff3.m_flashChartsObjectIds.length!==0));
  18390. }
  18391. }
  18392. }
  18393. }
  18394. };
  18395. function gVWEvent(sId,evt,_ff8){
  18396. var oCV=window["oCV"+sId];
  18397. if(oCV){
  18398. oCV.loadExtra();
  18399. var _ffa=oCV.getViewerWidget();
  18400. if(_ffa){
  18401. _ffa[_ff8](evt);
  18402. }
  18403. }
  18404. };
  18405. function ReportWidgetLoadQueue(_ffb){
  18406. this._concurrentLoadSetting=_ffb;
  18407. this._widgetsRunning=[];
  18408. this._queue=[];
  18409. };
  18410. ReportWidgetLoadQueue.prototype.add=function(_ffc){
  18411. this._queue.push(_ffc);
  18412. this.loadNextWidget();
  18413. };
  18414. ReportWidgetLoadQueue.prototype.widgetDoneLoading=function(_ffd){
  18415. for(var i=0;i<this._widgetsRunning.length;++i){
  18416. var _fff=this._widgetsRunning[i];
  18417. if(_fff==_ffd){
  18418. this._widgetsRunning.splice(i,1);
  18419. break;
  18420. }
  18421. }
  18422. this.loadNextWidget();
  18423. };
  18424. ReportWidgetLoadQueue.prototype.loadNextWidget=function(){
  18425. if(this._widgetsRunning.length<this._concurrentLoadSetting){
  18426. var _1000=this._queue.shift();
  18427. if(typeof _1000!="undefined"){
  18428. this._widgetsRunning.push(_1000);
  18429. _1000.postReport(null);
  18430. }
  18431. }
  18432. };
  18433. function CognosViewerAnnotation(){
  18434. this.m_oCV=null;
  18435. };
  18436. CognosViewerAnnotation.prototype.setCognosViewer=function(oCV){
  18437. this.m_oCV=oCV;
  18438. };
  18439. CognosViewerAnnotation.prototype.getCognosViewer=function(){
  18440. return this.m_oCV;
  18441. };
  18442. CognosViewerAnnotation.prototype.isEnabled=function(_1002){
  18443. };
  18444. CognosViewerAnnotation.prototype.areAnnotationsEnabled=function(){
  18445. var _1003=this.m_oCV.getViewerWidget();
  18446. return _1003.getAnnotationHelper().isEnabled();
  18447. };
  18448. CognosViewerAnnotation.prototype.getMenuItemBaseString=function(){
  18449. };
  18450. CognosViewerAnnotation.prototype.getMenuItemIconClass=function(){
  18451. };
  18452. CognosViewerAnnotation.prototype.getSelections=function(){
  18453. var _1004=[];
  18454. var _1005=this.getCognosViewer();
  18455. if(_1005){
  18456. var _1006=_1005.getSelectionController();
  18457. if(_1006){
  18458. _1004=_1006.getSelections();
  18459. }
  18460. }
  18461. return _1004;
  18462. };
  18463. CognosViewerAnnotation.prototype.hasAnnotation=function(){
  18464. var has=false;
  18465. var _1008=this.getCognosViewer();
  18466. if(_1008){
  18467. var _1009=_1008.getViewerWidget();
  18468. if(_1009){
  18469. var store=_1009.getAnnotationStore();
  18470. if(store){
  18471. has=store.hasAnnotation();
  18472. }
  18473. }
  18474. }
  18475. return has;
  18476. };
  18477. function CognosViewerCellAnnotation(){
  18478. };
  18479. CognosViewerCellAnnotation.prototype=new CognosViewerAnnotation();
  18480. CognosViewerCellAnnotation.prototype.getMenuItemString=function(_100b){
  18481. var _100c=_100b;
  18482. var _100d=this.getSelections();
  18483. if(_100d&&_100d.length==1){
  18484. var sel=_100d[0];
  18485. _100c=sel.getDisplayValues()[0];
  18486. }
  18487. var text=this.getMenuItemBaseString();
  18488. if(_100c&&_100c.length>0){
  18489. text+=" - "+enforceTextDir(_100c);
  18490. }
  18491. return text;
  18492. };
  18493. CognosViewerCellAnnotation.prototype.hasAnnotaionsOnSelectedCell=function(){
  18494. var _1010=this.getSelections();
  18495. if(_1010&&_1010.length==1){
  18496. var _1011=_1010[0].getCellRef();
  18497. var ctxId=this.getCognosViewer().findCtx(_1011);
  18498. var _1013=this.getCognosViewer().getViewerWidget();
  18499. if(_1013){
  18500. var _1014=_1013.getAnnotationStore();
  18501. if(_1014){
  18502. var _1015=_1014.get(ctxId);
  18503. if(_1015&&_1015.length>0){
  18504. return true;
  18505. }
  18506. }
  18507. }
  18508. }
  18509. return false;
  18510. };
  18511. CognosViewerCellAnnotation.prototype.getChangeableAnnotation=function(){
  18512. var _1016=this.getSelections();
  18513. if(_1016&&_1016.length==1){
  18514. var _1017=_1016[0].getCellRef();
  18515. var ctxId=this.getCognosViewer().findCtx(_1017);
  18516. var _1019=this.getCognosViewer().getViewerWidget();
  18517. if(_1019){
  18518. var _101a=_1019.getAnnotationStore();
  18519. if(_101a){
  18520. return _101a.getChangeableAnnotation(ctxId);
  18521. }
  18522. }
  18523. }
  18524. return null;
  18525. };
  18526. CognosViewerCellAnnotation.prototype.hasValidContextOnSelectedCell=function(){
  18527. var _101b=this.getSelections();
  18528. if(_101b&&_101b.length==1){
  18529. var _101c=_101b[0].getCellRef();
  18530. var ctxId=this.getCognosViewer().findCtx(_101c);
  18531. if(ctxId){
  18532. var ids=AnnotationCTXLookup.generateIDArrayFromCellCtxValue(ctxId);
  18533. for(var i=0;i<ids.length;i++){
  18534. var id=ids[i];
  18535. if(id!=="*"&&!(/^\d+$/).test(id)){
  18536. return false;
  18537. }
  18538. }
  18539. return true;
  18540. }
  18541. }
  18542. return false;
  18543. };
  18544. function NewAnnotation(){
  18545. };
  18546. NewAnnotation.prototype=new CognosViewerCellAnnotation();
  18547. NewAnnotation.prototype.isEnabled=function(_1021){
  18548. return this.areAnnotationsEnabled()&&(_1021!=="widgetActions")&&this.hasValidContextOnSelectedCell();
  18549. };
  18550. NewAnnotation.prototype.getMenuItemBaseString=function(){
  18551. return RV_RES.IDS_JS_ANNOTATION_NEW;
  18552. };
  18553. NewAnnotation.prototype.getMenuItemIconClass=function(){
  18554. return "NewAnnotation";
  18555. };
  18556. function EditAnnotation(){
  18557. };
  18558. EditAnnotation.prototype=new CognosViewerCellAnnotation();
  18559. EditAnnotation.prototype.isEnabled=function(_1022){
  18560. return this.areAnnotationsEnabled()&&(_1022!=="widgetActions")&&this.getChangeableAnnotation()!==null;
  18561. };
  18562. EditAnnotation.prototype.getMenuItemBaseString=function(){
  18563. return RV_RES.IDS_JS_ANNOTATION_EDIT;
  18564. };
  18565. EditAnnotation.prototype.getMenuItemIconClass=function(){
  18566. return "EditAnnotation";
  18567. };
  18568. function DeleteAnnotation(){
  18569. };
  18570. DeleteAnnotation.prototype=new CognosViewerCellAnnotation();
  18571. DeleteAnnotation.prototype.isEnabled=function(_1023){
  18572. return this.areAnnotationsEnabled()&&(_1023!=="widgetActions")&&this.getChangeableAnnotation()!==null;
  18573. };
  18574. DeleteAnnotation.prototype.getMenuItemString=function(_1024){
  18575. return this.getMenuItemBaseString();
  18576. };
  18577. DeleteAnnotation.prototype.getMenuItemBaseString=function(){
  18578. return RV_RES.IDS_JS_ANNOTATION_DELETE;
  18579. };
  18580. DeleteAnnotation.prototype.getMenuItemIconClass=function(){
  18581. return "DeleteAnnotation";
  18582. };
  18583. function CognosViewerWidgetAnnotation(){
  18584. };
  18585. CognosViewerWidgetAnnotation.prototype=new CognosViewerAnnotation();
  18586. CognosViewerWidgetAnnotation.prototype.getMenuItemString=function(){
  18587. var _1025=this.getCognosViewer().getViewerWidget().getDisplayName();
  18588. var text=this.getMenuItemBaseString();
  18589. if(_1025&&_1025.length>0){
  18590. _1025=enforceTextDir(_1025);
  18591. text+=" - "+_1025;
  18592. }
  18593. return text;
  18594. };
  18595. CognosViewerWidgetAnnotation.prototype.hasWidgetLevelAnnotations=function(){
  18596. var _1027=false;
  18597. var _1028=this.getCognosViewer().getViewerWidget();
  18598. if(_1028){
  18599. var _1029=_1028.getAnnotationStore();
  18600. var _102a=_1029.get(_1029.WIDGET_CONTEXT);
  18601. if(_102a&&_102a.length>0){
  18602. _1027=true;
  18603. }
  18604. }
  18605. return _1027;
  18606. };
  18607. CognosViewerWidgetAnnotation.prototype.getWidgetLevelChangeableAnnotation=function(){
  18608. var _102b=this.getCognosViewer().getViewerWidget();
  18609. if(_102b){
  18610. var _102c=_102b.getAnnotationStore();
  18611. if(_102c){
  18612. return _102c.getChangeableAnnotation(_102c.WIDGET_CONTEXT);
  18613. }
  18614. }
  18615. return null;
  18616. };
  18617. CognosViewerWidgetAnnotation.prototype.hasValidSelection=function(_102d){
  18618. var _102e=this.m_oCV.getSelectionController();
  18619. var _102f=_102e.getSelections();
  18620. var _1030=false;
  18621. if(_102e.hasSelectedChartNodes()){
  18622. _1030=(_102e.getSelectedChartNodes()[0].m_contextIds.length>0);
  18623. }
  18624. return (_102d==="widgetActions")||(_102f.length!=1&&!_1030);
  18625. };
  18626. function NewWidgetAnnotation(){
  18627. };
  18628. NewWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
  18629. NewWidgetAnnotation.prototype.isEnabled=function(_1031){
  18630. return this.areAnnotationsEnabled()&&(_1031!=="contextMenu")&&this.hasValidSelection(_1031);
  18631. };
  18632. NewWidgetAnnotation.prototype.getMenuItemBaseString=function(){
  18633. return RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW;
  18634. };
  18635. NewWidgetAnnotation.prototype.getMenuItemIconClass=function(){
  18636. return "NewWidgetAnnotation";
  18637. };
  18638. function EditWidgetAnnotation(){
  18639. };
  18640. EditWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
  18641. EditWidgetAnnotation.prototype.isEnabled=function(_1032){
  18642. return (this.areAnnotationsEnabled()&&(_1032!=="contextMenu")&&this.hasValidSelection(_1032)&&this.getWidgetLevelChangeableAnnotation())?true:false;
  18643. };
  18644. EditWidgetAnnotation.prototype.getMenuItemBaseString=function(){
  18645. return RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT;
  18646. };
  18647. EditWidgetAnnotation.prototype.getMenuItemIconClass=function(){
  18648. return "EditWidgetAnnotation";
  18649. };
  18650. function DeleteWidgetAnnotation(){
  18651. };
  18652. DeleteWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
  18653. DeleteWidgetAnnotation.prototype.isEnabled=function(_1033){
  18654. return (this.areAnnotationsEnabled()&&(_1033!=="contextMenu")&&this.hasValidSelection(_1033)&&this.getWidgetLevelChangeableAnnotation())?true:false;
  18655. };
  18656. DeleteWidgetAnnotation.prototype.getMenuItemBaseString=function(){
  18657. return RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE;
  18658. };
  18659. DeleteWidgetAnnotation.prototype.getMenuItemIconClass=function(){
  18660. return "DeleteWidgetAnnotation";
  18661. };
  18662. function AnnotationCTXLookup(_1034){
  18663. this.m_ccdManager=_1034;
  18664. this.m_md=this.m_ccdManager.m_md;
  18665. this.m_cd=this.m_ccdManager.m_cd;
  18666. this.m_RDIVALUE_KEY="annotationHook";
  18667. this.m_oContextDetailsMap={};
  18668. };
  18669. AnnotationCTXLookup.prototype.populateCtxDetailsForAllAnnotations=function(_1035){
  18670. for(var i=0,len=_1035.length;i<len;i++){
  18671. var anno=_1035[i];
  18672. var ctx=anno.ctx;
  18673. if(ctx){
  18674. this._populateCtxDetailsForOneCtxValue(ctx);
  18675. }
  18676. }
  18677. };
  18678. AnnotationCTXLookup.prototype._populateCtxDetailsForOneCtxValue=function(_103a){
  18679. if(_103a){
  18680. var _103b=this.generateIDArrayFromCellCtxValue(_103a);
  18681. for(var i=0,len=_103b.length;i<len;i++){
  18682. var id=_103b[i];
  18683. this._populateCtxDetailsForOneId(id);
  18684. }
  18685. }
  18686. };
  18687. AnnotationCTXLookup.generateIDArrayFromCellCtxValue=function(_103f){
  18688. if(_103f){
  18689. return _103f.replace(/::/g,":").split(":");
  18690. }
  18691. return null;
  18692. };
  18693. AnnotationCTXLookup.prototype.generateIDArrayFromCellCtxValue=AnnotationCTXLookup.generateIDArrayFromCellCtxValue;
  18694. AnnotationCTXLookup.prototype._populateCtxDetailsForOneId=function(id){
  18695. if(id.match(/\*/)){
  18696. return;
  18697. }
  18698. var _1041=this.m_oContextDetailsMap[id];
  18699. if(_1041){
  18700. return;
  18701. }else{
  18702. _1041={};
  18703. var _1042=this.m_cd[id];
  18704. if(_1042){
  18705. if(_1042.u){
  18706. _1041["u"]=_1042.u;
  18707. }
  18708. if(_1042.r){
  18709. _1041["r"]=_1042.r;
  18710. var _1043=this.m_md[_1042.r];
  18711. if(_1043){
  18712. if(_1043.usage!=="undefined"){
  18713. _1041["usage"]=_1043.usage;
  18714. }
  18715. if(_1043.dtype){
  18716. _1041.dtype=_1043.dtype;
  18717. }
  18718. }
  18719. }
  18720. this._populateRdiValueInDetail(_1041,id);
  18721. this.m_oContextDetailsMap[id]=_1041;
  18722. }
  18723. }
  18724. };
  18725. AnnotationCTXLookup.prototype._getMDValue=function(item,key1,key2){
  18726. if(typeof key2=="undefined"){
  18727. key2=key1;
  18728. }
  18729. if(typeof item[key1]!="undefined"&&typeof this.m_md[item[key1]][key2]!="undefined"){
  18730. return this.m_md[item[key1]][key2];
  18731. }
  18732. return null;
  18733. };
  18734. AnnotationCTXLookup.prototype._findMDValue=function(item,aKeys){
  18735. for(var i=0;i<aKeys.length;i++){
  18736. var value=this._getMDValue(item,aKeys[i]);
  18737. if(value!==null){
  18738. return value;
  18739. }
  18740. }
  18741. return null;
  18742. };
  18743. AnnotationCTXLookup.prototype._populateRdiValueInDetail=function(_104b,id){
  18744. var item=this.m_cd[id];
  18745. var aKeys=[];
  18746. var oRdi={};
  18747. oRdi[1]=this._findMDValue(item,["l","h","i","r"]);
  18748. if(this._getMDValue(item,"r","usage")==2){
  18749. oRdi[2]=this._findMDValue(item,["i","m","r"]);
  18750. }
  18751. _104b[this.m_RDIVALUE_KEY]=oRdi;
  18752. };
  18753. AnnotationCTXLookup.prototype.getDetail=function(id){
  18754. if(!id){
  18755. return null;
  18756. }
  18757. return this.m_oContextDetailsMap[id];
  18758. };
  18759. AnnotationCTXLookup.prototype.isAnnotatedId=function(_1051,_1052,id){
  18760. if(!_1051||!id){
  18761. return false;
  18762. }
  18763. if(_1051.match(/\*/)){
  18764. var _1054=this.getDetail(id);
  18765. if(_1054&&_1054[this.m_RDIVALUE_KEY]){
  18766. var rdi=_1054[this.m_RDIVALUE_KEY][1];
  18767. if(_1052.version>=2&&_1054[this.m_RDIVALUE_KEY][2]){
  18768. rdi=_1054[this.m_RDIVALUE_KEY][2];
  18769. }
  18770. return this._compareWithoutNS(_1052.rdi,rdi);
  18771. }else{
  18772. return false;
  18773. }
  18774. }else{
  18775. return _1051===id;
  18776. }
  18777. };
  18778. AnnotationCTXLookup.prototype._compareWithoutNS=function(rdi1,rdi2){
  18779. if(!rdi1||!rdi2){
  18780. return false;
  18781. }
  18782. if(rdi1!==rdi2){
  18783. var _1058=rdi2.indexOf("].[");
  18784. if(_1058>0){
  18785. return rdi1.lastIndexOf(rdi2.substr(_1058))>0;
  18786. }
  18787. return false;
  18788. }
  18789. return true;
  18790. };
  18791. AnnotationCTXLookup.prototype.isAnnotatedCell=function(_1059,_105a){
  18792. if(!_1059||!_1059.ctx||!_105a){
  18793. return false;
  18794. }
  18795. this._populateCtxDetailsForOneCtxValue(_105a);
  18796. var _105b=this.generateIDArrayFromCellCtxValue(_1059.ctx);
  18797. var _105c=this.generateIDArrayFromCellCtxValue(_105a);
  18798. if(!this.isAnnotatedId(_105b[0],_1059,_105c[0])){
  18799. return false;
  18800. }
  18801. var _105d=this._generateDataItemIDArrayFromAnnotationIDs(_105b);
  18802. var _105e=this._generateDataItemIDArrayFromCellIDs(_105c);
  18803. if(_105d.length>_105e.length){
  18804. return false;
  18805. }
  18806. for(var i=0,len=_105d.length;i<len;i++){
  18807. for(var j=0,jLen=_105e.length;j<jLen;j++){
  18808. if(_105d[i]===_105e[j]){
  18809. _105d[i]=true;
  18810. _105e[j]=true;
  18811. break;
  18812. }
  18813. }
  18814. }
  18815. for(i=0,len=_105d.length;i<len;i++){
  18816. if(_105d[i]!==true){
  18817. return false;
  18818. }
  18819. }
  18820. for(i=0,len=_105e.length;i<len;i++){
  18821. if(_105e[i]!==true){
  18822. return false;
  18823. }
  18824. }
  18825. return true;
  18826. };
  18827. AnnotationCTXLookup.prototype._generateDataItemIDArrayFromCellIDs=function(_1063){
  18828. var _1064=[];
  18829. for(var i=1,len=_1063.length;i<len;i++){
  18830. var id=_1063[i];
  18831. var _1068=this.getDetail(id);
  18832. if(this._isDataItem(_1068)){
  18833. _1064.splice(0,0,id);
  18834. }
  18835. }
  18836. return _1064;
  18837. };
  18838. AnnotationCTXLookup.dtypeLookup={"1":true,"25":true,"26":true,"27":true,"28":true,"29":true,"30":true,"31":true,"32":true,"34":true,"35":true,"36":true,"43":true,"45":true,"55":true,"56":true};
  18839. AnnotationCTXLookup.prototype._isDataItem=function(_1069){
  18840. if(_1069){
  18841. var usage=_1069.usage;
  18842. var dtype=_1069.dtype;
  18843. if(usage===0||usage===1||(usage===3&&AnnotationCTXLookup.dtypeLookup[dtype]===true)){
  18844. return true;
  18845. }
  18846. }
  18847. return false;
  18848. };
  18849. AnnotationCTXLookup.prototype._generateDataItemIDArrayFromAnnotationIDs=function(_106c){
  18850. var _106d=[];
  18851. for(var i=1,len=_106c.length;i<len;i++){
  18852. var id=_106c[i];
  18853. if(id.match(/\*/)===null){
  18854. _106d.splice(0,0,id);
  18855. }
  18856. }
  18857. return _106d;
  18858. };
  18859. dojo.provide("bux.reportViewer.ReportInfo");
  18860. dojo.require("bux.Tooltip");
  18861. dojo.declare("bux.reportViewer.ReportInfo",bux.TooltipBase,{templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",title:"",text:"",linkText:null,linkScript:null,constructor:function(args){
  18862. if(args.focusElement){
  18863. dojo.connect(args.focusElement,"onfocus",this,"_onHover");
  18864. dojo.connect(args.focusElement,"onblur",this,"_onUnHover");
  18865. }
  18866. },createMarkup:function(){
  18867. var _1072=this.connectId+"_linkId";
  18868. var _1073=dojo.isIE||dojo.isTrident?"\"#\"":"\"javascript:void(0);\"";
  18869. var _1074="";
  18870. _1074+="<table role=\"presentation\" class=\"bux-tooltip-table\" cellspacing=\"0\" cellpadding=\"0\">";
  18871. _1074+="<tr>";
  18872. _1074+="<td class=\"bux-tooltip-title\">";
  18873. _1074+=html_encode(this.title);
  18874. _1074+="</td>";
  18875. _1074+="</tr>";
  18876. _1074+="<tr>";
  18877. _1074+="<td class=\"bux-tooltip-text\">";
  18878. _1074+=html_encode(this.text);
  18879. _1074+="</td>";
  18880. _1074+="</tr>";
  18881. _1074+="<tr>";
  18882. if(this.linkScript){
  18883. _1074+="<td class=\"bux-tooltip-text\">";
  18884. _1074+="<a role=\"link\" id=\""+_1072+"\" href="+_1073+" onmousedown=\""+this.linkScript+"\">"+html_encode(this.linkText)+"</a>";
  18885. _1074+="</td>";
  18886. }else{
  18887. _1074+="<td></td>";
  18888. }
  18889. _1074+="</tr>";
  18890. _1074+="</table>";
  18891. return _1074;
  18892. }});
  18893. dojo.provide("ViewerIWidgetInlineDialog");
  18894. dojo.require("dijit._base.focus");
  18895. dojo.declare("ViewerIWidgetInlineDialog",null,{constructor:function(oCV,sHTML,_1077,_1078){
  18896. this.initialize(oCV,sHTML);
  18897. this.m_aButtons=_1077;
  18898. this.m_sButtonContainerId=_1078;
  18899. },initialize:function(oCV,sHTML){
  18900. this.m_oCV=oCV;
  18901. this.m_html=sHTML;
  18902. this.m_viewerDiv=dojo.byId("RVContent"+this.m_oCV.getId());
  18903. this.positionOptions={horizontal:"center",vertical:"center"};
  18904. this.onScrollHandle=null;
  18905. this.m_dialogDiv=null;
  18906. if(this.m_oCV.getViewerWidget){
  18907. this.m_background=this.m_oCV.getViewerWidget().getReportBlocker();
  18908. }
  18909. },setVerticalPositionOption:function(_107b){
  18910. this.positionOptions.vertical=_107b;
  18911. },getDialogDiv:function(){
  18912. return this.m_dialogDiv;
  18913. },initializeDialog:function(){
  18914. this.m_dialogDiv=document.createElement("div");
  18915. dojo.addClass(this.m_dialogDiv,"inlineDialog");
  18916. this.m_dialogDiv.style.display="none";
  18917. this.m_dialogDiv.innerHTML=this.m_html;
  18918. dojo.place(this.m_dialogDiv,this.m_background.getNode().nextSibling,"before");
  18919. var _107c=dojo.byId(this.m_sButtonContainerId);
  18920. if(_107c&&this.m_aButtons&&this.m_aButtons.length>0){
  18921. dojo.forEach(this.m_aButtons,function(_107d){
  18922. var span=document.createElement("span");
  18923. _107c.appendChild(span);
  18924. var _107f=new dijit.form.Button(_107d,span);
  18925. });
  18926. }
  18927. },createBackgroundTabCatchDiv:function(){
  18928. if(this.m_tabCatch==null){
  18929. this.m_tabCatch=dojo.byId("BACKGROUND_TABCATCH"+this.m_oCV.getId());
  18930. if(!this.m_tabCatch){
  18931. this.m_tabCatch=document.createElement("div");
  18932. this.m_tabCatch.id="BACKGROUND_TABCATCH"+this.m_oCV.getId();
  18933. this.m_tabCatch.style.display="none";
  18934. this.m_tabCatch.style.position="absolute";
  18935. this.m_tabCatch.style.left="0";
  18936. this.m_tabCatch.style.top="0";
  18937. this.m_tabCatch.style.height="0px";
  18938. this.m_tabCatch.style.width="0px";
  18939. this.m_tabCatch.setAttribute("tabIndex","0");
  18940. if(this.m_viewerDiv.firstChild){
  18941. dojo.place(this.m_tabCatch,this.m_viewerDiv.firstChild,"before");
  18942. }else{
  18943. this.m_viewerDiv.appendChild(this.m_tabCatch);
  18944. }
  18945. }
  18946. }
  18947. },initializeBackground:function(){
  18948. this.createBackgroundTabCatchDiv();
  18949. },initializeKeyboardSupport:function(){
  18950. var _1080=dijit._getTabNavigable(this.m_dialogDiv);
  18951. var _1081=_1080.lowest||_1080.first;
  18952. var _1082=_1080.last||_1080.highest||_1081;
  18953. if(_1081){
  18954. this.m_tabCatch.onfocus=function(){
  18955. dijit.focus(_1081);
  18956. };
  18957. this.m_background.getNode().onfocus=function(){
  18958. dijit.focus(_1081);
  18959. };
  18960. }
  18961. if(_1082&&_1081){
  18962. _1082.onblur=function(){
  18963. dijit.focus(_1081);
  18964. };
  18965. }else{
  18966. if(_1081){
  18967. _1081.onblur=function(){
  18968. dijit.focus(_1081);
  18969. };
  18970. }
  18971. }
  18972. if(this.m_oCV.getKeepFocus()!=false&&_1081&&_1081.focus){
  18973. _1081.focus();
  18974. }
  18975. },show:function(){
  18976. this.m_oCV.setVisibleDialog(this);
  18977. if(this.m_tabCatch==null){
  18978. this.initializeBackground();
  18979. }
  18980. if(this.m_dialogDiv==null){
  18981. this.initializeDialog();
  18982. }
  18983. this.m_background.setClassNameOverride("inlineDialog-background-error");
  18984. this.m_background.show();
  18985. this.m_tabCatch.style.display="block";
  18986. this.m_dialogDiv.style.display="block";
  18987. this.initializeKeyboardSupport();
  18988. },hide:function(){
  18989. this.m_oCV.setVisibleDialog(null);
  18990. if(this.onScrollHandle!=null){
  18991. dojo.disconnect(this.onScrollHandle);
  18992. this.onScrollHandle=null;
  18993. }
  18994. if(this.m_background!=null){
  18995. this.m_background.hide();
  18996. }
  18997. if(this.m_tabCatch!=null){
  18998. this.m_tabCatch.style.display="none";
  18999. }
  19000. if(this.m_dialogDiv!=null){
  19001. this.m_dialogDiv.style.display="none";
  19002. }
  19003. },destroy:function(){
  19004. this.hide();
  19005. if(this.m_dialogDiv!=null){
  19006. this.m_dialogDiv.parentNode.removeChild(this.m_dialogDiv);
  19007. this.m_dialogDiv=null;
  19008. }
  19009. if(this.m_tabCatch!=null){
  19010. this.m_tabCatch.parentNode.removeChild(this.m_tabCatch);
  19011. this.m_tabCatch=null;
  19012. }
  19013. if(this.m_background!=null){
  19014. this.m_background.destroy();
  19015. this.m_background=null;
  19016. }
  19017. },setDebugHelper:function(_1083){
  19018. var _1084=document.createElement("div");
  19019. _1084.style.zIndex="100";
  19020. _1084.style.display="block";
  19021. _1084.style.position="relative";
  19022. _1084.style.backgroundColor="#FFFFFF";
  19023. _1084.innerHTML="<table><tr><td>"+"<a href=\"#\" onclick=\""+_1083+".show();\">show</a>"+" "+"<a href=\"#\" onclick=\""+_1083+".hide();\">hide</a></td></tr></table>";
  19024. document.body.insertBefore(_1084,document.body.firstChild);
  19025. }});
  19026. dojo.provide("bux.reportViewer.Properties");
  19027. dojo.declare("bux.reportViewer.Properties",null,{iWidget:null,masterDialogSpec:null,masterDialogSpecProperties:null,flashChartSpec:null,isFlashChartOptionEnabled:true,oldProperties:null,dialogDisplayValues:null,constructor:function(_1085,_1086){
  19028. this.isInitialized=false;
  19029. this.initializeDialogDisplayValues();
  19030. this.oldProperties={};
  19031. this.iWidget=_1085;
  19032. if(_1086==="<empty>"){
  19033. return;
  19034. }
  19035. var json=dojo.eval("["+_1086+"]");
  19036. if(json&&json[0]){
  19037. this.initializeWithSavedPropertyValues(json[0]);
  19038. }
  19039. },initializeDialogDisplayValues:function(){
  19040. this.dialogDisplayValues={flashCharts:{value:null,canUndo:true,runReport:true},rowsPerPage:{value:null,canUndo:true,runReport:true},promptUserOnLoad:{value:false},retrieveAll:{value:false,refreshSavedOutput:true},showExpandCollapseIcon:{value:null}};
  19041. },clearDialogSpec:function(){
  19042. this.masterDialogSpec=null;
  19043. this.masterDialogSpecProperties=null;
  19044. },initializeWithSavedPropertyValues:function(_1088){
  19045. for(var prop in _1088){
  19046. if(typeof prop!="undefined"&&prop!=null){
  19047. if(this.dialogDisplayValues[prop]){
  19048. this.dialogDisplayValues[prop].value=_1088[prop];
  19049. }else{
  19050. this.dialogDisplayValues[prop]={value:_1088[prop],canUndo:false};
  19051. }
  19052. }
  19053. }
  19054. },setProperty:function(_108a,value){
  19055. this.dialogDisplayValues[_108a].value=value;
  19056. },getProperty:function(_108c){
  19057. if(this.dialogDisplayValues[_108c]){
  19058. return this.dialogDisplayValues[_108c].value;
  19059. }
  19060. return null;
  19061. },getOldProperty:function(_108d){
  19062. if(this.oldProperties&&this.oldProperties[_108d]){
  19063. return this.oldProperties[_108d].value;
  19064. }
  19065. return null;
  19066. },getOldProperties:function(){
  19067. var _108e={};
  19068. for(var prop in this.oldProperties){
  19069. if(this.dialogDisplayValues[prop].canUndo===true){
  19070. _108e[prop]={};
  19071. _108e[prop].value=this.oldProperties[prop].value;
  19072. }
  19073. }
  19074. return _108e;
  19075. },onGet:function(){
  19076. this.copyPropertyValues(this.dialogDisplayValues,this.oldProperties);
  19077. if(!this.masterDialogSpec){
  19078. this.initializeDialogSpec();
  19079. }else{
  19080. this.updateDialogSpec();
  19081. }
  19082. var _1090={tabTitle:this._getReportWidgetTabTitle(),properties:this.dialogDisplayValues,propertiesDialogSpec:this.masterDialogSpec};
  19083. return _1090;
  19084. },_getReportWidgetTabTitle:function(){
  19085. var _1091;
  19086. if(this.iWidget&&this.iWidget.getViewerObject()){
  19087. _1091=RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE;
  19088. }
  19089. return _1091;
  19090. },onSet:function(_1092){
  19091. if(this.isSavedOutput()){
  19092. this.updateSavedOutput();
  19093. }else{
  19094. if(!this.runReportWithNewOptions()){
  19095. this._updateReport();
  19096. }
  19097. }
  19098. },_updateReport:function(){
  19099. var _1093=this.getProperty("showExpandCollapseIcon");
  19100. if(this.getOldProperty("showExpandCollapseIcon")!=_1093){
  19101. var oCV=this.iWidget.getViewerObject();
  19102. if(_1093===true){
  19103. oCV.insertExpandIconsForAllCrosstabs();
  19104. }else{
  19105. oCV.removeExpandIconsForAllCrosstabs();
  19106. }
  19107. }
  19108. },copyPropertyValues:function(from,to){
  19109. for(var prop in from){
  19110. if(!to[prop]){
  19111. to[prop]={};
  19112. }
  19113. to[prop].value=from[prop].value;
  19114. }
  19115. },doUndo:function(_1098){
  19116. this.copyPropertyValues(_1098,this.dialogDisplayValues);
  19117. },getUndoInfo:function(){
  19118. if(!this.isInitialized){
  19119. var oCV=this.iWidget.getViewerObject();
  19120. this.initialize(oCV.envParams);
  19121. }
  19122. var _109a={};
  19123. for(var prop in this.dialogDisplayValues){
  19124. if(this.dialogDisplayValues[prop].canUndo===true){
  19125. _109a[prop]={value:this.getProperty(prop)};
  19126. }
  19127. }
  19128. return _109a;
  19129. },shouldUpdateReport:function(_109c){
  19130. for(var prop in this.dialogDisplayValues){
  19131. if(this.dialogDisplayValues[prop][_109c]==true&&this.getOldProperty(prop)!=this.getProperty(prop)){
  19132. return true;
  19133. }
  19134. }
  19135. return false;
  19136. },runReportWithNewOptions:function(){
  19137. if(this.shouldUpdateReport("runReport")){
  19138. var oCV=this.iWidget.getViewerObject();
  19139. var _109f=oCV.getAction("RunReport");
  19140. _109f.setReuseQuery(true);
  19141. _109f.execute();
  19142. this.iWidget.getUndoRedoQueue().initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":this.saveSpecForUndo()});
  19143. return true;
  19144. }
  19145. return false;
  19146. },updateSavedOutput:function(){
  19147. if(this.shouldUpdateReport("refreshSavedOutput")){
  19148. var _10a0=this.iWidget.getSavedOutput();
  19149. _10a0.setPagedOutput(!this.getRetrieveAll());
  19150. _10a0.render();
  19151. }
  19152. },toString:function(){
  19153. var str="{";
  19154. for(var prop in this.dialogDisplayValues){
  19155. var _10a3=this.getProperty(prop);
  19156. if(_10a3!=null&&typeof _10a3!=="undefined"){
  19157. if(str!="{"){
  19158. str+=", ";
  19159. }
  19160. str+="\""+prop+"\": ";
  19161. str+=(typeof (_10a3)=="string")?_10a3.toString():dojo.toJson(_10a3);
  19162. }
  19163. }
  19164. str+="}";
  19165. return str;
  19166. },isSavedOutput:function(){
  19167. return this.iWidget.getViewerObject().envParams["ui.action"]==="view";
  19168. },getUndoHint:function(){
  19169. return RV_RES.IDS_JS_WIDGET_PROPERTIES;
  19170. },saveSpecForUndo:function(){
  19171. return false;
  19172. },getRetrieveAll:function(){
  19173. return this.getProperty("retrieveAll");
  19174. },getPromptUserOnLoad:function(){
  19175. return this.getProperty("promptUserOnLoad");
  19176. },getFlashCharts:function(){
  19177. return this.getProperty("flashCharts");
  19178. },getRowsPerPage:function(){
  19179. return this.getProperty("rowsPerPage");
  19180. },getOriginalReportLocation:function(_10a4){
  19181. if(_10a4.getAttributeValue&&!_10a4.getAttributeValue("originalReport")){
  19182. return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE;
  19183. }
  19184. var _10a5=_10a4.getViewerObject().envParams["originalReportLocation"];
  19185. if(typeof _10a5=="undefined"||_10a5==null||_10a5=="Unavailable"){
  19186. return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE;
  19187. }
  19188. return (RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+_10a5);
  19189. },getShowExpandCollapseIconFlag:function(){
  19190. return this.getProperty("showExpandCollapseIcon");
  19191. },getAdvancedServerProperty:function(_10a6){
  19192. if(!this.iWidget&&!this.iWidget.getViewerObject()){
  19193. return null;
  19194. }
  19195. return this.iWidget.getViewerObject().getAdvancedServerProperty(_10a6);
  19196. },initializeShowExpandCollapseIconFlag:function(){
  19197. var _10a7=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
  19198. this.bHideExpandCollapseOption=(!_10a7);
  19199. if(this.bHideExpandCollapseOption){
  19200. return;
  19201. }
  19202. if(this.getShowExpandCollapseIconFlag()===null){
  19203. this.setProperty("showExpandCollapseIcon",_10a7.toLowerCase()==="on");
  19204. }
  19205. },initialize:function(_10a8){
  19206. if(this.isInitialized){
  19207. return;
  19208. }
  19209. this.isInitialized=true;
  19210. this.initializeFlashChartSettings(_10a8.flashChartOption);
  19211. this.initializeShowExpandCollapseIconFlag();
  19212. if(this.getRowsPerPage()==null){
  19213. if(_10a8["run.verticalElements"]!=null){
  19214. this.setProperty("rowsPerPage",_10a8["run.verticalElements"]);
  19215. }else{
  19216. this.setProperty("rowsPerPage",20);
  19217. }
  19218. }
  19219. this.initializeDialogSpec();
  19220. },createViewReportSpecLink:function(){
  19221. var oCV=this.iWidget.getViewerObject();
  19222. var _10aa=oCV.envParams["ui.spec"];
  19223. if(oCV.bCanUseReportStudio&&_10aa&&_10aa.length>0&&oCV.envParams["ui.action"]!="view"){
  19224. return {columns:[{propertyName:"viewReportSpecification",uiElementType:"link",label:RV_RES.IDS_JS_SHOW_REPORT_SPEC,eventHandler:this,onClickAction:dojo.hitch(this,this.onClickViewReportSpecification)}]};
  19225. }else{
  19226. return {};
  19227. }
  19228. },isBlackListedOption:function(_10ab){
  19229. return this.iWidget.getViewerObject().isBlacklisted(_10ab);
  19230. },createFlashChartOption:function(){
  19231. var _10ac=[{columns:[{propertyName:"flashCharts",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_FLASHCHARTS}]},{columns:[{uiElementType:"hSpacer"}]}];
  19232. return _10ac;
  19233. },getShowExpandCollapseIconOptionSpec:function(){
  19234. var spec=[{columns:[{propertyName:"showExpandCollapseIcon",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON}]},{columns:[{uiElementType:"hspacer"}]}];
  19235. return spec;
  19236. },generateDialogSpec:function(role){
  19237. var _10af;
  19238. if(role=="consume"){
  19239. _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE}]}];
  19240. this.masterDialogSpec={rows:_10af};
  19241. }else{
  19242. var _10b0=this.createViewReportSpecLink();
  19243. _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE,constraints:{min:1,max:1000},required:true,invalidMessage:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR}]},{columns:[{uiElementType:"hspacer"}]},{columns:[{propertyName:"promptUserOnLoad",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD}]},{columns:[{propertyName:"retrieveAll",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT}]},_10b0,{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]}];
  19244. if(this.isFlashChartOptionEnabled&&!this.hasAVSChart()&&role!=="consume"){
  19245. var _10b1=this.createFlashChartOption();
  19246. _10af=_10b1.concat(_10af);
  19247. }
  19248. if(!this.bHideExpandCollapseOption&&!this.isBlackListedOption("ExpandMember")){
  19249. _10af=this.getShowExpandCollapseIconOptionSpec().concat(_10af);
  19250. }
  19251. this.masterDialogSpec={rows:_10af};
  19252. }
  19253. if(this.masterDialogSpec&&this.masterDialogSpec.rows){
  19254. this.masterDialogSpecProperties={};
  19255. for(var r in this.masterDialogSpec.rows){
  19256. var row=this.masterDialogSpec.rows[r];
  19257. if(row.columns){
  19258. for(var c in row.columns){
  19259. var col=row.columns[c];
  19260. if(col.propertyName){
  19261. this.masterDialogSpecProperties[col.propertyName]=col;
  19262. }
  19263. }
  19264. }
  19265. }
  19266. }
  19267. },updateDialogSpec:function(){
  19268. if(this.masterDialogSpecProperties){
  19269. if(this.masterDialogSpecProperties.originalReportLocation){
  19270. this.masterDialogSpecProperties.originalReportLocation.label=this.getOriginalReportLocation(this.iWidget);
  19271. }
  19272. }
  19273. },initializeDialogSpec:function(){
  19274. var _10b6=this.iWidget.getUserRole();
  19275. this.generateDialogSpec(_10b6);
  19276. },hasAVSChart:function(){
  19277. if(this.iWidget==null||typeof this.iWidget.getViewerObject()=="undefined"){
  19278. return false;
  19279. }
  19280. var oCV=this.iWidget.getViewerObject();
  19281. if(typeof oCV=="undefined"){
  19282. return false;
  19283. }
  19284. return oCV.hasAVSChart();
  19285. },initializeFlashChartSettings:function(value){
  19286. if(!value){
  19287. return;
  19288. }
  19289. var json=(typeof value==="string")?(eval(value)):value;
  19290. var _10ba=json[0];
  19291. this.setProperty("flashCharts",_10ba.defaultValue);
  19292. this.isFlashChartOptionEnabled=!_10ba.isOptionDisabled;
  19293. },onClickViewReportSpecification:function(){
  19294. var _10bb=this.iWidget.getViewerObject().envParams["ui.spec"];
  19295. this._viewSpecInWindow(_10bb);
  19296. },_getWindowOptions:function(w,h){
  19297. var _10be="resizable=yes,scrollbars=yes,menubar=no,directories=no,location=no,status=no,toolbar=no,titlebar=no";
  19298. var left=(screen.width-w)/2;
  19299. var top=(screen.height-h)/2;
  19300. _10be+=",top="+top;
  19301. _10be+=",left="+left;
  19302. _10be+=",width="+w;
  19303. _10be+=",height="+h;
  19304. return _10be;
  19305. },_viewSpecInWindow:function(_10c1){
  19306. var _10c2=dijit.getViewport();
  19307. var _10c3="debugWindow"+this.iWidget.getViewerObject().getId();
  19308. var _10c4=this._getWindowOptions(_10c2.w,_10c2.h);
  19309. var _10c5=window.open("",_10c3,_10c4);
  19310. var head="<html><body><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"+"<tbody><tr><td>"+"<textarea wrap=\"off\" style=\"font-family:arial; font-size: 10px; overflow: auto; width:100%; height:";
  19311. head+=_10c2.h*0.95;
  19312. head+="px;\">";
  19313. var tail="</textarea></td></tr></tbody></table></body></html>";
  19314. _10c5.document.write(head+html_encode(_10c1)+tail);
  19315. }});
  19316. dojo.require("bux.reportViewer.Properties");
  19317. dojo.provide("ActiveReportIWidgetProperties");
  19318. dojo.declare("ActiveReportIWidgetProperties",[bux.reportViewer.Properties],{initializeDialogDisplayValues:function(){
  19319. this.dialogDisplayValues={activeReportState:{value:null,canUndo:false,runReport:false}};
  19320. },getActiveReportState:function(){
  19321. return this.getProperty("activeReportState");
  19322. },setActiveReportState:function(_10c8){
  19323. this.setProperty("activeReportState",_10c8);
  19324. },initialize:function(_10c9){
  19325. if(this.isInitialized){
  19326. return;
  19327. }
  19328. this.isInitialized=true;
  19329. this.initializeDialogSpec();
  19330. },initializeDialogSpec:function(){
  19331. var _10ca=[{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]},{columns:[{propertyName:"ActiveReportOutputVersion",uiElementType:"text",label:this._getAcitveReportOutputVersion(this.iWidget),allowWrapping:true}]}];
  19332. if(this.iWidget.isDebugMode()){
  19333. _10ca.push({columns:[{propertyName:"PublicVariables",uiElementType:"text",label:this._getPublicVariableNames(this.iWidget),allowWrapping:true}]});
  19334. }
  19335. this.masterDialogSpec={rows:_10ca};
  19336. },_getAcitveReportOutputVersion:function(_10cb){
  19337. var _10cc=_10cb.getActiveReportOutputVersion();
  19338. if(_10cc==null){
  19339. _10cc=RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE;
  19340. }
  19341. return (RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION+" "+_10cc);
  19342. },_getPublicVariableNames:function(_10cd){
  19343. var _10ce=_10cd.getPublicVariableNames();
  19344. var _10cf="";
  19345. for(var name in _10ce){
  19346. var sType=_10ce[name];
  19347. if(_10cf.length>0){
  19348. _10cf+=", ";
  19349. }
  19350. _10cf+=name;
  19351. _10cf+=(sType==="D")?" (Discrete)":"(Range)";
  19352. }
  19353. if(_10cf.length>0){
  19354. _10cf="Public Variables: "+_10cf;
  19355. }
  19356. return _10cf;
  19357. },_getReportWidgetTabTitle:function(){
  19358. var _10d2;
  19359. if(this.iWidget&&this.iWidget.getViewerObject()){
  19360. _10d2=RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE;
  19361. }
  19362. return _10d2;
  19363. }});
  19364. function RAPReportInfo(_10d3,oCV){
  19365. this.m_reportInfoJSON=_10d3;
  19366. this.m_containerInfoJSON={};
  19367. this.m_iContainerCount=0;
  19368. this.m_bPromptPart=null;
  19369. this.m_bSingleContainer=null;
  19370. this.m_bDetailFilteringDisabled=null;
  19371. this.m_aDrilledOnHUNs=null;
  19372. this.m_bPassTrackingToBUA=null;
  19373. this.m_sDisplayTypes=null;
  19374. this.m_bContainsInteractiveDataContainer=null;
  19375. this.m_bContainsFilters=false;
  19376. this.m_bContainsSlider=false;
  19377. this.m_referenceInfoObject={};
  19378. this.initializeContainerInfo();
  19379. this._addNonVisibleReferences(this.m_reportInfoJSON.reportLevelProperties);
  19380. this._populateHun(oCV);
  19381. };
  19382. RAPReportInfo.prototype.initializeContainerInfo=function(){
  19383. if(this.m_reportInfoJSON){
  19384. var _10d5=this.m_reportInfoJSON.containers;
  19385. if(_10d5){
  19386. this.m_iContainerCount=_10d5.length;
  19387. for(var _10d6=0;_10d6<this.m_iContainerCount;++_10d6){
  19388. var _10d7=_10d5[_10d6].container;
  19389. this.m_containerInfoJSON[_10d7]=_10d5[_10d6];
  19390. this.m_containerInfoJSON[_10d7].m_itemInfoJSON=this._initializeItemInfo(_10d5[_10d6].itemInfo);
  19391. this.m_containerInfoJSON[_10d7].m_drillabilityJSON=this._initializeDrillability(_10d5[_10d6].drillability);
  19392. this._addFilterReferences(_10d5[_10d6].filter);
  19393. this._addSliderReferences(_10d5[_10d6].sliders);
  19394. this.m_containerInfoJSON[_10d7].layoutIndex=_10d6;
  19395. if(_10d5[_10d6].filter){
  19396. this.m_bContainsFilters=true;
  19397. }
  19398. if(_10d5[_10d6].sliders){
  19399. this.m_bContainsSlider=true;
  19400. }
  19401. }
  19402. }
  19403. }
  19404. };
  19405. RAPReportInfo.prototype._initializeItemInfo=function(_10d8){
  19406. var _10d9={};
  19407. for(var idx in _10d8){
  19408. _10d9[_10d8[idx].item]=_10d8[idx];
  19409. this.m_referenceInfoObject[_10d8[idx].item]=true;
  19410. }
  19411. return _10d9;
  19412. };
  19413. RAPReportInfo.prototype._initializeDrillability=function(_10db){
  19414. var _10dc={};
  19415. for(var idx in _10db){
  19416. _10dc[_10db[idx].item]=_10db[idx];
  19417. this.m_referenceInfoObject[_10db[idx].item]=true;
  19418. }
  19419. return _10dc;
  19420. };
  19421. RAPReportInfo.prototype._addFilterReferences=function(_10de){
  19422. for(var idx in _10de){
  19423. this.m_referenceInfoObject[_10de[idx].item]=true;
  19424. if(_10de[idx].type==="contextSlice"&&_10de[idx].hierarchyName){
  19425. this.m_referenceInfoObject[_10de[idx].hierarchyName]=true;
  19426. }
  19427. }
  19428. };
  19429. RAPReportInfo.prototype._addSliderReferences=function(_10e0){
  19430. for(var idx in _10e0){
  19431. this.m_referenceInfoObject[_10e0[idx].name]=true;
  19432. }
  19433. };
  19434. RAPReportInfo.prototype._addNonVisibleReferences=function(_10e2){
  19435. if(_10e2&&_10e2.nonVisibleFiltersMemberItemInfo){
  19436. for(var i=0;i<_10e2.nonVisibleFiltersMemberItemInfo.length;i++){
  19437. this.m_referenceInfoObject[_10e2.nonVisibleFiltersMemberItemInfo[i]]=true;
  19438. }
  19439. }
  19440. };
  19441. RAPReportInfo.prototype.isReferenced=function(item){
  19442. return (this.m_referenceInfoObject[item])?true:false;
  19443. };
  19444. RAPReportInfo.prototype.getDrillability=function(_10e5,_10e6){
  19445. if(!_10e6){
  19446. return this.m_containerInfoJSON[_10e5].m_drillabilityJSON;
  19447. }else{
  19448. return this.m_containerInfoJSON[_10e5].m_drillabilityJSON[_10e6];
  19449. }
  19450. };
  19451. RAPReportInfo.prototype.getContainers=function(){
  19452. return this.m_containerInfoJSON;
  19453. };
  19454. RAPReportInfo.prototype.getContainer=function(lid){
  19455. return this.m_containerInfoJSON[lid];
  19456. };
  19457. RAPReportInfo.prototype.getContainerIds=function(_10e8){
  19458. var _10e9=[];
  19459. for(containerName in this.m_containerInfoJSON){
  19460. var _10ea=this.m_containerInfoJSON[containerName];
  19461. if(_10ea&&_10ea.displayTypeId==_10e8){
  19462. _10e9.push(_10ea.container);
  19463. }
  19464. }
  19465. return _10e9;
  19466. };
  19467. RAPReportInfo.prototype.getContainerFromPos=function(iPos){
  19468. return this.m_reportInfoJSON.containers[iPos];
  19469. };
  19470. RAPReportInfo.prototype.getReportLevelProperties=function(){
  19471. return this.m_reportInfoJSON.reportLevelProperties;
  19472. };
  19473. RAPReportInfo.prototype.getItemInfo=function(_10ec,_10ed){
  19474. if(!_10ed){
  19475. return this.m_containerInfoJSON[_10ec].m_itemInfoJSON;
  19476. }
  19477. if(this.m_containerInfoJSON[_10ec]){
  19478. return this.m_containerInfoJSON[_10ec].m_itemInfoJSON[_10ed];
  19479. }
  19480. return null;
  19481. };
  19482. RAPReportInfo.prototype.isReportLevel_nonVisibleFilterItem=function(_10ee){
  19483. if(_10ee&&_10ee.length>0){
  19484. var _10ef=this.m_reportInfoJSON.reportLevelProperties;
  19485. if(_10ef){
  19486. if(_10ef&&_10ef.nonVisibleFiltersMemberItemInfo){
  19487. for(var i=0;i<_10ef.nonVisibleFiltersMemberItemInfo.length;i++){
  19488. if(_10ee===_10ef.nonVisibleFiltersMemberItemInfo[i]){
  19489. return true;
  19490. }
  19491. }
  19492. }
  19493. }
  19494. }
  19495. return false;
  19496. };
  19497. RAPReportInfo.prototype.isChildContainer=function(lid){
  19498. return ((this.m_containerInfoJSON[lid]&&this.m_containerInfoJSON[lid].parentContainer)?true:false);
  19499. };
  19500. RAPReportInfo.prototype.getItemDetails=function(_10f2,sHun){
  19501. var obj=null;
  19502. for(var lid in this.m_containerInfoJSON){
  19503. var oItem=this.getItemInfo(lid,_10f2);
  19504. if(oItem&&oItem.hun===sHun){
  19505. obj={};
  19506. obj.item=oItem.item;
  19507. if(oItem.hun){
  19508. obj.hun=oItem.hun;
  19509. }
  19510. obj.lid=lid;
  19511. obj.queryName=oItem.queryName;
  19512. break;
  19513. }
  19514. }
  19515. return (obj)?obj:null;
  19516. };
  19517. RAPReportInfo.prototype.getItemDetailsByHun=function(sHun){
  19518. var _10f8=null;
  19519. for(var lid in this.m_containerInfoJSON){
  19520. var _10fa=this.getItemInfo(lid);
  19521. for(var sName in _10fa){
  19522. var oItem=_10fa[sName];
  19523. if(oItem.hun===sHun){
  19524. _10f8=sName;
  19525. break;
  19526. }
  19527. }
  19528. }
  19529. return (_10f8?this.getItemDetails(_10f8,sHun):null);
  19530. };
  19531. RAPReportInfo.prototype._populateHun=function(oCV){
  19532. if(oCV){
  19533. var _10fe=oCV.getSelectionController().getCCDManager();
  19534. var _10ff=oCV.envParams;
  19535. var _1100=oCV.getRAPReportInfo();
  19536. var _1101=false;
  19537. for(var lid in this.m_containerInfoJSON){
  19538. var _1103=this.m_containerInfoJSON[lid].m_itemInfoJSON;
  19539. for(var _1104 in _1103){
  19540. var oItem=_1103[_1104];
  19541. if(oItem.hun){
  19542. continue;
  19543. }
  19544. var sHun=this.getHUNForItem(oItem,_10fe,lid,_1100);
  19545. if(sHun){
  19546. oItem.hun=sHun;
  19547. _1101=true;
  19548. }
  19549. }
  19550. }
  19551. if(_1101&&typeof JSON!="undefined"&&JSON!=null&&JSON.stringify){
  19552. _10ff["rapReportInfo"]=JSON.stringify(this.m_reportInfoJSON);
  19553. }
  19554. }
  19555. };
  19556. RAPReportInfo.prototype.getHUNForItem=function(oItem,_1108,lid,_110a){
  19557. var sHun=this.getHUNFromCCDManager(_1108,oItem);
  19558. var _110c=null;
  19559. if(!sHun&&_110a){
  19560. _110c=_110a.getItemInfo(lid,oItem.item);
  19561. if(_110c){
  19562. sHun=_110c.hun;
  19563. }
  19564. }
  19565. return sHun;
  19566. };
  19567. RAPReportInfo.prototype.getHUNFromCCDManager=function(_110d,oItem){
  19568. var _110f={};
  19569. var sHUN=null;
  19570. var _1111=this._findQueryMetadataId(_110d,_110f,oItem.queryName);
  19571. if(_1111){
  19572. sHUN=_110d.GetHUNForRDI(oItem.item,_1111);
  19573. }
  19574. return sHUN;
  19575. };
  19576. RAPReportInfo.prototype._findQueryMetadataId=function(_1112,oMap,_1114){
  19577. if(oMap[_1114]){
  19578. return oMap[_1114];
  19579. }
  19580. var ctxId=_1112.GetMetadataIdForQueryName(_1114);
  19581. if(ctxId){
  19582. oMap[_1114]=ctxId;
  19583. return ctxId;
  19584. }
  19585. return null;
  19586. };
  19587. RAPReportInfo.prototype.isPromptPart=function(){
  19588. if(this.m_bPromptPart===null){
  19589. if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.promptWidget===true){
  19590. this.m_bPromptPart=true;
  19591. }else{
  19592. this.m_bPromptPart=false;
  19593. }
  19594. }
  19595. return this.m_bPromptPart;
  19596. };
  19597. RAPReportInfo.prototype.getContainerCount=function(){
  19598. return this.m_iContainerCount;
  19599. };
  19600. RAPReportInfo.prototype.isSingleContainer=function(){
  19601. if(this.m_bSingleContainer===null){
  19602. if(this.m_iContainerCount===1&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.singleContainerReport===true){
  19603. this.m_bSingleContainer=true;
  19604. }else{
  19605. this.m_bSingleContainer=false;
  19606. }
  19607. }
  19608. return this.m_bSingleContainer;
  19609. };
  19610. RAPReportInfo.prototype.isDetailFilteringDisabled=function(){
  19611. if(this.m_bDetailFilteringDisabled===null){
  19612. if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.detailFilteringDisabled===true){
  19613. this.m_bDetailFilteringDisabled=true;
  19614. }else{
  19615. this.m_bDetailFilteringDisabled=false;
  19616. }
  19617. }
  19618. return this.m_bDetailFilteringDisabled;
  19619. };
  19620. RAPReportInfo.prototype.getPassTrackingtoBUA=function(){
  19621. if(this.m_bPassTrackingToBUA===null){
  19622. if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.shouldNotPassTrackingtoBUA===true){
  19623. this.m_bPassTrackingToBUA=false;
  19624. }else{
  19625. this.m_bPassTrackingToBUA=true;
  19626. }
  19627. }
  19628. return this.m_bPassTrackingToBUA;
  19629. };
  19630. RAPReportInfo.prototype.getDrilledOnHUNs=function(){
  19631. if(!this.m_aDrilledOnHUNs&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs){
  19632. this.m_aDrilledOnHUNs=this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs;
  19633. }
  19634. return this.m_aDrilledOnHUNs;
  19635. };
  19636. RAPReportInfo.prototype.getDisplayTypes=function(_1116){
  19637. if(this.m_sDisplayTypes===null||_1116){
  19638. var _1117="";
  19639. var _1118=[];
  19640. for(var lid in this.m_containerInfoJSON){
  19641. if(!_1116||lid!=_1116){
  19642. _1118.push(this.m_containerInfoJSON[lid].displayTypeId);
  19643. }
  19644. }
  19645. _1117=_1118.join(",");
  19646. if(_1117==""&&this.isPromptPart()){
  19647. _1117="promptWidget";
  19648. }
  19649. if(!_1116){
  19650. this.m_sDisplayTypes=_1117;
  19651. }
  19652. return _1117;
  19653. }
  19654. return this.m_sDisplayTypes;
  19655. };
  19656. RAPReportInfo.prototype.isChart=function(lid){
  19657. var id=lid.toLowerCase();
  19658. return id!="mapchart"&&id.match("chart$")=="chart";
  19659. };
  19660. RAPReportInfo.prototype.isViz=function(lid){
  19661. if(this.m_containerInfoJSON[lid]){
  19662. var _111d=this.m_containerInfoJSON[lid].displayTypeId;
  19663. if(_111d){
  19664. return (_111d.toLowerCase()=="viz");
  19665. }
  19666. }
  19667. return false;
  19668. };
  19669. RAPReportInfo.prototype.isInteractiveDataContainer=function(lid){
  19670. var _111f=false;
  19671. if(this.m_containerInfoJSON[lid]){
  19672. var _1120=this.m_containerInfoJSON[lid].displayTypeId;
  19673. if(_1120){
  19674. var id=_1120.toLowerCase();
  19675. _111f=id=="crosstab"||id=="list"||id=="viz"||this.isChart(id);
  19676. }
  19677. }
  19678. return _111f;
  19679. };
  19680. RAPReportInfo.prototype.containsInteractiveDataContainer=function(){
  19681. if(this.m_bContainsInteractiveDataContainer==null){
  19682. this.m_bContainsInteractiveDataContainer=false;
  19683. for(var lid in this.m_containerInfoJSON){
  19684. if(this.isInteractiveDataContainer(lid)){
  19685. this.m_bContainsInteractiveDataContainer=true;
  19686. break;
  19687. }
  19688. }
  19689. }
  19690. return this.m_bContainsInteractiveDataContainer;
  19691. };
  19692. RAPReportInfo.prototype.containsFilters=function(){
  19693. return this.m_bContainsFilters;
  19694. };
  19695. RAPReportInfo.prototype.getFilterObject=function(_1123,_1124){
  19696. for(var lid in this.m_containerInfoJSON){
  19697. var _1126=this.getFilterObjectFromContainer(lid,_1123,_1124);
  19698. if(_1126){
  19699. return _1126;
  19700. }
  19701. }
  19702. return null;
  19703. };
  19704. RAPReportInfo.prototype.getFilterObjectFromContainer=function(lid,_1128,_1129){
  19705. var _112a=this.m_containerInfoJSON[lid];
  19706. if(_112a&&_112a.filter){
  19707. var _112b=_112a.filter.length;
  19708. for(var i=0;i<_112b;++i){
  19709. var _112d=_112a.filter[i];
  19710. if(_1128==_112d.item){
  19711. if(!_1129||(_112d.itemLabel&&_112d.itemLabel.length>0)){
  19712. return _112d;
  19713. }
  19714. }
  19715. }
  19716. }
  19717. return null;
  19718. };
  19719. RAPReportInfo.prototype.hunHasFilterOrSlider=function(_112e){
  19720. if(!_112e){
  19721. return null;
  19722. }
  19723. for(var lid in this.m_containerInfoJSON){
  19724. var _1130=this.m_containerInfoJSON[lid];
  19725. if(_1130&&_1130.filter){
  19726. var _1131=_1130.filter.length;
  19727. for(var i=0;i<_1131;++i){
  19728. var _1133=_1130.filter[i];
  19729. if(_1133.HUN&&_112e.indexOf(_1133.HUN)==0){
  19730. return _1133.item;
  19731. }
  19732. }
  19733. }
  19734. if(_1130&&_1130.sliders){
  19735. var _1131=_1130.sliders.length;
  19736. for(var i=0;i<_1131;++i){
  19737. var _1134=_1130.sliders[i];
  19738. if(_1134.hun&&_112e.indexOf(_1134.hun)==0){
  19739. return _1134.name;
  19740. }
  19741. }
  19742. }
  19743. }
  19744. return null;
  19745. };
  19746. RAPReportInfo.prototype.hasSlider=function(){
  19747. return this.m_bContainsSlider;
  19748. };
  19749. RAPReportInfo.prototype.collectSliderSetFromReportInfo=function(){
  19750. var _1135={};
  19751. for(var lid in this.m_containerInfoJSON){
  19752. var _1137=this.m_containerInfoJSON[lid].sliders;
  19753. if(_1137){
  19754. for(var _1138=0;_1138<_1137.length;++_1138){
  19755. var _1139=_1137[_1138].clientId;
  19756. _1135[_1139]=_1137[_1138];
  19757. }
  19758. }
  19759. }
  19760. return _1135;
  19761. };
  19762. RAPReportInfo.prototype._getEventTimings=function(){
  19763. return (this.m_reportInfoJSON&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.eventTimings)?this.m_reportInfoJSON.reportLevelProperties.eventTimings:null;
  19764. };
  19765. RAPReportInfo.prototype.destroy=function(){
  19766. GUtil.destroyProperties(this);
  19767. };
  19768. function DelayedLoadingContext(id){
  19769. this.widgetid=id;
  19770. this.m_promptValues=null;
  19771. };
  19772. DelayedLoadingContext.prototype.setPromptValues=function(_113b){
  19773. if(_113b===null){
  19774. this.m_promptValues=null;
  19775. return;
  19776. }
  19777. if(!this.m_promptValues){
  19778. this.m_promptValues={};
  19779. }
  19780. applyJSONProperties(this.m_promptValues,_113b);
  19781. };
  19782. DelayedLoadingContext.prototype.getPromptValues=function(){
  19783. return this.m_promptValues;
  19784. };
  19785. DelayedLoadingContext.prototype.setForceRunReport=function(_113c){
  19786. this.m_forceRunReport=_113c;
  19787. };
  19788. DelayedLoadingContext.prototype.getForceRunReport=function(){
  19789. return this.m_forceRunReport;
  19790. };
  19791. DelayedLoadingContext.prototype.isEmpty=function(){
  19792. return !(this.m_promptValues||this.m_forceRunReport);
  19793. };
  19794. DelayedLoadingContext.prototype.reset=function(){
  19795. delete (this.m_promptValues);
  19796. this.m_promptValues=null;
  19797. this.m_forceRunReport=false;
  19798. delete (this._cascadingPromptParamsToClear);
  19799. };
  19800. DelayedLoadingContext.prototype.setCascadingPromptParamsToClear=function(_113d){
  19801. this._cascadingPromptParamsToClear=_113d;
  19802. };
  19803. DelayedLoadingContext.prototype.getCascadingPromptParamsToClear=function(){
  19804. return this._cascadingPromptParamsToClear;
  19805. };
  19806. function ViewerLoadManager(_113e){
  19807. this.m_oWidget=_113e;
  19808. this.m_oDelayedLoadingContext=new DelayedLoadingContext();
  19809. this.m_aQueue=[];
  19810. this.m_fOnEmptyCallback=null;
  19811. this.m_bPendingRequest=false;
  19812. this.m_bViewerLoadInitiated=false;
  19813. this.m_bCanRunReports=false;
  19814. };
  19815. ViewerLoadManager.prototype.viewerLoadInitiated=function(){
  19816. this.m_bViewerLoadInitiated=true;
  19817. };
  19818. ViewerLoadManager.prototype.isViewerLoadInitiated=function(){
  19819. return this.m_bViewerLoadInitiated;
  19820. };
  19821. ViewerLoadManager.prototype.canRunReports=function(){
  19822. return this.m_bCanRunReports;
  19823. };
  19824. ViewerLoadManager.prototype.runningReport=function(){
  19825. if(!this.m_bCanRunReports){
  19826. this._queue({fCallback:dojo.hitch(this,function(){
  19827. this.m_bCanRunReports=true;
  19828. return false;
  19829. })});
  19830. }
  19831. };
  19832. ViewerLoadManager.prototype.isViewerReady=function(){
  19833. if(!this.isViewerLoaded()){
  19834. return false;
  19835. }
  19836. if(!this._isEmpty()||this.m_fOnEmptyCallback||this.m_bPendingRequest){
  19837. return false;
  19838. }
  19839. return true;
  19840. };
  19841. ViewerLoadManager.prototype.isViewerLoaded=function(){
  19842. var oCV=this.m_oWidget.getViewerObject();
  19843. if(!oCV){
  19844. return false;
  19845. }
  19846. if(this.m_oWidget.isLiveReport()){
  19847. var _1140=oCV.getStatus();
  19848. return _1140==="complete"||_1140==="prompting"||_1140==="fault";
  19849. }
  19850. return true;
  19851. };
  19852. ViewerLoadManager.prototype.runWhenHasViewer=function(f,_1142){
  19853. if(this.isViewerReady()){
  19854. this._run(f);
  19855. return true;
  19856. }else{
  19857. var _1143={fCallback:f};
  19858. if(_1142){
  19859. _1143.sGroupId=_1142;
  19860. }
  19861. this._queue(_1143);
  19862. if(!this.m_bViewerLoadInitiated){
  19863. this.getDelayedLoadingContext().setForceRunReport(true);
  19864. this.m_oWidget.setRunReportOption(false);
  19865. this.m_oWidget.postReport(null);
  19866. }
  19867. return false;
  19868. }
  19869. };
  19870. ViewerLoadManager.prototype.processQueue=function(){
  19871. this.m_bPendingRequest=false;
  19872. var _1144=false;
  19873. while(!_1144&&!this._isEmpty()){
  19874. var _1145=this.m_aQueue.shift();
  19875. while(_1145.sGroupId&&!this._isEmpty()&&this.m_aQueue[0].sGroupId===_1145.sGroupId){
  19876. _1145=this.m_aQueue.shift();
  19877. }
  19878. _1144=this._run(_1145.fCallback);
  19879. }
  19880. if(this._isEmpty()&&!_1144&&this.m_fOnEmptyCallback){
  19881. var _1146=this.m_fOnEmptyCallback;
  19882. this.m_fOnEmptyCallback=null;
  19883. _1146();
  19884. }
  19885. };
  19886. ViewerLoadManager.prototype._run=function(f){
  19887. var _1148=f.call();
  19888. if(_1148){
  19889. this.m_bPendingRequest=true;
  19890. }
  19891. return _1148;
  19892. };
  19893. ViewerLoadManager.prototype._isEmpty=function(){
  19894. return !this.m_aQueue.length;
  19895. };
  19896. ViewerLoadManager.prototype._queue=function(_1149){
  19897. this.m_aQueue.push(_1149);
  19898. };
  19899. ViewerLoadManager.prototype.setOnEmptyCallback=function(_114a){
  19900. this.m_fOnEmptyCallback=_114a;
  19901. };
  19902. ViewerLoadManager.prototype.getDelayedLoadingContext=function(){
  19903. return this.m_oDelayedLoadingContext;
  19904. };
  19905. function XmlHttpObject(){
  19906. this.m_formFields=new CDictionary();
  19907. this.xmlHttp=XmlHttpObject.createRequestObject();
  19908. this.m_requestIndicator=null;
  19909. this.m_httpCallbacks={};
  19910. this.m_asynch=true;
  19911. this.m_headers=null;
  19912. };
  19913. XmlHttpObject.prototype.setHeaders=function(_114b){
  19914. this.m_headers=_114b;
  19915. };
  19916. XmlHttpObject.prototype.getHeaders=function(){
  19917. return this.m_headers;
  19918. };
  19919. XmlHttpObject.prototype.newRequest=function(){
  19920. var _114c=new XmlHttpObject();
  19921. _114c.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  19922. this.executeHttpCallback("newRequest");
  19923. return _114c;
  19924. };
  19925. XmlHttpObject.prototype.abortHttpRequest=function(){
  19926. if(this.xmlHttp!=null){
  19927. this.xmlHttp.abort();
  19928. this.xmlHttp=null;
  19929. this.executeHttpCallback("cancel");
  19930. this.m_httpCallbacks={};
  19931. }
  19932. };
  19933. XmlHttpObject.prototype.cancel=function(){
  19934. this.abortHttpRequest();
  19935. };
  19936. XmlHttpObject.prototype.executeHttpCallback=function(_114d){
  19937. if(this.m_httpCallbacks&&this.m_httpCallbacks[_114d]){
  19938. var _114e=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
  19939. var _114f=GUtil.generateCallback(this.m_httpCallbacks[_114d].method,_114e,this.m_httpCallbacks[_114d].object);
  19940. _114f();
  19941. return true;
  19942. }
  19943. return false;
  19944. };
  19945. XmlHttpObject.prototype.setCallbacks=function(_1150){
  19946. if(!this.m_httpCallbacks){
  19947. this.m_httpCallbacks={};
  19948. }
  19949. for(callback in _1150){
  19950. this.m_httpCallbacks[callback]=_1150[callback];
  19951. }
  19952. };
  19953. XmlHttpObject.prototype.getCallbacks=function(){
  19954. return this.m_httpCallbacks;
  19955. };
  19956. XmlHttpObject.createRequestObject=function(){
  19957. var _1151=null;
  19958. if(window.XMLHttpRequest){
  19959. _1151=new XMLHttpRequest();
  19960. }else{
  19961. if(window.ActiveXObject){
  19962. _1151=new ActiveXObject("Msxml2.XMLHTTP");
  19963. }else{
  19964. }
  19965. }
  19966. return _1151;
  19967. };
  19968. XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
  19969. var _1152=this.xmlHttp;
  19970. if(_1152&&_1152.readyState===4){
  19971. if(_1152.status===200){
  19972. this.httpSuccess();
  19973. }else{
  19974. this.httpError();
  19975. }
  19976. }else{
  19977. }
  19978. };
  19979. XmlHttpObject.prototype.init=function(_1153,_1154,url,_1156){
  19980. this.m_action=_1153;
  19981. this.m_gateway=_1154;
  19982. this.m_url=url;
  19983. this.m_asynch=_1156;
  19984. };
  19985. XmlHttpObject.prototype.httpSuccess=function(){
  19986. this.executeHttpCallback("postHttpRequest");
  19987. this.executeHttpCallback("entryComplete");
  19988. this.executeHttpCallback("complete");
  19989. this.m_httpCallbacks=null;
  19990. };
  19991. XmlHttpObject.prototype.httpError=function(){
  19992. this.executeHttpCallback("entryFault");
  19993. this.executeHttpCallback("fault");
  19994. this.m_httpCallbacks=null;
  19995. };
  19996. XmlHttpObject.prototype.forceSynchronous=function(){
  19997. this.m_asynch=false;
  19998. };
  19999. XmlHttpObject.prototype.sendRequest=function(){
  20000. this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
  20001. };
  20002. XmlHttpObject.prototype.sendHtmlRequest=function(_1157,_1158,url,async){
  20003. var _115b=this.xmlHttp;
  20004. if(_115b){
  20005. _115b.open(_1157,_1158,async);
  20006. if(async){
  20007. _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  20008. }else{
  20009. _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
  20010. if(!isIE()){
  20011. _115b.onload=GUtil.generateCallback(this.httpSuccess,[],this);
  20012. _115b.onerror=GUtil.generateCallback(this.httpError,[],this);
  20013. }
  20014. }
  20015. _115b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  20016. if(this.m_headers){
  20017. for(header in this.m_headers){
  20018. _115b.setRequestHeader(header,this.m_headers[header]);
  20019. }
  20020. }
  20021. this.executeHttpCallback("preHttpRequest");
  20022. var _115c=this.convertFormFieldsToUrl();
  20023. if(url){
  20024. _115c+=url;
  20025. }
  20026. _115b.send(_115c);
  20027. }
  20028. };
  20029. XmlHttpObject.prototype.getResponseXml=function(){
  20030. return (this.xmlHttp)?this.xmlHttp.responseXML:null;
  20031. };
  20032. XmlHttpObject.prototype.getResponseText=function(){
  20033. return (this.xmlHttp)?this.xmlHttp.responseText:"";
  20034. };
  20035. XmlHttpObject.prototype.getResponseHeader=function(item){
  20036. return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null;
  20037. };
  20038. XmlHttpObject.prototype.getStatus=function(){
  20039. return this.xmlHttp.status;
  20040. };
  20041. XmlHttpObject.prototype.addFormField=function(name,value){
  20042. this.m_formFields.add(name,value);
  20043. };
  20044. XmlHttpObject.prototype.getFormFields=function(){
  20045. return this.m_formFields;
  20046. };
  20047. XmlHttpObject.prototype.getFormField=function(_1160){
  20048. return this.m_formFields.get(_1160);
  20049. };
  20050. XmlHttpObject.prototype.clearFormFields=function(){
  20051. this.m_formFields=new CDictionary();
  20052. };
  20053. XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
  20054. var url="";
  20055. var _1162=this.m_formFields.keys();
  20056. for(var index=0;index<_1162.length;index++){
  20057. if(index>0){
  20058. url+="&";
  20059. }
  20060. url+=encodeURIComponent(_1162[index])+"="+encodeURIComponent(this.m_formFields.get(_1162[index]));
  20061. }
  20062. return url;
  20063. };
  20064. XmlHttpObject.prototype.concatResponseArguments=function(_1164){
  20065. var _1165=[this];
  20066. if(_1164){
  20067. _1165=_1165.concat(_1164);
  20068. }
  20069. return _1165;
  20070. };
  20071. function AsynchRequest(_1166,_1167){
  20072. AsynchRequest.baseConstructor.call(this);
  20073. this.m_gateway=_1166;
  20074. this.m_webContentRoot=_1167;
  20075. this.m_callbacks={};
  20076. this.m_soapFault=null;
  20077. this.m_faultDialog=null;
  20078. this.m_promptDialog=null;
  20079. this.m_logonDialog=null;
  20080. };
  20081. AsynchRequest.prototype=new XmlHttpObject();
  20082. AsynchRequest.baseConstructor=XmlHttpObject;
  20083. AsynchRequest.prototype.parent=XmlHttpObject.prototype;
  20084. AsynchRequest.prototype.getTracking=function(){
  20085. return "";
  20086. };
  20087. AsynchRequest.prototype.getConversation=function(){
  20088. return "";
  20089. };
  20090. AsynchRequest.prototype.getPrimaryAction=function(){
  20091. return "";
  20092. };
  20093. AsynchRequest.prototype.getActionState=function(){
  20094. return "";
  20095. };
  20096. AsynchRequest.prototype.getAsynchStatus=function(){
  20097. return "";
  20098. };
  20099. AsynchRequest.prototype.getResult=function(){
  20100. return null;
  20101. };
  20102. AsynchRequest.prototype.getSoapFault=function(){
  20103. return this.m_soapFault;
  20104. };
  20105. AsynchRequest.prototype.constructFaultEnvelope=function(){
  20106. return null;
  20107. };
  20108. AsynchRequest.prototype.getPromptHTMLFragment=function(){
  20109. return "";
  20110. };
  20111. AsynchRequest.prototype.isRAPWaitTrue=function(){
  20112. return false;
  20113. };
  20114. AsynchRequest.prototype.getRAPRequestCache=function(){
  20115. return null;
  20116. };
  20117. AsynchRequest.prototype.getMainConversation=function(){
  20118. return null;
  20119. };
  20120. AsynchRequest.prototype.getMainTracking=function(){
  20121. return null;
  20122. };
  20123. AsynchRequest.prototype.construct=function(){
  20124. };
  20125. AsynchRequest.prototype.executeCallback=function(_1168){
  20126. if(this.m_callbacks[_1168]){
  20127. var _1169=this.concatResponseArguments(this.m_callbacks.customArguments);
  20128. var _116a=GUtil.generateCallback(this.m_callbacks[_1168].method,_1169,this.m_callbacks[_1168].object);
  20129. _116a();
  20130. return true;
  20131. }
  20132. return false;
  20133. };
  20134. AsynchRequest.prototype.setCallbacks=function(_116b){
  20135. if(!this.m_callbacks){
  20136. this.m_callbacks={};
  20137. }
  20138. for(callback in _116b){
  20139. this.m_callbacks[callback]=_116b[callback];
  20140. }
  20141. };
  20142. AsynchRequest.prototype.getCallbacks=function(){
  20143. return this.m_callbacks;
  20144. };
  20145. AsynchRequest.prototype.newRequest=function(){
  20146. var _116c=this.construct();
  20147. _116c.setHeaders(this.getHeaders());
  20148. if(this.getFormFields().exists("b_action")){
  20149. _116c.addFormField("b_action",this.getFormField("b_action"));
  20150. }
  20151. if(this.getFormFields().exists("cv.catchLogOnFault")){
  20152. _116c.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  20153. }
  20154. _116c.setPromptDialog(this.m_promptDialog);
  20155. _116c.setFaultDialog(this.m_faultDialog);
  20156. _116c.setLogonDialog(this.m_logonDialog);
  20157. _116c.m_asynch=this.m_asynch;
  20158. if(this.m_callbacks.newRequest){
  20159. var _116d=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_116c],this.m_callbacks.newRequest.object);
  20160. _116d();
  20161. }
  20162. return _116c;
  20163. };
  20164. AsynchRequest.prototype.success=function(){
  20165. var _116e=this.getAsynchStatus();
  20166. switch(_116e){
  20167. case "stillWorking":
  20168. case "working":
  20169. this.working();
  20170. break;
  20171. case "prompting":
  20172. this.prompting();
  20173. break;
  20174. case "fault":
  20175. case "complete":
  20176. case "conversationComplete":
  20177. this.complete();
  20178. break;
  20179. default:
  20180. this.complete();
  20181. break;
  20182. }
  20183. };
  20184. AsynchRequest.prototype.setFaultDialog=function(_116f){
  20185. if(_116f instanceof IFaultDialog){
  20186. if(typeof console!="undefined"){
  20187. console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
  20188. }
  20189. this.m_faultDialog=_116f;
  20190. }else{
  20191. if(_116f&&typeof console!="undefined"){
  20192. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  20193. }
  20194. }
  20195. };
  20196. AsynchRequest.prototype.setPromptDialog=function(_1170){
  20197. if(_1170 instanceof IPromptDialog){
  20198. if(typeof console!="undefined"){
  20199. console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
  20200. }
  20201. this.m_promptDialog=_1170;
  20202. }else{
  20203. if(_1170&&typeof console!="undefined"){
  20204. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  20205. }
  20206. }
  20207. };
  20208. AsynchRequest.prototype.setLogonDialog=function(_1171){
  20209. if(_1171 instanceof ILogOnDialog){
  20210. if(typeof console!="undefined"){
  20211. console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
  20212. }
  20213. this.m_logonDialog=_1171;
  20214. }else{
  20215. if(_1171&&typeof console!="undefined"){
  20216. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  20217. }
  20218. }
  20219. };
  20220. AsynchRequest.prototype.resubmitRequest=function(){
  20221. var _1172=this.newRequest();
  20222. _1172.m_formFields=this.m_formFields;
  20223. _1172.sendRequest();
  20224. return _1172;
  20225. };
  20226. AsynchRequest.prototype.sendRequest=function(){
  20227. var _1173=this;
  20228. var _1174={"complete":{"object":_1173,"method":_1173.successHandler},"fault":{"object":_1173,"method":_1173.errorHandler}};
  20229. this.init("POST",this.m_gateway,"",this.m_asynch);
  20230. this.executeCallback("preHttpRequest");
  20231. this.parent.setCallbacks.call(this,_1174);
  20232. this.parent.sendRequest.call(this);
  20233. };
  20234. AsynchRequest.prototype.errorHandler=function(){
  20235. this.executeCallback("postHttpRequest");
  20236. this.executeCallback("entryFault");
  20237. this.executeCallback("error");
  20238. };
  20239. AsynchRequest.prototype.successHandler=function(){
  20240. this.executeCallback("postHttpRequest");
  20241. if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){
  20242. window["AsynchRequestPromptDialog"].hide();
  20243. window["AsynchRequestPromptDialog"]=null;
  20244. }
  20245. if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  20246. var _1175=this.getResponseText();
  20247. if(_1175.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
  20248. this.passportTimeout();
  20249. }else{
  20250. if((_1175.indexOf("http-equiv=\"refresh\"")!=-1)||(_1175.indexOf("http-equiv='refresh'")!=-1)){
  20251. this.passportTimeout();
  20252. }else{
  20253. this.executeCallback("entryFault");
  20254. if(!this.executeCallback("fault")){
  20255. var _1176=window.open("","","height=400,width=500");
  20256. if(_1176!=null){
  20257. _1176.document.write(_1175);
  20258. }
  20259. }
  20260. }
  20261. }
  20262. }else{
  20263. this.m_soapFault=this.constructFaultEnvelope();
  20264. if(this.m_soapFault!=null){
  20265. var _1177=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
  20266. if(_1177!=null&&XMLHelper_FindChildByTagName(_1177,"promptInfo",true)){
  20267. this.passportTimeout();
  20268. }else{
  20269. this.fault();
  20270. }
  20271. }else{
  20272. this.success();
  20273. }
  20274. }
  20275. };
  20276. AsynchRequest.prototype.cancel=function(){
  20277. this.parent.cancel.call(this);
  20278. var _1178=this.getFormField("m_tracking");
  20279. if(_1178){
  20280. var _1179=new XmlHttpObject();
  20281. _1179.init("POST",this.m_gateway,"",false);
  20282. if(this.getFormField("cv.outputKey")){
  20283. _1179.addFormField("b_action","cvx.high");
  20284. _1179.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  20285. _1179.setHeaders(this.getHeaders());
  20286. }else{
  20287. _1179.addFormField("b_action","cognosViewer");
  20288. }
  20289. _1179.addFormField("cv.responseFormat","successfulRequest");
  20290. _1179.addFormField("ui.action","cancel");
  20291. _1179.addFormField("m_tracking",_1178);
  20292. if(this.getFormField("cv.debugDirectory")){
  20293. _1179.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  20294. }
  20295. _1179.sendRequest();
  20296. this.executeCallback("cancel");
  20297. }
  20298. };
  20299. AsynchRequest.prototype.working=function(){
  20300. this.executeCallback("working");
  20301. var _117a=this.newRequest();
  20302. _117a.addFormField("m_tracking",this.getTracking());
  20303. if(this.getFormField("cv.outputKey")){
  20304. _117a.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
  20305. _117a.addFormField("b_action","cvx.high");
  20306. }
  20307. if(this.isRAPWaitTrue()){
  20308. _117a.m_formFields=this.m_formFields;
  20309. _117a.addFormField("m_tracking",this.getTracking());
  20310. _117a.addFormField("rapWait","true");
  20311. var _117b=this.getRAPRequestCache();
  20312. if(_117b!==null&&typeof _117b!="undefined"){
  20313. _117a.addFormField("rapRequestCache",_117b);
  20314. }
  20315. var _117c=this.getMainConversation();
  20316. if(_117c){
  20317. _117a.addFormField("mainConversation",_117c);
  20318. }
  20319. var _117d=this.getMainTracking();
  20320. if(_117d){
  20321. _117a.addFormField("mainTracking",_117d);
  20322. }
  20323. }else{
  20324. _117a.addFormField("ui.action","wait");
  20325. _117a.addFormField("ui.primaryAction",this.getPrimaryAction());
  20326. _117a.addFormField("cv.actionState",this.getActionState());
  20327. if(this.getFormField("ui.preserveRapTags")){
  20328. _117a.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
  20329. }
  20330. if(this.getFormField("ui.backURL")){
  20331. _117a.addFormField("ui.backURL",this.getFormField("ui.backURL"));
  20332. }
  20333. if(this.getFormField("errURL")){
  20334. _117a.addFormField("errURL",this.getFormField("errURL"));
  20335. }
  20336. if(this.getFormField("cv.showFaultPage")){
  20337. _117a.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
  20338. }
  20339. if(this.getFormField("cv.catchLogOnFault")){
  20340. _117a.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
  20341. }
  20342. }
  20343. if(this.getFormField("bux")){
  20344. _117a.addFormField("bux",this.getFormField("bux"));
  20345. }
  20346. if(this.getFormField("cv.debugDirectory")){
  20347. _117a.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
  20348. }
  20349. _117a.sendRequest();
  20350. };
  20351. AsynchRequest.prototype.prompting=function(){
  20352. this.executeCallback("entryComplete");
  20353. if(!this.executeCallback("prompting")){
  20354. if(this.m_promptDialog!=null){
  20355. this.showPromptPage();
  20356. }else{
  20357. if(typeof console!="undefined"){
  20358. console.log("An unhandled prompt response was returned: %o",this.xmlHttp);
  20359. }
  20360. }
  20361. }
  20362. this.executeCallback("postEntryComplete");
  20363. };
  20364. AsynchRequest.prototype.promptPageOkCallback=function(_117e){
  20365. var _117f=this.newRequest();
  20366. _117f.addFormField("ui.action","forward");
  20367. _117f.addFormField("m_tracking",this.getTracking());
  20368. _117f.addFormField("ui.conversation",this.getConversation());
  20369. _117f.addFormField("ui.primaryAction",this.getPrimaryAction());
  20370. _117f.addFormField("cv.actionState",this.getActionState());
  20371. for(var _1180 in _117e){
  20372. _117f.addFormField(_1180,_117e[_1180]);
  20373. }
  20374. _117f.sendRequest();
  20375. window["AsynchRequestObject"]=null;
  20376. };
  20377. AsynchRequest.prototype.promptPageCancelCallback=function(){
  20378. window["AsynchRequestPromptDialog"].hide();
  20379. this.complete();
  20380. };
  20381. AsynchRequest.prototype.showPromptPage=function(){
  20382. window["AsynchRequestObject"]=this;
  20383. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  20384. var _1181=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
  20385. window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_1181,400,400);
  20386. window["AsynchRequestPromptDialog"].show();
  20387. };
  20388. AsynchRequest.prototype.passportTimeout=function(){
  20389. this.executeCallback("entryFault");
  20390. if(!this.executeCallback("passportTimeout")){
  20391. if(this.m_logonDialog!=null){
  20392. this.m_logonDialog.show(response.getSoapFault());
  20393. }else{
  20394. if(typeof console!="undefined"){
  20395. console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault());
  20396. }
  20397. }
  20398. }
  20399. };
  20400. AsynchRequest.prototype.fault=function(){
  20401. this.executeCallback("entryFault");
  20402. if(!this.executeCallback("fault")){
  20403. if(this.m_faultDialog!=null){
  20404. this.m_faultDialog.show(this.getSoapFault());
  20405. }else{
  20406. if(typeof console!="undefined"){
  20407. console.log("An unhandled soap fault was returned: %o",this.getSoapFault());
  20408. }
  20409. }
  20410. }
  20411. };
  20412. AsynchRequest.prototype.complete=function(){
  20413. this.executeCallback("entryComplete");
  20414. this.executeCallback("complete");
  20415. this.executeCallback("postEntryComplete");
  20416. };
  20417. AsynchRequest.prototype.getSoapFaultCode=function(){
  20418. var _1182=this.constructFaultEnvelope();
  20419. if(_1182){
  20420. var _1183=XMLHelper_FindChildByTagName(_1182,"faultcode",true);
  20421. if(_1183!=null){
  20422. return XMLHelper_GetText(_1183);
  20423. }
  20424. }
  20425. return null;
  20426. };
  20427. AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
  20428. var _1184=this.constructFaultEnvelope();
  20429. if(_1184){
  20430. var entry=XMLHelper_FindChildByTagName(_1184,"messageString",true);
  20431. if(entry!=null){
  20432. return XMLHelper_GetText(entry);
  20433. }
  20434. }
  20435. return null;
  20436. };
  20437. function AsynchDATARequest(_1186,_1187){
  20438. AsynchDATARequest.baseConstructor.call(this,_1186,_1187);
  20439. this.m_oResponseState=null;
  20440. this.m_sResponseState=null;
  20441. this.m_endOfStateIdx=-1;
  20442. this.cStatePrefix="<xml><state>";
  20443. this.cStateSuffix="</state></xml>";
  20444. };
  20445. AsynchDATARequest.prototype=new AsynchRequest();
  20446. AsynchDATARequest.baseConstructor=AsynchRequest;
  20447. AsynchDATARequest.prototype.getEndOfStateIdx=function(){
  20448. if(this.m_endOfStateIdx==-1){
  20449. var _1188=this.getResponseText().substring(0,12);
  20450. if(_1188==this.cStatePrefix){
  20451. this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix);
  20452. if(this.m_endOfStateIdx!=-1){
  20453. this.m_endOfStateIdx+=this.cStateSuffix.length;
  20454. }
  20455. }
  20456. }
  20457. return this.m_endOfStateIdx;
  20458. };
  20459. AsynchDATARequest.prototype.getResponseStateText=function(){
  20460. if(!this.m_sResponseState){
  20461. this.getResponseState();
  20462. }
  20463. return this.m_sResponseState;
  20464. };
  20465. AsynchDATARequest.prototype.getResponseState=function(){
  20466. if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){
  20467. this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length);
  20468. if(this.m_sResponseState!=null){
  20469. this.m_sResponseState=xml_decode(this.m_sResponseState);
  20470. this.m_oResponseState=eval("("+this.m_sResponseState+")");
  20471. }
  20472. }
  20473. return this.m_oResponseState;
  20474. };
  20475. AsynchDATARequest.prototype.getAsynchStatus=function(){
  20476. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){
  20477. return this.getResponseState().m_sStatus;
  20478. }
  20479. return "unknown";
  20480. };
  20481. AsynchDATARequest.prototype.getTracking=function(){
  20482. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){
  20483. return this.getResponseState().m_sTracking;
  20484. }
  20485. return "";
  20486. };
  20487. AsynchDATARequest.prototype.getConversation=function(){
  20488. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){
  20489. return this.getResponseState().m_sConversation;
  20490. }
  20491. return "";
  20492. };
  20493. AsynchDATARequest.prototype.getPrimaryAction=function(){
  20494. if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){
  20495. return this.getResponseState().envParams["ui.primaryAction"];
  20496. }
  20497. return "";
  20498. };
  20499. AsynchDATARequest.prototype.getActionState=function(){
  20500. if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){
  20501. return this.getResponseState().m_sActionState;
  20502. }
  20503. return "";
  20504. };
  20505. AsynchDATARequest.prototype.getResult=function(){
  20506. if(this.getEndOfStateIdx()!=-1){
  20507. return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length);
  20508. }
  20509. return "";
  20510. };
  20511. AsynchDATARequest.prototype.getDebugLogs=function(){
  20512. if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){
  20513. return this.getResponseState().debugLogs;
  20514. }
  20515. return "";
  20516. };
  20517. AsynchDATARequest.prototype.getPromptHTMLFragment=function(){
  20518. return this.getResult();
  20519. };
  20520. AsynchDATARequest.prototype.constructFaultEnvelope=function(){
  20521. if(this.m_soapFault==null){
  20522. var state=this.getResponseState();
  20523. if(state!=null){
  20524. if(state.m_sSoapFault){
  20525. var _118a=state.m_sSoapFault;
  20526. this.m_soapFault=XMLBuilderLoadXMLFromString(_118a);
  20527. }
  20528. }
  20529. }
  20530. return this.m_soapFault;
  20531. };
  20532. AsynchDATARequest.prototype.construct=function(){
  20533. var _118b=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
  20534. _118b.setCallbacks(this.m_callbacks);
  20535. if(this.getFormFields().exists("cv.responseFormat")){
  20536. _118b.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  20537. }else{
  20538. _118b.addFormField("cv.responseFormat","data");
  20539. }
  20540. return _118b;
  20541. };
  20542. AsynchDATARequest.prototype.getEnvParam=function(param){
  20543. var _118d=this.getResponseState();
  20544. if(_118d&&typeof _118d.envParams!="undefined"&&typeof _118d.envParams[param]!="undefined"){
  20545. return _118d.envParams[param];
  20546. }
  20547. return null;
  20548. };
  20549. AsynchDATARequest.prototype.isRAPWaitTrue=function(){
  20550. var _118e=this.getEnvParam("rapWait");
  20551. if(_118e!=null){
  20552. return _118e=="true"?true:false;
  20553. }
  20554. return false;
  20555. };
  20556. AsynchDATARequest.prototype.getRAPRequestCache=function(){
  20557. return this.getEnvParam("rapRequestCache");
  20558. };
  20559. AsynchDATARequest.prototype.getMainConversation=function(){
  20560. return this.getEnvParam("mainConversation");
  20561. };
  20562. AsynchDATARequest.prototype.getMainTracking=function(){
  20563. return this.getEnvParam("mainTracking");
  20564. };
  20565. function AsynchJSONRequest(_118f,_1190){
  20566. AsynchJSONRequest.baseConstructor.call(this,_118f,_1190);
  20567. this.m_jsonResponse=null;
  20568. };
  20569. AsynchJSONRequest.prototype=new AsynchRequest();
  20570. AsynchJSONRequest.baseConstructor=AsynchRequest;
  20571. AsynchJSONRequest.prototype.getJSONResponseObject=function(){
  20572. if(this.m_jsonResponse==null){
  20573. if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){
  20574. var text=this.getResponseText();
  20575. if(text!=null){
  20576. var _1192=this.removeInvalidCharacters(text);
  20577. this.m_jsonResponse=eval("("+_1192+")");
  20578. }
  20579. }
  20580. }
  20581. return this.m_jsonResponse;
  20582. };
  20583. AsynchJSONRequest.prototype.getTracking=function(){
  20584. var _1193=this.getJSONResponseObject();
  20585. if(_1193){
  20586. return _1193.tracking;
  20587. }
  20588. return "";
  20589. };
  20590. AsynchJSONRequest.prototype.getConversation=function(){
  20591. var _1194=this.getJSONResponseObject();
  20592. if(_1194){
  20593. return _1194.conversation;
  20594. }
  20595. return "";
  20596. };
  20597. AsynchJSONRequest.prototype.getAsynchStatus=function(){
  20598. var _1195=this.getJSONResponseObject();
  20599. if(_1195){
  20600. return _1195.status;
  20601. }
  20602. return "unknown";
  20603. };
  20604. AsynchJSONRequest.prototype.getPrimaryAction=function(){
  20605. var _1196=this.getJSONResponseObject();
  20606. if(_1196){
  20607. return _1196.primaryAction;
  20608. }
  20609. return "";
  20610. };
  20611. AsynchJSONRequest.prototype.getActionState=function(){
  20612. var _1197=this.getJSONResponseObject();
  20613. if(_1197){
  20614. return _1197.actionState;
  20615. }
  20616. return "";
  20617. };
  20618. AsynchJSONRequest.prototype.getDebugLogs=function(){
  20619. var _1198=this.getJSONResponseObject();
  20620. if(_1198){
  20621. return _1198.debugLogs;
  20622. }
  20623. return "";
  20624. };
  20625. AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
  20626. var _1199=this.getJSONResponseObject();
  20627. if(_1199){
  20628. return (_1199.rapWait==="true");
  20629. }
  20630. return false;
  20631. };
  20632. AsynchJSONRequest.prototype.getRAPRequestCache=function(){
  20633. var _119a=this.getJSONResponseObject();
  20634. if(_119a){
  20635. var _119b=_119a.rapRequestCache;
  20636. if(_119b!==null&&typeof _119b!="undefined"){
  20637. return _119b;
  20638. }
  20639. }
  20640. return null;
  20641. };
  20642. AsynchJSONRequest.prototype.getMainConversation=function(){
  20643. var _119c=this.getJSONResponseObject();
  20644. if(_119c){
  20645. return _119c.mainConversation;
  20646. }
  20647. return null;
  20648. };
  20649. AsynchJSONRequest.prototype.getMainTracking=function(){
  20650. var _119d=this.getJSONResponseObject();
  20651. if(_119d){
  20652. return _119d.mainTracking;
  20653. }
  20654. return null;
  20655. };
  20656. AsynchJSONRequest.prototype.getResult=function(){
  20657. var _119e=this.getJSONResponseObject();
  20658. if(_119e&&_119e.json){
  20659. var _119f=this.removeInvalidCharacters(_119e.json);
  20660. return eval("("+_119f+")");
  20661. }
  20662. return null;
  20663. };
  20664. AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
  20665. if(text){
  20666. text=text.replace(/(\n|\r|\t)+/g,"");
  20667. }
  20668. return text;
  20669. };
  20670. AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
  20671. var _11a1=this.getJSONResponseObject();
  20672. if(_11a1&&_11a1.promptHTMLFragment){
  20673. return _11a1.promptHTMLFragment;
  20674. }
  20675. return "";
  20676. };
  20677. AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
  20678. if(this.m_soapFault==null){
  20679. var _11a2=this.getJSONResponseObject();
  20680. if(_11a2.status=="fault"){
  20681. this.m_soapFault=XMLBuilderLoadXMLFromString(_11a2.fault);
  20682. }
  20683. }
  20684. return this.m_soapFault;
  20685. };
  20686. AsynchJSONRequest.prototype.construct=function(){
  20687. var _11a3=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
  20688. _11a3.setCallbacks(this.m_callbacks);
  20689. if(this.getFormFields().exists("cv.responseFormat")){
  20690. _11a3.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
  20691. }else{
  20692. _11a3.addFormField("cv.responseFormat","asynchJSON");
  20693. }
  20694. return _11a3;
  20695. };
  20696. function IFaultDialog(){
  20697. };
  20698. IFaultDialog.prototype.show=function(){
  20699. if(typeof console!="undefined"){
  20700. console.log("Required method IFaultDialog:show not implemented.");
  20701. }
  20702. };
  20703. IFaultDialog.prototype.handleUnknownHTMLResponse=function(){
  20704. if(typeof console!="undefined"){
  20705. console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented.");
  20706. }
  20707. };
  20708. function ILogOnDialog(){
  20709. };
  20710. ILogOnDialog.prototype.show=function(_11a4){
  20711. if(typeof console!="undefined"){
  20712. console.log("Required method ILogOnDialog:show not implemented.");
  20713. }
  20714. };
  20715. ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_11a5){
  20716. if(typeof console!="undefined"){
  20717. console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
  20718. }
  20719. };
  20720. function IPromptDialog(){
  20721. };
  20722. IPromptDialog.prototype.initialize=function(url,width,_11a8){
  20723. if(typeof console!="undefined"){
  20724. console.log("Required method IModalDialog:initialize not implemented.");
  20725. }
  20726. };
  20727. IPromptDialog.prototype.show=function(){
  20728. if(typeof console!="undefined"){
  20729. console.log("Required method IModalDialog:show not implemented.");
  20730. }
  20731. };
  20732. IPromptDialog.prototype.hide=function(){
  20733. if(typeof console!="undefined"){
  20734. console.log("Required method IModalDialog:hide not implemented.");
  20735. }
  20736. };
  20737. function IRequestHandler(){
  20738. };
  20739. IRequestHandler.prototype.preHttpRequest=function(_11a9){
  20740. if(typeof console!="undefined"){
  20741. console.log("Required method IRequestHandler:preHttpRequest not implemented.");
  20742. }
  20743. };
  20744. IRequestHandler.prototype.postHttpRequest=function(_11aa){
  20745. if(typeof console!="undefined"){
  20746. console.log("Required method IRequestHandler:postHttpRequest not implemented.");
  20747. }
  20748. };
  20749. IRequestHandler.prototype.postComplete=function(_11ab){
  20750. if(typeof console!="undefined"){
  20751. console.log("Required method IRequestHandler:postComplete not implemented.");
  20752. }
  20753. };
  20754. IRequestHandler.prototype.onComplete=function(_11ac){
  20755. if(typeof console!="undefined"){
  20756. console.log("Required method IRequestHandler:onComplete not implemented.");
  20757. }
  20758. };
  20759. IRequestHandler.prototype.onPostEntryComplete=function(_11ad){
  20760. if(typeof console!="undefined"){
  20761. console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
  20762. }
  20763. };
  20764. IRequestHandler.prototype.onFault=function(_11ae){
  20765. if(typeof console!="undefined"){
  20766. console.log("Required method IRequestHandler:onFault not implemented.");
  20767. }
  20768. };
  20769. IRequestHandler.prototype.onPrompting=function(_11af){
  20770. if(typeof console!="undefined"){
  20771. console.log("Required method IRequestHandler:onPrompting not implemented.");
  20772. }
  20773. };
  20774. IRequestHandler.prototype.onWorking=function(_11b0){
  20775. if(typeof console!="undefined"){
  20776. console.log("Required method IRequestHandler:onWorking not implemented.");
  20777. }
  20778. };
  20779. IRequestHandler.prototype.setWorkingDialog=function(_11b1){
  20780. if(typeof console!="undefined"){
  20781. console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
  20782. }
  20783. };
  20784. IRequestHandler.prototype.setRequestIndicator=function(_11b2){
  20785. if(typeof console!="undefined"){
  20786. console.log("Required method IRequestHandler:setExecutionCursor not implemented.");
  20787. }
  20788. };
  20789. function IRequestIndicator(){
  20790. };
  20791. IRequestIndicator.prototype.show=function(){
  20792. if(typeof console!="undefined"){
  20793. console.log("Required method IRequestIndicator:show not implemented.");
  20794. }
  20795. };
  20796. IRequestIndicator.prototype.hide=function(){
  20797. if(typeof console!="undefined"){
  20798. console.log("Required method IRequestIndicator:hide not implemented.");
  20799. }
  20800. };
  20801. function BaseRequestHandler(oCV){
  20802. if(oCV){
  20803. this.m_oCV=oCV;
  20804. this.m_workingDialog=null;
  20805. this.m_requestIndicator=null;
  20806. this.m_faultDialog=null;
  20807. this.m_logOnDialog=null;
  20808. this.m_promptDialog=null;
  20809. this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null;
  20810. }
  20811. };
  20812. BaseRequestHandler.prototype=new IRequestHandler();
  20813. BaseRequestHandler.prototype.onError=function(_11b4){
  20814. };
  20815. BaseRequestHandler.prototype.onComplete=function(){
  20816. };
  20817. BaseRequestHandler.prototype.onPrompting=function(){
  20818. };
  20819. BaseRequestHandler.prototype.resubmitInSafeMode=function(){
  20820. };
  20821. BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
  20822. };
  20823. BaseRequestHandler.prototype.onPostEntryComplete=function(){
  20824. this._processDelayedLoadingQueue();
  20825. };
  20826. BaseRequestHandler.prototype.getViewer=function(){
  20827. return this.m_oCV;
  20828. };
  20829. BaseRequestHandler.prototype.setDispatcherEntry=function(_11b5){
  20830. this.m_oDispatcherEntry=_11b5;
  20831. };
  20832. BaseRequestHandler.prototype.getDispatcherEntry=function(){
  20833. return this.m_oDispatcherEntry;
  20834. };
  20835. BaseRequestHandler.prototype.processInitialResponse=function(_11b6){
  20836. this.updateViewerState(_11b6);
  20837. };
  20838. BaseRequestHandler.prototype.setLogOnDialog=function(_11b7){
  20839. if(_11b7==null){
  20840. this.m_logOnDialog=null;
  20841. }else{
  20842. if(_11b7 instanceof ILogOnDialog){
  20843. this.m_logOnDialog=_11b7;
  20844. }else{
  20845. if(_11b7&&typeof console!="undefined"){
  20846. console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
  20847. }
  20848. }
  20849. }
  20850. };
  20851. BaseRequestHandler.prototype.setWorkingDialog=function(_11b8){
  20852. if(_11b8==null){
  20853. this.m_workingDialog=null;
  20854. }else{
  20855. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
  20856. this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
  20857. }else{
  20858. if(_11b8 instanceof IRequestIndicator){
  20859. this.m_workingDialog=_11b8;
  20860. }else{
  20861. if(_11b8&&typeof console!="undefined"){
  20862. console.log("The parameter workingDialog must be an instance of IRequestIndicator");
  20863. }
  20864. }
  20865. }
  20866. }
  20867. };
  20868. BaseRequestHandler.prototype.getWorkingDialog=function(){
  20869. return this.m_workingDialog;
  20870. };
  20871. BaseRequestHandler.prototype.setRequestIndicator=function(_11b9){
  20872. if(_11b9==null){
  20873. this.m_requestIndicator=null;
  20874. }else{
  20875. if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
  20876. this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
  20877. }else{
  20878. if(_11b9 instanceof IRequestIndicator){
  20879. this.m_requestIndicator=_11b9;
  20880. }else{
  20881. if(_11b9&&typeof console!="undefined"){
  20882. console.log("The parameter requestIndicator must be an instance of IRequestIndicator");
  20883. }
  20884. }
  20885. }
  20886. }
  20887. };
  20888. BaseRequestHandler.prototype.getRequestIndicator=function(){
  20889. return this.m_requestIndicator;
  20890. };
  20891. BaseRequestHandler.prototype.setFaultDialog=function(_11ba){
  20892. if(_11ba==null){
  20893. this.m_faultDialog=null;
  20894. }else{
  20895. if(_11ba instanceof IFaultDialog){
  20896. this.m_faultDialog=_11ba;
  20897. }else{
  20898. if(_11ba&&typeof console!="undefined"){
  20899. console.log("The parameter faultDialog must be an instance of IFaultDialog");
  20900. }
  20901. }
  20902. }
  20903. };
  20904. BaseRequestHandler.prototype.setPromptDialog=function(_11bb){
  20905. if(_11bb==null){
  20906. this.m_promptDialog=null;
  20907. }else{
  20908. if(_11bb instanceof IPromptDialog){
  20909. this.m_promptDialog=_11bb;
  20910. }else{
  20911. if(_11bb&&typeof console!="undefined"){
  20912. console.log("The parameter promptDialog must be an instance of IPromptDialog");
  20913. }
  20914. }
  20915. }
  20916. };
  20917. BaseRequestHandler.prototype.preHttpRequest=function(_11bc){
  20918. if(_11bc&&typeof _11bc.getFormField=="function"){
  20919. if(_11bc.getFormField("ui.action")!="wait"&&_11bc.getFormField("rapWait")!="true"){
  20920. if(this.m_requestIndicator){
  20921. this.m_requestIndicator.show();
  20922. }
  20923. }
  20924. }
  20925. };
  20926. BaseRequestHandler.prototype.postHttpRequest=function(_11bd){
  20927. if(_11bd&&typeof _11bd.getAsynchStatus=="function"){
  20928. var _11be=_11bd.getAsynchStatus();
  20929. if(_11be!="working"&&_11be!="stillWorking"){
  20930. if(this.m_workingDialog){
  20931. this.m_workingDialog.hide();
  20932. }
  20933. if(this.m_requestIndicator){
  20934. this.m_requestIndicator.hide();
  20935. }
  20936. }
  20937. }else{
  20938. if(this.m_workingDialog){
  20939. this.m_workingDialog.hide();
  20940. }
  20941. if(this.m_requestIndicator){
  20942. this.m_requestIndicator.hide();
  20943. }
  20944. }
  20945. };
  20946. BaseRequestHandler.prototype.onFault=function(_11bf){
  20947. var oCV=this.getViewer();
  20948. if(this.m_workingDialog){
  20949. this.m_workingDialog.hide();
  20950. }
  20951. if(this.m_requestIndicator){
  20952. this.m_requestIndicator.hide();
  20953. }
  20954. if(typeof FaultDialog=="undefined"){
  20955. if(typeof console!="undefined"){
  20956. console.log("An unhandled fault was returned: %o",_11bf);
  20957. }
  20958. return;
  20959. }
  20960. if(!this.m_faultDialog){
  20961. this.m_faultDialog=new FaultDialog(this.getViewer());
  20962. }
  20963. if(_11bf&&_11bf.getResponseHeader&&_11bf.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  20964. this.m_faultDialog.handleUnknownHTMLResponse(_11bf.getResponseText());
  20965. }else{
  20966. if(_11bf&&_11bf.getSoapFault){
  20967. this.m_faultDialog.show(_11bf.getSoapFault());
  20968. }else{
  20969. if(oCV.getSoapFault()){
  20970. var _11c1=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  20971. this.m_faultDialog.show(_11c1);
  20972. oCV.setSoapFault("");
  20973. }else{
  20974. if(typeof console!="undefined"){
  20975. console.log("An unhandled fault was returned: %o",_11bf);
  20976. }
  20977. }
  20978. }
  20979. }
  20980. };
  20981. BaseRequestHandler.prototype.isAuthenticationFault=function(_11c2){
  20982. var oCV=this.getViewer();
  20983. var _11c4=null;
  20984. if(_11c2&&_11c2.getSoapFault){
  20985. _11c4=_11c2.getSoapFault();
  20986. }else{
  20987. if(oCV.getSoapFault()){
  20988. _11c4=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  20989. }
  20990. }
  20991. if(_11c4!=null){
  20992. var _11c5=XMLHelper_FindChildByTagName(_11c4,"CAM",true);
  20993. return (_11c5!=null&&XMLHelper_FindChildByTagName(_11c5,"promptInfo",true)!=null);
  20994. }
  20995. return false;
  20996. };
  20997. BaseRequestHandler.prototype.onPassportTimeout=function(_11c6){
  20998. var oCV=this.getViewer();
  20999. if(this.m_workingDialog){
  21000. this.m_workingDialog.hide();
  21001. }
  21002. if(this.m_requestIndicator){
  21003. this.m_requestIndicator.hide();
  21004. }
  21005. if(!this.m_logOnDialog){
  21006. this.m_logOnDialog=new LogOnDialog(this.getViewer());
  21007. }
  21008. if(_11c6&&_11c6.getResponseHeader&&_11c6.getResponseHeader("Content-type").indexOf("text/html")!=-1){
  21009. var _11c8="";
  21010. if(_11c6.getResponseText){
  21011. _11c8=_11c6.getResponseText();
  21012. }
  21013. if((_11c8.indexOf("http-equiv=\"refresh\"")!=-1)||(_11c8.indexOf("http-equiv='refresh'")!=-1)){
  21014. this.m_logOnDialog.show(null);
  21015. }else{
  21016. this.m_logOnDialog.handleUnknownHTMLResponse(_11c8);
  21017. }
  21018. }else{
  21019. if(_11c6&&_11c6.getSoapFault){
  21020. this.m_logOnDialog.show(_11c6.getSoapFault());
  21021. }else{
  21022. if(oCV.getSoapFault()){
  21023. var _11c9=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
  21024. this.m_logOnDialog.show(_11c9);
  21025. oCV.setSoapFault("");
  21026. }else{
  21027. if(typeof console!="undefined"){
  21028. console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_11c6);
  21029. }
  21030. }
  21031. }
  21032. }
  21033. };
  21034. BaseRequestHandler.prototype.onWorking=function(_11ca){
  21035. if(this.m_workingDialog){
  21036. var _11cb=_11ca&&typeof _11ca.getAsynchStatus=="function"&&_11ca.getAsynchStatus()=="stillWorking"?true:false;
  21037. if(!_11cb){
  21038. if(this.m_requestIndicator){
  21039. this.m_requestIndicator.hide();
  21040. }
  21041. this.m_workingDialog.show();
  21042. }
  21043. }
  21044. };
  21045. BaseRequestHandler.prototype.onCancel=function(){
  21046. if(this.m_workingDialog){
  21047. this.m_workingDialog.hide();
  21048. }
  21049. if(this.m_requestIndicator){
  21050. this.m_requestIndicator.hide();
  21051. }
  21052. var oCV=this.getViewer();
  21053. oCV.gbPromptRequestSubmitted=false;
  21054. this._processDelayedLoadingQueue();
  21055. };
  21056. BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){
  21057. var oCV=this.getViewer();
  21058. if(oCV&&oCV.getViewerWidget()){
  21059. var _11ce=oCV.getViewerWidget();
  21060. if(_11ce.getLoadManager()){
  21061. _11ce.getLoadManager().processQueue();
  21062. }
  21063. }
  21064. };
  21065. BaseRequestHandler.prototype.onPrompting=function(_11cf){
  21066. var oCV=this.getViewer();
  21067. if(this.m_workingDialog){
  21068. this.m_workingDialog.hide();
  21069. }
  21070. if(this.m_requestIndicator){
  21071. this.m_requestIndicator.hide();
  21072. }
  21073. if(!this.m_promptDialog){
  21074. this.m_promptDialog=new PromptDialog(this.getViewer());
  21075. }
  21076. window["AsynchRequestObject"]=_11cf;
  21077. window["AsynchRequestPromptDialog"]=this.m_promptDialog;
  21078. var _11d1="?cv.id="+oCV.getId();
  21079. window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_11d1,400,400);
  21080. window["AsynchRequestPromptDialog"].show();
  21081. };
  21082. BaseRequestHandler.prototype.processDATAReportResponse=function(_11d2){
  21083. var oCV=this.getViewer();
  21084. if(!oCV||oCV.m_destroyed){
  21085. if(console){
  21086. console.warn("Tried to process a data response on an invalid CCognosViewer",oCV);
  21087. }
  21088. return;
  21089. }
  21090. var _11d4=_11d2.getResponseState();
  21091. if(!_11d4){
  21092. this.resubmitInSafeMode();
  21093. }
  21094. if(this.loadReportHTML(_11d2.getResult())===false){
  21095. this.resubmitInSafeMode();
  21096. }
  21097. this.updateViewerState(_11d4);
  21098. };
  21099. BaseRequestHandler.prototype.updateViewerState=function(_11d5){
  21100. var oCV=this.getViewer();
  21101. applyJSONProperties(oCV,_11d5);
  21102. var _11d7=oCV.getStatus();
  21103. if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("&lt;")===0){
  21104. oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]);
  21105. }
  21106. if(_11d7!="fault"){
  21107. if(oCV.envParams["rapReportInfo"]){
  21108. this._processRapReportInfo(oCV);
  21109. }
  21110. if(typeof _11d5.clientunencodedexecutionparameters!="undefined"){
  21111. var _11d8=document.getElementById("formWarpRequest"+oCV.getId());
  21112. if(_11d8!=null&&typeof _11d8["clientunencodedexecutionparameters"]!="undefined"){
  21113. _11d8["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters;
  21114. }
  21115. if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
  21116. document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters;
  21117. }
  21118. }
  21119. }else{
  21120. oCV.setTracking("");
  21121. }
  21122. };
  21123. BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
  21124. if(oCV.envParams["rapReportInfo"]){
  21125. var _11da=eval("("+oCV.envParams["rapReportInfo"]+")");
  21126. if(typeof RAPReportInfo!="undefined"){
  21127. var _11db=new RAPReportInfo(_11da,oCV);
  21128. oCV.setRAPReportInfo(_11db);
  21129. }
  21130. }
  21131. };
  21132. BaseRequestHandler.prototype.loadReportHTML=function(_11dc){
  21133. if(!_11dc){
  21134. return true;
  21135. }
  21136. var oCV=this.getViewer();
  21137. if(window.IBM&&window.IBM.perf){
  21138. window.IBM.perf.log("viewer_gotHtml",oCV);
  21139. }
  21140. if(oCV.m_undoStack.length>0){
  21141. oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true;
  21142. }
  21143. oCV.pageNavigationObserverArray=[];
  21144. oCV.m_flashChartsObjectIds=[];
  21145. var sHTML=_11dc.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
  21146. oCV.m_sHTML=sHTML;
  21147. oCV.setHasPrompts(false);
  21148. var id=oCV.getId();
  21149. var _11e0=document.getElementById("RVContent"+id);
  21150. var _11e1=document.getElementById("CVReport"+id);
  21151. if(window.gScriptLoader){
  21152. var _11e2=oCV.getViewerWidget()?true:false;
  21153. var _11e3=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_11e1;
  21154. sHTML=window.gScriptLoader.loadCSS(sHTML,_11e3,_11e2,id);
  21155. }
  21156. if(oCV.sBrowser=="ie"){
  21157. sHTML="<span style='display:none'>&nbsp;</span>"+sHTML;
  21158. }
  21159. _11e1.innerHTML=sHTML;
  21160. this.massageHtmlBeforeDisplayed();
  21161. if(window.gScriptLoader){
  21162. var _11e4=GUtil.generateCallback(oCV.showLoadedContent,[_11e0],oCV);
  21163. oCV.m_resizeReady=false;
  21164. if(!window.gScriptLoader.loadAll(_11e1,_11e4,id,true)){
  21165. if(window.gScriptLoader.containsAjaxWarnings()){
  21166. return false;
  21167. }
  21168. }
  21169. }else{
  21170. _11e0.style.display="block";
  21171. }
  21172. var _11e5=document.querySelectorAll("button");
  21173. var _11e6=_11e5.length;
  21174. for(var k=0;k<_11e6;k++){
  21175. var _11e8=_11e5[k];
  21176. var id=_11e8.id;
  21177. var _11e9=id.match(/reprompt/);
  21178. if(_11e9){
  21179. var _11ea=_11e8.outerHTML;
  21180. var _11eb=_11ea.match(/layoutname="\w+"/);
  21181. if(_11eb!==null){
  21182. var _11ec=_11eb[0];
  21183. var _11ed=/".*"/;
  21184. var _11ee=_11ed.exec(_11ec);
  21185. if(oCV.getCurrentPromptControlFocus()==_11ee){
  21186. _11e8.focus();
  21187. oCV.setCurrentPromptControlFocus(null);
  21188. _11e8=null;
  21189. }
  21190. }else{
  21191. oCV.setCurrentPromptControlFocus(null);
  21192. _11e8=null;
  21193. }
  21194. }
  21195. }
  21196. oCV.updateOutputForA11ySupport();
  21197. this._clearFindState();
  21198. return true;
  21199. };
  21200. BaseRequestHandler.prototype._clearFindState=function(){
  21201. var oCV=this.getViewer();
  21202. var _11f0=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
  21203. if(_11f0&&!_11f0.findOnServerInProgress()){
  21204. oCV.getState().clearFindState();
  21205. }
  21206. };
  21207. BaseRequestHandler.prototype.showReport=function(){
  21208. var oCV=this.getViewer();
  21209. var _11f2=document.getElementById("CVReport"+oCV.getId());
  21210. if(_11f2){
  21211. _11f2.style.display="";
  21212. }
  21213. };
  21214. BaseRequestHandler.prototype.postComplete=function(){
  21215. var oCV=this.getViewer();
  21216. if(oCV.shouldWriteNavLinks()){
  21217. oCV.writeNavLinks(oCV.getSecondaryRequests().join(" "));
  21218. }
  21219. if(oCV.getStatus()==="complete"){
  21220. oCV.m_undoStack=[new CognosViewerSession(oCV)];
  21221. }
  21222. };
  21223. BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_11f4){
  21224. if(this.m_httpRequestConfig){
  21225. var _11f5=this.m_httpRequestConfig.getReportStatusCallback(_11f4);
  21226. if(_11f5){
  21227. _11f5();
  21228. }
  21229. }
  21230. };
  21231. BaseRequestHandler.prototype.addCallbackHooks=function(){
  21232. if(!this.m_httpRequestConfig){
  21233. return;
  21234. }
  21235. this._addCallback("complete","onComplete");
  21236. this._addCallback("working","onWorking");
  21237. this._addCallback("prompting","onPrompting");
  21238. };
  21239. BaseRequestHandler.prototype._addCallback=function(_11f6,_11f7){
  21240. var _11f8=_11f6;
  21241. var _11f9=this[_11f7];
  21242. this[_11f7]=function(_11fa){
  21243. _11f9.apply(this,arguments);
  21244. var _11fb=null;
  21245. if(_11fa&&typeof _11fa.getAsynchStatus=="function"){
  21246. _11fb=_11fa.getAsynchStatus();
  21247. }else{
  21248. _11fb=_11f8=="complete"?this.getViewer().getStatus():_11f8;
  21249. }
  21250. if(_11fb=="stillWorking"){
  21251. return;
  21252. }
  21253. var _11fc=this.m_httpRequestConfig.getReportStatusCallback(_11fb);
  21254. if(typeof _11fc=="function"){
  21255. setTimeout(_11fc,10);
  21256. }
  21257. };
  21258. };
  21259. dojo.provide("FaultDialog");
  21260. dojo.declare("FaultDialog",IFaultDialog,{m_soapFault:null,m_errorMessage:null,m_oCV:null,constructor:function(oCV){
  21261. this.m_oCV=oCV;
  21262. },show:function(_11fe){
  21263. this.m_soapFault=_11fe;
  21264. this.m_oCV.m_resizeReady=true;
  21265. this.renderInlineDialog();
  21266. this.m_oCV.getViewerWidget().setErrorDlg(this);
  21267. },handleUnknownHTMLResponse:function(_11ff){
  21268. if(_11ff){
  21269. var _1200=window.open("","","height=400,width=500");
  21270. if(_1200!=null){
  21271. _1200.document.write(_11ff);
  21272. }
  21273. }
  21274. },canRetryRequest:function(){
  21275. var _1201=true;
  21276. var _1202=XMLHelper_FindChildrenByTagName(this.m_soapFault,"allowRetry",true);
  21277. if(_1202.length>0){
  21278. _1201=(XMLHelper_GetText(_1202[0],false)==="true");
  21279. }
  21280. return _1201;
  21281. },isWarningMessage:function(){
  21282. return false;
  21283. },getButtons:function(){
  21284. var _1203=[{label:RV_RES.IDS_JS_OK,action:dojo.hitch(this,this.ok)}];
  21285. if(this.canRetryRequest()){
  21286. _1203.push({label:RV_RES.IDS_JS_RETRY,action:dojo.hitch(this,this.retry)});
  21287. }
  21288. return _1203;
  21289. },renderInlineDialog:function(){
  21290. var _1204={"type":this.isWarningMessage()?"warning":"error","message":this.getErrorMessage(),"buttons":this.getButtons()};
  21291. var _1205=this.getDetails();
  21292. if(_1205&&_1205.length>0){
  21293. _1204.details=_1205;
  21294. }
  21295. this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,_1204);
  21296. },setErrorMessage:function(_1206){
  21297. this.m_errorMessage=_1206;
  21298. },getErrorMessage:function(){
  21299. if(this.m_errorMessage==null){
  21300. var _1207=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true);
  21301. if(_1207.length>0){
  21302. var _1208=XMLHelper_FindChildByTagName(_1207[0],"messageString",false);
  21303. this.checkAndSetErrorMessage(XMLHelper_GetText(_1208,false));
  21304. }
  21305. }
  21306. return this.m_errorMessage;
  21307. },checkAndSetErrorMessage:function(_1209){
  21308. this.m_detailMessageStartIndex=1;
  21309. if(_1209.indexOf("RSV-BBP-0038")==0){
  21310. _1209=RV_RES.IDS_CONV_CANCELED_ERROR;
  21311. this.m_detailMessageStartIndex=0;
  21312. }
  21313. this.m_errorMessage=_1209;
  21314. },getDetails:function(){
  21315. var _120a="";
  21316. var _120b=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true);
  21317. if(_120b.length>0){
  21318. if(typeof this.m_detailMessageStartIndex==="undefined"||this.m_detailMessageStartIndex===null){
  21319. this.m_detailMessageStartIndex=1;
  21320. }
  21321. for(var _120c=this.m_detailMessageStartIndex;_120c<_120b.length;++_120c){
  21322. var _120d=XMLHelper_FindChildByTagName(_120b[_120c],"messageString",false);
  21323. _120a+=XMLHelper_GetText(_120d,false)+"\n";
  21324. }
  21325. }
  21326. return _120a;
  21327. },retry:function(){
  21328. var _120e=this.m_oCV.getRetryDispatcherEntry();
  21329. this.hide();
  21330. if(_120e){
  21331. _120e.retryRequest();
  21332. }else{
  21333. var _120f=this.m_oCV.getViewerWidget().getOriginalFormFields();
  21334. if(_120f&&(_120f.get("b_action")=="cvx"||_120f.get("b_action")=="cvx.high")){
  21335. _120f.add("b_action","cognosViewer");
  21336. }
  21337. this.m_oCV.executeAction("RetryRequest",_120f);
  21338. }
  21339. },ok:function(){
  21340. var _1210=this.m_oCV.getRetryDispatcherEntry();
  21341. this.hide();
  21342. if(_1210){
  21343. _1210.onCloseErrorDlg();
  21344. }
  21345. },hide:function(){
  21346. this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,{remove:1});
  21347. this.m_oCV.getViewerWidget().setErrorDlg(null);
  21348. this.m_oCV.setRetryDispatcherEntry(null);
  21349. }});
  21350. function buxErrorPage_toggleErrorDetails(event,cvId,_1213){
  21351. if((event.button==0&&(event.keyCode=="0"||typeof event.keyCode=="undefined"))||event.keyCode=="32"||event.keyCode=="13"){
  21352. var _1214=document.getElementById("buxErrorPageDetailContentOuter"+cvId);
  21353. var _1215=document.getElementById("buxErrorPageDetails"+cvId);
  21354. var _1216=document.getElementById("titlePaneTitle"+cvId);
  21355. var _1217=(_1215.style.display=="none");
  21356. dojo.removeClass(_1214,_1217?"dijitTitlePaneContentOuterClosed":"dijitTitlePaneContentOuterOpen");
  21357. dojo.addClass(_1214,_1217?"dijitTitlePaneContentOuterOpen":"dijitTitlePaneContentOuterClosed");
  21358. dojo.removeClass(_1216,_1217?"dijitClose":"dijitOpen");
  21359. dojo.addClass(_1216,_1217?"dijitOpen":"dijitClose");
  21360. _1215.style.display=_1217?"":"none";
  21361. }
  21362. };
  21363. function ModalFaultDialog(){
  21364. };
  21365. ModalFaultDialog.prototype=new FaultDialog();
  21366. ModalFaultDialog.prototype.show=function(_1218){
  21367. var _1219="";
  21368. var _121a="",_121b="";
  21369. var _121c=XMLHelper_FindChildrenByTagName(_1218,"message",true);
  21370. if(_121c.length>0){
  21371. for(var _121d=1;_121d<_121c.length;++_121d){
  21372. _121b=XMLHelper_FindChildByTagName(_121c[_121d],"messageString",false);
  21373. _1219+=XMLHelper_GetText(_121b,false)+"\n";
  21374. }
  21375. _121b=XMLHelper_FindChildByTagName(_121c[0],"messageString",false);
  21376. _121a=XMLHelper_GetText(_121b,false);
  21377. }
  21378. bux.messageBox(bux.MB_ERROR,_121a,"",_1219);
  21379. };
  21380. dojo.provide("GlobalPromptFaultDialog");
  21381. dojo.require("FaultDialog");
  21382. dojo.declare("GlobalPromptFaultDialog",FaultDialog,{m_sendRequestOnOK:false,setSendRequestOnOK:function(_121e){
  21383. this.m_sendRequestOnOK=_121e;
  21384. },ok:function(){
  21385. this.hide();
  21386. this.m_oCV.getViewerWidget().disableListenToForGlobalPrompt();
  21387. if(this.m_sendRequestOnOK){
  21388. var _121f=this.m_oCV.getRetryDispatcherEntry();
  21389. var _1220=null;
  21390. if(_121f){
  21391. _1220=_121f.getOriginalFormFields();
  21392. }else{
  21393. _1220=this.m_oCV.getViewerWidget().getOriginalFormFields();
  21394. }
  21395. if(_1220&&_1220.exists("widget.globalPromptInfo")){
  21396. _1220.remove("widget.globalPromptInfo");
  21397. }
  21398. this.retry();
  21399. }
  21400. }});
  21401. dojo.provide("FaultMessageDialog");
  21402. dojo.declare("FaultMessageDialog",FaultDialog,{m_oCV:null,m_errorMessage:"",constructor:function(oCV,_1222){
  21403. this.m_errorMessage=_1222;
  21404. },getErrorMessage:function(){
  21405. return this.m_errorMessage;
  21406. },getDetails:function(){
  21407. return "";
  21408. },canRetryRequest:function(){
  21409. return false;
  21410. }});
  21411. dojo.provide("WarningMessageDialog");
  21412. dojo.declare("WarningMessageDialog",FaultMessageDialog,{constructor:function(oCV,_1224){
  21413. },isWarningMessage:function(){
  21414. return true;
  21415. }});
  21416. function LogOnDialog(oCV){
  21417. if(oCV){
  21418. this.m_oCV=oCV;
  21419. }
  21420. };
  21421. LogOnDialog.prototype=new ILogOnDialog();
  21422. LogOnDialog.prototype.getViewer=function(){
  21423. return this.m_oCV;
  21424. };
  21425. LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1226){
  21426. this.show(null);
  21427. };
  21428. LogOnDialog.prototype.show=function(_1227){
  21429. var _1228=this.getPromptInfoNamespacesFromAuthenticationFault(_1227);
  21430. if(window["CVEditContentActionInstance"]){
  21431. window["CVEditContentActionInstance"].transitionFromBUA();
  21432. }
  21433. IWidgetLogonhandler.handleLogon(this.getViewer().getId(),_1228);
  21434. };
  21435. LogOnDialog.prototype.getPromptInfoNamespacesFromAuthenticationFault=function(_1229){
  21436. if(!_1229){
  21437. return null;
  21438. }
  21439. var _122a=XMLHelper_FindChildByTagName(_1229,"CAM",true);
  21440. if(_122a==null){
  21441. return null;
  21442. }
  21443. var _122b=XMLHelper_FindChildByTagName(_122a,"promptInfo",true);
  21444. if(_122b==null){
  21445. return null;
  21446. }
  21447. var _122c=XMLHelper_FindChildByTagName(_122a,"displayObjects",true);
  21448. if(_122c==null){
  21449. return null;
  21450. }
  21451. var items=XMLHelper_FindChildrenByTagName(_122c,"item",true);
  21452. if(items==null||items.length!=1){
  21453. return null;
  21454. }
  21455. var _122e=items[0];
  21456. if(_122e==null){
  21457. return null;
  21458. }
  21459. var _122f=XMLHelper_FindChildByTagName(_122e,"name",true);
  21460. var name=XMLHelper_GetText(_122f,false);
  21461. if(name==="CAMNamespace"){
  21462. var _1231=XMLHelper_FindChildByTagName(_122e,"value",true);
  21463. var value=XMLHelper_GetText(_1231,false);
  21464. if(value!=null){
  21465. return value;
  21466. }
  21467. }
  21468. return null;
  21469. };
  21470. dojo.provide("LogOnHandler");
  21471. dojo.declare("LogOnHandler",null,{constructor:function(){
  21472. this.m_cvIdList=[];
  21473. },handleLogon:function(cvId,_1234){
  21474. this.m_cvIdList.push(cvId);
  21475. if(this.m_cvIdList.length==1){
  21476. dojo["require"]("bux.dialogs.IFrameDialog");
  21477. var _1235=(_1234==null||_1234.length==0)?new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this)}):new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this),params:{"h_CAM_action":"logonAs","CAMNamespace":_1234}});
  21478. _1235.startup();
  21479. _1235.show();
  21480. }
  21481. },okHandler:function(){
  21482. for(var index=0;index<this.m_cvIdList.length;++index){
  21483. var cvId=this.m_cvIdList[index];
  21484. var oCV=window["oCV"+cvId];
  21485. if(index===0&&oCV.getViewerWidget){
  21486. oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.action",null,{action:"refreshAfterLogon"});
  21487. }
  21488. if(oCV.getRetryDispatcherEntry()){
  21489. oCV.getRetryDispatcherEntry().retryRequest();
  21490. }else{
  21491. var _1239=oCV.getViewerWidget().getOriginalFormFields();
  21492. if(_1239){
  21493. oCV.executeAction("RetryRequest",_1239);
  21494. }
  21495. }
  21496. }
  21497. this.m_cvIdList=[];
  21498. },cancelHandler:function(){
  21499. for(var index=0;index<this.m_cvIdList.length;++index){
  21500. var cvId=this.m_cvIdList[index];
  21501. var oCV=window["oCV"+cvId];
  21502. if(oCV.getRetryDispatcherEntry()){
  21503. oCV.getRetryDispatcherEntry().onCloseErrorDlg();
  21504. }
  21505. }
  21506. this.m_cvIdList=[];
  21507. }});
  21508. IWidgetLogonhandler=new LogOnHandler();
  21509. function PromptDialog(oCV){
  21510. this.m_oCV=oCV;
  21511. this.m_url="";
  21512. this.m_width=0;
  21513. this.m_height=0;
  21514. this.m_dialogImpl=null;
  21515. };
  21516. PromptDialog.prototype=new IPromptDialog();
  21517. PromptDialog.prototype.initialize=function(url,width,_1240){
  21518. this.m_url=url;
  21519. this.m_width=width;
  21520. this.m_height=_1240;
  21521. };
  21522. PromptDialog.prototype.show=function(){
  21523. this.m_dialogImpl=new bux.dialogs.IFrameDialog();
  21524. this.m_dialogImpl.src=this.m_url;
  21525. this.m_dialogImpl.width=this.m_width;
  21526. this.m_dialogImpl.height=this.m_height;
  21527. this.m_dialogImpl.startup();
  21528. this.m_dialogImpl.show();
  21529. };
  21530. PromptDialog.prototype.hide=function(){
  21531. this.m_dialogImpl.hide();
  21532. this.m_dialogImpl.destroy();
  21533. delete this.m_dialogImpl;
  21534. this.m_dialogImpl=null;
  21535. };
  21536. function RequestHandler(oCV){
  21537. if(oCV){
  21538. RequestHandler.baseConstructor.call(this,oCV);
  21539. this.m_originalFormFields=null;
  21540. this.m_forceRaiseSharePrompt=false;
  21541. }
  21542. };
  21543. RequestHandler.prototype=new BaseRequestHandler();
  21544. RequestHandler.baseConstructor=BaseRequestHandler;
  21545. RequestHandler.prototype.parent=BaseRequestHandler.prototype;
  21546. RequestHandler.prototype.postHttpRequest=function(_1242){
  21547. var oCV=this.getViewer();
  21548. this.parent.postHttpRequest.call(this,_1242);
  21549. };
  21550. RequestHandler.prototype.setForceRaiseSharePrompt=function(bFlag){
  21551. this.m_forceRaiseSharePrompt=bFlag;
  21552. };
  21553. RequestHandler.prototype.preHttpRequest=function(_1245){
  21554. var oCV=this.getViewer();
  21555. var _1247=oCV.getViewerWidget();
  21556. oCV.setCurrentNodeFocus(null);
  21557. if(this.doRaiseSharePromptEvent(_1245)){
  21558. if(oCV.widgetHasPromptParameters()){
  21559. this.setRequestIndicator(new BaseRequestExecutedIndicator(oCV));
  21560. var _1248=this.getListOfCascadingPromptParametersToReset(oCV,_1245);
  21561. oCV.raisePromptEvent(oCV.envParams["reportPrompts"],_1245.getFormFields(),_1248);
  21562. }else{
  21563. if(!(_1247&&_1247.promptParametersRetrieved==true)){
  21564. var _1249=oCV.getAction("GetParameters");
  21565. _1249.isPrimaryPromptWidget=true;
  21566. _1249.execute();
  21567. }
  21568. }
  21569. }
  21570. oCV.resetRaiseSharePromptEventFlag();
  21571. this.parent.preHttpRequest.call(this,_1245);
  21572. };
  21573. RequestHandler.prototype.getListOfChangedPromptParameters=function(oCV,_124b){
  21574. var _124c=oCV.getOldParameters();
  21575. if(!_124c){
  21576. return null;
  21577. }
  21578. var _124d=[];
  21579. for(var _124e in _124c){
  21580. oldParmValueItems=_124c[_124e].m_parmValueItems;
  21581. var _124f=_124b.getFormFields().get("p_"+_124e);
  21582. if(!_124f){
  21583. continue;
  21584. }
  21585. for(var j=0;j<oldParmValueItems.length;++j){
  21586. var _1251=sXmlEncode(oldParmValueItems[j].m_useValue);
  21587. if(_124f.indexOf(_1251)<0){
  21588. _124d.push("p_"+_124e);
  21589. }
  21590. }
  21591. }
  21592. return _124d;
  21593. };
  21594. RequestHandler.prototype.getListOfCascadingPromptParametersToReset=function(oCV,_1253){
  21595. if(!oCV.preProcessControlArray){
  21596. return null;
  21597. }
  21598. var _1254=this.getListOfChangedPromptParameters(oCV,_1253);
  21599. if(!_1254||!_1254.length){
  21600. return null;
  21601. }
  21602. var _1255=[];
  21603. var _1256=oCV.preProcessControlArray.length;
  21604. var _1257=_1254.slice();
  21605. for(var k=0;k<_1256;k++){
  21606. var _1259=(oCV.preProcessControlArray[k]);
  21607. if(!_1259.getCascadeOnParameter){
  21608. return;
  21609. }
  21610. var _125a=_1259.getCascadeOnParameter();
  21611. if(!_125a){
  21612. continue;
  21613. }
  21614. var _125b=_1259.getParameterName();
  21615. var _125c=_125a.getName();
  21616. if(this.contains(_1257,_125c)&&!this.contains(_1257,_125b)){
  21617. _1257.push(_125b);
  21618. _1255.push(_125b);
  21619. }
  21620. }
  21621. return _1255;
  21622. };
  21623. RequestHandler.prototype.contains=function(a,obj){
  21624. var i=a.length;
  21625. while(i--){
  21626. if(a[i]===obj){
  21627. return true;
  21628. }
  21629. }
  21630. return false;
  21631. };
  21632. RequestHandler.prototype.doRaiseSharePromptEvent=function(_1260){
  21633. var oCV=this.getViewer();
  21634. var _1262=false;
  21635. var _1263=_1260.getFormField("ui.action");
  21636. if(((typeof _1263!=="undefined"&&(_1263==="forward"||_1263==="back"))&&oCV.m_raiseSharePromptEvent)||this.m_forceRaiseSharePrompt){
  21637. _1262=true;
  21638. var _1264=null;
  21639. var _1265=false;
  21640. var _1266=0;
  21641. var _1267=_1260.getFormFields();
  21642. var keys=_1267.keys();
  21643. for(_1264 in keys){
  21644. _1264=keys[_1264];
  21645. if(_1264=="_promptControl"&&_1267.get(_1264)=="search"){
  21646. _1262=false;
  21647. break;
  21648. }else{
  21649. if(_1264.indexOf("p_")===0){
  21650. if(_1264.indexOf("p_credential:")===0){
  21651. _1265=true;
  21652. }else{
  21653. _1266+=1;
  21654. }
  21655. }
  21656. }
  21657. }
  21658. if(_1262&&_1265&&_1266===0){
  21659. _1262=false;
  21660. }
  21661. }
  21662. return _1262;
  21663. };
  21664. RequestHandler.prototype.onComplete=function(_1269){
  21665. var oCV=this.getViewer();
  21666. if(oCV&&!oCV.m_destroyed){
  21667. this.parent.onComplete.call(this,_1269);
  21668. this.processDATAReportResponse(_1269);
  21669. this.postComplete();
  21670. }else{
  21671. if(console){
  21672. console.warn("Tried to complete a request on an invalid CCognosViewer",oCV);
  21673. }
  21674. }
  21675. };
  21676. RequestHandler.prototype.onPrompting=function(_126b){
  21677. var oCV=this.getViewer();
  21678. if(oCV&&!oCV.m_destroyed){
  21679. var _126d=oCV.getViewerWidget();
  21680. _126d.hideToolbarAndContextMenu();
  21681. this.onComplete(_126b);
  21682. }else{
  21683. if(console){
  21684. console.warn("Tried to prompt on an invalid CCognosViewer",oCV);
  21685. }
  21686. }
  21687. };
  21688. RequestHandler.prototype.onError=function(_126e){
  21689. var oCV=this.getViewer();
  21690. if(_126e&&oCV){
  21691. var _1270=oCV.getViewerWidget();
  21692. if(typeof console!="undefined"&&console&&console.log){
  21693. console.log("Viewer http error: "+_126e.getResponseText()+" "+_126e.getStatus());
  21694. }
  21695. _1270.fireEvent("com.ibm.bux.widget.action",null,{action:"httpError",responseText:_126e.getResponseText(),status:_126e.getStatus()});
  21696. }
  21697. };
  21698. RequestHandler.prototype.onFault=function(_1271){
  21699. var oCV=this.getViewer();
  21700. var _1273=oCV.getViewerWidget();
  21701. var _1274=oCV.getRetryDispatcherEntry();
  21702. if(_1274&&_1274.getOriginalFormFields()){
  21703. this.m_originalFormFields=_1274.getOriginalFormFields();
  21704. }else{
  21705. this.m_originalFormFields=_1273.getOriginalFormFields();
  21706. }
  21707. if(window["gReportWidgetLoadQueue"]){
  21708. window["gReportWidgetLoadQueue"].widgetDoneLoading(_1273);
  21709. }
  21710. if(this.isGlobalPromptException()){
  21711. this.handleGlobalPromptException();
  21712. }
  21713. if(this.isMissingMemberException(oCV,_1271)){
  21714. this.handleMissingMemberException(oCV);
  21715. }
  21716. if(oCV.envParams&&oCV.envParams["updateToolbar"]==="true"){
  21717. _1273.savedOutputMenuUpdated=false;
  21718. _1273.updateToolbar();
  21719. }
  21720. if(oCV.envParams&&oCV.envParams["ui.action"]==="buxView"){
  21721. _1273.setSavedOutputsCMResponse(null);
  21722. }
  21723. if(typeof _1273.postOnFault=="function"){
  21724. _1273.postOnFault();
  21725. }
  21726. this.parent.onFault.call(this,_1271);
  21727. if(_1274&&_1271&&_1271.getResponseState){
  21728. var _1275=_1271.getResponseState();
  21729. if(_1275){
  21730. this.updateViewerState(_1275);
  21731. }
  21732. this.onPostEntryComplete();
  21733. }
  21734. };
  21735. RequestHandler.prototype.handleGlobalPromptException=function(){
  21736. var oCV=this.getViewer();
  21737. var _1277=new GlobalPromptFaultDialog(oCV);
  21738. oCV.disableRaiseSharePromptEvent();
  21739. if(this.m_originalFormFields&&!this.m_originalFormFields.exists("sharedPromptRequest")){
  21740. _1277.setSendRequestOnOK(true);
  21741. }
  21742. _1277.setErrorMessage(RV_RES.IDS_JS_GLOBAL_PROMPTS_NOT_RESPONDING_WARNING);
  21743. this.setFaultDialog(_1277);
  21744. };
  21745. RequestHandler.prototype.isGlobalPromptException=function(){
  21746. var oCV=this.getViewer();
  21747. if(this.m_originalFormFields){
  21748. if(this.m_originalFormFields.exists("sharedPromptRequest")||(this.m_originalFormFields.get("ui.reportDrop")==="true"&&this.m_originalFormFields.exists("widget.globalPromptInfo"))){
  21749. return true;
  21750. }
  21751. }
  21752. return false;
  21753. };
  21754. RequestHandler.prototype.postComplete=function(){
  21755. var oCV=this.getViewer();
  21756. if(oCV.getStatus()=="complete"&&!oCV.inlineScriptsDoneExecuting){
  21757. var _127a=this;
  21758. setTimeout(function(){
  21759. _127a.postComplete();
  21760. },10);
  21761. return;
  21762. }
  21763. this.parent.postComplete.call(this);
  21764. if(oCV&&oCV.m_destroyed){
  21765. if(console){
  21766. console.warn("Tried to postComplete on an invalid CCognosViewer",oCV);
  21767. }
  21768. return;
  21769. }
  21770. var _127b=oCV.getViewerWidget();
  21771. if(window["gReportWidgetLoadQueue"]){
  21772. window["gReportWidgetLoadQueue"].widgetDoneLoading(_127b);
  21773. }
  21774. this.showReport();
  21775. oCV.getSelectionController().clearSelectionData();
  21776. oCV.addPageAdornments();
  21777. _127b.savedOutputMenuUpdated=false;
  21778. if(oCV.getStatus()!="prompting"){
  21779. _127b.fetchAnnotationData();
  21780. _127b.getUndoRedoQueue().add({"reportUpdated":true});
  21781. }
  21782. _127b.updateToolbar();
  21783. oCV.m_stateSet=true;
  21784. oCV.doneLoading();
  21785. if(typeof _127b.postComplete=="function"){
  21786. _127b.postComplete();
  21787. }
  21788. };
  21789. RequestHandler.prototype.updateViewerState=function(_127c){
  21790. var oCV=this.getViewer();
  21791. if(oCV&&oCV.m_destroyed){
  21792. if(console){
  21793. console.warn("Tried to update state on an invalid CCognosViewer",oCV);
  21794. }
  21795. return;
  21796. }
  21797. this.parent.updateViewerState.call(this,_127c);
  21798. var _127e=oCV.getStatus();
  21799. if(_127e!="fault"){
  21800. if(oCV.envParams["buxToolbarPayload"]){
  21801. oCV.setToolbar(eval(oCV.envParams["buxToolbarPayload"]));
  21802. delete oCV.envParams["buxToolbarPayload"];
  21803. }
  21804. if(oCV.envParams["buxContextMenuPayload"]){
  21805. oCV.setContextMenu(eval(oCV.envParams["buxContextMenuPayload"]));
  21806. delete oCV.envParams["buxContextMenuPayload"];
  21807. }
  21808. if(oCV.envParams.reportPrompts){
  21809. oCV.getViewerWidget().setPromptParametersRetrieved(true);
  21810. }
  21811. if(oCV.envParams.reRunObject){
  21812. var _127f=document.getElementById("formWarpRequest"+oCV.getId());
  21813. if(_127f["reRunObj"]){
  21814. _127f["reRunObj"].value=oCV.envParams.reRunObject;
  21815. }else{
  21816. _127f.appendChild(createHiddenFormField("reRunObj",oCV.envParams.reRunObject));
  21817. }
  21818. }
  21819. }
  21820. };
  21821. RequestHandler.prototype.processInitialResponse=function(_1280){
  21822. var oCV=this.getViewer();
  21823. var _1282=oCV.getViewerWidget();
  21824. if(_1282!=null){
  21825. if(_1282.shouldUseSavedReportInfo()){
  21826. oCV.envParams["rapReportInfo"]=_1282.getAttributeValue("rapReportInfo");
  21827. }
  21828. this.parent.processInitialResponse.call(this,_1280);
  21829. _1282.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
  21830. this.getViewer().renderTabs();
  21831. oCV.getPinFreezeManager().fromJSONString(_1282.getAttributeValue("PinFreezeInfo"));
  21832. var _1283=oCV.getStatus();
  21833. if(_1283!="working"&&_1283!="stillWorking"){
  21834. delete oCV.envParams["cv.outputKey"];
  21835. _1282.setXNodeId(null);
  21836. }
  21837. switch(_1283){
  21838. case "complete":
  21839. _1282.setOriginalFormFields(null);
  21840. this.postComplete();
  21841. break;
  21842. case "working":
  21843. case "stillWorking":
  21844. oCV.getWorkingDialog().show();
  21845. setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
  21846. break;
  21847. case "prompting":
  21848. _1282.hideToolbarAndContextMenu();
  21849. break;
  21850. case "fault":
  21851. if(this.isAuthenticationFault()){
  21852. this.onPassportTimeout();
  21853. }else{
  21854. this.onFault();
  21855. }
  21856. }
  21857. this.showReport();
  21858. this.onPostEntryComplete();
  21859. oCV.m_stateSet=true;
  21860. this.onAsynchStatusUpdate(_1283);
  21861. }else{
  21862. var _1284=this;
  21863. setTimeout(function(){
  21864. _1284.processInitialResponse(_1280);
  21865. },100);
  21866. }
  21867. };
  21868. RequestHandler.prototype.onPostEntryComplete=function(){
  21869. var oCV=this.getViewer();
  21870. if(oCV&&oCV.getViewerWidget()){
  21871. var _1286=oCV.getViewerWidget();
  21872. _1286.getLoadManager().processQueue();
  21873. }
  21874. };
  21875. RequestHandler.prototype.isMissingMemberException=function(oCV,_1288){
  21876. if(oCV.bMissingMemberException){
  21877. return true;
  21878. }
  21879. if(_1288&&_1288.getResponseState){
  21880. var _1289=_1288.getResponseState();
  21881. if(_1289&&_1289.envParams&&_1289.envParams.bMissingMemberException){
  21882. this._populateMissingMemberDetails(oCV,_1289);
  21883. return true;
  21884. }
  21885. }
  21886. return false;
  21887. };
  21888. RequestHandler.prototype._populateMissingMemberDetails=function(oCV,_128b){
  21889. if(!oCV||!_128b||!_128b.envParams){
  21890. return;
  21891. }
  21892. oCV.bCanEditContent=_128b.envParams.bCanEditContent;
  21893. oCV.bHasParameters=_128b.envParams.bHasParameters;
  21894. if(_128b.envParams["ui.spec"]){
  21895. if(oCV.envParams){
  21896. if(!oCV.envParams["ui.spec"]){
  21897. oCV.envParams["ui.spec"]=xml_decode(_128b.envParams["ui.spec"]);
  21898. }
  21899. }
  21900. }
  21901. };
  21902. RequestHandler.prototype.handleMissingMemberException=function(oCV){
  21903. var _128d=null;
  21904. _128d=(oCV.bCanEditContent)?RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_FOR_SPEC_PARAM:RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_WITH_NO_BUA;
  21905. var _128e=new MissingMemberFaultDialog(oCV,_128d,oCV.bCanEditContent,oCV.bHasParameters);
  21906. this.setFaultDialog(_128e);
  21907. };
  21908. RequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
  21909. var oCV=this.getViewer();
  21910. if(!oCV){
  21911. return;
  21912. }
  21913. var _1290=oCV.getViewerWidget();
  21914. if(!_1290){
  21915. return;
  21916. }
  21917. _1290.updateDrillThroughLinks();
  21918. };
  21919. function BaseRequestExecutedIndicator(oCV){
  21920. this.m_oCV=oCV;
  21921. if(oCV){
  21922. this.m_oCVId=oCV.getId();
  21923. if(oCV.getViewerWidget()){
  21924. this.m_background=oCV.getViewerWidget().getReportBlocker();
  21925. }
  21926. }
  21927. };
  21928. BaseRequestExecutedIndicator.prototype=new IRequestIndicator();
  21929. BaseRequestExecutedIndicator.prototype.getViewer=function(){
  21930. return this.m_oCV;
  21931. };
  21932. BaseRequestExecutedIndicator.prototype.show=function(){
  21933. this.m_background.setClassNameOverride("report-blocker");
  21934. this.m_background.show();
  21935. };
  21936. BaseRequestExecutedIndicator.prototype.hide=function(){
  21937. if(this.m_background){
  21938. this.m_background.hide();
  21939. }
  21940. };
  21941. function RequestExecutedIndicator(oCV){
  21942. RequestExecutedIndicator.baseConstructor.call(this,oCV);
  21943. };
  21944. RequestExecutedIndicator.prototype=new BaseRequestExecutedIndicator();
  21945. RequestExecutedIndicator.baseConstructor=BaseRequestExecutedIndicator;
  21946. RequestExecutedIndicator.prototype.parent=BaseRequestExecutedIndicator.prototype;
  21947. RequestExecutedIndicator.prototype.show=function(){
  21948. var oCV=this.getViewer();
  21949. var cvid=oCV.getId();
  21950. var _1295=document.getElementById("executionCursor"+cvid);
  21951. var _1296=document.getElementById("formWarpRequest"+cvid);
  21952. if(!_1295&&_1296){
  21953. _1295=document.createElement("span");
  21954. _1295.className="executionCursor";
  21955. _1295.setAttribute("id","executionCursor"+cvid);
  21956. var _1297="<img alt=\"\" src=\""+oCV.getWebContentRoot()+"/rv/images/action_busy_32x32.gif"+"\"/>";
  21957. _1295.innerHTML=_1297;
  21958. _1296.appendChild(_1295);
  21959. }
  21960. this.parent.show.call(this);
  21961. };
  21962. RequestExecutedIndicator.prototype.hide=function(){
  21963. var _1298=document.getElementById("executionCursor"+this.getViewer().getId());
  21964. if(_1298!=null){
  21965. _1298.parentNode.removeChild(_1298);
  21966. }
  21967. this.parent.hide.call(this);
  21968. };
  21969. dojo.provide("WorkingDialog");
  21970. dojo.declare("WorkingDialog",IRequestIndicator,{constructor:function(oCV){
  21971. this.m_oCV=oCV;
  21972. this.m_sNamespace=oCV.getId();
  21973. this.m_sGateway=oCV.getGateway();
  21974. try{
  21975. var _129a=[];
  21976. if(oCV.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")!="true"){
  21977. _129a.push({"class":"icdDialogButton",label:RV_RES.CANCEL,onClick:dojo.hitch(this,this.doCancel)});
  21978. }
  21979. this.m_waitPageDialog=new ViewerIWidgetInlineDialog(this.getCognosViewer(),this.getWaitPageHTML(),_129a,"waitButtonContainer_"+this.getCognosViewer().getId());
  21980. }
  21981. catch(e){
  21982. if(console&&console.log){
  21983. console.log(e);
  21984. }
  21985. }
  21986. },setSimpleWorkingDialogFlag:function(flag){
  21987. },getCognosViewer:function(){
  21988. return this.m_oCV;
  21989. },show:function(){
  21990. this.m_waitPageDialog.show();
  21991. },getWaitPageHTML:function(){
  21992. var id=this.getCognosViewer().getId();
  21993. return "<table cellspacing=\"4\" cellpadding=\"0\" border=\"0\" wairole=\"presentation\" role=\"presentation\" style=\"width:100%;height:100%\">"+"<tbody><tr><td align=\"center\">"+"<div class=\"dijitInline widget_load_background\" role=\"presentation\" tabindex=\"0\">"+"<div id=\"working"+id+"\" class=\"widget_load\" aria-labelledby=\"working"+id+"\">"+RV_RES.IDS_JS_WAIT_PAGE_LOADING+"</div>"+"<div id=\"waitButtonContainer_"+id+"\" class=\"icdDialogButtonBar\" style=\"text-align:center;padding-left:12px;padding-right:12px;\"></div>"+"</div>"+"</td></tr></tbody>"+"</table>";
  21994. },hide:function(){
  21995. this.m_waitPageDialog.hide();
  21996. this.m_cancelCallback=null;
  21997. },setCancelCallback:function(_129d){
  21998. this.m_cancelCallback=_129d;
  21999. },doCancel:function(){
  22000. var oCV=this.getCognosViewer();
  22001. if(this.m_cancelCallback){
  22002. this.m_cancelCallback();
  22003. this.m_cancelCallback=null;
  22004. }else{
  22005. var _129f=oCV.cancel();
  22006. if(_129f){
  22007. var _12a0=oCV.getViewerWidget().getUndoRedoQueue();
  22008. if(_12a0){
  22009. _12a0.handleCancel();
  22010. }
  22011. }
  22012. }
  22013. if(oCV.isReportRenderingDone()){
  22014. this.hide();
  22015. }else{
  22016. var _12a1={action:"deleteWidget"};
  22017. oCV.getViewerWidget().iContext.iEvents.fireEvent("com.ibm.bux.widget.action",null,_12a1);
  22018. }
  22019. }});
  22020. dojo.provide("ModalFaultMessageDialog");
  22021. dojo.declare("ModalFaultMessageDialog",IFaultDialog,{m_errorMessage:"",m_errorDetails:"",constructor:function(_12a2,_12a3){
  22022. this.m_errorMessage=_12a2;
  22023. this.m_errorDetails=_12a3;
  22024. },getErrorMessage:function(){
  22025. return this.m_errorMessage;
  22026. },getDetails:function(){
  22027. return this.m_errorDetails;
  22028. },show:function(){
  22029. bux.messageBox(bux.MB_ERROR,this.getErrorMessage(),"",this.getDetails());
  22030. }});
  22031. dojo.provide("MissingMemberFaultDialog");
  22032. dojo.declare("MissingMemberFaultDialog",FaultDialog,{m_oCV:null,m_errorMessage:null,m_bHasBUACapability:false,m_bHasParameters:false,constructor:function(oCV,_12a5,_12a6,_12a7){
  22033. this.m_errorMessage=_12a5;
  22034. this.m_bHasBUACapability=_12a6;
  22035. this.m_bHasParameters=_12a7;
  22036. },getErrorMessage:function(){
  22037. return this.m_errorMessage;
  22038. },canRetryRequest:function(){
  22039. return false;
  22040. },getButtons:function(){
  22041. var _12a8=[];
  22042. if(this.m_bHasBUACapability){
  22043. _12a8.push({label:RV_RES.IDS_JS_EDIT,action:dojo.hitch(this,this.invokeEditContentAction)});
  22044. }
  22045. _12a8.push({label:RV_RES.IDS_JS_CLOSE,action:dojo.hitch(this,this.ok)});
  22046. return _12a8;
  22047. },invokeEditContentAction:function(){
  22048. var _12a9={};
  22049. _12a9.oFaultDialog=this;
  22050. _12a9.bHasParameters=this.m_bHasParameters;
  22051. this.m_oCV.executeAction("EditContent",{"MissingMemberRecoveryMode":_12a9});
  22052. }});
  22053. function ViewerDispatcher(){
  22054. this.m_activeRequest=null;
  22055. this.m_requestQueue=[];
  22056. this.m_bUsePageRequest=false;
  22057. };
  22058. ViewerDispatcher.prototype.getActiveRequest=function(){
  22059. return this.m_activeRequest;
  22060. };
  22061. ViewerDispatcher.prototype.setUsePageRequest=function(_12aa){
  22062. this.m_bUsePageRequest=_12aa;
  22063. };
  22064. ViewerDispatcher.prototype.getUsePageRequest=function(){
  22065. return this.m_bUsePageRequest;
  22066. };
  22067. ViewerDispatcher.prototype.dispatchRequest=function(_12ab){
  22068. if(this.m_activeRequest==null){
  22069. this.startRequest(_12ab);
  22070. }else{
  22071. if(_12ab.canBeQueued()==true){
  22072. this.m_requestQueue.push(_12ab);
  22073. }else{
  22074. if(window.cognosViewerDebug&&console&&console.warn){
  22075. console.warn("Warning! Dropped a dispatcher entry!");
  22076. }
  22077. }
  22078. }
  22079. };
  22080. ViewerDispatcher.prototype.startRequest=function(_12ac){
  22081. this.m_activeRequest=_12ac;
  22082. if(_12ac!=null){
  22083. _12ac.setUsePageRequest(this.m_bUsePageRequest);
  22084. _12ac.sendRequest();
  22085. }
  22086. };
  22087. ViewerDispatcher.prototype.cancelRequest=function(key){
  22088. for(var i=0;i<this.m_requestQueue.length;i++){
  22089. var _12af=this.m_requestQueue[i];
  22090. if(_12af.getKey()===key){
  22091. _12af.setCallbacks({"onEntryComplete":null});
  22092. _12af.cancelRequest(false);
  22093. this.m_requestQueue.splice(i,1);
  22094. i--;
  22095. }
  22096. }
  22097. if(this.m_activeRequest&&this.m_activeRequest.getKey()===key){
  22098. this.m_activeRequest.setCallbacks({"onEntryComplete":null});
  22099. this.m_activeRequest.cancelRequest(false);
  22100. this.requestComplete();
  22101. }
  22102. };
  22103. ViewerDispatcher.prototype.possibleUnloadEvent=function(){
  22104. if(this.m_activeRequest){
  22105. this.m_activeRequest.possibleUnloadEvent();
  22106. }
  22107. };
  22108. ViewerDispatcher.prototype.requestComplete=function(_12b0){
  22109. this.startRequest(this.nextRequest());
  22110. };
  22111. ViewerDispatcher.prototype.nextRequest=function(){
  22112. var _12b1=null;
  22113. if(this.m_requestQueue.length>0){
  22114. _12b1=this.m_requestQueue.shift();
  22115. if(_12b1.getKey()!=null){
  22116. while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12b1.getKey()){
  22117. _12b1=this.m_requestQueue.shift();
  22118. }
  22119. }
  22120. }
  22121. return _12b1;
  22122. };
  22123. ViewerDispatcher.prototype.queueIsEmpty=function(){
  22124. return (this.m_requestQueue.length==0);
  22125. };
  22126. function DispatcherEntry(oCV){
  22127. this.m_oCV=oCV;
  22128. this.m_requestKey=null;
  22129. this.m_canBeQueued=false;
  22130. this.m_originalFormFields=null;
  22131. this.m_bUsePageRequest=false;
  22132. if(oCV){
  22133. if(!this.m_request){
  22134. this.m_request=new XmlHttpObject();
  22135. this.m_request.init("POST",this.m_oCV.getGateway(),"",true);
  22136. }
  22137. if(!this.m_requestHandler){
  22138. this.setRequestHandler(new BaseRequestHandler(oCV));
  22139. }
  22140. DispatcherEntry.prototype.setDefaultFormFields.call(this);
  22141. 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}});
  22142. }
  22143. };
  22144. DispatcherEntry.prototype.setHeaders=function(_12b3){
  22145. this.m_request.setHeaders(_12b3);
  22146. };
  22147. DispatcherEntry.prototype.getHeaders=function(){
  22148. return this.m_request.getHeaders();
  22149. };
  22150. DispatcherEntry.prototype.setOriginalFormFields=function(_12b4){
  22151. this.m_originalFormFields=_12b4;
  22152. };
  22153. DispatcherEntry.prototype.getOriginalFormFields=function(){
  22154. return this.m_originalFormFields;
  22155. };
  22156. DispatcherEntry.prototype.setRequestHandler=function(_12b5){
  22157. _12b5.addCallbackHooks();
  22158. this.m_requestHandler=_12b5;
  22159. };
  22160. DispatcherEntry.prototype.getRequestHandler=function(){
  22161. return this.m_requestHandler;
  22162. };
  22163. DispatcherEntry.prototype.setWorkingDialog=function(_12b6){
  22164. if(this.getRequestHandler()){
  22165. this.m_requestHandler.setWorkingDialog(_12b6);
  22166. }
  22167. };
  22168. DispatcherEntry.prototype.setRequestIndicator=function(_12b7){
  22169. if(this.getRequestHandler()){
  22170. this.getRequestHandler().setRequestIndicator(_12b7);
  22171. }
  22172. };
  22173. DispatcherEntry.prototype.forceSynchronous=function(){
  22174. this.getRequest().forceSynchronous();
  22175. };
  22176. DispatcherEntry.prototype.setUsePageRequest=function(_12b8){
  22177. this.m_bUsePageRequest=_12b8;
  22178. };
  22179. DispatcherEntry.prototype.getUsePageRequest=function(){
  22180. return this.m_bUsePageRequest;
  22181. };
  22182. DispatcherEntry.prototype.setDefaultFormFields=function(){
  22183. var _12b9=this.getViewer().envParams;
  22184. this.addFormField("b_action","cognosViewer");
  22185. this.addFormField("cv.catchLogOnFault","true");
  22186. this.addDefinedNonNullFormField("protectParameters",_12b9["protectParameters"]);
  22187. this.addDefinedNonNullFormField("ui.routingServerGroup",_12b9["ui.routingServerGroup"]);
  22188. this.addDefinedNonNullFormField("cv.debugDirectory",_12b9["cv.debugDirectory"]);
  22189. this.addDefinedNonNullFormField("cv.showFaultPage",_12b9["cv.showFaultPage"]);
  22190. this.addDefinedNonNullFormField("cv.useRAPDrill",_12b9["cv.useRAPDrill"]);
  22191. this.addDefinedNonNullFormField("container",_12b9["container"]);
  22192. this.addNonEmptyStringFormField("cv.objectPermissions",_12b9["cv.objectPermissions"]);
  22193. };
  22194. DispatcherEntry.prototype.getViewer=function(){
  22195. return this.m_oCV;
  22196. };
  22197. DispatcherEntry.prototype.prepareRequest=function(){
  22198. };
  22199. DispatcherEntry.addWidgetInfoToFormFields=function(_12ba,_12bb){
  22200. if(_12ba){
  22201. var _12bc=_12ba.getBUXRTStateInfoMap();
  22202. if(_12bc){
  22203. _12bb.addFormField("cv.buxRTStateInfo",_12bc);
  22204. }
  22205. var _12bd=_12ba.getDisplayName();
  22206. if(_12bd&&_12bd.length>0){
  22207. _12bb.addFormField("displayTitle",_12bd);
  22208. }
  22209. }
  22210. };
  22211. DispatcherEntry.prototype.canBeQueued=function(){
  22212. return this.m_canBeQueued;
  22213. };
  22214. DispatcherEntry.prototype.setCanBeQueued=function(_12be){
  22215. this.m_canBeQueued=_12be;
  22216. };
  22217. DispatcherEntry.prototype.getKey=function(){
  22218. return this.m_requestKey;
  22219. };
  22220. DispatcherEntry.prototype.setKey=function(key){
  22221. this.m_requestKey=key;
  22222. };
  22223. DispatcherEntry.prototype.setRequest=function(_12c0){
  22224. this.m_request=_12c0;
  22225. };
  22226. DispatcherEntry.prototype.getRequest=function(){
  22227. return this.m_request;
  22228. };
  22229. DispatcherEntry.prototype.setCallbacks=function(_12c1){
  22230. this.getRequest().setCallbacks(_12c1);
  22231. };
  22232. DispatcherEntry.prototype.getCallbacks=function(){
  22233. return this.getRequest().getCallbacks();
  22234. };
  22235. DispatcherEntry.prototype.sendRequest=function(){
  22236. this.prepareRequest();
  22237. var _12c2=this.getRequest().getFormFields();
  22238. var _12c3=_12c2.keys();
  22239. if(!this.m_originalFormFields){
  22240. this.m_originalFormFields=new CDictionary();
  22241. for(var index=0;index<_12c3.length;index++){
  22242. this.m_originalFormFields.add(_12c3[index],_12c2.get(_12c3[index]));
  22243. }
  22244. }
  22245. this.getRequest().sendRequest();
  22246. };
  22247. DispatcherEntry.prototype.onNewRequest=function(_12c5){
  22248. this.setRequest(_12c5);
  22249. };
  22250. DispatcherEntry.prototype.retryRequest=function(){
  22251. var oCV=this.getViewer();
  22252. oCV.setRetryDispatcherEntry(null);
  22253. var _12c7=this.getRequest().newRequest();
  22254. _12c7.setHeaders(null);
  22255. this.setRequest(_12c7);
  22256. var _12c8=this.m_originalFormFields.keys();
  22257. for(var index=0;index<_12c8.length;index++){
  22258. var _12ca=_12c8[index];
  22259. var _12cb=this.m_originalFormFields.get(_12ca);
  22260. if(_12ca=="cv.responseFormat"&&_12cb=="iWidget"){
  22261. this.addFormField("cv.responseFormat","data");
  22262. }else{
  22263. if(_12ca=="ui.action"&&_12cb=="wait"){
  22264. this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
  22265. }else{
  22266. if(_12ca!="m_tracking"&&_12ca!="cv.outputKey"){
  22267. this.addFormField(_12ca,_12cb);
  22268. }
  22269. }
  22270. }
  22271. }
  22272. this.addFormField("widget.reloadToolbar","true");
  22273. if(this.m_oCV.getViewerWidget()){
  22274. this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole());
  22275. }
  22276. this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]);
  22277. this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]);
  22278. this.m_oCV.getViewerDispatcher().dispatchRequest(this);
  22279. };
  22280. DispatcherEntry.prototype.abortHttpRequest=function(){
  22281. if(!this.m_bCancelCalled){
  22282. if(this.getRequestHandler()){
  22283. this.getRequestHandler().onCancel();
  22284. }
  22285. this.m_bCancelCalled=true;
  22286. this.getRequest().abortHttpRequest();
  22287. this.onEntryComplete();
  22288. }
  22289. };
  22290. DispatcherEntry.prototype.cancelRequest=function(_12cc){
  22291. if(!this.m_bCancelCalled){
  22292. this.m_bCancelCalled=true;
  22293. if(this.getRequestHandler()){
  22294. this.getRequestHandler().onCancel();
  22295. }
  22296. if(_12cc){
  22297. this.getRequest().forceSynchronous();
  22298. }
  22299. this.getRequest().cancel();
  22300. this.onEntryComplete();
  22301. }
  22302. };
  22303. DispatcherEntry.prototype.getFormFields=function(){
  22304. return this.m_request.getFormFields();
  22305. };
  22306. DispatcherEntry.prototype.getFormField=function(name){
  22307. if(this.m_request){
  22308. return this.m_request.getFormField(name);
  22309. }else{
  22310. return "";
  22311. }
  22312. };
  22313. DispatcherEntry.prototype.clearFormFields=function(){
  22314. this.m_request.clearFormFields();
  22315. };
  22316. DispatcherEntry.prototype.formFieldExists=function(name){
  22317. if(this.m_request){
  22318. return this.m_request.getFormFields().exists(name);
  22319. }
  22320. return false;
  22321. };
  22322. DispatcherEntry.prototype.removeFormField=function(name){
  22323. if(this.formFieldExists(name)){
  22324. this.m_request.getFormFields().remove(name);
  22325. }
  22326. };
  22327. DispatcherEntry.prototype.addFormField=function(name,value){
  22328. this.m_request.addFormField(name,value);
  22329. };
  22330. DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,value){
  22331. if(typeof value!="undefined"&&value!=null){
  22332. this.addFormField(name,value);
  22333. }
  22334. };
  22335. DispatcherEntry.prototype.addDefinedFormField=function(name,value){
  22336. if(typeof value!="undefined"){
  22337. this.addFormField(name,value);
  22338. }
  22339. };
  22340. DispatcherEntry.prototype.addNonNullFormField=function(name,value){
  22341. if(value!=null){
  22342. this.addFormField(name,value);
  22343. }
  22344. };
  22345. DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,value){
  22346. if(typeof value!="undefined"&&value!=null&&value!=""){
  22347. this.addFormField(name,value);
  22348. }
  22349. };
  22350. DispatcherEntry.prototype.onWorking=function(_12da,arg1){
  22351. if(this.getRequestHandler()){
  22352. this.getRequestHandler().onWorking(_12da);
  22353. }
  22354. };
  22355. DispatcherEntry.prototype.onFault=function(_12dc){
  22356. if(this.getRequestHandler()){
  22357. this.getRequestHandler().onFault(_12dc);
  22358. }
  22359. };
  22360. DispatcherEntry.prototype.onError=function(_12dd){
  22361. if(this.m_bCancelCalled){
  22362. return;
  22363. }
  22364. if(this.getRequestHandler()){
  22365. this.getRequestHandler().onError(_12dd);
  22366. }
  22367. };
  22368. DispatcherEntry.prototype.possibleUnloadEvent=function(){
  22369. this.setCallbacks({"error":{}});
  22370. };
  22371. DispatcherEntry.prototype.onPreHttpRequest=function(_12de){
  22372. if(this.getRequestHandler()){
  22373. this.getRequestHandler().preHttpRequest(_12de);
  22374. }
  22375. };
  22376. DispatcherEntry.prototype.onPostHttpRequest=function(_12df){
  22377. if(this.getRequestHandler()){
  22378. this.getRequestHandler().postHttpRequest(_12df);
  22379. }
  22380. };
  22381. DispatcherEntry.prototype.onPassportTimeout=function(_12e0){
  22382. if(this.getRequestHandler()){
  22383. this.getRequestHandler().onPassportTimeout(_12e0);
  22384. }
  22385. };
  22386. DispatcherEntry.prototype.onPrompting=function(_12e1){
  22387. if(this.getRequestHandler()){
  22388. this.getRequestHandler().onPrompting(_12e1);
  22389. }
  22390. };
  22391. DispatcherEntry.prototype.onEntryComplete=function(_12e2){
  22392. if(!this.m_oCV._beingDestroyed){
  22393. this.m_oCV.getViewerDispatcher().requestComplete(this);
  22394. }
  22395. };
  22396. DispatcherEntry.prototype.onEntryFault=function(_12e3){
  22397. this.m_oCV.setFaultDispatcherEntry(this);
  22398. this.m_oCV.resetViewerDispatcher();
  22399. if(!this.m_bCancelCalled){
  22400. this.m_oCV.setRetryDispatcherEntry(this);
  22401. }
  22402. };
  22403. DispatcherEntry.prototype.onCloseErrorDlg=function(){
  22404. var _12e4=this.getCallbacks();
  22405. if(_12e4["closeErrorDlg"]){
  22406. var _12e5=GUtil.generateCallback(_12e4["closeErrorDlg"].method,[],_12e4["closeErrorDlg"].object);
  22407. _12e5();
  22408. }
  22409. };
  22410. DispatcherEntry.prototype.onPostEntryComplete=function(){
  22411. if(this.getRequestHandler()){
  22412. this.getRequestHandler().onPostEntryComplete();
  22413. }
  22414. this.executeCallback("postComplete");
  22415. };
  22416. DispatcherEntry.prototype.executeCallback=function(_12e6){
  22417. var _12e7=this.getCallbacks();
  22418. if(_12e7[_12e6]){
  22419. var _12e8=(_12e7.customArguments)?[this,_12e7.customArguments]:[this];
  22420. var _12e9=GUtil.generateCallback(_12e7[_12e6].method,_12e8,_12e7[_12e6].object);
  22421. _12e9();
  22422. return true;
  22423. }
  22424. return false;
  22425. };
  22426. function DataDispatcherEntry(oCV){
  22427. if(oCV){
  22428. this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()));
  22429. }
  22430. DataDispatcherEntry.baseConstructor.call(this,oCV);
  22431. };
  22432. DataDispatcherEntry.prototype=new DispatcherEntry();
  22433. DataDispatcherEntry.baseConstructor=DispatcherEntry;
  22434. function JSONDispatcherEntry(oCV){
  22435. if(oCV){
  22436. this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()));
  22437. }
  22438. JSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  22439. JSONDispatcherEntry.baseConstructor.call(this,oCV);
  22440. };
  22441. JSONDispatcherEntry.prototype=new DispatcherEntry();
  22442. JSONDispatcherEntry.baseConstructor=DispatcherEntry;
  22443. JSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  22444. this.addFormField("cv.responseFormat","JSON");
  22445. };
  22446. function AsynchDataDispatcherEntry(oCV){
  22447. if(oCV){
  22448. var _12ed=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
  22449. this.setRequest(_12ed);
  22450. AsynchDataDispatcherEntry.baseConstructor.call(this,oCV);
  22451. AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this);
  22452. }
  22453. };
  22454. AsynchDataDispatcherEntry.prototype=new DispatcherEntry();
  22455. AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry;
  22456. AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){
  22457. this.addFormField("cv.responseFormat","data");
  22458. };
  22459. function AsynchJSONDispatcherEntry(oCV){
  22460. if(oCV){
  22461. var _12ef=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
  22462. this.setRequest(_12ef);
  22463. AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV);
  22464. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
  22465. }
  22466. };
  22467. AsynchJSONDispatcherEntry.prototype=new DispatcherEntry();
  22468. AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry;
  22469. AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){
  22470. this.addFormField("cv.responseFormat","asynchJSON");
  22471. };
  22472. function ReportDispatcherEntry(oCV){
  22473. ReportDispatcherEntry.baseConstructor.call(this,oCV);
  22474. if(oCV){
  22475. ReportDispatcherEntry.prototype.setDefaultFormFields.call(this);
  22476. this.setRequestHandler(new RequestHandler(oCV));
  22477. this.setWorkingDialog(oCV.getWorkingDialog());
  22478. this.setRequestIndicator(oCV.getRequestIndicator());
  22479. this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}});
  22480. }
  22481. };
  22482. ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry();
  22483. ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry;
  22484. ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype;
  22485. ReportDispatcherEntry.prototype.prepareRequest=function(){
  22486. var _12f1=this.getFormField("ui.action");
  22487. var _12f2=this.getViewer().getActionState();
  22488. if(_12f2!==""&&(_12f1=="wait"||_12f1=="forward"||_12f1=="back")){
  22489. this.addFormField("cv.actionState",_12f2);
  22490. }
  22491. var _12f3=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
  22492. var _12f4=true;
  22493. for(var i=0;i<_12f3.length;i++){
  22494. if(_12f3[i]==_12f1){
  22495. _12f4=false;
  22496. break;
  22497. }
  22498. }
  22499. if(_12f4){
  22500. this.getViewer().clearTabs();
  22501. }
  22502. if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){
  22503. this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab());
  22504. }
  22505. };
  22506. ReportDispatcherEntry.prototype.setDefaultFormFields=function(){
  22507. var oCV=this.getViewer();
  22508. var _12f7=oCV.envParams;
  22509. this.addFormField("cv.id",oCV.getId());
  22510. if(_12f7["cv.showFaultPage"]){
  22511. this.addFormField("cv.showFaultPage",_12f7["cv.showFaultPage"]);
  22512. }else{
  22513. this.addFormField("cv.showFaultPage","false");
  22514. }
  22515. this.addDefinedNonNullFormField("ui.object",_12f7["ui.object"]);
  22516. this.addDefinedNonNullFormField("ui.primaryAction",_12f7["ui.primaryAction"]);
  22517. this.addDefinedNonNullFormField("ui.objectClass",_12f7["ui.objectClass"]);
  22518. this.addNonEmptyStringFormField("specificationType",_12f7["specificationType"]);
  22519. this.addNonEmptyStringFormField("cv.promptForDownload",_12f7["cv.promptForDownload"]);
  22520. this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
  22521. this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
  22522. var _12f8=oCV.getExecutionParameters();
  22523. this.addNonEmptyStringFormField("executionParameters",_12f8);
  22524. var sCAF=oCV.getCAFContext();
  22525. this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
  22526. };
  22527. ReportDispatcherEntry.prototype.onWorking=function(_12fa,arg1){
  22528. var _12fc=_12fa.getResponseState();
  22529. var _12fd=this.getRequestHandler();
  22530. if(_12fd){
  22531. var _12fe=_12fd.getWorkingDialog();
  22532. if(_12fe&&_12fe.setSecondaryRequests&&_12fc.m_aSecRequests){
  22533. _12fe.setSecondaryRequests(_12fc.m_aSecRequests);
  22534. }
  22535. }
  22536. DispatcherEntry.prototype.onWorking.call(this,_12fa,arg1);
  22537. if(_12fd){
  22538. this.getRequestHandler().updateViewerState(_12fc);
  22539. }
  22540. };
  22541. ReportDispatcherEntry.prototype.onComplete=function(_12ff,arg1){
  22542. if(this.getRequestHandler()){
  22543. this.getRequestHandler().onComplete(_12ff);
  22544. }
  22545. };
  22546. function ViewerDispatcherEntry(oCV){
  22547. ViewerDispatcherEntry.baseConstructor.call(this,oCV);
  22548. if(oCV){
  22549. ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this);
  22550. this.setCallbacks({"prompting":{"object":this,"method":this.onPrompting}});
  22551. var _1302=oCV.getViewerWidget();
  22552. if(_1302.m_originalFormFields){
  22553. this.setOriginalFormFields(_1302.m_originalFormFields);
  22554. _1302.m_originalFormFields=null;
  22555. }
  22556. }
  22557. };
  22558. ViewerDispatcherEntry.prototype=new ReportDispatcherEntry();
  22559. ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry;
  22560. ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype;
  22561. ViewerDispatcherEntry.prototype.prepareRequest=function(){
  22562. this.parent.prepareRequest.call(this);
  22563. var _1303=this.getViewer().getViewerWidget();
  22564. if(this.getFormField("widget.reloadToolbar")){
  22565. this.addFormField("cv.buxCurrentUserRole",_1303.getUserRole());
  22566. }
  22567. if(_1303){
  22568. DispatcherEntry.addWidgetInfoToFormFields(_1303,this);
  22569. }
  22570. this.getViewer().inlineScriptsDoneExecuting=false;
  22571. };
  22572. ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){
  22573. var oCV=this.getViewer();
  22574. var _1305=oCV.getViewerWidget();
  22575. var _1306=oCV.envParams;
  22576. this.addFormField("bux","true");
  22577. this.addFormField("cv.showFaultPage","false");
  22578. this.addDefinedNonNullFormField("baseReportModificationTime",_1306["baseReportModificationTime"]);
  22579. this.addDefinedNonNullFormField("originalReport",_1306["originalReport"]);
  22580. this.addDefinedNonNullFormField("ui.reportDrop",_1306["ui.reportDrop"]);
  22581. this.addDefinedNonNullFormField("ui.preserveRapTags",_1306["ui.preserveRapTags"]);
  22582. if(_1305.getProperties()){
  22583. var _1307=_1305.getProperties().getFlashCharts();
  22584. if(_1307!=null){
  22585. this.addDefinedNonNullFormField("savedFlashChartOption",_1307);
  22586. if(_1306.hasAVSChart){
  22587. this.addDefinedNonNullFormField("hasAVSChart",_1306.hasAVSChart);
  22588. }else{
  22589. this.addDefinedNonNullFormField("hasAVSChart",oCV.hasAVSChart());
  22590. }
  22591. }
  22592. }
  22593. var _1308=_1305.getAttributeValue("gateway");
  22594. if(_1308){
  22595. this.addDefinedNonNullFormField("cv.gateway",_1308);
  22596. }
  22597. var _1309=_1305.getAttributeValue("webcontent");
  22598. if(_1309){
  22599. this.addDefinedNonNullFormField("cv.webcontent",_1309);
  22600. }
  22601. if(oCV.envParams["cv.outputKey"]){
  22602. this.addFormField("cv.outputKey",oCV.envParams["cv.outputKey"]);
  22603. this.addFormField("b_action","cvx.high");
  22604. delete oCV.envParams["cv.outputKey"];
  22605. }
  22606. if(_1305.getXNodeId()){
  22607. this.setHeaders({"X-Node-ID":_1305.getXNodeId()});
  22608. _1305.setXNodeId(null);
  22609. }
  22610. };
  22611. ViewerDispatcherEntry.prototype.onPrompting=function(_130a){
  22612. if(this.getRequestHandler()){
  22613. this.getRequestHandler().onPrompting(_130a);
  22614. }
  22615. };
  22616. function Blocker(oCVId){
  22617. this.oCV_Id=oCVId;
  22618. this.m_viewerDiv=dojo.byId("RVContent"+this.oCV_Id);
  22619. this.m_containerDiv=this._findContainerDiv();
  22620. this.initialize();
  22621. };
  22622. Blocker.prototype._findContainerDiv=function(){
  22623. var _130c=null;
  22624. if(!this.m_containerDiv){
  22625. _130c=this.m_viewerDiv;
  22626. while(_130c){
  22627. if(_130c.style&&_130c.style.height&&_130c.style.height.indexOf("px")!=-1){
  22628. return _130c;
  22629. }
  22630. _130c=_130c.parentNode;
  22631. }
  22632. }
  22633. if(typeof console!="undefined"&&console&&console.log){
  22634. console.log("ViewerIWidgetInlineDialog: Could not find the container div for showing the dialog.");
  22635. }
  22636. return this.m_viewerDiv;
  22637. };
  22638. Blocker.prototype.setClassNameOverride=function(_130d){
  22639. if(!_130d){
  22640. return;
  22641. }
  22642. this.m_classNameOverride=_130d;
  22643. this.applyClassNameOverride();
  22644. };
  22645. Blocker.prototype.applyClassNameOverride=function(){
  22646. if(!this.m_classNameOverride||!this.m_background){
  22647. return;
  22648. }
  22649. dojo.removeClass(this.m_background);
  22650. dojo.addClass(this.m_background,this.m_classNameOverride);
  22651. };
  22652. Blocker.prototype.getNode=function(){
  22653. return this.m_background;
  22654. };
  22655. Blocker.prototype.initialize=function(){
  22656. if(!this.m_background){
  22657. this.m_background=dojo.byId("BACKGROUND"+this.oCV_Id);
  22658. if(!this.m_background){
  22659. this.m_background=document.createElement("div");
  22660. this.m_background.id="BACKGROUND"+this.oCV_Id;
  22661. this.m_background.className="report-blocker";
  22662. this.m_background.tabIndex="0";
  22663. dojo.place(this.m_background,this.m_containerDiv,"before");
  22664. }
  22665. }
  22666. };
  22667. Blocker.prototype.show=function(){
  22668. if(this.m_background){
  22669. this.m_background.style.display="block";
  22670. }
  22671. };
  22672. Blocker.prototype.hide=function(){
  22673. if(this.m_background){
  22674. this.m_background.style.display="none";
  22675. }
  22676. };
  22677. Blocker.prototype.destroy=function(){
  22678. if(this.m_background!=null){
  22679. this.m_background.parentNode.removeChild(this.m_background);
  22680. this.m_background=null;
  22681. }
  22682. };
  22683. function ReselectAction(oCV,_130f){
  22684. this.m_aSelectionFilterObjects=_130f;
  22685. this.m_oCV=oCV;
  22686. this.m_oSC=oCV.getSelectionController();
  22687. this.m_cd=this.m_oSC.getCCDManager().m_cd;
  22688. this.m_md=this.m_oSC.getCCDManager().m_md;
  22689. this.m_nReportDiv=oCV.getReportDiv();
  22690. this.m_oRAPReportContainers=oCV.getRAPReportInfo().getContainers();
  22691. };
  22692. ReselectAction.prototype.executeAction=function(){
  22693. this.mapCdMd();
  22694. if(this.show()){
  22695. var oVW=this.m_oCV.getViewerWidget();
  22696. if(oVW){
  22697. var _1311=oVW.m_oWidgetContextManager.genSelectionPayload(this.m_oCV,oVW.getWidgetId());
  22698. oVW.setSelectionFilterSent(true);
  22699. oVW.fireEvent("com.ibm.bux.data.filterCache.init",null,_1311);
  22700. if(oVW.isPastedWidget()&&!oVW.pastedSelectedBroadcasted){
  22701. oVW.pastedSelectedBroadcasted=true;
  22702. oVW.onSelectionChange();
  22703. }
  22704. }
  22705. }
  22706. };
  22707. ReselectAction.prototype.mapCdMd=function(){
  22708. var _1312=this.m_aSelectionFilterObjects;
  22709. for(var i in _1312){
  22710. var _1314=_1312[i];
  22711. var oItem=_1314.selectedItem;
  22712. var aCtx=[];
  22713. var _1317=null;
  22714. var _1318=this._findMdIndex("q",_1314.query);
  22715. _1317=this._setNewCtx(oItem,_1318);
  22716. if(_1317){
  22717. aCtx.push(_1317);
  22718. }else{
  22719. continue;
  22720. }
  22721. for(var j in _1314.context){
  22722. var _131a=_1314.context[j];
  22723. _1317=this._setNewCtx(_131a,_1318);
  22724. if(_1317){
  22725. aCtx.push(_1317);
  22726. }
  22727. }
  22728. _1314.ctxArray=aCtx;
  22729. }
  22730. };
  22731. ReselectAction.prototype._setNewCtx=function(oItem,_131c){
  22732. var _131d=null;
  22733. var ctxId=null;
  22734. if(oItem.isMeasure==="true"){
  22735. _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c);
  22736. if(_131d){
  22737. oItem.ctxRef={"property":oItem.mdProperty,"mdIndex":_131d};
  22738. return oItem.ctxRef;
  22739. }
  22740. }else{
  22741. if(oItem.mun){
  22742. _131d=this._findMdIndex("m",oItem.mun,_131c);
  22743. ctxId=this._getContextIdForCdProperty(_131c,"m",_131d);
  22744. }else{
  22745. _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c);
  22746. ctxId=this._getContextIdForCdPropertyAndMdProperty(_131c,"u",oItem.use,oItem.mdProperty,_131d);
  22747. }
  22748. if(ctxId){
  22749. oItem.ctxId=ctxId;
  22750. return oItem.ctxId;
  22751. }
  22752. }
  22753. return null;
  22754. };
  22755. ReselectAction.prototype._getContextIdForCdProperty=function(_131f,_1320,_1321){
  22756. var ctxid=null;
  22757. for(var j in this.m_cd){
  22758. if(this.m_cd[j].q==_131f&&this.m_cd[j][_1320]==_1321){
  22759. ctxid=j;
  22760. break;
  22761. }
  22762. }
  22763. return ctxid;
  22764. };
  22765. ReselectAction.prototype._getContextIdForCdPropertyAndMdProperty=function(_1324,_1325,_1326,_1327,_1328){
  22766. var ctxid=null;
  22767. for(var j in this.m_cd){
  22768. if(this.m_cd[j].q==_1324&&this.m_cd[j][_1327]==_1328&&this.m_cd[j][_1325]==_1326){
  22769. ctxid=j;
  22770. break;
  22771. }
  22772. }
  22773. return ctxid;
  22774. };
  22775. ReselectAction.prototype._findMdIndex=function(_132b,value,_132d){
  22776. var _132e=null;
  22777. for(var j in this.m_md){
  22778. if(this.m_md[j][_132b]===value){
  22779. if(this.m_md[j]["q"]&&_132d){
  22780. if(this.m_md[j]["q"]==_132d){
  22781. _132e=j;
  22782. break;
  22783. }
  22784. }else{
  22785. _132e=j;
  22786. break;
  22787. }
  22788. }
  22789. }
  22790. return _132e;
  22791. };
  22792. ReselectAction.prototype.show=function(){
  22793. var _1330=false;
  22794. var oCV=this.m_oCV;
  22795. var oVW=oCV.getViewerWidget();
  22796. var _1333=oCV.getReportDiv();
  22797. var _1334=null;
  22798. var _1335=null;
  22799. var _1336=null;
  22800. oVW.preprocessPageClicked(false);
  22801. if(oVW&&_1333){
  22802. for(var _1337 in this.m_aSelectionFilterObjects){
  22803. var _1338=this.m_aSelectionFilterObjects[_1337];
  22804. var _1339=(_1338.selectedItem.isMeasure==="true");
  22805. var _133a=true;
  22806. if(_1339){
  22807. var _133b=_1338.context;
  22808. for(var idx in _133b){
  22809. if(_133b[idx].isMeasure!=="true"){
  22810. _133a=false;
  22811. break;
  22812. }
  22813. }
  22814. if(_133a){
  22815. continue;
  22816. }
  22817. }
  22818. var aCtx=_1338.ctxArray;
  22819. if(aCtx&&aCtx.length>0){
  22820. _1334=this._getLayoutContainers(_1338.lid);
  22821. var _133e=false;
  22822. for(var _133f=0;!_133e&&_133f<_1334.length;_133f++){
  22823. if(/img|IMG/.test(_1334[_133f].tagName)){
  22824. var _1340=_1334[_133f];
  22825. for(_1336=null;!_1336&&_1340.parentNode;){
  22826. _1340=_1340.parentNode;
  22827. var _1341=_1340.getElementsByTagName("map");
  22828. if(_1341&&_1341.length>0){
  22829. _1336=_1341[0];
  22830. }
  22831. }
  22832. }else{
  22833. _1336=_1334[_133f].parentNode;
  22834. }
  22835. if(_1336){
  22836. var _1342=this._buildCtxQueryRegExp(aCtx);
  22837. _1335=getElementsByAttribute(_1336,"*","ctx",null,-1,_1342);
  22838. var _1343=_1338.selectedItem;
  22839. for(var idx in _1335){
  22840. if(_1335[idx].getAttribute){
  22841. if(_1339&&_1343.isDataValueOrChartElement==="false"&&(_1335[idx].getAttribute("type")==="datavalue"||_1335[idx].getAttribute("type")==="chartElement")){
  22842. continue;
  22843. }
  22844. if(this.isMatchingCell(aCtx,_1335[idx])){
  22845. var _1344=_1335[idx];
  22846. if(_1344.tagName==="SPAN"||_1344.tagName==="span"){
  22847. var _1345=_1344.parentNode.tagName;
  22848. if(_1345=="td"||_1345=="TD"||_1345=="TH"||_1345=="th"){
  22849. if(_1344.parentNode.getAttribute("ctx")==_1344.getAttribute("ctx")){
  22850. continue;
  22851. }
  22852. }
  22853. }
  22854. var evt={"target":_1344,"button":1,"ctrlKey":true};
  22855. this.m_oSC.pageClicked(evt);
  22856. _133e=true;
  22857. _1330=true;
  22858. }
  22859. }
  22860. }
  22861. }
  22862. }
  22863. }
  22864. }
  22865. }
  22866. return _1330;
  22867. };
  22868. ReselectAction.prototype.isMatchingCell=function(aCtx,_1348){
  22869. var _1349=_1348.getAttribute("ctx");
  22870. if(!_1349||_1349.length==0){
  22871. return false;
  22872. }
  22873. var _134a=_1349.replace(/::/g,":").split(":");
  22874. var _134b=0;
  22875. var _134c=null;
  22876. var _134d=0;
  22877. var _134e=null;
  22878. var _134f=0;
  22879. var _1350=false;
  22880. for(;_134b<_134a.length;_134b++){
  22881. if(_134a[_134b].length>0){
  22882. _134c=_134a[_134b++];
  22883. break;
  22884. }
  22885. }
  22886. _134e=aCtx[_134d];
  22887. if(typeof _134e=="string"){
  22888. if(_134e==_134c){
  22889. _134f++;
  22890. }
  22891. }else{
  22892. if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){
  22893. _134f++;
  22894. }
  22895. }
  22896. if(_134f!=1){
  22897. return false;
  22898. }
  22899. if(aCtx.length==1){
  22900. _1350=true;
  22901. }
  22902. for(_134d=1;!_1350&&_134d<aCtx.length;_134d++){
  22903. _134e=aCtx[_134d];
  22904. if(typeof _134e=="string"){
  22905. for(_134b=1;_134b<_134a.length;_134b++){
  22906. if(_134a[_134b].length>0&&_134a[_134b]!="0"){
  22907. _134c=_134a[_134b];
  22908. if(_134e==_134c){
  22909. _134f++;
  22910. _134a[_134b]="0";
  22911. break;
  22912. }
  22913. }
  22914. }
  22915. }else{
  22916. for(_134b=1;_134b<_134a.length;_134b++){
  22917. if(_134a[_134b].length>0&&_134a[_134b]!="0"){
  22918. _134c=_134a[_134b];
  22919. if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){
  22920. _134f++;
  22921. _134a[_134b]="0";
  22922. break;
  22923. }
  22924. }
  22925. }
  22926. }
  22927. if(aCtx.length==_134f){
  22928. _1350=true;
  22929. }
  22930. }
  22931. return _1350;
  22932. };
  22933. ReselectAction.prototype._buildCtxQueryRegExp=function(aCtx){
  22934. var _1352="";
  22935. var _1353=false;
  22936. var i=0;
  22937. if(typeof aCtx[i]=="string"){
  22938. _1352+="^"+aCtx[i];
  22939. }else{
  22940. _1352+="^[\\d:]+";
  22941. }
  22942. i++;
  22943. var _1355="";
  22944. for(;!_1353&&i<aCtx.length;i++){
  22945. if(typeof aCtx[i]=="string"){
  22946. if(_1355.length>0){
  22947. _1355+="+";
  22948. }
  22949. _1355+=aCtx[i];
  22950. _1353=true;
  22951. }else{
  22952. if(i<aCtx.length-1){
  22953. if(_1355.length>0){
  22954. _1355+="+";
  22955. }
  22956. _1355+="[\\d:]";
  22957. }
  22958. }
  22959. }
  22960. if(_1355.length>0){
  22961. _1352+=":{1,}"+_1355;
  22962. }
  22963. return new RegExp(_1352);
  22964. };
  22965. ReselectAction.prototype._getLayoutContainers=function(sLid){
  22966. var _1357="";
  22967. if(this.m_oRAPReportContainers&&this.m_oRAPReportContainers[sLid]){
  22968. _1357=sLid+".+";
  22969. }else{
  22970. for(var name in this.m_oRAPReportContainers){
  22971. if(_1357.length>0){
  22972. _1357+="|";
  22973. }
  22974. _1357+=name+".+";
  22975. }
  22976. }
  22977. return getElementsByAttribute(this.m_nReportDiv,"*","lid",null,-1,new RegExp(_1357));
  22978. };