12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346 |
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Viewer
- *| (C) Copyright IBM Corp. 2014
- *|
- *| US Government Users Restricted Rights - Use, duplication or
- *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *|
- *+------------------------------------------------------------------------+
- */
- function CViewerHelper(){
- this.m_oCV=null;
- };
- CViewerHelper.prototype.getCVObjectRef=function(){
- return this.getCV().getObjectId();
- };
- CViewerHelper.prototype.getCV=function(){
- if(this.m_oCV){
- return this.m_oCV;
- }
- return window;
- };
- CViewerHelper.prototype.getCVId=function(){
- var _1="";
- if(this.m_oCV){
- _1=this.m_oCV.getId();
- }
- return _1;
- };
- CViewerHelper.prototype.setCV=function(_2){
- this.m_oCV=_2;
- };
- function CObserver(_3){
- this.m_subject=_3;
- this.m_observers=[];
- };
- function CObserver_attach(_4,_5,_6){
- if(_4==null||typeof _4.update!="function"){
- alert("Notification Frame Work Error : attach failed");
- return false;
- }
- var _7=new CState(this.m_subject,_4,_5?_5:null,_6?_6:null);
- this.m_observers[this.m_observers.length]=_7;
- return true;
- };
- function CObserver_detach(_8){
- };
- function CObserver_hasObserver(_9){
- var _a=false;
- for(var _b=0;_b<this.m_observers.length;_b++){
- if(this.m_observers[_b].getObserver()==_9){
- _a=true;
- break;
- }
- }
- return _a;
- };
- function CObserver_notify(_c){
- var i=0;
- if(typeof _c!="undefined"&&_c!=null){
- for(i=0;i<this.m_observers.length;++i){
- if(this.m_observers[i].getEvt()==_c){
- var _e=this.m_observers[i].getObserver();
- var _f=this.m_observers[i].getCallback();
- var _10=_e.update;
- _e.update=_f;
- _e.update(this.m_observers[i]);
- _e.update=_10;
- }
- }
- }else{
- for(i=0;i<this.m_observers.length;++i){
- this.m_observers[i].getObserver().update(this.m_observers[i].getSubject());
- }
- }
- };
- CObserver.prototype.attach=CObserver_attach;
- CObserver.prototype.detach=CObserver_detach;
- CObserver.prototype.notify=CObserver_notify;
- CObserver.prototype.hasObserver=CObserver_hasObserver;
- function CState(_11,_12,_13,evt){
- this.m_subject=_11;
- this.m_observer=_12;
- this.m_callback=_13;
- this.m_evt=evt;
- };
- function CState_getObserver(){
- return this.m_observer;
- };
- function CState_getCallback(){
- return this.m_callback;
- };
- function CState_getSubject(){
- return this.m_subject;
- };
- function CState_getEvt(){
- return this.m_evt;
- };
- CState.prototype.getObserver=CState_getObserver;
- CState.prototype.getCallback=CState_getCallback;
- CState.prototype.getSubject=CState_getSubject;
- CState.prototype.getEvt=CState_getEvt;
- function CParameterValueStringOperators(_15,_16,_17,_18){
- this.m_sBetween=_15;
- this.m_sNotBetween=_16;
- this.m_sLessThan=_17;
- this.m_sGreaterThan=_18;
- };
- function CParameterValues(){
- this.m_parameterValues=new CDictionary();
- };
- CParameterValues.prototype.length=function(){
- var _19=this.m_parameterValues.keys();
- if(typeof _19=="undefined"||_19==null){
- return 0;
- }
- return _19.length;
- };
- CParameterValues.prototype.getParameterValue=function(_1a){
- if(typeof _1a!="string"||_1a==""){
- return null;
- }
- if(this.m_parameterValues.exists(_1a)){
- return this.m_parameterValues.get(_1a);
- }
- return null;
- };
- CParameterValues.prototype.getAt=function(_1b){
- if(_1b<this.length()){
- var _1c=this.m_parameterValues.keys();
- if(this.m_parameterValues.exists(_1c[_1b])){
- return this.m_parameterValues.get(_1c[_1b]);
- }
- }
- return null;
- };
- CParameterValues.prototype.addParameterValue=function(_1d,_1e){
- var _1f=this.getParameterValue(_1d);
- if(_1f==null){
- _1f=new CParameterValue();
- _1f.setName(_1d);
- }
- _1f.addParmValueItem(_1e);
- this.m_parameterValues.add(_1d,_1f);
- };
- CParameterValues.prototype.removeParameterValue=function(_20){
- return (this.m_parameterValues.remove(_20)!=null);
- };
- CParameterValues.prototype.removeSimpleParmValueItem=function(_21,_22){
- var _23=this.getParameterValue(_21);
- if(_23==null){
- return false;
- }
- return _23.removeSimpleParmValueItem(_22);
- };
- CParameterValues.prototype.addSimpleParmValueItem=function(_24,_25,_26,_27){
- if(typeof _24!="string"||_24==""){
- return null;
- }
- if(typeof _25!="string"||_25==""){
- return null;
- }
- if(typeof _26!="string"){
- return null;
- }
- if(typeof _27!="string"||(_27!="false"&&_27!="true")){
- return null;
- }
- var _28=null;
- if(this.m_parameterValues.exists(_24)==false){
- _28=new CParameterValue(_24);
- this.m_parameterValues.add(_24,_28);
- }
- _28=this.m_parameterValues.get(_24);
- if(typeof _28=="undefined"||_28==null){
- return null;
- }
- var _29=_28.getParmValueItems();
- for(var _2a=0;_2a<_29.length;++_2a){
- var _2b=_29[_2a];
- if(_2b.getDisplayValue()==_26&&_2b.getUseValue()==_25){
- return;
- }
- }
- return _28.addSimpleParmValueItem(_25,_26,_27);
- };
- CParameterValues.prototype.getSimpleParmValueItem=function(_2c,_2d){
- var _2e=this.getParameterValue(_2c);
- if(_2e!=null){
- return _2e.getSimpleParmValueItem(_2d);
- }
- return null;
- };
- CParameterValues.prototype.load=function(_2f){
- return this.loadWithOptions(_2f,true);
- };
- CParameterValues.prototype.loadWithOptions=function(_30,_31){
- try{
- var _32=_30.childNodes;
- for(var _33=0;_33<_32.length;++_33){
- var _34=_32[_33];
- if(_34.nodeType==3){
- continue;
- }
- var _35=new CParameterValue();
- if(_35.load(_34)){
- var _36=_35.name();
- if(_36!=""){
- if(_31==true||_36.indexOf("credential:")!=0){
- this.m_parameterValues.add(_36,_35);
- }
- }
- }else{
- delete _35;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CParameterValues.prototype.buildXML=function(_37,_38,_39){
- var _3a=_38.createElement(_39);
- _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
- _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
- _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
- _37.XMLBuilderSetAttributeNodeNS(_3a,"xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");
- _37.XMLBuilderSetAttributeNodeNS(_3a,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
- _37.XMLBuilderSetAttributeNodeNS(_3a,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _38.documentElement.appendChild(_3a);
- var _3b=this.m_parameterValues.keys();
- for(var _3c=0;_3c<_3b.length;++_3c){
- if(this.m_parameterValues.exists(_3b[_3c])){
- var _3d=this.m_parameterValues.get(_3b[_3c]);
- _3d.generateXML(_37,_3a);
- }
- }
- return _3a;
- };
- CParameterValues.prototype.generateXML=function(_3e,_3f,_40){
- var _41="parameterValues";
- if(typeof _40!="undefined"&&_40!=null){
- _41=_40;
- }
- XMLBuilderSerializeNode(this.buildXML(_3e,_3f,_41));
- return XMLBuilderSerializeNode(_3f);
- };
- function CParameterValue(_42){
- this.m_name=_42;
- this.m_parmValueItems=[];
- };
- CParameterValue.prototype.name=function(){
- return this.m_name;
- };
- CParameterValue.prototype.setName=function(_43){
- this.m_name=_43;
- };
- CParameterValue.prototype.getParmValueItems=function(){
- return this.m_parmValueItems;
- };
- CParameterValue.prototype.length=function(){
- return this.m_parmValueItems.length;
- };
- CParameterValue.prototype.addParmValueItem=function(_44){
- this.m_parmValueItems.push(_44);
- };
- CParameterValue.prototype.addSimpleParmValueItem=function(_45,_46,_47){
- if(typeof _45!="string"||_45==""){
- return null;
- }
- if(typeof _46!="string"){
- return null;
- }
- if(typeof _47!="string"||(_47!="false"&&_47!="true")){
- return null;
- }
- var _48=new CSimpleParmValueItem(_45,_46,_47);
- this.m_parmValueItems.push(_48);
- return _48;
- };
- CParameterValue.prototype.removeSimpleParmValueItem=function(_49){
- if(typeof _49!="string"||_49==""){
- return false;
- }
- var _4a=[];
- var _4b=false;
- for(var _4c=0;_4c<this.length();++_4c){
- var _4d=this.m_parmValueItems[_4c];
- if(_4d instanceof CSimpleParmValueItem){
- if(_4d.getUseValue()==_49){
- _4b=true;
- continue;
- }
- }
- _4a.push(_4d);
- }
- this.m_parmValueItems=_4a;
- return _4b;
- };
- CParameterValue.prototype.getSimpleParmValueItem=function(_4e){
- if(typeof _4e!="string"||_4e==""){
- return null;
- }
- for(var _4f=0;_4f<this.length();++_4f){
- var _50=this.m_parmValueItems[_4f];
- if(_50 instanceof CSimpleParmValueItem){
- if(_50.getUseValue()==_4e){
- return _50;
- }
- }
- }
- return null;
- };
- CParameterValue.prototype.load=function(_51){
- var _52=_51.getAttributeNode("xsi:type");
- if(_52==null||_52.nodeValue!="bus:parameterValue"){
- return false;
- }
- var _53=XMLHelper_FindChildByTagName(_51,"name",false);
- if(_53==null){
- return false;
- }
- this.m_name=XMLHelper_GetText(_53);
- if(this.m_name==""){
- return false;
- }
- var _54=XMLHelper_FindChildByTagName(_51,"value",false);
- if(_54==null){
- return false;
- }
- var _55=_54.getAttributeNode("xsi:type");
- if(_55==null||_55.nodeValue!="SOAP-ENC:Array"){
- return false;
- }
- var _56=_54.getAttributeNode("SOAP-ENC:arrayType");
- if(_56==null||_56.nodeValue.indexOf("bus:parmValueItem[")==-1){
- return false;
- }
- var _57=_54.childNodes;
- for(var _58=0;_58<_57.length;++_58){
- var _59=_57[_58];
- if(_59.nodeType==3){
- continue;
- }
- var _5a=_59.getAttributeNode("xsi:type");
- if(_5a!=null){
- var _5b;
- var _5c;
- switch(_5a.nodeValue){
- case "bus:simpleParmValueItem":
- _5b=new CSimpleParmValueItem("","","");
- break;
- case "bus:boundRangeParmValueItem":
- _5b=new CBoundRangeParmValueItem();
- break;
- case "bus:unboundedEndRangeParmValueItem":
- _5b=new CUnboundedEndRangeParmValueItem();
- break;
- case "bus:unboundedStartRangeParmValueItem":
- _5b=new CUnboundedStartRangeParmValueItem();
- break;
- case "bus:hierarchicalParmValueItem":
- _5b=new CHierarchicalParmValueItem();
- break;
- default:
- return false;
- }
- _5c=_5b.load(_59);
- if(_5c){
- this.m_parmValueItems.push(_5b);
- }else{
- delete _5b;
- }
- }
- }
- return true;
- };
- CParameterValue.prototype.generateXML=function(_5d,_5e){
- var _5f=_5e.ownerDocument;
- var _60=_5f.createElement("item");
- _5d.XMLBuilderSetAttributeNodeNS(_60,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
- _5e.appendChild(_60);
- var _61=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_5f);
- _5d.XMLBuilderSetAttributeNodeNS(_61,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _61.appendChild(_5f.createTextNode(this.m_name));
- _60.appendChild(_61);
- var _62=_5d.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_5f);
- _5d.XMLBuilderSetAttributeNodeNS(_62,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- _5d.XMLBuilderSetAttributeNodeNS(_62,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _60.appendChild(_62);
- for(var _63=0;_63<this.m_parmValueItems.length;++_63){
- if(typeof this.m_parmValueItems[_63].generateXML!="undefined"){
- this.m_parmValueItems[_63].generateXML(_5d,_62);
- }
- }
- };
- CParameterValue.prototype.toString=function(_64){
- var _65="";
- for(var _66=0;_66<this.m_parmValueItems.length;++_66){
- if(_65!=""){
- _65+=", ";
- }
- if(typeof this.m_parmValueItems[_66].toString!="undefined"){
- _65+=this.m_parmValueItems[_66].toString(_64);
- }
- }
- return _65;
- };
- function CParmValueItem(){
- this.initialize("true");
- };
- CParmValueItem.prototype.getInclusiveValue=function(){
- return this.m_inclusiveValue;
- };
- CParmValueItem.prototype.setInclusiveValue=function(_67){
- this.m_inclusiveValue=_67;
- };
- CParmValueItem.prototype.initialize=function(_68){
- this.m_inclusiveValue=_68;
- };
- CParmValueItem.prototype.load=function(_69){
- this.m_inclusiveValue="true";
- var _6a=XMLHelper_FindChildByTagName(_69,"inclusive",false);
- if(_6a!=null){
- var _6b=XMLHelper_GetText(_6a);
- if(_6b=="true"||_6b=="false"){
- this.m_inclusiveValue=_6b;
- }
- }
- };
- CParmValueItem.prototype.generateXML=function(_6c,_6d){
- var _6e=_6d.ownerDocument;
- var _6f=_6c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:inclusive",_6e);
- _6c.XMLBuilderSetAttributeNodeNS(_6f,"xsi:type","xs:boolean","http://www.w3.org/2001/XMLSchema-instance");
- _6f.appendChild(_6e.createTextNode(this.m_inclusiveValue));
- _6d.appendChild(_6f);
- };
- function CSimpleParmValueItem(_70,_71,_72){
- CSimpleParmValueItem.baseclass.initialize.call(this,_72);
- this.m_useValue=_70;
- this.m_displayValue=_71;
- };
- CSimpleParmValueItem.prototype=new CParmValueItem();
- CSimpleParmValueItem.prototype.constructor=CSimpleParmValueItem;
- CSimpleParmValueItem.baseclass=CParmValueItem.prototype;
- CSimpleParmValueItem.prototype.getUseValue=function(){
- return this.m_useValue;
- };
- CSimpleParmValueItem.prototype.getDisplayValue=function(){
- return this.m_displayValue;
- };
- CSimpleParmValueItem.prototype.getParmValueItem=function(){
- return this.m_parmValueItem;
- };
- CSimpleParmValueItem.prototype.setDisplayValue=function(_73){
- this.m_displayValue=_73;
- };
- CSimpleParmValueItem.prototype.setUseValue=function(_74){
- this.m_useValue=_74;
- };
- CSimpleParmValueItem.prototype.toString=function(_75){
- return this.getDisplayValue();
- };
- CSimpleParmValueItem.prototype.load=function(_76){
- CSimpleParmValueItem.baseclass.load.call(this,_76);
- var _77=XMLHelper_FindChildByTagName(_76,"use",false);
- if(_77==null){
- return false;
- }
- var _78=XMLHelper_GetText(_77);
- if(_78==""){
- return false;
- }
- this.m_useValue=_78;
- var _79=XMLHelper_FindChildByTagName(_76,"display",false);
- if(_79!=null){
- this.m_displayValue=XMLHelper_GetText(_79);
- }
- return true;
- };
- CSimpleParmValueItem.prototype.generateXML=function(_7a,_7b){
- var _7c=_7b.ownerDocument;
- var _7d=_7c.createElement("item");
- _7a.XMLBuilderSetAttributeNodeNS(_7d,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- _7b.appendChild(_7d);
- CSimpleParmValueItem.baseclass.generateXML.call(this,_7a,_7d);
- var _7e=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7c);
- _7a.XMLBuilderSetAttributeNodeNS(_7e,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _7e.appendChild(_7c.createTextNode(this.m_useValue));
- _7d.appendChild(_7e);
- var _7f=_7a.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7c);
- _7a.XMLBuilderSetAttributeNodeNS(_7f,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _7f.appendChild(_7c.createTextNode(this.m_displayValue));
- _7d.appendChild(_7f);
- };
- function CBoundRangeParmValueItem(){
- CBoundRangeParmValueItem.baseclass.initialize.call(this,"true");
- this.m_start=null;
- this.m_end=null;
- };
- CBoundRangeParmValueItem.prototype=new CParmValueItem();
- CBoundRangeParmValueItem.prototype.constructor=CBoundRangeParmValueItem;
- CBoundRangeParmValueItem.baseclass=CParmValueItem.prototype;
- CBoundRangeParmValueItem.prototype.setStart=function(_80){
- this.m_start=_80;
- };
- CBoundRangeParmValueItem.prototype.getStart=function(){
- return this.m_start;
- };
- CBoundRangeParmValueItem.prototype.setEnd=function(end){
- this.m_end=end;
- };
- CBoundRangeParmValueItem.prototype.getEnd=function(){
- return this.m_end;
- };
- CBoundRangeParmValueItem.prototype.toString=function(_82){
- return CViewerCommon.getMessage(_82.m_sBetween,[this.m_start.getDisplayValue(),this.m_end.getDisplayValue()]);
- };
- CBoundRangeParmValueItem.prototype.load=function(_83){
- CBoundRangeParmValueItem.baseclass.load.call(this,_83);
- this.m_start=new CSimpleParmValueItem("","","");
- this.m_start.load(XMLHelper_FindChildByTagName(_83,"start",false));
- this.m_end=new CSimpleParmValueItem("","","");
- this.m_end.load(XMLHelper_FindChildByTagName(_83,"end",false));
- return true;
- };
- CBoundRangeParmValueItem.prototype.generateXML=function(_84,_85){
- var _86=_85.ownerDocument;
- var _87=_86.createElement("item");
- _84.XMLBuilderSetAttributeNodeNS(_87,"xsi:type","bus:boundRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- _85.appendChild(_87);
- CBoundRangeParmValueItem.baseclass.generateXML.call(this,_84,_87);
- var _88=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_86);
- _87.appendChild(_88);
- this.m_start.generateXML(_84,_88);
- var _89=_84.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_86);
- _87.appendChild(_89);
- this.m_end.generateXML(_84,_89);
- };
- function CUnboundedStartRangeParmValueItem(){
- CUnboundedStartRangeParmValueItem.baseclass.initialize.call(this,"true");
- this.m_end=null;
- };
- CUnboundedStartRangeParmValueItem.prototype=new CParmValueItem();
- CUnboundedStartRangeParmValueItem.prototype.constructor=CUnboundedStartRangeParmValueItem;
- CUnboundedStartRangeParmValueItem.baseclass=CParmValueItem.prototype;
- CUnboundedStartRangeParmValueItem.prototype.setEnd=function(end){
- this.m_end=end;
- };
- CUnboundedStartRangeParmValueItem.prototype.getEnd=function(){
- return this.m_end;
- };
- CUnboundedStartRangeParmValueItem.prototype.load=function(_8b){
- CUnboundedStartRangeParmValueItem.baseclass.load.call(this,_8b);
- this.m_end=new CSimpleParmValueItem("","","");
- this.m_end.load(XMLHelper_FindChildByTagName(_8b,"end",false));
- return true;
- };
- CUnboundedStartRangeParmValueItem.prototype.generateXML=function(_8c,_8d){
- var _8e=_8d.ownerDocument;
- var _8f=_8e.createElement("item");
- _8c.XMLBuilderSetAttributeNodeNS(_8f,"xsi:type","bus:unboundedStartRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- _8d.appendChild(_8f);
- CUnboundedStartRangeParmValueItem.baseclass.generateXML.call(this,_8c,_8f);
- var _90=_8c.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:end",_8e);
- _8f.appendChild(_90);
- this.m_end.generateXML(_8c,_90);
- };
- CUnboundedStartRangeParmValueItem.prototype.toString=function(_91){
- return _91.m_sLessThan+" "+this.m_end.getDisplayValue();
- };
- function CUnboundedEndRangeParmValueItem(){
- CUnboundedEndRangeParmValueItem.baseclass.initialize.call(this,"true");
- this.m_start=null;
- };
- CUnboundedEndRangeParmValueItem.prototype=new CParmValueItem();
- CUnboundedEndRangeParmValueItem.prototype.constructor=CUnboundedEndRangeParmValueItem;
- CUnboundedEndRangeParmValueItem.baseclass=CParmValueItem.prototype;
- CUnboundedEndRangeParmValueItem.prototype.setStart=function(_92){
- this.m_start=_92;
- };
- CUnboundedEndRangeParmValueItem.prototype.getStart=function(){
- return this.m_start;
- };
- CUnboundedEndRangeParmValueItem.prototype.load=function(_93){
- CUnboundedEndRangeParmValueItem.baseclass.load.call(this,_93);
- this.m_start=new CSimpleParmValueItem("","","");
- this.m_start.load(XMLHelper_FindChildByTagName(_93,"start",false));
- return true;
- };
- CUnboundedEndRangeParmValueItem.prototype.generateXML=function(_94,_95){
- var _96=_95.ownerDocument;
- var _97=_96.createElement("item");
- _94.XMLBuilderSetAttributeNodeNS(_97,"xsi:type","bus:unboundedEndRangeParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- _95.appendChild(_97);
- CUnboundedEndRangeParmValueItem.baseclass.generateXML.call(this,_94,_97);
- var _98=_94.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:start",_96);
- _97.appendChild(_98);
- this.m_start.generateXML(_94,_98);
- };
- CUnboundedEndRangeParmValueItem.prototype.toString=function(_99){
- return _99.m_sGreaterThan+" "+this.m_start.getDisplayValue();
- };
- function CHierarchicalParmValueItem(){
- CHierarchicalParmValueItem.baseclass.initialize.call(this,"true");
- this.m_value=null;
- this.m_subNodes=[];
- };
- CHierarchicalParmValueItem.prototype=new CParmValueItem();
- CHierarchicalParmValueItem.prototype.constructor=CHierarchicalParmValueItem;
- CHierarchicalParmValueItem.baseclass=CParmValueItem.prototype;
- CHierarchicalParmValueItem.prototype.getValue=function(){
- return this.m_value;
- };
- CHierarchicalParmValueItem.prototype.getSubNodes=function(){
- return this.m_subNodes;
- };
- CHierarchicalParmValueItem.prototype.setValue=function(_9a){
- this.m_value=_9a;
- };
- CHierarchicalParmValueItem.prototype.setSubNodes=function(_9b){
- this.m_subNodes=_9b;
- };
- CHierarchicalParmValueItem.prototype.load=function(_9c){
- CHierarchicalParmValueItem.baseclass.load.call(this,_9c);
- this.m_value=new CSimpleParmValueItem("","","");
- this.m_value.load(XMLHelper_FindChildByTagName(_9c,"value",false));
- var _9d=XMLHelper_FindChildByTagName(_9c,"subNodes",false);
- if(_9d==null){
- return false;
- }
- var _9e=_9d.getAttributeNode("xsi:type");
- if(_9e==null||_9e.nodeValue!="SOAP-ENC:Array"){
- return false;
- }
- var _9f=_9d.getAttributeNode("SOAP-ENC:arrayType");
- if(_9f==null||_9f.nodeValue!="bus:hierarchicalParmValueItem[]"){
- return false;
- }
- var _a0=_9d.childNodes;
- for(var _a1=0;_a1<_a0.length;++_a1){
- var _a2=new CHierarchicalParmValueItem();
- _a2.load(_a0[_a1]);
- this.m_subNodes.push(_a2);
- }
- return true;
- };
- CHierarchicalParmValueItem.prototype.generateXML=function(_a3,_a4){
- var _a5=_a4.ownerDocument;
- var _a6=_a5.createElement("item");
- _a3.XMLBuilderSetAttributeNodeNS(_a6,"xsi:type","bus:hierarchicalParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- _a4.appendChild(_a6);
- CHierarchicalParmValueItem.baseclass.generateXML.call(this,_a3,_a6);
- var _a7=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_a5);
- _a6.appendChild(_a7);
- this.m_value.generateXML(_a3,_a7);
- var _a8=_a3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:subNodes",_a5);
- _a3.XMLBuilderSetAttributeNodeNS(_a8,"SOAP-ENC:arrayType","bus:hierarchicalParmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- _a3.XMLBuilderSetAttributeNodeNS(_a8,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _a6.appendChild(_a8);
- for(var _a9=0;_a9<this.m_subNodes.length;++_a9){
- this.m_subNodes[_a9].generateXML(_a3,_a8);
- }
- };
- CHierarchicalParmValueItem.prototype.toString=function(){
- return "";
- };
- function XMLParser(s,_ab){
- if(s==null){
- return null;
- }
- if(/^\s*</.test(s)){
- s=s.replace(/^\s*/,"");
- if(s.charAt(1)=="/"){
- var _ac=new RegExp("^</"+_ab.getName()+"\\s*>","gi");
- if(!_ac.test(s)){
- alert("invalid XML "+_ab.getName()+"\n"+s);
- return null;
- }
- return XMLParser(s.replace(RegExp.lastMatch,""),_ab.parentNode);
- }else{
- var _ad=/^\s*<([\w:\-_\.]+)/;
- if(_ad.test(s)){
- var _ae=RegExp.$1;
- var e=new XMLElement(_ae,_ab);
- var _b0=new RegExp("^<"+_ae+"[^>]*>");
- s=s.replace(_b0,"");
- var _b1=RegExp.lastMatch;
- var _b2=/([\w:\-_\.]+)="([^"]*)"/gi;
- var _b3=_b1.match(_b2);
- if(_b3!=null){
- for(var i=0;i<_b3.length;i++){
- var _b5=_b3[i];
- (/([\w:\-_\.]+)\s*=\s*"(.*)"/).test(_b5);
- e.setAttribute(RegExp.$1,RegExp.$2);
- }
- }
- if(!(/\/>$/).test(_b1)){
- XMLParser(s,e);
- return e;
- }else{
- XMLParser(s,_ab);
- return e;
- }
- }
- }
- }else{
- if(s&&_ab){
- var _b6=new RegExp("([^<]*)</"+_ab.getName()+"\\s*[^>]*>","gi");
- _b6.test(s);
- var _b7=RegExp.$1;
- _ab.setValue(_b7);
- return (XMLParser(s.replace(_b7,""),_ab));
- }
- }
- return null;
- };
- function XMLElement(s,_b9){
- this.nodeName=s;
- this.nodeValue="";
- this.attributes=[];
- this.childNodes=[];
- this.parentNode=_b9;
- if(this.parentNode){
- this.parentNode.appendChild(this);
- }
- };
- XMLElement.prototype.appendChild=function(e){
- this.childNodes[this.childNodes.length]=e;
- };
- XMLElement.prototype.hasChildNodes=function(){
- if(this.childNodes.length>0){
- return true;
- }else{
- return false;
- }
- };
- XMLElement.prototype.findChildByName=function(n,_bc){
- if(this.getName()==n){
- return (this);
- }
- for(var i=0;i<this.childNodes.length;i++){
- if(this.childNodes[i].getName()==n){
- return this.childNodes[i];
- }
- }
- if(_bc!=false){
- for(i=0;i<this.childNodes.length;i++){
- var _be=this.childNodes[i].findChildByName(n,_bc);
- if(_be){
- return _be;
- }
- }
- }
- return null;
- };
- XMLElement.prototype.findChildWithAttribute=function(_bf,val){
- for(var i=0;i<this.childNodes.length;i++){
- if(this.childNodes[i].getAttribute(_bf)==val){
- return this.childNodes[i];
- }
- }
- return null;
- };
- XMLElement.prototype.getElementsByTagName=function(s,_c3){
- var a=[];
- for(var i=0;i<this.childNodes.length;i++){
- if(this.childNodes[i].getName()==s){
- a[a.length]=this.childNodes[i];
- }
- }
- if(_c3!=false){
- for(i=0;i<this.childNodes.length;i++){
- var _c6=this.childNodes[i].getElementsByTagName(s);
- for(var j=0;j<_c6.length;j++){
- a[a.length]=_c6[j];
- }
- }
- }
- return a;
- };
- XMLElement.prototype.getName=function(){
- return this.nodeName;
- };
- XMLElement.prototype.getValue=function(){
- return this.nodeValue;
- };
- XMLElement.prototype.setAttribute=function(a,v){
- this.attributes["_"+a]=v;
- };
- XMLElement.prototype.setValue=function(v){
- this.nodeValue=v;
- };
- XMLElement.prototype.getAttribute=function(a){
- var _cc="";
- if(typeof sXmlDecode=="function"){
- _cc=sXmlDecode(this.attributes["_"+a]);
- }else{
- _cc=this.attributes["_"+a];
- }
- return (_cc==null?"":_cc);
- };
- XMLElement.prototype.toString=function(){
- var s="<"+this.getName();
- for(var i in this.attributes){
- s+=" "+i.substring(1)+"=\""+this.attributes[i]+"\"";
- }
- s+=">"+this.getValue();
- for(var j=0;j<this.childNodes.length;j++){
- s+=this.childNodes[j].toString();
- }
- s+="</"+this.getName()+">";
- return s;
- };
- function XMLBuilderLoadXMLFromString(_d0,_d1){
- var _d2=null;
- if(typeof DOMParser!="undefined"){
- _d2=new DOMParser().parseFromString(_d0,"application/xml");
- }else{
- if(typeof ActiveXObject!="undefined"){
- try{
- _d2=new ActiveXObject("Microsoft.XMLDOM");
- _d2.loadXML(_d0);
- }
- catch(e){
- }
- }
- }
- return _d2;
- };
- function XMLBuilderCreateXMLDocument(_d3,_d4,_d5){
- var _d6=null;
- _d4=_d4||"";
- _d5=_d5||null;
- if(document.implementation&&document.implementation.createDocument){
- if(typeof _d4=="undefined"){
- _d4="http://www.w3.org/2000/xmlns/";
- }
- _d6=document.implementation.createDocument(_d4,_d3,_d5);
- }else{
- if(typeof ActiveXObject!="undefined"){
- try{
- _d6=new ActiveXObject("Microsoft.XMLDOM");
- var _d7=_d6.createNode(1,_d3,_d4);
- _d6.appendChild(_d7);
- }
- catch(e){
- }
- }
- }
- return _d6;
- };
- function XMLBuilderCreateElementNS(_d8,_d9,_da){
- var _db=null;
- if(typeof _da.createElementNS!="undefined"){
- if(typeof _d8=="undefined"){
- _d8="http://www.w3.org/2000/xmlns/";
- }
- _db=_da.createElementNS(_d8,_d9);
- }else{
- if(typeof _da.createNode!="undefined"){
- _db=_da.createNode(1,_d9,_d8);
- }
- }
- return _db;
- };
- function XMLBuilderSetAttributeNodeNS(_dc,_dd,_de,_df){
- if(typeof _dc.setAttributeNS!="undefined"){
- if(typeof _df=="undefined"){
- _df="http://www.w3.org/2000/xmlns/";
- }
- _dc.setAttributeNS(_df,_dd,_de);
- }else{
- if(typeof _dc.ownerDocument!="undefined"&&typeof _dc.ownerDocument.createNode!="undefined"){
- var _e0=_dc.ownerDocument.createNode(2,_dd,_df);
- _e0.nodeValue=_de;
- _dc.setAttributeNode(_e0);
- }
- }
- };
- function XMLBuilderSerializeNode(_e1){
- var _e2="";
- if(typeof XMLSerializer!="undefined"){
- try{
- _e2=new XMLSerializer().serializeToString(_e1);
- }
- catch(e){
- }
- }else{
- if(typeof _e1=="object"&&typeof _e1.xml!="undefined"){
- _e2=_e1.xml;
- }
- }
- return _e2.replace(/^\s+/g,"").replace(/\s+$/g,"");
- };
- function XMLHelper_GetText(_e3,_e4){
- var _e5="";
- var _e6=_e3.childNodes;
- for(var i=0;i<_e6.length;++i){
- if(_e6[i].nodeType==3){
- _e5+=_e6[i].nodeValue;
- }else{
- if(_e6[i].nodeName=="Value"){
- _e5+=_e6[i].getAttribute("display");
- }else{
- if(_e4){
- _e5+=XMLHelper_GetText(_e6[i],true);
- }
- }
- }
- }
- return _e5;
- };
- function XMLHelper_GetLocalName(_e8){
- if(typeof _e8.baseName!="undefined"){
- return _e8.baseName;
- }
- return _e8.localName;
- };
- function XMLHelper_FindChildByTagName(_e9,_ea,_eb){
- if(typeof _eb=="undefined"||(_eb!=true&&_eb!=false)){
- _eb=true;
- }
- if(XMLHelper_GetLocalName(_e9)==_ea){
- return (_e9);
- }
- var i;
- for(i=0;i<_e9.childNodes.length;i++){
- if(XMLHelper_GetLocalName(_e9.childNodes[i])==_ea){
- return _e9.childNodes[i];
- }
- }
- if(_eb!=false){
- for(i=0;i<_e9.childNodes.length;i++){
- var _ed=XMLHelper_FindChildByTagName(_e9.childNodes[i],_ea,_eb);
- if(_ed){
- return _ed;
- }
- }
- }
- return null;
- };
- function XMLHelper_FindChildrenByTagName(_ee,_ef,_f0){
- if(typeof _f0=="undefined"||(_f0!=true&&_f0!=false)){
- _f0=true;
- }
- var _f1=[];
- var _f2=_ee.childNodes;
- for(var _f3=0;_f3<_f2.length;_f3++){
- if(XMLHelper_GetLocalName(_f2[_f3])==_ef){
- _f1[_f1.length]=_f2[_f3];
- }
- if(_f0===true){
- var _f4=XMLHelper_FindChildrenByTagName(_f2[_f3],_ef,_f0);
- if(_f4.length>0){
- _f1=_f1.concat(_f4);
- }
- }
- }
- return _f1;
- };
- function XMLHelper_GetFirstChildElement(oEl){
- var _f6=null;
- if(oEl&&oEl.childNodes&&oEl.childNodes.length){
- for(var i=0;i<oEl.childNodes.length;i++){
- if(oEl.childNodes[i].nodeType==1){
- _f6=oEl.childNodes[i];
- break;
- }
- }
- }
- return _f6;
- };
- function XMLHelper_FindChildrenByAttribute(_f8,_f9,_fa,_fb,_fc){
- if(typeof _fb=="undefined"||(_fb!=true&&_fb!=false)){
- _fb=true;
- }
- if(typeof _fa!="string"&&typeof _fa!="number"){
- _fa=null;
- }else{
- _fa=_fa.toString();
- }
- var _fd=[];
- var _fe=_f8.childNodes;
- for(var _ff=0;_ff<_fe.length;_ff++){
- var _100=_fe[_ff];
- if(_100.nodeType==1){
- var _101=_100.getAttribute(_f9);
- if(_101!==null){
- if(_fa===null||_101==_fa){
- if(_fc){
- return [_100];
- }else{
- _fd[_fd.length]=_100;
- }
- }
- }
- if(_fb===true){
- var _102=XMLHelper_FindChildrenByAttribute(_100,_f9,_fa,_fb,_fc);
- if(_102.length>0){
- if(_fc){
- if(_102.length==1){
- return _102;
- }else{
- return [_102[0]];
- }
- }else{
- _fd=_fd.concat(_102);
- }
- }
- }
- }
- }
- return _fd;
- };
- var DICTIONARY_INVALID_KEY=-1;
- var DICTIONARY_SUCCESS=1;
- function CDictionary(){
- this.m_aValues={};
- };
- function CDictionary_add(sKey,_104){
- if(typeof sKey!="string"&&typeof sKey!="number"){
- return DICTIONARY_INVALID_KEY;
- }
- this.m_aValues[sKey]=_104;
- return DICTIONARY_SUCCESS;
- };
- function CDictionary_exists(sKey){
- if(typeof sKey!="string"&&typeof sKey!="number"){
- return false;
- }
- return (typeof this.m_aValues[sKey]!="undefined");
- };
- function CDictionary_get(sKey){
- if(typeof sKey!="string"&&typeof sKey!="number"){
- return null;
- }
- if(this.exists(sKey)===true){
- return this.m_aValues[sKey];
- }else{
- return null;
- }
- };
- function CDictionary_keys(){
- var _107=[];
- for(var _108 in this.m_aValues){
- _107.push(_108);
- }
- return _107.sort();
- };
- function CDictionary_remove(sKey){
- if(typeof sKey!="string"&&typeof sKey!="number"){
- return DICTIONARY_INVALID_KEY;
- }
- var _10a=this.get(sKey);
- delete this.m_aValues[sKey];
- return _10a;
- };
- function CDictionary_removeAll(){
- this.m_aValues=[];
- return DICTIONARY_SUCCESS;
- };
- function CDictionary_append(_10b){
- if(_10b instanceof CDictionary&&_10b.keys().length>0){
- var _10c=_10b.keys();
- for(var _10d=0;_10d<_10c.length;_10d++){
- this.add(_10c[_10d],_10b.get(_10c[_10d]));
- }
- }
- };
- CDictionary.prototype.add=CDictionary_add;
- CDictionary.prototype.exists=CDictionary_exists;
- CDictionary.prototype.get=CDictionary_get;
- CDictionary.prototype.keys=CDictionary_keys;
- CDictionary.prototype.remove=CDictionary_remove;
- CDictionary.prototype.removeAll=CDictionary_removeAll;
- CDictionary.prototype.append=CDictionary_append;
- function CognosTabControl(_10e,_10f){
- this._init();
- this._outsideContainer=_10e;
- this._callback=_10f;
- };
- CognosTabControl.prototype._init=function(){
- this._tabs=null;
- this._tabControlNode=null;
- this._scrollButtonsVisible=false;
- this._scrollLeftButton=null;
- this._scrollRightButton=null;
- this._selectedTab=null;
- this._wrapperDiv=null;
- this._topContainer=null;
- this._seperator=null;
- this._isSavedOutput=false;
- this._isHighContrast=false;
- };
- CognosTabControl.prototype.destroy=function(){
- if(this._wrapperDiv){
- this._wrapperDiv.parentNode.removeChild(this._wrapperDiv);
- delete this._wrapperDiv;
- this._wrapperDiv=null;
- }
- };
- CognosTabControl.prototype.setHighContrast=function(_110){
- this._isHighContrast=_110;
- };
- CognosTabControl.prototype.isHighContrast=function(){
- return this._isHighContrast;
- };
- CognosTabControl.prototype.setSpaceSaverContainer=function(node){
- this._spaceSaverContainer=node;
- };
- CognosTabControl.prototype.useAbsolutePosition=function(_112){
- this._useAbsolutePosition=_112;
- };
- CognosTabControl.prototype.setScrollAttachNode=function(node){
- this._scrollAttachNode=node;
- };
- CognosTabControl.prototype.setIsSavedOutput=function(_114){
- this._isSavedOutput=_114;
- };
- CognosTabControl.prototype.isSavedOutput=function(){
- return this._isSavedOutput;
- };
- CognosTabControl.prototype.getSelectedTabId=function(){
- if(this._selectedTab){
- return this._selectedTab.getId();
- }
- return null;
- };
- CognosTabControl.prototype.getSelectedTab=function(){
- return this._selectedTab?this._selectedTab:null;
- };
- CognosTabControl.prototype.isTopAligned=function(){
- return this._isTopAligned;
- };
- CognosTabControl.prototype.getWrapperDiv=function(){
- return this._wrapperDiv;
- };
- CognosTabControl.prototype.getVisibleWidth=function(){
- var _115=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
- return this._wrapperDiv.clientWidth-_115;
- };
- CognosTabControl.prototype.getMaxRightScroll=function(){
- var _116=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0;
- return this._totalWrapperWidth+_116+8-this._wrapperDiv.clientWidth;
- };
- CognosTabControl.prototype.hide=function(){
- this._topContainer.style.display="none";
- };
- CognosTabControl.prototype.resetPosition=function(){
- if(this._useAbsolutePosition===true){
- this._outsideContainer.srollLeft="0px";
- this._outsideContainer.scrollTop="0px";
- this._topContainer.style.top="";
- this._topContainer.style.bottom="";
- this._topContainer.style.left="0px";
- if(this._isTopAligned){
- this._topContainer.style.top="0px";
- }else{
- this._topContainer.style.bottom="0px";
- }
- }
- };
- CognosTabControl.prototype.render=function(_117){
- this._updateTabInfo(_117);
- if(!this._tabControlNode){
- var _118=this;
- var _119=this._scrollAttachNode?this._scrollAttachNode:this._outsideContainer;
- if(window.attachEvent){
- window.attachEvent("onresize",function(){
- _118.onResize();
- });
- if(this._useAbsolutePosition===true){
- _119.attachEvent("onscroll",function(){
- _118.onContainerScroll();
- });
- }
- }else{
- window.addEventListener("resize",function(){
- _118.onResize();
- },false);
- if(this._useAbsolutePosition===true){
- _119.addEventListener("scroll",function(){
- _118.onContainerScroll();
- },false);
- }
- }
- this._outsideContainer.originalClassName=this._outsideContainer.className;
- this._outsideContainer.className=this._outsideContainer.className+(this._isTopAligned?" ct_controlTop":" ct_controlBottom");
- this._topContainer=document.createElement("div");
- this._topContainer.className="ct_wrapperDiv";
- if(this._useAbsolutePosition===true){
- this._topContainer.style.width="100%";
- this._topContainer.style.position="absolute";
- this._topContainer.style.left="0px";
- if(this._isTopAligned){
- this._topContainer.style.top="0px";
- }else{
- this._topContainer.style.bottom="0px";
- }
- }
- if(this._isTopAligned&&this._outsideContainer.firstChild){
- this._outsideContainer.insertBefore(this._topContainer,this._outsideContainer.firstChild);
- }else{
- this._outsideContainer.appendChild(this._topContainer);
- }
- this._wrapperDiv=document.createElement("div");
- this._wrapperDiv.setAttribute("role","presentation");
- this._wrapperDiv.className="ct_wrapperDiv";
- this._topContainer.appendChild(this._wrapperDiv);
- this._tabControlNode=document.createElement("div");
- this._tabControlNode.setAttribute("role","tablist");
- this._tabControlNode.className="ct_control";
- this._wrapperDiv.appendChild(this._tabControlNode);
- this._totalWrapperWidth=0;
- for(var i=0;i<this._tabs.length;i++){
- var tab=this._tabs[i];
- tab.render(this._tabControlNode);
- this._totalWrapperWidth+=this._tabs[i].getWidth();
- }
- var _11c=0;
- if(this._tabs[0]){
- _11c=this._tabs[0].getHeight();
- }
- this._wrapperDiv.style.height=_11c+5+"px";
- if(this._spaceSaverContainer){
- this.spaceSaverDiv=document.createElement("div");
- this.spaceSaverDiv.style.height=_11c+5+"px";
- this.spaceSaverDiv.style.position="relative";
- this.spaceSaverDiv.style.display="block";
- this._spaceSaverContainer.appendChild(this.spaceSaverDiv);
- }
- this._createSeperator();
- }else{
- this.resetPosition();
- }
- this._topContainer.style.display="";
- this.onResize();
- this.selectTab(_117.currentTabId,false);
- if(this._selectedTab){
- this._selectedTab.scrollIntoView();
- this.updateScrollButtons();
- }
- };
- CognosTabControl.prototype.onContainerScroll=function(){
- var _11d=this._scrollAttachNode?this._scrollAttachNode:this._topContainer;
- this._topContainer.style.left=_11d.scrollLeft+"px";
- if(this._isTopAligned){
- this._topContainer.style.top=_11d.scrollTop+"px";
- }else{
- this._topContainer.style.bottom=(-_11d.scrollTop)+"px";
- }
- };
- CognosTabControl.prototype._resetTabControl=function(){
- if(this._outsideContainer.originalClassName){
- this._outsideContainer.className=this._outsideContainer.originalClassName;
- }else{
- this._outsideContainer.className="";
- }
- if(this._topContainer){
- var node=this._outsideContainer.removeChild(this._topContainer);
- node=null;
- }
- this._init();
- };
- CognosTabControl.prototype._updateTabInfo=function(_11f){
- this._isTopAligned=_11f.position=="topLeft"?true:false;
- var tabs=_11f.tabs;
- if(this._tabs){
- if(this._tabs.length!=tabs.length){
- this._resetTabControl();
- }else{
- for(var i=0;i<this._tabs.length;i++){
- if(tabs[i].id!=this._tabs[i].getId()){
- this._resetTabControl();
- break;
- }
- }
- }
- }
- if(!this._tabs){
- this._tabs=[];
- if(!tabs){
- return;
- }
- for(var ii=0;ii<tabs.length;ii++){
- var tab=new CognosTab(tabs[ii],this,ii);
- this._tabs.push(tab);
- }
- }
- };
- CognosTabControl.prototype.getScrollPos=function(){
- return this._wrapperDiv.scrollLeft;
- };
- CognosTabControl.prototype.scrollTo=function(_124){
- this._wrapperDiv.scrollLeft=_124;
- this.updateScrollButtons();
- };
- CognosTabControl.prototype.onResize=function(evt){
- if(this._wrapperDiv.offsetWidth<this._totalWrapperWidth){
- this._showScrollButtons();
- this.updateScrollButtons();
- if(this._selectedTab){
- this._selectedTab.scrollIntoView();
- }
- if(this._scrollRightButton.isDisabled()){
- this.scrollTo(this.getMaxRightScroll());
- }
- }else{
- this._hideScrollButtons();
- this.scrollTo(0);
- }
- };
- CognosTabControl.prototype._showScrollButtons=function(){
- if(this._scrollButtonsVisible){
- return;
- }
- if(!this._scrollLeftButton){
- var _126=0;
- if(this._tabs[0]){
- _126=this._tabs[0].getHeight();
- }
- this._scrollLeftButton=new CognosScrollButton("left",_126,this);
- this._scrollLeftButton.render(this._topContainer);
- this._scrollRightButton=new CognosScrollButton("right",_126,this);
- this._scrollRightButton.render(this._topContainer);
- }
- this._scrollButtonsVisible=true;
- this._scrollLeftButton.show();
- this._scrollRightButton.show();
- this._tabControlNode.style.left=this._scrollLeftButton.getWidth()-2+"px";
- };
- CognosTabControl.prototype.updateScrollButtons=function(){
- if(this._scrollLeftButton){
- this._scrollLeftButton.update();
- }
- if(this._scrollRightButton){
- this._scrollRightButton.update();
- }
- };
- CognosTabControl.prototype._hideScrollButtons=function(){
- if(!this._scrollButtonsVisible){
- return;
- }
- this._scrollButtonsVisible=false;
- this._tabControlNode.style.left="0px";
- this._scrollLeftButton.hide();
- this._scrollRightButton.hide();
- };
- CognosTabControl.prototype._createSeperator=function(){
- this._seperator=document.createElement("div");
- this._seperator.setAttribute("role","presendation");
- this._seperator.setAttribute("style","");
- this._seperator.className="ct_verticalLine";
- this._seperator.setAttribute("role","presentation");
- this._tabControlNode.appendChild(this._seperator);
- };
- CognosTabControl.prototype.selectTab=function(_127,_128,evt){
- if(!evt){
- evt=window.event;
- }
- for(var i=0;i<this._tabs.length;i++){
- var tab=this._tabs[i];
- var _12c=tab.getId()==_127;
- tab.select(_12c);
- if(_12c){
- this._selectedTab=tab;
- if(_128&&this._callback){
- this._callback(_127);
- }
- }
- if(_128){
- tab.focus(_12c);
- }
- }
- if(evt&&window.stopEventBubble){
- window.stopEventBubble(evt);
- }
- return false;
- };
- CognosTabControl.prototype.handleKeyDown=function(evt,_12e){
- if(!evt){
- evt=window.event;
- }
- if(!evt){
- return;
- }
- if(evt.keyCode=="39"||evt.keyCode=="37"){
- if(evt.keyCode=="39"){
- _12e++;
- if(_12e>=this._tabs.length){
- _12e=0;
- }
- }else{
- _12e--;
- if(_12e<0){
- _12e=this._tabs.length-1;
- }
- }
- this._tabs[_12e].focus();
- this._tabs[_12e].scrollIntoView();
- }else{
- if(evt.keyCode=="32"||evt.keyCode=="13"){
- var _12f=this._tabs[_12e].getId();
- this.selectTab(_12f,true);
- }
- }
- };
- function CognosTab(_130,_131,_132){
- if(!_130){
- return;
- }
- this._id=_130.id;
- this._label=_130.label;
- this._position=_132;
- this._contentClassName=_130.className;
- this._imgURL=_130.img;
- this._selected=false;
- this._tabControl=_131;
- this._outerTabDiv=null;
- this._focusDiv=null;
- };
- CognosTab.prototype.getWidth=function(){
- return this._outerTabDiv.offsetWidth+1;
- };
- CognosTab.prototype.getHeight=function(){
- return this._outerTabDiv.clientHeight;
- };
- CognosTab.prototype.getId=function(){
- return this._id;
- };
- CognosTab.prototype.select=function(_133){
- if(_133!=this._selected){
- this._selected=_133;
- if(_133){
- this.scrollIntoView();
- }
- if(this._outerTabDiv){
- this._updateSelectedClass();
- this._updateAriaSelected();
- }
- }
- };
- CognosTab.prototype.scrollIntoView=function(){
- var _134=this._outerTabDiv.offsetLeft+this._outerTabDiv.clientWidth;
- var _135=this._tabControl.getVisibleWidth();
- var _136=this._tabControl.getScrollPos();
- var _137=this._outerTabDiv.offsetLeft;
- if(_137===0){
- this._tabControl.scrollTo(0);
- }else{
- if((_137>=_136)&&(_134<=(_136+_135))){
- }else{
- if(_137<_136){
- var _138=_137<3?0:_137-3;
- this._tabControl.scrollTo(_138);
- }else{
- if(_134-_135>0||_134<_136){
- this._tabControl.scrollTo(_134-_135+10);
- }
- }
- }
- }
- };
- CognosTab.prototype.render=function(_139){
- if(!this._outerTabDiv){
- var _13a=this._id;
- var _13b=this._tabControl;
- var tab=this;
- this._outerTabDiv=document.createElement("div");
- this._outerTabDiv.onmousedown=function(_13d){
- _13b.selectTab(_13a,true,_13d);
- };
- this._outerTabDiv.onmouseover=function(){
- this.className=this.className+" ct_highlight";
- };
- this._outerTabDiv.onmouseout=function(){
- tab._updateSelectedClass();
- };
- this._outerTabDiv.setAttribute("style","");
- this._outerTabDiv.setAttribute("role","presentation");
- this._updateSelectedClass();
- _139.appendChild(this._outerTabDiv);
- var _13e=document.createElement("div");
- _13e.className="ct_content";
- _13e.setAttribute("role","presentation");
- this._outerTabDiv.appendChild(_13e);
- this._focusDiv=document.createElement("span");
- this._focusDiv.innerHTML=this._label?this._label:" ";
- this._focusDiv.className="ct_text";
- this._focusDiv.setAttribute("tabIndex",this._position===0?"0":"-1");
- this._focusDiv.setAttribute("role","tab");
- this._focusDiv.onkeydown=function(_13f){
- _13b.handleKeyDown(_13f,tab._position);
- };
- this._updateAriaSelected();
- _13e.appendChild(this._focusDiv);
- if(this.isIE()&&this.getWidth()<75){
- this._outerTabDiv.style.width="75px";
- }
- }else{
- this._updateSelectedClass();
- this._updateAriaSelected();
- }
- };
- CognosTab.prototype.isIE=function(){
- return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
- };
- CognosTab.prototype.getFocusableDiv=function(){
- return this._focusDiv;
- };
- CognosTab.prototype.focus=function(_140){
- if(typeof _140==="undefined"){
- _140=true;
- }
- this._focusDiv.setAttribute("tabIndex",_140?"0":"-1");
- if(_140&&this._focusDiv.focus){
- this._focusDiv.focus();
- }
- };
- CognosTab.prototype._updateSelectedClass=function(){
- this._outerTabDiv.className=this._selected?"ct_outerDiv ct_highlight ct_selected":"ct_outerDiv";
- };
- CognosTab.prototype._updateAriaSelected=function(){
- this._focusDiv.setAttribute("aria-selected",this._selected?"true":"false");
- };
- function CognosScrollButton(_141,_142,_143){
- this._direction=_141;
- this._height=_142;
- this._tabControl=_143;
- this._disabled=true;
- this._scrolling=false;
- };
- CognosScrollButton.prototype.getWidth=function(){
- return this._scrollButtonDiv.offsetWidth+1;
- };
- CognosScrollButton.prototype.show=function(){
- this._wrapperDiv.style.display="block";
- };
- CognosScrollButton.prototype.hide=function(){
- this._wrapperDiv.style.display="none";
- };
- CognosScrollButton.prototype.update=function(){
- var _144=this._tabControl.getWrapperDiv();
- var _145=false;
- if(this._direction=="left"){
- if(_144.scrollLeft===0){
- _145=true;
- }
- }else{
- if(_144.scrollLeft>=(this._tabControl.getMaxRightScroll()-2)){
- _145=true;
- }
- }
- if(_145){
- this._disable();
- }else{
- this._enable();
- }
- };
- CognosScrollButton.prototype.isDisabled=function(){
- return this._disabled;
- };
- CognosScrollButton.prototype._disable=function(){
- this._disabled=true;
- this._outerDiv.className="ct_outerDiv ct_scrollDisabled";
- };
- CognosScrollButton.prototype._enable=function(){
- this._disabled=false;
- this._outerDiv.className="ct_outerDiv ct_scrollEnabled";
- };
- CognosScrollButton.prototype.scroll=function(){
- if(!this._scrolling){
- this._scrolling=true;
- var _146=this._tabControl.getWrapperDiv().clientWidth;
- this._doAnimateScroll(_146,this._tabControl.getMaxRightScroll());
- }
- };
- CognosScrollButton.prototype._doAnimateScroll=function(_147,_148){
- if(_147>0){
- var _149=10;
- var _14a=this._tabControl.getWrapperDiv();
- if(this._direction=="left"){
- if(_14a.scrollLeft>_149){
- this._tabControl.scrollTo(_14a.scrollLeft-_149);
- }else{
- this._tabControl.scrollTo(0);
- this._scrolling=false;
- return;
- }
- }else{
- if(_14a.scrollLeft+_149<_148){
- this._tabControl.scrollTo(_14a.scrollLeft+_149);
- }else{
- this._scrolling=false;
- this._tabControl.scrollTo(_148);
- this._tabControl.updateScrollButtons();
- return;
- }
- }
- _147-=_149;
- var _14b=this;
- setTimeout(function(){
- _14b._doAnimateScroll(_147,_148);
- },3);
- }else{
- this._scrolling=false;
- this._tabControl.updateScrollButtons();
- }
- };
- CognosScrollButton.prototype.isIE=function(){
- return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
- };
- CognosScrollButton.prototype.render=function(_14c){
- this._scrollButtonDiv=document.createElement("div");
- this._scrollButtonDiv.className="ct_scrollButton";
- var _14d=-1;
- if(this.isIE()&&document.compatMode!="CSS1Compat"){
- _14d=1;
- }
- this._scrollButtonDiv.style.height=this._height+_14d+"px";
- if(this._tabControl.isHighContrast()){
- this._scrollButtonDiv.innerHTML=this._direction=="left"?"«":"»";
- }
- this._outerDiv=document.createElement("div");
- this._outerDiv.className="ct_scrollDisabled";
- this._outerDiv.appendChild(this._scrollButtonDiv);
- this._outerDiv.style.height=this._height+"px";
- var _14e=this;
- this._outerDiv.onclick=function(){
- _14e.scroll();
- };
- this._wrapperDiv=document.createElement("div");
- this._wrapperDiv.style.height=this._height+"px";
- this._wrapperDiv.className="ct_scroll "+(this._direction=="left"?"ct_left":"ct_right")+(this._tabControl.isHighContrast()?" a11y":"");
- this._wrapperDiv.appendChild(this._outerDiv);
- if(this._direction=="left"){
- _14c.insertBefore(this._wrapperDiv,_14c.firstChild);
- this._wrapperDiv.style.left="0px";
- }else{
- _14c.appendChild(this._wrapperDiv);
- this._wrapperDiv.style.right="0px";
- }
- };
- function ActionFactory(_14f){
- this.m_cognosViewer=_14f;
- };
- ActionFactory.prototype.load=function(_150){
- this.m_cognosViewer.loadExtra();
- var _151=null;
- try{
- var _152=_150+"Action";
- _151=eval("(typeof "+_152+"=='function'? new "+_152+"():null);");
- if(_151){
- _151.setCognosViewer(this.m_cognosViewer);
- }
- }
- catch(exception){
- _151=null;
- }
- return _151;
- };
- function ActionFactory_loadActionHandler(evt,_154){
- var _155=getCtxNodeFromEvent(evt);
- var _156=_154.getSelectionController();
- var _157=null;
- if(_155!==null){
- var _158=_155.getAttribute("ctx");
- _158=_158.split("::")[0].split(":")[0];
- var _159=_155.getAttribute("type")!=null?_155:_155.parentNode;
- var type=_159.getAttribute("type");
- switch(type){
- case "columnTitle":
- var _15b=(_155.getAttribute("dttargets")!=null);
- var _15c=(_159.getAttribute("CTNM")!=null&&_156.getMun(_158)!=""&&_156.getUsageInfo(_158)!="2");
- if(_15b||_15c){
- _157=_154.getAction("DrillUpDownOrThrough");
- _157.init(_15b,_15c);
- _157.updateDrillabilityInfo(_154,_155);
- }else{
- _157=_154.getAction("RenameDataItem");
- }
- break;
- case "datavalue":
- case "chartElement":
- case "ordinalAxisLabel":
- case "legendLabel":
- case "legendTitle":
- case "ordinalAxisTitle":
- var _15b=(_155.getAttribute("dttargets")!=null);
- var _15c=(_156.getHun(_158)!="");
- if(_15b||_15c){
- _157=_154.getAction("DrillUpDownOrThrough");
- _157.init(_15b,_15c);
- _157.updateDrillabilityInfo(_154,_155);
- }
- break;
- }
- }
- if(_157===null){
- _157=_154.getAction("Selection");
- }
- _157.setCognosViewer(_154);
- return _157;
- };
- ActionFactory.prototype.destroy=function(){
- delete this.m_cognosViewer;
- };
- function CognosViewerAction(){
- this.m_oCV=null;
- };
- CognosViewerAction.prototype.setRequestParms=function(_15d){
- };
- CognosViewerAction.prototype.onMouseOver=function(evt){
- return false;
- };
- CognosViewerAction.prototype.onMouseOut=function(evt){
- return false;
- };
- CognosViewerAction.prototype.onMouseDown=function(evt){
- return false;
- };
- CognosViewerAction.prototype.onClick=function(evt){
- return false;
- };
- CognosViewerAction.prototype.onDoubleClick=function(evt){
- return false;
- };
- CognosViewerAction.prototype.updateMenu=function(_163){
- return _163;
- };
- CognosViewerAction.prototype.addAdditionalOptions=function(_164){
- };
- CognosViewerAction.prototype.genSelectionContextWithUniqueCTXIDs=function(){
- return false;
- };
- CognosViewerAction.prototype.doUndo=function(){
- if(typeof console!="undefined"){
- console.log("Required method doUndo not implemented.");
- }
- };
- CognosViewerAction.prototype.doRedo=function(){
- if(typeof console!="undefined"){
- console.log("Required method doRedo not implemented.");
- }
- };
- CognosViewerAction.prototype.forceRunSpecRequest=function(){
- return false;
- };
- CognosViewerAction.prototype.preProcess=function(){
- };
- CognosViewerAction.prototype.setCognosViewer=function(oCV){
- this.m_oCV=oCV;
- };
- CognosViewerAction.prototype.getCognosViewer=function(){
- return this.m_oCV;
- };
- CognosViewerAction.prototype.getUndoRedoQueue=function(){
- if(this.getCognosViewer().getViewerWidget()){
- return this.getCognosViewer().getViewerWidget().getUndoRedoQueue();
- }
- return null;
- };
- CognosViewerAction.prototype.getViewerWidget=function(){
- return this.m_oCV.getViewerWidget();
- };
- CognosViewerAction.prototype.getObjectDisplayName=function(){
- var _166="";
- if(this.m_oCV!=null){
- if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){
- _166=this.m_oCV.envParams["reportpart_id"];
- }else{
- if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){
- _166=this.m_oCV.envParams["ui.name"];
- }
- }
- }
- return _166;
- };
- CognosViewerAction.prototype.getContainerId=function(_167){
- var _168="";
- if(_167&&_167.getAllSelectedObjects){
- var _169=_167.getAllSelectedObjects();
- if(_169){
- var _16a=_169[0];
- if(_16a&&_16a.getLayoutElementId){
- _168=this.removeNamespace(_16a.getLayoutElementId());
- }
- }
- }
- return _168;
- };
- CognosViewerAction.prototype.removeNamespace=function(_16b){
- var _16c=_16b;
- try{
- if(_16b!=""){
- var _16d=_16b.indexOf(this.m_oCV.getId());
- if(_16d!=-1){
- _16b=_16b.replace(this.m_oCV.getId(),"");
- }
- }
- return _16b;
- }
- catch(e){
- return _16c;
- }
- };
- CognosViewerAction.prototype.doAddActionContext=function(){
- return true;
- };
- CognosViewerAction.prototype.getSelectionContext=function(){
- return getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(this.m_oCV.envParams["ui.object"]),this.genSelectionContextWithUniqueCTXIDs());
- };
- CognosViewerAction.prototype.getNumberOfSelections=function(){
- var _16e=-1;
- if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){
- _16e=this.m_oCV.getSelectionController().getSelections().length;
- }
- return _16e;
- };
- CognosViewerAction.prototype.buildDynamicMenuItem=function(_16f,_170){
- _16f.action={name:"LoadMenu",payload:{action:_170}};
- _16f.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}];
- return _16f;
- };
- CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_171){
- var oReq=new ViewerDispatcherEntry(this.getCognosViewer());
- oReq.addFormField("ui.action",_171);
- this.preProcess();
- if(this.doAddActionContext()===true){
- var _173=this.addActionContext();
- oReq.addFormField("cv.actionContext",_173);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Action context",_173,"xml");
- }
- }
- oReq.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
- if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){
- oReq.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
- }
- if(this.m_oCV.getModelPath()!==""){
- oReq.addFormField("modelPath",this.m_oCV.getModelPath());
- }
- if(typeof this.m_oCV.envParams["packageBase"]!="undefined"){
- oReq.addFormField("packageBase",this.m_oCV.envParams["packageBase"]);
- }
- if(typeof this.m_oCV.envParams["rap.state"]!="undefined"){
- oReq.addFormField("rap.state",this.m_oCV.envParams["rap.state"]);
- }
- if(typeof this.m_oCV.envParams["rapReportInfo"]!="undefined"){
- oReq.addFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
- }
- this.addAdditionalOptions(oReq);
- return oReq;
- };
- CognosViewerAction.prototype.fireModifiedReportEvent=function(){
- try{
- var _174=this.getCognosViewer().getViewerWidget();
- if(_174){
- var _175={"modified":true};
- _174.fireEvent("com.ibm.bux.widget.modified",null,_175);
- }
- }
- catch(e){
- }
- };
- CognosViewerAction.prototype.showCustomCursor=function(evt,id,_178){
- var _179=document.getElementById(id);
- if(_179==null){
- _179=document.createElement("span");
- _179.className="customCursor";
- _179.setAttribute("id",id);
- document.body.appendChild(_179);
- }
- var _17a="<img src=\""+this.getCognosViewer().getWebContentRoot()+_178+"\"/>";
- _179.innerHTML=_17a;
- _179.style.position="absolute";
- _179.style.left=(evt.clientX+15)+"px";
- _179.style.top=(evt.clientY+15)+"px";
- _179.style.display="inline";
- };
- CognosViewerAction.prototype.hideCustomCursor=function(id){
- var _17c=document.getElementById(id);
- if(_17c!=null){
- _17c.style.display="none";
- }
- };
- CognosViewerAction.prototype.selectionHasContext=function(){
- var _17d=this.getCognosViewer().getSelectionController().getAllSelectedObjects();
- var _17e=false;
- if(_17d!=null&&_17d.length>0){
- for(var i=0;i<_17d.length;i++){
- if(_17d[i].hasContextInformation()){
- _17e=true;
- break;
- }
- }
- }
- return _17e;
- };
- CognosViewerAction.prototype.isInteractiveDataContainer=function(_180){
- var _181=false;
- if(typeof _180!="undefined"&&_180!=null){
- var id=_180.toLowerCase();
- _181=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id);
- }
- return _181;
- };
- CognosViewerAction.prototype.getSelectedContainerId=function(){
- var _183=this.getCognosViewer();
- var _184=_183.getSelectionController();
- var _185=null;
- if(_184!=null&&typeof _184!="undefined"){
- _185=this.getContainerId(_184);
- }
- return _185;
- };
- CognosViewerAction.prototype.getSelectedReportInfo=function(){
- var _186=this.getCognosViewer();
- var _187=this.getSelectedContainerId();
- var _188=this.getReportInfo(_187);
- if(_188==null){
- var _189=_186.getRAPReportInfo();
- if(_189.getContainerCount()==1){
- _188=_189.getContainerFromPos(0);
- }
- }
- return _188;
- };
- CognosViewerAction.prototype.getReportInfo=function(_18a){
- var _18b=null;
- if(_18a!=null&&_18a.length>0){
- var _18c=this.getCognosViewer();
- var _18d=_18c.getRAPReportInfo();
- _18b=_18d.getContainer(_18a);
- }
- return _18b;
- };
- CognosViewerAction.prototype.isSelectionOnChart=function(){
- var _18e=this.getCognosViewer();
- if(_18e.getSelectionController().hasSelectedChartNodes()){
- return true;
- }
- var _18f=this.getContainerId(_18e.getSelectionController());
- if(typeof _18f!="undefined"){
- var _190=this.getReportInfo(_18f);
- if(_190!=null&&_190.displayTypeId){
- var _191=_190.displayTypeId.toLowerCase();
- return _18e.getRAPReportInfo().isChart(_191);
- }
- }
- return false;
- };
- CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){
- var _192=this.getCognosViewer().getRAPReportInfo();
- if(_192){
- return _192.containsInteractiveDataContainer();
- }
- return false;
- };
- CognosViewerAction.prototype.isPromptWidget=function(){
- var oCV=this.getCognosViewer();
- if(oCV.getRAPReportInfo()&&oCV.getRAPReportInfo().isPromptPart()){
- return true;
- }
- return false;
- };
- CognosViewerAction.prototype.getLayoutComponents=function(){
- var _194=[];
- var _195=document.getElementById("rt"+this.m_oCV.getId());
- if(_195!=null){
- _194=getElementsByAttribute(_195,"*","lid");
- }
- return _194;
- };
- CognosViewerAction.prototype.addClientContextData=function(_196){
- var _197=this.m_oCV.getSelectionController();
- if(typeof _197!="undefined"&&_197!=null&&typeof _197.getCCDManager!="undefined"&&_197.getCCDManager()!=null){
- var _198=_197.getCCDManager();
- return ("<md>"+xml_encode(_198.MetadataToJSON())+"</md>"+"<cd>"+xml_encode(_198.ContextDataSubsetToJSON(_196))+"</cd>");
- }
- return "";
- };
- CognosViewerAction.prototype.getDataItemInfoMap=function(){
- var _199=this.m_oCV.getSelectionController();
- if(typeof _199!="undefined"&&_199!=null&&typeof _199.getCCDManager!="undefined"&&_199.getCCDManager()!=null){
- var _19a=_199.getCCDManager();
- return ("<di>"+xml_encode(_19a.DataItemInfoToJSON())+"</di>");
- }
- return "";
- };
- CognosViewerAction.prototype.getRAPLayoutTag=function(_19b){
- var _19c=null;
- if(typeof _19b=="object"&&_19b!=null){
- _19c=_19b.getAttribute("rap_layout_tag");
- }
- return _19c;
- };
- CognosViewerAction.prototype.addMenuItemChecked=function(_19d,_19e,_19f){
- if(_19d){
- if(this.getCognosViewer().isHighContrast()){
- _19e["class"]="menuItemSelected";
- }
- _19e.iconClass="menuItemChecked";
- }else{
- if(_19f&&_19f.length>0){
- _19e.iconClass=_19f;
- }
- }
- };
- CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_1a0){
- var _1a1=this.getCognosViewer().getViewerWidget();
- _1a1.filterRequiredAction=_1a0;
- _1a1.clearRAPCache();
- _1a1.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"});
- };
- CognosViewerAction.prototype.addClientSideUndo=function(_1a2,_1a3){
- var _1a4=GUtil.generateCallback(_1a2.doUndo,_1a3,_1a2);
- var _1a5=GUtil.generateCallback(_1a2.doRedo,_1a3,_1a2);
- this.getUndoRedoQueue().addClientSideUndo({"tooltip":_1a2.getUndoHint(),"undoCallback":_1a4,"redoCallback":_1a5});
- this.getCognosViewer().getViewerWidget().updateToolbar();
- };
- CognosViewerAction.prototype.isValidMenuItem=function(){
- var _1a6=this.getCognosViewer();
- var _1a7=_1a6.getViewerWidget();
- if(this.isPromptWidget()){
- return false;
- }
- return true;
- };
- CognosViewerAction.prototype.isPositiveInt=function(_1a8){
- if(typeof _1a8==="undefined"||_1a8===null){
- return false;
- }
- var _1a9=parseInt(_1a8,10);
- return _1a8&&_1a9===+_1a8&&_1a9>0&&_1a8.indexOf(".")==-1;
- };
- CognosViewerAction.prototype.buildActionResponseObject=function(_1aa,code,msg){
- return {"status":_1aa,"message":msg?msg:null,"code":code?code:null,getStatus:function(){
- return this.status;
- },getMessage:function(){
- return this.message;
- },getCode:function(){
- return this.code;
- }};
- };
- function LineageAction(){
- };
- LineageAction.prototype=new CognosViewerAction();
- LineageAction.prototype.getCommonOptions=function(_1ad){
- _1ad.addFormField("cv.responseFormat","asynchDetailMIMEAttachment");
- _1ad.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false");
- _1ad.addFormField("cv.id",this.m_oCV.envParams["cv.id"]);
- };
- LineageAction.prototype.getSelectionOptions=function(_1ae){
- var _1af=this.m_oCV.getSelectionController();
- var _1b0=getSelectionContextIds(_1af);
- _1ae.addFormField("context.format","initializer");
- _1ae.addFormField("context.type","reportService");
- _1ae.addFormField("context.selection","metadata,"+_1b0.toString());
- };
- LineageAction.prototype.getPrimaryRequestOptions=function(_1b1){
- _1b1.addFormField("specificationType","metadataServiceLineageSpecification");
- _1b1.addFormField("ui.action","runLineageSpecification");
- _1b1.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
- };
- LineageAction.prototype.getSecondaryRequestOptions=function(_1b2){
- _1b2.addFormField("ui.conversation",this.m_oCV.getConversation());
- _1b2.addFormField("m_tracking",this.m_oCV.getTracking());
- _1b2.addFormField("ui.action","lineage");
- };
- LineageAction.prototype.updateMenu=function(_1b3){
- if(!this.getCognosViewer().bCanUseLineage){
- return "";
- }
- _1b3.disabled=!this.selectionHasContext();
- return _1b3;
- };
- LineageAction.prototype.execute=function(){
- var oCV=this.getCognosViewer();
- var _1b5=new AsynchDataDispatcherEntry(oCV);
- this.getCommonOptions(_1b5);
- this.getSelectionOptions(_1b5);
- if(oCV.getConversation()==""){
- this.getPrimaryRequestOptions(_1b5);
- }else{
- this.getSecondaryRequestOptions(_1b5);
- }
- _1b5.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}});
- if(!oCV.m_viewerFragment){
- _1b5.setRequestIndicator(oCV.getRequestIndicator());
- var _1b6=new WorkingDialog(oCV);
- _1b6.setSimpleWorkingDialogFlag(true);
- _1b5.setWorkingDialog(_1b6);
- }
- oCV.dispatchRequest(_1b5);
- };
- LineageAction.prototype.handleLineageResponse=function(_1b7){
- var oCV=this.getCognosViewer();
- oCV.loadExtra();
- oCV.setStatus(_1b7.getAsynchStatus());
- oCV.setConversation(_1b7.getConversation());
- oCV.setTracking(_1b7.getTracking());
- var _1b9=null;
- if(typeof MDSRV_CognosConfiguration!="undefined"){
- _1b9=new MDSRV_CognosConfiguration();
- var _1ba="";
- if(this.m_oCV.envParams["metadataInformationURI"]){
- _1ba=this.m_oCV.envParams["metadataInformationURI"];
- }
- _1b9.addProperty("lineageURI",_1ba);
- _1b9.addProperty("gatewayURI",this.m_oCV.getGateway());
- }
- var _1bb=this.m_oCV.envParams["ui.object"];
- var _1bc=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_1bb));
- var _1bd=new MDSRV_LineageFragmentContext(_1b9,_1bc);
- _1bd.setExecutionParameters(this.m_oCV.getExecutionParameters());
- if(typeof _1bb=="string"){
- _1bd.setReportPath(_1bb);
- }
- _1bd.setReportLineage(_1b7.getResult());
- _1bd.open();
- };
- function CSelectionDefaultStyles(_1be){
- this.m_primarySelectionColor=null;
- this.m_highContrastBorderStyle="solid";
- this.m_secondarySelectionIsDisabled=false;
- if(_1be){
- this.m_selectionController=_1be;
- this.m_oCognosViewer=_1be.m_oCognosViewer;
- if(this.m_oCognosViewer){
- var _1bf=this.m_oCognosViewer.getUIConfig();
- if(_1bf){
- if(_1bf.getPrimarySelectionColor()){
- this.m_primarySelectionColor=_1bf.getPrimarySelectionColor();
- }
- if(!_1bf.getShowSecondarySelection()){
- this.m_secondarySelectionIsDisabledConfig=true;
- }else{
- if(_1bf.getSeondarySelectionColor()){
- this.m_secondarySelectionColor=_1bf.getSeondarySelectionColor();
- }
- }
- }
- }
- }
- };
- CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_1c0){
- return this.m_primarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
- return this.m_secondarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
- return this.m_highContrastBorderStyle;
- };
- CSelectionDefaultStyles.prototype.canApplyToSelection=function(_1c1){
- return true;
- };
- CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
- return this.m_secondarySelectionIsDisabled;
- };
- CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
- };
- function CSelectionFilterStyles(_1c2){
- this.m_selectionController=_1c2;
- this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD";
- this.m_primarySelectionFilterColorForMeasure=null;
- this.m_secondarySelectionColor=null;
- this.m_highContrastBorderStyle="dotted";
- this.m_secondarySelectionIsDisabled=true;
- };
- CSelectionFilterStyles.prototype=new CSelectionDefaultStyles();
- CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_1c3){
- return this.m_primarySelectionColor;
- };
- CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){
- return this.m_secondarySelectionColor;
- };
- CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){
- return this.m_highContrastBorderStyle;
- };
- CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){
- return this.m_secondarySelectionIsDisabled;
- };
- CSelectionFilterStyles.prototype.canApplyToSelection=function(_1c4){
- return !this.selectionHasOnlyMeasure(_1c4);
- };
- CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_1c5){
- return (_1c5.length===1&&_1c5[0].length===1&&this.m_selectionController.isMeasure(_1c5[0][0]));
- };
- CSelectionFilterStyles.prototype.setStyleForSelection=function(_1c6){
- this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_1c6))?null:this.m_primarySelectionFilterColor;
- };
- function CSelectionFilterContextMenuStyles(_1c7){
- CSelectionDefaultStyles.call(this,_1c7);
- this.m_secondarySelectionIsDisabled=true;
- };
- CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles();
- function CSelectionObject(){
- this.initialize();
- };
- CSelectionObject.prototype.initialize=function(){
- this.m_oCellRef={};
- this.m_sColumnRef="";
- this.m_sColumnName="";
- this.m_aDataItems=[];
- this.m_aUseValues=[];
- this.m_aDisplayValues=[];
- this.m_sCellTypeId="";
- this.m_sLayoutType="";
- this.m_sTag="";
- this.m_aMuns=[];
- this.m_aRefQueries=[];
- this.m_aMetadataItems=[];
- this.m_aDrillOptions=[];
- this.m_selectionController={};
- this.m_contextIds=[];
- this.m_ctxAttributeString="";
- this.m_fetchedContextIds=false;
- this.m_selectedClass=[];
- this.m_cutClass=[];
- this.m_dataContainerType="";
- this.m_oJsonContext=null;
- };
- CSelectionObject.prototype.isSelectionOnVizChart=function(){
- return false;
- };
- CSelectionObject.prototype.getCellRef=function(){
- return this.m_oCellRef;
- };
- CSelectionObject.prototype.getColumnRP_Name=function(){
- if(this.m_oCellRef!=null){
- return this.m_oCellRef.getAttribute("rp_name");
- }
- };
- CSelectionObject.prototype.getColumnRef=function(){
- return this.m_sColumnRef;
- };
- CSelectionObject.prototype.getColumnName=function(){
- if(this.m_sColumnName==""){
- if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){
- this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]);
- }
- }
- return this.m_sColumnName;
- };
- CSelectionObject.prototype.getDataItemDisplayValue=function(_1c8){
- var _1c9=this.getDataItems();
- var item="";
- if(_1c9&&_1c9[0]&&_1c9[0][0]){
- item=this.getDataItems()[0][0];
- if(_1c8&&_1c8.itemInfo&&_1c8.itemInfo.length){
- var _1cb=_1c8.itemInfo;
- for(var i=0;i<_1cb.length;i++){
- if(_1cb[i].item===item&&_1cb[i].itemLabel){
- return _1cb[i].itemLabel;
- }
- }
- }
- }
- return item;
- };
- CSelectionObject.prototype.getDataItems=function(){
- if(!this.m_aDataItems.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aDataItems[this.m_aDataItems.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1cf=this.m_contextIds[i][j];
- this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_1cf)?this.m_selectionController.getRefDataItem(_1cf):"");
- }
- }
- }
- return this.m_aDataItems;
- };
- CSelectionObject.prototype.getUseValues=function(){
- if(!this.m_aUseValues.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aUseValues[this.m_aUseValues.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1d2=this.m_contextIds[i][j];
- this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_1d2)?this.m_selectionController.getUseValue(_1d2):"");
- }
- }
- }
- return this.m_aUseValues;
- };
- CSelectionObject.prototype.getCellTypeId=function(){
- return this.m_sCellTypeId;
- };
- CSelectionObject.prototype.getDisplayValues=function(){
- return this.m_aDisplayValues;
- };
- CSelectionObject.prototype.getLayoutType=function(){
- return this.m_sLayoutType;
- };
- CSelectionObject.prototype.getTag=function(){
- return this.m_sTag;
- };
- CSelectionObject.prototype.getMuns=function(){
- if(!this.m_aMuns.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aMuns[this.m_aMuns.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1d5=this.m_contextIds[i][j];
- this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_1d5)?this.m_selectionController.getMun(_1d5):"");
- }
- }
- }
- return this.m_aMuns;
- };
- CSelectionObject.prototype.getRefQueries=function(){
- if(!this.m_aRefQueries.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aRefQueries[this.m_aRefQueries.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1d8=this.m_contextIds[i][j];
- this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_1d8)?this.m_selectionController.getRefQuery(_1d8):"");
- }
- }
- }
- return this.m_aRefQueries;
- };
- CSelectionObject.prototype.getDimensionalItems=function(_1d9){
- var _1da=[];
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- _1da[_1da.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1dd=this.m_contextIds[i][j];
- var _1de="";
- if(this.m_selectionController.isContextId(_1dd)){
- switch(_1d9){
- case "hun":
- _1de=this.m_selectionController.getHun(_1dd);
- break;
- case "lun":
- _1de=this.m_selectionController.getLun(_1dd);
- break;
- case "dun":
- _1de=this.m_selectionController.getDun(_1dd);
- break;
- }
- }
- _1da[_1da.length-1].push(_1de);
- }
- }
- return _1da;
- };
- CSelectionObject.prototype.getMetadataItems=function(){
- if(!this.m_aMetadataItems.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aMetadataItems[this.m_aMetadataItems.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1e1=this.m_contextIds[i][j];
- var _1e2="";
- if(this.m_selectionController.isContextId(_1e1)){
- var sLun=this.m_selectionController.getLun(_1e1);
- var sHun=this.m_selectionController.getHun(_1e1);
- if(sLun&&sLun!=""){
- _1e2=sLun;
- }else{
- if(sHun&&sHun!=""){
- _1e2=sHun;
- }else{
- _1e2=this.m_selectionController.getQueryModelId(_1e1);
- }
- }
- }
- this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_1e2);
- }
- }
- }
- return this.m_aMetadataItems;
- };
- CSelectionObject.prototype.getDrillOptions=function(){
- if(!this.m_aDrillOptions.length){
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- this.m_aDrillOptions[this.m_aDrillOptions.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _1e7=this.m_contextIds[i][j];
- this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_1e7)?this.m_selectionController.getDrillFlag(_1e7):0);
- }
- }
- }
- return this.m_aDrillOptions;
- };
- CSelectionObject.prototype.getSelectedContextIds=function(){
- return this.m_contextIds;
- };
- CSelectionObject.prototype.fetchContextIds=function(){
- if(!this.m_fetchedContextIds&&this.m_contextIds.length&&this.m_selectionController.hasContextData()){
- var _1e8=[];
- for(var i=0;i<this.m_contextIds.length;i++){
- for(var j=0;j<this.m_contextIds[i].length;j++){
- _1e8.push(this.m_contextIds[i][j]);
- }
- }
- this.m_selectionController.fetchContextData(_1e8);
- this.m_fetchedContextIds=true;
- }
- };
- CSelectionObject.prototype.setSelectionController=function(sc){
- if(sc){
- this.m_selectionController=sc;
- }
- };
- CSelectionObject.prototype.getLayoutElementId=function(){
- return this.m_layoutElementId;
- };
- CSelectionObject.prototype.hasContextInformation=function(){
- for(var i=0;i<this.m_contextIds.length;i++){
- for(var j=0;j<this.m_contextIds[i].length;j++){
- if(this.m_contextIds[i][j].length>0){
- return true;
- }
- }
- }
- return false;
- };
- CSelectionObject.prototype.isHomeCell=function(){
- var _1ee=this.getCellRef().className;
- if(_1ee&&(_1ee=="xm"||_1ee.indexOf("xm ")!=-1||_1ee.indexOf(" xm")!=-1)){
- return true;
- }
- return false;
- };
- CSelectionObject.prototype.getDataContainerType=function(){
- return this.m_dataContainerType;
- };
- CSelectionObject.prototype.getContextJsonObject=function(_1ef,_1f0){
- if(this.m_oJsonContext===null){
- var _1f1={};
- var _1f2=[];
- var _1f3=null;
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return null;
- }
- var i=0,j=0;
- var _1f6=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ef);
- _1f3=_1f6;
- this._populateJsonContextObj(_1f6,this.m_aUseValues[i][j],_1ef.getDisplayValue(this.m_contextIds[i][j]),_1ef.getMun(this.m_contextIds[i][j]),_1f1,_1f2);
- j++;
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _1f6=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ef);
- if(!_1f3){
- _1f3=_1f6;
- }
- this._populateJsonContextObj(_1f6,this.m_aUseValues[i][j],_1ef.getDisplayValue(this.m_contextIds[i][j]),_1ef.getMun(this.m_contextIds[i][j]),_1f1,_1f2);
- }
- }
- this.m_oJsonContext=this._createGenericPayloadStructureJson(_1f3,_1f1,_1f2,_1f0);
- }
- return this.m_oJsonContext;
- };
- CSelectionObject.prototype._getBestPossibleItemName=function(_1f7,_1f8,_1f9){
- var _1fa=null;
- if(_1f9.isMeasure(_1f8)){
- if(!_1f9.isValidColumnTitle(this.m_oCellRef)){
- if(!_1f9.isRelational([_1f8])){
- _1fa=_1f9.getCCDManager().GetBestPossibleDimensionMeasureName(_1f8);
- }
- return (_1fa)?_1fa:_1f7;
- }
- }
- _1fa=_1f9.getCCDManager().GetBestPossibleItemName(_1f8);
- return (_1fa)?_1fa:_1f7;
- };
- CSelectionObject.prototype._isTypeColumnTitle=function(){
- if(this.m_oCellRef&&typeof this.m_oCellRef.getAttribute=="function"){
- return (this.m_oCellRef.getAttribute("type")==="columnTitle");
- }
- return false;
- };
- CSelectionObject.prototype._populateJsonContextObj=function(_1fb,_1fc,_1fd,mun,_1ff,_200){
- if(_1ff&&_200&&_1fb&&typeof _1ff[_1fb]=="undefined"){
- var _201=_1fd?_1fd:_1fc;
- _1ff[_1fb]=[_201];
- var _202={};
- if(_1fd){
- _202["caption"]=_1fd;
- }
- if(mun){
- _202["mun"]=mun;
- }
- if(_1fc){
- _202["use"]=_1fc;
- }
- _200.push(_202);
- }
- };
- CSelectionObject.prototype._createGenericPayloadStructureJson=function(_203,_204,_205,_206){
- if(_203&&_204&&_205){
- var _207=(_206)?_206:".";
- var _208={};
- _208[_207]={"values":_205};
- var obj={"com.ibm.widget.context":{"values":_204},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_203,"itemSpecification":_208}}};
- return obj;
- }
- return null;
- };
- CSelectionObject.prototype.populateSelectionPayload=function(_20a,_20b,_20c){
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return false;
- }
- _20c=((_20c===undefined)?false:_20c);
- var _20d=this.m_selectionController;
- for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
- var _210=(_20c?1:this.m_aDataItems[i].length);
- for(;j<_210;j++){
- if(!_20d.isMeasure(this.m_contextIds[i][j])){
- var _211=this.m_aDataItems[i][j];
- this._populateItemInSelectionPayload(_211,this.m_aUseValues[i][j],_20d.getDisplayValue(this.m_contextIds[i][j]),_20d.getMun(this.m_contextIds[i][j]),_20a,_20b);
- }
- }
- }
- return true;
- };
- CSelectionObject.prototype._populateItemInSelectionPayload=function(_212,_213,_214,mun,_216,_217){
- if(_216&&_212){
- var _218=_213?_213:_214;
- if(_216[_212]){
- _216[_212].push(_218);
- }else{
- _216[_212]=[_218];
- }
- var _219={};
- _219["caption"]=_218;
- if(mun){
- _219["mun"]=mun;
- }
- var _21a=_217[_212];
- if(!_21a){
- _21a={"values":[]};
- _217[_212]=_21a;
- }
- _21a.values.push(_219);
- }
- };
- CSelectionObject.prototype.getCtxAttributeString=function(){
- return this.m_ctxAttributeString;
- };
- CSelectionObject.prototype.isDataValueOrChartElement=function(){
- return (this.m_sLayoutType==="datavalue"||this.m_sLayoutType==="chartElement");
- };
- CSelectionObject.prototype.marshal=function(_21b,_21c){
- if(!this.m_oJsonForMarshal){
- var _21d={};
- var _21e=[];
- var _21f=null;
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return null;
- }
- var i=0,j=0;
- if(this.m_contextIds[i][j].length==0){
- var _222=false;
- do{
- for(;j<this.m_contextIds[i].length;j++){
- if(this.m_contextIds[i][j].length>0){
- _222=true;
- break;
- }
- }
- if(!_222){
- j=0;
- i++;
- }
- }while(!_222);
- }
- var _223=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_21b);
- var _224=_21b.isMeasure(this.m_contextIds[i][j]);
- var _225=this._getBestPossibleItemReference(this.m_contextIds[i][j],_224,_21b.getCCDManager());
- var _226=_21b.getCCDManager().GetQuery(this.m_contextIds[i][j]);
- var _227=this.isDataValueOrChartElement();
- var _228=this._populateJsonForMarshal(_223,_225,_224,this.m_aUseValues[i][j],_21b.getDisplayValue(this.m_contextIds[i][j]),_21b.getMun(this.m_contextIds[i][j]),_227);
- j++;
- var _229=[];
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _223=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_21b);
- _224=_21b.isMeasure(this.m_contextIds[i][j]);
- _225=this._getBestPossibleItemReference(this.m_contextIds[i][j],_224,_21b.getCCDManager());
- var _22a=this._populateJsonForMarshal(_223,_225,_224,this.m_aUseValues[i][j],_21b.getDisplayValue(this.m_contextIds[i][j]),_21b.getMun(this.m_contextIds[i][j]));
- if(_22a){
- _229.push(_22a);
- }
- }
- }
- var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
- if(lid&&lid.indexOf(_21c)>0){
- lid=lid.substring(0,lid.indexOf(_21c)-1);
- }
- this.m_oJsonForMarshal={"lid":lid,"query":_226,"selectedItem":_228,"context":_229};
- }
- return this.m_oJsonForMarshal;
- };
- CSelectionObject.prototype._populateJsonForMarshal=function(_22c,_22d,_22e,_22f,_230,mun,_232){
- if(_22c){
- var _233={};
- _233["itemName"]=_22c;
- _233["isMeasure"]=_22e?"true":"false";
- _233["mdProperty"]=_22d.mdProperty;
- _233["mdValue"]=_22d.mdValue;
- _233["isDataValueOrChartElement"]=_232?"true":"false";
- if(mun){
- _233["mun"]=mun;
- }
- if(_22f){
- _233["use"]=_22f;
- }
- return _233;
- }
- return null;
- };
- CSelectionObject.prototype._getBestPossibleItemReference=function(_234,_235,_236){
- var _237=null;
- var _238=null;
- if(_235){
- _238="i";
- _237=_236.GetQMID(_234);
- if(_237==null){
- _238="m";
- _237=_236.GetMUN(_234);
- }
- if(_237==null){
- _238="r";
- _237=_236.GetRDIValue(_234);
- }
- }else{
- _238="l";
- _237=_236.GetLUN(_234);
- if(_237==null){
- _238="h";
- _237=_236.GetHUN(_234);
- }
- if(_237==null){
- _238="i";
- _237=_236.GetQMID(_234);
- }
- if(_237==null){
- _238="r";
- _237=_236.GetRDIValue(_234);
- }
- }
- return {"mdProperty":_238,"mdValue":_237};
- };
- CSelectionChartObject.prototype=new CSelectionObject();
- CSelectionChartObject.prototype.constructor=CSelectionChartObject;
- CSelectionChartObject.baseclass=CSelectionObject.prototype;
- function CSelectionChartObject(){
- CSelectionChartObject.baseclass.initialize.call(this);
- this.m_chartArea=null;
- this.m_context="";
- this.m_chartCtxAreas=[];
- this.m_selectedVizChart=false;
- };
- CSelectionChartObject.prototype.isSelectionOnVizChart=function(){
- return this.m_selectedVizChart;
- };
- CSelectionChartObject.prototype.setSelectionOnVizChart=function(_239){
- var _23a=this.m_selectionController.getSelectedChartImageFromChartArea(_239);
- if(_23a){
- this.m_selectedVizChart=_23a.parentNode.getAttribute("vizchart")=="true"?true:false;
- }
- };
- CSelectionChartObject.prototype.getArea=function(){
- return this.m_chartArea;
- };
- CSelectionChartObject.prototype.getContext=function(){
- return this.m_context;
- };
- CSelectionChartObject.prototype.getCtxAreas=function(){
- return this.m_chartCtxAreas;
- };
- CSelectionChartObject.prototype.setCtxAreas=function(_23b){
- this.m_chartCtxAreas=_23b;
- };
- CSelectionChartObject.prototype.getCtxAttributeString=function(){
- return this.m_context;
- };
- function CChartHelper(_23c,_23d,_23e){
- var _23f=_23c.parentNode;
- this.m_selectionObjectFactory=_23d;
- this.m_map=_23f;
- _23e.loadExtra();
- this.imageMapHighlighter=new CImageMapHighlight(_23f,_23e.sWebContentRoot);
- this.initialize();
- };
- CChartHelper.prototype.initialize=function(){
- this.buildMapCtxAreas();
- this.m_chartCtxNodes={};
- };
- CChartHelper.prototype.buildMapCtxAreas=function(){
- var _240={};
- var _241=this.m_map.childNodes;
- var _242=_241.length;
- var _243=null;
- for(var i=0;i<_242;i++){
- var a=_241[i];
- _243=a.getAttribute("ctx");
- if(_243){
- if(_240[_243]){
- _240[_243].push(a);
- }else{
- _240[_243]=[a];
- }
- }
- }
- this.m_ctxAreas=_240;
- };
- CChartHelper.prototype.getChartNode=function(_246){
- if(!this.isAreaInitialized(_246)){
- var _247=_246.parentNode;
- this.m_map=_247;
- this.initialize();
- this.imageMapHighlighter.initialize(_247);
- }
- var _248=_246.getAttribute("ctx");
- if(!this.m_chartCtxNodes[_248]){
- this.m_chartCtxNodes[_248]=this.m_selectionObjectFactory.getSelectionChartObject(_246);
- this.m_chartCtxNodes[_248].setCtxAreas(this.m_ctxAreas[_248]);
- }
- return this.m_chartCtxNodes[_248];
- };
- CChartHelper.prototype.isAreaInitialized=function(_249){
- return this.imageMapHighlighter.isAreaInitialized(_249);
- };
- CChartHelper.prototype.getImageMapHighlighter=function(){
- return this.imageMapHighlighter;
- };
- function CSelectionObjectFactory(_24a){
- this.m_selectionController=_24a;
- };
- CSelectionObjectFactory.prototype.getSelectionController=function(){
- return this.m_selectionController;
- };
- CSelectionObjectFactory.prototype.getChildSpans=function(_24b){
- var _24c=[];
- for(var i=0;i<_24b.childNodes.length;i++){
- var _24e=_24b.childNodes[i];
- if(!_24e.getAttribute||_24e.getAttribute("skipSelection")!="true"){
- _24c.push(_24b.childNodes[i]);
- }
- }
- var _24f=_24b;
- var _250="";
- while(!_250&&_24f){
- _250=_24f.attributes?_24f.attributes["LID"]:"";
- _24f=_24f.parentNode;
- }
- _250=_250?_250.value:"";
- var _251=[];
- while(_24c.length>0){
- var _24e=_24c.pop();
- var lid=_24e.attributes?_24e.attributes["LID"]:"";
- lid=lid?lid.value:"";
- if(!lid||lid==_250){
- if(_24e.nodeName.toLowerCase()=="span"){
- _251.push(_24e);
- }else{
- for(i=0;i<_24e.childNodes.length;i++){
- _24c.push(_24e.childNodes[i]);
- }
- }
- }
- }
- return _251;
- };
- CSelectionObjectFactory.prototype.getSelectionObject=function(_253,_254){
- var _255=new CSelectionObject();
- try{
- _255.setSelectionController(this.getSelectionController());
- _255.m_oCellRef=_253;
- _255.m_sColumnRef=_253.getAttribute("cid");
- _255.m_sCellTypeId=_253.getAttribute("uid");
- _255.m_sLayoutType=_253.getAttribute("type");
- _255.m_sTag=_253.getAttribute("tag");
- _255.m_layoutElementId=this.getLayoutElementId(_253);
- _255.m_dataContainerType=this.getContainerType(_253);
- if(typeof cf!="undefined"){
- var _256=cf.cfgGet("MiniQueryObj");
- if(_256){
- var _257=_256.findChildWithAttribute("tag",_255.m_sTag);
- if(_257&&_257.getAttribute("id")!=null){
- _255.m_sColumnName=_257.getAttribute("id");
- }
- }
- }
- var _258=this.getChildSpans(_253);
- if(_258.length>0){
- for(var i=0;i<_258.length;i++){
- var _25a=_258[i];
- if(_25a.nodeType==1&&_25a.nodeName.toLowerCase()=="span"&&_25a.style.visibility!="hidden"){
- var _25b=null;
- if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""){
- _25b=_253;
- }else{
- if(_25a.getAttribute("ctx")!=null&&_25a.getAttribute("ctx")!=""){
- _25b=_25a;
- }else{
- if(_25a.getAttribute("dtTargets")&&_25a.childNodes&&_25a.childNodes.length){
- for(var _25c=0;_25c<_25a.childNodes.length;_25c++){
- if(_25a.childNodes[_25c].nodeType==1&&_25a.childNodes[_25c].style.visibility!="hidden"){
- _25b=_25a.childNodes[_25c];
- }
- }
- }else{
- for(var _25d=0;_25d<_25a.childNodes.length;_25d++){
- var _25e=_25a.childNodes[_25d];
- if(typeof _25e.getAttribute!="undefined"&&_25e.getAttribute("ctx")!=null&&_25e.getAttribute("ctx")!=""){
- _25b=_25e;
- break;
- }
- }
- }
- }
- }
- var _25f="";
- if(_25b&&_25b.getAttribute("ctx")){
- _25f=_25b.getAttribute("ctx");
- }
- _255.m_aDisplayValues[_255.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_25f,_253.parentNode);
- if(typeof _254!="undefined"&&_254!=_25f){
- continue;
- }
- _255=this.processCTX(_255,_25f);
- }
- }
- }else{
- if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""&&_255.m_sLayoutType=="datavalue"){
- _255=this.processCTX(_255,_253.getAttribute("ctx"));
- }
- }
- this.getSelectionController().processColumnTitleNode(_255);
- }
- catch(ex){
- }
- return _255;
- };
- CSelectionObjectFactory.prototype.processCTX=function(_260,_261){
- if(typeof _261!="string"||_261.length==0){
- return _260;
- }
- var ctx;
- if(typeof _260.m_contextIds=="object"&&_260.m_contextIds!==null&&_260.m_contextIds.length>0){
- var _263=_261.split("::");
- for(ctx=0;ctx<_260.m_contextIds.length;++ctx){
- try{
- if(_263[ctx]){
- _260.m_contextIds[ctx]=_260.m_contextIds[ctx].concat(_263[ctx].split(":"));
- }
- }
- catch(e){
- }
- }
- }else{
- _260.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_261);
- }
- _260.m_ctxAttributeString=_261;
- return _260;
- };
- CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_265,_266){
- if(!_266){
- _266=document;
- }
- var _267=new CSelectionObject();
- _267.setSelectionController(this.getSelectionController());
- _267.m_oCellRef=null;
- _267.m_sColumnRef=null;
- _267.m_sCellTypeId=null;
- _267.refQuery="";
- var _268=_266.getElementsByTagName("td");
- for(var i=0;i<_268.length;i++){
- var _26a=_268[i].getAttribute("tag");
- if(_26a!=null&&_26a!=""){
- if(tag==_26a){
- var _26b=_268[i].className;
- if(_26b!=null&&_26a!=""){
- if((_265=="columnTitle"&&_26b=="lt")||(_265=="datavalue"&&_26b=="lc")){
- _267.m_sColumnRef=_268[i].getAttribute("cid");
- _267.m_sCellTypeId=_268[i].getAttribute("uid");
- break;
- }
- }
- }
- }
- }
- if(_267.m_sCellTypeId==null){
- return null;
- }
- return _267;
- };
- CSelectionObjectFactory.prototype.getSelectionChartObject=function(_26c){
- var _26d="";
- if(_26c.getAttribute("flashChart")!=null){
- if(typeof _26c.getCtx!="undefined"){
- try{
- _26d=_26c.getCtx();
- }
- catch(e){
- _26d="";
- }
- }
- }else{
- _26d=_26c.getAttribute("ctx");
- }
- var _26e=new CSelectionChartObject();
- _26e.setSelectionController(this.getSelectionController());
- if(_26d!=null){
- _26e.m_contextIds=_26d.split("::");
- for(var ctx=0;ctx<_26e.m_contextIds.length;++ctx){
- _26e.m_contextIds[ctx]=_26e.m_contextIds[ctx].split(":");
- }
- }
- _26e.m_layoutElementId=this.getLayoutElementId(_26c);
- _26e.m_sLayoutType=_26c.getAttribute("type");
- _26e.m_chartArea=_26c;
- _26e.m_context=_26d;
- _26e.setSelectionOnVizChart(_26c);
- return _26e;
- };
- CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_270){
- var _271="";
- switch(_270){
- case "ls":
- _271="list";
- break;
- case "xt":
- _271="crosstab";
- break;
- case "rt":
- _271="repeaterTable";
- break;
- }
- return _271;
- };
- CSelectionObjectFactory.prototype.getContainerType=function(el){
- var type="";
- if(el){
- if(el.className){
- type=this.getContainerTypeFromClass(el.className);
- }
- if(!type){
- var _274=el.parentNode;
- if(_274){
- type=this.getContainerType(_274);
- }
- }
- }
- return type;
- };
- CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
- var id="";
- var _277=this.getSelectionController().getNamespace();
- if(el){
- if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
- for(var _278=0;_278<el.childNodes.length;_278++){
- var _279=el.childNodes[_278];
- if(_279.nodeName.toLowerCase()=="img"&&_279.getAttribute("lid")!=null){
- return _279.getAttribute("lid");
- }
- }
- }
- id=(el.getAttribute&&el.getAttribute("LID"))||"";
- if(!id){
- var _27a=el.parentNode;
- if(_27a){
- id=this.getLayoutElementId(_27a);
- }
- }else{
- if(el.tagName.toUpperCase()=="MAP"){
- id=id.replace(_277,"");
- id=_277+id;
- var _27b="#"+id;
- var _27c=getElementsByAttribute(el.parentNode,"IMG","usemap",_27b);
- if(_27c.length>0){
- id=_27c[0].getAttribute("LID");
- }
- }
- }
- }
- return id;
- };
- function CSelectionController(_27d,_27e){
- this.m_bSelectionBasedFeaturesEnabled=false;
- this.m_bDrillUpDownEnabled=false;
- this.m_bModelDrillThroughEnabled=false;
- this.m_oCognosViewer=null;
- this.m_bSavedSelections=false;
- if(_27e){
- this.m_oCognosViewer=_27e;
- }
- this.initialize(_27d);
- this.FILTER_SELECTION_STYLE=0;
- this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
- };
- CSelectionController.prototype.initialize=function(_27f){
- this.m_sNamespace=_27f;
- this.m_aCutColumns=[];
- this.m_aSelectedObjects=[];
- this.m_selectedClass=[];
- this.m_cutClass=[];
- this.m_oObserver=new CObserver(this);
- this.m_bSelectionArraysSetup=false;
- this.m_aSelectionHoverNodes=[];
- this.m_bUsingCCDManager=false;
- this.m_aReportMetadataArray=[];
- this.m_aReportContextDataArray=[];
- this.m_oCDManager=new CCDManager();
- this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this);
- this.m_selectedChartArea=null;
- this.m_selectedChartNodes=[];
- this.m_selectionContainerMap=null;
- this.m_chartHelpers={};
- if(this.m_oCognosViewer!=null){
- this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer);
- }
- this.m_maxSecondarySelection=-1;
- this.c_usageMeasure="2";
- this.m_ccl_dateTypes={59:"dateTime",60:"interval"};
- this.m_selectionStyles=new CSelectionDefaultStyles(this);
- this.m_originalSelectionStyles=this.m_selectionStyles;
- this.m_bAllowHorizontalDataValueSelection=false;
- };
- CSelectionController.prototype.secondarySelectionIsDisabled=function(){
- return this.m_selectionStyles.secondarySelectionIsDisabled();
- };
- CSelectionController.prototype.getPrimarySelectionColor=function(){
- return this.m_selectionStyles.getPrimarySelectionColor();
- };
- CSelectionController.prototype.getHighContrastBorderStyle=function(){
- return this.m_selectionStyles.getHighContrastBorderStyle();
- };
- CSelectionController.prototype.getSecondarySelectionColor=function(){
- return this.m_selectionStyles.getSecondarySelectionColor();
- };
- CSelectionController.prototype.resetSelectionStyles=function(){
- this.setSelectionStyles();
- };
- CSelectionController.prototype.setSelectionStyles=function(_280){
- switch(_280){
- case this.FILTER_SELECTION_STYLE:
- if(!this.m_selectionFilterStyles){
- this.m_selectionFilterStyles=new CSelectionFilterStyles(this);
- }
- this.m_selectionStyles=this.m_selectionFilterStyles;
- break;
- case this.FILTER_SELECTION_CONTEXT_MENU_STYLE:
- if(!this.m_selectionFilterContextMenuStyles){
- this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this);
- }
- this.m_selectionStyles=this.m_selectionFilterContextMenuStyles;
- break;
- default:
- this.m_selectionStyles=this.m_originalSelectionStyles;
- }
- };
- CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){
- this.m_bAllowHorizontalDataValueSelection=false;
- };
- CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_281){
- this.m_bAllowHorizontalDataValueSelection=_281;
- };
- CSelectionController.prototype.allowHorizontalDataValueSelection=function(){
- return this.m_bAllowHorizontalDataValueSelection;
- };
- CSelectionController.prototype.clearSelectionData=function(){
- this.m_aSelectedObjects=[];
- this.m_selectedChartNodes=[];
- this.m_oSelectedDrillThroughImage=null;
- this.m_oSelectedDrillThroughSingleton=null;
- };
- CSelectionController.prototype.getCCDManager=function(){
- return this.m_oCDManager;
- };
- CSelectionController.prototype.getCtxIdFromDisplayValue=function(_282){
- if(!this.m_bUsingCCDManager){
- var _283=this.getReportContextDataArray();
- var _284=1;
- for(var _285 in _283){
- var _286=_283[_285];
- if(_286[_284]==_282){
- return _285;
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForDisplayValue(_282);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_28a){
- return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_28a);
- };
- CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){
- var sLun=lun;
- var sHun=hun;
- if(mun&&mun.indexOf("->:[TM].")>0){
- sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun);
- sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun);
- }
- return {"lun":sLun,"hun":sHun};
- };
- CSelectionController.prototype.getCtxIdFromMun=function(sMun){
- if(!this.m_bUsingCCDManager){
- var _291=this.getReportMetadataArray();
- var _292=0;
- for(var sKey in _291){
- var _294=_291[sKey];
- if(_294[_292]==sMun){
- var _295=2;
- var _296=this.getReportContextDataArray();
- for(var _297 in _296){
- var _298=_296[_297];
- if(_298[_295]==sKey){
- return _297;
- }
- }
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.canDrillDown=function(_29a){
- var _29b=this.getDrillFlagForMember(_29a);
- return (_29b==3||_29b==2);
- };
- CSelectionController.prototype.canDrillUp=function(_29c){
- var _29d=this.getDrillFlagForMember(_29c);
- return (_29d==3||_29d==1);
- };
- CSelectionController.prototype.getQueryModelId=function(_29e){
- var qmid="";
- if(!this.m_bUsingCCDManager){
- var _2a0=this.m_aReportContextDataArray[_29e];
- if(_2a0&&typeof _2a0[3]!="undefined"){
- var _2a1=_2a0[3];
- var _2a2=this.m_aReportMetadataArray[_2a1];
- if(typeof _2a2!="undefined"&&typeof _2a2[1]!="undefined"&&_2a2[1]=="I"){
- qmid=_2a2[0];
- }
- }
- }else{
- qmid=this.m_oCDManager.GetQMID(_29e);
- }
- return qmid;
- };
- CSelectionController.prototype.getRefQuery=function(_2a3){
- if(!this.m_bUsingCCDManager){
- return this.getMetaDataItemUseValue(4,_2a3);
- }else{
- var _2a4=this.m_oCDManager.GetQuery(_2a3);
- return (_2a4==null)?"":_2a4;
- }
- };
- CSelectionController.prototype.getRefDataItem=function(_2a5){
- return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_2a5);
- };
- CSelectionController.prototype.getMun=function(_2a6){
- return this.m_oCognosViewer.getReportContextHelper().getMun(_2a6);
- };
- CSelectionController.prototype.getHun=function(_2a7){
- if(!this.m_bUsingCCDManager){
- var sHun=null;
- var _2a9=this.getRDI(_2a7);
- if(_2a9&&_2a9.length>4&&_2a9[1]=="R"){
- var _2aa=_2a9[4];
- var _2ab=this.getReportMetadataArray();
- _2a9=_2ab[_2aa];
- }
- if(_2a9&&_2a9.length>1&&_2a9[1]=="H"){
- sHun=_2a9[0];
- }
- return sHun;
- }else{
- return this.m_oCDManager.GetHUN(_2a7);
- }
- };
- CSelectionController.prototype.fetchContextData=function(_2ac,_2ad){
- var _2ae=0;
- if(this.m_bUsingCCDManager){
- _2ae=this.m_oCDManager.FetchContextData(_2ac,_2ad);
- }
- return _2ae;
- };
- CSelectionController.prototype.getMetaDataItem=function(sKey){
- var _2b0=this.getReportMetadataArray();
- if(typeof _2b0[sKey]!="undefined"){
- return _2b0[sKey];
- }
- return null;
- };
- CSelectionController.prototype.getContextDataItem=function(_2b1){
- var _2b2=this.getReportContextDataArray();
- if(typeof _2b2[_2b1]!="undefined"){
- return _2b2[_2b1];
- }
- return null;
- };
- CSelectionController.prototype.getMetaDataItemUseValue=function(_2b3,_2b4){
- var _2b5=this.getContextDataItem(_2b4);
- if(_2b5!=null){
- var _2b6=_2b5[_2b3];
- if(_2b6!=""){
- var _2b7=this.getMetaDataItem(_2b6);
- if(_2b7!=null){
- return _2b7[0];
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.getRDI=function(_2b8){
- var _2b9=this.getContextDataItem(_2b8);
- if(_2b9!=null){
- var _2ba=_2b9[0];
- if(_2ba!=""){
- var _2bb=this.getMetaDataItem(_2ba);
- if(_2bb!=null){
- return _2bb;
- }
- }
- }
- };
- CSelectionController.prototype.getNamespace=function(){
- return this.m_sNamespace;
- };
- CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_2bc){
- this.m_bSelectionBasedFeaturesEnabled=_2bc;
- };
- CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
- return this.m_bSelectionBasedFeaturesEnabled;
- };
- CSelectionController.prototype.setDrillUpDownEnabled=function(_2bd){
- this.m_bDrillUpDownEnabled=_2bd;
- };
- CSelectionController.prototype.getDrillUpDownEnabled=function(){
- return this.m_bDrillUpDownEnabled;
- };
- CSelectionController.prototype.setModelDrillThroughEnabled=function(_2be){
- this.m_bModelDrillThroughEnabled=_2be;
- };
- CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
- var _2bf=this.getAllSelectedObjects();
- if(_2bf&&_2bf.length>0){
- var _2c0=_2bf[0];
- if(_2c0.hasContextInformation()){
- var _2c1=this.m_oCDManager.GetBIValue(_2c0.m_contextIds[0][0]);
- if(!_2c1){
- return null;
- }
- return _2c1;
- }
- }
- return null;
- };
- CSelectionController.prototype.getModelPathForCurrentSelection=function(){
- var _2c2=null;
- var _2c3=this.getBookletItemForCurrentSelection();
- if(_2c3){
- var _2c2=this.m_oCDManager.getModelPathFromBookletItem(_2c3);
- }
- return _2c2;
- };
- CSelectionController.prototype.getModelDrillThroughEnabled=function(){
- var _2c4=this.getBookletItemForCurrentSelection();
- if(_2c4){
- var _2c5=this.m_oCDManager.GetBookletModelBasedDrillThru(_2c4);
- return _2c5==1?true:false;
- }else{
- return this.m_bModelDrillThroughEnabled;
- }
- };
- CSelectionController.prototype.clearSelectedObjects=function(_2c6){
- try{
- if(!_2c6){
- _2c6=document;
- }
- this.updateUI(_2c6,this.getSelections(),true,false);
- this.m_aSelectedObjects=[];
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.resetSelections=function(_2c7){
- try{
- if(!_2c7){
- _2c7=document;
- }
- if(this.hasSelectedChartNodes()){
- this.resetChartSelections(_2c7);
- }
- this.m_oSelectedDrillThroughImage=null;
- this.m_oSelectedDrillThroughSingleton=null;
- if(this.getSelections()){
- this.updateUI(_2c7,this.getSelections(),true,false);
- this.updateUI(_2c7,this.getCutColumns(),true,false);
- this.m_aCutColumns=[];
- this.m_aSelectedObjects=[];
- this.m_selectedClass=[];
- this.m_cutClass=[];
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.resetChartSelections=function(_2c8){
- var _2c9=this.m_chartHelpers;
- for(var _2ca in _2c9){
- if(_2c9[_2ca]){
- var _2cb=_2c9[_2ca].getImageMapHighlighter();
- if(_2cb.hideAllAreas){
- _2cb.hideAllAreas();
- }
- }
- }
- this.m_selectedChartNodes=[];
- this.m_selectionContainerMap=null;
- };
- CSelectionController.prototype.addSelectionObject=function(_2cc,_2cd){
- try{
- if(!_2cd){
- _2cd=document;
- }
- var _2ce=_2cc.getCellRef();
- if(this.isCellSelected(_2ce)!==true||(typeof _2ce!="object"||_2ce===null)){
- if(this.isColumnCut(_2cc.getTag())!==true){
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_2cc;
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- this.updateUI(_2cd,this.getSelections(),false,false);
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.removeSelectionObject=function(_2cf,_2d0){
- try{
- if(!_2d0){
- _2d0=document;
- }
- var _2d1=[];
- var _2d2;
- for(_2d2=0;_2d2<this.m_aSelectedObjects.length;_2d2++){
- var _2d3=this.m_aSelectedObjects[_2d2].getCellRef();
- var _2d4=_2cf.getCellRef();
- if(typeof _2d3=="object"&&typeof _2d4=="object"&&_2d3!==null&&_2d4!==null){
- if(_2d3==_2d4){
- _2d1[_2d1.length]=_2d2;
- }
- }
- }
- if(_2d1.length>0){
- this.updateUI(_2d0,this.getSelections(),true,false);
- var _2d5=[];
- for(_2d2=0;_2d2<this.m_aSelectedObjects.length;_2d2++){
- var _2d6=true;
- for(var j=0;j<_2d1.length;j++){
- if(_2d2==_2d1[j]){
- _2d6=false;
- }
- }
- if(_2d6){
- _2d5[_2d5.length]=this.m_aSelectedObjects[_2d2];
- }
- }
- this.m_aSelectedObjects=_2d5;
- this.updateUI(_2d0,this.getSelections(),false,false);
- }
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.isSavedCellSelected=function(_2d8){
- return this.isCellSelectedHelper(_2d8,this.getSavedSelectedObjects());
- };
- CSelectionController.prototype.isCellSelected=function(_2d9){
- return this.isCellSelectedHelper(_2d9,this.getSelections());
- };
- CSelectionController.prototype.isCellSelectedHelper=function(_2da,_2db){
- try{
- for(var i=0;i<_2db.length;i++){
- var _2dd=_2db[i].getCellRef();
- if(typeof _2dd=="object"&&_2dd!==null){
- if(_2dd==_2da){
- return true;
- }
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnSelected=function(_2de){
- try{
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- if(this.m_aSelectedObjects[i].getTag()==_2de){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnCut=function(_2e0){
- try{
- for(var i=0;i<this.m_aCutColumns.length;i++){
- if(this.m_aCutColumns[i].getTag()==_2e0){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.getSelections=function(){
- return this.m_aSelectedObjects;
- };
- CSelectionController.prototype.selectSingleDomNode=function(_2e2){
- this.clearSelectedObjects();
- var _2e3=this.getSelectionObjectFactory().getSelectionObject(_2e2);
- var _2e4=null;
- if(isIE()){
- _2e4=_2e2.document;
- }else{
- _2e4=_2e2.ownerDocument;
- }
- this.addSelectionObject(_2e3,_2e4);
- };
- CSelectionController.prototype.hasCutColumns=function(){
- if(this.m_aCutColumns.length===0){
- return false;
- }else{
- return true;
- }
- };
- CSelectionController.prototype.setCutColumns=function(_2e5,_2e6){
- try{
- if(!_2e6){
- _2e6=document;
- }
- this.updateUI(_2e6,this.getSelections(),true,false);
- this.updateUI(_2e6,this.getCutColumns(),true,1);
- this.m_aCutColumns=[];
- if(_2e5===true){
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
- }
- this.m_aSelectedObjects=[];
- }
- this.updateUI(_2e6,this.getCutColumns(),false,2);
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.getCutColumns=function(){
- return this.m_aCutColumns;
- };
- CSelectionController.prototype.getObservers=function(){
- return this.m_oObserver;
- };
- CSelectionController.prototype.attachObserver=function(_2e8){
- this.m_oObserver.attach(_2e8);
- };
- CSelectionController.prototype.onSelectionChange=function(){
- this.getObservers().notify();
- };
- CSelectionController.prototype.getSelectedColumns=function(_2e9){
- var _2ea=[];
- if(typeof _2e9=="undefined"){
- _2e9=this.getSelections();
- }
- var _2eb=_2e9.length;
- for(var i=0;i<_2eb;i++){
- var _2ed=_2e9[i];
- var _2ee=true;
- for(var j=0;j<_2ea.length;j++){
- if(_2ea[j][0]==_2ed.getColumnRef()&&_2ea[j][1]==_2ed.getCellTypeId()){
- _2ee=false;
- break;
- }
- }
- if(_2ee){
- _2ea[_2ea.length]=[_2ed.getColumnRef(),_2ed.getCellTypeId(),_2ed.getLayoutType(),_2ed.getTag(),_2ed.getColumnName()];
- }
- }
- return _2ea;
- };
- CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
- var _2f0=[];
- var _2f1=this.getAllSelectedObjects();
- for(var i=0;i<_2f1.length;i++){
- var _2f3=false;
- var _2f4=_2f1[i];
- for(var ii=0;ii<_2f0.length;ii++){
- if(_2f4.m_contextIds[0][0]==_2f0[ii].m_contextIds[0][0]){
- _2f3=true;
- break;
- }
- }
- if(!_2f3){
- _2f0.push(_2f4);
- }
- }
- return _2f0;
- };
- CSelectionController.prototype.getAllSelectedObjects=function(){
- var _2f6=this.getSelections();
- if(this.hasSelectedChartNodes()){
- _2f6=_2f6.concat(this.getSelectedChartNodes());
- }
- return _2f6;
- };
- CSelectionController.prototype.getSelectedColumnIds=function(_2f7){
- var _2f8=[];
- if(typeof _2f7=="undefined"){
- _2f7=this.getSelections();
- }
- var _2f9=this.getSelectedColumns(_2f7);
- for(var _2fa=0;_2fa<_2f9.length;_2fa++){
- var _2fb=true;
- for(var _2fc=0;_2fc<_2f8.length;_2fc++){
- if(_2f8[_2fc]==_2f9[_2fa][4]){
- _2fb=false;
- break;
- }
- }
- if(_2fb){
- _2f8[_2f8.length]=_2f9[_2fa][4];
- }
- }
- return _2f8;
- };
- var STYLE_SELECTION={};
- CSelectionController.prototype.selecting=function(c,_2fe){
- var _2ff="."+c+_2fe;
- var doc=document;
- var _301=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_301){
- doc=_301.contentWindow.document;
- }
- var _302=doc.createElement("style");
- _302.setAttribute("type","text/css");
- if(_302.styleSheet){
- _302.styleSheet.cssText=_2ff;
- }else{
- _302.appendChild(doc.createTextNode(_2ff));
- }
- doc.getElementsByTagName("head").item(0).appendChild(_302);
- STYLE_SELECTION[c]=_302;
- };
- CSelectionController.prototype.deselecting=function(_303){
- for(var i=0;i<_303.length;++i){
- if(STYLE_SELECTION[_303[i]]){
- var node=STYLE_SELECTION[_303[i]];
- node.parentNode.removeChild(node);
- STYLE_SELECTION[_303[i]]=null;
- }
- }
- if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
- var _306=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
- if(_306!=null){
- var _307=_306.style.display;
- _306.style.display="none";
- _306.style.display=_307;
- }
- }
- };
- CSelectionController.prototype.showViewerContextMenu=function(){
- if(this.hasSelectedChartNodes()){
- return true;
- }
- if(this.m_aSelectedObjects&&this.m_aSelectedObjects.length>0){
- return true;
- }
- return false;
- };
- function getStyleFromClass(c){
- for(var i=0;i<document.styleSheets.length;i++){
- var ss=document.styleSheets[i];
- var _30b=(ss.cssRules?ss.cssRules:ss.rules);
- for(var j=0;j<_30b.length;j++){
- var cr=_30b[j];
- var _30e=new RegExp("\\b"+c+"\\b","g");
- if(cr.selectorText&&cr.selectorText.match(_30e)){
- return cr;
- }
- }
- }
- return 0;
- };
- CSelectionController.prototype.canUpdateSelection=function(_30f){
- return this.m_selectionStyles.canApplyToSelection(_30f);
- };
- CSelectionController.prototype.setStyleForSelection=function(_310){
- return this.m_selectionStyles.setStyleForSelection(_310);
- };
- CSelectionController.prototype.updateUI=function(_311,_312,_313,_314){
- if(!_311){
- _311=document;
- }
- try{
- if(_312&&_312.length>0){
- var _315,_316,_317;
- if(_314==1||_314==2){
- if(_313){
- this.deselecting(this.m_cutClass);
- }else{
- var _318=getStyleFromClass("cutSelection").style.color;
- var _319=getStyleFromClass("cutSelection").style.backgroundColor;
- _315=_312.length;
- for(_316=0;_316<_315;_316++){
- _317=_312[_316].getCellRef();
- var _31a="cutQS"+_317.getAttribute("cid");
- this.selecting(_31a,"\n{ background-color: "+_319+"; color: "+_318+";}\n");
- this.m_cutClass.push(_31a);
- }
- }
- }else{
- if(this.m_oCognosViewer){
- this.findSelectionURLs();
- _317="";
- _315=_312.length;
- for(_316=0;_316<_315;_316++){
- _317=_312[_316].getCellRef();
- if(_317.getAttribute("oldClassName")!=null){
- _317.className=_317.getAttribute("oldClassName");
- _317.removeAttribute("oldClassName");
- }
- this.setStyleForSelection(_312[_316].m_contextIds);
- if(!this.secondarySelectionIsDisabled()||_313){
- var _31b=document.getElementById("CVReport"+this.getNamespace());
- var _31c=getElementsByAttribute(_31b,["td","th"],"name",_317.getAttribute("name"),this.m_maxSecondarySelection);
- for(var _31d=0;_31d<_31c.length;_31d++){
- var cell=_31c[_31d];
- if(_313){
- this.restoreOldBackgroundImage(cell);
- }else{
- if(cell.getAttribute("oldBackgroundImageStyle")==null){
- this.saveOldCellStyles(cell);
- this.setSecondarySelectionStyles(cell);
- }
- }
- }
- }
- this.saveOldCellStyles(_317);
- if(_313){
- this.restoreOldBackgroundImage(_317);
- if(this.m_oCognosViewer.isHighContrast()){
- this.restoreOldBorder(_317);
- this.restoreOldPadding(_317);
- }
- }else{
- this.setPrimarySelectionStyles(_317);
- if(this.m_oCognosViewer.isHighContrast()){
- var size=getBoxInfo(_317,true);
- this.saveOldBorder(_317);
- this.saveOldPadding(_317,size);
- var _320=3;
- var _321=size.borderTopWidth+size.paddingTop-_320;
- var _322=size.borderBottomWidth+size.paddingBottom-_320;
- var _323=size.borderLeftWidth+size.paddingLeft-_320;
- var _324=size.borderRightWidth+size.paddingRight-_320;
- _317.style.border=_320+"px "+this.getHighContrastBorderStyle()+" black";
- _317.style.padding=_321+"px "+_324+"px "+_322+"px "+_323+"px";
- }
- }
- }
- }
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.findSelectionURLs=function(){
- if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){
- if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){
- this.pS_backgroundImageURL="url(../common/images/selection_primary.png)";
- this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)";
- }else{
- this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection"));
- this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection"));
- }
- }
- };
- CSelectionController.prototype.setSelectedChartImgArea=function(_325){
- var _326=true;
- var _327=_325.getAttribute("rsvpChart");
- var _328=_325.parentNode.getAttribute("chartContainer");
- if(_327!="true"&&_328!="true"){
- this.m_selectedChartNodes=[];
- _326=false;
- }else{
- var _329=this.getSelectionObjectFactory().getSelectionChartObject(_325);
- this.m_selectedChartNodes=[_329];
- }
- return _326;
- };
- CSelectionController.prototype.setSelectedChartArea=function(_32a,e){
- var _32c=typeof this.m_oCognosViewer.isBux!=="undefined";
- var _32d=false;
- if(_32a!==null){
- if(_32a.tagName=="IMG"){
- _32d=this.setSelectedChartImgArea(_32a);
- }else{
- if(_32a.nodeName=="AREA"&&_32a.attributes["ctx"]){
- _32d=true;
- if(_32c){
- this.setBuxSelectedChartArea(_32a,e);
- }else{
- this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_32a)];
- }
- }
- }
- if(_32d){
- this.getObservers().notify();
- }
- }
- return _32d;
- };
- CSelectionController.prototype.setBuxSelectedChartArea=function(_32e,e){
- var _330=this.getChartHelper(_32e);
- var _331=_330.getChartNode(_32e);
- this.setStyleForSelection(_331.m_contextIds);
- var _332=_330.getImageMapHighlighter();
- _332.setFillColour(this.getPrimarySelectionColor());
- _332.setStrokeColour(this.getPrimarySelectionColor());
- if(typeof e=="undefined"){
- e={};
- }
- if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
- if(_332.isAreaHighlighted(_32e)){
- _332.hideAreas(_331.getCtxAreas());
- var _333=_32e.getAttribute("ctx");
- var _334=this.m_selectedChartNodes.length;
- for(var i=0;i<_334;i++){
- var _336=this.m_selectedChartNodes[i];
- if(_333==_336.getContext()){
- this.m_selectedChartNodes.splice(i,1);
- break;
- }
- }
- }else{
- this.updateSelectionContainer(_32e);
- _332.highlightAreas(_331.getCtxAreas(),true);
- this.m_selectedChartNodes.push(_331);
- }
- }else{
- if(this.hasSavedSelectedChartNodes()){
- var _337=this.m_savedSelectedChartNodes.length;
- var _338=this.m_savedSelectedChartNodes;
- for(var i=0;i<_337;i++){
- var area=_338[i].getArea();
- var _33a=this.getSavedChartHelper(area);
- var _33b=_33a.getImageMapHighlighter();
- var _33c=_33b.getAreaId(area);
- if(_332.getAreaId(_32e)===_33c){
- _33b.hideAreaById(_33c+this.m_savedPrimarySelectionColor);
- break;
- }
- }
- }
- this.updateSelectionContainer(_32e);
- _332.highlightAreas(_331.getCtxAreas());
- this.m_selectedChartNodes=[_331];
- }
- };
- CSelectionController.prototype.updateSelectionContainer=function(_33d){
- var _33e=_33d.parentNode;
- if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_33e.name){
- var _33f=this.getChartHelper(_33d).getImageMapHighlighter();
- _33f.hideAllAreas();
- }
- this.m_selectionContainerMap=_33e;
- };
- CSelectionController.prototype.getChartHelper=function(_340){
- var _341=_340.parentNode;
- var _342=_341.name;
- if(!this.m_chartHelpers[_342]){
- this.m_chartHelpers[_342]=new CChartHelper(_340,this.getSelectionObjectFactory(),this.m_oCognosViewer);
- }
- return this.m_chartHelpers[_342];
- };
- CSelectionController.prototype.getSavedChartHelper=function(_343){
- var _344=_343.parentNode;
- var _345=_344.name;
- return this.m_savedChartHelpers[_345];
- };
- CSelectionController.prototype.getSelectedChartArea=function(){
- return this.m_selectedChartArea;
- };
- CSelectionController.prototype.getSelectedChartNodes=function(){
- return this.m_selectedChartNodes;
- };
- CSelectionController.prototype.hasSelectedChartNodes=function(){
- return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0;
- };
- CSelectionController.prototype.getSelectedChartImage=function(){
- var _346=null;
- if(this.hasSelectedChartNodes()){
- var _347=this.m_selectedChartNodes[0];
- _346=_347.getArea();
- }
- if(_346===null){
- return null;
- }
- if(_346.tagName=="IMG"){
- return _346;
- }
- return this.getSelectedChartImageFromChartArea(_346);
- };
- CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_348){
- var _349=_348.parentNode;
- var _34a="#"+_349.getAttribute("name");
- return this.checkChildrenForChart(_349.parentNode,_34a);
- };
- CSelectionController.prototype.checkChildrenForChart=function(_34b,_34c){
- var _34d=_34b.firstChild;
- while(_34d!==null){
- if(!_34d.tagName){
- return null;
- }else{
- if(_34d.tagName=="IMG"&&_34d.getAttribute("usemap")==_34c){
- return _34d;
- }else{
- if(_34d.tagName==="DIV"||_34d.tagName==="SPAN"){
- var _34e=this.checkChildrenForChart(_34d,_34c);
- if(_34e){
- return _34e;
- }
- }
- }
- }
- _34d=_34d.nextSibling;
- }
- return null;
- };
- CSelectionController.prototype.downloadSelectedChartImage=function(_34f){
- var _350=this.getSelectedChartImage();
- if(_350!==null){
- var _351=this.getDocumentFromImage(_350);
- var _352=_350.name.replace(".","_");
- var _353=_352.substr(5);
- var _354="?m_name=";
- _354+=_353;
- _354+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
- if(isIE()){
- _352=_351.parentWindow.eval("graphicSrc"+_353);
- }else{
- _352=_351.defaultView.eval("graphicSrc"+_353);
- }
- var _355="";
- if(typeof _352!="undefined"&&_352!==null){
- var _356=_352.split("&");
- if(_356.length===0){
- return;
- }
- if(_352.indexOf("/repository/")<0){
- for(var i=0;i<_356.length;++i){
- var _358=_356[i];
- var _359=_358.indexOf("=");
- if(_359!=-1){
- var _35a=_358.substr(0,_359);
- var _35b=_358.slice(_359+1);
- if(_35a=="search"){
- _355+=_35b;
- break;
- }
- }
- }
- }
- if(_355==""){
- _354=_350.getAttribute("src");
- if(_354.indexOf("?")!=-1){
- _354+="&download=true";
- }else{
- _354+="?download=true";
- }
- }
- if(typeof getConfigFrame=="function"){
- _354+=_355;
- _354=getConfigFrame().constructGETRequestParamsString(_354);
- window.open(_354,"_blank","width=0,height=0");
- }else{
- _354=constructGETRequestParamsString(_354);
- _354+=_355;
- var _35c=this.m_oCognosViewer.getGateway();
- var _35d=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_35d){
- var _35e=_35d.src;
- if(_35e.indexOf("repository")>=0&&_354.indexOf("repository")<0){
- var _35f=_35e.indexOf("content");
- _354=_35e.substring(0,_35f)+_354;
- }
- }
- if(_354.indexOf(_35c)==-1){
- var _360=document.forms["formWarpRequest"+_34f];
- _354=_360.action+_354;
- }
- if(typeof window.detachLeavingRV=="function"){
- window.detachLeavingRV();
- }
- location.href=_354;
- if(typeof window.attachLeavingRV=="function"){
- setTimeout(window.attachLeavingRV,100);
- }
- }
- }
- }
- };
- CSelectionController.prototype.getDocumentFromImage=function(_361){
- var _362=null;
- if(_361.ownerDocument){
- _362=_361.ownerDocument;
- }else{
- _362=_361.document;
- }
- return _362;
- };
- CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
- var _364=this.getSelections();
- if(_364.length>1){
- if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){
- var node=getNodeFromEvent(e);
- try{
- while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){
- node=node.parentNode;
- }
- }
- catch(ex){
- }
- var _366=this.getSelectionObjectFactory().getContainerType(node);
- if(_366==="list"){
- for(var i=0;i<_364.length;i++){
- if(_364[i].m_oCellRef==node){
- return false;
- }
- }
- }
- }
- }
- return true;
- };
- CSelectionController.prototype.getContainerType=function(){
- var _368="";
- if(this.hasSelectedChartNodes()){
- _368="chart";
- }else{
- if(this.getDataContainerType()==="list"){
- _368="list";
- }else{
- _368="crosstab";
- }
- }
- return _368;
- };
- CSelectionController.prototype.getDisplayValues=function(){
- var _369={};
- var _36a=this.getAllSelectedObjects()[0];
- if(_36a){
- var _36b=_36a.getSelectedContextIds();
- if(_36b){
- for(var axis=0;axis<_36b.length;axis++){
- var _36d=[];
- var _36e=_36b[axis];
- for(var _36f=0;_36f<_36e.length;_36f++){
- var _370=_36e[_36f];
- var _371=this.getDisplayValue(_370);
- _36d.push(_371);
- if(axis===0){
- break;
- }
- }
- var _372="";
- switch(axis){
- case 0:
- _372="selected";
- break;
- case 1:
- _372="rows";
- break;
- default:
- _372="columns";
- }
- _369[_372]=_36d;
- }
- }
- }
- return _369;
- };
- CSelectionController.prototype.getChartTooltip=function(){
- var _373=this.getAllSelectedObjects()[0];
- if(_373){
- var area=_373.getArea();
- if(area){
- var _375=area.getAttribute("title");
- if(_375&&_375.length>0){
- return area.getAttribute("title");
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.pageClickedForMobile=function(e){
- this.pageClicked(e);
- var _377=this.getAllSelectedObjects().length;
- if(_377==0){
- var node=getNodeFromEvent(e,true);
- if(!node){
- return false;
- }
- if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){
- this.selectDrillThroughImage(node);
- return true;
- }else{
- if(node.getAttribute("dttargets")){
- this.selectDrillThroughSingleton(node);
- return true;
- }else{
- if(node.parentNode&&node.parentNode.getAttribute("dttargets")){
- this.selectDrillThroughSingleton(node.parentNode);
- return true;
- }
- }
- }
- return false;
- }
- return true;
- };
- CSelectionController.prototype.clearSavedSelections=function(){
- this.m_bSavedSelections=false;
- if(this.hasSavedSelectedObjects()){
- this.updateUI(null,this.getSavedSelectedObjects(),true,false);
- delete (this.m_aSavedSelectedObjects);
- }
- if(this.hasSavedSelectedChartNodes()){
- var _379=this.m_savedChartHelpers;
- for(var _37a in _379){
- if(_379[_37a]){
- var _37b=_379[_37a].getImageMapHighlighter();
- if(_37b.hideAllAreas){
- _37b.hideAllAreas();
- }
- }
- }
- delete this.m_savedChartHelpers;
- delete this.m_savedSelectedChartNodes;
- }
- };
- CSelectionController.prototype.hasSavedSelectedChartNodes=function(){
- return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0);
- };
- CSelectionController.prototype.getSavedSelectedChartNodes=function(){
- return this.m_savedSelectedChartNodes;
- };
- CSelectionController.prototype.saveSelections=function(){
- this.m_savedSelectionStyles=this.m_selectionStyles;
- if(this.m_aSelectedObjects.length>0){
- this.m_aSavedSelectedObjects=[];
- var _37c=this.m_aSelectedObjects.length;
- var temp=[];
- for(var i=0;i<_37c;i++){
- if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){
- temp.push(this.m_aSelectedObjects[i]);
- }else{
- this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]);
- }
- }
- this.m_aSelectedObjects=temp;
- }
- if(this.hasSelectedChartNodes()){
- this.m_savedChartHelpers=this.m_chartHelpers;
- this.m_chartHelpers={};
- this.m_savedSelectedChartNodes=[];
- var _37f=this.m_selectedChartNodes.length;
- var temp=[];
- for(var i=0;i<_37f;i++){
- if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
- var _380=this.m_selectedChartNodes[i].getArea();
- var _381=this.getImageMapName(_380);
- this.m_chartHelpers[_381]=this.m_savedChartHelpers[_381];
- delete this.m_savedChartHelpers[_381];
- temp.push(this.m_selectedChartNodes[i]);
- }else{
- this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]);
- }
- }
- this.m_selectedChartNodes=temp;
- }
- this.m_bSavedSelections=true;
- };
- CSelectionController.prototype.hasSavedSelections=function(){
- return this.m_bSavedSelections;
- };
- CSelectionController.prototype.hasSavedSelectedObjects=function(){
- return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes();
- };
- CSelectionController.prototype.getSavedSelectedObjects=function(){
- return this.m_aSavedSelectedObjects;
- };
- CSelectionController.prototype.getImageMapName=function(_382){
- var _383=_382.parentNode;
- return _383.name;
- };
- CSelectionController.prototype.repaintBUXSelectedChartArea=function(_384,_385,_386){
- var _387={};
- var _388=_384.length;
- for(var i=0;i<_388;i++){
- var _38a=_384[i].getArea();
- var _38b=this.getImageMapName(_38a);
- var _38c;
- if(!_387[_38b]){
- _38c=(_385)?this.getSavedChartHelper(_38a):this.getChartHelper(_38a);
- _387[_38b]=_38c;
- var _38d=_38c.getImageMapHighlighter();
- _38d.hideAllAreas();
- _38d.setFillColour(this.getPrimarySelectionColor());
- _38d.setStrokeColour(this.getPrimarySelectionColor());
- }else{
- _38c=_387[_38b];
- }
- var _38e=_384[i].m_contextIds;
- if(_386&&_38e.length===1&&_38e[0].length===1&&this.isMeasure(_38e[0][0])){
- continue;
- }
- _38d.highlightAreas(_384[i].getCtxAreas(),1);
- }
- };
- CSelectionController.prototype.repaintSavedSelections=function(){
- var _38f=this.m_selectionStyles;
- this.m_selectionStyles=this.m_savedSelectionStyles;
- var _390=this.getSavedSelectedChartNodes();
- var _391=false;
- if(_390&&_390.length>0){
- bIsChart=true;
- }else{
- _390=this.getSavedSelectedObjects();
- }
- this.repaintSelectionsHelper(_390,true,_391);
- this.resetSelectionStyles();
- this.m_selectionStyles=_38f;
- };
- CSelectionController.prototype.repaintSelections=function(){
- var _392=this.getSelectedChartNodes();
- var _393=false;
- if(_392&&_392.length>0){
- _393=true;
- }else{
- _392=this.getSelections();
- }
- this.repaintSelectionsHelper(_392,false,_393);
- };
- CSelectionController.prototype.repaintSelectionsHelper=function(_394,_395,_396){
- try{
- if(_396){
- this.repaintBUXSelectedChartArea(_394,_395);
- }else{
- this.updateUI(document,_394,true,false);
- this.updateUI(document,_394,false,false);
- }
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.resetAll=function(){
- this.resetSelectionStyles();
- this.clearSavedSelections();
- this.resetSelections();
- this.resetAllowHorizontalDataValueSelection();
- };
- CSelectionController.prototype.pageClicked=function(e){
- try{
- var node=getNodeFromEvent(e);
- if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){
- var _399=node;
- if(!_399.getAttribute("uid")){
- var _39a=_399.parentNode;
- if(_39a&&_39a.nodeType==1&&typeof _39a.getAttribute!="undefined"&&_39a.getAttribute("uid")!=null){
- _399=_39a;
- }
- }
- if(this.isCellSelected(_399)){
- if(typeof this.m_oCognosViewer.isBux!=="undefined"){
- this.repaintSelections();
- }
- if(e.button!==0){
- return false;
- }
- }
- }
- if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){
- return true;
- }
- if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){
- return false;
- }
- var _39b=getDocumentFromEvent(e);
- if(!this.hasContextData()||!this.hasMetadata()){
- if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){
- this.setSelectedChartArea(node,e);
- }
- this.getObservers().notify();
- return false;
- }
- if(typeof node.selectedCell!="undefined"){
- var _39c=node;
- node=node.selectedCell;
- _39c.removeAttribute("selectedCell");
- }
- if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){
- cf.hidePickers();
- }
- if(e.keyCode==27){
- if(typeof g_reportSelectionController!="undefined"){
- g_reportSelectionController.clearSelections();
- }
- this.resetSelections(_39b);
- }else{
- if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){
- if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){
- this.selectNode(node,e);
- this.setSelectedChartArea(node,e);
- }
- }else{
- if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){
- var _39d=this.m_oCognosViewer.getViewerWidget();
- this.selectNode(node,e);
- }
- }
- }
- if(window.gViewerLogger){
- window.gViewerLogger.addContextInfo(this);
- }
- }
- catch(e){
- }
- };
- CSelectionController.prototype.getSelectionObjectFactory=function(){
- return this.m_oSelectionObjectFactory;
- };
- CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){
- return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null);
- };
- CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_3a2){
- var _3a3=this.getCtxIdFromMun(sMun);
- if(_3a3==""){
- _3a3=this.getCtxIdFromMetaData(sLun,sHun,_3a2);
- }
- if(_3a3!=null&&this.m_oCDManager.GetUsage(_3a3)!="2"){
- var _3a4=document.getElementById("rt"+this.getNamespace());
- if(_3a4!=null){
- var _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3);
- if(_3a5&&_3a5.length===0){
- var _3a6=new RegExp("(^|:)"+_3a3+"(:|$)","i");
- _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3,-1,_3a6);
- }
- var _3a7=null;
- if(_3a5!=null&&_3a5.length>0){
- _3a7=new CSelectionObject();
- _3a7.setSelectionController(this);
- _3a7.m_sColumnRef=_3a5[0].getAttribute("cid");
- _3a7.m_sCellTypeId=_3a5[0].getAttribute("uid");
- _3a7.m_sLayoutType=_3a5[0].getAttribute("type");
- _3a7.m_sTag=_3a5[0].getAttribute("tag");
- _3a7.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_3a5[0]);
- _3a7.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_3a5[0]);
- _3a7.m_contextIds=[[_3a3]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7;
- }else{
- var _3a8=getElementsByAttribute(_3a4,"*","flashChart","true");
- if(_3a8!=null){
- for(var _3a9=0;_3a9<_3a8.length;++_3a9){
- var ldx=_3a8[_3a9].getLDX();
- if(ldx.indexOf("<ctx>"+_3a3+"</ctx>")!=-1){
- _3a7=new CSelectionObject();
- _3a7.setSelectionController(this);
- var lid=_3a8[_3a9].getAttribute("lid");
- _3a7.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
- _3a7.m_dataContainerType="chart";
- _3a7.m_contextIds=[[_3a3]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7;
- }
- }
- }
- }
- }
- }
- };
- CSelectionController.prototype.buildSelectionObject=function(node,e){
- var _3ae=null;
- try{
- while(node.nodeType==3){
- node=node.parentNode;
- }
- if(this.isDrillLinkOnCrosstabCell(node)){
- node=node.parentNode;
- }
- var ctx=node.getAttribute("ctx");
- var uid=node.getAttribute("uid");
- if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){
- if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
- return null;
- }
- node=node.parentNode;
- if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){
- node=node.parentNode;
- }
- uid=node.getAttribute("uid");
- }
- if(uid!=null){
- var _3b1=node.childNodes;
- for(var i=0;i<_3b1.length;i++){
- if(_3b1[i].nodeName.toUpperCase()=="TABLE"&&(_3b1[i].className=="ls"||_3b1[i].className=="xt")){
- var trs=_3b1[i].rows;
- for(var j=0;j<trs.length;j++){
- var tds=trs[j].cells;
- for(var k=0;k<tds.length;k++){
- if(tds[k].getAttribute("uid")!=null){
- return null;
- }
- }
- }
- }
- }
- if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
- _3ae=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _3ae=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- }
- }
- catch(e){
- }
- return _3ae;
- };
- CSelectionController.prototype.shiftKeyPressed=function(e){
- if(e.keyCode=="121"){
- return false;
- }
- if(isSafari()){
- if(e.button!=2){
- return e.shiftKey?e.shiftKey:false;
- }else{
- return false;
- }
- }
- return e.shiftKey?e.shiftKey:false;
- };
- CSelectionController.prototype.ctrlKeyPressed=function(e){
- if(isSafari()){
- if(e.button!=2){
- return e.ctrlKey?e.ctrlKey:false;
- }else{
- return false;
- }
- }
- return e.ctrlKey?e.ctrlKey:false;
- };
- CSelectionController.prototype.isSelectionsPreviouslySaved=function(_3b9){
- var _3ba=false;
- if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_3b9||!_3b9.length){
- return false;
- }
- for(var i=0;i<_3b9.length;i++){
- if(this.isSavedCellSelected(_3b9[i].getCellRef())){
- return true;
- }
- }
- return false;
- };
- CSelectionController.prototype.selectNode=function(node,e){
- try{
- while(node.nodeType==3){
- node=node.parentNode;
- }
- if(this.isDrillLinkOnCrosstabCell(node)){
- node=node.parentNode;
- }
- var _3be=null;
- if(isIE()){
- _3be=node.document;
- }else{
- _3be=node.ownerDocument;
- }
- var ctx=node.getAttribute("ctx");
- var uid=node.getAttribute("uid");
- var _3c1=false;
- if(typeof e=="undefined"){
- e={};
- }
- var _3c2=false;
- if(typeof g_reportSelectionController!="undefined"){
- _3c2=this.checkForReportElementNode(node);
- }
- if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_3c2==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
- if(this.getSelections().length>0){
- _3c1=true;
- }
- if(this.hasCutColumns()==true){
- this.clearSelectedObjects(_3be);
- }else{
- this.resetSelections(_3be);
- this.repaintSavedSelections();
- if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){
- cf.removeAllSelectionsFromCfgVariables();
- }
- this.m_oCognosViewer.setCurrentNodeFocus(null);
- }
- if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
- clearTextSelection(_3be);
- }
- if(typeof g_reportSelectionController!="undefined"&&_3c2==false){
- if(g_reportSelectionController.getSelections().length>0){
- _3c1=true;
- }
- g_reportSelectionController.clearSelections();
- }
- }
- var _3c3=node.getAttribute("dtTargets")?node:null;
- var _3c4=(node.nodeName.toLowerCase()==="area");
- if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){
- if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){
- return false;
- }
- var _3c5;
- var _3c6=3;
- do{
- node=node.parentNode;
- if(node){
- _3c3=(!_3c3&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_3c3;
- uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
- _3c5=node.nodeName.toLowerCase();
- }
- }while((uid==null)&&node&&(--_3c6>0)&&(_3c5=="span"||_3c5=="div"));
- }
- if(uid!=null){
- var _3c7=node.childNodes;
- for(var i=0;i<_3c7.length;i++){
- if(_3c7[i].nodeName.toUpperCase()=="TABLE"&&(_3c7[i].className=="ls"||_3c7[i].className=="xt")){
- var trs=_3c7[i].rows;
- for(var j=0;j<trs.length;j++){
- var tds=trs[j].cells;
- for(var k=0;k<tds.length;k++){
- if(tds[k].getAttribute("uid")!=null){
- return false;
- }
- }
- }
- }
- }
- var _3cd;
- if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
- _3cd=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _3cd=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- if(this.isCellSelected(node)==false){
- if(this.shiftKeyPressed(e)){
- var _3ce=this.getSelections();
- if(_3ce.length>0){
- var _3cf=_3ce[_3ce.length-1];
- if(_3cf.getLayoutType()==_3cd.getLayoutType()&&(_3cf.getCellRef().parentNode.parentNode==_3cd.getCellRef().parentNode.parentNode)){
- if(this.cellsAreInSameColumn(_3cf.getCellRef(),_3cd.getCellRef())){
- this.selectVertical(_3cf,_3cd,_3be);
- }else{
- if(_3cf.getCellRef().parentNode.rowIndex==_3cd.getCellRef().parentNode.rowIndex){
- this.selectHorizontal(_3cf,_3cd,_3be);
- }
- }
- }
- }
- clearTextSelection(_3be);
- }else{
- if(this.ctrlKeyPressed(e)){
- clearTextSelection(_3be);
- }
- }
- this.addSelectionObject(_3cd,_3be);
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_3cd.getColumnName());
- }
- this.m_oCognosViewer.setCurrentNodeFocus(node);
- }else{
- if(this.ctrlKeyPressed(e)){
- this.removeSelectionObject(_3cd,_3be);
- if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
- if(!this.isColumnSelected(_3cd.getTag())){
- cf.removeSelectionFromCfgVariables(_3cd.getTag());
- }
- }
- clearTextSelection(_3be);
- }else{
- if(this.shiftKeyPressed(e)){
- clearTextSelection(_3be);
- }
- }
- }
- _3c1=true;
- }else{
- if(_3c2){
- var _3d0=null;
- while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
- node=node.parentNode;
- }
- if(node.id=="reportTitle"){
- _3d0="TitleStyle";
- }else{
- if(node.id=="reportSubtitle"){
- _3d0="SubtitleStyle";
- }else{
- if(node.id.indexOf("reportFilter")==0){
- _3d0="FilterStyle";
- }
- }
- }
- if(_3d0!=null){
- selectReportElement(e,node.id,_3d0);
- _3c1=true;
- }
- }else{
- if(_3c3!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_3c4){
- var _3cd=this.getSelectionObjectFactory().getSelectionObject(_3c3);
- this.addSelectionObject(_3cd,_3be);
- }
- }
- }
- if(_3c1==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){
- cf.refreshDialog();
- }
- }
- catch(ex){
- }
- };
- CSelectionController.prototype.selectDrillThroughImage=function(node){
- this.m_oSelectedDrillThroughImage=node;
- };
- CSelectionController.prototype.getSelectedDrillThroughImage=function(){
- return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null;
- };
- CSelectionController.prototype.selectDrillThroughSingleton=function(node){
- this.m_oSelectedDrillThroughSingleton=node;
- };
- CSelectionController.prototype.getSelectDrillThroughSingleton=function(){
- return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null;
- };
- CSelectionController.prototype.getReportContextDataArray=function(){
- return this.m_aReportContextDataArray;
- };
- CSelectionController.prototype.getReportMetadataArray=function(){
- return this.m_aReportMetadataArray;
- };
- CSelectionController.prototype.setupContextDataArray=function(_3d3){
- this.m_aReportContextDataArray=_3d3;
- };
- CSelectionController.prototype.setupMetaDataArray=function(_3d4){
- this.m_aReportMetadataArray=_3d4;
- };
- CSelectionController.prototype.addContextData=function(_3d5){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetContextData(_3d5);
- if(!this.m_bUsingCCDManager){
- this.m_bUsingCCDManager=true;
- }
- for(var i=0;i<this.m_selectedClass.length;++i){
- this.deselecting(this.m_selectedClass);
- }
- };
- CSelectionController.prototype.addMetaData=function(_3d7){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetMetadata(_3d7);
- if(!this.m_bUsingCCDManager){
- this.m_bUsingCCDManager=true;
- }
- };
- CSelectionController.prototype.getDrillFlag=function(_3d8){
- var _3d9="";
- if(!this.m_bUsingCCDManager){
- var _3da=this.m_aReportContextDataArray[_3d8];
- var _3db=_3da[0];
- var _3dc=this.m_aReportMetadataArray[_3db];
- if(typeof _3dc!="undefined"&&typeof _3dc[3]!="undefined"){
- _3d9=_3dc[3];
- }
- }else{
- _3d9=this.m_oCDManager.GetDrillFlag(_3d8);
- }
- return _3d9;
- };
- CSelectionController.prototype.getDrillFlagForMember=function(_3dd){
- var _3de="0";
- if(!this.m_bUsingCCDManager){
- var _3df=this.getContextDataItem(_3dd);
- if(_3df!=null){
- var _3e0=_3df[2];
- if(_3e0!=""){
- var _3e1=_3df[0];
- var _3e2=this.getMetaDataItem(_3e1);
- if(_3e2!=null){
- _3de=_3e2[3];
- }
- }
- }
- }else{
- _3de=this.m_oCDManager.GetDrillFlagForMember(_3dd);
- }
- return (_3de==null)?0:_3de;
- };
- CSelectionController.prototype.getDataType=function(_3e3){
- var _3e4=null;
- if(!this.m_bUsingCCDManager){
- var _3e5=this.getRDI(_3e3);
- if(_3e5&&_3e5.length>2){
- _3e4=parseInt(_3e5[2],10);
- }
- }else{
- _3e4=parseInt(this.m_oCDManager.GetDataType(_3e3),10);
- }
- return _3e4;
- };
- CSelectionController.prototype.getUsageInfo=function(_3e6){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetUsage(_3e6);
- }
- };
- CSelectionController.prototype.isMeasure=function(_3e7){
- return (this.getUsageInfo(_3e7)==this.c_usageMeasure);
- };
- CSelectionController.prototype.getDepth=function(_3e8){
- var _3e9=null;
- if(!this.m_bUsingCCDManager){
- var _3ea=this.getRDI(_3e8);
- if(_3ea&&_3ea.length>5&&_3ea[1]=="R"){
- _3e9=_3ea[5];
- }
- }else{
- _3e9=this.m_oCDManager.GetDepth(_3e8);
- }
- return _3e9;
- };
- CSelectionController.prototype.getUseValue=function(_3eb){
- var _3ec="";
- if(!this.m_bUsingCCDManager){
- var _3ed=this.m_aReportContextDataArray[_3eb];
- if(typeof _3ed[1]!="undefined"){
- _3ec=_3ed[1];
- }
- }else{
- _3ec=this.m_oCDManager.GetDisplayValue(_3eb);
- }
- return _3ec;
- };
- CSelectionController.prototype.getTextValue=function(_3ee){
- var _3ef=null;
- for(var _3f0=0;_3f0<_3ee.length;_3f0++){
- if(_3ee[_3f0].style.visisbility!="hidden"){
- if(isIE()){
- _3ef=_3ee[_3f0].innerText;
- }else{
- _3ef=_3ee[_3f0].textContent;
- }
- var _3f1=_3ee[_3f0].nextSibling;
- while(_3f1!=null){
- if(_3f1.nodeName.toUpperCase()=="SPAN"&&_3f1.style.visibility!="hidden"){
- if(isIE()){
- _3ef+=_3f1.innerText;
- }else{
- _3ef+=_3f1.textContent;
- }
- }
- _3f1=_3f1.nextSibling;
- }
- break;
- }
- }
- return _3ef;
- };
- CSelectionController.prototype.getDisplayValueFromDOM=function(_3f2,_3f3){
- var _3f4=null;
- var _3f5;
- var _3f6=new RegExp("(^|\\s)"+_3f2+"(\\s|$|:)","i");
- if(typeof _3f3!="undefined"){
- _3f5=getElementsByAttribute(_3f3,["span","td","th"],"ctx",_3f2,1,_3f6);
- }else{
- var _3f7=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(typeof _3f7=="undefined"||_3f7==null){
- var _3f8=document.getElementById("RVContent"+this.m_sNamespace);
- if(typeof _3f8=="undefined"||_3f8==null){
- _3f5=getElementsByAttribute(document.body,["span","td","th"],"ctx",_3f2,1,_3f6);
- }else{
- _3f5=getElementsByAttribute(_3f8,["span","td","th"],"ctx",_3f2,1,_3f6);
- }
- }else{
- _3f5=getElementsByAttribute(_3f7.contentWindow.document.body,["span","td","th"],"ctx",_3f2,1,_3f6);
- }
- }
- var _3f9;
- if(_3f5.length>0&&(_3f5[0].nodeName.toUpperCase()=="TD"||_3f5[0].nodeName.toUpperCase()=="TH")){
- _3f9=_3f5[0].childNodes;
- }else{
- _3f9=_3f5;
- }
- if(_3f9.length==0||(_3f9[0].className.indexOf("chart_area")==-1&&_3f9[0].className.indexOf("bux-comment")==-1)){
- _3f4=this.getTextValue(_3f9);
- }
- return _3f4;
- };
- CSelectionController.prototype.getDisplayValue=function(_3fa,_3fb){
- var _3fc=this.getDisplayValueFromDOM(_3fa,_3fb);
- if(_3fc==null){
- _3fc=this.getUseValue(_3fa);
- }
- return _3fc;
- };
- CSelectionController.prototype.getDun=function(_3fd){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetDUN(_3fd);
- }else{
- var _3fe=this.m_aReportContextDataArray[_3fd];
- if(_3fe&&typeof _3fe[5]!="undefined"){
- var _3ff=_3fe[5];
- var _400=this.m_aReportMetadataArray[_3ff];
- if(typeof _400!="undefined"&&typeof _400[1]!="undefined"&&_400[1]=="D"){
- return _400[0];
- }
- }
- }
- };
- CSelectionController.prototype.getPun=function(_401){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetPUN(_401);
- }
- };
- CSelectionController.prototype.getLun=function(_402){
- var lun="";
- if(!this.m_bUsingCCDManager){
- var _404=this.m_aReportContextDataArray[_402];
- if(_404&&typeof _404[3]!="undefined"){
- var _405=_404[3];
- var _406=this.m_aReportMetadataArray[_405];
- if(typeof _406!="undefined"&&typeof _406[1]!="undefined"&&_406[1]=="L"){
- lun=_406[0];
- }
- }
- }else{
- lun=this.m_oCDManager.GetLUN(_402);
- }
- return lun;
- };
- CSelectionController.prototype.isContextId=function(_407){
- var _408=false;
- if(!this.m_bUsingCCDManager){
- var _409=this.m_aReportContextDataArray[_407];
- _408=(typeof _409=="object");
- }else{
- this.m_oCDManager.FetchContextData([_407]);
- _408=this.m_oCDManager.ContextIdExists(_407);
- }
- return _408;
- };
- CSelectionController.prototype.hasContextData=function(){
- var _40a=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
- return true;
- }
- }else{
- _40a=this.m_oCDManager.HasContextData();
- }
- return _40a;
- };
- CSelectionController.prototype.hasMetadata=function(){
- var _40b=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
- return true;
- }
- }else{
- _40b=this.m_oCDManager.HasMetadata();
- }
- return _40b;
- };
- CSelectionController.prototype.getDifferentCellIndex=function(_40c,_40d,_40e){
- for(var i=0;i<_40c.cells.length;i++){
- if(this.getSelectionObjectFactory().getSelectionObject(_40c.cells[i]).getLayoutType()=="datavalue"){
- break;
- }
- }
- if(_40e=="relative"){
- return (_40d-i);
- }else{
- if(_40e=="actual"){
- return (_40d+i);
- }
- }
- };
- CSelectionController.prototype.cellsAreInSameColumn=function(_410,_411){
- if(_410.parentNode.rowIndex==_411.parentNode.rowIndex){
- return false;
- }
- if(_410.getAttribute("cid")===null){
- if(_410.getAttribute("uid")===_411.getAttribute("uid")){
- if(_410.getAttribute("type")!="datavalue"){
- return true;
- }else{
- if(this.getDifferentCellIndex(_410.parentNode,_410.cellIndex,"relative")==this.getDifferentCellIndex(_411.parentNode,_411.cellIndex,"relative")){
- return true;
- }
- }
- }else{
- return false;
- }
- }else{
- if(_410.getAttribute("cid")===_411.getAttribute("cid")){
- return true;
- }else{
- return false;
- }
- }
- };
- CSelectionController.prototype.selectVertical=function(_412,_413,_414){
- if(!_414){
- _414=document;
- }
- var _415=_412.getCellRef().parentNode;
- var _416,i;
- var _418=(_412.getCellRef().parentNode.rowIndex<_413.getCellRef().parentNode.rowIndex);
- var _419=(_412.getCellRef().parentNode.cells.length-_412.getCellRef().cellIndex);
- while(_415.rowIndex!=_413.getCellRef().parentNode.rowIndex){
- if(_418){
- _415=_415.nextSibling;
- }else{
- _415=_415.previousSibling;
- }
- if(_415==null){
- break;
- }
- if(_415.cells.length>=_419){
- for(i=0;i<_415.cells.length;i++){
- if((_415.cells[i].getAttribute("type")==_412.getLayoutType())&&this.cellsAreInSameColumn(_412.getCellRef(),_415.cells[i])){
- _416=this.getSelectionObjectFactory().getSelectionObject(_415.cells[i]);
- if(this.addSelectionObject(_416,_414)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_416.getColumnName());
- }
- }
- break;
- }
- }
- }
- }
- };
- CSelectionController.prototype.selectHorizontal=function(_41a,_41b,_41c){
- var _41d="";
- if(_41a.getColumnRef()==null){
- if(_41a.getCellRef().getAttribute("uid")==_41b.getCellRef().getAttribute("uid")){
- _41d=_41a.getCellRef().getAttribute("uid");
- }else{
- return;
- }
- }
- var _41e,_41f;
- var _420=_41b.getCellRef().parentNode;
- var _421;
- if(_41b.getCellRef().cellIndex<_41a.getCellRef().cellIndex){
- _41e=_41b.getCellRef().cellIndex;
- _41f=_41a.getCellRef().cellIndex;
- }else{
- _41f=_41b.getCellRef().cellIndex;
- _41e=_41a.getCellRef().cellIndex;
- }
- for(var i=_41e+1;i<_41f;i++){
- if(((_41a.getColumnRef()!=null)&&(_41a.getLayoutType()==_41b.getLayoutType())&&(_41a.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_41a.getColumnRef()==null)&&(_420.cells[i].getAttribute("uid")==_41d))){
- _421=this.getSelectionObjectFactory().getSelectionObject(_420.cells[i]);
- if(this.addSelectionObject(_421,_41c)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_421.getColumnName());
- }
- }
- }
- }
- };
- CSelectionController.prototype.pageDoubleClicked=function(e){
- try{
- var node=getNodeFromEvent(e);
- if(typeof node.selectedCell!="undefined"){
- var _425=node;
- node=node.selectedCell;
- _425.removeAttribute("selectedCell");
- }
- while(node.nodeType==3){
- node=node.parentNode;
- }
- var ctx=node.getAttribute("ctx");
- var uid=node.getAttribute("uid");
- if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
- node=node.parentNode;
- if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){
- node=node.parentNode;
- }
- uid=node.getAttribute("uid");
- }
- if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){
- if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){
- goWindowManager.getFeatureManager().launchFeature("Rename");
- }
- }
- if(typeof g_reportSelectionController!="undefined"){
- g_reportSelectionController.clearSelections();
- }
- }
- catch(ex){
- }
- };
- CSelectionController.prototype.getSelectionHoverNodes=function(){
- return this.m_aSelectionHoverNodes;
- };
- CSelectionController.prototype.setSelectionHoverNodes=function(_428){
- this.m_aSelectionHoverNodes=_428;
- };
- CSelectionController.prototype.addSelectionHoverNode=function(node){
- this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node;
- };
- CSelectionController.prototype.pageHover=function(e){
- try{
- var node=getNodeFromEvent(e);
- while(node.nodeType==3){
- node=node.parentNode;
- }
- if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
- if(node.parentNode.nodeName.toLowerCase()!="tr"){
- node=node.parentNode;
- }
- }
- var _42c=this.getSelectionHoverNodes();
- var _42d=this.getAllSelectedObjects().length;
- if(!(_42c.length==1&&_42c[0]==node)){
- for(var i=0;i<_42c.length;i++){
- this.sortIconHover(_42c[i],true);
- if(_42d==0){
- this.pageChangeHover(_42c[i],true);
- }
- }
- this.setSelectionHoverNodes([]);
- if(_42d==0){
- this.sortIconHover(node,false);
- if(this.pageChangeHover(node,false)){
- this.addSelectionHoverNode(node);
- }
- }else{
- if(this.sortIconHover(node,false)){
- this.addSelectionHoverNode(node);
- }
- }
- }
- }
- catch(ex){
- }
- };
- CSelectionController.prototype.sortIconHover=function(node,_430){
- if(!this.isValidColumnTitle(node)){
- return false;
- }
- var _431=this.getSortImgNode(node);
- if(_431!=null&&_431!="undefined"){
- if(_431.getAttribute("sortOrder")==="nosort"){
- if(_430){
- _431.style.visibility="hidden";
- }else{
- _431.style.visibility="visible";
- }
- }
- return true;
- }
- return false;
- };
- CSelectionController.prototype.isValidColumnTitle=function(node){
- if(node&&node.parentNode){
- var uid=node.getAttribute("uid");
- 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")){
- return true;
- }
- }
- return false;
- };
- CSelectionController.prototype.pageChangeHover=function(node,_435){
- try{
- if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){
- if(node.parentNode.nodeName.toLowerCase()!="tr"){
- node=node.parentNode;
- }
- }
- if(this.isValidColumnTitle(node)){
- var _436=this.isColumnSelected(node.getAttribute("tag"));
- if(!_436){
- _436=this.isColumnCut(node.getAttribute("tag"));
- }
- if(!_436){
- if(_435){
- if(node.getAttribute("oldClassName")!=null){
- node.className=node.getAttribute("oldClassName");
- node.removeAttribute("oldClassName");
- }
- this.restoreOldBackgroundImage(node);
- }else{
- if(node.getAttribute("oldClassName")!=null){
- node.className=node.getAttribute("oldClassName");
- }else{
- node.setAttribute("oldClassName",node.className);
- }
- if(node.getAttribute("oldBackgroundImageStyle")!=null){
- node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
- }else{
- this.saveOldCellStyles(node);
- }
- node.className+=" hoverSelection";
- return true;
- }
- }
- }
- }
- catch(ex){
- }
- return false;
- };
- CSelectionController.prototype.getSortImgNode=function(node){
- var _438=node.getElementsByTagName("img");
- for(var i=0;i<_438.length;i++){
- var sId=_438[i].id.toString();
- if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
- node=_438[i];
- return node;
- }
- }
- return null;
- };
- CSelectionController.prototype.restoreOldPadding=function(node){
- if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){
- if(node.getAttribute("oldPaddingStyle").length>0){
- node.style.padding=node.getAttribute("oldPaddingStyle");
- }
- node.removeAttribute("oldPaddingStyle");
- }
- };
- CSelectionController.prototype.saveOldPadding=function(node,size){
- if(node&&node.getAttribute("oldPaddingStyle")==null){
- node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px");
- }
- };
- CSelectionController.prototype.saveOldBorder=function(node){
- if(node&&node.getAttribute("oldBorderStyle")==null){
- node.setAttribute("oldBorderStyle",node.style.border);
- }
- };
- CSelectionController.prototype.restoreOldBorder=function(node){
- if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){
- if(node.getAttribute("oldBorderStyle").length>0){
- node.style.border=node.getAttribute("oldBorderStyle");
- }else{
- node.style.borderColor=node.style.borderWidth=node.style.borderStyle="";
- }
- node.removeAttribute("oldBorderStyle");
- }
- };
- CSelectionController.prototype.setPrimarySelectionStyles=function(cell){
- if(this.getPrimarySelectionColor()){
- cell.style.backgroundColor=this.getPrimarySelectionColor();
- }else{
- cell.style.backgroundImage=this.pS_backgroundImageURL;
- cell.style.backgroundRepeat="repeat";
- }
- };
- CSelectionController.prototype.setSecondarySelectionStyles=function(cell){
- if(this.getSecondarySelectionColor()){
- cell.style.backgroundColor=this.getSecondarySelectionColor();
- }else{
- cell.style.backgroundImage=this.sS_backgroundImageURL;
- cell.style.backgroundRepeat="repeat";
- }
- };
- CSelectionController.prototype.saveOldCellStyles=function(node){
- if(node&&node.getAttribute("oldBackgroundImageStyle")==null){
- node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor"));
- node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node));
- node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat"));
- node.style.backgroundImage="";
- node.style.backgroundRepeat="";
- }
- };
- CSelectionController.prototype.restoreOldBackgroundImage=function(node){
- if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){
- node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle");
- node.removeAttribute("oldBackgroundImageStyle");
- node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat");
- node.removeAttribute("oldBackgroundRepeat");
- node.style.backgroundColor=node.getAttribute("oldBackgroundColor");
- node.removeAttribute("oldBackgroundColor");
- }
- };
- CSelectionController.prototype.getStyleProperty=function(node,_445){
- if(node&&node.style&&node.style[_445]){
- return node.style[_445];
- }
- return "";
- };
- CSelectionController.prototype.getBackgroundImage=function(node){
- if(node&&node.style){
- return node.style.backgroundImage;
- }
- return "";
- };
- CSelectionController.prototype.pageContextClicked=function(e){
- var node=getNodeFromEvent(e);
- if(typeof node.selectedCell!="undefined"){
- var _449=node;
- node=node.selectedCell;
- _449.removeAttribute("selectedCell");
- }
- while(node!=null&&node.tagName!="TD"){
- node=node.parentNode;
- }
- if(node!=null){
- var _44a=this.getBackgroundImage(node);
- this.findSelectionURLs();
- if(this.getSelections().length==0||_44a!=this.pS_backgroundImageURL){
- this.pageClicked(e);
- }
- }
- if(typeof populateContextMenu!="undefined"){
- populateContextMenu();
- moveContextMenu(e);
- }
- var _44b=false;
- if(this.showViewerContextMenu()){
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- _44b=true;
- }
- return _44b;
- };
- CSelectionController.prototype.chartContextMenu=function(e){
- if(!this.hasSelectedChartNodes()){
- return;
- }
- if(typeof populateContextMenu!="undefined"){
- populateContextMenu();
- moveContextMenu(e);
- }
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- return false;
- };
- CSelectionController.prototype.titleAreaContextMenu=function(e,_44e,sId){
- if(typeof populateContextMenu!="undefined"){
- goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_44e);
- goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
- populateContextMenu(_44e.toUpperCase());
- moveContextMenu(e,_44e.toUpperCase());
- }
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- return false;
- };
- CSelectionController.prototype.selectionsAreAllSameType=function(){
- var _450=this.getSelections();
- if(_450.length>0){
- var _451=_450[0].getLayoutType();
- for(var i=1;i<_450.length;i++){
- if(_451!=_450[i].getLayoutType()){
- return 0;
- }
- }
- return 1;
- }
- return -1;
- };
- CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
- var _453=this.getSelections();
- var i=0;
- if(_453.length>0){
- var _455=_453[0].getColumnRef();
- if(_455!=null&&_455!=""){
- for(i=1;i<_453.length;i++){
- if(_455!=_453[i].getColumnRef()){
- return false;
- }
- }
- }else{
- var _456=_453[0].getCellTypeId();
- for(i=1;i<_453.length;i++){
- if(_456!=_453[i].getCellTypeId()){
- return false;
- }
- }
- }
- return true;
- }
- return false;
- };
- CSelectionController.prototype.checkForReportElementNode=function(node){
- if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){
- if(node.className=="tt"){
- 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")){
- node=node.parentNode.parentNode;
- }else{
- return false;
- }
- }else{
- if(typeof node.parentNode!="undefined"&&node.parentNode!=null){
- var _458=node.parentNode;
- while(typeof _458!="undefined"&&_458!=null){
- if(typeof _458.className!="undefined"&&_458.className!=null&&_458.className.substr(0,2)=="ft"){
- node=_458;
- break;
- }else{
- _458=_458.parentNode;
- }
- }
- }else{
- return false;
- }
- }
- var _459=node.className.substr(0,2);
- if(_459=="ta"||_459=="ts"||_459=="ft"){
- return true;
- }
- }
- return false;
- };
- CSelectionController.prototype.chartClicked=function(_45a){
- this.setSelectedChartArea(_45a);
- };
- CSelectionController.prototype.processColumnTitleNode=function(_45b){
- if(!_45b||!this.m_oCognosViewer.isBux){
- return;
- }
- var _45c=_45b.getCellRef();
- if(_45c.getAttribute("contextAugmented")=="true"||"list"!=_45b.getDataContainerType()||"columnTitle"!=_45b.getLayoutType()){
- return;
- }
- var _45d=_45b.getSelectedContextIds();
- var _45e=false;
- if(typeof _45d=="object"&&_45d!=null&&_45d.length>0){
- if(this.isRelational(_45d)&&this.getQueryModelId(_45d[0][0])==null){
- _45e=true;
- }else{
- return;
- }
- }
- var lid=_45c.parentNode.parentNode.parentNode.getAttribute("lid");
- var _460=_45c.parentNode.nextSibling;
- var _461=getChildElementsByAttribute(_460,"td","cid",_45c.getAttribute("cid"));
- var _462=null;
- var _463=true;
- var _464;
- if(_461.length>0){
- var _465=_461[0];
- var _466=_465.childNodes.length;
- for(var _467=0;_467<_466;_467++){
- var _468=_465.childNodes[_467];
- if(_468.getAttribute&&((_468.nodeName.toLowerCase()=="table"&&typeof _468.getAttribute("lid")=="string")||_468.nodeName.toLowerCase()=="map"||_468.nodeName.toLowerCase()=="img"||_468.getAttribute("chartcontainer")=="true")){
- if(_467==0){
- _463=false;
- }
- }else{
- _464=[];
- if(_468.nodeName.toLowerCase()=="span"){
- _464.push(_468);
- }
- var _469=_468.getElementsByTagName?_468.getElementsByTagName("span"):[];
- for(var _46a=0;_46a<_469.length;++_46a){
- if(lid==getImmediateLayoutContainerId(_469[_46a])){
- _464.push(_469[_46a]);
- }
- }
- for(var _46b=0;_46b<_464.length;++_46b){
- var _46c=_464[_46b];
- if(_46c.nodeType==1&&_46c.nodeName.toLowerCase()=="span"&&_46c.style.visibility!="hidden"){
- if(_46c.getAttribute("ctx")!=null&&_46c.getAttribute("ctx")!=""){
- _462=_46c.getAttribute("ctx");
- break;
- }
- }
- }
- }
- }
- }
- if(_462!=null){
- var _46d=_462.split("::")[0].split(":")[0];
- if(!_45e){
- _464=_45c.getElementsByTagName("span");
- if(_464.length!=0){
- var _46e=this.m_oCDManager.m_cd[_46d];
- var _46f=this.getTextValue(_464);
- var _470={"u":_46f===null?"":_46f};
- if(typeof _46e!="undefined"){
- if(typeof _46e["r"]!="undefined"){
- _470.r=_46e["r"];
- }
- if(typeof _46e["q"]!="undefined"){
- _470.q=_46e["q"];
- }
- if(typeof _46e["i"]!="undefined"){
- _470.i=_46e["i"];
- }
- }
- var _471="cloned"+_46d;
- this.m_oCDManager.m_cd[_471]=_470;
- _464[0].setAttribute("ctx",_471);
- _45b=this.getSelectionObjectFactory().processCTX(_45b,_471);
- }
- }else{
- var qmid=this.getQueryModelId(_46d);
- if(qmid==null){
- }
- if(qmid!=null){
- var _473=_45d[0][0];
- this.m_oCDManager.m_cd[_473].i=this.m_oCDManager.m_cd[_46d].i;
- return false;
- }
- }
- }else{
- _463=false;
- }
- if(!_463){
- _45c.setAttribute("canSort","false");
- }
- _45c.setAttribute("contextAugmented","true");
- };
- CSelectionController.prototype.selectionsInSameDataContainer=function(){
- try{
- var _474=this.getAllSelectedObjects();
- var _475=_474[0].getLayoutElementId();
- for(var _476=1;_476<_474.length;_476++){
- if(_475!=_474[_476].getLayoutElementId()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsFromSameDataItem=function(){
- try{
- var _477=this.getAllSelectedObjects();
- var _478=_477[0].getDataItems()[0][0];
- for(var _479=1;_479<_477.length;_479++){
- if(_478!=_477[_479].getDataItems()[0][0]){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isRelational=function(_47a){
- try{
- if(!_47a){
- var _47b=this.getAllSelectedObjects()[0];
- _47a=_47b.getSelectedContextIds();
- }
- for(var _47c=0;_47c<_47a.length;_47c++){
- for(var _47d=0;_47d<_47a[_47c].length;_47d++){
- var ctx=_47a[_47c][_47d];
- var mun=this.getMun(ctx);
- var lun=this.getLun(ctx);
- var hun=this.getHun(ctx);
- if(mun!=null&&typeof mun!="undefined"&&mun.length>0){
- return false;
- }
- if(lun!=null&&typeof lun!="undefined"&&lun.length>0){
- return false;
- }
- if(hun!=null&&typeof hun!="undefined"&&hun.length>0){
- return false;
- }
- }
- }
- return true;
- }
- catch(e){
- return true;
- }
- return true;
- };
- CSelectionController.prototype.getDataContainerType=function(){
- try{
- if(!this.getAllSelectedObjects()[0]){
- return "";
- }
- return this.getAllSelectedObjects()[0].m_dataContainerType;
- }
- catch(e){
- return "";
- }
- };
- CSelectionController.prototype.areSelectionsColumnRowTitles=function(){
- try{
- var _482=this.getAllSelectedObjects();
- for(var _483=0;_483<_482.length;_483++){
- var _484=_482[_483];
- if(_484.getLayoutType()!="columnTitle"||_484.isHomeCell()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreMeasures=function(){
- try{
- var _485=this.getAllSelectedObjects();
- for(var _486=0;_486<_485.length;_486++){
- var _487=_485[_486];
- if(this.getUsageInfo(_487.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
- var _488=this.getAllSelectedObjects();
- if(_488.length==0){
- return false;
- }
- for(var _489=0;_489<_488.length;_489++){
- var _48a=_488[0];
- if(_48a.getSelectedContextIds().length==0){
- return false;
- }
- var _48b=_48a.getSelectedContextIds()[0][0];
- var mun=this.getMun(_48b);
- var _48d=this.getUsageInfo(_48b);
- if(mun==null||typeof mun=="undefined"||mun.length==0||_48d==this.c_usageMeasure){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
- var _48e=this.getAllSelectedObjects();
- if(_48e.length==0){
- return false;
- }
- var _48f=this.selectionsHaveCalculationMetadata();
- for(var _490=0;_490<_48e.length;_490++){
- var _491=_48e[_490];
- var _492=_491.getSelectedContextIds()[0][0];
- if(!this.isCalculationOrMeasure(_492,_48f)){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
- try{
- var _493=this.getDataContainerType();
- var _494=this.getAllSelectedObjects();
- for(var _495=0;_495<_494.length;_495++){
- var _496=_494[_495];
- var _497=_496.getSelectedContextIds();
- var _498=_497[0][0];
- var sHun=this.getHun(_498);
- if(!this.hasCalculationMetadata(_498,_497,_493)){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isCalculationOrMeasure=function(_49a,_49b){
- var mun=this.getMun(_49a);
- var _49d=this.getUsageInfo(_49a);
- if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_49b)||_49d==this.c_usageMeasure)){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.hasCalculationMetadata=function(_49e,_49f,_4a0){
- var sHun=this.getHun(_49e);
- if(this.getUsageInfo(_49e)!=this.c_usageMeasure){
- if((this.isRelational(_49f)&&this.getQueryModelId(_49e)!=null)||(!this.isRelational(_49f)&&_4a0=="list"&&(sHun&&sHun!=""))){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreDateTime=function(){
- try{
- var _4a2=this.getAllSelectedObjects();
- for(var _4a3=0;_4a3<_4a2.length;_4a3++){
- var _4a4=_4a2[_4a3];
- var _4a5=_4a4.getSelectedContextIds();
- var _4a6=_4a5[0][0];
- var _4a7=this.getDataType(_4a6);
- if(_4a7&&typeof this.m_ccl_dateTypes[_4a7]!=="undefined"){
- return true;
- }
- }
- }
- catch(e){
- return false;
- }
- return false;
- };
- CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
- try{
- var _4a8=this.getAllSelectedObjects();
- if(_4a8===null||_4a8.length<=0){
- return null;
- }
- var _4a9=this.m_oCognosViewer.getModelPath();
- var _4aa=[];
- for(var i=0;i<_4a8.length;i++){
- var obj=_4a8[i].getContextJsonObject(this,_4a9);
- _4aa.push(obj);
- }
- return _4aa;
- }
- catch(e){
- }
- };
- CSelectionController.prototype.destroy=function(){
- delete this.m_oCognosViewer;
- delete this.m_aCutColumns;
- delete this.m_aSelectedObjects;
- delete this.m_selectedClass;
- delete this.m_cutClass;
- if(this.m_oObserver&&this.m_oObserver.destroy){
- this.m_oObserver.destroy();
- }
- delete this.m_oObserver;
- delete this.m_aReportMetadataArray;
- delete this.m_aReportContextDataArray;
- if(this.m_oCDManager&&this.m_oCDManager.destroy){
- this.m_oCDManager.destroy();
- }
- delete this.m_oCDManager;
- if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){
- this.m_oSelectionObjectFactory.destroy();
- }
- delete this.m_oSelectionObjectFactory;
- delete this.m_selectedChartArea;
- delete this.m_selectedChartNodes;
- delete this.m_selectionContainerMap;
- delete this.m_chartHelpers;
- delete this.m_oJsonForMarshal;
- if(this.hasSavedSelections()){
- this.clearSavedSelections();
- }
- };
- function clearTextSelection(_4ad){
- if(!_4ad){
- _4ad=document;
- }
- try{
- if(typeof _4ad.selection=="object"&&_4ad.selection!==null){
- _4ad.selection.empty();
- }else{
- if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){
- window.getSelection().removeAllRanges();
- }
- }
- }
- catch(e){
- }
- };
- function CtxArrayPlaceHolder(){
- };
- var self=window;
- function CDrillManager(oCV){
- this.m_drawDrillTargets=false;
- this.setCV(oCV);
- };
- CDrillManager.prototype=new CViewerHelper();
- CDrillManager.prototype.getSelectionController=function(){
- var _4af;
- try{
- _4af=getCognosViewerSCObjectRef(this.getCV().getId());
- }
- catch(e){
- _4af=null;
- }
- return _4af;
- };
- CDrillManager.prototype.getSelectedObject=function(){
- var _4b0=this.getSelectionController();
- if(_4b0==null){
- return null;
- }
- var _4b1=null;
- var _4b2=null;
- if(_4b0.hasSelectedChartNodes()){
- _4b2=_4b0.getSelectedChartNodes();
- }else{
- _4b2=_4b0.getSelections();
- }
- if(_4b2&&_4b2.length==1){
- _4b1=_4b2[0];
- }
- return _4b1;
- };
- CDrillManager.prototype.canDrillUp=function(){
- if(this.getDrillOption("drillUp")==true&&this.hasMuns()){
- return true;
- }
- return false;
- };
- CDrillManager.prototype.canDrillDown=function(){
- if(this.getDrillOption("drillDown")==true){
- return true;
- }
- return false;
- };
- CDrillManager.prototype.hasMuns=function(_4b3){
- if(typeof _4b3=="undefined"){
- _4b3=this.getSelectedObject();
- }
- if(_4b3==null){
- return false;
- }
- var _4b4=_4b3.getMuns();
- var muns="";
- for(var _4b6=0;_4b6<_4b4.length&&muns=="";++_4b6){
- if(typeof _4b4[_4b6][0]!="undefined"){
- muns+=_4b4[_4b6][0];
- }
- }
- return (muns!="");
- };
- CDrillManager.prototype.getRefQuery=function(){
- var _4b7="";
- var _4b8=this.getSelectedObject();
- if(_4b8==null){
- return "";
- }
- var _4b9=_4b8.getRefQueries();
- for(var i=0;i<_4b9.length;i++){
- if(_4b9[i]!=null){
- for(var j=0;j<_4b9[i].length;j++){
- if(_4b9[i][j]!=null&&_4b9[i][j]!=""){
- return _4b9[i][j];
- }
- }
- }
- }
- return _4b7;
- };
- CDrillManager.prototype.isIsolated=function(){
- var _4bc=this.getSelectionController();
- if(_4bc==null||_4bc.getDrillUpDownEnabled()==false){
- return false;
- }
- var _4bd=this.getSelectedObject();
- if(_4bd==null){
- return false;
- }
- if(_4bd instanceof CSelectionChartObject&&_4bc!=null){
- var _4be=_4bd.getArea();
- if(_4be!=null){
- var _4bf=_4be.getAttribute("isolated");
- if(typeof _4bf!="undefined"&&_4bf!=null&&_4bf=="true"){
- return true;
- }
- }
- }else{
- var _4c0=_4bd.getCellRef();
- if(typeof _4c0=="object"&&_4c0!=null){
- var _4c1=_4c0.getElementsByTagName("span");
- if(_4c1!=null&&typeof _4c1!="undefined"&&_4c1.length>0){
- var _4c2=_4c1[0].getAttribute("isolated");
- if(_4c2!=null&&_4c2!="undefined"&&_4c2=="true"){
- return true;
- }
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.getDrillOption=function(_4c3){
- var _4c4=this.getSelectionController();
- if(_4c4==null||_4c4.getDrillUpDownEnabled()==false||typeof _4c3=="undefined"){
- return false;
- }
- var _4c5=this.getSelectedObject();
- if(_4c5==null){
- return false;
- }
- if(this.isIsolated()){
- if(_4c3=="drillDown"){
- return false;
- }else{
- if(_4c3=="drillUp"){
- return true;
- }
- }
- }
- if(_4c3=="drillDown"){
- if(_4c5 instanceof CSelectionChartObject&&_4c4!=null){
- var _4c6=_4c5.getArea();
- if(_4c6!=null){
- var _4c7=_4c6.getAttribute("isChartTitle");
- if(typeof _4c7!="undefined"&&_4c7!=null&&_4c7=="true"){
- return false;
- }
- }
- }
- }
- var _4c8=_4c5.getDrillOptions();
- var _4c9=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV));
- for(var idx=0;idx<_4c8.length;++idx){
- var _4cb=(_4c9)?_4c8[idx].length:1;
- for(var _4cc=0;_4cc<_4cb;++_4cc){
- var _4cd=_4c8[idx][_4cc];
- if(_4cd=="3"){
- return true;
- }else{
- if(_4c3=="drillUp"&&_4cd=="1"){
- return true;
- }else{
- if(_4c3=="drillDown"&&_4cd=="2"){
- return true;
- }
- }
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.canDrillThrough=function(){
- var _4ce=this.getSelectionController();
- if(_4ce==null||_4ce.getModelDrillThroughEnabled()==false){
- return false;
- }
- return true;
- };
- CDrillManager.prototype.singleClickDrillEvent=function(evt,app){
- var _4d1=this.getSelectionController();
- if(_4d1!=null){
- if(this.getCV().bCanUseCognosViewerSelection==true){
- _4d1.pageClicked(evt);
- }
- }
- var node=getCrossBrowserNode(evt);
- try{
- if(node.className&&node.className.indexOf("dl")==0){
- if(this.canDrillDown()){
- this.singleClickDrillDown(evt,app);
- return true;
- }else{
- if(this.canDrillUp()){
- this.singleClickDrillUp(evt,app);
- return true;
- }
- }
- }
- }
- catch(e){
- }
- if(app=="RV"){
- return this.getDrillThroughParameters("execute",evt);
- }
- return false;
- };
- CDrillManager.prototype.singleClickDrillDown=function(evt,app){
- if(app=="QS"){
- this.qsDrillDown();
- }else{
- this.rvDrillDown();
- }
- };
- CDrillManager.prototype.singleClickDrillUp=function(evt,app){
- if(app=="QS"){
- this.qsDrillUp();
- }else{
- this.rvDrillUp();
- }
- };
- CDrillManager.prototype.getDrillParameters=function(_4d7,_4d8,_4d9,_4da){
- var _4db=[];
- var _4dc=this.getSelectedObject();
- if(_4dc==null){
- return _4db;
- }
- if(typeof _4d8=="undefined"){
- _4d8=true;
- }
- var _4dd=_4dc.getDataItems();
- var _4de=_4dc.getMuns();
- var _4df=_4dc.getDimensionalItems("lun");
- var _4e0=_4dc.getDimensionalItems("hun");
- var _4e1=_4dc.getDrillOptions();
- if(typeof _4dd=="undefined"||typeof _4de=="undefined"||typeof _4e1=="undefined"||_4de==null||_4dd==null||_4e1==null){
- return _4db;
- }
- if(_4de.length!=_4dd.length){
- return _4db;
- }
- var _4e2=_4de.length;
- for(var _4e3=0;_4e3<_4e2;++_4e3){
- if(_4dd[_4e3].length!=0){
- var _4e4=(_4da)?this.findUserSelectedDrillItem(_4da,_4dd[_4e3]):0;
- if(_4e4<0){
- continue;
- }
- if((_4d9===true)||this.getDrillOption(_4d7)){
- if(_4de[_4e3][_4e4]==""||_4db.toString().indexOf(_4de[_4e3][_4e4],0)==-1){
- _4db[_4db.length]=_4dd[_4e3][_4e4];
- _4db[_4db.length]=_4de[_4e3][_4e4];
- if(_4d8===true){
- _4db[_4db.length]=_4df[_4e3][_4e4];
- _4db[_4db.length]=_4e0[_4e3][_4e4];
- }
- }
- }
- }
- }
- return _4db;
- };
- CDrillManager.prototype.findUserSelectedDrillItem=function(_4e5,_4e6){
- for(var _4e7=0;_4e7<_4e6.length;++_4e7){
- if(_4e5==_4e6[_4e7]){
- return _4e7;
- }
- }
- return -1;
- };
- CDrillManager.prototype.getModelDrillThroughContext=function(_4e8){
- var _4e9="";
- if(this.canDrillThrough()===true){
- if(typeof gUseNewSelectionContext=="undefined"){
- var _4ea="";
- if(typeof getConfigFrame!="undefined"){
- _4ea=decodeURIComponent(getConfigFrame().cfgGet("PackageBase"));
- }else{
- if(this.getCV().getModelPath()!==""){
- _4ea=this.getCV().getModelPath();
- }
- }
- _4e9=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_4ea));
- }else{
- var _4eb=new CParameterValues();
- var _4ec=this.getSelectionController();
- if(_4ec){
- var _4ed=_4ec.getAllSelectedObjects();
- for(var _4ee=0;_4ee<_4ed.length;++_4ee){
- var _4ef=_4ed[_4ee];
- var _4f0=_4ef.getMuns();
- var _4f1=_4ef.getMetadataItems();
- var _4f2=_4ef.getUseValues();
- for(var _4f3=0;_4f3<_4f1.length;++_4f3){
- for(var idx=0;idx<_4f1[_4f3].length;++idx){
- if(_4f1[_4f3][idx]==null||_4f1[_4f3][idx]==""){
- continue;
- }
- var name=_4f1[_4f3][idx];
- var _4f6;
- if(_4f0[_4f3][idx]!=null&&_4f0[_4f3][idx]!=""){
- _4f6=_4f0[_4f3][idx];
- }else{
- _4f6=_4f2[_4f3][idx];
- }
- var _4f7=_4f2[_4f3][idx];
- _4eb.addSimpleParmValueItem(name,_4f6,_4f7,"true");
- }
- }
- }
- }
- var _4f8=_4e8.XMLBuilderCreateXMLDocument("context");
- _4e9=_4eb.generateXML(_4e8,_4f8);
- }
- }
- return _4e9;
- };
- CDrillManager.prototype.rvDrillUp=function(_4f9){
- this.getCV().executeAction("DrillUp",_4f9);
- };
- CDrillManager.prototype.rvDrillDown=function(_4fa){
- this.getCV().executeAction("DrillDown",_4fa);
- };
- CDrillManager.prototype.rvBuildXMLDrillParameters=function(_4fb,_4fc){
- var _4fd=this.getDrillParameters(_4fb,true,false,_4fc);
- if(_4fd.length==0){
- return drillParams;
- }
- return this.buildDrillParametersSpecification(_4fd);
- };
- CDrillManager.prototype.buildDrillParametersSpecification=function(_4fe){
- var _4ff="<DrillParameters>";
- var idx=0;
- while(idx<_4fe.length){
- _4ff+="<DrillGroup>";
- _4ff+="<DataItem>";
- _4ff+=sXmlEncode(_4fe[idx++]);
- _4ff+="</DataItem>";
- _4ff+="<MUN>";
- _4ff+=sXmlEncode(_4fe[idx++]);
- _4ff+="</MUN>";
- _4ff+="<LUN>";
- _4ff+=sXmlEncode(_4fe[idx++]);
- _4ff+="</LUN>";
- _4ff+="<HUN>";
- _4ff+=sXmlEncode(_4fe[idx++]);
- _4ff+="</HUN>";
- _4ff+="</DrillGroup>";
- }
- _4ff+="</DrillParameters>";
- return _4ff;
- };
- CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){
- var _501=null;
- var _502=this.getAuthoredDrillThroughTargets();
- if(_502.length>0){
- var _503="<AuthoredDrillTargets>";
- for(var _504=0;_504<_502.length;++_504){
- _503+=eval("\""+_502[_504]+"\"");
- }
- _503+="</AuthoredDrillTargets>";
- var cv=this.getCV();
- var _506=cv.getAction("AuthoredDrill");
- var _507=cv.getDrillTargets();
- if(_507.length>0){
- _501=_506.getAuthoredDrillThroughContext(_503,_507);
- }
- }
- return _501;
- };
- CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){
- var _508="";
- var _509=this.getAuthoredDrillsForCurrentSelection();
- if(_509){
- _508=XMLBuilderSerializeNode(_509);
- }
- return _508;
- };
- CDrillManager.prototype.launchGoToPage=function(_50a,_50b){
- var _50c=this.getSelectionController();
- if((_50c!=null&&_50c.getModelDrillThroughEnabled()==true)||(typeof _50a!="undefined"&&_50a!=null&&_50a!="")){
- var _50d=this.getAuthoredDrillsForGotoPage();
- var _50e=this.getModelDrillThroughContext(self);
- var form=document.getElementById("drillForm");
- if(form!=null){
- document.body.removeChild(form);
- }
- form=document.createElement("form");
- var cvid=this.getCVId();
- var _511=document.forms["formWarpRequest"+cvid];
- form.setAttribute("id","drillForm");
- form.setAttribute("name","drillForm");
- form.setAttribute("target",_511.getAttribute("target"));
- form.setAttribute("method","post");
- form.setAttribute("action",_511.getAttribute("action"));
- form.style.display="none";
- document.body.appendChild(form);
- if(this.getCV().getModelPath()!==""){
- form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath()));
- }
- if(typeof _511["ui.object"]!="undefined"&&_511["ui.object"].value!=""){
- form.appendChild(createFormField("drillSource",_511["ui.object"].value));
- }else{
- if(typeof this.getCV().envParams["ui.spec"]!="undefined"){
- form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"]));
- }
- }
- if(_50d!=""){
- form.appendChild(createHiddenFormField("m","portal/drillthrough.xts"));
- form.appendChild(createFormField("invokeGotoPage","true"));
- form.appendChild(createFormField("m","portal/drillthrough.xts"));
- form.appendChild(createFormField("modelDrillEnabled",_50c.getModelDrillThroughEnabled()));
- if(typeof gUseNewSelectionContext=="undefined"){
- form.appendChild(createFormField("newSelectionContext","true"));
- }
- }else{
- if(typeof gUseNewSelectionContext=="undefined"){
- form.appendChild(createHiddenFormField("m","portal/goto2.xts"));
- }else{
- form.appendChild(createHiddenFormField("m","portal/goto.xts"));
- }
- }
- form.appendChild(createHiddenFormField("b_action","xts.run"));
- form.appendChild(createHiddenFormField("drillTargets",_50d));
- if(typeof gUseNewSelectionContext=="undefined"){
- form.appendChild(createHiddenFormField("drillContext",_50e));
- }else{
- form.appendChild(createHiddenFormField("modeledDrillthru",_50e));
- }
- form.appendChild(createHiddenFormField("errURL","javascript:window.close();"));
- if(typeof _50b!="undefined"&&_50b==true){
- form.appendChild(this.createFormField("directLaunch","true"));
- }
- var _512="";
- if(this.getCV().envParams["ui.routingServerGroup"]){
- _512=this.getCV().envParams["ui.routingServerGroup"];
- }
- form.appendChild(createHiddenFormField("ui.routingServerGroup",_512));
- if(this.getCV().getExecutionParameters()!=""){
- form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters()));
- }
- if(_511.lang&&_511.lang.value!=""){
- form.appendChild(createHiddenFormField("lang",_511.lang.value));
- }
- if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){
- if(typeof this.getCV().launchGotoPage==="function"){
- this.getCV().launchGotoPage(form);
- }else{
- var _513="winNAT_"+(new Date()).getTime();
- var _514=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid;
- window.open(_514,_513,"toolbar,location,status,menubar,resizable,scrollbars=1");
- form.target=_513;
- }
- }
- }
- };
- CDrillManager.prototype.buildSearchPageXML=function(_515,pkg,_517,_518,_519,_51a,_51b){
- var _51c=null;
- if(typeof _515.XMLElement=="function"){
- _51c=_515.XMLBuilderCreateXMLDocument("cognosSearch");
- _515.XMLBuilderSetAttributeNodeNS(_51c.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/");
- var _51d=_51c.createElement("package");
- if(typeof pkg=="string"&&pkg!==""){
- _51d.appendChild(_51c.createTextNode(pkg));
- }
- _51c.documentElement.appendChild(_51d);
- var _51e=_51c.createElement("model");
- if(typeof _517=="string"&&_517!==""){
- _51e.appendChild(_51c.createTextNode(_517));
- }
- _51c.documentElement.appendChild(_51e);
- var _51f=_51c.createElement("selectedContext");
- _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
- _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
- _515.XMLBuilderSetAttributeNodeNS(_51f,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
- _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
- _515.XMLBuilderSetAttributeNodeNS(_51f,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _51c.documentElement.appendChild(_51f);
- for(var _520 in _518){
- var _521=_51c.createElement("item");
- _515.XMLBuilderSetAttributeNodeNS(_521,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
- var _522=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_51c);
- _515.XMLBuilderSetAttributeNodeNS(_522,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _522.appendChild(_51c.createTextNode(_518[_520].name));
- var _523=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_51c);
- _515.XMLBuilderSetAttributeNodeNS(_523,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _515.XMLBuilderSetAttributeNodeNS(_523,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- for(var j=0;j<_518[_520].values.length;j++){
- var _525=_51c.createElement("item");
- _515.XMLBuilderSetAttributeNodeNS(_525,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- var _526=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_51c);
- _515.XMLBuilderSetAttributeNodeNS(_526,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _526.appendChild(_51c.createTextNode(_518[_520].values[j][0]));
- var _527=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_51c);
- _515.XMLBuilderSetAttributeNodeNS(_527,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- var _528=_518[_520].values[j][1]==null?"":_518[_520].values[j][1];
- _527.appendChild(_51c.createTextNode(_528));
- _525.appendChild(_526);
- _525.appendChild(_527);
- _523.appendChild(_525);
- }
- _521.appendChild(_522);
- _521.appendChild(_523);
- _51f.appendChild(_521);
- }
- var _529=_51c.createElement("defaultMeasure");
- _51c.documentElement.appendChild(_529);
- _51a.buildXML(_515,_51c,"data");
- var _52a=_51c.createElement("filter");
- _51c.documentElement.appendChild(_52a);
- }
- return _51c;
- };
- CDrillManager.prototype.openSearchPage=function(_52b,_52c){
- this.getModelDrillThroughContext(self);
- var _52d=document.getElementById("searchPage");
- if(_52d!=null){
- document.body.removeChild(_52d);
- }
- _52d=document.createElement("form");
- _52d.setAttribute("id","searchPage");
- _52d.setAttribute("name","searchPage");
- _52d.setAttribute("method","post");
- _52d.setAttribute("target",_52d.name);
- _52d.setAttribute("action",this.getCV().getGateway()+"/gosearch");
- _52d.style.display="none";
- document.body.appendChild(_52d);
- _52d.appendChild(createHiddenFormField("csn.action","search"));
- _52d.appendChild(createHiddenFormField("csn.drill",_52c));
- var _52e=window.open("",_52d.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640");
- _52e.focus();
- _52d.submit();
- };
- CDrillManager.prototype.launchSearchPage=function(){
- var _52f=this.getSelectionController();
- var _530=document.forms["formWarpRequest"+this.getCVId()];
- var _531=this.determineSelectionsForSearchPage(_52f);
- var _532=this.getSearchContextDataSpecfication(_52f);
- var _533=this.buildSearchPageXML(self,_530.packageBase.value,this.getCV().getModelPath(),_531,[],_532,[]);
- this.openSearchPage(_530.packageBase.value,XMLBuilderSerializeNode(_533));
- };
- CDrillManager.prototype.qsDrillDown=function(){
- if(!this.canDrillDown()){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _534="DD:";
- this.qsSendDrillCommand(_534);
- };
- CDrillManager.prototype.qsDrillUp=function(){
- if(!this.canDrillUp()){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _535="DU:";
- this.qsSendDrillCommand(_535);
- };
- CDrillManager.prototype.qsSendDrillCommand=function(_536){
- var _537;
- if(_536=="DU:"){
- _537="drillUp";
- }else{
- _537="drillDown";
- }
- var _538=this.getDrillParameters(_537,false,false);
- if(_538.length==0){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- for(var idx=0;idx<_538.length;++idx){
- _536+=getConfigFrame().escapeParam(_538[idx]);
- if(idx+1<_538.length){
- _536+=",";
- }
- }
- getConfigFrame().sendCmd(_536,"",true);
- };
- CDrillManager.prototype.qsLaunchGoToPage=function(_53a){
- var _53b=this.getSelectionController();
- if(_53b!=null&&_53b.getModelDrillThroughEnabled()==true){
- var _53c=this.getModelDrillThroughContext(cf);
- if(_53c==""){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _53d=document.getElementById("gotoPage");
- if(_53d!=null){
- document.body.removeChild(_53d);
- }
- _53d=document.createElement("form");
- _53d.setAttribute("id","gotoPage");
- _53d.setAttribute("name","gotoPage");
- _53d.setAttribute("method","post");
- _53d.style.display="none";
- document.body.appendChild(_53d);
- var _53e=getConfigFrame();
- _53d.appendChild(this.createFormField("objpath",decodeURIComponent(_53e.cfgGet("PackageBase"))));
- if(typeof gUseNewSelectionContext=="undefined"){
- _53d.appendChild(this.createFormField("m","portal/goto2.xts"));
- }else{
- _53d.appendChild(this.createFormField("m","portal/goto.xts"));
- }
- _53d.appendChild(this.createFormField("b_action","xts.run"));
- if(typeof gUseNewSelectionContext=="undefined"){
- _53d.appendChild(this.createFormField("drillContext",_53c));
- }else{
- _53d.appendChild(this.createFormField("modeledDrillthru",_53c));
- }
- if(typeof getConfigFrame().routingServerGroup!="undefined"){
- _53d.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup));
- }
- if(typeof _53a!="undefined"&&_53a==true){
- _53d.appendChild(this.createFormField("directLaunch","true"));
- }
- var _53f=_53e.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters();
- if(_53f){
- _53d.appendChild(this.createFormField("encExecutionParameters",_53f));
- }
- var _540="winNAT_"+(new Date()).getTime();
- var _541=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId();
- window.open(_541,_540,"toolbar,location,status,menubar,resizable,scrollbars=1");
- _53d.target=_540;
- }
- };
- CDrillManager.prototype.qsLaunchSearchPage=function(){
- var cf=getConfigFrame();
- var _543=goWindowManager.getSelectionController();
- var _544=this.determineSelectionsForSearchPage(_543);
- var _545=this.getSearchContextDataSpecfication(_543);
- var _546=decodeURIComponent(cf.cfgGet("PackageBase"));
- var _547=this.buildSearchPageXML(cf,_546,decodeURIComponent(cf.cfgGet("cmLastModel")),_544,[],_545,[]);
- this.openSearchPage(_546,cf.XMLBuilderSerializeNode(_547));
- };
- CDrillManager.prototype.determineSelectionsForSearchPage=function(_548){
- var _549=new CtxArrayPlaceHolder();
- var _54a=_548.getAllSelectedObjects();
- for(var i=0;i<_54a.length;i++){
- var _54c=_54a[i].getColumnName();
- if(!this.containsByIndiceInArray(_549,_54c)){
- _549[_54c]={};
- _549[_54c].name=_54c;
- _549[_54c].values=[];
- }
- var idx0="";
- var muns=_54a[i].getMuns();
- if(muns!=null&&muns.length>0){
- idx0=muns[0][0];
- }
- var idx1=_54a[i].getDisplayValues()[0];
- if(!(this.containsInArray(_549[_54c].values,0,idx0)&&this.containsInArray(_549[_54c].values,1,idx1))){
- _549[_54c].values[_549[_54c].values.length]=[idx0,idx1];
- }
- }
- return _549;
- };
- CDrillManager.prototype.getSearchContextDataSpecfication=function(_550){
- var _551=new CParameterValues();
- var _552=_550.getCCDManager();
- var _553=_552.m_cd;
- for(var _554 in _553){
- var _555=_552.GetUsage(_554);
- if(_555!="2"){
- var _556=_552.GetRDIValue(_554);
- var _557=_552.GetDisplayValue(_554);
- _551.addSimpleParmValueItem(_556,_556,_557,"true");
- }
- }
- return _551;
- };
- CDrillManager.prototype.containsByIndiceInArray=function(a,v){
- for(var i in a){
- if(i==v){
- return true;
- }
- }
- return false;
- };
- CDrillManager.prototype.containsInArray=function(a,idx,v){
- for(var i in a){
- if(a[i][idx]==v){
- return true;
- }
- }
- return false;
- };
- CDrillManager.prototype.createFormField=function(name,_560){
- var _561=document.createElement("input");
- _561.setAttribute("type","hidden");
- _561.setAttribute("name",name);
- _561.setAttribute("value",_560);
- return (_561);
- };
- CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){
- var _562=[];
- var _563=this.getSelectionController();
- var _564=null;
- if(_563!=null){
- if(_563.getSelectedColumnIds().length==1){
- var _565=_563.getSelections();
- for(var _566=0;_566<_565.length;++_566){
- var _567=_565[_566];
- _564=_567.getCellRef();
- while(_564){
- if(_564.getAttribute("dtTargets")!=null){
- _562.push("<rvDrillTargets>"+_564.getAttribute("dtTargets")+"</rvDrillTargets>");
- break;
- }else{
- if(_564.getAttribute("onclick")!=null){
- var _568=_564.getAttribute("onclick");
- var _569=null;
- if(_568.indexOf("doSingleDrillThrough")!=-1){
- _569=_568.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough");
- }else{
- if(_568.indexOf("doMultipleDrillThrough")!=-1){
- _569=_568.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough");
- }
- }
- if(_569!=null){
- var _56a=eval(_569);
- if(_56a!=null){
- _562.push(_56a);
- break;
- }
- }
- }
- }
- _564=XMLHelper_GetFirstChildElement(_564);
- }
- }
- }else{
- if(_563.hasSelectedChartNodes()){
- var _56b=_563.getSelectedChartNodes();
- var _56c=_56b[0];
- _564=_56c.getArea();
- if(_564.getAttribute("dtTargets")!=null){
- _562.push("<rvDrillTargets>"+_564.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }else{
- if(_563.getSelectedDrillThroughImage()!=null){
- var _56d=_563.getSelectedDrillThroughImage();
- if(_56d&&_56d.getAttribute("dtTargets")!=null){
- _562.push("<rvDrillTargets>"+_56d.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }else{
- if(_563.getSelectDrillThroughSingleton()!=null){
- var _56e=_563.getSelectDrillThroughSingleton();
- if(_56e&&_56e.getAttribute("dtTargets")!=null){
- _562.push("<rvDrillTargets>"+_56e.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }
- }
- }
- }
- }
- return _562;
- };
- CDrillManager.prototype.getDrillThroughParameters=function(_56f,evt){
- if(typeof _56f=="undefined"){
- _56f="query";
- }
- var _571=[];
- if(typeof evt!="undefined"){
- var _572=getCrossBrowserNode(evt,true);
- try{
- while(_572){
- if(typeof _572.getAttribute!="undefined"&&_572.getAttribute("dtTargets")){
- _571.push("<rvDrillTargets>"+_572.getAttribute("dtTargets")+"</rvDrillTargets>");
- break;
- }
- _572=_572.parentNode;
- }
- }
- catch(e){
- return false;
- }
- }else{
- var oCV=this.getCV();
- var _574=oCV.getDrillMgr();
- var _575=_574.getSelectionController();
- if(_575!=null){
- var _576=null;
- if(_575.hasSelectedChartNodes()){
- var _577=_575.getSelectedChartNodes();
- var _578=_577[0];
- _576=_578.getArea();
- }
- if(_576!=null){
- _571.push("<rvDrillTargets>"+_576.getAttribute("dtTargets")+"</rvDrillTargets>");
- }else{
- _571=this.getAuthoredDrillThroughTargets();
- }
- }
- }
- if(_571.length>0){
- var _579="<AuthoredDrillTargets>";
- for(var _57a=0;_57a<_571.length;++_57a){
- _579+=eval("\""+_571[_57a]+"\"");
- }
- _579+="</AuthoredDrillTargets>";
- var _57b=this.getCV().getAction("AuthoredDrill");
- if(_56f=="query"){
- _57b.populateContextMenu(_579);
- this.showOtherMenuItems();
- }else{
- if(this.getCV().envParams["cv.id"]=="AA"){
- this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent();
- }else{
- _57b.execute(_579);
- }
- }
- return true;
- }else{
- if(_56f=="query"){
- this.showOtherMenuItems();
- return true;
- }else{
- return false;
- }
- }
- };
- CDrillManager.prototype.executeAuthoredDrill=function(_57c){
- var _57d=decodeURIComponent(_57c);
- var _57e=this.getCV().getAction("AuthoredDrill");
- _57e.executeDrillTarget(_57d);
- };
- CDrillManager.prototype.doesMoreExist=function(_57f){
- for(var i=0;i<_57f.getNumItems();i++){
- var _581=_57f.get(i);
- if(_581!=null){
- if((_581 instanceof CMenuItem)&&(_581.getLabel()==RV_RES.RV_MORE)&&(_581.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){
- return true;
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.showOtherMenuItems=function(){
- var cv=this.getCV();
- var _583=cv.rvMainWnd;
- var _584=_583.getToolbarControl();
- var _585=null;
- var _586=null;
- if(typeof _584!="undefined"&&_584!=null){
- _585=_584.getItem("goto");
- if(_585){
- _586=_585.getMenu();
- }
- }
- var _587=_583.getContextMenu();
- var _588=_583.getUIHide();
- var _589=null;
- if(typeof _587!="undefined"&&_587!=null&&_587.getGoToMenuItem()){
- _589=_587.getGoToMenuItem().getMenu();
- }
- var _58a=null;
- var _58b=this.getSelectionController();
- if(_586!=null){
- if(this.doesMoreExist(_586)==false){
- if(typeof gMenuSeperator!="undefined"&&_586.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){
- _586.add(gMenuSeperator);
- }
- var _58c=new CMenuItem(_586,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
- if(_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){
- _58c.hide();
- }else{
- if(_58b==null||_58b.getModelDrillThroughEnabled()==false){
- _58c.disable();
- }
- }
- }
- }
- if(_589!=null){
- if(typeof gMenuSeperator!="undefined"&&_589.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){
- _589.add(gMenuSeperator);
- }
- var _58d=new CMenuItem(_589,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
- if(_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){
- _58d.hide();
- }else{
- if(_58b==null||_58b.getModelDrillThroughEnabled()==false){
- _58d.disable();
- }
- }
- }
- if(_58a!=null&&_58b!=null){
- var _58e=_58b.getAllSelectedObjects();
- if(_58e==null||_58e.length===0){
- _58a.disable();
- }
- }
- if(_586!=null){
- _586.draw();
- if(_586.isVisible()){
- _586.show();
- }
- }
- if(_589!=null){
- _589.draw();
- if(_589.isVisible()){
- _589.show();
- }
- }
- };
- CDrillManager.prototype.ddc=function(evt){
- var node=getNodeFromEvent(evt);
- if(node!=null&&node.getAttribute("ddc")!=="1"){
- node.setAttribute("ddc","1");
- if(node.getAttribute("dtTargets")){
- node.className="dl "+node.className;
- node.setAttribute("href","#");
- return;
- }
- var _591=this.getSelectionController();
- if(_591!=null){
- var _592=_591.getSelectionObjectFactory().getSelectionChartObject(node);
- if(_592!=null){
- var _593=_592.getDrillOptions();
- for(var idx=0;idx<_593.length;++idx){
- var _595=_593[idx][0];
- if((node.getAttribute("isChartTitle")==="true"&&_595=="1")||_595=="3"||_595=="2"){
- node.className="dl "+node.className;
- node.setAttribute("href","#");
- break;
- }
- }
- }
- }
- }
- };
- CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_596){
- if(typeof _596=="undefined"||_596==null){
- return null;
- }
- var _597=this.getCV().getDrillTargets();
- if(!_597||_597.length==0){
- return null;
- }
- var _598=_596[0][0];
- if(typeof _598=="undefined"||_598==null){
- return null;
- }
- var _599=_597[_598];
- if(typeof _599=="undefined"||_599==null){
- return null;
- }
- var _59a="<drillTarget drillIdx=\\\""+_598+"\\\" label=\\\""+_599.getLabel()+"\\\"/>";
- return "<rvDrillTargets>"+_59a+"</rvDrillTargets>";
- };
- CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_59b){
- if(typeof _59b=="undefined"||_59b==null){
- return null;
- }
- var _59c=this.getCV().getDrillTargets();
- if(!_59c||_59c.length==0){
- return null;
- }
- var _59d="";
- for(var _59e=0;_59e<_59b.length;++_59e){
- var _59f=_59b[_59e];
- if(_59f.length<2){
- continue;
- }
- var _5a0=_59f[0];
- if(typeof _5a0=="undefined"||_5a0==null){
- continue;
- }
- var _5a1=_59f[1];
- if(typeof _5a1=="undefined"||_5a1==null){
- continue;
- }
- var _5a2=_59c[_5a0];
- if(typeof _5a2=="undefined"||_5a2==null){
- continue;
- }
- if(_5a1===null||_5a1===""){
- _5a1=_5a2.getLabel();
- }
- _59d+="<drillTarget drillIdx=\\\""+_5a0+"\\\" label=\\\""+_5a1+"\\\"/>";
- }
- if(_59d.length>0){
- return "<rvDrillTargets>"+_59d+"</rvDrillTargets>";
- }
- return null;
- };
- function CDrillThroughTarget(_5a3,_5a4,_5a5,_5a6,_5a7,path,_5a9,_5aa,_5ab,_5ac,_5ad,_5ae){
- this.m_label=_5a3;
- this.m_outputFormat=_5a4;
- this.m_outputLocale=_5a5;
- this.m_showInNewWindow=_5a6;
- this.m_method=_5a7;
- this.m_path=path;
- this.m_bookmark=_5a9;
- this.m_parameters=_5aa;
- this.m_objectPaths=_5ab;
- this.m_prompt="false";
- this.m_dynamicDrillThrough=false;
- this.m_parameterProperties=_5ae;
- if(typeof _5ac!="undefined"&&_5ac!=null){
- if(_5ac=="yes"){
- this.m_prompt="true";
- }else{
- if(_5ac=="target"){
- this.m_prompt="";
- }
- }
- }
- if(typeof _5ad!="undefined"&&_5ad!=null){
- if(typeof _5ad=="string"){
- _5ad=_5ad=="true"?true:false;
- }
- this.m_dynamicDrillThrough=_5ad;
- }
- };
- function CDrillThroughTarget_getParameterProperties(){
- return this.m_parameterProperties;
- };
- function CDrillThroughTarget_getLabel(){
- return this.m_label;
- };
- function CDrillThroughTarget_getOutputFormat(){
- return this.m_outputFormat;
- };
- function CDrillThroughTarget_getOutputLocale(){
- return this.m_outputLocale;
- };
- function CDrillThroughTarget_getShowInNewWindow(){
- return this.m_showInNewWindow;
- };
- function CDrillThroughTarget_getMethod(){
- return this.m_method;
- };
- function CDrillThroughTarget_getPath(){
- return this.m_path;
- };
- function CDrillThroughTarget_getBookmark(){
- return this.m_bookmark;
- };
- function CDrillThroughTarget_getParameters(){
- return this.m_parameters;
- };
- function CDrillThroughTarget_getObjectPaths(){
- return this.m_objectPaths;
- };
- function CDrillThroughTarget_getPrompt(){
- return this.m_prompt;
- };
- function CDrillThroughTarget_isDynamicDrillThrough(){
- return this.m_dynamicDrillThrough;
- };
- CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel;
- CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat;
- CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale;
- CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow;
- CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod;
- CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath;
- CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark;
- CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters;
- CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths;
- CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt;
- CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough;
- CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties;
- function sXmlEncode(_5af){
- var _5b0=""+_5af;
- if((_5b0=="0")||((_5af!=null)&&(_5af!=false))){
- _5b0=_5b0.replace(/&/g,"&");
- _5b0=_5b0.replace(/</g,"<");
- _5b0=_5b0.replace(/>/g,">");
- _5b0=_5b0.replace(/"/g,""");
- _5b0=_5b0.replace(/'/g,"'");
- }else{
- if(_5af==null){
- _5b0="";
- }
- }
- return _5b0;
- };
- function createFormField(name,_5b2){
- var _5b3=document.createElement("input");
- _5b3.setAttribute("type","hidden");
- _5b3.setAttribute("name",name);
- _5b3.setAttribute("value",_5b2);
- return (_5b3);
- };
- function setBackURLToCloseWindow(_5b4){
- var _5b5=_5b4.childNodes;
- if(_5b5){
- for(var _5b6=0;_5b6<_5b5.length;++_5b6){
- var _5b7=_5b5[_5b6];
- var _5b8=_5b7.getAttribute("name");
- if(_5b8&&_5b8=="ui.backURL"){
- _5b4.removeChild(_5b7);
- }
- }
- }
- _5b4.appendChild(createFormField("ui.backURL","javascript:window.close();"));
- };
- function doMultipleDrills(_5b9,cvId){
- if(parent!=this&&parent.doMultipleDrills){
- if(getCVId()!=""&&getCVId()!=cvId){
- cvId=getCVId();
- }
- return parent.doMultipleDrills(_5b9,cvId);
- }else{
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Targets",_5b9,"text");
- }
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(cvId);
- }
- catch(exception){
- }
- var _5bc=buildDrillForm(oCV);
- addDrillEnvironmentFormFields(_5bc,oCV);
- if(typeof oCV!="undefined"&&oCV!=null){
- var _5bd=oCV.getModelPath();
- _5bc.appendChild(createFormField("modelPath",_5bd));
- var _5be=oCV.getSelectionController();
- var _5bf="";
- if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
- _5bf=getViewerSelectionContext(_5be,new CSelectionContext(_5bd));
- }
- _5bc.appendChild(createFormField("drillContext",_5bf));
- _5bc.appendChild(createFormField("modelDrillEnabled",_5be.getModelDrillThroughEnabled()));
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _5bc.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _5bc.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
- }
- }
- }
- _5bc.setAttribute("launchGotoPage","true");
- _5bc.appendChild(createFormField("drillTargets",_5b9));
- _5bc.appendChild(createFormField("invokeGotoPage","true"));
- _5bc.appendChild(createFormField("m","portal/drillthrough.xts"));
- _5bc.appendChild(createFormField("b_action","xts.run"));
- var _5c0="winNAT_"+(new Date()).getTime();
- var _5c1="..";
- if(oCV!=null){
- _5c1=oCV.getWebContentRoot();
- var _5c2=oCV.getExecutionParameters();
- if(_5c2!=""){
- _5bc.appendChild(createFormField("encExecutionParameters",_5c2));
- }
- }
- if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_5bc)){
- if(oCV&&typeof oCV.launchGotoPage==="function"){
- oCV.launchGotoPage(_5bc);
- }else{
- var _5c3=_5c1+"/rv/blankDrillWin.html";
- _5bc.target=_5c0;
- window.open(_5c3,_5c0);
- }
- }
- }
- };
- function buildDrillForm(oCV){
- var _5c5=document.getElementById("drillForm");
- if(_5c5){
- document.body.removeChild(_5c5);
- }
- _5c5=document.createElement("form");
- if(typeof oCV!="undefined"&&oCV!=null){
- var _5c6=document.getElementById("formWarpRequest"+oCV.getId());
- _5c5.setAttribute("target",_5c6.getAttribute("target"));
- _5c5.setAttribute("action",_5c6.getAttribute("action"));
- }else{
- _5c5.setAttribute("action",location.pathname);
- }
- _5c5.setAttribute("id","drillForm");
- _5c5.setAttribute("name","drillForm");
- _5c5.setAttribute("method","post");
- _5c5.style.display="none";
- document.body.appendChild(_5c5);
- return _5c5;
- };
- function addDrillEnvironmentFormFields(_5c7,oCV){
- if(window.g_dfEmail){
- _5c7.appendChild(createFormField("dfemail",window.g_dfEmail));
- }
- if(oCV!=null){
- _5c7.appendChild(createFormField("cv.id",oCV.getId()));
- if(typeof oCV.envParams["ui.sh"]!="undefined"){
- _5c7.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
- }
- if(oCV.getViewerWidget()==null){
- if(typeof oCV.envParams["cv.header"]!="undefined"){
- _5c7.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
- }
- if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
- _5c7.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
- }else{
- var _5c9=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
- if(oCV.m_viewerFragment&&_5c9!=null&&_5c9===true){
- var _5ca=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
- _5c7.appendChild(createFormField("cv.toolbar",_5ca));
- }
- }
- }
- if(typeof oCV.envParams["ui.backURL"]!="undefined"){
- _5c7.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
- }
- if(typeof oCV.envParams["ui.postBack"]!="undefined"){
- _5c7.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
- }
- if(typeof oCV.envParams["savedEnv"]!="undefined"){
- _5c7.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
- }
- if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
- _5c7.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
- }
- if(typeof oCV.envParams["lang"]!="undefined"){
- _5c7.appendChild(createFormField("lang",oCV.envParams["lang"]));
- }
- if(typeof oCV.envParams["ui.errURL"]!="undefined"){
- _5c7.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
- }
- var _5cb="";
- if(oCV.envParams["ui.routingServerGroup"]){
- _5cb=oCV.envParams["ui.routingServerGroup"];
- }
- _5c7.appendChild(createHiddenFormField("ui.routingServerGroup",_5cb));
- }else{
- _5c7.appendChild(createFormField("cv.header","false"));
- _5c7.appendChild(createFormField("cv.toolbar","false"));
- }
- };
- function appendReportHistoryObjects(oCV,_5cd){
- if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_5cd!=null){
- oCV.rvMainWnd.addCurrentReportToReportHistory();
- var _5ce=oCV.rvMainWnd.saveReportHistoryAsXML();
- _5cd.appendChild(createFormField("cv.previousReports",_5ce));
- }
- };
- function doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9){
- var _5da="";
- if(typeof cvId=="string"){
- _5da=cvId;
- }
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(cvId);
- }
- catch(exception){
- }
- if(!oCV&&parent!=this&&parent.doSingleDrill){
- if(getCVId()!=""&&getCVId()!=cvId){
- cvId=getCVId();
- }
- return parent.doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9);
- }else{
- if(typeof _5d1=="undefined"){
- _5d1="default";
- }else{
- if(_5d1=="execute"){
- _5d1="run";
- }
- }
- if(_5d1=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
- _5cf="_blank";
- }
- var _5dc=buildDrillForm(oCV);
- var _5dd="<authoredDrillRequest>";
- _5dd+="<param name=\"action\">"+sXmlEncode(_5d1)+"</param>";
- _5dd+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
- _5dd+="<param name=\"format\">"+sXmlEncode(_5d2)+"</param>";
- _5dd+="<param name=\"locale\">"+sXmlEncode(_5d3)+"</param>";
- _5dd+="<param name=\"prompt\">"+sXmlEncode(_5d8)+"</param>";
- _5dd+="<param name=\"dynamicDrill\">"+sXmlEncode(_5d9)+"</param>";
- if(typeof oCV!="undefined"&&oCV!=null){
- _5dd+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
- _5dd+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }
- var _5de=oCV.getModelPath();
- _5dd+="<param name=\"metadataModel\">"+sXmlEncode(_5de)+"</param>";
- _5dd+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_5de)))+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _5dd+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _5dd+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
- }
- }
- }
- if(_5d4!=""){
- _5dd+="<param name=\"bookmark\">"+_5d4+"</param>";
- }
- if(_5d1!="view"){
- if(typeof _5d5!="undefined"){
- _5dd+="<param name=\"sourceContext\">"+sXmlEncode(_5d5)+"</param>";
- }
- if(typeof _5d6!="undefined"){
- _5dd+="<param name=\"objectPaths\">"+sXmlEncode(_5d6)+"</param>";
- }
- }
- var _5df=0;
- _5dd+="<drillParameters>";
- var _5e0=[];
- for(_5df=1;_5df<args.length;_5df++){
- var sSel=args[_5df][1];
- if(_5d2=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
- var _5e2=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_5df][1])));
- if(_5e2){
- var sMun=_5e2.getAttribute("mun");
- if(sMun!=null&&sMun!=""){
- _5e2.setAttribute("useValue",sMun);
- sSel="<selectChoices>"+XMLBuilderSerializeNode(_5e2)+"</selectChoices>";
- }
- }
- }
- var _5e4=args[_5df][0];
- var _5e5=false;
- for(var i=0;i<_5e0.length;i++){
- var _5e7=_5e0[i];
- if(_5e7.name===_5e4&&_5e7.value===sSel){
- _5e5=true;
- break;
- }
- }
- if(!_5e5){
- _5e0.push({"name":_5e4,"value":sSel});
- _5dd+="<param name=\""+sXmlEncode(_5e4)+"\">"+sXmlEncode(sSel)+"</param>";
- }
- }
- _5dd+="</drillParameters>";
- _5dd+=getExecutionParamNode(oCV);
- _5dd+="</authoredDrillRequest>";
- _5dc.appendChild(createFormField("authoredDrill.request",_5dd));
- _5dc.appendChild(createFormField("ui.action","authoredDrillThrough2"));
- _5dc.appendChild(createFormField("b_action","cognosViewer"));
- addDrillEnvironmentFormFields(_5dc,oCV);
- if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_5dc)){
- if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
- oCV.sendDrillThroughRequest(_5dc);
- }else{
- if(_5cf==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
- oCV.m_viewerFragment.raiseAuthoredDrillEvent(_5dd);
- }else{
- if((oCV!=null&&oCV.getViewerWidget()!=null)||_5cf!=""){
- setBackURLToCloseWindow(_5dc);
- var _5e8="winNAT_"+(new Date()).getTime();
- var _5e9="..";
- if(oCV!=null){
- _5e9=oCV.getWebContentRoot();
- }
- var _5ea=_5e9+"/rv/blankDrillWin.html";
- if(_5da){
- _5ea+="?cv.id="+_5da;
- }
- if(oCV==null){
- _5ea=window.location.href.substring(0,window.location.href.indexOf("/v1"));
- _5ea+="/?perspective=classicviewer";
- _5ea+="&altDrillFlag=true";
- _5ea+="&format="+sXmlEncode(_5d2);
- var _5eb=_5dc.getAttribute("name")+Date.now().toString();
- _5dc.setAttribute("name",_5eb);
- if(typeof (Storage)!=="undefined"){
- localStorage.setItem(_5eb,_5dc.outerHTML);
- _5ea+="&drillFormLabel="+_5eb;
- }else{
- console.log("Sorry! No Web Storage support...");
- }
- }
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_5dd,"xml");
- }
- _5dc.target=_5e8;
- newWindow=window.open(_5ea,_5e8);
- }else{
- appendReportHistoryObjects(oCV,_5dc);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_5dd,"xml");
- }
- _5dc.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
- _5dc.submit();
- if(oCV!=null&&!oCV.getDrillFormTarget){
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
- }
- }
- }
- }
- }
- }
- };
- function getExecutionParamNode(oCV){
- var _5ed="";
- if(typeof oCV!="undefined"&&oCV!=null){
- var _5ee=oCV.getExecutionParameters();
- if(_5ee!=""){
- _5ed+="<param name=\"executionParameters\">";
- _5ed+=sXmlEncode(_5ee);
- _5ed+="</param>";
- }
- }
- return _5ed;
- };
- function doSingleDrillThrough(_5ef,_5f0,cvId){
- var _5f2=_5ef[0][0];
- if(typeof _5f2=="undefined"||_5f2==null){
- return;
- }
- var _5f3=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_5f2]:drillTargets[_5f2];
- if(typeof _5f3=="undefined"){
- return;
- }
- if(_5f0!=""&&_5f3.getPath()==""){
- document.location="#"+_5f0;
- }else{
- var args=[];
- args[args.length]=["ui.object",_5f3.getPath()];
- for(var _5f5=1;_5f5<_5ef.length;++_5f5){
- args[args.length]=_5ef[_5f5];
- }
- var _5f6="";
- if(_5f3.getShowInNewWindow()=="true"){
- _5f6="_blank";
- }
- var _5f7=_5f3.getParameters();
- var _5f8=_5f3.getObjectPaths();
- var _5f9=cvId;
- if(!cvId){
- _5f9=getCVId();
- }
- doSingleDrill(_5f6,args,_5f3.getMethod(),_5f3.getOutputFormat(),_5f3.getOutputLocale(),_5f0,_5f7,_5f8,_5f9,_5f3.getPrompt(),false);
- }
- };
- function getCVId(){
- var _5fa="";
- try{
- _5fa=this.frameElement.id.substring("CVIFrame".length);
- }
- catch(exception){
- }
- return _5fa;
- };
- function doMultipleDrillThrough(_5fb,cvId){
- var _5fd="<rvDrillTargets>";
- for(var _5fe=0;_5fe<_5fb.length;++_5fe){
- var _5ff=_5fb[_5fe];
- if(_5ff.length<3){
- continue;
- }
- var _600=_5ff[0];
- if(typeof _600=="undefined"||_600==null){
- continue;
- }
- var _601=_5ff[1];
- if(typeof _601=="undefined"||_601==null){
- continue;
- }
- var _602=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_600]:drillTargets[_600];
- if(typeof _602=="undefined"||_602==null){
- continue;
- }
- if(_601===null||_601===""){
- _601=_602.getLabel();
- }
- _5fd+="<drillTarget ";
- _5fd+="outputFormat=\"";
- _5fd+=_602.getOutputFormat();
- _5fd+="\" ";
- _5fd+="outputLocale=\"";
- _5fd+=_602.getOutputLocale();
- _5fd+="\" ";
- _5fd+="label=\"";
- _5fd+=sXmlEncode(_601);
- _5fd+="\" ";
- _5fd+="path=\"";
- _5fd+=sXmlEncode(_602.getPath());
- _5fd+="\" ";
- _5fd+="showInNewWindow=\"";
- _5fd+=_602.getShowInNewWindow();
- _5fd+="\" ";
- _5fd+="method=\"";
- _5fd+=_602.getMethod();
- _5fd+="\" ";
- _5fd+="prompt=\"";
- _5fd+=_602.getPrompt();
- _5fd+="\" ";
- _5fd+="dynamicDrill=\"";
- _5fd+=_602.isDynamicDrillThrough();
- _5fd+="\">";
- for(var _603=2;_603<_5ff.length;++_603){
- _5fd+=_5ff[_603];
- }
- _5fd+=_602.getParameters();
- _5fd+=_602.getObjectPaths();
- _5fd+="</drillTarget>";
- }
- _5fd+="</rvDrillTargets>";
- if(!cvId){
- cvId=getCVId();
- }
- doMultipleDrills(_5fd,cvId);
- };
- function CScriptLoader(_604){
- this.m_oFiles={};
- this.m_aScripts=[];
- this.m_aDocumentWriters=[];
- this.m_ajaxWarnings=[];
- this.m_bIgnoreAjaxWarnings=false;
- this.m_bHandleStylesheetLimit=false;
- this.m_iInterval=20;
- this.m_reFindCssPath=new RegExp("<link[^>]*href=\"([^\"]*)\"","i");
- this.m_reFindInlineStyle=/<style\b(\s|.)*?<\/style>/gi;
- this.m_reHasCss=/<link .*?>/gi;
- this.m_reIsCss=/\.css$/i;
- this.m_reIsJavascript=/\.js$/i;
- this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i;
- this.m_reScriptTagClose=/\s*<\/script>.*?$/i;
- this.m_reScriptTagOpen=/^.*?<script[^>]*>\s*/i;
- this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi;
- this.m_reStyleTagOpen=/^\s*<style[^>]*>(\s|<|!|-)*/gi;
- this.m_reEscapedCharacters=/\\[\\"']/g;
- this.m_reStringLiterals=/("|')[\s\S]*?\1/g;
- this.m_sWebContentRoot=_604;
- this.m_bHasCompletedExecution=false;
- this.m_aScriptLoadQueue=[];
- this.m_bBlockScriptLoading=false;
- this.m_bUseScriptBlocking=false;
- this.m_bBlockPromptingLocaleScripts=false;
- this.m_aBlockedPromptingLocaleFileQueue=[];
- };
- CScriptLoader.prototype.hasCompletedExecution=function(){
- return this.m_bHasCompletedExecution;
- };
- CScriptLoader.prototype.setHandlerStylesheetLimit=function(_605){
- this.m_bHandleStylesheetLimit=_605;
- };
- CScriptLoader.prototype.executeScripts=function(_606,_607){
- if(this.isReadyToExecute()){
- for(var _608=0;_608<this.m_aScripts.length;_608++){
- if(this.m_aScripts[_608]){
- var _609=document.createElement("script");
- _609.setAttribute("language","javascript");
- _609.setAttribute("type","text/javascript");
- this.addNamespaceAttribute(_609,_607);
- _609.text=this.m_aScripts[_608];
- document.getElementsByTagName("head").item(0).appendChild(_609);
- }
- }
- this.m_aScripts=[];
- for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
- var _60b=this.m_aDocumentWriters[idx];
- _60b.execute();
- }
- this.m_aDocumentWriters=[];
- if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
- if(typeof _606=="function"){
- _606();
- }
- this.m_bHasCompletedExecution=true;
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_606,_607);
- },this.m_iInterval);
- }
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_606,_607);
- },this.m_iInterval);
- }
- };
- CScriptLoader.prototype.isReadyToExecute=function(){
- for(var _60c in this.m_oFiles){
- if(this.m_oFiles[_60c]!="complete"){
- return false;
- }
- }
- if(this.m_aScriptLoadQueue.length>0){
- return false;
- }
- return true;
- };
- CScriptLoader.prototype.loadCSS=function(_60d,_60e,_60f,_610){
- var aM=_60d.match(this.m_reHasCss);
- if(aM){
- for(var i=0;i<aM.length;i++){
- if(aM[i].match(this.m_reFindCssPath)){
- var _613=RegExp.$1;
- if(_613.indexOf("GlobalReportStyles")!=-1){
- this.validateGlobalReportStyles(_613);
- if(_60f){
- if(_613.indexOf("GlobalReportStyles.css")!=-1){
- _613=_613.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
- }
- var _614=this.getGlobalReportStylesClassPrefix(_613);
- _613=_613.replace(".css","_NS.css");
- if(_60e){
- _60e.className="buxReport "+_614;
- }
- }
- }
- this.loadObject(_613,_610);
- }
- _60d=_60d.replace(aM[i],"");
- }
- }
- return _60d;
- };
- CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_615){
- var _616=null;
- if(_615.indexOf("GlobalReportStyles_11.4.css")!=-1){
- _616="v114";
- }
- if(_615.indexOf("GlobalReportStyles_11.css")!=-1){
- _616="v11";
- }
- if(_615.indexOf("GlobalReportStyles_10.css")!=-1){
- _616="v10";
- }else{
- if(_615.indexOf("GlobalReportStyles_1.css")!=-1){
- _616="v1";
- }else{
- if(_615.indexOf("GlobalReportStyles_none.css")!=-1){
- _616="vnone";
- }else{
- if(_615.indexOf("GlobalReportStyles.css")!=-1){
- _616="v8";
- }
- }
- }
- }
- return _616;
- };
- CScriptLoader.prototype.validateGlobalReportStyles=function(_617){
- var _618=document.getElementsByTagName("link");
- for(var i=0;i<_618.length;++i){
- var _61a=_618[i];
- if(_61a.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
- if(_61a.getAttribute("href").toLowerCase()!=_617.toLowerCase()){
- var _61b=_617.split("/");
- var _61c=_61a.getAttribute("href").split("/");
- if(_61b[_61b.length-1]!=_61c[_61c.length-1]){
- this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
- }
- }
- break;
- }
- }
- };
- CScriptLoader.prototype.loadFile=function(_61d,_61e,_61f){
- var sURL="";
- if(_61d){
- sURL=_61d;
- }
- var _621=null;
- if(typeof _61e=="string"){
- _621=_61e;
- }
- var _622="POST";
- if(_61f=="GET"){
- _622="GET";
- }
- var _623=null;
- if(typeof ActiveXObject!="undefined"){
- _623=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- _623=new XMLHttpRequest();
- }
- _623.open(_622,sURL,false);
- _623.send(_621);
- return _623.responseText;
- };
- function CScriptLoader_onReadyStateChange(){
- if(typeof this.readyState=="undefined"){
- this.readyState="complete";
- }
- if(this.readyState=="loaded"||this.readyState=="complete"){
- var path=this.sFilePath;
- if(!path&&this.getAttribute){
- path=this.getAttribute("href");
- }
- window.gScriptLoader.setFileState(path,"complete");
- window.gScriptLoader.m_bBlockScriptLoading=false;
- if(this.sFilePath&&window.gScriptLoader.m_bBlockPromptingLocaleScripts&&this.sFilePath.match(window.gScriptLoader.m_reIsPromptingLocaleJavascript)){
- window.gScriptLoader.m_bBlockPromptingLocaleScripts=false;
- if(window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.length>0){
- var _625=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
- window.gScriptLoader.loadObject(_625.sName,_625.sNamespaceId);
- }
- }
- if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
- window.gScriptLoader.loadObject();
- }
- }
- };
- CScriptLoader.prototype.moveLinks=function(node){
- if(!node){
- return;
- }
- var _627=node.getAttribute("href");
- if(!_627||this.m_oFiles[_627]){
- return;
- }
- this.m_oFiles[_627]="complete";
- document.getElementsByTagName("head").item(0).appendChild(node);
- };
- CScriptLoader.prototype.loadObject=function(_628,_629){
- var _62a=null;
- if(typeof _628==="undefined"){
- if(this.m_aScriptLoadQueue.length>0){
- var _62b=this.m_aScriptLoadQueue.shift();
- _628=_62b.name;
- _629=_62b.namespaceId;
- }else{
- return;
- }
- }
- if(this.m_oFiles[_628]){
- return;
- }
- if(this.m_bBlockScriptLoading){
- this.m_aScriptLoadQueue.push({"name":_628,"namespaceId":_629});
- }else{
- if(_628.match(this.m_reIsCss)){
- _62a=document.createElement("link");
- _62a.setAttribute("rel","stylesheet");
- _62a.setAttribute("type","text/css");
- _62a.setAttribute("href",_628);
- if(window.isIE&&window.isIE()){
- _62a.onreadystatechange=CScriptLoader_onReadyStateChange;
- _62a.onload=CScriptLoader_onReadyStateChange;
- _62a.onerror=CScriptLoader_onReadyStateChange;
- this.m_oFiles[_628]="new";
- }else{
- this.m_oFiles[_628]="complete";
- }
- }else{
- if(_628.match(this.m_reIsJavascript)){
- if(_628.match(this.m_reIsPromptingLocaleJavascript)){
- if(this.m_bBlockPromptingLocaleScripts){
- this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_628,"sNamespaceId":_629});
- return;
- }
- this.m_bBlockPromptingLocaleScripts=true;
- }
- this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
- _62a=document.createElement("script");
- _62a.setAttribute("language","javascript");
- _62a.setAttribute("type","text/javascript");
- _62a.setAttribute("src",_628);
- _62a.sFilePath=_628;
- _62a.onreadystatechange=CScriptLoader_onReadyStateChange;
- _62a.onload=CScriptLoader_onReadyStateChange;
- _62a.onerror=CScriptLoader_onReadyStateChange;
- this.addNamespaceAttribute(_62a,_629);
- this.m_oFiles[_628]="new";
- }
- }
- if(_62a){
- document.getElementsByTagName("head").item(0).appendChild(_62a);
- }
- }
- };
- CScriptLoader.prototype.loadScriptsFromDOM=function(_62c,_62d,_62e){
- if(!_62c){
- return;
- }
- var _62f=_62c.getElementsByTagName("script");
- while(_62f.length>0){
- var _630=_62f[0];
- if(_630.getAttribute("src")!=null&&_630.getAttribute("src").length>0){
- this.loadObject(_630.getAttribute("src"),_62d);
- }else{
- var _631=_630.innerHTML;
- var _632=false;
- if(_631.indexOf("document.write")!=-1){
- var _633=_631.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
- _632=(_633.indexOf("document.write")!=-1);
- }
- if(_632){
- if(_62e){
- var sId="CVScriptFromDOMPlaceHolder"+_62f.length+_62d;
- var _635=_630.ownerDocument.createElement("span");
- _635.setAttribute("id",sId);
- _630.parentNode.insertBefore(_635,_630);
- this.m_aDocumentWriters.push(new CDocumentWriter(sId,_631));
- }
- }else{
- if(_631.length>0){
- this.m_aScripts.push(_631);
- }
- }
- }
- _630.parentNode.removeChild(_630);
- }
- };
- CScriptLoader.prototype.loadStyles=function(_636,_637){
- if(!_636||!_636.parentNode){
- return;
- }
- var _638=_636.parentNode.getElementsByTagName("style");
- while(_638.length>0){
- var _639=_638[0];
- if(_637){
- this.addNamespaceAttribute(_639,_637);
- }
- if(window.isIE&&window.isIE()&&window.getNavVer()<10){
- if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
- if(this.m_bHandleStylesheetLimit){
- if(typeof window.gaRV_INSTANCES!="undefined"){
- for(var i=0;i<window.gaRV_INSTANCES.length;i++){
- window.gaRV_INSTANCES[i].cleanupStyles();
- }
- }
- }
- if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){
- if(typeof console!="undefined"&&console&&console.log){
- console.log("Stylesheet limit reached.");
- }
- this.m_ajaxWarnings.push("Stylesheet limit reached.");
- return;
- }
- }
- }
- document.getElementsByTagName("head").item(0).appendChild(_639);
- }
- };
- CScriptLoader.prototype.loadAll=function(_63b,_63c,_63d,_63e){
- this.m_bScriptLoaderCalled=true;
- this.m_bHasCompletedExecution=false;
- this.loadScriptsFromDOM(_63b,_63d,_63e);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.loadStyles(_63b,_63d);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.executeScripts(_63c,_63d);
- return true;
- };
- CScriptLoader.prototype.setFileState=function(_63f,_640){
- this.m_oFiles[_63f]=_640;
- };
- CScriptLoader.prototype.containsAjaxWarnings=function(){
- if(this.m_bIgnoreAjaxWarnings){
- return false;
- }else{
- return (this.m_ajaxWarnings.length>0);
- }
- };
- CScriptLoader.prototype.addNamespaceAttribute=function(_641,_642){
- if(typeof _642==="string"){
- _641.setAttribute("namespaceId",_642);
- }
- };
- if(typeof window.gScriptLoader=="undefined"){
- window.gScriptLoader=new CScriptLoader();
- }
- function ViewerA11YHelper(oCV){
- this.m_oCV=oCV;
- };
- ViewerA11YHelper.prototype.onFocus=function(evt){
- var _645=getCrossBrowserNode(evt);
- _645=ViewerA11YHelper.findChildOfTableCell(_645);
- this.updateCellAccessibility(_645,false);
- };
- ViewerA11YHelper.prototype.onKeyDown=function(evt){
- evt=(evt)?evt:((event)?event:null);
- var _647=getCrossBrowserNode(evt);
- if(ViewerA11YHelper.isTableCell(_647)){
- for(var i=0;i<_647.childNodes.length;i++){
- if(_647.childNodes[i].nodeName.toLowerCase()=="span"){
- _647=_647.childNodes[i];
- break;
- }
- }
- }
- if(!this.isValidNodeToSelect(_647)){
- return true;
- }
- _647=ViewerA11YHelper.findChildOfTableCell(_647);
- if(_647){
- if(evt.keyCode=="39"){
- if(this.m_oCV.getState()&&this.m_oCV.getState().getFindState()&&evt.ctrlKey&&evt.shiftKey){
- this.m_oCV.executeAction("FindNext");
- }else{
- this.moveRight(_647);
- }
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="37"){
- this.moveLeft(_647);
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="38"){
- this.moveUp(_647);
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="40"){
- this.moveDown(_647);
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="13"){
- if(this.m_oCV.isBux){
- if(this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
- this.m_oCV.getViewerWidget().preprocessPageClicked(false,evt);
- if(this.m_oCV.getSelectionController().pageClicked(evt)!==false){
- this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
- this.m_oCV.getViewerWidget().updateToolbar();
- }
- }else{
- this.m_oCV.getSelectionController().pageClicked(evt);
- var _649=this.m_oCV.getActionFactory().load("Selection");
- _649.onKeyDown(evt);
- }
- this.m_oCV.getViewerWidget().onSelectionChange();
- }else{
- this.m_oCV.de(evt);
- }
- }else{
- if(evt.keyCode=="32"){
- if(this.m_oCV.isBux){
- this.m_oCV.getViewerWidget().preprocessPageClicked(false);
- if(this.m_oCV.getSelectionController().pageClicked(evt)!==false&&this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){
- this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS);
- }
- this.m_oCV.getViewerWidget().updateToolbar();
- this.m_oCV.getViewerWidget().onSelectionChange();
- }else{
- this.m_oCV.getSelectionController().pageClicked(evt);
- }
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="46"&&this.m_oCV.isBux){
- if(typeof this.m_oCV.envParams!="undefined"&&typeof this.m_oCV.envParams["ui.action"]!="undefined"&&this.m_oCV.envParams["ui.action"]!="view"&&!this.m_oCV.isLimitedInteractiveMode()){
- var _64a=this.m_oCV.getActionFactory().load("Delete");
- if(!this.m_oCV.isBlacklisted("Delete")&&_64a.canDelete()){
- _64a.execute();
- return stopEventBubble(evt);
- }
- }
- }else{
- if(this.m_oCV.isBux&&evt.ctrlKey==true&&evt.shiftKey==true&&evt.keyCode=="49"){
- var lid=this.m_oCV.getSelectionController().getSelectionObjectFactory().getLayoutElementId(_647);
- if(lid!=""){
- lid=lid.split(this.m_oCV.getId())[0];
- var _64c=-1;
- var _64d=this.m_oCV.getRAPReportInfo();
- if(_64d){
- var _64e=_64d.getContainer(lid);
- if(typeof _64e.layoutIndex!="undefined"){
- _64c=_64e.layoutIndex;
- }
- }
- var _64f=document.getElementById("infoBarHeaderButton"+_64c+this.m_oCV.getId());
- if(_64f!==null){
- this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt));
- _64f.focus();
- }
- }
- return stopEventBubble(evt);
- }else{
- if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){
- var ocv=this.m_oCV;
- var _651=function(){
- if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){
- var _652=clientToScreenCoords(evt.target,document.body);
- evt.clientX=_652.leftCoord;
- evt.clientY=_652.topCoord;
- }
- ocv.dcm(evt,true);
- };
- if(isFF()){
- setTimeout(_651,0);
- }else{
- _651.call();
- }
- return stopEventBubble(evt);
- }else{
- if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){
- var _653=this.m_oCV.getViewerWidget();
- var _654=this.m_oCV.getSelectionController();
- _653.preprocessPageClicked(true);
- _654.pageClicked(evt);
- _653.updateToolbar();
- _653.onContextMenu(evt);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- };
- ViewerA11YHelper.prototype.isValidNodeToSelect=function(node){
- return this.getValidNodeToSelect(node)?true:false;
- };
- ViewerA11YHelper.prototype.getValidNodeToSelect=function(node){
- if(node&&node.style&&node.style.visibility!="hidden"&&node.style.display!="none"){
- var _657=node.nodeName.toLowerCase();
- if((_657=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_657=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_657=="div"&&node.getAttribute("chartcontainer")=="true")||(_657=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){
- return node;
- }
- if(ViewerA11YHelper.isSemanticNode(node)){
- var _658=node.childNodes&&node.childNodes.length?node.childNodes[0]:null;
- if(_658){
- return this.getValidNodeToSelect(_658);
- }
- }
- }
- return null;
- };
- ViewerA11YHelper.isSemanticNode=function(node){
- if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){
- ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"];
- }
- var _65a=node.nodeName.toLowerCase();
- for(var i=0;i<ViewerA11YHelper.isSemanticNode._semanticNodeNames.length;i++){
- if(_65a===ViewerA11YHelper.isSemanticNode._semanticNodeNames[i]){
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.isTableCell=function(node){
- var _65d=node.nodeName.toLowerCase();
- return _65d==="td"||_65d==="th";
- };
- ViewerA11YHelper.findChildOfTableCell=function(_65e){
- var _65f=_65e;
- while(_65f&&_65f.parentNode){
- if(ViewerA11YHelper.getTableCell(_65f)){
- break;
- }
- _65f=_65f.parentNode;
- }
- return _65f;
- };
- ViewerA11YHelper.getTableCell=function(node){
- var _661=node.parentNode;
- if(ViewerA11YHelper.isTableCell(_661)){
- return _661;
- }
- if(ViewerA11YHelper.isSemanticNode(_661)&&ViewerA11YHelper.isTableCell(_661.parentNode)){
- return _661.parentNode;
- }
- return null;
- };
- ViewerA11YHelper.prototype.moveRight=function(_662){
- var _663=this.getNextNonTextSibling(_662);
- _663=this.getValidNodeToSelect(_663);
- if(_663){
- this.setFocusToNode(_663);
- return true;
- }
- var _664=ViewerA11YHelper.getTableCell(_662);
- _664=this.getPfMainOutputCell(_664);
- while(_664.nextSibling){
- if(this.moveToTD(_664.nextSibling)){
- return true;
- }
- _664=_664.nextSibling;
- }
- var _665=_664.parentNode;
- while(_665.nextSibling){
- var _666=_665.nextSibling;
- if(this.moveToTD(_666.childNodes[0])){
- return true;
- }
- _665=_665.nextSibling;
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveLeft=function(_667){
- var _668=this.getPreviousNonTextSibling(_667);
- _668=this.getValidNodeToSelect(_668);
- if(_668){
- this.setFocusToNode(_668);
- return true;
- }
- var _669=ViewerA11YHelper.getTableCell(_667);
- _669=this.getPfMainOutputCell(_669);
- while(_669.previousSibling){
- if(this.moveToTDFromTheRight(_669.previousSibling)){
- return true;
- }
- _669=_669.previousSibling;
- }
- var _66a=_669.parentNode;
- while(_66a.previousSibling){
- var _66b=_66a.previousSibling;
- if(this.moveToTDFromTheRight(_66b.lastChild)){
- return true;
- }
- _66a=_66a.previousSibling;
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveDown=function(_66c){
- var _66d=ViewerA11YHelper.getTableCell(_66c);
- _66d=this.getPfMainOutputCell(_66d);
- var _66e=this.getColumnIndex(_66d);
- _66e+=this.getColSpanFromRowSpans(_66d);
- var _66f=_66d.parentNode;
- if(_66d.rowSpan&&_66d.rowSpan>1){
- var _670=_66d.rowSpan;
- for(var _671=1;_671<_670;_671++){
- _66f=_66f.nextSibling;
- }
- }
- var _672=false;
- while(_66f){
- if(_66f.nextSibling){
- _66f=_66f.nextSibling;
- }else{
- if(_66d.nextSibling&&!_672){
- _66f=_66f.parentNode.firstChild;
- _672=true;
- _66e++;
- }else{
- return false;
- }
- }
- if(this.doMoveUpDown(_66f,_66e)){
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveUp=function(_673){
- var _674=ViewerA11YHelper.getTableCell(_673);
- _674=this.getPfMainOutputCell(_674);
- var _675=_674.parentNode;
- var _676=this.getColumnIndex(_674);
- _676+=this.getColSpanFromRowSpans(_674);
- var _677=false;
- while(_675){
- if(_675.previousSibling){
- _675=_675.previousSibling;
- }else{
- if(_674.previousSibling&&!_677){
- _675=_675.parentNode.lastChild;
- _677=true;
- _676--;
- }else{
- return false;
- }
- }
- if(this.doMoveUpDown(_675,_676)){
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.prototype.getNextNonTextSibling=function(node){
- while(node.nextSibling){
- node=node.nextSibling;
- if(node.nodeName.toLowerCase()!="#text"){
- return node;
- }
- }
- if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
- return this.getNextNonTextSibling(node.parentNode);
- }
- return null;
- };
- ViewerA11YHelper.prototype.doMoveUpDown=function(_679,_67a){
- if(_679!=null){
- var _67b=_679.firstChild;
- var pos=this.getColSpanFromRowSpans(_67b);
- while(_67b){
- if(pos==_67a){
- return this.moveToTDFromTheRight(_67b);
- }else{
- if(pos>_67a){
- break;
- }
- }
- var _67d=0;
- if(_67b.colSpan){
- _67d=_67b.colSpan;
- }else{
- _67d++;
- }
- pos+=_67d;
- _67b=_67b.nextSibling;
- }
- }
- };
- ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){
- td=this.getPfVisibleCell(td);
- var _67f=td.childNodes;
- for(var _680=_67f.length-1;_680>=0;_680--){
- var node=this.getValidNodeToSelect(_67f[_680]);
- if(node){
- if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
- node=node.childNodes[0];
- }
- if(node.tabIndex!=-1&&node.tabIndex!=0){
- node.tabIndex=-1;
- }
- this.setFocusToNode(node);
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveToTD=function(td){
- td=this.getPfVisibleCell(td);
- var _683=td.childNodes;
- for(var _684=0;_684<_683.length;_684++){
- var node=this.getValidNodeToSelect(_683[_684]);
- if(node){
- if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){
- node=node.childNodes[0];
- }
- if(node.tabIndex!=-1&&node.tabIndex!=0){
- node.tabIndex=-1;
- }
- this.setFocusToNode(node);
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.prototype.setFocusToNode=function(node){
- this.m_oCV.setCurrentNodeFocus(node);
- this.updateCellAccessibility(node,false);
- node.focus();
- if(this.m_oCV.m_pinFreezeManager){
- var _687=this.m_oCV.m_pinFreezeManager.nodeToContainer(node);
- if(_687){
- _687.updateScroll(node);
- }
- }
- };
- ViewerA11YHelper.prototype.getPfMainOutputCell=function(_688){
- var main=null;
- var slid=_688.getAttribute("pfslid");
- if(slid){
- var lid=PinFreezeContainer.getLidFromSlid(slid);
- if(lid&&this.m_oCV.m_pinFreezeManager){
- lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
- var _68c=this.m_oCV.m_pinFreezeManager.getContainer(lid);
- if(_68c){
- main=_68c.getMain(_688);
- }
- }
- }
- return main?main:_688;
- };
- ViewerA11YHelper.prototype.getPreviousNonTextSibling=function(node){
- while(node.previousSibling){
- node=node.previousSibling;
- if(node.nodeName.toLowerCase()!="#text"){
- return node;
- }
- }
- if(ViewerA11YHelper.isSemanticNode(node.parentNode)){
- return this.getPreviousNonTextSibling(node.parentNode);
- }
- return null;
- };
- ViewerA11YHelper.prototype.getColumnIndex=function(node){
- var _68f=0;
- while(node.previousSibling){
- node=node.previousSibling;
- if(node.rowSpan==1){
- if(node.colSpan){
- _68f+=node.colSpan;
- }else{
- _68f++;
- }
- }
- }
- return _68f;
- };
- ViewerA11YHelper.prototype.getPfVisibleCell=function(_690){
- var copy=null;
- var slid=_690.getAttribute("pfslid");
- if(slid){
- var lid=PinFreezeContainer.getLidFromSlid(slid);
- if(lid&&this.m_oCV.m_pinFreezeManager){
- lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid);
- var _694=this.m_oCV.m_pinFreezeManager.getContainer(lid);
- if(_694){
- copy=_694.getCopy(_690);
- }
- }
- }
- return copy?copy:_690;
- };
- ViewerA11YHelper.prototype.updateCellAccessibility=function(_695,_696){
- if(!_695){
- return false;
- }
- var _697=false;
- var _698=false;
- var _699=false;
- var _69a=_695.getAttribute("ctx")!=null?_695:_695.parentNode;
- if(_695.getAttribute("flashChartContainer")!="true"){
- if(_69a.getAttribute("ctx")!=null){
- if(this.m_oCV.isBux){
- var _69b=this.m_oCV.getAction("DrillUpDown");
- _69b.updateDrillability(this.m_oCV,_69a);
- _697=_69b.canDrillDown();
- _698=_69b.canDrillUp();
- }else{
- var _69c=_69a.getAttribute("ctx");
- var _69d=_69c.indexOf(":")==-1?_69c:_69c.substring(0,_69c.indexOf(":"));
- var _69e=this.m_oCV.getSelectionController();
- _697=_69e.canDrillDown(_69d);
- _698=_69e.canDrillUp(_69d);
- }
- }
- _699=_695.parentNode.getAttribute("dtTargets")?true:false;
- }
- var _69f=_695.nodeName.toLowerCase()=="img";
- var _6a0=_695.parentNode.getAttribute("type")=="columnTitle";
- if(!_69f&&(_696||((_695.getAttribute("aria-labelledby")!=null||_6a0||this.m_oCV.isAccessibleMode())))){
- var _6a1="";
- if(_695.parentNode.getAttribute("cc")=="true"){
- _6a1+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER;
- }
- if(_695.innerHTML.length===0){
- _695.innerHTML=" ";
- _6a1+=" "+RV_RES.IDS_JS_EMPTY_CELL;
- }
- if(_697&&_698){
- _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS;
- }else{
- if(_697){
- _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS;
- }else{
- if(_698){
- _6a1+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS;
- }
- }
- }
- if(_699){
- _6a1+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS;
- }
- if(_695.altText&&_695.altText.length>0){
- _6a1=_695.altText;
- }else{
- if(_695.getAttribute("flashChartContainer")=="true"){
- _6a1=RV_RES.IDS_JS_CHART_IMAGE;
- }
- }
- if(this.m_oCV.isBux){
- var _6a2=_695.previousSibling;
- if(_6a2){
- var wid=_6a2.getAttribute("widgetid");
- if(wid&&wid.indexOf("comment")){
- _6a1+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS;
- }
- }
- if(_695.getAttribute("rp_name")||_695.parentNode.getAttribute("rp_name")){
- _6a1+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED;
- }
- if(_695.nextSibling&&_695.nextSibling.getAttribute("class")=="sortIconVisible"){
- _6a1+=" "+_695.nextSibling.getAttribute("alt");
- }
- }
- if(_6a1.length>0){
- this.addAriaLabelledByOnCell(_695,_6a1);
- }
- }
- if(_698||_697||_699){
- this.addDrillAccessibilityAttributes(_695,_699);
- }
- if(_695.attachEvent){
- _695.attachEvent("onblur",this.onBlur);
- }else{
- _695.addEventListener("blur",this.onBlur,false);
- }
- if((isIE()&&_695.getAttribute("tabIndex")!=0)||_69f){
- _695.setAttribute("modifiedTabIndex","true");
- _695.setAttribute("oldTabIndex",_695.getAttribute("tabIndex"));
- _695.setAttribute("tabIndex",0);
- }
- };
- ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_6a4,_6a5){
- var _6a6=0;
- var _6a7=_6a4;
- while(_6a7.previousSibling){
- _6a6++;
- _6a7=_6a7.previousSibling;
- }
- var _6a8=_6a4.getAttribute("ariaHiddenSpanId");
- if(_6a8&&document.getElementById(_6a8)){
- document.getElementById(_6a8).innerHTML=_6a5;
- }else{
- if(!_6a4.parentNode.id&&!_6a4.id){
- _6a4.parentNode.id=Math.random();
- }
- var _6a9=document.createElement("span");
- _6a9.style.visibility="hidden";
- _6a9.style.display="none";
- _6a9.id=(_6a4.id==""?_6a4.parentNode.id:_6a4.id)+"_"+_6a6;
- _6a9.innerHTML=_6a5;
- _6a4.parentNode.appendChild(_6a9);
- var _6aa="";
- if(_6a4.getAttribute("aria-labelledby")!=null){
- _6aa+=_6a4.getAttribute("aria-labelledby");
- }else{
- if(_6a4.id==""){
- _6a4.id=_6a4.parentNode.id+"_main_"+_6a6;
- }
- _6aa+=_6a4.id;
- }
- _6aa+=" "+_6a9.id;
- _6a4.setAttribute("aria-labelledby",_6aa);
- _6a4.setAttribute("ariaHiddenSpanId",_6a9.id);
- }
- };
- ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_6ab,_6ac){
- if(!_6ab.getAttribute("oldClassName")){
- if(!_6ac){
- _6ab.setAttribute("oldClassName",_6ab.className);
- _6ab.className="dl "+_6ab.className;
- }
- if(!_6ab.getAttribute("role")){
- _6ab.setAttribute("role","link");
- }
- }
- };
- ViewerA11YHelper.prototype.onBlur=function(evt){
- var _6ae=null;
- if(isIE()){
- _6ae=getNodeFromEvent(evt,true);
- }else{
- _6ae=this;
- }
- _6ae=ViewerA11YHelper.findChildOfTableCell(_6ae);
- if(_6ae){
- if(_6ae.getAttribute("oldClassName")){
- _6ae.className=_6ae.getAttribute("oldClassName");
- _6ae.removeAttribute("oldClassName");
- }
- if(_6ae.getAttribute("modifiedTabIndex")=="true"){
- _6ae.removeAttribute("modifiedTabIndex");
- _6ae.removeAttribute("tabIndex");
- if(_6ae.getAttribute("oldTabIndex")){
- _6ae.setAttribute("tabIndex",_6ae.getAttribute("oldTabIndex"));
- }
- _6ae.removeAttribute("oldTabIndex");
- }
- var _6af=_6ae.getAttribute("ariaHiddenSpanId");
- if(_6af){
- var _6b0=document.getElementById(_6af);
- if(_6b0){
- _6b0.innerHTML="";
- }
- }
- }
- };
- ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_6b1){
- var _6b2=0;
- var _6b3=_6b1.parentNode;
- var _6b4=0;
- while(_6b3){
- var _6b5=_6b3.firstChild;
- var _6b6=this.getColumnCount(_6b3)-_6b4;
- while(_6b5&&_6b5.rowSpan>1&&_6b6>0&&_6b5!=_6b1){
- _6b2+=_6b5.colSpan;
- _6b5=_6b5.nextSibling;
- _6b6--;
- }
- if(_6b3.childNodes.length>_6b4){
- _6b4=this.getColumnCount(_6b3);
- }
- _6b3=_6b3.previousSibling;
- }
- return _6b2;
- };
- ViewerA11YHelper.prototype.getColumnCount=function(_6b7){
- var _6b8=0;
- var node=_6b7.firstChild;
- while(node){
- _6b8+=node.colSpan;
- node=node.nextSibling;
- }
- return _6b8;
- };
- ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){
- if(!this.m_oCV.isAccessibleMode()){
- return;
- }
- var _6ba=document.getElementById("RVContent"+this.m_oCV.getId());
- if(!_6ba){
- return;
- }
- var _6bb=getElementsByAttribute(_6ba,"span","tabindex","0");
- if(!_6bb){
- return;
- }
- for(var i=0;i<_6bb.length;i++){
- var span=_6bb[i];
- this.updateCellAccessibility(span,false);
- }
- };
- var CV_BACKGROUND_LAYER_ID="CV_BACK";
- if(typeof window.gaRV_INSTANCES=="undefined"){
- window.gaRV_INSTANCES=[];
- }
- if(!window.gViewerLogger){
- window.gViewerLogger={log:function(hint,_6bf,type){
- },addContextInfo:function(_6c1){
- }};
- }
- function CognosViewerSession(oCV){
- this.m_sConversation=oCV.getConversation();
- this.m_sParameters=oCV.getExecutionParameters();
- this.m_envParams={};
- applyJSONProperties(this.m_envParams,oCV.envParams);
- this.m_bRefreshPage=false;
- };
- function CCognosViewer(sId,_6c4){
- if(typeof window.gCognosViewer=="undefined"){
- window.gCognosViewer=this;
- }
- if(typeof ViewerConfig=="function"){
- this.m_viewerConfig=new ViewerConfig();
- try{
- if(typeof window.getViewerConfiguration=="function"){
- this.m_viewerConfig.configure(window.getViewerConfiguration());
- }else{
- if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){
- this.m_viewerConfig.configure(window.parent.getViewerConfiguration());
- }
- }
- }
- catch(e){
- }
- this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig();
- }
- this.m_sActionState="";
- this.m_bKeepSessionAlive=false;
- this.m_undoStack=[];
- this.m_aSecRequests=[];
- this.m_bDebug=false;
- this.m_sCAFContext="";
- this.m_sContextInfoXML="";
- this.m_sConversation="";
- this.m_sStatus="";
- this.m_sGateway=_6c4;
- this.m_sId=sId;
- this.m_sMetadataInfoXML="";
- this.m_sParameters="";
- this.m_sReportState="";
- this.envParams={};
- this.m_sTracking="";
- this.m_sSoapFault="";
- this.m_sWaitHTML="";
- this.m_oDrillMgr=null;
- this.goDrillManager=null;
- this.m_oWorkingDialog=null;
- this.m_oRequestExecutedIndicator=null;
- this.m_bUseWorkingDialog=true;
- this.m_oSubscriptionManager=null;
- this.m_oCVMgr=null;
- this.m_bUseSafeMode=true;
- if(typeof CViewerManager=="function"){
- this.m_oCVMgr=new CViewerManager(this);
- }
- if(window.gaRV_INSTANCES){
- var _6c5=false;
- for(var _6c6=0;_6c6<window.gaRV_INSTANCES.length;_6c6++){
- if(window.gaRV_INSTANCES[_6c6].m_sId==sId){
- window.gaRV_INSTANCES[_6c6]=this;
- _6c5=true;
- break;
- }
- }
- if(!_6c5){
- window.gaRV_INSTANCES=window.gaRV_INSTANCES.concat(this);
- }
- }
- this.m_bReportHasPrompts=false;
- this.m_viewerWidget=null;
- this.m_flashChartsObjectIds=[];
- this.m_raiseSharePromptEvent=true;
- this.m_actionFactory=null;
- this.m_calculationCache={};
- this.m_drillTargets=[];
- this.m_reportRenderingDone=false;
- if(typeof PinFreezeManager!=="undefined"){
- this.m_pinFreezeManager=new PinFreezeManager(this);
- }
- if(typeof ViewerDispatcher!=="undefined"){
- this.m_viewerDispatcher=new ViewerDispatcher();
- }
- this.m_retryDispatcherEntry=null;
- this.m_RAPReportInfo=null;
- if(typeof ViewerState=="function"){
- this.m_viewerState=new ViewerState();
- }
- this.m_aInfoBar=null;
- };
- CCognosViewer.prototype.setScheduledMobileOutput=function(_6c7){
- this.m_mobileScheduledOutput=_6c7;
- if(_6c7){
- this.m_sStatus="complete";
- }
- };
- CCognosViewer.prototype.setTabInfo=function(_6c8){
- this.m_tabsPayload=_6c8;
- if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
- var _6c9=false;
- for(var i=0;i<this.m_tabsPayload.tabs.length;i++){
- var tab=this.m_tabsPayload.tabs[i];
- if(tab.id==this._keepTabSelected){
- this.m_tabsPayload.currentTabId=this._keepTabSelected;
- break;
- }
- }
- this._keepTabSelected=null;
- }
- };
- CCognosViewer.prototype.setKeepTabSelected=function(_6cc){
- this._keepTabSelected=_6cc;
- };
- CCognosViewer.prototype.getTabController=function(){
- return this.m_tabControl;
- };
- CCognosViewer.prototype.getCurrentlySelectedTab=function(){
- return this.m_currentlySelectedTab?this.m_currentlySelectedTab:null;
- };
- CCognosViewer.prototype.deleteTabs=function(){
- if(this.m_tabControl){
- this.m_tabControl.destroy();
- delete this.m_tabControl;
- this.m_tabControl=null;
- }
- this.m_tabsPayload=null;
- };
- CCognosViewer.prototype.renderTabs=function(){
- if(!this.m_tabsPayload){
- return;
- }
- var _6cd=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
- var _6ce=document.getElementById("CVNavLinks"+this.getId());
- if(_6ce||!this.shouldWriteNavLinks()||_6cd){
- var _6cf=this.getReportDiv();
- this.m_bHasTabs=true;
- if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_6cd){
- this.deleteTabs();
- }
- if(!this.m_tabControl){
- if(this.getStatus()!="complete"&&!_6cd){
- return;
- }
- var tr=document.createElement("tr");
- var _6d1=document.createElement("td");
- tr.appendChild(_6d1);
- var _6d2=document.getElementById("mainViewerTR"+this.getId());
- if(!_6d2){
- return;
- }
- if(this.m_tabsPayload.position=="topLeft"){
- _6d2.parentNode.insertBefore(tr,_6d2);
- }else{
- _6d2.parentNode.appendChild(tr);
- }
- var _6d3=null;
- if(this.m_viewerWidget){
- _6d3=this.m_viewerWidget.findContainerDiv().firstChild;
- }else{
- _6d3=_6d1;
- }
- var oCV=this;
- if(_6cd){
- this.m_tabControl=new CognosTabControl(_6d3,function(_6d5){
- oCV.switchSavedOutputTab(_6d5,true);
- });
- this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
- }else{
- this.m_tabControl=new CognosTabControl(_6d3,function(_6d6){
- oCV.switchTabs(_6d6);
- });
- }
- if(this.m_viewerWidget){
- this.m_tabControl.setSpaceSaverContainer(_6d1);
- this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
- this.m_tabControl.useAbsolutePosition(true);
- }
- this.m_tabControl.setIsSavedOutput(_6cd);
- if(!window.gScriptLoader.m_bScriptLoaderCalled){
- var _6d7=document.getElementById("RVContent"+this.getId());
- var _6d8=this._getNodesWithViewerId(_6d7,"link",null);
- for(var i=0;i<_6d8.length;i++){
- window.gScriptLoader.moveLinks(_6d8[i]);
- }
- window.gScriptLoader.loadStyles(_6d7,this.getId());
- this.repaintDiv(_6d7);
- }
- }
- if(this.getStatus()=="prompting"){
- this.previouslySelectedTab=null;
- this.m_tabControl.hide();
- }else{
- if(this.isHighContrast()){
- this.m_tabControl.setHighContrast(true);
- }
- this.m_tabControl.render(this.m_tabsPayload);
- this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
- if(this.m_switchingToTabId&&this.m_currentlySelectedTab!=this.m_switchingToTabId){
- this._removeTabContent(_6cf.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_6cf.parentNode,this.m_currentlySelectedTab);
- if(_6ce){
- this._removeTabContent(_6ce.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_6ce.parentNode,this.m_currentlySelectedTab);
- }
- this.m_tabInfo={};
- }
- this.m_switchingToTabId=null;
- _6cf.setAttribute("tabId",this.m_currentlySelectedTab);
- if(_6ce){
- _6ce.setAttribute("tabId",this.m_currentlySelectedTab);
- }
- if(isIE()&&_6cd&&window.resizeIFrame&&!this.m_viewerFragment&&!this.m_viewerWidget){
- window.resizeIFrame();
- }
- }
- this.setMaxContentSize();
- }else{
- var obj=this;
- setTimeout(function(){
- obj.renderTabs();
- },100);
- }
- };
- CCognosViewer.prototype.cancelTabSwitch=function(){
- var _6db=this.getReportDiv();
- var _6dc=this.m_switchingToTabId;
- this.m_currentlySelectedTab=_6dc;
- this.m_tabControl.selectTab(this.previouslySelectedTab,false);
- this.switchTabs(this.previouslySelectedTab);
- if(_6db){
- _6db.parentNode.removeChild(_6db);
- }
- if(this.m_tabInfo[this.m_currentlySelectedTab]&&this.m_tabInfo[this.m_currentlySelectedTab].styles){
- this._addTabStylesToHead(this.m_tabInfo[this.m_currentlySelectedTab].styles);
- }
- this.previouslySelectedTab=null;
- this.m_tabInfo[_6dc]=null;
- };
- CCognosViewer.prototype.switchSavedOutputTab=function(_6dd,_6de){
- var _6df=this.getSelectionController();
- if(_6df){
- _6df.clearSelectedObjects();
- }
- this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
- if(_6de){
- this.notifyTabChange(_6dd);
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_6dd,_6de);
- this.getTabController().resetPosition();
- }else{
- if(!this.savedOutputTabNodes){
- var _6e0=document.getElementById("CVIFrame"+this.getId());
- this.savedOutputTabNodes=getElementsByAttribute(_6e0.contentWindow.document.body,"*","tabid");
- }
- if(!this.savedOutputTabNodes){
- return;
- }
- for(var i=0;i<this.savedOutputTabNodes.length;i++){
- var _6e2=this.savedOutputTabNodes[i];
- _6e2.style.display=_6e2.getAttribute("tabid")==_6dd?"":"none";
- }
- this.setMaxContentSize();
- }
- };
- CCognosViewer.prototype.notifyTabChange=function(_6e3){
- };
- CCognosViewer.prototype._getNodesWithViewerId=function(_6e4,_6e5,id){
- var _6e7=[];
- var _6e8=_6e4.getElementsByTagName(_6e5);
- for(var i=0;i<_6e8.length;i++){
- var node=_6e8[i];
- if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
- node.parentNode.removeChild(node);
- _6e7.push(node);
- i--;
- }
- }
- return _6e7;
- };
- CCognosViewer.prototype._removeTabStylesFromHead=function(){
- var id=this.getId();
- return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
- };
- CCognosViewer.prototype._addTabStylesToHead=function(_6ec){
- if(!_6ec){
- return;
- }
- for(var i=0;i<_6ec.length;i++){
- document.getElementsByTagName("head").item(0).appendChild(_6ec[i]);
- }
- };
- CCognosViewer.prototype.switchTabs=function(_6ee){
- if(this.m_currentlySelectedTab==_6ee){
- return;
- }
- var _6ef=this.getSelectionController();
- if(_6ef){
- _6ef.clearSelectedObjects();
- }
- var _6f0=this.getReportDiv();
- this.m_nReportDiv=null;
- var _6f1=_6f0.clientHeight;
- _6f0.removeAttribute("id");
- _6f0.style.display="none";
- if(!this.m_tabInfo){
- this.m_tabInfo={};
- }
- var _6f2=this._removeTabStylesFromHead();
- var _6f3=this.getSelectionController().getCCDManager();
- this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_6f3.getClonedMetadataArray(),"contextdata":_6f3.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_6f2,"hasPromptControl":this.getHasPrompts()};
- var _6f4=this._findChildWithTabId(_6f0.parentNode,_6ee);
- this.previouslySelectedTab=this.m_currentlySelectedTab;
- if(_6f4&&this.m_tabInfo[_6ee]&&this.m_tabInfo[_6ee].hasPromptControl){
- if(_6f4){
- _6f4.parentNode.removeChild(_6f4);
- _6f4=null;
- }
- delete this.m_tabInfo[_6ee];
- this.m_tabInfo[_6ee]=null;
- }
- if(_6f4){
- this.m_currentlySelectedTab=_6ee;
- _6f4.style.display="block";
- _6f4.setAttribute("id","CVReport"+this.getId());
- if(this.m_tabInfo&&this.m_tabInfo[_6ee]){
- var _6f5=this.m_tabInfo[_6ee];
- if(_6f5.conversation){
- this.setConversation(_6f5.conversation);
- }
- if(_6f5.metadata){
- _6f3.SetMetadata(_6f5.metadata);
- }
- if(_6f5.contextdata){
- _6f3.SetContextData(_6f5.contextdata);
- }
- if(_6f5.secondaryRequests){
- this.setSecondaryRequests(_6f5.secondaryRequests);
- }
- if(_6f5.styles){
- this._addTabStylesToHead(_6f5.styles);
- }
- this.setHasPrompts(_6f5.hasPromptControl);
- }
- if(this.shouldWriteNavLinks()){
- this.writeNavLinks(this.getSecondaryRequests().join(" "));
- }
- if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
- this.getPinFreezeManager().rePaint();
- if(isIE()){
- var _6f6=document.getElementById("RVContent"+this.getId());
- this.repaintDiv(_6f6);
- }
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this._keepFocus=null;
- this.doneLoadingUpdateA11Y("complete");
- this.getTabController().resetPosition();
- this.setMaxContentSize();
- }else{
- this.m_switchingToTabId=_6ee;
- var _6f7=_6f0.cloneNode(false);
- _6f7.style.display="block";
- _6f7.setAttribute("id","CVReport"+this.getId());
- _6f7.removeAttribute("tabId");
- _6f0.parentNode.appendChild(_6f7);
- _6f7.innerHTML="<table height='"+_6f1+"px'><tr><td height='100%'></td></tr></table>";
- var _6f8=new ViewerDispatcherEntry(this);
- _6f8.addFormField("ui.action","reportAction");
- _6f8.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_6ee);
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this.dispatchRequest(_6f8);
- }
- };
- CCognosViewer.prototype._removeTabContent=function(_6f9,_6fa){
- var _6fb=this._findChildWithTabId(_6f9,_6fa);
- while(_6fb){
- _6fb.parentNode.removeChild(_6fb);
- _6fb=this._findChildWithTabId(_6f9,_6fa);
- }
- };
- CCognosViewer.prototype._findChildWithTabId=function(_6fc,_6fd){
- var _6fe=null;
- for(var i=0;i<_6fc.childNodes.length;i++){
- var _700=_6fc.childNodes[i];
- if(_700.getAttribute("tabId")==_6fd){
- _6fe=_700;
- break;
- }
- }
- return _6fe;
- };
- CCognosViewer.prototype.clearTabs=function(){
- if(!this.m_bHasTabs){
- return;
- }
- this.m_tabInfo={};
- var _701=this.getReportDiv();
- var _702=_701.parentNode;
- for(var i=0;i<_702.childNodes.length;i++){
- var node=_702.childNodes[i];
- if(node.getAttribute("id")!="CVReport"+this.m_sId){
- _702.removeChild(node);
- i--;
- }
- }
- };
- CCognosViewer.prototype.isSavedOutput=function(){
- var _705=this.envParams["ui.action"];
- return _705==="view"||_705==="buxView";
- };
- CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_707,_708){
- var _709=document.getElementById("CVReport"+this.getId());
- var _70a=document.createElement("iframe");
- _70a.style.width="100%";
- _70a.style.height="99%";
- _70a.id="CVIFrame"+this.getId();
- _70a.title=_707;
- _70a.setAttribute("frameBorder","0");
- _709.appendChild(_70a);
- var obj=this;
- var func=function(){
- obj.renderTabs();
- };
- setTimeout(function(){
- if(_708){
- if(_70a.attachEvent){
- _70a.attachEvent("onload",func);
- }else{
- _70a.addEventListener("load",func,true);
- }
- }
- _70a.src=url;
- },1);
- };
- CCognosViewer.prototype.updatePageState=function(_70d){
- if(_70d&&this.getState()){
- this.getState().setPageState(_70d);
- }
- };
- CCognosViewer.prototype.getPageInfo=function(){
- if(this.m_viewerState&&this.m_viewerState.getPageState()){
- var _70e=this.m_viewerState.getPageState();
- return {"currentPage":_70e.getCurrentPage(),"pageCount":_70e.getPageCount()};
- }
- return {};
- };
- CCognosViewer.prototype.isIWidgetMobile=function(){
- return this.m_viewerWidget&&this.m_viewerWidget.isMobile();
- };
- CCognosViewer.prototype.isInteractiveViewer=function(){
- return false;
- };
- CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){
- if(this.isIWidgetMobile()){
- this.m_viewerWidget.launchGotoPageForIWidgetMobile(form);
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){
- if(this.isIWidgetMobile()){
- this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form);
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.getState=function(){
- return this.m_viewerState;
- };
- CCognosViewer.prototype.getConfig=function(){
- return this.m_viewerConfig;
- };
- CCognosViewer.prototype.getUIConfig=function(){
- return this.m_viewerUIConfig;
- };
- CCognosViewer.prototype.setCurrentNodeFocus=function(node){
- this.m_currentNodeFocus=node;
- };
- CCognosViewer.prototype.getCurrentNodeFocus=function(node){
- return this.m_currentNodeFocus;
- };
- CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){
- this.m_CurrentPromptControlFocus=node;
- };
- CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){
- return this.m_CurrentPromptControlFocus;
- };
- CCognosViewer.prototype.loadExtra=function(){
- };
- CCognosViewer.prototype.setRetryDispatcherEntry=function(_715){
- this.m_retryDispatcherEntry=_715;
- };
- CCognosViewer.prototype.getRetryDispatcherEntry=function(){
- return this.m_retryDispatcherEntry;
- };
- CCognosViewer.prototype.resetViewerDispatcher=function(){
- if(this.m_viewerDispatcher!==null){
- delete this.m_viewerDispatcher;
- this.m_viewerDispatcher=new ViewerDispatcher();
- }
- };
- CCognosViewer.prototype.getViewerDispatcher=function(){
- return this.m_viewerDispatcher;
- };
- CCognosViewer.prototype.setFaultDispatcherEntry=function(_716){
- this.m_faultDispatcherEntry=_716;
- };
- CCognosViewer.prototype.getFaultDispatcherEntry=function(){
- return this.m_faultDispatcherEntry;
- };
- CCognosViewer.prototype.dispatchRequest=function(_717){
- this.setFaultDispatcherEntry(null);
- this.getViewerDispatcher().dispatchRequest(_717);
- };
- CCognosViewer.prototype.getActiveRequest=function(){
- return this.getViewerDispatcher().getActiveRequest();
- };
- CCognosViewer.prototype.getProductLocale=function(){
- if(this.sProductLocale){
- return this.sProductLocale;
- }
- return "en";
- };
- CCognosViewer.prototype.getDirection=function(){
- if(this.sDirection){
- return this.sDirection;
- }
- return "ltr";
- };
- CCognosViewer.prototype.isBidiEnabled=function(){
- if(this.bIsBidiEnabled){
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.getBaseTextDirection=function(){
- if(this.isBidiEnabled()){
- if(this.sBaseTextDirection){
- return this.sBaseTextDirection;
- }
- }
- return "";
- };
- CCognosViewer.prototype.getActionFactory=function(){
- if(!this.m_actionFactory){
- this.m_actionFactory=new ActionFactory(this);
- }
- return this.m_actionFactory;
- };
- CCognosViewer.prototype.getAction=function(_718){
- var _718=this.getActionFactory().load(_718);
- _718.setCognosViewer(this);
- return _718;
- };
- CCognosViewer.prototype.getCalculationCache=function(){
- return this.m_calculationCache;
- };
- CCognosViewer.prototype.updateOutputForA11ySupport=function(){
- this.updateBorderCollapse();
- if(this.getA11YHelper()){
- this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
- }
- var _719=navigator.userAgent.toLowerCase();
- var _71a=_719.indexOf("iphone")!=-1;
- var _71b=_719.indexOf("ipod")!=-1;
- var _71c=_719.indexOf("ipad")!=-1;
- var _71d=_71a||_71b||_71c;
- var _71e=_719.indexOf("android")!=-1;
- if(_71d||_71e){
- document.body.classList.add("clsViewerMobile");
- }
- };
- CCognosViewer.prototype.checkForHighContrast=function(){
- if(this.isBux){
- this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false;
- }else{
- var _71f=document.createElement("div");
- _71f.id=this.m_sId+"hc";
- _71f.style.border="1px solid";
- _71f.style.borderColor="red green";
- _71f.style.height="10px";
- _71f.style.top="-999px";
- _71f.style.position="absolute";
- document.body.appendChild(_71f);
- var _720=null;
- if(isIE()){
- _720=_71f.currentStyle;
- }else{
- _720=_71f.ownerDocument.defaultView.getComputedStyle(_71f,null);
- }
- if(!_720){
- return;
- }
- this.m_bHighContrast=_720.borderTopColor==_720.borderRightColor;
- document.body.removeChild(_71f);
- }
- };
- CCognosViewer.prototype.isHighContrast=function(){
- if(typeof this.m_bHighContrast==="undefined"){
- this.checkForHighContrast();
- }
- return this.m_bHighContrast;
- };
- CCognosViewer.prototype.isLimitedInteractiveMode=function(){
- return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true";
- };
- CCognosViewer.prototype.updateBorderCollapse=function(){
- if(this.isHighContrast()==true){
- var _721=null;
- if(this.envParams["ui.action"]=="view"&&!this.isBux){
- var _722=document.getElementById("CVIFrame"+this.getId());
- _721=_722.contentWindow.document;
- }else{
- _721=document.getElementById("CVReport"+this.getId());
- }
- var _723=_721.getElementsByTagName("table");
- for(var i=0;i<_723.length;i++){
- if(_723[i].style.borderCollapse=="collapse"){
- _723[i].style.borderCollapse="separate";
- }
- }
- }
- };
- CCognosViewer.prototype.isAccessibleMode=function(){
- if(this.m_bAccessibleMode==true){
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.isSinglePageReport=function(){
- for(var _725 in this.m_aSecRequests){
- if(this.m_aSecRequests[_725]=="nextPage"||this.m_aSecRequests[_725]=="previousPage"){
- return false;
- }
- }
- return true;
- };
- CCognosViewer.prototype.hasNextPage=function(){
- for(var _726 in this.m_aSecRequests){
- if(this.m_aSecRequests[_726]=="nextPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.hasPrevPage=function(){
- for(var _727 in this.m_aSecRequests){
- if(this.m_aSecRequests[_727]=="previousPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
- evt=(evt)?evt:((event)?event:null);
- if(evt){
- var node=getNodeFromEvent(evt);
- var _72a=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
- if((evt.keyCode==8&&_72a!="input"&&_72a!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){
- evt.returnValue=false;
- evt.cancelBubble=true;
- if(typeof evt.stopPropagation!="undefined"){
- evt.stopPropagation();
- }
- if(typeof evt.preventDefault!="undefined"){
- evt.preventDefault();
- }
- return false;
- }
- }
- return true;
- };
- CCognosViewer.prototype.setUseWorkingDialog=function(_72b){
- this.m_bUseWorkingDialog=_72b;
- };
- CCognosViewer.prototype.getWorkingDialog=function(){
- if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){
- if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){
- this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog();
- }else{
- this.m_oWorkingDialog=new WorkingDialog(this);
- }
- }
- return this.m_oWorkingDialog;
- };
- CCognosViewer.prototype.getRequestIndicator=function(){
- if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){
- if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){
- this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator();
- }else{
- this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this);
- }
- }
- return this.m_oRequestExecutedIndicator;
- };
- CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){
- if(document.attachEvent){
- document.attachEvent("onkeydown",this.captureHotkeyPageNavigation);
- }else{
- if(document.addEventListener){
- document.addEventListener("keydown",this.captureHotkeyPageNavigation,false);
- }
- }
- };
- CCognosViewer.prototype.setHasPrompts=function(_72c){
- if(!_72c){
- this.preProcessControlArray=[];
- }
- this.m_bReportHasPrompts=_72c;
- };
- CCognosViewer.prototype.getHasPrompts=function(){
- return this.m_bReportHasPrompts;
- };
- CCognosViewer.prototype.setUsePageRequest=function(_72d){
- this.m_viewerDispatcher.setUsePageRequest(_72d);
- };
- CCognosViewer.prototype.getUsePageRequest=function(){
- return this.m_viewerDispatcher.getUsePageRequest();
- };
- CCognosViewer.prototype.setKeepSessionAlive=function(_72e){
- this.m_bKeepSessionAlive=_72e;
- };
- CCognosViewer.prototype.getKeepSessionAlive=function(){
- return this.m_bKeepSessionAlive;
- };
- CCognosViewer.prototype.getWebContentRoot=function(){
- if(typeof this.sWebContentRoot!="undefined"){
- return this.sWebContentRoot;
- }else{
- return "..";
- }
- };
- CCognosViewer.prototype.getSkin=function(){
- if(typeof this.sSkin!="undefined"){
- return this.sSkin;
- }else{
- return this.getWebContentRoot()+"/skins/corporate";
- }
- };
- CCognosViewer.prototype.getSelectionController=function(){
- var _72f;
- try{
- _72f=getCognosViewerSCObjectRef(this.m_sId);
- }
- catch(e){
- _72f=null;
- }
- return _72f;
- };
- CCognosViewer.prototype.addCallback=function(_730,oFct,_732){
- if(!this.m_aCallback){
- this.m_aCallback=[];
- }
- this.m_aCallback=this.m_aCallback.concat({m_sEvent:_730,m_oCallback:oFct,m_bCaptureEvent:(_732===true)});
- };
- CCognosViewer.prototype.canDrillDown=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _735=this.getSelectionController();
- if(_735){
- return (_735.canDrillDown(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canDrillUp=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _738=this.getSelectionController();
- if(_738){
- return (_738.canDrillUp(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canSubmitPrompt=function(){
- var _739=null;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- var _73a=this.preProcessControlArray.length;
- for(var k=0;k<_73a;k++){
- _739=eval(this.preProcessControlArray[k]);
- if(_739.isValid()===false){
- if(!this.m_reportRenderingDone||!_739.getCascadeOnParameter||!_739.getCascadeOnParameter()){
- return false;
- }
- }
- }
- }
- return true;
- };
- CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
- if(this.rvMainWnd){
- this.rvMainWnd.closeContextMenuAndToolbarMenus();
- }
- };
- CCognosViewer.prototype.dcm=function(_73c,_73d){
- if(this.canDisplayContextMenu()){
- if(this.preSelectNode==true){
- _73d=false;
- this.preSelectNode=false;
- }
- if(this.rvMainWnd.displayContextMenu(_73c,_73d)!=false){
- return stopEventBubble(_73c);
- }
- }
- };
- CCognosViewer.prototype.canDisplayContextMenu=function(){
- if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){
- return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu);
- }
- return false;
- };
- CCognosViewer.prototype.de=function(_73e){
- var _73f=this.getDrillMgr();
- if(_73f){
- _73f.singleClickDrillEvent(_73e,"RV");
- }
- };
- CCognosViewer.prototype.debug=function(sMsg){
- if(this.m_bDebug){
- var _741="";
- var _742=this.debug.caller;
- if(typeof _742=="object"&&_742!==null){
- _741=_742.toString().match(/function (\w*)/)[1];
- }
- if(!_741){
- _741="?";
- }
- alert(_741+": "+sMsg);
- }
- };
- CCognosViewer.prototype.callbackExists=function(_743){
- var _744=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _745=0;_745<this.m_aCallback.length;++_745){
- var oCB=this.m_aCallback[_745];
- if(oCB.m_sEvent==_743){
- return true;
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.executeCallback=function(_747){
- var _748=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _749=0;_749<this.m_aCallback.length;++_749){
- var oCB=this.m_aCallback[_749];
- if(oCB.m_sEvent==_747){
- if(typeof oCB.m_oCallback=="function"){
- oCB.m_oCallback();
- }
- if(oCB.m_bCaptureEvent){
- _748=true;
- }
- }
- }
- }
- return _748;
- };
- CCognosViewer.prototype.getCAFContext=function(){
- return this.m_sCAFContext;
- };
- CCognosViewer.prototype.getSoapFault=function(){
- return this.m_sSoapFault;
- };
- CCognosViewer.prototype.getColumnContextIds=function(sId){
- return this.getContextIds(sId,2);
- };
- CCognosViewer.prototype.getConversation=function(){
- return this.m_sConversation;
- };
- CCognosViewer.prototype.getStatus=function(){
- return (this.m_sStatus?this.m_sStatus:"");
- };
- CCognosViewer.prototype.isWorking=function(_74c){
- if(typeof _74c!="string"){
- _74c=this.getStatus();
- }
- return ((""+_74c).match(/^(working|stillWorking)$/)?true:false);
- };
- CCognosViewer.prototype.isWorkingOrPrompting=function(){
- return (this.getStatus().match(/^(working|stillWorking|prompting)$/)?true:false);
- };
- CCognosViewer.prototype.getActionState=function(){
- return this.m_sActionState;
- };
- CCognosViewer.prototype.getDataItemName=function(sId){
- var _74e=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _750=this.getSelectionController();
- if(_750){
- var _751=_750.getRefDataItem(sCtx);
- if(_751){
- _74e=_751;
- }
- }
- }
- return _74e;
- };
- CCognosViewer.prototype.getDataType=function(sId){
- var _753=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _755=this.getSelectionController();
- if(_755){
- var _756=_755.getDataType(sCtx);
- if(_756){
- _753=_756;
- }
- }
- }
- return _753;
- };
- CCognosViewer.prototype.getDepth=function(sId){
- var _758=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _75a=this.getSelectionController();
- if(_75a){
- var _75b=_75a.getDepth(sCtx);
- if(_75b){
- _758=_75b;
- }
- }
- }
- return _758;
- };
- CCognosViewer.prototype.getDrillMgr=function(){
- if(!this.m_oDrillMgr){
- this.loadExtra();
- if(typeof CDrillManager=="function"){
- this.m_oDrillMgr=new CDrillManager(this);
- this.goDrillManager=this.m_oDrillMgr;
- }
- }
- return this.m_oDrillMgr;
- };
- CCognosViewer.prototype.getSubscriptionManager=function(){
- if(!this.m_oSubscriptionManager){
- this.loadExtra();
- if(typeof CSubscriptionManager=="function"){
- this.m_oSubscriptionManager=new CSubscriptionManager(this);
- }
- }
- return this.m_oSubscriptionManager;
- };
- CCognosViewer.prototype.updateGlobalParameters=function(_75c){
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action","forward");
- oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_75c);
- oReq.addFormField("run.prompt",true);
- oReq.addFormField("_promptControl","reprompt");
- this.submitPromptValues(oReq);
- };
- CCognosViewer.prototype.getExecutionParameters=function(){
- return this.m_sParameters;
- };
- CCognosViewer.prototype.getGateway=function(){
- return this.m_sGateway;
- };
- CCognosViewer.prototype.getSpecification=function(){
- return this.envParams["ui.spec"];
- };
- CCognosViewer.prototype.getHierarchyUniqueName=function(sId){
- var sHun=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _761=this.getSelectionController();
- if(_761){
- var aHUN=_761.getHun(sCtx);
- if(aHUN){
- sHun=aHUN;
- }
- }
- }
- return sHun;
- };
- CCognosViewer.prototype.getDimensionUniqueName=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _765=this.getSelectionController();
- if(_765){
- var aDUN=_765.getDun(sCtx);
- if(aDUN){
- return aDUN;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getId=function(){
- return this.m_sId;
- };
- CCognosViewer.prototype.getLevelId=function(sId){
- var _768=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _76a=this.getSelectionController();
- if(_76a){
- var aLUN=_76a.getLun(sCtx);
- if(aLUN){
- _768=aLUN;
- }
- }
- }
- return _768;
- };
- CCognosViewer.prototype.getMemberUniqueName=function(sId){
- var sMUN=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _76f=this.getSelectionController();
- if(_76f){
- var aMUN=_76f.getMun(sCtx);
- if(aMUN){
- sMUN=aMUN;
- }
- }
- }
- return sMUN;
- };
- CCognosViewer.prototype.getObjectId=function(){
- var _771="window";
- if(typeof this.getId()=="string"){
- _771=getCognosViewerObjectRefAsString(this.getId());
- }
- return _771;
- };
- CCognosViewer.prototype.getQueryModelId=function(sId){
- var _773=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _775=this.getSelectionController();
- if(_775){
- var _776=_775.getQueryModelId(sCtx);
- if(_776){
- _773=_776;
- }
- }
- }
- return _773;
- };
- CCognosViewer.prototype.getQueryName=function(sId){
- var _778=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _77a=this.getSelectionController();
- if(_77a){
- var _77b=_77a.getRefQuery(sCtx);
- if(_77b){
- _778=_77b;
- }
- }
- }
- return _778;
- };
- CCognosViewer.prototype.getContextIds=function(sId,_77d){
- var aIds=[];
- var sCtx=this.findCtx(sId);
- if(sCtx){
- var _780=sCtx.split("::");
- if(_780&&_780.length>1&&_77d<_780.length){
- aIds=_780[_77d].split(":");
- }
- }
- return aIds;
- };
- CCognosViewer.prototype.getRowContextIds=function(sId){
- return this.getContextIds(sId,1);
- };
- CCognosViewer.prototype.getPageContextIds=function(sId){
- return this.getContextIds(sId,3);
- };
- CCognosViewer.prototype.getString=function(sKey){
- if(RV_RES&&RV_RES[sKey]){
- return RV_RES[sKey];
- }
- return sKey;
- };
- CCognosViewer.prototype.getRV=function(){
- if(typeof this.m_oCVMgr=="object"){
- return this.m_oCVMgr;
- }
- return window;
- };
- CCognosViewer.prototype.getSecondaryRequests=function(){
- return this.m_aSecRequests;
- };
- CCognosViewer.prototype.getTracking=function(){
- return this.m_sTracking;
- };
- CCognosViewer.prototype.findCtx=function(sId){
- var sCtx="";
- if(typeof sId=="string"){
- var aCtx=this.getReportContextHelper().processCtx(sId);
- var _787=aCtx[0][0];
- var _788=this.getSelectionController();
- if(_788){
- if(_788.isContextId(_787)){
- sCtx=sId;
- }
- }
- }
- if(!sCtx){
- var _789=this.findElementWithCtx(sId);
- if(_789){
- sCtx=_789.getAttribute("ctx");
- }
- }
- return sCtx;
- };
- CCognosViewer.prototype.findElementWithCtx=function(sId){
- var _78b=sId;
- if(typeof sId=="string"){
- _78b=this.findElementWithCtx(document.getElementById(sId));
- }
- if(_78b){
- if(_78b.getAttribute&&_78b.getAttribute("ctx")){
- return _78b;
- }
- for(var _78c=0;_78c<_78b.childNodes.length;_78c++){
- var _78d=this.findElementWithCtx(_78b.childNodes[_78c]);
- if(_78d){
- return _78d;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getUseValue=function(sId){
- var sVal=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _791=this.getSelectionController();
- if(_791){
- sVal=_791.getUseValue(sCtx);
- }
- }
- return sVal;
- };
- CCognosViewer.prototype.init=function(_792){
- if(_792&&typeof _792=="object"){
- for(var _793 in _792){
- this[_793]=_792[_793];
- }
- }
- };
- CCognosViewer.prototype.initViewer=function(_794){
- var _795=new RequestHandler(this);
- var _796=document.getElementById("formBackJax"+this.getId());
- if(_796&&typeof _796.state!="undefined"&&_796.state.value.length>0){
- _795.loadReportHTML(_796.result.value);
- var _797=eval("("+_796.state.value+")");
- _795.updateViewerState(_797);
- _795.postComplete();
- }else{
- if(this.getUsePageRequest()){
- var _798=_794?_794.m_sStatus:null;
- if(isIE()){
- if(window.location.hash=="#working"){
- window.history.go(-2);
- return;
- }else{
- if(_798==="working"||_798==="stillWorking"){
- window.location.hash="#working";
- }
- }
- }else{
- if(_796&&_796.working){
- if(_796.working.value=="true"){
- window.history.go(-1);
- return;
- }else{
- if(_798==="working"||_798==="stillWorking"){
- _796.working.value="true";
- }
- }
- }
- }
- }
- _795.processInitialResponse(_794);
- }
- };
- CCognosViewer.prototype.saveBackJaxInformation=function(_799){
- var _79a=document.getElementById("formBackJax"+this.getId());
- if(_79a){
- if(typeof _79a.state!="undefined"){
- _79a.state.value=_799.getResponseStateText();
- }
- if(typeof _79a.result!="undefined"){
- _79a.result.value=_799.getResult();
- }
- }
- };
- CCognosViewer.prototype.pcc=function(evt){
- if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
- this.preSelectNode=true;
- var _79c=this.getSelectionController();
- if(_79c){
- _79c.pageContextClicked(evt);
- }
- }
- };
- CCognosViewer.prototype.isValidAjaxResponse=function(_79d){
- return (_79d&&_79d.childNodes&&_79d.childNodes.length>0&&_79d.childNodes[0].nodeName!="parsererror"?true:false);
- };
- CCognosViewer.prototype.resubmitInSafeMode=function(_79e){
- if(this.m_bUseSafeMode){
- this.resetViewerDispatcher();
- this.setUsePageRequest(true);
- this.envParams["cv.useAjax"]="false";
- if(_79e){
- _79e.retryRequest();
- }
- }
- };
- CCognosViewer.prototype.showLoadedContent=function(_79f){
- if(_79f!==null&&typeof _79f!="undefined"){
- _79f.style.display="block";
- }
- this.m_resizeReady=true;
- this.doneLoading();
- var obj=this;
- setTimeout(function(){
- obj.renderTabs();
- },1);
- };
- CCognosViewer.prototype.doneLoading=function(){
- var _7a1=this.getViewerWidget();
- if(_7a1){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- var _7a2=this.getStatus();
- if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
- var _7a3=_7a2=="working"||_7a2=="stillWorking"||_7a2=="fault";
- _7a1.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_7a3});
- if(_7a2=="complete"){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- if(typeof _7a1.postLoadContent=="function"){
- _7a1.postLoadContent();
- }
- this.m_reportRenderingDone=true;
- if(!_7a3){
- var _7a4=this;
- setTimeout(function(){
- _7a4.m_readyToRespondToResizeEvent=true;
- },20);
- }
- }
- }
- if(_7a2!="fault"){
- _7a1.clearErrorDlg();
- }
- this.doneLoadingUpdateA11Y(_7a2);
- }else{
- var _7a2=this.getStatus();
- if(_7a2=="complete"){
- this.m_reportRenderingDone=true;
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_7a2=="working"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_7a5){
- if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
- var _7a6=this.getKeepFocus();
- if(_7a5=="complete"){
- this.setKeepFocus(false);
- }
- var _7a7=null;
- if(this.getVisibleDialog()!==null){
- _7a7=this.getVisibleDialog().getDialogDiv();
- }else{
- if(_7a6===true){
- _7a7=document.getElementById("CVReport"+this.getId());
- }else{
- if(typeof _7a6=="string"){
- _7a7=document.getElementById(_7a6);
- }else{
- if(_7a6!==null){
- _7a7=_7a6;
- if(this.isBux){
- dojo.window.scrollIntoView(_7a7);
- }
- }
- }
- }
- }
- if(_7a7){
- setFocusToFirstTabItem(_7a7);
- }
- if(_7a5=="complete"){
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_7a5=="working"||_7a5=="stillWorking"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.JAWSTalk=function(_7a8){
- if(this.isMobile()||this.isIWidgetMobile()){
- return;
- }
- var id=this.getId();
- var div=document.getElementById("JAWS_Alert_"+id);
- if(div){
- div.parentNode.removeChild(div);
- }
- div=document.createElement("div");
- div.id="JAWS_Alert_"+id;
- div.style.position="absolute";
- div.style.top="-9000px";
- div.style.display="none";
- div.setAttribute("role","alert");
- div.appendChild(document.createTextNode(_7a8));
- var _7ab=document.getElementById("RVContent"+id);
- if(_7ab){
- _7ab.appendChild(div);
- }else{
- if(typeof console!="undefined"&&console&&console.log){
- console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert.");
- }
- }
- };
- CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){
- if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){
- return false;
- }
- var _7ac=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
- if(_7ac===null){
- return false;
- }
- var _7ad=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
- return (_7ac.toLowerCase()==="on"&&_7ad!==false)||(_7ac.toLowerCase()==="off"&&_7ad===true);
- };
- CCognosViewer.prototype.setMaxContentSize=function(){
- if("10"!=window.getIEVersion()){
- return;
- }
- if(document.body.className==="viewer"){
- var _7ae=document.body.offsetHeight;
- var _7af=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
- var _7b0=document.getElementById("mainViewerTable"+this.getId());
- _7b0.style.maxHeight=_7ae-_7af-2+"px";
- var _7b1=GUtil.generateCallback(this.setMaxContentSize,[true],this);
- if(!this.attachedOnResize){
- this.attachedOnResize=true;
- if(window.attachEvent){
- window.attachEvent("onresize",_7b1);
- }else{
- if(window.addEventListener){
- window.addEventListener("resize",_7b1,false);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.getNonReportHeight=function(node){
- var _7b3=0;
- var _7b4=node.parentNode;
- if(!_7b4){
- return _7b3;
- }
- if(_7b4.childNodes.length>1){
- for(var i=0;i<_7b4.childNodes.length;i++){
- var _7b6=_7b4.childNodes[i];
- if(_7b6!=node&&!isNaN(_7b6.clientHeight)&&_7b6.style.display!="none"){
- _7b3+=_7b6.clientHeight;
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _7b3+=this.getNonReportHeight(_7b4);
- }
- return _7b3;
- };
- CCognosViewer.prototype.addPageAdornments=function(){
- this.m_layoutElements=null;
- this.m_lidToElement=null;
- this.initFlashCharts();
- this.insertSortIconsForAllLists();
- var _7b7=this.getViewerWidget().getProperties();
- if(this.canInsertExpandIconsForAllCrosstabs()){
- this.insertExpandIconsForAllCrosstabs();
- }
- var _7b8=document.getElementById("CVReport"+this.getId());
- if(_7b8){
- var oCV=this;
- setTimeout(function(){
- if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
- oCV.getPinFreezeManager().renderReportWithFrozenContainers(_7b8);
- }
- oCV.addInfoBar();
- },1);
- }
- this.getViewerWidget().reselectSelectionFilterObjects();
- this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
- };
- CCognosViewer.prototype.addFlashChart=function(_7ba){
- this.m_flashChartsObjectIds.push(_7ba);
- };
- CCognosViewer.prototype.flashChartError=function(_7bb){
- var _7bc=this.getViewerWidget();
- var _7bd=_7bc.getProperties();
- _7bd.setProperty("flashCharts",false);
- var _7be=this.getAction("Redraw");
- _7be.isUndoable=function(){
- return false;
- };
- _7be.execute();
- };
- CCognosViewer.prototype.initFlashCharts=function(){
- var _7bf=this.getViewerWidget();
- if(this.m_flashChartsObjectIds.length>0){
- var _7c0=document.getElementById("rt"+this.getId());
- if(window.addEventListener){
- _7c0.addEventListener("mousedown",onFlashChartRightClick,true);
- }else{
- var _7c1={};
- var _7c2=function(){
- this.releaseCapture();
- };
- var _7c3=function(){
- onFlashChartRightClick(event);
- this.setCapture();
- };
- for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
- var _7c5=this.m_flashChartsObjectIds[i];
- var _7c6=document.getElementById(_7c5);
- _7c1[_7c5]=1;
- _7c6.parentNode.onmouseup=_7c2;
- _7c6.parentNode.onmousedown=_7c3;
- }
- if(this.m_flashChartsObjectIds.length>0){
- _7c0.attachEvent("oncontextmenu",function(){
- if(_7c1[window.event.srcElement.id]){
- return false;
- }
- });
- }
- }
- if(_7bf){
- _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
- }
- }else{
- if(_7bf){
- _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
- }
- }
- };
- CCognosViewer.prototype.initializeLayoutElements=function(){
- var _7c7=document.getElementById("rt"+this.getId());
- var _7c8=getElementsByAttribute(_7c7,"*","lid");
- this.m_lidToElement={};
- this.m_layoutElements=[];
- var _7c9=0;
- var _7ca=this.getPinFreezeManager();
- for(var i=0;i<_7c8.length;i++){
- var e=_7c8[i];
- if(!_7ca||!_7ca.getContainerElement(e)||_7ca.isElementInMainOutput(e)){
- this.m_layoutElements[_7c9]=e;
- this.m_lidToElement[e.getAttribute("lid")]=e;
- _7c9++;
- }
- }
- };
- CCognosViewer.prototype.getLayoutElement=function(_7cd){
- if(!this.m_layoutElements){
- this.initializeLayoutElements();
- }
- if(this.m_layoutElements){
- return this.m_layoutElements[_7cd];
- }
- return null;
- };
- CCognosViewer.prototype.getLayoutElementFromLid=function(lid){
- if(!this.m_lidToElement){
- this.initializeLayoutElements();
- }
- return this.m_lidToElement[lid];
- };
- CCognosViewer.prototype.getInfoBars=function(){
- return this.m_aInfoBar?this.m_aInfoBar:null;
- };
- CCognosViewer.prototype.addInfoBar=function(){
- if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){
- return;
- }
- var _7cf=this.getRAPReportInfo();
- if(_7cf){
- var _7d0=document.getElementById("rt"+this.getId());
- this.initializeLayoutElements();
- var _7d1=[];
- this.m_aInfoBar=[];
- for(var _7d2=0;_7d2<this.m_layoutElements.length;++_7d2){
- var _7d3=this.m_layoutElements[_7d2];
- var lid=_7d3.getAttribute("lid");
- if(lid){
- if(lid.indexOf("RAP_NDH_")>-1){
- lid=lid.substring(8);
- }
- lid=lid.substring(0,lid.indexOf(this.getId()));
- }
- var _7d5=_7cf.getContainer(lid);
- if(_7d5&&typeof _7d5.parentContainer=="undefined"){
- var _7d6=this.collectChildContainers(_7d5.container);
- if(this.getPinFreezeManager()){
- oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_7d3);
- _7d3=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_7d3;
- }
- var _7d7=new InfoBar(this,_7d3,_7d5,_7d6,_7d2);
- _7d7.setTimingDetails(_7cf._getEventTimings());
- _7d7.render();
- if(_7d7.hasSomethingRendered()){
- _7d1.push(_7d7.getId());
- }
- this.m_aInfoBar.push(_7d7);
- }
- }
- var _7d8=this.getViewerWidget();
- if(_7d8){
- _7d8.refreshInfoBarRenderedState(_7d1);
- }
- }
- };
- CCognosViewer.prototype.collectChildContainers=function(_7d9){
- var _7da=[];
- var _7db=this.getRAPReportInfo();
- if(_7db){
- var _7dc=_7db.getContainerCount();
- for(var cidx=0;cidx<_7dc;++cidx){
- var _7de=_7db.getContainerFromPos(cidx);
- if(typeof _7de.parentContainer!="undefined"&&_7de.parentContainer==_7d9){
- _7da.push(_7de);
- }
- }
- }
- return _7da;
- };
- CCognosViewer.prototype.addReportInfo=function(){
- var _7df=this.getViewerWidget();
- if(typeof _7df==="undefined"||_7df===null){
- return;
- }
- if(!_7df.getAttributeValue("originalReport")||this.isIWidgetMobile()){
- return;
- }
- var _7e0=this.envParams["baseReportModificationTime"];
- var _7e1=_7df.getAttributeValue("baseReportModificationTime");
- if(typeof _7e0!=="undefined"&&typeof _7e1!=="undefined"&&_7e1&&_7e1!="<empty>"&&_7e0!==_7e1){
- var cvid=this.getId();
- var _7e3=document.getElementById("CVReport"+cvid);
- var _7e4=_7e3.parentNode;
- var id="ReportInfo"+cvid;
- var _7e6=document.createElement("div");
- _7e6.setAttribute("id",id+"_container");
- _7e6.setAttribute("cvid",cvid);
- _7e6.className="new-info-indicator BUXNoPrint";
- var _7e7=document.createElement("img");
- var img=null;
- if(this.getDirection()==="rtl"){
- img="/rv/images/action_show_info_rtl.png";
- }else{
- img="/rv/images/action_show_info.png";
- }
- _7e7.src=this.getWebContentRoot()+img;
- _7e7.className="reportInfoIcon";
- _7e7.setAttribute("tabIndex","0");
- _7e7.setAttribute("alt","");
- _7e7.setAttribute("title","");
- _7e7.setAttribute("role","presentation");
- var _7e9=RV_RES.IDS_JS_REPORT_INFO_TITLE;
- var _7ea=RV_RES.IDS_JS_REPORT_INFO_TEXT;
- var _7eb=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
- _7e6.appendChild(_7e7);
- _7e4.insertBefore(_7e6,_7e3);
- this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_7e7,position:["above","below"],title:_7e9,text:_7ea,linkText:_7eb,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
- }
- };
- CCognosViewer.prototype.reportInfoResetReport=function(){
- this.executeAction("ResetToOriginal");
- };
- CCognosViewer.prototype.hideReportInfo=function(){
- var _7ec=document.getElementById("ReportInfo"+this.getId()+"_container");
- if(typeof _7ec!=="undefined"&&_7ec!==null){
- _7ec.style.visibility="hidden";
- }
- };
- CCognosViewer.prototype.insertSortIcons=function(){
- var _7ed=this.envParams?this.envParams.limitedInteractiveMode:true;
- if(typeof _7ed==="undefined"||_7ed===true){
- return;
- }
- if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
- this.insertSortIconsForAllLists();
- }
- };
- CCognosViewer.prototype._getContainers=function(_7ee){
- var _7ef=[];
- var _7f0="",_7f1="";
- if(_7ee==="list"){
- _7f0="list";
- _7f1="ls";
- }else{
- if(_7ee==="crosstab"){
- _7f0="crosstab";
- _7f1="xt";
- }
- }
- var _7f2=document.getElementById("CVReport"+this.getId());
- if(this.getRAPReportInfo()){
- var _7f3=this.getRAPReportInfo().getContainerIds(_7f0);
- for(var i=0;i<_7f3.length;++i){
- var _7f5=getElementsByAttribute(_7f2,"table","lid",_7f3[i]+this.getId(),1);
- if(_7f5&&_7f5.length>0){
- _7ef.push(_7f5[0]);
- }
- }
- }else{
- _7ef=getElementsByClassName(_7f2,"table",_7f1);
- }
- return _7ef;
- };
- CCognosViewer.prototype.insertSortIconsForAllLists=function(){
- var _7f6=this._getContainers("list");
- for(var i=0;i<_7f6.length;++i){
- this.insertSortIconsToList(_7f6[i]);
- }
- };
- CCognosViewer.prototype.insertSortIconsToList=function(_7f8){
- var _7f9=getElementsByAttribute(_7f8,"*","type","columnTitle");
- for(var i=0;i<_7f9.length;++i){
- var _7fb=_7f9[i];
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_7fb);
- if(_7fb.getAttribute("canSort")!="false"&&_7fb.getAttribute("CTNM")===null&&_7fb.getAttribute("CC")===null){
- var _7fc=false;
- for(var _7fd=0;_7fd<_7fb.childNodes.length;_7fd++){
- var _7fe=_7fb.childNodes[_7fd];
- if(_7fe.nodeName.toLowerCase()=="img"){
- if(_7fe.id&&_7fe.id.indexOf("sortimg")===0){
- _7fc=true;
- break;
- }
- var sLid=_7fe.getAttribute("lid");
- if(sLid&&sLid.indexOf("SortIcon")!==-1){
- _7fb.removeChild(_7fe);
- break;
- }
- }
- }
- if(!_7fc&&this.canInsertSortIcon(_7fb)){
- this.insertSortIconToColumnHeader(_7fb);
- }
- }
- }
- };
- CCognosViewer.prototype.isDrillBlackListed=function(){
- if(typeof this.m_bDrillBlacklisted=="undefined"){
- this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp");
- }
- return this.m_bDrillBlacklisted;
- };
- CCognosViewer.prototype.isBlacklisted=function(item){
- return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0;
- };
- CCognosViewer.prototype.canInsertSortIcon=function(_801){
- var _802=_801.getAttribute("rp_sort");
- return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_802!==undefined&&_802!==null&&_802.length>0));
- };
- CCognosViewer.prototype.insertSortIconToColumnHeader=function(_803){
- if(!_803.style.whiteSpace){
- _803.style.whiteSpace="nowrap";
- }
- var _804=document.createElement("img");
- _804.setAttribute("id","sortimg"+Math.random());
- if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
- _804.onmouseover=function(){
- this.setAttribute("oldClassName",this.className);
- this.className+=" sortIconOver";
- };
- _804.onmouseout=function(){
- this.className=this.getAttribute("oldClassName");
- this.removeAttribute("oldClassName");
- };
- }
- _804.src=this.getImgSrc(_803);
- var _805=this.getSortInfo(_803);
- var _806=this.getSortOrder(_805);
- _804.setAttribute("alt",this.getSortAltText(_806));
- _804.setAttribute("title",this.getSortAltText(_806));
- _804.className=this.getSortClass(_805);
- _804.setAttribute("sortOrder",_806);
- _803.appendChild(_804);
- };
- CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_807,_808){
- var _809=this.getSelectionController();
- var _80a=_809.hasCalculationMetadata(_808,[_808],"crosstab");
- return ((_809.canDrillDown(_808)||_807.alwaysCanExpandCollapse)&&!_809.isCalculationOrMeasure(_808,_80a));
- };
- CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
- var _80b=this._getContainers("crosstab");
- var _80c=this;
- var _80d=this.getRAPReportInfo();
- var _80e=this.getReportContextHelper();
- for(var i=0;i<_80b.length;i++){
- var _810=_80b[i];
- var _811=_810.getAttribute("lid");
- _811=_811.substring(0,_811.length-this.getId().length);
- var _812=getElementsByAttribute(_810,["td","th"],"ctnm","true");
- for(var j=0;j<_812.length;j++){
- var _814=_812[j];
- var sCtx=this.findCtx(_814);
- var _816=_80e.getDataItemName(sCtx);
- if(_816){
- var _817=_80d.getItemInfo(_811,_816);
- var _818=_80e.processCtx(sCtx);
- if(this.canInsertShowExpandCollapseIconForNode(_817,_818[0][0])){
- var sMun=_80e.getMun(sCtx);
- var _81a=sMun&&_817.expandedMembers&&_817.expandedMembers[sMun]===true;
- var _81b=document.createElement("div");
- _81b.setAttribute("skipSelection","true");
- _81b.className="expandButton "+(_81a?"collapse":"expand");
- _814.insertBefore(_81b,_814.firstChild);
- var _81c=document.createElement("span");
- _81c.className="expandButtonCaption";
- _81c.innerHTML=(_81a?"[-]":"[+]");
- _81b.appendChild(_81c);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
- var _81d=this._getContainers("crosstab");
- for(var i=0;i<_81d.length;i++){
- var _81f=_81d[i];
- var _820=_81f.getAttribute("lid");
- _820=_820.substring(0,_820.length-this.getId().length);
- var _821=getElementsByAttribute(_81f,"td","ctnm","true");
- for(var j=0;j<_821.length;j++){
- var _823=_821[j];
- if(_823.firstChild.className==="expandButton collapse"||_823.firstChild.className==="expandButton expand"){
- _823.removeChild(_823.firstChild);
- }
- }
- }
- };
- CCognosViewer.prototype.fillInContextData=function(){
- if(!this.isLimitedInteractiveMode()){
- var _824=document.getElementById("CVReport"+this.getId());
- var _825=getElementsByClassName(_824,"table","ls");
- for(var i=0;i<_825.length;++i){
- var _827=getElementsByAttribute(_825[i],"*","type","columnTitle");
- for(var j=0;j<_827.length;++j){
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_827[j]);
- }
- }
- }
- };
- CCognosViewer.prototype.getSortAltText=function(_829){
- if(_829==="ascending"){
- return RV_RES.IDS_JS_SORT_ASCENDING;
- }else{
- if(_829==="descending"){
- return RV_RES.IDS_JS_SORT_DESCENDING;
- }else{
- if(_829==="nosort"){
- return RV_RES.IDS_JS_NOT_SORTED;
- }
- }
- }
- };
- CCognosViewer.prototype.getSortInfo=function(_82a){
- var _82b=_82a.getAttribute("rp_sort");
- if(_82b){
- _82b=_82b.split(".");
- }
- return _82b;
- };
- CCognosViewer.prototype.getSortClass=function(_82c){
- var _82d="sortIconHidden";
- if(_82c){
- if(_82c[0]==="d"||_82c[0]==="a"){
- _82d="sortIconVisible";
- }
- }
- return _82d;
- };
- CCognosViewer.prototype.getSortOrder=function(_82e){
- var _82f="nosort";
- if(_82e){
- if(_82e[0]==="d"){
- _82f="descending";
- }else{
- if(_82e[0]==="a"){
- _82f="ascending";
- }
- }
- }
- return _82f;
- };
- CCognosViewer.prototype.getImgSrc=function(_830){
- var _831=_830.getAttribute("rp_sort");
- var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_831);
- return src;
- };
- CCognosViewer.prototype.getSortIconName=function(_833){
- var _834="sort_no.gif";
- if(_833){
- _833=_833.split(".");
- if(_833[0]==="d"){
- _834="sort_descending.gif";
- }else{
- if(_833[0]==="a"){
- _834="sort_ascending.gif";
- }
- }
- }
- return _834;
- };
- CCognosViewer.prototype.shouldWriteNavLinks=function(){
- if(this.envParams["cv.navlinks"]=="false"){
- return false;
- }else{
- if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){
- if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){
- return true;
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.isActiveReport=function(){
- if(this.envParams["cv.responseFormat"]==="activeReport"){
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){
- this.m_raiseSharePromptEvent=true;
- };
- CCognosViewer.prototype.resetbHasPromptFlag=function(){
- this.m_bHasPrompt=null;
- };
- CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){
- this.m_raiseSharePromptEvent=false;
- };
- CCognosViewer.prototype.widgetHasPromptParameters=function(){
- var _835=this.getViewerWidget();
- return (_835&&_835.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
- };
- CCognosViewer.prototype.getPromptParametersInfo=function(){
- var _836=null;
- if(this.widgetHasPromptParameters()){
- _836="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
- }
- return _836;
- };
- CCognosViewer.prototype.raisePromptEvent=function(_837,_838,_839){
- try{
- var _83a=this.getViewerWidget();
- _83a.getWidgetContextManager().raisePromptEvent(_837,_838,_838.get("ui.action"),this.getModelPath(),_839);
- }
- catch(e){
- }
- };
- CCognosViewer.prototype.getModelPath=function(){
- var _83b=this.getSelectionController().getModelPathForCurrentSelection();
- if(_83b){
- return _83b;
- }else{
- if(this.envParams.modelPath){
- return this.envParams.modelPath;
- }else{
- if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){
- return document.forms["formWarpRequest"+this.getId()].modelPath.value;
- }
- }
- }
- return "";
- };
- CCognosViewer.prototype.setKeepFocus=function(_83c){
- this._keepFocus=_83c;
- };
- CCognosViewer.prototype.getKeepFocus=function(){
- if(typeof this._keepFocus!="undefined"){
- return this._keepFocus;
- }
- return false;
- };
- CCognosViewer.prototype.onFocus=function(evt){
- var _83e=this.getA11YHelper();
- if(_83e){
- _83e.onFocus(evt);
- }
- };
- CCognosViewer.prototype.getA11YHelper=function(){
- if(!this.a11yHelper){
- this.loadExtra();
- if(typeof ViewerA11YHelper=="function"){
- this.a11yHelper=new ViewerA11YHelper(this);
- }else{
- if(typeof console!=="undefined"&&console.log){
- console.log("CCognosViewer: Could not create ViewerA11YHelper object.");
- }
- return null;
- }
- }
- return this.a11yHelper;
- };
- CCognosViewer.prototype.onKeyDown=function(evt){
- if(this.getA11YHelper()){
- this.getA11YHelper().onKeyDown(evt);
- }
- };
- CCognosViewer.prototype.updateSkipToReportLink=function(){
- var _840=this.getStatus();
- var _841=document.getElementById("cvSkipToReport"+this.getId());
- if(_841){
- _841.style.display=_840=="prompting"?"none":"";
- }
- };
- CCognosViewer.prototype.updateSkipToNavigationLink=function(_842){
- var _843=document.getElementById("cvSkipToNavigation"+this.getId());
- if(_843){
- _843.style.display=_842?"none":"";
- }
- };
- CCognosViewer.prototype.pageAction=function(_844){
- this.setKeepFocus("CVNavLinks"+this.getId());
- var _845=new ViewerDispatcherEntry(this);
- _845.addFormField("ui.action",_844);
- if(this.getCurrentlySelectedTab()){
- _845.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
- }
- this.dispatchRequest(_845);
- };
- CCognosViewer.prototype.writeNavLink=function(_846,_847,_848,_849){
- var _84a="";
- if(_848){
- _84a="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
- if(_849){
- _84a+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
- }else{
- _84a+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
- }
- _84a+=">LINK_TEXT</a> "+"</td>";
- }else{
- _84a="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">LINK_TEXT </td>";
- }
- var sImg=this.sSkin+(!_848&&_846.sImgDisabled?_846.sImgDisabled:_846.sImg);
- return _84a.replace(/LINK_REQUEST/g,_847).replace(/LINK_TEXT/g,_846.sText).replace(/LINK_IMG/g,sImg);
- };
- CCognosViewer.prototype.loadNavLinks=function(){
- var _84c=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
- if(_84c){
- this.init(eval("("+_84c+")"));
- }
- };
- CCognosViewer.prototype.writeNavLinks=function(sSR,_84e){
- var _84f=document.getElementById("CVNavLinks"+this.getId());
- if(_84f){
- var _850=document.getElementById("CVNavLinks_Container"+this.getId());
- if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){
- _84f.style.display="none";
- if(_850){
- _850.style.display="none";
- }
- this.updateSkipToNavigationLink(true);
- return;
- }
- this.updateSkipToNavigationLink(false);
- if(_850){
- _850.style.display="";
- }
- _84f.style.display=(isIE()?"block":"table-cell");
- var _851="";
- _851+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
- _851+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_84e);
- _851+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_84e);
- _851+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_84e);
- _851+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_84e);
- _851+="</tr></tbody></table>";
- var _852=document.getElementById("CVNavLinks_label"+this.getId());
- var _853="";
- if(_852){
- _853+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_852.innerHTML+"</span>";
- }
- _84f.innerHTML=_853+_851;
- }else{
- if(this.shouldWriteNavLinks()){
- setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_84e+"\");",100);
- }
- }
- };
- function CVBackgroundLayer_ignoreMouseClick(e){
- if(e.returnValue){
- e.returnValue=false;
- }else{
- if(e.preventDefault){
- e.preventDefault();
- }else{
- return false;
- }
- }
- };
- CCognosViewer.prototype.createTransparentBackgroundLayer=function(){
- this.removeTransparentBackgroundLayer();
- var oBL=document.createElement("div");
- oBL.id=CV_BACKGROUND_LAYER_ID;
- oBL.style.display="none";
- oBL.style.position="absolute";
- oBL.setAttribute("role","region");
- oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT);
- oBL.style.top="0px";
- oBL.style.left="0px";
- oBL.style.zIndex=98;
- oBL.style.width="100%";
- oBL.style.height="100%";
- oBL.style.backgroundColor="rgb(238, 238, 238)";
- oBL.style.opacity="0";
- oBL.style.filter="alpha(opacity:0)";
- oBL.innerHTML="<table tabindex=\"1\" width=\"100%\" height=\"100%\"><tr><td role=\"presentation\" onclick=\"CVBackgroundLayer_ignoreMouseClick(event)\"></td></tr></table>";
- oBL.style.display="inline";
- document.body.appendChild(oBL);
- };
- CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){
- var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID);
- if(oBL){
- oBL.parentNode.removeChild(oBL);
- }
- };
- CCognosViewer.prototype.closeActiveHTTPConnection=function(){
- var _857=this.getActiveRequest();
- if(_857){
- _857.abortHttpRequest();
- }
- };
- CCognosViewer.prototype.canCancel=function(){
- var _858=this.getTracking();
- var _859=this.getStatus();
- return _858!=""&&_859!="complete";
- };
- CCognosViewer.prototype.cancel=function(_85a){
- if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
- this.getWorkingDialog().disableCancelButton(_85a);
- }
- this.removeTransparentBackgroundLayer();
- this.clearPrompts();
- if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
- this.envParams["fragment.fireEventWhenComplete"]="";
- }
- var _85b=null;
- if(this.m_undoStack.length>0){
- _85b=this.m_undoStack.pop();
- }
- var _85c=this.getActiveRequest();
- if(this.canCancel()===true||_85c){
- if(_85c){
- _85c.cancelRequest(true);
- }else{
- var _85d=null;
- var _85e=_85b!=null&&_85b.m_bRefreshPage;
- if(typeof this.getCancelDispatcherEntry=="function"){
- _85d=this.getCancelDispatcherEntry();
- }else{
- if(_85e||this.m_viewerFragment){
- _85d=new ViewerDispatcherEntry(this);
- }else{
- if(this.getId()=="RS"){
- _85d=new ViewerDispatcherEntry(this);
- _85d.addFormField("cv.responseFormat","rs");
- }else{
- _85d=new DispatcherEntry(this);
- _85d.addFormField("cv.responseFormat","successfulRequest");
- }
- }
- }
- _85d.forceSynchronous();
- _85d.addFormField("ui.action","cancel");
- _85d.addFormField("m_tracking",this.getTracking());
- this.setTracking("");
- if(_85e){
- var _85f="<CognosViewerUndo><conversation>";
- _85f+=_85b.m_sConversation;
- _85f+="</conversation></CognosViewerUndo>";
- _85d.addFormField("cv.previousSession",_85f);
- }
- this.dispatchRequest(_85d);
- if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
- this.executeCallback("cancel");
- }
- }
- this.setStatus("complete");
- var _860=this.envParams["ui.action"];
- var _861=this.getUsePageRequest();
- var _862=this.m_undoStack.length;
- if(_85b!=null){
- this.m_sConversation=_85b.m_sConversation;
- this.m_sParameters=_85b.m_sParameters;
- this.envParams={};
- applyJSONProperties(this.envParams,_85b.m_envParams);
- this.m_undoStack.push(_85b);
- }
- this.setTracking("");
- if(this.previouslySelectedTab){
- this.cancelTabSwitch();
- }else{
- if(_860!="view"&&_862<=0&&this.rvMainWnd){
- this.rvMainWnd.executePreviousReport(-1);
- }
- }
- return true;
- }else{
- if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){
- this.rvMainWnd.executePreviousReport(-1);
- return true;
- }else{
- if(!this.isBux){
- executeBackURL(this.getId());
- }
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.clearPrompts=function(){
- if(this.preProcessControlArray){
- var _863=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_863;k++){
- var _865=eval(this.preProcessControlArray[k]);
- if(_865){
- if(_865.clearSubmit){
- _865.clearSubmit();
- }
- }
- }
- }
- };
- CCognosViewer.prototype.wait=function(){
- if(this.isWorking()){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- var _866=new ViewerDispatcherEntry(this);
- _866.addFormField("ui.action","wait");
- _866.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _866.addFormField("cv.actionState",this.envParams["cv.actionState"]);
- _866.addNonEmptyStringFormField("bux",this.envParams["bux"]);
- _866.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
- this.dispatchRequest(_866);
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.setCAFContext=function(_867){
- this.m_sCAFContext=_867;
- };
- CCognosViewer.prototype.setContextInfo=function(sXML){
- this.m_sContextInfoXML=sXML;
- };
- CCognosViewer.prototype.setConversation=function(_869){
- this.m_sConversation=_869;
- };
- CCognosViewer.prototype.setActionState=function(_86a){
- this.m_sActionState=_86a;
- };
- CCognosViewer.prototype.setStatus=function(_86b){
- this.m_sStatus=_86b;
- };
- CCognosViewer.prototype.setDebug=function(_86c){
- this.m_bDebug=_86c;
- };
- CCognosViewer.prototype.setExecutionParameters=function(_86d){
- this.m_sParameters=_86d;
- };
- CCognosViewer.prototype.setMetadataInfo=function(sXML){
- this.m_sMetadataInfoXML=sXML;
- };
- CCognosViewer.prototype.setSecondaryRequests=function(_86f){
- if(_86f){
- this.m_aSecRequests=_86f;
- }else{
- this.m_aSecRequests=[];
- }
- };
- CCognosViewer.prototype.setTracking=function(_870){
- this.m_sTracking=_870;
- };
- CCognosViewer.prototype.setSoapFault=function(_871){
- this.m_sSoapFault=_871;
- };
- CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
- var _873=document.getElementById("formWarpRequest"+this.getId());
- var _874=_873.elements["ui.postBack"];
- var _875=_873.elements["ui.backURL"];
- if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
- window.detachLeavingRV();
- }
- if(window.opener||_874||(_875&&_875.value!=="javascript:window.close();")){
- window.open(sURL,"","");
- this.updateNewBrowserWindow();
- }else{
- window.location=sURL;
- }
- };
- CCognosViewer.prototype.hideToolbar=function(_876){
- this.m_bHideToolbar=_876;
- };
- CCognosViewer.prototype.showExcel=function(sURL){
- var _878=true;
- var _879=document.getElementById("formWarpRequest"+this.getId());
- var _87a=_879.elements["ui.backURL"];
- if(_87a&&_87a.value.indexOf("javascript:window.close()")!==0&&_87a.value.indexOf("close.html")===-1){
- _878=false;
- }
- if(window.detachLeavingRV){
- window.detachLeavingRV();
- }
- var _87b=window;
- if(window.opener&&(isIE()||isFF())&&_878){
- _87b=window.opener?window.opener:window;
- }else{
- if(!window.opener&&_878){
- window.location=sURL;
- return;
- }
- }
- var _87c=null;
- var _87d="";
- try{
- if(this.envParams["cv.excelWindowOpenProperties"]){
- _87d=this.envParams["cv.excelWindowOpenProperties"];
- }
- _87c=_87b.open(sURL,"",_87d);
- }
- catch(e){
- _87b=window;
- _87c=_87b.open(sURL,"",_87d);
- }
- if(!_87c||_87c.closed||typeof _87c.closed=="undefined"){
- alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
- }
- this.updateNewBrowserWindow();
- };
- CCognosViewer.prototype.updateNewBrowserWindow=function(){
- var id=this.getId();
- var _87f=document.forms["formWarpRequest"+id].elements["ui.postBack"];
- var _880=document.forms["formWarpRequest"+id].elements["ui.backURL"];
- if(_87f&&_87f.value){
- setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
- }else{
- if(_880&&_880.value){
- if(_880.value.length<2048){
- setTimeout("location.replace(\""+_880.value+"\");",100);
- }else{
- _880=decodeURIComponent(_880.value);
- var _881=_880.split("?");
- var _882=document.createElement("form");
- _882.style.display="none";
- _882.setAttribute("target","_self");
- _882.setAttribute("method","post");
- _882.setAttribute("action",_881[0]);
- var _883=_881[1].split("&");
- for(var _884=0;_884<_883.length;_884++){
- var _885=_883[_884].indexOf("=");
- var _886=_883[_884].substr(0,_885);
- var _887=_883[_884].substr(_885+1);
- var _888=document.createElement("img");
- _888.setAttribute("type","hidden");
- _888.setAttribute("name",decodeURIComponent(_886));
- _888.setAttribute("value",decodeURIComponent(_887));
- _882.appendChild(_888);
- }
- document.body.appendChild(_882);
- _882.submit();
- }
- }else{
- window.close();
- }
- }
- };
- CCognosViewer.prototype.showWaitPage=function(){
- };
- CCognosViewer.prototype.sendRequest=function(_889){
- var _88a=new ViewerDispatcherEntry(this);
- _88a.addFormField("ui.action",_889.getAction());
- if(_889.getCallback()!=null){
- _88a.setCallbacks({"complete":{"object":null,"method":_889.getCallback()}});
- }
- var _88b=_889.getFormFields().keys();
- for(var _88c=0;_88c<_88b.length;_88c++){
- _88a.addFormField(_88b[_88c],_889.getFormFields().get(_88b[_88c]));
- }
- var _88d=_889.m_oOptions.keys();
- for(var _88e=0;_88e<_88d.length;_88e++){
- _88a.addFormField(_88d[_88e],_889.getOption(_88d[_88e]));
- }
- var _88f=_889.m_oParams.keys();
- for(var _890=0;_890<_88f.length;_890++){
- _88a.addFormField(_88f[_890],_889.getParameter(_88f[_890]));
- }
- this.dispatchRequest(_88a);
- };
- CCognosViewer.prototype.promptAction=function(_891,sUrl){
- this.setKeepFocus(true);
- if(typeof datePickerObserverNotify=="function"){
- datePickerObserverNotify();
- }
- var _893=this.getViewerWidget();
- if(_891=="cancel"){
- this.cancelPrompt(sUrl);
- if(_893){
- if(!this.isReportRenderingDone()){
- var _894={action:"deleteWidget"};
- _893.fireEvent("com.ibm.bux.widget.action",null,_894);
- }
- }
- }else{
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action",_891=="back"?"back":"forward");
- if(_891=="finish"){
- oReq.addFormField("run.prompt",false);
- }else{
- if(_891=="back"||_891=="next"){
- oReq.addFormField("run.prompt",true);
- }
- }
- if(_891=="reprompt"){
- if(typeof repromptObserverNotify=="function"){
- repromptObserverNotify(this);
- }
- oReq.addFormField("_promptControl",_891);
- }else{
- oReq.addFormField("_promptControl","prompt");
- }
- if(_893){
- _893.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
- if(_893.isSelectionFilterEnabled){
- _893.clearSelectionFilter();
- }
- }
- this.submitPromptValues(oReq);
- }
- };
- CCognosViewer.prototype.cancelPrompt=function(sUrl){
- this.cancel();
- };
- CCognosViewer.prototype.notify=function(_897,_898){
- var _899=0,k=0;
- var _89b=null;
- if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
- _899=this.rangeObserverArray.length;
- for(k=0;k<_899;k++){
- _89b=eval(this.rangeObserverArray[k]);
- if(_89b&&typeof _89b=="object"&&typeof _89b.update=="function"){
- _89b.update();
- }
- }
- }
- var _89c=true;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- _899=this.preProcessControlArray.length;
- for(k=0;k<_899;k++){
- _89b=eval(this.preProcessControlArray[k]);
- if((typeof _89b.getValid=="function")&&!_89b.getValid()){
- _89c=false;
- break;
- }
- }
- }
- this.notifyPageNavEnabled(_89c);
- if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
- _899=this.multipleObserverArray.length;
- for(k=0;k<_899;k++){
- _89b=eval(this.multipleObserverArray[k]);
- if(_89b&&typeof _89b=="object"&&typeof _89b.checkInsertRemove=="function"){
- _89b.checkInsertRemove();
- }
- }
- }
- for(var _89d=0;_89d<gaNotifyTargets.length;_89d++){
- var _89e=gaNotifyTargets[_89d];
- if(typeof _89e!="undefined"&&typeof _89e.notify=="function"){
- _89e.notify(_897,_898);
- }
- }
- };
- CCognosViewer.prototype.notifyPageNavEnabled=function(_89f){
- if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
- var _8a0=this.pageNavigationObserverArray.length;
- var _8a1=false;
- var _8a2=null;
- var _8a3=null;
- var k=0;
- for(k=0;k<_8a0;k++){
- try{
- _8a2=eval(this.pageNavigationObserverArray[k]);
- _8a3=_8a2.getType();
- if(_8a3==PROMPTBUTTON_FINISH){
- _8a1=true;
- break;
- }
- }
- catch(e){
- }
- }
- for(k=0;k<_8a0;k++){
- try{
- _8a2=eval(this.pageNavigationObserverArray[k]);
- _8a3=_8a2.getType();
- if(!_89f){
- if((_8a3==PROMPTBUTTON_NEXT)||(_8a3==PROMPTBUTTON_OK)||(_8a3==PROMPTBUTTON_FINISH)){
- _8a2.setEnabled(false);
- }
- }else{
- if(_8a3==PROMPTBUTTON_FINISH){
- _8a2.setEnabled(this.bCanFinish);
- }else{
- if(_8a3==PROMPTBUTTON_NEXT){
- _8a2.setEnabled(this.bNextPage||!_8a1);
- }else{
- if(_8a3==PROMPTBUTTON_OK){
- _8a2.setEnabled(true);
- }
- }
- }
- }
- }
- catch(e2){
- }
- }
- }
- };
- CCognosViewer.prototype.getDrillResetHUNs=function(_8a5){
- var _8a6=null;
- if(this.getRAPReportInfo()){
- _8a6=this.getRAPReportInfo().getDrilledOnHUNs();
- }
- if(!_8a6){
- return null;
- }
- var _8a7=this.getExecutionParameters();
- if(!_8a7){
- return null;
- }
- var _8a8=this._getListOfChangedPromptParameters(_8a5);
- if(!_8a8||_8a8.length===0){
- return null;
- }
- var _8a9=[];
- for(var i=0;i<_8a6.length;i++){
- for(var j=0;j<_8a8.length;j++){
- if(_8a8[j].indexOf(_8a6[i])!==-1){
- _8a9.push(_8a6[i]);
- }
- }
- }
- return _8a9;
- };
- CCognosViewer.prototype.getOldParameters=function(){
- var _8ac=new CParameterValues();
- var _8ad=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_8ad.childNodes.length==1){
- _8ac.loadWithOptions(_8ad.childNodes[0],false);
- }
- if(!_8ac||!_8ac.m_parameterValues||!_8ac.m_parameterValues.m_aValues){
- return null;
- }
- return _8ac.m_parameterValues.m_aValues;
- };
- CCognosViewer.prototype._createDummyRequest=function(){
- var _8ae=new ViewerDispatcherEntry(this);
- return this.preparePromptValues(_8ae);
- };
- CCognosViewer.prototype._getChangedPromptParametersValues=function(_8af,_8b0,_8b1){
- var _8b2=XMLBuilderLoadXMLFromString(_8b0);
- if(!_8b2){
- for(var j=0;j<_8af.length;j++){
- var _8b4=_8af[j].m_useValue;
- if(_8b0.indexOf(sXmlEncode(_8b4))<0){
- _8b1.push(_8b4);
- }
- }
- return;
- }
- var _8b5=_8b2.getElementsByTagName("selectOption");
- if(!_8b5){
- return;
- }
- var _8b6=_8af.length;
- var _8b7=_8b5.length;
- for(var i=0;i<_8b7;i++){
- var _8b0=_8b5[i].attributes.getNamedItem("useValue").nodeValue;
- bMatchOldParam=false;
- for(var j=0;j<_8b6;j++){
- var _8b4=_8af[j].m_useValue;
- if(_8b0.indexOf(_8b4)===0){
- bMatchOldParam=true;
- break;
- }
- }
- if(!bMatchOldParam){
- _8b1.push(_8b0);
- }
- }
- };
- CCognosViewer.prototype._getListOfChangedPromptParameters=function(_8b9){
- var _8ba=this.getOldParameters();
- if(!_8ba){
- return null;
- }
- var _8bb=[];
- if(!_8b9){
- var _8bc=this._createDummyRequest();
- for(var _8bd in _8ba){
- var _8be=_8ba[_8bd].m_parmValueItems;
- var _8bf=_8bc.getRequest().getFormFields().get("p_"+_8bd);
- if(!_8bf){
- continue;
- }
- this._getChangedPromptParametersValues(_8be,_8bf,_8bb);
- }
- }else{
- if(!_8b9.parameters){
- return null;
- }
- var _8c0=_8b9.parameters;
- for(var i=0;i<_8c0.length;i++){
- var _8c2=_8c0[i].parmName;
- if(!_8c2||!_8ba[_8c2]){
- continue;
- }
- var _8be=_8ba[_8c2].m_parmValueItems;
- if(!_8be||_8be.length==0){
- continue;
- }
- this._getChangedPromptParametersValues(_8be,_8c0[i].parmValue,_8bb);
- }
- }
- return _8bb;
- };
- CCognosViewer.prototype.submitPromptValues=function(oReq){
- if(this.gbPromptRequestSubmitted===true){
- return false;
- }
- this.gbPromptRequestSubmitted=true;
- if(this.isBux){
- var _8c4=this.getDrillResetHUNs(null);
- if(_8c4&&_8c4.length!==0){
- var _8c5={"drilledResetHUNs":_8c4};
- this.executeAction("DrillReset",_8c5);
- return;
- }
- }
- oReq=this.preparePromptValues(oReq);
- if(window.portletSharePrompt){
- var _8c6=this.portletPromptParams(oReq);
- if(_8c6.length>0){
- portletSharePrompt(_8c6);
- }
- }
- this.dispatchRequest(oReq);
- };
- CCognosViewer.prototype.portletPromptParams=function(oReq){
- var _8c8=[];
- var _8c9=null;
- var _8ca=true;
- var _8cb=oReq.getFormFields().keys();
- for(var _8cc=0;_8cc<_8cb.length;_8cc++){
- _8c9=_8cb[_8cc];
- if(_8c9=="_promptControl"&&oReq.getFormField(_8c9)=="search"){
- _8ca=false;
- break;
- }else{
- if(_8c9.indexOf("p_")===0){
- if(_8c9.indexOf("p_credential")===0){
- _8ca=false;
- break;
- }else{
- _8c8.push([_8c9,oReq.getFormField(_8c9)]);
- }
- }
- }
- }
- if(_8c8&&!_8ca){
- _8c8=[];
- }
- return _8c8;
- };
- CCognosViewer.prototype.preparePromptValues=function(oReq){
- var _8ce=[];
- if(this.preProcessControlArray){
- var _8cf=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_8cf;k++){
- var _8d1=eval(this.preProcessControlArray[k]);
- var _8d2=(typeof _8d1.isEnabled=="function"?_8d1.isEnabled():true);
- if(_8d1&&typeof _8d1.preProcess=="function"&&_8d2){
- _8d1.preProcess();
- if(_8d1.m_oSubmit){
- if(oReq.addParameter){
- oReq.addParameter(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value);
- }else{
- oReq.addFormField(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value);
- }
- _8ce.push(_8d1.m_oSubmit);
- if(_8d1.m_sPromptId&&_8d1.m_oForm&&_8d1.m_oForm.elements&&typeof _8d1.m_oForm.elements["p_"+_8d1.m_sRef]=="object"){
- if(oReq.addParameter){
- oReq.addParameter("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value);
- }else{
- oReq.addFormField("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value);
- }
- }
- }
- }
- }
- }
- var _8d3=document.getElementById("formWarpRequest"+this.getId());
- if(_8d3){
- var _8d4=_8d3.elements;
- for(var _8d5=0;_8d5<_8d4.length;_8d5++){
- var _8d6=_8d4[_8d5];
- if(!_8d6.name||!_8d6.name.match(/^p_/)){
- continue;
- }
- var _8d7=true;
- for(var _8d8=0;_8d8<_8ce.length;_8d8++){
- if(_8ce[_8d8]==_8d6){
- _8d7=false;
- break;
- }
- }
- if(_8d7){
- oReq.addFormField(_8d6.name,_8d6.value);
- _8ce.push(_8d6);
- }
- }
- }
- var oRM=this["CognosReport"];
- if(oRM){
- var _8da=oRM.prompt.getParameters();
- for(var i=0;i<_8da.length;i++){
- var _8dc="p_"+_8da[i].getName();
- if(!oReq.getFormField(_8dc)){
- oReq.addFormField(_8dc,_8da[i].getXML());
- }
- }
- }
- return oReq;
- };
- CCognosViewer.prototype.setViewerWidget=function(_8dd){
- this.m_viewerWidget=_8dd;
- };
- CCognosViewer.prototype.getViewerWidget=function(){
- return this.m_viewerWidget;
- };
- CCognosViewer.prototype.getFlashChartOption=function(){
- var _8de=this.getViewerWidget();
- var _8df=null;
- if(_8de){
- var _8e0=_8de.getProperties();
- if(_8e0){
- _8df=_8e0.getFlashCharts();
- }
- }
- return _8df;
- };
- CCognosViewer.prototype.fireWidgetEvent=function(evt,_8e2){
- var _8e3=this.getViewerWidget();
- if(_8e3!=null){
- _8e3.fireEvent(evt,null,_8e2);
- }
- };
- CCognosViewer.prototype.isMobile=function(){
- return false;
- };
- CCognosViewer.prototype.setVisibleDialog=function(_8e4){
- this.m_visibleDialog=_8e4;
- };
- CCognosViewer.prototype.getVisibleDialog=function(){
- if(typeof this.m_visibleDialog!="undefined"){
- return this.m_visibleDialog;
- }
- return null;
- };
- CCognosViewer.prototype.getContentLocale=function(){
- var _8e5=document.getElementById("formWarpRequest"+this.getId());
- if(_8e5&&_8e5["ui.contentLocale"]&&_8e5["reRunObj"]&&_8e5["reRunObj"].value.length>0){
- return _8e5["ui.contentLocale"].value;
- }
- return null;
- };
- CCognosViewer.prototype.updateLayout=function(_8e6){
- var cvid=this.getId();
- var _8e8=document.getElementById("CVHeader"+cvid);
- var _8e9=document.getElementById("CVToolbar"+cvid);
- if(!_8e8&&!_8e9){
- setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_8e6+"\");",100);
- return;
- }
- if(_8e8){
- var _8ea=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
- if((_8e6=="prompting"&&!this.bShowHeaderWithPrompts)||_8ea){
- _8e8.parentNode.style.display="none";
- }else{
- _8e8.parentNode.style.display="";
- }
- }
- if(_8e9){
- if(_8e6=="prompting"||this.m_bHideToolbar==true){
- _8e9.parentNode.style.display="none";
- }else{
- _8e9.parentNode.style.display="";
- }
- }
- };
- CCognosViewer.prototype.updateResponseSpecification=function(_8eb){
- this.sResponseSpecification=_8eb;
- };
- CCognosViewer.prototype.getResponseSpecification=function(){
- return this.sResponseSpecification;
- };
- CCognosViewer.prototype.release=function(_8ec){
- if(this.getStatus()!="fault"){
- this._release(_8ec);
- }
- };
- CCognosViewer.prototype._release=function(_8ed){
- var form=document.getElementById("formWarpRequest"+this.getId());
- var _8ef=this.getTracking();
- if(!_8ef&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _8ef=form["m_tracking"].value;
- form["m_tracking"].value="";
- }
- this.setTracking("");
- if(_8ef){
- var _8f0=new DispatcherEntry(this);
- if(this.isWorkingOrPrompting()){
- _8f0.addFormField("ui.action","cancel");
- }else{
- _8f0.addFormField("ui.action","release");
- }
- _8f0.addFormField("cv.responseFormat","successfulRequest");
- _8f0.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _8f0.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
- _8f0.addFormField("m_tracking",_8ef);
- if(_8ed!=true){
- _8f0.forceSynchronous();
- }
- var _8f1=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
- if(_8f1&&_8f1.getFormField("cv.outputKey")){
- _8f0.addFormField("b_action","cvx.high");
- _8f0.addFormField("cv.outputKey",_8f1.getFormField("cv.outputKey"));
- _8f0.addFormField("cv.waitForResponse","false");
- _8f0.setHeaders(_8f1.getHeaders());
- }
- var _8f2=_8f0.getRequest().getFormFields();
- var _8f3=_8f2.keys();
- var data=new URLSearchParams();
- for(var _8f5=0;_8f5<_8f3.length;_8f5++){
- data.append(_8f3[_8f5],_8f2.get(_8f3[_8f5]));
- }
- if(!navigator.sendBeacon(this.getGateway(),data)){
- if(typeof console!=="undefined"&&console.log){
- console.log("CCognosViewer: release sendBeacon failed.");
- }
- }
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.cleanupStyles=function(){
- if(this.getViewerWidget()){
- this.getViewerWidget().cleanupStyles();
- }
- };
- CCognosViewer.prototype.destroy=function(_8f6){
- this.release(_8f6);
- if(!this.m_destroyed){
- if(typeof window.gaRV_INSTANCES!="undefined"){
- for(var _8f7=0;_8f7<window.gaRV_INSTANCES.length;_8f7++){
- if(window.gaRV_INSTANCES[_8f7].m_sId==this.getId()){
- window.gaRV_INSTANCES.splice(_8f7,1);
- this.m_destroyed=true;
- break;
- }
- }
- }
- if(this.m_layoutElements){
- for(var i=0;i<this.m_layoutElements.length;i++){
- var e=this.m_layoutElements[i];
- var j=e.getAttribute("lid");
- this.m_layoutElements.splice(i,1);
- delete this.m_lidToElement[j];
- var _8fb=e.parentNode;
- if(_8fb){
- _8fb.removeChild(e);
- }
- }
- delete this.m_layoutElements;
- delete this.m_lidToElement;
- }
- if(this.m_oDrillMgr){
- this.m_oDrillMgr.setCV(null);
- }
- var _8fc=this.getSelectionController();
- if(_8fc){
- GUtil.destroyProperties(_8fc);
- }
- var cvId=this.getId();
- this.m_viewerDispatcher=null;
- GUtil.destroyProperties(this,true);
- cleanupGlobalObjects(cvId);
- }
- };
- CCognosViewer.prototype.exit=function(){
- this.release();
- };
- CCognosViewer.prototype.executeAction=function(_8fe,_8ff){
- var _900=this.getAction(_8fe);
- _900.setRequestParms(_8ff);
- return _900.execute();
- };
- CCognosViewer.prototype.getCalculation=function(_901){
- var calc=null;
- var _903=this.getCalculationCache();
- if(_903[_901]){
- calc=_903[_901];
- }else{
- if(window[_901]&&typeof window[_901]=="function"){
- calc=new window[_901]();
- calc.setCognosViewer(this);
- }
- _903[_901]=calc;
- }
- return calc;
- };
- CCognosViewer.prototype.findBlueDotMenu=function(_904){
- var root=null;
- var _906=(_904)?_904:this.getToolbar();
- for(var idx=0;idx<_906.length;++idx){
- if(typeof _906[idx]._root!="undefined"){
- root=_906[idx]._root;
- break;
- }
- }
- return root;
- };
- CCognosViewer.prototype.findToolbarItem=function(_908,_909){
- var spec=typeof _909=="undefined"||_909==null?this.getToolbar():_909;
- var _90b=null;
- for(var _90c=0;_90c<spec.length;++_90c){
- var name=spec[_90c]["name"];
- if(typeof name!="undefined"&&name==_908){
- _90b=spec[_90c];
- break;
- }
- }
- return _90b;
- };
- CCognosViewer.prototype.findToolbarItemIndex=function(_90e,_90f){
- var spec=typeof _90f=="undefined"||_90f==null?this.getToolbar():_90f;
- var _911=null;
- for(var _912=0;_912<spec.length;++_912){
- var name=spec[_912]["name"];
- if(typeof name!="undefined"&&name==_90e){
- _911=_912;
- break;
- }
- }
- return _911;
- };
- CCognosViewer.prototype.addedButtonToToolbar=function(_914,_915,_916,_917){
- if(typeof _915!="undefined"&&_915!=null){
- if(this.findToolbarItem(_915.name,_914)==null){
- _916=this.findToolbarItemIndex(_916,_914);
- if(typeof _916!="undefined"&&_916!=null){
- _914.splice(++_916,0,_915);
- return true;
- }else{
- if(typeof _917!="undefined"&&_917!=null){
- _914.splice(_917,0,_915);
- return true;
- }
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.addDrillTargets=function(_918){
- this.m_drillTargets=_918;
- };
- CCognosViewer.prototype.getDrillTargets=function(){
- if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
- var _919=document.getElementById("CVIFrame"+this.getId());
- if(typeof _919!="undefined"&&_919!=null){
- if(_919.contentWindow.drillTargets){
- return _919.contentWindow.drillTargets;
- }
- }
- }
- return this.m_drillTargets;
- };
- CCognosViewer.prototype.getDrillTarget=function(idx){
- if(idx>=this.m_drillTargets.length){
- return null;
- }
- return this.m_drillTargets[idx];
- };
- CCognosViewer.prototype.getNumberOfDrillTargets=function(){
- return this.m_drillTargets.length;
- };
- CCognosViewer.prototype.isReportRenderingDone=function(){
- return this.m_reportRenderingDone;
- };
- CCognosViewer.prototype.setReportRenderingDone=function(flag){
- this.m_reportRenderingDone=flag;
- };
- CCognosViewer.prototype.hasAVSChart=function(){
- var _91c=this.getRAPReportInfo();
- if(_91c){
- var _91d=_91c.getDisplayTypes();
- return _91d.match("_v2")!=null||_91d.match("v2_")!=null;
- }
- return false;
- };
- CCognosViewer.prototype.getPinFreezeManager=function(){
- return this.m_pinFreezeManager;
- };
- CCognosViewer.prototype.getReportContextHelper=function(){
- if(!this.m_reportContextHelper){
- this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager());
- }
- return this.m_reportContextHelper;
- };
- CCognosViewer.prototype.getRAPReportInfo=function(){
- return this.m_RAPReportInfo;
- };
- CCognosViewer.prototype.setRAPReportInfo=function(_91e){
- this.m_RAPReportInfo=_91e;
- };
- CCognosViewer.prototype.isNodeVisible=function(node){
- if(this.m_pinFreezeManager){
- return this.m_pinFreezeManager.isNodeVisible(node);
- }
- return true;
- };
- CCognosViewer.prototype.getWarpRequestForm=function(){
- return document.getElementById("formWarpRequest"+this.getId());
- };
- CCognosViewer.prototype.getBrowser=function(){
- return this.sBrowser;
- };
- CCognosViewer.prototype.repaintDiv=function(oDiv){
- var _921=oDiv.style.display;
- oDiv.style.display="none";
- oDiv.style.display=_921;
- };
- CCognosViewer.prototype.isMetadataEmpty=function(){
- var oSC=this.getSelectionController();
- if(oSC){
- var _923=oSC.getCCDManager();
- if(_923){
- return _923.isMetadataEmpty();
- }
- }
- return true;
- };
- CCognosViewer.prototype.setContextMenu=function(_924){
- this.m_contextMenu=_924;
- };
- CCognosViewer.prototype.getContextMenu=function(){
- return this.m_contextMenu;
- };
- CCognosViewer.prototype.setToolbar=function(_925){
- this.m_toolbar=_925;
- };
- CCognosViewer.prototype.getToolbar=function(){
- return this.m_toolbar;
- };
- CCognosViewer.prototype.getAdvancedServerProperty=function(_926){
- if(this.m_advancedProperties&&this.m_advancedProperties[_926]!==undefined&&this.m_advancedProperties[_926]!==null){
- return this.m_advancedProperties[_926];
- }else{
- return null;
- }
- };
- CCognosViewer.prototype.hasPrompt=function(){
- if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
- var _927=false;
- if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
- _927=true;
- }else{
- var _928=new CParameterValues();
- var _929=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_929.childNodes.length==1){
- _928.loadWithOptions(_929.childNodes[0],true);
- var _92a=_928.length();
- for(var _92b=0;_92b<_92a;++_92b){
- var _92c=_928.getAt(_92b);
- if(_92c!==null&&_92c.length()>0&&_92c.name().indexOf("credential:")!=-1){
- _927=true;
- break;
- }
- }
- }
- }
- this.m_bHasPrompt=_927;
- }
- return this.m_bHasPrompt;
- };
- CCognosViewer.prototype.getDrillState=function(){
- return this.m_sStateData?this.m_sStateData:"";
- };
- CCognosViewer.prototype.isSelectionFilterEnabled=function(){
- if(typeof this.m_bSelectionFilterSwitch=="undefined"){
- this.m_bSelectionFilterSwitch=false;
- }
- return this.m_bSelectionFilterSwitch;
- };
- CCognosViewer.prototype.broadcastContextChange=function(evt,_92e){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastContextChange(_92e);
- }
- stopEventBubble(evt);
- };
- CCognosViewer.prototype.broadcastParameterChange=function(evt,_930){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastParameterChange(_930);
- }
- stopEventBubble(evt);
- };
- CCognosViewer.prototype.getReportDiv=function(){
- if(!this.m_nReportDiv){
- this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId);
- }
- return this.m_nReportDiv;
- };
- function CDocumentWriter(sId,_932){
- this.m_sId=sId;
- this.m_sText="";
- this.m_sScript=_932;
- };
- CDocumentWriter.prototype.isValid=function(){
- if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){
- return true;
- }
- return false;
- };
- CDocumentWriter.prototype.execute=function(){
- if(this.isValid()&&window.gScriptLoader){
- var _933=/document\.write(ln)?\s*\(/gi;
- var _934=this.m_sScript.replace(_933,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
- try{
- eval(_934);
- var _935=document.getElementById(this.m_sId);
- if(_935){
- _935.innerHTML=this.m_sText;
- return true;
- }
- }
- catch(e){
- }
- }
- return false;
- };
- CDocumentWriter.prototype.write=function(_936){
- var _937="";
- if(typeof _936=="function"){
- _937=eval(_936);
- }else{
- if(typeof _936=="string"){
- _937=_936;
- }
- }
- this.m_sText+=_937;
- };
- function setFocusToFirstTabItem(_938){
- if(!window.dojo){
- return;
- }
- var _939=dojo.query("*",_938);
- var _93a=_939.length;
- for(var i=0;i<_93a;i++){
- var node=_939[i];
- if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){
- if(node.getAttribute("tabIndex")==0){
- try{
- node.focus();
- }
- catch(e){
- }
- break;
- }
- }
- }
- };
- function ReportContextHelper(_93d){
- this.m_oCDManager=_93d;
- };
- ReportContextHelper.prototype.destroy=function(){
- if(this.m_oCDManager&&this.m_oCDManager.destroy){
- this.m_oCDManager.destroy();
- }
- delete this.m_oCDManager;
- };
- ReportContextHelper.prototype.processCtx=function(sCtx){
- var _93f=sCtx.split("::");
- var _940=[];
- for(var i=0;i<_93f.length;++i){
- _940[i]=_93f[i].split(":");
- }
- if(_940&&_940.length&&_940[0].length){
- return _940;
- }else{
- return null;
- }
- };
- ReportContextHelper.prototype.getDataItemName=function(sCtx){
- var _943=this.processCtx(sCtx);
- if(_943){
- return this.getRefDataItem(_943[0][0]);
- }
- return null;
- };
- ReportContextHelper.prototype.getRefDataItem=function(_944){
- var _945=this.m_oCDManager.GetRDIValue(_944);
- return (_945==null)?"":_945;
- };
- ReportContextHelper.prototype.getMun=function(_946){
- var aCtx=null;
- if(typeof _946==="string"){
- aCtx=this.processCtx(_946);
- }else{
- if(typeof _946==="number"){
- aCtx=this.processCtx(_946.toString());
- }else{
- aCtx=_946;
- }
- }
- if(aCtx){
- var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]);
- return (sMun==null)?"":sMun;
- }
- return "";
- };
- function CCDManager(cv){
- this.m_cd=null;
- this.m_md=null;
- this.m_oCV=null;
- this.m_dataItemInfo=null;
- };
- CCDManager.prototype.SetContextData=function(CD){
- if(this.m_cd){
- this.m_cd=null;
- }
- this.m_cd=CD;
- };
- CCDManager.prototype.SetMetadata=function(MD){
- if(this.m_md){
- this.m_md=null;
- }
- this.m_md=MD;
- };
- CCDManager.prototype.AddContextData=function(CD){
- if(!this.m_cd){
- this.m_cd=CD;
- }else{
- for(var i in CD){
- this.m_cd[i]=CD[i];
- }
- }
- };
- CCDManager.prototype.AddMetadata=function(MD){
- if(!this.m_md){
- this.m_md=MD;
- }else{
- for(var j in MD){
- this.m_md[j]=MD[j];
- }
- }
- };
- CCDManager.prototype.getClonedMetadataArray=function(){
- var _950={};
- applyJSONProperties(_950,this.m_md);
- return _950;
- };
- CCDManager.prototype.getClonedContextdataArray=function(){
- var _951={};
- applyJSONProperties(_951,this.m_cd);
- return _951;
- };
- CCDManager.prototype.SetCognosViewer=function(_952){
- if(_952){
- this.m_oCV=_952;
- }
- };
- CCDManager.prototype.onComplete_GetCDRequest=function(_953,_954){
- if(_953){
- var _955=_953.getResult();
- var _956=XMLBuilderLoadXMLFromString(_955);
- if(_956){
- var _957=_956.getElementsByTagName("Block");
- for(var i=0;i<_957.length;i++){
- var _959="";
- var _95a=_957[i].firstChild;
- while(_95a){
- _959+=_95a.nodeValue;
- _95a=_95a.nextSibling;
- }
- var cd=eval("("+_959+")");
- this.AddContextData(cd);
- }
- }
- }
- if(_954&&typeof _954=="function"){
- _954();
- }
- };
- CCDManager.prototype.FetchContextData=function(_95c,_95d){
- var _95e=[];
- var c=null,_960=_95c.length;
- for(var i=0;i<_960;++i){
- c=_95c[i];
- if(c!=""&&!this.ContextIdExists(c)){
- _95e.push(c);
- }
- }
- if(_95e.length){
- if(this.m_oCV){
- this.getContextData(_95e,_95d);
- }
- }
- return _95e.length;
- };
- CCDManager.prototype.getContextData=function(_962,_963){
- var oCV=this.m_oCV;
- var _965=new AsynchDataDispatcherEntry(oCV);
- _965.setCanBeQueued(false);
- if(!oCV.isBux){
- _965.forceSynchronous();
- }
- var form=document["formWarpRequest"+oCV.getId()];
- var _967=oCV.getConversation();
- var _968=oCV.getTracking();
- if(!_968&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _968=form["m_tracking"].value;
- }
- if(oCV.m_viewerFragment){
- var _969=oCV.getActiveRequest();
- if(_969&&_969.getFormField("m_tracking")==_968){
- return;
- }
- }
- var _96a={customArguments:[_963],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
- if(oCV.getStatus()=="prompting"){
- _96a["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
- }
- _965.setCallbacks(_96a);
- if(_967&&oCV.envParams["ui.action"]!="view"){
- _965.addFormField("ui.action","getContext");
- _965.addFormField("ui.conversation",_967);
- }else{
- var _96b=form["ui.object"];
- if(typeof _96b.length!="undefined"&&_96b.length>1){
- _965.addFormField("ui.object",form["ui.object"][0].value);
- }else{
- _965.addFormField("ui.object",form["ui.object"].value);
- }
- _965.addFormField("ui.action","getObjectContext");
- }
- _965.addFormField("cv.responseFormat","asynchDetailContext");
- _965.addFormField("context.format","initializer");
- _965.addFormField("context.type","reportService");
- _965.addFormField("context.selection",_962.join(","));
- _965.addNonEmptyStringFormField("m_tracking",_968);
- oCV.dispatchRequest(_965);
- };
- CCDManager.prototype.ContextIdExists=function(_96c){
- return (this.m_cd&&this.m_cd[_96c]?true:false);
- };
- CCDManager.prototype.HasContextData=function(){
- return (this.m_cd?true:false);
- };
- CCDManager.prototype.HasMetadata=function(){
- return (this.m_md?true:false);
- };
- CCDManager.prototype._getMDPropertyFromCD=function(_96d,_96e,_96f){
- var p=null;
- this.FetchContextData([_96d]);
- var cd=this.m_cd&&this.m_cd[_96d];
- if(cd){
- var md=this.m_md[cd[_96e]];
- if(md){
- p=md[_96f];
- }
- }
- return p;
- };
- CCDManager.prototype.GetDrillFlag=function(_973){
- return this._getMDPropertyFromCD(_973,"r","drill");
- };
- CCDManager.prototype.getModelPathFromBookletItem=function(_974){
- var mp=null;
- var md=this.m_md[_974];
- if(md){
- mp=md.mp;
- if(mp&&this.m_md[mp]){
- mp=this.m_md[mp].mp;
- }
- }
- return mp?mp:null;
- };
- CCDManager.prototype.GetBookletModelBasedDrillThru=function(_977){
- var p=null;
- var md=this.m_md[_977];
- if(md){
- p=md.modelBasedDrillThru;
- }
- return p?p:0;
- };
- CCDManager.prototype.GetDrillFlagForMember=function(_97a){
- var _97b=null;
- var d=this._getMDPropertyFromCD(_97a,"r","drill");
- if(d!==null&&this.m_cd[_97a].m){
- _97b=d;
- }
- return _97b;
- };
- CCDManager.prototype.GetDataType=function(_97d){
- return this._getMDPropertyFromCD(_97d,"r","dtype");
- };
- CCDManager.prototype.GetUsage=function(_97e){
- return this._getMDPropertyFromCD(_97e,"r","usage");
- };
- CCDManager.prototype.GetHUN=function(_97f){
- var hun=this._getMDPropertyFromCD(_97f,"h","h");
- if(!hun){
- var h=this._getMDPropertyFromCD(_97f,"r","h");
- if(h){
- hun=this.m_md[h].h;
- }
- }
- if(hun!=null&&hun.indexOf("[__ns_")==0){
- hun=null;
- }
- return hun;
- };
- CCDManager.prototype.GetQuery=function(_982){
- var qry=null;
- var q=this._getMDPropertyFromCD(_982,"r","q");
- if(q){
- qry=this.m_md[q].q;
- }
- return qry;
- };
- CCDManager.prototype.GetDepth=function(_985){
- return this._getMDPropertyFromCD(_985,"r","level");
- };
- CCDManager.prototype.GetDisplayValue=function(_986){
- var _987=null;
- this.FetchContextData([_986]);
- if(this.ContextIdExists(_986)&&this.m_cd[_986]){
- _987=this.m_cd[_986].u;
- }
- return _987;
- };
- CCDManager.prototype.GetPUN=function(_988){
- return this._getMDPropertyFromCD(_988,"p","p");
- };
- CCDManager.prototype.GetLUN=function(_989){
- return this._getMDPropertyFromCD(_989,"l","l");
- };
- CCDManager.prototype.GetMUN=function(_98a){
- return this._getMDPropertyFromCD(_98a,"m","m");
- };
- CCDManager.prototype.GetDUN=function(_98b){
- return this._getMDPropertyFromCD(_98b,"d","d");
- };
- CCDManager.prototype.GetQMID=function(_98c){
- return this._getMDPropertyFromCD(_98c,"i","i");
- };
- CCDManager.prototype.GetRDIValue=function(_98d){
- return this._getMDPropertyFromCD(_98d,"r","r");
- };
- CCDManager.prototype.GetBIValue=function(_98e){
- return this._getMDPropertyFromCD(_98e,"r","bi");
- };
- CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_991){
- var _992=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
- for(var _993=0;_993<_992.length;++_993){
- var _994=_992[_993].expression;
- var _995=_992[_993].type;
- if(_994==""){
- continue;
- }
- for(var _996 in this.m_md){
- if(this.m_md[_996][_995]==_994){
- for(var _997 in this.m_md){
- if(this.m_md[_997].r&&this.m_md[_997][_995]==_996){
- if(this.m_md[_997].drill!=0||_991==true){
- for(var ctx in this.m_cd){
- if(this.m_cd[ctx].r==_997&&this.m_cd[ctx].m){
- return ctx;
- }
- }
- }
- }
- }
- }
- }
- }
- return "";
- };
- CCDManager.prototype.GetContextIdForMUN=function(mun){
- var _99a=null;
- var _99b=null;
- for(var i in this.m_md){
- if(this.m_md[i].m==mun){
- _99a=i;
- break;
- }
- }
- if(_99a!=null){
- for(var j in this.m_cd){
- if(this.m_cd[j].m==_99a){
- _99b=j;
- break;
- }
- }
- }
- return _99b;
- };
- CCDManager.prototype.GetContextIdsForRDI=function(rdi){
- var _99f=[];
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi){
- _99f.push(i);
- }
- }
- return _99f;
- };
- CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_9a2){
- var _9a3=this.GetContextIdsForRDI(rdi);
- for(var i in this.m_cd){
- for(var j in _9a3){
- if(this.m_cd[i].r==_9a3[j]&&this.m_cd[i].u==_9a2){
- var _9a6=this.m_cd[i].m;
- if(_9a6){
- return this.m_md[_9a6].m;
- }
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
- var _9a8=null;
- var _9a9=null;
- var _9aa=this.GetContextIdsForRDI(rdi);
- this.FetchContextData([0]);
- for(var i in this.m_cd){
- for(var j in _9aa){
- if(this.m_cd[i].r==_9aa[j]){
- var _9ad=parseFloat(this.m_cd[i].u);
- if(_9ad==this.m_cd[i].u){
- if(_9a8==null||_9ad<_9a8){
- _9a8=_9ad;
- }
- if(_9a9==null||_9ad>_9a9){
- _9a9=_9ad;
- }
- }
- }
- }
- }
- if(_9a8!=null&&_9a9!=null){
- return eval("({ pageMin: "+_9a8+", pageMax: "+_9a9+"})");
- }
- };
- CCDManager.prototype.GetContextIdForDisplayValue=function(_9ae){
- var _9af=null;
- for(var i in this.m_cd){
- if(this.m_cd[i].u==_9ae){
- _9af=i;
- break;
- }
- }
- return _9af;
- };
- CCDManager.prototype.GetContextIdForUseValue=function(_9b1){
- var _9b2=null;
- var _9b3=null;
- var _9b4=null;
- for(var i in this.m_md){
- var md=this.m_md[i];
- for(var j in md){
- if(md[j]==_9b1){
- _9b2=i;
- _9b3=j;
- break;
- }
- }
- }
- if(_9b2!=null){
- for(var k in this.m_cd){
- if(this.m_cd[k][_9b3]==_9b2){
- _9b4=k;
- break;
- }
- }
- }
- return _9b4;
- };
- CCDManager.prototype.getDataItemInfo=function(){
- if(this.m_cd){
- var _9b9={};
- this.m_dataItemInfo={};
- for(var i in this.m_cd){
- var _9bb=this.m_cd[i].r;
- if(typeof _9bb!="undefined"){
- var _9bc=this.m_md[_9bb].r;
- if(this.m_dataItemInfo[_9bc]==null){
- this.m_dataItemInfo[_9bc]=1;
- }else{
- this.m_dataItemInfo[_9bc]++;
- }
- }
- }
- return CViewerCommon.toJSON(this.m_dataItemInfo);
- }
- return "";
- };
- CCDManager.prototype.DataItemInfoToJSON=function(){
- return this.getDataItemInfo();
- };
- CCDManager.prototype.MetadataToJSON=function(){
- if(this.m_md){
- return CViewerCommon.toJSON(this.m_md);
- }
- return "";
- };
- CCDManager.prototype.ContextDataToJSON=function(){
- if(this.m_cd){
- return CViewerCommon.toJSON(this.m_cd);
- }
- return "";
- };
- CCDManager.prototype.ContextDataSubsetToJSON=function(_9bd){
- if(_9bd<=0){
- return this.ContextDataToJSON();
- }
- if(this.m_cd){
- var _9be={};
- var _9bf={};
- for(var i in this.m_cd){
- var _9c1=this.m_cd[i].r;
- if(typeof _9c1!="undefined"){
- if(_9be[_9c1]==null){
- _9be[_9c1]=0;
- }else{
- _9be[_9c1]++;
- }
- if(_9be[_9c1]<_9bd){
- _9bf[i]=this.m_cd[i];
- }
- }
- }
- return CViewerCommon.toJSON(_9bf);
- }
- return "";
- };
- CCDManager.prototype.GetHUNForRDI=function(rdi,_9c3){
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi&&this.m_md[i].q==_9c3){
- var _9c5=this.m_md[i].h;
- if(_9c5){
- return this.m_md[_9c5].h;
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetMetadataIdForQueryName=function(_9c6){
- for(var i in this.m_md){
- if(this.m_md[i].q===_9c6){
- return i;
- }
- }
- return null;
- };
- CCDManager.prototype._isEmptyObject=function(obj){
- for(var _9c9 in obj){
- return false;
- }
- return true;
- };
- CCDManager.prototype.isMetadataEmpty=function(){
- if(this.m_md){
- return this._isEmptyObject(this.m_md);
- }
- return true;
- };
- CCDManager.prototype.GetBestPossibleItemName=function(_9ca){
- var item=this.m_cd[_9ca];
- if(!item){
- return null;
- }
- if(item.l&&this.m_md[item.l].l){
- return this._getStringInLastBracket(this.m_md[item.l].l);
- }
- if(item.r&&this.m_md[item.r].r){
- return this._getStringInLastBracket(this.m_md[item.r].r);
- }
- if(item.h&&this.m_md[item.h].h){
- return this._getStringInLastBracket(this.m_md[item.h].h);
- }
- if(item.i&&this.m_md[item.i].i){
- return this._getStringInLastBracket(this.m_md[item.i].i);
- }
- return null;
- };
- CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_9cc){
- var item=this.m_cd[_9cc];
- if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){
- return this._getStringInLastBracket(this.m_md[item.m].m);
- }
- return null;
- };
- CCDManager.prototype._getStringInLastBracket=function(str){
- if(str&&str.indexOf("].[")>0){
- var _9cf=str.split("].[");
- var _9d0=_9cf[_9cf.length-1];
- return _9d0.substring(0,_9d0.length-1);
- }
- return str;
- };
- CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_9d1){
- var _9d2=this._getNamespaceAndDimensionFromUniqueName(_9d1);
- if(_9d2&&this.m_md){
- for(var _9d3 in this.m_md){
- var sMun=this.m_md[_9d3].m;
- if(sMun&&sMun.length>0){
- if(sMun.indexOf("->:[TM].")>0){
- var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
- if(oObj.dimension&&oObj.dimension===_9d2.dimension&&oObj.namespace!==_9d2.namespace){
- var _9d6=_9d1.indexOf(".");
- return oObj.namespace+_9d1.substr(_9d6,_9d1.length);
- }
- }else{
- var _9d7=sMun.indexOf("->:[");
- if(_9d7>0){
- if(sMun.substr(_9d7+4,4)!=="TM]."){
- return _9d1;
- }
- }
- }
- }
- }
- }
- return _9d1;
- };
- CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_9d8){
- if(_9d8&&_9d8.length>0&&_9d8.indexOf("].[")>0){
- var _9d9=_9d8.split("].[");
- if(_9d9.length>1){
- return {"namespace":_9d9[0]+"]","dimension":"["+_9d9[1]+"]"};
- }
- }
- return null;
- };
- CCDManager.prototype.destroy=function(){
- delete this.m_cd;
- delete this.m_md;
- delete this.m_oCV;
- delete this.m_dataItemInfo;
- };
- function CSelectionXml(_9da,_9db,_9dc){
- this.queries={};
- this.burstContext=_9da||"";
- this.expressionLocale=_9db||"";
- this.contentLocale=_9dc||"";
- };
- function SC_SingleSelection(){
- this.rows=[];
- this.cols=[];
- this.sections=[];
- this.measures=[];
- this.layoutElementId="";
- };
- function SC_SingleQuery(){
- this.selections=[];
- this.slicers=[];
- this.filters=[];
- };
- function SC_SingleSlicer(){
- };
- function SC_SingleDetailFilter(){
- };
- function SC_SingleSummaryFilter(){
- };
- CSelectionXml.prototype.BuildSelectionFromController=function(sc){
- if(sc){
- var _9de=sc.getAllSelectedObjects();
- for(var s=0;s<_9de.length;++s){
- var _9e0=_9de[s];
- var _9e1=_9e0.getSelectedContextIds();
- var muns=_9e0.getMuns();
- var _9e3=muns.length;
- var _9e4=new SC_SingleSelection();
- _9e4.layoutElementId=_9e0.getLayoutElementId();
- var _9e5=null;
- for(var i=0;i<_9e3;++i){
- var j,_9e8,_9e9;
- if(i===0&&_9e3===1){
- for(j=0;j<muns[i].length;++j){
- _9e8=_9e1[i][j];
- if(_9e8!=0){
- if(j===0){
- _9e5=sc.getRefQuery(_9e8);
- _9e9=_9e0.getDisplayValues()[j];
- this._buildMeasureSelection(sc,_9e8,_9e4.measures,_9e9,j,_9e0.getLayoutType());
- }else{
- if(sc.getUsageInfo(_9e8)!=2){
- this._buildEdgeSelection(sc,_9e8,_9e4.cols,j);
- }
- }
- }
- }
- }else{
- for(j=0;j<muns[i].length;++j){
- _9e8=_9e1[i][j];
- if(_9e8!=0){
- if(i===0){
- _9e9=_9e0.getDisplayValues()[j];
- _9e5=sc.getRefQuery(_9e8);
- this._buildMeasureSelection(sc,_9e8,_9e4.measures,_9e9,j,_9e0.getLayoutType());
- }else{
- if(i===1){
- this._buildEdgeSelection(sc,_9e8,_9e4.rows,j);
- }else{
- if(i===2){
- this._buildEdgeSelection(sc,_9e8,_9e4.cols,j);
- }else{
- this._buildSectionSelection(sc,_9e8,_9e4.sections,j);
- }
- }
- }
- }
- }
- }
- }
- this.AddSelection(_9e5,_9e4);
- }
- }
- };
- CSelectionXml.prototype.AddSelection=function(_9ea,_9eb){
- if(!this.queries[_9ea]){
- this.queries[_9ea]=new SC_SingleQuery();
- }
- this.queries[_9ea].selections.push(_9eb);
- };
- CSelectionXml.prototype._buildMeasureSelection=function(sc,_9ed,_9ee,_9ef,idx,_9f1){
- if(_9f1==""||_9f1==null){
- _9f1="datavalue";
- }
- if(_9ed){
- _9ee.push({name:sc.getRefDataItem(_9ed),values:[{use:sc.getUseValue(_9ed),display:_9ef}],order:idx,hun:sc.getHun(_9ed),dataType:_9f1,usage:sc.getUsageInfo(_9ed),dtype:sc.getDataType(_9ed),selection:"true"});
- }
- };
- CSelectionXml.prototype._buildEdgeSelection=function(sc,_9f3,_9f4,idx){
- if(_9f3){
- _9f4.push({name:sc.getRefDataItem(_9f3),values:[{use:this.getUseValue(sc,_9f3),display:sc.getDisplayValue(_9f3)}],order:idx,lun:sc.getLun(_9f3),hun:sc.getHun(_9f3),dataType:"columnTitle",usage:sc.getUsageInfo(_9f3),dtype:sc.getDataType(_9f3)});
- }
- };
- CSelectionXml.prototype._buildSectionSelection=function(sc,_9f7,_9f8,idx){
- if(_9f7){
- _9f8.push({name:sc.getRefDataItem(_9f7),values:[{use:this.getUseValue(sc,_9f7),display:sc.getDisplayValue(_9f7)}],order:idx,lun:sc.getLun(_9f7),hun:sc.getHun(_9f7),dataType:"section",usage:sc.getUsageInfo(_9f7),dtype:sc.getDataType(_9f7),queryRef:sc.getRefQuery(_9f7)});
- }
- };
- CSelectionXml.prototype.getUseValue=function(sc,_9fb){
- var _9fc=sc.getMun(_9fb);
- if(_9fc==""){
- _9fc=sc.getUseValue(_9fb);
- }
- return _9fc;
- };
- CSelectionXml.prototype.toXml=function(){
- var _9fd=XMLBuilderCreateXMLDocument("selections");
- var _9fe=_9fd.documentElement;
- XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
- XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
- XMLBuilderSetAttributeNodeNS(_9fe,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
- XMLBuilderSetAttributeNodeNS(_9fe,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
- XMLBuilderSetAttributeNodeNS(_9fe,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _9fe.setAttribute("contentLocale",this.contentLocale);
- _9fe.setAttribute("expressionLocale",this.expressionLocale);
- for(var q in this.queries){
- this._queryToXml(_9fe,q,this.queries[q]);
- }
- this._burstToXml(_9fe);
- return XMLBuilderSerializeNode(_9fd);
- };
- CSelectionXml.prototype._queryToXml=function(_a00,name,obj){
- var _a03=_a00.ownerDocument.createElement("query");
- _a03.setAttribute("name",name);
- for(var _a04=0;_a04<obj.selections.length;++_a04){
- this._selectionToXml(_a03,obj.selections[_a04]);
- }
- for(var _a05=0;_a05<obj.slicers.length;++_a05){
- this._slicersToXml(_a03,obj.slicers[_a05]);
- }
- for(var _a06=0;_a06<obj.selections.length;++_a06){
- this._filtersToXml(_a03,obj.selections[_a06]);
- }
- _a00.appendChild(_a03);
- };
- CSelectionXml.prototype._selectionToXml=function(_a07,_a08){
- var doc=_a07.ownerDocument;
- var _a0a=doc.createElement("selection");
- _a07.appendChild(_a0a);
- this._edgeToXml(_a0a,"row",_a08.rows);
- this._edgeToXml(_a0a,"column",_a08.cols);
- this._edgeToXml(_a0a,"measure",_a08.measures);
- this._edgeToXml(_a0a,"section",_a08.sections);
- var _a0b=doc.createElement("layoutElementId");
- _a0b.appendChild(doc.createTextNode(_a08.layoutElementId));
- _a0a.appendChild(_a0b);
- };
- CSelectionXml.prototype._edgeToXml=function(_a0c,_a0d,_a0e){
- var doc=_a0c.ownerDocument;
- var _a10=doc.createElement(_a0d+"s");
- _a0c.appendChild(_a10);
- for(var i=0;i<_a0e.length;++i){
- var _a12=doc.createElement(_a0d);
- _a10.appendChild(_a12);
- var edge=_a0e[i];
- for(var j in edge){
- if(j!=="name"&&j!=="values"){
- _a12.setAttribute(j,edge[j]!==null?edge[j]:"");
- }
- }
- this._itemToXml(_a12,edge.name,edge.values);
- }
- };
- CSelectionXml.prototype._itemToXml=function(_a15,name,_a17){
- var doc=_a15.ownerDocument;
- var _a19=doc.createElement("item");
- XMLBuilderSetAttributeNodeNS(_a19,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
- var _a1a=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",doc);
- XMLBuilderSetAttributeNodeNS(_a1a,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _a1a.appendChild(doc.createTextNode(name));
- _a19.appendChild(_a1a);
- var _a1b=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",doc);
- XMLBuilderSetAttributeNodeNS(_a1b,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- XMLBuilderSetAttributeNodeNS(_a1b,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- _a19.appendChild(_a1b);
- for(var j=0;j<_a17.length;j++){
- var _a1d=doc.createElement("item");
- XMLBuilderSetAttributeNodeNS(_a1d,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- var _a1e=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",doc);
- XMLBuilderSetAttributeNodeNS(_a1e,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- if(_a17[j].use){
- _a1e.appendChild(doc.createTextNode(_a17[j].use));
- }else{
- if(_a17[j].display){
- _a1e.appendChild(doc.createTextNode(_a17[j].display));
- }else{
- _a1e.appendChild(doc.createTextNode(""));
- }
- }
- var _a1f=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",doc);
- XMLBuilderSetAttributeNodeNS(_a1f,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- if(_a17[j].display){
- _a1f.appendChild(doc.createTextNode(_a17[j].display));
- }else{
- _a1f.appendChild(doc.createTextNode(""));
- }
- _a1d.appendChild(_a1e);
- _a1d.appendChild(_a1f);
- _a1b.appendChild(_a1d);
- }
- _a15.appendChild(_a19);
- };
- CSelectionXml.prototype._burstToXml=function(_a20){
- var doc=_a20.ownerDocument;
- var _a22=doc.createElement("burst-context");
- _a22.appendChild(doc.createTextNode(this.burstContext));
- _a20.appendChild(_a22);
- };
- CSelectionXml.prototype._slicersToXml=function(_a23,_a24){
- };
- CSelectionXml.prototype._filtersToXml=function(_a25,_a26){
- };
- var GUtil={};
- GUtil.createHiddenForm=function(name,_a28,_a29,_a2a){
- var form=document.getElementById(name);
- if(form){
- document.body.removeChild(form);
- }
- form=document.createElement("form");
- form.id=name;
- form.name=name;
- form.method=_a28;
- form.style.display="none";
- form.action=document.forms["formWarpRequest"+_a29].action;
- form.target=_a2a+(new Date()).getTime();
- document.body.appendChild(form);
- return form;
- };
- GUtil.createFormField=function(el,name,_a2e){
- var _a2f=document.createElement("input");
- _a2f.type="hidden";
- _a2f.name=name;
- _a2f.value=_a2e;
- el.appendChild(_a2f);
- };
- GUtil.generateCallback=function(func,_a31,_a32){
- if(func){
- var _a33=_a32||this;
- _a31=(_a31 instanceof Array)?_a31:[];
- return (function(_a34){
- if(typeof _a34!="undefined"&&_a31.length==0){
- _a31.push(_a34);
- }
- return func.apply(_a33,_a31);
- });
- }else{
- return (function(){
- });
- }
- };
- GUtil.destroyProperties=function(_a35,_a36){
- var _a37;
- if(_a35 instanceof Array){
- for(var i=0;i<_a35.length;i++){
- _a37=_a35[i];
- if(_a37 instanceof String){
- _a37=null;
- }else{
- if(_a37&&_a37.destroy&&!_a37._beingDestroyed){
- _a37.destroy();
- }
- GUtil.destroyProperties(_a37);
- }
- }
- }else{
- if(_a35 instanceof Object){
- if(_a35._beingDestroyed){
- return;
- }
- var obj=_a35;
- obj._beingDestroyed=true;
- for(var _a3a in obj){
- _a37=obj[_a3a];
- if(_a3a==="_beingDestroyed"||_a3a==="m_destroyed"||_a3a==="_destroyed"||typeof _a37=="function"){
- continue;
- }
- if(_a37 instanceof Array){
- GUtil.destroyProperties(_a37);
- }else{
- if(_a37 instanceof Object){
- if(typeof _a37.destroy=="function"&&!_a37._destroyed&&(_a37!==CCognosViewer||_a36)){
- _a37.destroy();
- }
- }
- }
- delete obj[_a3a];
- }
- }
- }
- };
- cvLoadDialog=function(_a3b,_a3c,_a3d,_a3e,_a3f,_a40){
- _a40=((_a40===undefined)?true:_a40);
- var _a41=document.getElementById("formWarpRequest"+_a3b.getId());
- if(_a41&&_a3b){
- _a3b.getWorkingDialog().hide();
- var _a42="";
- var _a43="";
- var _a44=null;
- if(_a3b.isAccessibleMode()){
- _a42="winNAT_"+(new Date()).getTime();
- _a43=_a3b.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
- }else{
- var _a45=document.body;
- _a44=new CModal("","",_a45,null,null,_a3e,_a3d,true,true,false,true,_a3b.getWebContentRoot());
- if(typeof _a3f=="string"){
- document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_a3f);
- }
- document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
- _a42=CMODAL_CONTENT_ID;
- }
- var _a46=document.createElement("FORM");
- _a46.method="POST";
- _a46.action=_a3b.getGateway();
- _a46.target=_a42;
- _a46.style.margin="0px";
- document.body.appendChild(_a46);
- for(var _a47 in _a3c){
- _a46.appendChild(createHiddenFormField(_a47,_a3c[_a47]));
- }
- if(_a40){
- _a46.appendChild(createHiddenFormField("cv.id",_a3b.getId()));
- _a46.appendChild(createHiddenFormField("b_action","xts.run"));
- _a46.appendChild(createHiddenFormField("ui.action",_a41["ui.action"].value));
- _a46.appendChild(createHiddenFormField("ui.object",_a41["ui.object"].value));
- if(typeof _a3b.rvMainWnd!="undefined"){
- _a46.appendChild(createHiddenFormField("run.outputFormat",_a3b.rvMainWnd.getCurrentFormat()));
- }
- if(typeof _a41["run.outputLocale"]!="undefined"){
- _a46.appendChild(createHiddenFormField("run.outputLocale",_a41["run.outputLocale"].value));
- }
- if(typeof _a46["backURL"]=="undefined"&&typeof _a46["ui.backURL"]=="undefined"&&typeof _a41["ui.backURL"]!="undefined"){
- _a46.appendChild(createHiddenFormField("ui.backURL",_a41["ui.backURL"].value));
- }
- if(typeof _a3b!="undefined"&&typeof _a3b.getConversation!="undefined"&&typeof _a3b.getTracking!="undefined"){
- _a46.appendChild(createHiddenFormField("ui.conversation",_a3b.getConversation()));
- _a46.appendChild(createHiddenFormField("m_tracking",_a3b.getTracking()));
- if(_a3b.envParams["ui.name"]!="undefined"){
- _a46.appendChild(createHiddenFormField("ui.name",_a3b.envParams["ui.name"]));
- }
- }
- }
- var _a48=window.onbeforeunload;
- window.onbeforeunload=null;
- if(_a3b.isAccessibleMode()){
- window.open(_a43,_a42,"rv");
- _a46.submit();
- }else{
- _a46.submit();
- _a44.show();
- }
- window.onbeforeunload=_a48;
- document.body.removeChild(_a46);
- _a3b.modalShown=true;
- }
- };
- function createHiddenFormField(name,_a4a){
- var _a4b=document.createElement("input");
- _a4b.setAttribute("type","hidden");
- _a4b.setAttribute("name",name);
- _a4b.setAttribute("id",name);
- _a4b.setAttribute("value",_a4a);
- return (_a4b);
- };
- function isAuthenticationFault(_a4c){
- if(_a4c!=null){
- var _a4d=XMLHelper_FindChildByTagName(_a4c,"CAM",true);
- return (_a4d!=null&&XMLHelper_FindChildByTagName(_a4d,"promptInfo",true)!=null);
- }
- };
- function processAuthenticationFault(_a4e,_a4f){
- if(isAuthenticationFault(_a4e)){
- launchLogOnDialog(_a4f,_a4e);
- return true;
- }
- return false;
- };
- function isObjectEmpty(_a50){
- for(var _a51 in _a50){
- if(_a50.hasOwnProperty(_a51)){
- return false;
- }
- }
- return true;
- };
- function launchLogOnDialog(cvID,_a53){
- try{
- var oCV=getCognosViewerObjectRef(cvID);
- var _a55={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
- if(_a53!=null){
- var _a56=XMLHelper_FindChildrenByTagName(_a53,"namespace",true);
- if(_a56!=null){
- for(var _a57=0;_a57<_a56.length;++_a57){
- var _a58=_a56[_a57];
- if(_a58!=null){
- var _a59=XMLHelper_FindChildByTagName(_a58,"name",false);
- var _a5a=XMLHelper_FindChildByTagName(_a58,"value",false);
- if(_a59!=null&&_a5a!=null){
- var _a5b=XMLHelper_GetText(_a59);
- var _a5c=XMLHelper_GetText(_a5a);
- if(_a5b!=null&&_a5b.length>0){
- _a55[_a5b]=_a5c;
- }
- }
- }
- }
- }
- }
- cvLoadDialog(oCV,_a55,540,460,null,false);
- }
- catch(exception){
- }
- };
- function getCVWaitingOnFault(){
- var oCV=null;
- for(var _a5e=0;_a5e<window.gaRV_INSTANCES.length;_a5e++){
- if(window.gaRV_INSTANCES[_a5e].getRetryDispatcherEntry()!=null){
- oCV=window.gaRV_INSTANCES[_a5e];
- break;
- }
- }
- return oCV;
- };
- function ccModalCallBack(_a5f,data){
- var oCV=getCVWaitingOnFault();
- destroyCModal();
- if(typeof HiddenIframeDispatcherEntry=="function"&&HiddenIframeDispatcherEntry.hideIframe){
- var oCV=window.gaRV_INSTANCES[0];
- if(oCV){
- HiddenIframeDispatcherEntry.hideIframe(oCV.getId());
- }
- }
- if(oCV!=null){
- if(typeof _a5f!="undefined"&&_a5f=="ok"){
- var _a62=oCV.getRetryDispatcherEntry();
- if(_a62){
- _a62.retryRequest();
- }
- if(oCV.getRV()!=null){
- oCV.getRV().updateUserName();
- }
- }else{
- oCV.rvMainWnd.hideOpenMenus();
- }
- }
- };
- function closeErrorPage(){
- var oCV=getCVWaitingOnFault();
- destroyCModal();
- if(oCV!=null){
- oCV.setRetryDispatcherEntry(null);
- oCV.rvMainWnd.hideOpenMenus();
- }
- };
- function getCrossBrowserNode(evt,_a65){
- var node=null;
- if(_a65&&evt.explicitOriginalTarget){
- node=evt.explicitOriginalTarget;
- }else{
- if(evt.originalTarget){
- node=evt.originalTarget;
- }else{
- if(evt.target){
- node=evt.target;
- }else{
- if(evt.srcElement){
- node=evt.srcElement;
- }
- }
- }
- }
- try{
- if(node&&node.nodeType==3){
- node=node.parentNode;
- }
- }
- catch(ex){
- }
- return node;
- };
- function getNodeFromEvent(evt,_a68){
- var node=getCrossBrowserNode(evt,true);
- if(node&&node.getAttribute&&node.getAttribute("name")=="primarySelectionDiv"){
- node=node.parentNode.firstChild;
- }
- if(node&&node.getAttribute&&node.getAttribute("flashChartContainer")=="true"){
- node=node.firstChild;
- }
- if(node&&node.getAttribute&&node.getAttribute("chartContainer")=="true"&&node.childNodes){
- for(var i=0;i<node.childNodes.length;i++){
- if(node.childNodes[i].nodeName.toLowerCase()=="img"){
- node=node.childNodes[i];
- break;
- }
- }
- }else{
- if(!_a68&&node&&node.nodeName&&node.nodeName.toLowerCase()=="img"&&node.getAttribute("rsvpChart")!="true"){
- node=node.parentNode;
- }
- }
- return node;
- };
- function getCtxNodeFromEvent(evt){
- try{
- var node=getCrossBrowserNode(evt);
- var _a6d=node.nodeName.toUpperCase();
- if((_a6d=="SPAN"||_a6d=="AREA"||_a6d=="IMG")&&node.getAttribute("ctx")!=null){
- return node;
- }else{
- if(_a6d=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
- return node.parentNode;
- }
- }
- }
- catch(exception){
- }
- return null;
- };
- function getDocumentFromEvent(evt){
- var node=getCrossBrowserNode(evt,true);
- var _a70=node.document?node.document:node.ownerDocument;
- return _a70;
- };
- function stopEventBubble(evt){
- evt.returnValue=false;
- evt.cancelBubble=true;
- if(typeof evt.stopPropagation!="undefined"){
- evt.stopPropagation();
- }
- if(typeof evt.preventDefault!="undefined"){
- evt.preventDefault();
- }
- return false;
- };
- function setNodeFocus(evt){
- evt=(evt)?evt:((event)?event:null);
- var _a73=getNodeFromEvent(evt);
- if(_a73&&_a73.nodeName){
- var _a74=_a73.nodeName.toLowerCase();
- if((_a74=="td"||_a74=="span")&&_a73.childNodes&&_a73.childNodes.length>0&&_a73.childNodes[0].className=="textItem"){
- try{
- _a73.childNodes[0].focus();
- }
- catch(e){
- if(typeof console!=="undefined"&&console.log){
- console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js");
- }
- }
- }
- }
- };
- function html_encode(str){
- return str.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");
- };
- function replaceNewLine(_a76){
- var regX=/\r\n|\r|\n/g;
- var _a78="<br/>";
- return _a76.replace(regX,_a78);
- };
- function xml_encode(_a79){
- var _a7a=""+_a79;
- if((_a7a=="0")||((_a79!=null)&&(_a79!=false))){
- _a7a=_a7a.replace(/&/g,"&");
- _a7a=_a7a.replace(/</g,"<");
- _a7a=_a7a.replace(/>/g,">");
- _a7a=_a7a.replace(/"/g,""");
- _a7a=_a7a.replace(/'/g,"'");
- }else{
- if(_a79==null){
- _a7a="";
- }
- }
- return _a7a;
- };
- function xml_decodeParser(sAll,_a7c){
- var _a7d=sAll;
- switch(_a7c){
- case "amp":
- _a7d="&";
- break;
- case "lt":
- _a7d="<";
- break;
- case "gt":
- _a7d=">";
- break;
- case "quot":
- _a7d="\"";
- break;
- case "apos":
- _a7d="'";
- break;
- }
- return _a7d;
- };
- function xml_decode(_a7e){
- var _a7f=""+_a7e;
- if((_a7f=="0")||((_a7e!=null)&&(_a7e!=false))){
- _a7f=_a7f.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
- }else{
- if(_a7e==null){
- _a7f="";
- }
- }
- return _a7f;
- };
- function xpath_attr_encode(_a80){
- var _a81=null;
- if(_a80.indexOf("'")>=0&&_a80.indexOf("\"")>=0){
- var _a82=_a80.split("\"");
- _a81="concat(";
- for(var i=0;i<_a82.length;++i){
- if(i>0){
- _a81+=",";
- }
- if(_a82[i].length>0){
- _a81+=("\""+_a82[i]+"\"");
- }else{
- _a81+="'\"'";
- }
- }
- _a81+=")";
- }else{
- if(_a80.indexOf("'")>=0){
- _a81="\""+_a80+"\"";
- }else{
- _a81="'"+_a80+"'";
- }
- }
- return _a81;
- };
- function getCognosViewerObjectString(sId){
- return "oCV"+sId;
- };
- function getCognosViewerObjectRefAsString(sId){
- return "window."+getCognosViewerObjectString(sId);
- };
- function getCognosViewerObjectRef(sId){
- return window[getCognosViewerObjectString(sId)];
- };
- function getCognosViewerSCObjectString(sId){
- return "oCVSC"+sId;
- };
- function getCognosViewerSCObjectRefAsString(sId){
- return "window."+getCognosViewerSCObjectString(sId);
- };
- function getCognosViewerSCObjectRef(sId){
- return window[getCognosViewerSCObjectString(sId)];
- };
- function cleanupGlobalObjects(sId){
- cleanupVariable(getCognosViewerObjectString(sId));
- cleanupVariable(getCognosViewerSCObjectString(sId));
- };
- function cleanupVariable(_a8b){
- if(typeof window[_a8b]!="undefined"&&window[_a8b]){
- if(isIE()){
- eval("delete "+_a8b);
- }else{
- delete window[_a8b];
- }
- }
- };
- function loadClass(_a8c){
- try{
- var _a8d=eval("new "+_a8c+"();");
- return _a8d;
- }
- catch(e){
- return null;
- }
- };
- function getElementsByClassName(oElm,_a8f,_a90){
- var _a91=(_a8f=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_a8f);
- var _a92=[];
- var _a93=new RegExp("(^|\\s)"+_a90+"(\\s|$)");
- var _a94=_a91.length;
- for(var i=0;i<_a94;i++){
- var _a96=_a91[i];
- if(_a93.test(_a96.className)){
- _a92.push(_a96);
- }
- }
- return _a92;
- };
- function getImmediateLayoutContainerId(node){
- var _a98=node;
- while(_a98!=null){
- if(_a98.getAttribute&&_a98.getAttribute("lid")!=null){
- return _a98.getAttribute("lid");
- }
- _a98=_a98.parentNode;
- }
- return null;
- };
- function getChildElementsByAttribute(oElm,_a9a,_a9b,_a9c){
- return getDescendantElementsByAttribute(oElm,_a9a,_a9b,_a9c,true);
- };
- function getElementsByAttribute(oElm,_a9e,_a9f,_aa0,_aa1,_aa2){
- return getDescendantElementsByAttribute(oElm,_a9e,_a9f,_aa0,false,_aa1,_aa2);
- };
- function getDescendantElementsByAttribute(oElm,_aa4,_aa5,_aa6,_aa7,_aa8,_aa9){
- var _aaa=[];
- var _aab=null;
- if(typeof _aa9==="undefined"){
- _aab=(typeof _aa6!="undefined")?new RegExp("(^|\\s)"+_aa6+"(\\s|$)","i"):null;
- }else{
- _aab=_aa9;
- }
- if(typeof _aa4=="string"){
- _aa4=[_aa4];
- }
- var _aac=(oElm?_aa4.length:0);
- for(var _aad=0;_aad<_aac;_aad++){
- var _aae=null;
- if(_aa7){
- if(_aa4[_aad]=="*"&&oElm.all){
- _aae=oElm.childNodes;
- }else{
- _aae=[];
- var _aaf=oElm.childNodes;
- for(var i=0;i<_aaf.length;++i){
- if(_aaf[i].nodeName.toLowerCase()==_aa4[_aad].toLowerCase()){
- _aae.push(_aaf[i]);
- }
- }
- }
- }else{
- _aae=(_aa4[_aad]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_aa4[_aad]);
- }
- var _ab1=_aae.length;
- for(var idx=0;idx<_ab1;idx++){
- var _ab3=_aae[idx];
- var _ab4=_ab3.getAttribute&&_ab3.getAttribute(_aa5);
- if(_ab4!==null){
- var _ab5=null;
- if(typeof _ab4==="number"){
- _ab5=String(_ab4);
- }else{
- if(typeof _ab4==="string"&&_ab4.length>0){
- _ab5=_ab4;
- }
- }
- if(_ab5!==null){
- if(typeof _aa6=="undefined"||(_aab&&_aab.test(_ab5))){
- _aaa.push(_ab3);
- if(_aa8!=-1&&_aaa.length>_aa8){
- return [];
- }else{
- if(_aa8==1&&_aaa.length==1){
- return _aaa;
- }
- }
- }
- }
- }
- }
- }
- return _aaa;
- };
- function savedOutputDoneLoading(cvId,_ab7){
- var oCV=window["oCV"+cvId];
- var _ab9=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
- var _aba=(_ab9?_ab9.getSavedOutput():null);
- if(_aba){
- _aba.outputDoneLoading();
- }else{
- if(_ab7<5){
- _ab7++;
- var _abb=function(){
- savedOutputDoneLoading(cvId,_ab7);
- };
- setTimeout(_abb,100);
- }
- }
- };
- function getNavVer(){
- var temp;
- if(isIE()){
- return getIEVersion();
- }else{
- temp=navigator.userAgent.split("/");
- return parseFloat(temp[temp.length-1]);
- }
- };
- function isSafari(){
- return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1);
- };
- function isIE(){
- return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1);
- };
- function getIEVersion(){
- var _abd=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
- return _abd?parseFloat(_abd[1]):null;
- };
- function isFF(){
- return (navigator.userAgent.indexOf("Firefox")!=-1);
- };
- function isIOS(){
- return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1;
- };
- function displayChart(_abe,_abf,_ac0,_ac1){
- if(_abf.length>1){
- document.images[_abe].src=_abf;
- }
- };
- function isFlashChartNode(evt){
- var node=getNodeFromEvent(evt);
- if(node!=null&&typeof node.getAttribute=="function"){
- return node.getAttribute("flashChart")!=null;
- }
- return false;
- };
- function onFlashChartRightClick(evt){
- if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){
- return onViewerChartFocus(evt);
- }
- };
- function onViewerChartFocus(evt){
- if(evt.stopPropagation){
- evt.stopPropagation();
- }
- if(evt.preventDefault){
- evt.preventDefault();
- }
- if(evt.preventCapture){
- evt.preventCapture();
- }
- if(evt.preventBubble){
- evt.preventBubble();
- }
- var node=getNodeFromEvent(evt);
- var _ac7=node.getAttribute("viewerId");
- if(!_ac7){
- _ac7=node.parentNode.getAttribute("viewerId");
- }
- if(!_ac7){
- return;
- }
- var oCV=window["oCV"+_ac7];
- var _ac9=oCV.getAction("Selection");
- _ac9.pageClicked(evt);
- return stopEventBubble(evt);
- };
- function clientToScreenCoords(_aca,_acb){
- var _acc=_aca;
- var _acd={topCoord:0,leftCoord:0};
- while(_acc!=null&&_acc!=_acb){
- _acd.topCoord+=_acc.offsetTop;
- _acd.leftCoord+=_acc.offsetLeft;
- _acc=_acc.offsetParent;
- }
- return _acd;
- };
- function getCurrentPosistionString(oCV,_acf,_ad0){
- var _ad1=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
- var _ad2=/\{0\}/;
- var _ad3=/\{1\}/;
- _ad1=_ad1.replace(_ad2,_acf);
- _ad1=" "+_ad1.replace(_ad3,_ad0)+" ";
- return _ad1;
- };
- function applyJSONProperties(obj,_ad5){
- for(property in _ad5){
- if(typeof _ad5[property]=="object"&&!(_ad5[property] instanceof Array)){
- if(typeof obj[property]=="undefined"){
- obj[property]={};
- }
- applyJSONProperties(obj[property],_ad5[property]);
- }else{
- obj[property]=_ad5[property];
- }
- }
- };
- function CViewerCommon(){
- };
- CViewerCommon.openNewWindowOrTab=function(sURL,_ad7){
- return window.open(sURL,_ad7);
- };
- CViewerCommon.toJSON=function(obj){
- var type=typeof (obj);
- if(type!="object"||type===null){
- if(type==="string"){
- obj="\""+obj+"\"";
- }
- return String(obj);
- }else{
- var _ada;
- var prop;
- var json=[];
- var _add=(obj&&obj.constructor==Array);
- for(_ada in obj){
- prop=obj[_ada];
- type=typeof (prop);
- if(type==="string"){
- prop="\""+prop+"\"";
- }else{
- if(type=="object"&&prop!==null){
- prop=CViewerCommon.toJSON(prop);
- }
- }
- json.push((_add?"":"\""+_ada+"\":")+String(prop));
- }
- return (_add?"[":"{")+String(json)+(_add?"]":"}");
- }
- };
- function resizePinnedContainers(){
- var oCV=window.gaRV_INSTANCES[0];
- if(oCV&&!oCV.m_viewerFragment){
- var _adf=oCV.getPinFreezeManager();
- if(_adf&&_adf.hasFrozenContainers()){
- var _ae0=document.getElementById("RVContent"+oCV.getId());
- var _ae1=document.getElementById("mainViewerTable"+oCV.getId());
- var _ae2=_ae0.clientWidth;
- var _ae3=_ae1.clientHeight;
- _adf.resize(_ae2,_ae3);
- if(isIE()){
- oCV.repaintDiv(_ae0);
- }
- }
- }
- };
- function setWindowHref(url){
- var _ae5=window.onbeforeunload;
- window.onbeforeunload=null;
- window.location.href=url;
- window.onbeforeunload=_ae5;
- };
- CViewerCommon.getMessage=function(msg,args){
- if(typeof args=="undefined"){
- return msg;
- }else{
- if(typeof args=="string"){
- msg=msg.replace("{0}",args);
- }else{
- if(args.length){
- for(var i=0;i<args.length;++i){
- msg=msg.replace("{"+i+"}",args[i]);
- }
- }else{
- msg=msg.replace("{0}",args);
- }
- }
- }
- return msg;
- };
- function getViewerDirection(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- return gaRV_INSTANCES[0].getDirection();
- }
- return "ltr";
- };
- function isViewerBidiEnabled(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- var _ae9=gaRV_INSTANCES[0].isBidiEnabled();
- if(_ae9){
- return true;
- }
- }
- return false;
- };
- function getViewerBaseTextDirection(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- return gaRV_INSTANCES[0].getBaseTextDirection();
- }
- return "";
- };
- function enforceTextDir(_aea){
- if(isViewerBidiEnabled()&&_aea){
- var sDir=getViewerBaseTextDirection();
- var _aec=BidiUtils.getInstance();
- if(sDir=="auto"){
- sDir=_aec.resolveStrBtd(_aea);
- }
- var _aed=(!dojo._isBodyLtr())?_aec.RLM:_aec.LRM;
- return _aed+((sDir==="rtl")?_aec.RLE:_aec.LRE)+_aea+_aec.PDF+_aed;
- }
- return _aea;
- };
- function getElementDirection(_aee){
- var dir=null;
- if(_aee.currentStyle){
- dir=_aee.currentStyle.direction;
- }else{
- if(window.getComputedStyle){
- var _af0=window.getComputedStyle(_aee,null);
- if(_af0){
- dir=_af0.getPropertyValue("direction");
- }
- }
- }
- if(dir){
- dir=dir.toLowerCase();
- }
- return dir;
- };
- function getScrollLeft(_af1){
- if(getElementDirection(_af1)==="rtl"&&isFF()){
- return _af1.scrollWidth-_af1.offsetWidth+_af1.scrollLeft;
- }
- return _af1.scrollLeft;
- };
- function setScrollLeft(_af2,_af3){
- if(getElementDirection(_af2)==="rtl"&&isFF()){
- _af2.scrollLeft=_af2.offsetWidth+_af3-_af2.scrollWidth;
- }else{
- _af2.scrollLeft=_af3;
- }
- };
- function setScrollRight(_af4,_af5){
- if(getElementDirection(_af4)==="rtl"&&isFF()){
- _af4.scrollLeft=-_af5;
- }else{
- _af4.scrollLeft=_af4.scrollWidth-_af4.offsetWidth-_af5;
- }
- };
- function getBoxInfo(el,_af7){
- if(!getBoxInfo.aStyles){
- 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"}];
- }
- var _af8={};
- var _af9=null;
- if(el.currentStyle){
- _af9=el.currentStyle;
- }else{
- if(window.getComputedStyle){
- _af9=window.getComputedStyle(el,null);
- }
- }
- if(!_af9){
- return null;
- }
- for(i in getBoxInfo.aStyles){
- var _afa=getBoxInfo.aStyles[i];
- var size=null;
- if(_af9.getPropertyValue){
- size=_af9.getPropertyValue(_afa.ff);
- }else{
- size=_af9[_afa.ie];
- }
- if(size&&_af7){
- size=Number(size.replace("px",""));
- }
- _af8[_afa.name]=size;
- }
- return _af8;
- };
- function CSelectionMetadata(){
- this.m_sContextId="";
- this.m_sDataItem="";
- this.m_sMetadataModelItem="";
- this.m_sUseValue="";
- this.m_sUseValueType="";
- this.m_sType=null;
- this.m_sDisplayValue="";
- this.m_sUsage=null;
- this.m_refQuery=null;
- this.m_sHun=null;
- this.m_sDun=null;
- };
- CSelectionMetadata.prototype.setContextId=function(_afc){
- this.m_sContextId=_afc;
- };
- CSelectionMetadata.prototype.getContextId=function(){
- return this.m_sContextId;
- };
- CSelectionMetadata.prototype.setRefQuery=function(_afd){
- this.m_refQuery=_afd;
- };
- CSelectionMetadata.prototype.getRefQuery=function(){
- return this.m_refQuery;
- };
- CSelectionMetadata.prototype.setDataItem=function(_afe){
- this.m_sDataItem=_afe;
- };
- CSelectionMetadata.prototype.getDataItem=function(){
- return this.m_sDataItem;
- };
- CSelectionMetadata.prototype.setMetadataModelItem=function(_aff){
- this.m_sMetadataModelItem=_aff;
- };
- CSelectionMetadata.prototype.getMetadataModelItem=function(){
- return this.m_sMetadataModelItem;
- };
- CSelectionMetadata.prototype.setUseValue=function(_b00){
- this.m_sUseValue=_b00;
- };
- CSelectionMetadata.prototype.getUseValue=function(){
- return this.m_sUseValue;
- };
- CSelectionMetadata.prototype.setUseValueType=function(_b01){
- this.m_sUseValueType=_b01;
- };
- CSelectionMetadata.prototype.setType=function(_b02){
- this.m_sType=_b02;
- };
- CSelectionMetadata.prototype.getType=function(){
- var _b03=null;
- switch(this.m_sUseValueType){
- case 25:
- case 27:
- case 30:
- case 32:
- _b03="memberUniqueName";
- break;
- case 26:
- _b03="memberCaption";
- break;
- case 1:
- case 55:
- case 56:
- _b03="string";
- break;
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 22:
- case 21:
- case 23:
- case 24:
- case 54:
- _b03=parseInt(this.m_sUseValueType,10);
- break;
- }
- return _b03;
- };
- CSelectionMetadata.prototype.getUseValueType=function(){
- if(this.m_sType==null){
- this.m_sType=this.getType();
- }
- return this.m_sType;
- };
- CSelectionMetadata.prototype.setDisplayValue=function(_b04){
- this.m_sDisplayValue=_b04;
- };
- CSelectionMetadata.prototype.getDisplayValue=function(){
- return this.m_sDisplayValue;
- };
- CSelectionMetadata.prototype.setUsage=function(_b05){
- this.m_sUsage=_b05;
- };
- CSelectionMetadata.prototype.getUsage=function(){
- if(this.m_sUsage=="2"){
- return "measure";
- }else{
- return "nonMeasure";
- }
- };
- CSelectionMetadata.prototype.setHun=function(sHun){
- this.m_sHun=sHun;
- };
- CSelectionMetadata.prototype.getHun=function(){
- return this.m_sHun;
- };
- CSelectionMetadata.prototype.setDun=function(sDun){
- this.m_sDun=sDun;
- };
- CSelectionMetadata.prototype.getDun=function(){
- return this.m_sDun;
- };
- function CSelectionMetadataIterator(_b08,_b09){
- this.m_axisIndex=_b09;
- this.m_index=0;
- this.m_selectionObject=_b08;
- };
- CSelectionMetadataIterator.prototype.getSelectionAxis=function(){
- var _b0a=null;
- if(typeof this.m_selectionObject=="object"&&this.m_axisIndex<this.m_selectionObject.getSelectedContextIds().length){
- _b0a=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex];
- }
- return _b0a;
- };
- CSelectionMetadataIterator.prototype.hasNext=function(){
- var _b0b=this.getSelectionAxis();
- if(_b0b!=null){
- return (this.m_index<_b0b.length);
- }else{
- return false;
- }
- };
- CSelectionMetadataIterator.prototype.next=function(){
- var _b0c=null;
- if(this.hasNext()){
- _b0c=new CSelectionMetadata();
- _b0c.setContextId(this.m_selectionObject.m_contextIds[this.m_axisIndex][this.m_index]);
- _b0c.setDataItem(this.m_selectionObject.getDataItems()[this.m_axisIndex][this.m_index]);
- _b0c.setMetadataModelItem(this.m_selectionObject.getMetadataItems()[this.m_axisIndex][this.m_index]);
- if(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=null&&this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]!=""){
- _b0c.setUseValue(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]);
- _b0c.setType("memberUniqueName");
- }else{
- _b0c.setUseValue(this.m_selectionObject.getUseValues()[this.m_axisIndex][this.m_index]);
- }
- if(typeof this.m_selectionObject.m_selectionController=="object"){
- var _b0d=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex][this.m_index];
- if(this.m_selectionObject.useDisplayValueFromObject){
- _b0c.setDisplayValue(this.m_selectionObject.getDisplayValues()[this.m_axisIndex]);
- }else{
- var _b0e=null;
- var _b0f=null;
- if(this.m_axisIndex===0){
- var _b10=this.m_selectionObject.getCellRef();
- if(_b10&&_b10.nodeName&&_b10.nodeName.toLowerCase()==="td"){
- _b0f=this.m_selectionObject.m_selectionController.getDisplayValueFromDOM(_b0d,_b10.parentNode);
- }
- }
- if(_b0f==null){
- _b0f=this.m_selectionObject.m_selectionController.getDisplayValue(_b0d);
- }
- if(_b0f===""){
- _b0f=this.m_selectionObject.m_selectionController.getUseValue(_b0d);
- }
- _b0c.setDisplayValue(_b0f);
- }
- _b0c.setUseValueType(this.m_selectionObject.m_selectionController.getDataType(_b0d));
- _b0c.setUsage(this.m_selectionObject.m_selectionController.getUsageInfo(_b0d));
- _b0c.setRefQuery(this.m_selectionObject.m_selectionController.getRefQuery(_b0d));
- _b0c.setHun(this.m_selectionObject.m_selectionController.getHun(_b0d));
- _b0c.setDun(this.m_selectionObject.m_selectionController.getDun(_b0d));
- }
- ++this.m_index;
- }
- return _b0c;
- };
- function CAxisSelectionIterator(_b11){
- this.m_index=0;
- this.m_selectionObject=_b11;
- };
- CAxisSelectionIterator.prototype.hasNext=function(){
- return ((typeof this.m_selectionObject=="object")&&(this.m_index<this.m_selectionObject.getSelectedContextIds().length));
- };
- CAxisSelectionIterator.prototype.next=function(){
- var _b12=null;
- if(this.hasNext()){
- _b12=new CSelectionMetadataIterator(this.m_selectionObject,this.m_index);
- ++this.m_index;
- }
- return _b12;
- };
- function getSelectionContextIds(_b13){
- var _b14=[];
- var _b15=_b13.getAllSelectedObjects();
- if(_b15!=null&&_b15.length>0){
- for(var _b16=0;_b16<_b15.length;++_b16){
- var _b17=_b15[_b16];
- var _b18=_b17.getSelectedContextIds();
- var _b19=[];
- for(var item=0;item<_b18.length;++item){
- var _b1b=_b18[item].join(":");
- _b19.push(_b1b);
- }
- _b14.push(_b19.join("::"));
- }
- }
- return _b14;
- };
- function getViewerSelectionContext(_b1c,_b1d,_b1e){
- var _b1f=_b1e==true?_b1c.getAllSelectedObjectsWithUniqueCTXIDs():_b1c.getAllSelectedObjects();
- if(_b1f!=null&&_b1f.length>0){
- for(var _b20=0;_b20<_b1f.length;++_b20){
- var _b21={};
- var _b22=new CAxisSelectionIterator(_b1f[_b20]);
- if(_b22.hasNext()){
- var _b23=_b22.next();
- if(_b23.hasNext()){
- var _b24=_b23.next();
- var _b25=_b24.getContextId();
- _b21[_b25]=true;
- var _b26=_b1d.addSelectedCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
- if(_b24.getHun()!=null){
- _b26.addProperty("HierarchyUniqueName",_b24.getHun());
- }
- if(_b24.getDun()!=null){
- _b26.addProperty("DimensionUniqueName",_b24.getDun());
- }
- while(_b23.hasNext()){
- _b24=_b23.next();
- _b25=_b24.getContextId();
- if(typeof _b21[_b25]=="undefined"||_b25===""){
- _b21[_b25]=true;
- var _b27=_b26.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
- if(_b24.getHun()!=null){
- _b27.addProperty("HierarchyUniqueName",_b24.getHun());
- }
- if(_b24.getDun()!=null){
- _b27.addProperty("DimensionUniqueName",_b24.getDun());
- }
- }
- }
- while(_b22.hasNext()){
- _b23=_b22.next();
- var _b28=_b26;
- while(_b23.hasNext()){
- _b24=_b23.next();
- _b25=_b24.getContextId();
- if(typeof _b21[_b25]=="undefined"||_b25===""){
- _b21[_b25]=true;
- _b28=_b28.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()});
- if(_b24.getHun()!=null){
- _b28.addProperty("HierarchyUniqueName",_b24.getHun());
- }
- if(_b24.getDun()!=null){
- _b28.addProperty("DimensionUniqueName",_b24.getDun());
- }
- }
- }
- }
- }
- }
- }
- }
- var _b29=_b1d.toString();
- if(window.gViewerLogger){
- window.gViewerLogger.log("Selection context",_b29,"xml");
- }
- return _b29;
- };
- function PinFreezeContainer(_b2a,lid,_b2c,_b2d,_b2e,_b2f,_b30){
- this.m_pinFreezeManager=_b2a;
- this.m_lid=lid;
- this.m_lidNS=lid+_b2c+_b30;
- this.m_viewerId=_b2c;
- this.m_freezeTop=_b2d;
- this.m_freezeSide=_b2e;
- this.m_cachedReportDiv=null;
- this.m_cachedPFContainer=null;
- this.m_cachedBaseContainer=_b2f;
- this.m_containerMargin={"top":0,"left":0};
- if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){
- if(this.m_cachedBaseContainer.style.marginTop){
- this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px",""));
- }
- if(this.m_cachedBaseContainer.style.marginLeft){
- this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px",""));
- }
- }
- this.m_cachedContainerIndex=_b30;
- this.m_sectionCache=null;
- this.m_homeCellNodes={};
- this.m_fixedWidth=null;
- this.m_clientWidth=700;
- this.m_scrollableClientWidth=700;
- this.m_fixedHeight=null;
- this.m_clientHeight=300;
- this.m_scrollableClientHeight=300;
- this.m_wrapFlag=false;
- this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20;
- this.touchScrollSections=false;
- this.touchPreviousX=-1;
- this.touchPreviousY=-1;
- };
- PinFreezeContainer.prototype.toJSONString=function(){
- var _b31="{";
- _b31+="\"m_clientWidth\":"+this.m_clientWidth+"";
- _b31+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
- _b31+=",\"m_clientHeight\":"+this.m_clientHeight+"";
- _b31+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
- _b31+="}";
- return _b31;
- };
- PinFreezeContainer.prototype.copyProperties=function(_b32){
- this.m_clientWidth=_b32.m_clientWidth;
- this.m_scrollableClientWidth=_b32.m_scrollableClientWidth;
- this.m_clientHeight=_b32.m_clientHeight;
- this.m_scrollableClientHeight=_b32.m_scrollableClientHeight;
- };
- PinFreezeContainer.prototype.setViewerId=function(id){
- this.m_viewerId=id;
- };
- PinFreezeContainer.prototype.getLid=function(){
- return this.m_lid;
- };
- PinFreezeContainer.prototype.createPFContainer=function(_b34,_b35){
- var _b36=document.createElement("temp");
- if(this.m_cachedBaseContainer){
- this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
- this.m_cachedReportDiv=_b34;
- var _b37=this.m_cachedBaseContainer.parentNode;
- var _b38=this.loadTemplateHTML();
- if(_b38){
- _b36.innerHTML=_b38;
- var _b39=this.getContainerByLID(_b36);
- var _b3a=this.getSectionByLID(_b36.firstChild,"pfMainOutput");
- if(_b3a){
- var i=this.getChildPosition(_b37,this.m_cachedBaseContainer);
- if(i!=-1){
- var _b3c=this.m_pinFreezeManager.m_oCV;
- if(_b3c&&_b3c.envParams["freezeDefaultWrap"]){
- if(this.m_cachedBaseContainer.style.whiteSpace===""&&_b3c.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
- var _b3d=this.m_cachedBaseContainer.getElementsByTagName("span");
- if(_b3d){
- for(var k=0;k<_b3d.length;k++){
- _b3d[k].style.whiteSpace="nowrap";
- }
- }
- this.m_wrapFlag=true;
- }
- }
- if(!_b35){
- if(!this._getFixedWidth()){
- this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false");
- this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1;
- this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px";
- }
- if(!this._getFixedHeight()){
- this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false");
- this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight;
- this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px";
- }
- _b3a.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
- _b3a.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
- }
- _b3a.appendChild(this.m_cachedBaseContainer);
- this.insertAt(_b37,_b39,i);
- }
- if(this.m_cachedBaseContainer.style.border!==""){
- _b39.style.border=this.m_cachedBaseContainer.style.border;
- this.m_cachedBaseContainer.style.border="";
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype._getFixedWidth=function(_b3f){
- if(_b3f&&_b3f.style.width&&!_b3f.getAttribute("authoredFixedWidth")){
- var _b40=Number(_b3f.style.width.split("px")[0]);
- return isNaN(_b40)?null:_b40;
- }
- return null;
- };
- PinFreezeContainer.prototype._getFixedHeight=function(_b41){
- if(_b41&&_b41.style.height&&!_b41.getAttribute("authoredFixedHeight")){
- var _b42=Number(_b41.style.height.split("px")[0]);
- return isNaN(_b42)?null:_b42;
- }
- return null;
- };
- PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_b43){
- var _b44=this._getFixedWidth(_b43);
- if(_b44){
- this.m_fixedWidth=_b44;
- this.m_clientWidth=this.m_fixedWidth;
- this.m_scrollableClientWidth=this.m_fixedWidth;
- }
- var _b45=this._getFixedHeight(_b43);
- if(_b45){
- this.m_fixedHeight=_b45;
- this.m_clientHeight=this.m_fixedHeight;
- this.m_scrollableClientHeight=this.m_fixedHeight;
- }
- };
- PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
- var _b46="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeTop\"><td align=\"center\" templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfHomeCell_"+this.m_lidNS+"\" style=\"overflow-x:hidden; overflow-y:hidden; width:100%; height:100%\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td templatePart=\"freezeTop\"></td></tr>"+"<tr><td class=\"BUXNoPrint\" valign=top templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"<td class=\"BUXNoPrint\" templatePart=\"freezeTop\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr>"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeSide\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td><td></td></tr></table>";
- return _b46;
- };
- PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
- var _b47="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\"><tr>"+"<td class=\"BUXNoPrint\" valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"</tr>"+"<tr class=\"BUXNoPrint\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td></tr></table>";
- return _b47;
- };
- PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
- var _b48="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\"><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td></td></tr>"+"<tr><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"></div></td>"+"<td class=\"BUXNoPrint\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr></table>";
- return _b48;
- };
- PinFreezeContainer.prototype.loadTemplateHTML=function(){
- if(this.m_freezeSide&&this.m_freezeTop){
- return this.loadFreezeBothTemplateHTML();
- }else{
- if(this.m_freezeSide){
- return this.loadFreezeSideTemplateHTML();
- }else{
- if(this.m_freezeTop){
- return this.loadFreezeTopTemplateHTML();
- }
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.createSideHeadings=function(_b49){
- var _b4a=this.getSection("pfMainOutput");
- var _b4b=_b4a.getAttribute("pfslid");
- var _b4c=this.getSection("pfSideHeadings");
- var _b4d=_b4c.getAttribute("pfslid");
- var _b4e=this.getMainOutputHomeCell();
- if(!_b4e){
- return;
- }
- var _b4f=_b49;
- var _b50=_b4c;
- var _b51=this.isA11yEnabled(_b4f);
- var _b52=this.m_pinFreezeManager.deepCloneNode(_b4f);
- _b50.appendChild(_b52);
- var _b53=this.getSectionHomeCell(_b4c);
- if(!_b53){
- return;
- }
- var _b54=_b4f.getElementsByTagName("tbody");
- var _b55=_b52.getElementsByTagName("tbody");
- if(_b54.length>0&&_b55.length>0){
- var _b56=_b54[0];
- var _b57=_b55[0];
- var _b58=_b56.firstChild;
- var _b59=_b57.firstChild;
- var _b5a=_b4e.rowSpan;
- this.markAsCopy(_b4e,_b53,_b4b,_b4d);
- for(var r=0;r<_b5a;++r){
- var _b5c=_b57.rows[r];
- this.removeCTX(_b5c);
- }
- for(var r=_b5a;r<_b57.rows.length;++r){
- var _b5d=_b56.rows[r];
- var _b5c=_b57.rows[r];
- _b5c.style.visibility="hidden";
- for(var c=0;c<_b5c.cells.length;++c){
- var _b5f=_b5c.cells[c];
- if(_b51){
- _b5f=this.m_pinFreezeManager.removeIdAttribute(_b5f);
- }
- if(_b5f.getAttribute("type")=="datavalue"){
- _b5f.removeAttribute("ctx");
- _b5f.removeAttribute("uid");
- _b5f.removeAttribute("name");
- }else{
- var _b60=_b5d.cells[c];
- this.markAsCopy(_b60,_b5f,_b4b,_b4d);
- }
- }
- _b5c.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_b61,_b62){
- if(isFF()||isIE()){
- if(_b61&&_b61.length&&_b61[0].cells&&_b61[0].cells.length>1){
- if(this.m_freezeSide){
- var _b63=this.getBorderInfo(_b61[0].cells[1],"right");
- if(_b63){
- _b62.style.borderRightWidth=_b63.borderRightWidth;
- _b62.style.borderRightStyle=_b63.borderRightStyle;
- _b62.style.borderRightColor=_b63.borderRightColor;
- }
- }
- if(this.m_freezeTop){
- var _b63=this.getBorderInfo(_b61[0].cells[1],"bottom");
- if(_b63){
- _b62.style.borderBottomWidth=_b63.borderBottomWidth;
- _b62.style.borderBottomStyle=_b63.borderBottomStyle;
- _b62.style.borderBottomColor=_b63.borderBottomColor;
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.createTopHeadings=function(_b64){
- var _b65=this.getSection("pfMainOutput");
- var _b66=_b65.getAttribute("pfslid");
- var _b67=this.getSection("pfTopHeadings");
- var _b68=_b67.getAttribute("pfslid");
- var _b69=this.getMainOutputHomeCell();
- if(!_b69){
- return;
- }
- var _b6a=_b64;
- var _b6b=_b67;
- var _b6c=this.isA11yEnabled(_b6a);
- var _b6d=this.m_pinFreezeManager.deepCloneNode(_b6a);
- _b6d.setAttribute("clonednode","true");
- _b6b.appendChild(_b6d);
- var _b6e=_b6a.getElementsByTagName("tbody");
- var _b6f=_b6d.getElementsByTagName("tbody");
- if(_b6e.length>0&&_b6f.length>0){
- var _b70=_b6e[0];
- var _b71=_b6f[0];
- var _b72=_b69.rowSpan;
- for(var r=0;r<_b71.rows.length;++r){
- var _b74=_b70.rows[r];
- var _b75=_b71.rows[r];
- if(_b6c){
- _b75=this.m_pinFreezeManager.removeIdAttribute(_b75);
- }
- _b75.style.visibility="hidden";
- for(var c=0;c<_b75.cells.length;++c){
- var _b77=_b75.cells[c];
- if(r>_b72||_b77.getAttribute("type")=="datavalue"){
- _b77.removeAttribute("ctx");
- _b77.removeAttribute("uid");
- _b77.removeAttribute("name");
- }else{
- var _b78=_b74.cells[c];
- this.markAsCopy(_b78,_b77,_b66,_b68);
- if(_b78===_b69){
- this.initializeHomeCellTabIndex(_b77);
- this.applyNeighbouringBorderStylesToHomeCell(_b70.rows,_b77);
- }
- }
- }
- _b75.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.createHomeCellHeading=function(){
- var _b79=this.getSection("pfMainOutput");
- var _b7a=_b79.getAttribute("pfslid");
- var _b7b=this.getSection("pfHomeCell");
- var _b7c=_b7b.parentNode;
- var _b7d=_b7b.getAttribute("pfslid");
- var _b7e=this.getMainOutputHomeCell();
- if(!_b7e){
- return;
- }
- _b7c.style.height="100%";
- var _b7f=this.getTopHeadingSectionHeight(_b7e);
- _b7b.style.height=_b7f-this.m_containerMargin.top+"px";
- _b7b.style.width=this.getSideHeadingSectionWidth(_b7e)-this.m_containerMargin.left+"px";
- _b7b.style.marginTop=this.m_containerMargin.top+"px";
- _b7b.style.marginLeft=this.m_containerMargin.left+"px";
- var _b80=_b7e.parentNode;
- var _b81=_b80.cloneNode(false);
- var _b82=this._findBestGuessHomeCell(_b7e);
- var _b83=document.createElement("div");
- _b83.style.width="100%";
- _b83.style.height="100%";
- while(_b7e.offsetLeft<=_b82.offsetLeft){
- oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_b7e);
- if(isFF()||isIE()){
- _b7e.appendChild(_b83);
- oTargetHomeCell.style.width=_b83.clientWidth+"px";
- _b7e.removeChild(_b83);
- }else{
- oTargetHomeCell.style.width=_b7e.clientWidth+1+"px";
- }
- oTargetHomeCell.style.borderBottomWidth="0px";
- _b81.appendChild(oTargetHomeCell);
- this.markAsCopy(_b7e,oTargetHomeCell,_b7a,_b7d);
- if(_b7e.nextSibling){
- _b7e=_b7e.nextSibling;
- }else{
- break;
- }
- }
- if(oTargetHomeCell){
- oTargetHomeCell.style.borderRightWidth="0px";
- }
- var _b84=_b80.parentNode;
- var _b85=_b84.cloneNode(false);
- _b85.appendChild(_b81);
- var _b86=_b84.parentNode;
- var _b87=_b86.cloneNode(false);
- _b87.appendChild(_b85);
- _b87.style.width="100%";
- _b87.style.height="100%";
- _b87.style.marginLeft="";
- _b87.style.marginTop="";
- _b7b.appendChild(_b87);
- this.initializeHomeCellTabIndex(oTargetHomeCell);
- this.applyNeighbouringBorderStylesToHomeCell(_b79.firstChild.rows,_b7b);
- };
- PinFreezeContainer.prototype.markAsCopy=function(main,copy,_b8a,_b8b){
- if(!main.pfCopy){
- main.setAttribute("pfslid",_b8a);
- main.pfCopy=[];
- }
- main.pfCopy.push(copy);
- copy.pfMain=main;
- copy.setAttribute("pfslid",_b8b);
- };
- PinFreezeContainer.prototype.getCopy=function(_b8c){
- if(_b8c.pfCopy){
- var _b8d={};
- for(var i in _b8c.pfCopy){
- var copy=_b8c.pfCopy[i];
- if(copy.getAttribute){
- var _b90=copy.getAttribute("pfslid");
- if(_b90){
- var _b91=PinFreezeContainer.getSectionNameFromSlid(_b90);
- var _b92=this.getSection(_b91);
- if(_b92&&PinFreezeContainer.isSectionVisible(_b92)){
- _b8d[_b91]=copy;
- }
- }
- }
- }
- if(_b8d["pfHomeCell"]){
- return _b8d["pfHomeCell"];
- }
- for(i in _b8d){
- return _b8d[i];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMain=function(_b93){
- if(_b93.pfMain){
- return _b93.pfMain;
- }
- return null;
- };
- PinFreezeContainer.isSectionVisible=function(_b94){
- var node=_b94;
- if(!node){
- return false;
- }
- while(node.parentNode&&!node.getAttribute("pfclid")){
- if(node.style&&node.style.display==="none"){
- return false;
- }
- node=node.parentNode;
- }
- return (!node.style||node.style.display!=="none");
- };
- PinFreezeContainer.prototype.getSectionStructure=function(){
- var _b96={isSideFrozen:false,isTopFrozen:false};
- if(this.m_freezeSide){
- var side=this.getSection("pfSideHeadings");
- if(side){
- _b96.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
- }
- }
- if(this.m_freezeTop){
- var top=this.getSection("pfTopHeadings");
- if(top){
- _b96.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
- }
- }
- return _b96;
- };
- PinFreezeContainer.prototype.checkSectionStructureChange=function(_b99,_b9a){
- if(_b99.isSideFrozen!==_b9a.isSideFrozen||_b99.isTopFrozen!==_b9a.isTopFrozen){
- this.m_pinFreezeManager.sectionStructureChange();
- }
- };
- PinFreezeContainer.prototype.freezeContainerInReport=function(_b9b){
- this.cacheContainerAndSections(this.getContainerByLID(_b9b));
- this.m_homeCellNodes={};
- this.updateContainer();
- };
- PinFreezeContainer.prototype.frozenSectionsRequired=function(){
- return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
- };
- PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
- var _b9c=this.getSection("pfMainOutput");
- if(_b9c){
- if(this.m_freezeSide){
- var _b9d=_b9c.scrollWidth;
- return ((this.m_clientWidth<_b9d)||_b9d==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
- var _b9e=this.getSection("pfMainOutput");
- if(_b9e){
- if(this.m_freezeTop){
- var _b9f=_b9e.scrollHeight;
- return ((this.m_clientHeight<_b9f)||_b9f==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.showTemplatePart=function(_ba0,_ba1){
- var _ba2=this.getContainer().rows;
- for(var r=0;r<_ba2.length;++r){
- if(_ba2[r].getAttribute("templatePart")===_ba0){
- _ba2[r].style.display=((_ba1)?"":"none");
- }else{
- var _ba4=_ba2[r].cells;
- for(var c=0;c<_ba4.length;++c){
- if(_ba4[c].getAttribute("templatePart")===_ba0){
- _ba4[c].style.display=((_ba1)?"":"none");
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.showFreezeTopOnly=function(_ba6){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _ba7=(_ba6.scrollWidth==0)?_ba6.clientWidth:_ba6.scrollWidth;
- this.updateMainOutputWidth(_ba7);
- this.setScrollX(_ba6,0);
- if(this.getSection("pfTopHeadings")){
- this.getSection("pfTopHeadings").style.width=_ba7+"px";
- this.setScrollX(this.getSection("pfTopHeadings"),0);
- }
- this.showTemplatePart("freezeSide",false);
- };
- PinFreezeContainer.prototype.showFreezeSideOnly=function(_ba8){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _ba9=(_ba8.scrollHeight==0)?_ba8.clientHeight:_ba8.scrollHeight;
- this.updateMainOutputHeight(_ba9);
- this.setScrollY(_ba8,0);
- if(this.getSection("pfSideHeadings")){
- this.getSection("pfSideHeadings").style.height=_ba9+"px";
- this.setScrollY(this.getSection("pfSideHeadings"),0);
- }
- this.showTemplatePart("freezeTop",false);
- };
- PinFreezeContainer.prototype.showAll=function(){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- this.showTemplatePart("freezeTop",true);
- this.showTemplatePart("freezeSide",true);
- };
- PinFreezeContainer.prototype.showMainOutputOnly=function(_baa){
- this.updateMainOutputWidth((_baa.scrollWidth==0)?_baa.clientWidth:_baa.scrollWidth);
- this.updateMainOutputHeight((_baa.scrollHeight==0)?_baa.clientHeight:_baa.scrollHeight);
- this.setInitialScrollPosition(_baa,0,0);
- if(this.m_freezeSide&&this.m_freezeTop){
- this.getSection("pfHomeCell").style.display="none";
- }
- if(this.m_freezeSide){
- this.getSection("pfSideHeadings").style.display="none";
- this.getSection("pfHorizontalScrollBar").style.display="none";
- }
- if(this.m_freezeTop){
- this.getSection("pfTopHeadings").style.display="none";
- this.getSection("pfVerticalScrollBar").style.display="none";
- }
- };
- PinFreezeContainer.prototype.getWrap=function(el){
- if(el.currentStyle){
- return el.currentStyle.whiteSpace;
- }else{
- if(window.getComputedStyle){
- return window.getComputedStyle(el,null).getPropertyValue("white-space");
- }else{
- return el.style.whiteSpace;
- }
- }
- };
- PinFreezeContainer.prototype.getStyleDisplay=function(el){
- if(el.currentStyle){
- return el.currentStyle.display;
- }else{
- if(window.getComputedStyle){
- return window.getComputedStyle(el,null).getPropertyValue("display");
- }else{
- return el.style.display;
- }
- }
- };
- PinFreezeContainer.prototype.headingsCreated=function(_bad){
- return _bad.firstChild?true:false;
- };
- PinFreezeContainer.prototype.updateContainer=function(){
- var _bae=this.getSection("pfMainOutput");
- var _baf=this.getMainOutputHomeCell();
- if(_baf){
- if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
- this.m_scrollableClientHeight-=_baf.offsetHeight;
- var _bb0=this.calculateMinCrossTabScrollableClientHeight();
- if(_bb0>this.m_scrollableClientHeight){
- this.m_scrollableClientHeight=_bb0;
- }
- }
- if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
- this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_baf);
- }
- }
- if(_bae&&_baf){
- this.showAll();
- if(this.frozenSectionsRequired()){
- this.updateMainOutputSize();
- this.initializeHomeCellTabIndex(_baf);
- if(this.m_freezeSide){
- var _bb1=this.getSection("pfSideHeadings");
- if(!this.headingsCreated(_bb1)){
- this.createSideHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeTop){
- this.initializeTouchScrolling(_bb1);
- }
- }
- var _bb2=this.getSection("pfHorizontalScrollBar");
- _bb2.scrollLeft="0px";
- }
- if(this.m_freezeTop){
- var _bb3=this.getSection("pfTopHeadings");
- if(!this.headingsCreated(_bb3)){
- this.createTopHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeSide){
- this.initializeTouchScrolling(_bb3);
- }
- }
- var _bb4=this.getSection("pfVerticalScrollBar");
- _bb4.scrollTop="0px";
- }
- if(this.m_freezeSide&&this.m_freezeTop){
- var _bb5=this.getSection("pfHomeCell");
- if(!this.headingsCreated(_bb5)){
- this.createHomeCellHeading();
- }
- _bb5.style.display="";
- }
- var _bb6=this.updateSideHeadingSize(_baf);
- var _bb7=this.updateTopHeadingSize(_baf);
- if(!this.frozenSectionsRequired()){
- this.showMainOutputOnly(_bae);
- }
- this.setInitialScrollPosition(_bae,_bb6,_bb7);
- if(this.m_freezeTop&&this.m_freezeSide){
- this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_bb7);
- this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_bb6,0);
- }
- this.initializeTouchScrolling(_bae);
- }else{
- this.showMainOutputOnly(_bae);
- this.removeTouchScrolling();
- }
- this.updateTabIndexValues();
- }
- };
- PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
- var _bb8=0;
- if(this.m_cachedPFContainer){
- var _bb9=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
- if(_bb9){
- var _bba=0;
- for(var r=0;r<_bb9.rows.length;r++){
- var row=_bb9.rows[r];
- for(var c=0;c<row.cells.length;c++){
- var cell=row.cells[c];
- if(cell.getAttribute("type")=="datavalue"){
- _bba++;
- if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
- _bb8=_bb8+cell.offsetHeight;
- }else{
- _bba++;
- var _bbf=this.getSection("pfVerticalScrollBar");
- if(_bbf){
- _bb8=_bbf.offsetWidth*2;
- }
- }
- break;
- }
- }
- if(_bba>=2){
- break;
- }
- }
- }
- }
- return _bb8;
- };
- PinFreezeContainer.prototype.updateSideHeadingSize=function(_bc0){
- var _bc1=0;
- if(this.m_freezeSide){
- var _bc2=this.getSection("pfMainOutput");
- if(!_bc2){
- return 0;
- }
- if(!this.frozenSideHeadingsRequired()){
- this.showFreezeTopOnly(_bc2);
- return 0;
- }
- var _bc3=this.getSection("pfSideHeadings");
- _bc1=this.getSideHeadingSectionWidth(_bc0);
- var _bc4=this.getSection("pfHorizontalScrollBar");
- var _bc5=this.getSectionHomeCell(_bc3);
- if(_bc3.style.display=="none"){
- _bc3.style.display="";
- _bc4.style.display="";
- }
- _bc3.style.width=_bc1+"px";
- _bc3.style.height=_bc2.clientHeight+"px";
- }
- return _bc1;
- };
- PinFreezeContainer.prototype.updateTopHeadingSize=function(_bc6){
- var _bc7=0;
- if(this.m_freezeTop){
- var _bc8=this.getSection("pfMainOutput");
- if(!_bc8){
- return 0;
- }
- if(!this.frozenTopHeadingsRequired()){
- this.showFreezeSideOnly(_bc8);
- return 0;
- }
- var _bc9=this.getSection("pfTopHeadings");
- _bc7=this.getTopHeadingSectionHeight(_bc6);
- var _bca=this.getSection("pfVerticalScrollBar");
- var _bcb=this.getSectionHomeCell(_bc9);
- if(_bc9.style.display=="none"){
- _bc9.style.display="";
- _bca.style.display="";
- }
- _bc9.style.height=_bc7+"px";
- _bc9.style.width=_bc8.clientWidth+"px";
- }
- return _bc7;
- };
- PinFreezeContainer.prototype.setScrollX=function(_bcc,_bcd){
- if(getElementDirection(_bcc)==="rtl"){
- setScrollRight(_bcc,_bcd);
- }else{
- setScrollLeft(_bcc,_bcd);
- }
- };
- PinFreezeContainer.prototype.setScrollY=function(_bce,_bcf){
- _bce.scrollTop=_bcf;
- };
- PinFreezeContainer.prototype.setInitialScrollPosition=function(_bd0,_bd1,_bd2){
- if(getElementDirection(_bd0)==="rtl"){
- setScrollRight(_bd0,_bd1);
- }else{
- setScrollLeft(_bd0,_bd1);
- }
- _bd0.scrollTop=_bd2;
- };
- PinFreezeContainer.prototype.getScrollableClientWidth=function(){
- return this.m_scrollableClientWidth;
- };
- PinFreezeContainer.prototype.setScrollableClientWidth=function(_bd3){
- this.m_scrollableClientWidth=_bd3;
- };
- PinFreezeContainer.prototype.getContainerWidth=function(){
- return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth;
- };
- PinFreezeContainer.prototype.getClientWidth=function(){
- return this.m_clientWidth;
- };
- PinFreezeContainer.prototype.getScrollableClientHeight=function(){
- return this.m_scrollableClientHeight;
- };
- PinFreezeContainer.prototype.setScrollableClientHeight=function(_bd4){
- this.m_scrollableClientHeight=_bd4;
- };
- PinFreezeContainer.prototype.getClientHeight=function(){
- return this.m_clientHeight;
- };
- PinFreezeContainer.prototype.clientHeight=function(_bd5){
- return _bd5.clientHeight;
- };
- PinFreezeContainer.prototype.findBestContainerHeight=function(_bd6){
- if(this.m_freezeTop&&this.m_cachedReportDiv){
- var _bd7=this.m_cachedReportDiv.parentNode;
- if(_bd7){
- var _bd8=this._findRestOfPageHeight(this.getContainer());
- return _bd6-_bd8-(this.c_pageMargin/2)-this.m_containerMargin.top;
- }
- }
- return _bd6-this.c_pageMargin;
- };
- PinFreezeContainer.prototype.findBestContainerWidth=function(_bd9){
- var node=this.getContainer();
- while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- node=node.parentNode;
- }
- if(!node){
- return -1;
- }
- if(node.nodeName.toLowerCase()=="td"){
- var _bdb=0;
- var _bdc=node.parentNode.childNodes;
- for(var i=0;i<_bdc.length;i++){
- if(_bdc[i]!==node){
- _bdb+=_bdc[i].clientWidth;
- }
- }
- return _bd9-_bdb-(this.c_pageMargin/2);
- }
- return _bd9;
- };
- PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
- var _bdf=0;
- var _be0=node.parentNode;
- if(!_be0){
- return _bdf;
- }
- if(_be0.childNodes.length>1){
- for(var i=0;i<_be0.childNodes.length;i++){
- var _be2=_be0.childNodes[i];
- if(_be2.nodeType==1){
- var _be3=this.getStyleDisplay(_be2);
- if(_be2!=node&&!isNaN(_be2.clientHeight)&&_be3!="none"&&_be3!="table-cell"){
- _bdf+=this.clientHeight(_be2);
- }
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _bdf+=this._findRestOfPageHeight(_be0);
- }
- return _bdf;
- };
- PinFreezeContainer.prototype.resize=function(_be4,_be5,_be6,_be7){
- if(this.m_fixedWidth&&this.m_fixedHeight){
- return;
- }
- _be4=(this.m_fixedWidth)?this.m_fixedWidth:_be4;
- _be5=(this.m_fixedHeight)?this.m_fixedHeight:_be5;
- var _be8=this.getSectionStructure();
- if(this.m_sectionCache&&this.m_cachedPFContainer){
- var _be9=0;
- if(_be5!==0){
- _be9=this.findBestContainerHeight(_be5);
- if(_be6&&_be9<300){
- _be9=300;
- }else{
- if(_be9<100){
- _be9=100;
- }
- }
- }
- this.m_clientHeight=_be9>0?_be9:this.m_clientHeight;
- var _bea=0;
- if(_be4!==0){
- _bea=this.findBestContainerWidth(_be4);
- }
- this.m_clientWidth=(_bea>0)?_bea-5-(this.c_pageMargin/2):this.m_clientWidth;
- var _beb=this.getSection("pfMainOutput");
- var _bec=this.getSectionHomeCell(_beb);
- if(_bec){
- this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_bec);
- this.m_scrollableClientHeight=this.m_clientHeight-_bec.offsetHeight;
- }
- if(_be7){
- var _bed=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_be7.lid);
- if(_bed){
- var node=_bed[0];
- while(node.nodeName.toLowerCase()!="table"){
- node=node.parentNode;
- }
- node.style.width=_be7.width+"px";
- }
- }
- this.updateContainer();
- }else{
- this.m_clientWidth=_be4-this.c_pageMargin;
- this.m_clientHeight=_be5-this.c_pageMargin;
- }
- var _bef=this.getSectionStructure();
- this.checkSectionStructureChange(_be8,_bef);
- };
- PinFreezeContainer.prototype.updateMainOutputSize=function(){
- if(this.m_freezeSide&&this.m_freezeTop){
- if(this.frozenSideHeadingsRequired()){
- this.updateMainOutputWidth(this.getScrollableClientWidth());
- }
- if(this.frozenTopHeadingsRequired()){
- this.updateMainOutputHeight(this.getScrollableClientHeight());
- }
- }else{
- if(this.m_freezeSide){
- this.updateMainOutputWidth(this.getScrollableClientWidth());
- }else{
- if(this.m_freezeTop){
- this.updateMainOutputHeight(this.getScrollableClientHeight());
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateMainOutputWidth=function(_bf0){
- var _bf1=this.getSection("pfMainOutput");
- if(!_bf1){
- return;
- }
- if(this.m_freezeSide==true){
- _bf1.style.width=(_bf0+"px");
- if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
- _bf1.style.height=_bf1.firstChild.clientHeight+"px";
- }
- var _bf2=this.getSection("pfHorizontalScrollBar");
- if(_bf2){
- _bf2.style.width=(_bf0+"px");
- var _bf3=_bf2.firstChild;
- if(_bf3){
- var _bf4=this.getSectionHomeCell(_bf1);
- var _bf5=_bf1.scrollWidth-this.getHomeCellOffsetWidth(_bf4);
- _bf3.style.width=_bf5+"px";
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateMainOutputHeight=function(_bf6){
- var _bf7=this.getSection("pfMainOutput");
- if(!_bf7){
- return;
- }
- _bf7.style.height=(_bf6+"px");
- if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
- _bf7.style.width=_bf7.firstChild.clientWidth+2+"px";
- }
- var _bf8=this.getSection("pfVerticalScrollBar");
- if(_bf8){
- _bf8.style.height=(_bf6+"px");
- var _bf9=_bf8.firstChild;
- if(_bf9){
- var _bfa=this.getSectionHomeCell(_bf7);
- var _bfb=_bf7.scrollHeight-_bfa.offsetHeight;
- _bf9.style.height=_bfb+"px";
- }
- }
- };
- PinFreezeContainer.prototype.getElementByLID=function(_bfc,tag,lid){
- var _bff=getElementsByAttribute(_bfc,tag,"lid",lid);
- if(_bff.length>0){
- return _bff[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getContainerByLID=function(_c00){
- var _c01=getElementsByAttribute(_c00,"table","pfclid","pfContainer_"+this.m_lidNS);
- if(_c01.length>0){
- return _c01[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getSectionByLID=function(_c02,_c03){
- var _c04=getElementsByAttribute(_c02,"div","pfslid",_c03+"_"+this.m_lidNS);
- if(_c04.length>0){
- return _c04[0];
- }
- return null;
- };
- PinFreezeContainer.getSectionNameFromSlid=function(slid){
- return slid?slid.split("_")[0]:null;
- };
- PinFreezeContainer.getLidFromSlid=function(slid){
- return slid.split("_")[1];
- };
- PinFreezeContainer.nodeToSlid=function(_c07){
- while(_c07.parentNode&&!_c07.getAttribute("pfslid")){
- _c07=_c07.parentNode;
- }
- if(_c07.getAttribute){
- return _c07.getAttribute("pfslid");
- }
- return null;
- };
- PinFreezeContainer.prototype.cacheContainerAndSections=function(_c08){
- if(!_c08){
- return _c08;
- }
- this.m_cachedPFContainer=_c08;
- var _c09=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
- this.m_sectionCache={};
- for(var i=0;i<_c09.length;++i){
- var key=_c09[i].getAttribute("pfslid");
- key=key.split("_",1);
- this.m_sectionCache[key]=_c09[i];
- }
- return _c08;
- };
- PinFreezeContainer.prototype.getContainer=function(){
- return this.m_cachedPFContainer;
- };
- PinFreezeContainer.prototype.getSection=function(key){
- if(!this.m_sectionCache){
- return null;
- }
- if(!this.m_sectionCache[key]){
- this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key);
- }
- return this.m_sectionCache[key];
- };
- PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_c0d){
- var slid=PinFreezeContainer.nodeToSlid(_c0d);
- if(!this.m_homeCellNodes[slid]){
- var _c0f=getElementsByAttribute(_c0d,"*","tabIndex","*");
- for(var i in _c0f){
- if(!_c0f[i].getAttribute("widgetid")){
- this.m_homeCellNodes[slid]=_c0f[i];
- break;
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateTabIndexValues=function(){
- if(this.isContainerFrozen()){
- for(var slid in this.m_homeCellNodes){
- var _c12=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12);
- }
- }else{
- for(var slid in this.m_homeCellNodes){
- var _c12=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12);
- }
- }
- };
- PinFreezeContainer.prototype.getSectionHomeCell=function(_c13){
- if(_c13){
- var _c14=this.getElementByLID(_c13,"table",this.m_lid+this.m_viewerId);
- if(_c14&&_c14.rows.length&&_c14.rows[0].cells.length){
- return _c14.rows[0].cells[0];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
- var _c15=this.getSection("pfMainOutput");
- if(!_c15){
- _c15=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
- }
- return this.getSectionHomeCell(_c15);
- };
- PinFreezeContainer.prototype.getChildPosition=function(_c16,_c17){
- for(var i=0;i<_c16.childNodes.length;++i){
- if(_c16.childNodes[i]==_c17){
- return i;
- }
- }
- return -1;
- };
- PinFreezeContainer.prototype.insertAt=function(_c19,_c1a,_c1b){
- if(_c1b==_c19.childNodes.length){
- _c19.appendChild(_c1a);
- }else{
- _c19.insertBefore(_c1a,_c19.childNodes[_c1b]);
- }
- };
- PinFreezeContainer.prototype.synchScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _c1c=this.getMainOutputHomeCell();
- var _c1d=this.getSection("pfMainOutput");
- var _c1e=this.getSection("pfSideHeadings");
- if(_c1e!=null){
- var _c1f=this.getSection("pfHorizontalScrollBar");
- if(_c1f){
- var _c20=this.getSideHeadingSectionWidth(_c1c);
- if(getElementDirection(_c1d)==="rtl"){
- _c20=0;
- }
- setScrollLeft(_c1d,getScrollLeft(_c1f)+_c20);
- if(this.m_freezeTop){
- setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_c1f)+_c20);
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateScroll=function(_c21){
- var slid=PinFreezeContainer.nodeToSlid(_c21);
- if(!slid){
- return;
- }
- var _c23=PinFreezeContainer.getSectionNameFromSlid(slid);
- if(!_c23){
- return;
- }
- var _c24=document.getElementById("CVReport"+this.m_viewerId);
- if(!_c24){
- return;
- }
- if(!this.m_cachedPFContainer){
- return;
- }
- var _c25=_c21.parentNode;
- if(_c25){
- var _c26=_c25.tagName.toLowerCase();
- if(_c26==="td"||_c26==="th"){
- var _c27=this.getMainOutputHomeCell();
- var _c28=this.getSection("pfMainOutput");
- if(_c23==="pfMainOutput"||_c23==="pfTopHeadings"){
- var _c29=this.getSection("pfHorizontalScrollBar");
- if(_c29){
- var _c2a=PinFreezeContainer.calculateNewPosition(_c25.offsetLeft,_c25.offsetWidth,getScrollLeft(_c28),_c28.offsetWidth);
- var _c2b=this.getHomeCellOffsetWidth(_c27);
- if(getElementDirection(_c28)==="rtl"){
- _c2b=0;
- }
- setScrollLeft(_c29,_c2a-_c2b);
- setScrollLeft(_c28,_c2a);
- }
- }
- if(_c23==="pfMainOutput"||_c23==="pfSideHeadings"){
- var _c2c=this.getSection("pfVerticalScrollBar");
- if(_c2c){
- var _c2d=PinFreezeContainer.calculateNewPosition(_c25.offsetTop,_c25.offsetHeight,_c28.scrollTop,_c28.offsetHeight);
- _c2c.scrollTop=_c2d-_c27.offsetHeight;
- _c28.scrollTop=_c2d;
- }
- }
- }
- }
- };
- PinFreezeContainer.calculateNewPosition=function(_c2e,_c2f,_c30,_c31){
- var _c32=_c2e+_c2f;
- var _c33=_c30+_c31;
- if(_c30>_c2e){
- return _c2e;
- }else{
- if(_c33<_c32){
- if(_c2f>_c31){
- return _c2e;
- }
- return _c32-_c31;
- }
- }
- return _c30;
- };
- PinFreezeContainer.prototype.synchVScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _c34=this.getMainOutputHomeCell();
- var _c35=this.getSection("pfMainOutput");
- var _c36=this.getSection("pfTopHeadings");
- if(_c36!=null){
- var _c37=this.getSection("pfVerticalScrollBar");
- if(_c37){
- _c35.scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34);
- if(this.m_freezeSide){
- this.getSection("pfSideHeadings").scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34);
- }
- }
- }
- };
- PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_c38){
- return _c38.offsetHeight+_c38.offsetTop+this.m_containerMargin.top;
- };
- PinFreezeContainer.prototype._findBestGuessHomeCell=function(_c39){
- if(this.m_bestGuessHomeCell){
- return this.m_bestGuessHomeCell;
- }
- if(_c39){
- var _c3a=_c39.parentNode.parentNode;
- var _c3b=_c39.rowSpan?(_c39.rowSpan):1;
- var tr=_c3a.childNodes[_c3b];
- if(tr){
- var _c3d=tr.childNodes.length;
- var _c3e=null;
- var td=null;
- for(var i=0;i<_c3d;i++){
- td=tr.childNodes[i];
- if(td.getAttribute("type")=="datavalue"){
- break;
- }
- _c3e=td;
- }
- if(_c3e){
- this.m_bestGuessHomeCell=_c3e;
- return this.m_bestGuessHomeCell;
- }
- }else{
- return _c39;
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_c41){
- var _c42=this._findBestGuessHomeCell(_c41);
- return _c42?_c42.offsetWidth:0;
- };
- PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_c43){
- var _c44=this._findBestGuessHomeCell(_c43);
- if(_c44){
- return _c44.offsetWidth+_c44.offsetLeft+this.m_containerMargin.left;
- }else{
- return _c43.offsetWidth+_c43.offsetLeft;
- }
- };
- PinFreezeContainer.prototype.isContainerFrozen=function(){
- return (this.m_freezeTop||this.m_freezeSide);
- };
- PinFreezeContainer.prototype.unfreeze=function(_c45){
- var _c46=this.getContainerByLID(_c45);
- this.m_freezeTop=false;
- this.m_freezeSide=false;
- if(_c46){
- var _c47=_c46.parentNode;
- pfMainOutput=this.getSectionByLID(_c46,"pfMainOutput");
- if(pfMainOutput&&_c47){
- if(_c46.style.border!==""){
- pfMainOutput.firstChild.style.border=_c46.style.border;
- _c46.style.border="";
- }
- if(this.m_wrapFlag){
- var _c48=pfMainOutput.firstChild.getElementsByTagName("span");
- if(_c48){
- for(var k=0;k<_c48.length;k++){
- _c48[k].style.whiteSpace="";
- }
- }
- this.m_wrapFlag=false;
- }
- this.updateTabIndexValues();
- if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){
- this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth");
- this.m_cachedBaseContainer.style.width="auto";
- this.m_addedFixedWidth=null;
- }
- if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){
- this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight");
- this.m_cachedBaseContainer.style.height="auto";
- this.m_addedFixedHeight=null;
- }
- _c47.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_c46);
- }
- }
- };
- PinFreezeContainer.prototype.getBorderInfo=function(el,_c4b){
- var _c4c={};
- var _c4d="border-"+_c4b+"-";
- var _c4e="border"+_c4b.charAt(0).toUpperCase()+_c4b.substring(1);
- if(el.currentStyle){
- _c4c[_c4e+"Width"]=el.currentStyle[_c4e+"Width"];
- _c4c[_c4e+"Style"]=el.currentStyle[_c4e+"Style"];
- _c4c[_c4e+"Color"]=el.currentStyle[_c4e+"Color"];
- }else{
- if(window.getComputedStyle){
- _c4c[_c4e+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"width");
- _c4c[_c4e+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"style");
- _c4c[_c4e+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"color");
- }else{
- return null;
- }
- }
- return _c4c;
- };
- PinFreezeContainer.prototype.isA11yEnabled=function(_c4f){
- return (_c4f.getAttribute("role")==="grid");
- };
- PinFreezeContainer.isElementInMainOutput=function(_c50){
- var _c51=PinFreezeContainer.nodeToSlid(_c50);
- if(_c51){
- return (_c51.indexOf("pfMainOutput_")===0);
- }
- return false;
- };
- PinFreezeContainer.prototype.removeCTX=function(_c52){
- _c52.removeAttribute("ctx");
- var _c53=getElementsByAttribute(_c52,"*","ctx","*");
- if(_c53&&_c53.length){
- for(var i=0;i<_c53.length;i++){
- _c53[i].removeAttribute("ctx");
- }
- }
- };
- PinFreezeContainer.prototype.initializeTouchScrolling=function(_c55){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_c55){
- _c55.m_pinFreezeContainer=this;
- if(document.attachEvent){
- _c55.attachEvent("touchstart",this.touchStart);
- _c55.attachEvent("touchmove",this.touchMove);
- _c55.attachEvent("touchend",this.touchEnd);
- }else{
- _c55.addEventListener("touchstart",this.touchStart,false);
- _c55.addEventListener("touchmove",this.touchMove,false);
- _c55.addEventListener("touchend",this.touchEnd,false);
- }
- }
- };
- PinFreezeContainer.prototype.removeTouchScrolling=function(){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- this.removeTouchScrollingEvents(this.getSection("pfMainOutput"));
- this.removeTouchScrollingEvents(this.getSection("pfSideHeadings"));
- this.removeTouchScrollingEvents(this.getSection("pfTopHeadings"));
- };
- PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_c56){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_c56){
- if(document.detachEvent){
- _c56.detachEvent("touchstart",this.touchStart);
- _c56.detachEvent("touchmove",this.touchMove);
- _c56.detachEvent("touchend",this.touchEnd);
- }else{
- _c56.removeEventListener("touchstart",this.touchStart,false);
- _c56.removeEventListener("touchmove",this.touchMove,false);
- _c56.removeEventListener("touchend",this.touchEnd,false);
- }
- }
- };
- PinFreezeContainer.prototype.touchMove=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _c58=e.changedTouches[0];
- if(_c58&&_c58.clientX&&_c58.clientY){
- var _c59=parseInt(_c58.clientX);
- var _c5a=parseInt(_c58.clientY);
- if(this.m_pinFreezeContainer.touchMoveHandler(_c59,_c5a)){
- return stopEventBubble(e);
- }
- }
- }
- };
- PinFreezeContainer.prototype.touchStart=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _c5c=e.changedTouches[0];
- if(_c5c&&_c5c.clientX&&_c5c.clientY){
- var _c5d=parseInt(_c5c.clientX);
- var _c5e=parseInt(_c5c.clientY);
- this.m_pinFreezeContainer.touchStartHandler(_c5d,_c5e);
- }
- }
- };
- PinFreezeContainer.prototype.touchStartHandler=function(_c5f,_c60){
- this.touchScrollSections=false;
- this.touchPreviousX=_c5f;
- this.touchPreviousY=_c60;
- };
- PinFreezeContainer.prototype.touchEnd=function(e){
- if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
- stopEventBubble(e);
- }
- };
- PinFreezeContainer.prototype.touchEndHandler=function(){
- var _c62=this.touchScrollSections;
- this.touchScrollSections=false;
- this.touchPreviousX=-1;
- this.touchPreviousY=-1;
- return _c62;
- };
- PinFreezeContainer.prototype.touchMoveHandler=function(_c63,_c64){
- var _c65=this.getSection("pfMainOutput");
- if(!_c65){
- return;
- }
- var _c66=this.getSectionHomeCell(_c65);
- var _c67=this.getTopHeadingSectionHeight(_c66);
- var _c68=this.getSideHeadingSectionWidth(_c66);
- var _c69=_c64-this.touchPreviousY;
- var _c6a=_c63-this.touchPreviousX;
- if(this.touchScrollSections){
- if(_c69!=0){
- var _c6b=_c65.scrollTop-_c69;
- _c6b=(_c6b>_c67)?_c6b:_c67;
- _c65.scrollTop=_c6b;
- var _c6c=this.getSection("pfSideHeadings");
- if(_c6c){
- _c6c.scrollTop=_c6b;
- }
- }
- if(_c6a!=0){
- var _c6d=_c65.scrollLeft-_c6a;
- _c6d=(_c6d>_c68)?_c6d:_c68;
- _c65.scrollLeft=_c6d;
- var _c6e=this.getSection("pfTopHeadings");
- if(_c6e){
- _c6e.scrollLeft=_c6d;
- }
- }
- }else{
- this.firstTouchMove(_c65,_c6a,_c69,_c68,_c67);
- }
- this.touchPreviousX=_c63;
- this.touchPreviousY=_c64;
- return this.touchScrollSections;
- };
- PinFreezeContainer.prototype.firstTouchMove=function(_c6f,_c70,_c71,_c72,_c73){
- var _c74=this.mostlyVerticalTouchMove(_c70,_c71);
- var _c75=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
- var _c76=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
- if(_c74&&(!_c75||(_c71>0&&_c6f.scrollTop<=_c73)||(_c71<0&&_c6f.scrollTop+_c6f.clientHeight>=_c6f.scrollHeight))){
- this.touchScrollSections=false;
- }else{
- if(!_c74&&(!_c76||(_c70>0&&_c6f.scrollLeft<=_c72)||(_c70<0&&_c6f.scrollLeft+_c6f.clientWidth>=_c6f.scrollWidth))){
- this.touchScrollSections=false;
- }else{
- this.touchScrollSections=true;
- }
- }
- };
- PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_c77,_c78){
- var _c79=(_c77>0)?_c77:0-_c77;
- var _c7a=(_c78>0)?_c78:0-_c78;
- return (_c7a>_c79);
- };
- PinFreezeContainer.prototype.destroy=function(){
- this.removeTouchScrolling();
- GUtil.destroyProperties(this);
- };
- function PinFreezeManager(oCV){
- this.m_oCV=oCV;
- this.m_viewerId=oCV.getId();
- this.m_frozenInfo=null;
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this.c_resizeTweekLimit=5;
- this.m_repaintOnVisible=false;
- };
- PinFreezeManager.prototype.addContainerObject=function(lid,_c7d,_c7e,_c7f,_c80){
- if(_c7d||_c7e){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- if(!this.m_frozenInfo[lid]){
- this._createDefaultFrozenInfo(lid);
- }
- this.m_frozenInfo[lid].freezeTop=_c7d;
- this.m_frozenInfo[lid].freezeSide=_c7e;
- var _c81=this.newContainer(lid,_c7d,_c7e,_c7f,_c80);
- this.m_frozenInfo[lid].pinFreezeContainers.push(_c81);
- return _c81;
- }
- return null;
- };
- PinFreezeManager.prototype.newContainer=function(lid,_c83,_c84,_c85,_c86){
- return new PinFreezeContainer(this,lid,this.m_viewerId,_c83,_c84,_c85,_c86);
- };
- PinFreezeManager.prototype.clearPinInfo=function(lid){
- if(!this.m_frozenInfo){
- return;
- }
- if(lid){
- if(this.m_frozenInfo[lid]){
- delete this.m_frozenInfo[lid];
- }
- }else{
- delete this.m_frozenInfo;
- this.m_frozenInfo=null;
- }
- };
- PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){
- this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}};
- };
- PinFreezeManager.prototype._resetFrozenInfo=function(lid){
- var _c8a=this.m_frozenInfo[lid];
- if(_c8a){
- delete _c8a.pinFreezeContainers;
- _c8a.pinFreezeContainers=[];
- _c8a.freezeTop=false;
- _c8a.freezeSide=false;
- }
- };
- PinFreezeManager.prototype.prepopulateFrozenInfo=function(_c8b){
- var _c8c=getDescendantElementsByAttribute(_c8b,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_c8c){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- for(var i=0;i<_c8c.length;i++){
- var _c8e=_c8c[i];
- if(_c8e.getAttribute("id")=="rt"+this.m_viewerId){
- continue;
- }
- var lid=this.removeNamespace(_c8e.getAttribute("lid"));
- if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){
- continue;
- }
- if(!this.m_frozenInfo[lid]){
- this._createDefaultFrozenInfo(lid);
- }
- if(!this.m_frozenInfo[lid].childContainers){
- this.m_frozenInfo[lid].childContainers={};
- }
- var _c90=getDescendantElementsByAttribute(_c8e,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_c90){
- for(var _c91=0;_c91<_c90.length;_c91++){
- var _c92=_c90[_c91];
- var _c93=this.removeNamespace(_c92.getAttribute("lid"));
- if(!this.m_frozenInfo[lid].childContainers[_c93]){
- var _c94=_c92.parentNode;
- while(_c94&&!_c94.getAttribute("lid")){
- _c94=_c94.parentNode;
- }
- if(_c94&&this.removeNamespace(_c94.getAttribute("lid"))==lid){
- this.m_frozenInfo[lid].childContainers[_c93]=true;
- }
- }
- }
- }
- }
- this._updateParentContainerInfo();
- }
- };
- PinFreezeManager.prototype._updateParentContainerInfo=function(){
- for(var _c95 in this.m_frozenInfo){
- var _c96=this.m_frozenInfo[_c95].childContainers;
- if(_c96){
- for(var _c97 in _c96){
- if(this.m_frozenInfo[_c97]){
- this.m_frozenInfo[_c97].parentContainer=_c95;
- break;
- }
- }
- }
- }
- };
- PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){
- if(this.m_frozenInfo[lid]){
- while(this.m_frozenInfo[lid].parentContainer){
- lid=this.m_frozenInfo[lid].parentContainer;
- }
- }
- return lid;
- };
- PinFreezeManager.prototype.freezeContainer=function(lid,_c9a,_c9b){
- var _c9c=document.getElementById("CVReport"+this.m_viewerId);
- this.prepopulateFrozenInfo(_c9c);
- var _c9d=this.getTopLevelContainerLID(lid);
- this.unfreezeAllNestedContainers(_c9d,_c9c);
- this.m_frozenInfo[lid].freezeTop=_c9a;
- this.m_frozenInfo[lid].freezeSide=_c9b;
- var _c9e=this._createPinAndFreezeObject(_c9c,_c9d);
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this._resizePinFreezeObjects(_c9e);
- this.sectionStructureChange();
- if(isIE()){
- var obj=this;
- setTimeout(function(){
- obj.refresh();
- },1);
- var _ca0=document.getElementById("RVContent"+this.m_viewerId);
- this.m_oCV.repaintDiv(_ca0);
- }
- return _c9e;
- };
- PinFreezeManager.prototype.getInitialWidthThreshold=function(){
- return document.body.clientWidth*3/4;
- };
- PinFreezeManager.prototype.getInitialHeightThreshold=function(){
- return document.body.clientWidth*9/10;
- };
- PinFreezeManager.prototype.hasFrozenContainers=function(){
- return ((this.m_frozenInfo)?true:false);
- };
- PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
- return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false;
- }
- return false;
- };
- PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
- return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false;
- }
- return false;
- };
- PinFreezeManager.prototype.removeNamespace=function(idNS){
- if(idNS.length>this.m_viewerId.length){
- if(idNS.indexOf(this.m_viewerId)>0){
- return idNS.substring(0,idNS.indexOf(this.m_viewerId));
- }
- }
- return idNS;
- };
- PinFreezeManager.prototype.getContainer=function(lid,_ca5){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
- _ca5=_ca5?_ca5:0;
- return this.m_frozenInfo[lid].pinFreezeContainers[_ca5];
- }
- return null;
- };
- PinFreezeManager.prototype.nodeToContainer=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- var _ca8=null;
- if(slid){
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- _ca8=this.getContainer(lid);
- }
- return _ca8;
- };
- PinFreezeManager.prototype.getContainerElement=function(_caa){
- var lid=this.removeNamespace(_caa.getAttribute("lid"));
- if(lid){
- var _cac=this.getContainer(lid);
- if(_cac){
- return _cac.getContainer();
- }
- }
- return null;
- };
- PinFreezeManager.prototype._createPinAndFreezeObject=function(_cad,lid){
- var _caf=null;
- if(this.m_frozenInfo){
- var _cb0=this.m_frozenInfo[lid];
- var _cb1=_cb0.initialLoad;
- if(_cb1){
- delete _cb0.initialLoad;
- }
- var _cb2=_cb0.freezeTop;
- var _cb3=_cb0.freezeSide;
- var _cb4=null;
- if(_cb1&&_cb0.pinFreezeContainers&&(_cb2||_cb3)){
- _cb4=_cb0.pinFreezeContainers.slice(0);
- }
- var _cb5=_cad;
- if(_cb0&&_cb0.parentContainer){
- var _cb6=getElementsByAttribute(_cad,"table","lid",_cb0.parentContainer+this.m_viewerId);
- if(_cb6){
- for(parentIndex=0;parentIndex<_cb6.length;parentIndex++){
- if(!_cb6[parentIndex].getAttribute("clonednode")){
- _cb5=_cb6[parentIndex];
- break;
- }
- }
- }
- }
- if(_cb0.childContainers){
- for(var _cb7 in _cb0.childContainers){
- var _cb8=this._createPinAndFreezeObject(_cb5,_cb7);
- _caf=_caf?_caf:_cb8;
- }
- }
- var _cb9=getElementsByAttribute(_cb5,"table","lid",lid+this.m_viewerId);
- if(_cb9&&_cb9.length>0){
- delete _cb0.pinFreezeContainers;
- _cb0.pinFreezeContainers=[];
- }else{
- return null;
- }
- if(_cb9&&(_cb2||_cb3)){
- var _cba=(_caf!==null);
- for(var i=0;i<_cb9.length;i++){
- var _cbc=_cb9[i];
- if(_cbc.getAttribute("clonednode")=="true"){
- continue;
- }
- _caf=this.addContainerObject(lid,_cb2,_cb3,_cbc,i);
- if(_caf){
- _caf.createPFContainer(_cb5,_cba);
- if(_cb1){
- _caf.copyProperties(_cb4[0]);
- }
- _caf.freezeContainerInReport(_cad);
- }
- }
- }
- }
- return _caf;
- };
- PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_cbd){
- if(this.m_frozenInfo){
- var _cbe=false;
- var _cbf=null;
- for(var _cc0 in this.m_frozenInfo){
- var _cc1=this.m_frozenInfo[_cc0];
- if(!_cbe){
- _cbe=_cc1.initialLoad;
- }
- if(!_cc1.parentContainer){
- var temp=this._createPinAndFreezeObject(_cbd,_cc1.lid);
- _cbf=_cbf?_cbf:temp;
- }
- }
- if(!_cbe&&_cbf){
- this._resizePinFreezeObjects(_cbf);
- }
- this.refresh();
- }
- };
- PinFreezeManager.prototype._resizePinFreezeObjects=function(_cc3){
- var _cc4,_cc5;
- var _cc6=this.m_oCV.getViewerWidget();
- if(_cc6){
- var size=_cc6.getWidgetSize();
- _cc5=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_cc3.getClientWidth();
- _cc4=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_cc3.getClientHeight();
- }else{
- var _cc8=document.getElementById("RVContent"+this.m_viewerId);
- var _cc9=document.getElementById("mainViewerTable"+this.m_viewerId);
- _cc5=_cc8.clientWidth;
- _cc4=_cc9.clientHeight;
- }
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this.resize(_cc5,_cc4);
- };
- PinFreezeManager.prototype.resize=function(_cca,_ccb){
- var _ccc=(Math.abs(_cca-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
- var _ccd=(Math.abs(_ccb-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
- if(_ccc&&_ccd){
- return;
- }
- var _cce=(Math.abs(_cca-this.m_lastWidthProcessed)>2)?_cca:0;
- var _ccf=(Math.abs(_ccb-this.m_lastHeightProcessed)>2)?_ccb:0;
- for(var lid in this.m_frozenInfo){
- if(!this.m_frozenInfo[lid].parentContainer){
- this.resizeContainer(lid,_cce,_ccf);
- }
- }
- this.m_lastWidthProcessed=_cca;
- this.m_lastHeightProcessed=_ccb;
- };
- PinFreezeManager.prototype.resizeContainer=function(lid,_cd2,_cd3){
- var _cd4=this.m_frozenInfo[lid];
- if(_cd4){
- var _cd5=null;
- if(_cd4.childContainers){
- var _cd6=_cd2>10?_cd2-10:_cd2;
- var _cd7=_cd3>10?_cd3-10:_cd3;
- for(var _cd8 in _cd4.childContainers){
- _cd5=this.resizeContainer(_cd8,_cd6,_cd7);
- }
- }
- var _cd9=_cd4.pinFreezeContainers;
- var _cda=null;
- var _cdb=null;
- if(_cd9){
- for(var i=0;i<_cd9.length;i++){
- _cda=_cd9[i];
- _cda.resize(_cd2,_cd3,_cd4.parentContainer,_cd5);
- var _cdd=_cda.getContainer();
- if(_cdd&&(!_cdb||(_cdb.width<_cdd.clientWidth))){
- _cdb={"width":_cdd.clientWidth,"lid":_cda.m_lidNS};
- }
- }
- }
- return _cdb;
- }
- };
- PinFreezeManager.prototype.processAutoResize=function(_cde,_cdf){
- this.m_lastWidthProcessed=_cde;
- this.m_lastHeightProcessed=_cdf;
- };
- PinFreezeManager.prototype.onSetVisible=function(){
- this.refresh();
- if(this.m_repaintOnVisible){
- this.rePaint();
- this.m_repaintOnVisible=false;
- }
- };
- PinFreezeManager.prototype.onResizeCanvas=function(_ce0){
- if(_ce0){
- this.rePaint();
- }else{
- this.m_repaintOnVisible=true;
- }
- };
- PinFreezeManager.prototype.rePaint=function(){
- for(var lid in this.m_frozenInfo){
- if(!this.m_frozenInfo[lid].parentContainer){
- this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed);
- }
- }
- };
- PinFreezeManager.prototype.refresh=function(){
- for(var _ce2 in this.m_frozenInfo){
- var _ce3=this.m_frozenInfo[_ce2].pinFreezeContainers;
- if(_ce3){
- for(var i=0;i<_ce3.length;i++){
- var _ce5=_ce3[i];
- _ce5.synchScroll();
- _ce5.synchVScroll();
- }
- }
- }
- };
- PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){
- return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true);
- };
- PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){
- var lid=this.getValidSelectedContainerId(false);
- if(lid){
- this.m_oCV.getSelectionController().resetSelections();
- return this.freezeContainerRowHeadings(lid);
- }
- return null;
- };
- PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){
- var lid=this.getValidSelectedContainerId(false);
- if(lid){
- return (!this.hasFrozenRowHeadings(lid));
- }
- return false;
- };
- PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){
- this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false);
- };
- PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){
- var lid=this.getValidSelectedContainerId(false);
- if(lid){
- this.m_oCV.getSelectionController().resetSelections();
- this.unfreezeContainerRowHeadings(lid);
- }
- };
- PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){
- var lid=this.getValidSelectedContainerId(false);
- if(lid){
- return (this.hasFrozenRowHeadings(lid));
- }
- return false;
- };
- PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){
- return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid));
- };
- PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){
- var lid=this.getValidSelectedContainerId(true);
- if(lid){
- this.m_oCV.getSelectionController().resetSelections();
- return this.freezeContainerColumnHeadings(lid);
- }
- return null;
- };
- PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){
- var lid=this.getValidSelectedContainerId(true);
- if(lid){
- return (!this.hasFrozenColumnHeadings(lid));
- }
- return false;
- };
- PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){
- this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid));
- };
- PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){
- var lid=this.getValidSelectedContainerId(true);
- if(lid){
- this.m_oCV.getSelectionController().resetSelections();
- this.unfreezeContainerColumnHeadings(lid);
- }
- };
- PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){
- var lid=this.getValidSelectedContainerId(true);
- if(lid){
- return (this.hasFrozenColumnHeadings(lid));
- }
- return false;
- };
- PinFreezeManager.prototype.getValidSelectedContainerId=function(_cf2){
- var _cf3=this.m_oCV.getSelectionController().getAllSelectedObjects();
- if(_cf3&&_cf3.length&&(_cf3[0].getDataContainerType()==="crosstab"||(_cf2&&_cf3[0].getDataContainerType()==="list"))){
- var lid=(_cf3[0].getLayoutElementId());
- if(lid){
- if(!this.hasPromptControlsInFreezableCells(lid)){
- return this.removeNamespace(lid);
- }
- }
- }
- return null;
- };
- PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
- var _cf6=this.m_oCV.getLayoutElementFromLid(lid);
- var _cf7=getElementsByAttribute(_cf6,["td","th"],"type","columnTitle");
- var _cf8=new RegExp("(^|[W])clsPromptComponent($|[W])");
- var _cf9=isIE()?"className":"class";
- for(var j in _cf7){
- if(_cf7.hasOwnProperty(j)){
- var _cfb=getElementsByAttribute(_cf7[j],"*",_cf9,null,1,_cf8);
- if(_cfb.length>0){
- return true;
- }
- }
- }
- return false;
- };
- PinFreezeManager.prototype.unfreeze=function(lid,_cfd,_cfe){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
- var _cff=this.m_frozenInfo[lid].pinFreezeContainers;
- if(_cff){
- for(var i=0;i<_cff.length;i++){
- var _d01=_cff[i];
- _d01.unfreeze(_cfd);
- }
- if(_cfe){
- this._resetFrozenInfo(lid);
- }
- }
- }
- };
- PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_d03){
- var _d04=this.m_frozenInfo[lid];
- if(_d04){
- if(_d04.freezeTop||_d04.freezeSide){
- this.unfreeze(lid,_d03,false);
- }
- if(_d04.childContainers){
- for(var _d05 in _d04.childContainers){
- this.unfreezeAllNestedContainers(_d05,_d03);
- }
- }
- }
- };
- PinFreezeManager.prototype.isNodeVisible=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- if(!slid){
- return true;
- }
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- var _d09=this.getContainer(lid);
- if(!_d09){
- return true;
- }
- var _d0a=PinFreezeContainer.getSectionNameFromSlid(slid);
- var _d0b=_d09.getSection(_d0a);
- var _d0c=null,_d0d=null;
- var _d0e=node;
- var _d0f=null;
- while(_d0e&&_d0e!==_d0b&&!_d0c&&!_d0d){
- _d0c=_d09.getMain(_d0e);
- _d0d=_d09.getCopy(_d0e);
- _d0f=_d0e;
- _d0e=_d0e.parentNode;
- }
- var _d10=_d0c?true:false;
- var _d11=_d0d?true:false;
- if(_d10){
- return _d09.getCopy(_d0c)===_d0f;
- }else{
- if(_d11){
- return _d09.getCopy(_d0f)?false:true;
- }else{
- return true;
- }
- }
- };
- PinFreezeManager.prototype.sectionStructureChange=function(){
- var _d12=this.m_oCV.getViewerWidget();
- if(_d12&&_d12.getAnnotationHelper()){
- _d12.getAnnotationHelper().repositionCommentIndicators();
- }
- };
- PinFreezeManager.prototype.deepCloneNode=function(_d13){
- var copy=_d13.cloneNode(true);
- var _d15=this.m_oCV.getViewerWidget();
- if(_d15){
- if(_d15.reportContainsDijits()){
- var _d16=getElementsByAttribute(copy,"*","widgetid","*");
- if(_d16&&_d16.length){
- for(var i=0;i<_d16.length;i++){
- _d16[i].parentNode.removeChild(_d16[i]);
- }
- }
- }
- }
- return copy;
- };
- PinFreezeManager.prototype.toJSONString=function(){
- var _d18="";
- var _d19="";
- for(var _d1a in this.m_frozenInfo){
- if(_d18.length>0){
- _d18+=",";
- }
- var _d1b=this.m_frozenInfo[_d1a];
- _d18+="{";
- _d18+="\"lid\":\""+_d1b.lid.replace("\"","\\\"")+"\",";
- _d18+="\"freezeTop\":"+_d1b.freezeTop+",";
- _d18+="\"freezeSide\":"+_d1b.freezeSide+",";
- if(_d1b.parentContainer){
- _d18+="\"parentContainer\":\""+_d1b.parentContainer+"\",";
- }
- if(_d1b.pinFreezeContainers&&_d1b.pinFreezeContainers.length>0){
- _d18+="\"properties\":"+_d1b.pinFreezeContainers[0].toJSONString()+",";
- }
- _d18+="\"childContainers\": {";
- if(_d1b.childContainers){
- var _d1c=true;
- for(var _d1d in _d1b.childContainers){
- if(!_d1c){
- _d18+=",";
- }
- _d18+="\""+_d1d+"\":true";
- _d1c=false;
- }
- }
- _d18+="}}";
- }
- if(_d18.length>0){
- _d19="{\"version\":1, \"containers\":["+_d18+"]}";
- }
- return _d19;
- };
- PinFreezeManager.prototype.fromJSONString=function(_d1e){
- if(!_d1e||_d1e.length===0){
- return;
- }
- var _d1f=null;
- try{
- _d1f=eval("("+_d1e+")");
- }
- catch(e){
- if(typeof console!="undefined"){
- console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_d1e);
- console.log(e);
- }
- }
- if(!_d1f){
- return;
- }
- var _d20=_d1f.containers;
- var _d21=_d1f.version;
- if(_d20.length>0){
- this.m_frozenInfo={};
- }
- for(var _d22=0;_d22<_d20.length;_d22++){
- var _d23=_d20[_d22];
- var lid=_d23.lid;
- var _d25=_d23.freezeTop;
- var _d26=_d23.freezeSide;
- var _d27=document.getElementById("CVReport"+this.m_viewerId);
- var _d28=getElementsByAttribute(_d27,"table","lid",lid+this.m_viewerId);
- var _d29=[];
- if(_d28&&(_d25||_d26)){
- for(var i=0;i<_d28.length;i++){
- var _d2b=_d28[i];
- var _d2c=new PinFreezeContainer(this,lid,this.m_viewerId,_d23.freezeTop,_d23.freezeSide,_d2b,i);
- if(_d23.properties){
- applyJSONProperties(_d2c,_d23.properties);
- }
- _d29.push(_d2c);
- }
- }
- this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_d25,"freezeSide":_d26,"pinFreezeContainers":_d29,"initialLoad":true};
- if(_d21>=1){
- if(_d23.childContainers){
- this.m_frozenInfo[lid].childContainers=_d23.childContainers;
- }
- if(_d23.parentContainer){
- this.m_frozenInfo[lid].parentContainer=_d23.parentContainer;
- }
- }
- }
- };
- PinFreezeManager.prototype.removeIdAttribute=function(_d2d){
- var _d2e=_d2d.getAttribute("id");
- if(_d2e!==null&&_d2e!==""){
- _d2d.removeAttribute("id");
- }
- var _d2f=getElementsByAttribute(_d2d,"*","id","*");
- if(_d2f&&_d2f.length){
- for(var i=0;i<_d2f.length;i++){
- _d2f[i].removeAttribute("id");
- }
- }
- return _d2d;
- };
- PinFreezeManager.prototype.isElementInMainOutput=function(_d31){
- return PinFreezeContainer.isElementInMainOutput(_d31);
- };
- PinFreezeManager.prototype.isIWidgetMobile=function(){
- return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
- };
- PinFreezeManager.prototype.destroy=function(){
- GUtil.destroyProperties(this);
- };
- function AuthoredDrillAction(){
- this.m_drillTargetSpecification="";
- };
- AuthoredDrillAction.prototype=new CognosViewerAction();
- AuthoredDrillAction.prototype.setRequestParms=function(_d32){
- this.m_drillTargetSpecification=_d32;
- };
- AuthoredDrillAction.prototype.executeDrillTarget=function(_d33){
- var _d34=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_d33));
- var _d35=encodeURIComponent(_d34.getAttribute("bookmarkRef"));
- var _d36=_d34.getAttribute("path");
- var _d37=this._shouldShowInNewWindow(_d34);
- var oCV=this.getCognosViewer();
- if((_d35!==null&&_d35!=="")&&(_d36===null||_d36==="")){
- var _d39=_d34.getAttribute("bookmarkPage");
- if(_d39&&_d39!==""){
- oCV.executeAction("GotoPage",{"pageNumber":_d39,"anchorName":_d35});
- }else{
- document.location="#"+_d35;
- }
- }else{
- var _d3a="";
- if(_d37){
- _d3a="_blank";
- }
- var _d3b=[];
- var _d3c=[];
- _d3c.push("obj");
- _d3c.push(_d36);
- _d3b[_d3b.length]=_d3c;
- var _d3d=false;
- var _d3e,_d3f,_d40,_d41,sNil;
- var _d43=XMLHelper_FindChildrenByTagName(_d34,"drillParameter",false);
- for(var _d44=0;_d44<_d43.length;++_d44){
- _d3e=[];
- _d3f=_d43[_d44];
- _d40=_d3f.getAttribute("value");
- _d41=_d3f.getAttribute("name");
- if(_d40!==null&&_d40!==""){
- _d3e.push("p_"+_d41);
- _d3e.push(this.buildSelectionChoicesSpecification(_d3f));
- }
- sNil=_d3f.getAttribute("nil");
- if(sNil!==null&&sNil!==""){
- _d3e.push("p_"+_d41);
- _d3e.push(this.buildSelectionChoicesNilSpecification());
- }
- if(_d3e.length>0){
- _d3b[_d3b.length]=_d3e;
- }
- if(!_d3d){
- var _d45=_d3f.getAttribute("propertyToPass");
- _d3d=(_d45&&_d45.length>0)?true:false;
- }
- }
- var _d46=_d34.getAttribute("method");
- var _d47=_d34.getAttribute("outputFormat");
- var _d48=_d34.getAttribute("outputLocale");
- var _d49=_d34.getAttribute("prompt");
- var _d4a=_d34.getAttribute("dynamicDrill");
- var _d4b=this.getXMLNodeAsString(_d34,"parameters");
- var _d4c=this.getXMLNodeAsString(_d34,"objectPaths");
- var _d4d=oCV.getId();
- var _d4e=document.forms["formWarpRequest"+_d4d];
- var _d4f=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF");
- if((!_d4f||_d4f.toLowerCase()!=="false")&&_d49!="true"&&this.isSameReport(_d4e,_d36)&&this.isSameReportFormat(_d47)&&!_d37&&!_d3d){
- var _d50=new ViewerDispatcherEntry(oCV);
- _d50.addFormField("ui.action","forward");
- if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){
- oCV.rvMainWnd.addCurrentReportToReportHistory();
- var _d51=oCV.rvMainWnd.saveReportHistoryAsXML();
- _d50.addFormField("cv.previousReports",_d51);
- }
- for(_d44=0;_d44<_d43.length;++_d44){
- _d3e=[];
- _d3f=_d43[_d44];
- _d40=_d3f.getAttribute("value");
- _d41=_d3f.getAttribute("name");
- sNil=_d3f.getAttribute("nil");
- if((sNil===null||sNil==="")&&(_d40===null||_d40==="")){
- _d3e.push("p_"+_d41);
- _d3e.push(this.buildSelectionChoicesNilSpecification());
- }
- if(_d3e.length>0){
- _d3b[_d3b.length]=_d3e;
- }
- }
- for(_d44=1;_d44<_d3b.length;_d44++){
- _d50.addFormField(_d3b[_d44][0],_d3b[_d44][1]);
- }
- _d50.addFormField("_drillThroughToSelf","true");
- if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){
- _d50.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id);
- }
- oCV.setUsePageRequest(true);
- oCV.dispatchRequest(_d50);
- if(typeof oCV.m_viewerFragment=="undefined"){
- var _d52=getCognosViewerObjectRefAsString(_d4d);
- setTimeout(_d52+".getRequestIndicator().show()",10);
- }
- }else{
- doSingleDrill(_d3a,_d3b,_d46,_d47,_d48,_d35,_d4b,_d4c,this.getCognosViewer().getId(),_d49,_d4a);
- }
- }
- };
- AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_d53){
- return _d53.getAttribute("showInNewWindow")=="true";
- };
- AuthoredDrillAction.prototype.isSameReport=function(_d54,_d55){
- if(_d54["ui.object"]&&_d55==_d54["ui.object"].value){
- return true;
- }
- return false;
- };
- AuthoredDrillAction.prototype.isSameReportFormat=function(_d56){
- var _d57=this.getCognosViewer().envParams["run.outputFormat"];
- if(_d57){
- if(_d56==_d57){
- return true;
- }else{
- if(_d57=="HTML"&&_d56=="HTMLFragment"){
- return true;
- }
- }
- }
- return false;
- };
- AuthoredDrillAction.prototype.getXMLNodeAsString=function(_d58,_d59){
- var sXML="";
- if(_d58!=null){
- var node=XMLHelper_FindChildByTagName(_d58,_d59,false);
- if(node!=null){
- sXML=XMLBuilderSerializeNode(node);
- }
- }
- return sXML;
- };
- AuthoredDrillAction.prototype.execute=function(_d5c){
- if(this.m_drillTargetSpecification!=""){
- this.executeDrillTarget(this.m_drillTargetSpecification);
- }else{
- if(typeof _d5c!="undefined"){
- var _d5d=this.getCognosViewer().getDrillTargets();
- var _d5e=this.getAuthoredDrillThroughContext(_d5c,_d5d);
- var _d5f=_d5e.childNodes;
- if(_d5f.length==1){
- this.executeDrillTarget(XMLBuilderSerializeNode(_d5f[0]));
- }else{
- doMultipleDrills(XMLBuilderSerializeNode(_d5e),this.getCognosViewer().getId());
- }
- }
- }
- };
- AuthoredDrillAction.prototype.showDrillTargets=function(_d60){
- var _d61="<context>";
- for(var _d62=0;_d62<_d60.length;++_d62){
- var _d63=_d60[_d62];
- _d61+="<member>";
- var _d64=_d63.getAttribute("label");
- _d61+="<name>";
- _d61+=sXmlEncode(_d64);
- _d61+="</name>";
- var _d65=_d63.getAttribute("path");
- _d61+="<drillThroughSearchPath>";
- _d61+=sXmlEncode(_d65);
- _d61+="</drillThroughSearchPath>";
- var _d66=_d63.getAttribute("method");
- _d61+="<drillThroughAction>";
- _d61+=sXmlEncode(_d66);
- _d61+="</drillThroughAction>";
- var _d67=_d63.getAttribute("outputFormat");
- _d61+="<drillThroughFormat>";
- _d61+=sXmlEncode(_d67);
- _d61+="</drillThroughFormat>";
- var _d68="parent."+this.getTargetReportRequestString(_d63);
- _d61+="<data>";
- _d61+=sXmlEncode(_d68);
- _d61+="</data>";
- _d61+="</member>";
- }
- _d61+="</context>";
- };
- AuthoredDrillAction.prototype.populateContextMenu=function(_d69){
- var _d6a=this.getCognosViewer();
- var _d6b=_d6a.rvMainWnd.getToolbarControl();
- var _d6c=null;
- if(typeof _d6b!="undefined"&&_d6b!=null){
- var _d6d=_d6b.getItem("goto");
- if(_d6d){
- _d6c=_d6d.getMenu();
- }
- }
- var _d6e=_d6a.rvMainWnd.getContextMenu();
- var _d6f=null;
- if(typeof _d6e!="undefined"&&_d6e!=null){
- _d6f=_d6e.getGoToMenuItem().getMenu();
- }
- if(_d6c!=null||_d6f!=null){
- var _d70=this.getCognosViewer().getDrillTargets();
- var _d71=this.getAuthoredDrillThroughContext(_d69,_d70);
- var _d72=_d71.childNodes;
- if(_d72.length>0){
- for(var _d73=0;_d73<_d72.length;++_d73){
- var _d74=_d72[_d73];
- var _d75=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_d74))+"\");";
- var _d76=this.getTargetReportIconPath(_d74);
- var _d77=_d74.getAttribute("label");
- if(isViewerBidiEnabled()){
- var bidi=BidiUtils.getInstance();
- _d77=bidi.btdInjectUCCIntoStr(_d77,getViewerBaseTextDirection());
- }
- if(_d6c!=null){
- new CMenuItem(_d6c,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin());
- }
- if(_d6f!=null){
- new CMenuItem(_d6f,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin());
- }
- }
- }
- }
- };
- AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){
- return "<selectChoices/>";
- };
- AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_d79){
- var _d7a="";
- var _d7b=_d79.getAttribute("value");
- if(_d7b!=null){
- var _d7c=_d79.getAttribute("propertyToPass");
- _d7a+="<selectChoices";
- if(_d7c!=null&&_d7c!=""){
- _d7a+=" propertyToPass=\"";
- _d7a+=sXmlEncode(_d7c);
- _d7a+="\"";
- }
- _d7a+=">";
- if(_d7b.indexOf("<selectChoices>")!=-1){
- _d7a+=_d7b.substring(_d7b.indexOf("<selectChoices>")+15);
- }else{
- if(_d7b!=""){
- _d7a+="<selectOption ";
- var sMun=_d79.getAttribute("mun");
- if(sMun!=null&&sMun!=""){
- var _d7e=sXmlEncode(sMun);
- _d7a+="useValue=\"";
- _d7a+=_d7e;
- _d7a+="\" ";
- _d7a+="mun=\"";
- _d7a+=_d7e;
- _d7a+="\" ";
- _d7a+="displayValue=\"";
- _d7a+=sXmlEncode(_d7b);
- _d7a+="\"";
- }else{
- _d7a+="useValue=\"";
- _d7a+=sXmlEncode(_d7b);
- _d7a+="\" ";
- var _d7f=_d79.getAttribute("displayValue");
- if(_d7f==null||_d7f==""){
- _d7f=_d7b;
- }
- _d7a+="displayValue=\"";
- _d7a+=sXmlEncode(_d7f);
- _d7a+="\"";
- }
- _d7a+="/>";
- _d7a+="</selectChoices>";
- }
- }
- }
- return _d7a;
- };
- AuthoredDrillAction.prototype.getPropertyToPass=function(_d80,_d81){
- if(_d80!=null&&_d80!=""&&_d81!=null){
- var _d82=_d81.childNodes;
- if(_d82!=null){
- for(var _d83=0;_d83<_d82.length;++_d83){
- var _d84=_d82[_d83];
- var _d85="";
- if(_d84.getAttribute("name")!=null){
- _d85=_d84.getAttribute("name");
- }
- if(_d85==_d80){
- return _d84.getAttribute("propertyToPass");
- }
- }
- }
- }
- return "";
- };
- AuthoredDrillAction.prototype.getTargetReportRequestString=function(_d86){
- var _d87="";
- var _d88=_d86.getAttribute("bookmarkRef");
- var _d89=_d86.getAttribute("path");
- var _d8a=_d86.getAttribute("showInNewWindow");
- if((_d88!=null&&_d88!="")&&(_d89==null||_d89=="")){
- _d87+="document.location=\"#";
- _d87+=_d88;
- _d87+="\";";
- }else{
- _d87+="doSingleDrill(";
- if(_d8a=="true"){
- _d87+="\"_blank\",";
- }else{
- _d87+="\"\",";
- }
- _d87+="[[\"obj\",\"";
- _d87+=encodeURIComponent(_d89);
- _d87+="\"]";
- var _d8b=XMLHelper_FindChildrenByTagName(_d86,"drillParameter",false);
- for(var _d8c=0;_d8c<_d8b.length;++_d8c){
- var _d8d=_d8b[_d8c];
- var _d8e=_d8d.getAttribute("value");
- var _d8f=_d8d.getAttribute("name");
- if(_d8e!=null&&_d8e!=""){
- _d87+=", [\"p_"+_d8f+"\",\""+encodeURIComponent(this.buildSelectionChoicesSpecification(_d8d))+"\"]";
- }
- var sNil=_d8d.getAttribute("nil");
- if(sNil!=null&&sNil!=""){
- _d87+="\", [\"p_"+_d8f+"\",\""+encodeURIComponent(this.buildSelectionChoicesNilSpecification())+"\"]";
- }
- }
- _d87+="],";
- var _d91=_d86.getAttribute("method");
- _d87+="\""+encodeURIComponent(_d91)+"\",";
- var _d92=_d86.getAttribute("outputFormat");
- _d87+="\""+encodeURIComponent(_d92)+"\",";
- var _d93=_d86.getAttribute("outputLocale");
- _d87+="\""+encodeURIComponent(_d93)+"\",";
- _d87+="\""+encodeURIComponent(_d88)+"\",";
- var _d94=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_d86,"parameters",false));
- _d87+="\""+encodeURIComponent(_d94)+"\",";
- var _d95=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_d86,"objectPaths",false));
- _d87+="\""+encodeURIComponent(_d95)+"\",";
- _d87+="\""+encodeURIComponent(this.getCognosViewer().getId())+"\",";
- var _d96=_d86.getAttribute("prompt");
- _d87+="\""+encodeURIComponent(_d96)+"\",";
- var _d97=_d86.getAttribute("dynamicDrill");
- _d87+=" "+encodeURIComponent(_d97);
- _d87+=");";
- }
- return _d87;
- };
- AuthoredDrillAction.prototype.getTargetReportIconPath=function(_d98){
- var _d99="";
- var _d9a=_d98.getAttribute("bookmarkRef");
- var _d9b=XMLHelper_FindChildByTagName(_d98,"drillParameter",false);
- if((_d9a!=null&&_d9a!="")&&_d9b==null){
- _d99="/common/images/spacer.gif";
- }else{
- var _d9c=_d98.getAttribute("method");
- switch(_d9c){
- case "editAnalysis":
- _d99="/ps/portal/images/icon_ps_analysis.gif";
- break;
- case "editQuery":
- _d99="/ps/portal/images/icon_qs_query.gif";
- break;
- case "execute":
- _d99="/ps/portal/images/action_run.gif";
- break;
- case "view":
- var _d9d=_d98.getAttribute("outputFormat");
- switch(_d9d){
- case "HTML":
- case "XHTML":
- case "HTMLFragment":
- _d99="/ps/portal/images/icon_result_html.gif";
- break;
- case "PDF":
- _d99="/ps/portal/images/icon_result_pdf.gif";
- break;
- case "XML":
- _d99="/ps/portal/images/icon_result_xml.gif";
- break;
- case "CSV":
- _d99="/ps/portal/images/icon_result_csv.gif";
- break;
- case "XLS":
- _d99="/ps/portal/images/icon_result_excel.gif";
- break;
- case "SingleXLS":
- _d99="/ps/portal/images/icon_result_excel_single.gif";
- break;
- case "XLWA":
- _d99="/ps/portal/images/icon_result_excel_web_arch.gif";
- break;
- default:
- _d99="/common/images/spacer.gif";
- }
- break;
- default:
- _d99="/common/images/spacer.gif";
- }
- }
- return this.getCognosViewer().getWebContentRoot()+_d99;
- };
- AuthoredDrillAction.prototype.getAuthoredDrillThroughContext=function(_d9e,_d9f){
- if(typeof _d9e!="string"||typeof _d9f!="object"){
- return null;
- }
- var _da0=XMLBuilderLoadXMLFromString(_d9e);
- if(_da0==null||_da0.firstChild==null){
- return null;
- }
- var _da1=XMLHelper_GetFirstChildElement(_da0);
- if(XMLHelper_GetLocalName(_da1)!="AuthoredDrillTargets"){
- return null;
- }
- var _da2=XMLHelper_GetFirstChildElement(_da1);
- if(XMLHelper_GetLocalName(_da2)!="rvDrillTargets"){
- return null;
- }
- var _da3=_da2.childNodes;
- if(_da3===null||_da3.length===0){
- return null;
- }
- var _da4=self.XMLBuilderCreateXMLDocument("rvDrillTargets");
- for(var _da5=0;_da5<_da3.length;++_da5){
- if(typeof _da3[_da5].getAttribute=="undefined"){
- continue;
- }
- var _da6=_da4.createElement("drillTarget");
- _da4.documentElement.appendChild(_da6);
- var _da7=_da3[_da5].getAttribute("bookmarkRef");
- if(_da7===null){
- _da6.setAttribute("bookmarkRef","");
- }else{
- _da6.setAttribute("bookmarkRef",_da7);
- }
- var _da8=_da3[_da5].getAttribute("bookmarkPage");
- if(_da8===null){
- _da6.setAttribute("bookmarkPage","");
- }else{
- _da6.setAttribute("bookmarkPage",_da8);
- }
- var _da9=_da3[_da5].getAttribute("drillIdx");
- if(_da9==null){
- continue;
- }
- if(_da9>=_d9f.length){
- continue;
- }
- var _daa=_d9f[_da9];
- if(typeof _daa!="object"){
- continue;
- }
- _da6.setAttribute("outputFormat",_daa.getOutputFormat());
- _da6.setAttribute("outputLocale",_daa.getOutputLocale());
- _da6.setAttribute("prompt",_daa.getPrompt());
- _da6.setAttribute("dynamicDrill",_daa.isDynamicDrillThrough()?"true":"false");
- var _dab=_da3[_da5].getAttribute("label");
- if(_dab===null||_dab===""){
- _dab=_daa.getLabel();
- }
- _da6.setAttribute("label",_dab);
- _da6.setAttribute("path",_daa.getPath());
- _da6.setAttribute("showInNewWindow",_daa.getShowInNewWindow());
- _da6.setAttribute("method",_daa.getMethod());
- var _dac=_da2;
- var _dad="";
- var _dae=_daa.getParameterProperties();
- if(typeof _dae!="undefined"&&_dae!=null&&_dae!=""){
- _dad=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_daa.getParameterProperties()));
- }
- while(_dac){
- var _daf=_dac.childNodes[_da5].childNodes;
- for(var _db0=0;_db0<_daf.length;++_db0){
- var _db1=_daf[_db0].cloneNode(true);
- if(_dad){
- var _db2=this.getPropertyToPass(_db1.getAttribute("name"),_dad);
- if(_db2!=null&&_db2!=""){
- _db1.setAttribute("propertyToPass",_db2);
- }
- }
- _da6.appendChild(_db1);
- }
- _dac=_dac.nextSibling;
- }
- var _db3="<root xmlns:bus=\"http://developer.cognos.com/schemas/bibus/3/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
- var _db4="</root>";
- var _db5=_db3+_daa.getParameters()+_db4;
- var _db6=XMLBuilderLoadXMLFromString(_db5);
- var _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db6));
- if(_db7){
- _da6.appendChild(_db7.cloneNode(true));
- }
- var _db8=_db3+_daa.getObjectPaths()+_db4;
- var _db9=XMLBuilderLoadXMLFromString(_db8);
- _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db9));
- if(_db7){
- _da6.appendChild(_db7.cloneNode(true));
- }
- }
- return XMLHelper_GetFirstChildElement(_da4);
- };
- function XmlHttpObject(){
- this.m_formFields=new CDictionary();
- this.xmlHttp=XmlHttpObject.createRequestObject();
- this.m_requestIndicator=null;
- this.m_httpCallbacks={};
- this.m_asynch=true;
- this.m_headers=null;
- };
- XmlHttpObject.prototype.setHeaders=function(_dba){
- this.m_headers=_dba;
- };
- XmlHttpObject.prototype.getHeaders=function(){
- return this.m_headers;
- };
- XmlHttpObject.prototype.newRequest=function(){
- var _dbb=new XmlHttpObject();
- _dbb.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
- this.executeHttpCallback("newRequest");
- return _dbb;
- };
- XmlHttpObject.prototype.abortHttpRequest=function(){
- if(this.xmlHttp!=null){
- this.xmlHttp.abort();
- this.xmlHttp=null;
- this.executeHttpCallback("cancel");
- this.m_httpCallbacks={};
- }
- };
- XmlHttpObject.prototype.cancel=function(){
- this.abortHttpRequest();
- };
- XmlHttpObject.prototype.executeHttpCallback=function(_dbc){
- if(this.m_httpCallbacks&&this.m_httpCallbacks[_dbc]){
- var _dbd=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
- var _dbe=GUtil.generateCallback(this.m_httpCallbacks[_dbc].method,_dbd,this.m_httpCallbacks[_dbc].object);
- _dbe();
- return true;
- }
- return false;
- };
- XmlHttpObject.prototype.setCallbacks=function(_dbf){
- if(!this.m_httpCallbacks){
- this.m_httpCallbacks={};
- }
- for(callback in _dbf){
- this.m_httpCallbacks[callback]=_dbf[callback];
- }
- };
- XmlHttpObject.prototype.getCallbacks=function(){
- return this.m_httpCallbacks;
- };
- XmlHttpObject.createRequestObject=function(){
- var _dc0=null;
- if(window.XMLHttpRequest){
- _dc0=new XMLHttpRequest();
- }else{
- if(window.ActiveXObject){
- _dc0=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- }
- }
- return _dc0;
- };
- XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
- var _dc1=this.xmlHttp;
- if(_dc1&&_dc1.readyState===4){
- if(_dc1.status===200){
- this.httpSuccess();
- }else{
- this.httpError();
- }
- }else{
- }
- };
- XmlHttpObject.prototype.init=function(_dc2,_dc3,url,_dc5){
- this.m_action=_dc2;
- this.m_gateway=_dc3;
- this.m_url=url;
- this.m_asynch=_dc5;
- };
- XmlHttpObject.prototype.httpSuccess=function(){
- this.executeHttpCallback("postHttpRequest");
- this.executeHttpCallback("entryComplete");
- this.executeHttpCallback("complete");
- this.m_httpCallbacks=null;
- };
- XmlHttpObject.prototype.httpError=function(){
- this.executeHttpCallback("entryFault");
- this.executeHttpCallback("fault");
- this.m_httpCallbacks=null;
- };
- XmlHttpObject.prototype.forceSynchronous=function(){
- this.m_asynch=false;
- };
- XmlHttpObject.prototype.sendRequest=function(){
- this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
- };
- XmlHttpObject.prototype.sendHtmlRequest=function(_dc6,_dc7,url,_dc9){
- var _dca=this.xmlHttp;
- if(_dca){
- _dca.open(_dc6,_dc7,_dc9);
- if(_dc9){
- _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- }else{
- _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- if(!isIE()){
- _dca.onload=GUtil.generateCallback(this.httpSuccess,[],this);
- _dca.onerror=GUtil.generateCallback(this.httpError,[],this);
- }
- }
- _dca.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
- if(this.m_headers){
- for(header in this.m_headers){
- _dca.setRequestHeader(header,this.m_headers[header]);
- }
- }
- this.executeHttpCallback("preHttpRequest");
- var _dcb=this.convertFormFieldsToUrl();
- if(url){
- _dcb+=url;
- }
- _dca.send(_dcb);
- }
- };
- XmlHttpObject.prototype.getResponseXml=function(){
- return (this.xmlHttp)?this.xmlHttp.responseXML:null;
- };
- XmlHttpObject.prototype.getResponseText=function(){
- return (this.xmlHttp)?this.xmlHttp.responseText:"";
- };
- XmlHttpObject.prototype.getResponseHeader=function(item){
- return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null;
- };
- XmlHttpObject.prototype.getStatus=function(){
- return this.xmlHttp.status;
- };
- XmlHttpObject.prototype.addFormField=function(name,_dce){
- this.m_formFields.add(name,_dce);
- };
- XmlHttpObject.prototype.getFormFields=function(){
- return this.m_formFields;
- };
- XmlHttpObject.prototype.getFormField=function(_dcf){
- return this.m_formFields.get(_dcf);
- };
- XmlHttpObject.prototype.clearFormFields=function(){
- this.m_formFields=new CDictionary();
- };
- XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
- var url="";
- var _dd1=this.m_formFields.keys();
- for(var _dd2=0;_dd2<_dd1.length;_dd2++){
- if(_dd2>0){
- url+="&";
- }
- url+=encodeURIComponent(_dd1[_dd2])+"="+encodeURIComponent(this.m_formFields.get(_dd1[_dd2]));
- }
- return url;
- };
- XmlHttpObject.prototype.concatResponseArguments=function(_dd3){
- var _dd4=[this];
- if(_dd3){
- _dd4=_dd4.concat(_dd3);
- }
- return _dd4;
- };
- function AsynchRequest(_dd5,_dd6){
- AsynchRequest.baseConstructor.call(this);
- this.m_gateway=_dd5;
- this.m_webContentRoot=_dd6;
- this.m_callbacks={};
- this.m_soapFault=null;
- this.m_faultDialog=null;
- this.m_promptDialog=null;
- this.m_logonDialog=null;
- };
- AsynchRequest.prototype=new XmlHttpObject();
- AsynchRequest.baseConstructor=XmlHttpObject;
- AsynchRequest.prototype.parent=XmlHttpObject.prototype;
- AsynchRequest.prototype.getTracking=function(){
- return "";
- };
- AsynchRequest.prototype.getConversation=function(){
- return "";
- };
- AsynchRequest.prototype.getPrimaryAction=function(){
- return "";
- };
- AsynchRequest.prototype.getActionState=function(){
- return "";
- };
- AsynchRequest.prototype.getAsynchStatus=function(){
- return "";
- };
- AsynchRequest.prototype.getResult=function(){
- return null;
- };
- AsynchRequest.prototype.getSoapFault=function(){
- return this.m_soapFault;
- };
- AsynchRequest.prototype.constructFaultEnvelope=function(){
- return null;
- };
- AsynchRequest.prototype.getPromptHTMLFragment=function(){
- return "";
- };
- AsynchRequest.prototype.isRAPWaitTrue=function(){
- return false;
- };
- AsynchRequest.prototype.getRAPRequestCache=function(){
- return null;
- };
- AsynchRequest.prototype.getMainConversation=function(){
- return null;
- };
- AsynchRequest.prototype.getMainTracking=function(){
- return null;
- };
- AsynchRequest.prototype.construct=function(){
- };
- AsynchRequest.prototype.executeCallback=function(_dd7){
- if(this.m_callbacks[_dd7]){
- var _dd8=this.concatResponseArguments(this.m_callbacks.customArguments);
- var _dd9=GUtil.generateCallback(this.m_callbacks[_dd7].method,_dd8,this.m_callbacks[_dd7].object);
- _dd9();
- return true;
- }
- return false;
- };
- AsynchRequest.prototype.setCallbacks=function(_dda){
- if(!this.m_callbacks){
- this.m_callbacks={};
- }
- for(callback in _dda){
- this.m_callbacks[callback]=_dda[callback];
- }
- };
- AsynchRequest.prototype.getCallbacks=function(){
- return this.m_callbacks;
- };
- AsynchRequest.prototype.newRequest=function(){
- var _ddb=this.construct();
- _ddb.setHeaders(this.getHeaders());
- if(this.getFormFields().exists("b_action")){
- _ddb.addFormField("b_action",this.getFormField("b_action"));
- }
- if(this.getFormFields().exists("cv.catchLogOnFault")){
- _ddb.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- _ddb.setPromptDialog(this.m_promptDialog);
- _ddb.setFaultDialog(this.m_faultDialog);
- _ddb.setLogonDialog(this.m_logonDialog);
- _ddb.m_asynch=this.m_asynch;
- if(this.m_callbacks.newRequest){
- var _ddc=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_ddb],this.m_callbacks.newRequest.object);
- _ddc();
- }
- return _ddb;
- };
- AsynchRequest.prototype.success=function(){
- var _ddd=this.getAsynchStatus();
- switch(_ddd){
- case "stillWorking":
- case "working":
- this.working();
- break;
- case "prompting":
- this.prompting();
- break;
- case "fault":
- case "complete":
- case "conversationComplete":
- this.complete();
- break;
- default:
- this.complete();
- break;
- }
- };
- AsynchRequest.prototype.setFaultDialog=function(_dde){
- if(_dde instanceof IFaultDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
- }
- this.m_faultDialog=_dde;
- }else{
- if(_dde&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- };
- AsynchRequest.prototype.setPromptDialog=function(_ddf){
- if(_ddf instanceof IPromptDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
- }
- this.m_promptDialog=_ddf;
- }else{
- if(_ddf&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- };
- AsynchRequest.prototype.setLogonDialog=function(_de0){
- if(_de0 instanceof ILogOnDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
- }
- this.m_logonDialog=_de0;
- }else{
- if(_de0&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- };
- AsynchRequest.prototype.resubmitRequest=function(){
- var _de1=this.newRequest();
- _de1.m_formFields=this.m_formFields;
- _de1.sendRequest();
- return _de1;
- };
- AsynchRequest.prototype.sendRequest=function(){
- var _de2=this;
- var _de3={"complete":{"object":_de2,"method":_de2.successHandler},"fault":{"object":_de2,"method":_de2.errorHandler}};
- this.init("POST",this.m_gateway,"",this.m_asynch);
- this.executeCallback("preHttpRequest");
- this.parent.setCallbacks.call(this,_de3);
- this.parent.sendRequest.call(this);
- };
- AsynchRequest.prototype.errorHandler=function(){
- this.executeCallback("postHttpRequest");
- this.executeCallback("entryFault");
- this.executeCallback("error");
- };
- AsynchRequest.prototype.successHandler=function(){
- this.executeCallback("postHttpRequest");
- if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){
- window["AsynchRequestPromptDialog"].hide();
- window["AsynchRequestPromptDialog"]=null;
- }
- if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- var _de4=this.getResponseText();
- if(_de4.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
- this.passportTimeout();
- }else{
- if((_de4.indexOf("http-equiv=\"refresh\"")!=-1)||(_de4.indexOf("http-equiv='refresh'")!=-1)){
- this.passportTimeout();
- }else{
- this.executeCallback("entryFault");
- if(!this.executeCallback("fault")){
- var _de5=window.open("","","height=400,width=500");
- if(_de5!=null){
- _de5.document.write(_de4);
- }
- }
- }
- }
- }else{
- this.m_soapFault=this.constructFaultEnvelope();
- if(this.m_soapFault!=null){
- var _de6=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
- if(_de6!=null&&XMLHelper_FindChildByTagName(_de6,"promptInfo",true)){
- this.passportTimeout();
- }else{
- this.fault();
- }
- }else{
- this.success();
- }
- }
- };
- AsynchRequest.prototype.cancel=function(){
- this.parent.cancel.call(this);
- var _de7=this.getFormField("m_tracking");
- if(_de7){
- var _de8=new XmlHttpObject();
- _de8.init("POST",this.m_gateway,"",false);
- if(this.getFormField("cv.outputKey")){
- _de8.addFormField("b_action","cvx.high");
- _de8.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _de8.setHeaders(this.getHeaders());
- }else{
- _de8.addFormField("b_action","cognosViewer");
- }
- _de8.addFormField("cv.responseFormat","successfulRequest");
- _de8.addFormField("ui.action","cancel");
- _de8.addFormField("m_tracking",_de7);
- if(this.getFormField("cv.debugDirectory")){
- _de8.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _de8.sendRequest();
- this.executeCallback("cancel");
- }
- };
- AsynchRequest.prototype.working=function(){
- this.executeCallback("working");
- var _de9=this.newRequest();
- _de9.addFormField("m_tracking",this.getTracking());
- if(this.getFormField("cv.outputKey")){
- _de9.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _de9.addFormField("b_action","cvx.high");
- }
- if(this.isRAPWaitTrue()){
- _de9.m_formFields=this.m_formFields;
- _de9.addFormField("m_tracking",this.getTracking());
- _de9.addFormField("rapWait","true");
- var _dea=this.getRAPRequestCache();
- if(_dea!==null&&typeof _dea!="undefined"){
- _de9.addFormField("rapRequestCache",_dea);
- }
- var _deb=this.getMainConversation();
- if(_deb){
- _de9.addFormField("mainConversation",_deb);
- }
- var _dec=this.getMainTracking();
- if(_dec){
- _de9.addFormField("mainTracking",_dec);
- }
- }else{
- _de9.addFormField("ui.action","wait");
- _de9.addFormField("ui.primaryAction",this.getPrimaryAction());
- _de9.addFormField("cv.actionState",this.getActionState());
- if(this.getFormField("ui.preserveRapTags")){
- _de9.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
- }
- if(this.getFormField("ui.backURL")){
- _de9.addFormField("ui.backURL",this.getFormField("ui.backURL"));
- }
- if(this.getFormField("errURL")){
- _de9.addFormField("errURL",this.getFormField("errURL"));
- }
- if(this.getFormField("cv.showFaultPage")){
- _de9.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
- }
- if(this.getFormField("cv.catchLogOnFault")){
- _de9.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- }
- if(this.getFormField("bux")){
- _de9.addFormField("bux",this.getFormField("bux"));
- }
- if(this.getFormField("cv.debugDirectory")){
- _de9.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _de9.sendRequest();
- };
- AsynchRequest.prototype.prompting=function(){
- this.executeCallback("entryComplete");
- if(!this.executeCallback("prompting")){
- if(this.m_promptDialog!=null){
- this.showPromptPage();
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled prompt response was returned: %o",this.xmlHttp);
- }
- }
- }
- this.executeCallback("postEntryComplete");
- };
- AsynchRequest.prototype.promptPageOkCallback=function(_ded){
- var _dee=this.newRequest();
- _dee.addFormField("ui.action","forward");
- _dee.addFormField("m_tracking",this.getTracking());
- _dee.addFormField("ui.conversation",this.getConversation());
- _dee.addFormField("ui.primaryAction",this.getPrimaryAction());
- _dee.addFormField("cv.actionState",this.getActionState());
- for(var _def in _ded){
- _dee.addFormField(_def,_ded[_def]);
- }
- _dee.sendRequest();
- window["AsynchRequestObject"]=null;
- };
- AsynchRequest.prototype.promptPageCancelCallback=function(){
- window["AsynchRequestPromptDialog"].hide();
- this.complete();
- };
- AsynchRequest.prototype.showPromptPage=function(){
- window["AsynchRequestObject"]=this;
- window["AsynchRequestPromptDialog"]=this.m_promptDialog;
- var _df0=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
- window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_df0,400,400);
- window["AsynchRequestPromptDialog"].show();
- };
- AsynchRequest.prototype.passportTimeout=function(){
- this.executeCallback("entryFault");
- if(!this.executeCallback("passportTimeout")){
- if(this.m_logonDialog!=null){
- this.m_logonDialog.show(response.getSoapFault());
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault());
- }
- }
- }
- };
- AsynchRequest.prototype.fault=function(){
- this.executeCallback("entryFault");
- if(!this.executeCallback("fault")){
- if(this.m_faultDialog!=null){
- this.m_faultDialog.show(this.getSoapFault());
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled soap fault was returned: %o",this.getSoapFault());
- }
- }
- }
- };
- AsynchRequest.prototype.complete=function(){
- this.executeCallback("entryComplete");
- this.executeCallback("complete");
- this.executeCallback("postEntryComplete");
- };
- AsynchRequest.prototype.getSoapFaultCode=function(){
- var _df1=this.constructFaultEnvelope();
- if(_df1){
- var _df2=XMLHelper_FindChildByTagName(_df1,"faultcode",true);
- if(_df2!=null){
- return XMLHelper_GetText(_df2);
- }
- }
- return null;
- };
- AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
- var _df3=this.constructFaultEnvelope();
- if(_df3){
- var _df4=XMLHelper_FindChildByTagName(_df3,"messageString",true);
- if(_df4!=null){
- return XMLHelper_GetText(_df4);
- }
- }
- return null;
- };
- function AsynchDATARequest(_df5,_df6){
- AsynchDATARequest.baseConstructor.call(this,_df5,_df6);
- this.m_oResponseState=null;
- this.m_sResponseState=null;
- this.m_endOfStateIdx=-1;
- this.cStatePrefix="<xml><state>";
- this.cStateSuffix="</state></xml>";
- };
- AsynchDATARequest.prototype=new AsynchRequest();
- AsynchDATARequest.baseConstructor=AsynchRequest;
- AsynchDATARequest.prototype.getEndOfStateIdx=function(){
- if(this.m_endOfStateIdx==-1){
- var _df7=this.getResponseText().substring(0,12);
- if(_df7==this.cStatePrefix){
- this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix);
- if(this.m_endOfStateIdx!=-1){
- this.m_endOfStateIdx+=this.cStateSuffix.length;
- }
- }
- }
- return this.m_endOfStateIdx;
- };
- AsynchDATARequest.prototype.getResponseStateText=function(){
- if(!this.m_sResponseState){
- this.getResponseState();
- }
- return this.m_sResponseState;
- };
- AsynchDATARequest.prototype.getResponseState=function(){
- if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){
- this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length);
- if(this.m_sResponseState!=null){
- this.m_sResponseState=xml_decode(this.m_sResponseState);
- this.m_oResponseState=eval("("+this.m_sResponseState+")");
- }
- }
- return this.m_oResponseState;
- };
- AsynchDATARequest.prototype.getAsynchStatus=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){
- return this.getResponseState().m_sStatus;
- }
- return "unknown";
- };
- AsynchDATARequest.prototype.getTracking=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){
- return this.getResponseState().m_sTracking;
- }
- return "";
- };
- AsynchDATARequest.prototype.getConversation=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){
- return this.getResponseState().m_sConversation;
- }
- return "";
- };
- AsynchDATARequest.prototype.getPrimaryAction=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){
- return this.getResponseState().envParams["ui.primaryAction"];
- }
- return "";
- };
- AsynchDATARequest.prototype.getActionState=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){
- return this.getResponseState().m_sActionState;
- }
- return "";
- };
- AsynchDATARequest.prototype.getResult=function(){
- if(this.getEndOfStateIdx()!=-1){
- return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length);
- }
- return "";
- };
- AsynchDATARequest.prototype.getDebugLogs=function(){
- if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){
- return this.getResponseState().debugLogs;
- }
- return "";
- };
- AsynchDATARequest.prototype.getPromptHTMLFragment=function(){
- return this.getResult();
- };
- AsynchDATARequest.prototype.constructFaultEnvelope=function(){
- if(this.m_soapFault==null){
- var _df8=this.getResponseState();
- if(_df8!=null){
- if(_df8.m_sSoapFault){
- var _df9=_df8.m_sSoapFault;
- this.m_soapFault=XMLBuilderLoadXMLFromString(_df9);
- }
- }
- }
- return this.m_soapFault;
- };
- AsynchDATARequest.prototype.construct=function(){
- var _dfa=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
- _dfa.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _dfa.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _dfa.addFormField("cv.responseFormat","data");
- }
- return _dfa;
- };
- AsynchDATARequest.prototype.getEnvParam=function(_dfb){
- var _dfc=this.getResponseState();
- if(_dfc&&typeof _dfc.envParams!="undefined"&&typeof _dfc.envParams[_dfb]!="undefined"){
- return _dfc.envParams[_dfb];
- }
- return null;
- };
- AsynchDATARequest.prototype.isRAPWaitTrue=function(){
- var _dfd=this.getEnvParam("rapWait");
- if(_dfd!=null){
- return _dfd=="true"?true:false;
- }
- return false;
- };
- AsynchDATARequest.prototype.getRAPRequestCache=function(){
- return this.getEnvParam("rapRequestCache");
- };
- AsynchDATARequest.prototype.getMainConversation=function(){
- return this.getEnvParam("mainConversation");
- };
- AsynchDATARequest.prototype.getMainTracking=function(){
- return this.getEnvParam("mainTracking");
- };
- function AsynchJSONRequest(_dfe,_dff){
- AsynchJSONRequest.baseConstructor.call(this,_dfe,_dff);
- this.m_jsonResponse=null;
- };
- AsynchJSONRequest.prototype=new AsynchRequest();
- AsynchJSONRequest.baseConstructor=AsynchRequest;
- AsynchJSONRequest.prototype.getJSONResponseObject=function(){
- if(this.m_jsonResponse==null){
- if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){
- var text=this.getResponseText();
- if(text!=null){
- var _e01=this.removeInvalidCharacters(text);
- this.m_jsonResponse=eval("("+_e01+")");
- }
- }
- }
- return this.m_jsonResponse;
- };
- AsynchJSONRequest.prototype.getTracking=function(){
- var _e02=this.getJSONResponseObject();
- if(_e02){
- return _e02.tracking;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getConversation=function(){
- var _e03=this.getJSONResponseObject();
- if(_e03){
- return _e03.conversation;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getAsynchStatus=function(){
- var _e04=this.getJSONResponseObject();
- if(_e04){
- return _e04.status;
- }
- return "unknown";
- };
- AsynchJSONRequest.prototype.getPrimaryAction=function(){
- var _e05=this.getJSONResponseObject();
- if(_e05){
- return _e05.primaryAction;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getActionState=function(){
- var _e06=this.getJSONResponseObject();
- if(_e06){
- return _e06.actionState;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getDebugLogs=function(){
- var _e07=this.getJSONResponseObject();
- if(_e07){
- return _e07.debugLogs;
- }
- return "";
- };
- AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
- var _e08=this.getJSONResponseObject();
- if(_e08){
- return (_e08.rapWait==="true");
- }
- return false;
- };
- AsynchJSONRequest.prototype.getRAPRequestCache=function(){
- var _e09=this.getJSONResponseObject();
- if(_e09){
- var _e0a=_e09.rapRequestCache;
- if(_e0a!==null&&typeof _e0a!="undefined"){
- return _e0a;
- }
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainConversation=function(){
- var _e0b=this.getJSONResponseObject();
- if(_e0b){
- return _e0b.mainConversation;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainTracking=function(){
- var _e0c=this.getJSONResponseObject();
- if(_e0c){
- return _e0c.mainTracking;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getResult=function(){
- var _e0d=this.getJSONResponseObject();
- if(_e0d&&_e0d.json){
- var _e0e=this.removeInvalidCharacters(_e0d.json);
- return eval("("+_e0e+")");
- }
- return null;
- };
- AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
- if(text){
- text=text.replace(/(\n|\r|\t)+/g,"");
- }
- return text;
- };
- AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
- var _e10=this.getJSONResponseObject();
- if(_e10&&_e10.promptHTMLFragment){
- return _e10.promptHTMLFragment;
- }
- return "";
- };
- AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
- if(this.m_soapFault==null){
- var _e11=this.getJSONResponseObject();
- if(_e11.status=="fault"){
- this.m_soapFault=XMLBuilderLoadXMLFromString(_e11.fault);
- }
- }
- return this.m_soapFault;
- };
- AsynchJSONRequest.prototype.construct=function(){
- var _e12=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
- _e12.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _e12.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _e12.addFormField("cv.responseFormat","asynchJSON");
- }
- return _e12;
- };
- function IFaultDialog(){
- };
- IFaultDialog.prototype.show=function(){
- if(typeof console!="undefined"){
- console.log("Required method IFaultDialog:show not implemented.");
- }
- };
- IFaultDialog.prototype.handleUnknownHTMLResponse=function(){
- if(typeof console!="undefined"){
- console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented.");
- }
- };
- function ILogOnDialog(){
- };
- ILogOnDialog.prototype.show=function(_e13){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:show not implemented.");
- }
- };
- ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_e14){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
- }
- };
- function IPromptDialog(){
- };
- IPromptDialog.prototype.initialize=function(url,_e16,_e17){
- if(typeof console!="undefined"){
- console.log("Required method IModalDialog:initialize not implemented.");
- }
- };
- IPromptDialog.prototype.show=function(){
- if(typeof console!="undefined"){
- console.log("Required method IModalDialog:show not implemented.");
- }
- };
- IPromptDialog.prototype.hide=function(){
- if(typeof console!="undefined"){
- console.log("Required method IModalDialog:hide not implemented.");
- }
- };
- function IRequestHandler(){
- };
- IRequestHandler.prototype.preHttpRequest=function(_e18){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:preHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postHttpRequest=function(_e19){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postComplete=function(_e1a){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onComplete=function(_e1b){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onPostEntryComplete=function(_e1c){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onFault=function(_e1d){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onFault not implemented.");
- }
- };
- IRequestHandler.prototype.onPrompting=function(_e1e){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPrompting not implemented.");
- }
- };
- IRequestHandler.prototype.onWorking=function(_e1f){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onWorking not implemented.");
- }
- };
- IRequestHandler.prototype.setWorkingDialog=function(_e20){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
- }
- };
- IRequestHandler.prototype.setRequestIndicator=function(_e21){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:setExecutionCursor not implemented.");
- }
- };
- function IRequestIndicator(){
- };
- IRequestIndicator.prototype.show=function(){
- if(typeof console!="undefined"){
- console.log("Required method IRequestIndicator:show not implemented.");
- }
- };
- IRequestIndicator.prototype.hide=function(){
- if(typeof console!="undefined"){
- console.log("Required method IRequestIndicator:hide not implemented.");
- }
- };
- function BaseRequestHandler(oCV){
- if(oCV){
- this.m_oCV=oCV;
- this.m_workingDialog=null;
- this.m_requestIndicator=null;
- this.m_faultDialog=null;
- this.m_logOnDialog=null;
- this.m_promptDialog=null;
- this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null;
- }
- };
- BaseRequestHandler.prototype=new IRequestHandler();
- BaseRequestHandler.prototype.onError=function(_e23){
- };
- BaseRequestHandler.prototype.onComplete=function(){
- };
- BaseRequestHandler.prototype.onPrompting=function(){
- };
- BaseRequestHandler.prototype.resubmitInSafeMode=function(){
- };
- BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
- };
- BaseRequestHandler.prototype.onPostEntryComplete=function(){
- this._processDelayedLoadingQueue();
- };
- BaseRequestHandler.prototype.getViewer=function(){
- return this.m_oCV;
- };
- BaseRequestHandler.prototype.setDispatcherEntry=function(_e24){
- this.m_oDispatcherEntry=_e24;
- };
- BaseRequestHandler.prototype.getDispatcherEntry=function(){
- return this.m_oDispatcherEntry;
- };
- BaseRequestHandler.prototype.processInitialResponse=function(_e25){
- this.updateViewerState(_e25);
- };
- BaseRequestHandler.prototype.setLogOnDialog=function(_e26){
- if(_e26==null){
- this.m_logOnDialog=null;
- }else{
- if(_e26 instanceof ILogOnDialog){
- this.m_logOnDialog=_e26;
- }else{
- if(_e26&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setWorkingDialog=function(_e27){
- if(_e27==null){
- this.m_workingDialog=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
- this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
- }else{
- if(_e27 instanceof IRequestIndicator){
- this.m_workingDialog=_e27;
- }else{
- if(_e27&&typeof console!="undefined"){
- console.log("The parameter workingDialog must be an instance of IRequestIndicator");
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.getWorkingDialog=function(){
- return this.m_workingDialog;
- };
- BaseRequestHandler.prototype.setRequestIndicator=function(_e28){
- if(_e28==null){
- this.m_requestIndicator=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
- this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
- }else{
- if(_e28 instanceof IRequestIndicator){
- this.m_requestIndicator=_e28;
- }else{
- if(_e28&&typeof console!="undefined"){
- console.log("The parameter requestIndicator must be an instance of IRequestIndicator");
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.getRequestIndicator=function(){
- return this.m_requestIndicator;
- };
- BaseRequestHandler.prototype.setFaultDialog=function(_e29){
- if(_e29==null){
- this.m_faultDialog=null;
- }else{
- if(_e29 instanceof IFaultDialog){
- this.m_faultDialog=_e29;
- }else{
- if(_e29&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setPromptDialog=function(_e2a){
- if(_e2a==null){
- this.m_promptDialog=null;
- }else{
- if(_e2a instanceof IPromptDialog){
- this.m_promptDialog=_e2a;
- }else{
- if(_e2a&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.preHttpRequest=function(_e2b){
- if(_e2b&&typeof _e2b.getFormField=="function"){
- if(_e2b.getFormField("ui.action")!="wait"&&_e2b.getFormField("rapWait")!="true"){
- if(this.m_requestIndicator){
- this.m_requestIndicator.show();
- }
- }
- }
- };
- BaseRequestHandler.prototype.postHttpRequest=function(_e2c){
- if(_e2c&&typeof _e2c.getAsynchStatus=="function"){
- var _e2d=_e2c.getAsynchStatus();
- if(_e2d!="working"&&_e2d!="stillWorking"){
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- }
- }else{
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- }
- };
- BaseRequestHandler.prototype.onFault=function(_e2e){
- var oCV=this.getViewer();
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- if(typeof FaultDialog=="undefined"){
- if(typeof console!="undefined"){
- console.log("An unhandled fault was returned: %o",_e2e);
- }
- return;
- }
- if(!this.m_faultDialog){
- this.m_faultDialog=new FaultDialog(this.getViewer());
- }
- if(_e2e&&_e2e.getResponseHeader&&_e2e.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- this.m_faultDialog.handleUnknownHTMLResponse(_e2e.getResponseText());
- }else{
- if(_e2e&&_e2e.getSoapFault){
- this.m_faultDialog.show(_e2e.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _e30=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_faultDialog.show(_e30);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled fault was returned: %o",_e2e);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.isAuthenticationFault=function(_e31){
- var oCV=this.getViewer();
- var _e33=null;
- if(_e31&&_e31.getSoapFault){
- _e33=_e31.getSoapFault();
- }else{
- if(oCV.getSoapFault()){
- _e33=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- }
- }
- if(_e33!=null){
- var _e34=XMLHelper_FindChildByTagName(_e33,"CAM",true);
- return (_e34!=null&&XMLHelper_FindChildByTagName(_e34,"promptInfo",true)!=null);
- }
- return false;
- };
- BaseRequestHandler.prototype.onPassportTimeout=function(_e35){
- var oCV=this.getViewer();
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- if(!this.m_logOnDialog){
- this.m_logOnDialog=new LogOnDialog(this.getViewer());
- }
- if(_e35&&_e35.getResponseHeader&&_e35.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- var _e37="";
- if(_e35.getResponseText){
- _e37=_e35.getResponseText();
- }
- if((_e37.indexOf("http-equiv=\"refresh\"")!=-1)||(_e37.indexOf("http-equiv='refresh'")!=-1)){
- this.m_logOnDialog.show(null);
- }else{
- this.m_logOnDialog.handleUnknownHTMLResponse(_e37);
- }
- }else{
- if(_e35&&_e35.getSoapFault){
- this.m_logOnDialog.show(_e35.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _e38=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_logOnDialog.show(_e38);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_e35);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.onWorking=function(_e39){
- if(this.m_workingDialog){
- var _e3a=_e39&&typeof _e39.getAsynchStatus=="function"&&_e39.getAsynchStatus()=="stillWorking"?true:false;
- if(!_e3a){
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- this.m_workingDialog.show();
- }
- }
- };
- BaseRequestHandler.prototype.onCancel=function(){
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- var oCV=this.getViewer();
- oCV.gbPromptRequestSubmitted=false;
- this._processDelayedLoadingQueue();
- };
- BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){
- var oCV=this.getViewer();
- if(oCV&&oCV.getViewerWidget()){
- var _e3d=oCV.getViewerWidget();
- if(_e3d.getLoadManager()){
- _e3d.getLoadManager().processQueue();
- }
- }
- };
- BaseRequestHandler.prototype.onPrompting=function(_e3e){
- var oCV=this.getViewer();
- if(this.m_workingDialog){
- this.m_workingDialog.hide();
- }
- if(this.m_requestIndicator){
- this.m_requestIndicator.hide();
- }
- if(!this.m_promptDialog){
- this.m_promptDialog=new PromptDialog(this.getViewer());
- }
- window["AsynchRequestObject"]=_e3e;
- window["AsynchRequestPromptDialog"]=this.m_promptDialog;
- var _e40="?cv.id="+oCV.getId();
- window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_e40,400,400);
- window["AsynchRequestPromptDialog"].show();
- };
- BaseRequestHandler.prototype.processDATAReportResponse=function(_e41){
- var oCV=this.getViewer();
- if(!oCV||oCV.m_destroyed){
- if(console){
- console.warn("Tried to process a data response on an invalid CCognosViewer",oCV);
- }
- return;
- }
- var _e43=_e41.getResponseState();
- if(!_e43){
- this.resubmitInSafeMode();
- }
- if(this.loadReportHTML(_e41.getResult())===false){
- this.resubmitInSafeMode();
- }
- this.updateViewerState(_e43);
- };
- BaseRequestHandler.prototype.updateViewerState=function(_e44){
- var oCV=this.getViewer();
- applyJSONProperties(oCV,_e44);
- var _e46=oCV.getStatus();
- if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("<")===0){
- oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]);
- }
- if(_e46!="fault"){
- if(oCV.envParams["rapReportInfo"]){
- this._processRapReportInfo(oCV);
- }
- if(typeof _e44.clientunencodedexecutionparameters!="undefined"){
- var _e47=document.getElementById("formWarpRequest"+oCV.getId());
- if(_e47!=null&&typeof _e47["clientunencodedexecutionparameters"]!="undefined"){
- _e47["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters;
- }
- if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
- document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters;
- }
- }
- }else{
- oCV.setTracking("");
- }
- };
- BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
- if(oCV.envParams["rapReportInfo"]){
- var _e49=eval("("+oCV.envParams["rapReportInfo"]+")");
- if(typeof RAPReportInfo!="undefined"){
- var _e4a=new RAPReportInfo(_e49,oCV);
- oCV.setRAPReportInfo(_e4a);
- }
- }
- };
- BaseRequestHandler.prototype.loadReportHTML=function(_e4b){
- if(!_e4b){
- return true;
- }
- var oCV=this.getViewer();
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_gotHtml",oCV);
- }
- if(oCV.m_undoStack.length>0){
- oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true;
- }
- oCV.pageNavigationObserverArray=[];
- oCV.m_flashChartsObjectIds=[];
- var _e4d=_e4b.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
- oCV.m_sHTML=_e4d;
- oCV.setHasPrompts(false);
- var id=oCV.getId();
- var _e4f=document.getElementById("RVContent"+id);
- var _e50=document.getElementById("CVReport"+id);
- if(window.gScriptLoader){
- var _e51=oCV.getViewerWidget()?true:false;
- var _e52=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_e50;
- _e4d=window.gScriptLoader.loadCSS(_e4d,_e52,_e51,id);
- }
- if(oCV.sBrowser=="ie"){
- _e4d="<span style='display:none'> </span>"+_e4d;
- }
- _e50.innerHTML=_e4d;
- this.massageHtmlBeforeDisplayed();
- if(window.gScriptLoader){
- var _e53=GUtil.generateCallback(oCV.showLoadedContent,[_e4f],oCV);
- oCV.m_resizeReady=false;
- if(!window.gScriptLoader.loadAll(_e50,_e53,id,true)){
- if(window.gScriptLoader.containsAjaxWarnings()){
- return false;
- }
- }
- }else{
- _e4f.style.display="block";
- }
- var _e54=document.querySelectorAll("button");
- var _e55=_e54.length;
- for(var k=0;k<_e55;k++){
- var _e57=_e54[k];
- var id=_e57.id;
- var _e58=id.match(/reprompt/);
- if(_e58){
- var _e59=_e57.outerHTML;
- var _e5a=_e59.match(/layoutname="\w+"/);
- if(_e5a!==null){
- var _e5b=_e5a[0];
- var _e5c=/".*"/;
- var _e5d=_e5c.exec(_e5b);
- if(oCV.getCurrentPromptControlFocus()==_e5d){
- _e57.focus();
- oCV.setCurrentPromptControlFocus(null);
- _e57=null;
- }
- }else{
- oCV.setCurrentPromptControlFocus(null);
- _e57=null;
- }
- }
- }
- oCV.updateOutputForA11ySupport();
- this._clearFindState();
- return true;
- };
- BaseRequestHandler.prototype._clearFindState=function(){
- var oCV=this.getViewer();
- var _e5f=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
- if(_e5f&&!_e5f.findOnServerInProgress()){
- oCV.getState().clearFindState();
- }
- };
- BaseRequestHandler.prototype.showReport=function(){
- var oCV=this.getViewer();
- var _e61=document.getElementById("CVReport"+oCV.getId());
- if(_e61){
- _e61.style.display="";
- }
- };
- BaseRequestHandler.prototype.postComplete=function(){
- var oCV=this.getViewer();
- if(oCV.shouldWriteNavLinks()){
- oCV.writeNavLinks(oCV.getSecondaryRequests().join(" "));
- }
- if(oCV.getStatus()==="complete"){
- oCV.m_undoStack=[new CognosViewerSession(oCV)];
- }
- };
- BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_e63){
- if(this.m_httpRequestConfig){
- var _e64=this.m_httpRequestConfig.getReportStatusCallback(_e63);
- if(_e64){
- _e64();
- }
- }
- };
- BaseRequestHandler.prototype.addCallbackHooks=function(){
- if(!this.m_httpRequestConfig){
- return;
- }
- this._addCallback("complete","onComplete");
- this._addCallback("working","onWorking");
- this._addCallback("prompting","onPrompting");
- };
- BaseRequestHandler.prototype._addCallback=function(_e65,_e66){
- var _e67=_e65;
- var _e68=this[_e66];
- this[_e66]=function(_e69){
- _e68.apply(this,arguments);
- var _e6a=null;
- if(_e69&&typeof _e69.getAsynchStatus=="function"){
- _e6a=_e69.getAsynchStatus();
- }else{
- _e6a=_e67=="complete"?this.getViewer().getStatus():_e67;
- }
- if(_e6a=="stillWorking"){
- return;
- }
- var _e6b=this.m_httpRequestConfig.getReportStatusCallback(_e6a);
- if(typeof _e6b=="function"){
- setTimeout(_e6b,10);
- }
- };
- };
- function ViewerBaseWorkingDialog(_e6c){
- if(!_e6c){
- return;
- }
- this.setCognosViewer(_e6c);
- this.m_oCV=_e6c;
- this.m_sNamespace=_e6c.getId();
- this.m_sGateway=_e6c.getGateway();
- this.m_UIBlacklist=null;
- this.m_bUse=true;
- this.m_bCancelSubmitted=false;
- };
- ViewerBaseWorkingDialog.prototype=new IRequestIndicator();
- ViewerBaseWorkingDialog.prototype.setCognosViewer=function(oCV){
- this.m_oCV=oCV;
- };
- ViewerBaseWorkingDialog.prototype.getCognosViewer=function(){
- return this.m_oCV;
- };
- ViewerBaseWorkingDialog.prototype.getGateway=function(){
- return this.m_sGateway;
- };
- ViewerBaseWorkingDialog.prototype.getNamespace=function(){
- return this.m_sNamespace;
- };
- ViewerBaseWorkingDialog.prototype.cancelSubmitted=function(){
- return this.m_bCancelSubmitted;
- };
- ViewerBaseWorkingDialog.prototype.setCancelSubmitted=function(_e6e){
- this.m_bCancelSubmitted=_e6e;
- };
- ViewerBaseWorkingDialog.prototype.show=function(){
- var _e6f=document.getElementById(this.getContainerId());
- if(_e6f){
- _e6f.style.display="block";
- this.enableCancelButton();
- }else{
- this.create();
- }
- var _e70=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_e70){
- _e70.style.display="block";
- }
- };
- ViewerBaseWorkingDialog.prototype.create=function(){
- if(typeof document.body!="undefined"){
- if(this.isModal()){
- this.createModalWaitDialog();
- }else{
- this.createInlineWaitDialog();
- }
- }
- };
- ViewerBaseWorkingDialog.prototype.createContainer=function(_e71){
- var _e72=document.createElement("div");
- _e72.setAttribute("id",this.getContainerId());
- _e72.className=_e71?"modalWaitPage":"inlineWaitPage";
- return _e72;
- };
- ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){
- this._createBlocker();
- var _e73=this.createContainer(true);
- _e73.innerHTML=this.renderHTML();
- _e73.style.zIndex="7002";
- _e73.setAttribute("role","region");
- _e73.setAttribute("aria-label",RV_RES.GOTO_WORKING);
- document.body.appendChild(_e73);
- var _e74=this.createModalIframeBackground();
- document.body.appendChild(_e74);
- var _e75=0;
- var _e76=0;
- if(typeof window.innerHeight!="undefined"){
- _e75=Math.round((window.innerHeight/2)-(_e73.offsetHeight/2));
- _e76=Math.round((window.innerWidth/2)-(_e73.offsetWidth/2));
- }else{
- _e75=Math.round((document.body.clientHeight/2)-(_e73.offsetHeight/2));
- _e76=Math.round((document.body.clientWidth/2)-(_e73.offsetWidth/2));
- }
- _e73.style.bottom=_e75+"px";
- _e73.style.left=_e76+"px";
- _e74.style.left=_e76-1+"px";
- _e74.style.bottom=_e75-1+"px";
- _e74.style.width=_e73.offsetWidth+2+"px";
- _e74.style.height=_e73.offsetHeight+2+"px";
- };
- ViewerBaseWorkingDialog.prototype._createBlocker=function(){
- var _e77=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_e77){
- return;
- }
- var _e78=document.getElementById("mainViewerTable"+this.m_oCV.getId());
- if(_e78){
- _e77=document.createElement("div");
- _e78.parentNode.appendChild(_e77);
- _e77.id="reportBlocker"+this.m_oCV.getId();
- _e77.style.zIndex="6001";
- _e77.style.position="absolute";
- _e77.style.top="0px";
- _e77.style.left="0px";
- _e77.style.width="100%";
- _e77.style.height="100%";
- _e77.style.display="none";
- _e77.style.opacity="0";
- _e77.style.backgroundColor="#FFFFFF";
- _e77.style.filter="alpha(opacity:0)";
- }
- };
- ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){
- var _e79=this.m_oCV.getId();
- var _e7a=document.getElementById("CVReport"+_e79);
- if(_e7a){
- var _e7b=this.createContainer(false);
- _e7b.innerHTML="<table width=\"100%\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\" role=\"presentation\">"+this.renderHTML()+"</td></tr></table>";
- _e7a.appendChild(_e7b);
- }
- };
- ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){
- var _e7c=document.createElement("iframe");
- var _e7d="..";
- var oCV=this.getCognosViewer();
- if(oCV!==null){
- _e7d=oCV.getWebContentRoot();
- }
- _e7c.setAttribute("id",this.getContainerId()+"Iframe");
- _e7c.setAttribute("title","Empty iframe");
- _e7c.setAttribute("src",_e7d+"/common/images/spacer.gif");
- _e7c.setAttribute("scrolling","no");
- _e7c.setAttribute("frameborder","0");
- _e7c.style.position="absolute";
- _e7c.style.zIndex="6002";
- _e7c.style.display="block";
- return _e7c;
- };
- ViewerBaseWorkingDialog.prototype.updateCoords=function(_e7f,_e80){
- if(this.m_container!==null&&m_iframeBackground!==null){
- var _e81=0;
- var _e82=0;
- if(typeof window.innerHeight!="undefined"){
- _e81=Math.round((window.innerHeight/2)-(_e7f.offsetHeight/2));
- _e82=Math.round((window.innerWidth/2)-(_e7f.offsetWidth/2));
- }else{
- _e81=Math.round((document.body.clientHeight/2)-(_e7f.offsetHeight/2));
- _e82=Math.round((document.body.clientWidth/2)-(_e7f.offsetWidth/2));
- }
- _e7f.style.bottom=_e81+"px";
- _e7f.style.left=_e82+"px";
- _e80.style.left=_e7f.style.left;
- _e80.style.bottom=_e7f.style.bottom;
- _e80.style.width=_e7f.offsetWidth+"px";
- _e80.style.height=_e7f.offsetHeight+"px";
- }
- };
- ViewerBaseWorkingDialog.prototype.hide=function(){
- var _e83=document.getElementById(this.getContainerId());
- if(_e83){
- _e83.parentNode.removeChild(_e83);
- }
- var _e84=document.getElementById(this.getContainerId()+"Iframe");
- if(_e84){
- _e84.parentNode.removeChild(_e84);
- }
- var _e85=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_e85){
- _e85.parentNode.removeChild(_e85);
- }
- };
- ViewerBaseWorkingDialog.prototype.isModal=function(){
- var _e86=this.m_oCV.getId();
- var _e87=document.getElementById("CVReport"+_e86);
- var _e88=true;
- if(_e87&&_e87.innerHTML===""){
- _e88=false;
- }
- return _e88;
- };
- ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_e89){
- };
- ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){
- };
- function FaultDialog(oCV){
- this.m_oCV=oCV;
- };
- FaultDialog.prototype=new IFaultDialog();
- FaultDialog.prototype.show=function(_e8b){
- if(typeof console!="undefined"){
- console.log("FaultDialog - an unhandled soap fault was returned: %o",_e8b);
- }
- };
- FaultDialog.prototype.handleUnknownHTMLResponse=function(_e8c){
- this.m_oCV.setTracking("");
- this.m_oCV.setConversation("");
- if(_e8c){
- if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){
- var _e8d=document.getElementsByTagName("head")[0];
- var _e8e=_e8c.match(/<body[^>]*>([\s\S]*)<\/body>/im)[1];
- var _e8f=/<script[^>]*>([\s\S]*?)<\/script>/igm;
- var _e90=_e8f.exec(_e8c);
- while(_e90!=null){
- var _e91=document.createElement("script");
- _e91.type="text/javascript";
- var _e92=_e90[0].match(/src="([\s\S]*?)"/i);
- if(_e92==null){
- _e91.text=_e90[1];
- }else{
- _e91.src=_e92[1];
- }
- _e8d.appendChild(_e91);
- _e90=_e8f.exec(_e8c);
- }
- document.body.innerHTML=_e8e;
- }else{
- document.write(_e8c);
- }
- }
- };
- function LogOnDialog(oCV){
- this.m_oCV=oCV;
- };
- LogOnDialog.prototype=new ILogOnDialog();
- LogOnDialog.prototype.handleUnknownHTMLResponse=function(_e94){
- if(_e94){
- document.write(_e94);
- }
- };
- LogOnDialog.prototype.show=function(_e95){
- launchLogOnDialog(this.m_oCV.getId(),_e95);
- };
- LogOnDialog.prototype.hide=function(){
- };
- function PromptDialog(oCV){
- this.m_oCV=oCV;
- this.m_dialogImpl=null;
- };
- PromptDialog.prototype=new IPromptDialog();
- PromptDialog.prototype.initialize=function(url,_e98,_e99){
- this.m_dialogImpl=new CModal("","",document.body,null,null,_e98,_e99,true,true,false,true,this.m_oCV.getWebContentRoot());
- var _e9a=document.getElementById(CMODAL_CONTENT_ID);
- _e9a.src=url;
- };
- PromptDialog.prototype.show=function(){
- this.m_dialogImpl.show();
- };
- PromptDialog.prototype.hide=function(){
- this.m_dialogImpl.hide();
- destroyCModal();
- };
- function WorkingDialog(_e9b){
- if(_e9b){
- this.m_bSimpleWorkingDialog=false;
- this.m_bShowCancelButton=(_e9b.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true;
- WorkingDialog.baseConstructor.call(this,_e9b);
- this.m_secondaryRequests=_e9b.getSecondaryRequests();
- }
- };
- WorkingDialog.prototype=new ViewerBaseWorkingDialog();
- WorkingDialog.baseConstructor=ViewerBaseWorkingDialog;
- WorkingDialog.prototype.setSecondaryRequests=function(_e9c){
- this.m_secondaryRequests=_e9c;
- };
- WorkingDialog.prototype._getSecondaryRequests=function(){
- return this.m_secondaryRequests;
- };
- WorkingDialog.prototype.getIsSavedReport=function(){
- return this.getCognosViewer().bIsSavedReport;
- };
- WorkingDialog.prototype.setSimpleWorkingDialogFlag=function(flag){
- this.m_bSimpleWorkingDialog=flag;
- };
- WorkingDialog.prototype.getSimpleWorkingDialogFlag=function(){
- return this.m_bSimpleWorkingDialog;
- };
- WorkingDialog.prototype.showDeliveryOptions=function(_e9e){
- var _e9f=this.getNamespace();
- var _ea0=document.getElementById("DeliveryOptionsVisible"+_e9f);
- if(_ea0){
- _ea0.style.display=(_e9e===false?"none":"block");
- if(_e9e){
- var _ea1=_ea0.getElementsByTagName("a");
- for(var i=_ea1.length;i>0;i--){
- if(_ea1[i]&&_ea1[i].getAttribute("tabIndex")=="0"){
- _ea1[i].focus();
- }
- }
- }
- }
- _ea0=document.getElementById("OptionsLinkSelected"+_e9f);
- if(_ea0){
- _ea0.style.display=(_e9e===false?"none":"block");
- }
- _ea0=document.getElementById("OptionsLinkUnselected"+_e9f);
- if(_ea0){
- _ea0.style.display=(_e9e===false?"block":"none");
- }
- };
- WorkingDialog.prototype.renderHTML=function(){
- var _ea3=this.getNamespace();
- var _ea4=_ea3+"_workingMsg "+_ea3+"_workingMsg2";
- var html="<table class=\"viewerWorkingDialog\" id=\"CVWaitTable"+_ea3+"\""+" role=\"presentation\">";
- html+=("<tr>"+"<td align=\"center\">"+"<div tabIndex=\"0\" role=\"presentation\" aria-labelledby=\""+_ea4+"\""+" class=\"body_dialog_modal workingDialogDiv\">");
- html+=this.renderFirstInnerTable();
- html+=this.renderSecondInnerTable();
- html+=("</div>"+"</td>"+"</tr>"+"</table>");
- return html;
- };
- WorkingDialog.prototype.renderFirstInnerTable=function(){
- var _ea6=this.getSimpleWorkingDialogFlag();
- var _ea7=_ea6?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING;
- var _ea8=this.m_sNamespace;
- var _ea9="<table class=\"workingDialogInnerTable\" role=\"presentation\">"+"<tr>"+"<td valign=\"middle\">";
- var _eaa=this.getCognosViewer().getSkin()+"/branding/";
- _ea9+="<img src=\""+_eaa+"progress.gif\"";
- if(isIE()){
- _ea9+=" width=\"48\" height=\"48\" border=\"0\"";
- }
- _ea9+=" name=\"progress\"";
- if(isIE()){
- _ea9+=" align=\"top\"";
- }
- _ea9+=" alt=\"";
- _ea9+=_ea7;
- _ea9+="\"/></td>";
- _ea9+="<td width=\"20\"> </td>";
- _ea9+="<td style=\"padding-top: 5px;\" class=\"tableText\">";
- _ea9+="<span id=\""+_ea8+"_workingMsg\">";
- _ea9+=_ea7;
- _ea9+="</span>";
- _ea9+="<br/><br/>";
- var _eab=this.getCognosViewer().envParams["cv.responseFormat"];
- if(_ea6||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_eab&&("qs"===_eab||"fragment"===_eab))){
- _ea9+=RV_RES.RV_PLEASE_WAIT;
- }else{
- var _eac=this.canShowDeliveryOptions();
- if(_eac){
- _ea9+=this.optionLinkSelectedDiv();
- _ea9+=this.optionLinkUnselectedDiv();
- }else{
- _ea9+=RV_RES.RV_PLEASE_WAIT;
- }
- }
- _ea9+="</td></tr><tr><td colspan=\"3\"> </td></tr></table>";
- return _ea9;
- };
- WorkingDialog.prototype.optionLinkSelectedDiv=function(){
- var _ead="";
- _ead+="<div id=\"OptionsLinkSelected"+this.getNamespace()+"\" style=\"display: none\">";
- _ead+=RV_RES.RV_BUSY_OPTIONS_SELECTED;
- _ead+="</div>";
- return _ead;
- };
- WorkingDialog.prototype.optionLinkUnselectedDiv=function(){
- var _eae="";
- var _eaf=this.getNamespace();
- var _eb0="window.oCV"+_eaf+".getWorkingDialog()";
- _eae+="<div id=\"OptionsLinkUnselected"+_eaf+"\">";
- _eae+="<span id=\""+_eaf+"_workingMsg2\">";
- _eae+=RV_RES.RV_BUSY_OPTIONS_UNSELECTED;
- _eae+="</span><br/>";
- _eae+="<a href=\"#\" class=\"deliveryOptionLink\" onclick=\"javascript:"+_eb0+".showDeliveryOptions(true)\">";
- _eae+=RV_RES.RV_BUSY_OPTIONS_LINK;
- _eae+="</a></div>";
- return _eae;
- };
- WorkingDialog.prototype.canShowDeliveryOptions=function(){
- var _eb1=this.getCognosViewer().envParams["ui.primaryAction"];
- if("saveAs"!==_eb1&&"email"!==_eb1&&this.getIsSavedReport()){
- return true;
- }
- return false;
- };
- WorkingDialog.prototype.isUIBlacklisted=function(item){
- var _eb3=this.getUIBlacklist();
- for(var _eb4 in _eb3){
- if(_eb3[_eb4]===item){
- return true;
- }
- }
- return false;
- };
- WorkingDialog.prototype.getUIBlacklist=function(){
- if(!this.m_UIBlacklist&&this.getCognosViewer().UIBlacklist){
- this.m_UIBlacklist=this.getCognosViewer().UIBlacklist.split(" ");
- }
- return this.m_UIBlacklist;
- };
- WorkingDialog.prototype.deliverySectionIsNeeded=function(){
- return !this._isSaveBlackListed()||!this._isSaveAsBlackListed()||!this._isEmailBlackListed();
- };
- WorkingDialog.prototype._isSaveBlackListed=function(){
- return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVE")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVE")||!this._hasSecondaryRequest("save");
- };
- WorkingDialog.prototype._isSaveAsBlackListed=function(){
- return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVEAS")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVEAS")||!this._hasSecondaryRequest("saveAs");
- };
- WorkingDialog.prototype._isEmailBlackListed=function(){
- return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SEND")||this.isUIBlacklisted("RV_WORKING_DIALOG_SEND")||!this._hasSecondaryRequest("email");
- };
- WorkingDialog.prototype.showCancelButton=function(){
- return this.m_bShowCancelButton;
- };
- WorkingDialog.prototype._hasSecondaryRequest=function(_eb5){
- var _eb6=this._getSecondaryRequests();
- if(_eb6){
- var _eb7=_eb6.length;
- for(var i=0;i<_eb7;i++){
- if(_eb6[i]==_eb5){
- return true;
- }
- }
- }
- return false;
- };
- WorkingDialog.prototype.renderSecondInnerTable=function(){
- var _eb9="";
- var _eba=this.getCognosViewer().getWebContentRoot();
- _eb9+="<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">";
- _eb9+="<tr id=\"DeliveryOptionsVisible"+this.getNamespace()+"\" class=\"workingDialogOptions\">";
- _eb9+="<td align=\"left\">";
- _eb9+="<table class=\"workingDialogInnerTable workingDialogLinks\" role=\"presentation\">";
- var _ebb=this.canShowDeliveryOptions();
- if(_ebb&&this.deliverySectionIsNeeded()){
- if(!this._isSaveBlackListed()){
- _eb9+=this.addDeliverOption("/rv/images/action_save_report_output.gif",RV_RES.RV_SAVE_REPORT,"SaveReport(true);");
- }
- if("reportView"!==this.getCognosViewer().envParams["ui.objectClass"]&&!this._isSaveAsBlackListed()){
- _eb9+=this.addDeliverOption("/rv/images/action_save_report_view.gif",RV_RES.RV_SAVE_AS_REPORT_VIEW,"SaveAsReportView(true);");
- }
- if(!this.isUIBlacklisted("CC_RUN_OPTIONS_EMAIL_ATTACHMENT")&&!this._isEmailBlackListed()){
- _eb9+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);");
- }
- }
- _eb9+="</table></td></tr> ";
- _eb9+="<tr style=\"padding-top: 5px\"> ";
- _eb9+="<td align=\"left\" colspan=\"3\" id=\"cancelButtonContainer"+this.getNamespace()+"\"> ";
- if(this.showCancelButton()){
- _eb9+=this.addCancelButton();
- }
- _eb9+="</td></tr> ";
- _eb9+="</table> ";
- return _eb9;
- };
- WorkingDialog.prototype.addDeliverOption=function(_ebc,_ebd,_ebe){
- var _ebf="";
- var _ec0=this.getCognosViewer().getWebContentRoot();
- var _ec1="javascript: window.oCV"+this.getNamespace()+".getRV().";
- var _ec2=_ec1+_ebe;
- _ebf+="<tr><td> ";
- _ebf+="<a tabIndex=\"-1\" href=\""+_ebe+"\"> ";
- _ebf+="<img border=\"0\" src=\""+_ec0+_ebc+"\" alt=\" "+html_encode(_ebd)+"\"/></a> ";
- _ebf+="</td><td width=\"100%\" valign=\"middle\" class=\"tableText\"> ";
- _ebf+="<a tabIndex=\"0\" role=\"link\" href=\"#\" onclick=\""+_ec2+"\" style=\"padding-left: 5px\" class=\"deliveryOptionLink\"> ";
- _ebf+=(_ebd+"</a></td></tr>");
- return _ebf;
- };
- WorkingDialog.prototype.addCancelButton=function(){
- var _ec3="";
- var _ec4=this.getCognosViewer().getWebContentRoot();
- _ec3+="<table role=\"presentation\"><tr><td> ";
- _ec3+="<table id=\"cvWorkingDialog"+this.getNamespace()+"\" role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" onmouseover=\"this.className = 'commandButtonOver'\" onmouseout=\"this.className = 'commandButton'\" onmousedown=\"this.className = 'commandButtonDown'\" class=\"commandButton\"> ";
- _ec3+="<tr> ";
- _ec3+="<td valign=\"middle\" align=\"center\" nowrap=\"nowrap\" class=\"workingDialogCancelButton\" ";
- if(isIE()){
- _ec3+="id=\"btnAnchorIE\" ";
- }else{
- _ec3+="id=\"btnAnchor\" ";
- }
- _ec3+="> ";
- var _ec5="window.oCV"+this.m_sNamespace+".cancel(this)";
- _ec3+="<a href=\"#\" onclick=\""+_ec5+"\"> ";
- _ec3+=RV_RES.CANCEL;
- _ec3+="</a> ";
- _ec3+="</td></tr></table></td> ";
- _ec3+="<td><img alt=\"\" height=\"1\" ";
- if(isIE()){
- _ec3+="width=\"10\" ";
- }
- _ec3+="src=\""+_ec4+"/ps/images/space.gif\"/></td> ";
- _ec3+="</tr></table> ";
- return _ec3;
- };
- WorkingDialog.prototype.disableCancelButton=function(_ec6){
- this.cancelButtonDisabled=true;
- var _ec7=document.getElementById("cvWorkingDialog"+this.getNamespace());
- if(_ec7){
- _ec7.style.cursor="default";
- _ec7.className="commandButtonOver";
- _ec7.removeAttribute("onmouseover");
- _ec7.removeAttribute("onmouseout");
- }
- if(_ec6){
- _ec6.removeAttribute("href");
- _ec6.removeAttribute("onclick");
- _ec6.style.cursor="default";
- }
- };
- WorkingDialog.prototype.enableCancelButton=function(){
- if(this.cancelButtonDisabled){
- var _ec8=document.getElementById("cancelButtonContainer"+this.getNamespace());
- if(_ec8){
- _ec8.innerHTML=this.addCancelButton();
- }
- this.cancelButtonDisabled=false;
- }
- };
- WorkingDialog.prototype.getContainerId=function(){
- return "CVWait"+this.getNamespace();
- };
- function RequestExecutedIndicator(_ec9){
- if(_ec9){
- RequestExecutedIndicator.baseConstructor.call(this,_ec9);
- }
- };
- RequestExecutedIndicator.baseConstructor=WorkingDialog;
- RequestExecutedIndicator.prototype=new WorkingDialog();
- RequestExecutedIndicator.prototype.renderHTML=function(){
- var _eca="<table id=\"CVWaitTable"+this.getNamespace()+"\" requestExecutionIndicator=\"true\" class=\"viewerWorkingDialog\" role=\"presentation\">";
- _eca+="<tr><td align=\"center\">";
- _eca+="<div class=\"body_dialog_modal\">";
- _eca+="<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" style=\"vertical-align:middle; text-align: left;\" role=\"presentation\">";
- _eca+="<tr><td rowspan=\"2\">";
- _eca+="<img alt=\""+RV_RES.GOTO_WORKING+"\" src=\""+this.getCognosViewer().getSkin()+"/branding/progress.gif\" style=\"margin:5px;\" width=\"48\" height=\"48\" name=\"progress\"/>";
- _eca+="</td><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
- _eca+=RV_RES.GOTO_WORKING;
- _eca+="</span></td></tr><tr><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
- _eca+=RV_RES.RV_PLEASE_WAIT;
- _eca+="</span></td></tr><tr><td style=\"height:7px;\" colspan=\"2\"></td></tr></table></div></td></tr></table>";
- return _eca;
- };
- RequestExecutedIndicator.prototype.getContainerId=function(){
- return "CVWaitindicator"+this.getNamespace();
- };
- function RequestHandler(oCV){
- if(oCV){
- RequestHandler.baseConstructor.call(this,oCV);
- }
- };
- RequestHandler.prototype=new BaseRequestHandler();
- RequestHandler.baseConstructor=BaseRequestHandler;
- RequestHandler.prototype.parent=BaseRequestHandler.prototype;
- RequestHandler.prototype.resubmitInSafeMode=function(){
- this.getViewer().resubmitInSafeMode(this.getDispatcherEntry());
- };
- RequestHandler.prototype.onComplete=function(_ecc){
- this.parent.onComplete.call(this,_ecc);
- this.processDATAReportResponse(_ecc);
- this.postComplete();
- };
- RequestHandler.prototype.processInitialResponse=function(_ecd){
- this.parent.processInitialResponse.call(this,_ecd);
- var oCV=this.getViewer();
- var _ecf=oCV.getStatus();
- oCV.setMaxContentSize();
- var _ed0=(oCV.isWorking(_ecf)||_ecf=="default");
- if(_ed0){
- if(oCV.getWorkingDialog()){
- oCV.getWorkingDialog().show();
- }
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
- }else{
- if(_ecf=="fault"){
- oCV.setSoapFault(_ecd.m_sSoapFault);
- oCV.executeCallback("fault");
- }else{
- if(_ecd.status=="cancel"){
- oCV.executeCallback("cancel");
- }else{
- oCV.updateSkipToReportLink();
- if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){
- var _ed1=oCV.getPinFreezeManager();
- _ed1.fromJSONString(oCV.envParams["pinFreezeInfo"]);
- delete oCV.envParams["pinFreezeInfo"];
- }
- if(_ecf!="prompting"||!oCV.executeCallback("prompt")){
- this.postComplete();
- }else{
- oCV.updateSkipToNavigationLink(true);
- }
- }
- }
- }
- this.showReport();
- this.getViewer().renderTabs();
- this.onAsynchStatusUpdate(_ecf);
- };
- RequestHandler.prototype.postComplete=function(){
- this.parent.postComplete.call(this);
- var oCV=this.getViewer();
- var _ed3=document.getElementById("RVContent"+oCV.getId());
- if(_ed3){
- _ed3.scrollTop=0;
- }
- oCV.updateSkipToReportLink();
- if(oCV.rvMainWnd){
- oCV.updateLayout(oCV.getStatus());
- if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){
- var _ed4=oCV.rvMainWnd.getToolbar();
- if(_ed4){
- oCV.rvMainWnd.updateToolbar(oCV.outputFormat);
- _ed4.draw();
- }
- }
- if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){
- var _ed5=oCV.rvMainWnd.getBannerToolbar();
- if(_ed5){
- _ed5.draw();
- }
- }
- }
- if(oCV.getBrowser()=="moz"){
- if(_ed3){
- if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){
- _ed3.style.overflow="hidden";
- }else{
- _ed3.style.overflow="auto";
- }
- }
- }
- oCV.gbPromptRequestSubmitted=false;
- this.showReport();
- if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
- var _ed6=document.getElementById("CVReport"+oCV.getId());
- if(_ed6){
- setTimeout(function(){
- oCV.getPinFreezeManager().renderReportWithFrozenContainers(_ed6);
- if(isIE()){
- oCV.repaintDiv(_ed3);
- }
- },1);
- }
- }
- oCV.setMaxContentSize();
- oCV.executeCallback("done");
- oCV.doneLoading();
- };
- function ActionFormFields(_ed7){
- this.m_dispatcherEntry=_ed7;
- this.m_oCV=_ed7.getViewer();
- };
- ActionFormFields.prototype.addFormFields=function(){
- var _ed8=this.m_dispatcherEntry;
- var _ed9=_ed8.getAction();
- _ed9.preProcess();
- _ed8.addFormField("ui.action","modifyReport");
- if(this.m_oCV.getModelPath()!==""){
- _ed8.addFormField("modelPath",this.m_oCV.getModelPath());
- if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){
- _ed8.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]);
- }
- }
- if(_ed9.doAddActionContext()===true){
- var _eda=_ed9.addActionContext();
- _ed8.addFormField("cv.actionContext",_eda);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Action context",_eda,"xml");
- }
- }
- var _edb=this.m_oCV.envParams["bux"]=="true";
- if(_edb){
- _ed8.addFormField("cv.showFaultPage","false");
- }else{
- _ed8.addFormField("cv.showFaultPage","true");
- }
- _ed8.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
- _ed8.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
- _ed8.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]);
- _ed8.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]);
- _ed8.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]);
- _ed8.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
- _ed8.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]);
- _ed8.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]);
- _ed8.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]);
- _ed8.addNonNullFormField("bux",this.m_oCV.envParams["bux"]);
- _ed8.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]);
- _ed8.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]);
- var _edc=this.m_oCV.getFlashChartOption();
- if(_edc!=null){
- _ed8.addFormField("savedFlashChartOption",_edc);
- if(_edc&&_ed9!=null&&typeof (_ed9.m_requestParams)!="undefined"&&typeof (_ed9.m_requestParams.targetType)!="undefined"){
- var _edd=false;
- var _ede=null;
- if(typeof (_ed9.m_requestParams.targetType.targetType)!="undefined"){
- _ede=_ed9.m_requestParams.targetType.targetType;
- }else{
- _ede=_ed9.m_requestParams.targetType;
- }
- if(_ede.match("v2_")!=null||_ede.match("_v2")!=null){
- _edd=true;
- }else{
- var _edf=this.m_oCV.getRAPReportInfo();
- var _ee0=_ed9.getSelectedReportInfo();
- if(_edf&&_ee0){
- var _ee1=_edf.getDisplayTypes(_ee0.container);
- if(_ee1.match("v2_")!=null||_ee1.match("_v2")!=null){
- _edd=true;
- }
- }
- }
- _ed8.addFormField("hasAVSChart",_edd);
- }else{
- _ed8.addFormField("hasAVSChart",this.m_oCV.hasAVSChart());
- }
- }
- var sEP=this.m_oCV.getExecutionParameters();
- if(sEP){
- _ed8.addFormField("executionParameters",encodeURIComponent(sEP));
- }
- _ed8.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation()));
- _ed8.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking()));
- var sCAF=this.m_oCV.getCAFContext();
- if(sCAF){
- _ed8.addFormField("ui.cafcontextid",sCAF);
- }
- if(_ed9.forceRunSpecRequest()){
- _ed8.addFormField("widget.forceRunSpec","true");
- }
- };
- function ViewerDispatcher(){
- this.m_activeRequest=null;
- this.m_requestQueue=[];
- this.m_bUsePageRequest=false;
- };
- ViewerDispatcher.prototype.getActiveRequest=function(){
- return this.m_activeRequest;
- };
- ViewerDispatcher.prototype.setUsePageRequest=function(_ee4){
- this.m_bUsePageRequest=_ee4;
- };
- ViewerDispatcher.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- ViewerDispatcher.prototype.dispatchRequest=function(_ee5){
- if(this.m_activeRequest==null){
- this.startRequest(_ee5);
- }else{
- if(_ee5.canBeQueued()==true){
- this.m_requestQueue.push(_ee5);
- }else{
- if(window.cognosViewerDebug&&console&&console.warn){
- console.warn("Warning! Dropped a dispatcher entry!");
- }
- }
- }
- };
- ViewerDispatcher.prototype.startRequest=function(_ee6){
- this.m_activeRequest=_ee6;
- if(_ee6!=null){
- _ee6.setUsePageRequest(this.m_bUsePageRequest);
- _ee6.sendRequest();
- }
- };
- ViewerDispatcher.prototype.cancelRequest=function(key){
- for(var i=0;i<this.m_requestQueue.length;i++){
- var _ee9=this.m_requestQueue[i];
- if(_ee9.getKey()===key){
- _ee9.setCallbacks({"onEntryComplete":null});
- _ee9.cancelRequest(false);
- this.m_requestQueue.splice(i,1);
- i--;
- }
- }
- if(this.m_activeRequest&&this.m_activeRequest.getKey()===key){
- this.m_activeRequest.setCallbacks({"onEntryComplete":null});
- this.m_activeRequest.cancelRequest(false);
- this.requestComplete();
- }
- };
- ViewerDispatcher.prototype.possibleUnloadEvent=function(){
- if(this.m_activeRequest){
- this.m_activeRequest.possibleUnloadEvent();
- }
- };
- ViewerDispatcher.prototype.requestComplete=function(_eea){
- this.startRequest(this.nextRequest());
- };
- ViewerDispatcher.prototype.nextRequest=function(){
- var _eeb=null;
- if(this.m_requestQueue.length>0){
- _eeb=this.m_requestQueue.shift();
- if(_eeb.getKey()!=null){
- while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_eeb.getKey()){
- _eeb=this.m_requestQueue.shift();
- }
- }
- }
- return _eeb;
- };
- ViewerDispatcher.prototype.queueIsEmpty=function(){
- return (this.m_requestQueue.length==0);
- };
- function DispatcherEntry(oCV){
- this.m_oCV=oCV;
- this.m_requestKey=null;
- this.m_canBeQueued=false;
- this.m_originalFormFields=null;
- this.m_bUsePageRequest=false;
- if(oCV){
- if(!this.m_request){
- this.m_request=new XmlHttpObject();
- this.m_request.init("POST",this.m_oCV.getGateway(),"",true);
- }
- if(!this.m_requestHandler){
- this.setRequestHandler(new BaseRequestHandler(oCV));
- }
- DispatcherEntry.prototype.setDefaultFormFields.call(this);
- 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}});
- }
- };
- DispatcherEntry.prototype.setHeaders=function(_eed){
- this.m_request.setHeaders(_eed);
- };
- DispatcherEntry.prototype.getHeaders=function(){
- return this.m_request.getHeaders();
- };
- DispatcherEntry.prototype.setOriginalFormFields=function(_eee){
- this.m_originalFormFields=_eee;
- };
- DispatcherEntry.prototype.getOriginalFormFields=function(){
- return this.m_originalFormFields;
- };
- DispatcherEntry.prototype.setRequestHandler=function(_eef){
- _eef.addCallbackHooks();
- this.m_requestHandler=_eef;
- };
- DispatcherEntry.prototype.getRequestHandler=function(){
- return this.m_requestHandler;
- };
- DispatcherEntry.prototype.setWorkingDialog=function(_ef0){
- if(this.getRequestHandler()){
- this.m_requestHandler.setWorkingDialog(_ef0);
- }
- };
- DispatcherEntry.prototype.setRequestIndicator=function(_ef1){
- if(this.getRequestHandler()){
- this.getRequestHandler().setRequestIndicator(_ef1);
- }
- };
- DispatcherEntry.prototype.forceSynchronous=function(){
- this.getRequest().forceSynchronous();
- };
- DispatcherEntry.prototype.setUsePageRequest=function(_ef2){
- this.m_bUsePageRequest=_ef2;
- };
- DispatcherEntry.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- DispatcherEntry.prototype.setDefaultFormFields=function(){
- var _ef3=this.getViewer().envParams;
- this.addFormField("b_action","cognosViewer");
- this.addFormField("cv.catchLogOnFault","true");
- this.addDefinedNonNullFormField("protectParameters",_ef3["protectParameters"]);
- this.addDefinedNonNullFormField("ui.routingServerGroup",_ef3["ui.routingServerGroup"]);
- this.addDefinedNonNullFormField("cv.debugDirectory",_ef3["cv.debugDirectory"]);
- this.addDefinedNonNullFormField("cv.showFaultPage",_ef3["cv.showFaultPage"]);
- this.addDefinedNonNullFormField("cv.useRAPDrill",_ef3["cv.useRAPDrill"]);
- this.addDefinedNonNullFormField("container",_ef3["container"]);
- this.addNonEmptyStringFormField("cv.objectPermissions",_ef3["cv.objectPermissions"]);
- };
- DispatcherEntry.prototype.getViewer=function(){
- return this.m_oCV;
- };
- DispatcherEntry.prototype.prepareRequest=function(){
- };
- DispatcherEntry.addWidgetInfoToFormFields=function(_ef4,_ef5){
- if(_ef4){
- var _ef6=_ef4.getBUXRTStateInfoMap();
- if(_ef6){
- _ef5.addFormField("cv.buxRTStateInfo",_ef6);
- }
- var _ef7=_ef4.getDisplayName();
- if(_ef7&&_ef7.length>0){
- _ef5.addFormField("displayTitle",_ef7);
- }
- }
- };
- DispatcherEntry.prototype.canBeQueued=function(){
- return this.m_canBeQueued;
- };
- DispatcherEntry.prototype.setCanBeQueued=function(_ef8){
- this.m_canBeQueued=_ef8;
- };
- DispatcherEntry.prototype.getKey=function(){
- return this.m_requestKey;
- };
- DispatcherEntry.prototype.setKey=function(key){
- this.m_requestKey=key;
- };
- DispatcherEntry.prototype.setRequest=function(_efa){
- this.m_request=_efa;
- };
- DispatcherEntry.prototype.getRequest=function(){
- return this.m_request;
- };
- DispatcherEntry.prototype.setCallbacks=function(_efb){
- this.getRequest().setCallbacks(_efb);
- };
- DispatcherEntry.prototype.getCallbacks=function(){
- return this.getRequest().getCallbacks();
- };
- DispatcherEntry.prototype.sendRequest=function(){
- this.prepareRequest();
- var _efc=this.getRequest().getFormFields();
- var _efd=_efc.keys();
- if(!this.m_originalFormFields){
- this.m_originalFormFields=new CDictionary();
- for(var _efe=0;_efe<_efd.length;_efe++){
- this.m_originalFormFields.add(_efd[_efe],_efc.get(_efd[_efe]));
- }
- }
- this.getRequest().sendRequest();
- };
- DispatcherEntry.prototype.onNewRequest=function(_eff){
- this.setRequest(_eff);
- };
- DispatcherEntry.prototype.retryRequest=function(){
- var oCV=this.getViewer();
- oCV.setRetryDispatcherEntry(null);
- var _f01=this.getRequest().newRequest();
- _f01.setHeaders(null);
- this.setRequest(_f01);
- var _f02=this.m_originalFormFields.keys();
- for(var _f03=0;_f03<_f02.length;_f03++){
- var _f04=_f02[_f03];
- var _f05=this.m_originalFormFields.get(_f04);
- if(_f04=="cv.responseFormat"&&_f05=="iWidget"){
- this.addFormField("cv.responseFormat","data");
- }else{
- if(_f04=="ui.action"&&_f05=="wait"){
- this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
- }else{
- if(_f04!="m_tracking"&&_f04!="cv.outputKey"){
- this.addFormField(_f04,_f05);
- }
- }
- }
- }
- this.addFormField("widget.reloadToolbar","true");
- if(this.m_oCV.getViewerWidget()){
- this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole());
- }
- this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]);
- this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]);
- this.m_oCV.getViewerDispatcher().dispatchRequest(this);
- };
- DispatcherEntry.prototype.abortHttpRequest=function(){
- if(!this.m_bCancelCalled){
- if(this.getRequestHandler()){
- this.getRequestHandler().onCancel();
- }
- this.m_bCancelCalled=true;
- this.getRequest().abortHttpRequest();
- this.onEntryComplete();
- }
- };
- DispatcherEntry.prototype.cancelRequest=function(_f06){
- if(!this.m_bCancelCalled){
- this.m_bCancelCalled=true;
- if(this.getRequestHandler()){
- this.getRequestHandler().onCancel();
- }
- if(_f06){
- this.getRequest().forceSynchronous();
- }
- this.getRequest().cancel();
- this.onEntryComplete();
- }
- };
- DispatcherEntry.prototype.getFormFields=function(){
- return this.m_request.getFormFields();
- };
- DispatcherEntry.prototype.getFormField=function(name){
- if(this.m_request){
- return this.m_request.getFormField(name);
- }else{
- return "";
- }
- };
- DispatcherEntry.prototype.clearFormFields=function(){
- this.m_request.clearFormFields();
- };
- DispatcherEntry.prototype.formFieldExists=function(name){
- if(this.m_request){
- return this.m_request.getFormFields().exists(name);
- }
- return false;
- };
- DispatcherEntry.prototype.removeFormField=function(name){
- if(this.formFieldExists(name)){
- this.m_request.getFormFields().remove(name);
- }
- };
- DispatcherEntry.prototype.addFormField=function(name,_f0b){
- this.m_request.addFormField(name,_f0b);
- };
- DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,_f0d){
- if(typeof _f0d!="undefined"&&_f0d!=null){
- this.addFormField(name,_f0d);
- }
- };
- DispatcherEntry.prototype.addDefinedFormField=function(name,_f0f){
- if(typeof _f0f!="undefined"){
- this.addFormField(name,_f0f);
- }
- };
- DispatcherEntry.prototype.addNonNullFormField=function(name,_f11){
- if(_f11!=null){
- this.addFormField(name,_f11);
- }
- };
- DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,_f13){
- if(typeof _f13!="undefined"&&_f13!=null&&_f13!=""){
- this.addFormField(name,_f13);
- }
- };
- DispatcherEntry.prototype.onWorking=function(_f14,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onWorking(_f14);
- }
- };
- DispatcherEntry.prototype.onFault=function(_f16){
- if(this.getRequestHandler()){
- this.getRequestHandler().onFault(_f16);
- }
- };
- DispatcherEntry.prototype.onError=function(_f17){
- if(this.m_bCancelCalled){
- return;
- }
- if(this.getRequestHandler()){
- this.getRequestHandler().onError(_f17);
- }
- };
- DispatcherEntry.prototype.possibleUnloadEvent=function(){
- this.setCallbacks({"error":{}});
- };
- DispatcherEntry.prototype.onPreHttpRequest=function(_f18){
- if(this.getRequestHandler()){
- this.getRequestHandler().preHttpRequest(_f18);
- }
- };
- DispatcherEntry.prototype.onPostHttpRequest=function(_f19){
- if(this.getRequestHandler()){
- this.getRequestHandler().postHttpRequest(_f19);
- }
- };
- DispatcherEntry.prototype.onPassportTimeout=function(_f1a){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPassportTimeout(_f1a);
- }
- };
- DispatcherEntry.prototype.onPrompting=function(_f1b){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPrompting(_f1b);
- }
- };
- DispatcherEntry.prototype.onEntryComplete=function(_f1c){
- if(!this.m_oCV._beingDestroyed){
- this.m_oCV.getViewerDispatcher().requestComplete(this);
- }
- };
- DispatcherEntry.prototype.onEntryFault=function(_f1d){
- this.m_oCV.setFaultDispatcherEntry(this);
- this.m_oCV.resetViewerDispatcher();
- if(!this.m_bCancelCalled){
- this.m_oCV.setRetryDispatcherEntry(this);
- }
- };
- DispatcherEntry.prototype.onCloseErrorDlg=function(){
- var _f1e=this.getCallbacks();
- if(_f1e["closeErrorDlg"]){
- var _f1f=GUtil.generateCallback(_f1e["closeErrorDlg"].method,[],_f1e["closeErrorDlg"].object);
- _f1f();
- }
- };
- DispatcherEntry.prototype.onPostEntryComplete=function(){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPostEntryComplete();
- }
- this.executeCallback("postComplete");
- };
- DispatcherEntry.prototype.executeCallback=function(_f20){
- var _f21=this.getCallbacks();
- if(_f21[_f20]){
- var _f22=(_f21.customArguments)?[this,_f21.customArguments]:[this];
- var _f23=GUtil.generateCallback(_f21[_f20].method,_f22,_f21[_f20].object);
- _f23();
- return true;
- }
- return false;
- };
- function DataDispatcherEntry(oCV){
- if(oCV){
- this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()));
- }
- DataDispatcherEntry.baseConstructor.call(this,oCV);
- };
- DataDispatcherEntry.prototype=new DispatcherEntry();
- DataDispatcherEntry.baseConstructor=DispatcherEntry;
- function JSONDispatcherEntry(oCV){
- if(oCV){
- this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()));
- }
- JSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
- JSONDispatcherEntry.baseConstructor.call(this,oCV);
- };
- JSONDispatcherEntry.prototype=new DispatcherEntry();
- JSONDispatcherEntry.baseConstructor=DispatcherEntry;
- JSONDispatcherEntry.prototype.setDefaultFormFields=function(){
- this.addFormField("cv.responseFormat","JSON");
- };
- function AsynchDataDispatcherEntry(oCV){
- if(oCV){
- var _f27=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_f27);
- AsynchDataDispatcherEntry.baseConstructor.call(this,oCV);
- AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this);
- }
- };
- AsynchDataDispatcherEntry.prototype=new DispatcherEntry();
- AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry;
- AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){
- this.addFormField("cv.responseFormat","data");
- };
- function AsynchJSONDispatcherEntry(oCV){
- if(oCV){
- var _f29=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_f29);
- AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV);
- AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this);
- }
- };
- AsynchJSONDispatcherEntry.prototype=new DispatcherEntry();
- AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry;
- AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){
- this.addFormField("cv.responseFormat","asynchJSON");
- };
- function ReportDispatcherEntry(oCV){
- ReportDispatcherEntry.baseConstructor.call(this,oCV);
- if(oCV){
- ReportDispatcherEntry.prototype.setDefaultFormFields.call(this);
- this.setRequestHandler(new RequestHandler(oCV));
- this.setWorkingDialog(oCV.getWorkingDialog());
- this.setRequestIndicator(oCV.getRequestIndicator());
- this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}});
- }
- };
- ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry();
- ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry;
- ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype;
- ReportDispatcherEntry.prototype.prepareRequest=function(){
- var _f2b=this.getFormField("ui.action");
- var _f2c=this.getViewer().getActionState();
- if(_f2c!==""&&(_f2b=="wait"||_f2b=="forward"||_f2b=="back")){
- this.addFormField("cv.actionState",_f2c);
- }
- var _f2d=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
- var _f2e=true;
- for(var i=0;i<_f2d.length;i++){
- if(_f2d[i]==_f2b){
- _f2e=false;
- break;
- }
- }
- if(_f2e){
- this.getViewer().clearTabs();
- }
- if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){
- this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab());
- }
- };
- ReportDispatcherEntry.prototype.setDefaultFormFields=function(){
- var oCV=this.getViewer();
- var _f31=oCV.envParams;
- this.addFormField("cv.id",oCV.getId());
- if(_f31["cv.showFaultPage"]){
- this.addFormField("cv.showFaultPage",_f31["cv.showFaultPage"]);
- }else{
- this.addFormField("cv.showFaultPage","false");
- }
- this.addDefinedNonNullFormField("ui.object",_f31["ui.object"]);
- this.addDefinedNonNullFormField("ui.primaryAction",_f31["ui.primaryAction"]);
- this.addDefinedNonNullFormField("ui.objectClass",_f31["ui.objectClass"]);
- this.addNonEmptyStringFormField("specificationType",_f31["specificationType"]);
- this.addNonEmptyStringFormField("cv.promptForDownload",_f31["cv.promptForDownload"]);
- this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
- this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
- var _f32=oCV.getExecutionParameters();
- this.addNonEmptyStringFormField("executionParameters",_f32);
- var sCAF=oCV.getCAFContext();
- this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
- };
- ReportDispatcherEntry.prototype.onWorking=function(_f34,arg1){
- var _f36=_f34.getResponseState();
- var _f37=this.getRequestHandler();
- if(_f37){
- var _f38=_f37.getWorkingDialog();
- if(_f38&&_f38.setSecondaryRequests&&_f36.m_aSecRequests){
- _f38.setSecondaryRequests(_f36.m_aSecRequests);
- }
- }
- DispatcherEntry.prototype.onWorking.call(this,_f34,arg1);
- if(_f37){
- this.getRequestHandler().updateViewerState(_f36);
- }
- };
- ReportDispatcherEntry.prototype.onComplete=function(_f39,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onComplete(_f39);
- }
- };
- function ViewerDispatcherEntry(oCV){
- ViewerDispatcherEntry.baseConstructor.call(this,oCV);
- if(oCV){
- ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this);
- this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onPrompting},"cancel":{"object":this,"method":this.onCancel}});
- }
- };
- ViewerDispatcherEntry.prototype=new ReportDispatcherEntry();
- ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry;
- ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype;
- ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){
- var oCV=this.getViewer();
- var _f3d=oCV.envParams;
- this.addFormField("cv.showFaultPage","true");
- this.addDefinedNonNullFormField("cv.header",_f3d["cv.header"]);
- this.addDefinedNonNullFormField("cv.toolbar",_f3d["cv.toolbar"]);
- this.addDefinedNonNullFormField("ui.backURL",_f3d["ui.backURL"]);
- this.addDefinedNonNullFormField("errURL",_f3d["ui.backURL"]);
- this.addDefinedNonNullFormField("errURL",_f3d["ui.errURL"]);
- this.addDefinedNonNullFormField("cv.catchLogOnFault","true");
- this.addDefinedNonNullFormField("m_sessionConv",_f3d["m_sessionConv"]);
- if(_f3d["m_session"]){
- this.addFormField("m_session",_f3d["m_session"]);
- this.addFormField("cv.ignoreState","true");
- }
- };
- ViewerDispatcherEntry.prototype.prepareRequest=function(){
- this.parent.prepareRequest.call(this);
- if(this.getUsePageRequest()){
- this.m_oCV.setKeepSessionAlive(true);
- if(typeof this.m_oCV.envParams["cv.responseFormat"]!="undefined"&&this.m_oCV.envParams["cv.responseFormat"]!=null&&this.m_oCV.envParams["cv.responseFormat"]!=""){
- this.addFormField("cv.responseFormat",this.m_oCV.envParams["cv.responseFormat"]);
- }else{
- if(this.getFormField("cv.responseFormat")!="view"){
- this.addFormField("cv.responseFormat","page");
- }
- }
- var _f3e=this.m_oCV.getPinFreezeManager();
- if(_f3e&&_f3e.hasFrozenContainers()){
- this.addFormField("pinFreezeInfo",_f3e.toJSONString());
- }
- if(this.m_oCV.envParams["cv.createCallback"]){
- this.addFormField("cv.createCallback",this.m_oCV.envParams["cv.createCallback"]);
- }
- }
- };
- ViewerDispatcherEntry.prototype.sendRequest=function(){
- if(this.getUsePageRequest()){
- this.prepareRequest();
- var _f3f=this.buildRequestForm();
- if(typeof document.progress!="undefined"){
- setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1);
- }
- _f3f.submit();
- }else{
- this.getViewer().closeContextMenuAndToolbarMenus();
- this.parent.sendRequest.call(this);
- }
- };
- ViewerDispatcherEntry.prototype.buildRequestForm=function(){
- var oCV=this.getViewer();
- var _f41=document.createElement("form");
- _f41.setAttribute("id","requestForm");
- _f41.setAttribute("name","requestForm");
- _f41.setAttribute("method","post");
- _f41.setAttribute("target","_self");
- _f41.setAttribute("action",oCV.getGateway());
- _f41.style.display="none";
- document.body.appendChild(_f41);
- var _f42=this.getRequest().getFormFields();
- var _f43=_f42.keys();
- for(var _f44=0;_f44<_f43.length;_f44++){
- _f41.appendChild(this.createHiddenFormField(_f43[_f44],_f42.get(_f43[_f44])));
- }
- for(param in oCV.envParams){
- if(!_f42.exists(param)&¶m!="cv.actionState"){
- _f41.appendChild(this.createHiddenFormField(param,oCV.envParams[param]));
- }
- }
- return _f41;
- };
- ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,_f46){
- var _f47=document.createElement("input");
- _f47.setAttribute("type","hidden");
- _f47.setAttribute("name",name);
- _f47.setAttribute("id",name);
- _f47.setAttribute("value",_f46);
- return (_f47);
- };
- ViewerDispatcherEntry.prototype.onCancel=function(){
- var oCV=this.getViewer();
- oCV.setStatus("complete");
- if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){
- oCV.executeCallback("cancel");
- }
- };
- ViewerDispatcherEntry.prototype.onFault=function(_f49){
- if(this.getViewer().callbackExists("fault")){
- this.getViewer().setSoapFault(_f49.getSoapFault());
- this.getViewer().executeCallback("fault");
- }else{
- this.parent.onFault.call(this,_f49);
- }
- };
- ViewerDispatcherEntry.prototype.onComplete=function(_f4a){
- var oCV=this.getViewer();
- oCV.saveBackJaxInformation(_f4a);
- if(oCV.isReportRenderingDone()){
- this.getViewer().getSelectionController().resetSelections();
- }
- this.parent.onComplete.call(this,_f4a);
- };
- ViewerDispatcherEntry.prototype.onPrompting=function(_f4c){
- var oCV=this.getViewer();
- oCV.updateSkipToNavigationLink(true);
- if(!oCV.executeCallback("prompt")){
- this.onComplete(_f4c);
- }
- };
- ViewerDispatcherEntry.prototype.onEntryComplete=function(_f4e){
- if(this.getRequestHandler()){
- this.getRequestHandler().setDispatcherEntry(this);
- }
- this.parent.onEntryComplete.call(this,_f4e);
- };
|