123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897 |
- /*
- *+------------------------------------------------------------------------+
- *| 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 CUIStyle(_15d,_15e,_15f,_160,_161){
- this.m_active=_15d;
- this.m_normal=_15d;
- this.m_rollover=_15e;
- this.m_activeRollover=_15e;
- this.m_depressed=_15f;
- this.m_depressed_rollover=_160;
- this.m_disabled=_161;
- };
- function CUIStyle_getActiveState(){
- return this.m_active;
- };
- function CUIStyle_setActiveState(_162){
- switch(_162){
- case "normal":
- this.m_active=this.m_normal;
- break;
- case "depressed":
- this.m_active=this.m_depressed;
- break;
- case "disabled":
- this.m_active=this.m_disabled;
- break;
- default:
- this.m_active=this.m_normal;
- }
- };
- function CUIStyle_getActiveRolloverState(){
- return this.m_activeRollover;
- };
- function CUIStyle_setActiveRolloverState(_163){
- switch(_163){
- case "normal":
- this.m_activeRollover=this.m_rollover;
- break;
- case "depressed":
- this.m_activeRollover=this.m_depressed_rollover;
- break;
- case "disabled":
- this.m_activeRollover=this.m_disabled;
- break;
- default:
- this.m_activeRollover=this.m_rollover;
- }
- };
- function CUIStyle_getNormalState(){
- return this.m_normal;
- };
- function CUIStyle_getRolloverState(){
- return this.m_rollover;
- };
- function CUIStyle_getDepressedState(){
- return this.m_depressed;
- };
- function CUIStyle_getDepressedRolloverState(){
- return this.m_depressed_rollover;
- };
- function CUIStyle_getDisabledState(){
- return this.m_disabled;
- };
- function CUIStyle_setNormalState(_164){
- this.m_normal=_164;
- };
- function CUIStyle_setRolloverState(_165){
- this.m_rollover=_165;
- };
- function CUIStyle_setDepressedState(_166){
- this.m_depressed=_166;
- };
- function CUIStyle_setDepressedRolloverState(_167){
- this.m_depressed_rollover=_167;
- };
- function CUIStyle_setDisabledState(_168){
- this.m_disabled=_168;
- };
- CUIStyle.prototype.getNormalState=CUIStyle_getNormalState;
- CUIStyle.prototype.getRolloverState=CUIStyle_getRolloverState;
- CUIStyle.prototype.getDepressedState=CUIStyle_getDepressedState;
- CUIStyle.prototype.getDepressedRolloverState=CUIStyle_getDepressedRolloverState;
- CUIStyle.prototype.getDisabledState=CUIStyle_getDisabledState;
- CUIStyle.prototype.setNormalState=CUIStyle_setNormalState;
- CUIStyle.prototype.setRolloverState=CUIStyle_setRolloverState;
- CUIStyle.prototype.setDepressedState=CUIStyle_setDepressedState;
- CUIStyle.prototype.setDepressedRolloverState=CUIStyle_setDepressedRolloverState;
- CUIStyle.prototype.setDisabledState=CUIStyle_setDisabledState;
- CUIStyle.prototype.setActiveState=CUIStyle_setActiveState;
- CUIStyle.prototype.getActiveState=CUIStyle_getActiveState;
- CUIStyle.prototype.getActiveRolloverState=CUIStyle_getActiveRolloverState;
- CUIStyle.prototype.setActiveRolloverState=CUIStyle_setActiveRolloverState;
- function CToolbarSelect(_169,name,_16b,_16c,_16d){
- this.m_parent=_169;
- this.m_name=name;
- this.m_command=_16b;
- this.m_label=_16c;
- this.m_toolTip=_16d;
- this.m_items=[];
- if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
- this.m_parent.add(this);
- }
- if(_16c){
- this.add("",_16c);
- }
- };
- function CToolbarSelect_draw(){
- var html="<select id=\""+this.m_name+"\" name=\""+this.m_name+"\" onchange=\""+this.m_command+"\"";
- if(this.m_toolTip!=""){
- html+=" title=\""+this.m_toolTip+"\"";
- }
- html+=">";
- html+=this.drawItems();
- html+="</select>";
- return html;
- };
- function CToolbarSelect_drawItems(){
- var html="";
- for(var i=0;i<this.m_items.length;i++){
- html+="<option value=\""+this.m_items[i].getUse()+"\">"+this.m_items[i].getDisplay()+"</option>";
- }
- return html;
- };
- function CToolbarSelect_add(sUse,_172){
- var _173=new CSelectItem(sUse,_172);
- this.m_items=this.m_items.concat(_173);
- };
- function CToolbarSelect_isVisible(){
- return true;
- };
- CToolbarSelect.prototype.draw=CToolbarSelect_draw;
- CToolbarSelect.prototype.drawItems=CToolbarSelect_drawItems;
- CToolbarSelect.prototype.isVisible=CToolbarSelect_isVisible;
- CToolbarSelect.prototype.add=CToolbarSelect_add;
- function CSelectItem(sUse,_175){
- this.m_sUse=sUse;
- this.m_sDisplay=_175;
- };
- function CSelectItem_getUse(){
- return this.m_sUse;
- };
- function CSelectItem_getDisplay(){
- return this.m_sDisplay;
- };
- CSelectItem.prototype.getUse=CSelectItem_getUse;
- CSelectItem.prototype.getDisplay=CSelectItem_getDisplay;
- function CToolbarPicker(_176,_177,_178,sRef,_17a){
- this.m_parent=_176;
- this.m_command=_177;
- this.m_oPicker=null;
- this.m_sPromptId=_178;
- this.m_sRef=sRef;
- this.m_sType=_17a;
- if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
- this.m_parent.add(this);
- }
- };
- function CToolbarPicker_draw(){
- var html="<div id=\""+this.m_sType+this.m_sPromptId+"\" onclick=\""+this.m_sRef+".preventBubbling(event);\"></div>";
- return html;
- };
- function CToolbarPicker_init(){
- this.m_oPicker=eval(this.m_command);
- g_pickerObservers=g_pickerObservers.concat(this.m_sRef);
- };
- function CToolbarPicker_isVisible(){
- return true;
- };
- function CToolbarPicker_togglePicker(){
- this.m_oPicker.togglePicker();
- };
- function CToolbarPicker_setActiveColor(s){
- this.m_oPicker.setActiveColor(s);
- };
- function CToolbarPicker_setColor(s){
- this.m_oPicker.setColor(s);
- };
- function CToolbarPicker_setAlignment(s){
- this.m_oPicker.setAlignment(s);
- };
- function CToolbarPicker_setActiveAlignment(s){
- this.m_oPicker.setActiveAlignment(s);
- };
- function CToolbarPicker_setPalette(s){
- this.m_oPicker.setPalette(s);
- };
- function CToolbarPicker_applyCustomStyle(){
- this.m_oPicker.applyCustomStyle();
- };
- function CToolbarPicker_updateCustomStyle(){
- this.m_oPicker.updateCustomStyle();
- };
- function CToolbarPicker_hide(){
- this.m_oPicker.hide();
- };
- function CToolbarPicker_preventBubbling(e){
- this.m_oPicker.preventBubbling(e);
- };
- function CToolbarPicker_buttonMouseHandler(_182,_183){
- this.m_oPicker.buttonMouseHandler(_182,_183);
- };
- CToolbarPicker.prototype.draw=CToolbarPicker_draw;
- CToolbarPicker.prototype.isVisible=CToolbarPicker_isVisible;
- CToolbarPicker.prototype.init=CToolbarPicker_init;
- CToolbarPicker.prototype.togglePicker=CToolbarPicker_togglePicker;
- CToolbarPicker.prototype.setColor=CToolbarPicker_setColor;
- CToolbarPicker.prototype.setAlignment=CToolbarPicker_setAlignment;
- CToolbarPicker.prototype.setActiveAlignment=CToolbarPicker_setActiveAlignment;
- CToolbarPicker.prototype.setActiveColor=CToolbarPicker_setActiveColor;
- CToolbarPicker.prototype.setPalette=CToolbarPicker_setPalette;
- CToolbarPicker.prototype.applyCustomStyle=CToolbarPicker_applyCustomStyle;
- CToolbarPicker.prototype.updateCustomStyle=CToolbarPicker_updateCustomStyle;
- CToolbarPicker.prototype.hide=CToolbarPicker_hide;
- CToolbarPicker.prototype.preventBubbling=CToolbarPicker_preventBubbling;
- CToolbarPicker.prototype.buttonMouseHandler=CToolbarPicker_buttonMouseHandler;
- var tbUniqueId=0;
- function makeId(){
- return tbUniqueId++;
- };
- gDropDownButtonStyle=new CUIStyle("dropDownArrow","dropDownArrowOver","","","");
- gHeaderDropDownButtonStyle=new CUIStyle("bannerDropDownArrow","bannerDropDownArrowOver","","","");
- function CToolbarButton(_184,_185,_186,_187,_188,_189,_18a,_18b,_18c){
- this.m_id="tbbutton"+makeId();
- this.m_bVisible=true;
- this.m_action=_185;
- this.m_toolTip=_187;
- if(typeof _18c!="undefined"&&_18c!=""){
- this.m_webContentRoot=_18c;
- }else{
- this.m_webContentRoot="..";
- }
- this.m_icon=(_186)?new CIcon(_186,_187,this.webContentRoot):null;
- this.m_parent=_184;
- this.m_menu=null;
- if(typeof _189=="boolean"){
- this.m_bHideDropDown=_189;
- }else{
- this.m_bHideDropDown=false;
- }
- this.m_style=new CUIStyle(_188.getNormalState(),_188.getRolloverState(),_188.getDepressedState(),_188.getDepressedRolloverState(),_188.getDisabledState());
- this.m_observers=new CObserver(this);
- if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
- this.m_parent.add(this);
- }
- this.m_label=(_18a)?_18a:null;
- this.m_dropDownToolTip=(_18b)?_18b:this.m_toolTip;
- this.m_dropDownStyle=gDropDownButtonStyle;
- };
- function CToolbarButton_getId(){
- return this.m_id;
- };
- function CToolbarButton_draw(){
- var html="";
- html+="<div style=\"margin-right:3px;\"><button type=\"button\" id=\"";
- html+=this.m_id;
- html+="\"";
- if(typeof this.getStyle()=="object"){
- html+=" class=\""+this.getStyle().getActiveState()+"\"";
- if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
- if(this.isEnabled()){
- html+=" tabIndex=\"1\"";
- }
- html+=" hideFocus=\"true\"";
- }
- }
- if(this.m_toolTip!=""){
- html+=" title=\""+this.m_toolTip+"\"";
- }
- html+=">";
- if(this.m_icon!=null){
- html+=this.m_icon.draw();
- }
- if(this.m_label!=null){
- html+=this.m_label;
- }
- html+="</button>";
- if(this.m_menu!=null&&!this.m_bHideDropDown){
- html+="<button type=\"button\" id=\"";
- html+=("menu"+this.getId());
- html+="\"";
- if(typeof this.getStyle()=="object"){
- html+=" class=\""+this.getDropDownStyle().getActiveState()+"\"";
- if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
- if(this.isEnabled()){
- html+=" tabIndex=\"1\"";
- }
- html+=" hideFocus=\"true\"";
- }
- }
- if(this.m_dropDownToolTip!=""){
- html+=" title=\""+this.m_dropDownToolTip+"\"";
- }
- html+="><img style=\"vertical-align:middle;\" border=\"0\" src=\""+this.m_webContentRoot+"/common/images/toolbar_drop_arrow.gif\"";
- if(this.m_dropDownToolTip!=""){
- html+=" alt=\""+this.m_dropDownToolTip+"\"";
- html+=" title=\""+this.m_dropDownToolTip+"\"";
- }else{
- html+=" alt=\"\"";
- }
- html+=" width=\"7\" height=\"16\"/></button>";
- }
- html+="</div>";
- return html;
- };
- function CToolbarButton_attachEvents(){
- if(typeof this.getParent().getHTMLContainer!="function"){
- return;
- }
- var _18e=this.getParent().getHTMLContainer();
- if(_18e==null){
- return;
- }
- var _18f=eval(_18e.document?_18e.document.getElementById(this.m_id):_18e.ownerDocument.getElementById(this.m_id));
- if(_18f==null){
- return;
- }
- _18f.onmouseover=this.onmouseover;
- _18f.onmouseout=this.onmouseout;
- _18f.onclick=this.onclick;
- _18f.onkeypress=this.onkeypress;
- _18f.onfocus=this.onfocus;
- _18f.onblur=this.onblur;
- _18f.tbItem=eval(this);
- if(this.m_menu!=null&&!this.m_bHideDropDown){
- var _190=eval(_18e.document?_18e.document.getElementById("menu"+this.getId()):_18e.ownerDocument.getElementById("menu"+this.getId()));
- _190.onmouseover=this.onmouseover;
- _190.onmouseout=this.onmouseout;
- _190.onclick=this.onclick;
- _190.onkeypress=this.onkeypress;
- _190.onfocus=this.onfocus;
- _190.onblur=this.onblur;
- _190.tbItem=eval(this);
- }
- };
- function CToolbarButton_createDropDownMenu(_191,_192){
- this.m_dropDownToolTip=(_192)?_192:this.m_toolTip;
- this.m_menu=new CMenu("dropDown"+this.getId(),_191,this.m_webContentRoot);
- this.m_menu.setParent(this);
- return this.m_menu;
- };
- function CToolbarButton_addOwnerDrawControl(_193){
- this.m_menu=_193;
- if(typeof _193.setParent!="undefined"){
- this.m_menu.setParent(this);
- }
- };
- function CToolbarButton_getParent(){
- return this.m_parent;
- };
- function CToolbarButton_setParent(_194){
- this.m_parent=_194;
- };
- function CToolbarButton_getAction(){
- return this.m_action;
- };
- function CToolbarButton_setAction(_195){
- this.m_action=_195;
- };
- function CToolbarButton_getToolTip(){
- return this.m_toolTip;
- };
- function CToolbarButton_setToolTip(_196){
- this.m_toolTip=_196;
- };
- function CToolbarButton_getDropDownToolTip(){
- return this.m_dropDownToolTip;
- };
- function CToolbarButton_setDropDownToolTip(_197){
- this.m_dropDownToolTip=_197;
- };
- function CToolbarButton_getIcon(){
- return this.m_icon;
- };
- function CToolbarButton_setIcon(_198){
- this.m_icon.setPath(_198);
- };
- function CToolbarButton_onmouseover(evt){
- var _19a=this.tbItem;
- if(typeof _19a=="object"){
- if(!_19a.isEnabled()){
- return;
- }
- if(_19a.getMenu()!=null&&!_19a.m_bHideDropDown&&("menu"+_19a.getId())==this.id){
- this.className=_19a.getDropDownStyle().getActiveRolloverState();
- }else{
- if(typeof _19a.getStyle()=="object"){
- this.className=_19a.getStyle().getActiveRolloverState();
- }
- if(_19a.getMenu()!=null&&!_19a.m_bHideDropDown){
- var _19b=this.document?this.document.getElementById("menu"+_19a.getId()):this.ownerDocument.getElementById("menu"+_19a.getId());
- if(typeof _19b=="object"){
- _19b.className=_19a.getDropDownStyle().getActiveRolloverState();
- }
- }
- }
- if(_19a.getParent()!=null&&typeof _19a.getParent().onmouseover=="function"){
- _19a.getParent().onmouseover(evt);
- }
- _19a.getObservers().notify(CToolbarButton_onmouseover);
- }
- };
- function CToolbarButton_onmouseout(evt){
- var _19d=this.tbItem;
- if(typeof _19d=="object"){
- if(!_19d.isEnabled()){
- return;
- }
- if(_19d.getMenu()!=null&&!_19d.m_bHideDropDown&&("menu"+_19d.getId())==this.id){
- this.className=_19d.getDropDownStyle().getActiveState();
- }else{
- if(typeof _19d.getStyle()=="object"){
- this.className=_19d.getStyle().getActiveState();
- }
- if(_19d.getMenu()!=null&&!_19d.m_bHideDropDown){
- var _19e=this.document?this.document.getElementById("menu"+_19d.getId()):this.ownerDocument.getElementById("menu"+_19d.getId());
- if(typeof _19e=="object"){
- _19e.className=_19d.getDropDownStyle().getActiveState();
- }
- }
- }
- if(_19d.getParent()!=null&&typeof _19d.getParent().onmouseout=="function"){
- _19d.getParent().onmouseout(evt);
- }
- _19d.getObservers().notify(CToolbarButton_onmouseout);
- }
- };
- function CToolbarButton_onclick(evt){
- evt=(evt)?evt:((event)?event:null);
- var _1a0=this.tbItem;
- if(_1a0!=null){
- if(!_1a0.isEnabled()){
- return;
- }
- var menu=_1a0.getMenu();
- if(menu!=null&&((this.id==("menu"+_1a0.getId()))||(_1a0.m_bHideDropDown&&this.id==_1a0.getId()))){
- if(menu.isVisible()){
- menu.remove();
- }else{
- if(typeof menu.setHTMLContainer!="undefined"){
- menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
- }
- if(typeof _1a0.m_parent.closeMenus=="function"){
- _1a0.m_parent.closeMenus();
- }
- menu.draw();
- menu.show();
- }
- }else{
- eval(this.tbItem.m_action);
- }
- if(_1a0.getParent()!=null&&typeof _1a0.getParent().onclick=="function"){
- _1a0.getParent().onclick(evt);
- }
- _1a0.getObservers().notify(CToolbarButton_onclick);
- }
- if(this.blur){
- this.blur();
- }
- evt.cancelBubble=true;
- return false;
- };
- function CToolbarButton_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- if(evt.keyCode==13||evt.keyCode==0){
- var _1a3=this.tbItem;
- if(_1a3!=null){
- if(!_1a3.isEnabled()){
- return;
- }
- var menu=_1a3.getMenu();
- if(menu!=null&&((this.id==("menu"+_1a3.getId()))||(_1a3.m_bHideDropDown&&this.id==_1a3.getId()))){
- if(menu.isVisible()){
- menu.remove();
- }else{
- if(typeof menu.setHTMLContainer!="undefined"){
- menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
- }
- menu.draw();
- menu.show();
- }
- }else{
- eval(this.tbItem.m_action);
- }
- if(_1a3.getParent()!=null&&typeof _1a3.getParent().onkeypress=="function"){
- _1a3.getParent().onkeypress(evt);
- }
- _1a3.getObservers().notify(CToolbarButton_onkeypress);
- }
- return false;
- }
- evt.cancelBubble=true;
- return true;
- };
- function CToolbarButton_getMenu(){
- return this.m_menu;
- };
- function CToolbarButton_getMenuType(){
- return "dropDown";
- };
- function CToolbarButton_setStyle(_1a5){
- this.m_style=_1a5;
- };
- function CToolbarButton_getStyle(){
- return this.m_style;
- };
- function CToolbarButton_getDropDownStyle(){
- return this.m_dropDownStyle;
- };
- function CToolbarButton_setDropDownStyle(_1a6){
- this.m_dropDownStyle=_1a6;
- };
- function CToolbarButton_isVisible(){
- return this.m_bVisible;
- };
- function CToolbarButton_hide(){
- this.m_bVisible=false;
- };
- function CToolbarButton_show(){
- this.m_bVisible=true;
- };
- function CToolbarButton_enable(){
- this.getStyle().setActiveState("normal");
- this.getStyle().setActiveRolloverState("normal");
- if(this.getIcon()){
- this.getIcon().enable();
- }
- this.updateHTML();
- };
- function CToolbarButton_disable(){
- this.getStyle().setActiveState("disabled");
- this.getStyle().setActiveRolloverState("disabled");
- if(this.getIcon()){
- this.getIcon().disable();
- }
- this.updateHTML();
- };
- function CToolbarButton_isEnabled(){
- if(this.getIcon()){
- return this.getIcon().isEnabled();
- }else{
- return true;
- }
- };
- function CToolbarButton_pressed(){
- this.getStyle().setActiveState("depressed");
- this.getStyle().setActiveRolloverState("depressed");
- this.updateHTML();
- };
- function CToolbarButton_reset(){
- this.getStyle().setActiveState("normal");
- this.getStyle().setActiveRolloverState("normal");
- this.updateHTML();
- };
- function CToolbarButton_updateHTML(){
- if(typeof this.getStyle()=="object"){
- if(typeof this.getParent().getHTMLContainer=="function"){
- var _1a7=this.getParent().getHTMLContainer();
- if(_1a7!=null){
- var _1a8=_1a7.document?_1a7.document.getElementById(this.getId()):_1a7.ownerDocument.getElementById(this.getId());
- if(_1a8!=null){
- var _1a9=_1a8.getElementsByTagName("img");
- if(typeof _1a9!="undefined"&&_1a9 instanceof Array&&_1a9.length>0){
- if(this.getIcon()){
- if(this.getIcon().isEnabled()){
- _1a9[0].src=this.getIcon().getPath();
- }else{
- _1a9[0].src=this.getIcon().getDisabledImagePath();
- }
- }
- if(this.getToolTip()){
- _1a8.title=this.getToolTip();
- _1a9[0].title=this.getToolTip();
- }
- }
- var _1aa;
- if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
- _1a8.tabIndex=1;
- if(this.getMenu()!=null&&!this.m_bHideDropDown){
- _1a8.nextSibling.tabIndex=1;
- _1a8.nextSibling.title=this.getToolTip();
- _1aa=_1a8.nextSibling.getElementsByTagName("img");
- if(_1aa!=null){
- _1aa[0].title=this.getToolTip();
- }
- }
- }else{
- if(_1a8.tabIndex!="undefined"){
- _1a8.removeAttribute("tabIndex");
- if(this.getMenu()!=null){
- _1a8.nextSibling.removeAttribute("tabIndex");
- _1a8.nextSibling.title=this.getToolTip();
- _1aa=_1a8.nextSibling.getElementsByTagName("img");
- if(_1aa!=null){
- _1aa[0].title=this.getToolTip();
- }
- }
- }
- }
- _1a8.className=this.getStyle().getActiveState();
- }
- }
- }
- }
- };
- function CToolbarButton_getObservers(){
- return this.m_observers;
- };
- function CToolbarButton_setFocus(){
- if(this.m_menu!=null&&!this.m_bHideDropDown){
- document.getElementById(this.m_id).nextSibling.focus();
- }else{
- document.getElementById(this.m_id).focus();
- }
- };
- CToolbarButton.prototype.draw=CToolbarButton_draw;
- CToolbarButton.prototype.attachEvents=CToolbarButton_attachEvents;
- CToolbarButton.prototype.onblur=CToolbarButton_onmouseout;
- CToolbarButton.prototype.onfocus=CToolbarButton_onmouseover;
- CToolbarButton.prototype.onkeypress=CToolbarButton_onkeypress;
- CToolbarButton.prototype.onmouseover=CToolbarButton_onmouseover;
- CToolbarButton.prototype.onmouseout=CToolbarButton_onmouseout;
- CToolbarButton.prototype.onclick=CToolbarButton_onclick;
- CToolbarButton.prototype.setParent=CToolbarButton_setParent;
- CToolbarButton.prototype.getParent=CToolbarButton_getParent;
- CToolbarButton.prototype.getAction=CToolbarButton_getAction;
- CToolbarButton.prototype.setAction=CToolbarButton_setAction;
- CToolbarButton.prototype.getToolTip=CToolbarButton_getToolTip;
- CToolbarButton.prototype.setToolTip=CToolbarButton_setToolTip;
- CToolbarButton.prototype.getDropDownToolTip=CToolbarButton_getDropDownToolTip;
- CToolbarButton.prototype.setDropDownToolTip=CToolbarButton_setDropDownToolTip;
- CToolbarButton.prototype.getIcon=CToolbarButton_getIcon;
- CToolbarButton.prototype.setIcon=CToolbarButton_setIcon;
- CToolbarButton.prototype.getMenu=CToolbarButton_getMenu;
- CToolbarButton.prototype.getMenuType=CToolbarButton_getMenuType;
- CToolbarButton.prototype.getId=CToolbarButton_getId;
- CToolbarButton.prototype.setStyle=CToolbarButton_setStyle;
- CToolbarButton.prototype.getStyle=CToolbarButton_getStyle;
- CToolbarButton.prototype.getDropDownStyle=CToolbarButton_getDropDownStyle;
- CToolbarButton.prototype.setDropDownStyle=CToolbarButton_setDropDownStyle;
- CToolbarButton.prototype.createDropDownMenu=CToolbarButton_createDropDownMenu;
- CToolbarButton.prototype.addOwnerDrawControl=CToolbarButton_addOwnerDrawControl;
- CToolbarButton.prototype.getObservers=CToolbarButton_getObservers;
- CToolbarButton.prototype.update=new Function("return true");
- CToolbarButton.prototype.isVisible=CToolbarButton_isVisible;
- CToolbarButton.prototype.hide=CToolbarButton_hide;
- CToolbarButton.prototype.show=CToolbarButton_show;
- CToolbarButton.prototype.isEnabled=CToolbarButton_isEnabled;
- CToolbarButton.prototype.enable=CToolbarButton_enable;
- CToolbarButton.prototype.disable=CToolbarButton_disable;
- CToolbarButton.prototype.pressed=CToolbarButton_pressed;
- CToolbarButton.prototype.reset=CToolbarButton_reset;
- CToolbarButton.prototype.setFocus=CToolbarButton_setFocus;
- CToolbarButton.prototype.updateHTML=CToolbarButton_updateHTML;
- var CMODAL_ID="CMODAL_FRAME";
- var CMODAL_BLUR="CMODAL_BLUR";
- var CMODAL_CONTENT_ID="CMODAL_CONTENT";
- var CMODAL_HEADER="CMODAL_HEADER";
- var CMODAL_BACKGROUND_LAYER_ID="CMODAL_BK";
- var CMODAL_BACK_IFRAME_ID="CMODAL_BK_IFRAME";
- var CMODAL_ZINDEX=111;
- var CMODAL_dragEnabled=false;
- var CMODAL_resizeDirection=null;
- var CMODAL_startLeft=null;
- var CMODAL_startTop=null;
- var CMODAL_startWidth=null;
- var CMODAL_startHeight=null;
- var CMODAL_deltaX=null;
- var CMODAL_deltaY=null;
- function CModal(_1ab,_1ac,_1ad,t,l,h,w,_1b2,_1b3,_1b4,_1b5,_1b6){
- this.m_hideButtonBar=false;
- if(typeof _1b2!="undefined"){
- this.m_hideButtonBar=_1b2;
- }
- this.m_hideHeader=false;
- if(typeof _1b3!="undefined"){
- this.m_hideHeader=_1b3;
- }
- this.m_title=_1ab;
- this.m_sCloseToolTip=_1ac;
- if(_1ad){
- this.m_parent=_1ad;
- }else{
- this.m_parent=(document.body?document.body:document.documentElement);
- }
- var oBL=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
- if(oBL){
- oBL.parentNode.removeChild(oBL);
- }
- if(typeof _1b6!="undefined"&&_1b6!=""){
- this.m_webContentRoot=_1b6;
- }else{
- this.m_webContentRoot="..";
- }
- oBL=document.createElement("div");
- oBL.id=CMODAL_BACKGROUND_LAYER_ID;
- oBL.style.display="none";
- oBL.style.position="absolute";
- oBL.style.top="0px";
- oBL.style.left="0px";
- oBL.style.zIndex=(CMODAL_ZINDEX-2);
- oBL.style.width="100%";
- oBL.style.height="100%";
- if(typeof _1b5!="undefined"&&_1b5){
- oBL.style.backgroundColor="rgb(238, 238, 238)";
- oBL.style.opacity="0.6";
- oBL.style.filter="alpha(opacity:60)";
- }
- oBL.innerHTML="<table width=\"100%\" height=\"100%\" role=\"presentation\"><tr><td role=\"presentation\" onmousemove=\"CModalEvent_mousemoving(event)\" onmouseup=\"CModalEvent_disableDrag(event)\"></td></tr></table>";
- this.m_parent.appendChild(oBL);
- this.m_backLayer=oBL;
- this.m_top=(t==null?0:t);
- this.m_left=(l==null?0:l);
- this.m_height=(h==null?0:h);
- this.m_width=(w==null?0:w);
- if(typeof _1b4!="undefined"&&_1b4==true){
- this.m_height=CModal_dynamicHeight();
- this.m_width=CModal_dynamicWidth();
- }
- if(window.attachEvent){
- window.attachEvent("onresize",CModalEvent_onWindowResize);
- window.attachEvent("onscroll",CModalEvent_onWindowResize);
- }else{
- window.addEventListener("resize",CModalEvent_onWindowResize,false);
- window.addEventListener("scroll",CModalEvent_onWindowResize,false);
- }
- var f=document.getElementById(CMODAL_ID);
- if(f){
- f.parentNode.removeChild(f);
- }
- f=document.createElement("span");
- f.id=CMODAL_ID;
- f.CModal=this;
- f.className="CModal_frame";
- f.style.zIndex=CMODAL_ZINDEX;
- f.style.border="#99aacc 1px solid";
- var div=this.createHiddenDiv("CMODAL_TAB_LOOP_BEFORE",0);
- div.onfocus=function(){
- document.getElementById("CMODAL_AFTER_PLACEHOLDER").focus();
- };
- this.m_parent.appendChild(f);
- div=this.createHiddenDiv("CMODAL_AFTER_PLACEHOLDER",-1);
- div=this.createHiddenDiv("CMODAL_TAB_LOOP_AFTER",0);
- div.onfocus=function(){
- document.getElementById(CMODAL_CONTENT_ID).contentWindow.focus();
- };
- this.m_back_iframe=document.getElementById(CMODAL_BACK_IFRAME_ID);
- if(this.m_back_iframe){
- this.m_back_iframe.parentNode.removeChild(this.m_back_iframe);
- }
- this.m_back_iframe=document.createElement("iframe");
- this.m_back_iframe.id=CMODAL_BACK_IFRAME_ID;
- this.m_back_iframe.frameBorder=0;
- this.m_back_iframe.src=this.m_webContentRoot+"/common/blank.html";
- this.m_back_iframe.style.position="absolute";
- this.m_back_iframe.style.zIndex=CMODAL_ZINDEX-1;
- this.m_back_iframe.onfocus=function(){
- document.getElementById(CMODAL_BACKGROUND_LAYER_ID).focus();
- };
- this.m_back_iframe.tabIndex=1;
- this.m_back_iframe.title="Empty frame";
- this.m_back_iframe.role="presentation";
- this.m_parent.appendChild(this.m_back_iframe);
- f.innerHTML=this.renderDialogFrame();
- this.m_frame=f;
- };
- function CModal_createHiddenDiv(_1ba,_1bb){
- var div=document.getElementById(_1ba);
- if(div){
- div.parentNode.removeChild(div);
- }
- div=document.createElement("div");
- div.id=_1ba;
- div.tabIndex=_1bb;
- div.style.position="absolute";
- div.style.overflow="hidden";
- div.style.width="0px";
- div.style.height="0px";
- this.m_parent.appendChild(div);
- return div;
- };
- function CModal_hide(){
- this.m_top=parseInt(this.m_frame.offsetTop,10);
- this.m_left=parseInt(this.m_frame.offsetLeft,10);
- this.m_height=parseInt(this.m_frame.offsetHeight,10);
- this.m_width=parseInt(this.m_frame.offsetWidth,10);
- this.m_backLayer.style.display="none";
- this.m_frame.style.display="none";
- if(this.m_back_iframe){
- this.m_back_iframe.style.display="none";
- }
- };
- function CModal_reCenter(){
- this.m_left=(document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth-this.m_width)/2;
- this.m_top=(document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight-this.m_height)/2;
- };
- function CModal_renderDialogFrame(){
- var _1bd="summary=\"\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"";
- var out="<table role=\"presentation\" style=\"width:100%; height:99%; padding-top:2px;\" "+_1bd+" onmouseup=\"CModalEvent_disableDrag(event)\" onmousemove=\"CModalEvent_mousemoving(event)\">";
- if(!this.m_hideHeader){
- out+=""+"<tr>"+"<td role=\"presentation\" onmousedown=\"CModalEvent_enableDrag(event);\">"+"<table class=\"dialogHeader\" width=\"100%\" "+_1bd+">"+"<tr>"+"<td id=\""+CMODAL_HEADER+"\" valign=\"top\" class=\"dialogHeaderTitle\" width=\"100%\" nowrap=\"nowrap\">"+getConfigFrame().htmlencode(this.m_title)+"</td><td align=\"right\" valign=\"middle\">"+"<a onclick=\"hideCModal()\" style=\"cursor:pointer;\">"+"<img height=\"16\" width=\"16\" vspace=\"2\" border=\"0\" class=\"dialogClose\" onmouseover=\"this.className = 'dialogCloseOver'\" onmouseout=\"this.className = 'dialogClose'\" onmouseup=\"this.className = 'dialogClose'\" src=\""+p_sSkinFolder+"/portal/images/close.gif\" alt=\""+getConfigFrame().htmlencode(this.m_sCloseToolTip)+"\" title=\""+getConfigFrame().htmlencode(this.m_sCloseToolTip)+"\">"+"</a>"+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>";
- }
- out+="<tr><td role=\"presentation\" width=\"100%\" height=\"100%\" class=\"body_dialog_modal\" onmousemove=\"CModalEvent_mousemoving(event)\" onmouseup=\"CModalEvent_disableDrag(event)\">"+"<iframe title=\"modal dialog\" id=\""+CMODAL_CONTENT_ID+"\" name=\""+CMODAL_CONTENT_ID+"\" class=\"body_dialog_modal\" src=\""+this.m_webContentRoot+"/"+"qs"+"/blankNewWin.html\" style=\"padding:0px;margin:0px;width:100%;height:100%;\" frameborder=\"0\">no iframe support?</iframe>"+"</td></tr>";
- if(!this.m_hideButtonBar){
- out+="<tr><td>"+"<table "+_1bd+" class=\"dialogButtonBar\" style=\"padding:0px\">"+"<tr>"+"<td width=\"2\" valign=\"middle\"><img width=\"2\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td valign=\"middle\"><table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" role=\"presentation\">"+"<tr>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td>"+CModal_renderButton(msgQS["OK"],"okCModal()")+"</td>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"<td>"+CModal_renderButton(msgQS["CANCEL"],"cancelCModal()")+"</td>"+"<td><img height=\"1\" width=\"8\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"></td>"+"</tr></table>"+"</td><td width=\"100%\"> </td>"+"<td style=\"padding:3px;\" valign=\"bottom\" class=\"CModal_sideSE\" onmousedown=\"CModalEvent_enableResize(event)\">"+"<img role=\"presentation\" class=\"CModal_sideSE\" style=\"cursor:se-resize;\" alt=\"\" height=\"12\" width=\"12\" border=\"0\" src=\""+this.m_webContentRoot+"/common/images/dialog_resize.gif\" onmousedown=\"CModalEvent_enableResize(event);return false;\" onmouseup=\"CModalEvent_disableDrag(event);return false;\" onmousemove=\"CModalEvent_mousemoving(event);return false;\">"+"</td>"+"</tr></table></td></tr>";
- }
- out+="</table>";
- return out;
- };
- function CModal_renderButton(_1bf,_1c0){
- var out="<table cellpadding=\"0\" cellspacing=\"0\" style=\"padding: 2px 10px 3px;\" class=\"commandButton\" onmouseover=\"this.className='commandButtonOver'\""+" onmouseout=\"this.className = 'commandButton'\" onmousedown=\"this.className='commandButtonDown'\">"+"<tr>"+"<td style=\"cursor:pointer;\" valign=\"middle\" align=\"center\" nowrap id=\"btnAnchor\" onclick=\""+_1c0+"\">"+" <img height=\"1\" width=\"60\" alt=\"\" src=\""+this.m_webContentRoot+"/ps/images/space.gif\"><br>"+_1bf+"</td></tr></table>";
- return out;
- };
- function CModal_show(){
- this.m_backLayer.style.display="";
- this.reCenter();
- var _1c2=CMenu_getScrollingPosition();
- this.m_frame.style.top=(_1c2.y+this.m_top)+"px";
- this.m_frame.style.left=(_1c2.x+this.m_left)+"px";
- this.m_frame.style.height=this.m_height+"px";
- this.m_frame.style.width=this.m_width+"px";
- this.m_frame.style.display="inline";
- this.m_frame.focus();
- if(this.m_back_iframe){
- this.m_back_iframe.style.top=this.m_frame.offsetTop+"px";
- this.m_back_iframe.style.left=this.m_frame.offsetLeft+"px";
- this.m_back_iframe.style.height=this.m_frame.offsetHeight+"px";
- this.m_back_iframe.style.width=this.m_frame.offsetWidth+"px";
- this.m_back_iframe.style.display="block";
- }
- };
- CModal.prototype.hide=CModal_hide;
- CModal.prototype.createHiddenDiv=CModal_createHiddenDiv;
- CModal.prototype.reCenter=CModal_reCenter;
- CModal.prototype.renderDialogFrame=CModal_renderDialogFrame;
- CModal.prototype.show=CModal_show;
- function hideCModal(){
- var cdlg=document.getElementById(CMODAL_ID);
- if(cdlg&&cdlg.CModal){
- cdlg.CModal.hide();
- }
- };
- function destroyCModal(){
- var oBL=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
- if(oBL){
- oBL.style.display="none";
- }
- var _1c5=document.getElementById(CMODAL_ID);
- if(_1c5){
- _1c5.style.display="none";
- }
- var _1c6=document.getElementById(CMODAL_BACK_IFRAME_ID);
- if(_1c6){
- _1c6.style.display="none";
- }
- if(window.detachEvent){
- window.detachEvent("onresize",CModalEvent_onWindowResize);
- window.detachEvent("onscroll",CModalEvent_onWindowResize);
- }else{
- window.removeEventListener("resize",CModalEvent_onWindowResize,false);
- window.removeEventListener("scroll",CModalEvent_onWindowResize,false);
- }
- };
- function cancelCModal(){
- var _1c7=document.getElementById(CMODAL_CONTENT_ID);
- if(_1c7&&_1c7.contentWindow&&typeof _1c7.contentWindow.cancelDialog=="function"){
- _1c7.contentWindow.cancelDialog();
- }else{
- hideCModal();
- }
- };
- function okCModal(){
- var _1c8=document.getElementById(CMODAL_CONTENT_ID);
- if(_1c8&&_1c8.contentWindow&&typeof _1c8.contentWindow.execute=="function"){
- _1c8.contentWindow.execute();
- }else{
- hideCModal();
- }
- };
- function CModal_dynamicWidth(){
- return (window.innerWidth!=null?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body!=null?document.body.clientWidth:null)-150;
- };
- function CModal_dynamicHeight(){
- return (window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null)-150;
- };
- function CModal_setModalHeight(_1c9){
- var _1ca=_1c9.getAttribute("storedHeight");
- if(_1c9.offsetHeight>document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight){
- if(_1ca==null){
- _1c9.setAttribute("storedHeight",_1c9.offsetHeight);
- }
- _1c9.style.height=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight+"px";
- }else{
- if(_1ca!=null){
- if(_1ca<document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight){
- _1c9.style.height=_1ca+"px";
- }else{
- _1c9.style.height=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientHeight+"px";
- }
- }
- }
- };
- function CModal_setModalWidth(_1cb){
- var _1cc=_1cb.getAttribute("storedWidth");
- if(_1cb.offsetWidth>document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth){
- if(_1cc==null){
- _1cb.setAttribute("storedWidth",_1cb.offsetWidth);
- }
- _1cb.style.width=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth+"px";
- }else{
- if(_1cc!=null){
- if(_1cc<document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth){
- _1cb.removeAttribute("storedWidth");
- _1cb.style.width=_1cc+"px";
- }else{
- _1cb.style.width=document.getElementById(CMODAL_BACKGROUND_LAYER_ID).clientWidth+"px";
- }
- }
- }
- };
- function CModalEvent_onWindowResize(e){
- var _1ce=document.getElementById(CMODAL_ID);
- var _1cf=document.getElementById(CMODAL_BACKGROUND_LAYER_ID);
- var _1d0=document.getElementById(CMODAL_BACK_IFRAME_ID);
- if(_1ce&&_1cf&&_1d0){
- CModal_setModalWidth(_1ce);
- CModal_setModalHeight(_1ce);
- var _1d1=CMenu_getScrollingPosition();
- var _1d2=(_1d1.y+((_1cf.clientHeight-_1ce.offsetHeight)/2));
- var _1d3=(_1d1.x+((_1cf.clientWidth-_1ce.offsetWidth)/2));
- _1ce.style.top=_1d2+"px";
- _1ce.style.left=_1d3+"px";
- _1d0.style.top=_1d2+"px";
- _1d0.style.width=_1ce.style.width;
- _1d0.style.height=_1ce.style.height;
- _1d0.style.left=_1d3+"px";
- }
- };
- function CModalEvent_mousemoving(e){
- var oDlg=null;
- var _1d6=null;
- if(CMODAL_dragEnabled){
- if(e==null&&(typeof event=="object")&&event.clientX!=null){
- e=event;
- }
- oDlg=document.getElementById(CMODAL_ID);
- if(CMODAL_startLeft==null){
- CMODAL_startLeft=parseInt(oDlg.style.left,10)-e.clientX;
- CMODAL_startTop=parseInt(oDlg.style.top,10)-e.clientY;
- }
- oDlg.style.left=CMODAL_startLeft+e.clientX;
- oDlg.style.top=CMODAL_startTop+e.clientY;
- _1d6=document.getElementById(CMODAL_BACK_IFRAME_ID);
- if(_1d6){
- _1d6.style.left=oDlg.style.left;
- _1d6.style.top=oDlg.style.top;
- }
- }
- if(CMODAL_resizeDirection){
- if(e==null&&(typeof event=="object")&&event.clientX!=null){
- e=event;
- }
- oDlg=document.getElementById(CMODAL_ID);
- if(CMODAL_startLeft==null){
- CMODAL_startLeft=parseInt(oDlg.style.left,10);
- CMODAL_startTop=parseInt(oDlg.style.top,10);
- CMODAL_startHeight=parseInt(oDlg.style.height,10);
- CMODAL_startWidth=parseInt(oDlg.style.width,10);
- }
- var h=0,w=0;
- switch(CMODAL_resizeDirection){
- case "NE":
- case "E":
- case "SE":
- w=(e.clientX-CMODAL_startLeft+CMODAL_deltaX);
- if(w<100){
- w=100;
- }
- oDlg.style.width=w+"px";
- }
- switch(CMODAL_resizeDirection){
- case "SW":
- case "S":
- case "SE":
- h=(e.clientY-CMODAL_startTop+CMODAL_deltaY);
- if(h<100){
- h=100;
- }
- oDlg.style.height=h+"px";
- }
- switch(CMODAL_resizeDirection){
- case "NW":
- case "N":
- case "NE":
- oDlg.style.top=e.clientY;
- h=(CMODAL_startHeight+(CMODAL_startTop-e.clientY)+CMODAL_deltaY);
- if(h<100){
- h=100;
- }
- oDlg.style.height=h+"px";
- }
- switch(CMODAL_resizeDirection){
- case "NW":
- case "W":
- case "SW":
- oDlg.style.left=e.clientX;
- w=(CMODAL_startWidth+(CMODAL_startLeft-e.clientX)+CMODAL_deltaX);
- if(w<100){
- w=100;
- }
- oDlg.style.width=w+"px";
- }
- _1d6=document.getElementById(CMODAL_BACK_IFRAME_ID);
- if(_1d6){
- _1d6.style.left=oDlg.offsetLeft;
- _1d6.style.top=oDlg.offsetTop;
- _1d6.style.height=oDlg.offsetHeight;
- _1d6.style.width=oDlg.offsetWidth;
- }
- }
- if(e.returnValue){
- e.returnValue=false;
- }else{
- if(e.preventDefault){
- e.preventDefault();
- }else{
- return false;
- }
- }
- };
- function CModalEvent_disableDrag(e){
- CMODAL_dragEnabled=false;
- CMODAL_resizeDirection=null;
- CMODAL_startLeft=null;
- CMODAL_startTop=null;
- CMODAL_deltaX=0;
- CMODAL_deltaY=0;
- var cn=document.getElementById(CMODAL_ID).className;
- var _1db=document.getElementById(CMODAL_HEADER);
- if(_1db!=null){
- _1db.style.cursor="default";
- }
- document.getElementById(CMODAL_ID).className=cn.replace(/\s*\bCModal_dragging\b/g,"");
- document.getElementById(CMODAL_CONTENT_ID).style.visibility="visible";
- if(typeof document.getElementById(CMODAL_CONTENT_ID).contentWindow.refreshContent=="function"){
- document.getElementById(CMODAL_CONTENT_ID).contentWindow.refreshContent();
- }
- if(e.returnValue){
- e.returnValue=false;
- }else{
- if(e.preventDefault){
- e.preventDefault();
- }else{
- return false;
- }
- }
- };
- function CModalEvent_enableDrag(e){
- CMODAL_dragEnabled=true;
- CMODAL_startLeft=null;
- CMODAL_startTop=null;
- if(e==null&&(typeof event=="object")&&event.clientX!=null){
- e=event;
- }
- document.getElementById(CMODAL_ID).className+=" CModal_dragging";
- document.getElementById(CMODAL_HEADER).style.cursor="move";
- document.getElementById(CMODAL_CONTENT_ID).style.visibility="hidden";
- if(e.returnValue){
- e.returnValue=false;
- }else{
- if(e.preventDefault){
- e.preventDefault();
- }else{
- return false;
- }
- }
- };
- function CModalEvent_enableResize(e){
- CMODAL_startLeft=null;
- CMODAL_startTop=null;
- CMODAL_startWidth=null;
- CMODAL_startHeight=null;
- CMODAL_deltaX=0;
- CMODAL_deltaY=0;
- if(e==null&&(typeof event=="object")&&event.clientX!=null){
- e=event;
- }
- var oDlg=document.getElementById(CMODAL_ID);
- CMODAL_startLeft=parseInt(oDlg.style.left,10);
- CMODAL_startTop=parseInt(oDlg.style.top,10);
- CMODAL_startHeight=parseInt(oDlg.style.height,10);
- CMODAL_startWidth=parseInt(oDlg.style.width,10);
- CMODAL_deltaX=(CMODAL_startLeft+CMODAL_startWidth-e.clientX);
- CMODAL_deltaY=(CMODAL_startTop+CMODAL_startHeight-e.clientY);
- var src=(e.srcElement?e.srcElement:e.target);
- if((/\bCModal_side(\w+)\b/).test(src.className)){
- CMODAL_resizeDirection=RegExp.$1;
- document.getElementById(CMODAL_ID).className+=" CModal_dragging";
- document.getElementById(CMODAL_CONTENT_ID).style.visibility="hidden";
- }
- if(e.returnValue){
- e.returnValue=false;
- }else{
- if(e.preventDefault){
- e.preventDefault();
- }else{
- return false;
- }
- }
- };
- function CMenuEntry(){
- this.m_menu=null;
- this.m_menuType="";
- this.m_action=null;
- this.m_bEnabled=true;
- };
- function CMenuEntry_setParent(_1e0){
- this.m_parent=_1e0;
- };
- function CMenuEntry_getParent(){
- return this.m_parent;
- };
- function CMenuEntry_setWebContentRoot(_1e1){
- this.m_webContentRoot=_1e1;
- };
- function CMenuEntry_setId(id){
- this.m_id=id;
- };
- function CMenuEntry_getId(){
- return this.m_id;
- };
- function CMenuEntry_getObservers(){
- return this.m_observers;
- };
- function CMenuEntry_onkeydown(evt){
- evt=(evt)?evt:((event)?event:null);
- if(typeof evt!="object"||evt==null){
- return;
- }
- var i=0,ii,_1e6,_1e7,_1e8;
- var _1e9=true;
- var _1ea=evt.currentTarget||evt.srcElement;
- if(evt.keyCode==9&&evt.shiftKey){
- _1e8=this.getParent();
- for(i=0;i<_1e8.getNumItems();i++){
- if(_1e8.get(i)==this){
- _1e8.hide();
- this.getObservers().notify("CMenuItem_closeMenuTabEvent");
- var _1eb=_1e8.getMenuType?_1e8.getMenuType():null;
- if(_1eb!==cHorizonalBar&&_1eb!==cVerticalBar){
- if(isIE()){
- evt.preventDefault();
- }else{
- evt.returnValue=false;
- }
- }
- break;
- }else{
- if(this.getParent().get(i).m_bEnabled==true){
- break;
- }
- }
- }
- }else{
- if(evt.keyCode==9){
- if(this.isInMenu()){
- for(i=(this.getParent().getNumItems()-1);i>=0;i++){
- if(this.getParent().get(i)==this){
- if(this.getMenu()){
- this.getMenu().hide();
- }
- this.getParent().hide();
- this.getObservers().notify("CMenuItem_closeMenuTabEvent");
- if(isIE()){
- evt.preventDefault();
- }else{
- evt.returnValue=false;
- }
- break;
- }else{
- if(this.getParent().get(i).m_bEnabled==true){
- break;
- }
- }
- }
- }else{
- if(typeof this.getParent().closeAllMenus=="function"){
- this.getParent().closeAllMenus();
- }else{
- if(typeof this.getParent().closeMenus=="function"){
- this.getParent().closeMenus();
- }
- }
- }
- }else{
- if(evt.keyCode==40){
- if(this.isInMenu()){
- _1e6=this.getParent().getNumItems();
- for(i=0;i<_1e6;i++){
- if(this===this.getParent().get(i)){
- var _1ec=0;
- var _1ed=true;
- if(i!=(_1e6-1)){
- _1ec=i+1;
- _1ed=false;
- }
- for(ii=_1ec;ii<_1e6;ii++){
- _1e7=this.getParent().get(ii);
- if(typeof _1e7.isVisible=="function"&&_1e7.isVisible()&&typeof _1e7.setFocus=="function"){
- _1e7.setFocus();
- break;
- }
- if(ii==(_1e6-1)&&!_1ed){
- ii=0;
- _1ed=true;
- }
- }
- break;
- }
- }
- }else{
- if(this.isEnabled()){
- _1e9=false;
- var menu=this.getMenu();
- if(this.getMenuType()=="dropDown"){
- if(menu.isVisible()==false){
- menu.setHTMLContainer(_1ea.document?_1ea.document.body:_1ea.ownerDocument.body);
- menu.draw();
- menu.show();
- }else{
- menu.remove();
- }
- }
- }
- }
- }else{
- if(evt.keyCode==38&&this.isInMenu()){
- _1e6=this.getParent().getNumItems();
- for(i=0;i<_1e6;i++){
- if(this===this.getParent().get(i)){
- var _1ec=i-1;
- var _1ef=false;
- if(i<=0){
- _1ec=_1e6-1;
- _1ef=true;
- }
- for(ii=_1ec;ii>=0;ii--){
- _1e7=this.getParent().get(ii);
- if(typeof _1e7.isVisible=="function"&&_1e7.isVisible()&&typeof _1e7.setFocus=="function"){
- _1e7.setFocus();
- break;
- }
- if(ii==0&&!_1ef){
- _1ef=true;
- ii=_1e6;
- }
- }
- break;
- }
- }
- }else{
- if(evt.keyCode==37||evt.keyCode==39){
- if(this.isEnabled()&&this.getMenu()!=null){
- var menu=this.getMenu();
- if(this.getMenuType()=="cascaded"){
- _1e9=false;
- if(menu.isVisible()==false){
- menu.setHTMLContainer(_1ea.document?_1ea.document.body:_1ea.ownerDocument.body);
- menu.draw();
- menu.show();
- }
- }
- }else{
- _1e9=false;
- _1e8=this.getParent();
- if(_1e8&&_1e8.getParent()&&_1e8.getParent().getMenuType()=="cascaded"){
- _1e8.hide();
- }
- }
- }
- }
- }
- }
- }
- if(_1e9&&this.getParent()!=null&&typeof this.getParent().onkeydown=="function"){
- this.getParent().onkeydown(evt);
- }
- this.getObservers().notify(CMenuItem_onkeydown);
- };
- function CMenuEntry_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- var _1f1=evt.keyCode;
- if(_1f1==0&&typeof evt.charCode!="undefined"){
- _1f1=evt.charCode;
- }
- if(typeof evt=="object"&&evt!=null){
- var _1f2=evt.currentTarget||evt.srcElement;
- var _1f3=true;
- if(_1f1==9||_1f1==37||_1f1==38||_1f1==39||_1f1==40){
- _1f3=false;
- }else{
- if(_1f1==13||_1f1==32){
- if(!this.isEnabled()){
- return;
- }
- if(this.getMenu()!=null){
- var menu=this.getMenu();
- if(this.getMenuType()=="cascaded"){
- _1f3=false;
- if(menu.isVisible()==false){
- menu.setHTMLContainer(_1f2.document?_1f2.document.body:_1f2.ownerDocument.body);
- menu.draw();
- menu.show();
- }else{
- menu.remove();
- }
- }else{
- if(this.getMenuType()=="dropDown"){
- if(menu.isVisible()==false){
- menu.setHTMLContainer(_1f2.document?_1f2.document.body:_1f2.ownerDocument.body);
- menu.draw();
- menu.show();
- }else{
- menu.remove();
- }
- }
- }
- }else{
- eval(this.getAction());
- }
- }else{
- if(_1f1==27){
- this.getParent().hide();
- return;
- }
- }
- }
- if(_1f3){
- if(this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
- this.getParent().onkeypress(evt);
- }
- this.getObservers().notify(CMenuItem_onkeypress);
- }
- }
- if(_1f1==13||_1f1==0||_1f1==40||_1f1==38){
- if(evt!=null){
- evt.cancelBubble=true;
- }
- return false;
- }
- return true;
- };
- function CMenuEntry_getMenu(){
- return this.m_menu;
- };
- function CMenuEntry_getMenuType(){
- return this.m_menuType;
- };
- function CMenuEntry_isEnabled(){
- return this.m_bEnabled;
- };
- function CMenuEntry_isInMenu(){
- return this.getParent() instanceof CMenu;
- };
- function CMenuEntry_getAction(){
- return this.m_action;
- };
- function CMenuEntry_setAction(_1f5){
- this.m_action=_1f5;
- };
- CMenuEntry.prototype.getObservers=CMenuEntry_getObservers;
- CMenuEntry.prototype.setId=CMenuEntry_setId;
- CMenuEntry.prototype.getId=CMenuEntry_getId;
- CMenuEntry.prototype.onkeypress=CMenuEntry_onkeypress;
- CMenuEntry.prototype.onkeydown=CMenuEntry_onkeydown;
- CMenuEntry.prototype.getMenu=CMenuEntry_getMenu;
- CMenuEntry.prototype.getMenuType=CMenuEntry_getMenuType;
- CMenuEntry.prototype.setParent=CMenuEntry_setParent;
- CMenuEntry.prototype.getParent=CMenuEntry_getParent;
- CMenuEntry.prototype.setWebContentRoot=CMenuEntry_setWebContentRoot;
- CMenuEntry.prototype.isEnabled=CMenuEntry_isEnabled;
- CMenuEntry.prototype.isInMenu=CMenuEntry_isInMenu;
- CMenuEntry.prototype.getAction=CMenuEntry_getAction;
- CMenuEntry.prototype.setAction=CMenuEntry_setAction;
- var theMenuCnt=1;
- function CMenuItem(_1f6,_1f7,_1f8,_1f9,_1fa,_1fb,skin){
- this.m_label=_1f7;
- if(this.m_label){
- this.m_label=this.m_label.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");
- }
- this.setId(escape(_1f7)+theMenuCnt++);
- this.m_bVisible=true;
- this.setAction(_1f8);
- this.setWebContentRoot(_1fb);
- var _1fd=_1f9;
- if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["isTitan"])&&(gCognosViewer.envParams["isTitan"]==true)){
- _1fd="blankIcon";
- }
- this.m_icon=new CIcon(_1fd,"",this.m_webContentRoot);
- this.setParent(_1f6);
- this.m_style=_1fa;
- this.m_observers=new CObserver(this);
- if(typeof skin!="undefined"&&skin!=""){
- this.m_sSkin=skin;
- }else{
- this.m_sSkin=(typeof getPromptSkin!="undefined"?getPromptSkin():this.m_webContentRoot+"/skins/corporate");
- }
- if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){
- this.m_parent.add(this);
- }
- this.m_sDropDownArrow="dropdown_arrow_banner.gif";
- };
- CMenuItem.prototype=new CMenuEntry();
- CMenuItem.prototype.setDropDownArrow=function(_1fe){
- this.m_sDropDownArrow=_1fe;
- };
- CMenuItem.prototype.getDropDownArrow=function(){
- return this.m_sDropDownArrow;
- };
- function CMenuItem_setId(id){
- this.m_id=id;
- };
- function CMenuItem_setIcon(_200){
- this.m_icon.setPath(_200);
- };
- function CMenuItem_setToolTip(_201){
- this.m_icon.m_toolTip=_201;
- };
- function CMenuItem_getToolTip(){
- return this.m_icon.m_toolTip;
- };
- function CMenuItem_setAltText(_202){
- this.m_sAltText=_202;
- };
- function CMenuItem_getAltText(){
- if(this.m_sAltText){
- return this.m_sAltText;
- }else{
- return "";
- }
- };
- function CMenuItem_genARIATags(){
- var html="";
- if(this.isInMenu()){
- html+=" role=\"menuitem\" ";
- }else{
- html+=" role=\"button\" ";
- }
- if(this.m_menuType=="dropDown"||this.m_menuType=="cascaded"){
- html+=" aria-haspopup=\"true\" ";
- }
- if(this.getAltText().length==0){
- this.setAltText(this.m_label);
- }
- if((this.getAltText()&&this.getAltText().length>0)||(this.m_icon&&this.m_icon.getToolTip())){
- html+=" aria-labelledby=\""+this.m_id+"label\" ";
- }
- if(!this.isEnabled()){
- html+=" aria-disabled=\"true\" ";
- }
- return html;
- };
- function CMenuItem_genMenuItemAltText(){
- var html="";
- if((this.getAltText()&&this.getAltText().length>0)||(this.m_icon&&this.m_icon.getToolTip())){
- html+="<div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.m_id+"label\">";
- if(this.getAltText()&&this.getAltText().length>0){
- html+=this.getAltText();
- }else{
- html+=this.m_icon.getToolTip();
- }
- html+="</div>";
- }
- return html;
- };
- function CMenuItem_draw(){
- var html="<div>";
- var _206=false,_207=null,_208=null,_209=0;
- if(this.m_menu==null||this.m_menuType=="dropDown"){
- html+="<table ";
- html+=this.genARIATags();
- if(this.isInMenu()){
- if(this.isEnabled()){
- html+=" hideFocus=\"true\" ";
- }
- html+=" tabIndex=\"0\" ";
- }else{
- if(this.isEnabled()){
- html+=" tabIndex=\"0\"";
- }
- }
- html+=" width=\"100%\" ";
- html+="class=\"";
- if(typeof this.getStyle()=="object"){
- if(this.isEnabled()){
- html+=this.getStyle().getNormalState();
- }else{
- html+=this.getStyle().getDisabledState();
- }
- }
- html+="\" id=\"";
- html+=this.getId();
- html+="\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:1px;\"><tr>";
- _206=false;
- if(this.m_icon.getPath()==""&&this.m_parent instanceof CMenu){
- _207=this.m_parent.getNumItems();
- for(_209=0;_209<_207;++_209){
- _208=this.m_parent.get(_209);
- if(typeof _208.getIcon=="function"&&_208.getIcon().getPath()){
- _206=true;
- break;
- }
- }
- }
- if(_206||this.m_icon.getPath()!=""){
- var f="";
- if(getViewerDirection()=="rtl"){
- f=" float: right;";
- }
- html+="<td width=\"16\" style=\"padding-right: 2px; padding-left: 2px;"+f+"\">";
- if(this.m_icon.getPath()!=""){
- html+=this.m_icon.draw();
- }else{
- html+="<img alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" width=\"16\"/>";
- }
- html+="</td>";
- }
- if(getViewerDirection()=="rtl"){
- html+="<td nowrap=\"nowrap\" align=\"right\">";
- }else{
- html+="<td nowrap=\"nowrap\" align=\"left\">";
- }
- html+=this.m_label;
- html+=this.genMenuItemAltText();
- html+="</td>";
- if(this.m_menuType=="dropDown"){
- html+="<td width=\"10%\" align=\"right\" style=\"padding-right: 3px;padding-left: 3px\">";
- html+="<img alt=\"\" src=\""+this.m_sSkin;
- if(this.getDropDownArrow()=="dropdown_arrow_banner.gif"){
- html+="/shared/images/";
- }else{
- html+="/portal/images/";
- }
- html+=this.getDropDownArrow()+"\" WIDTH=\"7\" HEIGHT=\"16\" style=\"vertical-align:middle;\"/>";
- html+="</td>";
- }
- html+="</tr></table></div>";
- }else{
- html+="<table";
- html+=this.genARIATags();
- if(this.isEnabled()||this.isInMenu()){
- html+=" tabIndex=\"0\" hideFocus=\"true\"";
- }
- html+=" width=\"100%\" class=\"";
- if(typeof this.getStyle()=="object"){
- if(this.isEnabled()){
- html+=this.getStyle().getNormalState();
- }else{
- html+=this.getStyle().getDisabledState();
- }
- }
- html+="\" id=\"";
- html+=this.getId();
- html+="\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-bottom:1px;\"><tr>";
- html+="<td";
- _206=false;
- if(this.m_icon.getPath()==""){
- _207=this.m_parent.getNumItems();
- for(_209=0;_209<_207;++_209){
- _208=this.m_parent.get(_209);
- if(typeof _208.getIcon=="function"&&_208.getIcon().getPath()){
- _206=true;
- break;
- }
- }
- }
- if(_206||this.m_icon.getPath()!=""){
- html+=" width=\"16\" style=\"padding-right: 2px; padding-left: 2px;\">";
- }else{
- html+=" width=\"1\">";
- }
- html+=this.m_icon.draw();
- html+="</td>";
- if(getViewerDirection()=="rtl"){
- html+="<td nowrap=\"nowrap\" align=\"right\">";
- }else{
- html+="<td nowrap=\"nowrap\" align=\"left\">";
- }
- html+=this.m_label;
- html+=this.genMenuItemAltText();
- html+="</td>";
- if(getViewerDirection()=="rtl"){
- html+="<td width=\"10%\" align=\"left\">";
- html+="<img style=\"vertical-align:middle;\" alt=\"\" src=\""+this.m_sSkin+"/viewer/images/menu_expand_rtl.gif\" WIDTH=\"13\" HEIGHT=\"13\"/>";
- }else{
- html+="<td width=\"10%\" align=\"right\">";
- html+="<img style=\"vertical-align:middle;\" alt=\"\" src=\""+this.m_sSkin+"/viewer/images/menu_expand.gif\" WIDTH=\"13\" HEIGHT=\"13\"/>";
- }
- html+="</td>";
- html+="</tr></table>";
- html+="</div>";
- }
- return html;
- };
- function CMenuItem_onmouseover(evt){
- evt=(evt)?evt:((event)?event:null);
- var _20c=null;
- if(typeof this.menuItem!="undefined"){
- _20c=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _20c=this;
- }
- }
- if(_20c==null||!(_20c instanceof CMenuItem)||!_20c.isEnabled()){
- return;
- }
- var menu=_20c.getMenu();
- if(typeof _20c.getStyle()=="object"&&(menu!=null||typeof _20c.getIcon().getPath()!="undefined")){
- this.className=_20c.getStyle().getRolloverState();
- }
- if(menu!=null){
- var _20e=0;
- var _20f=0;
- if(typeof window.innerWidth!="undefined"){
- _20e=window.innerWidth;
- }else{
- _20e=document.body.clientWidth;
- }
- if(typeof window.innerHeight!="undefined"){
- _20f=window.innerHeight;
- }else{
- _20f=document.body.clientHeight;
- }
- if(_20c.getMenuType()=="cascaded"){
- if(menu.isVisible()==false){
- menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
- menu.draw();
- menu.show();
- }
- }else{
- if(_20c.getMenuType()=="dropDown"){
- var _210=_20c.getParent();
- var _211=_210.getNumItems();
- for(var i=0;i<_211;++i){
- var _213=_210.get(i);
- if(_213!=_20c&&typeof _213.getMenu=="function"&&_213.getMenu()&&_213.getMenu().isVisible()){
- menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
- menu.draw();
- menu.show();
- break;
- }
- }
- }
- }
- }
- if(_20c.getParent()!=null&&typeof _20c.getParent().onmouseover=="function"){
- _20c.getParent().onmouseover(evt);
- }
- _20c.getObservers().notify(CMenuItem_onmouseover);
- };
- function CMenuItem_onfocus(evt){
- evt=(evt)?evt:((event)?event:null);
- var _215=null;
- if(typeof this.menuItem!="undefined"){
- _215=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _215=this;
- }
- }
- if(_215==null||!(_215 instanceof CMenuItem)||!_215.isEnabled()){
- return;
- }
- if(typeof _215.getStyle()=="object"){
- this.className=_215.getStyle().getRolloverState();
- }
- if(_215.getParent()!=null&&typeof _215.getParent().onmouseover=="function"){
- _215.getParent().onmouseover(evt);
- }
- _215.getObservers().notify(CMenuItem_onfocus);
- };
- function CMenuItem_onmouseout(evt){
- evt=(evt)?evt:((event)?event:null);
- var _217=null;
- if(typeof this.menuItem!="undefined"){
- _217=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _217=this;
- }
- }
- if(_217==null||!(_217 instanceof CMenuItem)||!_217.isEnabled()){
- return;
- }
- if(typeof _217.getStyle()=="object"){
- this.className=_217.getStyle().getNormalState();
- }
- if(_217.getParent()!=null&&typeof _217.getParent().onmouseout=="function"){
- _217.getParent().onmouseout(evt);
- }
- _217.getObservers().notify(CMenuItem_onmouseout);
- };
- function CMenuItem_onclick(evt){
- evt=(evt)?evt:((event)?event:null);
- if(evt!=null){
- evt.cancelBubble=true;
- }
- return false;
- };
- function CMenuItem_onmouseup(evt){
- evt=(evt)?evt:((event)?event:null);
- var _21a=null;
- if(typeof this.menuItem!="undefined"){
- _21a=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _21a=this;
- }
- }
- if(_21a!=null&&_21a instanceof CMenuItem){
- if(!_21a.isEnabled()){
- return;
- }
- if(_21a.getMenu()!=null){
- if(_21a.getMenuType()=="cascaded"){
- }else{
- if(_21a.getMenuType()=="dropDown"){
- var menu=_21a.getMenu();
- if(menu.isVisible()==false){
- if(!this.document&&!this.ownerDocument){
- return;
- }
- menu.setHTMLContainer(this.document?this.document.body:this.ownerDocument.body);
- menu.draw();
- menu.show();
- }else{
- menu.remove();
- }
- }
- }
- }else{
- eval(_21a.getAction());
- }
- if(typeof getReportFrame!="undefined"&&typeof getReportFrame().clearTextSelection!="undefined"){
- getReportFrame().clearTextSelection();
- }else{
- if(typeof clearTextSelection!="undefined"){
- clearTextSelection();
- }
- }
- if(_21a.getMenuType()!="cascaded"){
- if(_21a.getParent()!=null&&typeof _21a.getParent().onmouseup=="function"){
- _21a.getParent().onmouseup(evt);
- }
- _21a.getObservers().notify(CMenuItem_onmouseup);
- }
- if(typeof this.menuItem!="undefined"&&_21a.getMenu()!=null&&_21a.getMenuType()=="cascaded"&&_21a.getAction()!=""){
- eval(_21a.getAction());
- }
- }
- if(evt!=null){
- evt.cancelBubble=true;
- }
- return false;
- };
- function CMenuItem_onkeydown(evt){
- var _21d=null;
- if(typeof this.menuItem!="undefined"){
- _21d=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _21d=this;
- }
- }
- if(_21d==null||!(_21d instanceof CMenuItem)){
- return;
- }
- return CMenuEntry_onkeydown.call(_21d,evt);
- };
- function CMenuItem_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- var _21f=null;
- if(typeof this.menuItem!="undefined"){
- _21f=this.menuItem;
- }else{
- if(this instanceof CMenuItem){
- _21f=this;
- }
- }
- if(_21f!=null&&_21f instanceof CMenuItem){
- return CMenuEntry_onkeypress.call(_21f,evt);
- }
- };
- function CMenuItem_createDropDownMenu(_220){
- this.m_menu=new CMenu("dropDownMenu_"+this.getId(),_220,this.m_webContentRoot);
- this.m_menu.setParent(this);
- this.m_menuType="dropDown";
- return this.m_menu;
- };
- function CMenuItem_createCascadedMenu(_221){
- this.m_menu=new CMenu("cascadedMenu_"+this.getId(),_221,this.m_webContentRoot);
- this.m_menu.setParent(this);
- this.m_originalMenuType=this.m_menuType;
- this.m_menuType="cascaded";
- return this.m_menu;
- };
- function CMenuItem_clearCascadedMenu(){
- if(this.m_menu){
- this.m_menu.remove();
- this.m_menu=null;
- }
- if(this.m_originalMenuType){
- this.m_menuType=this.m_originalMenuType;
- }
- };
- function CMenuItem_addOwnerDrawControl(_222,type){
- this.m_menu=_222;
- this.m_menuType=type;
- if(typeof _222.setParent!="undefined"){
- this.m_menu.setParent(this);
- }
- };
- function CMenuItem_attachEvents(){
- if(typeof this.getParent().getHTMLContainer!="function"){
- return;
- }
- var _224=this.getParent().getHTMLContainer();
- if(_224==null){
- return;
- }
- var _225=eval(_224.document?_224.document.getElementById(this.getId()):_224.ownerDocument.getElementById(this.getId()));
- if(_225==null){
- return;
- }
- _225.onmouseover=this.onmouseover;
- _225.onmouseout=this.onmouseout;
- _225.onmouseup=this.onmouseup;
- _225.onkeypress=this.onkeypress;
- _225.onfocus=this.onfocus;
- _225.onblur=this.onblur;
- _225.onkeydown=this.onkeydown;
- _225.onclick=this.onclick;
- _225.menuItem=eval(this);
- };
- function CMenuItem_remove(){
- };
- function CMenuItem_getStyle(){
- return this.m_style;
- };
- function CMenuItem_setStyle(_226){
- this.m_style=_226;
- };
- function CMenuItem_hide(){
- this.m_bVisible=false;
- };
- function CMenuItem_show(){
- this.m_bVisible=true;
- };
- function CMenuItem_enable(){
- if(typeof this.getStyle()=="object"){
- if(typeof this.getParent().getHTMLContainer=="function"){
- var _227=this.getParent().getHTMLContainer();
- if(_227!=null){
- var _228=_227.document?_227.document.getElementById(this.getId()):_227.ownerDocument.getElementById(this.getId());
- if(_228!=null){
- _228.className=this.getStyle().getNormalState();
- }
- }
- }
- this.m_bEnabled=true;
- this.getIcon().enable();
- this.updateHTML();
- }
- };
- function CMenuItem_updateHTML(){
- if(typeof this.getStyle()=="object"){
- if(typeof this.getParent().getHTMLContainer=="function"){
- var _229=this.getParent().getHTMLContainer();
- if(_229!=null){
- var _22a=_229.document?_229.document.getElementById(this.getId()):_229.ownerDocument.getElementById(this.getId());
- if(_22a!=null){
- var _22b=_22a.getElementsByTagName("img");
- if(typeof _22b!="undefined"){
- if(this.getIcon()){
- if(this.getIcon().isEnabled()){
- _22b[0].src=this.getIcon().getPath();
- }else{
- _22b[0].src=this.getIcon().getDisabledImagePath();
- }
- }
- if(this.getToolTip()){
- _22a.title=this.getToolTip();
- _22b[0].title=this.getToolTip();
- }
- }
- if(this.isEnabled()){
- if(_22a.getAttribute("aria-disabled")){
- _22a.removeAttribute("aria-disabled");
- }
- }else{
- _22a.setAttribute("aria-disabled","true");
- }
- var _22c;
- if(this.getStyle().getActiveState()!=this.getStyle().getDisabledState()){
- _22a.tabIndex=0;
- if(this.getMenu()!=null&&!this.m_bHideDropDown&&_22a.nextSibling){
- _22a.nextSibling.tabIndex=0;
- _22a.nextSibling.title=this.getToolTip();
- _22c=_22a.nextSibling.getElementsByTagName("img");
- if(_22c!=null){
- _22c[0].title=this.getToolTip();
- }
- }
- }else{
- if(_22a.tabIndex!="undefined"){
- _22a.removeAttribute("tabIndex");
- if(this.getMenu()!=null){
- _22a.nextSibling.removeAttribute("tabIndex");
- _22a.nextSibling.title=this.getToolTip();
- _22c=_22a.nextSibling.getElementsByTagName("img");
- if(_22c!=null){
- _22c[0].title=this.getToolTip();
- }
- }
- }
- }
- _22a.className=this.getStyle().getActiveState();
- }
- }
- }
- }
- };
- function CMenuItem_disable(){
- if(typeof this.getStyle()=="object"){
- if(typeof this.getParent().getHTMLContainer=="function"){
- var _22d=this.getParent().getHTMLContainer();
- if(_22d!=null){
- var _22e=_22d.document?_22d.document.getElementById(this.getId()):_22d.ownerDocument.getElementById(this.getId());
- if(_22e!=null){
- _22e.className=this.getStyle().getDisabledState();
- }
- }
- }
- this.m_bEnabled=false;
- this.getIcon().disable();
- this.updateHTML();
- }
- };
- function CMenuItem_isVisible(){
- return this.m_bVisible;
- };
- function CMenuItem_getIcon(){
- return this.m_icon;
- };
- function CMenuItem_getLabel(){
- return this.m_label;
- };
- function CMenuItem_setFocus(){
- var e=document.getElementById(this.m_id);
- if(e){
- e.focus();
- return true;
- }
- return false;
- };
- CMenuItem.prototype.draw=CMenuItem_draw;
- CMenuItem.prototype.onmouseover=CMenuItem_onmouseover;
- CMenuItem.prototype.onmouseout=CMenuItem_onmouseout;
- CMenuItem.prototype.onmouseup=CMenuItem_onmouseup;
- CMenuItem.prototype.onkeypress=CMenuItem_onkeypress;
- CMenuItem.prototype.onkeydown=CMenuItem_onkeydown;
- CMenuItem.prototype.onfocus=CMenuItem_onfocus;
- CMenuItem.prototype.onblur=CMenuItem_onmouseout;
- CMenuItem.prototype.onclick=CMenuItem_onclick;
- CMenuItem.prototype.attachEvents=CMenuItem_attachEvents;
- CMenuItem.prototype.remove=CMenuItem_remove;
- CMenuItem.prototype.setStyle=CMenuItem_setStyle;
- CMenuItem.prototype.getStyle=CMenuItem_getStyle;
- CMenuItem.prototype.createDropDownMenu=CMenuItem_createDropDownMenu;
- CMenuItem.prototype.createCascadedMenu=CMenuItem_createCascadedMenu;
- CMenuItem.prototype.clearCascadedMenu=CMenuItem_clearCascadedMenu;
- CMenuItem.prototype.addOwnerDrawControl=CMenuItem_addOwnerDrawControl;
- CMenuItem.prototype.isVisible=CMenuItem_isVisible;
- CMenuItem.prototype.hide=CMenuItem_hide;
- CMenuItem.prototype.show=CMenuItem_show;
- CMenuItem.prototype.enable=CMenuItem_enable;
- CMenuItem.prototype.disable=CMenuItem_disable;
- CMenuItem.prototype.getIcon=CMenuItem_getIcon;
- CMenuItem.prototype.setIcon=CMenuItem_setIcon;
- CMenuItem.prototype.getLabel=CMenuItem_getLabel;
- CMenuItem.prototype.setFocus=CMenuItem_setFocus;
- CMenuItem.prototype.setToolTip=CMenuItem_setToolTip;
- CMenuItem.prototype.getToolTip=CMenuItem_getToolTip;
- CMenuItem.prototype.updateHTML=CMenuItem_updateHTML;
- CMenuItem.prototype.update=new Function("return true");
- CMenuItem.prototype.genARIATags=CMenuItem_genARIATags;
- CMenuItem.prototype.setAltText=CMenuItem_setAltText;
- CMenuItem.prototype.getAltText=CMenuItem_getAltText;
- CMenuItem.prototype.genMenuItemAltText=CMenuItem_genMenuItemAltText;
- function CSeperator(type,size,_232,_233){
- this.m_type=type;
- this.m_size=size;
- this.m_bVisible=true;
- if(_232!==null&&typeof _232=="object"){
- this.m_style=new CUIStyle(_232.getNormalState(),_232.getRolloverState(),_232.getDepressedState(),_232.getDepressedRolloverState(),_232.getDisabledState());
- }else{
- this.m_style=new CUIStyle("","","","","");
- }
- if(typeof _233!="undefined"&&_233!=""){
- this.m_webContentRoot=_233;
- }else{
- this.m_webContentRoot="..";
- }
- this.m_toolbarSeperatorClass="bannerDivider";
- };
- CSeperator.prototype.setToolbarSeperatorClass=function(_234){
- this.m_toolbarSeperatorClass=_234;
- };
- CSeperator.prototype.getToolbarSeperatorClass=function(){
- return this.m_toolbarSeperatorClass;
- };
- CSeperator.prototype.setWebContentRoot=function(_235){
- this.m_webContentRoot=_235;
- };
- function CSeperator_draw(){
- if(this.m_style==""){
- return;
- }
- var html="";
- switch(this.m_type){
- case "horizonal_blank":
- html+="<td style=\"padding:0px;\"><img border=\"0\" alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" height=\"1\" width=\"";
- html+=this.m_size;
- html+="\"/></td>";
- break;
- case "horizontal_line":
- html+="<div class=\""+this.getStyle().getActiveState()+"\"></div>";
- break;
- case "vertical_blank":
- html+="<tr>";
- html+="<td style=\"padding:0px;\"><img border=\"0\" alt=\"\" src=\""+this.m_webContentRoot+"/common/images/spacer.gif\" width=\"1\" height=\"";
- html+=this.m_size;
- html+="\"/></td></tr>";
- break;
- case "vertical_line":
- html+="<td class=\"toolbarVerticalSeperator\"><div class=\""+this.getToolbarSeperatorClass()+"\"/></td>";
- break;
- }
- return html;
- };
- function CSeperator_getSize(){
- return this.m_size;
- };
- function CSeperator_setSize(size){
- this.m_size=size;
- };
- function CSeperator_setStyle(_238){
- this.m_style=_238;
- };
- function CSeperator_getStyle(){
- return this.m_style;
- };
- function CSeperator_setType(type){
- this.m_type=type;
- };
- function CSeperator_getType(){
- return this.m_type;
- };
- function CSeperator_hide(){
- this.m_bVisible=false;
- };
- function CSeperator_show(){
- this.m_bVisible=true;
- };
- function CSeperator_isVisible(){
- return this.m_bVisible;
- };
- CSeperator.prototype.draw=CSeperator_draw;
- CSeperator.prototype.setSize=CSeperator_setSize;
- CSeperator.prototype.getSize=CSeperator_getSize;
- CSeperator.prototype.setStyle=CSeperator_setStyle;
- CSeperator.prototype.getStyle=CSeperator_getStyle;
- CSeperator.prototype.getType=CSeperator_getType;
- CSeperator.prototype.setType=CSeperator_setType;
- CSeperator.prototype.isVisible=CSeperator_isVisible;
- CSeperator.prototype.show=CSeperator_show;
- CSeperator.prototype.hide=CSeperator_hide;
- function CInfoPanel(size,_23b,id){
- this.m_size=size;
- this.m_bVisible=true;
- this.m_properties=[];
- this.setId(id);
- this.m_observers=new CObserver(this);
- this.setWebContentRoot(_23b);
- };
- CInfoPanel.prototype=new CMenuEntry();
- CInfoPanel.prototype.setWebContentRoot=function(_23d){
- this.m_webContentRoot=_23d;
- };
- function CInfoPanel_addCheckedProperty(name,_23f){
- var o={"name":name,"value":_23f,"type":"checkBox","spacer":false};
- this.m_properties[this.m_properties.length]=o;
- };
- function CInfoPanel_addProperty(name,_242){
- var o={"name":name,"value":_242,"spacer":false};
- this.m_properties[this.m_properties.length]=o;
- };
- function CInfoPanel_addSpacer(_244){
- var o={"spacer":true,"height":_244};
- this.m_properties[this.m_properties.length]=o;
- };
- function CInfoPanel_draw(){
- var i=0;
- var html="<table CELLPADDING=\"0\" CELLSPACING=\"0\" role=\"presentation\">";
- if(this.m_properties.length>0){
- var _248="<tr><td>";
- var _249="";
- for(i=0;i<this.m_properties.length;i++){
- if(this.m_properties[i].spacer){
- }else{
- if(this.m_properties[i].type!=null&&this.m_properties[i].type=="checkBox"){
- _248+="<tr><td><span><span class=\"formText\">";
- if(this.m_properties[i].value=="true"){
- _248+="<input type=\"checkbox\" disabled=\"true\" checked>";
- }else{
- _248+="<input type=\"checkbox\" disabled=\"true\">";
- }
- _248+=this.m_properties[i].name;
- _248+="</span> </input>";
- _248+="<span></td></tr>";
- }else{
- _248+="<tr><td><span><span class=\"menuItem_normal\" style=\"font-weight:bold\">";
- _248+=this.m_properties[i].name;
- _248+="</span> <span class=\"menuItem_normal\">";
- _248+=this.m_properties[i].value;
- _248+="</span></span></td></tr>";
- }
- _249+=this.m_properties[i].name+" "+this.m_properties[i].value+", ";
- }
- }
- var id=this.getId()?"id=\""+this.getId()+"\" ":"";
- var _24b="<table summary=\""+_249+"\" role=\"presentation\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" "+id+" tabindex=\"0\" style=\"margin-bottom:1px;";
- if(typeof this.m_size!="undefined"&&this.m_size!=""){
- _24b+="width:"+this.m_size;
- }
- _24b+="\"\t>";
- html+=_24b+_248+"</table></td></tr>";
- }
- html+="</table>";
- return html;
- };
- function CInfoPanel_getSize(){
- return this.m_size;
- };
- function CInfoPanel_setSize(size){
- this.m_size=size;
- };
- function CInfoPanel_hide(){
- this.m_bVisible=false;
- };
- function CInfoPanel_show(){
- this.m_bVisible=true;
- };
- function CInfoPanel_isVisible(){
- return this.m_bVisible;
- };
- function CInfoPanel_isEnabled(){
- return true;
- };
- function CInfoPanel_onkeydown(evt){
- var _24e=null;
- if(typeof this.infoPanel!="undefined"){
- _24e=this.infoPanel;
- }else{
- if(this instanceof CInfoPanel){
- _24e=this;
- }
- }
- if(_24e==null||!(_24e instanceof CInfoPanel)){
- return;
- }
- return CMenuEntry_onkeydown.call(_24e,evt);
- };
- function CInfoPanel_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- var _250=null;
- if(typeof this.infoPanel!="undefined"){
- _250=this.infoPanel;
- }else{
- if(this instanceof CInfoPanel){
- _250=this;
- }
- }
- if(_250!=null&&_250 instanceof CInfoPanel){
- return CMenuEntry_onkeypress.call(_250,evt);
- }
- };
- function CInfoPanel_setFocus(){
- if(this.getId()){
- document.getElementById(this.getId()).focus();
- }
- };
- function CInfoPanel_attachEvents(){
- if(typeof this.getParent().getHTMLContainer!="function"){
- return;
- }
- var _251=this.getParent().getHTMLContainer();
- if(_251==null){
- return;
- }
- var _252=eval(_251.document?_251.document.getElementById(this.getId()):_251.ownerDocument.getElementById(this.getId()));
- if(_252==null){
- return;
- }
- _252.onkeypress=this.onkeypress;
- _252.onkeydown=this.onkeydown;
- _252.infoPanel=eval(this);
- };
- CInfoPanel.prototype.draw=CInfoPanel_draw;
- CInfoPanel.prototype.onkeypress=CInfoPanel_onkeypress;
- CInfoPanel.prototype.onkeydown=CInfoPanel_onkeydown;
- CInfoPanel.prototype.addProperty=CInfoPanel_addProperty;
- CInfoPanel.prototype.addCheckedProperty=CInfoPanel_addCheckedProperty;
- CInfoPanel.prototype.addSpacer=CInfoPanel_addSpacer;
- CInfoPanel.prototype.setSize=CInfoPanel_setSize;
- CInfoPanel.prototype.getSize=CInfoPanel_getSize;
- CInfoPanel.prototype.isVisible=CInfoPanel_isVisible;
- CInfoPanel.prototype.show=CInfoPanel_show;
- CInfoPanel.prototype.hide=CInfoPanel_hide;
- CInfoPanel.prototype.isEnabled=CInfoPanel_isEnabled;
- CInfoPanel.prototype.setFocus=CInfoPanel_setFocus;
- CInfoPanel.prototype.attachEvents=CInfoPanel_attachEvents;
- var g_ownerDocument=null;
- function CMenu(id,_254,_255){
- this.m_htmlContainer=document.body;
- this.m_bVisible=false;
- this.m_id=id;
- this.m_htmlDivElement=null;
- this.m_parent=null;
- this.m_menuItems=[];
- this.m_style=_254;
- this.m_callback=null;
- this.m_observers=new CObserver(this);
- this.m_bForceCallback=false;
- this.m_loadingMenuItem=false;
- this.m_oCV=null;
- if(typeof _255!="undefined"&&_255!=""){
- this.m_webContentRoot=_255;
- }else{
- this.m_webContentRoot="..";
- }
- };
- function CMenu_setHTMLContainer(_256){
- this.m_htmlContainer=_256;
- g_ownerDocument=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument;
- };
- function CMenu_getHTMLContainer(){
- return this.m_htmlContainer;
- };
- function CMenu_setParent(_257){
- this.m_parent=_257;
- };
- function CMenu_getParent(){
- return this.m_parent;
- };
- function CMenu_getId(){
- return this.m_id;
- };
- function CMenu_getHTMLDiv(){
- return this.m_htmlDivElement;
- };
- function CMenu_create(){
- var _258=this.m_htmlContainer.document?this.m_htmlContainer.document.createElement("div"):this.m_htmlContainer.ownerDocument.createElement("div");
- if(typeof this.getStyle()=="object"){
- _258.className=this.getStyle().getNormalState();
- }
- _258.style.display="none";
- _258.style.visibility="hidden";
- _258.style.position="absolute";
- _258.style.left="0px";
- _258.style.top="0px";
- _258.id=this.m_id;
- _258.setAttribute("role","region");
- if(window.RV_RES){
- _258.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_DYNAMIC_MENU);
- }
- this.m_htmlContainer.appendChild(_258);
- this.m_htmlDivElement=_258;
- };
- function CMenu_setAltText(_259){
- this.m_altText=_259;
- };
- function CMenu_getAltText(){
- if(this.m_altText){
- return this.m_altText;
- }else{
- return "";
- }
- };
- function CMenu_genARIATags(){
- var html=" role=\"menu\"";
- if(this.getAltText()&&this.getAltText().length>0){
- html+=" aria-labelledby=\""+this.m_id+"label\" ";
- }else{
- if(window.RV_RES){
- html+=" aria-label=\""+RV_RES.IDS_JS_A11Y_DYNAMIC_MENU+"\" ";
- }
- }
- return html;
- };
- function CMenu_genMenuAltText(){
- var html="";
- if(this.getAltText()&&this.getAltText().length>0){
- html+="<tr><td><div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.m_id+"label\">"+this.getAltText()+"</div></td></tr>";
- }
- return html;
- };
- function CMenu_draw(){
- if(this.m_htmlContainer==null){
- return;
- }
- if(this.m_htmlDivElement==null){
- this.create();
- }
- var html="";
- if(this.m_menuItems.length==0||this.m_bForceCallback==true){
- this.setForceCallback(false);
- if(this.m_callback!=null){
- this.setLoadingMenuItem(true);
- var menu=this;
- var _25e=function(){
- if(menu&&menu.executeCallback){
- menu.executeCallback();
- }
- };
- setTimeout(_25e,1000);
- html="<table class=\"menuItem_normal\" CELLPADDING=\"0\" CELLSPACING=\"0\" tabindex=\"0\" hidefocus=\"true\"";
- html+=this.genARIATags();
- html+=">";
- html+=this.genMenuAltText();
- html+="<tr>";
- var _25f="";
- if(this.m_oCV&&RV_RES.GOTO_LOADING){
- _25f=RV_RES.GOTO_LOADING;
- }else{
- if(typeof gUIFrameWorkMenuLoadingMessage!="undefined"){
- _25f=gUIFrameWorkMenuLoadingMessage;
- }else{
- _25f="...";
- }
- }
- html+="<td>";
- html+="<img style=\"vertical-align:middle;\" alt=\""+_25f+"\" width=\"16\" height=\"16\" src=\""+this.m_webContentRoot+"/common/images/tv_loading.gif\"/>";
- html+="</td>";
- html+="<td nowrap=\"nowrap\" align=\"left\">";
- html+=_25f;
- html+="</td>";
- html+="</tr>";
- html+="</table>";
- }
- }else{
- this.setLoadingMenuItem(false);
- var i=0;
- html="<table CELLPADDING=\"0\" CELLSPACING=\"0\" tabindex=\"0\" style=\"outline: none;\" hidefocus=\"true\"";
- html+=this.genARIATags();
- html+=">";
- html+=this.genMenuAltText();
- var _261=false;
- for(i=0;i<this.m_menuItems.length;i++){
- if(this.m_menuItems[i].isVisible()){
- _261=true;
- html+="<tr><td>";
- html+=this.m_menuItems[i].draw();
- html+="</td></tr>";
- }
- }
- if(!_261){
- this.remove();
- return;
- }
- html+="</table>";
- }
- try{
- this.m_htmlDivElement.innerHTML=html;
- this.attachEvents();
- }
- catch(e){
- }
- this.updateCoords();
- var _262="uiFrameworkHiddenIframe"+this.m_id;
- var _263=((!isIE())&&(document.getElementById))?true:false;
- setTimeout("updateIframeCoords(\""+_262+"\", \""+this.m_htmlDivElement.id+"\", "+_263+")",50);
- if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["cv.responseFormat"])&&(gCognosViewer.envParams["cv.responseFormat"]=="fragment")){
- AdjustPortalFont(this.m_htmlDivElement);
- }
- };
- function CMenu_setLoadingMenuItem(_264){
- this.m_loadingMenuItem=_264;
- };
- function CMenu_getLoadingMenuItem(){
- return this.m_loadingMenuItem;
- };
- function CMenu_getScrollingPosition(){
- var _265={"x":0,"y":0};
- if(typeof window.pageYOffset!="undefined"){
- _265={"x":window.pageXOffset,"y":window.pageYOffset};
- }else{
- if((typeof document.documentElement.scrollTop!="undefined")&&(document.documentElement.scrollTop>0||typeof document.body.scrollTop=="undefined"||document.body.scrollTop==document.documentElement.scrollTop)){
- _265={"x":document.documentElement.scrollLeft,"y":document.documentElement.scrollTop};
- }else{
- if(typeof document.body.scrollTop!="undefined"){
- _265={"x":document.body.scrollLeft,"y":document.body.scrollTop};
- }
- }
- }
- return _265;
- };
- function AdjustPortalFont(div){
- var _267=fragments;
- if(_267){
- div.className+=" PortalFontFix";
- var _268=null;
- for(var frag in _267){
- if(frag.indexOf("rvCanvas")>-1){
- _268=$(_267[frag].div);
- if(_268!=null){
- break;
- }
- }
- }
- if(_268!=null){
- div.style.fontSize=xGetComputedStyle(_268,"font-size");
- }
- }
- };
- function CMenu_updateCoords(){
- var _26a=this.getParent();
- var mnu=this.m_htmlDivElement;
- if(mnu!=null){
- var _26c=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument;
- var _26d=mnu.style.visibility;
- var _26e=mnu.style.display;
- mnu.style.visibility="hidden";
- mnu.style.display="block";
- if(mnu.firstChild!=null){
- mnu.style.width=mnu.firstChild.offsetWidth;
- }
- var x=0,y=0;
- var db=mnu.parentNode;
- var _272=db.clientWidth;
- var _273=db.clientHeight;
- var _274=CMenu_getScrollingPosition();
- var _275=_274.x;
- var _276=_274.y;
- if(_26a==null){
- x=mnu.style.left;
- y=mnu.style.top;
- if(x.substr(x.length-2,2)=="px"){
- x=parseInt(x.substring(0,x.length-2),10);
- y=parseInt(y.substring(0,y.length-2),10);
- }
- if(y+mnu.offsetHeight>=(_273)){
- if(y-mnu.offsetHeight>0){
- y=y+_276-mnu.offsetHeight;
- }else{
- y=Math.max(_273-mnu.offsetHeight,0);
- }
- }else{
- y=y+_276;
- }
- if(x+mnu.offsetWidth>=(_272)){
- if(x-mnu.offsetWidth>0){
- x=x+_275-mnu.offsetWidth;
- }else{
- x=Math.max(_272-mnu.offsetWidth,0);
- }
- }else{
- x=x+_275;
- }
- }else{
- if(!(_26a instanceof CToolbarButton)&&!(_26a instanceof CMenuItem)){
- return;
- }
- if(typeof _26a.getMenuType!="function"){
- return;
- }
- var _277=_26c.getElementById(this.getParent().getId());
- var _278=_26c.getElementById("menu"+this.getParent().getId());
- if(_277==null){
- return;
- }
- var _279=_277;
- if(_26a.getMenuType()=="dropDown"){
- x=0;
- y=_277.offsetHeight;
- while(_279!=null){
- x+=_279.offsetLeft;
- y+=_279.offsetTop;
- _279=_279.offsetParent;
- }
- if(getViewerDirection()=="rtl"){
- var _27a=x-(mnu.offsetWidth-_277.offsetWidth);
- if(_27a>_275){
- x=_27a;
- }
- }
- if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["cv.responseFormat"])&&(gCognosViewer.envParams["cv.responseFormat"]=="fragment")){
- var _27b=_277;
- while((_27b!=document.body)&&(_27b=_27b.parentNode)){
- x-=_27b.scrollLeft||0;
- y-=_27b.scrolltop||0;
- }
- }
- if((x+mnu.offsetWidth)>(_272+_275)){
- x=x+_277.offsetWidth-mnu.offsetWidth;
- if(_278!=null){
- x=x+_278.offsetWidth;
- }
- }
- if(((y+mnu.offsetHeight)>(_273+_276))&&(y-(mnu.offsetHeight+_277.clientHeight)>=0)){
- y-=(mnu.offsetHeight+_277.clientHeight);
- }
- }else{
- if(_26a.getMenuType()=="cascaded"){
- x=_277.offsetWidth;
- while(_279!=null){
- x+=_279.offsetLeft;
- y+=_279.offsetTop;
- _279=_279.offsetParent;
- }
- if(getViewerDirection()=="rtl"){
- var _27a=x-(mnu.offsetWidth+_277.offsetWidth);
- if(_27a>_275){
- x=_27a;
- }
- }
- if((x+mnu.offsetWidth)>(_272+_275)){
- x-=(_277.offsetWidth+mnu.offsetWidth);
- }
- if((y+mnu.offsetHeight)>(_273+_276)){
- y-=(mnu.offsetHeight-_277.clientHeight);
- }
- }
- }
- }
- mnu.style.visibility=_26d;
- mnu.style.display=_26e;
- this.setXCoord(x);
- this.setYCoord(y);
- this.setZIndex(500);
- }
- };
- function CMenu_add(_27c){
- if(typeof _27c.getObservers=="function"&&typeof _27c.getObservers()=="object"){
- _27c.getObservers().attach(this,this.closeSubMenus,_27c.onmouseover);
- _27c.getObservers().attach(this,this.closeAllMenus,_27c.onmouseup);
- _27c.getObservers().attach(this,this.closeSubMenus,_27c.onfocus);
- _27c.getObservers().attach(this,this.closeAllMenus,_27c.onkeypress);
- }
- this.m_menuItems[this.m_menuItems.length]=_27c;
- };
- function CMenu_get(_27d){
- if(_27d>=0&&_27d<this.getNumItems()){
- return this.m_menuItems[_27d];
- }
- return null;
- };
- CMenu.prototype.getItem=function(_27e){
- var sId=_27e;
- if(this.m_oCV){
- sId=this.m_oCV.getId()+_27e;
- }
- for(var _280=0;_280<this.getNumItems();_280++){
- var _281=this.get(_280);
- if(typeof _281.getId=="function"&&_281.getId()==sId){
- return _281;
- }
- }
- };
- function CMenu_getNumItems(){
- return this.m_menuItems.length;
- };
- function CMenu_hide(){
- this.hideHiddenIframe();
- if(this.m_htmlDivElement!=null){
- this.m_htmlDivElement.style.visibility="hidden";
- }
- this.m_bVisible=false;
- var _282=this.getParent();
- if(_282!=null&&typeof _282.setFocus=="function"){
- _282.setFocus();
- }else{
- if(_282!=null&&typeof _282.focus=="function"){
- _282.focus();
- }else{
- if(typeof this.m_focusCell=="object"&&typeof this.m_focusCell.focus=="function"){
- this.m_focusCell.focus();
- }
- }
- }
- };
- function CMenu_setFocus(){
- try{
- var _283=null;
- for(var _284=0;_284<this.getNumItems()&&!_283;_284++){
- var _285=this.get(_284);
- if(_285.isVisible&&_285.isVisible()){
- _283=_285;
- }
- }
- if(!_283||!_283.setFocus()){
- this.m_htmlDivElement.childNodes[0].focus();
- }
- }
- catch(e){
- }
- };
- function CMenu_show(){
- if(this.m_htmlDivElement!=null){
- this.m_bVisible=true;
- this.updateCoords();
- var _286=((!isIE())&&(document.getElementById))?true:false;
- var _287="uiFrameworkHiddenIframe"+this.m_id;
- var _288=this.m_htmlContainer.document?this.m_htmlContainer.document.getElementById(_287):this.m_htmlContainer.ownerDocument.getElementById(_287);
- if(_288==null){
- _288=this.createHiddenIFrame(_287);
- }
- if(_288){
- _288.style.display="block";
- _288.style.left="0px";
- _288.style.top="0px";
- updateIframeCoords(_287,this.m_htmlDivElement.id,_286);
- setTimeout("updateIframeCoords(\""+_287+"\", \""+this.m_htmlDivElement.id+"\", "+_286+")",50);
- }
- this.m_htmlDivElement.style.display="block";
- this.m_htmlDivElement.style.visibility="visible";
- this.setFocus();
- if(!window.isIOS()){
- var _289=this;
- if(window.attachEvent){
- window.attachEvent("onresize",function(){
- _289.remove();
- });
- window.attachEvent("onscroll",function(){
- _289.remove();
- });
- }else{
- window.addEventListener("resize",function(){
- _289.remove();
- },false);
- window.addEventListener("scroll",function(){
- _289.remove();
- },false);
- }
- var _28a=null;
- if(this.m_oCV!=null){
- _28a=document.getElementById(this.m_oCV.getId()+"content");
- }
- if(_28a){
- if(_28a.parentNode.parentNode.attachEvent){
- _28a.parentNode.parentNode.attachEvent("onscroll",function(){
- _289.remove();
- });
- }else{
- _28a.parentNode.parentNode.addEventListener("scroll",function(){
- _289.remove();
- },false);
- }
- }
- }
- }
- };
- function CMenu_createHiddenIFrame(_28b){
- var _28c=this.getHTMLContainer();
- var _28d=_28c.document?_28c.document.createElement("iframe"):_28c.ownerDocument.createElement("iframe");
- _28d.setAttribute("id",_28b);
- _28d.setAttribute("src",this.m_webContentRoot+"/common/images/spacer.gif");
- _28d.setAttribute("scrolling","no");
- _28d.setAttribute("frameborder","0");
- _28d.style.position="absolute";
- _28d.style.minWidth="0px";
- _28d.style.minHeight="0px";
- _28d.style.left="0px";
- _28d.style.top="0px";
- _28d.style.zIndex=499;
- _28d.style.display="none";
- _28d.setAttribute("title","Empty frame");
- _28d.setAttribute("role","presentation");
- _28c.appendChild(_28d);
- return _28d;
- };
- function CMenu_isVisible(){
- return this.m_bVisible;
- };
- function CMenu_remove(){
- this.removeHiddenIframe();
- for(var i=0;i<this.getNumItems();++i){
- var _28f=this.get(i);
- if(typeof _28f.getMenu=="function"&&_28f.getMenu()!=null){
- _28f.getMenu().remove();
- }
- }
- if(this.m_htmlContainer!=null&&this.m_htmlDivElement!=null){
- this.m_htmlContainer.removeChild(this.m_htmlDivElement);
- }
- this.m_htmlDivElement=null;
- this.m_bVisible=false;
- };
- function CMenu_removeHiddenIframe(){
- try{
- if(g_ownerDocument){
- var _290=g_ownerDocument.getElementById("uiFrameworkHiddenIframe"+this.m_id);
- if(_290!=null){
- _290.style.display="none";
- if(_290.parentNode&&_290.parentNode.removeChild){
- _290.parentNode.removeChild(_290);
- }
- }
- }
- }
- catch(e){
- }
- };
- function CMenu_hideHiddenIframe(){
- try{
- if(g_ownerDocument){
- var _291=g_ownerDocument.getElementById("uiFrameworkHiddenIframe"+this.m_id);
- if(_291){
- _291.style.display="none";
- }
- }
- }
- catch(e){
- }
- };
- function CMenu_enable(){
- };
- function CMenu_disable(){
- };
- function CMenu_getState(){
- };
- function CMenu_clear(){
- if(this.m_htmlDivElement!=null){
- this.m_htmlDivElement.innerHTML="";
- }
- this.m_menuItems.splice(0,this.m_menuItems.length);
- };
- function CMenu_attachEvents(){
- for(var i=0;i<this.m_menuItems.length;i++){
- if(typeof this.m_menuItems[i].attachEvents=="function"){
- this.m_menuItems[i].attachEvents();
- }
- }
- this.m_htmlDivElement.onkeypress=this.onkeypress;
- this.m_htmlDivElement.tbMenu=eval(this);
- };
- function CMenu_closeSubMenus(_293){
- for(var i=0;i<this.m_menuItems.length;i++){
- var _295=this.m_menuItems[i];
- var _296=_293.getSubject();
- if(_295!=_296&&typeof _295.getMenu=="function"&&_295.getMenu()!=null&&_295.getMenu().isVisible()){
- _295.getMenu().remove();
- }
- }
- };
- function CMenu_closeAllMenus(_297){
- var _298=this;
- var _299=null;
- while(_298){
- if(_298 instanceof CMenu){
- _299=_298;
- }
- _298=_298.getParent();
- }
- if(_299!=null){
- _299.remove();
- }
- };
- function CMenu_setStyle(_29a){
- this.m_style=_29a;
- };
- function CMenu_getStyle(){
- return this.m_style;
- };
- function CMenu_setXCoord(x){
- var _29c=this.getHTMLDiv();
- if(_29c!=null){
- _29c.style.left=x+"px";
- }
- };
- function CMenu_setYCoord(y){
- var _29e=this.getHTMLDiv();
- if(_29e!=null){
- _29e.style.top=y+"px";
- }
- };
- function CMenu_setZIndex(_29f){
- var _2a0=this.getHTMLDiv();
- if(_2a0!=null){
- _2a0.style.zIndex=_29f;
- }
- };
- function CMenu_registerCallback(_2a1){
- this.m_callback=_2a1;
- };
- function CMenu_executeCallback(){
- if(typeof this.m_callback=="function"){
- this.m_callback();
- }else{
- if(typeof this.m_callback=="string"){
- eval(this.m_callback);
- }
- }
- };
- function CMenu_getObservers(){
- return this.m_observers;
- };
- function CMenu_onmouseover(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseover=="function"){
- this.getParent().onmouseover(evt);
- }
- this.getObservers().notify(CMenu_onmouseover);
- };
- function CMenu_onmouseout(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseout=="function"){
- this.getParent().onmouseout(evt);
- }
- this.getObservers().notify(CMenu_onmouseout);
- };
- function CMenu_onmouseup(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseup=="function"){
- this.getParent().onmouseup(evt);
- }
- this.getObservers().notify(CMenu_onmouseup);
- };
- function CMenu_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- var menu=this.tbMenu;
- if(typeof menu=="object"){
- if(evt.keyCode==40){
- var _2a7=false;
- for(var i=0;i<menu.m_menuItems.length;i++){
- var _2a9=menu.m_menuItems[i];
- if(typeof _2a9.isVisible=="function"&&_2a9.isVisible()&&typeof _2a9.setFocus=="function"){
- _2a9.setFocus();
- _2a7=true;
- break;
- }
- }
- if(!_2a7){
- menu.hide();
- }
- }
- if(evt.keyCode==38){
- menu.hide();
- }
- }
- if(typeof this.getParent=="function"&&this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
- this.getParent().onkeypress(evt);
- }
- if(typeof this.getObservers=="function"){
- this.getObservers().notify(CMenu_onkeypress);
- }
- };
- function CMenu_getForceCallback(){
- return this.m_bForceCallback;
- };
- function CMenu_setForceCallback(_2aa){
- this.m_bForceCallback=_2aa;
- };
- CMenu.prototype.draw=CMenu_draw;
- CMenu.prototype.updateCoords=CMenu_updateCoords;
- CMenu.prototype.add=CMenu_add;
- CMenu.prototype.get=CMenu_get;
- CMenu.prototype.getNumItems=CMenu_getNumItems;
- CMenu.prototype.hide=CMenu_hide;
- CMenu.prototype.hideHiddenIframe=CMenu_hideHiddenIframe;
- CMenu.prototype.removeHiddenIframe=CMenu_removeHiddenIframe;
- CMenu.prototype.show=CMenu_show;
- CMenu.prototype.enable=CMenu_enable;
- CMenu.prototype.disable=CMenu_disable;
- CMenu.prototype.getState=CMenu_getState;
- CMenu.prototype.clear=CMenu_clear;
- CMenu.prototype.attachEvents=CMenu_attachEvents;
- CMenu.prototype.setParent=CMenu_setParent;
- CMenu.prototype.getParent=CMenu_getParent;
- CMenu.prototype.getHTMLContainer=CMenu_getHTMLContainer;
- CMenu.prototype.setHTMLContainer=CMenu_setHTMLContainer;
- CMenu.prototype.getHTMLDiv=CMenu_getHTMLDiv;
- CMenu.prototype.create=CMenu_create;
- CMenu.prototype.remove=CMenu_remove;
- CMenu.prototype.getId=CMenu_getId;
- CMenu.prototype.isVisible=CMenu_isVisible;
- CMenu.prototype.setStyle=CMenu_setStyle;
- CMenu.prototype.getStyle=CMenu_getStyle;
- CMenu.prototype.closeSubMenus=CMenu_closeSubMenus;
- CMenu.prototype.closeAllMenus=CMenu_closeAllMenus;
- CMenu.prototype.setXCoord=CMenu_setXCoord;
- CMenu.prototype.setYCoord=CMenu_setYCoord;
- CMenu.prototype.setZIndex=CMenu_setZIndex;
- CMenu.prototype.update=new Function("return true");
- CMenu.prototype.registerCallback=CMenu_registerCallback;
- CMenu.prototype.executeCallback=CMenu_executeCallback;
- CMenu.prototype.getObservers=CMenu_getObservers;
- CMenu.prototype.onmouseover=CMenu_onmouseover;
- CMenu.prototype.onmouseout=CMenu_onmouseout;
- CMenu.prototype.onmouseup=CMenu_onmouseup;
- CMenu.prototype.onkeypress=CMenu_onkeypress;
- CMenu.prototype.createHiddenIFrame=CMenu_createHiddenIFrame;
- CMenu.prototype.setForceCallback=CMenu_setForceCallback;
- CMenu.prototype.getForceCallback=CMenu_getForceCallback;
- CMenu.prototype.setFocus=CMenu_setFocus;
- CMenu.prototype.genARIATags=CMenu_genARIATags;
- CMenu.prototype.setAltText=CMenu_setAltText;
- CMenu.prototype.getAltText=CMenu_getAltText;
- CMenu.prototype.genMenuAltText=CMenu_genMenuAltText;
- CMenu.prototype.setLoadingMenuItem=CMenu_setLoadingMenuItem;
- CMenu.prototype.getLoadingMenuItem=CMenu_getLoadingMenuItem;
- function updateIframeCoords(id,_2ac,_2ad){
- if(g_ownerDocument==null){
- return;
- }
- var _2ae=g_ownerDocument.getElementById(_2ac);
- var _2af=g_ownerDocument.getElementById(id);
- if(_2af&&_2ae){
- if(_2ad==true){
- _2af.style.left=_2ae.offsetLeft+"px";
- _2af.style.top=_2ae.offsetTop+"px";
- _2af.style.width=_2ae.offsetWidth+"px";
- _2af.style.height=_2ae.offsetHeight+"px";
- }else{
- _2af.style.pixelLeft=_2ae.offsetLeft;
- _2af.style.pixelTop=_2ae.offsetTop;
- _2af.style.pixelWidth=_2ae.offsetWidth;
- _2af.style.pixelHeight=_2ae.offsetHeight;
- }
- }
- };
- function CIcon(_2b0,_2b1,_2b2){
- this.m_iconPath=_2b0;
- this.m_toolTip=_2b1;
- this.m_enabled=true;
- this.m_height=16;
- this.m_width=16;
- if(typeof _2b2!="undefined"&&_2b2!=""){
- this.m_webContentRoot=_2b2;
- }else{
- this.m_webContentRoot="..";
- }
- };
- function CIcon_draw(){
- var html="";
- html+="<img style=\"vertical-align:middle;\" src=\"";
- if(typeof this.m_iconPath!="undefined"&&this.m_iconPath!==""&&this.m_iconPath!="blankIcon"){
- if(this.m_enabled==true){
- html+=this.m_iconPath;
- }else{
- html+=this.getDisabledImagePath();
- }
- html+="\" title=\"";
- if(typeof this.m_toolTip=="string"&&this.m_toolTip.length>0){
- html+=this.m_toolTip;
- }
- html+="\" alt=\"";
- if(typeof this.m_toolTip=="string"&&this.m_toolTip.length>0){
- html+=this.m_toolTip;
- }
- html+="\" width=\"";
- html+=this.m_width;
- html+="\" height=\"";
- html+=this.m_height;
- html+="\"/>";
- }else{
- html+=this.m_webContentRoot+"/common/images/spacer.gif";
- html+="\" alt=\"\"";
- if(this.m_iconPath=="blankIcon"){
- html+=" width=\"";
- html+=this.m_width;
- html+="\" height=\"";
- html+=this.m_height;
- html+="\"/>";
- }else{
- html+=" width=\"1\" height=\"1\"/>";
- }
- }
- return html;
- };
- function CIcon_getDisabledImagePath(){
- var _2b4=this.m_iconPath.split("/");
- var _2b5="";
- for(var i=0;i<(_2b4.length-1);++i){
- _2b5+=_2b4[i]+"/";
- }
- _2b5+="dis_"+_2b4[_2b4.length-1];
- return _2b5;
- };
- function CIcon_getPath(){
- return this.m_iconPath;
- };
- function CIcon_setPath(path){
- this.m_iconPath=path;
- };
- function CIcon_getToolTip(){
- return this.m_toolTip;
- };
- function CIcon_setToolTip(_2b8){
- this.m_toolTip=_2b8;
- };
- function CIcon_enable(){
- this.m_enabled=true;
- };
- function CIcon_disable(){
- this.m_enabled=false;
- };
- function CIcon_isEnabled(){
- return this.m_enabled;
- };
- function CIcon_setHeight(_2b9){
- this.m_height=_2b9;
- };
- function CIcon_getHeight(){
- return this.m_height;
- };
- function CIcon_setWidth(_2ba){
- this.m_width=_2ba;
- };
- function CIcon_getWidth(){
- return this.m_width;
- };
- CIcon.prototype.draw=CIcon_draw;
- CIcon.prototype.enable=CIcon_enable;
- CIcon.prototype.disable=CIcon_disable;
- CIcon.prototype.isEnabled=CIcon_isEnabled;
- CIcon.prototype.getDisabledImagePath=CIcon_getDisabledImagePath;
- CIcon.prototype.getPath=CIcon_getPath;
- CIcon.prototype.setPath=CIcon_setPath;
- CIcon.prototype.setHeight=CIcon_setHeight;
- CIcon.prototype.getHeight=CIcon_getHeight;
- CIcon.prototype.setWidth=CIcon_setWidth;
- CIcon.prototype.getWidth=CIcon_getWidth;
- CIcon.prototype.getToolTip=CIcon_getToolTip;
- CIcon.prototype.setToolTip=CIcon_setToolTip;
- var cHorizonalBar=0;
- var cVerticalBar=1;
- function CBar(_2bb,_2bc,sId,_2be,_2bf,_2c0,_2c1,_2c2){
- this.m_align="left";
- this.m_items=[];
- this.m_htmlContainerId=_2bb;
- this.m_htmlContainer=null;
- this.m_id="cbar"+_2bb;
- this.m_menuType=cVerticalBar;
- this.m_style=_2bc;
- this.m_parent=null;
- this.m_observers=new CObserver(this);
- this.m_cookieVar=_2c1;
- this.m_cookieName=_2c2;
- this.m_sId=(sId)?sId:null;
- this.m_display=DISPLAY_INLINE;
- this.m_imagePath=(_2be)?_2be:"../common/images/toolbar/";
- this.m_imgCollapseSrc=this.m_imagePath+"toolbar_collapse.gif";
- this.m_imgExpandSrc=this.m_imagePath+"toolbar_expand.gif";
- this.m_showTooltip=_2bf?_2bf:null;
- this.m_hideTooltip=_2c0?_2c0:null;
- };
- function CBar_hideBar(){
- var bar=document.getElementById("bar"+this.m_id);
- var _2c4=document.getElementById("barIcon"+this.m_id);
- if(_2c4){
- _2c4.src=this.m_imgExpandSrc;
- if(this.m_showTooltip!=null){
- _2c4.alt=this.m_showTooltip;
- _2c4.title=this.m_showTooltip;
- }
- }
- if(bar){
- bar.style.display=DISPLAY_NONE;
- if(typeof setQSCookie=="function"){
- setQSCookie(this.m_cookieVar,this.m_cookieName,0);
- }
- }
- };
- function CBar_showBar(){
- var bar=document.getElementById("bar"+this.m_id);
- var _2c6=document.getElementById("barIcon"+this.m_id);
- if(_2c6){
- _2c6.src=this.m_imgCollapseSrc;
- if(this.m_hideTooltip!=null){
- _2c6.alt=this.m_hideTooltip;
- _2c6.title=this.m_hideTooltip;
- }
- }
- if(bar){
- bar.style.display=this.m_display;
- if(typeof setQSCookie=="function"){
- setQSCookie(this.m_cookieVar,this.m_cookieName,1);
- }
- }
- };
- function CBar_toggleBar(){
- var bar=document.getElementById("bar"+this.m_id);
- var _2c8=bar.style.display;
- if((_2c8==this.m_display)||(_2c8=="")){
- this.hideBar();
- }else{
- this.showBar();
- }
- };
- function CBar_getParent(){
- return this.m_parent;
- };
- function CBar_setParent(_2c9){
- this.m_parent=_2c9;
- };
- function CBar_draw(){
- if(this.m_htmlContainer==null){
- this.m_htmlContainer=document.getElementById(this.m_htmlContainerId);
- if(this.m_htmlContainer==null){
- return;
- }
- }
- var html="";
- html+="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"";
- if(this.m_sId!=null){
- html+="style=\"display: inline;\"><tr>";
- html+="<td"+(isFF()?" style=\"vertical-align:bottom\"":"")+" style=\"height:26px\"><img id=\"barIcon"+this.m_id+"\" border=\"0\" src=\""+this.m_imgCollapseSrc+"\"";
- if(this.m_hideTooltip!=null){
- html+=" alt=\""+this.m_hideTooltip+"\" title=\""+this.m_hideTooltip+"\"";
- }
- html+=" onclick=\""+this.m_sId+".toggleBar();\" style=\"cursor:pointer;cursor:hand;\"></td>";
- }else{
- var _2cb="";
- if(this.m_htmlContainer.style.textAlign=="right"){
- _2cb="margin-left:auto; margin-right: 0;";
- }else{
- if(this.m_htmlContainer.style.textAlign=="left"){
- _2cb="margin-left:0; margin-right: auto;";
- }else{
- if(this.m_htmlContainer.style.textAlign=="center"){
- _2cb="margin-left:auto; margin-right: auto;";
- }
- }
- }
- if(_2cb!=""){
- html+=" style=\""+_2cb+"\"";
- }
- html+="><tr>";
- }
- html+="<td id=\"bar"+this.m_id+"\">";
- html+="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\" class=\"";
- if(this.getStyle()!=null){
- html+=this.getStyle().getNormalState();
- }
- html+="\" id=\"";
- html+=this.m_id;
- html+="\" style=\""+this.m_style+"\"><tr>";
- html+=this.drawItems();
- html+="</tr></table></td>";
- html+="</tr></table>";
- this.m_htmlContainer.innerHTML=html;
- this.m_htmlContainer.style.textAlign=this.m_align;
- for(var i=0;i<this.m_items.length;++i){
- if(typeof this.m_items[i].init=="function"){
- this.m_items[i].init();
- }
- }
- this.attachEvents();
- };
- function CBar_drawItems(){
- var html="";
- for(var i=0;i<this.m_items.length;++i){
- if(typeof this.m_items[i].draw=="function"){
- if(this.m_menuType==cHorizonalBar&&!(this.m_items[i] instanceof CSeperator)){
- html+="<td style=\"white-space:nowrap;";
- if(this.m_items[i] instanceof CMenuItem){
- html+=";padding-left:1px; padding-right: 1px;";
- }
- html+="\">";
- }
- if(this.m_items[i].isVisible()){
- html+=this.m_items[i].draw();
- }
- if(this.m_menuType==cHorizonalBar&&!(this.m_items[i] instanceof CSeperator)){
- html+="</td>";
- }
- }
- }
- return html;
- };
- function CBar_attachEvents(){
- for(var i=0;i<this.m_items.length;++i){
- if(typeof this.m_items[i].attachEvents=="function"&&this.m_items[i].isVisible()){
- this.m_items[i].attachEvents();
- }
- }
- };
- function CBar_add(item){
- if(typeof item.getObservers=="function"&&typeof item.getObservers()=="object"&&typeof item.onmouseover=="function"&&item instanceof CMenuItem){
- item.getObservers().attach(this,this.closeMenus,item.onmouseover);
- }
- this.m_items[this.m_items.length]=item;
- };
- function CBar_getNumItems(){
- return this.m_items.length;
- };
- function CBar_getId(){
- return this.m_id;
- };
- function CBar_get(_2d1){
- if(_2d1>=0&&_2d1<this.getNumItems()){
- return this.m_items[_2d1];
- }
- return null;
- };
- function CBar_hide(_2d2){
- if(_2d2>0&&_2d2<this.getNumItems()){
- if(typeof this.m_items[i].hide=="function"){
- this.m_items[i].hide();
- }
- }
- };
- function CBar_show(_2d3){
- if(_2d3>0&&_2d3<this.getNumItems()){
- if(typeof this.m_items[i].show=="function"){
- this.m_items[i].show();
- }
- }
- };
- function CBar_enable(_2d4){
- if(_2d4>0&&_2d4<this.getNumItems()){
- if(typeof this.m_items[i].enable=="function"){
- this.m_items[i].enable();
- }
- }
- };
- function CBar_disable(_2d5){
- if(_2d5>0&&_2d5<this.getNumItems()){
- if(typeof this.m_items[i].disable=="function"){
- this.m_items[i].disable();
- }
- }
- };
- function CBar_getState(_2d6){
- if(_2d6>0&&_2d6<this.getNumItems()){
- if(typeof this.m_items[i].getState=="function"){
- this.m_items[i].getState();
- }
- }
- };
- function CBar_setMenuType(_2d7){
- this.m_menuType=_2d7;
- };
- function CBar_getMenuType(){
- return this.m_menuType;
- };
- function CBar_setStyle(_2d8){
- this.m_style=_2d8;
- };
- function CBar_setAlign(_2d9){
- this.m_align=_2d9;
- };
- function CBar_getStyle(){
- return this.m_style;
- };
- function CBar_closeMenus(_2da){
- for(var i=0;i<this.getNumItems();i++){
- var _2dc=this.get(i);
- if(typeof _2da=="object"){
- if(_2da.getSubject()==_2dc){
- continue;
- }
- }
- if(typeof _2dc.getMenu=="function"&&_2dc.getMenu()!=null&&_2dc.getMenu().isVisible()){
- _2dc.getMenu().remove();
- }
- }
- };
- function CBar_getHTMLContainer(){
- return this.m_htmlContainer;
- };
- function CBar_getObservers(){
- return this.m_observers;
- };
- function CBar_onmouseover(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseover=="function"){
- this.getParent().onmouseover(evt);
- }
- this.getObservers().notify(CBar_onmouseover);
- };
- function CBar_onmouseout(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseout=="function"){
- this.getParent().onmouseout(evt);
- }
- this.getObservers().notify(CBar_onmouseout);
- };
- function CBar_onmouseup(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onmouseup=="function"){
- this.getParent().onmouseup(evt);
- }
- this.getObservers().notify(CBar_onmouseup);
- };
- function CBar_onkeypress(evt){
- evt=(evt)?evt:((event)?event:null);
- if(this.getParent()!=null&&typeof this.getParent().onkeypress=="function"){
- this.getParent().onkeypress(evt);
- }
- this.getObservers().notify(CBar_onkeypress);
- };
- CBar.prototype.draw=CBar_draw;
- CBar.prototype.add=CBar_add;
- CBar.prototype.get=CBar_get;
- CBar.prototype.hide=CBar_hide;
- CBar.prototype.show=CBar_show;
- CBar.prototype.enable=CBar_enable;
- CBar.prototype.disable=CBar_disable;
- CBar.prototype.getState=CBar_getState;
- CBar.prototype.attachEvents=CBar_attachEvents;
- CBar.prototype.drawItems=CBar_drawItems;
- CBar.prototype.getId=CBar_getId;
- CBar.prototype.setMenuType=CBar_setMenuType;
- CBar.prototype.getMenuType=CBar_getMenuType;
- CBar.prototype.getNumItems=CBar_getNumItems;
- CBar.prototype.setStyle=CBar_setStyle;
- CBar.prototype.getStyle=CBar_getStyle;
- CBar.prototype.setAlign=CBar_setAlign;
- CBar.prototype.closeMenus=CBar_closeMenus;
- CBar.prototype.setParent=CBar_setParent;
- CBar.prototype.getParent=CBar_getParent;
- CBar.prototype.getHTMLContainer=CBar_getHTMLContainer;
- CBar.prototype.getObservers=CBar_getObservers;
- CBar.prototype.update=new Function("return true");
- CBar.prototype.getObservers=CBar_getObservers;
- CBar.prototype.onmouseover=CBar_onmouseover;
- CBar.prototype.onmouseout=CBar_onmouseout;
- CBar.prototype.onmouseup=CBar_onmouseup;
- CBar.prototype.onkeypress=CBar_onkeypress;
- CBar.prototype.hideBar=CBar_hideBar;
- CBar.prototype.showBar=CBar_showBar;
- CBar.prototype.toggleBar=CBar_toggleBar;
- function CStaticText(text,_2e2){
- this.m_text=text;
- this.m_style=_2e2;
- this.m_bVisible=true;
- this.m_sId="";
- };
- CStaticText.prototype.setId=function(sId){
- this.m_sId=sId;
- };
- CStaticText.prototype.getId=function(){
- return this.m_sId;
- };
- CStaticText.prototype.setText=function(text){
- this.m_text=text;
- };
- CStaticText.prototype.setLabelledBy=function(text){
- this.m_labelledBy=text;
- };
- CStaticText.prototype.draw=function(){
- var html="";
- html+="<td style=\"white-space: nowrap;\" class=\"";
- html+=this.m_style.getNormalState()+"\"";
- if(this.getId()!=""){
- html+=" id=\""+this.getId()+"\"";
- }
- html+=">";
- var _2e7=this.m_labelledBy?"aria-labelledby=\""+this.getId()+"label\"":"";
- html+="<div role=\"presentation\" tabIndex=\"0\" "+_2e7+">";
- html+=this.m_text;
- html+="</div>";
- if(this.m_labelledBy){
- html+="<div style=\"position: absolute; overflow: hidden; width: 0; height: 0;\" id=\""+this.getId()+"label\">";
- html+=this.m_labelledBy;
- html+="</div>";
- }
- html+="</td>";
- return html;
- };
- CStaticText.prototype.isVisible=function(){
- return this.m_bVisible;
- };
- CStaticText.prototype.hide=function(){
- this.m_bVisible=false;
- };
- CStaticText.prototype.hide.show=function(){
- this.m_bVisible=true;
- };
- var DISPLAY_INLINE="inline";
- var DISPLAY_NONE="none";
- var DISPLAY_BLOCK="block";
- var __excel_win=null;
- var __pdf_win=null;
- if(window.attachEvent){
- window.attachEvent("onkeydown",viewerMainKeyPress);
- window.attachEvent("onresize",onResizeViewerEvent);
- }else{
- if(window.addEventListener){
- window.addEventListener("keydown",viewerMainKeyPress,false);
- window.addEventListener("resize",onResizeViewerEvent,false);
- }
- }
- function attachLeavingRV(){
- if(window.attachEvent){
- window.attachEvent("onbeforeunload",leavingRV);
- }else{
- if(window.addEventListener){
- window.addEventListener("beforeunload",leavingRV,false);
- }else{
- try{
- var _2e8=window.onunload;
- if(!(""+_2e8).match(/leavingRV/gi)){
- window.oLeavingRV_onunload=window.onunload;
- window.onunload=function(){
- window.oLeavingRV_onunload();
- leavingRV();
- };
- }
- }
- catch(e){
- }
- }
- }
- };
- function detachLeavingRV(){
- if(window.detachEvent){
- window.detachEvent("onbeforeunload",leavingRV);
- }else{
- window.removeEventListener("beforeunload",leavingRV,false);
- }
- };
- window.attachLeavingRV();
- function CContextMenu(_2e9){
- if(_2e9==null){
- return;
- }
- this.m_mainWnd=_2e9;
- this.setCV(this.m_mainWnd.getCV());
- var _2ea=this.m_mainWnd.getCV().getWebContentRoot();
- var _2eb=this.m_mainWnd.getCV().getSkin();
- var _2ec=this.m_mainWnd.getUIHide();
- this.m_contextMenu=new CMenu("rvContextMenu"+this.getCVId(),gMenuStyle,_2ea);
- this.m_contextMenu.m_oCV=this.getCV();
- this.m_downloadChart=new CMenuItem(this.m_contextMenu,RV_RES.RV_DOWNLOAD_CHART,"if(typeof "+getCognosViewerSCObjectRefAsString(this.getCVId())+" != 'undefined') "+getCognosViewerSCObjectRefAsString(this.getCVId())+".downloadSelectedChartImage('"+this.getCVId()+"');",_2ea+"/rv/images/action_chart.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_downloadChart.hide();
- this.m_downloadChartSeperator=new CSeperator("horizontal_line"+this.getCVId(),"1",gMenuSeperatorStyle,_2ea);
- this.m_downloadChartSeperator.hide();
- this.m_contextMenu.add(this.m_downloadChartSeperator);
- var _2ed=this.getCV().getDrillMgr();
- if(_2ed){
- if(typeof RV_RES.RV_DRILL_DOWN!="undefined"){
- this.m_drillDown=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_DOWN,this.getCVObjectRef()+".getDrillMgr().rvDrillDown();",_2ea+"/rv/images/action_drill_down.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_drillDown.disable();
- }
- if(typeof RV_RES.RV_DRILL_UP!="undefined"){
- this.m_drillUp=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_UP,this.getCVObjectRef()+".getDrillMgr().rvDrillUp();",_2ea+"/rv/images/action_drill_up.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_drillUp.disable();
- }
- if(this.getCV().isInteractiveViewer()&&this.getCV().getAdvancedServerProperty("VIEWER_JS_ENABLE_EXPAND_COLLAPSE")=="true"){
- this.m_contextMenu.add(gMenuSeperator);
- if(typeof RV_RES.IDS_JS_EXPAND_MEMBER!="undefined"){
- this.m_expand=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_EXPAND_MEMBER,this.getCVObjectRef()+".expand();","",gMenuItemStyle,_2ea,_2eb);
- this.m_expand.disable();
- }
- if(typeof RV_RES.IDS_JS_COLLAPSE_MEMBER!="undefined"){
- this.m_collapse=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_COLLAPSE_MEMBER,this.getCVObjectRef()+".collapse();","",gMenuItemStyle,_2ea,_2eb);
- this.m_collapse.disable();
- }
- }
- if((!this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]!="view")&&typeof RV_RES.IDS_JS_FREEZECOLUMNHEADINGS!=="undefined"&&typeof RV_RES.IDS_JS_FREEZEROWHEADINGS!=="undefined"){
- this.m_freezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_unfreezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_freezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_unfreezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_freezeColumnHeadings.hide();
- this.m_unfreezeColumnHeadings.hide();
- this.m_freezeRowHeadings.hide();
- this.m_unfreezeRowHeadings.hide();
- }
- if(typeof RV_RES.RV_GO_TO!="undefined"){
- if(_2ec.indexOf(" RV_CONTEXT_MENU_GOTO ")==-1){
- if(_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")==-1||!_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")==-1){
- this.m_contextMenu.add(gMenuSeperator);
- }
- }
- this.m_goto=new CMenuItem(this.m_contextMenu,RV_RES.RV_GO_TO,this.getCVObjectRef()+".getDrillMgr().launchGoToPage(null,true);",_2ea+"/rv/images/action_go_to.gif",gMenuItemStyle,_2ea,_2eb);
- var _2ee=this.m_goto.createCascadedMenu(gMenuStyle);
- _2ee.m_oCV=this.getCV();
- if(this.getCV().envParams["cv.containerApp"]=="AA"){
- _2ee.registerCallback(this.getCVObjectRef()+".m_viewerFragment.raiseGotoContextMenuEvent()");
- }else{
- _2ee.registerCallback(this.getCVObjectRef()+".getDrillMgr().getDrillThroughParameters()");
- }
- }
- }
- var _2ef=this.getCV().getSubscriptionManager();
- if(_2ef&&this.getCV().bCanUseCognosViewerConditionalSubscriptions){
- this.m_subscriptionSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle,_2ea);
- this.m_subscriptionSeperator.hide();
- this.m_contextMenu.add(this.m_subscriptionSeperator);
- if(RV_RES.RV_NEW_WATCH_RULE){
- this.m_subscription=new CMenuItem(this.m_contextMenu,RV_RES.RV_NEW_WATCH_RULE,this.getCVObjectRef()+".getSubscriptionManager().NewSubscription();",_2ea+"/rv/images/action_new_subscription.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_subscription.disable();
- }
- }
- var _2f0=false;
- if(this.getCV().bCanUseGlossary&&RV_RES.RV_GLOSSARY&&_2ec.indexOf(" RV_CONTEXT_MENU_GLOSSARY ")==-1){
- _2f0=true;
- this.m_contextMenu.add(gMenuSeperator);
- this.m_glossaryItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_GLOSSARY,this.getCVObjectRef()+".executeAction('Glossary');",_2ea+"/rv/images/action_glossary.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_glossaryItem.disable();
- }
- if(this.isLinegaeVisisble(_2ec)){
- if(!_2f0){
- this.m_contextMenu.add(gMenuSeperator);
- }
- this.m_lineageItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_LINEAGE,this.getCVObjectRef()+".executeAction('Lineage');",_2ea+"/rv/images/action_lineage.gif",gMenuItemStyle,_2ea,_2eb);
- this.m_lineageItem.disable();
- }
- };
- CContextMenu.prototype=new CViewerHelper();
- CContextMenu.prototype.isLinegaeVisisble=function(_2f1){
- if(!isSafari()&&this.getCV().bCanUseLineage&&RV_RES.RV_LINEAGE&&_2f1.indexOf(" RV_CONTEXT_MENU_LINEAGE ")==-1){
- if(this.getCV().envParams["ui.object"]||(this.getCV().envParams["metadataInformationURI"]&&this.getCV().envParams["metadataInformationURI"].indexOf("iis=")==-1)){
- return true;
- }
- }
- return false;
- };
- CContextMenu.prototype.hideFirstSeperators=function(){
- var _2f2=this.m_contextMenu.m_menuItems.length;
- for(var _2f3=0;_2f3<_2f2;_2f3++){
- var _2f4=this.m_contextMenu.m_menuItems[_2f3];
- if(_2f4.isVisible()&&typeof _2f4.m_toolbarSeperatorClass!="string"){
- break;
- }else{
- if(typeof _2f4.m_toolbarSeperatorClass=="string"){
- _2f4.hide();
- }
- }
- }
- };
- CContextMenu.prototype.updateFreezeHeadings=function(){
- if(this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]=="view"){
- return;
- }
- if(this.getCV().getPinFreezeManager()){
- var _2f5=this.getCV().getPinFreezeManager();
- if(this.m_freezeRowHeadings){
- if(_2f5.canFreezeSelectedRowHeadings()){
- this.m_freezeRowHeadings.show();
- }else{
- this.m_freezeRowHeadings.hide();
- }
- }
- if(this.m_unfreezeRowHeadings){
- if(_2f5.canUnfreezeSelectedRowHeadings()){
- this.m_unfreezeRowHeadings.show();
- }else{
- this.m_unfreezeRowHeadings.hide();
- }
- }
- if(this.m_freezeColumnHeadings){
- if(_2f5.canFreezeSelectedColumnHeadings()){
- this.m_freezeColumnHeadings.show();
- }else{
- this.m_freezeColumnHeadings.hide();
- }
- }
- if(this.m_unfreezeColumnHeadings){
- if(_2f5.canUnfreezeSelectedColumnHeadings()){
- this.m_unfreezeColumnHeadings.show();
- }else{
- this.m_unfreezeColumnHeadings.hide();
- }
- }
- }
- };
- function CContextMenu_draw(evt){
- this.updateSubscriptionContextMenuItem();
- if(this.m_bFaultModalShown){
- this.update(this.subject);
- this.m_bFaultModalShown=false;
- }
- this.hideFirstSeperators();
- this.m_contextMenu.remove();
- this.m_contextMenu.setHTMLContainer(document.body);
- this.m_contextMenu.draw();
- if(isIE()&&evt.keyCode&&evt.keyCode!=0){
- var node=getCrossBrowserNode(evt);
- var _2f8=clientToScreenCoords(node,document.body);
- this.m_contextMenu.setXCoord(_2f8.leftCoord+node.scrollWidth);
- this.m_contextMenu.setYCoord(_2f8.topCoord);
- }else{
- this.m_contextMenu.setXCoord(evt.clientX);
- this.m_contextMenu.setYCoord(evt.clientY);
- }
- if(getCVWaitingOnFault()==null){
- this.m_contextMenu.show();
- this.m_bFaultModalShown=false;
- }else{
- this.m_bFaultModalShown=true;
- }
- var _2f9=this.m_contextMenu.get(this.m_contextMenu.getNumItems()-1);
- if(_2f9&&typeof _2f9.getObservers=="function"&&typeof _2f9.getObservers()=="object"){
- _2f9.getObservers().attach(this,this.closeMenuTabEvent,"CMenuItem_closeMenuTabEvent");
- }
- };
- function CContextMenu_getDrillUpMenuItem(){
- return this.m_drillUp;
- };
- function CContextMenu_getDrillDownMenuItem(){
- return this.m_drillDown;
- };
- function CContextMenu_getGoToMenuItem(){
- return this.m_goto;
- };
- function CContextMenu_closeMenuTabEvent(){
- var oCV=this.m_mainWnd.getCV();
- var _2fb=oCV.getSelectionController();
- var _2fc=_2fb.getAllSelectedObjects().length;
- if(_2fc>0){
- var _2fd=_2fb.getAllSelectedObjects()[_2fc-1];
- var _2fe=_2fd.getCellRef().getElementsByTagName("span");
- if(_2fe.length>0){
- for(var i=0;i<_2fe.length;i++){
- var span=_2fe[i];
- if(span.getAttribute("tabindex")!=null&&span.style.visibility!="hidden"){
- span.focus();
- }
- }
- }
- }
- };
- function CContextMenu_hide(){
- this.m_contextMenu.remove();
- };
- function CContextMenu_hideDownloadChartMenuItem(){
- this.m_downloadChart.hide();
- this.m_downloadChartSeperator.hide();
- };
- function CContextMenu_showDownloadChartMenuItem(){
- this.m_downloadChart.show();
- this.m_downloadChartSeperator.show();
- };
- function CContextMenu_update(_301){
- if(_301 instanceof CSelectionController){
- this.subject=_301;
- var _302=this.m_mainWnd.getUIHide();
- var _303=this.getCV().getDrillMgr();
- if(_303){
- var _304=this.getGoToMenuItem();
- var _305=_304.getMenu();
- if(_305){
- _305.clear();
- }
- if(!_301.getSelectionBasedFeaturesEnabled()||_302.indexOf(" RV_CONTEXT_MENU_GOTO ")!=-1){
- _304.hide();
- }
- var _306=this.getDrillDownMenuItem();
- if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")!=-1){
- _306.hide();
- }else{
- if(_303.canDrillDown()){
- this.updateDrillMenu(_306,"DrillDown");
- _306.enable();
- }else{
- if(!_301.getSelectionBasedFeaturesEnabled()){
- _306.hide();
- }else{
- _306.disable();
- }
- }
- }
- var _307=this.getDrillUpMenuItem();
- if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")!=-1){
- _307.hide();
- }
- if(_303.canDrillUp()){
- this.updateDrillMenu(_307,"DrillUp");
- _307.enable();
- }else{
- if(!_301.getSelectionBasedFeaturesEnabled()){
- _307.hide();
- gMenuSeperator.hide();
- }else{
- _307.disable();
- }
- }
- if(this.m_expand){
- this.getCV().canExpand()?this.m_expand.enable():this.m_expand.disable();
- }
- if(this.m_collapse){
- this.getCV().canCollapse()?this.m_collapse.enable():this.m_collapse.disable();
- }
- if(_302.indexOf(" RV_CONTEXT_MENU_DOWNLOAD_CHART ")!=-1){
- this.hideDownloadChartMenuItem();
- }else{
- if(!_301.hasSelectedChartNodes()){
- if(!_301.getSelectionBasedFeaturesEnabled()){
- this.hide();
- }else{
- this.hideDownloadChartMenuItem();
- }
- }else{
- this.showDownloadChartMenuItem();
- }
- }
- }
- var _308=false;
- if(this.m_lineageItem||this.m_glossaryItem){
- var _309=_301.getAllSelectedObjects();
- if(_309!=null&&_309.length>0){
- for(var i=0;i<_309.length;i++){
- if(_309[i].hasContextInformation()){
- _308=true;
- break;
- }
- }
- }
- }
- this.updateFreezeHeadings();
- if(this.m_glossaryItem&&_308&&this.getCV().envParams["glossaryURI"]!=null&&this.getCV().envParams["glossaryURI"]!=""){
- this.m_glossaryItem.enable();
- }else{
- if(this.m_glossaryItem){
- this.m_glossaryItem.disable();
- }
- }
- if(this.m_lineageItem&&_308){
- this.m_lineageItem.enable();
- }else{
- if(this.m_lineageItem){
- this.m_lineageItem.disable();
- }
- }
- }
- };
- CContextMenu.prototype.updateDrillMenu=function(_30b,_30c){
- _30b.clearCascadedMenu();
- var _30d={};
- DrillContextMenuHelper.updateDrillMenuItems(_30d,this.getCV(),_30c);
- if(_30d.items){
- var _30e=_30d.items;
- var _30f=_30b.createCascadedMenu(gMenuStyle);
- var _310=this.getCV().getWebContentRoot();
- var _311=this.m_mainWnd.getCV().getSkin();
- for(var i=0;i<_30e.length;i++){
- var _313=_30e[i];
- if(_313.separator){
- if(i<(_30e.length-1)){
- _30f.add(gMenuSeperator);
- }
- }else{
- var _314=_313.action&&_313.action.payload&&_313.action.payload.userSelectedDrillItem?_313.action.payload.userSelectedDrillItem:"";
- var _315=_314?"{\"userSelectedDrillItem\" : \""+_314+"\"}":"{}";
- if(_30c=="DrillDown"){
- new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillDown("+_315+");","",gMenuItemStyle,_310,_311);
- }else{
- new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillUp("+_315+");","",gMenuItemStyle,_310,_311);
- }
- }
- }
- }
- };
- function CContextMenu_updateSubscriptionContextMenuItem(){
- var _316=this.m_mainWnd.getUIHide();
- var _317=this.getCV().getSubscriptionManager();
- if(_316.indexOf(" RV_CONTEXT_MENU_ALERT_USING_NEW_WATCH_RULE ")!=-1&&this.m_subscription){
- this.m_subscription.hide();
- }else{
- if(_317&&this.m_subscription&&_317.CanCreateNewWatchRule()){
- this.m_subscriptionSeperator.show();
- this.m_subscription.show();
- if(_317.IsValidSelectionForNewRule()){
- this.m_subscription.enable();
- }else{
- this.m_subscription.disable();
- }
- }else{
- if(this.m_subscription){
- this.m_subscriptionSeperator.hide();
- this.m_subscription.hide();
- }
- }
- }
- };
- CContextMenu.prototype.draw=CContextMenu_draw;
- CContextMenu.prototype.hide=CContextMenu_hide;
- CContextMenu.prototype.closeMenuTabEvent=CContextMenu_closeMenuTabEvent;
- CContextMenu.prototype.getDrillUpMenuItem=CContextMenu_getDrillUpMenuItem;
- CContextMenu.prototype.getDrillDownMenuItem=CContextMenu_getDrillDownMenuItem;
- CContextMenu.prototype.getGoToMenuItem=CContextMenu_getGoToMenuItem;
- CContextMenu.prototype.hideDownloadChartMenuItem=CContextMenu_hideDownloadChartMenuItem;
- CContextMenu.prototype.showDownloadChartMenuItem=CContextMenu_showDownloadChartMenuItem;
- CContextMenu.prototype.update=CContextMenu_update;
- CContextMenu.prototype.updateSubscriptionContextMenuItem=CContextMenu_updateSubscriptionContextMenuItem;
- function CReportHistory(_318,_319,_31a,_31b){
- this.m_mainWnd=_318;
- this.m_stack_idx=_319;
- this.m_reportName="";
- if(typeof _31a=="undefined"||_31a==null||_31a.length==0){
- if(typeof _318!="undefined"&&_318!=null){
- var _31c=RV_RES.RV_PREVIOUS_REPORT;
- this.m_reportName=_31c;
- }
- }else{
- this.m_reportName=_31a;
- }
- this.m_params=_31b;
- };
- CReportHistory.prototype.getDropDownMenuIcon=function(){
- var _31d="/ps/portal/images/";
- if(this.m_params["ui.action"]=="view"){
- _31d+="icon_result_";
- if(this.m_params["ui.format"]=="PDF"){
- _31d+="pdf.gif";
- }else{
- _31d+="html.gif";
- }
- }else{
- _31d+="action_run.gif";
- }
- return _31d;
- };
- CReportHistory.prototype.addParamNode=function(_31e,_31f,_320){
- var _321=_31e.ownerDocument.createElement("param");
- _31e.appendChild(_321);
- _321.setAttribute("name",_31f);
- _321.appendChild(_31e.ownerDocument.createTextNode(_320));
- };
- CReportHistory.prototype.saveAsXML=function(_322){
- var _323=_322.ownerDocument.createElement("previousReport");
- _322.appendChild(_323);
- for(var _324 in this.m_params){
- this.addParamNode(_323,_324,this.m_params[_324]);
- }
- this.addParamNode(_323,"ui.name",this.getReportName());
- };
- CReportHistory.prototype.getIdx=function(){
- return this.m_stack_idx;
- };
- CReportHistory.prototype.getReportName=function(){
- return this.m_reportName;
- };
- CReportHistory.prototype.getParameters=function(){
- return this.m_params;
- };
- CReportHistory.prototype.createRequestForm=function(){
- var oCV=this.m_mainWnd.getCV();
- var _326=document.getElementById("formWarpRequest"+oCV.getId());
- var form=document.createElement("form");
- form.setAttribute("id","previousReport");
- form.setAttribute("name","previousReport");
- form.setAttribute("target",_326.getAttribute("target")?_326.getAttribute("target"):"");
- form.setAttribute("method","post");
- form.setAttribute("action",_326.getAttribute("action"));
- form.style.display="none";
- document.body.appendChild(form);
- for(var _328 in this.m_params){
- if(_328!="m_tracking"){
- form.appendChild(createHiddenFormField(_328,this.m_params[_328]));
- }
- }
- for(var _329 in oCV.envParams){
- if(_329.indexOf("cv.")==0&&_329!="cv.previousReports"&&_329!="m_tracking"&&_329!="cv.actionState"){
- form.appendChild(createHiddenFormField(_329,oCV.envParams[_329]));
- }
- }
- if(this.getIdx()>0){
- this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx());
- form.appendChild(createHiddenFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML()));
- }
- form.appendChild(createHiddenFormField("ui.name",this.getReportName()));
- form.appendChild(createHiddenFormField("b_action","cognosViewer"));
- var _32a=_326.getElementsByTagName("INPUT");
- for(var _32b=0;_32b<_32a.length;++_32b){
- if(typeof form[_32a[_32b].name]=="undefined"&&_32a[_32b].name!="cv.previousReports"&&_32a[_32b].name.length>0){
- form.appendChild(createHiddenFormField(_32a[_32b].name,_32a[_32b].value));
- }
- }
- return form;
- };
- CReportHistory.prototype.execute=function(){
- var oCV=this.m_mainWnd.getCV();
- if(typeof oCV.m_viewerFragment!="undefined"){
- var _32d=new ViewerDispatcherEntry(oCV);
- _32d.addFormField("ui.action",this.m_params["ui.action"]);
- for(var _32e in this.m_params){
- if(_32e!="ui.action"&&_32e!="m_tracking"&&_32e!="cv.actionState"){
- _32d.addFormField(_32e,this.m_params[_32e]);
- }
- }
- if(this.getIdx()>0){
- this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx());
- _32d.addFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML());
- }else{
- _32d.removeFormField("cv.previousReports");
- }
- if(this.m_reportName&&this.m_reportName.length>0){
- _32d.addFormField("ui.name",this.m_reportName);
- }
- _32d.addFormField("cv.responseFormat","fragment");
- _32d.addFormField("cv.ignoreState","true");
- _32d.addFormField("cv.id","_THIS_");
- _32d.addFormField("m_tracking","");
- oCV.dispatchRequest(_32d);
- }else{
- var form=this.createRequestForm();
- form.submit();
- }
- };
- function CViewerManager(oCV){
- this.setCV(oCV);
- };
- CViewerManager.prototype=new CViewerHelper();
- CViewerManager.prototype.Print=function(){
- var _331=document.getElementById("CVIFrame"+this.getCVId());
- if(_331){
- if(isIE()){
- _331.contentWindow.document.execCommand("print",true,null);
- }else{
- _331.focus();
- _331.contentWindow.print();
- }
- }
- var cv=this.getCV();
- var _333=cv.rvMainWnd;
- var _334=_333.getToolbarControl();
- if(typeof _334!="undefined"&&_334!=null){
- var _335=_334.getItem("print");
- if(_335){
- _335.setFocus();
- }
- }
- };
- CViewerManager.prototype.DownloadReport=function(){
- var _336="";
- var f=document.forms["formWarpRequest"+this.getCVId()];
- _336+="b_action=xts.run&m=portal/download.xts&m_obj=";
- _336+=f["ui.object"].value;
- _336+="&m_name=";
- _336+=f["ui.name"].value;
- if(f["ui.format"]&&f["ui.format"].value){
- _336+="&format=";
- _336+=f["ui.format"].value;
- }
- _336=constructGETRequestParamsString(_336);
- _336=f.action+"?"+_336;
- location.href=_336;
- };
- CViewerManager.prototype.SaveReport=function(_338){
- var oCV=this.getCV();
- var oReq=new ViewerDispatcherEntry(oCV);
- oReq.setWorkingDialog(null);
- oReq.addFormField("ui.action","save");
- if(!_338){
- oReq.addFormField("run.continueConversation","true");
- }else{
- this.getCV().closeActiveHTTPConnection();
- if(oCV.getWorkingDialog()){
- oCV.getWorkingDialog().hide();
- }
- this.getCV().setKeepSessionAlive(true);
- oReq.addFormField("run.continueConversation","false");
- var _33b=GUtil.generateCallback(executeBackURL,[this.getCV().getId()],null);
- oReq.setCallbacks({"complete":{"method":_33b}});
- }
- oReq.addFormField("run.saveOutput","true");
- this.getCV().dispatchRequest(oReq);
- };
- CViewerManager.prototype.SaveAsReportView=function(_33c){
- var _33d=document.getElementById("formWarpRequest"+this.getCVId());
- if(_33d){
- var _33e=!_33c;
- var _33f={"m":"portal/viewer-saveAs.xts"};
- _33f["run.continueConversation"]=_33e;
- _33f["initializeSave"]="true";
- _33f["ui.object"]=_33d["ui.object"].value;
- _33f["ui.backURL"]=_33d["ui.backURL"].value;
- _33f["ui.routingServerGroup"]=this.getRoutingServerGroup();
- cvLoadDialog(this.getCV(),_33f,600,425,RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE);
- }
- };
- CViewerManager.prototype.init=function(_340){
- if(_340&&typeof _340=="object"){
- for(var _341 in _340){
- this[_341]=_340[_341];
- }
- }
- };
- CViewerManager.prototype.SendReport=function(_342){
- var _343=!_342;
- var _344={"m":"portal/viewer-email.xts"};
- _344["run.continueConversation"]=_343;
- _344["ui.routingServerGroup"]=this.getRoutingServerGroup();
- cvLoadDialog(this.getCV(),_344,800,550,RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE);
- };
- CViewerManager.prototype.validatePromptControls=function(){
- if(typeof this.getCV().preProcessControlArray!="undefined"&&typeof preProcessForm!="undefined"){
- preProcessForm(this.getCV().preProcessControlArray);
- }
- };
- CViewerManager.prototype.RunReport=function(){
- this.validatePromptControls();
- var oReq=null;
- var _346=this.getCV().envParams["ui.object"];
- var _347=this.getCV().envParams["ui.spec"];
- var _348=this.getCV().envParams["ui.action"];
- var _349=document.forms["formWarpRequest"+this.getCVId()];
- if(_347!=null&&_347!=""){
- oReq=new ViewerDispatcherEntry(this.getCV());
- oReq.addFormField("ui.action","runSpecification");
- oReq.addFormField("ui.spec",_347);
- var _34a=this.getCV().envParams["specificationType"];
- if(_34a!=null){
- oReq.addFormField("specificationType",_34a);
- }
- }else{
- if(_346!=null&&_346!=""){
- if(this.getCV().isBux){
- oReq=new ViewerDispatcherEntry(this.getCV());
- oReq.addFormField("ui.action","bux");
- }else{
- oReq=new ViewerDispatcherEntry(this.getCV());
- oReq.addFormField("ui.action","run");
- }
- if(_348=="view"){
- if(this.getCV().envParams["ui.reRunObj"]){
- _346=this.getCV().envParams["ui.reRunObj"];
- }else{
- if(typeof _349["reRunObj"]!="undefined"&&_349["reRunObj"]!=null){
- _346=_349["reRunObj"].value;
- }
- }
- }
- oReq.addFormField("ui.object",_346);
- }
- }
- oReq.addFormField("run.outputFormat",this.getCV().rvMainWnd.getCurrentFormat());
- oReq.addFormField("ui.primaryAction","");
- var _34b=this.getCV().envParams["promptOnRerun"];
- if(_34b!=null){
- oReq.addFormField("run.prompt",_34b);
- }else{
- oReq.addFormField("run.prompt","true");
- }
- this.getCV().preparePromptValues(oReq);
- this.getCV().dispatchRequest(oReq);
- };
- CViewerManager.prototype.viewReport=function(_34c){
- if(this.getCV().rvMainWnd.getCurrentFormat()==_34c){
- return;
- }
- var f=document.forms["formWarpRequest"+this.getCVId()];
- if(f["ui.action"].value=="view"){
- this.viewOutput(_34c);
- }else{
- var oReq=new ViewerDispatcherEntry(this.getCV());
- oReq.addFormField("ui.action","render");
- oReq.addFormField("run.outputFormat",_34c);
- if(this.isExcelFormat(_34c)){
- this.viewInExcel(oReq);
- }else{
- if(this.getCV().isAccessibleMode()&&_34c=="PDF"){
- this.viewPDFInNewWindow(oReq);
- }else{
- if(isSafari()&&_34c=="PDF"){
- oReq.addFormField("ui.reuseWindow","true");
- this.viewPDFInNewWindow(oReq);
- }else{
- this.getCV().deleteTabs();
- this.getCV().dispatchRequest(oReq);
- }
- }
- }
- }
- };
- CViewerManager.prototype.isExcelFormat=function(_34f){
- if(_34f=="xlsxData"||_34f=="XLS"||_34f=="CSV"||_34f=="XLWA"||_34f=="singleXLS"||_34f=="spreadsheetML"){
- return true;
- }
- return false;
- };
- CViewerManager.prototype.viewOutput=function(_350){
- var oFWR=document.forms["formWarpRequest"+this.getCVId()];
- var oReq=new ViewerDispatcherEntry(this.getCV());
- oReq.addFormField("ui.action","view");
- oReq.addFormField("cv.responseFormat","view");
- oReq.addFormField("ui.format",_350);
- var _353="";
- switch(_350){
- case "HTML":
- _353=this.getCV().oOutputFormatPath.HTML;
- break;
- case "PDF":
- _353=this.getCV().oOutputFormatPath.PDF;
- break;
- case "singleXLS":
- _353=this.getCV().oOutputFormatPath.singleXLS;
- break;
- case "XLS":
- _353=this.getCV().oOutputFormatPath.XLS;
- break;
- case "XLWA":
- _353=this.getCV().oOutputFormatPath.XLWA;
- break;
- case "CSV":
- _353=this.getCV().oOutputFormatPath.CSV;
- break;
- case "XML":
- _353=this.getCV().oOutputFormatPath.XML;
- break;
- case "spreadsheetML":
- _353=this.getCV().oOutputFormatPath.spreadsheetML;
- break;
- case "xlsxData":
- _353=this.getCV().oOutputFormatPath.xlsxData;
- break;
- }
- if(_353){
- oReq.addFormField("ui.object",_353);
- }
- oReq.addFormField("reRunObj",oFWR.reRunObj.value);
- oReq.addFormField("ui.format",_350);
- oReq.addFormField("ui.name",oFWR["ui.name"].value);
- if(this.isExcelFormat(_350)){
- this.viewInExcel(oReq);
- }else{
- if(this.getCV().isAccessibleMode()&&_350=="PDF"){
- this.viewPDFInNewWindow(oReq);
- }else{
- if(isSafari()&&_350=="PDF"){
- oReq.addFormField("ui.reuseWindow","true");
- this.viewPDFInNewWindow(oReq);
- }else{
- this.getCV().dispatchRequest(oReq);
- }
- }
- }
- };
- CViewerManager.prototype.viewPDFInNewWindow=function(oReq){
- this.viewInNewWindow(oReq,__pdf_win);
- };
- CViewerManager.prototype.viewInExcel=function(oReq){
- this.viewInNewWindow(oReq,__excel_win);
- };
- CViewerManager.prototype.viewInNewWindow=function(oReq,_357){
- var _358=window.onbeforeunload;
- window.onbeforeunload=null;
- if(_357!=null){
- _357.close();
- }
- var _359="winNAT_"+(new Date()).getTime();
- var _35a=this.getCV().getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
- var _35b="viewForm"+this.getCVId();
- var _35c=document.getElementById(_35b);
- if(_35c){
- _35c.parentNode.removeChild(_35c);
- }
- _35c=document.createElement("form");
- _35c.setAttribute("method","post");
- _35c.setAttribute("id",_35b);
- _35c.setAttribute("action",this.getCV().getGateway());
- _35c.style.display="inline";
- var oFWR=document["formWarpRequest"+this.getCVId()];
- if(oFWR&&oFWR["run.outputFormat"]){
- oReq.addFormField("previousFormat",oFWR["run.outputFormat"].value);
- }
- var _35e=oReq.getFormFields().keys();
- for(var _35f=0;_35f<_35e.length;_35f++){
- var name=_35e[_35f];
- if(name!="cv.responseFormat"&&name!="b_action"&&name!="m_tracking"){
- _35c.appendChild(createHiddenFormField(name,oReq.getFormField(name)));
- }
- }
- _35c.appendChild(createHiddenFormField("cv.responseFormat","page"));
- _35c.appendChild(createHiddenFormField("b_action","cognosViewer"));
- _35c.appendChild(createHiddenFormField("BIline1",RV_RES.RV_RUNNING));
- _35c.appendChild(createHiddenFormField("BIline2",RV_RES.RV_PLEASE_WAIT));
- if(this.getCV().envParams["ui.name"]){
- _35c.appendChild(createHiddenFormField("ui.name",this.getCV().envParams["ui.name"]));
- }
- document.body.appendChild(_35c);
- _35c.target=_359;
- _357=window.open(_35a,_359,"rv");
- window.onbeforeunload=_358;
- };
- CViewerManager.prototype.cancel=function(){
- var oCV=this.getCV();
- oCV.cancel();
- };
- CViewerManager.prototype.sXmlEncode=function(_362){
- var _363=""+_362;
- if((_363=="0")||((_362!=null)&&(_362!=false))){
- _363=_363.replace(/&/g,"&");
- _363=_363.replace(/</g,"<");
- _363=_363.replace(/>/g,">");
- _363=_363.replace(/"/g,""");
- _363=_363.replace(/'/g,"'");
- }else{
- if(_362==null){
- _363="";
- }
- }
- return _363;
- };
- CViewerManager.prototype.exit=function(_364){
- var form=document.getElementById("formWarpRequest"+this.getCVId());
- var oCV=this.getCV();
- if(form&&form["ui.action"]&&form["ui.action"].value=="view"&&_364){
- executeBackURL(this.getCVId());
- }else{
- if(oCV.getKeepSessionAlive()==false){
- oCV.exit(_364);
- }
- }
- };
- function executeBackURL(_367){
- var _368="";
- if(_367){
- _368=_367;
- }
- if(window["oCV"+_368]&&window["oCV"+_368].isBux){
- return false;
- }
- var form=document.getElementById("formWarpRequest"+_368);
- if(form["ui.backURL"].value.length<2048){
- document.location.href=form["ui.backURL"].value;
- return;
- }
- var _36a=decodeURIComponent(form["ui.backURL"].value);
- var _36b=_36a.split("?");
- var _36c=document.createElement("form");
- _36c.style.display="none";
- _36c.setAttribute("method","post");
- _36c.setAttribute("action",_36b[0]);
- _36c.setAttribute("target","_self");
- var _36d=_36b[1].split("&");
- for(var _36e=0;_36e<_36d.length;_36e++){
- var _36f=_36d[_36e].indexOf("=");
- var _370=_36d[_36e].substr(0,_36f);
- var _371=_36d[_36e].substr(_36f+1);
- var _372=document.createElement("input");
- _372.setAttribute("type","hidden");
- _372.setAttribute("name",decodeURIComponent(_370));
- _372.setAttribute("value",decodeURIComponent(_371));
- _36c.appendChild(_372);
- }
- document.body.appendChild(_36c);
- _36c.submit();
- };
- CViewerManager.prototype.getRoutingServerGroup=function(){
- var oCV=this.getCV();
- if(oCV.envParams["ui.routingServerGroup"]){
- return oCV.envParams["ui.routingServerGroup"];
- }
- return "";
- };
- CViewerManager.prototype.launchQS=function(){
- var _374=document.forms["formWarpRequest"+this.getCVId()];
- var oCV=this.getCV();
- if(typeof oCV.m_viewerFragment!="undefined"){
- cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
- }else{
- cognosLaunch("ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.backURL",_374["ui.backURL"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
- }
- };
- CViewerManager.prototype.launchAS=function(){
- var _376=document.forms["formWarpRequest"+this.getCVId()];
- cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_376.action,"ui.tool","AnalysisStudio","ui.action","edit","ui.object",_376["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
- };
- CViewerManager.prototype.launchRS=function(){
- var _377=document.forms["formWarpRequest"+this.getCVId()];
- cognosLaunchInWindow("_blank","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_377.action,"ui.tool","ReportStudio","ui.action","edit","ui.profile","Professional","ui.object",_377["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup());
- };
- CViewerManager.prototype.returnHome=function(url){
- var _379=document.forms["formWarpRequest"+this.getCVId()];
- _379["ui.backURL"].value=url;
- executeBackURL(this.getCVId());
- };
- CViewerManager.prototype.doPostBack=function(){
- var f=document.forms["formWarpRequest"+this.getCVId()];
- f.appendChild(createHiddenFormField("b_action","xts.run"));
- f.appendChild(createHiddenFormField("m",f["ui.postBack"].value));
- f.submit();
- };
- CViewerManager.prototype.hideAbout=function(){
- this.getCV().removeTransparentBackgroundLayer();
- var cvId=this.getCV().getId();
- if(document.getElementById("viewerAboutDiv"+cvId)){
- document.getElementById("viewerAboutDiv"+cvId).parentNode.removeChild(document.getElementById("viewerAboutDiv"+cvId));
- }
- if(document.getElementById("viewerAboutIframe"+cvId)){
- document.getElementById("viewerAboutIframe"+cvId).parentNode.removeChild(document.getElementById("viewerAboutIframe"+cvId));
- }
- };
- function viewerAboutOnKeyDown(evt){
- evt=(evt)?evt:((event)?event:null);
- var _37d=getCrossBrowserNode(evt);
- if(evt.keyCode=="13"||evt.keyCode=="27"||evt.keyCode=="32"){
- var oCV=window["oCV"+_37d.getAttribute("viewerId")];
- oCV.m_oCVMgr.hideAbout();
- return stopEventBubble(evt);
- }
- };
- CViewerManager.prototype.fileExist=function(_37f){
- var http=null;
- if(window.XMLHttpRequest){
- http=new XMLHttpRequest();
- }else{
- http=new ActiveXObject("Msxml2.XMLHTTP");
- }
- http.open("HEAD",_37f,false);
- http.send();
- return (http.status==200);
- };
- CViewerManager.prototype.getAboutBoxImageURL=function(){
- var _381="about_"+this.getCV().getProductLocale()+".jpg";
- var _382=this.getCV().getWebContentRoot()+"/rv/images/";
- var _383=_382+_381;
- if(!this.fileExist(_383)){
- _383=_382+"about_en.jpg";
- }
- return _383;
- };
- CViewerManager.prototype.about=function(){
- if(document.getElementById("viewerAbout"+this.getCV().getId())){
- this.hideAbout();
- }
- this.getCV().createTransparentBackgroundLayer();
- var _384=650;
- var _385=522;
- var _386=document.createElement("iframe");
- _386.id="viewerAboutIframe"+this.getCV().getId();
- _386.style.position="absolute";
- _386.style.zIndex=99;
- _386.style.width=_384+"px";
- _386.style.height=_385+"px";
- _386.setAttribute("src",this.getCV().getWebContentRoot()+"/common/blank.html");
- _386.setAttribute("scrolling","no");
- _386.setAttribute("frameborder","0");
- _386.setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
- _386.setAttribute("role","presentation");
- document.body.appendChild(_386);
- var id=this.getCV().getId();
- var _388=document.createElement("div");
- _388.tabIndex=0;
- _388.onfocus=function(){
- document.getElementById("viewerAboutOK"+id).focus();
- };
- document.body.appendChild(_388);
- var div=document.createElement("div");
- div.id="viewerAboutDiv"+this.getCV().getId();
- div.style.position="absolute";
- div.onkeydown=viewerAboutOnKeyDown;
- div.style.zIndex=100;
- div.style.width=_384+"px";
- div.style.height=_385+"px";
- div.style.outline="none";
- div.setAttribute("role","dialog");
- div.setAttribute("aria-label",RV_RES.RV_ABOUT_DESCRIPTION);
- var _38a=this.getAboutBoxImageURL();
- var _38b=RV_RES.RV_ABOUT_DESCRIPTION.replace(/"/g,""")+RV_RES.IDS_PROP_LEGAL.replace(/"/g,""");
- div.innerHTML="<img role=\"img\" id=\"viewerAbout"+this.getCV().getId()+"\" tabIndex=\"0\" alt=\""+_38b+"\" title=\""+_38b+"\" src=\""+_38a+"\" onclick=\""+getCognosViewerObjectString(this.getCV().getId())+".m_oCVMgr.hideAbout()\"></img>";
- div.setAttribute("viewerId",this.getCV().getId());
- document.body.appendChild(div);
- this.createOKButton(div);
- var _38c=document.createElement("div");
- _38c.tabIndex=0;
- _38c.onfocus=function(){
- document.getElementById("viewerAbout"+id).focus();
- };
- document.body.appendChild(_38c);
- var _38d=0;
- var _38e=0;
- if(typeof window.innerHeight!="undefined"){
- _38d=Math.round((window.innerHeight/2)-(_385/2));
- _38e=Math.round((window.innerWidth/2)-(_384/2));
- }else{
- _38d=Math.round((document.body.clientHeight/2)-(_385/2));
- _38e=Math.round((document.body.clientWidth/2)-(_384/2));
- }
- div.style.bottom=_386.style.bottom=_38d+"px";
- div.style.left=_386.style.left=_38e+"px";
- setTimeout("document.getElementById('viewerAbout"+id+"').focus();",1);
- };
- CViewerManager.prototype.createOKButton=function(_38f){
- var _390=document.createElement("div");
- _390.style.backgroundcolor="#FFFFFF";
- _390.id="viewerAboutOK"+this.getCV().getId();
- _390.setAttribute("role","button");
- _390.setAttribute("viewerId",this.getCV().getId());
- _390.setAttribute("tabIndex","0");
- var _391=this;
- _390.onclick=function(){
- _391.hideAbout();
- };
- _390.onkeydown=viewerAboutOnKeyDown;
- _390.className="aboutOkButton";
- _38f.appendChild(_390);
- var span=document.createElement("span");
- span.style.padding="7px 30px 7px 30px";
- span.appendChild(document.createTextNode(RV_RES.IDS_JS_OK));
- _390.appendChild(span);
- };
- CViewerManager.prototype.updateUserName=function(){
- var _393=new DataDispatcherEntry(this.getCV());
- _393.addFormField("ui.action","CMRequest");
- _393.addFormField("CMRequest","<CMRequest><searchPath>~</searchPath><properties><property>defaultName</property></properties></CMRequest>");
- _393.addFormField("cv.responseFormat","CMRequest");
- _393.addFormField("cv.catchLogOnFault","true");
- _393.addFormField("cv.id",this.getCVId());
- _393.setCallbacks({"complete":{"object":this,"method":this.updateUserNameCallback}});
- _393.setCanBeQueued(true);
- this.getCV().dispatchRequest(_393);
- };
- CViewerManager.prototype.updateUserNameCallback=function(_394){
- var _395=this.getUserNameFromResponse(_394);
- if(_395!=null){
- var _396="userNameTD"+this.getCVId();
- var _397=document.getElementById(_396);
- if(_397!=null){
- _397.innerHTML=html_encode(_395);
- }
- var _398=this.getCV().rvMainWnd.getBannerToolbar();
- if(_398){
- for(var _399=0;_399<_398.getNumItems();_399++){
- if(typeof _398.get(_399).getId=="function"&&_398.get(_399).getId()==_396){
- _398.get(_399).setText(html_encode(_395));
- break;
- }
- }
- }
- }
- };
- CViewerManager.prototype.getUserNameFromResponse=function(_39a){
- if(_39a){
- var _39b=XMLBuilderLoadXMLFromString(_39a.getResult());
- var _39c=XMLHelper_FindChildByTagName(_39b,"defaultName",true);
- if(_39c!=null){
- var _39d=XMLHelper_FindChildByTagName(_39c,"value",false);
- if(_39d!=null){
- return XMLHelper_GetText(_39d);
- }
- }
- }
- return null;
- };
- CViewerManager.prototype.getAvailableOutput=function(){
- var oCV=this.getCV();
- var _39f=document.getElementById("formWarpRequest"+this.getCVId());
- var _3a0=new JSONDispatcherEntry(this.getCV());
- _3a0.addFormField("ui.action","getAvailableOutputs");
- _3a0.addFormField("cv.responseFormat","getAvailableOutputs");
- _3a0.addFormField("ui.object",_39f["ui.object"].value);
- _3a0.addFormField("ui.reportVersion",_39f["ui.reportVersion"].value);
- _3a0.addFormField("reRunObj",_39f["reRunObj"].value);
- _3a0.addFormField("ui.outputLocale",_39f["ui.outputLocale"].value);
- _3a0.addFormField("ui.burstKey",_39f["ui.burstKey"].value);
- _3a0.addFormField("cv.id",this.getCVId());
- _3a0.setCallbacks({"complete":{"object":this,"method":this.getAvailableOutputResponseCallback}});
- oCV.dispatchRequest(_3a0);
- };
- CViewerManager.prototype.getAvailableOutputResponseCallback=function(_3a1){
- var oCV=this.getCV();
- oCV.init(_3a1.getJSONResponseObject());
- oCV.rvMainWnd.renderAvailableOutputs();
- };
- CViewerManager.prototype.authenticate=function(_3a3,url){
- this.exit();
- this.getCV().setKeepSessionAlive(true);
- if(window.delCookie){
- delCookie("cc_state");
- }
- if(_3a3=="logon"||_3a3=="relogon"){
- location.href=url+"&h_CAM_action=logon&m_reload=";
- }
- if(_3a3=="logoff"){
- location.href=url+"&h_CAM_action=logoff";
- }
- };
- CViewerManager.prototype.launchNewGeneral=function(_3a5,_3a6){
- var _3a7=document.getElementById("formWarpRequest"+this.getCVId());
- if(_3a7){
- var _3a8="";
- if(_3a7["reRunObj"]){
- _3a8=_3a7["reRunObj"].value;
- }else{
- _3a8=_3a7["ui.object"].value;
- }
- var _3a9=this.getCV().getGateway()+"?"+constructGETRequestParamsString("b_action=xts.run&m=portal/viewer-closeIframe.xts&cv.id="+this.getCVId());
- var _3aa={"m":"portal/new_general.xts","m_new_class":_3a5,"so.searchPath":_3a6,"m_name":this.getCV().envParams["ui.name"],"m_obj_searchPath":_3a8,"m_obj":_3a8};
- _3aa["ui.backURL"]=_3a9;
- cvLoadDialog(this.getCV(),_3aa,500,425,RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE);
- }
- };
- CViewerManager.prototype.addToBookmarks=function(){
- var _3ab=document.getElementById("formWarpRequest"+this.getCVId());
- var _3ac=this.getCV().envParams;
- var _3ad="b_action=cognosViewer";
- for(var _3ae in _3ac){
- if(_3ae.indexOf("ui.")==0&&_3ae!="ui.primaryAction"&&_3ae!="ui.backURL"&&_3ac!="ui.spec"&&_3ae!="ui.conversation"&&_3ae!="ui.cafcontextid"){
- _3ad+="&"+_3ae+"=";
- if(_3ae=="ui.action"&&_3ac["ui.primaryAction"]!=""){
- _3ad+=encodeURIComponent(_3ac["ui.primaryAction"]);
- }else{
- _3ad+=encodeURIComponent(_3ac[_3ae]);
- }
- }
- if(_3ae.indexOf("run.")==0){
- _3ad+="&"+_3ae+"="+encodeURIComponent(_3ac[_3ae]);
- }
- }
- var sURL=this.getCV().sGateway+"?"+constructGETRequestParamsString(_3ad);
- var _3b0="";
- if(_3ab["ui.action"].value=="view"){
- if(typeof _3ac["versionName"]!="undefined"&&_3ac["versionName"]!=""){
- _3b0=RV_RES.RV_VIEW_REPORT;
- }else{
- _3b0=RV_RES.RV_VIEW_RECENT_REPORT;
- }
- }
- if(_3ab["ui.action"].value=="run"){
- _3b0=RV_RES.RV_RUN_REPORT;
- }
- if(_3b0!=""){
- _3b0+=" - ";
- }
- _3b0+=_3ac["ui.name"];
- window.external.AddFavorite(sURL,_3b0);
- };
- function leavingRV(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- for(var _3b1=0;_3b1<window.gaRV_INSTANCES.length;_3b1++){
- try{
- var oCV=window.gaRV_INSTANCES[_3b1];
- if(oCV){
- var oRV=oCV.getRV();
- if(oRV){
- oRV.exit();
- }
- }
- }
- catch(e){
- }
- }
- }
- };
- function viewerMainKeyPress(evt){
- evt=(evt)?evt:((event)?event:null);
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- for(var _3b5=0;_3b5<window.gaRV_INSTANCES.length;_3b5++){
- try{
- var oCV=window.gaRV_INSTANCES[_3b5];
- if(oCV&&oCV.getId()=="_NS_"){
- var _3b7=evt.keyCode;
- if(_3b7==0&&typeof evt.charCode!="undefined"){
- _3b7=evt.charCode;
- }
- if(!oCV.getViewerWidget()&&(_3b7=="64"||_3b7=="50")&&evt.shiftKey==true&&evt.ctrlKey==true){
- if(oCV.focusBackToMainContent){
- oCV.focusBackToMainContent(evt);
- return stopEventBubble(evt);
- }
- }else{
- if(!oCV.getViewerWidget()&&(_3b7=="51"||_3b7=="110")&&evt.shiftKey==true&&evt.ctrlKey==true){
- var _3b8=document.getElementById("CVNavLinks"+oCV.getId());
- if(_3b8){
- _3b8.setAttribute("tabIndex","-1");
- _3b8.focus();
- return stopEventBubble(evt);
- }
- }else{
- if(!oCV.getViewerWidget()&&_3b7=="49"&&evt.shiftKey==true&&evt.ctrlKey==true){
- if(oCV.focusBackToContent){
- oCV.focusBackToContent(evt);
- return stopEventBubble(evt);
- }
- }
- }
- }
- }
- }
- catch(e){
- }
- }
- }
- };
- var g_ViewerResizeTimer=0;
- function onResizeViewerEvent(evt){
- clearTimeout(g_ViewerResizeTimer);
- g_ViewerResizeTimer=setTimeout(resizePinnedContainers,200);
- };
- function constructGETRequestParamsString(_3ba){
- if(typeof CAFXSSEncode=="function"){
- if(_3ba.indexOf("?")>=0){
- var _3bb=_3ba.split("?");
- return _3bb[0]+"?"+CAFXSSEncode(_3bb[_3bb.length-1]);
- }
- return CAFXSSEncode(_3ba);
- }else{
- return _3ba;
- }
- };
- function sortReportHistoryStackDescending(a,b){
- return (b.getIdx()-a.getIdx());
- };
- function sortReportHistoryStackAscending(a,b){
- return (b.getIdx()-a.getIdx());
- };
- gToolbarButtonStyle=new CUIStyle("toolbarButton","toolbarButtonOver","toolbarButtonPressed","toolbarButtonOverPressed","toolbarButton");
- gToolbarStyle=new CUIStyle("mainViewerHeader3","","","","");
- gBannerButtonStyle=new CUIStyle("bannerToolbarButton","bannerToolbarButtonOver","","","");
- gBannerToolbarStyle=new CUIStyle("bannerButtonContainer","","","","");
- gMenuItemStyle=new CUIStyle("menuItem_normal","menuItem_hover","","","menuItem_disabled");
- gMenuStyle=new CUIStyle("clsMenu","","","","");
- gMenuSeperatorStyle=new CUIStyle("menuHorizontalSeperator","","","","");
- gBannerItemStyle=new CUIStyle("bannerMenuItem","bannerMenuItemOver","","","");
- gBannerStaticText=new CUIStyle("bannerText","","","","");
- gBannerLink=new CUIStyle("bannerLink","bannerLink","","","");
- gMenuSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle);
- gToolbarSeperator=new CSeperator("horizonal_blank","5");
- function CMainWnd(oCV){
- this.setCV(oCV);
- this.m_contextMenu=null;
- this.m_reportHistoryList=[];
- this.m_currentFormat="";
- this.m_toolbar=null;
- this.m_bannerToolbar=null;
- this.m_browserHistoryIndex=history.length;
- this.m_showContextMenuOnClick=false;
- if(oCV.getConfig&&oCV.getConfig()){
- var _3c1=oCV.getConfig().getEventsConfig();
- this.m_showContextMenuOnClick=_3c1?_3c1.getShowContextMenuOnClick():false;
- }
- };
- CMainWnd.prototype=new CViewerHelper();
- CMainWnd.prototype.setBannerToolbar=function(_3c2){
- this.m_bannerToolbar=new CViewerToolbar();
- this.m_bannerToolbar.init(_3c2);
- };
- CMainWnd.prototype.getBannerToolbar=function(){
- if(this.m_bannerToolbar){
- return this.m_bannerToolbar.getCBar();
- }
- return null;
- };
- CMainWnd.prototype.closeContextMenuAndToolbarMenus=function(){
- var _3c3=this.getToolbar();
- if(_3c3){
- _3c3.closeMenus();
- }
- var cm=this.getContextMenu();
- if(cm){
- cm.m_contextMenu.remove();
- }
- };
- CMainWnd.prototype.setToolbar=function(_3c5){
- this.m_toolbar=new CViewerToolbar();
- this.m_toolbar.init(_3c5);
- };
- CMainWnd.prototype.getToolbar=function(){
- if(this.m_toolbar){
- return this.m_toolbar.getCBar();
- }
- return null;
- };
- CMainWnd.prototype.getToolbarControl=function(){
- return this.m_toolbar;
- };
- CMainWnd.prototype.setCurrentFormat=function(_3c6){
- this.m_currentFormat=_3c6;
- };
- CMainWnd.prototype.updateToolbar=function(_3c7){
- this.updateCurrentFormat(_3c7,this.getCV().getWebContentRoot());
- this.updateKeepThisVersion();
- };
- CMainWnd.prototype.updateKeepThisVersion=function(){
- if(this.getCV().getStatus()=="complete"){
- var _3c8=this.getCV().getSecondaryRequests();
- var _3c9=false;
- var _3ca=false;
- var _3cb=false;
- if(_3c8){
- for(var _3cc=0;_3cc<_3c8.length;_3cc++){
- switch(_3c8[_3cc]){
- case "save":
- _3c9=true;
- break;
- case "saveAs":
- _3ca=true;
- break;
- case "email":
- _3cb=true;
- break;
- }
- }
- }
- var _3cd=this.getToolbarControl();
- if(_3cd){
- var _3ce=_3cd.getItem("keepThisVersion");
- if(_3ce){
- if(!_3c9&&!_3ca&&!_3cb){
- _3ce.hide();
- }else{
- _3ce.show();
- }
- var _3cf=_3ce.getMenu();
- if(_3c9||_3ca||_3cb){
- if(_3cf){
- var _3d0=_3cf.getItem("saveReport");
- if(_3d0){
- if(_3c9){
- _3d0.show();
- }else{
- _3d0.hide();
- }
- }
- var _3d1=_3cf.getItem("saveAsReportView");
- if(_3d1){
- if(_3ca){
- _3d1.show();
- }else{
- _3d1.hide();
- }
- }
- var _3d2=_3cf.getItem("emailReport");
- if(_3d2){
- if(_3cb){
- _3d2.show();
- }else{
- _3d2.hide();
- }
- }
- }
- }
- }
- }
- }
- };
- function CMainWnd_updateCurrentFormat(_3d3,_3d4){
- var _3d5="";
- var _3d6="";
- switch(_3d3){
- case "HTML":
- case "HTMLFragment":
- case "XHTMLFRGMT":
- _3d5=_3d4+"/rv/images/action_view_html.gif";
- _3d6=RV_RES.RV_VIEW_HTML;
- break;
- case "PDF":
- _3d5=_3d4+"/rv/images/action_view_pdf.gif";
- _3d6=RV_RES.RV_VIEW_PDF;
- break;
- case "XML":
- _3d5=_3d4+"/rv/images/action_view_xml.gif";
- _3d6=RV_RES.RV_VIEW_XML;
- break;
- }
- if(_3d5!=""&&_3d6!=""){
- var _3d7=this.getToolbarControl();
- if(_3d7){
- var _3d8=this.getCV().envParams["ui.action"]=="view";
- var _3d9=null;
- if(_3d8){
- _3d9=_3d7.getItem("viewIn");
- }else{
- _3d9=_3d7.getItem("runIn");
- }
- if(_3d9){
- _3d9.setIcon(_3d5);
- _3d9.setToolTip(_3d6);
- var sRV=this.getCVObjectRef()+".getRV().";
- _3d9.setAction("javascript:"+sRV+"viewReport('"+_3d3+"');");
- }
- }
- }
- this.setCurrentFormat(_3d3);
- };
- CMainWnd.prototype.getCurrentFormat=function(){
- return this.m_currentFormat;
- };
- function CMainWnd_getSelectionController(){
- var _3db;
- try{
- _3db=getCognosViewerSCObjectRef(this.getCV().getId());
- }
- catch(e){
- _3db=null;
- }
- return _3db;
- };
- var g_oPressTimer=null;
- var g_bLongPressDetected=false;
- var g_oPreviousValues={};
- if(window.attachEvent){
- window.attachEvent("onmouseout",f_cancelLongTouch);
- window.attachEvent("ontouchstart",onTouchStart);
- window.attachEvent("ontouchend",f_cancelLongTouch);
- window.attachEvent("ontouchleave",f_cancelLongTouch);
- window.attachEvent("ontouchcancel",f_cancelLongTouch);
- }else{
- if(window.addEventListener){
- window.addEventListener("mouseout",f_cancelLongTouch);
- window.addEventListener("touchstart",onTouchStart);
- window.addEventListener("touchend",f_cancelLongTouch);
- window.addEventListener("touchleave",f_cancelLongTouch);
- window.addEventListener("touchcancel",f_cancelLongTouch);
- }
- }
- function f_cancelLongTouch(evt){
- if(isIOS()){
- if(g_oPressTimer!==null){
- clearTimeout(g_oPressTimer);
- g_oPressTimer=null;
- }
- }
- };
- function onTouchStart(evt){
- if(isIOS()){
- g_bLongPressDetected=false;
- g_oPressTimer=setTimeout(function(){
- var node=getNodeFromEvent(evt);
- g_oPreviousValues.webkitTouchCallout=node.style.getPropertyValue("webkitTouchCallout");
- g_oPreviousValues.webkitUserSelect=node.style.getPropertyValue("webkitUserSelect");
- node.style.webkitTouchCallout="None";
- node.style.webkitUserSelect="None";
- g_bLongPressDetected=true;
- },1500);
- }
- return false;
- };
- function CMainWnd_pageClicked(evt){
- var oCV=this.getCV();
- f_cancelLongTouch(evt);
- if(this.m_showContextMenuOnClick||(isIOS()&&g_bLongPressDetected)){
- var node=getNodeFromEvent(evt);
- if(node&&typeof node.onclick!="function"&&(node.nodeName.toLowerCase()!="span"||typeof node.parentNode.onclick!="function")){
- oCV.dcm(evt,true);
- if(isIOS()&&g_bLongPressDetected){
- node.style.webkitTouchCallout=g_oPreviousValues.webkitTouchCallout;
- node.style.webkitUserSelect=g_oPreviousValues.webkitUserSelect;
- }
- return stopEventBubble(evt);
- }
- }
- this.hideOpenMenus();
- if(oCV!=null){
- if(typeof oCV.sortColumn=="undefined"||!oCV.sortColumn(evt)){
- var _3e2=oCV.getDrillMgr();
- if(_3e2){
- var _3e3=_3e2.singleClickDrillEvent(evt,"RV");
- }
- }
- }
- if(oCV.getViewerWidget()){
- oCV.getViewerWidget().updateToolbar();
- }
- setNodeFocus(evt);
- if(_3e3){
- return stopEventBubble(evt);
- }
- };
- function CMainWnd_hideOpenMenus(){
- var cm=this.getContextMenu();
- if(typeof cm!="undefined"&&cm!=null){
- cm.hide();
- }
- var tb=this.getToolbar();
- if(typeof tb!="undefined"&&tb!=null){
- tb.closeMenus();
- }
- var _3e6=this.getBannerToolbar();
- if(_3e6!="undefined"&&_3e6!=null){
- _3e6.closeMenus();
- }
- };
- function CMainWnd_draw(){
- var _3e7=this.getToolbar();
- if(_3e7&&this.m_uiBlackList.indexOf(" RV_TOOLBAR_BUTTONS ")){
- var _3e8="";
- var f=document.forms["formWarpRequest"+this.getCVId()];
- if(f["run.outputFormat"]&&f["run.outputFormat"].value){
- _3e8=f["run.outputFormat"].value;
- }else{
- if(f["ui.format"]&&f["ui.format"].value){
- _3e8=f["ui.format"].value;
- }
- }
- if(_3e8!=""){
- this.updateCurrentFormat(_3e8,this.getCV().getWebContentRoot());
- }
- _3e7.draw();
- }
- var _3ea=this.getBannerToolbar();
- if(_3ea){
- _3ea.draw();
- }
- };
- function CMainWnd_addToReportHistory(_3eb){
- this.m_reportHistoryList[this.m_reportHistoryList.length]=_3eb;
- };
- function CMainWnd_getReportHistory(){
- return this.m_reportHistoryList;
- };
- function CMainWnd_getContextMenu(){
- return this.m_contextMenu;
- };
- function CMainWnd_displayContextMenu(evt,_3ed){
- if(!this.getCV().bEnableContextMenu){
- return false;
- }
- evt=(evt)?evt:((event)?event:null);
- var _3ee=this.getSelectionController();
- if(_3ee!=null){
- var cm=this.getContextMenu();
- if(_3ed&&this.getCV().bCanUseCognosViewerSelection==true){
- if(!_3ee.pageContextClicked(evt)){
- if(typeof cm!="undefined"&&cm!=null){
- cm.m_contextMenu.remove();
- }
- return false;
- }
- }
- cm=this.getContextMenu();
- if(typeof cm!="undefined"&&cm!=null){
- cm.draw(evt);
- if(!isIE()){
- cm.m_contextMenu.m_focusCell=getNodeFromEvent(evt);
- }
- }
- var tb=this.getToolbar();
- if(typeof tb!="undefined"&&tb!=null){
- tb.closeMenus();
- }
- var _3f1=this.getBannerToolbar();
- if(_3f1!="undefined"&&_3f1!=null){
- _3f1.closeMenus();
- }
- }
- };
- function CMainWnd_getReportHistoryLength(){
- return this.m_reportHistoryList.length;
- };
- function CMainWnd_executePreviousReport(_3f2){
- if(_3f2==-1){
- _3f2=this.getReportHistoryLength()-1;
- }
- for(var i=0;i<this.getReportHistoryLength();++i){
- var _3f4=this.m_reportHistoryList[i];
- if(_3f4.getIdx()==_3f2){
- _3f4.execute();
- return;
- }
- }
- };
- function CMainWnd_getReportHistoryConversations(){
- var _3f5=[];
- var _3f6=this.getReportHistory();
- for(var _3f7=0;_3f7<_3f6.length;++_3f7){
- var _3f8=_3f6[_3f7];
- var _3f9=_3f8.getTrackingInfo();
- if(_3f9!=""){
- _3f5.push(_3f9);
- }
- }
- return _3f5;
- };
- function CMainWnd_getUIHide(){
- return this.m_uiBlackList;
- };
- CMainWnd.prototype.loadPreviousReports=function(){
- var _3fa=this.getCV().envParams["cv.previousReports"];
- if(typeof _3fa!="undefined"&&_3fa!=null){
- var _3fb=XMLBuilderLoadXMLFromString(_3fa);
- var _3fc=XMLHelper_GetFirstChildElement(_3fb);
- if(XMLHelper_GetLocalName(_3fc)=="previousReports"){
- var _3fd=_3fc.childNodes;
- for(var _3fe=0;_3fe<_3fd.length;++_3fe){
- var _3ff=_3fd[_3fe];
- var _400=_3ff.childNodes;
- var _401="";
- var _402={};
- for(var _403=0;_403<_400.length;++_403){
- var _404=_400[_403].getAttribute("name");
- switch(_404){
- case "ui.name":
- _401=XMLHelper_GetText(_400[_403]);
- break;
- default:
- _402[_404]=XMLHelper_GetText(_400[_403]);
- break;
- }
- }
- this.addToReportHistory(new CReportHistory(this,_3fe,_401,_402));
- }
- }
- }
- };
- CMainWnd.prototype.init=function(){
- this.m_uiBlackList="";
- if(typeof this.getCV().UIBlacklist=="string"){
- this.m_uiBlackList=this.getCV().UIBlacklist;
- }
- if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["isTitan"])&&(gCognosViewer.envParams["isTitan"]==true)){
- gMenuItemStyle=new CUIStyle("titanui menuItem_normal","titanui menuItem_hover","","","titanui menuItem_disabled");
- }
- this.m_contextMenu=null;
- if(this.getCV().bEnableContextMenu&&typeof CContextMenu!="undefined"&&this.m_uiBlackList.indexOf(" RV_CONTEXT_MENU ")==-1){
- this.m_contextMenu=new CContextMenu(this);
- }
- this.loadPreviousReports();
- gMenuSeperator.setWebContentRoot(this.getCV().getWebContentRoot());
- gToolbarSeperator.setWebContentRoot(this.getCV().getWebContentRoot());
- };
- CMainWnd.prototype.renderPreviousReports=function(){
- var _405=this.getToolbarControl();
- var _406=_405.getItem("previousReport");
- var _407=this.getCV().getWebContentRoot();
- var _408=this.getCV().getSkin();
- if(_406){
- var _409=_406.getMenu();
- var _40a=this.getReportHistory();
- for(var _40b=0;_40b<_40a.length;++_40b){
- var _40c=_40a[_40b];
- new CMenuItem(_409,_40c.getReportName(),"javascript:"+this.getCV().getObjectId()+".rvMainWnd.executePreviousReport("+_40b+");",_407+_40c.getDropDownMenuIcon(),gMenuItemStyle,_407,_408);
- }
- _409.draw();
- }
- };
- function CMainWnd_update(_40d){
- if(typeof _40d=="undefined"||_40d===null){
- return;
- }
- if(_40d instanceof CSelectionController){
- var _40e=this.getToolbarControl();
- if(typeof _40e!="undefined"&&_40e!=null){
- var _40f=this.getCV().getDrillMgr();
- if(_40f){
- var _410=_40e.getItem("goto");
- if(_410){
- var menu=_410.getMenu();
- if(menu){
- menu.clear();
- }
- }
- var _412=_40e.getItem("drillDown");
- if(_412){
- if(_40f.canDrillDown()){
- _412.enable();
- }else{
- _412.disable();
- }
- }
- var _413=_40e.getItem("drillUp");
- if(_413){
- if(_40f.canDrillUp()){
- _413.enable();
- }else{
- _413.disable();
- }
- }
- }
- var _414=_40e.getItem("lineage");
- if(_414){
- var _415=_40d.getAllSelectedObjects();
- if(_415!=null&&_415.length>0){
- _414.enable();
- }else{
- _414.disable();
- }
- }
- }
- var _416=this.getContextMenu();
- if(typeof _416!="undefined"&&_416!=null){
- _416.update(_40d);
- }
- }
- };
- function CMainWnd_addDrillTargets(_417){
- this.m_oCV.addDrillTargets(_417);
- };
- function CMainWnd_getDrillTargets(){
- return this.m_oCV.getDrillTargets();
- };
- function CMainWnd_getDrillTarget(idx){
- return this.m_oCV.getDrillTarget(idx);
- };
- function CMainWnd_getNumberOfDrillTargets(){
- return this.m_oCV.getNumberOfDrillTargets();
- };
- CMainWnd.prototype.renderAvailableOutputs=function(){
- var _419=this.getCVObjectRef()+".getRV().";
- var oCV=this.getCV();
- var _41b=this.getToolbarControl();
- var _41c=this.getUIHide();
- var _41d=oCV.getWebContentRoot();
- var _41e=oCV.getSkin();
- var _41f=null;
- var _420=null;
- if(typeof _41b!="undefined"&&_41b!=null){
- _41f=_41b.getItem("viewIn");
- if(_41f){
- _420=_41f.getMenu();
- }
- }
- if(_420.getNumItems()==0){
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_HTML ")==-1){
- this.m_viewInHtmlButton=new CMenuItem(_420,RV_RES.RV_VIEW_HTML,"javascript:"+_419+"viewReport('HTML');",_41d+"/rv/images/action_view_html.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.HTML==""){
- this.m_viewInHtmlButton.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_PDF ")==-1){
- this.m_viewInPDFButton=new CMenuItem(_420,RV_RES.RV_VIEW_PDF,"javascript:"+_419+"viewReport('PDF');",_41d+"/rv/images/action_view_pdf.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.PDF==""){
- this.m_viewInPDFButton.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XML ")==-1){
- this.m_viewInXMLButton=new CMenuItem(_420,RV_RES.RV_VIEW_XML,"javascript:"+_419+"viewReport('XML');",_41d+"/rv/images/action_view_xml.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.XML==""){
- this.m_viewInXMLButton.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS ")==-1){
- this.m_viewInXLSButton=new CMenuItem(_420,RV_RES.RV_VIEW_OPTIONS,"",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e);
- this.excelFormatCascadedMenu=this.m_viewInXLSButton.createCascadedMenu(gMenuStyle,RV_RES.RV_VIEW_OPTIONS);
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML_DATA ")==-1){
- this.viewInSpreadsheetMLDataMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML_DATA,"javascript:"+_419+"viewReport('xlsxData');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.xlsxData==""){
- this.viewInSpreadsheetMLDataMenuItem.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML ")==-1){
- this.viewInSpreadsheetMLMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML,"javascript:"+_419+"viewReport('spreadsheetML');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.spreadsheetML==""){
- this.viewInSpreadsheetMLMenuItem.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLWA ")==-1){
- this.viewInXLSWebArchiveMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_XLWA,"javascript:"+_419+"viewReport('XLWA');",_41d+"/rv/images/action_view_excel_2002.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.XLWA==""){
- this.viewInXLSWebArchiveMenuItem.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SINGLEXLS ")==-1){
- this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SINGLE_EXCEL,"javascript:"+_419+"viewReport('singleXLS');",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.singleXLS==""){
- this.viewInSingleXLSMenuItem.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLS ")==-1){
- this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_EXCEL,"javascript:"+_419+"viewReport('XLS');",_41d+"/rv/images/action_view_excel_2000.gif",gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.XLS==""){
- this.viewInSingleXLSMenuItem.disable();
- }
- }
- if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_CSV ")==-1){
- var _421="";
- if(getViewerDirection()=="rtl"){
- _421="/rv/images/action_view_csv_rtl.gif";
- }else{
- _421="/rv/images/action_view_csv.gif";
- }
- this.viewInCSVMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_CSV,"javascript:"+_419+"viewReport('CSV');",_41d+_421,gMenuItemStyle,_41d,_41e);
- if(oCV.oOutputFormatPath.CSV==""){
- this.viewInCSVMenuItem.disable();
- }
- }
- }
- }
- _420.draw();
- if(_420.isVisible()){
- _420.show();
- }
- };
- CMainWnd.prototype.saveReportHistoryAsXML=function(){
- var _422="";
- var _423=this.getReportHistory();
- if(_423.length>0){
- var _424=self.XMLBuilderCreateXMLDocument("previousReports");
- var _425=0;
- if(_423.length>20){
- _425=_423.length-20;
- }
- for(var _426=_425;_426<_423.length;++_426){
- _423[_426].saveAsXML(_424.documentElement);
- }
- _422=XMLBuilderSerializeNode(_424);
- }
- return _422;
- };
- CMainWnd.prototype.addCurrentReportToReportHistory=function(){
- var oCV=this.getCV();
- var _428={};
- var _429=oCV.envParams["ui.name"];
- var _42a=oCV.envParams["ui.action"];
- if(_42a=="view"){
- _428["ui.action"]="view";
- _428["ui.format"]=oCV.envParams["ui.format"];
- }else{
- _428["ui.action"]="currentPage";
- _428["ui.conversation"]=oCV.getConversation();
- _428["m_tracking"]=oCV.getTracking();
- _428["run.outputFormat"]=oCV.envParams["run.outputFormat"];
- if(oCV.envParams["rapReportInfo"]){
- _428["rapReportInfo"]=oCV.envParams["rapReportInfo"];
- }
- if(oCV.envParams.limitedInteractiveMode){
- _428.limitedInteractiveMode=oCV.envParams.limitedInteractiveMode;
- }
- if(oCV.envParams["ui.spec"]){
- _428["ui.spec"]=oCV.envParams["ui.spec"];
- }
- if(oCV.envParams.uiSpecAddedFromRun){
- _428.uiSpecAddedFromRun=oCV.envParams.uiSpecAddedFromRun;
- }
- }
- if(typeof oCV.envParams["ui.object"]!="undefined"){
- _428["ui.object"]=oCV.envParams["ui.object"];
- }else{
- _428["ui.spec"]=oCV.envParams["ui.spec"];
- _428["ui.object"]="";
- }
- _428["ui.primaryAction"]=oCV.envParams["ui.primaryAction"];
- if(oCV.envParams["ui.routingServerGroup"]){
- _428["ui.routingServerGroup"]=oCV.envParams["ui.routingServerGroup"];
- }
- this.addToReportHistory(new CReportHistory(this,this.m_reportHistoryList.length,_429,_428));
- };
- CMainWnd.prototype.draw=CMainWnd_draw;
- CMainWnd.prototype.addDrillTargets=CMainWnd_addDrillTargets;
- CMainWnd.prototype.getDrillTarget=CMainWnd_getDrillTarget;
- CMainWnd.prototype.getDrillTargets=CMainWnd_getDrillTargets;
- CMainWnd.prototype.getNumberOfDrillTargets=CMainWnd_getNumberOfDrillTargets;
- CMainWnd.prototype.addToReportHistory=CMainWnd_addToReportHistory;
- CMainWnd.prototype.getReportHistoryLength=CMainWnd_getReportHistoryLength;
- CMainWnd.prototype.getReportHistory=CMainWnd_getReportHistory;
- CMainWnd.prototype.executePreviousReport=CMainWnd_executePreviousReport;
- CMainWnd.prototype.getContextMenu=CMainWnd_getContextMenu;
- CMainWnd.prototype.displayContextMenu=CMainWnd_displayContextMenu;
- CMainWnd.prototype.hideOpenMenus=CMainWnd_hideOpenMenus;
- CMainWnd.prototype.pageClicked=CMainWnd_pageClicked;
- CMainWnd.prototype.getUIHide=CMainWnd_getUIHide;
- CMainWnd.prototype.update=CMainWnd_update;
- CMainWnd.prototype.getSelectionController=CMainWnd_getSelectionController;
- CMainWnd.prototype.getReportHistoryConversations=CMainWnd_getReportHistoryConversations;
- CMainWnd.prototype.updateCurrentFormat=CMainWnd_updateCurrentFormat;
- function resizeIFrame(evt){
- var oCV=window.gaRV_INSTANCES[0];
- var _42d=document.getElementById("CVReport"+oCV.getId());
- var _42e=document.getElementById("CVIFrame"+oCV.getId());
- if(typeof _42d!="undefined"&&_42d!=null&&typeof _42e!="undefined"&&_42e!=null){
- oCV.attachedOnResize=true;
- oCV.setMaxContentSize();
- _42e.style.height="99%";
- }
- };
- function CognosViewerAction(){
- this.m_oCV=null;
- };
- CognosViewerAction.prototype.setRequestParms=function(_42f){
- };
- 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(_435){
- return _435;
- };
- CognosViewerAction.prototype.addAdditionalOptions=function(_436){
- };
- 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 _438="";
- if(this.m_oCV!=null){
- if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){
- _438=this.m_oCV.envParams["reportpart_id"];
- }else{
- if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){
- _438=this.m_oCV.envParams["ui.name"];
- }
- }
- }
- return _438;
- };
- CognosViewerAction.prototype.getContainerId=function(_439){
- var _43a="";
- if(_439&&_439.getAllSelectedObjects){
- var _43b=_439.getAllSelectedObjects();
- if(_43b){
- var _43c=_43b[0];
- if(_43c&&_43c.getLayoutElementId){
- _43a=this.removeNamespace(_43c.getLayoutElementId());
- }
- }
- }
- return _43a;
- };
- CognosViewerAction.prototype.removeNamespace=function(_43d){
- var _43e=_43d;
- try{
- if(_43d!=""){
- var _43f=_43d.indexOf(this.m_oCV.getId());
- if(_43f!=-1){
- _43d=_43d.replace(this.m_oCV.getId(),"");
- }
- }
- return _43d;
- }
- catch(e){
- return _43e;
- }
- };
- 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 _440=-1;
- if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){
- _440=this.m_oCV.getSelectionController().getSelections().length;
- }
- return _440;
- };
- CognosViewerAction.prototype.buildDynamicMenuItem=function(_441,_442){
- _441.action={name:"LoadMenu",payload:{action:_442}};
- _441.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}];
- return _441;
- };
- CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_443){
- var oReq=new ViewerDispatcherEntry(this.getCognosViewer());
- oReq.addFormField("ui.action",_443);
- this.preProcess();
- if(this.doAddActionContext()===true){
- var _445=this.addActionContext();
- oReq.addFormField("cv.actionContext",_445);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Action context",_445,"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 _446=this.getCognosViewer().getViewerWidget();
- if(_446){
- var _447={"modified":true};
- _446.fireEvent("com.ibm.bux.widget.modified",null,_447);
- }
- }
- catch(e){
- }
- };
- CognosViewerAction.prototype.showCustomCursor=function(evt,id,_44a){
- var _44b=document.getElementById(id);
- if(_44b==null){
- _44b=document.createElement("span");
- _44b.className="customCursor";
- _44b.setAttribute("id",id);
- document.body.appendChild(_44b);
- }
- var _44c="<img src=\""+this.getCognosViewer().getWebContentRoot()+_44a+"\"/>";
- _44b.innerHTML=_44c;
- _44b.style.position="absolute";
- _44b.style.left=(evt.clientX+15)+"px";
- _44b.style.top=(evt.clientY+15)+"px";
- _44b.style.display="inline";
- };
- CognosViewerAction.prototype.hideCustomCursor=function(id){
- var _44e=document.getElementById(id);
- if(_44e!=null){
- _44e.style.display="none";
- }
- };
- CognosViewerAction.prototype.selectionHasContext=function(){
- var _44f=this.getCognosViewer().getSelectionController().getAllSelectedObjects();
- var _450=false;
- if(_44f!=null&&_44f.length>0){
- for(var i=0;i<_44f.length;i++){
- if(_44f[i].hasContextInformation()){
- _450=true;
- break;
- }
- }
- }
- return _450;
- };
- CognosViewerAction.prototype.isInteractiveDataContainer=function(_452){
- var _453=false;
- if(typeof _452!="undefined"&&_452!=null){
- var id=_452.toLowerCase();
- _453=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id);
- }
- return _453;
- };
- CognosViewerAction.prototype.getSelectedContainerId=function(){
- var _455=this.getCognosViewer();
- var _456=_455.getSelectionController();
- var _457=null;
- if(_456!=null&&typeof _456!="undefined"){
- _457=this.getContainerId(_456);
- }
- return _457;
- };
- CognosViewerAction.prototype.getSelectedReportInfo=function(){
- var _458=this.getCognosViewer();
- var _459=this.getSelectedContainerId();
- var _45a=this.getReportInfo(_459);
- if(_45a==null){
- var _45b=_458.getRAPReportInfo();
- if(_45b.getContainerCount()==1){
- _45a=_45b.getContainerFromPos(0);
- }
- }
- return _45a;
- };
- CognosViewerAction.prototype.getReportInfo=function(_45c){
- var _45d=null;
- if(_45c!=null&&_45c.length>0){
- var _45e=this.getCognosViewer();
- var _45f=_45e.getRAPReportInfo();
- _45d=_45f.getContainer(_45c);
- }
- return _45d;
- };
- CognosViewerAction.prototype.isSelectionOnChart=function(){
- var _460=this.getCognosViewer();
- if(_460.getSelectionController().hasSelectedChartNodes()){
- return true;
- }
- var _461=this.getContainerId(_460.getSelectionController());
- if(typeof _461!="undefined"){
- var _462=this.getReportInfo(_461);
- if(_462!=null&&_462.displayTypeId){
- var _463=_462.displayTypeId.toLowerCase();
- return _460.getRAPReportInfo().isChart(_463);
- }
- }
- return false;
- };
- CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){
- var _464=this.getCognosViewer().getRAPReportInfo();
- if(_464){
- return _464.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 _466=[];
- var _467=document.getElementById("rt"+this.m_oCV.getId());
- if(_467!=null){
- _466=getElementsByAttribute(_467,"*","lid");
- }
- return _466;
- };
- CognosViewerAction.prototype.addClientContextData=function(_468){
- var _469=this.m_oCV.getSelectionController();
- if(typeof _469!="undefined"&&_469!=null&&typeof _469.getCCDManager!="undefined"&&_469.getCCDManager()!=null){
- var _46a=_469.getCCDManager();
- return ("<md>"+xml_encode(_46a.MetadataToJSON())+"</md>"+"<cd>"+xml_encode(_46a.ContextDataSubsetToJSON(_468))+"</cd>");
- }
- return "";
- };
- CognosViewerAction.prototype.getDataItemInfoMap=function(){
- var _46b=this.m_oCV.getSelectionController();
- if(typeof _46b!="undefined"&&_46b!=null&&typeof _46b.getCCDManager!="undefined"&&_46b.getCCDManager()!=null){
- var _46c=_46b.getCCDManager();
- return ("<di>"+xml_encode(_46c.DataItemInfoToJSON())+"</di>");
- }
- return "";
- };
- CognosViewerAction.prototype.getRAPLayoutTag=function(_46d){
- var _46e=null;
- if(typeof _46d=="object"&&_46d!=null){
- _46e=_46d.getAttribute("rap_layout_tag");
- }
- return _46e;
- };
- CognosViewerAction.prototype.addMenuItemChecked=function(_46f,_470,_471){
- if(_46f){
- if(this.getCognosViewer().isHighContrast()){
- _470["class"]="menuItemSelected";
- }
- _470.iconClass="menuItemChecked";
- }else{
- if(_471&&_471.length>0){
- _470.iconClass=_471;
- }
- }
- };
- CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_472){
- var _473=this.getCognosViewer().getViewerWidget();
- _473.filterRequiredAction=_472;
- _473.clearRAPCache();
- _473.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"});
- };
- CognosViewerAction.prototype.addClientSideUndo=function(_474,_475){
- var _476=GUtil.generateCallback(_474.doUndo,_475,_474);
- var _477=GUtil.generateCallback(_474.doRedo,_475,_474);
- this.getUndoRedoQueue().addClientSideUndo({"tooltip":_474.getUndoHint(),"undoCallback":_476,"redoCallback":_477});
- this.getCognosViewer().getViewerWidget().updateToolbar();
- };
- CognosViewerAction.prototype.isValidMenuItem=function(){
- var _478=this.getCognosViewer();
- var _479=_478.getViewerWidget();
- if(this.isPromptWidget()){
- return false;
- }
- return true;
- };
- CognosViewerAction.prototype.isPositiveInt=function(_47a){
- if(typeof _47a==="undefined"||_47a===null){
- return false;
- }
- var _47b=parseInt(_47a,10);
- return _47a&&_47b===+_47a&&_47b>0&&_47a.indexOf(".")==-1;
- };
- CognosViewerAction.prototype.buildActionResponseObject=function(_47c,code,msg){
- return {"status":_47c,"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(_47f){
- _47f.addFormField("cv.responseFormat","asynchDetailMIMEAttachment");
- _47f.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false");
- _47f.addFormField("cv.id",this.m_oCV.envParams["cv.id"]);
- };
- LineageAction.prototype.getSelectionOptions=function(_480){
- var _481=this.m_oCV.getSelectionController();
- var _482=getSelectionContextIds(_481);
- _480.addFormField("context.format","initializer");
- _480.addFormField("context.type","reportService");
- _480.addFormField("context.selection","metadata,"+_482.toString());
- };
- LineageAction.prototype.getPrimaryRequestOptions=function(_483){
- _483.addFormField("specificationType","metadataServiceLineageSpecification");
- _483.addFormField("ui.action","runLineageSpecification");
- _483.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
- };
- LineageAction.prototype.getSecondaryRequestOptions=function(_484){
- _484.addFormField("ui.conversation",this.m_oCV.getConversation());
- _484.addFormField("m_tracking",this.m_oCV.getTracking());
- _484.addFormField("ui.action","lineage");
- };
- LineageAction.prototype.updateMenu=function(_485){
- if(!this.getCognosViewer().bCanUseLineage){
- return "";
- }
- _485.disabled=!this.selectionHasContext();
- return _485;
- };
- LineageAction.prototype.execute=function(){
- var oCV=this.getCognosViewer();
- var _487=new AsynchDataDispatcherEntry(oCV);
- this.getCommonOptions(_487);
- this.getSelectionOptions(_487);
- if(oCV.getConversation()==""){
- this.getPrimaryRequestOptions(_487);
- }else{
- this.getSecondaryRequestOptions(_487);
- }
- _487.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}});
- if(!oCV.m_viewerFragment){
- _487.setRequestIndicator(oCV.getRequestIndicator());
- var _488=new WorkingDialog(oCV);
- _488.setSimpleWorkingDialogFlag(true);
- _487.setWorkingDialog(_488);
- }
- oCV.dispatchRequest(_487);
- };
- LineageAction.prototype.handleLineageResponse=function(_489){
- var oCV=this.getCognosViewer();
- oCV.loadExtra();
- oCV.setStatus(_489.getAsynchStatus());
- oCV.setConversation(_489.getConversation());
- oCV.setTracking(_489.getTracking());
- var _48b=null;
- if(typeof MDSRV_CognosConfiguration!="undefined"){
- _48b=new MDSRV_CognosConfiguration();
- var _48c="";
- if(this.m_oCV.envParams["metadataInformationURI"]){
- _48c=this.m_oCV.envParams["metadataInformationURI"];
- }
- _48b.addProperty("lineageURI",_48c);
- _48b.addProperty("gatewayURI",this.m_oCV.getGateway());
- }
- var _48d=this.m_oCV.envParams["ui.object"];
- var _48e=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_48d));
- var _48f=new MDSRV_LineageFragmentContext(_48b,_48e);
- _48f.setExecutionParameters(this.m_oCV.getExecutionParameters());
- if(typeof _48d=="string"){
- _48f.setReportPath(_48d);
- }
- _48f.setReportLineage(_489.getResult());
- _48f.open();
- };
- function CSelectionDefaultStyles(_490){
- this.m_primarySelectionColor=null;
- this.m_highContrastBorderStyle="solid";
- this.m_secondarySelectionIsDisabled=false;
- if(_490){
- this.m_selectionController=_490;
- this.m_oCognosViewer=_490.m_oCognosViewer;
- if(this.m_oCognosViewer){
- var _491=this.m_oCognosViewer.getUIConfig();
- if(_491){
- if(_491.getPrimarySelectionColor()){
- this.m_primarySelectionColor=_491.getPrimarySelectionColor();
- }
- if(!_491.getShowSecondarySelection()){
- this.m_secondarySelectionIsDisabledConfig=true;
- }else{
- if(_491.getSeondarySelectionColor()){
- this.m_secondarySelectionColor=_491.getSeondarySelectionColor();
- }
- }
- }
- }
- }
- };
- CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_492){
- return this.m_primarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
- return this.m_secondarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
- return this.m_highContrastBorderStyle;
- };
- CSelectionDefaultStyles.prototype.canApplyToSelection=function(_493){
- return true;
- };
- CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
- return this.m_secondarySelectionIsDisabled;
- };
- CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
- };
- function CSelectionFilterStyles(_494){
- this.m_selectionController=_494;
- 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(_495){
- 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(_496){
- return !this.selectionHasOnlyMeasure(_496);
- };
- CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_497){
- return (_497.length===1&&_497[0].length===1&&this.m_selectionController.isMeasure(_497[0][0]));
- };
- CSelectionFilterStyles.prototype.setStyleForSelection=function(_498){
- this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_498))?null:this.m_primarySelectionFilterColor;
- };
- function CSelectionFilterContextMenuStyles(_499){
- CSelectionDefaultStyles.call(this,_499);
- 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(_49a){
- var _49b=this.getDataItems();
- var item="";
- if(_49b&&_49b[0]&&_49b[0][0]){
- item=this.getDataItems()[0][0];
- if(_49a&&_49a.itemInfo&&_49a.itemInfo.length){
- var _49d=_49a.itemInfo;
- for(var i=0;i<_49d.length;i++){
- if(_49d[i].item===item&&_49d[i].itemLabel){
- return _49d[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 _4a1=this.m_contextIds[i][j];
- this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_4a1)?this.m_selectionController.getRefDataItem(_4a1):"");
- }
- }
- }
- 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 _4a4=this.m_contextIds[i][j];
- this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_4a4)?this.m_selectionController.getUseValue(_4a4):"");
- }
- }
- }
- 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 _4a7=this.m_contextIds[i][j];
- this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_4a7)?this.m_selectionController.getMun(_4a7):"");
- }
- }
- }
- 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 _4aa=this.m_contextIds[i][j];
- this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_4aa)?this.m_selectionController.getRefQuery(_4aa):"");
- }
- }
- }
- return this.m_aRefQueries;
- };
- CSelectionObject.prototype.getDimensionalItems=function(_4ab){
- var _4ac=[];
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- _4ac[_4ac.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _4af=this.m_contextIds[i][j];
- var _4b0="";
- if(this.m_selectionController.isContextId(_4af)){
- switch(_4ab){
- case "hun":
- _4b0=this.m_selectionController.getHun(_4af);
- break;
- case "lun":
- _4b0=this.m_selectionController.getLun(_4af);
- break;
- case "dun":
- _4b0=this.m_selectionController.getDun(_4af);
- break;
- }
- }
- _4ac[_4ac.length-1].push(_4b0);
- }
- }
- return _4ac;
- };
- 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 _4b3=this.m_contextIds[i][j];
- var _4b4="";
- if(this.m_selectionController.isContextId(_4b3)){
- var sLun=this.m_selectionController.getLun(_4b3);
- var sHun=this.m_selectionController.getHun(_4b3);
- if(sLun&&sLun!=""){
- _4b4=sLun;
- }else{
- if(sHun&&sHun!=""){
- _4b4=sHun;
- }else{
- _4b4=this.m_selectionController.getQueryModelId(_4b3);
- }
- }
- }
- this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_4b4);
- }
- }
- }
- 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 _4b9=this.m_contextIds[i][j];
- this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_4b9)?this.m_selectionController.getDrillFlag(_4b9):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 _4ba=[];
- for(var i=0;i<this.m_contextIds.length;i++){
- for(var j=0;j<this.m_contextIds[i].length;j++){
- _4ba.push(this.m_contextIds[i][j]);
- }
- }
- this.m_selectionController.fetchContextData(_4ba);
- 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 _4c0=this.getCellRef().className;
- if(_4c0&&(_4c0=="xm"||_4c0.indexOf("xm ")!=-1||_4c0.indexOf(" xm")!=-1)){
- return true;
- }
- return false;
- };
- CSelectionObject.prototype.getDataContainerType=function(){
- return this.m_dataContainerType;
- };
- CSelectionObject.prototype.getContextJsonObject=function(_4c1,_4c2){
- if(this.m_oJsonContext===null){
- var _4c3={};
- var _4c4=[];
- var _4c5=null;
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return null;
- }
- var i=0,j=0;
- var _4c8=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4c1);
- _4c5=_4c8;
- this._populateJsonContextObj(_4c8,this.m_aUseValues[i][j],_4c1.getDisplayValue(this.m_contextIds[i][j]),_4c1.getMun(this.m_contextIds[i][j]),_4c3,_4c4);
- j++;
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _4c8=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4c1);
- if(!_4c5){
- _4c5=_4c8;
- }
- this._populateJsonContextObj(_4c8,this.m_aUseValues[i][j],_4c1.getDisplayValue(this.m_contextIds[i][j]),_4c1.getMun(this.m_contextIds[i][j]),_4c3,_4c4);
- }
- }
- this.m_oJsonContext=this._createGenericPayloadStructureJson(_4c5,_4c3,_4c4,_4c2);
- }
- return this.m_oJsonContext;
- };
- CSelectionObject.prototype._getBestPossibleItemName=function(_4c9,_4ca,_4cb){
- var _4cc=null;
- if(_4cb.isMeasure(_4ca)){
- if(!_4cb.isValidColumnTitle(this.m_oCellRef)){
- if(!_4cb.isRelational([_4ca])){
- _4cc=_4cb.getCCDManager().GetBestPossibleDimensionMeasureName(_4ca);
- }
- return (_4cc)?_4cc:_4c9;
- }
- }
- _4cc=_4cb.getCCDManager().GetBestPossibleItemName(_4ca);
- return (_4cc)?_4cc:_4c9;
- };
- 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(_4cd,_4ce,_4cf,mun,_4d1,_4d2){
- if(_4d1&&_4d2&&_4cd&&typeof _4d1[_4cd]=="undefined"){
- var _4d3=_4cf?_4cf:_4ce;
- _4d1[_4cd]=[_4d3];
- var _4d4={};
- if(_4cf){
- _4d4["caption"]=_4cf;
- }
- if(mun){
- _4d4["mun"]=mun;
- }
- if(_4ce){
- _4d4["use"]=_4ce;
- }
- _4d2.push(_4d4);
- }
- };
- CSelectionObject.prototype._createGenericPayloadStructureJson=function(_4d5,_4d6,_4d7,_4d8){
- if(_4d5&&_4d6&&_4d7){
- var _4d9=(_4d8)?_4d8:".";
- var _4da={};
- _4da[_4d9]={"values":_4d7};
- var obj={"com.ibm.widget.context":{"values":_4d6},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_4d5,"itemSpecification":_4da}}};
- return obj;
- }
- return null;
- };
- CSelectionObject.prototype.populateSelectionPayload=function(_4dc,_4dd,_4de){
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return false;
- }
- _4de=((_4de===undefined)?false:_4de);
- var _4df=this.m_selectionController;
- for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
- var _4e2=(_4de?1:this.m_aDataItems[i].length);
- for(;j<_4e2;j++){
- if(!_4df.isMeasure(this.m_contextIds[i][j])){
- var _4e3=this.m_aDataItems[i][j];
- this._populateItemInSelectionPayload(_4e3,this.m_aUseValues[i][j],_4df.getDisplayValue(this.m_contextIds[i][j]),_4df.getMun(this.m_contextIds[i][j]),_4dc,_4dd);
- }
- }
- }
- return true;
- };
- CSelectionObject.prototype._populateItemInSelectionPayload=function(_4e4,_4e5,_4e6,mun,_4e8,_4e9){
- if(_4e8&&_4e4){
- var _4ea=_4e5?_4e5:_4e6;
- if(_4e8[_4e4]){
- _4e8[_4e4].push(_4ea);
- }else{
- _4e8[_4e4]=[_4ea];
- }
- var _4eb={};
- _4eb["caption"]=_4ea;
- if(mun){
- _4eb["mun"]=mun;
- }
- var _4ec=_4e9[_4e4];
- if(!_4ec){
- _4ec={"values":[]};
- _4e9[_4e4]=_4ec;
- }
- _4ec.values.push(_4eb);
- }
- };
- 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(_4ed,_4ee){
- if(!this.m_oJsonForMarshal){
- var _4ef={};
- var _4f0=[];
- var _4f1=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 _4f4=false;
- do{
- for(;j<this.m_contextIds[i].length;j++){
- if(this.m_contextIds[i][j].length>0){
- _4f4=true;
- break;
- }
- }
- if(!_4f4){
- j=0;
- i++;
- }
- }while(!_4f4);
- }
- var _4f5=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4ed);
- var _4f6=_4ed.isMeasure(this.m_contextIds[i][j]);
- var _4f7=this._getBestPossibleItemReference(this.m_contextIds[i][j],_4f6,_4ed.getCCDManager());
- var _4f8=_4ed.getCCDManager().GetQuery(this.m_contextIds[i][j]);
- var _4f9=this.isDataValueOrChartElement();
- var _4fa=this._populateJsonForMarshal(_4f5,_4f7,_4f6,this.m_aUseValues[i][j],_4ed.getDisplayValue(this.m_contextIds[i][j]),_4ed.getMun(this.m_contextIds[i][j]),_4f9);
- j++;
- var _4fb=[];
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _4f5=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4ed);
- _4f6=_4ed.isMeasure(this.m_contextIds[i][j]);
- _4f7=this._getBestPossibleItemReference(this.m_contextIds[i][j],_4f6,_4ed.getCCDManager());
- var _4fc=this._populateJsonForMarshal(_4f5,_4f7,_4f6,this.m_aUseValues[i][j],_4ed.getDisplayValue(this.m_contextIds[i][j]),_4ed.getMun(this.m_contextIds[i][j]));
- if(_4fc){
- _4fb.push(_4fc);
- }
- }
- }
- var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
- if(lid&&lid.indexOf(_4ee)>0){
- lid=lid.substring(0,lid.indexOf(_4ee)-1);
- }
- this.m_oJsonForMarshal={"lid":lid,"query":_4f8,"selectedItem":_4fa,"context":_4fb};
- }
- return this.m_oJsonForMarshal;
- };
- CSelectionObject.prototype._populateJsonForMarshal=function(_4fe,_4ff,_500,_501,_502,mun,_504){
- if(_4fe){
- var _505={};
- _505["itemName"]=_4fe;
- _505["isMeasure"]=_500?"true":"false";
- _505["mdProperty"]=_4ff.mdProperty;
- _505["mdValue"]=_4ff.mdValue;
- _505["isDataValueOrChartElement"]=_504?"true":"false";
- if(mun){
- _505["mun"]=mun;
- }
- if(_501){
- _505["use"]=_501;
- }
- return _505;
- }
- return null;
- };
- CSelectionObject.prototype._getBestPossibleItemReference=function(_506,_507,_508){
- var _509=null;
- var _50a=null;
- if(_507){
- _50a="i";
- _509=_508.GetQMID(_506);
- if(_509==null){
- _50a="m";
- _509=_508.GetMUN(_506);
- }
- if(_509==null){
- _50a="r";
- _509=_508.GetRDIValue(_506);
- }
- }else{
- _50a="l";
- _509=_508.GetLUN(_506);
- if(_509==null){
- _50a="h";
- _509=_508.GetHUN(_506);
- }
- if(_509==null){
- _50a="i";
- _509=_508.GetQMID(_506);
- }
- if(_509==null){
- _50a="r";
- _509=_508.GetRDIValue(_506);
- }
- }
- return {"mdProperty":_50a,"mdValue":_509};
- };
- 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(_50b){
- var _50c=this.m_selectionController.getSelectedChartImageFromChartArea(_50b);
- if(_50c){
- this.m_selectedVizChart=_50c.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(_50d){
- this.m_chartCtxAreas=_50d;
- };
- CSelectionChartObject.prototype.getCtxAttributeString=function(){
- return this.m_context;
- };
- function CChartHelper(_50e,_50f,_510){
- var _511=_50e.parentNode;
- this.m_selectionObjectFactory=_50f;
- this.m_map=_511;
- _510.loadExtra();
- this.imageMapHighlighter=new CImageMapHighlight(_511,_510.sWebContentRoot);
- this.initialize();
- };
- CChartHelper.prototype.initialize=function(){
- this.buildMapCtxAreas();
- this.m_chartCtxNodes={};
- };
- CChartHelper.prototype.buildMapCtxAreas=function(){
- var _512={};
- var _513=this.m_map.childNodes;
- var _514=_513.length;
- var _515=null;
- for(var i=0;i<_514;i++){
- var a=_513[i];
- _515=a.getAttribute("ctx");
- if(_515){
- if(_512[_515]){
- _512[_515].push(a);
- }else{
- _512[_515]=[a];
- }
- }
- }
- this.m_ctxAreas=_512;
- };
- CChartHelper.prototype.getChartNode=function(_518){
- if(!this.isAreaInitialized(_518)){
- var _519=_518.parentNode;
- this.m_map=_519;
- this.initialize();
- this.imageMapHighlighter.initialize(_519);
- }
- var _51a=_518.getAttribute("ctx");
- if(!this.m_chartCtxNodes[_51a]){
- this.m_chartCtxNodes[_51a]=this.m_selectionObjectFactory.getSelectionChartObject(_518);
- this.m_chartCtxNodes[_51a].setCtxAreas(this.m_ctxAreas[_51a]);
- }
- return this.m_chartCtxNodes[_51a];
- };
- CChartHelper.prototype.isAreaInitialized=function(_51b){
- return this.imageMapHighlighter.isAreaInitialized(_51b);
- };
- CChartHelper.prototype.getImageMapHighlighter=function(){
- return this.imageMapHighlighter;
- };
- function CSelectionObjectFactory(_51c){
- this.m_selectionController=_51c;
- };
- CSelectionObjectFactory.prototype.getSelectionController=function(){
- return this.m_selectionController;
- };
- CSelectionObjectFactory.prototype.getChildSpans=function(_51d){
- var _51e=[];
- for(var i=0;i<_51d.childNodes.length;i++){
- var _520=_51d.childNodes[i];
- if(!_520.getAttribute||_520.getAttribute("skipSelection")!="true"){
- _51e.push(_51d.childNodes[i]);
- }
- }
- var _521=_51d;
- var _522="";
- while(!_522&&_521){
- _522=_521.attributes?_521.attributes["LID"]:"";
- _521=_521.parentNode;
- }
- _522=_522?_522.value:"";
- var _523=[];
- while(_51e.length>0){
- var _520=_51e.pop();
- var lid=_520.attributes?_520.attributes["LID"]:"";
- lid=lid?lid.value:"";
- if(!lid||lid==_522){
- if(_520.nodeName.toLowerCase()=="span"){
- _523.push(_520);
- }else{
- for(i=0;i<_520.childNodes.length;i++){
- _51e.push(_520.childNodes[i]);
- }
- }
- }
- }
- return _523;
- };
- CSelectionObjectFactory.prototype.getSelectionObject=function(_525,_526){
- var _527=new CSelectionObject();
- try{
- _527.setSelectionController(this.getSelectionController());
- _527.m_oCellRef=_525;
- _527.m_sColumnRef=_525.getAttribute("cid");
- _527.m_sCellTypeId=_525.getAttribute("uid");
- _527.m_sLayoutType=_525.getAttribute("type");
- _527.m_sTag=_525.getAttribute("tag");
- _527.m_layoutElementId=this.getLayoutElementId(_525);
- _527.m_dataContainerType=this.getContainerType(_525);
- if(typeof cf!="undefined"){
- var _528=cf.cfgGet("MiniQueryObj");
- if(_528){
- var _529=_528.findChildWithAttribute("tag",_527.m_sTag);
- if(_529&&_529.getAttribute("id")!=null){
- _527.m_sColumnName=_529.getAttribute("id");
- }
- }
- }
- var _52a=this.getChildSpans(_525);
- if(_52a.length>0){
- for(var i=0;i<_52a.length;i++){
- var _52c=_52a[i];
- if(_52c.nodeType==1&&_52c.nodeName.toLowerCase()=="span"&&_52c.style.visibility!="hidden"){
- var _52d=null;
- if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""){
- _52d=_525;
- }else{
- if(_52c.getAttribute("ctx")!=null&&_52c.getAttribute("ctx")!=""){
- _52d=_52c;
- }else{
- if(_52c.getAttribute("dtTargets")&&_52c.childNodes&&_52c.childNodes.length){
- for(var _52e=0;_52e<_52c.childNodes.length;_52e++){
- if(_52c.childNodes[_52e].nodeType==1&&_52c.childNodes[_52e].style.visibility!="hidden"){
- _52d=_52c.childNodes[_52e];
- }
- }
- }else{
- for(var _52f=0;_52f<_52c.childNodes.length;_52f++){
- var _530=_52c.childNodes[_52f];
- if(typeof _530.getAttribute!="undefined"&&_530.getAttribute("ctx")!=null&&_530.getAttribute("ctx")!=""){
- _52d=_530;
- break;
- }
- }
- }
- }
- }
- var _531="";
- if(_52d&&_52d.getAttribute("ctx")){
- _531=_52d.getAttribute("ctx");
- }
- _527.m_aDisplayValues[_527.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_531,_525.parentNode);
- if(typeof _526!="undefined"&&_526!=_531){
- continue;
- }
- _527=this.processCTX(_527,_531);
- }
- }
- }else{
- if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""&&_527.m_sLayoutType=="datavalue"){
- _527=this.processCTX(_527,_525.getAttribute("ctx"));
- }
- }
- this.getSelectionController().processColumnTitleNode(_527);
- }
- catch(ex){
- }
- return _527;
- };
- CSelectionObjectFactory.prototype.processCTX=function(_532,_533){
- if(typeof _533!="string"||_533.length==0){
- return _532;
- }
- var ctx;
- if(typeof _532.m_contextIds=="object"&&_532.m_contextIds!==null&&_532.m_contextIds.length>0){
- var _535=_533.split("::");
- for(ctx=0;ctx<_532.m_contextIds.length;++ctx){
- try{
- if(_535[ctx]){
- _532.m_contextIds[ctx]=_532.m_contextIds[ctx].concat(_535[ctx].split(":"));
- }
- }
- catch(e){
- }
- }
- }else{
- _532.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_533);
- }
- _532.m_ctxAttributeString=_533;
- return _532;
- };
- CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_537,_538){
- if(!_538){
- _538=document;
- }
- var _539=new CSelectionObject();
- _539.setSelectionController(this.getSelectionController());
- _539.m_oCellRef=null;
- _539.m_sColumnRef=null;
- _539.m_sCellTypeId=null;
- _539.refQuery="";
- var _53a=_538.getElementsByTagName("td");
- for(var i=0;i<_53a.length;i++){
- var _53c=_53a[i].getAttribute("tag");
- if(_53c!=null&&_53c!=""){
- if(tag==_53c){
- var _53d=_53a[i].className;
- if(_53d!=null&&_53c!=""){
- if((_537=="columnTitle"&&_53d=="lt")||(_537=="datavalue"&&_53d=="lc")){
- _539.m_sColumnRef=_53a[i].getAttribute("cid");
- _539.m_sCellTypeId=_53a[i].getAttribute("uid");
- break;
- }
- }
- }
- }
- }
- if(_539.m_sCellTypeId==null){
- return null;
- }
- return _539;
- };
- CSelectionObjectFactory.prototype.getSelectionChartObject=function(_53e){
- var _53f="";
- if(_53e.getAttribute("flashChart")!=null){
- if(typeof _53e.getCtx!="undefined"){
- try{
- _53f=_53e.getCtx();
- }
- catch(e){
- _53f="";
- }
- }
- }else{
- _53f=_53e.getAttribute("ctx");
- }
- var _540=new CSelectionChartObject();
- _540.setSelectionController(this.getSelectionController());
- if(_53f!=null){
- _540.m_contextIds=_53f.split("::");
- for(var ctx=0;ctx<_540.m_contextIds.length;++ctx){
- _540.m_contextIds[ctx]=_540.m_contextIds[ctx].split(":");
- }
- }
- _540.m_layoutElementId=this.getLayoutElementId(_53e);
- _540.m_sLayoutType=_53e.getAttribute("type");
- _540.m_chartArea=_53e;
- _540.m_context=_53f;
- _540.setSelectionOnVizChart(_53e);
- return _540;
- };
- CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_542){
- var _543="";
- switch(_542){
- case "ls":
- _543="list";
- break;
- case "xt":
- _543="crosstab";
- break;
- case "rt":
- _543="repeaterTable";
- break;
- }
- return _543;
- };
- CSelectionObjectFactory.prototype.getContainerType=function(el){
- var type="";
- if(el){
- if(el.className){
- type=this.getContainerTypeFromClass(el.className);
- }
- if(!type){
- var _546=el.parentNode;
- if(_546){
- type=this.getContainerType(_546);
- }
- }
- }
- return type;
- };
- CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
- var id="";
- var _549=this.getSelectionController().getNamespace();
- if(el){
- if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
- for(var _54a=0;_54a<el.childNodes.length;_54a++){
- var _54b=el.childNodes[_54a];
- if(_54b.nodeName.toLowerCase()=="img"&&_54b.getAttribute("lid")!=null){
- return _54b.getAttribute("lid");
- }
- }
- }
- id=(el.getAttribute&&el.getAttribute("LID"))||"";
- if(!id){
- var _54c=el.parentNode;
- if(_54c){
- id=this.getLayoutElementId(_54c);
- }
- }else{
- if(el.tagName.toUpperCase()=="MAP"){
- id=id.replace(_549,"");
- id=_549+id;
- var _54d="#"+id;
- var _54e=getElementsByAttribute(el.parentNode,"IMG","usemap",_54d);
- if(_54e.length>0){
- id=_54e[0].getAttribute("LID");
- }
- }
- }
- }
- return id;
- };
- function CSelectionController(_54f,_550){
- this.m_bSelectionBasedFeaturesEnabled=false;
- this.m_bDrillUpDownEnabled=false;
- this.m_bModelDrillThroughEnabled=false;
- this.m_oCognosViewer=null;
- this.m_bSavedSelections=false;
- if(_550){
- this.m_oCognosViewer=_550;
- }
- this.initialize(_54f);
- this.FILTER_SELECTION_STYLE=0;
- this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
- };
- CSelectionController.prototype.initialize=function(_551){
- this.m_sNamespace=_551;
- 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(_552){
- switch(_552){
- 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(_553){
- this.m_bAllowHorizontalDataValueSelection=_553;
- };
- 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(_554){
- if(!this.m_bUsingCCDManager){
- var _555=this.getReportContextDataArray();
- var _556=1;
- for(var _557 in _555){
- var _558=_555[_557];
- if(_558[_556]==_554){
- return _557;
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForDisplayValue(_554);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_55c){
- return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_55c);
- };
- 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 _563=this.getReportMetadataArray();
- var _564=0;
- for(var sKey in _563){
- var _566=_563[sKey];
- if(_566[_564]==sMun){
- var _567=2;
- var _568=this.getReportContextDataArray();
- for(var _569 in _568){
- var _56a=_568[_569];
- if(_56a[_567]==sKey){
- return _569;
- }
- }
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.canDrillDown=function(_56c){
- var _56d=this.getDrillFlagForMember(_56c);
- return (_56d==3||_56d==2);
- };
- CSelectionController.prototype.canDrillUp=function(_56e){
- var _56f=this.getDrillFlagForMember(_56e);
- return (_56f==3||_56f==1);
- };
- CSelectionController.prototype.getQueryModelId=function(_570){
- var qmid="";
- if(!this.m_bUsingCCDManager){
- var _572=this.m_aReportContextDataArray[_570];
- if(_572&&typeof _572[3]!="undefined"){
- var _573=_572[3];
- var _574=this.m_aReportMetadataArray[_573];
- if(typeof _574!="undefined"&&typeof _574[1]!="undefined"&&_574[1]=="I"){
- qmid=_574[0];
- }
- }
- }else{
- qmid=this.m_oCDManager.GetQMID(_570);
- }
- return qmid;
- };
- CSelectionController.prototype.getRefQuery=function(_575){
- if(!this.m_bUsingCCDManager){
- return this.getMetaDataItemUseValue(4,_575);
- }else{
- var _576=this.m_oCDManager.GetQuery(_575);
- return (_576==null)?"":_576;
- }
- };
- CSelectionController.prototype.getRefDataItem=function(_577){
- return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_577);
- };
- CSelectionController.prototype.getMun=function(_578){
- return this.m_oCognosViewer.getReportContextHelper().getMun(_578);
- };
- CSelectionController.prototype.getHun=function(_579){
- if(!this.m_bUsingCCDManager){
- var sHun=null;
- var _57b=this.getRDI(_579);
- if(_57b&&_57b.length>4&&_57b[1]=="R"){
- var _57c=_57b[4];
- var _57d=this.getReportMetadataArray();
- _57b=_57d[_57c];
- }
- if(_57b&&_57b.length>1&&_57b[1]=="H"){
- sHun=_57b[0];
- }
- return sHun;
- }else{
- return this.m_oCDManager.GetHUN(_579);
- }
- };
- CSelectionController.prototype.fetchContextData=function(_57e,_57f){
- var _580=0;
- if(this.m_bUsingCCDManager){
- _580=this.m_oCDManager.FetchContextData(_57e,_57f);
- }
- return _580;
- };
- CSelectionController.prototype.getMetaDataItem=function(sKey){
- var _582=this.getReportMetadataArray();
- if(typeof _582[sKey]!="undefined"){
- return _582[sKey];
- }
- return null;
- };
- CSelectionController.prototype.getContextDataItem=function(_583){
- var _584=this.getReportContextDataArray();
- if(typeof _584[_583]!="undefined"){
- return _584[_583];
- }
- return null;
- };
- CSelectionController.prototype.getMetaDataItemUseValue=function(_585,_586){
- var _587=this.getContextDataItem(_586);
- if(_587!=null){
- var _588=_587[_585];
- if(_588!=""){
- var _589=this.getMetaDataItem(_588);
- if(_589!=null){
- return _589[0];
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.getRDI=function(_58a){
- var _58b=this.getContextDataItem(_58a);
- if(_58b!=null){
- var _58c=_58b[0];
- if(_58c!=""){
- var _58d=this.getMetaDataItem(_58c);
- if(_58d!=null){
- return _58d;
- }
- }
- }
- };
- CSelectionController.prototype.getNamespace=function(){
- return this.m_sNamespace;
- };
- CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_58e){
- this.m_bSelectionBasedFeaturesEnabled=_58e;
- };
- CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
- return this.m_bSelectionBasedFeaturesEnabled;
- };
- CSelectionController.prototype.setDrillUpDownEnabled=function(_58f){
- this.m_bDrillUpDownEnabled=_58f;
- };
- CSelectionController.prototype.getDrillUpDownEnabled=function(){
- return this.m_bDrillUpDownEnabled;
- };
- CSelectionController.prototype.setModelDrillThroughEnabled=function(_590){
- this.m_bModelDrillThroughEnabled=_590;
- };
- CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
- var _591=this.getAllSelectedObjects();
- if(_591&&_591.length>0){
- var _592=_591[0];
- if(_592.hasContextInformation()){
- var _593=this.m_oCDManager.GetBIValue(_592.m_contextIds[0][0]);
- if(!_593){
- return null;
- }
- return _593;
- }
- }
- return null;
- };
- CSelectionController.prototype.getModelPathForCurrentSelection=function(){
- var _594=null;
- var _595=this.getBookletItemForCurrentSelection();
- if(_595){
- var _594=this.m_oCDManager.getModelPathFromBookletItem(_595);
- }
- return _594;
- };
- CSelectionController.prototype.getModelDrillThroughEnabled=function(){
- var _596=this.getBookletItemForCurrentSelection();
- if(_596){
- var _597=this.m_oCDManager.GetBookletModelBasedDrillThru(_596);
- return _597==1?true:false;
- }else{
- return this.m_bModelDrillThroughEnabled;
- }
- };
- CSelectionController.prototype.clearSelectedObjects=function(_598){
- try{
- if(!_598){
- _598=document;
- }
- this.updateUI(_598,this.getSelections(),true,false);
- this.m_aSelectedObjects=[];
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.resetSelections=function(_599){
- try{
- if(!_599){
- _599=document;
- }
- if(this.hasSelectedChartNodes()){
- this.resetChartSelections(_599);
- }
- this.m_oSelectedDrillThroughImage=null;
- this.m_oSelectedDrillThroughSingleton=null;
- if(this.getSelections()){
- this.updateUI(_599,this.getSelections(),true,false);
- this.updateUI(_599,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(_59a){
- var _59b=this.m_chartHelpers;
- for(var _59c in _59b){
- if(_59b[_59c]){
- var _59d=_59b[_59c].getImageMapHighlighter();
- if(_59d.hideAllAreas){
- _59d.hideAllAreas();
- }
- }
- }
- this.m_selectedChartNodes=[];
- this.m_selectionContainerMap=null;
- };
- CSelectionController.prototype.addSelectionObject=function(_59e,_59f){
- try{
- if(!_59f){
- _59f=document;
- }
- var _5a0=_59e.getCellRef();
- if(this.isCellSelected(_5a0)!==true||(typeof _5a0!="object"||_5a0===null)){
- if(this.isColumnCut(_59e.getTag())!==true){
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_59e;
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- this.updateUI(_59f,this.getSelections(),false,false);
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.removeSelectionObject=function(_5a1,_5a2){
- try{
- if(!_5a2){
- _5a2=document;
- }
- var _5a3=[];
- var _5a4;
- for(_5a4=0;_5a4<this.m_aSelectedObjects.length;_5a4++){
- var _5a5=this.m_aSelectedObjects[_5a4].getCellRef();
- var _5a6=_5a1.getCellRef();
- if(typeof _5a5=="object"&&typeof _5a6=="object"&&_5a5!==null&&_5a6!==null){
- if(_5a5==_5a6){
- _5a3[_5a3.length]=_5a4;
- }
- }
- }
- if(_5a3.length>0){
- this.updateUI(_5a2,this.getSelections(),true,false);
- var _5a7=[];
- for(_5a4=0;_5a4<this.m_aSelectedObjects.length;_5a4++){
- var _5a8=true;
- for(var j=0;j<_5a3.length;j++){
- if(_5a4==_5a3[j]){
- _5a8=false;
- }
- }
- if(_5a8){
- _5a7[_5a7.length]=this.m_aSelectedObjects[_5a4];
- }
- }
- this.m_aSelectedObjects=_5a7;
- this.updateUI(_5a2,this.getSelections(),false,false);
- }
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.isSavedCellSelected=function(_5aa){
- return this.isCellSelectedHelper(_5aa,this.getSavedSelectedObjects());
- };
- CSelectionController.prototype.isCellSelected=function(_5ab){
- return this.isCellSelectedHelper(_5ab,this.getSelections());
- };
- CSelectionController.prototype.isCellSelectedHelper=function(_5ac,_5ad){
- try{
- for(var i=0;i<_5ad.length;i++){
- var _5af=_5ad[i].getCellRef();
- if(typeof _5af=="object"&&_5af!==null){
- if(_5af==_5ac){
- return true;
- }
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnSelected=function(_5b0){
- try{
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- if(this.m_aSelectedObjects[i].getTag()==_5b0){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnCut=function(_5b2){
- try{
- for(var i=0;i<this.m_aCutColumns.length;i++){
- if(this.m_aCutColumns[i].getTag()==_5b2){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.getSelections=function(){
- return this.m_aSelectedObjects;
- };
- CSelectionController.prototype.selectSingleDomNode=function(_5b4){
- this.clearSelectedObjects();
- var _5b5=this.getSelectionObjectFactory().getSelectionObject(_5b4);
- var _5b6=null;
- if(isIE()){
- _5b6=_5b4.document;
- }else{
- _5b6=_5b4.ownerDocument;
- }
- this.addSelectionObject(_5b5,_5b6);
- };
- CSelectionController.prototype.hasCutColumns=function(){
- if(this.m_aCutColumns.length===0){
- return false;
- }else{
- return true;
- }
- };
- CSelectionController.prototype.setCutColumns=function(_5b7,_5b8){
- try{
- if(!_5b8){
- _5b8=document;
- }
- this.updateUI(_5b8,this.getSelections(),true,false);
- this.updateUI(_5b8,this.getCutColumns(),true,1);
- this.m_aCutColumns=[];
- if(_5b7===true){
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
- }
- this.m_aSelectedObjects=[];
- }
- this.updateUI(_5b8,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(_5ba){
- this.m_oObserver.attach(_5ba);
- };
- CSelectionController.prototype.onSelectionChange=function(){
- this.getObservers().notify();
- };
- CSelectionController.prototype.getSelectedColumns=function(_5bb){
- var _5bc=[];
- if(typeof _5bb=="undefined"){
- _5bb=this.getSelections();
- }
- var _5bd=_5bb.length;
- for(var i=0;i<_5bd;i++){
- var _5bf=_5bb[i];
- var _5c0=true;
- for(var j=0;j<_5bc.length;j++){
- if(_5bc[j][0]==_5bf.getColumnRef()&&_5bc[j][1]==_5bf.getCellTypeId()){
- _5c0=false;
- break;
- }
- }
- if(_5c0){
- _5bc[_5bc.length]=[_5bf.getColumnRef(),_5bf.getCellTypeId(),_5bf.getLayoutType(),_5bf.getTag(),_5bf.getColumnName()];
- }
- }
- return _5bc;
- };
- CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
- var _5c2=[];
- var _5c3=this.getAllSelectedObjects();
- for(var i=0;i<_5c3.length;i++){
- var _5c5=false;
- var _5c6=_5c3[i];
- for(var ii=0;ii<_5c2.length;ii++){
- if(_5c6.m_contextIds[0][0]==_5c2[ii].m_contextIds[0][0]){
- _5c5=true;
- break;
- }
- }
- if(!_5c5){
- _5c2.push(_5c6);
- }
- }
- return _5c2;
- };
- CSelectionController.prototype.getAllSelectedObjects=function(){
- var _5c8=this.getSelections();
- if(this.hasSelectedChartNodes()){
- _5c8=_5c8.concat(this.getSelectedChartNodes());
- }
- return _5c8;
- };
- CSelectionController.prototype.getSelectedColumnIds=function(_5c9){
- var _5ca=[];
- if(typeof _5c9=="undefined"){
- _5c9=this.getSelections();
- }
- var _5cb=this.getSelectedColumns(_5c9);
- for(var _5cc=0;_5cc<_5cb.length;_5cc++){
- var _5cd=true;
- for(var _5ce=0;_5ce<_5ca.length;_5ce++){
- if(_5ca[_5ce]==_5cb[_5cc][4]){
- _5cd=false;
- break;
- }
- }
- if(_5cd){
- _5ca[_5ca.length]=_5cb[_5cc][4];
- }
- }
- return _5ca;
- };
- var STYLE_SELECTION={};
- CSelectionController.prototype.selecting=function(c,_5d0){
- var _5d1="."+c+_5d0;
- var doc=document;
- var _5d3=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_5d3){
- doc=_5d3.contentWindow.document;
- }
- var _5d4=doc.createElement("style");
- _5d4.setAttribute("type","text/css");
- if(_5d4.styleSheet){
- _5d4.styleSheet.cssText=_5d1;
- }else{
- _5d4.appendChild(doc.createTextNode(_5d1));
- }
- doc.getElementsByTagName("head").item(0).appendChild(_5d4);
- STYLE_SELECTION[c]=_5d4;
- };
- CSelectionController.prototype.deselecting=function(_5d5){
- for(var i=0;i<_5d5.length;++i){
- if(STYLE_SELECTION[_5d5[i]]){
- var node=STYLE_SELECTION[_5d5[i]];
- node.parentNode.removeChild(node);
- STYLE_SELECTION[_5d5[i]]=null;
- }
- }
- if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
- var _5d8=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
- if(_5d8!=null){
- var _5d9=_5d8.style.display;
- _5d8.style.display="none";
- _5d8.style.display=_5d9;
- }
- }
- };
- 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 _5dd=(ss.cssRules?ss.cssRules:ss.rules);
- for(var j=0;j<_5dd.length;j++){
- var cr=_5dd[j];
- var _5e0=new RegExp("\\b"+c+"\\b","g");
- if(cr.selectorText&&cr.selectorText.match(_5e0)){
- return cr;
- }
- }
- }
- return 0;
- };
- CSelectionController.prototype.canUpdateSelection=function(_5e1){
- return this.m_selectionStyles.canApplyToSelection(_5e1);
- };
- CSelectionController.prototype.setStyleForSelection=function(_5e2){
- return this.m_selectionStyles.setStyleForSelection(_5e2);
- };
- CSelectionController.prototype.updateUI=function(_5e3,_5e4,_5e5,_5e6){
- if(!_5e3){
- _5e3=document;
- }
- try{
- if(_5e4&&_5e4.length>0){
- var _5e7,_5e8,_5e9;
- if(_5e6==1||_5e6==2){
- if(_5e5){
- this.deselecting(this.m_cutClass);
- }else{
- var _5ea=getStyleFromClass("cutSelection").style.color;
- var _5eb=getStyleFromClass("cutSelection").style.backgroundColor;
- _5e7=_5e4.length;
- for(_5e8=0;_5e8<_5e7;_5e8++){
- _5e9=_5e4[_5e8].getCellRef();
- var _5ec="cutQS"+_5e9.getAttribute("cid");
- this.selecting(_5ec,"\n{ background-color: "+_5eb+"; color: "+_5ea+";}\n");
- this.m_cutClass.push(_5ec);
- }
- }
- }else{
- if(this.m_oCognosViewer){
- this.findSelectionURLs();
- _5e9="";
- _5e7=_5e4.length;
- for(_5e8=0;_5e8<_5e7;_5e8++){
- _5e9=_5e4[_5e8].getCellRef();
- if(_5e9.getAttribute("oldClassName")!=null){
- _5e9.className=_5e9.getAttribute("oldClassName");
- _5e9.removeAttribute("oldClassName");
- }
- this.setStyleForSelection(_5e4[_5e8].m_contextIds);
- if(!this.secondarySelectionIsDisabled()||_5e5){
- var _5ed=document.getElementById("CVReport"+this.getNamespace());
- var _5ee=getElementsByAttribute(_5ed,["td","th"],"name",_5e9.getAttribute("name"),this.m_maxSecondarySelection);
- for(var _5ef=0;_5ef<_5ee.length;_5ef++){
- var cell=_5ee[_5ef];
- if(_5e5){
- this.restoreOldBackgroundImage(cell);
- }else{
- if(cell.getAttribute("oldBackgroundImageStyle")==null){
- this.saveOldCellStyles(cell);
- this.setSecondarySelectionStyles(cell);
- }
- }
- }
- }
- this.saveOldCellStyles(_5e9);
- if(_5e5){
- this.restoreOldBackgroundImage(_5e9);
- if(this.m_oCognosViewer.isHighContrast()){
- this.restoreOldBorder(_5e9);
- this.restoreOldPadding(_5e9);
- }
- }else{
- this.setPrimarySelectionStyles(_5e9);
- if(this.m_oCognosViewer.isHighContrast()){
- var size=getBoxInfo(_5e9,true);
- this.saveOldBorder(_5e9);
- this.saveOldPadding(_5e9,size);
- var _5f2=3;
- var _5f3=size.borderTopWidth+size.paddingTop-_5f2;
- var _5f4=size.borderBottomWidth+size.paddingBottom-_5f2;
- var _5f5=size.borderLeftWidth+size.paddingLeft-_5f2;
- var _5f6=size.borderRightWidth+size.paddingRight-_5f2;
- _5e9.style.border=_5f2+"px "+this.getHighContrastBorderStyle()+" black";
- _5e9.style.padding=_5f3+"px "+_5f6+"px "+_5f4+"px "+_5f5+"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(_5f7){
- var _5f8=true;
- var _5f9=_5f7.getAttribute("rsvpChart");
- var _5fa=_5f7.parentNode.getAttribute("chartContainer");
- if(_5f9!="true"&&_5fa!="true"){
- this.m_selectedChartNodes=[];
- _5f8=false;
- }else{
- var _5fb=this.getSelectionObjectFactory().getSelectionChartObject(_5f7);
- this.m_selectedChartNodes=[_5fb];
- }
- return _5f8;
- };
- CSelectionController.prototype.setSelectedChartArea=function(_5fc,e){
- var _5fe=typeof this.m_oCognosViewer.isBux!=="undefined";
- var _5ff=false;
- if(_5fc!==null){
- if(_5fc.tagName=="IMG"){
- _5ff=this.setSelectedChartImgArea(_5fc);
- }else{
- if(_5fc.nodeName=="AREA"&&_5fc.attributes["ctx"]){
- _5ff=true;
- if(_5fe){
- this.setBuxSelectedChartArea(_5fc,e);
- }else{
- this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_5fc)];
- }
- }
- }
- if(_5ff){
- this.getObservers().notify();
- }
- }
- return _5ff;
- };
- CSelectionController.prototype.setBuxSelectedChartArea=function(_600,e){
- var _602=this.getChartHelper(_600);
- var _603=_602.getChartNode(_600);
- this.setStyleForSelection(_603.m_contextIds);
- var _604=_602.getImageMapHighlighter();
- _604.setFillColour(this.getPrimarySelectionColor());
- _604.setStrokeColour(this.getPrimarySelectionColor());
- if(typeof e=="undefined"){
- e={};
- }
- if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
- if(_604.isAreaHighlighted(_600)){
- _604.hideAreas(_603.getCtxAreas());
- var _605=_600.getAttribute("ctx");
- var _606=this.m_selectedChartNodes.length;
- for(var i=0;i<_606;i++){
- var _608=this.m_selectedChartNodes[i];
- if(_605==_608.getContext()){
- this.m_selectedChartNodes.splice(i,1);
- break;
- }
- }
- }else{
- this.updateSelectionContainer(_600);
- _604.highlightAreas(_603.getCtxAreas(),true);
- this.m_selectedChartNodes.push(_603);
- }
- }else{
- if(this.hasSavedSelectedChartNodes()){
- var _609=this.m_savedSelectedChartNodes.length;
- var _60a=this.m_savedSelectedChartNodes;
- for(var i=0;i<_609;i++){
- var area=_60a[i].getArea();
- var _60c=this.getSavedChartHelper(area);
- var _60d=_60c.getImageMapHighlighter();
- var _60e=_60d.getAreaId(area);
- if(_604.getAreaId(_600)===_60e){
- _60d.hideAreaById(_60e+this.m_savedPrimarySelectionColor);
- break;
- }
- }
- }
- this.updateSelectionContainer(_600);
- _604.highlightAreas(_603.getCtxAreas());
- this.m_selectedChartNodes=[_603];
- }
- };
- CSelectionController.prototype.updateSelectionContainer=function(_60f){
- var _610=_60f.parentNode;
- if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_610.name){
- var _611=this.getChartHelper(_60f).getImageMapHighlighter();
- _611.hideAllAreas();
- }
- this.m_selectionContainerMap=_610;
- };
- CSelectionController.prototype.getChartHelper=function(_612){
- var _613=_612.parentNode;
- var _614=_613.name;
- if(!this.m_chartHelpers[_614]){
- this.m_chartHelpers[_614]=new CChartHelper(_612,this.getSelectionObjectFactory(),this.m_oCognosViewer);
- }
- return this.m_chartHelpers[_614];
- };
- CSelectionController.prototype.getSavedChartHelper=function(_615){
- var _616=_615.parentNode;
- var _617=_616.name;
- return this.m_savedChartHelpers[_617];
- };
- 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 _618=null;
- if(this.hasSelectedChartNodes()){
- var _619=this.m_selectedChartNodes[0];
- _618=_619.getArea();
- }
- if(_618===null){
- return null;
- }
- if(_618.tagName=="IMG"){
- return _618;
- }
- return this.getSelectedChartImageFromChartArea(_618);
- };
- CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_61a){
- var _61b=_61a.parentNode;
- var _61c="#"+_61b.getAttribute("name");
- return this.checkChildrenForChart(_61b.parentNode,_61c);
- };
- CSelectionController.prototype.checkChildrenForChart=function(_61d,_61e){
- var _61f=_61d.firstChild;
- while(_61f!==null){
- if(!_61f.tagName){
- return null;
- }else{
- if(_61f.tagName=="IMG"&&_61f.getAttribute("usemap")==_61e){
- return _61f;
- }else{
- if(_61f.tagName==="DIV"||_61f.tagName==="SPAN"){
- var _620=this.checkChildrenForChart(_61f,_61e);
- if(_620){
- return _620;
- }
- }
- }
- }
- _61f=_61f.nextSibling;
- }
- return null;
- };
- CSelectionController.prototype.downloadSelectedChartImage=function(_621){
- var _622=this.getSelectedChartImage();
- if(_622!==null){
- var _623=this.getDocumentFromImage(_622);
- var _624=_622.name.replace(".","_");
- var _625=_624.substr(5);
- var _626="?m_name=";
- _626+=_625;
- _626+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
- if(isIE()){
- _624=_623.parentWindow.eval("graphicSrc"+_625);
- }else{
- _624=_623.defaultView.eval("graphicSrc"+_625);
- }
- var _627="";
- if(typeof _624!="undefined"&&_624!==null){
- var _628=_624.split("&");
- if(_628.length===0){
- return;
- }
- if(_624.indexOf("/repository/")<0){
- for(var i=0;i<_628.length;++i){
- var _62a=_628[i];
- var _62b=_62a.indexOf("=");
- if(_62b!=-1){
- var _62c=_62a.substr(0,_62b);
- var _62d=_62a.slice(_62b+1);
- if(_62c=="search"){
- _627+=_62d;
- break;
- }
- }
- }
- }
- if(_627==""){
- _626=_622.getAttribute("src");
- if(_626.indexOf("?")!=-1){
- _626+="&download=true";
- }else{
- _626+="?download=true";
- }
- }
- if(typeof getConfigFrame=="function"){
- _626+=_627;
- _626=getConfigFrame().constructGETRequestParamsString(_626);
- window.open(_626,"_blank","width=0,height=0");
- }else{
- _626=constructGETRequestParamsString(_626);
- _626+=_627;
- var _62e=this.m_oCognosViewer.getGateway();
- var _62f=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_62f){
- var _630=_62f.src;
- if(_630.indexOf("repository")>=0&&_626.indexOf("repository")<0){
- var _631=_630.indexOf("content");
- _626=_630.substring(0,_631)+_626;
- }
- }
- if(_626.indexOf(_62e)==-1){
- var _632=document.forms["formWarpRequest"+_621];
- _626=_632.action+_626;
- }
- if(typeof window.detachLeavingRV=="function"){
- window.detachLeavingRV();
- }
- location.href=_626;
- if(typeof window.attachLeavingRV=="function"){
- setTimeout(window.attachLeavingRV,100);
- }
- }
- }
- }
- };
- CSelectionController.prototype.getDocumentFromImage=function(_633){
- var _634=null;
- if(_633.ownerDocument){
- _634=_633.ownerDocument;
- }else{
- _634=_633.document;
- }
- return _634;
- };
- CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
- var _636=this.getSelections();
- if(_636.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 _638=this.getSelectionObjectFactory().getContainerType(node);
- if(_638==="list"){
- for(var i=0;i<_636.length;i++){
- if(_636[i].m_oCellRef==node){
- return false;
- }
- }
- }
- }
- }
- return true;
- };
- CSelectionController.prototype.getContainerType=function(){
- var _63a="";
- if(this.hasSelectedChartNodes()){
- _63a="chart";
- }else{
- if(this.getDataContainerType()==="list"){
- _63a="list";
- }else{
- _63a="crosstab";
- }
- }
- return _63a;
- };
- CSelectionController.prototype.getDisplayValues=function(){
- var _63b={};
- var _63c=this.getAllSelectedObjects()[0];
- if(_63c){
- var _63d=_63c.getSelectedContextIds();
- if(_63d){
- for(var axis=0;axis<_63d.length;axis++){
- var _63f=[];
- var _640=_63d[axis];
- for(var _641=0;_641<_640.length;_641++){
- var _642=_640[_641];
- var _643=this.getDisplayValue(_642);
- _63f.push(_643);
- if(axis===0){
- break;
- }
- }
- var _644="";
- switch(axis){
- case 0:
- _644="selected";
- break;
- case 1:
- _644="rows";
- break;
- default:
- _644="columns";
- }
- _63b[_644]=_63f;
- }
- }
- }
- return _63b;
- };
- CSelectionController.prototype.getChartTooltip=function(){
- var _645=this.getAllSelectedObjects()[0];
- if(_645){
- var area=_645.getArea();
- if(area){
- var _647=area.getAttribute("title");
- if(_647&&_647.length>0){
- return area.getAttribute("title");
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.pageClickedForMobile=function(e){
- this.pageClicked(e);
- var _649=this.getAllSelectedObjects().length;
- if(_649==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 _64b=this.m_savedChartHelpers;
- for(var _64c in _64b){
- if(_64b[_64c]){
- var _64d=_64b[_64c].getImageMapHighlighter();
- if(_64d.hideAllAreas){
- _64d.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 _64e=this.m_aSelectedObjects.length;
- var temp=[];
- for(var i=0;i<_64e;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 _651=this.m_selectedChartNodes.length;
- var temp=[];
- for(var i=0;i<_651;i++){
- if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
- var _652=this.m_selectedChartNodes[i].getArea();
- var _653=this.getImageMapName(_652);
- this.m_chartHelpers[_653]=this.m_savedChartHelpers[_653];
- delete this.m_savedChartHelpers[_653];
- 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(_654){
- var _655=_654.parentNode;
- return _655.name;
- };
- CSelectionController.prototype.repaintBUXSelectedChartArea=function(_656,_657,_658){
- var _659={};
- var _65a=_656.length;
- for(var i=0;i<_65a;i++){
- var _65c=_656[i].getArea();
- var _65d=this.getImageMapName(_65c);
- var _65e;
- if(!_659[_65d]){
- _65e=(_657)?this.getSavedChartHelper(_65c):this.getChartHelper(_65c);
- _659[_65d]=_65e;
- var _65f=_65e.getImageMapHighlighter();
- _65f.hideAllAreas();
- _65f.setFillColour(this.getPrimarySelectionColor());
- _65f.setStrokeColour(this.getPrimarySelectionColor());
- }else{
- _65e=_659[_65d];
- }
- var _660=_656[i].m_contextIds;
- if(_658&&_660.length===1&&_660[0].length===1&&this.isMeasure(_660[0][0])){
- continue;
- }
- _65f.highlightAreas(_656[i].getCtxAreas(),1);
- }
- };
- CSelectionController.prototype.repaintSavedSelections=function(){
- var _661=this.m_selectionStyles;
- this.m_selectionStyles=this.m_savedSelectionStyles;
- var _662=this.getSavedSelectedChartNodes();
- var _663=false;
- if(_662&&_662.length>0){
- bIsChart=true;
- }else{
- _662=this.getSavedSelectedObjects();
- }
- this.repaintSelectionsHelper(_662,true,_663);
- this.resetSelectionStyles();
- this.m_selectionStyles=_661;
- };
- CSelectionController.prototype.repaintSelections=function(){
- var _664=this.getSelectedChartNodes();
- var _665=false;
- if(_664&&_664.length>0){
- _665=true;
- }else{
- _664=this.getSelections();
- }
- this.repaintSelectionsHelper(_664,false,_665);
- };
- CSelectionController.prototype.repaintSelectionsHelper=function(_666,_667,_668){
- try{
- if(_668){
- this.repaintBUXSelectedChartArea(_666,_667);
- }else{
- this.updateUI(document,_666,true,false);
- this.updateUI(document,_666,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 _66b=node;
- if(!_66b.getAttribute("uid")){
- var _66c=_66b.parentNode;
- if(_66c&&_66c.nodeType==1&&typeof _66c.getAttribute!="undefined"&&_66c.getAttribute("uid")!=null){
- _66b=_66c;
- }
- }
- if(this.isCellSelected(_66b)){
- 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 _66d=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 _66e=node;
- node=node.selectedCell;
- _66e.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(_66d);
- }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 _66f=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,_674){
- var _675=this.getCtxIdFromMun(sMun);
- if(_675==""){
- _675=this.getCtxIdFromMetaData(sLun,sHun,_674);
- }
- if(_675!=null&&this.m_oCDManager.GetUsage(_675)!="2"){
- var _676=document.getElementById("rt"+this.getNamespace());
- if(_676!=null){
- var _677=getElementsByAttribute(_676,"*","ctx",_675);
- if(_677&&_677.length===0){
- var _678=new RegExp("(^|:)"+_675+"(:|$)","i");
- _677=getElementsByAttribute(_676,"*","ctx",_675,-1,_678);
- }
- var _679=null;
- if(_677!=null&&_677.length>0){
- _679=new CSelectionObject();
- _679.setSelectionController(this);
- _679.m_sColumnRef=_677[0].getAttribute("cid");
- _679.m_sCellTypeId=_677[0].getAttribute("uid");
- _679.m_sLayoutType=_677[0].getAttribute("type");
- _679.m_sTag=_677[0].getAttribute("tag");
- _679.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_677[0]);
- _679.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_677[0]);
- _679.m_contextIds=[[_675]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679;
- }else{
- var _67a=getElementsByAttribute(_676,"*","flashChart","true");
- if(_67a!=null){
- for(var _67b=0;_67b<_67a.length;++_67b){
- var ldx=_67a[_67b].getLDX();
- if(ldx.indexOf("<ctx>"+_675+"</ctx>")!=-1){
- _679=new CSelectionObject();
- _679.setSelectionController(this);
- var lid=_67a[_67b].getAttribute("lid");
- _679.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
- _679.m_dataContainerType="chart";
- _679.m_contextIds=[[_675]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679;
- }
- }
- }
- }
- }
- }
- };
- CSelectionController.prototype.buildSelectionObject=function(node,e){
- var _680=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 _683=node.childNodes;
- for(var i=0;i<_683.length;i++){
- if(_683[i].nodeName.toUpperCase()=="TABLE"&&(_683[i].className=="ls"||_683[i].className=="xt")){
- var trs=_683[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){
- _680=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _680=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- }
- }
- catch(e){
- }
- return _680;
- };
- 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(_68b){
- var _68c=false;
- if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_68b||!_68b.length){
- return false;
- }
- for(var i=0;i<_68b.length;i++){
- if(this.isSavedCellSelected(_68b[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 _690=null;
- if(isIE()){
- _690=node.document;
- }else{
- _690=node.ownerDocument;
- }
- var ctx=node.getAttribute("ctx");
- var uid=node.getAttribute("uid");
- var _693=false;
- if(typeof e=="undefined"){
- e={};
- }
- var _694=false;
- if(typeof g_reportSelectionController!="undefined"){
- _694=this.checkForReportElementNode(node);
- }
- if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_694==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
- if(this.getSelections().length>0){
- _693=true;
- }
- if(this.hasCutColumns()==true){
- this.clearSelectedObjects(_690);
- }else{
- this.resetSelections(_690);
- 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(_690);
- }
- if(typeof g_reportSelectionController!="undefined"&&_694==false){
- if(g_reportSelectionController.getSelections().length>0){
- _693=true;
- }
- g_reportSelectionController.clearSelections();
- }
- }
- var _695=node.getAttribute("dtTargets")?node:null;
- var _696=(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 _697;
- var _698=3;
- do{
- node=node.parentNode;
- if(node){
- _695=(!_695&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_695;
- uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
- _697=node.nodeName.toLowerCase();
- }
- }while((uid==null)&&node&&(--_698>0)&&(_697=="span"||_697=="div"));
- }
- if(uid!=null){
- var _699=node.childNodes;
- for(var i=0;i<_699.length;i++){
- if(_699[i].nodeName.toUpperCase()=="TABLE"&&(_699[i].className=="ls"||_699[i].className=="xt")){
- var trs=_699[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 _69f;
- if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
- _69f=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _69f=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- if(this.isCellSelected(node)==false){
- if(this.shiftKeyPressed(e)){
- var _6a0=this.getSelections();
- if(_6a0.length>0){
- var _6a1=_6a0[_6a0.length-1];
- if(_6a1.getLayoutType()==_69f.getLayoutType()&&(_6a1.getCellRef().parentNode.parentNode==_69f.getCellRef().parentNode.parentNode)){
- if(this.cellsAreInSameColumn(_6a1.getCellRef(),_69f.getCellRef())){
- this.selectVertical(_6a1,_69f,_690);
- }else{
- if(_6a1.getCellRef().parentNode.rowIndex==_69f.getCellRef().parentNode.rowIndex){
- this.selectHorizontal(_6a1,_69f,_690);
- }
- }
- }
- }
- clearTextSelection(_690);
- }else{
- if(this.ctrlKeyPressed(e)){
- clearTextSelection(_690);
- }
- }
- this.addSelectionObject(_69f,_690);
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_69f.getColumnName());
- }
- this.m_oCognosViewer.setCurrentNodeFocus(node);
- }else{
- if(this.ctrlKeyPressed(e)){
- this.removeSelectionObject(_69f,_690);
- if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
- if(!this.isColumnSelected(_69f.getTag())){
- cf.removeSelectionFromCfgVariables(_69f.getTag());
- }
- }
- clearTextSelection(_690);
- }else{
- if(this.shiftKeyPressed(e)){
- clearTextSelection(_690);
- }
- }
- }
- _693=true;
- }else{
- if(_694){
- var _6a2=null;
- while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
- node=node.parentNode;
- }
- if(node.id=="reportTitle"){
- _6a2="TitleStyle";
- }else{
- if(node.id=="reportSubtitle"){
- _6a2="SubtitleStyle";
- }else{
- if(node.id.indexOf("reportFilter")==0){
- _6a2="FilterStyle";
- }
- }
- }
- if(_6a2!=null){
- selectReportElement(e,node.id,_6a2);
- _693=true;
- }
- }else{
- if(_695!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_696){
- var _69f=this.getSelectionObjectFactory().getSelectionObject(_695);
- this.addSelectionObject(_69f,_690);
- }
- }
- }
- if(_693==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(_6a5){
- this.m_aReportContextDataArray=_6a5;
- };
- CSelectionController.prototype.setupMetaDataArray=function(_6a6){
- this.m_aReportMetadataArray=_6a6;
- };
- CSelectionController.prototype.addContextData=function(_6a7){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetContextData(_6a7);
- 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(_6a9){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetMetadata(_6a9);
- if(!this.m_bUsingCCDManager){
- this.m_bUsingCCDManager=true;
- }
- };
- CSelectionController.prototype.getDrillFlag=function(_6aa){
- var _6ab="";
- if(!this.m_bUsingCCDManager){
- var _6ac=this.m_aReportContextDataArray[_6aa];
- var _6ad=_6ac[0];
- var _6ae=this.m_aReportMetadataArray[_6ad];
- if(typeof _6ae!="undefined"&&typeof _6ae[3]!="undefined"){
- _6ab=_6ae[3];
- }
- }else{
- _6ab=this.m_oCDManager.GetDrillFlag(_6aa);
- }
- return _6ab;
- };
- CSelectionController.prototype.getDrillFlagForMember=function(_6af){
- var _6b0="0";
- if(!this.m_bUsingCCDManager){
- var _6b1=this.getContextDataItem(_6af);
- if(_6b1!=null){
- var _6b2=_6b1[2];
- if(_6b2!=""){
- var _6b3=_6b1[0];
- var _6b4=this.getMetaDataItem(_6b3);
- if(_6b4!=null){
- _6b0=_6b4[3];
- }
- }
- }
- }else{
- _6b0=this.m_oCDManager.GetDrillFlagForMember(_6af);
- }
- return (_6b0==null)?0:_6b0;
- };
- CSelectionController.prototype.getDataType=function(_6b5){
- var _6b6=null;
- if(!this.m_bUsingCCDManager){
- var _6b7=this.getRDI(_6b5);
- if(_6b7&&_6b7.length>2){
- _6b6=parseInt(_6b7[2],10);
- }
- }else{
- _6b6=parseInt(this.m_oCDManager.GetDataType(_6b5),10);
- }
- return _6b6;
- };
- CSelectionController.prototype.getUsageInfo=function(_6b8){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetUsage(_6b8);
- }
- };
- CSelectionController.prototype.isMeasure=function(_6b9){
- return (this.getUsageInfo(_6b9)==this.c_usageMeasure);
- };
- CSelectionController.prototype.getDepth=function(_6ba){
- var _6bb=null;
- if(!this.m_bUsingCCDManager){
- var _6bc=this.getRDI(_6ba);
- if(_6bc&&_6bc.length>5&&_6bc[1]=="R"){
- _6bb=_6bc[5];
- }
- }else{
- _6bb=this.m_oCDManager.GetDepth(_6ba);
- }
- return _6bb;
- };
- CSelectionController.prototype.getUseValue=function(_6bd){
- var _6be="";
- if(!this.m_bUsingCCDManager){
- var _6bf=this.m_aReportContextDataArray[_6bd];
- if(typeof _6bf[1]!="undefined"){
- _6be=_6bf[1];
- }
- }else{
- _6be=this.m_oCDManager.GetDisplayValue(_6bd);
- }
- return _6be;
- };
- CSelectionController.prototype.getTextValue=function(_6c0){
- var _6c1=null;
- for(var _6c2=0;_6c2<_6c0.length;_6c2++){
- if(_6c0[_6c2].style.visisbility!="hidden"){
- if(isIE()){
- _6c1=_6c0[_6c2].innerText;
- }else{
- _6c1=_6c0[_6c2].textContent;
- }
- var _6c3=_6c0[_6c2].nextSibling;
- while(_6c3!=null){
- if(_6c3.nodeName.toUpperCase()=="SPAN"&&_6c3.style.visibility!="hidden"){
- if(isIE()){
- _6c1+=_6c3.innerText;
- }else{
- _6c1+=_6c3.textContent;
- }
- }
- _6c3=_6c3.nextSibling;
- }
- break;
- }
- }
- return _6c1;
- };
- CSelectionController.prototype.getDisplayValueFromDOM=function(_6c4,_6c5){
- var _6c6=null;
- var _6c7;
- var _6c8=new RegExp("(^|\\s)"+_6c4+"(\\s|$|:)","i");
- if(typeof _6c5!="undefined"){
- _6c7=getElementsByAttribute(_6c5,["span","td","th"],"ctx",_6c4,1,_6c8);
- }else{
- var _6c9=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(typeof _6c9=="undefined"||_6c9==null){
- var _6ca=document.getElementById("RVContent"+this.m_sNamespace);
- if(typeof _6ca=="undefined"||_6ca==null){
- _6c7=getElementsByAttribute(document.body,["span","td","th"],"ctx",_6c4,1,_6c8);
- }else{
- _6c7=getElementsByAttribute(_6ca,["span","td","th"],"ctx",_6c4,1,_6c8);
- }
- }else{
- _6c7=getElementsByAttribute(_6c9.contentWindow.document.body,["span","td","th"],"ctx",_6c4,1,_6c8);
- }
- }
- var _6cb;
- if(_6c7.length>0&&(_6c7[0].nodeName.toUpperCase()=="TD"||_6c7[0].nodeName.toUpperCase()=="TH")){
- _6cb=_6c7[0].childNodes;
- }else{
- _6cb=_6c7;
- }
- if(_6cb.length==0||(_6cb[0].className.indexOf("chart_area")==-1&&_6cb[0].className.indexOf("bux-comment")==-1)){
- _6c6=this.getTextValue(_6cb);
- }
- return _6c6;
- };
- CSelectionController.prototype.getDisplayValue=function(_6cc,_6cd){
- var _6ce=this.getDisplayValueFromDOM(_6cc,_6cd);
- if(_6ce==null){
- _6ce=this.getUseValue(_6cc);
- }
- return _6ce;
- };
- CSelectionController.prototype.getDun=function(_6cf){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetDUN(_6cf);
- }else{
- var _6d0=this.m_aReportContextDataArray[_6cf];
- if(_6d0&&typeof _6d0[5]!="undefined"){
- var _6d1=_6d0[5];
- var _6d2=this.m_aReportMetadataArray[_6d1];
- if(typeof _6d2!="undefined"&&typeof _6d2[1]!="undefined"&&_6d2[1]=="D"){
- return _6d2[0];
- }
- }
- }
- };
- CSelectionController.prototype.getPun=function(_6d3){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetPUN(_6d3);
- }
- };
- CSelectionController.prototype.getLun=function(_6d4){
- var lun="";
- if(!this.m_bUsingCCDManager){
- var _6d6=this.m_aReportContextDataArray[_6d4];
- if(_6d6&&typeof _6d6[3]!="undefined"){
- var _6d7=_6d6[3];
- var _6d8=this.m_aReportMetadataArray[_6d7];
- if(typeof _6d8!="undefined"&&typeof _6d8[1]!="undefined"&&_6d8[1]=="L"){
- lun=_6d8[0];
- }
- }
- }else{
- lun=this.m_oCDManager.GetLUN(_6d4);
- }
- return lun;
- };
- CSelectionController.prototype.isContextId=function(_6d9){
- var _6da=false;
- if(!this.m_bUsingCCDManager){
- var _6db=this.m_aReportContextDataArray[_6d9];
- _6da=(typeof _6db=="object");
- }else{
- this.m_oCDManager.FetchContextData([_6d9]);
- _6da=this.m_oCDManager.ContextIdExists(_6d9);
- }
- return _6da;
- };
- CSelectionController.prototype.hasContextData=function(){
- var _6dc=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
- return true;
- }
- }else{
- _6dc=this.m_oCDManager.HasContextData();
- }
- return _6dc;
- };
- CSelectionController.prototype.hasMetadata=function(){
- var _6dd=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
- return true;
- }
- }else{
- _6dd=this.m_oCDManager.HasMetadata();
- }
- return _6dd;
- };
- CSelectionController.prototype.getDifferentCellIndex=function(_6de,_6df,_6e0){
- for(var i=0;i<_6de.cells.length;i++){
- if(this.getSelectionObjectFactory().getSelectionObject(_6de.cells[i]).getLayoutType()=="datavalue"){
- break;
- }
- }
- if(_6e0=="relative"){
- return (_6df-i);
- }else{
- if(_6e0=="actual"){
- return (_6df+i);
- }
- }
- };
- CSelectionController.prototype.cellsAreInSameColumn=function(_6e2,_6e3){
- if(_6e2.parentNode.rowIndex==_6e3.parentNode.rowIndex){
- return false;
- }
- if(_6e2.getAttribute("cid")===null){
- if(_6e2.getAttribute("uid")===_6e3.getAttribute("uid")){
- if(_6e2.getAttribute("type")!="datavalue"){
- return true;
- }else{
- if(this.getDifferentCellIndex(_6e2.parentNode,_6e2.cellIndex,"relative")==this.getDifferentCellIndex(_6e3.parentNode,_6e3.cellIndex,"relative")){
- return true;
- }
- }
- }else{
- return false;
- }
- }else{
- if(_6e2.getAttribute("cid")===_6e3.getAttribute("cid")){
- return true;
- }else{
- return false;
- }
- }
- };
- CSelectionController.prototype.selectVertical=function(_6e4,_6e5,_6e6){
- if(!_6e6){
- _6e6=document;
- }
- var _6e7=_6e4.getCellRef().parentNode;
- var _6e8,i;
- var _6ea=(_6e4.getCellRef().parentNode.rowIndex<_6e5.getCellRef().parentNode.rowIndex);
- var _6eb=(_6e4.getCellRef().parentNode.cells.length-_6e4.getCellRef().cellIndex);
- while(_6e7.rowIndex!=_6e5.getCellRef().parentNode.rowIndex){
- if(_6ea){
- _6e7=_6e7.nextSibling;
- }else{
- _6e7=_6e7.previousSibling;
- }
- if(_6e7==null){
- break;
- }
- if(_6e7.cells.length>=_6eb){
- for(i=0;i<_6e7.cells.length;i++){
- if((_6e7.cells[i].getAttribute("type")==_6e4.getLayoutType())&&this.cellsAreInSameColumn(_6e4.getCellRef(),_6e7.cells[i])){
- _6e8=this.getSelectionObjectFactory().getSelectionObject(_6e7.cells[i]);
- if(this.addSelectionObject(_6e8,_6e6)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_6e8.getColumnName());
- }
- }
- break;
- }
- }
- }
- }
- };
- CSelectionController.prototype.selectHorizontal=function(_6ec,_6ed,_6ee){
- var _6ef="";
- if(_6ec.getColumnRef()==null){
- if(_6ec.getCellRef().getAttribute("uid")==_6ed.getCellRef().getAttribute("uid")){
- _6ef=_6ec.getCellRef().getAttribute("uid");
- }else{
- return;
- }
- }
- var _6f0,_6f1;
- var _6f2=_6ed.getCellRef().parentNode;
- var _6f3;
- if(_6ed.getCellRef().cellIndex<_6ec.getCellRef().cellIndex){
- _6f0=_6ed.getCellRef().cellIndex;
- _6f1=_6ec.getCellRef().cellIndex;
- }else{
- _6f1=_6ed.getCellRef().cellIndex;
- _6f0=_6ec.getCellRef().cellIndex;
- }
- for(var i=_6f0+1;i<_6f1;i++){
- if(((_6ec.getColumnRef()!=null)&&(_6ec.getLayoutType()==_6ed.getLayoutType())&&(_6ec.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_6ec.getColumnRef()==null)&&(_6f2.cells[i].getAttribute("uid")==_6ef))){
- _6f3=this.getSelectionObjectFactory().getSelectionObject(_6f2.cells[i]);
- if(this.addSelectionObject(_6f3,_6ee)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_6f3.getColumnName());
- }
- }
- }
- }
- };
- CSelectionController.prototype.pageDoubleClicked=function(e){
- try{
- var node=getNodeFromEvent(e);
- if(typeof node.selectedCell!="undefined"){
- var _6f7=node;
- node=node.selectedCell;
- _6f7.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(_6fa){
- this.m_aSelectionHoverNodes=_6fa;
- };
- 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 _6fe=this.getSelectionHoverNodes();
- var _6ff=this.getAllSelectedObjects().length;
- if(!(_6fe.length==1&&_6fe[0]==node)){
- for(var i=0;i<_6fe.length;i++){
- this.sortIconHover(_6fe[i],true);
- if(_6ff==0){
- this.pageChangeHover(_6fe[i],true);
- }
- }
- this.setSelectionHoverNodes([]);
- if(_6ff==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,_702){
- if(!this.isValidColumnTitle(node)){
- return false;
- }
- var _703=this.getSortImgNode(node);
- if(_703!=null&&_703!="undefined"){
- if(_703.getAttribute("sortOrder")==="nosort"){
- if(_702){
- _703.style.visibility="hidden";
- }else{
- _703.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,_707){
- 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 _708=this.isColumnSelected(node.getAttribute("tag"));
- if(!_708){
- _708=this.isColumnCut(node.getAttribute("tag"));
- }
- if(!_708){
- if(_707){
- 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 _70a=node.getElementsByTagName("img");
- for(var i=0;i<_70a.length;i++){
- var sId=_70a[i].id.toString();
- if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
- node=_70a[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,_717){
- if(node&&node.style&&node.style[_717]){
- return node.style[_717];
- }
- 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 _71b=node;
- node=node.selectedCell;
- _71b.removeAttribute("selectedCell");
- }
- while(node!=null&&node.tagName!="TD"){
- node=node.parentNode;
- }
- if(node!=null){
- var _71c=this.getBackgroundImage(node);
- this.findSelectionURLs();
- if(this.getSelections().length==0||_71c!=this.pS_backgroundImageURL){
- this.pageClicked(e);
- }
- }
- if(typeof populateContextMenu!="undefined"){
- populateContextMenu();
- moveContextMenu(e);
- }
- var _71d=false;
- if(this.showViewerContextMenu()){
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- _71d=true;
- }
- return _71d;
- };
- 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,_720,sId){
- if(typeof populateContextMenu!="undefined"){
- goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_720);
- goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
- populateContextMenu(_720.toUpperCase());
- moveContextMenu(e,_720.toUpperCase());
- }
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- return false;
- };
- CSelectionController.prototype.selectionsAreAllSameType=function(){
- var _722=this.getSelections();
- if(_722.length>0){
- var _723=_722[0].getLayoutType();
- for(var i=1;i<_722.length;i++){
- if(_723!=_722[i].getLayoutType()){
- return 0;
- }
- }
- return 1;
- }
- return -1;
- };
- CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
- var _725=this.getSelections();
- var i=0;
- if(_725.length>0){
- var _727=_725[0].getColumnRef();
- if(_727!=null&&_727!=""){
- for(i=1;i<_725.length;i++){
- if(_727!=_725[i].getColumnRef()){
- return false;
- }
- }
- }else{
- var _728=_725[0].getCellTypeId();
- for(i=1;i<_725.length;i++){
- if(_728!=_725[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 _72a=node.parentNode;
- while(typeof _72a!="undefined"&&_72a!=null){
- if(typeof _72a.className!="undefined"&&_72a.className!=null&&_72a.className.substr(0,2)=="ft"){
- node=_72a;
- break;
- }else{
- _72a=_72a.parentNode;
- }
- }
- }else{
- return false;
- }
- }
- var _72b=node.className.substr(0,2);
- if(_72b=="ta"||_72b=="ts"||_72b=="ft"){
- return true;
- }
- }
- return false;
- };
- CSelectionController.prototype.chartClicked=function(_72c){
- this.setSelectedChartArea(_72c);
- };
- CSelectionController.prototype.processColumnTitleNode=function(_72d){
- if(!_72d||!this.m_oCognosViewer.isBux){
- return;
- }
- var _72e=_72d.getCellRef();
- if(_72e.getAttribute("contextAugmented")=="true"||"list"!=_72d.getDataContainerType()||"columnTitle"!=_72d.getLayoutType()){
- return;
- }
- var _72f=_72d.getSelectedContextIds();
- var _730=false;
- if(typeof _72f=="object"&&_72f!=null&&_72f.length>0){
- if(this.isRelational(_72f)&&this.getQueryModelId(_72f[0][0])==null){
- _730=true;
- }else{
- return;
- }
- }
- var lid=_72e.parentNode.parentNode.parentNode.getAttribute("lid");
- var _732=_72e.parentNode.nextSibling;
- var _733=getChildElementsByAttribute(_732,"td","cid",_72e.getAttribute("cid"));
- var _734=null;
- var _735=true;
- var _736;
- if(_733.length>0){
- var _737=_733[0];
- var _738=_737.childNodes.length;
- for(var _739=0;_739<_738;_739++){
- var _73a=_737.childNodes[_739];
- if(_73a.getAttribute&&((_73a.nodeName.toLowerCase()=="table"&&typeof _73a.getAttribute("lid")=="string")||_73a.nodeName.toLowerCase()=="map"||_73a.nodeName.toLowerCase()=="img"||_73a.getAttribute("chartcontainer")=="true")){
- if(_739==0){
- _735=false;
- }
- }else{
- _736=[];
- if(_73a.nodeName.toLowerCase()=="span"){
- _736.push(_73a);
- }
- var _73b=_73a.getElementsByTagName?_73a.getElementsByTagName("span"):[];
- for(var _73c=0;_73c<_73b.length;++_73c){
- if(lid==getImmediateLayoutContainerId(_73b[_73c])){
- _736.push(_73b[_73c]);
- }
- }
- for(var _73d=0;_73d<_736.length;++_73d){
- var _73e=_736[_73d];
- if(_73e.nodeType==1&&_73e.nodeName.toLowerCase()=="span"&&_73e.style.visibility!="hidden"){
- if(_73e.getAttribute("ctx")!=null&&_73e.getAttribute("ctx")!=""){
- _734=_73e.getAttribute("ctx");
- break;
- }
- }
- }
- }
- }
- }
- if(_734!=null){
- var _73f=_734.split("::")[0].split(":")[0];
- if(!_730){
- _736=_72e.getElementsByTagName("span");
- if(_736.length!=0){
- var _740=this.m_oCDManager.m_cd[_73f];
- var _741=this.getTextValue(_736);
- var _742={"u":_741===null?"":_741};
- if(typeof _740!="undefined"){
- if(typeof _740["r"]!="undefined"){
- _742.r=_740["r"];
- }
- if(typeof _740["q"]!="undefined"){
- _742.q=_740["q"];
- }
- if(typeof _740["i"]!="undefined"){
- _742.i=_740["i"];
- }
- }
- var _743="cloned"+_73f;
- this.m_oCDManager.m_cd[_743]=_742;
- _736[0].setAttribute("ctx",_743);
- _72d=this.getSelectionObjectFactory().processCTX(_72d,_743);
- }
- }else{
- var qmid=this.getQueryModelId(_73f);
- if(qmid==null){
- }
- if(qmid!=null){
- var _745=_72f[0][0];
- this.m_oCDManager.m_cd[_745].i=this.m_oCDManager.m_cd[_73f].i;
- return false;
- }
- }
- }else{
- _735=false;
- }
- if(!_735){
- _72e.setAttribute("canSort","false");
- }
- _72e.setAttribute("contextAugmented","true");
- };
- CSelectionController.prototype.selectionsInSameDataContainer=function(){
- try{
- var _746=this.getAllSelectedObjects();
- var _747=_746[0].getLayoutElementId();
- for(var _748=1;_748<_746.length;_748++){
- if(_747!=_746[_748].getLayoutElementId()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsFromSameDataItem=function(){
- try{
- var _749=this.getAllSelectedObjects();
- var _74a=_749[0].getDataItems()[0][0];
- for(var _74b=1;_74b<_749.length;_74b++){
- if(_74a!=_749[_74b].getDataItems()[0][0]){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isRelational=function(_74c){
- try{
- if(!_74c){
- var _74d=this.getAllSelectedObjects()[0];
- _74c=_74d.getSelectedContextIds();
- }
- for(var _74e=0;_74e<_74c.length;_74e++){
- for(var _74f=0;_74f<_74c[_74e].length;_74f++){
- var ctx=_74c[_74e][_74f];
- 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 _754=this.getAllSelectedObjects();
- for(var _755=0;_755<_754.length;_755++){
- var _756=_754[_755];
- if(_756.getLayoutType()!="columnTitle"||_756.isHomeCell()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreMeasures=function(){
- try{
- var _757=this.getAllSelectedObjects();
- for(var _758=0;_758<_757.length;_758++){
- var _759=_757[_758];
- if(this.getUsageInfo(_759.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
- var _75a=this.getAllSelectedObjects();
- if(_75a.length==0){
- return false;
- }
- for(var _75b=0;_75b<_75a.length;_75b++){
- var _75c=_75a[0];
- if(_75c.getSelectedContextIds().length==0){
- return false;
- }
- var _75d=_75c.getSelectedContextIds()[0][0];
- var mun=this.getMun(_75d);
- var _75f=this.getUsageInfo(_75d);
- if(mun==null||typeof mun=="undefined"||mun.length==0||_75f==this.c_usageMeasure){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
- var _760=this.getAllSelectedObjects();
- if(_760.length==0){
- return false;
- }
- var _761=this.selectionsHaveCalculationMetadata();
- for(var _762=0;_762<_760.length;_762++){
- var _763=_760[_762];
- var _764=_763.getSelectedContextIds()[0][0];
- if(!this.isCalculationOrMeasure(_764,_761)){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
- try{
- var _765=this.getDataContainerType();
- var _766=this.getAllSelectedObjects();
- for(var _767=0;_767<_766.length;_767++){
- var _768=_766[_767];
- var _769=_768.getSelectedContextIds();
- var _76a=_769[0][0];
- var sHun=this.getHun(_76a);
- if(!this.hasCalculationMetadata(_76a,_769,_765)){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isCalculationOrMeasure=function(_76c,_76d){
- var mun=this.getMun(_76c);
- var _76f=this.getUsageInfo(_76c);
- if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_76d)||_76f==this.c_usageMeasure)){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.hasCalculationMetadata=function(_770,_771,_772){
- var sHun=this.getHun(_770);
- if(this.getUsageInfo(_770)!=this.c_usageMeasure){
- if((this.isRelational(_771)&&this.getQueryModelId(_770)!=null)||(!this.isRelational(_771)&&_772=="list"&&(sHun&&sHun!=""))){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreDateTime=function(){
- try{
- var _774=this.getAllSelectedObjects();
- for(var _775=0;_775<_774.length;_775++){
- var _776=_774[_775];
- var _777=_776.getSelectedContextIds();
- var _778=_777[0][0];
- var _779=this.getDataType(_778);
- if(_779&&typeof this.m_ccl_dateTypes[_779]!=="undefined"){
- return true;
- }
- }
- }
- catch(e){
- return false;
- }
- return false;
- };
- CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
- try{
- var _77a=this.getAllSelectedObjects();
- if(_77a===null||_77a.length<=0){
- return null;
- }
- var _77b=this.m_oCognosViewer.getModelPath();
- var _77c=[];
- for(var i=0;i<_77a.length;i++){
- var obj=_77a[i].getContextJsonObject(this,_77b);
- _77c.push(obj);
- }
- return _77c;
- }
- 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(_77f){
- if(!_77f){
- _77f=document;
- }
- try{
- if(typeof _77f.selection=="object"&&_77f.selection!==null){
- _77f.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 _781;
- try{
- _781=getCognosViewerSCObjectRef(this.getCV().getId());
- }
- catch(e){
- _781=null;
- }
- return _781;
- };
- CDrillManager.prototype.getSelectedObject=function(){
- var _782=this.getSelectionController();
- if(_782==null){
- return null;
- }
- var _783=null;
- var _784=null;
- if(_782.hasSelectedChartNodes()){
- _784=_782.getSelectedChartNodes();
- }else{
- _784=_782.getSelections();
- }
- if(_784&&_784.length==1){
- _783=_784[0];
- }
- return _783;
- };
- 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(_785){
- if(typeof _785=="undefined"){
- _785=this.getSelectedObject();
- }
- if(_785==null){
- return false;
- }
- var _786=_785.getMuns();
- var muns="";
- for(var _788=0;_788<_786.length&&muns=="";++_788){
- if(typeof _786[_788][0]!="undefined"){
- muns+=_786[_788][0];
- }
- }
- return (muns!="");
- };
- CDrillManager.prototype.getRefQuery=function(){
- var _789="";
- var _78a=this.getSelectedObject();
- if(_78a==null){
- return "";
- }
- var _78b=_78a.getRefQueries();
- for(var i=0;i<_78b.length;i++){
- if(_78b[i]!=null){
- for(var j=0;j<_78b[i].length;j++){
- if(_78b[i][j]!=null&&_78b[i][j]!=""){
- return _78b[i][j];
- }
- }
- }
- }
- return _789;
- };
- CDrillManager.prototype.isIsolated=function(){
- var _78e=this.getSelectionController();
- if(_78e==null||_78e.getDrillUpDownEnabled()==false){
- return false;
- }
- var _78f=this.getSelectedObject();
- if(_78f==null){
- return false;
- }
- if(_78f instanceof CSelectionChartObject&&_78e!=null){
- var _790=_78f.getArea();
- if(_790!=null){
- var _791=_790.getAttribute("isolated");
- if(typeof _791!="undefined"&&_791!=null&&_791=="true"){
- return true;
- }
- }
- }else{
- var _792=_78f.getCellRef();
- if(typeof _792=="object"&&_792!=null){
- var _793=_792.getElementsByTagName("span");
- if(_793!=null&&typeof _793!="undefined"&&_793.length>0){
- var _794=_793[0].getAttribute("isolated");
- if(_794!=null&&_794!="undefined"&&_794=="true"){
- return true;
- }
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.getDrillOption=function(_795){
- var _796=this.getSelectionController();
- if(_796==null||_796.getDrillUpDownEnabled()==false||typeof _795=="undefined"){
- return false;
- }
- var _797=this.getSelectedObject();
- if(_797==null){
- return false;
- }
- if(this.isIsolated()){
- if(_795=="drillDown"){
- return false;
- }else{
- if(_795=="drillUp"){
- return true;
- }
- }
- }
- if(_795=="drillDown"){
- if(_797 instanceof CSelectionChartObject&&_796!=null){
- var _798=_797.getArea();
- if(_798!=null){
- var _799=_798.getAttribute("isChartTitle");
- if(typeof _799!="undefined"&&_799!=null&&_799=="true"){
- return false;
- }
- }
- }
- }
- var _79a=_797.getDrillOptions();
- var _79b=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV));
- for(var idx=0;idx<_79a.length;++idx){
- var _79d=(_79b)?_79a[idx].length:1;
- for(var _79e=0;_79e<_79d;++_79e){
- var _79f=_79a[idx][_79e];
- if(_79f=="3"){
- return true;
- }else{
- if(_795=="drillUp"&&_79f=="1"){
- return true;
- }else{
- if(_795=="drillDown"&&_79f=="2"){
- return true;
- }
- }
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.canDrillThrough=function(){
- var _7a0=this.getSelectionController();
- if(_7a0==null||_7a0.getModelDrillThroughEnabled()==false){
- return false;
- }
- return true;
- };
- CDrillManager.prototype.singleClickDrillEvent=function(evt,app){
- var _7a3=this.getSelectionController();
- if(_7a3!=null){
- if(this.getCV().bCanUseCognosViewerSelection==true){
- _7a3.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(_7a9,_7aa,_7ab,_7ac){
- var _7ad=[];
- var _7ae=this.getSelectedObject();
- if(_7ae==null){
- return _7ad;
- }
- if(typeof _7aa=="undefined"){
- _7aa=true;
- }
- var _7af=_7ae.getDataItems();
- var _7b0=_7ae.getMuns();
- var _7b1=_7ae.getDimensionalItems("lun");
- var _7b2=_7ae.getDimensionalItems("hun");
- var _7b3=_7ae.getDrillOptions();
- if(typeof _7af=="undefined"||typeof _7b0=="undefined"||typeof _7b3=="undefined"||_7b0==null||_7af==null||_7b3==null){
- return _7ad;
- }
- if(_7b0.length!=_7af.length){
- return _7ad;
- }
- var _7b4=_7b0.length;
- for(var _7b5=0;_7b5<_7b4;++_7b5){
- if(_7af[_7b5].length!=0){
- var _7b6=(_7ac)?this.findUserSelectedDrillItem(_7ac,_7af[_7b5]):0;
- if(_7b6<0){
- continue;
- }
- if((_7ab===true)||this.getDrillOption(_7a9)){
- if(_7b0[_7b5][_7b6]==""||_7ad.toString().indexOf(_7b0[_7b5][_7b6],0)==-1){
- _7ad[_7ad.length]=_7af[_7b5][_7b6];
- _7ad[_7ad.length]=_7b0[_7b5][_7b6];
- if(_7aa===true){
- _7ad[_7ad.length]=_7b1[_7b5][_7b6];
- _7ad[_7ad.length]=_7b2[_7b5][_7b6];
- }
- }
- }
- }
- }
- return _7ad;
- };
- CDrillManager.prototype.findUserSelectedDrillItem=function(_7b7,_7b8){
- for(var _7b9=0;_7b9<_7b8.length;++_7b9){
- if(_7b7==_7b8[_7b9]){
- return _7b9;
- }
- }
- return -1;
- };
- CDrillManager.prototype.getModelDrillThroughContext=function(_7ba){
- var _7bb="";
- if(this.canDrillThrough()===true){
- if(typeof gUseNewSelectionContext=="undefined"){
- var _7bc="";
- if(typeof getConfigFrame!="undefined"){
- _7bc=decodeURIComponent(getConfigFrame().cfgGet("PackageBase"));
- }else{
- if(this.getCV().getModelPath()!==""){
- _7bc=this.getCV().getModelPath();
- }
- }
- _7bb=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_7bc));
- }else{
- var _7bd=new CParameterValues();
- var _7be=this.getSelectionController();
- if(_7be){
- var _7bf=_7be.getAllSelectedObjects();
- for(var _7c0=0;_7c0<_7bf.length;++_7c0){
- var _7c1=_7bf[_7c0];
- var _7c2=_7c1.getMuns();
- var _7c3=_7c1.getMetadataItems();
- var _7c4=_7c1.getUseValues();
- for(var _7c5=0;_7c5<_7c3.length;++_7c5){
- for(var idx=0;idx<_7c3[_7c5].length;++idx){
- if(_7c3[_7c5][idx]==null||_7c3[_7c5][idx]==""){
- continue;
- }
- var name=_7c3[_7c5][idx];
- var _7c8;
- if(_7c2[_7c5][idx]!=null&&_7c2[_7c5][idx]!=""){
- _7c8=_7c2[_7c5][idx];
- }else{
- _7c8=_7c4[_7c5][idx];
- }
- var _7c9=_7c4[_7c5][idx];
- _7bd.addSimpleParmValueItem(name,_7c8,_7c9,"true");
- }
- }
- }
- }
- var _7ca=_7ba.XMLBuilderCreateXMLDocument("context");
- _7bb=_7bd.generateXML(_7ba,_7ca);
- }
- }
- return _7bb;
- };
- CDrillManager.prototype.rvDrillUp=function(_7cb){
- this.getCV().executeAction("DrillUp",_7cb);
- };
- CDrillManager.prototype.rvDrillDown=function(_7cc){
- this.getCV().executeAction("DrillDown",_7cc);
- };
- CDrillManager.prototype.rvBuildXMLDrillParameters=function(_7cd,_7ce){
- var _7cf=this.getDrillParameters(_7cd,true,false,_7ce);
- if(_7cf.length==0){
- return drillParams;
- }
- return this.buildDrillParametersSpecification(_7cf);
- };
- CDrillManager.prototype.buildDrillParametersSpecification=function(_7d0){
- var _7d1="<DrillParameters>";
- var idx=0;
- while(idx<_7d0.length){
- _7d1+="<DrillGroup>";
- _7d1+="<DataItem>";
- _7d1+=sXmlEncode(_7d0[idx++]);
- _7d1+="</DataItem>";
- _7d1+="<MUN>";
- _7d1+=sXmlEncode(_7d0[idx++]);
- _7d1+="</MUN>";
- _7d1+="<LUN>";
- _7d1+=sXmlEncode(_7d0[idx++]);
- _7d1+="</LUN>";
- _7d1+="<HUN>";
- _7d1+=sXmlEncode(_7d0[idx++]);
- _7d1+="</HUN>";
- _7d1+="</DrillGroup>";
- }
- _7d1+="</DrillParameters>";
- return _7d1;
- };
- CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){
- var _7d3=null;
- var _7d4=this.getAuthoredDrillThroughTargets();
- if(_7d4.length>0){
- var _7d5="<AuthoredDrillTargets>";
- for(var _7d6=0;_7d6<_7d4.length;++_7d6){
- _7d5+=eval("\""+_7d4[_7d6]+"\"");
- }
- _7d5+="</AuthoredDrillTargets>";
- var cv=this.getCV();
- var _7d8=cv.getAction("AuthoredDrill");
- var _7d9=cv.getDrillTargets();
- if(_7d9.length>0){
- _7d3=_7d8.getAuthoredDrillThroughContext(_7d5,_7d9);
- }
- }
- return _7d3;
- };
- CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){
- var _7da="";
- var _7db=this.getAuthoredDrillsForCurrentSelection();
- if(_7db){
- _7da=XMLBuilderSerializeNode(_7db);
- }
- return _7da;
- };
- CDrillManager.prototype.launchGoToPage=function(_7dc,_7dd){
- var _7de=this.getSelectionController();
- if((_7de!=null&&_7de.getModelDrillThroughEnabled()==true)||(typeof _7dc!="undefined"&&_7dc!=null&&_7dc!="")){
- var _7df=this.getAuthoredDrillsForGotoPage();
- var _7e0=this.getModelDrillThroughContext(self);
- var form=document.getElementById("drillForm");
- if(form!=null){
- document.body.removeChild(form);
- }
- form=document.createElement("form");
- var cvid=this.getCVId();
- var _7e3=document.forms["formWarpRequest"+cvid];
- form.setAttribute("id","drillForm");
- form.setAttribute("name","drillForm");
- form.setAttribute("target",_7e3.getAttribute("target"));
- form.setAttribute("method","post");
- form.setAttribute("action",_7e3.getAttribute("action"));
- form.style.display="none";
- document.body.appendChild(form);
- if(this.getCV().getModelPath()!==""){
- form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath()));
- }
- if(typeof _7e3["ui.object"]!="undefined"&&_7e3["ui.object"].value!=""){
- form.appendChild(createFormField("drillSource",_7e3["ui.object"].value));
- }else{
- if(typeof this.getCV().envParams["ui.spec"]!="undefined"){
- form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"]));
- }
- }
- if(_7df!=""){
- form.appendChild(createHiddenFormField("m","portal/drillthrough.xts"));
- form.appendChild(createFormField("invokeGotoPage","true"));
- form.appendChild(createFormField("m","portal/drillthrough.xts"));
- form.appendChild(createFormField("modelDrillEnabled",_7de.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",_7df));
- if(typeof gUseNewSelectionContext=="undefined"){
- form.appendChild(createHiddenFormField("drillContext",_7e0));
- }else{
- form.appendChild(createHiddenFormField("modeledDrillthru",_7e0));
- }
- form.appendChild(createHiddenFormField("errURL","javascript:window.close();"));
- if(typeof _7dd!="undefined"&&_7dd==true){
- form.appendChild(this.createFormField("directLaunch","true"));
- }
- var _7e4="";
- if(this.getCV().envParams["ui.routingServerGroup"]){
- _7e4=this.getCV().envParams["ui.routingServerGroup"];
- }
- form.appendChild(createHiddenFormField("ui.routingServerGroup",_7e4));
- if(this.getCV().getExecutionParameters()!=""){
- form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters()));
- }
- if(_7e3.lang&&_7e3.lang.value!=""){
- form.appendChild(createHiddenFormField("lang",_7e3.lang.value));
- }
- if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){
- if(typeof this.getCV().launchGotoPage==="function"){
- this.getCV().launchGotoPage(form);
- }else{
- var _7e5="winNAT_"+(new Date()).getTime();
- var _7e6=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid;
- window.open(_7e6,_7e5,"toolbar,location,status,menubar,resizable,scrollbars=1");
- form.target=_7e5;
- }
- }
- }
- };
- CDrillManager.prototype.buildSearchPageXML=function(_7e7,pkg,_7e9,_7ea,_7eb,_7ec,_7ed){
- var _7ee=null;
- if(typeof _7e7.XMLElement=="function"){
- _7ee=_7e7.XMLBuilderCreateXMLDocument("cognosSearch");
- _7e7.XMLBuilderSetAttributeNodeNS(_7ee.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/");
- var _7ef=_7ee.createElement("package");
- if(typeof pkg=="string"&&pkg!==""){
- _7ef.appendChild(_7ee.createTextNode(pkg));
- }
- _7ee.documentElement.appendChild(_7ef);
- var _7f0=_7ee.createElement("model");
- if(typeof _7e9=="string"&&_7e9!==""){
- _7f0.appendChild(_7ee.createTextNode(_7e9));
- }
- _7ee.documentElement.appendChild(_7f0);
- var _7f1=_7ee.createElement("selectedContext");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _7ee.documentElement.appendChild(_7f1);
- for(var _7f2 in _7ea){
- var _7f3=_7ee.createElement("item");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f3,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
- var _7f4=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_7ee);
- _7e7.XMLBuilderSetAttributeNodeNS(_7f4,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _7f4.appendChild(_7ee.createTextNode(_7ea[_7f2].name));
- var _7f5=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_7ee);
- _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- for(var j=0;j<_7ea[_7f2].values.length;j++){
- var _7f7=_7ee.createElement("item");
- _7e7.XMLBuilderSetAttributeNodeNS(_7f7,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- var _7f8=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7ee);
- _7e7.XMLBuilderSetAttributeNodeNS(_7f8,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _7f8.appendChild(_7ee.createTextNode(_7ea[_7f2].values[j][0]));
- var _7f9=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7ee);
- _7e7.XMLBuilderSetAttributeNodeNS(_7f9,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- var _7fa=_7ea[_7f2].values[j][1]==null?"":_7ea[_7f2].values[j][1];
- _7f9.appendChild(_7ee.createTextNode(_7fa));
- _7f7.appendChild(_7f8);
- _7f7.appendChild(_7f9);
- _7f5.appendChild(_7f7);
- }
- _7f3.appendChild(_7f4);
- _7f3.appendChild(_7f5);
- _7f1.appendChild(_7f3);
- }
- var _7fb=_7ee.createElement("defaultMeasure");
- _7ee.documentElement.appendChild(_7fb);
- _7ec.buildXML(_7e7,_7ee,"data");
- var _7fc=_7ee.createElement("filter");
- _7ee.documentElement.appendChild(_7fc);
- }
- return _7ee;
- };
- CDrillManager.prototype.openSearchPage=function(_7fd,_7fe){
- this.getModelDrillThroughContext(self);
- var _7ff=document.getElementById("searchPage");
- if(_7ff!=null){
- document.body.removeChild(_7ff);
- }
- _7ff=document.createElement("form");
- _7ff.setAttribute("id","searchPage");
- _7ff.setAttribute("name","searchPage");
- _7ff.setAttribute("method","post");
- _7ff.setAttribute("target",_7ff.name);
- _7ff.setAttribute("action",this.getCV().getGateway()+"/gosearch");
- _7ff.style.display="none";
- document.body.appendChild(_7ff);
- _7ff.appendChild(createHiddenFormField("csn.action","search"));
- _7ff.appendChild(createHiddenFormField("csn.drill",_7fe));
- var _800=window.open("",_7ff.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640");
- _800.focus();
- _7ff.submit();
- };
- CDrillManager.prototype.launchSearchPage=function(){
- var _801=this.getSelectionController();
- var _802=document.forms["formWarpRequest"+this.getCVId()];
- var _803=this.determineSelectionsForSearchPage(_801);
- var _804=this.getSearchContextDataSpecfication(_801);
- var _805=this.buildSearchPageXML(self,_802.packageBase.value,this.getCV().getModelPath(),_803,[],_804,[]);
- this.openSearchPage(_802.packageBase.value,XMLBuilderSerializeNode(_805));
- };
- CDrillManager.prototype.qsDrillDown=function(){
- if(!this.canDrillDown()){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _806="DD:";
- this.qsSendDrillCommand(_806);
- };
- CDrillManager.prototype.qsDrillUp=function(){
- if(!this.canDrillUp()){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _807="DU:";
- this.qsSendDrillCommand(_807);
- };
- CDrillManager.prototype.qsSendDrillCommand=function(_808){
- var _809;
- if(_808=="DU:"){
- _809="drillUp";
- }else{
- _809="drillDown";
- }
- var _80a=this.getDrillParameters(_809,false,false);
- if(_80a.length==0){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- for(var idx=0;idx<_80a.length;++idx){
- _808+=getConfigFrame().escapeParam(_80a[idx]);
- if(idx+1<_80a.length){
- _808+=",";
- }
- }
- getConfigFrame().sendCmd(_808,"",true);
- };
- CDrillManager.prototype.qsLaunchGoToPage=function(_80c){
- var _80d=this.getSelectionController();
- if(_80d!=null&&_80d.getModelDrillThroughEnabled()==true){
- var _80e=this.getModelDrillThroughContext(cf);
- if(_80e==""){
- getConfigFrame().dlgGenericSelectionMessage(false);
- return;
- }
- var _80f=document.getElementById("gotoPage");
- if(_80f!=null){
- document.body.removeChild(_80f);
- }
- _80f=document.createElement("form");
- _80f.setAttribute("id","gotoPage");
- _80f.setAttribute("name","gotoPage");
- _80f.setAttribute("method","post");
- _80f.style.display="none";
- document.body.appendChild(_80f);
- var _810=getConfigFrame();
- _80f.appendChild(this.createFormField("objpath",decodeURIComponent(_810.cfgGet("PackageBase"))));
- if(typeof gUseNewSelectionContext=="undefined"){
- _80f.appendChild(this.createFormField("m","portal/goto2.xts"));
- }else{
- _80f.appendChild(this.createFormField("m","portal/goto.xts"));
- }
- _80f.appendChild(this.createFormField("b_action","xts.run"));
- if(typeof gUseNewSelectionContext=="undefined"){
- _80f.appendChild(this.createFormField("drillContext",_80e));
- }else{
- _80f.appendChild(this.createFormField("modeledDrillthru",_80e));
- }
- if(typeof getConfigFrame().routingServerGroup!="undefined"){
- _80f.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup));
- }
- if(typeof _80c!="undefined"&&_80c==true){
- _80f.appendChild(this.createFormField("directLaunch","true"));
- }
- var _811=_810.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters();
- if(_811){
- _80f.appendChild(this.createFormField("encExecutionParameters",_811));
- }
- var _812="winNAT_"+(new Date()).getTime();
- var _813=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId();
- window.open(_813,_812,"toolbar,location,status,menubar,resizable,scrollbars=1");
- _80f.target=_812;
- }
- };
- CDrillManager.prototype.qsLaunchSearchPage=function(){
- var cf=getConfigFrame();
- var _815=goWindowManager.getSelectionController();
- var _816=this.determineSelectionsForSearchPage(_815);
- var _817=this.getSearchContextDataSpecfication(_815);
- var _818=decodeURIComponent(cf.cfgGet("PackageBase"));
- var _819=this.buildSearchPageXML(cf,_818,decodeURIComponent(cf.cfgGet("cmLastModel")),_816,[],_817,[]);
- this.openSearchPage(_818,cf.XMLBuilderSerializeNode(_819));
- };
- CDrillManager.prototype.determineSelectionsForSearchPage=function(_81a){
- var _81b=new CtxArrayPlaceHolder();
- var _81c=_81a.getAllSelectedObjects();
- for(var i=0;i<_81c.length;i++){
- var _81e=_81c[i].getColumnName();
- if(!this.containsByIndiceInArray(_81b,_81e)){
- _81b[_81e]={};
- _81b[_81e].name=_81e;
- _81b[_81e].values=[];
- }
- var idx0="";
- var muns=_81c[i].getMuns();
- if(muns!=null&&muns.length>0){
- idx0=muns[0][0];
- }
- var idx1=_81c[i].getDisplayValues()[0];
- if(!(this.containsInArray(_81b[_81e].values,0,idx0)&&this.containsInArray(_81b[_81e].values,1,idx1))){
- _81b[_81e].values[_81b[_81e].values.length]=[idx0,idx1];
- }
- }
- return _81b;
- };
- CDrillManager.prototype.getSearchContextDataSpecfication=function(_822){
- var _823=new CParameterValues();
- var _824=_822.getCCDManager();
- var _825=_824.m_cd;
- for(var _826 in _825){
- var _827=_824.GetUsage(_826);
- if(_827!="2"){
- var _828=_824.GetRDIValue(_826);
- var _829=_824.GetDisplayValue(_826);
- _823.addSimpleParmValueItem(_828,_828,_829,"true");
- }
- }
- return _823;
- };
- 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,_832){
- var _833=document.createElement("input");
- _833.setAttribute("type","hidden");
- _833.setAttribute("name",name);
- _833.setAttribute("value",_832);
- return (_833);
- };
- CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){
- var _834=[];
- var _835=this.getSelectionController();
- var _836=null;
- if(_835!=null){
- if(_835.getSelectedColumnIds().length==1){
- var _837=_835.getSelections();
- for(var _838=0;_838<_837.length;++_838){
- var _839=_837[_838];
- _836=_839.getCellRef();
- while(_836){
- if(_836.getAttribute("dtTargets")!=null){
- _834.push("<rvDrillTargets>"+_836.getAttribute("dtTargets")+"</rvDrillTargets>");
- break;
- }else{
- if(_836.getAttribute("onclick")!=null){
- var _83a=_836.getAttribute("onclick");
- var _83b=null;
- if(_83a.indexOf("doSingleDrillThrough")!=-1){
- _83b=_83a.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough");
- }else{
- if(_83a.indexOf("doMultipleDrillThrough")!=-1){
- _83b=_83a.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough");
- }
- }
- if(_83b!=null){
- var _83c=eval(_83b);
- if(_83c!=null){
- _834.push(_83c);
- break;
- }
- }
- }
- }
- _836=XMLHelper_GetFirstChildElement(_836);
- }
- }
- }else{
- if(_835.hasSelectedChartNodes()){
- var _83d=_835.getSelectedChartNodes();
- var _83e=_83d[0];
- _836=_83e.getArea();
- if(_836.getAttribute("dtTargets")!=null){
- _834.push("<rvDrillTargets>"+_836.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }else{
- if(_835.getSelectedDrillThroughImage()!=null){
- var _83f=_835.getSelectedDrillThroughImage();
- if(_83f&&_83f.getAttribute("dtTargets")!=null){
- _834.push("<rvDrillTargets>"+_83f.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }else{
- if(_835.getSelectDrillThroughSingleton()!=null){
- var _840=_835.getSelectDrillThroughSingleton();
- if(_840&&_840.getAttribute("dtTargets")!=null){
- _834.push("<rvDrillTargets>"+_840.getAttribute("dtTargets")+"</rvDrillTargets>");
- }
- }
- }
- }
- }
- }
- return _834;
- };
- CDrillManager.prototype.getDrillThroughParameters=function(_841,evt){
- if(typeof _841=="undefined"){
- _841="query";
- }
- var _843=[];
- if(typeof evt!="undefined"){
- var _844=getCrossBrowserNode(evt,true);
- try{
- while(_844){
- if(typeof _844.getAttribute!="undefined"&&_844.getAttribute("dtTargets")){
- _843.push("<rvDrillTargets>"+_844.getAttribute("dtTargets")+"</rvDrillTargets>");
- break;
- }
- _844=_844.parentNode;
- }
- }
- catch(e){
- return false;
- }
- }else{
- var oCV=this.getCV();
- var _846=oCV.getDrillMgr();
- var _847=_846.getSelectionController();
- if(_847!=null){
- var _848=null;
- if(_847.hasSelectedChartNodes()){
- var _849=_847.getSelectedChartNodes();
- var _84a=_849[0];
- _848=_84a.getArea();
- }
- if(_848!=null){
- _843.push("<rvDrillTargets>"+_848.getAttribute("dtTargets")+"</rvDrillTargets>");
- }else{
- _843=this.getAuthoredDrillThroughTargets();
- }
- }
- }
- if(_843.length>0){
- var _84b="<AuthoredDrillTargets>";
- for(var _84c=0;_84c<_843.length;++_84c){
- _84b+=eval("\""+_843[_84c]+"\"");
- }
- _84b+="</AuthoredDrillTargets>";
- var _84d=this.getCV().getAction("AuthoredDrill");
- if(_841=="query"){
- _84d.populateContextMenu(_84b);
- this.showOtherMenuItems();
- }else{
- if(this.getCV().envParams["cv.id"]=="AA"){
- this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent();
- }else{
- _84d.execute(_84b);
- }
- }
- return true;
- }else{
- if(_841=="query"){
- this.showOtherMenuItems();
- return true;
- }else{
- return false;
- }
- }
- };
- CDrillManager.prototype.executeAuthoredDrill=function(_84e){
- var _84f=decodeURIComponent(_84e);
- var _850=this.getCV().getAction("AuthoredDrill");
- _850.executeDrillTarget(_84f);
- };
- CDrillManager.prototype.doesMoreExist=function(_851){
- for(var i=0;i<_851.getNumItems();i++){
- var _853=_851.get(i);
- if(_853!=null){
- if((_853 instanceof CMenuItem)&&(_853.getLabel()==RV_RES.RV_MORE)&&(_853.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){
- return true;
- }
- }
- }
- return false;
- };
- CDrillManager.prototype.showOtherMenuItems=function(){
- var cv=this.getCV();
- var _855=cv.rvMainWnd;
- var _856=_855.getToolbarControl();
- var _857=null;
- var _858=null;
- if(typeof _856!="undefined"&&_856!=null){
- _857=_856.getItem("goto");
- if(_857){
- _858=_857.getMenu();
- }
- }
- var _859=_855.getContextMenu();
- var _85a=_855.getUIHide();
- var _85b=null;
- if(typeof _859!="undefined"&&_859!=null&&_859.getGoToMenuItem()){
- _85b=_859.getGoToMenuItem().getMenu();
- }
- var _85c=null;
- var _85d=this.getSelectionController();
- if(_858!=null){
- if(this.doesMoreExist(_858)==false){
- if(typeof gMenuSeperator!="undefined"&&_858.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){
- _858.add(gMenuSeperator);
- }
- var _85e=new CMenuItem(_858,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
- if(_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){
- _85e.hide();
- }else{
- if(_85d==null||_85d.getModelDrillThroughEnabled()==false){
- _85e.disable();
- }
- }
- }
- }
- if(_85b!=null){
- if(typeof gMenuSeperator!="undefined"&&_85b.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){
- _85b.add(gMenuSeperator);
- }
- var _85f=new CMenuItem(_85b,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin());
- if(_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){
- _85f.hide();
- }else{
- if(_85d==null||_85d.getModelDrillThroughEnabled()==false){
- _85f.disable();
- }
- }
- }
- if(_85c!=null&&_85d!=null){
- var _860=_85d.getAllSelectedObjects();
- if(_860==null||_860.length===0){
- _85c.disable();
- }
- }
- if(_858!=null){
- _858.draw();
- if(_858.isVisible()){
- _858.show();
- }
- }
- if(_85b!=null){
- _85b.draw();
- if(_85b.isVisible()){
- _85b.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 _863=this.getSelectionController();
- if(_863!=null){
- var _864=_863.getSelectionObjectFactory().getSelectionChartObject(node);
- if(_864!=null){
- var _865=_864.getDrillOptions();
- for(var idx=0;idx<_865.length;++idx){
- var _867=_865[idx][0];
- if((node.getAttribute("isChartTitle")==="true"&&_867=="1")||_867=="3"||_867=="2"){
- node.className="dl "+node.className;
- node.setAttribute("href","#");
- break;
- }
- }
- }
- }
- }
- };
- CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_868){
- if(typeof _868=="undefined"||_868==null){
- return null;
- }
- var _869=this.getCV().getDrillTargets();
- if(!_869||_869.length==0){
- return null;
- }
- var _86a=_868[0][0];
- if(typeof _86a=="undefined"||_86a==null){
- return null;
- }
- var _86b=_869[_86a];
- if(typeof _86b=="undefined"||_86b==null){
- return null;
- }
- var _86c="<drillTarget drillIdx=\\\""+_86a+"\\\" label=\\\""+_86b.getLabel()+"\\\"/>";
- return "<rvDrillTargets>"+_86c+"</rvDrillTargets>";
- };
- CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_86d){
- if(typeof _86d=="undefined"||_86d==null){
- return null;
- }
- var _86e=this.getCV().getDrillTargets();
- if(!_86e||_86e.length==0){
- return null;
- }
- var _86f="";
- for(var _870=0;_870<_86d.length;++_870){
- var _871=_86d[_870];
- if(_871.length<2){
- continue;
- }
- var _872=_871[0];
- if(typeof _872=="undefined"||_872==null){
- continue;
- }
- var _873=_871[1];
- if(typeof _873=="undefined"||_873==null){
- continue;
- }
- var _874=_86e[_872];
- if(typeof _874=="undefined"||_874==null){
- continue;
- }
- if(_873===null||_873===""){
- _873=_874.getLabel();
- }
- _86f+="<drillTarget drillIdx=\\\""+_872+"\\\" label=\\\""+_873+"\\\"/>";
- }
- if(_86f.length>0){
- return "<rvDrillTargets>"+_86f+"</rvDrillTargets>";
- }
- return null;
- };
- function CDrillThroughTarget(_875,_876,_877,_878,_879,path,_87b,_87c,_87d,_87e,_87f,_880){
- this.m_label=_875;
- this.m_outputFormat=_876;
- this.m_outputLocale=_877;
- this.m_showInNewWindow=_878;
- this.m_method=_879;
- this.m_path=path;
- this.m_bookmark=_87b;
- this.m_parameters=_87c;
- this.m_objectPaths=_87d;
- this.m_prompt="false";
- this.m_dynamicDrillThrough=false;
- this.m_parameterProperties=_880;
- if(typeof _87e!="undefined"&&_87e!=null){
- if(_87e=="yes"){
- this.m_prompt="true";
- }else{
- if(_87e=="target"){
- this.m_prompt="";
- }
- }
- }
- if(typeof _87f!="undefined"&&_87f!=null){
- if(typeof _87f=="string"){
- _87f=_87f=="true"?true:false;
- }
- this.m_dynamicDrillThrough=_87f;
- }
- };
- 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(_881){
- var _882=""+_881;
- if((_882=="0")||((_881!=null)&&(_881!=false))){
- _882=_882.replace(/&/g,"&");
- _882=_882.replace(/</g,"<");
- _882=_882.replace(/>/g,">");
- _882=_882.replace(/"/g,""");
- _882=_882.replace(/'/g,"'");
- }else{
- if(_881==null){
- _882="";
- }
- }
- return _882;
- };
- function createFormField(name,_884){
- var _885=document.createElement("input");
- _885.setAttribute("type","hidden");
- _885.setAttribute("name",name);
- _885.setAttribute("value",_884);
- return (_885);
- };
- function setBackURLToCloseWindow(_886){
- var _887=_886.childNodes;
- if(_887){
- for(var _888=0;_888<_887.length;++_888){
- var _889=_887[_888];
- var _88a=_889.getAttribute("name");
- if(_88a&&_88a=="ui.backURL"){
- _886.removeChild(_889);
- }
- }
- }
- _886.appendChild(createFormField("ui.backURL","javascript:window.close();"));
- };
- function doMultipleDrills(_88b,cvId){
- if(parent!=this&&parent.doMultipleDrills){
- if(getCVId()!=""&&getCVId()!=cvId){
- cvId=getCVId();
- }
- return parent.doMultipleDrills(_88b,cvId);
- }else{
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Targets",_88b,"text");
- }
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(cvId);
- }
- catch(exception){
- }
- var _88e=buildDrillForm(oCV);
- addDrillEnvironmentFormFields(_88e,oCV);
- if(typeof oCV!="undefined"&&oCV!=null){
- var _88f=oCV.getModelPath();
- _88e.appendChild(createFormField("modelPath",_88f));
- var _890=oCV.getSelectionController();
- var _891="";
- if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
- _891=getViewerSelectionContext(_890,new CSelectionContext(_88f));
- }
- _88e.appendChild(createFormField("drillContext",_891));
- _88e.appendChild(createFormField("modelDrillEnabled",_890.getModelDrillThroughEnabled()));
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _88e.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _88e.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
- }
- }
- }
- _88e.setAttribute("launchGotoPage","true");
- _88e.appendChild(createFormField("drillTargets",_88b));
- _88e.appendChild(createFormField("invokeGotoPage","true"));
- _88e.appendChild(createFormField("m","portal/drillthrough.xts"));
- _88e.appendChild(createFormField("b_action","xts.run"));
- var _892="winNAT_"+(new Date()).getTime();
- var _893="..";
- if(oCV!=null){
- _893=oCV.getWebContentRoot();
- var _894=oCV.getExecutionParameters();
- if(_894!=""){
- _88e.appendChild(createFormField("encExecutionParameters",_894));
- }
- }
- if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_88e)){
- if(oCV&&typeof oCV.launchGotoPage==="function"){
- oCV.launchGotoPage(_88e);
- }else{
- var _895=_893+"/rv/blankDrillWin.html";
- _88e.target=_892;
- window.open(_895,_892);
- }
- }
- }
- };
- function buildDrillForm(oCV){
- var _897=document.getElementById("drillForm");
- if(_897){
- document.body.removeChild(_897);
- }
- _897=document.createElement("form");
- if(typeof oCV!="undefined"&&oCV!=null){
- var _898=document.getElementById("formWarpRequest"+oCV.getId());
- _897.setAttribute("target",_898.getAttribute("target"));
- _897.setAttribute("action",_898.getAttribute("action"));
- }else{
- _897.setAttribute("action",location.pathname);
- }
- _897.setAttribute("id","drillForm");
- _897.setAttribute("name","drillForm");
- _897.setAttribute("method","post");
- _897.style.display="none";
- document.body.appendChild(_897);
- return _897;
- };
- function addDrillEnvironmentFormFields(_899,oCV){
- if(window.g_dfEmail){
- _899.appendChild(createFormField("dfemail",window.g_dfEmail));
- }
- if(oCV!=null){
- _899.appendChild(createFormField("cv.id",oCV.getId()));
- if(typeof oCV.envParams["ui.sh"]!="undefined"){
- _899.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
- }
- if(oCV.getViewerWidget()==null){
- if(typeof oCV.envParams["cv.header"]!="undefined"){
- _899.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
- }
- if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
- _899.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
- }else{
- var _89b=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
- if(oCV.m_viewerFragment&&_89b!=null&&_89b===true){
- var _89c=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
- _899.appendChild(createFormField("cv.toolbar",_89c));
- }
- }
- }
- if(typeof oCV.envParams["ui.backURL"]!="undefined"){
- _899.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
- }
- if(typeof oCV.envParams["ui.postBack"]!="undefined"){
- _899.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
- }
- if(typeof oCV.envParams["savedEnv"]!="undefined"){
- _899.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
- }
- if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
- _899.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
- }
- if(typeof oCV.envParams["lang"]!="undefined"){
- _899.appendChild(createFormField("lang",oCV.envParams["lang"]));
- }
- if(typeof oCV.envParams["ui.errURL"]!="undefined"){
- _899.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
- }
- var _89d="";
- if(oCV.envParams["ui.routingServerGroup"]){
- _89d=oCV.envParams["ui.routingServerGroup"];
- }
- _899.appendChild(createHiddenFormField("ui.routingServerGroup",_89d));
- }else{
- _899.appendChild(createFormField("cv.header","false"));
- _899.appendChild(createFormField("cv.toolbar","false"));
- }
- };
- function appendReportHistoryObjects(oCV,_89f){
- if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_89f!=null){
- oCV.rvMainWnd.addCurrentReportToReportHistory();
- var _8a0=oCV.rvMainWnd.saveReportHistoryAsXML();
- _89f.appendChild(createFormField("cv.previousReports",_8a0));
- }
- };
- function doSingleDrill(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab){
- var _8ac="";
- if(typeof cvId=="string"){
- _8ac=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(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab);
- }else{
- if(typeof _8a3=="undefined"){
- _8a3="default";
- }else{
- if(_8a3=="execute"){
- _8a3="run";
- }
- }
- if(_8a3=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
- _8a1="_blank";
- }
- var _8ae=buildDrillForm(oCV);
- var _8af="<authoredDrillRequest>";
- _8af+="<param name=\"action\">"+sXmlEncode(_8a3)+"</param>";
- _8af+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
- _8af+="<param name=\"format\">"+sXmlEncode(_8a4)+"</param>";
- _8af+="<param name=\"locale\">"+sXmlEncode(_8a5)+"</param>";
- _8af+="<param name=\"prompt\">"+sXmlEncode(_8aa)+"</param>";
- _8af+="<param name=\"dynamicDrill\">"+sXmlEncode(_8ab)+"</param>";
- if(typeof oCV!="undefined"&&oCV!=null){
- _8af+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
- _8af+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }
- var _8b0=oCV.getModelPath();
- _8af+="<param name=\"metadataModel\">"+sXmlEncode(_8b0)+"</param>";
- _8af+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_8b0)))+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _8af+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _8af+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
- }
- }
- }
- if(_8a6!=""){
- _8af+="<param name=\"bookmark\">"+_8a6+"</param>";
- }
- if(_8a3!="view"){
- if(typeof _8a7!="undefined"){
- _8af+="<param name=\"sourceContext\">"+sXmlEncode(_8a7)+"</param>";
- }
- if(typeof _8a8!="undefined"){
- _8af+="<param name=\"objectPaths\">"+sXmlEncode(_8a8)+"</param>";
- }
- }
- var _8b1=0;
- _8af+="<drillParameters>";
- var _8b2=[];
- for(_8b1=1;_8b1<args.length;_8b1++){
- var sSel=args[_8b1][1];
- if(_8a4=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
- var _8b4=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_8b1][1])));
- if(_8b4){
- var sMun=_8b4.getAttribute("mun");
- if(sMun!=null&&sMun!=""){
- _8b4.setAttribute("useValue",sMun);
- sSel="<selectChoices>"+XMLBuilderSerializeNode(_8b4)+"</selectChoices>";
- }
- }
- }
- var _8b6=args[_8b1][0];
- var _8b7=false;
- for(var i=0;i<_8b2.length;i++){
- var _8b9=_8b2[i];
- if(_8b9.name===_8b6&&_8b9.value===sSel){
- _8b7=true;
- break;
- }
- }
- if(!_8b7){
- _8b2.push({"name":_8b6,"value":sSel});
- _8af+="<param name=\""+sXmlEncode(_8b6)+"\">"+sXmlEncode(sSel)+"</param>";
- }
- }
- _8af+="</drillParameters>";
- _8af+=getExecutionParamNode(oCV);
- _8af+="</authoredDrillRequest>";
- _8ae.appendChild(createFormField("authoredDrill.request",_8af));
- _8ae.appendChild(createFormField("ui.action","authoredDrillThrough2"));
- _8ae.appendChild(createFormField("b_action","cognosViewer"));
- addDrillEnvironmentFormFields(_8ae,oCV);
- if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_8ae)){
- if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
- oCV.sendDrillThroughRequest(_8ae);
- }else{
- if(_8a1==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
- oCV.m_viewerFragment.raiseAuthoredDrillEvent(_8af);
- }else{
- if((oCV!=null&&oCV.getViewerWidget()!=null)||_8a1!=""){
- setBackURLToCloseWindow(_8ae);
- var _8ba="winNAT_"+(new Date()).getTime();
- var _8bb="..";
- if(oCV!=null){
- _8bb=oCV.getWebContentRoot();
- }
- var _8bc=_8bb+"/rv/blankDrillWin.html";
- if(_8ac){
- _8bc+="?cv.id="+_8ac;
- }
- if(oCV==null){
- _8bc=window.location.href.substring(0,window.location.href.indexOf("/v1"));
- _8bc+="/?perspective=classicviewer";
- _8bc+="&altDrillFlag=true";
- _8bc+="&format="+sXmlEncode(_8a4);
- var _8bd=_8ae.getAttribute("name")+Date.now().toString();
- _8ae.setAttribute("name",_8bd);
- if(typeof (Storage)!=="undefined"){
- localStorage.setItem(_8bd,_8ae.outerHTML);
- _8bc+="&drillFormLabel="+_8bd;
- }else{
- console.log("Sorry! No Web Storage support...");
- }
- }
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_8af,"xml");
- }
- _8ae.target=_8ba;
- newWindow=window.open(_8bc,_8ba);
- }else{
- appendReportHistoryObjects(oCV,_8ae);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_8af,"xml");
- }
- _8ae.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
- _8ae.submit();
- if(oCV!=null&&!oCV.getDrillFormTarget){
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
- }
- }
- }
- }
- }
- }
- };
- function getExecutionParamNode(oCV){
- var _8bf="";
- if(typeof oCV!="undefined"&&oCV!=null){
- var _8c0=oCV.getExecutionParameters();
- if(_8c0!=""){
- _8bf+="<param name=\"executionParameters\">";
- _8bf+=sXmlEncode(_8c0);
- _8bf+="</param>";
- }
- }
- return _8bf;
- };
- function doSingleDrillThrough(_8c1,_8c2,cvId){
- var _8c4=_8c1[0][0];
- if(typeof _8c4=="undefined"||_8c4==null){
- return;
- }
- var _8c5=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8c4]:drillTargets[_8c4];
- if(typeof _8c5=="undefined"){
- return;
- }
- if(_8c2!=""&&_8c5.getPath()==""){
- document.location="#"+_8c2;
- }else{
- var args=[];
- args[args.length]=["ui.object",_8c5.getPath()];
- for(var _8c7=1;_8c7<_8c1.length;++_8c7){
- args[args.length]=_8c1[_8c7];
- }
- var _8c8="";
- if(_8c5.getShowInNewWindow()=="true"){
- _8c8="_blank";
- }
- var _8c9=_8c5.getParameters();
- var _8ca=_8c5.getObjectPaths();
- var _8cb=cvId;
- if(!cvId){
- _8cb=getCVId();
- }
- doSingleDrill(_8c8,args,_8c5.getMethod(),_8c5.getOutputFormat(),_8c5.getOutputLocale(),_8c2,_8c9,_8ca,_8cb,_8c5.getPrompt(),false);
- }
- };
- function getCVId(){
- var _8cc="";
- try{
- _8cc=this.frameElement.id.substring("CVIFrame".length);
- }
- catch(exception){
- }
- return _8cc;
- };
- function doMultipleDrillThrough(_8cd,cvId){
- var _8cf="<rvDrillTargets>";
- for(var _8d0=0;_8d0<_8cd.length;++_8d0){
- var _8d1=_8cd[_8d0];
- if(_8d1.length<3){
- continue;
- }
- var _8d2=_8d1[0];
- if(typeof _8d2=="undefined"||_8d2==null){
- continue;
- }
- var _8d3=_8d1[1];
- if(typeof _8d3=="undefined"||_8d3==null){
- continue;
- }
- var _8d4=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8d2]:drillTargets[_8d2];
- if(typeof _8d4=="undefined"||_8d4==null){
- continue;
- }
- if(_8d3===null||_8d3===""){
- _8d3=_8d4.getLabel();
- }
- _8cf+="<drillTarget ";
- _8cf+="outputFormat=\"";
- _8cf+=_8d4.getOutputFormat();
- _8cf+="\" ";
- _8cf+="outputLocale=\"";
- _8cf+=_8d4.getOutputLocale();
- _8cf+="\" ";
- _8cf+="label=\"";
- _8cf+=sXmlEncode(_8d3);
- _8cf+="\" ";
- _8cf+="path=\"";
- _8cf+=sXmlEncode(_8d4.getPath());
- _8cf+="\" ";
- _8cf+="showInNewWindow=\"";
- _8cf+=_8d4.getShowInNewWindow();
- _8cf+="\" ";
- _8cf+="method=\"";
- _8cf+=_8d4.getMethod();
- _8cf+="\" ";
- _8cf+="prompt=\"";
- _8cf+=_8d4.getPrompt();
- _8cf+="\" ";
- _8cf+="dynamicDrill=\"";
- _8cf+=_8d4.isDynamicDrillThrough();
- _8cf+="\">";
- for(var _8d5=2;_8d5<_8d1.length;++_8d5){
- _8cf+=_8d1[_8d5];
- }
- _8cf+=_8d4.getParameters();
- _8cf+=_8d4.getObjectPaths();
- _8cf+="</drillTarget>";
- }
- _8cf+="</rvDrillTargets>";
- if(!cvId){
- cvId=getCVId();
- }
- doMultipleDrills(_8cf,cvId);
- };
- function CScriptLoader(_8d6){
- 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=_8d6;
- 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(_8d7){
- this.m_bHandleStylesheetLimit=_8d7;
- };
- CScriptLoader.prototype.executeScripts=function(_8d8,_8d9){
- if(this.isReadyToExecute()){
- for(var _8da=0;_8da<this.m_aScripts.length;_8da++){
- if(this.m_aScripts[_8da]){
- var _8db=document.createElement("script");
- _8db.setAttribute("language","javascript");
- _8db.setAttribute("type","text/javascript");
- this.addNamespaceAttribute(_8db,_8d9);
- _8db.text=this.m_aScripts[_8da];
- document.getElementsByTagName("head").item(0).appendChild(_8db);
- }
- }
- this.m_aScripts=[];
- for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
- var _8dd=this.m_aDocumentWriters[idx];
- _8dd.execute();
- }
- this.m_aDocumentWriters=[];
- if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
- if(typeof _8d8=="function"){
- _8d8();
- }
- this.m_bHasCompletedExecution=true;
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_8d8,_8d9);
- },this.m_iInterval);
- }
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_8d8,_8d9);
- },this.m_iInterval);
- }
- };
- CScriptLoader.prototype.isReadyToExecute=function(){
- for(var _8de in this.m_oFiles){
- if(this.m_oFiles[_8de]!="complete"){
- return false;
- }
- }
- if(this.m_aScriptLoadQueue.length>0){
- return false;
- }
- return true;
- };
- CScriptLoader.prototype.loadCSS=function(_8df,_8e0,_8e1,_8e2){
- var aM=_8df.match(this.m_reHasCss);
- if(aM){
- for(var i=0;i<aM.length;i++){
- if(aM[i].match(this.m_reFindCssPath)){
- var _8e5=RegExp.$1;
- if(_8e5.indexOf("GlobalReportStyles")!=-1){
- this.validateGlobalReportStyles(_8e5);
- if(_8e1){
- if(_8e5.indexOf("GlobalReportStyles.css")!=-1){
- _8e5=_8e5.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
- }
- var _8e6=this.getGlobalReportStylesClassPrefix(_8e5);
- _8e5=_8e5.replace(".css","_NS.css");
- if(_8e0){
- _8e0.className="buxReport "+_8e6;
- }
- }
- }
- this.loadObject(_8e5,_8e2);
- }
- _8df=_8df.replace(aM[i],"");
- }
- }
- return _8df;
- };
- CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_8e7){
- var _8e8=null;
- if(_8e7.indexOf("GlobalReportStyles_11.4.css")!=-1){
- _8e8="v114";
- }
- if(_8e7.indexOf("GlobalReportStyles_11.css")!=-1){
- _8e8="v11";
- }
- if(_8e7.indexOf("GlobalReportStyles_10.css")!=-1){
- _8e8="v10";
- }else{
- if(_8e7.indexOf("GlobalReportStyles_1.css")!=-1){
- _8e8="v1";
- }else{
- if(_8e7.indexOf("GlobalReportStyles_none.css")!=-1){
- _8e8="vnone";
- }else{
- if(_8e7.indexOf("GlobalReportStyles.css")!=-1){
- _8e8="v8";
- }
- }
- }
- }
- return _8e8;
- };
- CScriptLoader.prototype.validateGlobalReportStyles=function(_8e9){
- var _8ea=document.getElementsByTagName("link");
- for(var i=0;i<_8ea.length;++i){
- var _8ec=_8ea[i];
- if(_8ec.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
- if(_8ec.getAttribute("href").toLowerCase()!=_8e9.toLowerCase()){
- var _8ed=_8e9.split("/");
- var _8ee=_8ec.getAttribute("href").split("/");
- if(_8ed[_8ed.length-1]!=_8ee[_8ee.length-1]){
- this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
- }
- }
- break;
- }
- }
- };
- CScriptLoader.prototype.loadFile=function(_8ef,_8f0,_8f1){
- var sURL="";
- if(_8ef){
- sURL=_8ef;
- }
- var _8f3=null;
- if(typeof _8f0=="string"){
- _8f3=_8f0;
- }
- var _8f4="POST";
- if(_8f1=="GET"){
- _8f4="GET";
- }
- var _8f5=null;
- if(typeof ActiveXObject!="undefined"){
- _8f5=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- _8f5=new XMLHttpRequest();
- }
- _8f5.open(_8f4,sURL,false);
- _8f5.send(_8f3);
- return _8f5.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 _8f7=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
- window.gScriptLoader.loadObject(_8f7.sName,_8f7.sNamespaceId);
- }
- }
- if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
- window.gScriptLoader.loadObject();
- }
- }
- };
- CScriptLoader.prototype.moveLinks=function(node){
- if(!node){
- return;
- }
- var _8f9=node.getAttribute("href");
- if(!_8f9||this.m_oFiles[_8f9]){
- return;
- }
- this.m_oFiles[_8f9]="complete";
- document.getElementsByTagName("head").item(0).appendChild(node);
- };
- CScriptLoader.prototype.loadObject=function(_8fa,_8fb){
- var _8fc=null;
- if(typeof _8fa==="undefined"){
- if(this.m_aScriptLoadQueue.length>0){
- var _8fd=this.m_aScriptLoadQueue.shift();
- _8fa=_8fd.name;
- _8fb=_8fd.namespaceId;
- }else{
- return;
- }
- }
- if(this.m_oFiles[_8fa]){
- return;
- }
- if(this.m_bBlockScriptLoading){
- this.m_aScriptLoadQueue.push({"name":_8fa,"namespaceId":_8fb});
- }else{
- if(_8fa.match(this.m_reIsCss)){
- _8fc=document.createElement("link");
- _8fc.setAttribute("rel","stylesheet");
- _8fc.setAttribute("type","text/css");
- _8fc.setAttribute("href",_8fa);
- if(window.isIE&&window.isIE()){
- _8fc.onreadystatechange=CScriptLoader_onReadyStateChange;
- _8fc.onload=CScriptLoader_onReadyStateChange;
- _8fc.onerror=CScriptLoader_onReadyStateChange;
- this.m_oFiles[_8fa]="new";
- }else{
- this.m_oFiles[_8fa]="complete";
- }
- }else{
- if(_8fa.match(this.m_reIsJavascript)){
- if(_8fa.match(this.m_reIsPromptingLocaleJavascript)){
- if(this.m_bBlockPromptingLocaleScripts){
- this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_8fa,"sNamespaceId":_8fb});
- return;
- }
- this.m_bBlockPromptingLocaleScripts=true;
- }
- this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
- _8fc=document.createElement("script");
- _8fc.setAttribute("language","javascript");
- _8fc.setAttribute("type","text/javascript");
- _8fc.setAttribute("src",_8fa);
- _8fc.sFilePath=_8fa;
- _8fc.onreadystatechange=CScriptLoader_onReadyStateChange;
- _8fc.onload=CScriptLoader_onReadyStateChange;
- _8fc.onerror=CScriptLoader_onReadyStateChange;
- this.addNamespaceAttribute(_8fc,_8fb);
- this.m_oFiles[_8fa]="new";
- }
- }
- if(_8fc){
- document.getElementsByTagName("head").item(0).appendChild(_8fc);
- }
- }
- };
- CScriptLoader.prototype.loadScriptsFromDOM=function(_8fe,_8ff,_900){
- if(!_8fe){
- return;
- }
- var _901=_8fe.getElementsByTagName("script");
- while(_901.length>0){
- var _902=_901[0];
- if(_902.getAttribute("src")!=null&&_902.getAttribute("src").length>0){
- this.loadObject(_902.getAttribute("src"),_8ff);
- }else{
- var _903=_902.innerHTML;
- var _904=false;
- if(_903.indexOf("document.write")!=-1){
- var _905=_903.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
- _904=(_905.indexOf("document.write")!=-1);
- }
- if(_904){
- if(_900){
- var sId="CVScriptFromDOMPlaceHolder"+_901.length+_8ff;
- var _907=_902.ownerDocument.createElement("span");
- _907.setAttribute("id",sId);
- _902.parentNode.insertBefore(_907,_902);
- this.m_aDocumentWriters.push(new CDocumentWriter(sId,_903));
- }
- }else{
- if(_903.length>0){
- this.m_aScripts.push(_903);
- }
- }
- }
- _902.parentNode.removeChild(_902);
- }
- };
- CScriptLoader.prototype.loadStyles=function(_908,_909){
- if(!_908||!_908.parentNode){
- return;
- }
- var _90a=_908.parentNode.getElementsByTagName("style");
- while(_90a.length>0){
- var _90b=_90a[0];
- if(_909){
- this.addNamespaceAttribute(_90b,_909);
- }
- 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(_90b);
- }
- };
- CScriptLoader.prototype.loadAll=function(_90d,_90e,_90f,_910){
- this.m_bScriptLoaderCalled=true;
- this.m_bHasCompletedExecution=false;
- this.loadScriptsFromDOM(_90d,_90f,_910);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.loadStyles(_90d,_90f);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.executeScripts(_90e,_90f);
- return true;
- };
- CScriptLoader.prototype.setFileState=function(_911,_912){
- this.m_oFiles[_911]=_912;
- };
- CScriptLoader.prototype.containsAjaxWarnings=function(){
- if(this.m_bIgnoreAjaxWarnings){
- return false;
- }else{
- return (this.m_ajaxWarnings.length>0);
- }
- };
- CScriptLoader.prototype.addNamespaceAttribute=function(_913,_914){
- if(typeof _914==="string"){
- _913.setAttribute("namespaceId",_914);
- }
- };
- if(typeof window.gScriptLoader=="undefined"){
- window.gScriptLoader=new CScriptLoader();
- }
- function ViewerA11YHelper(oCV){
- this.m_oCV=oCV;
- };
- ViewerA11YHelper.prototype.onFocus=function(evt){
- var _917=getCrossBrowserNode(evt);
- _917=ViewerA11YHelper.findChildOfTableCell(_917);
- this.updateCellAccessibility(_917,false);
- };
- ViewerA11YHelper.prototype.onKeyDown=function(evt){
- evt=(evt)?evt:((event)?event:null);
- var _919=getCrossBrowserNode(evt);
- if(ViewerA11YHelper.isTableCell(_919)){
- for(var i=0;i<_919.childNodes.length;i++){
- if(_919.childNodes[i].nodeName.toLowerCase()=="span"){
- _919=_919.childNodes[i];
- break;
- }
- }
- }
- if(!this.isValidNodeToSelect(_919)){
- return true;
- }
- _919=ViewerA11YHelper.findChildOfTableCell(_919);
- if(_919){
- 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(_919);
- }
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="37"){
- this.moveLeft(_919);
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="38"){
- this.moveUp(_919);
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="40"){
- this.moveDown(_919);
- 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 _91b=this.m_oCV.getActionFactory().load("Selection");
- _91b.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 _91c=this.m_oCV.getActionFactory().load("Delete");
- if(!this.m_oCV.isBlacklisted("Delete")&&_91c.canDelete()){
- _91c.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(_919);
- if(lid!=""){
- lid=lid.split(this.m_oCV.getId())[0];
- var _91e=-1;
- var _91f=this.m_oCV.getRAPReportInfo();
- if(_91f){
- var _920=_91f.getContainer(lid);
- if(typeof _920.layoutIndex!="undefined"){
- _91e=_920.layoutIndex;
- }
- }
- var _921=document.getElementById("infoBarHeaderButton"+_91e+this.m_oCV.getId());
- if(_921!==null){
- this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt));
- _921.focus();
- }
- }
- return stopEventBubble(evt);
- }else{
- if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){
- var ocv=this.m_oCV;
- var _923=function(){
- if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){
- var _924=clientToScreenCoords(evt.target,document.body);
- evt.clientX=_924.leftCoord;
- evt.clientY=_924.topCoord;
- }
- ocv.dcm(evt,true);
- };
- if(isFF()){
- setTimeout(_923,0);
- }else{
- _923.call();
- }
- return stopEventBubble(evt);
- }else{
- if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){
- var _925=this.m_oCV.getViewerWidget();
- var _926=this.m_oCV.getSelectionController();
- _925.preprocessPageClicked(true);
- _926.pageClicked(evt);
- _925.updateToolbar();
- _925.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 _929=node.nodeName.toLowerCase();
- if((_929=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_929=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_929=="div"&&node.getAttribute("chartcontainer")=="true")||(_929=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){
- return node;
- }
- if(ViewerA11YHelper.isSemanticNode(node)){
- var _92a=node.childNodes&&node.childNodes.length?node.childNodes[0]:null;
- if(_92a){
- return this.getValidNodeToSelect(_92a);
- }
- }
- }
- return null;
- };
- ViewerA11YHelper.isSemanticNode=function(node){
- if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){
- ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"];
- }
- var _92c=node.nodeName.toLowerCase();
- for(var i=0;i<ViewerA11YHelper.isSemanticNode._semanticNodeNames.length;i++){
- if(_92c===ViewerA11YHelper.isSemanticNode._semanticNodeNames[i]){
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.isTableCell=function(node){
- var _92f=node.nodeName.toLowerCase();
- return _92f==="td"||_92f==="th";
- };
- ViewerA11YHelper.findChildOfTableCell=function(_930){
- var _931=_930;
- while(_931&&_931.parentNode){
- if(ViewerA11YHelper.getTableCell(_931)){
- break;
- }
- _931=_931.parentNode;
- }
- return _931;
- };
- ViewerA11YHelper.getTableCell=function(node){
- var _933=node.parentNode;
- if(ViewerA11YHelper.isTableCell(_933)){
- return _933;
- }
- if(ViewerA11YHelper.isSemanticNode(_933)&&ViewerA11YHelper.isTableCell(_933.parentNode)){
- return _933.parentNode;
- }
- return null;
- };
- ViewerA11YHelper.prototype.moveRight=function(_934){
- var _935=this.getNextNonTextSibling(_934);
- _935=this.getValidNodeToSelect(_935);
- if(_935){
- this.setFocusToNode(_935);
- return true;
- }
- var _936=ViewerA11YHelper.getTableCell(_934);
- _936=this.getPfMainOutputCell(_936);
- while(_936.nextSibling){
- if(this.moveToTD(_936.nextSibling)){
- return true;
- }
- _936=_936.nextSibling;
- }
- var _937=_936.parentNode;
- while(_937.nextSibling){
- var _938=_937.nextSibling;
- if(this.moveToTD(_938.childNodes[0])){
- return true;
- }
- _937=_937.nextSibling;
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveLeft=function(_939){
- var _93a=this.getPreviousNonTextSibling(_939);
- _93a=this.getValidNodeToSelect(_93a);
- if(_93a){
- this.setFocusToNode(_93a);
- return true;
- }
- var _93b=ViewerA11YHelper.getTableCell(_939);
- _93b=this.getPfMainOutputCell(_93b);
- while(_93b.previousSibling){
- if(this.moveToTDFromTheRight(_93b.previousSibling)){
- return true;
- }
- _93b=_93b.previousSibling;
- }
- var _93c=_93b.parentNode;
- while(_93c.previousSibling){
- var _93d=_93c.previousSibling;
- if(this.moveToTDFromTheRight(_93d.lastChild)){
- return true;
- }
- _93c=_93c.previousSibling;
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveDown=function(_93e){
- var _93f=ViewerA11YHelper.getTableCell(_93e);
- _93f=this.getPfMainOutputCell(_93f);
- var _940=this.getColumnIndex(_93f);
- _940+=this.getColSpanFromRowSpans(_93f);
- var _941=_93f.parentNode;
- if(_93f.rowSpan&&_93f.rowSpan>1){
- var _942=_93f.rowSpan;
- for(var _943=1;_943<_942;_943++){
- _941=_941.nextSibling;
- }
- }
- var _944=false;
- while(_941){
- if(_941.nextSibling){
- _941=_941.nextSibling;
- }else{
- if(_93f.nextSibling&&!_944){
- _941=_941.parentNode.firstChild;
- _944=true;
- _940++;
- }else{
- return false;
- }
- }
- if(this.doMoveUpDown(_941,_940)){
- return true;
- }
- }
- return false;
- };
- ViewerA11YHelper.prototype.moveUp=function(_945){
- var _946=ViewerA11YHelper.getTableCell(_945);
- _946=this.getPfMainOutputCell(_946);
- var _947=_946.parentNode;
- var _948=this.getColumnIndex(_946);
- _948+=this.getColSpanFromRowSpans(_946);
- var _949=false;
- while(_947){
- if(_947.previousSibling){
- _947=_947.previousSibling;
- }else{
- if(_946.previousSibling&&!_949){
- _947=_947.parentNode.lastChild;
- _949=true;
- _948--;
- }else{
- return false;
- }
- }
- if(this.doMoveUpDown(_947,_948)){
- 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(_94b,_94c){
- if(_94b!=null){
- var _94d=_94b.firstChild;
- var pos=this.getColSpanFromRowSpans(_94d);
- while(_94d){
- if(pos==_94c){
- return this.moveToTDFromTheRight(_94d);
- }else{
- if(pos>_94c){
- break;
- }
- }
- var _94f=0;
- if(_94d.colSpan){
- _94f=_94d.colSpan;
- }else{
- _94f++;
- }
- pos+=_94f;
- _94d=_94d.nextSibling;
- }
- }
- };
- ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){
- td=this.getPfVisibleCell(td);
- var _951=td.childNodes;
- for(var _952=_951.length-1;_952>=0;_952--){
- var node=this.getValidNodeToSelect(_951[_952]);
- 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 _955=td.childNodes;
- for(var _956=0;_956<_955.length;_956++){
- var node=this.getValidNodeToSelect(_955[_956]);
- 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 _959=this.m_oCV.m_pinFreezeManager.nodeToContainer(node);
- if(_959){
- _959.updateScroll(node);
- }
- }
- };
- ViewerA11YHelper.prototype.getPfMainOutputCell=function(_95a){
- var main=null;
- var slid=_95a.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 _95e=this.m_oCV.m_pinFreezeManager.getContainer(lid);
- if(_95e){
- main=_95e.getMain(_95a);
- }
- }
- }
- return main?main:_95a;
- };
- 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 _961=0;
- while(node.previousSibling){
- node=node.previousSibling;
- if(node.rowSpan==1){
- if(node.colSpan){
- _961+=node.colSpan;
- }else{
- _961++;
- }
- }
- }
- return _961;
- };
- ViewerA11YHelper.prototype.getPfVisibleCell=function(_962){
- var copy=null;
- var slid=_962.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 _966=this.m_oCV.m_pinFreezeManager.getContainer(lid);
- if(_966){
- copy=_966.getCopy(_962);
- }
- }
- }
- return copy?copy:_962;
- };
- ViewerA11YHelper.prototype.updateCellAccessibility=function(_967,_968){
- if(!_967){
- return false;
- }
- var _969=false;
- var _96a=false;
- var _96b=false;
- var _96c=_967.getAttribute("ctx")!=null?_967:_967.parentNode;
- if(_967.getAttribute("flashChartContainer")!="true"){
- if(_96c.getAttribute("ctx")!=null){
- if(this.m_oCV.isBux){
- var _96d=this.m_oCV.getAction("DrillUpDown");
- _96d.updateDrillability(this.m_oCV,_96c);
- _969=_96d.canDrillDown();
- _96a=_96d.canDrillUp();
- }else{
- var _96e=_96c.getAttribute("ctx");
- var _96f=_96e.indexOf(":")==-1?_96e:_96e.substring(0,_96e.indexOf(":"));
- var _970=this.m_oCV.getSelectionController();
- _969=_970.canDrillDown(_96f);
- _96a=_970.canDrillUp(_96f);
- }
- }
- _96b=_967.parentNode.getAttribute("dtTargets")?true:false;
- }
- var _971=_967.nodeName.toLowerCase()=="img";
- var _972=_967.parentNode.getAttribute("type")=="columnTitle";
- if(!_971&&(_968||((_967.getAttribute("aria-labelledby")!=null||_972||this.m_oCV.isAccessibleMode())))){
- var _973="";
- if(_967.parentNode.getAttribute("cc")=="true"){
- _973+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER;
- }
- if(_967.innerHTML.length===0){
- _967.innerHTML=" ";
- _973+=" "+RV_RES.IDS_JS_EMPTY_CELL;
- }
- if(_969&&_96a){
- _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS;
- }else{
- if(_969){
- _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS;
- }else{
- if(_96a){
- _973+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS;
- }
- }
- }
- if(_96b){
- _973+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS;
- }
- if(_967.altText&&_967.altText.length>0){
- _973=_967.altText;
- }else{
- if(_967.getAttribute("flashChartContainer")=="true"){
- _973=RV_RES.IDS_JS_CHART_IMAGE;
- }
- }
- if(this.m_oCV.isBux){
- var _974=_967.previousSibling;
- if(_974){
- var wid=_974.getAttribute("widgetid");
- if(wid&&wid.indexOf("comment")){
- _973+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS;
- }
- }
- if(_967.getAttribute("rp_name")||_967.parentNode.getAttribute("rp_name")){
- _973+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED;
- }
- if(_967.nextSibling&&_967.nextSibling.getAttribute("class")=="sortIconVisible"){
- _973+=" "+_967.nextSibling.getAttribute("alt");
- }
- }
- if(_973.length>0){
- this.addAriaLabelledByOnCell(_967,_973);
- }
- }
- if(_96a||_969||_96b){
- this.addDrillAccessibilityAttributes(_967,_96b);
- }
- if(_967.attachEvent){
- _967.attachEvent("onblur",this.onBlur);
- }else{
- _967.addEventListener("blur",this.onBlur,false);
- }
- if((isIE()&&_967.getAttribute("tabIndex")!=0)||_971){
- _967.setAttribute("modifiedTabIndex","true");
- _967.setAttribute("oldTabIndex",_967.getAttribute("tabIndex"));
- _967.setAttribute("tabIndex",0);
- }
- };
- ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_976,_977){
- var _978=0;
- var _979=_976;
- while(_979.previousSibling){
- _978++;
- _979=_979.previousSibling;
- }
- var _97a=_976.getAttribute("ariaHiddenSpanId");
- if(_97a&&document.getElementById(_97a)){
- document.getElementById(_97a).innerHTML=_977;
- }else{
- if(!_976.parentNode.id&&!_976.id){
- _976.parentNode.id=Math.random();
- }
- var _97b=document.createElement("span");
- _97b.style.visibility="hidden";
- _97b.style.display="none";
- _97b.id=(_976.id==""?_976.parentNode.id:_976.id)+"_"+_978;
- _97b.innerHTML=_977;
- _976.parentNode.appendChild(_97b);
- var _97c="";
- if(_976.getAttribute("aria-labelledby")!=null){
- _97c+=_976.getAttribute("aria-labelledby");
- }else{
- if(_976.id==""){
- _976.id=_976.parentNode.id+"_main_"+_978;
- }
- _97c+=_976.id;
- }
- _97c+=" "+_97b.id;
- _976.setAttribute("aria-labelledby",_97c);
- _976.setAttribute("ariaHiddenSpanId",_97b.id);
- }
- };
- ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_97d,_97e){
- if(!_97d.getAttribute("oldClassName")){
- if(!_97e){
- _97d.setAttribute("oldClassName",_97d.className);
- _97d.className="dl "+_97d.className;
- }
- if(!_97d.getAttribute("role")){
- _97d.setAttribute("role","link");
- }
- }
- };
- ViewerA11YHelper.prototype.onBlur=function(evt){
- var _980=null;
- if(isIE()){
- _980=getNodeFromEvent(evt,true);
- }else{
- _980=this;
- }
- _980=ViewerA11YHelper.findChildOfTableCell(_980);
- if(_980){
- if(_980.getAttribute("oldClassName")){
- _980.className=_980.getAttribute("oldClassName");
- _980.removeAttribute("oldClassName");
- }
- if(_980.getAttribute("modifiedTabIndex")=="true"){
- _980.removeAttribute("modifiedTabIndex");
- _980.removeAttribute("tabIndex");
- if(_980.getAttribute("oldTabIndex")){
- _980.setAttribute("tabIndex",_980.getAttribute("oldTabIndex"));
- }
- _980.removeAttribute("oldTabIndex");
- }
- var _981=_980.getAttribute("ariaHiddenSpanId");
- if(_981){
- var _982=document.getElementById(_981);
- if(_982){
- _982.innerHTML="";
- }
- }
- }
- };
- ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_983){
- var _984=0;
- var _985=_983.parentNode;
- var _986=0;
- while(_985){
- var _987=_985.firstChild;
- var _988=this.getColumnCount(_985)-_986;
- while(_987&&_987.rowSpan>1&&_988>0&&_987!=_983){
- _984+=_987.colSpan;
- _987=_987.nextSibling;
- _988--;
- }
- if(_985.childNodes.length>_986){
- _986=this.getColumnCount(_985);
- }
- _985=_985.previousSibling;
- }
- return _984;
- };
- ViewerA11YHelper.prototype.getColumnCount=function(_989){
- var _98a=0;
- var node=_989.firstChild;
- while(node){
- _98a+=node.colSpan;
- node=node.nextSibling;
- }
- return _98a;
- };
- ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){
- if(!this.m_oCV.isAccessibleMode()){
- return;
- }
- var _98c=document.getElementById("RVContent"+this.m_oCV.getId());
- if(!_98c){
- return;
- }
- var _98d=getElementsByAttribute(_98c,"span","tabindex","0");
- if(!_98d){
- return;
- }
- for(var i=0;i<_98d.length;i++){
- var span=_98d[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,_991,type){
- },addContextInfo:function(_993){
- }};
- }
- 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,_996){
- 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=_996;
- 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 _997=false;
- for(var _998=0;_998<window.gaRV_INSTANCES.length;_998++){
- if(window.gaRV_INSTANCES[_998].m_sId==sId){
- window.gaRV_INSTANCES[_998]=this;
- _997=true;
- break;
- }
- }
- if(!_997){
- 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(_999){
- this.m_mobileScheduledOutput=_999;
- if(_999){
- this.m_sStatus="complete";
- }
- };
- CCognosViewer.prototype.setTabInfo=function(_99a){
- this.m_tabsPayload=_99a;
- if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
- var _99b=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(_99e){
- this._keepTabSelected=_99e;
- };
- 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 _99f=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
- var _9a0=document.getElementById("CVNavLinks"+this.getId());
- if(_9a0||!this.shouldWriteNavLinks()||_99f){
- var _9a1=this.getReportDiv();
- this.m_bHasTabs=true;
- if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_99f){
- this.deleteTabs();
- }
- if(!this.m_tabControl){
- if(this.getStatus()!="complete"&&!_99f){
- return;
- }
- var tr=document.createElement("tr");
- var _9a3=document.createElement("td");
- tr.appendChild(_9a3);
- var _9a4=document.getElementById("mainViewerTR"+this.getId());
- if(!_9a4){
- return;
- }
- if(this.m_tabsPayload.position=="topLeft"){
- _9a4.parentNode.insertBefore(tr,_9a4);
- }else{
- _9a4.parentNode.appendChild(tr);
- }
- var _9a5=null;
- if(this.m_viewerWidget){
- _9a5=this.m_viewerWidget.findContainerDiv().firstChild;
- }else{
- _9a5=_9a3;
- }
- var oCV=this;
- if(_99f){
- this.m_tabControl=new CognosTabControl(_9a5,function(_9a7){
- oCV.switchSavedOutputTab(_9a7,true);
- });
- this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
- }else{
- this.m_tabControl=new CognosTabControl(_9a5,function(_9a8){
- oCV.switchTabs(_9a8);
- });
- }
- if(this.m_viewerWidget){
- this.m_tabControl.setSpaceSaverContainer(_9a3);
- this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
- this.m_tabControl.useAbsolutePosition(true);
- }
- this.m_tabControl.setIsSavedOutput(_99f);
- if(!window.gScriptLoader.m_bScriptLoaderCalled){
- var _9a9=document.getElementById("RVContent"+this.getId());
- var _9aa=this._getNodesWithViewerId(_9a9,"link",null);
- for(var i=0;i<_9aa.length;i++){
- window.gScriptLoader.moveLinks(_9aa[i]);
- }
- window.gScriptLoader.loadStyles(_9a9,this.getId());
- this.repaintDiv(_9a9);
- }
- }
- 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(_9a1.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_9a1.parentNode,this.m_currentlySelectedTab);
- if(_9a0){
- this._removeTabContent(_9a0.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_9a0.parentNode,this.m_currentlySelectedTab);
- }
- this.m_tabInfo={};
- }
- this.m_switchingToTabId=null;
- _9a1.setAttribute("tabId",this.m_currentlySelectedTab);
- if(_9a0){
- _9a0.setAttribute("tabId",this.m_currentlySelectedTab);
- }
- if(isIE()&&_99f&&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 _9ad=this.getReportDiv();
- var _9ae=this.m_switchingToTabId;
- this.m_currentlySelectedTab=_9ae;
- this.m_tabControl.selectTab(this.previouslySelectedTab,false);
- this.switchTabs(this.previouslySelectedTab);
- if(_9ad){
- _9ad.parentNode.removeChild(_9ad);
- }
- 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[_9ae]=null;
- };
- CCognosViewer.prototype.switchSavedOutputTab=function(_9af,_9b0){
- var _9b1=this.getSelectionController();
- if(_9b1){
- _9b1.clearSelectedObjects();
- }
- this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
- if(_9b0){
- this.notifyTabChange(_9af);
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_9af,_9b0);
- this.getTabController().resetPosition();
- }else{
- if(!this.savedOutputTabNodes){
- var _9b2=document.getElementById("CVIFrame"+this.getId());
- this.savedOutputTabNodes=getElementsByAttribute(_9b2.contentWindow.document.body,"*","tabid");
- }
- if(!this.savedOutputTabNodes){
- return;
- }
- for(var i=0;i<this.savedOutputTabNodes.length;i++){
- var _9b4=this.savedOutputTabNodes[i];
- _9b4.style.display=_9b4.getAttribute("tabid")==_9af?"":"none";
- }
- this.setMaxContentSize();
- }
- };
- CCognosViewer.prototype.notifyTabChange=function(_9b5){
- };
- CCognosViewer.prototype._getNodesWithViewerId=function(_9b6,_9b7,id){
- var _9b9=[];
- var _9ba=_9b6.getElementsByTagName(_9b7);
- for(var i=0;i<_9ba.length;i++){
- var node=_9ba[i];
- if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
- node.parentNode.removeChild(node);
- _9b9.push(node);
- i--;
- }
- }
- return _9b9;
- };
- CCognosViewer.prototype._removeTabStylesFromHead=function(){
- var id=this.getId();
- return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
- };
- CCognosViewer.prototype._addTabStylesToHead=function(_9be){
- if(!_9be){
- return;
- }
- for(var i=0;i<_9be.length;i++){
- document.getElementsByTagName("head").item(0).appendChild(_9be[i]);
- }
- };
- CCognosViewer.prototype.switchTabs=function(_9c0){
- if(this.m_currentlySelectedTab==_9c0){
- return;
- }
- var _9c1=this.getSelectionController();
- if(_9c1){
- _9c1.clearSelectedObjects();
- }
- var _9c2=this.getReportDiv();
- this.m_nReportDiv=null;
- var _9c3=_9c2.clientHeight;
- _9c2.removeAttribute("id");
- _9c2.style.display="none";
- if(!this.m_tabInfo){
- this.m_tabInfo={};
- }
- var _9c4=this._removeTabStylesFromHead();
- var _9c5=this.getSelectionController().getCCDManager();
- this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_9c5.getClonedMetadataArray(),"contextdata":_9c5.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_9c4,"hasPromptControl":this.getHasPrompts()};
- var _9c6=this._findChildWithTabId(_9c2.parentNode,_9c0);
- this.previouslySelectedTab=this.m_currentlySelectedTab;
- if(_9c6&&this.m_tabInfo[_9c0]&&this.m_tabInfo[_9c0].hasPromptControl){
- if(_9c6){
- _9c6.parentNode.removeChild(_9c6);
- _9c6=null;
- }
- delete this.m_tabInfo[_9c0];
- this.m_tabInfo[_9c0]=null;
- }
- if(_9c6){
- this.m_currentlySelectedTab=_9c0;
- _9c6.style.display="block";
- _9c6.setAttribute("id","CVReport"+this.getId());
- if(this.m_tabInfo&&this.m_tabInfo[_9c0]){
- var _9c7=this.m_tabInfo[_9c0];
- if(_9c7.conversation){
- this.setConversation(_9c7.conversation);
- }
- if(_9c7.metadata){
- _9c5.SetMetadata(_9c7.metadata);
- }
- if(_9c7.contextdata){
- _9c5.SetContextData(_9c7.contextdata);
- }
- if(_9c7.secondaryRequests){
- this.setSecondaryRequests(_9c7.secondaryRequests);
- }
- if(_9c7.styles){
- this._addTabStylesToHead(_9c7.styles);
- }
- this.setHasPrompts(_9c7.hasPromptControl);
- }
- if(this.shouldWriteNavLinks()){
- this.writeNavLinks(this.getSecondaryRequests().join(" "));
- }
- if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
- this.getPinFreezeManager().rePaint();
- if(isIE()){
- var _9c8=document.getElementById("RVContent"+this.getId());
- this.repaintDiv(_9c8);
- }
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this._keepFocus=null;
- this.doneLoadingUpdateA11Y("complete");
- this.getTabController().resetPosition();
- this.setMaxContentSize();
- }else{
- this.m_switchingToTabId=_9c0;
- var _9c9=_9c2.cloneNode(false);
- _9c9.style.display="block";
- _9c9.setAttribute("id","CVReport"+this.getId());
- _9c9.removeAttribute("tabId");
- _9c2.parentNode.appendChild(_9c9);
- _9c9.innerHTML="<table height='"+_9c3+"px'><tr><td height='100%'></td></tr></table>";
- var _9ca=new ViewerDispatcherEntry(this);
- _9ca.addFormField("ui.action","reportAction");
- _9ca.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_9c0);
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this.dispatchRequest(_9ca);
- }
- };
- CCognosViewer.prototype._removeTabContent=function(_9cb,_9cc){
- var _9cd=this._findChildWithTabId(_9cb,_9cc);
- while(_9cd){
- _9cd.parentNode.removeChild(_9cd);
- _9cd=this._findChildWithTabId(_9cb,_9cc);
- }
- };
- CCognosViewer.prototype._findChildWithTabId=function(_9ce,_9cf){
- var _9d0=null;
- for(var i=0;i<_9ce.childNodes.length;i++){
- var _9d2=_9ce.childNodes[i];
- if(_9d2.getAttribute("tabId")==_9cf){
- _9d0=_9d2;
- break;
- }
- }
- return _9d0;
- };
- CCognosViewer.prototype.clearTabs=function(){
- if(!this.m_bHasTabs){
- return;
- }
- this.m_tabInfo={};
- var _9d3=this.getReportDiv();
- var _9d4=_9d3.parentNode;
- for(var i=0;i<_9d4.childNodes.length;i++){
- var node=_9d4.childNodes[i];
- if(node.getAttribute("id")!="CVReport"+this.m_sId){
- _9d4.removeChild(node);
- i--;
- }
- }
- };
- CCognosViewer.prototype.isSavedOutput=function(){
- var _9d7=this.envParams["ui.action"];
- return _9d7==="view"||_9d7==="buxView";
- };
- CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_9d9,_9da){
- var _9db=document.getElementById("CVReport"+this.getId());
- var _9dc=document.createElement("iframe");
- _9dc.style.width="100%";
- _9dc.style.height="99%";
- _9dc.id="CVIFrame"+this.getId();
- _9dc.title=_9d9;
- _9dc.setAttribute("frameBorder","0");
- _9db.appendChild(_9dc);
- var obj=this;
- var func=function(){
- obj.renderTabs();
- };
- setTimeout(function(){
- if(_9da){
- if(_9dc.attachEvent){
- _9dc.attachEvent("onload",func);
- }else{
- _9dc.addEventListener("load",func,true);
- }
- }
- _9dc.src=url;
- },1);
- };
- CCognosViewer.prototype.updatePageState=function(_9df){
- if(_9df&&this.getState()){
- this.getState().setPageState(_9df);
- }
- };
- CCognosViewer.prototype.getPageInfo=function(){
- if(this.m_viewerState&&this.m_viewerState.getPageState()){
- var _9e0=this.m_viewerState.getPageState();
- return {"currentPage":_9e0.getCurrentPage(),"pageCount":_9e0.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(_9e7){
- this.m_retryDispatcherEntry=_9e7;
- };
- 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(_9e8){
- this.m_faultDispatcherEntry=_9e8;
- };
- CCognosViewer.prototype.getFaultDispatcherEntry=function(){
- return this.m_faultDispatcherEntry;
- };
- CCognosViewer.prototype.dispatchRequest=function(_9e9){
- this.setFaultDispatcherEntry(null);
- this.getViewerDispatcher().dispatchRequest(_9e9);
- };
- 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(_9ea){
- var _9ea=this.getActionFactory().load(_9ea);
- _9ea.setCognosViewer(this);
- return _9ea;
- };
- CCognosViewer.prototype.getCalculationCache=function(){
- return this.m_calculationCache;
- };
- CCognosViewer.prototype.updateOutputForA11ySupport=function(){
- this.updateBorderCollapse();
- if(this.getA11YHelper()){
- this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
- }
- var _9eb=navigator.userAgent.toLowerCase();
- var _9ec=_9eb.indexOf("iphone")!=-1;
- var _9ed=_9eb.indexOf("ipod")!=-1;
- var _9ee=_9eb.indexOf("ipad")!=-1;
- var _9ef=_9ec||_9ed||_9ee;
- var _9f0=_9eb.indexOf("android")!=-1;
- if(_9ef||_9f0){
- 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 _9f1=document.createElement("div");
- _9f1.id=this.m_sId+"hc";
- _9f1.style.border="1px solid";
- _9f1.style.borderColor="red green";
- _9f1.style.height="10px";
- _9f1.style.top="-999px";
- _9f1.style.position="absolute";
- document.body.appendChild(_9f1);
- var _9f2=null;
- if(isIE()){
- _9f2=_9f1.currentStyle;
- }else{
- _9f2=_9f1.ownerDocument.defaultView.getComputedStyle(_9f1,null);
- }
- if(!_9f2){
- return;
- }
- this.m_bHighContrast=_9f2.borderTopColor==_9f2.borderRightColor;
- document.body.removeChild(_9f1);
- }
- };
- 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 _9f3=null;
- if(this.envParams["ui.action"]=="view"&&!this.isBux){
- var _9f4=document.getElementById("CVIFrame"+this.getId());
- _9f3=_9f4.contentWindow.document;
- }else{
- _9f3=document.getElementById("CVReport"+this.getId());
- }
- var _9f5=_9f3.getElementsByTagName("table");
- for(var i=0;i<_9f5.length;i++){
- if(_9f5[i].style.borderCollapse=="collapse"){
- _9f5[i].style.borderCollapse="separate";
- }
- }
- }
- };
- CCognosViewer.prototype.isAccessibleMode=function(){
- if(this.m_bAccessibleMode==true){
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.isSinglePageReport=function(){
- for(var _9f7 in this.m_aSecRequests){
- if(this.m_aSecRequests[_9f7]=="nextPage"||this.m_aSecRequests[_9f7]=="previousPage"){
- return false;
- }
- }
- return true;
- };
- CCognosViewer.prototype.hasNextPage=function(){
- for(var _9f8 in this.m_aSecRequests){
- if(this.m_aSecRequests[_9f8]=="nextPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.hasPrevPage=function(){
- for(var _9f9 in this.m_aSecRequests){
- if(this.m_aSecRequests[_9f9]=="previousPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
- evt=(evt)?evt:((event)?event:null);
- if(evt){
- var node=getNodeFromEvent(evt);
- var _9fc=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
- if((evt.keyCode==8&&_9fc!="input"&&_9fc!="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(_9fd){
- this.m_bUseWorkingDialog=_9fd;
- };
- 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(_9fe){
- if(!_9fe){
- this.preProcessControlArray=[];
- }
- this.m_bReportHasPrompts=_9fe;
- };
- CCognosViewer.prototype.getHasPrompts=function(){
- return this.m_bReportHasPrompts;
- };
- CCognosViewer.prototype.setUsePageRequest=function(_9ff){
- this.m_viewerDispatcher.setUsePageRequest(_9ff);
- };
- CCognosViewer.prototype.getUsePageRequest=function(){
- return this.m_viewerDispatcher.getUsePageRequest();
- };
- CCognosViewer.prototype.setKeepSessionAlive=function(_a00){
- this.m_bKeepSessionAlive=_a00;
- };
- 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 _a01;
- try{
- _a01=getCognosViewerSCObjectRef(this.m_sId);
- }
- catch(e){
- _a01=null;
- }
- return _a01;
- };
- CCognosViewer.prototype.addCallback=function(_a02,oFct,_a04){
- if(!this.m_aCallback){
- this.m_aCallback=[];
- }
- this.m_aCallback=this.m_aCallback.concat({m_sEvent:_a02,m_oCallback:oFct,m_bCaptureEvent:(_a04===true)});
- };
- CCognosViewer.prototype.canDrillDown=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a07=this.getSelectionController();
- if(_a07){
- return (_a07.canDrillDown(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canDrillUp=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a0a=this.getSelectionController();
- if(_a0a){
- return (_a0a.canDrillUp(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canSubmitPrompt=function(){
- var _a0b=null;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- var _a0c=this.preProcessControlArray.length;
- for(var k=0;k<_a0c;k++){
- _a0b=eval(this.preProcessControlArray[k]);
- if(_a0b.isValid()===false){
- if(!this.m_reportRenderingDone||!_a0b.getCascadeOnParameter||!_a0b.getCascadeOnParameter()){
- return false;
- }
- }
- }
- }
- return true;
- };
- CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
- if(this.rvMainWnd){
- this.rvMainWnd.closeContextMenuAndToolbarMenus();
- }
- };
- CCognosViewer.prototype.dcm=function(_a0e,_a0f){
- if(this.canDisplayContextMenu()){
- if(this.preSelectNode==true){
- _a0f=false;
- this.preSelectNode=false;
- }
- if(this.rvMainWnd.displayContextMenu(_a0e,_a0f)!=false){
- return stopEventBubble(_a0e);
- }
- }
- };
- 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(_a10){
- var _a11=this.getDrillMgr();
- if(_a11){
- _a11.singleClickDrillEvent(_a10,"RV");
- }
- };
- CCognosViewer.prototype.debug=function(sMsg){
- if(this.m_bDebug){
- var _a13="";
- var _a14=this.debug.caller;
- if(typeof _a14=="object"&&_a14!==null){
- _a13=_a14.toString().match(/function (\w*)/)[1];
- }
- if(!_a13){
- _a13="?";
- }
- alert(_a13+": "+sMsg);
- }
- };
- CCognosViewer.prototype.callbackExists=function(_a15){
- var _a16=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _a17=0;_a17<this.m_aCallback.length;++_a17){
- var oCB=this.m_aCallback[_a17];
- if(oCB.m_sEvent==_a15){
- return true;
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.executeCallback=function(_a19){
- var _a1a=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _a1b=0;_a1b<this.m_aCallback.length;++_a1b){
- var oCB=this.m_aCallback[_a1b];
- if(oCB.m_sEvent==_a19){
- if(typeof oCB.m_oCallback=="function"){
- oCB.m_oCallback();
- }
- if(oCB.m_bCaptureEvent){
- _a1a=true;
- }
- }
- }
- }
- return _a1a;
- };
- 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(_a1e){
- if(typeof _a1e!="string"){
- _a1e=this.getStatus();
- }
- return ((""+_a1e).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 _a20=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a22=this.getSelectionController();
- if(_a22){
- var _a23=_a22.getRefDataItem(sCtx);
- if(_a23){
- _a20=_a23;
- }
- }
- }
- return _a20;
- };
- CCognosViewer.prototype.getDataType=function(sId){
- var _a25=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a27=this.getSelectionController();
- if(_a27){
- var _a28=_a27.getDataType(sCtx);
- if(_a28){
- _a25=_a28;
- }
- }
- }
- return _a25;
- };
- CCognosViewer.prototype.getDepth=function(sId){
- var _a2a=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a2c=this.getSelectionController();
- if(_a2c){
- var _a2d=_a2c.getDepth(sCtx);
- if(_a2d){
- _a2a=_a2d;
- }
- }
- }
- return _a2a;
- };
- 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(_a2e){
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action","forward");
- oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_a2e);
- 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 _a33=this.getSelectionController();
- if(_a33){
- var aHUN=_a33.getHun(sCtx);
- if(aHUN){
- sHun=aHUN;
- }
- }
- }
- return sHun;
- };
- CCognosViewer.prototype.getDimensionUniqueName=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a37=this.getSelectionController();
- if(_a37){
- var aDUN=_a37.getDun(sCtx);
- if(aDUN){
- return aDUN;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getId=function(){
- return this.m_sId;
- };
- CCognosViewer.prototype.getLevelId=function(sId){
- var _a3a=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a3c=this.getSelectionController();
- if(_a3c){
- var aLUN=_a3c.getLun(sCtx);
- if(aLUN){
- _a3a=aLUN;
- }
- }
- }
- return _a3a;
- };
- CCognosViewer.prototype.getMemberUniqueName=function(sId){
- var sMUN=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a41=this.getSelectionController();
- if(_a41){
- var aMUN=_a41.getMun(sCtx);
- if(aMUN){
- sMUN=aMUN;
- }
- }
- }
- return sMUN;
- };
- CCognosViewer.prototype.getObjectId=function(){
- var _a43="window";
- if(typeof this.getId()=="string"){
- _a43=getCognosViewerObjectRefAsString(this.getId());
- }
- return _a43;
- };
- CCognosViewer.prototype.getQueryModelId=function(sId){
- var _a45=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a47=this.getSelectionController();
- if(_a47){
- var _a48=_a47.getQueryModelId(sCtx);
- if(_a48){
- _a45=_a48;
- }
- }
- }
- return _a45;
- };
- CCognosViewer.prototype.getQueryName=function(sId){
- var _a4a=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a4c=this.getSelectionController();
- if(_a4c){
- var _a4d=_a4c.getRefQuery(sCtx);
- if(_a4d){
- _a4a=_a4d;
- }
- }
- }
- return _a4a;
- };
- CCognosViewer.prototype.getContextIds=function(sId,_a4f){
- var aIds=[];
- var sCtx=this.findCtx(sId);
- if(sCtx){
- var _a52=sCtx.split("::");
- if(_a52&&_a52.length>1&&_a4f<_a52.length){
- aIds=_a52[_a4f].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 _a59=aCtx[0][0];
- var _a5a=this.getSelectionController();
- if(_a5a){
- if(_a5a.isContextId(_a59)){
- sCtx=sId;
- }
- }
- }
- if(!sCtx){
- var _a5b=this.findElementWithCtx(sId);
- if(_a5b){
- sCtx=_a5b.getAttribute("ctx");
- }
- }
- return sCtx;
- };
- CCognosViewer.prototype.findElementWithCtx=function(sId){
- var _a5d=sId;
- if(typeof sId=="string"){
- _a5d=this.findElementWithCtx(document.getElementById(sId));
- }
- if(_a5d){
- if(_a5d.getAttribute&&_a5d.getAttribute("ctx")){
- return _a5d;
- }
- for(var _a5e=0;_a5e<_a5d.childNodes.length;_a5e++){
- var _a5f=this.findElementWithCtx(_a5d.childNodes[_a5e]);
- if(_a5f){
- return _a5f;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getUseValue=function(sId){
- var sVal=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _a63=this.getSelectionController();
- if(_a63){
- sVal=_a63.getUseValue(sCtx);
- }
- }
- return sVal;
- };
- CCognosViewer.prototype.init=function(_a64){
- if(_a64&&typeof _a64=="object"){
- for(var _a65 in _a64){
- this[_a65]=_a64[_a65];
- }
- }
- };
- CCognosViewer.prototype.initViewer=function(_a66){
- var _a67=new RequestHandler(this);
- var _a68=document.getElementById("formBackJax"+this.getId());
- if(_a68&&typeof _a68.state!="undefined"&&_a68.state.value.length>0){
- _a67.loadReportHTML(_a68.result.value);
- var _a69=eval("("+_a68.state.value+")");
- _a67.updateViewerState(_a69);
- _a67.postComplete();
- }else{
- if(this.getUsePageRequest()){
- var _a6a=_a66?_a66.m_sStatus:null;
- if(isIE()){
- if(window.location.hash=="#working"){
- window.history.go(-2);
- return;
- }else{
- if(_a6a==="working"||_a6a==="stillWorking"){
- window.location.hash="#working";
- }
- }
- }else{
- if(_a68&&_a68.working){
- if(_a68.working.value=="true"){
- window.history.go(-1);
- return;
- }else{
- if(_a6a==="working"||_a6a==="stillWorking"){
- _a68.working.value="true";
- }
- }
- }
- }
- }
- _a67.processInitialResponse(_a66);
- }
- };
- CCognosViewer.prototype.saveBackJaxInformation=function(_a6b){
- var _a6c=document.getElementById("formBackJax"+this.getId());
- if(_a6c){
- if(typeof _a6c.state!="undefined"){
- _a6c.state.value=_a6b.getResponseStateText();
- }
- if(typeof _a6c.result!="undefined"){
- _a6c.result.value=_a6b.getResult();
- }
- }
- };
- CCognosViewer.prototype.pcc=function(evt){
- if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
- this.preSelectNode=true;
- var _a6e=this.getSelectionController();
- if(_a6e){
- _a6e.pageContextClicked(evt);
- }
- }
- };
- CCognosViewer.prototype.isValidAjaxResponse=function(_a6f){
- return (_a6f&&_a6f.childNodes&&_a6f.childNodes.length>0&&_a6f.childNodes[0].nodeName!="parsererror"?true:false);
- };
- CCognosViewer.prototype.resubmitInSafeMode=function(_a70){
- if(this.m_bUseSafeMode){
- this.resetViewerDispatcher();
- this.setUsePageRequest(true);
- this.envParams["cv.useAjax"]="false";
- if(_a70){
- _a70.retryRequest();
- }
- }
- };
- CCognosViewer.prototype.showLoadedContent=function(_a71){
- if(_a71!==null&&typeof _a71!="undefined"){
- _a71.style.display="block";
- }
- this.m_resizeReady=true;
- this.doneLoading();
- var obj=this;
- setTimeout(function(){
- obj.renderTabs();
- },1);
- };
- CCognosViewer.prototype.doneLoading=function(){
- var _a73=this.getViewerWidget();
- if(_a73){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- var _a74=this.getStatus();
- if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
- var _a75=_a74=="working"||_a74=="stillWorking"||_a74=="fault";
- _a73.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_a75});
- if(_a74=="complete"){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- if(typeof _a73.postLoadContent=="function"){
- _a73.postLoadContent();
- }
- this.m_reportRenderingDone=true;
- if(!_a75){
- var _a76=this;
- setTimeout(function(){
- _a76.m_readyToRespondToResizeEvent=true;
- },20);
- }
- }
- }
- if(_a74!="fault"){
- _a73.clearErrorDlg();
- }
- this.doneLoadingUpdateA11Y(_a74);
- }else{
- var _a74=this.getStatus();
- if(_a74=="complete"){
- this.m_reportRenderingDone=true;
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_a74=="working"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_a77){
- if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
- var _a78=this.getKeepFocus();
- if(_a77=="complete"){
- this.setKeepFocus(false);
- }
- var _a79=null;
- if(this.getVisibleDialog()!==null){
- _a79=this.getVisibleDialog().getDialogDiv();
- }else{
- if(_a78===true){
- _a79=document.getElementById("CVReport"+this.getId());
- }else{
- if(typeof _a78=="string"){
- _a79=document.getElementById(_a78);
- }else{
- if(_a78!==null){
- _a79=_a78;
- if(this.isBux){
- dojo.window.scrollIntoView(_a79);
- }
- }
- }
- }
- }
- if(_a79){
- setFocusToFirstTabItem(_a79);
- }
- if(_a77=="complete"){
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_a77=="working"||_a77=="stillWorking"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.JAWSTalk=function(_a7a){
- 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(_a7a));
- var _a7d=document.getElementById("RVContent"+id);
- if(_a7d){
- _a7d.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 _a7e=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
- if(_a7e===null){
- return false;
- }
- var _a7f=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
- return (_a7e.toLowerCase()==="on"&&_a7f!==false)||(_a7e.toLowerCase()==="off"&&_a7f===true);
- };
- CCognosViewer.prototype.setMaxContentSize=function(){
- if("10"!=window.getIEVersion()){
- return;
- }
- if(document.body.className==="viewer"){
- var _a80=document.body.offsetHeight;
- var _a81=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
- var _a82=document.getElementById("mainViewerTable"+this.getId());
- _a82.style.maxHeight=_a80-_a81-2+"px";
- var _a83=GUtil.generateCallback(this.setMaxContentSize,[true],this);
- if(!this.attachedOnResize){
- this.attachedOnResize=true;
- if(window.attachEvent){
- window.attachEvent("onresize",_a83);
- }else{
- if(window.addEventListener){
- window.addEventListener("resize",_a83,false);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.getNonReportHeight=function(node){
- var _a85=0;
- var _a86=node.parentNode;
- if(!_a86){
- return _a85;
- }
- if(_a86.childNodes.length>1){
- for(var i=0;i<_a86.childNodes.length;i++){
- var _a88=_a86.childNodes[i];
- if(_a88!=node&&!isNaN(_a88.clientHeight)&&_a88.style.display!="none"){
- _a85+=_a88.clientHeight;
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _a85+=this.getNonReportHeight(_a86);
- }
- return _a85;
- };
- CCognosViewer.prototype.addPageAdornments=function(){
- this.m_layoutElements=null;
- this.m_lidToElement=null;
- this.initFlashCharts();
- this.insertSortIconsForAllLists();
- var _a89=this.getViewerWidget().getProperties();
- if(this.canInsertExpandIconsForAllCrosstabs()){
- this.insertExpandIconsForAllCrosstabs();
- }
- var _a8a=document.getElementById("CVReport"+this.getId());
- if(_a8a){
- var oCV=this;
- setTimeout(function(){
- if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
- oCV.getPinFreezeManager().renderReportWithFrozenContainers(_a8a);
- }
- oCV.addInfoBar();
- },1);
- }
- this.getViewerWidget().reselectSelectionFilterObjects();
- this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
- };
- CCognosViewer.prototype.addFlashChart=function(_a8c){
- this.m_flashChartsObjectIds.push(_a8c);
- };
- CCognosViewer.prototype.flashChartError=function(_a8d){
- var _a8e=this.getViewerWidget();
- var _a8f=_a8e.getProperties();
- _a8f.setProperty("flashCharts",false);
- var _a90=this.getAction("Redraw");
- _a90.isUndoable=function(){
- return false;
- };
- _a90.execute();
- };
- CCognosViewer.prototype.initFlashCharts=function(){
- var _a91=this.getViewerWidget();
- if(this.m_flashChartsObjectIds.length>0){
- var _a92=document.getElementById("rt"+this.getId());
- if(window.addEventListener){
- _a92.addEventListener("mousedown",onFlashChartRightClick,true);
- }else{
- var _a93={};
- var _a94=function(){
- this.releaseCapture();
- };
- var _a95=function(){
- onFlashChartRightClick(event);
- this.setCapture();
- };
- for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
- var _a97=this.m_flashChartsObjectIds[i];
- var _a98=document.getElementById(_a97);
- _a93[_a97]=1;
- _a98.parentNode.onmouseup=_a94;
- _a98.parentNode.onmousedown=_a95;
- }
- if(this.m_flashChartsObjectIds.length>0){
- _a92.attachEvent("oncontextmenu",function(){
- if(_a93[window.event.srcElement.id]){
- return false;
- }
- });
- }
- }
- if(_a91){
- _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
- }
- }else{
- if(_a91){
- _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
- }
- }
- };
- CCognosViewer.prototype.initializeLayoutElements=function(){
- var _a99=document.getElementById("rt"+this.getId());
- var _a9a=getElementsByAttribute(_a99,"*","lid");
- this.m_lidToElement={};
- this.m_layoutElements=[];
- var _a9b=0;
- var _a9c=this.getPinFreezeManager();
- for(var i=0;i<_a9a.length;i++){
- var e=_a9a[i];
- if(!_a9c||!_a9c.getContainerElement(e)||_a9c.isElementInMainOutput(e)){
- this.m_layoutElements[_a9b]=e;
- this.m_lidToElement[e.getAttribute("lid")]=e;
- _a9b++;
- }
- }
- };
- CCognosViewer.prototype.getLayoutElement=function(_a9f){
- if(!this.m_layoutElements){
- this.initializeLayoutElements();
- }
- if(this.m_layoutElements){
- return this.m_layoutElements[_a9f];
- }
- 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 _aa1=this.getRAPReportInfo();
- if(_aa1){
- var _aa2=document.getElementById("rt"+this.getId());
- this.initializeLayoutElements();
- var _aa3=[];
- this.m_aInfoBar=[];
- for(var _aa4=0;_aa4<this.m_layoutElements.length;++_aa4){
- var _aa5=this.m_layoutElements[_aa4];
- var lid=_aa5.getAttribute("lid");
- if(lid){
- if(lid.indexOf("RAP_NDH_")>-1){
- lid=lid.substring(8);
- }
- lid=lid.substring(0,lid.indexOf(this.getId()));
- }
- var _aa7=_aa1.getContainer(lid);
- if(_aa7&&typeof _aa7.parentContainer=="undefined"){
- var _aa8=this.collectChildContainers(_aa7.container);
- if(this.getPinFreezeManager()){
- oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_aa5);
- _aa5=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_aa5;
- }
- var _aa9=new InfoBar(this,_aa5,_aa7,_aa8,_aa4);
- _aa9.setTimingDetails(_aa1._getEventTimings());
- _aa9.render();
- if(_aa9.hasSomethingRendered()){
- _aa3.push(_aa9.getId());
- }
- this.m_aInfoBar.push(_aa9);
- }
- }
- var _aaa=this.getViewerWidget();
- if(_aaa){
- _aaa.refreshInfoBarRenderedState(_aa3);
- }
- }
- };
- CCognosViewer.prototype.collectChildContainers=function(_aab){
- var _aac=[];
- var _aad=this.getRAPReportInfo();
- if(_aad){
- var _aae=_aad.getContainerCount();
- for(var cidx=0;cidx<_aae;++cidx){
- var _ab0=_aad.getContainerFromPos(cidx);
- if(typeof _ab0.parentContainer!="undefined"&&_ab0.parentContainer==_aab){
- _aac.push(_ab0);
- }
- }
- }
- return _aac;
- };
- CCognosViewer.prototype.addReportInfo=function(){
- var _ab1=this.getViewerWidget();
- if(typeof _ab1==="undefined"||_ab1===null){
- return;
- }
- if(!_ab1.getAttributeValue("originalReport")||this.isIWidgetMobile()){
- return;
- }
- var _ab2=this.envParams["baseReportModificationTime"];
- var _ab3=_ab1.getAttributeValue("baseReportModificationTime");
- if(typeof _ab2!=="undefined"&&typeof _ab3!=="undefined"&&_ab3&&_ab3!="<empty>"&&_ab2!==_ab3){
- var cvid=this.getId();
- var _ab5=document.getElementById("CVReport"+cvid);
- var _ab6=_ab5.parentNode;
- var id="ReportInfo"+cvid;
- var _ab8=document.createElement("div");
- _ab8.setAttribute("id",id+"_container");
- _ab8.setAttribute("cvid",cvid);
- _ab8.className="new-info-indicator BUXNoPrint";
- var _ab9=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";
- }
- _ab9.src=this.getWebContentRoot()+img;
- _ab9.className="reportInfoIcon";
- _ab9.setAttribute("tabIndex","0");
- _ab9.setAttribute("alt","");
- _ab9.setAttribute("title","");
- _ab9.setAttribute("role","presentation");
- var _abb=RV_RES.IDS_JS_REPORT_INFO_TITLE;
- var _abc=RV_RES.IDS_JS_REPORT_INFO_TEXT;
- var _abd=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
- _ab8.appendChild(_ab9);
- _ab6.insertBefore(_ab8,_ab5);
- this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_ab9,position:["above","below"],title:_abb,text:_abc,linkText:_abd,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
- }
- };
- CCognosViewer.prototype.reportInfoResetReport=function(){
- this.executeAction("ResetToOriginal");
- };
- CCognosViewer.prototype.hideReportInfo=function(){
- var _abe=document.getElementById("ReportInfo"+this.getId()+"_container");
- if(typeof _abe!=="undefined"&&_abe!==null){
- _abe.style.visibility="hidden";
- }
- };
- CCognosViewer.prototype.insertSortIcons=function(){
- var _abf=this.envParams?this.envParams.limitedInteractiveMode:true;
- if(typeof _abf==="undefined"||_abf===true){
- return;
- }
- if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
- this.insertSortIconsForAllLists();
- }
- };
- CCognosViewer.prototype._getContainers=function(_ac0){
- var _ac1=[];
- var _ac2="",_ac3="";
- if(_ac0==="list"){
- _ac2="list";
- _ac3="ls";
- }else{
- if(_ac0==="crosstab"){
- _ac2="crosstab";
- _ac3="xt";
- }
- }
- var _ac4=document.getElementById("CVReport"+this.getId());
- if(this.getRAPReportInfo()){
- var _ac5=this.getRAPReportInfo().getContainerIds(_ac2);
- for(var i=0;i<_ac5.length;++i){
- var _ac7=getElementsByAttribute(_ac4,"table","lid",_ac5[i]+this.getId(),1);
- if(_ac7&&_ac7.length>0){
- _ac1.push(_ac7[0]);
- }
- }
- }else{
- _ac1=getElementsByClassName(_ac4,"table",_ac3);
- }
- return _ac1;
- };
- CCognosViewer.prototype.insertSortIconsForAllLists=function(){
- var _ac8=this._getContainers("list");
- for(var i=0;i<_ac8.length;++i){
- this.insertSortIconsToList(_ac8[i]);
- }
- };
- CCognosViewer.prototype.insertSortIconsToList=function(_aca){
- var _acb=getElementsByAttribute(_aca,"*","type","columnTitle");
- for(var i=0;i<_acb.length;++i){
- var _acd=_acb[i];
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_acd);
- if(_acd.getAttribute("canSort")!="false"&&_acd.getAttribute("CTNM")===null&&_acd.getAttribute("CC")===null){
- var _ace=false;
- for(var _acf=0;_acf<_acd.childNodes.length;_acf++){
- var _ad0=_acd.childNodes[_acf];
- if(_ad0.nodeName.toLowerCase()=="img"){
- if(_ad0.id&&_ad0.id.indexOf("sortimg")===0){
- _ace=true;
- break;
- }
- var sLid=_ad0.getAttribute("lid");
- if(sLid&&sLid.indexOf("SortIcon")!==-1){
- _acd.removeChild(_ad0);
- break;
- }
- }
- }
- if(!_ace&&this.canInsertSortIcon(_acd)){
- this.insertSortIconToColumnHeader(_acd);
- }
- }
- }
- };
- 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(_ad3){
- var _ad4=_ad3.getAttribute("rp_sort");
- return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_ad4!==undefined&&_ad4!==null&&_ad4.length>0));
- };
- CCognosViewer.prototype.insertSortIconToColumnHeader=function(_ad5){
- if(!_ad5.style.whiteSpace){
- _ad5.style.whiteSpace="nowrap";
- }
- var _ad6=document.createElement("img");
- _ad6.setAttribute("id","sortimg"+Math.random());
- if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
- _ad6.onmouseover=function(){
- this.setAttribute("oldClassName",this.className);
- this.className+=" sortIconOver";
- };
- _ad6.onmouseout=function(){
- this.className=this.getAttribute("oldClassName");
- this.removeAttribute("oldClassName");
- };
- }
- _ad6.src=this.getImgSrc(_ad5);
- var _ad7=this.getSortInfo(_ad5);
- var _ad8=this.getSortOrder(_ad7);
- _ad6.setAttribute("alt",this.getSortAltText(_ad8));
- _ad6.setAttribute("title",this.getSortAltText(_ad8));
- _ad6.className=this.getSortClass(_ad7);
- _ad6.setAttribute("sortOrder",_ad8);
- _ad5.appendChild(_ad6);
- };
- CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_ad9,_ada){
- var _adb=this.getSelectionController();
- var _adc=_adb.hasCalculationMetadata(_ada,[_ada],"crosstab");
- return ((_adb.canDrillDown(_ada)||_ad9.alwaysCanExpandCollapse)&&!_adb.isCalculationOrMeasure(_ada,_adc));
- };
- CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
- var _add=this._getContainers("crosstab");
- var _ade=this;
- var _adf=this.getRAPReportInfo();
- var _ae0=this.getReportContextHelper();
- for(var i=0;i<_add.length;i++){
- var _ae2=_add[i];
- var _ae3=_ae2.getAttribute("lid");
- _ae3=_ae3.substring(0,_ae3.length-this.getId().length);
- var _ae4=getElementsByAttribute(_ae2,["td","th"],"ctnm","true");
- for(var j=0;j<_ae4.length;j++){
- var _ae6=_ae4[j];
- var sCtx=this.findCtx(_ae6);
- var _ae8=_ae0.getDataItemName(sCtx);
- if(_ae8){
- var _ae9=_adf.getItemInfo(_ae3,_ae8);
- var _aea=_ae0.processCtx(sCtx);
- if(this.canInsertShowExpandCollapseIconForNode(_ae9,_aea[0][0])){
- var sMun=_ae0.getMun(sCtx);
- var _aec=sMun&&_ae9.expandedMembers&&_ae9.expandedMembers[sMun]===true;
- var _aed=document.createElement("div");
- _aed.setAttribute("skipSelection","true");
- _aed.className="expandButton "+(_aec?"collapse":"expand");
- _ae6.insertBefore(_aed,_ae6.firstChild);
- var _aee=document.createElement("span");
- _aee.className="expandButtonCaption";
- _aee.innerHTML=(_aec?"[-]":"[+]");
- _aed.appendChild(_aee);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
- var _aef=this._getContainers("crosstab");
- for(var i=0;i<_aef.length;i++){
- var _af1=_aef[i];
- var _af2=_af1.getAttribute("lid");
- _af2=_af2.substring(0,_af2.length-this.getId().length);
- var _af3=getElementsByAttribute(_af1,"td","ctnm","true");
- for(var j=0;j<_af3.length;j++){
- var _af5=_af3[j];
- if(_af5.firstChild.className==="expandButton collapse"||_af5.firstChild.className==="expandButton expand"){
- _af5.removeChild(_af5.firstChild);
- }
- }
- }
- };
- CCognosViewer.prototype.fillInContextData=function(){
- if(!this.isLimitedInteractiveMode()){
- var _af6=document.getElementById("CVReport"+this.getId());
- var _af7=getElementsByClassName(_af6,"table","ls");
- for(var i=0;i<_af7.length;++i){
- var _af9=getElementsByAttribute(_af7[i],"*","type","columnTitle");
- for(var j=0;j<_af9.length;++j){
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_af9[j]);
- }
- }
- }
- };
- CCognosViewer.prototype.getSortAltText=function(_afb){
- if(_afb==="ascending"){
- return RV_RES.IDS_JS_SORT_ASCENDING;
- }else{
- if(_afb==="descending"){
- return RV_RES.IDS_JS_SORT_DESCENDING;
- }else{
- if(_afb==="nosort"){
- return RV_RES.IDS_JS_NOT_SORTED;
- }
- }
- }
- };
- CCognosViewer.prototype.getSortInfo=function(_afc){
- var _afd=_afc.getAttribute("rp_sort");
- if(_afd){
- _afd=_afd.split(".");
- }
- return _afd;
- };
- CCognosViewer.prototype.getSortClass=function(_afe){
- var _aff="sortIconHidden";
- if(_afe){
- if(_afe[0]==="d"||_afe[0]==="a"){
- _aff="sortIconVisible";
- }
- }
- return _aff;
- };
- CCognosViewer.prototype.getSortOrder=function(_b00){
- var _b01="nosort";
- if(_b00){
- if(_b00[0]==="d"){
- _b01="descending";
- }else{
- if(_b00[0]==="a"){
- _b01="ascending";
- }
- }
- }
- return _b01;
- };
- CCognosViewer.prototype.getImgSrc=function(_b02){
- var _b03=_b02.getAttribute("rp_sort");
- var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_b03);
- return src;
- };
- CCognosViewer.prototype.getSortIconName=function(_b05){
- var _b06="sort_no.gif";
- if(_b05){
- _b05=_b05.split(".");
- if(_b05[0]==="d"){
- _b06="sort_descending.gif";
- }else{
- if(_b05[0]==="a"){
- _b06="sort_ascending.gif";
- }
- }
- }
- return _b06;
- };
- 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 _b07=this.getViewerWidget();
- return (_b07&&_b07.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
- };
- CCognosViewer.prototype.getPromptParametersInfo=function(){
- var _b08=null;
- if(this.widgetHasPromptParameters()){
- _b08="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
- }
- return _b08;
- };
- CCognosViewer.prototype.raisePromptEvent=function(_b09,_b0a,_b0b){
- try{
- var _b0c=this.getViewerWidget();
- _b0c.getWidgetContextManager().raisePromptEvent(_b09,_b0a,_b0a.get("ui.action"),this.getModelPath(),_b0b);
- }
- catch(e){
- }
- };
- CCognosViewer.prototype.getModelPath=function(){
- var _b0d=this.getSelectionController().getModelPathForCurrentSelection();
- if(_b0d){
- return _b0d;
- }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(_b0e){
- this._keepFocus=_b0e;
- };
- CCognosViewer.prototype.getKeepFocus=function(){
- if(typeof this._keepFocus!="undefined"){
- return this._keepFocus;
- }
- return false;
- };
- CCognosViewer.prototype.onFocus=function(evt){
- var _b10=this.getA11YHelper();
- if(_b10){
- _b10.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 _b12=this.getStatus();
- var _b13=document.getElementById("cvSkipToReport"+this.getId());
- if(_b13){
- _b13.style.display=_b12=="prompting"?"none":"";
- }
- };
- CCognosViewer.prototype.updateSkipToNavigationLink=function(_b14){
- var _b15=document.getElementById("cvSkipToNavigation"+this.getId());
- if(_b15){
- _b15.style.display=_b14?"none":"";
- }
- };
- CCognosViewer.prototype.pageAction=function(_b16){
- this.setKeepFocus("CVNavLinks"+this.getId());
- var _b17=new ViewerDispatcherEntry(this);
- _b17.addFormField("ui.action",_b16);
- if(this.getCurrentlySelectedTab()){
- _b17.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
- }
- this.dispatchRequest(_b17);
- };
- CCognosViewer.prototype.writeNavLink=function(_b18,_b19,_b1a,_b1b){
- var _b1c="";
- if(_b1a){
- _b1c="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
- if(_b1b){
- _b1c+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
- }else{
- _b1c+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
- }
- _b1c+=">LINK_TEXT</a> "+"</td>";
- }else{
- _b1c="<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+(!_b1a&&_b18.sImgDisabled?_b18.sImgDisabled:_b18.sImg);
- return _b1c.replace(/LINK_REQUEST/g,_b19).replace(/LINK_TEXT/g,_b18.sText).replace(/LINK_IMG/g,sImg);
- };
- CCognosViewer.prototype.loadNavLinks=function(){
- var _b1e=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
- if(_b1e){
- this.init(eval("("+_b1e+")"));
- }
- };
- CCognosViewer.prototype.writeNavLinks=function(sSR,_b20){
- var _b21=document.getElementById("CVNavLinks"+this.getId());
- if(_b21){
- var _b22=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)){
- _b21.style.display="none";
- if(_b22){
- _b22.style.display="none";
- }
- this.updateSkipToNavigationLink(true);
- return;
- }
- this.updateSkipToNavigationLink(false);
- if(_b22){
- _b22.style.display="";
- }
- _b21.style.display=(isIE()?"block":"table-cell");
- var _b23="";
- _b23+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
- _b23+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_b20);
- _b23+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_b20);
- _b23+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_b20);
- _b23+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_b20);
- _b23+="</tr></tbody></table>";
- var _b24=document.getElementById("CVNavLinks_label"+this.getId());
- var _b25="";
- if(_b24){
- _b25+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_b24.innerHTML+"</span>";
- }
- _b21.innerHTML=_b25+_b23;
- }else{
- if(this.shouldWriteNavLinks()){
- setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_b20+"\");",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 _b29=this.getActiveRequest();
- if(_b29){
- _b29.abortHttpRequest();
- }
- };
- CCognosViewer.prototype.canCancel=function(){
- var _b2a=this.getTracking();
- var _b2b=this.getStatus();
- return _b2a!=""&&_b2b!="complete";
- };
- CCognosViewer.prototype.cancel=function(_b2c){
- if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
- this.getWorkingDialog().disableCancelButton(_b2c);
- }
- this.removeTransparentBackgroundLayer();
- this.clearPrompts();
- if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
- this.envParams["fragment.fireEventWhenComplete"]="";
- }
- var _b2d=null;
- if(this.m_undoStack.length>0){
- _b2d=this.m_undoStack.pop();
- }
- var _b2e=this.getActiveRequest();
- if(this.canCancel()===true||_b2e){
- if(_b2e){
- _b2e.cancelRequest(true);
- }else{
- var _b2f=null;
- var _b30=_b2d!=null&&_b2d.m_bRefreshPage;
- if(typeof this.getCancelDispatcherEntry=="function"){
- _b2f=this.getCancelDispatcherEntry();
- }else{
- if(_b30||this.m_viewerFragment){
- _b2f=new ViewerDispatcherEntry(this);
- }else{
- if(this.getId()=="RS"){
- _b2f=new ViewerDispatcherEntry(this);
- _b2f.addFormField("cv.responseFormat","rs");
- }else{
- _b2f=new DispatcherEntry(this);
- _b2f.addFormField("cv.responseFormat","successfulRequest");
- }
- }
- }
- _b2f.forceSynchronous();
- _b2f.addFormField("ui.action","cancel");
- _b2f.addFormField("m_tracking",this.getTracking());
- this.setTracking("");
- if(_b30){
- var _b31="<CognosViewerUndo><conversation>";
- _b31+=_b2d.m_sConversation;
- _b31+="</conversation></CognosViewerUndo>";
- _b2f.addFormField("cv.previousSession",_b31);
- }
- this.dispatchRequest(_b2f);
- if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
- this.executeCallback("cancel");
- }
- }
- this.setStatus("complete");
- var _b32=this.envParams["ui.action"];
- var _b33=this.getUsePageRequest();
- var _b34=this.m_undoStack.length;
- if(_b2d!=null){
- this.m_sConversation=_b2d.m_sConversation;
- this.m_sParameters=_b2d.m_sParameters;
- this.envParams={};
- applyJSONProperties(this.envParams,_b2d.m_envParams);
- this.m_undoStack.push(_b2d);
- }
- this.setTracking("");
- if(this.previouslySelectedTab){
- this.cancelTabSwitch();
- }else{
- if(_b32!="view"&&_b34<=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 _b35=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_b35;k++){
- var _b37=eval(this.preProcessControlArray[k]);
- if(_b37){
- if(_b37.clearSubmit){
- _b37.clearSubmit();
- }
- }
- }
- }
- };
- CCognosViewer.prototype.wait=function(){
- if(this.isWorking()){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- var _b38=new ViewerDispatcherEntry(this);
- _b38.addFormField("ui.action","wait");
- _b38.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _b38.addFormField("cv.actionState",this.envParams["cv.actionState"]);
- _b38.addNonEmptyStringFormField("bux",this.envParams["bux"]);
- _b38.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
- this.dispatchRequest(_b38);
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.setCAFContext=function(_b39){
- this.m_sCAFContext=_b39;
- };
- CCognosViewer.prototype.setContextInfo=function(sXML){
- this.m_sContextInfoXML=sXML;
- };
- CCognosViewer.prototype.setConversation=function(_b3b){
- this.m_sConversation=_b3b;
- };
- CCognosViewer.prototype.setActionState=function(_b3c){
- this.m_sActionState=_b3c;
- };
- CCognosViewer.prototype.setStatus=function(_b3d){
- this.m_sStatus=_b3d;
- };
- CCognosViewer.prototype.setDebug=function(_b3e){
- this.m_bDebug=_b3e;
- };
- CCognosViewer.prototype.setExecutionParameters=function(_b3f){
- this.m_sParameters=_b3f;
- };
- CCognosViewer.prototype.setMetadataInfo=function(sXML){
- this.m_sMetadataInfoXML=sXML;
- };
- CCognosViewer.prototype.setSecondaryRequests=function(_b41){
- if(_b41){
- this.m_aSecRequests=_b41;
- }else{
- this.m_aSecRequests=[];
- }
- };
- CCognosViewer.prototype.setTracking=function(_b42){
- this.m_sTracking=_b42;
- };
- CCognosViewer.prototype.setSoapFault=function(_b43){
- this.m_sSoapFault=_b43;
- };
- CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
- var _b45=document.getElementById("formWarpRequest"+this.getId());
- var _b46=_b45.elements["ui.postBack"];
- var _b47=_b45.elements["ui.backURL"];
- if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
- window.detachLeavingRV();
- }
- if(window.opener||_b46||(_b47&&_b47.value!=="javascript:window.close();")){
- window.open(sURL,"","");
- this.updateNewBrowserWindow();
- }else{
- window.location=sURL;
- }
- };
- CCognosViewer.prototype.hideToolbar=function(_b48){
- this.m_bHideToolbar=_b48;
- };
- CCognosViewer.prototype.showExcel=function(sURL){
- var _b4a=true;
- var _b4b=document.getElementById("formWarpRequest"+this.getId());
- var _b4c=_b4b.elements["ui.backURL"];
- if(_b4c&&_b4c.value.indexOf("javascript:window.close()")!==0&&_b4c.value.indexOf("close.html")===-1){
- _b4a=false;
- }
- if(window.detachLeavingRV){
- window.detachLeavingRV();
- }
- var _b4d=window;
- if(window.opener&&(isIE()||isFF())&&_b4a){
- _b4d=window.opener?window.opener:window;
- }else{
- if(!window.opener&&_b4a){
- window.location=sURL;
- return;
- }
- }
- var _b4e=null;
- var _b4f="";
- try{
- if(this.envParams["cv.excelWindowOpenProperties"]){
- _b4f=this.envParams["cv.excelWindowOpenProperties"];
- }
- _b4e=_b4d.open(sURL,"",_b4f);
- }
- catch(e){
- _b4d=window;
- _b4e=_b4d.open(sURL,"",_b4f);
- }
- if(!_b4e||_b4e.closed||typeof _b4e.closed=="undefined"){
- alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
- }
- this.updateNewBrowserWindow();
- };
- CCognosViewer.prototype.updateNewBrowserWindow=function(){
- var id=this.getId();
- var _b51=document.forms["formWarpRequest"+id].elements["ui.postBack"];
- var _b52=document.forms["formWarpRequest"+id].elements["ui.backURL"];
- if(_b51&&_b51.value){
- setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
- }else{
- if(_b52&&_b52.value){
- if(_b52.value.length<2048){
- setTimeout("location.replace(\""+_b52.value+"\");",100);
- }else{
- _b52=decodeURIComponent(_b52.value);
- var _b53=_b52.split("?");
- var _b54=document.createElement("form");
- _b54.style.display="none";
- _b54.setAttribute("target","_self");
- _b54.setAttribute("method","post");
- _b54.setAttribute("action",_b53[0]);
- var _b55=_b53[1].split("&");
- for(var _b56=0;_b56<_b55.length;_b56++){
- var _b57=_b55[_b56].indexOf("=");
- var _b58=_b55[_b56].substr(0,_b57);
- var _b59=_b55[_b56].substr(_b57+1);
- var _b5a=document.createElement("img");
- _b5a.setAttribute("type","hidden");
- _b5a.setAttribute("name",decodeURIComponent(_b58));
- _b5a.setAttribute("value",decodeURIComponent(_b59));
- _b54.appendChild(_b5a);
- }
- document.body.appendChild(_b54);
- _b54.submit();
- }
- }else{
- window.close();
- }
- }
- };
- CCognosViewer.prototype.showWaitPage=function(){
- };
- CCognosViewer.prototype.sendRequest=function(_b5b){
- var _b5c=new ViewerDispatcherEntry(this);
- _b5c.addFormField("ui.action",_b5b.getAction());
- if(_b5b.getCallback()!=null){
- _b5c.setCallbacks({"complete":{"object":null,"method":_b5b.getCallback()}});
- }
- var _b5d=_b5b.getFormFields().keys();
- for(var _b5e=0;_b5e<_b5d.length;_b5e++){
- _b5c.addFormField(_b5d[_b5e],_b5b.getFormFields().get(_b5d[_b5e]));
- }
- var _b5f=_b5b.m_oOptions.keys();
- for(var _b60=0;_b60<_b5f.length;_b60++){
- _b5c.addFormField(_b5f[_b60],_b5b.getOption(_b5f[_b60]));
- }
- var _b61=_b5b.m_oParams.keys();
- for(var _b62=0;_b62<_b61.length;_b62++){
- _b5c.addFormField(_b61[_b62],_b5b.getParameter(_b61[_b62]));
- }
- this.dispatchRequest(_b5c);
- };
- CCognosViewer.prototype.promptAction=function(_b63,sUrl){
- this.setKeepFocus(true);
- if(typeof datePickerObserverNotify=="function"){
- datePickerObserverNotify();
- }
- var _b65=this.getViewerWidget();
- if(_b63=="cancel"){
- this.cancelPrompt(sUrl);
- if(_b65){
- if(!this.isReportRenderingDone()){
- var _b66={action:"deleteWidget"};
- _b65.fireEvent("com.ibm.bux.widget.action",null,_b66);
- }
- }
- }else{
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action",_b63=="back"?"back":"forward");
- if(_b63=="finish"){
- oReq.addFormField("run.prompt",false);
- }else{
- if(_b63=="back"||_b63=="next"){
- oReq.addFormField("run.prompt",true);
- }
- }
- if(_b63=="reprompt"){
- if(typeof repromptObserverNotify=="function"){
- repromptObserverNotify(this);
- }
- oReq.addFormField("_promptControl",_b63);
- }else{
- oReq.addFormField("_promptControl","prompt");
- }
- if(_b65){
- _b65.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
- if(_b65.isSelectionFilterEnabled){
- _b65.clearSelectionFilter();
- }
- }
- this.submitPromptValues(oReq);
- }
- };
- CCognosViewer.prototype.cancelPrompt=function(sUrl){
- this.cancel();
- };
- CCognosViewer.prototype.notify=function(_b69,_b6a){
- var _b6b=0,k=0;
- var _b6d=null;
- if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
- _b6b=this.rangeObserverArray.length;
- for(k=0;k<_b6b;k++){
- _b6d=eval(this.rangeObserverArray[k]);
- if(_b6d&&typeof _b6d=="object"&&typeof _b6d.update=="function"){
- _b6d.update();
- }
- }
- }
- var _b6e=true;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- _b6b=this.preProcessControlArray.length;
- for(k=0;k<_b6b;k++){
- _b6d=eval(this.preProcessControlArray[k]);
- if((typeof _b6d.getValid=="function")&&!_b6d.getValid()){
- _b6e=false;
- break;
- }
- }
- }
- this.notifyPageNavEnabled(_b6e);
- if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
- _b6b=this.multipleObserverArray.length;
- for(k=0;k<_b6b;k++){
- _b6d=eval(this.multipleObserverArray[k]);
- if(_b6d&&typeof _b6d=="object"&&typeof _b6d.checkInsertRemove=="function"){
- _b6d.checkInsertRemove();
- }
- }
- }
- for(var _b6f=0;_b6f<gaNotifyTargets.length;_b6f++){
- var _b70=gaNotifyTargets[_b6f];
- if(typeof _b70!="undefined"&&typeof _b70.notify=="function"){
- _b70.notify(_b69,_b6a);
- }
- }
- };
- CCognosViewer.prototype.notifyPageNavEnabled=function(_b71){
- if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
- var _b72=this.pageNavigationObserverArray.length;
- var _b73=false;
- var _b74=null;
- var _b75=null;
- var k=0;
- for(k=0;k<_b72;k++){
- try{
- _b74=eval(this.pageNavigationObserverArray[k]);
- _b75=_b74.getType();
- if(_b75==PROMPTBUTTON_FINISH){
- _b73=true;
- break;
- }
- }
- catch(e){
- }
- }
- for(k=0;k<_b72;k++){
- try{
- _b74=eval(this.pageNavigationObserverArray[k]);
- _b75=_b74.getType();
- if(!_b71){
- if((_b75==PROMPTBUTTON_NEXT)||(_b75==PROMPTBUTTON_OK)||(_b75==PROMPTBUTTON_FINISH)){
- _b74.setEnabled(false);
- }
- }else{
- if(_b75==PROMPTBUTTON_FINISH){
- _b74.setEnabled(this.bCanFinish);
- }else{
- if(_b75==PROMPTBUTTON_NEXT){
- _b74.setEnabled(this.bNextPage||!_b73);
- }else{
- if(_b75==PROMPTBUTTON_OK){
- _b74.setEnabled(true);
- }
- }
- }
- }
- }
- catch(e2){
- }
- }
- }
- };
- CCognosViewer.prototype.getDrillResetHUNs=function(_b77){
- var _b78=null;
- if(this.getRAPReportInfo()){
- _b78=this.getRAPReportInfo().getDrilledOnHUNs();
- }
- if(!_b78){
- return null;
- }
- var _b79=this.getExecutionParameters();
- if(!_b79){
- return null;
- }
- var _b7a=this._getListOfChangedPromptParameters(_b77);
- if(!_b7a||_b7a.length===0){
- return null;
- }
- var _b7b=[];
- for(var i=0;i<_b78.length;i++){
- for(var j=0;j<_b7a.length;j++){
- if(_b7a[j].indexOf(_b78[i])!==-1){
- _b7b.push(_b78[i]);
- }
- }
- }
- return _b7b;
- };
- CCognosViewer.prototype.getOldParameters=function(){
- var _b7e=new CParameterValues();
- var _b7f=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_b7f.childNodes.length==1){
- _b7e.loadWithOptions(_b7f.childNodes[0],false);
- }
- if(!_b7e||!_b7e.m_parameterValues||!_b7e.m_parameterValues.m_aValues){
- return null;
- }
- return _b7e.m_parameterValues.m_aValues;
- };
- CCognosViewer.prototype._createDummyRequest=function(){
- var _b80=new ViewerDispatcherEntry(this);
- return this.preparePromptValues(_b80);
- };
- CCognosViewer.prototype._getChangedPromptParametersValues=function(_b81,_b82,_b83){
- var _b84=XMLBuilderLoadXMLFromString(_b82);
- if(!_b84){
- for(var j=0;j<_b81.length;j++){
- var _b86=_b81[j].m_useValue;
- if(_b82.indexOf(sXmlEncode(_b86))<0){
- _b83.push(_b86);
- }
- }
- return;
- }
- var _b87=_b84.getElementsByTagName("selectOption");
- if(!_b87){
- return;
- }
- var _b88=_b81.length;
- var _b89=_b87.length;
- for(var i=0;i<_b89;i++){
- var _b82=_b87[i].attributes.getNamedItem("useValue").nodeValue;
- bMatchOldParam=false;
- for(var j=0;j<_b88;j++){
- var _b86=_b81[j].m_useValue;
- if(_b82.indexOf(_b86)===0){
- bMatchOldParam=true;
- break;
- }
- }
- if(!bMatchOldParam){
- _b83.push(_b82);
- }
- }
- };
- CCognosViewer.prototype._getListOfChangedPromptParameters=function(_b8b){
- var _b8c=this.getOldParameters();
- if(!_b8c){
- return null;
- }
- var _b8d=[];
- if(!_b8b){
- var _b8e=this._createDummyRequest();
- for(var _b8f in _b8c){
- var _b90=_b8c[_b8f].m_parmValueItems;
- var _b91=_b8e.getRequest().getFormFields().get("p_"+_b8f);
- if(!_b91){
- continue;
- }
- this._getChangedPromptParametersValues(_b90,_b91,_b8d);
- }
- }else{
- if(!_b8b.parameters){
- return null;
- }
- var _b92=_b8b.parameters;
- for(var i=0;i<_b92.length;i++){
- var _b94=_b92[i].parmName;
- if(!_b94||!_b8c[_b94]){
- continue;
- }
- var _b90=_b8c[_b94].m_parmValueItems;
- if(!_b90||_b90.length==0){
- continue;
- }
- this._getChangedPromptParametersValues(_b90,_b92[i].parmValue,_b8d);
- }
- }
- return _b8d;
- };
- CCognosViewer.prototype.submitPromptValues=function(oReq){
- if(this.gbPromptRequestSubmitted===true){
- return false;
- }
- this.gbPromptRequestSubmitted=true;
- if(this.isBux){
- var _b96=this.getDrillResetHUNs(null);
- if(_b96&&_b96.length!==0){
- var _b97={"drilledResetHUNs":_b96};
- this.executeAction("DrillReset",_b97);
- return;
- }
- }
- oReq=this.preparePromptValues(oReq);
- if(window.portletSharePrompt){
- var _b98=this.portletPromptParams(oReq);
- if(_b98.length>0){
- portletSharePrompt(_b98);
- }
- }
- this.dispatchRequest(oReq);
- };
- CCognosViewer.prototype.portletPromptParams=function(oReq){
- var _b9a=[];
- var _b9b=null;
- var _b9c=true;
- var _b9d=oReq.getFormFields().keys();
- for(var _b9e=0;_b9e<_b9d.length;_b9e++){
- _b9b=_b9d[_b9e];
- if(_b9b=="_promptControl"&&oReq.getFormField(_b9b)=="search"){
- _b9c=false;
- break;
- }else{
- if(_b9b.indexOf("p_")===0){
- if(_b9b.indexOf("p_credential")===0){
- _b9c=false;
- break;
- }else{
- _b9a.push([_b9b,oReq.getFormField(_b9b)]);
- }
- }
- }
- }
- if(_b9a&&!_b9c){
- _b9a=[];
- }
- return _b9a;
- };
- CCognosViewer.prototype.preparePromptValues=function(oReq){
- var _ba0=[];
- if(this.preProcessControlArray){
- var _ba1=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_ba1;k++){
- var _ba3=eval(this.preProcessControlArray[k]);
- var _ba4=(typeof _ba3.isEnabled=="function"?_ba3.isEnabled():true);
- if(_ba3&&typeof _ba3.preProcess=="function"&&_ba4){
- _ba3.preProcess();
- if(_ba3.m_oSubmit){
- if(oReq.addParameter){
- oReq.addParameter(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value);
- }else{
- oReq.addFormField(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value);
- }
- _ba0.push(_ba3.m_oSubmit);
- if(_ba3.m_sPromptId&&_ba3.m_oForm&&_ba3.m_oForm.elements&&typeof _ba3.m_oForm.elements["p_"+_ba3.m_sRef]=="object"){
- if(oReq.addParameter){
- oReq.addParameter("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value);
- }else{
- oReq.addFormField("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value);
- }
- }
- }
- }
- }
- }
- var _ba5=document.getElementById("formWarpRequest"+this.getId());
- if(_ba5){
- var _ba6=_ba5.elements;
- for(var _ba7=0;_ba7<_ba6.length;_ba7++){
- var _ba8=_ba6[_ba7];
- if(!_ba8.name||!_ba8.name.match(/^p_/)){
- continue;
- }
- var _ba9=true;
- for(var _baa=0;_baa<_ba0.length;_baa++){
- if(_ba0[_baa]==_ba8){
- _ba9=false;
- break;
- }
- }
- if(_ba9){
- oReq.addFormField(_ba8.name,_ba8.value);
- _ba0.push(_ba8);
- }
- }
- }
- var oRM=this["CognosReport"];
- if(oRM){
- var _bac=oRM.prompt.getParameters();
- for(var i=0;i<_bac.length;i++){
- var _bae="p_"+_bac[i].getName();
- if(!oReq.getFormField(_bae)){
- oReq.addFormField(_bae,_bac[i].getXML());
- }
- }
- }
- return oReq;
- };
- CCognosViewer.prototype.setViewerWidget=function(_baf){
- this.m_viewerWidget=_baf;
- };
- CCognosViewer.prototype.getViewerWidget=function(){
- return this.m_viewerWidget;
- };
- CCognosViewer.prototype.getFlashChartOption=function(){
- var _bb0=this.getViewerWidget();
- var _bb1=null;
- if(_bb0){
- var _bb2=_bb0.getProperties();
- if(_bb2){
- _bb1=_bb2.getFlashCharts();
- }
- }
- return _bb1;
- };
- CCognosViewer.prototype.fireWidgetEvent=function(evt,_bb4){
- var _bb5=this.getViewerWidget();
- if(_bb5!=null){
- _bb5.fireEvent(evt,null,_bb4);
- }
- };
- CCognosViewer.prototype.isMobile=function(){
- return false;
- };
- CCognosViewer.prototype.setVisibleDialog=function(_bb6){
- this.m_visibleDialog=_bb6;
- };
- CCognosViewer.prototype.getVisibleDialog=function(){
- if(typeof this.m_visibleDialog!="undefined"){
- return this.m_visibleDialog;
- }
- return null;
- };
- CCognosViewer.prototype.getContentLocale=function(){
- var _bb7=document.getElementById("formWarpRequest"+this.getId());
- if(_bb7&&_bb7["ui.contentLocale"]&&_bb7["reRunObj"]&&_bb7["reRunObj"].value.length>0){
- return _bb7["ui.contentLocale"].value;
- }
- return null;
- };
- CCognosViewer.prototype.updateLayout=function(_bb8){
- var cvid=this.getId();
- var _bba=document.getElementById("CVHeader"+cvid);
- var _bbb=document.getElementById("CVToolbar"+cvid);
- if(!_bba&&!_bbb){
- setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_bb8+"\");",100);
- return;
- }
- if(_bba){
- var _bbc=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
- if((_bb8=="prompting"&&!this.bShowHeaderWithPrompts)||_bbc){
- _bba.parentNode.style.display="none";
- }else{
- _bba.parentNode.style.display="";
- }
- }
- if(_bbb){
- if(_bb8=="prompting"||this.m_bHideToolbar==true){
- _bbb.parentNode.style.display="none";
- }else{
- _bbb.parentNode.style.display="";
- }
- }
- };
- CCognosViewer.prototype.updateResponseSpecification=function(_bbd){
- this.sResponseSpecification=_bbd;
- };
- CCognosViewer.prototype.getResponseSpecification=function(){
- return this.sResponseSpecification;
- };
- CCognosViewer.prototype.release=function(_bbe){
- if(this.getStatus()!="fault"){
- this._release(_bbe);
- }
- };
- CCognosViewer.prototype._release=function(_bbf){
- var form=document.getElementById("formWarpRequest"+this.getId());
- var _bc1=this.getTracking();
- if(!_bc1&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _bc1=form["m_tracking"].value;
- form["m_tracking"].value="";
- }
- this.setTracking("");
- if(_bc1){
- var _bc2=new DispatcherEntry(this);
- if(this.isWorkingOrPrompting()){
- _bc2.addFormField("ui.action","cancel");
- }else{
- _bc2.addFormField("ui.action","release");
- }
- _bc2.addFormField("cv.responseFormat","successfulRequest");
- _bc2.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _bc2.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
- _bc2.addFormField("m_tracking",_bc1);
- if(_bbf!=true){
- _bc2.forceSynchronous();
- }
- var _bc3=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
- if(_bc3&&_bc3.getFormField("cv.outputKey")){
- _bc2.addFormField("b_action","cvx.high");
- _bc2.addFormField("cv.outputKey",_bc3.getFormField("cv.outputKey"));
- _bc2.addFormField("cv.waitForResponse","false");
- _bc2.setHeaders(_bc3.getHeaders());
- }
- var _bc4=_bc2.getRequest().getFormFields();
- var _bc5=_bc4.keys();
- var data=new URLSearchParams();
- for(var _bc7=0;_bc7<_bc5.length;_bc7++){
- data.append(_bc5[_bc7],_bc4.get(_bc5[_bc7]));
- }
- 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(_bc8){
- this.release(_bc8);
- if(!this.m_destroyed){
- if(typeof window.gaRV_INSTANCES!="undefined"){
- for(var _bc9=0;_bc9<window.gaRV_INSTANCES.length;_bc9++){
- if(window.gaRV_INSTANCES[_bc9].m_sId==this.getId()){
- window.gaRV_INSTANCES.splice(_bc9,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 _bcd=e.parentNode;
- if(_bcd){
- _bcd.removeChild(e);
- }
- }
- delete this.m_layoutElements;
- delete this.m_lidToElement;
- }
- if(this.m_oDrillMgr){
- this.m_oDrillMgr.setCV(null);
- }
- var _bce=this.getSelectionController();
- if(_bce){
- GUtil.destroyProperties(_bce);
- }
- var cvId=this.getId();
- this.m_viewerDispatcher=null;
- GUtil.destroyProperties(this,true);
- cleanupGlobalObjects(cvId);
- }
- };
- CCognosViewer.prototype.exit=function(){
- this.release();
- };
- CCognosViewer.prototype.executeAction=function(_bd0,_bd1){
- var _bd2=this.getAction(_bd0);
- _bd2.setRequestParms(_bd1);
- return _bd2.execute();
- };
- CCognosViewer.prototype.getCalculation=function(_bd3){
- var calc=null;
- var _bd5=this.getCalculationCache();
- if(_bd5[_bd3]){
- calc=_bd5[_bd3];
- }else{
- if(window[_bd3]&&typeof window[_bd3]=="function"){
- calc=new window[_bd3]();
- calc.setCognosViewer(this);
- }
- _bd5[_bd3]=calc;
- }
- return calc;
- };
- CCognosViewer.prototype.findBlueDotMenu=function(_bd6){
- var root=null;
- var _bd8=(_bd6)?_bd6:this.getToolbar();
- for(var idx=0;idx<_bd8.length;++idx){
- if(typeof _bd8[idx]._root!="undefined"){
- root=_bd8[idx]._root;
- break;
- }
- }
- return root;
- };
- CCognosViewer.prototype.findToolbarItem=function(_bda,_bdb){
- var spec=typeof _bdb=="undefined"||_bdb==null?this.getToolbar():_bdb;
- var _bdd=null;
- for(var _bde=0;_bde<spec.length;++_bde){
- var name=spec[_bde]["name"];
- if(typeof name!="undefined"&&name==_bda){
- _bdd=spec[_bde];
- break;
- }
- }
- return _bdd;
- };
- CCognosViewer.prototype.findToolbarItemIndex=function(_be0,_be1){
- var spec=typeof _be1=="undefined"||_be1==null?this.getToolbar():_be1;
- var _be3=null;
- for(var _be4=0;_be4<spec.length;++_be4){
- var name=spec[_be4]["name"];
- if(typeof name!="undefined"&&name==_be0){
- _be3=_be4;
- break;
- }
- }
- return _be3;
- };
- CCognosViewer.prototype.addedButtonToToolbar=function(_be6,_be7,_be8,_be9){
- if(typeof _be7!="undefined"&&_be7!=null){
- if(this.findToolbarItem(_be7.name,_be6)==null){
- _be8=this.findToolbarItemIndex(_be8,_be6);
- if(typeof _be8!="undefined"&&_be8!=null){
- _be6.splice(++_be8,0,_be7);
- return true;
- }else{
- if(typeof _be9!="undefined"&&_be9!=null){
- _be6.splice(_be9,0,_be7);
- return true;
- }
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.addDrillTargets=function(_bea){
- this.m_drillTargets=_bea;
- };
- CCognosViewer.prototype.getDrillTargets=function(){
- if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
- var _beb=document.getElementById("CVIFrame"+this.getId());
- if(typeof _beb!="undefined"&&_beb!=null){
- if(_beb.contentWindow.drillTargets){
- return _beb.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 _bee=this.getRAPReportInfo();
- if(_bee){
- var _bef=_bee.getDisplayTypes();
- return _bef.match("_v2")!=null||_bef.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(_bf0){
- this.m_RAPReportInfo=_bf0;
- };
- 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 _bf3=oDiv.style.display;
- oDiv.style.display="none";
- oDiv.style.display=_bf3;
- };
- CCognosViewer.prototype.isMetadataEmpty=function(){
- var oSC=this.getSelectionController();
- if(oSC){
- var _bf5=oSC.getCCDManager();
- if(_bf5){
- return _bf5.isMetadataEmpty();
- }
- }
- return true;
- };
- CCognosViewer.prototype.setContextMenu=function(_bf6){
- this.m_contextMenu=_bf6;
- };
- CCognosViewer.prototype.getContextMenu=function(){
- return this.m_contextMenu;
- };
- CCognosViewer.prototype.setToolbar=function(_bf7){
- this.m_toolbar=_bf7;
- };
- CCognosViewer.prototype.getToolbar=function(){
- return this.m_toolbar;
- };
- CCognosViewer.prototype.getAdvancedServerProperty=function(_bf8){
- if(this.m_advancedProperties&&this.m_advancedProperties[_bf8]!==undefined&&this.m_advancedProperties[_bf8]!==null){
- return this.m_advancedProperties[_bf8];
- }else{
- return null;
- }
- };
- CCognosViewer.prototype.hasPrompt=function(){
- if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
- var _bf9=false;
- if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
- _bf9=true;
- }else{
- var _bfa=new CParameterValues();
- var _bfb=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_bfb.childNodes.length==1){
- _bfa.loadWithOptions(_bfb.childNodes[0],true);
- var _bfc=_bfa.length();
- for(var _bfd=0;_bfd<_bfc;++_bfd){
- var _bfe=_bfa.getAt(_bfd);
- if(_bfe!==null&&_bfe.length()>0&&_bfe.name().indexOf("credential:")!=-1){
- _bf9=true;
- break;
- }
- }
- }
- }
- this.m_bHasPrompt=_bf9;
- }
- 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,_c00){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastContextChange(_c00);
- }
- stopEventBubble(evt);
- };
- CCognosViewer.prototype.broadcastParameterChange=function(evt,_c02){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastParameterChange(_c02);
- }
- 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,_c04){
- this.m_sId=sId;
- this.m_sText="";
- this.m_sScript=_c04;
- };
- 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 _c05=/document\.write(ln)?\s*\(/gi;
- var _c06=this.m_sScript.replace(_c05,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
- try{
- eval(_c06);
- var _c07=document.getElementById(this.m_sId);
- if(_c07){
- _c07.innerHTML=this.m_sText;
- return true;
- }
- }
- catch(e){
- }
- }
- return false;
- };
- CDocumentWriter.prototype.write=function(_c08){
- var _c09="";
- if(typeof _c08=="function"){
- _c09=eval(_c08);
- }else{
- if(typeof _c08=="string"){
- _c09=_c08;
- }
- }
- this.m_sText+=_c09;
- };
- function setFocusToFirstTabItem(_c0a){
- if(!window.dojo){
- return;
- }
- var _c0b=dojo.query("*",_c0a);
- var _c0c=_c0b.length;
- for(var i=0;i<_c0c;i++){
- var node=_c0b[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(_c0f){
- this.m_oCDManager=_c0f;
- };
- 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 _c11=sCtx.split("::");
- var _c12=[];
- for(var i=0;i<_c11.length;++i){
- _c12[i]=_c11[i].split(":");
- }
- if(_c12&&_c12.length&&_c12[0].length){
- return _c12;
- }else{
- return null;
- }
- };
- ReportContextHelper.prototype.getDataItemName=function(sCtx){
- var _c15=this.processCtx(sCtx);
- if(_c15){
- return this.getRefDataItem(_c15[0][0]);
- }
- return null;
- };
- ReportContextHelper.prototype.getRefDataItem=function(_c16){
- var _c17=this.m_oCDManager.GetRDIValue(_c16);
- return (_c17==null)?"":_c17;
- };
- ReportContextHelper.prototype.getMun=function(_c18){
- var aCtx=null;
- if(typeof _c18==="string"){
- aCtx=this.processCtx(_c18);
- }else{
- if(typeof _c18==="number"){
- aCtx=this.processCtx(_c18.toString());
- }else{
- aCtx=_c18;
- }
- }
- if(aCtx){
- var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]);
- return (sMun==null)?"":sMun;
- }
- return "";
- };
- function ViewerConfig(){
- this.uiConfig=new ViewerUIConfig();
- this.findConfig=typeof ViewerFindActionConfig=="function"?new ViewerFindActionConfig():null;
- this.httpRequestConfig=typeof ViewerHttpRequestConfig=="function"?new ViewerHttpRequestConfig():null;
- this.eventsConfig=typeof ViewerEventsConfig=="function"?new ViewerEventsConfig():null;
- };
- ViewerConfig.prototype.configure=function(_c1b){
- if(!_c1b){
- return;
- }
- if(_c1b.findAction&&this.findConfig){
- this.findConfig.configure(_c1b.findAction);
- }
- if(_c1b.UI){
- this.uiConfig.configure(_c1b.UI);
- }
- if(_c1b.httpRequestCallbacks&&this.httpRequestConfig){
- this.httpRequestConfig.configure(_c1b.httpRequestCallbacks);
- }
- if(_c1b.events&&this.eventsConfig){
- this.eventsConfig.configure(_c1b.events);
- }
- };
- ViewerConfig.prototype.getUIConfig=function(){
- return this.uiConfig;
- };
- ViewerConfig.prototype.getFindActionConfig=function(){
- return this.findConfig;
- };
- ViewerConfig.prototype.getHttpRequestConfig=function(){
- return this.httpRequestConfig;
- };
- ViewerConfig.prototype.getEventsConfig=function(){
- return this.eventsConfig;
- };
- function ViewerUIConfig(){
- this.showBanner=true;
- this.showToolbar=true;
- this.showContextMenu=true;
- this.showPageNavigation=true;
- this.primarySelectionColor=null;
- this.secondarySelectionColor=null;
- this.showSecondarySelection=true;
- };
- ViewerUIConfig.prototype.configure=function(_c1c){
- applyJSONProperties(this,_c1c);
- };
- ViewerUIConfig.prototype.getShowBanner=function(){
- return this.showBanner;
- };
- ViewerUIConfig.prototype.getShowToolbar=function(){
- return this.showToolbar;
- };
- ViewerUIConfig.prototype.getShowContextMenu=function(){
- return this.showContextMenu;
- };
- ViewerUIConfig.prototype.getShowPageNavigation=function(){
- return this.showPageNavigation;
- };
- ViewerUIConfig.prototype.getPrimarySelectionColor=function(){
- return this.primarySelectionColor;
- };
- ViewerUIConfig.prototype.getSeondarySelectionColor=function(){
- return this.secondarySelectionColor;
- };
- ViewerUIConfig.prototype.getShowSecondarySelection=function(){
- return this.showSecondarySelection;
- };
- function ViewerHttpRequestConfig(){
- this.reportStatus={};
- this.UI={};
- };
- ViewerHttpRequestConfig.prototype.configure=function(_c1d){
- applyJSONProperties(this,_c1d);
- };
- ViewerHttpRequestConfig.prototype.getRequestIndicator=function(){
- if(this.UI){
- return this.UI.requestIndicator?this.UI.requestIndicator:null;
- }
- };
- ViewerHttpRequestConfig.prototype.getWorkingDialog=function(){
- if(this.UI){
- return this.UI.workingDialog?this.UI.workingDialog:null;
- }
- };
- ViewerHttpRequestConfig.prototype.getReportStatusCallback=function(_c1e){
- if(this.reportStatus){
- var _c1f=this.reportStatus[_c1e];
- if(_c1f){
- return _c1f;
- }
- if(_c1e=="complete"&&this.reportStatus["initialComplete"]){
- var _c20=this.reportStatus["initialComplete"];
- this.reportStatus["initialComplete"]=null;
- return _c20;
- }
- }
- return null;
- };
- function ViewerEventsConfig(){
- this.showContextMenuOnClick=false;
- };
- ViewerEventsConfig.prototype.configure=function(_c21){
- applyJSONProperties(this,_c21);
- };
- ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){
- return this.showContextMenuOnClick;
- };
- function ViewerState(){
- this.findState=null;
- this.pageState=null;
- };
- ViewerState.prototype.setFindState=function(_c22){
- if(typeof ViewerFindState!="function"){
- return;
- }
- if(!this.findState){
- this.findState=new ViewerFindState();
- }
- this.findState.setState(_c22);
- };
- ViewerState.prototype.clearFindState=function(){
- this.findState=null;
- };
- ViewerState.prototype.getFindState=function(){
- return this.findState;
- };
- ViewerState.prototype.setPageState=function(_c23){
- if(typeof ViewerPageState!="function"){
- return;
- }
- if(!this.pageState){
- this.pageState=new ViewerPageState();
- }
- this.pageState.setState(_c23);
- };
- ViewerState.prototype.clearPageState=function(){
- this.pageState=null;
- };
- ViewerState.prototype.getPageState=function(){
- return this.pageState;
- };
- 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 _c2b={};
- applyJSONProperties(_c2b,this.m_md);
- return _c2b;
- };
- CCDManager.prototype.getClonedContextdataArray=function(){
- var _c2c={};
- applyJSONProperties(_c2c,this.m_cd);
- return _c2c;
- };
- CCDManager.prototype.SetCognosViewer=function(_c2d){
- if(_c2d){
- this.m_oCV=_c2d;
- }
- };
- CCDManager.prototype.onComplete_GetCDRequest=function(_c2e,_c2f){
- if(_c2e){
- var _c30=_c2e.getResult();
- var _c31=XMLBuilderLoadXMLFromString(_c30);
- if(_c31){
- var _c32=_c31.getElementsByTagName("Block");
- for(var i=0;i<_c32.length;i++){
- var _c34="";
- var _c35=_c32[i].firstChild;
- while(_c35){
- _c34+=_c35.nodeValue;
- _c35=_c35.nextSibling;
- }
- var cd=eval("("+_c34+")");
- this.AddContextData(cd);
- }
- }
- }
- if(_c2f&&typeof _c2f=="function"){
- _c2f();
- }
- };
- CCDManager.prototype.FetchContextData=function(_c37,_c38){
- var _c39=[];
- var c=null,_c3b=_c37.length;
- for(var i=0;i<_c3b;++i){
- c=_c37[i];
- if(c!=""&&!this.ContextIdExists(c)){
- _c39.push(c);
- }
- }
- if(_c39.length){
- if(this.m_oCV){
- this.getContextData(_c39,_c38);
- }
- }
- return _c39.length;
- };
- CCDManager.prototype.getContextData=function(_c3d,_c3e){
- var oCV=this.m_oCV;
- var _c40=new AsynchDataDispatcherEntry(oCV);
- _c40.setCanBeQueued(false);
- if(!oCV.isBux){
- _c40.forceSynchronous();
- }
- var form=document["formWarpRequest"+oCV.getId()];
- var _c42=oCV.getConversation();
- var _c43=oCV.getTracking();
- if(!_c43&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _c43=form["m_tracking"].value;
- }
- if(oCV.m_viewerFragment){
- var _c44=oCV.getActiveRequest();
- if(_c44&&_c44.getFormField("m_tracking")==_c43){
- return;
- }
- }
- var _c45={customArguments:[_c3e],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
- if(oCV.getStatus()=="prompting"){
- _c45["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
- }
- _c40.setCallbacks(_c45);
- if(_c42&&oCV.envParams["ui.action"]!="view"){
- _c40.addFormField("ui.action","getContext");
- _c40.addFormField("ui.conversation",_c42);
- }else{
- var _c46=form["ui.object"];
- if(typeof _c46.length!="undefined"&&_c46.length>1){
- _c40.addFormField("ui.object",form["ui.object"][0].value);
- }else{
- _c40.addFormField("ui.object",form["ui.object"].value);
- }
- _c40.addFormField("ui.action","getObjectContext");
- }
- _c40.addFormField("cv.responseFormat","asynchDetailContext");
- _c40.addFormField("context.format","initializer");
- _c40.addFormField("context.type","reportService");
- _c40.addFormField("context.selection",_c3d.join(","));
- _c40.addNonEmptyStringFormField("m_tracking",_c43);
- oCV.dispatchRequest(_c40);
- };
- CCDManager.prototype.ContextIdExists=function(_c47){
- return (this.m_cd&&this.m_cd[_c47]?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(_c48,_c49,_c4a){
- var p=null;
- this.FetchContextData([_c48]);
- var cd=this.m_cd&&this.m_cd[_c48];
- if(cd){
- var md=this.m_md[cd[_c49]];
- if(md){
- p=md[_c4a];
- }
- }
- return p;
- };
- CCDManager.prototype.GetDrillFlag=function(_c4e){
- return this._getMDPropertyFromCD(_c4e,"r","drill");
- };
- CCDManager.prototype.getModelPathFromBookletItem=function(_c4f){
- var mp=null;
- var md=this.m_md[_c4f];
- 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(_c52){
- var p=null;
- var md=this.m_md[_c52];
- if(md){
- p=md.modelBasedDrillThru;
- }
- return p?p:0;
- };
- CCDManager.prototype.GetDrillFlagForMember=function(_c55){
- var _c56=null;
- var d=this._getMDPropertyFromCD(_c55,"r","drill");
- if(d!==null&&this.m_cd[_c55].m){
- _c56=d;
- }
- return _c56;
- };
- CCDManager.prototype.GetDataType=function(_c58){
- return this._getMDPropertyFromCD(_c58,"r","dtype");
- };
- CCDManager.prototype.GetUsage=function(_c59){
- return this._getMDPropertyFromCD(_c59,"r","usage");
- };
- CCDManager.prototype.GetHUN=function(_c5a){
- var hun=this._getMDPropertyFromCD(_c5a,"h","h");
- if(!hun){
- var h=this._getMDPropertyFromCD(_c5a,"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(_c5d){
- var qry=null;
- var q=this._getMDPropertyFromCD(_c5d,"r","q");
- if(q){
- qry=this.m_md[q].q;
- }
- return qry;
- };
- CCDManager.prototype.GetDepth=function(_c60){
- return this._getMDPropertyFromCD(_c60,"r","level");
- };
- CCDManager.prototype.GetDisplayValue=function(_c61){
- var _c62=null;
- this.FetchContextData([_c61]);
- if(this.ContextIdExists(_c61)&&this.m_cd[_c61]){
- _c62=this.m_cd[_c61].u;
- }
- return _c62;
- };
- CCDManager.prototype.GetPUN=function(_c63){
- return this._getMDPropertyFromCD(_c63,"p","p");
- };
- CCDManager.prototype.GetLUN=function(_c64){
- return this._getMDPropertyFromCD(_c64,"l","l");
- };
- CCDManager.prototype.GetMUN=function(_c65){
- return this._getMDPropertyFromCD(_c65,"m","m");
- };
- CCDManager.prototype.GetDUN=function(_c66){
- return this._getMDPropertyFromCD(_c66,"d","d");
- };
- CCDManager.prototype.GetQMID=function(_c67){
- return this._getMDPropertyFromCD(_c67,"i","i");
- };
- CCDManager.prototype.GetRDIValue=function(_c68){
- return this._getMDPropertyFromCD(_c68,"r","r");
- };
- CCDManager.prototype.GetBIValue=function(_c69){
- return this._getMDPropertyFromCD(_c69,"r","bi");
- };
- CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_c6c){
- var _c6d=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
- for(var _c6e=0;_c6e<_c6d.length;++_c6e){
- var _c6f=_c6d[_c6e].expression;
- var _c70=_c6d[_c6e].type;
- if(_c6f==""){
- continue;
- }
- for(var _c71 in this.m_md){
- if(this.m_md[_c71][_c70]==_c6f){
- for(var _c72 in this.m_md){
- if(this.m_md[_c72].r&&this.m_md[_c72][_c70]==_c71){
- if(this.m_md[_c72].drill!=0||_c6c==true){
- for(var ctx in this.m_cd){
- if(this.m_cd[ctx].r==_c72&&this.m_cd[ctx].m){
- return ctx;
- }
- }
- }
- }
- }
- }
- }
- }
- return "";
- };
- CCDManager.prototype.GetContextIdForMUN=function(mun){
- var _c75=null;
- var _c76=null;
- for(var i in this.m_md){
- if(this.m_md[i].m==mun){
- _c75=i;
- break;
- }
- }
- if(_c75!=null){
- for(var j in this.m_cd){
- if(this.m_cd[j].m==_c75){
- _c76=j;
- break;
- }
- }
- }
- return _c76;
- };
- CCDManager.prototype.GetContextIdsForRDI=function(rdi){
- var _c7a=[];
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi){
- _c7a.push(i);
- }
- }
- return _c7a;
- };
- CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_c7d){
- var _c7e=this.GetContextIdsForRDI(rdi);
- for(var i in this.m_cd){
- for(var j in _c7e){
- if(this.m_cd[i].r==_c7e[j]&&this.m_cd[i].u==_c7d){
- var _c81=this.m_cd[i].m;
- if(_c81){
- return this.m_md[_c81].m;
- }
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
- var _c83=null;
- var _c84=null;
- var _c85=this.GetContextIdsForRDI(rdi);
- this.FetchContextData([0]);
- for(var i in this.m_cd){
- for(var j in _c85){
- if(this.m_cd[i].r==_c85[j]){
- var _c88=parseFloat(this.m_cd[i].u);
- if(_c88==this.m_cd[i].u){
- if(_c83==null||_c88<_c83){
- _c83=_c88;
- }
- if(_c84==null||_c88>_c84){
- _c84=_c88;
- }
- }
- }
- }
- }
- if(_c83!=null&&_c84!=null){
- return eval("({ pageMin: "+_c83+", pageMax: "+_c84+"})");
- }
- };
- CCDManager.prototype.GetContextIdForDisplayValue=function(_c89){
- var _c8a=null;
- for(var i in this.m_cd){
- if(this.m_cd[i].u==_c89){
- _c8a=i;
- break;
- }
- }
- return _c8a;
- };
- CCDManager.prototype.GetContextIdForUseValue=function(_c8c){
- var _c8d=null;
- var _c8e=null;
- var _c8f=null;
- for(var i in this.m_md){
- var md=this.m_md[i];
- for(var j in md){
- if(md[j]==_c8c){
- _c8d=i;
- _c8e=j;
- break;
- }
- }
- }
- if(_c8d!=null){
- for(var k in this.m_cd){
- if(this.m_cd[k][_c8e]==_c8d){
- _c8f=k;
- break;
- }
- }
- }
- return _c8f;
- };
- CCDManager.prototype.getDataItemInfo=function(){
- if(this.m_cd){
- var _c94={};
- this.m_dataItemInfo={};
- for(var i in this.m_cd){
- var _c96=this.m_cd[i].r;
- if(typeof _c96!="undefined"){
- var _c97=this.m_md[_c96].r;
- if(this.m_dataItemInfo[_c97]==null){
- this.m_dataItemInfo[_c97]=1;
- }else{
- this.m_dataItemInfo[_c97]++;
- }
- }
- }
- 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(_c98){
- if(_c98<=0){
- return this.ContextDataToJSON();
- }
- if(this.m_cd){
- var _c99={};
- var _c9a={};
- for(var i in this.m_cd){
- var _c9c=this.m_cd[i].r;
- if(typeof _c9c!="undefined"){
- if(_c99[_c9c]==null){
- _c99[_c9c]=0;
- }else{
- _c99[_c9c]++;
- }
- if(_c99[_c9c]<_c98){
- _c9a[i]=this.m_cd[i];
- }
- }
- }
- return CViewerCommon.toJSON(_c9a);
- }
- return "";
- };
- CCDManager.prototype.GetHUNForRDI=function(rdi,_c9e){
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi&&this.m_md[i].q==_c9e){
- var _ca0=this.m_md[i].h;
- if(_ca0){
- return this.m_md[_ca0].h;
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetMetadataIdForQueryName=function(_ca1){
- for(var i in this.m_md){
- if(this.m_md[i].q===_ca1){
- return i;
- }
- }
- return null;
- };
- CCDManager.prototype._isEmptyObject=function(obj){
- for(var _ca4 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(_ca5){
- var item=this.m_cd[_ca5];
- 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(_ca7){
- var item=this.m_cd[_ca7];
- 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 _caa=str.split("].[");
- var _cab=_caa[_caa.length-1];
- return _cab.substring(0,_cab.length-1);
- }
- return str;
- };
- CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_cac){
- var _cad=this._getNamespaceAndDimensionFromUniqueName(_cac);
- if(_cad&&this.m_md){
- for(var _cae in this.m_md){
- var sMun=this.m_md[_cae].m;
- if(sMun&&sMun.length>0){
- if(sMun.indexOf("->:[TM].")>0){
- var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
- if(oObj.dimension&&oObj.dimension===_cad.dimension&&oObj.namespace!==_cad.namespace){
- var _cb1=_cac.indexOf(".");
- return oObj.namespace+_cac.substr(_cb1,_cac.length);
- }
- }else{
- var _cb2=sMun.indexOf("->:[");
- if(_cb2>0){
- if(sMun.substr(_cb2+4,4)!=="TM]."){
- return _cac;
- }
- }
- }
- }
- }
- }
- return _cac;
- };
- CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_cb3){
- if(_cb3&&_cb3.length>0&&_cb3.indexOf("].[")>0){
- var _cb4=_cb3.split("].[");
- if(_cb4.length>1){
- return {"namespace":_cb4[0]+"]","dimension":"["+_cb4[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(_cb5,_cb6,_cb7){
- this.queries={};
- this.burstContext=_cb5||"";
- this.expressionLocale=_cb6||"";
- this.contentLocale=_cb7||"";
- };
- 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 _cb9=sc.getAllSelectedObjects();
- for(var s=0;s<_cb9.length;++s){
- var _cbb=_cb9[s];
- var _cbc=_cbb.getSelectedContextIds();
- var muns=_cbb.getMuns();
- var _cbe=muns.length;
- var _cbf=new SC_SingleSelection();
- _cbf.layoutElementId=_cbb.getLayoutElementId();
- var _cc0=null;
- for(var i=0;i<_cbe;++i){
- var j,_cc3,_cc4;
- if(i===0&&_cbe===1){
- for(j=0;j<muns[i].length;++j){
- _cc3=_cbc[i][j];
- if(_cc3!=0){
- if(j===0){
- _cc0=sc.getRefQuery(_cc3);
- _cc4=_cbb.getDisplayValues()[j];
- this._buildMeasureSelection(sc,_cc3,_cbf.measures,_cc4,j,_cbb.getLayoutType());
- }else{
- if(sc.getUsageInfo(_cc3)!=2){
- this._buildEdgeSelection(sc,_cc3,_cbf.cols,j);
- }
- }
- }
- }
- }else{
- for(j=0;j<muns[i].length;++j){
- _cc3=_cbc[i][j];
- if(_cc3!=0){
- if(i===0){
- _cc4=_cbb.getDisplayValues()[j];
- _cc0=sc.getRefQuery(_cc3);
- this._buildMeasureSelection(sc,_cc3,_cbf.measures,_cc4,j,_cbb.getLayoutType());
- }else{
- if(i===1){
- this._buildEdgeSelection(sc,_cc3,_cbf.rows,j);
- }else{
- if(i===2){
- this._buildEdgeSelection(sc,_cc3,_cbf.cols,j);
- }else{
- this._buildSectionSelection(sc,_cc3,_cbf.sections,j);
- }
- }
- }
- }
- }
- }
- }
- this.AddSelection(_cc0,_cbf);
- }
- }
- };
- CSelectionXml.prototype.AddSelection=function(_cc5,_cc6){
- if(!this.queries[_cc5]){
- this.queries[_cc5]=new SC_SingleQuery();
- }
- this.queries[_cc5].selections.push(_cc6);
- };
- CSelectionXml.prototype._buildMeasureSelection=function(sc,_cc8,_cc9,_cca,idx,_ccc){
- if(_ccc==""||_ccc==null){
- _ccc="datavalue";
- }
- if(_cc8){
- _cc9.push({name:sc.getRefDataItem(_cc8),values:[{use:sc.getUseValue(_cc8),display:_cca}],order:idx,hun:sc.getHun(_cc8),dataType:_ccc,usage:sc.getUsageInfo(_cc8),dtype:sc.getDataType(_cc8),selection:"true"});
- }
- };
- CSelectionXml.prototype._buildEdgeSelection=function(sc,_cce,_ccf,idx){
- if(_cce){
- _ccf.push({name:sc.getRefDataItem(_cce),values:[{use:this.getUseValue(sc,_cce),display:sc.getDisplayValue(_cce)}],order:idx,lun:sc.getLun(_cce),hun:sc.getHun(_cce),dataType:"columnTitle",usage:sc.getUsageInfo(_cce),dtype:sc.getDataType(_cce)});
- }
- };
- CSelectionXml.prototype._buildSectionSelection=function(sc,_cd2,_cd3,idx){
- if(_cd2){
- _cd3.push({name:sc.getRefDataItem(_cd2),values:[{use:this.getUseValue(sc,_cd2),display:sc.getDisplayValue(_cd2)}],order:idx,lun:sc.getLun(_cd2),hun:sc.getHun(_cd2),dataType:"section",usage:sc.getUsageInfo(_cd2),dtype:sc.getDataType(_cd2),queryRef:sc.getRefQuery(_cd2)});
- }
- };
- CSelectionXml.prototype.getUseValue=function(sc,_cd6){
- var _cd7=sc.getMun(_cd6);
- if(_cd7==""){
- _cd7=sc.getUseValue(_cd6);
- }
- return _cd7;
- };
- CSelectionXml.prototype.toXml=function(){
- var _cd8=XMLBuilderCreateXMLDocument("selections");
- var _cd9=_cd8.documentElement;
- XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:xs","http://www.w3.org/2001/XMLSchema");
- XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/");
- XMLBuilderSetAttributeNodeNS(_cd9,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/");
- XMLBuilderSetAttributeNodeNS(_cd9,"xmlns:xsd","http://www.w3.org/2001/XMLSchema");
- XMLBuilderSetAttributeNodeNS(_cd9,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- _cd9.setAttribute("contentLocale",this.contentLocale);
- _cd9.setAttribute("expressionLocale",this.expressionLocale);
- for(var q in this.queries){
- this._queryToXml(_cd9,q,this.queries[q]);
- }
- this._burstToXml(_cd9);
- return XMLBuilderSerializeNode(_cd8);
- };
- CSelectionXml.prototype._queryToXml=function(_cdb,name,obj){
- var _cde=_cdb.ownerDocument.createElement("query");
- _cde.setAttribute("name",name);
- for(var _cdf=0;_cdf<obj.selections.length;++_cdf){
- this._selectionToXml(_cde,obj.selections[_cdf]);
- }
- for(var _ce0=0;_ce0<obj.slicers.length;++_ce0){
- this._slicersToXml(_cde,obj.slicers[_ce0]);
- }
- for(var _ce1=0;_ce1<obj.selections.length;++_ce1){
- this._filtersToXml(_cde,obj.selections[_ce1]);
- }
- _cdb.appendChild(_cde);
- };
- CSelectionXml.prototype._selectionToXml=function(_ce2,_ce3){
- var doc=_ce2.ownerDocument;
- var _ce5=doc.createElement("selection");
- _ce2.appendChild(_ce5);
- this._edgeToXml(_ce5,"row",_ce3.rows);
- this._edgeToXml(_ce5,"column",_ce3.cols);
- this._edgeToXml(_ce5,"measure",_ce3.measures);
- this._edgeToXml(_ce5,"section",_ce3.sections);
- var _ce6=doc.createElement("layoutElementId");
- _ce6.appendChild(doc.createTextNode(_ce3.layoutElementId));
- _ce5.appendChild(_ce6);
- };
- CSelectionXml.prototype._edgeToXml=function(_ce7,_ce8,_ce9){
- var doc=_ce7.ownerDocument;
- var _ceb=doc.createElement(_ce8+"s");
- _ce7.appendChild(_ceb);
- for(var i=0;i<_ce9.length;++i){
- var _ced=doc.createElement(_ce8);
- _ceb.appendChild(_ced);
- var edge=_ce9[i];
- for(var j in edge){
- if(j!=="name"&&j!=="values"){
- _ced.setAttribute(j,edge[j]!==null?edge[j]:"");
- }
- }
- this._itemToXml(_ced,edge.name,edge.values);
- }
- };
- CSelectionXml.prototype._itemToXml=function(_cf0,name,_cf2){
- var doc=_cf0.ownerDocument;
- var _cf4=doc.createElement("item");
- XMLBuilderSetAttributeNodeNS(_cf4,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance");
- var _cf5=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",doc);
- XMLBuilderSetAttributeNodeNS(_cf5,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- _cf5.appendChild(doc.createTextNode(name));
- _cf4.appendChild(_cf5);
- var _cf6=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",doc);
- XMLBuilderSetAttributeNodeNS(_cf6,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance");
- XMLBuilderSetAttributeNodeNS(_cf6,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/");
- _cf4.appendChild(_cf6);
- for(var j=0;j<_cf2.length;j++){
- var _cf8=doc.createElement("item");
- XMLBuilderSetAttributeNodeNS(_cf8,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance");
- var _cf9=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",doc);
- XMLBuilderSetAttributeNodeNS(_cf9,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- if(_cf2[j].use){
- _cf9.appendChild(doc.createTextNode(_cf2[j].use));
- }else{
- if(_cf2[j].display){
- _cf9.appendChild(doc.createTextNode(_cf2[j].display));
- }else{
- _cf9.appendChild(doc.createTextNode(""));
- }
- }
- var _cfa=XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",doc);
- XMLBuilderSetAttributeNodeNS(_cfa,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance");
- if(_cf2[j].display){
- _cfa.appendChild(doc.createTextNode(_cf2[j].display));
- }else{
- _cfa.appendChild(doc.createTextNode(""));
- }
- _cf8.appendChild(_cf9);
- _cf8.appendChild(_cfa);
- _cf6.appendChild(_cf8);
- }
- _cf0.appendChild(_cf4);
- };
- CSelectionXml.prototype._burstToXml=function(_cfb){
- var doc=_cfb.ownerDocument;
- var _cfd=doc.createElement("burst-context");
- _cfd.appendChild(doc.createTextNode(this.burstContext));
- _cfb.appendChild(_cfd);
- };
- CSelectionXml.prototype._slicersToXml=function(_cfe,_cff){
- };
- CSelectionXml.prototype._filtersToXml=function(_d00,_d01){
- };
- CSubscriptionManager.k_SubscriptionWizardName="subscriptionWizard";
- function CSubscriptionManager(cv){
- this.m_cv=cv;
- this.m_bInitialized=false;
- this.m_aWatchRules=null;
- this.m_sEmail="";
- this.m_sAlertNewVersionConfirm="";
- this.m_sQueryNotificationResponse="";
- this.m_bAllowNotification=false;
- this.m_bAllowSubscription=false;
- this.m_bCanCreateNewWatchRule=false;
- this.m_bCanGetNotified=false;
- this.m_bAllowAnnotations=false;
- this.m_bCanCreateAnnotations=false;
- this.m_windowOptions="width=450,height=350,toolbar=0,location=0,status=0,menubar=0,resizable,scrollbars=1";
- };
- CSubscriptionManager.prototype.getViewer=function(){
- return this.m_cv;
- };
- CSubscriptionManager.prototype.Initialize=function(_d03){
- try{
- var _d04=_d03.getJSONResponseObject();
- var _d05=document.forms["formWarpRequest"+this.m_cv.getId()];
- if(_d04["annotationInfo"]){
- var _d06=_d04["annotationInfo"];
- this.m_AnnotationsCount=_d06.annotations.length;
- this.m_annotations=_d06.annotations;
- this.m_bAllowAnnotations=_d06.allowAnnotations;
- this.m_bCanCreateAnnotations=_d06.traverse=="true";
- return true;
- }
- if(_d04["subscriptionInfo"]){
- var _d07=_d04["subscriptionInfo"];
- if(!this.m_bInitialized){
- this.m_sEmail=_d07.sEmail;
- this.m_bAllowNotification=_d07.bAllowNotification;
- this.m_bAllowSubscription=_d07.bAllowSubscription;
- this.m_sAlertNewVersionConfirm=_d07.sAlertNewVersionConfirm;
- if(_d05["ui.action"]&&_d05["ui.action"].value=="view"){
- if(_d05["ui.format"]){
- this.m_bCanCreateNewWatchRule=(_d05["ui.format"].value=="HTML")&&this.m_cv.bCanUseCognosViewerConditionalSubscriptions&&this.m_bAllowSubscription;
- }
- this.m_bCanGetNotified=(!_d05["ui.burstKey"]||(_d05["ui.burstKey"]&&_d05["ui.burstKey"].value==""))&&this.m_bAllowNotification;
- }
- }
- if(_d07.sQueryNotificationResponse){
- this.m_sQueryNotificationResponse=_d07.sQueryNotificationResponse;
- }
- if(_d07.aWatchRules){
- var _d08=_d07.aWatchRules;
- this.m_aWatchRules=[];
- for(var i=0;i<_d08.length;i++){
- this.m_aWatchRules.push(_d08[i]);
- }
- }
- this.m_bInitialized=true;
- return true;
- }
- }
- catch(exception){
- return false;
- }
- return false;
- };
- CSubscriptionManager.prototype.IsValidSelectionForNewRule=function(){
- var _d0a=this.m_cv.getSelectionController();
- if(_d0a&&!_d0a.hasSelectedChartNodes()){
- var _d0b=_d0a.getAllSelectedObjects();
- if(_d0b.length===1){
- if(_d0b[0]!=null&&_d0b[0].getLayoutType()!="columnTitle"){
- return true;
- }
- }
- }
- return false;
- };
- CSubscriptionManager.prototype.CanCreateNewWatchRule=function(){
- if(typeof this.m_cv.UIBlacklist!="undefined"&&this.m_cv.UIBlacklist.indexOf(" RV_TOOLBAR_BUTTONS_ALERT_USING_NEW_WATCH_RULE ")!=-1){
- return false;
- }
- if(!this.m_bInitialized&&this.getViewer().envParams["ui.action"]=="view"){
- var oCV=this.getViewer();
- var _d0d=new JSONDispatcherEntry(oCV);
- _d0d.setKey("subscriptionManager");
- _d0d.forceSynchronous();
- _d0d.addFormField("ui.action","getSubscriptionInfo");
- _d0d.addFormField("cv.responseFormat","subscriptionManager");
- _d0d.addFormField("contextMenu","true");
- this.addCommonFormFields(_d0d);
- _d0d.setCallbacks({"complete":{"object":this,"method":this.Initialize}});
- oCV.dispatchRequest(_d0d);
- }
- return this.m_bCanCreateNewWatchRule;
- };
- CSubscriptionManager.prototype.CanModifyWatchRule=function(){
- return this.m_cv.bCanUseCognosViewerConditionalSubscriptions&&this.m_bAllowSubscription;
- };
- CSubscriptionManager.prototype.CanGetNotified=function(){
- if(typeof this.m_cv.UIBlacklist!="undefined"&&this.m_cv.UIBlacklist.indexOf(" RV_TOOLBAR_BUTTONS_ALERT_ABOUT_NEW_VERSIONS ")!=-1){
- return false;
- }
- return this.m_bCanGetNotified;
- };
- CSubscriptionManager.prototype.UpdateSubscribeMenu=function(){
- var _d0e=this.getStandaloneViewerToolbarControl();
- var _d0f=_d0e?_d0e.getItem("watchNewVersions"):null;
- var _d10=this.m_cv.getWebContentRoot();
- var _d11=this.m_cv.getSkin();
- if(_d0f){
- var _d12=_d0f.getMenu();
- this.ClearSubscriptionMenu();
- var _d13=false;
- if(this.CanGetNotified()){
- if(this.m_sQueryNotificationResponse=="on"){
- new CMenuItem(_d12,RV_RES.RV_DO_NOT_ALERT_NEW_VERSION,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().DeleteNotification();",_d10+"/rv/images/action_remove_from_list.gif",gMenuItemStyle,_d10,_d11);
- _d13=true;
- }else{
- if(this.m_sQueryNotificationResponse=="off"&&this.m_sEmail!=""){
- new CMenuItem(_d12,RV_RES.RV_ALERT_NEW_VERSION,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().AddNotification();",_d10+"/rv/images/action_add_to_list.gif",gMenuItemStyle,_d10,_d11);
- _d13=true;
- }
- }
- }
- if(this.CanCreateNewWatchRule()){
- if(_d13){
- _d12.add(gMenuSeperator);
- }
- var _d14=new CMenuItem(_d12,RV_RES.RV_NEW_WATCH_RULE,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().NewSubscription();",_d10+"/rv/images/action_new_subscription.gif",gMenuItemStyle,_d10,_d11);
- if(!this.IsValidSelectionForNewRule()){
- _d14.disable();
- }
- _d13=true;
- }
- var _d15="";
- if(typeof this.m_cv.UIBlacklist!="undefined"){
- _d15=this.m_cv.UIBlacklist;
- }
- var _d16;
- if(_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES ")==-1){
- if(_d13){
- _d12.add(gMenuSeperator);
- }
- if(this.m_aWatchRules&&this.m_aWatchRules.length>0){
- var _d17=this.CanModifyWatchRule();
- for(var sub=0;sub<this.m_aWatchRules.length;++sub){
- var menu=new CMenuItem(_d12,this.m_aWatchRules[sub].name,"",_d10+"/rv/images/icon_subscription.gif",gMenuItemStyle,_d10,_d11);
- var _d1a=menu.createCascadedMenu(gMenuStyle);
- _d1a.m_oCV=this.m_cv;
- if(_d17&&_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES_MODIFY ")==-1){
- new CMenuItem(_d1a,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifySubscription("+sub+");",_d10+"/rv/images/action_edit.gif",gMenuItemStyle,_d10,_d11);
- }
- if(_d15.indexOf(" RV_TOOLBAR_BUTTONS_RULES_DELETE ")==-1){
- new CMenuItem(_d1a,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteSubscription("+sub+");",_d10+"/rv/images/action_delete.gif",gMenuItemStyle,_d10,_d11);
- }
- }
- }else{
- _d16=new CMenuItem(_d12,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d10,_d11);
- _d16.disable();
- }
- }
- if(_d12.getNumItems()==0){
- _d16=new CMenuItem(_d12,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d10,_d11);
- _d16.disable();
- }
- _d12.setForceCallback(false);
- _d12.draw();
- if(_d12.isVisible()){
- _d12.show();
- }
- _d12.setForceCallback(true);
- }
- };
- CSubscriptionManager.prototype.UpdateAnnotationMenu=function(){
- var _d1b=this.getStandaloneViewerToolbarControl();
- var _d1c=_d1b?_d1b.getItem("addAnnotations"):null;
- var _d1d=this.m_cv.getWebContentRoot();
- var _d1e=this.m_cv.getSkin();
- var _d1f=_d1c.getMenu();
- this.ClearAnnotationMenu();
- var menu=new CMenuItem(_d1f,RV_RES.RV_NEW_COMMENT,"javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().NewAnnotation();",_d1d+"/rv/images/action_comment_add.gif",gMenuItemStyle,_d1d,_d1e);
- var _d21=this.m_annotations.length;
- if(_d21>0){
- _d1f.add(gMenuSeperator);
- }
- if(!this.m_bAllowAnnotations||!this.m_bCanCreateAnnotations){
- menu.disable();
- }
- var _d22;
- var bidi=isViewerBidiEnabled()?BidiUtils.getInstance():null;
- for(var i=0;i<_d21;i++){
- var _d25=this.m_annotations[i].defaultName;
- _d22=_d25.length>60?_d25.substring(0,60)+"...":_d25;
- if(isViewerBidiEnabled()){
- _d22=bidi.btdInjectUCCIntoStr(_d22,getViewerBaseTextDirection());
- }
- var _d26=Boolean(this.m_annotations[i].permissions.read);
- var _d27=Boolean(this.m_annotations[i].permissions.write);
- var _d28=Boolean(this.m_annotations[i].permissions.traverse)&&Boolean(this.m_annotations[i].permissions.write);
- var _d29="javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");";
- var _d2a="javascript:alert('Permission denied')";
- _d29=_d26?_d29:_d2a;
- if(i>0&&this.m_annotations[i].layoutElementId!=this.m_annotations[i-1].layoutElementId){
- _d1f.add(gMenuSeperator);
- }
- var _d2b="/rv/images/action_comment.gif";
- if(this.m_annotations[i].layoutElementId!=""){
- _d2b="/rv/images/action_subscribe.gif";
- }
- menu=new CMenuItem(_d1f,_d22,_d29,_d1d+_d2b,gMenuItemStyle,_d1d,_d1e);
- var _d2c=menu.createCascadedMenu(gMenuStyle);
- var _d2d=new CInfoPanel("300px",_d1d,_d2c.getId()+"_comments");
- _d2d.setParent(_d2c);
- _d25=this.m_annotations[i].defaultName;
- var _d2e=_d25.length>60?_d25.substring(0,60)+"...":_d25;
- if(isViewerBidiEnabled()){
- _d2e=bidi.btdInjectUCCIntoStr(_d2e,getViewerBaseTextDirection());
- }
- _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_NAME,html_encode(_d2e));
- _d2d.addSpacer(4);
- var cmnt=this.m_annotations[i].description;
- var _d30=cmnt.length>590?cmnt.substring(0,590)+"...":cmnt;
- if(isViewerBidiEnabled()){
- _d30=bidi.btdInjectUCCIntoStr(_d30,getViewerBaseTextDirection());
- }
- _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_CONTENTS,replaceNewLine(html_encode(_d30)));
- _d2d.addSpacer(4);
- var _d31=this.m_annotations[i].modificationTime;
- if(isViewerBidiEnabled()){
- _d31=bidi.btdInjectUCCIntoStr(_d31,getViewerBaseTextDirection());
- }
- _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_MODTIME,_d31);
- var _d32=this.m_annotations[i].owner.defaultName;
- if(isViewerBidiEnabled()){
- _d32=bidi.btdInjectUCCIntoStr(_d32,getViewerBaseTextDirection());
- }
- _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_OWNER,_d32);
- _d2c.add(_d2d);
- if(_d27||_d28){
- _d2c.add(gMenuSeperator);
- }
- new CMenuItem(_d2c,RV_RES.RV_VIEW_COMMENT,this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");",_d1d+"/rv/images/action_comment_view.gif",gMenuItemStyle,_d1d,_d1e);
- if(_d27){
- new CMenuItem(_d2c,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifyAnnotation("+i+");",_d1d+"/rv/images/action_comment_modify.gif",gMenuItemStyle,_d1d,_d1e);
- }
- if(_d28){
- new CMenuItem(_d2c,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteAnnotation("+i+");",_d1d+"/rv/images/action_comment_delete.gif",gMenuItemStyle,_d1d,_d1e);
- }
- }
- _d1f.setForceCallback(false);
- _d1f.draw();
- if(_d1f.isVisible()){
- _d1f.show();
- }
- _d1f.setForceCallback(true);
- };
- CSubscriptionManager.prototype.AddNotification=function(){
- alert(this.m_sAlertNewVersionConfirm);
- var oCV=this.getViewer();
- var _d34=new DataDispatcherEntry(oCV);
- _d34.setKey("subscriptionManager");
- _d34.addFormField("ui.action","addNotification");
- _d34.addFormField("cv.responseFormat","data");
- this.addCommonFormFields(_d34);
- oCV.dispatchRequest(_d34);
- };
- CSubscriptionManager.prototype.DeleteNotification=function(){
- alert(RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM);
- var oCV=this.getViewer();
- var _d36=new DataDispatcherEntry(oCV);
- _d36.setKey("subscriptionManager");
- _d36.addFormField("ui.action","deleteNotification");
- _d36.addFormField("cv.responseFormat","data");
- this.addCommonFormFields(_d36);
- oCV.dispatchRequest(_d36);
- };
- CSubscriptionManager.prototype.NewAnnotation=function(){
- var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()];
- var _d38=oFWR["ui.object"].value;
- var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
- GUtil.createFormField(form,"ui.object",_d38);
- GUtil.createFormField(form,"b_action","xts.run");
- GUtil.createFormField(form,"m","rv/annotation1.xts");
- GUtil.createFormField(form,"backURL","javascript:window.close();");
- GUtil.createFormField(form,"action_hint","create");
- var _d3a=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
- window.open(_d3a,form.target,this.m_windowOptions);
- };
- CSubscriptionManager.prototype.ViewAnnotation=function(idx){
- var sub=this.m_annotations[idx];
- var _d3d=sub.searchPath;
- var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
- GUtil.createFormField(form,"ui.object",_d3d);
- GUtil.createFormField(form,"b_action","xts.run");
- GUtil.createFormField(form,"m","rv/annotation1.xts");
- GUtil.createFormField(form,"backURL","javascript:window.close();");
- var _d3f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
- window.open(_d3f,form.target,this.m_windowOptions);
- };
- CSubscriptionManager.prototype.ModifyAnnotation=function(idx){
- var sub=this.m_annotations[idx];
- var _d42=this.m_annotations[idx].searchPath;
- if(sub&&_d42){
- var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
- GUtil.createFormField(form,"ui.object",_d42);
- GUtil.createFormField(form,"b_action","xts.run");
- GUtil.createFormField(form,"m","rv/annotation1.xts");
- GUtil.createFormField(form,"backURL","javascript:window.close();");
- GUtil.createFormField(form,"action_hint","save");
- var _d44=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
- window.open(_d44,form.target,this.m_windowOptions);
- }
- };
- CSubscriptionManager.prototype.DeleteAnnotation=function(idx){
- var sub=this.m_annotations[idx];
- if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){
- var oCV=this.getViewer();
- var _d48=new DataDispatcherEntry(oCV);
- _d48.setKey("subscriptionManager");
- _d48.addFormField("ui.action","deleteAnnotation");
- _d48.addFormField("cv.responseFormat","data");
- this.addCommonFormFields(_d48,sub.searchPath);
- oCV.dispatchRequest(_d48);
- }
- };
- CSubscriptionManager.prototype.NewSubscription=function(){
- var sc=this.m_cv.getSelectionController();
- var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()];
- var _d4b=oFWR.reRunObj.value;
- if(_d4b&&sc&&sc.getAllSelectedObjects().length===1){
- var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
- var fWR=document.getElementById("formWarpRequest"+this.m_cv.getId());
- var _d4e=new CSelectionXml(fWR["ui.burstID"].value,fWR["ui.contentLocale"].value,fWR["ui.outputLocale"].value);
- _d4e.BuildSelectionFromController(sc);
- GUtil.createFormField(form,"rv.selectionSpecXML",_d4e.toXml());
- GUtil.createFormField(form,"rv.periodicalProducer",_d4b);
- GUtil.createFormField(form,"b_action","xts.run");
- GUtil.createFormField(form,"m","subscribe/conditional_subscribe1.xts");
- GUtil.createFormField(form,"backURL","javascript:window.close();");
- var _d4f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
- window.open(_d4f,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1");
- }else{
- }
- };
- CSubscriptionManager.prototype.DeleteSubscription=function(idx){
- var sub=this.m_aWatchRules[idx];
- if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){
- var oCV=this.getViewer();
- var _d53=new DataDispatcherEntry(oCV);
- _d53.setKey("subscriptionManager");
- _d53.addFormField("ui.action","deleteSubscription");
- _d53.addFormField("cv.responseFormat","data");
- this.addCommonFormFields(_d53,sub.searchPath);
- oCV.dispatchRequest(_d53);
- }
- };
- CSubscriptionManager.prototype.ModifySubscription=function(idx){
- var sub=this.m_aWatchRules[idx];
- if(sub&&sub.searchPath){
- var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName);
- GUtil.createFormField(form,"m_obj",sub.searchPath);
- GUtil.createFormField(form,"m_name",sub.name);
- GUtil.createFormField(form,"b_action","xts.run");
- GUtil.createFormField(form,"m_class","reportDataServiceAgentDefinition");
- GUtil.createFormField(form,"m","portal/properties_subscription.xts");
- GUtil.createFormField(form,"backURL","javascript:window.close();");
- var _d57=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId();
- window.open(_d57,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1");
- }
- };
- CSubscriptionManager.prototype.OpenSubscriptionMenu=function(){
- var oCV=this.getViewer();
- var _d59=new JSONDispatcherEntry(oCV);
- _d59.setKey("subscriptionManager");
- _d59.addFormField("ui.action","getSubscriptionInfo");
- _d59.addFormField("cv.responseFormat","subscriptionManager");
- this.addCommonFormFields(_d59);
- _d59.setCallbacks({"complete":{"object":this,"method":this.OpenSubscriptionMenuResponse}});
- oCV.dispatchRequest(_d59);
- };
- CSubscriptionManager.prototype.OpenAnnotationMenu=function(){
- var oCV=this.getViewer();
- var _d5b=new JSONDispatcherEntry(oCV);
- _d5b.setKey("subscriptionManager");
- _d5b.addFormField("ui.action","getAnnotationInfo");
- _d5b.addFormField("cv.responseFormat","getAnnotations");
- var _d5c=oCV.envParams["ui.object"];
- this.addCommonFormFields(_d5b,_d5c?_d5c:"");
- _d5b.setCallbacks({"complete":{"object":this,"method":this.OpenAnnotationMenuResponse}});
- oCV.dispatchRequest(_d5b);
- };
- CSubscriptionManager.prototype.OpenAnnotationMenuResponse=function(_d5d){
- if(this.Initialize(_d5d)){
- this.UpdateAnnotationMenu();
- }else{
- this.ClearAnnotationMenu();
- }
- };
- CSubscriptionManager.prototype.OpenSubscriptionMenuResponse=function(_d5e){
- if(this.Initialize(_d5e)){
- this.UpdateSubscribeMenu();
- }else{
- this.AddEmptySubscriptionMenuItem();
- }
- };
- CSubscriptionManager.prototype.addCommonFormFields=function(_d5f,_d60){
- if(_d60&&_d60!=""){
- _d5f.addFormField("ui.object",_d60);
- }else{
- var _d61=document["formWarpRequest"+this.getViewer().getId()];
- if(_d61&&_d61["reRunObj"]){
- _d5f.addFormField("ui.object",_d61["reRunObj"].value);
- }
- }
- if(_d5f.getFormField("ui.action")=="getSubscriptionInfo"){
- _d5f.addFormField("initialized",this.m_bInitialized?"true":"false");
- }
- _d5f.addFormField("cv.id",this.getViewer().getId());
- };
- CSubscriptionManager.prototype.AddEmptySubscriptionMenuItem=function(){
- var _d62=this.getStandaloneViewerToolbarControl();
- if(_d62){
- var _d63=_d62.getItem("watchNewVersions");
- if(_d63){
- _d63.getMenu().clear();
- }
- var _d64=this.m_cv.getWebContentRoot();
- var _d65=this.m_cv.getSkin();
- var _d66=_d63.getMenu();
- var _d67=new CMenuItem(_d66,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d64,_d65);
- _d67.disable();
- _d66.setForceCallback(false);
- _d66.draw();
- if(_d66.isVisible()){
- _d66.show();
- }
- _d66.setForceCallback(true);
- }
- };
- CSubscriptionManager.prototype.ClearSubscriptionMenu=function(){
- var _d68=this.getStandaloneViewerToolbarControl();
- if(_d68){
- var _d69=_d68.getItem("watchNewVersions");
- if(_d69){
- _d69.getMenu().clear();
- }
- }
- };
- CSubscriptionManager.prototype.ClearAnnotationMenu=function(){
- var _d6a=this.getStandaloneViewerToolbarControl();
- if(_d6a){
- var _d6b=_d6a.getItem("addAnnotations");
- if(_d6b){
- _d6b.getMenu().clear();
- }
- }
- };
- CSubscriptionManager.prototype.ClearContextAnnotationMenu=function(){
- var _d6c=this.getStandaloneViewerContextMenu();
- if(_d6c){
- var _d6d=_d6c.getFindCommentMenuItem();
- if(_d6d){
- _d6d.getMenu().clear();
- }
- }
- };
- CSubscriptionManager.prototype.getStandaloneViewerToolbarControl=function(){
- if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getToolbarControl=="function"){
- return this.m_cv.rvMainWnd.getToolbarControl();
- }else{
- return null;
- }
- };
- CSubscriptionManager.prototype.getStandaloneViewerContextMenu=function(){
- if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getContextMenu=="function"){
- return this.m_cv.rvMainWnd.getContextMenu();
- }else{
- return null;
- }
- };
- var GUtil={};
- GUtil.createHiddenForm=function(name,_d6f,_d70,_d71){
- var form=document.getElementById(name);
- if(form){
- document.body.removeChild(form);
- }
- form=document.createElement("form");
- form.id=name;
- form.name=name;
- form.method=_d6f;
- form.style.display="none";
- form.action=document.forms["formWarpRequest"+_d70].action;
- form.target=_d71+(new Date()).getTime();
- document.body.appendChild(form);
- return form;
- };
- GUtil.createFormField=function(el,name,_d75){
- var _d76=document.createElement("input");
- _d76.type="hidden";
- _d76.name=name;
- _d76.value=_d75;
- el.appendChild(_d76);
- };
- GUtil.generateCallback=function(func,_d78,_d79){
- if(func){
- var _d7a=_d79||this;
- _d78=(_d78 instanceof Array)?_d78:[];
- return (function(_d7b){
- if(typeof _d7b!="undefined"&&_d78.length==0){
- _d78.push(_d7b);
- }
- return func.apply(_d7a,_d78);
- });
- }else{
- return (function(){
- });
- }
- };
- GUtil.destroyProperties=function(_d7c,_d7d){
- var _d7e;
- if(_d7c instanceof Array){
- for(var i=0;i<_d7c.length;i++){
- _d7e=_d7c[i];
- if(_d7e instanceof String){
- _d7e=null;
- }else{
- if(_d7e&&_d7e.destroy&&!_d7e._beingDestroyed){
- _d7e.destroy();
- }
- GUtil.destroyProperties(_d7e);
- }
- }
- }else{
- if(_d7c instanceof Object){
- if(_d7c._beingDestroyed){
- return;
- }
- var obj=_d7c;
- obj._beingDestroyed=true;
- for(var _d81 in obj){
- _d7e=obj[_d81];
- if(_d81==="_beingDestroyed"||_d81==="m_destroyed"||_d81==="_destroyed"||typeof _d7e=="function"){
- continue;
- }
- if(_d7e instanceof Array){
- GUtil.destroyProperties(_d7e);
- }else{
- if(_d7e instanceof Object){
- if(typeof _d7e.destroy=="function"&&!_d7e._destroyed&&(_d7e!==CCognosViewer||_d7d)){
- _d7e.destroy();
- }
- }
- }
- delete obj[_d81];
- }
- }
- }
- };
- cvLoadDialog=function(_d82,_d83,_d84,_d85,_d86,_d87){
- _d87=((_d87===undefined)?true:_d87);
- var _d88=document.getElementById("formWarpRequest"+_d82.getId());
- if(_d88&&_d82){
- _d82.getWorkingDialog().hide();
- var _d89="";
- var _d8a="";
- var _d8b=null;
- if(_d82.isAccessibleMode()){
- _d89="winNAT_"+(new Date()).getTime();
- _d8a=_d82.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
- }else{
- var _d8c=document.body;
- _d8b=new CModal("","",_d8c,null,null,_d85,_d84,true,true,false,true,_d82.getWebContentRoot());
- if(typeof _d86=="string"){
- document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_d86);
- }
- document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
- _d89=CMODAL_CONTENT_ID;
- }
- var _d8d=document.createElement("FORM");
- _d8d.method="POST";
- _d8d.action=_d82.getGateway();
- _d8d.target=_d89;
- _d8d.style.margin="0px";
- document.body.appendChild(_d8d);
- for(var _d8e in _d83){
- _d8d.appendChild(createHiddenFormField(_d8e,_d83[_d8e]));
- }
- if(_d87){
- _d8d.appendChild(createHiddenFormField("cv.id",_d82.getId()));
- _d8d.appendChild(createHiddenFormField("b_action","xts.run"));
- _d8d.appendChild(createHiddenFormField("ui.action",_d88["ui.action"].value));
- _d8d.appendChild(createHiddenFormField("ui.object",_d88["ui.object"].value));
- if(typeof _d82.rvMainWnd!="undefined"){
- _d8d.appendChild(createHiddenFormField("run.outputFormat",_d82.rvMainWnd.getCurrentFormat()));
- }
- if(typeof _d88["run.outputLocale"]!="undefined"){
- _d8d.appendChild(createHiddenFormField("run.outputLocale",_d88["run.outputLocale"].value));
- }
- if(typeof _d8d["backURL"]=="undefined"&&typeof _d8d["ui.backURL"]=="undefined"&&typeof _d88["ui.backURL"]!="undefined"){
- _d8d.appendChild(createHiddenFormField("ui.backURL",_d88["ui.backURL"].value));
- }
- if(typeof _d82!="undefined"&&typeof _d82.getConversation!="undefined"&&typeof _d82.getTracking!="undefined"){
- _d8d.appendChild(createHiddenFormField("ui.conversation",_d82.getConversation()));
- _d8d.appendChild(createHiddenFormField("m_tracking",_d82.getTracking()));
- if(_d82.envParams["ui.name"]!="undefined"){
- _d8d.appendChild(createHiddenFormField("ui.name",_d82.envParams["ui.name"]));
- }
- }
- }
- var _d8f=window.onbeforeunload;
- window.onbeforeunload=null;
- if(_d82.isAccessibleMode()){
- window.open(_d8a,_d89,"rv");
- _d8d.submit();
- }else{
- _d8d.submit();
- _d8b.show();
- }
- window.onbeforeunload=_d8f;
- document.body.removeChild(_d8d);
- _d82.modalShown=true;
- }
- };
- function createHiddenFormField(name,_d91){
- var _d92=document.createElement("input");
- _d92.setAttribute("type","hidden");
- _d92.setAttribute("name",name);
- _d92.setAttribute("id",name);
- _d92.setAttribute("value",_d91);
- return (_d92);
- };
- function isAuthenticationFault(_d93){
- if(_d93!=null){
- var _d94=XMLHelper_FindChildByTagName(_d93,"CAM",true);
- return (_d94!=null&&XMLHelper_FindChildByTagName(_d94,"promptInfo",true)!=null);
- }
- };
- function processAuthenticationFault(_d95,_d96){
- if(isAuthenticationFault(_d95)){
- launchLogOnDialog(_d96,_d95);
- return true;
- }
- return false;
- };
- function isObjectEmpty(_d97){
- for(var _d98 in _d97){
- if(_d97.hasOwnProperty(_d98)){
- return false;
- }
- }
- return true;
- };
- function launchLogOnDialog(cvID,_d9a){
- try{
- var oCV=getCognosViewerObjectRef(cvID);
- var _d9c={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
- if(_d9a!=null){
- var _d9d=XMLHelper_FindChildrenByTagName(_d9a,"namespace",true);
- if(_d9d!=null){
- for(var _d9e=0;_d9e<_d9d.length;++_d9e){
- var _d9f=_d9d[_d9e];
- if(_d9f!=null){
- var _da0=XMLHelper_FindChildByTagName(_d9f,"name",false);
- var _da1=XMLHelper_FindChildByTagName(_d9f,"value",false);
- if(_da0!=null&&_da1!=null){
- var _da2=XMLHelper_GetText(_da0);
- var _da3=XMLHelper_GetText(_da1);
- if(_da2!=null&&_da2.length>0){
- _d9c[_da2]=_da3;
- }
- }
- }
- }
- }
- }
- cvLoadDialog(oCV,_d9c,540,460,null,false);
- }
- catch(exception){
- }
- };
- function getCVWaitingOnFault(){
- var oCV=null;
- for(var _da5=0;_da5<window.gaRV_INSTANCES.length;_da5++){
- if(window.gaRV_INSTANCES[_da5].getRetryDispatcherEntry()!=null){
- oCV=window.gaRV_INSTANCES[_da5];
- break;
- }
- }
- return oCV;
- };
- function ccModalCallBack(_da6,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 _da6!="undefined"&&_da6=="ok"){
- var _da9=oCV.getRetryDispatcherEntry();
- if(_da9){
- _da9.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,_dac){
- var node=null;
- if(_dac&&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,_daf){
- 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(!_daf&&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 _db4=node.nodeName.toUpperCase();
- if((_db4=="SPAN"||_db4=="AREA"||_db4=="IMG")&&node.getAttribute("ctx")!=null){
- return node;
- }else{
- if(_db4=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
- return node.parentNode;
- }
- }
- }
- catch(exception){
- }
- return null;
- };
- function getDocumentFromEvent(evt){
- var node=getCrossBrowserNode(evt,true);
- var _db7=node.document?node.document:node.ownerDocument;
- return _db7;
- };
- 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 _dba=getNodeFromEvent(evt);
- if(_dba&&_dba.nodeName){
- var _dbb=_dba.nodeName.toLowerCase();
- if((_dbb=="td"||_dbb=="span")&&_dba.childNodes&&_dba.childNodes.length>0&&_dba.childNodes[0].className=="textItem"){
- try{
- _dba.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(_dbd){
- var regX=/\r\n|\r|\n/g;
- var _dbf="<br/>";
- return _dbd.replace(regX,_dbf);
- };
- function xml_encode(_dc0){
- var _dc1=""+_dc0;
- if((_dc1=="0")||((_dc0!=null)&&(_dc0!=false))){
- _dc1=_dc1.replace(/&/g,"&");
- _dc1=_dc1.replace(/</g,"<");
- _dc1=_dc1.replace(/>/g,">");
- _dc1=_dc1.replace(/"/g,""");
- _dc1=_dc1.replace(/'/g,"'");
- }else{
- if(_dc0==null){
- _dc1="";
- }
- }
- return _dc1;
- };
- function xml_decodeParser(sAll,_dc3){
- var _dc4=sAll;
- switch(_dc3){
- case "amp":
- _dc4="&";
- break;
- case "lt":
- _dc4="<";
- break;
- case "gt":
- _dc4=">";
- break;
- case "quot":
- _dc4="\"";
- break;
- case "apos":
- _dc4="'";
- break;
- }
- return _dc4;
- };
- function xml_decode(_dc5){
- var _dc6=""+_dc5;
- if((_dc6=="0")||((_dc5!=null)&&(_dc5!=false))){
- _dc6=_dc6.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
- }else{
- if(_dc5==null){
- _dc6="";
- }
- }
- return _dc6;
- };
- function xpath_attr_encode(_dc7){
- var _dc8=null;
- if(_dc7.indexOf("'")>=0&&_dc7.indexOf("\"")>=0){
- var _dc9=_dc7.split("\"");
- _dc8="concat(";
- for(var i=0;i<_dc9.length;++i){
- if(i>0){
- _dc8+=",";
- }
- if(_dc9[i].length>0){
- _dc8+=("\""+_dc9[i]+"\"");
- }else{
- _dc8+="'\"'";
- }
- }
- _dc8+=")";
- }else{
- if(_dc7.indexOf("'")>=0){
- _dc8="\""+_dc7+"\"";
- }else{
- _dc8="'"+_dc7+"'";
- }
- }
- return _dc8;
- };
- 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(_dd2){
- if(typeof window[_dd2]!="undefined"&&window[_dd2]){
- if(isIE()){
- eval("delete "+_dd2);
- }else{
- delete window[_dd2];
- }
- }
- };
- function loadClass(_dd3){
- try{
- var _dd4=eval("new "+_dd3+"();");
- return _dd4;
- }
- catch(e){
- return null;
- }
- };
- function getElementsByClassName(oElm,_dd6,_dd7){
- var _dd8=(_dd6=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_dd6);
- var _dd9=[];
- var _dda=new RegExp("(^|\\s)"+_dd7+"(\\s|$)");
- var _ddb=_dd8.length;
- for(var i=0;i<_ddb;i++){
- var _ddd=_dd8[i];
- if(_dda.test(_ddd.className)){
- _dd9.push(_ddd);
- }
- }
- return _dd9;
- };
- function getImmediateLayoutContainerId(node){
- var _ddf=node;
- while(_ddf!=null){
- if(_ddf.getAttribute&&_ddf.getAttribute("lid")!=null){
- return _ddf.getAttribute("lid");
- }
- _ddf=_ddf.parentNode;
- }
- return null;
- };
- function getChildElementsByAttribute(oElm,_de1,_de2,_de3){
- return getDescendantElementsByAttribute(oElm,_de1,_de2,_de3,true);
- };
- function getElementsByAttribute(oElm,_de5,_de6,_de7,_de8,_de9){
- return getDescendantElementsByAttribute(oElm,_de5,_de6,_de7,false,_de8,_de9);
- };
- function getDescendantElementsByAttribute(oElm,_deb,_dec,_ded,_dee,_def,_df0){
- var _df1=[];
- var _df2=null;
- if(typeof _df0==="undefined"){
- _df2=(typeof _ded!="undefined")?new RegExp("(^|\\s)"+_ded+"(\\s|$)","i"):null;
- }else{
- _df2=_df0;
- }
- if(typeof _deb=="string"){
- _deb=[_deb];
- }
- var _df3=(oElm?_deb.length:0);
- for(var _df4=0;_df4<_df3;_df4++){
- var _df5=null;
- if(_dee){
- if(_deb[_df4]=="*"&&oElm.all){
- _df5=oElm.childNodes;
- }else{
- _df5=[];
- var _df6=oElm.childNodes;
- for(var i=0;i<_df6.length;++i){
- if(_df6[i].nodeName.toLowerCase()==_deb[_df4].toLowerCase()){
- _df5.push(_df6[i]);
- }
- }
- }
- }else{
- _df5=(_deb[_df4]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_deb[_df4]);
- }
- var _df8=_df5.length;
- for(var idx=0;idx<_df8;idx++){
- var _dfa=_df5[idx];
- var _dfb=_dfa.getAttribute&&_dfa.getAttribute(_dec);
- if(_dfb!==null){
- var _dfc=null;
- if(typeof _dfb==="number"){
- _dfc=String(_dfb);
- }else{
- if(typeof _dfb==="string"&&_dfb.length>0){
- _dfc=_dfb;
- }
- }
- if(_dfc!==null){
- if(typeof _ded=="undefined"||(_df2&&_df2.test(_dfc))){
- _df1.push(_dfa);
- if(_def!=-1&&_df1.length>_def){
- return [];
- }else{
- if(_def==1&&_df1.length==1){
- return _df1;
- }
- }
- }
- }
- }
- }
- }
- return _df1;
- };
- function savedOutputDoneLoading(cvId,_dfe){
- var oCV=window["oCV"+cvId];
- var _e00=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
- var _e01=(_e00?_e00.getSavedOutput():null);
- if(_e01){
- _e01.outputDoneLoading();
- }else{
- if(_dfe<5){
- _dfe++;
- var _e02=function(){
- savedOutputDoneLoading(cvId,_dfe);
- };
- setTimeout(_e02,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 _e04=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
- return _e04?parseFloat(_e04[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(_e05,_e06,_e07,_e08){
- if(_e06.length>1){
- document.images[_e05].src=_e06;
- }
- };
- 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 _e0e=node.getAttribute("viewerId");
- if(!_e0e){
- _e0e=node.parentNode.getAttribute("viewerId");
- }
- if(!_e0e){
- return;
- }
- var oCV=window["oCV"+_e0e];
- var _e10=oCV.getAction("Selection");
- _e10.pageClicked(evt);
- return stopEventBubble(evt);
- };
- function clientToScreenCoords(_e11,_e12){
- var _e13=_e11;
- var _e14={topCoord:0,leftCoord:0};
- while(_e13!=null&&_e13!=_e12){
- _e14.topCoord+=_e13.offsetTop;
- _e14.leftCoord+=_e13.offsetLeft;
- _e13=_e13.offsetParent;
- }
- return _e14;
- };
- function getCurrentPosistionString(oCV,_e16,_e17){
- var _e18=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
- var _e19=/\{0\}/;
- var _e1a=/\{1\}/;
- _e18=_e18.replace(_e19,_e16);
- _e18=" "+_e18.replace(_e1a,_e17)+" ";
- return _e18;
- };
- function applyJSONProperties(obj,_e1c){
- for(property in _e1c){
- if(typeof _e1c[property]=="object"&&!(_e1c[property] instanceof Array)){
- if(typeof obj[property]=="undefined"){
- obj[property]={};
- }
- applyJSONProperties(obj[property],_e1c[property]);
- }else{
- obj[property]=_e1c[property];
- }
- }
- };
- function CViewerCommon(){
- };
- CViewerCommon.openNewWindowOrTab=function(sURL,_e1e){
- return window.open(sURL,_e1e);
- };
- CViewerCommon.toJSON=function(obj){
- var type=typeof (obj);
- if(type!="object"||type===null){
- if(type==="string"){
- obj="\""+obj+"\"";
- }
- return String(obj);
- }else{
- var _e21;
- var prop;
- var json=[];
- var _e24=(obj&&obj.constructor==Array);
- for(_e21 in obj){
- prop=obj[_e21];
- type=typeof (prop);
- if(type==="string"){
- prop="\""+prop+"\"";
- }else{
- if(type=="object"&&prop!==null){
- prop=CViewerCommon.toJSON(prop);
- }
- }
- json.push((_e24?"":"\""+_e21+"\":")+String(prop));
- }
- return (_e24?"[":"{")+String(json)+(_e24?"]":"}");
- }
- };
- function resizePinnedContainers(){
- var oCV=window.gaRV_INSTANCES[0];
- if(oCV&&!oCV.m_viewerFragment){
- var _e26=oCV.getPinFreezeManager();
- if(_e26&&_e26.hasFrozenContainers()){
- var _e27=document.getElementById("RVContent"+oCV.getId());
- var _e28=document.getElementById("mainViewerTable"+oCV.getId());
- var _e29=_e27.clientWidth;
- var _e2a=_e28.clientHeight;
- _e26.resize(_e29,_e2a);
- if(isIE()){
- oCV.repaintDiv(_e27);
- }
- }
- }
- };
- function setWindowHref(url){
- var _e2c=window.onbeforeunload;
- window.onbeforeunload=null;
- window.location.href=url;
- window.onbeforeunload=_e2c;
- };
- 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 _e30=gaRV_INSTANCES[0].isBidiEnabled();
- if(_e30){
- return true;
- }
- }
- return false;
- };
- function getViewerBaseTextDirection(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- return gaRV_INSTANCES[0].getBaseTextDirection();
- }
- return "";
- };
- function enforceTextDir(_e31){
- if(isViewerBidiEnabled()&&_e31){
- var sDir=getViewerBaseTextDirection();
- var _e33=BidiUtils.getInstance();
- if(sDir=="auto"){
- sDir=_e33.resolveStrBtd(_e31);
- }
- var _e34=(!dojo._isBodyLtr())?_e33.RLM:_e33.LRM;
- return _e34+((sDir==="rtl")?_e33.RLE:_e33.LRE)+_e31+_e33.PDF+_e34;
- }
- return _e31;
- };
- function getElementDirection(_e35){
- var dir=null;
- if(_e35.currentStyle){
- dir=_e35.currentStyle.direction;
- }else{
- if(window.getComputedStyle){
- var _e37=window.getComputedStyle(_e35,null);
- if(_e37){
- dir=_e37.getPropertyValue("direction");
- }
- }
- }
- if(dir){
- dir=dir.toLowerCase();
- }
- return dir;
- };
- function getScrollLeft(_e38){
- if(getElementDirection(_e38)==="rtl"&&isFF()){
- return _e38.scrollWidth-_e38.offsetWidth+_e38.scrollLeft;
- }
- return _e38.scrollLeft;
- };
- function setScrollLeft(_e39,_e3a){
- if(getElementDirection(_e39)==="rtl"&&isFF()){
- _e39.scrollLeft=_e39.offsetWidth+_e3a-_e39.scrollWidth;
- }else{
- _e39.scrollLeft=_e3a;
- }
- };
- function setScrollRight(_e3b,_e3c){
- if(getElementDirection(_e3b)==="rtl"&&isFF()){
- _e3b.scrollLeft=-_e3c;
- }else{
- _e3b.scrollLeft=_e3b.scrollWidth-_e3b.offsetWidth-_e3c;
- }
- };
- function getBoxInfo(el,_e3e){
- 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 _e3f={};
- var _e40=null;
- if(el.currentStyle){
- _e40=el.currentStyle;
- }else{
- if(window.getComputedStyle){
- _e40=window.getComputedStyle(el,null);
- }
- }
- if(!_e40){
- return null;
- }
- for(i in getBoxInfo.aStyles){
- var _e41=getBoxInfo.aStyles[i];
- var size=null;
- if(_e40.getPropertyValue){
- size=_e40.getPropertyValue(_e41.ff);
- }else{
- size=_e40[_e41.ie];
- }
- if(size&&_e3e){
- size=Number(size.replace("px",""));
- }
- _e3f[_e41.name]=size;
- }
- return _e3f;
- };
- 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(_e43){
- this.m_sContextId=_e43;
- };
- CSelectionMetadata.prototype.getContextId=function(){
- return this.m_sContextId;
- };
- CSelectionMetadata.prototype.setRefQuery=function(_e44){
- this.m_refQuery=_e44;
- };
- CSelectionMetadata.prototype.getRefQuery=function(){
- return this.m_refQuery;
- };
- CSelectionMetadata.prototype.setDataItem=function(_e45){
- this.m_sDataItem=_e45;
- };
- CSelectionMetadata.prototype.getDataItem=function(){
- return this.m_sDataItem;
- };
- CSelectionMetadata.prototype.setMetadataModelItem=function(_e46){
- this.m_sMetadataModelItem=_e46;
- };
- CSelectionMetadata.prototype.getMetadataModelItem=function(){
- return this.m_sMetadataModelItem;
- };
- CSelectionMetadata.prototype.setUseValue=function(_e47){
- this.m_sUseValue=_e47;
- };
- CSelectionMetadata.prototype.getUseValue=function(){
- return this.m_sUseValue;
- };
- CSelectionMetadata.prototype.setUseValueType=function(_e48){
- this.m_sUseValueType=_e48;
- };
- CSelectionMetadata.prototype.setType=function(_e49){
- this.m_sType=_e49;
- };
- CSelectionMetadata.prototype.getType=function(){
- var _e4a=null;
- switch(this.m_sUseValueType){
- case 25:
- case 27:
- case 30:
- case 32:
- _e4a="memberUniqueName";
- break;
- case 26:
- _e4a="memberCaption";
- break;
- case 1:
- case 55:
- case 56:
- _e4a="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:
- _e4a=parseInt(this.m_sUseValueType,10);
- break;
- }
- return _e4a;
- };
- CSelectionMetadata.prototype.getUseValueType=function(){
- if(this.m_sType==null){
- this.m_sType=this.getType();
- }
- return this.m_sType;
- };
- CSelectionMetadata.prototype.setDisplayValue=function(_e4b){
- this.m_sDisplayValue=_e4b;
- };
- CSelectionMetadata.prototype.getDisplayValue=function(){
- return this.m_sDisplayValue;
- };
- CSelectionMetadata.prototype.setUsage=function(_e4c){
- this.m_sUsage=_e4c;
- };
- 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(_e4f,_e50){
- this.m_axisIndex=_e50;
- this.m_index=0;
- this.m_selectionObject=_e4f;
- };
- CSelectionMetadataIterator.prototype.getSelectionAxis=function(){
- var _e51=null;
- if(typeof this.m_selectionObject=="object"&&this.m_axisIndex<this.m_selectionObject.getSelectedContextIds().length){
- _e51=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex];
- }
- return _e51;
- };
- CSelectionMetadataIterator.prototype.hasNext=function(){
- var _e52=this.getSelectionAxis();
- if(_e52!=null){
- return (this.m_index<_e52.length);
- }else{
- return false;
- }
- };
- CSelectionMetadataIterator.prototype.next=function(){
- var _e53=null;
- if(this.hasNext()){
- _e53=new CSelectionMetadata();
- _e53.setContextId(this.m_selectionObject.m_contextIds[this.m_axisIndex][this.m_index]);
- _e53.setDataItem(this.m_selectionObject.getDataItems()[this.m_axisIndex][this.m_index]);
- _e53.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]!=""){
- _e53.setUseValue(this.m_selectionObject.getMuns()[this.m_axisIndex][this.m_index]);
- _e53.setType("memberUniqueName");
- }else{
- _e53.setUseValue(this.m_selectionObject.getUseValues()[this.m_axisIndex][this.m_index]);
- }
- if(typeof this.m_selectionObject.m_selectionController=="object"){
- var _e54=this.m_selectionObject.getSelectedContextIds()[this.m_axisIndex][this.m_index];
- if(this.m_selectionObject.useDisplayValueFromObject){
- _e53.setDisplayValue(this.m_selectionObject.getDisplayValues()[this.m_axisIndex]);
- }else{
- var _e55=null;
- var _e56=null;
- if(this.m_axisIndex===0){
- var _e57=this.m_selectionObject.getCellRef();
- if(_e57&&_e57.nodeName&&_e57.nodeName.toLowerCase()==="td"){
- _e56=this.m_selectionObject.m_selectionController.getDisplayValueFromDOM(_e54,_e57.parentNode);
- }
- }
- if(_e56==null){
- _e56=this.m_selectionObject.m_selectionController.getDisplayValue(_e54);
- }
- if(_e56===""){
- _e56=this.m_selectionObject.m_selectionController.getUseValue(_e54);
- }
- _e53.setDisplayValue(_e56);
- }
- _e53.setUseValueType(this.m_selectionObject.m_selectionController.getDataType(_e54));
- _e53.setUsage(this.m_selectionObject.m_selectionController.getUsageInfo(_e54));
- _e53.setRefQuery(this.m_selectionObject.m_selectionController.getRefQuery(_e54));
- _e53.setHun(this.m_selectionObject.m_selectionController.getHun(_e54));
- _e53.setDun(this.m_selectionObject.m_selectionController.getDun(_e54));
- }
- ++this.m_index;
- }
- return _e53;
- };
- function CAxisSelectionIterator(_e58){
- this.m_index=0;
- this.m_selectionObject=_e58;
- };
- CAxisSelectionIterator.prototype.hasNext=function(){
- return ((typeof this.m_selectionObject=="object")&&(this.m_index<this.m_selectionObject.getSelectedContextIds().length));
- };
- CAxisSelectionIterator.prototype.next=function(){
- var _e59=null;
- if(this.hasNext()){
- _e59=new CSelectionMetadataIterator(this.m_selectionObject,this.m_index);
- ++this.m_index;
- }
- return _e59;
- };
- function getSelectionContextIds(_e5a){
- var _e5b=[];
- var _e5c=_e5a.getAllSelectedObjects();
- if(_e5c!=null&&_e5c.length>0){
- for(var _e5d=0;_e5d<_e5c.length;++_e5d){
- var _e5e=_e5c[_e5d];
- var _e5f=_e5e.getSelectedContextIds();
- var _e60=[];
- for(var item=0;item<_e5f.length;++item){
- var _e62=_e5f[item].join(":");
- _e60.push(_e62);
- }
- _e5b.push(_e60.join("::"));
- }
- }
- return _e5b;
- };
- function getViewerSelectionContext(_e63,_e64,_e65){
- var _e66=_e65==true?_e63.getAllSelectedObjectsWithUniqueCTXIDs():_e63.getAllSelectedObjects();
- if(_e66!=null&&_e66.length>0){
- for(var _e67=0;_e67<_e66.length;++_e67){
- var _e68={};
- var _e69=new CAxisSelectionIterator(_e66[_e67]);
- if(_e69.hasNext()){
- var _e6a=_e69.next();
- if(_e6a.hasNext()){
- var _e6b=_e6a.next();
- var _e6c=_e6b.getContextId();
- _e68[_e6c]=true;
- var _e6d=_e64.addSelectedCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
- if(_e6b.getHun()!=null){
- _e6d.addProperty("HierarchyUniqueName",_e6b.getHun());
- }
- if(_e6b.getDun()!=null){
- _e6d.addProperty("DimensionUniqueName",_e6b.getDun());
- }
- while(_e6a.hasNext()){
- _e6b=_e6a.next();
- _e6c=_e6b.getContextId();
- if(typeof _e68[_e6c]=="undefined"||_e6c===""){
- _e68[_e6c]=true;
- var _e6e=_e6d.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
- if(_e6b.getHun()!=null){
- _e6e.addProperty("HierarchyUniqueName",_e6b.getHun());
- }
- if(_e6b.getDun()!=null){
- _e6e.addProperty("DimensionUniqueName",_e6b.getDun());
- }
- }
- }
- while(_e69.hasNext()){
- _e6a=_e69.next();
- var _e6f=_e6d;
- while(_e6a.hasNext()){
- _e6b=_e6a.next();
- _e6c=_e6b.getContextId();
- if(typeof _e68[_e6c]=="undefined"||_e6c===""){
- _e68[_e6c]=true;
- _e6f=_e6f.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()});
- if(_e6b.getHun()!=null){
- _e6f.addProperty("HierarchyUniqueName",_e6b.getHun());
- }
- if(_e6b.getDun()!=null){
- _e6f.addProperty("DimensionUniqueName",_e6b.getDun());
- }
- }
- }
- }
- }
- }
- }
- }
- var _e70=_e64.toString();
- if(window.gViewerLogger){
- window.gViewerLogger.log("Selection context",_e70,"xml");
- }
- return _e70;
- };
- function PinFreezeContainer(_e71,lid,_e73,_e74,_e75,_e76,_e77){
- this.m_pinFreezeManager=_e71;
- this.m_lid=lid;
- this.m_lidNS=lid+_e73+_e77;
- this.m_viewerId=_e73;
- this.m_freezeTop=_e74;
- this.m_freezeSide=_e75;
- this.m_cachedReportDiv=null;
- this.m_cachedPFContainer=null;
- this.m_cachedBaseContainer=_e76;
- 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=_e77;
- 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 _e78="{";
- _e78+="\"m_clientWidth\":"+this.m_clientWidth+"";
- _e78+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
- _e78+=",\"m_clientHeight\":"+this.m_clientHeight+"";
- _e78+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
- _e78+="}";
- return _e78;
- };
- PinFreezeContainer.prototype.copyProperties=function(_e79){
- this.m_clientWidth=_e79.m_clientWidth;
- this.m_scrollableClientWidth=_e79.m_scrollableClientWidth;
- this.m_clientHeight=_e79.m_clientHeight;
- this.m_scrollableClientHeight=_e79.m_scrollableClientHeight;
- };
- PinFreezeContainer.prototype.setViewerId=function(id){
- this.m_viewerId=id;
- };
- PinFreezeContainer.prototype.getLid=function(){
- return this.m_lid;
- };
- PinFreezeContainer.prototype.createPFContainer=function(_e7b,_e7c){
- var _e7d=document.createElement("temp");
- if(this.m_cachedBaseContainer){
- this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
- this.m_cachedReportDiv=_e7b;
- var _e7e=this.m_cachedBaseContainer.parentNode;
- var _e7f=this.loadTemplateHTML();
- if(_e7f){
- _e7d.innerHTML=_e7f;
- var _e80=this.getContainerByLID(_e7d);
- var _e81=this.getSectionByLID(_e7d.firstChild,"pfMainOutput");
- if(_e81){
- var i=this.getChildPosition(_e7e,this.m_cachedBaseContainer);
- if(i!=-1){
- var _e83=this.m_pinFreezeManager.m_oCV;
- if(_e83&&_e83.envParams["freezeDefaultWrap"]){
- if(this.m_cachedBaseContainer.style.whiteSpace===""&&_e83.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
- var _e84=this.m_cachedBaseContainer.getElementsByTagName("span");
- if(_e84){
- for(var k=0;k<_e84.length;k++){
- _e84[k].style.whiteSpace="nowrap";
- }
- }
- this.m_wrapFlag=true;
- }
- }
- if(!_e7c){
- 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";
- }
- _e81.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
- _e81.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
- }
- _e81.appendChild(this.m_cachedBaseContainer);
- this.insertAt(_e7e,_e80,i);
- }
- if(this.m_cachedBaseContainer.style.border!==""){
- _e80.style.border=this.m_cachedBaseContainer.style.border;
- this.m_cachedBaseContainer.style.border="";
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype._getFixedWidth=function(_e86){
- if(_e86&&_e86.style.width&&!_e86.getAttribute("authoredFixedWidth")){
- var _e87=Number(_e86.style.width.split("px")[0]);
- return isNaN(_e87)?null:_e87;
- }
- return null;
- };
- PinFreezeContainer.prototype._getFixedHeight=function(_e88){
- if(_e88&&_e88.style.height&&!_e88.getAttribute("authoredFixedHeight")){
- var _e89=Number(_e88.style.height.split("px")[0]);
- return isNaN(_e89)?null:_e89;
- }
- return null;
- };
- PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_e8a){
- var _e8b=this._getFixedWidth(_e8a);
- if(_e8b){
- this.m_fixedWidth=_e8b;
- this.m_clientWidth=this.m_fixedWidth;
- this.m_scrollableClientWidth=this.m_fixedWidth;
- }
- var _e8c=this._getFixedHeight(_e8a);
- if(_e8c){
- this.m_fixedHeight=_e8c;
- this.m_clientHeight=this.m_fixedHeight;
- this.m_scrollableClientHeight=this.m_fixedHeight;
- }
- };
- PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
- var _e8d="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeTop\"><td align=\"center\" templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfHomeCell_"+this.m_lidNS+"\" style=\"overflow-x:hidden; overflow-y:hidden; width:100%; height:100%\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td templatePart=\"freezeTop\"></td></tr>"+"<tr><td class=\"BUXNoPrint\" valign=top templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"<td class=\"BUXNoPrint\" templatePart=\"freezeTop\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr>"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeSide\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td><td></td></tr></table>";
- return _e8d;
- };
- PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
- var _e8e="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\"><tr>"+"<td class=\"BUXNoPrint\" valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"</tr>"+"<tr class=\"BUXNoPrint\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td></tr></table>";
- return _e8e;
- };
- PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
- var _e8f="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\"><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td></td></tr>"+"<tr><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"></div></td>"+"<td class=\"BUXNoPrint\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr></table>";
- return _e8f;
- };
- 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(_e90){
- var _e91=this.getSection("pfMainOutput");
- var _e92=_e91.getAttribute("pfslid");
- var _e93=this.getSection("pfSideHeadings");
- var _e94=_e93.getAttribute("pfslid");
- var _e95=this.getMainOutputHomeCell();
- if(!_e95){
- return;
- }
- var _e96=_e90;
- var _e97=_e93;
- var _e98=this.isA11yEnabled(_e96);
- var _e99=this.m_pinFreezeManager.deepCloneNode(_e96);
- _e97.appendChild(_e99);
- var _e9a=this.getSectionHomeCell(_e93);
- if(!_e9a){
- return;
- }
- var _e9b=_e96.getElementsByTagName("tbody");
- var _e9c=_e99.getElementsByTagName("tbody");
- if(_e9b.length>0&&_e9c.length>0){
- var _e9d=_e9b[0];
- var _e9e=_e9c[0];
- var _e9f=_e9d.firstChild;
- var _ea0=_e9e.firstChild;
- var _ea1=_e95.rowSpan;
- this.markAsCopy(_e95,_e9a,_e92,_e94);
- for(var r=0;r<_ea1;++r){
- var _ea3=_e9e.rows[r];
- this.removeCTX(_ea3);
- }
- for(var r=_ea1;r<_e9e.rows.length;++r){
- var _ea4=_e9d.rows[r];
- var _ea3=_e9e.rows[r];
- _ea3.style.visibility="hidden";
- for(var c=0;c<_ea3.cells.length;++c){
- var _ea6=_ea3.cells[c];
- if(_e98){
- _ea6=this.m_pinFreezeManager.removeIdAttribute(_ea6);
- }
- if(_ea6.getAttribute("type")=="datavalue"){
- _ea6.removeAttribute("ctx");
- _ea6.removeAttribute("uid");
- _ea6.removeAttribute("name");
- }else{
- var _ea7=_ea4.cells[c];
- this.markAsCopy(_ea7,_ea6,_e92,_e94);
- }
- }
- _ea3.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_ea8,_ea9){
- if(isFF()||isIE()){
- if(_ea8&&_ea8.length&&_ea8[0].cells&&_ea8[0].cells.length>1){
- if(this.m_freezeSide){
- var _eaa=this.getBorderInfo(_ea8[0].cells[1],"right");
- if(_eaa){
- _ea9.style.borderRightWidth=_eaa.borderRightWidth;
- _ea9.style.borderRightStyle=_eaa.borderRightStyle;
- _ea9.style.borderRightColor=_eaa.borderRightColor;
- }
- }
- if(this.m_freezeTop){
- var _eaa=this.getBorderInfo(_ea8[0].cells[1],"bottom");
- if(_eaa){
- _ea9.style.borderBottomWidth=_eaa.borderBottomWidth;
- _ea9.style.borderBottomStyle=_eaa.borderBottomStyle;
- _ea9.style.borderBottomColor=_eaa.borderBottomColor;
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.createTopHeadings=function(_eab){
- var _eac=this.getSection("pfMainOutput");
- var _ead=_eac.getAttribute("pfslid");
- var _eae=this.getSection("pfTopHeadings");
- var _eaf=_eae.getAttribute("pfslid");
- var _eb0=this.getMainOutputHomeCell();
- if(!_eb0){
- return;
- }
- var _eb1=_eab;
- var _eb2=_eae;
- var _eb3=this.isA11yEnabled(_eb1);
- var _eb4=this.m_pinFreezeManager.deepCloneNode(_eb1);
- _eb4.setAttribute("clonednode","true");
- _eb2.appendChild(_eb4);
- var _eb5=_eb1.getElementsByTagName("tbody");
- var _eb6=_eb4.getElementsByTagName("tbody");
- if(_eb5.length>0&&_eb6.length>0){
- var _eb7=_eb5[0];
- var _eb8=_eb6[0];
- var _eb9=_eb0.rowSpan;
- for(var r=0;r<_eb8.rows.length;++r){
- var _ebb=_eb7.rows[r];
- var _ebc=_eb8.rows[r];
- if(_eb3){
- _ebc=this.m_pinFreezeManager.removeIdAttribute(_ebc);
- }
- _ebc.style.visibility="hidden";
- for(var c=0;c<_ebc.cells.length;++c){
- var _ebe=_ebc.cells[c];
- if(r>_eb9||_ebe.getAttribute("type")=="datavalue"){
- _ebe.removeAttribute("ctx");
- _ebe.removeAttribute("uid");
- _ebe.removeAttribute("name");
- }else{
- var _ebf=_ebb.cells[c];
- this.markAsCopy(_ebf,_ebe,_ead,_eaf);
- if(_ebf===_eb0){
- this.initializeHomeCellTabIndex(_ebe);
- this.applyNeighbouringBorderStylesToHomeCell(_eb7.rows,_ebe);
- }
- }
- }
- _ebc.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.createHomeCellHeading=function(){
- var _ec0=this.getSection("pfMainOutput");
- var _ec1=_ec0.getAttribute("pfslid");
- var _ec2=this.getSection("pfHomeCell");
- var _ec3=_ec2.parentNode;
- var _ec4=_ec2.getAttribute("pfslid");
- var _ec5=this.getMainOutputHomeCell();
- if(!_ec5){
- return;
- }
- _ec3.style.height="100%";
- var _ec6=this.getTopHeadingSectionHeight(_ec5);
- _ec2.style.height=_ec6-this.m_containerMargin.top+"px";
- _ec2.style.width=this.getSideHeadingSectionWidth(_ec5)-this.m_containerMargin.left+"px";
- _ec2.style.marginTop=this.m_containerMargin.top+"px";
- _ec2.style.marginLeft=this.m_containerMargin.left+"px";
- var _ec7=_ec5.parentNode;
- var _ec8=_ec7.cloneNode(false);
- var _ec9=this._findBestGuessHomeCell(_ec5);
- var _eca=document.createElement("div");
- _eca.style.width="100%";
- _eca.style.height="100%";
- while(_ec5.offsetLeft<=_ec9.offsetLeft){
- oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_ec5);
- if(isFF()||isIE()){
- _ec5.appendChild(_eca);
- oTargetHomeCell.style.width=_eca.clientWidth+"px";
- _ec5.removeChild(_eca);
- }else{
- oTargetHomeCell.style.width=_ec5.clientWidth+1+"px";
- }
- oTargetHomeCell.style.borderBottomWidth="0px";
- _ec8.appendChild(oTargetHomeCell);
- this.markAsCopy(_ec5,oTargetHomeCell,_ec1,_ec4);
- if(_ec5.nextSibling){
- _ec5=_ec5.nextSibling;
- }else{
- break;
- }
- }
- if(oTargetHomeCell){
- oTargetHomeCell.style.borderRightWidth="0px";
- }
- var _ecb=_ec7.parentNode;
- var _ecc=_ecb.cloneNode(false);
- _ecc.appendChild(_ec8);
- var _ecd=_ecb.parentNode;
- var _ece=_ecd.cloneNode(false);
- _ece.appendChild(_ecc);
- _ece.style.width="100%";
- _ece.style.height="100%";
- _ece.style.marginLeft="";
- _ece.style.marginTop="";
- _ec2.appendChild(_ece);
- this.initializeHomeCellTabIndex(oTargetHomeCell);
- this.applyNeighbouringBorderStylesToHomeCell(_ec0.firstChild.rows,_ec2);
- };
- PinFreezeContainer.prototype.markAsCopy=function(main,copy,_ed1,_ed2){
- if(!main.pfCopy){
- main.setAttribute("pfslid",_ed1);
- main.pfCopy=[];
- }
- main.pfCopy.push(copy);
- copy.pfMain=main;
- copy.setAttribute("pfslid",_ed2);
- };
- PinFreezeContainer.prototype.getCopy=function(_ed3){
- if(_ed3.pfCopy){
- var _ed4={};
- for(var i in _ed3.pfCopy){
- var copy=_ed3.pfCopy[i];
- if(copy.getAttribute){
- var _ed7=copy.getAttribute("pfslid");
- if(_ed7){
- var _ed8=PinFreezeContainer.getSectionNameFromSlid(_ed7);
- var _ed9=this.getSection(_ed8);
- if(_ed9&&PinFreezeContainer.isSectionVisible(_ed9)){
- _ed4[_ed8]=copy;
- }
- }
- }
- }
- if(_ed4["pfHomeCell"]){
- return _ed4["pfHomeCell"];
- }
- for(i in _ed4){
- return _ed4[i];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMain=function(_eda){
- if(_eda.pfMain){
- return _eda.pfMain;
- }
- return null;
- };
- PinFreezeContainer.isSectionVisible=function(_edb){
- var node=_edb;
- 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 _edd={isSideFrozen:false,isTopFrozen:false};
- if(this.m_freezeSide){
- var side=this.getSection("pfSideHeadings");
- if(side){
- _edd.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
- }
- }
- if(this.m_freezeTop){
- var top=this.getSection("pfTopHeadings");
- if(top){
- _edd.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
- }
- }
- return _edd;
- };
- PinFreezeContainer.prototype.checkSectionStructureChange=function(_ee0,_ee1){
- if(_ee0.isSideFrozen!==_ee1.isSideFrozen||_ee0.isTopFrozen!==_ee1.isTopFrozen){
- this.m_pinFreezeManager.sectionStructureChange();
- }
- };
- PinFreezeContainer.prototype.freezeContainerInReport=function(_ee2){
- this.cacheContainerAndSections(this.getContainerByLID(_ee2));
- this.m_homeCellNodes={};
- this.updateContainer();
- };
- PinFreezeContainer.prototype.frozenSectionsRequired=function(){
- return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
- };
- PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
- var _ee3=this.getSection("pfMainOutput");
- if(_ee3){
- if(this.m_freezeSide){
- var _ee4=_ee3.scrollWidth;
- return ((this.m_clientWidth<_ee4)||_ee4==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
- var _ee5=this.getSection("pfMainOutput");
- if(_ee5){
- if(this.m_freezeTop){
- var _ee6=_ee5.scrollHeight;
- return ((this.m_clientHeight<_ee6)||_ee6==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.showTemplatePart=function(_ee7,_ee8){
- var _ee9=this.getContainer().rows;
- for(var r=0;r<_ee9.length;++r){
- if(_ee9[r].getAttribute("templatePart")===_ee7){
- _ee9[r].style.display=((_ee8)?"":"none");
- }else{
- var _eeb=_ee9[r].cells;
- for(var c=0;c<_eeb.length;++c){
- if(_eeb[c].getAttribute("templatePart")===_ee7){
- _eeb[c].style.display=((_ee8)?"":"none");
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.showFreezeTopOnly=function(_eed){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _eee=(_eed.scrollWidth==0)?_eed.clientWidth:_eed.scrollWidth;
- this.updateMainOutputWidth(_eee);
- this.setScrollX(_eed,0);
- if(this.getSection("pfTopHeadings")){
- this.getSection("pfTopHeadings").style.width=_eee+"px";
- this.setScrollX(this.getSection("pfTopHeadings"),0);
- }
- this.showTemplatePart("freezeSide",false);
- };
- PinFreezeContainer.prototype.showFreezeSideOnly=function(_eef){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _ef0=(_eef.scrollHeight==0)?_eef.clientHeight:_eef.scrollHeight;
- this.updateMainOutputHeight(_ef0);
- this.setScrollY(_eef,0);
- if(this.getSection("pfSideHeadings")){
- this.getSection("pfSideHeadings").style.height=_ef0+"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(_ef1){
- this.updateMainOutputWidth((_ef1.scrollWidth==0)?_ef1.clientWidth:_ef1.scrollWidth);
- this.updateMainOutputHeight((_ef1.scrollHeight==0)?_ef1.clientHeight:_ef1.scrollHeight);
- this.setInitialScrollPosition(_ef1,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(_ef4){
- return _ef4.firstChild?true:false;
- };
- PinFreezeContainer.prototype.updateContainer=function(){
- var _ef5=this.getSection("pfMainOutput");
- var _ef6=this.getMainOutputHomeCell();
- if(_ef6){
- if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
- this.m_scrollableClientHeight-=_ef6.offsetHeight;
- var _ef7=this.calculateMinCrossTabScrollableClientHeight();
- if(_ef7>this.m_scrollableClientHeight){
- this.m_scrollableClientHeight=_ef7;
- }
- }
- if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
- this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_ef6);
- }
- }
- if(_ef5&&_ef6){
- this.showAll();
- if(this.frozenSectionsRequired()){
- this.updateMainOutputSize();
- this.initializeHomeCellTabIndex(_ef6);
- if(this.m_freezeSide){
- var _ef8=this.getSection("pfSideHeadings");
- if(!this.headingsCreated(_ef8)){
- this.createSideHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeTop){
- this.initializeTouchScrolling(_ef8);
- }
- }
- var _ef9=this.getSection("pfHorizontalScrollBar");
- _ef9.scrollLeft="0px";
- }
- if(this.m_freezeTop){
- var _efa=this.getSection("pfTopHeadings");
- if(!this.headingsCreated(_efa)){
- this.createTopHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeSide){
- this.initializeTouchScrolling(_efa);
- }
- }
- var _efb=this.getSection("pfVerticalScrollBar");
- _efb.scrollTop="0px";
- }
- if(this.m_freezeSide&&this.m_freezeTop){
- var _efc=this.getSection("pfHomeCell");
- if(!this.headingsCreated(_efc)){
- this.createHomeCellHeading();
- }
- _efc.style.display="";
- }
- var _efd=this.updateSideHeadingSize(_ef6);
- var _efe=this.updateTopHeadingSize(_ef6);
- if(!this.frozenSectionsRequired()){
- this.showMainOutputOnly(_ef5);
- }
- this.setInitialScrollPosition(_ef5,_efd,_efe);
- if(this.m_freezeTop&&this.m_freezeSide){
- this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_efe);
- this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_efd,0);
- }
- this.initializeTouchScrolling(_ef5);
- }else{
- this.showMainOutputOnly(_ef5);
- this.removeTouchScrolling();
- }
- this.updateTabIndexValues();
- }
- };
- PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
- var _eff=0;
- if(this.m_cachedPFContainer){
- var _f00=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
- if(_f00){
- var _f01=0;
- for(var r=0;r<_f00.rows.length;r++){
- var row=_f00.rows[r];
- for(var c=0;c<row.cells.length;c++){
- var cell=row.cells[c];
- if(cell.getAttribute("type")=="datavalue"){
- _f01++;
- if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
- _eff=_eff+cell.offsetHeight;
- }else{
- _f01++;
- var _f06=this.getSection("pfVerticalScrollBar");
- if(_f06){
- _eff=_f06.offsetWidth*2;
- }
- }
- break;
- }
- }
- if(_f01>=2){
- break;
- }
- }
- }
- }
- return _eff;
- };
- PinFreezeContainer.prototype.updateSideHeadingSize=function(_f07){
- var _f08=0;
- if(this.m_freezeSide){
- var _f09=this.getSection("pfMainOutput");
- if(!_f09){
- return 0;
- }
- if(!this.frozenSideHeadingsRequired()){
- this.showFreezeTopOnly(_f09);
- return 0;
- }
- var _f0a=this.getSection("pfSideHeadings");
- _f08=this.getSideHeadingSectionWidth(_f07);
- var _f0b=this.getSection("pfHorizontalScrollBar");
- var _f0c=this.getSectionHomeCell(_f0a);
- if(_f0a.style.display=="none"){
- _f0a.style.display="";
- _f0b.style.display="";
- }
- _f0a.style.width=_f08+"px";
- _f0a.style.height=_f09.clientHeight+"px";
- }
- return _f08;
- };
- PinFreezeContainer.prototype.updateTopHeadingSize=function(_f0d){
- var _f0e=0;
- if(this.m_freezeTop){
- var _f0f=this.getSection("pfMainOutput");
- if(!_f0f){
- return 0;
- }
- if(!this.frozenTopHeadingsRequired()){
- this.showFreezeSideOnly(_f0f);
- return 0;
- }
- var _f10=this.getSection("pfTopHeadings");
- _f0e=this.getTopHeadingSectionHeight(_f0d);
- var _f11=this.getSection("pfVerticalScrollBar");
- var _f12=this.getSectionHomeCell(_f10);
- if(_f10.style.display=="none"){
- _f10.style.display="";
- _f11.style.display="";
- }
- _f10.style.height=_f0e+"px";
- _f10.style.width=_f0f.clientWidth+"px";
- }
- return _f0e;
- };
- PinFreezeContainer.prototype.setScrollX=function(_f13,_f14){
- if(getElementDirection(_f13)==="rtl"){
- setScrollRight(_f13,_f14);
- }else{
- setScrollLeft(_f13,_f14);
- }
- };
- PinFreezeContainer.prototype.setScrollY=function(_f15,_f16){
- _f15.scrollTop=_f16;
- };
- PinFreezeContainer.prototype.setInitialScrollPosition=function(_f17,_f18,_f19){
- if(getElementDirection(_f17)==="rtl"){
- setScrollRight(_f17,_f18);
- }else{
- setScrollLeft(_f17,_f18);
- }
- _f17.scrollTop=_f19;
- };
- PinFreezeContainer.prototype.getScrollableClientWidth=function(){
- return this.m_scrollableClientWidth;
- };
- PinFreezeContainer.prototype.setScrollableClientWidth=function(_f1a){
- this.m_scrollableClientWidth=_f1a;
- };
- 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(_f1b){
- this.m_scrollableClientHeight=_f1b;
- };
- PinFreezeContainer.prototype.getClientHeight=function(){
- return this.m_clientHeight;
- };
- PinFreezeContainer.prototype.clientHeight=function(_f1c){
- return _f1c.clientHeight;
- };
- PinFreezeContainer.prototype.findBestContainerHeight=function(_f1d){
- if(this.m_freezeTop&&this.m_cachedReportDiv){
- var _f1e=this.m_cachedReportDiv.parentNode;
- if(_f1e){
- var _f1f=this._findRestOfPageHeight(this.getContainer());
- return _f1d-_f1f-(this.c_pageMargin/2)-this.m_containerMargin.top;
- }
- }
- return _f1d-this.c_pageMargin;
- };
- PinFreezeContainer.prototype.findBestContainerWidth=function(_f20){
- 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 _f22=0;
- var _f23=node.parentNode.childNodes;
- for(var i=0;i<_f23.length;i++){
- if(_f23[i]!==node){
- _f22+=_f23[i].clientWidth;
- }
- }
- return _f20-_f22-(this.c_pageMargin/2);
- }
- return _f20;
- };
- PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
- var _f26=0;
- var _f27=node.parentNode;
- if(!_f27){
- return _f26;
- }
- if(_f27.childNodes.length>1){
- for(var i=0;i<_f27.childNodes.length;i++){
- var _f29=_f27.childNodes[i];
- if(_f29.nodeType==1){
- var _f2a=this.getStyleDisplay(_f29);
- if(_f29!=node&&!isNaN(_f29.clientHeight)&&_f2a!="none"&&_f2a!="table-cell"){
- _f26+=this.clientHeight(_f29);
- }
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _f26+=this._findRestOfPageHeight(_f27);
- }
- return _f26;
- };
- PinFreezeContainer.prototype.resize=function(_f2b,_f2c,_f2d,_f2e){
- if(this.m_fixedWidth&&this.m_fixedHeight){
- return;
- }
- _f2b=(this.m_fixedWidth)?this.m_fixedWidth:_f2b;
- _f2c=(this.m_fixedHeight)?this.m_fixedHeight:_f2c;
- var _f2f=this.getSectionStructure();
- if(this.m_sectionCache&&this.m_cachedPFContainer){
- var _f30=0;
- if(_f2c!==0){
- _f30=this.findBestContainerHeight(_f2c);
- if(_f2d&&_f30<300){
- _f30=300;
- }else{
- if(_f30<100){
- _f30=100;
- }
- }
- }
- this.m_clientHeight=_f30>0?_f30:this.m_clientHeight;
- var _f31=0;
- if(_f2b!==0){
- _f31=this.findBestContainerWidth(_f2b);
- }
- this.m_clientWidth=(_f31>0)?_f31-5-(this.c_pageMargin/2):this.m_clientWidth;
- var _f32=this.getSection("pfMainOutput");
- var _f33=this.getSectionHomeCell(_f32);
- if(_f33){
- this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_f33);
- this.m_scrollableClientHeight=this.m_clientHeight-_f33.offsetHeight;
- }
- if(_f2e){
- var _f34=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_f2e.lid);
- if(_f34){
- var node=_f34[0];
- while(node.nodeName.toLowerCase()!="table"){
- node=node.parentNode;
- }
- node.style.width=_f2e.width+"px";
- }
- }
- this.updateContainer();
- }else{
- this.m_clientWidth=_f2b-this.c_pageMargin;
- this.m_clientHeight=_f2c-this.c_pageMargin;
- }
- var _f36=this.getSectionStructure();
- this.checkSectionStructureChange(_f2f,_f36);
- };
- 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(_f37){
- var _f38=this.getSection("pfMainOutput");
- if(!_f38){
- return;
- }
- if(this.m_freezeSide==true){
- _f38.style.width=(_f37+"px");
- if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
- _f38.style.height=_f38.firstChild.clientHeight+"px";
- }
- var _f39=this.getSection("pfHorizontalScrollBar");
- if(_f39){
- _f39.style.width=(_f37+"px");
- var _f3a=_f39.firstChild;
- if(_f3a){
- var _f3b=this.getSectionHomeCell(_f38);
- var _f3c=_f38.scrollWidth-this.getHomeCellOffsetWidth(_f3b);
- _f3a.style.width=_f3c+"px";
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateMainOutputHeight=function(_f3d){
- var _f3e=this.getSection("pfMainOutput");
- if(!_f3e){
- return;
- }
- _f3e.style.height=(_f3d+"px");
- if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
- _f3e.style.width=_f3e.firstChild.clientWidth+2+"px";
- }
- var _f3f=this.getSection("pfVerticalScrollBar");
- if(_f3f){
- _f3f.style.height=(_f3d+"px");
- var _f40=_f3f.firstChild;
- if(_f40){
- var _f41=this.getSectionHomeCell(_f3e);
- var _f42=_f3e.scrollHeight-_f41.offsetHeight;
- _f40.style.height=_f42+"px";
- }
- }
- };
- PinFreezeContainer.prototype.getElementByLID=function(_f43,tag,lid){
- var _f46=getElementsByAttribute(_f43,tag,"lid",lid);
- if(_f46.length>0){
- return _f46[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getContainerByLID=function(_f47){
- var _f48=getElementsByAttribute(_f47,"table","pfclid","pfContainer_"+this.m_lidNS);
- if(_f48.length>0){
- return _f48[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getSectionByLID=function(_f49,_f4a){
- var _f4b=getElementsByAttribute(_f49,"div","pfslid",_f4a+"_"+this.m_lidNS);
- if(_f4b.length>0){
- return _f4b[0];
- }
- return null;
- };
- PinFreezeContainer.getSectionNameFromSlid=function(slid){
- return slid?slid.split("_")[0]:null;
- };
- PinFreezeContainer.getLidFromSlid=function(slid){
- return slid.split("_")[1];
- };
- PinFreezeContainer.nodeToSlid=function(_f4e){
- while(_f4e.parentNode&&!_f4e.getAttribute("pfslid")){
- _f4e=_f4e.parentNode;
- }
- if(_f4e.getAttribute){
- return _f4e.getAttribute("pfslid");
- }
- return null;
- };
- PinFreezeContainer.prototype.cacheContainerAndSections=function(_f4f){
- if(!_f4f){
- return _f4f;
- }
- this.m_cachedPFContainer=_f4f;
- var _f50=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
- this.m_sectionCache={};
- for(var i=0;i<_f50.length;++i){
- var key=_f50[i].getAttribute("pfslid");
- key=key.split("_",1);
- this.m_sectionCache[key]=_f50[i];
- }
- return _f4f;
- };
- 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(_f54){
- var slid=PinFreezeContainer.nodeToSlid(_f54);
- if(!this.m_homeCellNodes[slid]){
- var _f56=getElementsByAttribute(_f54,"*","tabIndex","*");
- for(var i in _f56){
- if(!_f56[i].getAttribute("widgetid")){
- this.m_homeCellNodes[slid]=_f56[i];
- break;
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateTabIndexValues=function(){
- if(this.isContainerFrozen()){
- for(var slid in this.m_homeCellNodes){
- var _f59=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59);
- }
- }else{
- for(var slid in this.m_homeCellNodes){
- var _f59=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59);
- }
- }
- };
- PinFreezeContainer.prototype.getSectionHomeCell=function(_f5a){
- if(_f5a){
- var _f5b=this.getElementByLID(_f5a,"table",this.m_lid+this.m_viewerId);
- if(_f5b&&_f5b.rows.length&&_f5b.rows[0].cells.length){
- return _f5b.rows[0].cells[0];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
- var _f5c=this.getSection("pfMainOutput");
- if(!_f5c){
- _f5c=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
- }
- return this.getSectionHomeCell(_f5c);
- };
- PinFreezeContainer.prototype.getChildPosition=function(_f5d,_f5e){
- for(var i=0;i<_f5d.childNodes.length;++i){
- if(_f5d.childNodes[i]==_f5e){
- return i;
- }
- }
- return -1;
- };
- PinFreezeContainer.prototype.insertAt=function(_f60,_f61,_f62){
- if(_f62==_f60.childNodes.length){
- _f60.appendChild(_f61);
- }else{
- _f60.insertBefore(_f61,_f60.childNodes[_f62]);
- }
- };
- PinFreezeContainer.prototype.synchScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _f63=this.getMainOutputHomeCell();
- var _f64=this.getSection("pfMainOutput");
- var _f65=this.getSection("pfSideHeadings");
- if(_f65!=null){
- var _f66=this.getSection("pfHorizontalScrollBar");
- if(_f66){
- var _f67=this.getSideHeadingSectionWidth(_f63);
- if(getElementDirection(_f64)==="rtl"){
- _f67=0;
- }
- setScrollLeft(_f64,getScrollLeft(_f66)+_f67);
- if(this.m_freezeTop){
- setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_f66)+_f67);
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateScroll=function(_f68){
- var slid=PinFreezeContainer.nodeToSlid(_f68);
- if(!slid){
- return;
- }
- var _f6a=PinFreezeContainer.getSectionNameFromSlid(slid);
- if(!_f6a){
- return;
- }
- var _f6b=document.getElementById("CVReport"+this.m_viewerId);
- if(!_f6b){
- return;
- }
- if(!this.m_cachedPFContainer){
- return;
- }
- var _f6c=_f68.parentNode;
- if(_f6c){
- var _f6d=_f6c.tagName.toLowerCase();
- if(_f6d==="td"||_f6d==="th"){
- var _f6e=this.getMainOutputHomeCell();
- var _f6f=this.getSection("pfMainOutput");
- if(_f6a==="pfMainOutput"||_f6a==="pfTopHeadings"){
- var _f70=this.getSection("pfHorizontalScrollBar");
- if(_f70){
- var _f71=PinFreezeContainer.calculateNewPosition(_f6c.offsetLeft,_f6c.offsetWidth,getScrollLeft(_f6f),_f6f.offsetWidth);
- var _f72=this.getHomeCellOffsetWidth(_f6e);
- if(getElementDirection(_f6f)==="rtl"){
- _f72=0;
- }
- setScrollLeft(_f70,_f71-_f72);
- setScrollLeft(_f6f,_f71);
- }
- }
- if(_f6a==="pfMainOutput"||_f6a==="pfSideHeadings"){
- var _f73=this.getSection("pfVerticalScrollBar");
- if(_f73){
- var _f74=PinFreezeContainer.calculateNewPosition(_f6c.offsetTop,_f6c.offsetHeight,_f6f.scrollTop,_f6f.offsetHeight);
- _f73.scrollTop=_f74-_f6e.offsetHeight;
- _f6f.scrollTop=_f74;
- }
- }
- }
- }
- };
- PinFreezeContainer.calculateNewPosition=function(_f75,_f76,_f77,_f78){
- var _f79=_f75+_f76;
- var _f7a=_f77+_f78;
- if(_f77>_f75){
- return _f75;
- }else{
- if(_f7a<_f79){
- if(_f76>_f78){
- return _f75;
- }
- return _f79-_f78;
- }
- }
- return _f77;
- };
- PinFreezeContainer.prototype.synchVScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _f7b=this.getMainOutputHomeCell();
- var _f7c=this.getSection("pfMainOutput");
- var _f7d=this.getSection("pfTopHeadings");
- if(_f7d!=null){
- var _f7e=this.getSection("pfVerticalScrollBar");
- if(_f7e){
- _f7c.scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b);
- if(this.m_freezeSide){
- this.getSection("pfSideHeadings").scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b);
- }
- }
- }
- };
- PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_f7f){
- return _f7f.offsetHeight+_f7f.offsetTop+this.m_containerMargin.top;
- };
- PinFreezeContainer.prototype._findBestGuessHomeCell=function(_f80){
- if(this.m_bestGuessHomeCell){
- return this.m_bestGuessHomeCell;
- }
- if(_f80){
- var _f81=_f80.parentNode.parentNode;
- var _f82=_f80.rowSpan?(_f80.rowSpan):1;
- var tr=_f81.childNodes[_f82];
- if(tr){
- var _f84=tr.childNodes.length;
- var _f85=null;
- var td=null;
- for(var i=0;i<_f84;i++){
- td=tr.childNodes[i];
- if(td.getAttribute("type")=="datavalue"){
- break;
- }
- _f85=td;
- }
- if(_f85){
- this.m_bestGuessHomeCell=_f85;
- return this.m_bestGuessHomeCell;
- }
- }else{
- return _f80;
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_f88){
- var _f89=this._findBestGuessHomeCell(_f88);
- return _f89?_f89.offsetWidth:0;
- };
- PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_f8a){
- var _f8b=this._findBestGuessHomeCell(_f8a);
- if(_f8b){
- return _f8b.offsetWidth+_f8b.offsetLeft+this.m_containerMargin.left;
- }else{
- return _f8a.offsetWidth+_f8a.offsetLeft;
- }
- };
- PinFreezeContainer.prototype.isContainerFrozen=function(){
- return (this.m_freezeTop||this.m_freezeSide);
- };
- PinFreezeContainer.prototype.unfreeze=function(_f8c){
- var _f8d=this.getContainerByLID(_f8c);
- this.m_freezeTop=false;
- this.m_freezeSide=false;
- if(_f8d){
- var _f8e=_f8d.parentNode;
- pfMainOutput=this.getSectionByLID(_f8d,"pfMainOutput");
- if(pfMainOutput&&_f8e){
- if(_f8d.style.border!==""){
- pfMainOutput.firstChild.style.border=_f8d.style.border;
- _f8d.style.border="";
- }
- if(this.m_wrapFlag){
- var _f8f=pfMainOutput.firstChild.getElementsByTagName("span");
- if(_f8f){
- for(var k=0;k<_f8f.length;k++){
- _f8f[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;
- }
- _f8e.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_f8d);
- }
- }
- };
- PinFreezeContainer.prototype.getBorderInfo=function(el,_f92){
- var _f93={};
- var _f94="border-"+_f92+"-";
- var _f95="border"+_f92.charAt(0).toUpperCase()+_f92.substring(1);
- if(el.currentStyle){
- _f93[_f95+"Width"]=el.currentStyle[_f95+"Width"];
- _f93[_f95+"Style"]=el.currentStyle[_f95+"Style"];
- _f93[_f95+"Color"]=el.currentStyle[_f95+"Color"];
- }else{
- if(window.getComputedStyle){
- _f93[_f95+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"width");
- _f93[_f95+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"style");
- _f93[_f95+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"color");
- }else{
- return null;
- }
- }
- return _f93;
- };
- PinFreezeContainer.prototype.isA11yEnabled=function(_f96){
- return (_f96.getAttribute("role")==="grid");
- };
- PinFreezeContainer.isElementInMainOutput=function(_f97){
- var _f98=PinFreezeContainer.nodeToSlid(_f97);
- if(_f98){
- return (_f98.indexOf("pfMainOutput_")===0);
- }
- return false;
- };
- PinFreezeContainer.prototype.removeCTX=function(_f99){
- _f99.removeAttribute("ctx");
- var _f9a=getElementsByAttribute(_f99,"*","ctx","*");
- if(_f9a&&_f9a.length){
- for(var i=0;i<_f9a.length;i++){
- _f9a[i].removeAttribute("ctx");
- }
- }
- };
- PinFreezeContainer.prototype.initializeTouchScrolling=function(_f9c){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_f9c){
- _f9c.m_pinFreezeContainer=this;
- if(document.attachEvent){
- _f9c.attachEvent("touchstart",this.touchStart);
- _f9c.attachEvent("touchmove",this.touchMove);
- _f9c.attachEvent("touchend",this.touchEnd);
- }else{
- _f9c.addEventListener("touchstart",this.touchStart,false);
- _f9c.addEventListener("touchmove",this.touchMove,false);
- _f9c.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(_f9d){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_f9d){
- if(document.detachEvent){
- _f9d.detachEvent("touchstart",this.touchStart);
- _f9d.detachEvent("touchmove",this.touchMove);
- _f9d.detachEvent("touchend",this.touchEnd);
- }else{
- _f9d.removeEventListener("touchstart",this.touchStart,false);
- _f9d.removeEventListener("touchmove",this.touchMove,false);
- _f9d.removeEventListener("touchend",this.touchEnd,false);
- }
- }
- };
- PinFreezeContainer.prototype.touchMove=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _f9f=e.changedTouches[0];
- if(_f9f&&_f9f.clientX&&_f9f.clientY){
- var _fa0=parseInt(_f9f.clientX);
- var _fa1=parseInt(_f9f.clientY);
- if(this.m_pinFreezeContainer.touchMoveHandler(_fa0,_fa1)){
- return stopEventBubble(e);
- }
- }
- }
- };
- PinFreezeContainer.prototype.touchStart=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _fa3=e.changedTouches[0];
- if(_fa3&&_fa3.clientX&&_fa3.clientY){
- var _fa4=parseInt(_fa3.clientX);
- var _fa5=parseInt(_fa3.clientY);
- this.m_pinFreezeContainer.touchStartHandler(_fa4,_fa5);
- }
- }
- };
- PinFreezeContainer.prototype.touchStartHandler=function(_fa6,_fa7){
- this.touchScrollSections=false;
- this.touchPreviousX=_fa6;
- this.touchPreviousY=_fa7;
- };
- PinFreezeContainer.prototype.touchEnd=function(e){
- if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
- stopEventBubble(e);
- }
- };
- PinFreezeContainer.prototype.touchEndHandler=function(){
- var _fa9=this.touchScrollSections;
- this.touchScrollSections=false;
- this.touchPreviousX=-1;
- this.touchPreviousY=-1;
- return _fa9;
- };
- PinFreezeContainer.prototype.touchMoveHandler=function(_faa,_fab){
- var _fac=this.getSection("pfMainOutput");
- if(!_fac){
- return;
- }
- var _fad=this.getSectionHomeCell(_fac);
- var _fae=this.getTopHeadingSectionHeight(_fad);
- var _faf=this.getSideHeadingSectionWidth(_fad);
- var _fb0=_fab-this.touchPreviousY;
- var _fb1=_faa-this.touchPreviousX;
- if(this.touchScrollSections){
- if(_fb0!=0){
- var _fb2=_fac.scrollTop-_fb0;
- _fb2=(_fb2>_fae)?_fb2:_fae;
- _fac.scrollTop=_fb2;
- var _fb3=this.getSection("pfSideHeadings");
- if(_fb3){
- _fb3.scrollTop=_fb2;
- }
- }
- if(_fb1!=0){
- var _fb4=_fac.scrollLeft-_fb1;
- _fb4=(_fb4>_faf)?_fb4:_faf;
- _fac.scrollLeft=_fb4;
- var _fb5=this.getSection("pfTopHeadings");
- if(_fb5){
- _fb5.scrollLeft=_fb4;
- }
- }
- }else{
- this.firstTouchMove(_fac,_fb1,_fb0,_faf,_fae);
- }
- this.touchPreviousX=_faa;
- this.touchPreviousY=_fab;
- return this.touchScrollSections;
- };
- PinFreezeContainer.prototype.firstTouchMove=function(_fb6,_fb7,_fb8,_fb9,_fba){
- var _fbb=this.mostlyVerticalTouchMove(_fb7,_fb8);
- var _fbc=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
- var _fbd=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
- if(_fbb&&(!_fbc||(_fb8>0&&_fb6.scrollTop<=_fba)||(_fb8<0&&_fb6.scrollTop+_fb6.clientHeight>=_fb6.scrollHeight))){
- this.touchScrollSections=false;
- }else{
- if(!_fbb&&(!_fbd||(_fb7>0&&_fb6.scrollLeft<=_fb9)||(_fb7<0&&_fb6.scrollLeft+_fb6.clientWidth>=_fb6.scrollWidth))){
- this.touchScrollSections=false;
- }else{
- this.touchScrollSections=true;
- }
- }
- };
- PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_fbe,_fbf){
- var _fc0=(_fbe>0)?_fbe:0-_fbe;
- var _fc1=(_fbf>0)?_fbf:0-_fbf;
- return (_fc1>_fc0);
- };
- 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,_fc4,_fc5,_fc6,_fc7){
- if(_fc4||_fc5){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- if(!this.m_frozenInfo[lid]){
- this._createDefaultFrozenInfo(lid);
- }
- this.m_frozenInfo[lid].freezeTop=_fc4;
- this.m_frozenInfo[lid].freezeSide=_fc5;
- var _fc8=this.newContainer(lid,_fc4,_fc5,_fc6,_fc7);
- this.m_frozenInfo[lid].pinFreezeContainers.push(_fc8);
- return _fc8;
- }
- return null;
- };
- PinFreezeManager.prototype.newContainer=function(lid,_fca,_fcb,_fcc,_fcd){
- return new PinFreezeContainer(this,lid,this.m_viewerId,_fca,_fcb,_fcc,_fcd);
- };
- 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 _fd1=this.m_frozenInfo[lid];
- if(_fd1){
- delete _fd1.pinFreezeContainers;
- _fd1.pinFreezeContainers=[];
- _fd1.freezeTop=false;
- _fd1.freezeSide=false;
- }
- };
- PinFreezeManager.prototype.prepopulateFrozenInfo=function(_fd2){
- var _fd3=getDescendantElementsByAttribute(_fd2,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_fd3){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- for(var i=0;i<_fd3.length;i++){
- var _fd5=_fd3[i];
- if(_fd5.getAttribute("id")=="rt"+this.m_viewerId){
- continue;
- }
- var lid=this.removeNamespace(_fd5.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 _fd7=getDescendantElementsByAttribute(_fd5,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_fd7){
- for(var _fd8=0;_fd8<_fd7.length;_fd8++){
- var _fd9=_fd7[_fd8];
- var _fda=this.removeNamespace(_fd9.getAttribute("lid"));
- if(!this.m_frozenInfo[lid].childContainers[_fda]){
- var _fdb=_fd9.parentNode;
- while(_fdb&&!_fdb.getAttribute("lid")){
- _fdb=_fdb.parentNode;
- }
- if(_fdb&&this.removeNamespace(_fdb.getAttribute("lid"))==lid){
- this.m_frozenInfo[lid].childContainers[_fda]=true;
- }
- }
- }
- }
- }
- this._updateParentContainerInfo();
- }
- };
- PinFreezeManager.prototype._updateParentContainerInfo=function(){
- for(var _fdc in this.m_frozenInfo){
- var _fdd=this.m_frozenInfo[_fdc].childContainers;
- if(_fdd){
- for(var _fde in _fdd){
- if(this.m_frozenInfo[_fde]){
- this.m_frozenInfo[_fde].parentContainer=_fdc;
- 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,_fe1,_fe2){
- var _fe3=document.getElementById("CVReport"+this.m_viewerId);
- this.prepopulateFrozenInfo(_fe3);
- var _fe4=this.getTopLevelContainerLID(lid);
- this.unfreezeAllNestedContainers(_fe4,_fe3);
- this.m_frozenInfo[lid].freezeTop=_fe1;
- this.m_frozenInfo[lid].freezeSide=_fe2;
- var _fe5=this._createPinAndFreezeObject(_fe3,_fe4);
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this._resizePinFreezeObjects(_fe5);
- this.sectionStructureChange();
- if(isIE()){
- var obj=this;
- setTimeout(function(){
- obj.refresh();
- },1);
- var _fe7=document.getElementById("RVContent"+this.m_viewerId);
- this.m_oCV.repaintDiv(_fe7);
- }
- return _fe5;
- };
- 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,_fec){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
- _fec=_fec?_fec:0;
- return this.m_frozenInfo[lid].pinFreezeContainers[_fec];
- }
- return null;
- };
- PinFreezeManager.prototype.nodeToContainer=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- var _fef=null;
- if(slid){
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- _fef=this.getContainer(lid);
- }
- return _fef;
- };
- PinFreezeManager.prototype.getContainerElement=function(_ff1){
- var lid=this.removeNamespace(_ff1.getAttribute("lid"));
- if(lid){
- var _ff3=this.getContainer(lid);
- if(_ff3){
- return _ff3.getContainer();
- }
- }
- return null;
- };
- PinFreezeManager.prototype._createPinAndFreezeObject=function(_ff4,lid){
- var _ff6=null;
- if(this.m_frozenInfo){
- var _ff7=this.m_frozenInfo[lid];
- var _ff8=_ff7.initialLoad;
- if(_ff8){
- delete _ff7.initialLoad;
- }
- var _ff9=_ff7.freezeTop;
- var _ffa=_ff7.freezeSide;
- var _ffb=null;
- if(_ff8&&_ff7.pinFreezeContainers&&(_ff9||_ffa)){
- _ffb=_ff7.pinFreezeContainers.slice(0);
- }
- var _ffc=_ff4;
- if(_ff7&&_ff7.parentContainer){
- var _ffd=getElementsByAttribute(_ff4,"table","lid",_ff7.parentContainer+this.m_viewerId);
- if(_ffd){
- for(parentIndex=0;parentIndex<_ffd.length;parentIndex++){
- if(!_ffd[parentIndex].getAttribute("clonednode")){
- _ffc=_ffd[parentIndex];
- break;
- }
- }
- }
- }
- if(_ff7.childContainers){
- for(var _ffe in _ff7.childContainers){
- var _fff=this._createPinAndFreezeObject(_ffc,_ffe);
- _ff6=_ff6?_ff6:_fff;
- }
- }
- var _1000=getElementsByAttribute(_ffc,"table","lid",lid+this.m_viewerId);
- if(_1000&&_1000.length>0){
- delete _ff7.pinFreezeContainers;
- _ff7.pinFreezeContainers=[];
- }else{
- return null;
- }
- if(_1000&&(_ff9||_ffa)){
- var _1001=(_ff6!==null);
- for(var i=0;i<_1000.length;i++){
- var _1003=_1000[i];
- if(_1003.getAttribute("clonednode")=="true"){
- continue;
- }
- _ff6=this.addContainerObject(lid,_ff9,_ffa,_1003,i);
- if(_ff6){
- _ff6.createPFContainer(_ffc,_1001);
- if(_ff8){
- _ff6.copyProperties(_ffb[0]);
- }
- _ff6.freezeContainerInReport(_ff4);
- }
- }
- }
- }
- return _ff6;
- };
- PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_1004){
- if(this.m_frozenInfo){
- var _1005=false;
- var _1006=null;
- for(var _1007 in this.m_frozenInfo){
- var _1008=this.m_frozenInfo[_1007];
- if(!_1005){
- _1005=_1008.initialLoad;
- }
- if(!_1008.parentContainer){
- var temp=this._createPinAndFreezeObject(_1004,_1008.lid);
- _1006=_1006?_1006:temp;
- }
- }
- if(!_1005&&_1006){
- this._resizePinFreezeObjects(_1006);
- }
- this.refresh();
- }
- };
- PinFreezeManager.prototype._resizePinFreezeObjects=function(_100a){
- var _100b,width;
- var _100d=this.m_oCV.getViewerWidget();
- if(_100d){
- var size=_100d.getWidgetSize();
- width=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_100a.getClientWidth();
- _100b=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_100a.getClientHeight();
- }else{
- var _100f=document.getElementById("RVContent"+this.m_viewerId);
- var _1010=document.getElementById("mainViewerTable"+this.m_viewerId);
- width=_100f.clientWidth;
- _100b=_1010.clientHeight;
- }
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this.resize(width,_100b);
- };
- PinFreezeManager.prototype.resize=function(width,_1012){
- var _1013=(Math.abs(width-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
- var _1014=(Math.abs(_1012-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
- if(_1013&&_1014){
- return;
- }
- var _1015=(Math.abs(width-this.m_lastWidthProcessed)>2)?width:0;
- var _1016=(Math.abs(_1012-this.m_lastHeightProcessed)>2)?_1012:0;
- for(var lid in this.m_frozenInfo){
- if(!this.m_frozenInfo[lid].parentContainer){
- this.resizeContainer(lid,_1015,_1016);
- }
- }
- this.m_lastWidthProcessed=width;
- this.m_lastHeightProcessed=_1012;
- };
- PinFreezeManager.prototype.resizeContainer=function(lid,width,_101a){
- var _101b=this.m_frozenInfo[lid];
- if(_101b){
- var _101c=null;
- if(_101b.childContainers){
- var _101d=width>10?width-10:width;
- var _101e=_101a>10?_101a-10:_101a;
- for(var _101f in _101b.childContainers){
- _101c=this.resizeContainer(_101f,_101d,_101e);
- }
- }
- var _1020=_101b.pinFreezeContainers;
- var _1021=null;
- var _1022=null;
- if(_1020){
- for(var i=0;i<_1020.length;i++){
- _1021=_1020[i];
- _1021.resize(width,_101a,_101b.parentContainer,_101c);
- var _1024=_1021.getContainer();
- if(_1024&&(!_1022||(_1022.width<_1024.clientWidth))){
- _1022={"width":_1024.clientWidth,"lid":_1021.m_lidNS};
- }
- }
- }
- return _1022;
- }
- };
- PinFreezeManager.prototype.processAutoResize=function(width,_1026){
- this.m_lastWidthProcessed=width;
- this.m_lastHeightProcessed=_1026;
- };
- PinFreezeManager.prototype.onSetVisible=function(){
- this.refresh();
- if(this.m_repaintOnVisible){
- this.rePaint();
- this.m_repaintOnVisible=false;
- }
- };
- PinFreezeManager.prototype.onResizeCanvas=function(_1027){
- if(_1027){
- 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 _1029 in this.m_frozenInfo){
- var _102a=this.m_frozenInfo[_1029].pinFreezeContainers;
- if(_102a){
- for(var i=0;i<_102a.length;i++){
- var _102c=_102a[i];
- _102c.synchScroll();
- _102c.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(_1039){
- var _103a=this.m_oCV.getSelectionController().getAllSelectedObjects();
- if(_103a&&_103a.length&&(_103a[0].getDataContainerType()==="crosstab"||(_1039&&_103a[0].getDataContainerType()==="list"))){
- var lid=(_103a[0].getLayoutElementId());
- if(lid){
- if(!this.hasPromptControlsInFreezableCells(lid)){
- return this.removeNamespace(lid);
- }
- }
- }
- return null;
- };
- PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
- var _103d=this.m_oCV.getLayoutElementFromLid(lid);
- var _103e=getElementsByAttribute(_103d,["td","th"],"type","columnTitle");
- var _103f=new RegExp("(^|[W])clsPromptComponent($|[W])");
- var _1040=isIE()?"className":"class";
- for(var j in _103e){
- if(_103e.hasOwnProperty(j)){
- var _1042=getElementsByAttribute(_103e[j],"*",_1040,null,1,_103f);
- if(_1042.length>0){
- return true;
- }
- }
- }
- return false;
- };
- PinFreezeManager.prototype.unfreeze=function(lid,_1044,reset){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
- var _1046=this.m_frozenInfo[lid].pinFreezeContainers;
- if(_1046){
- for(var i=0;i<_1046.length;i++){
- var _1048=_1046[i];
- _1048.unfreeze(_1044);
- }
- if(reset){
- this._resetFrozenInfo(lid);
- }
- }
- }
- };
- PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_104a){
- var _104b=this.m_frozenInfo[lid];
- if(_104b){
- if(_104b.freezeTop||_104b.freezeSide){
- this.unfreeze(lid,_104a,false);
- }
- if(_104b.childContainers){
- for(var _104c in _104b.childContainers){
- this.unfreezeAllNestedContainers(_104c,_104a);
- }
- }
- }
- };
- PinFreezeManager.prototype.isNodeVisible=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- if(!slid){
- return true;
- }
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- var _1050=this.getContainer(lid);
- if(!_1050){
- return true;
- }
- var _1051=PinFreezeContainer.getSectionNameFromSlid(slid);
- var _1052=_1050.getSection(_1051);
- var _1053=null,_1054=null;
- var nodeI=node;
- var _1056=null;
- while(nodeI&&nodeI!==_1052&&!_1053&&!_1054){
- _1053=_1050.getMain(nodeI);
- _1054=_1050.getCopy(nodeI);
- _1056=nodeI;
- nodeI=nodeI.parentNode;
- }
- var _1057=_1053?true:false;
- var _1058=_1054?true:false;
- if(_1057){
- return _1050.getCopy(_1053)===_1056;
- }else{
- if(_1058){
- return _1050.getCopy(_1056)?false:true;
- }else{
- return true;
- }
- }
- };
- PinFreezeManager.prototype.sectionStructureChange=function(){
- var _1059=this.m_oCV.getViewerWidget();
- if(_1059&&_1059.getAnnotationHelper()){
- _1059.getAnnotationHelper().repositionCommentIndicators();
- }
- };
- PinFreezeManager.prototype.deepCloneNode=function(_105a){
- var copy=_105a.cloneNode(true);
- var _105c=this.m_oCV.getViewerWidget();
- if(_105c){
- if(_105c.reportContainsDijits()){
- var _105d=getElementsByAttribute(copy,"*","widgetid","*");
- if(_105d&&_105d.length){
- for(var i=0;i<_105d.length;i++){
- _105d[i].parentNode.removeChild(_105d[i]);
- }
- }
- }
- }
- return copy;
- };
- PinFreezeManager.prototype.toJSONString=function(){
- var _105f="";
- var _1060="";
- for(var _1061 in this.m_frozenInfo){
- if(_105f.length>0){
- _105f+=",";
- }
- var _1062=this.m_frozenInfo[_1061];
- _105f+="{";
- _105f+="\"lid\":\""+_1062.lid.replace("\"","\\\"")+"\",";
- _105f+="\"freezeTop\":"+_1062.freezeTop+",";
- _105f+="\"freezeSide\":"+_1062.freezeSide+",";
- if(_1062.parentContainer){
- _105f+="\"parentContainer\":\""+_1062.parentContainer+"\",";
- }
- if(_1062.pinFreezeContainers&&_1062.pinFreezeContainers.length>0){
- _105f+="\"properties\":"+_1062.pinFreezeContainers[0].toJSONString()+",";
- }
- _105f+="\"childContainers\": {";
- if(_1062.childContainers){
- var first=true;
- for(var _1064 in _1062.childContainers){
- if(!first){
- _105f+=",";
- }
- _105f+="\""+_1064+"\":true";
- first=false;
- }
- }
- _105f+="}}";
- }
- if(_105f.length>0){
- _1060="{\"version\":1, \"containers\":["+_105f+"]}";
- }
- return _1060;
- };
- PinFreezeManager.prototype.fromJSONString=function(sJSON){
- if(!sJSON||sJSON.length===0){
- return;
- }
- var oJSON=null;
- try{
- oJSON=eval("("+sJSON+")");
- }
- catch(e){
- if(typeof console!="undefined"){
- console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+sJSON);
- console.log(e);
- }
- }
- if(!oJSON){
- return;
- }
- var _1067=oJSON.containers;
- var _1068=oJSON.version;
- if(_1067.length>0){
- this.m_frozenInfo={};
- }
- for(var _1069=0;_1069<_1067.length;_1069++){
- var _106a=_1067[_1069];
- var lid=_106a.lid;
- var _106c=_106a.freezeTop;
- var _106d=_106a.freezeSide;
- var _106e=document.getElementById("CVReport"+this.m_viewerId);
- var _106f=getElementsByAttribute(_106e,"table","lid",lid+this.m_viewerId);
- var _1070=[];
- if(_106f&&(_106c||_106d)){
- for(var i=0;i<_106f.length;i++){
- var _1072=_106f[i];
- var _1073=new PinFreezeContainer(this,lid,this.m_viewerId,_106a.freezeTop,_106a.freezeSide,_1072,i);
- if(_106a.properties){
- applyJSONProperties(_1073,_106a.properties);
- }
- _1070.push(_1073);
- }
- }
- this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_106c,"freezeSide":_106d,"pinFreezeContainers":_1070,"initialLoad":true};
- if(_1068>=1){
- if(_106a.childContainers){
- this.m_frozenInfo[lid].childContainers=_106a.childContainers;
- }
- if(_106a.parentContainer){
- this.m_frozenInfo[lid].parentContainer=_106a.parentContainer;
- }
- }
- }
- };
- PinFreezeManager.prototype.removeIdAttribute=function(_1074){
- var _1075=_1074.getAttribute("id");
- if(_1075!==null&&_1075!==""){
- _1074.removeAttribute("id");
- }
- var _1076=getElementsByAttribute(_1074,"*","id","*");
- if(_1076&&_1076.length){
- for(var i=0;i<_1076.length;i++){
- _1076[i].removeAttribute("id");
- }
- }
- return _1074;
- };
- PinFreezeManager.prototype.isElementInMainOutput=function(_1078){
- return PinFreezeContainer.isElementInMainOutput(_1078);
- };
- PinFreezeManager.prototype.isIWidgetMobile=function(){
- return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
- };
- PinFreezeManager.prototype.destroy=function(){
- GUtil.destroyProperties(this);
- };
- function CViewerToolbar(){
- this.m_specification=null;
- this.m_oCBar=null;
- this.m_sWebContentRoot=null;
- this.m_sSkin=null;
- };
- CViewerToolbar.prototype.getNamespace=function(){
- if(this.m_specification&&typeof this.m_specification.namespace!="undefined"){
- return this.m_specification.namespace;
- }
- return "";
- };
- CViewerToolbar.prototype.getSkin=function(){
- if(this.m_sSkin==null){
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(this.getNamespace());
- }
- catch(exception){
- }
- if(oCV){
- this.m_sSkin=oCV.getSkin();
- }else{
- this.m_sSkin=this.getWebContentRoot()+"/skins/corporate";
- }
- }
- return this.m_sSkin;
- };
- CViewerToolbar.prototype.getWebContentRoot=function(){
- if(this.m_sWebContentRoot==null){
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(this.getNamespace());
- }
- catch(exception){
- }
- if(oCV){
- this.m_sWebContentRoot=oCV.getWebContentRoot();
- }else{
- this.m_sWebContentRoot="..";
- }
- }
- return this.m_sWebContentRoot;
- };
- CViewerToolbar.prototype.getDivId=function(){
- if(this.m_specification&&typeof this.m_specification.divId!="undefined"){
- return this.m_specification.divId;
- }
- return "";
- };
- CViewerToolbar.prototype.getStyle=function(){
- if(this.m_specification&&typeof this.m_specification.style!="undefined"){
- return this.m_specification.style;
- }
- return "";
- };
- CViewerToolbar.prototype.getToolbarSpecification=function(){
- if(this.m_specification&&typeof this.m_specification.S!="undefined"){
- return new CViewerToolbarSpecification(this,this.m_specification.S);
- }
- return null;
- };
- CViewerToolbar.prototype.getItem=function(sId){
- if(this.m_oCBar){
- var _107c=this.m_oCBar.getNumItems();
- sId=this.getNamespace()+sId;
- for(var index=0;index<_107c;++index){
- var _107e=this.m_oCBar.get(index);
- if(typeof _107e.getId=="function"&&_107e.getId()==sId){
- return _107e;
- }
- }
- }
- return null;
- };
- CViewerToolbar.prototype.init=function(_107f){
- if(typeof _107f!="undefined"&&typeof _107f=="object"&&_107f!=null){
- this.m_specification=_107f;
- }
- };
- CViewerToolbar.prototype.getCBar=function(){
- if(!this.m_oCBar&&this.m_specification){
- this.load();
- }
- return this.m_oCBar;
- };
- CViewerToolbar.prototype.load=function(){
- var _1080=null;
- if(this.m_specification!=null){
- var divId=this.getDivId();
- var _1082=document.getElementById(divId);
- var _1083=this.getToolbarSpecification();
- if(_1082&&_1083){
- _1080=_1083.draw();
- }
- }
- this.m_oCBar=_1080;
- return _1080;
- };
- CViewerToolbar.prototype.draw=function(){
- if(this.m_oCBar){
- this.m_oCBar.draw();
- }
- };
- function CViewerToolbarSpecification(_1084,_1085){
- this.m_viewerToolbar=_1084;
- this.m_toolbarSpecification=_1085;
- };
- CViewerToolbarSpecification.prototype.draw=function(){
- if(this.m_toolbarSpecification){
- var _1086=gToolbarStyle;
- if(this.m_viewerToolbar.getStyle()==="banner"){
- _1086=gBannerToolbarStyle;
- }
- var _1087=new CBar(this.m_viewerToolbar.getDivId(),_1086,null,this.m_viewerToolbar.getWebContentRoot());
- _1087.setMenuType(cHorizonalBar);
- _1087.style=this.m_viewerToolbar.getStyle();
- _1087.setAlign("right");
- var _1088=false;
- var _1089=null;
- var _108a=null;
- for(var _108b=0;_108b<this.m_toolbarSpecification.length;_108b++){
- for(var _108c in this.m_toolbarSpecification[_108b]){
- try{
- var _108d=eval("new "+_108c+"();");
- if(_108c=="P"){
- if(_1088&&_108a==null){
- _1089=_108d;
- _108a=this.m_toolbarSpecification[_108b][_108c];
- }
- }else{
- var _108e=this.m_toolbarSpecification[_108b][_108c];
- if(_108e.N!=="openWith"||!window.isIOS()){
- _1088=true;
- if(_108a!=null&&_1089!=null){
- _1089.load(_1087,_108a,this.m_viewerToolbar);
- _1089=null;
- _108a=null;
- }
- _108d.load(_1087,_108e,this.m_viewerToolbar);
- }
- }
- }
- catch(exception){
- }
- }
- }
- return _1087;
- }
- return null;
- };
- function B(){
- };
- B.prototype.isValid=function(_108f){
- if(_108f!=null){
- return true;
- }
- return false;
- };
- B.prototype.load=function(_1090,_1091,_1092){
- if(this.isValid(_1091)){
- var _1093="";
- var _1094="";
- var _1095="";
- var sName=_1091.N;
- var _1097=null;
- if(typeof _1091.M!="undefined"&&_1091.M.IS!="undefined"){
- _1097=_1091.M.IS;
- }
- if(typeof _1091.C=="undefined"){
- if(_1097){
- var _1098=_1097[0]["I"];
- if(_1098!=null&&this.isValid(_1098)){
- _1093=_1098.O;
- if(typeof _1093=="undefined"||_1093==""){
- _1093=_1098.E;
- }
- _1094=_1098.C;
- _1095=_1098.A;
- }
- }
- }else{
- _1093=_1091.O;
- _1094=_1091.C;
- _1095=_1091.A;
- }
- var _1099=null;
- if(_1092.getStyle()==="banner"){
- _1099=new CMenuItem(_1090,"",_1095,_1094,gBannerButtonStyle,_1092.getWebContentRoot(),_1092.getSkin());
- _1099.setDropDownArrow("dropdown_arrow_banner.gif");
- }else{
- _1099=new CMenuItem(_1090,"",_1095,_1094,gMenuItemStyle,_1092.getWebContentRoot(),_1092.getSkin());
- _1099.setDropDownArrow("dropdown_arrow_narrow.gif");
- }
- _1099.setId(_1092.getNamespace()+sName);
- _1099.setToolTip(_1093);
- if(typeof _1091.ALT!="undefined"){
- _1099.setAltText(_1091.ALT);
- }
- if(typeof _1091.D!="undefined"&&_1091.D=="true"){
- _1099.disable();
- }
- if(typeof _1091.M!="undefined"){
- var _109a=_1091.M;
- if(typeof _109a.Y!="undefined"&&(typeof _109a.A!="undefined"||(_1097&&_1097.length>1)||(typeof _109a.H=="undefined"||_109a.H=="false"))){
- var menu=new M();
- _1099.m_menu=menu.load(_1090,_109a,_1092);
- _1099.m_menu.setParent(_1099);
- _1099.m_menuType=_109a.Y;
- }
- }
- return _1099;
- }
- return null;
- };
- function I(){
- };
- I.prototype.isValid=function(_109c){
- if(typeof _109c!="undefined"&&_109c!=null){
- return true;
- }
- return false;
- };
- I.prototype.load=function(_109d,_109e,_109f){
- if(this.isValid(_109e)){
- var sText=_109e.E;
- var _10a1=_109e.C;
- var _10a2=_109e.A;
- var sName=_109e.N;
- var _10a4=null;
- if(typeof _109e.M!="undefined"&&_109e.M.IS!="undefined"){
- _10a4=_109e.M.IS;
- }
- if(typeof _109e.E=="undefined"){
- if(_10a4&&_10a4[0]){
- var _10a5=_10a4[0]["I"];
- if(_10a5!=null&&this.isValid(_10a5)){
- sText=_10a5.E;
- if(typeof sText=="undefined"||sText==""){
- sText=_10a5.O;
- }
- _10a2=_10a5.A;
- }
- }else{
- return null;
- }
- }else{
- sText=_109e.E;
- _10a1=_109e.C;
- _10a2=_109e.A;
- }
- var _10a6=null;
- if(_109d.style&&_109d.style==="banner"){
- _10a6=gBannerItemStyle;
- }else{
- _10a6=gMenuItemStyle;
- }
- var _10a7=new CMenuItem(_109d,sText,_10a2,_10a1,_10a6,_109f.getWebContentRoot(),_109f.getSkin());
- if(typeof _109e.ALT!="undefined"){
- _10a7.setAltText(_109e.ALT);
- }
- if(_109d.style&&_109d.style==="banner"){
- _10a7.setDropDownArrow("dropdown_arrow_banner.gif");
- }else{
- _10a7.setDropDownArrow("dropdown_arrow_narrow.gif");
- }
- _10a7.setId(_109f.getNamespace()+sName);
- if(typeof _109e.D!="undefined"&&_109e.D=="true"){
- _10a7.disable();
- }
- if(typeof _109e.M!="undefined"){
- var _10a8=_109e.M;
- if(typeof _10a8.Y!="undefined"&&(typeof _10a8.A!="undefined"||(_10a4&&_10a4.length>1)||(typeof _10a8.H=="undefined"||_10a8.H=="false"))){
- var menu=new M();
- _10a7.m_menu=menu.load(_109d,_10a8,_109f);
- _10a7.m_menu.setParent(_10a7);
- _10a7.m_menuType=_109e.M.Y;
- }
- }
- return _10a7;
- }
- return null;
- };
- function M(){
- };
- M.prototype.isValid=function(_10aa){
- return (typeof _10aa!="undefined"&&_10aa!=null&&typeof _10aa.id!="undefined");
- };
- M.prototype.load=function(_10ab,_10ac,_10ad){
- if(this.isValid(_10ac)){
- var menu=new CMenu(_10ac.id,gMenuStyle,_10ad.getWebContentRoot());
- menu.setParent(_10ab);
- if(typeof _10ac.ALT!="undefined"){
- menu.setAltText(_10ac.ALT);
- }
- try{
- menu.m_oCV=getCognosViewerObjectRef(_10ad.getNamespace());
- }
- catch(e){
- }
- if(typeof _10ac.A!="undefined"){
- menu.registerCallback(_10ac.A);
- }
- var _10af=_10ac.IS;
- if(_10af){
- for(var _10b0=0;_10b0<_10af.length;_10b0++){
- for(var _10b1 in _10af[_10b0]){
- try{
- var _10b2=new I();
- _10b2.load(menu,_10af[_10b0][_10b1],_10ad);
- }
- catch(exception){
- }
- }
- }
- }
- return menu;
- }
- return null;
- };
- function T(){
- };
- T.prototype.isValid=function(_10b3){
- return (typeof _10b3!="undefined"&&_10b3!=null&&typeof _10b3.E!="undefined");
- };
- T.prototype.load=function(_10b4,_10b5,_10b6){
- if(this.isValid(_10b5)){
- var _10b7=null;
- if(_10b6.getStyle()==="banner"){
- _10b7=gBannerStaticText;
- }else{
- }
- if(_10b5.E&&_10b5.E.length>0){
- var _10b8=new CStaticText(_10b5.E,_10b7);
- if(_10b5.N=="userName"){
- _10b8.setId("userNameTD"+_10b6.getNamespace());
- }
- if(_10b5.ALT){
- _10b8.setLabelledBy(_10b5.ALT+" "+_10b5.E);
- }
- _10b4.add(_10b8);
- }
- }
- return null;
- };
- function L(){
- };
- L.prototype.isValid=function(_10b9){
- return (typeof _10b9!="undefined"&&_10b9!=null&&typeof _10b9.E!="undefined");
- };
- L.prototype.load=function(_10ba,_10bb,_10bc){
- if(this.isValid(_10bb)){
- var _10bd=null;
- if(_10bc.getStyle()==="banner"){
- _10bd=gBannerLink;
- }else{
- }
- var _10be=_10bb.A;
- var _10bf=new CMenuItem(_10ba,_10bb.E,_10be,"",_10bd,_10bc.getWebContentRoot(),_10bc.getSkin());
- _10bf.iconPlaceholder=false;
- if(_10bb.ALT!="undefined"){
- _10bf.setAltText(_10bb.ALT);
- }
- return _10bf;
- }
- return null;
- };
- function P(){
- };
- P.prototype.isValid=function(_10c0){
- return (typeof _10c0!="undefined"&&_10c0!=null&&typeof _10c0.Y!="undefined");
- };
- P.prototype.load=function(_10c1,_10c2,_10c3){
- if(this.isValid(_10c2)){
- var _10c4=new CSeperator(_10c2.Y,"","",_10c3.getWebContentRoot());
- if(_10c3.getStyle()==="banner"){
- _10c4.setToolbarSeperatorClass("bannerDivider");
- }else{
- _10c4.setToolbarSeperatorClass("toolbarDivider");
- }
- _10c1.add(_10c4);
- return _10c4;
- }
- return null;
- };
- function GlossaryAction(){
- };
- GlossaryAction.prototype=new CognosViewerAction();
- GlossaryAction.prototype.execute=function(){
- var _10c5=this.getCognosViewer();
- _10c5.loadExtra();
- var _10c6=_10c5.getSelectionController();
- var _10c7=_10c6.getAllSelectedObjects();
- if(_10c7.length>0){
- var _10c8=null;
- if(typeof MDSRV_CognosConfiguration!="undefined"){
- _10c8=new MDSRV_CognosConfiguration();
- var _10c9="";
- if(_10c5.envParams["glossaryURI"]){
- _10c9=_10c5.envParams["glossaryURI"];
- }
- _10c8.addProperty("glossaryURI",_10c9);
- _10c8.addProperty("gatewayURI",_10c5.getGateway());
- }
- var _10ca=_10c5.envParams["ui.object"];
- var _10cb=getViewerSelectionContext(_10c6,new CSelectionContext(_10ca));
- var _10cc=new MDSRV_BusinessGlossary(_10c8,_10cb);
- _10cc.open();
- }
- };
- GlossaryAction.prototype.updateMenu=function(_10cd){
- if(!this.getCognosViewer().bCanUseGlossary){
- return "";
- }
- var _10ce=this.selectionHasContext();
- if(!_10ce||this.getCognosViewer().envParams["glossaryURI"]==null||this.getCognosViewer().envParams["glossaryURI"]==""){
- _10cd.disabled=true;
- }else{
- _10cd.disabled=false;
- }
- return _10cd;
- };
- function AuthoredDrillAction(){
- this.m_drillTargetSpecification="";
- };
- AuthoredDrillAction.prototype=new CognosViewerAction();
- AuthoredDrillAction.prototype.setRequestParms=function(_10cf){
- this.m_drillTargetSpecification=_10cf;
- };
- AuthoredDrillAction.prototype.executeDrillTarget=function(_10d0){
- var _10d1=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_10d0));
- var _10d2=encodeURIComponent(_10d1.getAttribute("bookmarkRef"));
- var _10d3=_10d1.getAttribute("path");
- var _10d4=this._shouldShowInNewWindow(_10d1);
- var oCV=this.getCognosViewer();
- if((_10d2!==null&&_10d2!=="")&&(_10d3===null||_10d3==="")){
- var _10d6=_10d1.getAttribute("bookmarkPage");
- if(_10d6&&_10d6!==""){
- oCV.executeAction("GotoPage",{"pageNumber":_10d6,"anchorName":_10d2});
- }else{
- document.location="#"+_10d2;
- }
- }else{
- var _10d7="";
- if(_10d4){
- _10d7="_blank";
- }
- var _10d8=[];
- var _10d9=[];
- _10d9.push("obj");
- _10d9.push(_10d3);
- _10d8[_10d8.length]=_10d9;
- var _10da=false;
- var _10db,_10dc,_10dd,sName,sNil;
- var _10e0=XMLHelper_FindChildrenByTagName(_10d1,"drillParameter",false);
- for(var index=0;index<_10e0.length;++index){
- _10db=[];
- _10dc=_10e0[index];
- _10dd=_10dc.getAttribute("value");
- sName=_10dc.getAttribute("name");
- if(_10dd!==null&&_10dd!==""){
- _10db.push("p_"+sName);
- _10db.push(this.buildSelectionChoicesSpecification(_10dc));
- }
- sNil=_10dc.getAttribute("nil");
- if(sNil!==null&&sNil!==""){
- _10db.push("p_"+sName);
- _10db.push(this.buildSelectionChoicesNilSpecification());
- }
- if(_10db.length>0){
- _10d8[_10d8.length]=_10db;
- }
- if(!_10da){
- var _10e2=_10dc.getAttribute("propertyToPass");
- _10da=(_10e2&&_10e2.length>0)?true:false;
- }
- }
- var _10e3=_10d1.getAttribute("method");
- var _10e4=_10d1.getAttribute("outputFormat");
- var _10e5=_10d1.getAttribute("outputLocale");
- var _10e6=_10d1.getAttribute("prompt");
- var _10e7=_10d1.getAttribute("dynamicDrill");
- var _10e8=this.getXMLNodeAsString(_10d1,"parameters");
- var _10e9=this.getXMLNodeAsString(_10d1,"objectPaths");
- var oCVId=oCV.getId();
- var _10eb=document.forms["formWarpRequest"+oCVId];
- var _10ec=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF");
- if((!_10ec||_10ec.toLowerCase()!=="false")&&_10e6!="true"&&this.isSameReport(_10eb,_10d3)&&this.isSameReportFormat(_10e4)&&!_10d4&&!_10da){
- var _10ed=new ViewerDispatcherEntry(oCV);
- _10ed.addFormField("ui.action","forward");
- if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){
- oCV.rvMainWnd.addCurrentReportToReportHistory();
- var _10ee=oCV.rvMainWnd.saveReportHistoryAsXML();
- _10ed.addFormField("cv.previousReports",_10ee);
- }
- for(index=0;index<_10e0.length;++index){
- _10db=[];
- _10dc=_10e0[index];
- _10dd=_10dc.getAttribute("value");
- sName=_10dc.getAttribute("name");
- sNil=_10dc.getAttribute("nil");
- if((sNil===null||sNil==="")&&(_10dd===null||_10dd==="")){
- _10db.push("p_"+sName);
- _10db.push(this.buildSelectionChoicesNilSpecification());
- }
- if(_10db.length>0){
- _10d8[_10d8.length]=_10db;
- }
- }
- for(index=1;index<_10d8.length;index++){
- _10ed.addFormField(_10d8[index][0],_10d8[index][1]);
- }
- _10ed.addFormField("_drillThroughToSelf","true");
- if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){
- _10ed.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id);
- }
- oCV.setUsePageRequest(true);
- oCV.dispatchRequest(_10ed);
- if(typeof oCV.m_viewerFragment=="undefined"){
- var _10ef=getCognosViewerObjectRefAsString(oCVId);
- setTimeout(_10ef+".getRequestIndicator().show()",10);
- }
- }else{
- doSingleDrill(_10d7,_10d8,_10e3,_10e4,_10e5,_10d2,_10e8,_10e9,this.getCognosViewer().getId(),_10e6,_10e7);
- }
- }
- };
- AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_10f0){
- return _10f0.getAttribute("showInNewWindow")=="true";
- };
- AuthoredDrillAction.prototype.isSameReport=function(_10f1,_10f2){
- if(_10f1["ui.object"]&&_10f2==_10f1["ui.object"].value){
- return true;
- }
- return false;
- };
- AuthoredDrillAction.prototype.isSameReportFormat=function(_10f3){
- var _10f4=this.getCognosViewer().envParams["run.outputFormat"];
- if(_10f4){
- if(_10f3==_10f4){
- return true;
- }else{
- if(_10f4=="HTML"&&_10f3=="HTMLFragment"){
- return true;
- }
- }
- }
- return false;
- };
- AuthoredDrillAction.prototype.getXMLNodeAsString=function(_10f5,_10f6){
- var sXML="";
- if(_10f5!=null){
- var node=XMLHelper_FindChildByTagName(_10f5,_10f6,false);
- if(node!=null){
- sXML=XMLBuilderSerializeNode(node);
- }
- }
- return sXML;
- };
- AuthoredDrillAction.prototype.execute=function(_10f9){
- if(this.m_drillTargetSpecification!=""){
- this.executeDrillTarget(this.m_drillTargetSpecification);
- }else{
- if(typeof _10f9!="undefined"){
- var _10fa=this.getCognosViewer().getDrillTargets();
- var _10fb=this.getAuthoredDrillThroughContext(_10f9,_10fa);
- var _10fc=_10fb.childNodes;
- if(_10fc.length==1){
- this.executeDrillTarget(XMLBuilderSerializeNode(_10fc[0]));
- }else{
- doMultipleDrills(XMLBuilderSerializeNode(_10fb),this.getCognosViewer().getId());
- }
- }
- }
- };
- AuthoredDrillAction.prototype.showDrillTargets=function(_10fd){
- var _10fe="<context>";
- for(var index=0;index<_10fd.length;++index){
- var _1100=_10fd[index];
- _10fe+="<member>";
- var sName=_1100.getAttribute("label");
- _10fe+="<name>";
- _10fe+=sXmlEncode(sName);
- _10fe+="</name>";
- var _1102=_1100.getAttribute("path");
- _10fe+="<drillThroughSearchPath>";
- _10fe+=sXmlEncode(_1102);
- _10fe+="</drillThroughSearchPath>";
- var _1103=_1100.getAttribute("method");
- _10fe+="<drillThroughAction>";
- _10fe+=sXmlEncode(_1103);
- _10fe+="</drillThroughAction>";
- var _1104=_1100.getAttribute("outputFormat");
- _10fe+="<drillThroughFormat>";
- _10fe+=sXmlEncode(_1104);
- _10fe+="</drillThroughFormat>";
- var sData="parent."+this.getTargetReportRequestString(_1100);
- _10fe+="<data>";
- _10fe+=sXmlEncode(sData);
- _10fe+="</data>";
- _10fe+="</member>";
- }
- _10fe+="</context>";
- };
- AuthoredDrillAction.prototype.populateContextMenu=function(_1106){
- var _1107=this.getCognosViewer();
- var _1108=_1107.rvMainWnd.getToolbarControl();
- var _1109=null;
- if(typeof _1108!="undefined"&&_1108!=null){
- var _110a=_1108.getItem("goto");
- if(_110a){
- _1109=_110a.getMenu();
- }
- }
- var _110b=_1107.rvMainWnd.getContextMenu();
- var _110c=null;
- if(typeof _110b!="undefined"&&_110b!=null){
- _110c=_110b.getGoToMenuItem().getMenu();
- }
- if(_1109!=null||_110c!=null){
- var _110d=this.getCognosViewer().getDrillTargets();
- var _110e=this.getAuthoredDrillThroughContext(_1106,_110d);
- var _110f=_110e.childNodes;
- if(_110f.length>0){
- for(var index=0;index<_110f.length;++index){
- var _1111=_110f[index];
- var _1112=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_1111))+"\");";
- var _1113=this.getTargetReportIconPath(_1111);
- var _1114=_1111.getAttribute("label");
- if(isViewerBidiEnabled()){
- var bidi=BidiUtils.getInstance();
- _1114=bidi.btdInjectUCCIntoStr(_1114,getViewerBaseTextDirection());
- }
- if(_1109!=null){
- new CMenuItem(_1109,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin());
- }
- if(_110c!=null){
- new CMenuItem(_110c,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin());
- }
- }
- }
- }
- };
- AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){
- return "<selectChoices/>";
- };
- AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_1116){
- var _1117="";
- var _1118=_1116.getAttribute("value");
- if(_1118!=null){
- var _1119=_1116.getAttribute("propertyToPass");
- _1117+="<selectChoices";
- if(_1119!=null&&_1119!=""){
- _1117+=" propertyToPass=\"";
- _1117+=sXmlEncode(_1119);
- _1117+="\"";
- }
- _1117+=">";
- if(_1118.indexOf("<selectChoices>")!=-1){
- _1117+=_1118.substring(_1118.indexOf("<selectChoices>")+15);
- }else{
- if(_1118!=""){
- _1117+="<selectOption ";
- var sMun=_1116.getAttribute("mun");
- if(sMun!=null&&sMun!=""){
- var _111b=sXmlEncode(sMun);
- _1117+="useValue=\"";
- _1117+=_111b;
- _1117+="\" ";
- _1117+="mun=\"";
- _1117+=_111b;
- _1117+="\" ";
- _1117+="displayValue=\"";
- _1117+=sXmlEncode(_1118);
- _1117+="\"";
- }else{
- _1117+="useValue=\"";
- _1117+=sXmlEncode(_1118);
- _1117+="\" ";
- var _111c=_1116.getAttribute("displayValue");
- if(_111c==null||_111c==""){
- _111c=_1118;
- }
- _1117+="displayValue=\"";
- _1117+=sXmlEncode(_111c);
- _1117+="\"";
- }
- _1117+="/>";
- _1117+="</selectChoices>";
- }
- }
- }
- return _1117;
- };
- AuthoredDrillAction.prototype.getPropertyToPass=function(_111d,_111e){
- if(_111d!=null&&_111d!=""&&_111e!=null){
- var _111f=_111e.childNodes;
- if(_111f!=null){
- for(var index=0;index<_111f.length;++index){
- var _1121=_111f[index];
- var sName="";
- if(_1121.getAttribute("name")!=null){
- sName=_1121.getAttribute("name");
- }
- if(sName==_111d){
- return _1121.getAttribute("propertyToPass");
- }
- }
- }
- }
- return "";
- };
- AuthoredDrillAction.prototype.getTargetReportRequestString=function(_1123){
- var _1124="";
- var _1125=_1123.getAttribute("bookmarkRef");
- var _1126=_1123.getAttribute("path");
- var _1127=_1123.getAttribute("showInNewWindow");
- if((_1125!=null&&_1125!="")&&(_1126==null||_1126=="")){
- _1124+="document.location=\"#";
- _1124+=_1125;
- _1124+="\";";
- }else{
- _1124+="doSingleDrill(";
- if(_1127=="true"){
- _1124+="\"_blank\",";
- }else{
- _1124+="\"\",";
- }
- _1124+="[[\"obj\",\"";
- _1124+=encodeURIComponent(_1126);
- _1124+="\"]";
- var _1128=XMLHelper_FindChildrenByTagName(_1123,"drillParameter",false);
- for(var index=0;index<_1128.length;++index){
- var _112a=_1128[index];
- var _112b=_112a.getAttribute("value");
- var sName=_112a.getAttribute("name");
- if(_112b!=null&&_112b!=""){
- _1124+=", [\"p_"+sName+"\",\""+encodeURIComponent(this.buildSelectionChoicesSpecification(_112a))+"\"]";
- }
- var sNil=_112a.getAttribute("nil");
- if(sNil!=null&&sNil!=""){
- _1124+="\", [\"p_"+sName+"\",\""+encodeURIComponent(this.buildSelectionChoicesNilSpecification())+"\"]";
- }
- }
- _1124+="],";
- var _112e=_1123.getAttribute("method");
- _1124+="\""+encodeURIComponent(_112e)+"\",";
- var _112f=_1123.getAttribute("outputFormat");
- _1124+="\""+encodeURIComponent(_112f)+"\",";
- var _1130=_1123.getAttribute("outputLocale");
- _1124+="\""+encodeURIComponent(_1130)+"\",";
- _1124+="\""+encodeURIComponent(_1125)+"\",";
- var _1131=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_1123,"parameters",false));
- _1124+="\""+encodeURIComponent(_1131)+"\",";
- var _1132=XMLBuilderSerializeNode(XMLHelper_FindChildByTagName(_1123,"objectPaths",false));
- _1124+="\""+encodeURIComponent(_1132)+"\",";
- _1124+="\""+encodeURIComponent(this.getCognosViewer().getId())+"\",";
- var _1133=_1123.getAttribute("prompt");
- _1124+="\""+encodeURIComponent(_1133)+"\",";
- var _1134=_1123.getAttribute("dynamicDrill");
- _1124+=" "+encodeURIComponent(_1134);
- _1124+=");";
- }
- return _1124;
- };
- AuthoredDrillAction.prototype.getTargetReportIconPath=function(_1135){
- var _1136="";
- var _1137=_1135.getAttribute("bookmarkRef");
- var _1138=XMLHelper_FindChildByTagName(_1135,"drillParameter",false);
- if((_1137!=null&&_1137!="")&&_1138==null){
- _1136="/common/images/spacer.gif";
- }else{
- var _1139=_1135.getAttribute("method");
- switch(_1139){
- case "editAnalysis":
- _1136="/ps/portal/images/icon_ps_analysis.gif";
- break;
- case "editQuery":
- _1136="/ps/portal/images/icon_qs_query.gif";
- break;
- case "execute":
- _1136="/ps/portal/images/action_run.gif";
- break;
- case "view":
- var _113a=_1135.getAttribute("outputFormat");
- switch(_113a){
- case "HTML":
- case "XHTML":
- case "HTMLFragment":
- _1136="/ps/portal/images/icon_result_html.gif";
- break;
- case "PDF":
- _1136="/ps/portal/images/icon_result_pdf.gif";
- break;
- case "XML":
- _1136="/ps/portal/images/icon_result_xml.gif";
- break;
- case "CSV":
- _1136="/ps/portal/images/icon_result_csv.gif";
- break;
- case "XLS":
- _1136="/ps/portal/images/icon_result_excel.gif";
- break;
- case "SingleXLS":
- _1136="/ps/portal/images/icon_result_excel_single.gif";
- break;
- case "XLWA":
- _1136="/ps/portal/images/icon_result_excel_web_arch.gif";
- break;
- default:
- _1136="/common/images/spacer.gif";
- }
- break;
- default:
- _1136="/common/images/spacer.gif";
- }
- }
- return this.getCognosViewer().getWebContentRoot()+_1136;
- };
- AuthoredDrillAction.prototype.getAuthoredDrillThroughContext=function(_113b,_113c){
- if(typeof _113b!="string"||typeof _113c!="object"){
- return null;
- }
- var _113d=XMLBuilderLoadXMLFromString(_113b);
- if(_113d==null||_113d.firstChild==null){
- return null;
- }
- var _113e=XMLHelper_GetFirstChildElement(_113d);
- if(XMLHelper_GetLocalName(_113e)!="AuthoredDrillTargets"){
- return null;
- }
- var _113f=XMLHelper_GetFirstChildElement(_113e);
- if(XMLHelper_GetLocalName(_113f)!="rvDrillTargets"){
- return null;
- }
- var _1140=_113f.childNodes;
- if(_1140===null||_1140.length===0){
- return null;
- }
- var _1141=self.XMLBuilderCreateXMLDocument("rvDrillTargets");
- for(var _1142=0;_1142<_1140.length;++_1142){
- if(typeof _1140[_1142].getAttribute=="undefined"){
- continue;
- }
- var _1143=_1141.createElement("drillTarget");
- _1141.documentElement.appendChild(_1143);
- var _1144=_1140[_1142].getAttribute("bookmarkRef");
- if(_1144===null){
- _1143.setAttribute("bookmarkRef","");
- }else{
- _1143.setAttribute("bookmarkRef",_1144);
- }
- var _1145=_1140[_1142].getAttribute("bookmarkPage");
- if(_1145===null){
- _1143.setAttribute("bookmarkPage","");
- }else{
- _1143.setAttribute("bookmarkPage",_1145);
- }
- var _1146=_1140[_1142].getAttribute("drillIdx");
- if(_1146==null){
- continue;
- }
- if(_1146>=_113c.length){
- continue;
- }
- var _1147=_113c[_1146];
- if(typeof _1147!="object"){
- continue;
- }
- _1143.setAttribute("outputFormat",_1147.getOutputFormat());
- _1143.setAttribute("outputLocale",_1147.getOutputLocale());
- _1143.setAttribute("prompt",_1147.getPrompt());
- _1143.setAttribute("dynamicDrill",_1147.isDynamicDrillThrough()?"true":"false");
- var _1148=_1140[_1142].getAttribute("label");
- if(_1148===null||_1148===""){
- _1148=_1147.getLabel();
- }
- _1143.setAttribute("label",_1148);
- _1143.setAttribute("path",_1147.getPath());
- _1143.setAttribute("showInNewWindow",_1147.getShowInNewWindow());
- _1143.setAttribute("method",_1147.getMethod());
- var _1149=_113f;
- var _114a="";
- var _114b=_1147.getParameterProperties();
- if(typeof _114b!="undefined"&&_114b!=null&&_114b!=""){
- _114a=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_1147.getParameterProperties()));
- }
- while(_1149){
- var _114c=_1149.childNodes[_1142].childNodes;
- for(var _114d=0;_114d<_114c.length;++_114d){
- var _114e=_114c[_114d].cloneNode(true);
- if(_114a){
- var _114f=this.getPropertyToPass(_114e.getAttribute("name"),_114a);
- if(_114f!=null&&_114f!=""){
- _114e.setAttribute("propertyToPass",_114f);
- }
- }
- _1143.appendChild(_114e);
- }
- _1149=_1149.nextSibling;
- }
- var _1150="<root xmlns:bus=\"http://developer.cognos.com/schemas/bibus/3/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">";
- var _1151="</root>";
- var _1152=_1150+_1147.getParameters()+_1151;
- var _1153=XMLBuilderLoadXMLFromString(_1152);
- var _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1153));
- if(_1154){
- _1143.appendChild(_1154.cloneNode(true));
- }
- var _1155=_1150+_1147.getObjectPaths()+_1151;
- var _1156=XMLBuilderLoadXMLFromString(_1155);
- _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1156));
- if(_1154){
- _1143.appendChild(_1154.cloneNode(true));
- }
- }
- return XMLHelper_GetFirstChildElement(_1141);
- };
- function DrillContextMenuHelper(){
- };
- DrillContextMenuHelper.updateDrillMenuItems=function(_1157,oCV,_1159){
- var _115a=[];
- if(DrillContextMenuHelper.needsDrillSubMenu(oCV)){
- var _115b=oCV.getSelectionController();
- var _115c=_115b.getAllSelectedObjects();
- var _115d=_115c[0];
- if(_115d.getUseValues().length>1&&typeof RV_RES!="undefined"){
- var _115e={name:_1159,label:RV_RES.RV_DRILL_DEFAULT,action:{name:_1159,payload:{}}};
- _115a.push(_115e);
- }
- var _115f=(_115d.getUseValues().length>1)?1:0;
- var _1160=_115d.getUseValues().length-1;
- _1160=(_1160>2)?2:_1160;
- for(var iDim=_115f;iDim<=_1160;++iDim){
- DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,0);
- }
- var _1162=false;
- for(var iDim=_115f;iDim<=_1160;++iDim){
- for(var _1163=1;_1163<_115d.getUseValues()[iDim].length;++_1163){
- if(_1162==false){
- _115a.push({separator:true});
- _1162=true;
- }
- DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,_1163);
- }
- }
- }
- DrillContextMenuHelper.completeDrillMenu(_1159,_115a,_1157);
- };
- DrillContextMenuHelper.needsDrillSubMenu=function(oCV){
- var _1165=(oCV&&oCV.getSelectionController());
- if(_1165){
- var _1166=_1165.getAllSelectedObjects();
- if(_1166.length==1&&_1166[0].isHomeCell&&_1166[0].isHomeCell()==false){
- var _1167=_1166[0].isSelectionOnVizChart();
- if(!_1167){
- var _1168=oCV.getAdvancedServerProperty("VIEWER_JS_ENABLE_DRILL_SUBMENU");
- _1167=(_1168=="charts"&&_1165.hasSelectedChartNodes());
- }
- if(_1167){
- var _1169=_1166[0];
- return (_1167&&_1169.getUseValues()&&(_1169.getUseValues().length>1||_1169.getUseValues()[0].length>1));
- }
- }
- }
- return false;
- };
- DrillContextMenuHelper.addSubMenuItem=function(_116a,_116b,_116c,iDim,_116e){
- var _116f=_116c.getDrillOptions()[iDim][_116e];
- if(DrillContextMenuHelper.isOptionDrillable(_116a,_116f)){
- var _1170=DrillContextMenuHelper.getItemValue(_116c,iDim,_116e);
- if(_1170){
- var _1171=_116c.getDataItems()[iDim][_116e];
- var _1172={name:_116a,label:_1170,action:{name:_116a,payload:{userSelectedDrillItem:_1171}}};
- _116b.push(_1172);
- }
- }
- };
- DrillContextMenuHelper.completeDrillMenu=function(_1173,_1174,_1175){
- if(_1174.length>0){
- _1175.items=_1174;
- }else{
- _1175.items=null;
- if(_1175.action==null){
- _1175.action={name:_1173,action:{name:_1173}};
- }
- }
- };
- DrillContextMenuHelper.isOptionDrillable=function(_1176,_1177){
- return (_1177>=3||(_1176=="DrillDown"&&_1177==2)||(_1176=="DrillUp"&&_1177==1));
- };
- DrillContextMenuHelper.getItemValue=function(_1178,iDim,_117a){
- var _117b=(_117a==0)?_1178.getDisplayValues()[iDim]:null;
- return ((_117b)?_117b:_1178.getUseValues()[iDim][_117a]);
- };
- function DrillAction(){
- };
- DrillAction.prototype=new CognosViewerAction();
- DrillAction.prototype.setRequestParms=function(parms){
- if(parms&&parms.userSelectedDrillItem){
- this.m_userSelectedDrillItem=parms.userSelectedDrillItem;
- }
- };
- DrillAction.prototype.submitDrillRequest=function(_117d,_117e,_117f){
- var oCV=this.getCognosViewer();
- var oReq=new ViewerDispatcherEntry(oCV);
- oReq.addFormField("ui.action","drill");
- oReq.addFormField("rv_drillOption",_117e);
- oReq.addFormField("rv_drillparams",_117d);
- oReq.addFormField("rv_drillRefQuery",_117f);
- oCV.dispatchRequest(oReq);
- };
- function DrillDownAction(){
- this.m_sAction="DrillDown";
- };
- DrillDownAction.prototype=new DrillAction();
- DrillDownAction.prototype.updateMenu=function(_1182){
- return _1182;
- };
- DrillDownAction.prototype.execute=function(){
- var oCV=this.getCognosViewer();
- var _1184=oCV.getDrillMgr();
- if(_1184.canDrillDown()==false){
- return;
- }
- var _1185=_1184.rvBuildXMLDrillParameters("drillDown",this.m_userSelectedDrillItem);
- var _1186=_1184.getRefQuery();
- if(oCV.envParams["cv.id"]=="AA"){
- oCV.m_viewerFragment.raiseAADrillDownEvent();
- }
- this.submitDrillRequest(_1185,"down",_1186);
- };
- function DrillUpAction(){
- this.m_sAction="DrillUp";
- };
- DrillUpAction.prototype=new DrillAction();
- DrillUpAction.prototype.updateMenu=function(_1187){
- return _1187;
- };
- DrillUpAction.prototype.execute=function(){
- var oCV=this.getCognosViewer();
- var _1189=oCV.getDrillMgr();
- if(_1189.canDrillUp()==false){
- return;
- }
- var _118a=_1189.rvBuildXMLDrillParameters("drillUp",this.m_userSelectedDrillItem);
- var _118b=_1189.getRefQuery();
- if(oCV.envParams["cv.containerApp"]=="AA"){
- oCV.m_viewerFragment.raiseAADrillUpEvent();
- }
- this.submitDrillRequest(_118a,"up",_118b);
- };
- function ResizeChartAction(){
- this.m_width=0;
- this.m_height=0;
- this.m_actionContext=null;
- };
- ResizeChartAction.prototype=new CognosViewerAction();
- ResizeChartAction.prototype.setRequestParms=function(_118c){
- if(_118c&&_118c.resize){
- this.m_width=_118c.resize.w;
- this.m_height=_118c.resize.h;
- this.m_actionContext=_118c.resize.actionContext;
- }
- };
- ResizeChartAction.prototype.execute=function(){
- var oCV=this.getCognosViewer();
- var oReq=new ViewerDispatcherEntry(oCV);
- oReq.addFormField("ui.action","modifyReport");
- if(!this.m_actionContext){
- this.m_actionContext="<reportActions><ChangeDataContainerSize><idSelectAll/><height>"+this.m_height+"</height><width>"+this.m_width+"</width></ChangeDataContainerSize></reportActions>";
- }
- oReq.addFormField("cv.actionContext",this.m_actionContext);
- oReq.addFormField("keepIterators","true");
- oReq.addFormField("cv.reuseConversation","true");
- oReq.addFormField("reuseResults","true");
- oReq.addDefinedFormField("ui.spec",oCV.envParams["ui.spec"]);
- oReq.addDefinedFormField("modelPath",oCV.getModelPath());
- oReq.addDefinedFormField("packageBase",oCV.envParams["packageBase"]);
- oReq.setCanBeQueued(true);
- oCV.dispatchRequest(oReq);
- };
- function CCognosViewerSaveReport(_118f,_1190){
- this.m_cognosViewer=_118f;
- this.m_params=null;
- this.dashboardToSaveIn=_1190.cm$storeID;
- this.m_doSaveAsOnFault=false;
- };
- CCognosViewerSaveReport.prototype.canSave=function(_1191){
- return (this.doSaveAs()||_1191&&_1191.indexOf("write")!==-1);
- };
- CCognosViewerSaveReport.prototype.isSavedOutput=function(){
- var _1192=this.m_cognosViewer.envParams["ui.action"];
- return (typeof _1192!=="undefined"&&_1192==="view");
- };
- CCognosViewerSaveReport.prototype.doSaveAs=function(){
- var _1193=(this.m_doSaveAsOnFault||!this.m_cognosViewer.envParams["savedReportName"]||!this.isSameDashboard());
- return _1193;
- };
- CCognosViewerSaveReport.prototype.isSameDashboard=function(){
- var _1194=(this.m_cognosViewer.envParams["ui.object"].indexOf(this.dashboardToSaveIn)!==-1);
- return _1194;
- };
- CCognosViewerSaveReport.prototype.getUIAction=function(){
- return (this.doSaveAs()?"saveInDashboard":"updateSavedReport");
- };
- CCognosViewerSaveReport.prototype.populateRequestParams=function(_1195){
- _1195.addFormField("ui.action",this.getUIAction());
- _1195.addFormField("cv.ignoreState","true");
- _1195.addFormField("dashboard-id",this.dashboardToSaveIn);
- _1195.addNonEmptyStringFormField("executionParameters",this.m_cognosViewer.m_sParameters);
- for(var param in this.m_cognosViewer.envParams){
- if(param.indexOf("frag-")==0||param=="cv.actionState"||param=="ui.primaryAction"||param=="dashboard"||param=="ui.action"||param=="cv.responseFormat"||param=="b_action"){
- continue;
- }
- _1195.addFormField(param,this.m_cognosViewer.envParams[param]);
- }
- };
- CCognosViewerSaveReport.prototype.getCognosViewer=function(){
- return this.m_cognosViewer;
- };
- CCognosViewerSaveReport.prototype.getViewerWidget=function(){
- return this.getCognosViewer().getViewerWidget();
- };
- CCognosViewerSaveReport.prototype.dispatchRequest=function(){
- var _1197=this.m_cognosViewer;
- var _1198=this.getViewerWidget();
- var _1199={"complete":{"object":_1198,"method":_1198.handleWidgetSaveDone},"fault":{"object":this,"method":this.onFault}};
- var _119a=new AsynchJSONDispatcherEntry(_1197);
- _119a.setCallbacks(_1199);
- this.populateRequestParams(_119a);
- _1197.dispatchRequest(_119a);
- };
- CCognosViewerSaveReport.prototype.onFault=function(_119b,arg1){
- var _119d=this.m_cognosViewer;
- var _119e=this.getViewerWidget();
- var _119f=_119b.getSoapFault();
- var _11a0=XMLHelper_FindChildByTagName(_119f,"Fault",true);
- if(this.ifIsEmptySelectionFault(_11a0)){
- this.handleEmptySelectionFault();
- return;
- }
- var _11a1=_119f.createElement("allowRetry");
- _11a1.appendChild(_119f.createTextNode("false"));
- _11a0.appendChild(_11a1);
- var _11a2=XMLBuilderSerializeNode(_11a0);
- _119d.setSoapFault(_11a2);
- _119e.handleFault();
- var _11a3={"status":false};
- _119e.iContext.iEvents.fireEvent("com.ibm.bux.widget.save.done",null,_11a3);
- };
- CCognosViewerSaveReport.prototype.ifIsEmptySelectionFault=function(_11a4){
- if(_11a4){
- var _11a5=XMLHelper_FindChildByTagName(_11a4,"errorCode",true);
- if(_11a5){
- var _11a6=XMLHelper_GetText(_11a5,false);
- return (_11a6==="cmEmptySelection");
- }
- }
- return false;
- };
- CCognosViewerSaveReport.prototype.handleEmptySelectionFault=function(){
- delete (this.m_cognosViewer.envParams["savedReportName"]);
- this.m_doSaveAsOnFault=true;
- this.dispatchRequest();
- };
- 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(_11a7){
- this.m_headers=_11a7;
- };
- XmlHttpObject.prototype.getHeaders=function(){
- return this.m_headers;
- };
- XmlHttpObject.prototype.newRequest=function(){
- var _11a8=new XmlHttpObject();
- _11a8.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
- this.executeHttpCallback("newRequest");
- return _11a8;
- };
- 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(_11a9){
- if(this.m_httpCallbacks&&this.m_httpCallbacks[_11a9]){
- var _11aa=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
- var _11ab=GUtil.generateCallback(this.m_httpCallbacks[_11a9].method,_11aa,this.m_httpCallbacks[_11a9].object);
- _11ab();
- return true;
- }
- return false;
- };
- XmlHttpObject.prototype.setCallbacks=function(_11ac){
- if(!this.m_httpCallbacks){
- this.m_httpCallbacks={};
- }
- for(callback in _11ac){
- this.m_httpCallbacks[callback]=_11ac[callback];
- }
- };
- XmlHttpObject.prototype.getCallbacks=function(){
- return this.m_httpCallbacks;
- };
- XmlHttpObject.createRequestObject=function(){
- var _11ad=null;
- if(window.XMLHttpRequest){
- _11ad=new XMLHttpRequest();
- }else{
- if(window.ActiveXObject){
- _11ad=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- }
- }
- return _11ad;
- };
- XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
- var _11ae=this.xmlHttp;
- if(_11ae&&_11ae.readyState===4){
- if(_11ae.status===200){
- this.httpSuccess();
- }else{
- this.httpError();
- }
- }else{
- }
- };
- XmlHttpObject.prototype.init=function(_11af,_11b0,url,_11b2){
- this.m_action=_11af;
- this.m_gateway=_11b0;
- this.m_url=url;
- this.m_asynch=_11b2;
- };
- 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(_11b3,_11b4,url,async){
- var _11b7=this.xmlHttp;
- if(_11b7){
- _11b7.open(_11b3,_11b4,async);
- if(async){
- _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- }else{
- _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- if(!isIE()){
- _11b7.onload=GUtil.generateCallback(this.httpSuccess,[],this);
- _11b7.onerror=GUtil.generateCallback(this.httpError,[],this);
- }
- }
- _11b7.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
- if(this.m_headers){
- for(header in this.m_headers){
- _11b7.setRequestHeader(header,this.m_headers[header]);
- }
- }
- this.executeHttpCallback("preHttpRequest");
- var _11b8=this.convertFormFieldsToUrl();
- if(url){
- _11b8+=url;
- }
- _11b7.send(_11b8);
- }
- };
- 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,value){
- this.m_formFields.add(name,value);
- };
- XmlHttpObject.prototype.getFormFields=function(){
- return this.m_formFields;
- };
- XmlHttpObject.prototype.getFormField=function(_11bc){
- return this.m_formFields.get(_11bc);
- };
- XmlHttpObject.prototype.clearFormFields=function(){
- this.m_formFields=new CDictionary();
- };
- XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
- var url="";
- var _11be=this.m_formFields.keys();
- for(var index=0;index<_11be.length;index++){
- if(index>0){
- url+="&";
- }
- url+=encodeURIComponent(_11be[index])+"="+encodeURIComponent(this.m_formFields.get(_11be[index]));
- }
- return url;
- };
- XmlHttpObject.prototype.concatResponseArguments=function(_11c0){
- var _11c1=[this];
- if(_11c0){
- _11c1=_11c1.concat(_11c0);
- }
- return _11c1;
- };
- function AsynchRequest(_11c2,_11c3){
- AsynchRequest.baseConstructor.call(this);
- this.m_gateway=_11c2;
- this.m_webContentRoot=_11c3;
- 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(_11c4){
- if(this.m_callbacks[_11c4]){
- var _11c5=this.concatResponseArguments(this.m_callbacks.customArguments);
- var _11c6=GUtil.generateCallback(this.m_callbacks[_11c4].method,_11c5,this.m_callbacks[_11c4].object);
- _11c6();
- return true;
- }
- return false;
- };
- AsynchRequest.prototype.setCallbacks=function(_11c7){
- if(!this.m_callbacks){
- this.m_callbacks={};
- }
- for(callback in _11c7){
- this.m_callbacks[callback]=_11c7[callback];
- }
- };
- AsynchRequest.prototype.getCallbacks=function(){
- return this.m_callbacks;
- };
- AsynchRequest.prototype.newRequest=function(){
- var _11c8=this.construct();
- _11c8.setHeaders(this.getHeaders());
- if(this.getFormFields().exists("b_action")){
- _11c8.addFormField("b_action",this.getFormField("b_action"));
- }
- if(this.getFormFields().exists("cv.catchLogOnFault")){
- _11c8.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- _11c8.setPromptDialog(this.m_promptDialog);
- _11c8.setFaultDialog(this.m_faultDialog);
- _11c8.setLogonDialog(this.m_logonDialog);
- _11c8.m_asynch=this.m_asynch;
- if(this.m_callbacks.newRequest){
- var _11c9=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_11c8],this.m_callbacks.newRequest.object);
- _11c9();
- }
- return _11c8;
- };
- AsynchRequest.prototype.success=function(){
- var _11ca=this.getAsynchStatus();
- switch(_11ca){
- 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(_11cb){
- if(_11cb instanceof IFaultDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
- }
- this.m_faultDialog=_11cb;
- }else{
- if(_11cb&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- };
- AsynchRequest.prototype.setPromptDialog=function(_11cc){
- if(_11cc instanceof IPromptDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
- }
- this.m_promptDialog=_11cc;
- }else{
- if(_11cc&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- };
- AsynchRequest.prototype.setLogonDialog=function(_11cd){
- if(_11cd instanceof ILogOnDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
- }
- this.m_logonDialog=_11cd;
- }else{
- if(_11cd&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- };
- AsynchRequest.prototype.resubmitRequest=function(){
- var _11ce=this.newRequest();
- _11ce.m_formFields=this.m_formFields;
- _11ce.sendRequest();
- return _11ce;
- };
- AsynchRequest.prototype.sendRequest=function(){
- var _11cf=this;
- var _11d0={"complete":{"object":_11cf,"method":_11cf.successHandler},"fault":{"object":_11cf,"method":_11cf.errorHandler}};
- this.init("POST",this.m_gateway,"",this.m_asynch);
- this.executeCallback("preHttpRequest");
- this.parent.setCallbacks.call(this,_11d0);
- 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 _11d1=this.getResponseText();
- if(_11d1.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
- this.passportTimeout();
- }else{
- if((_11d1.indexOf("http-equiv=\"refresh\"")!=-1)||(_11d1.indexOf("http-equiv='refresh'")!=-1)){
- this.passportTimeout();
- }else{
- this.executeCallback("entryFault");
- if(!this.executeCallback("fault")){
- var _11d2=window.open("","","height=400,width=500");
- if(_11d2!=null){
- _11d2.document.write(_11d1);
- }
- }
- }
- }
- }else{
- this.m_soapFault=this.constructFaultEnvelope();
- if(this.m_soapFault!=null){
- var _11d3=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
- if(_11d3!=null&&XMLHelper_FindChildByTagName(_11d3,"promptInfo",true)){
- this.passportTimeout();
- }else{
- this.fault();
- }
- }else{
- this.success();
- }
- }
- };
- AsynchRequest.prototype.cancel=function(){
- this.parent.cancel.call(this);
- var _11d4=this.getFormField("m_tracking");
- if(_11d4){
- var _11d5=new XmlHttpObject();
- _11d5.init("POST",this.m_gateway,"",false);
- if(this.getFormField("cv.outputKey")){
- _11d5.addFormField("b_action","cvx.high");
- _11d5.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _11d5.setHeaders(this.getHeaders());
- }else{
- _11d5.addFormField("b_action","cognosViewer");
- }
- _11d5.addFormField("cv.responseFormat","successfulRequest");
- _11d5.addFormField("ui.action","cancel");
- _11d5.addFormField("m_tracking",_11d4);
- if(this.getFormField("cv.debugDirectory")){
- _11d5.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _11d5.sendRequest();
- this.executeCallback("cancel");
- }
- };
- AsynchRequest.prototype.working=function(){
- this.executeCallback("working");
- var _11d6=this.newRequest();
- _11d6.addFormField("m_tracking",this.getTracking());
- if(this.getFormField("cv.outputKey")){
- _11d6.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _11d6.addFormField("b_action","cvx.high");
- }
- if(this.isRAPWaitTrue()){
- _11d6.m_formFields=this.m_formFields;
- _11d6.addFormField("m_tracking",this.getTracking());
- _11d6.addFormField("rapWait","true");
- var _11d7=this.getRAPRequestCache();
- if(_11d7!==null&&typeof _11d7!="undefined"){
- _11d6.addFormField("rapRequestCache",_11d7);
- }
- var _11d8=this.getMainConversation();
- if(_11d8){
- _11d6.addFormField("mainConversation",_11d8);
- }
- var _11d9=this.getMainTracking();
- if(_11d9){
- _11d6.addFormField("mainTracking",_11d9);
- }
- }else{
- _11d6.addFormField("ui.action","wait");
- _11d6.addFormField("ui.primaryAction",this.getPrimaryAction());
- _11d6.addFormField("cv.actionState",this.getActionState());
- if(this.getFormField("ui.preserveRapTags")){
- _11d6.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
- }
- if(this.getFormField("ui.backURL")){
- _11d6.addFormField("ui.backURL",this.getFormField("ui.backURL"));
- }
- if(this.getFormField("errURL")){
- _11d6.addFormField("errURL",this.getFormField("errURL"));
- }
- if(this.getFormField("cv.showFaultPage")){
- _11d6.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
- }
- if(this.getFormField("cv.catchLogOnFault")){
- _11d6.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- }
- if(this.getFormField("bux")){
- _11d6.addFormField("bux",this.getFormField("bux"));
- }
- if(this.getFormField("cv.debugDirectory")){
- _11d6.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _11d6.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(_11da){
- var _11db=this.newRequest();
- _11db.addFormField("ui.action","forward");
- _11db.addFormField("m_tracking",this.getTracking());
- _11db.addFormField("ui.conversation",this.getConversation());
- _11db.addFormField("ui.primaryAction",this.getPrimaryAction());
- _11db.addFormField("cv.actionState",this.getActionState());
- for(var _11dc in _11da){
- _11db.addFormField(_11dc,_11da[_11dc]);
- }
- _11db.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 _11dd=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
- window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_11dd,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 _11de=this.constructFaultEnvelope();
- if(_11de){
- var _11df=XMLHelper_FindChildByTagName(_11de,"faultcode",true);
- if(_11df!=null){
- return XMLHelper_GetText(_11df);
- }
- }
- return null;
- };
- AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
- var _11e0=this.constructFaultEnvelope();
- if(_11e0){
- var entry=XMLHelper_FindChildByTagName(_11e0,"messageString",true);
- if(entry!=null){
- return XMLHelper_GetText(entry);
- }
- }
- return null;
- };
- function AsynchDATARequest(_11e2,_11e3){
- AsynchDATARequest.baseConstructor.call(this,_11e2,_11e3);
- 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 _11e4=this.getResponseText().substring(0,12);
- if(_11e4==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 state=this.getResponseState();
- if(state!=null){
- if(state.m_sSoapFault){
- var _11e6=state.m_sSoapFault;
- this.m_soapFault=XMLBuilderLoadXMLFromString(_11e6);
- }
- }
- }
- return this.m_soapFault;
- };
- AsynchDATARequest.prototype.construct=function(){
- var _11e7=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
- _11e7.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _11e7.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _11e7.addFormField("cv.responseFormat","data");
- }
- return _11e7;
- };
- AsynchDATARequest.prototype.getEnvParam=function(param){
- var _11e9=this.getResponseState();
- if(_11e9&&typeof _11e9.envParams!="undefined"&&typeof _11e9.envParams[param]!="undefined"){
- return _11e9.envParams[param];
- }
- return null;
- };
- AsynchDATARequest.prototype.isRAPWaitTrue=function(){
- var _11ea=this.getEnvParam("rapWait");
- if(_11ea!=null){
- return _11ea=="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(_11eb,_11ec){
- AsynchJSONRequest.baseConstructor.call(this,_11eb,_11ec);
- 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 _11ee=this.removeInvalidCharacters(text);
- this.m_jsonResponse=eval("("+_11ee+")");
- }
- }
- }
- return this.m_jsonResponse;
- };
- AsynchJSONRequest.prototype.getTracking=function(){
- var _11ef=this.getJSONResponseObject();
- if(_11ef){
- return _11ef.tracking;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getConversation=function(){
- var _11f0=this.getJSONResponseObject();
- if(_11f0){
- return _11f0.conversation;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getAsynchStatus=function(){
- var _11f1=this.getJSONResponseObject();
- if(_11f1){
- return _11f1.status;
- }
- return "unknown";
- };
- AsynchJSONRequest.prototype.getPrimaryAction=function(){
- var _11f2=this.getJSONResponseObject();
- if(_11f2){
- return _11f2.primaryAction;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getActionState=function(){
- var _11f3=this.getJSONResponseObject();
- if(_11f3){
- return _11f3.actionState;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getDebugLogs=function(){
- var _11f4=this.getJSONResponseObject();
- if(_11f4){
- return _11f4.debugLogs;
- }
- return "";
- };
- AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
- var _11f5=this.getJSONResponseObject();
- if(_11f5){
- return (_11f5.rapWait==="true");
- }
- return false;
- };
- AsynchJSONRequest.prototype.getRAPRequestCache=function(){
- var _11f6=this.getJSONResponseObject();
- if(_11f6){
- var _11f7=_11f6.rapRequestCache;
- if(_11f7!==null&&typeof _11f7!="undefined"){
- return _11f7;
- }
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainConversation=function(){
- var _11f8=this.getJSONResponseObject();
- if(_11f8){
- return _11f8.mainConversation;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainTracking=function(){
- var _11f9=this.getJSONResponseObject();
- if(_11f9){
- return _11f9.mainTracking;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getResult=function(){
- var _11fa=this.getJSONResponseObject();
- if(_11fa&&_11fa.json){
- var _11fb=this.removeInvalidCharacters(_11fa.json);
- return eval("("+_11fb+")");
- }
- return null;
- };
- AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
- if(text){
- text=text.replace(/(\n|\r|\t)+/g,"");
- }
- return text;
- };
- AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
- var _11fd=this.getJSONResponseObject();
- if(_11fd&&_11fd.promptHTMLFragment){
- return _11fd.promptHTMLFragment;
- }
- return "";
- };
- AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
- if(this.m_soapFault==null){
- var _11fe=this.getJSONResponseObject();
- if(_11fe.status=="fault"){
- this.m_soapFault=XMLBuilderLoadXMLFromString(_11fe.fault);
- }
- }
- return this.m_soapFault;
- };
- AsynchJSONRequest.prototype.construct=function(){
- var _11ff=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
- _11ff.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _11ff.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _11ff.addFormField("cv.responseFormat","asynchJSON");
- }
- return _11ff;
- };
- 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(_1200){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:show not implemented.");
- }
- };
- ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_1201){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
- }
- };
- function IPromptDialog(){
- };
- IPromptDialog.prototype.initialize=function(url,width,_1204){
- 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(_1205){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:preHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postHttpRequest=function(_1206){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postComplete=function(_1207){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onComplete=function(_1208){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onPostEntryComplete=function(_1209){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onFault=function(_120a){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onFault not implemented.");
- }
- };
- IRequestHandler.prototype.onPrompting=function(_120b){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPrompting not implemented.");
- }
- };
- IRequestHandler.prototype.onWorking=function(_120c){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onWorking not implemented.");
- }
- };
- IRequestHandler.prototype.setWorkingDialog=function(_120d){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
- }
- };
- IRequestHandler.prototype.setRequestIndicator=function(_120e){
- 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(_1210){
- };
- 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(_1211){
- this.m_oDispatcherEntry=_1211;
- };
- BaseRequestHandler.prototype.getDispatcherEntry=function(){
- return this.m_oDispatcherEntry;
- };
- BaseRequestHandler.prototype.processInitialResponse=function(_1212){
- this.updateViewerState(_1212);
- };
- BaseRequestHandler.prototype.setLogOnDialog=function(_1213){
- if(_1213==null){
- this.m_logOnDialog=null;
- }else{
- if(_1213 instanceof ILogOnDialog){
- this.m_logOnDialog=_1213;
- }else{
- if(_1213&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setWorkingDialog=function(_1214){
- if(_1214==null){
- this.m_workingDialog=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
- this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
- }else{
- if(_1214 instanceof IRequestIndicator){
- this.m_workingDialog=_1214;
- }else{
- if(_1214&&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(_1215){
- if(_1215==null){
- this.m_requestIndicator=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
- this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
- }else{
- if(_1215 instanceof IRequestIndicator){
- this.m_requestIndicator=_1215;
- }else{
- if(_1215&&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(_1216){
- if(_1216==null){
- this.m_faultDialog=null;
- }else{
- if(_1216 instanceof IFaultDialog){
- this.m_faultDialog=_1216;
- }else{
- if(_1216&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setPromptDialog=function(_1217){
- if(_1217==null){
- this.m_promptDialog=null;
- }else{
- if(_1217 instanceof IPromptDialog){
- this.m_promptDialog=_1217;
- }else{
- if(_1217&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.preHttpRequest=function(_1218){
- if(_1218&&typeof _1218.getFormField=="function"){
- if(_1218.getFormField("ui.action")!="wait"&&_1218.getFormField("rapWait")!="true"){
- if(this.m_requestIndicator){
- this.m_requestIndicator.show();
- }
- }
- }
- };
- BaseRequestHandler.prototype.postHttpRequest=function(_1219){
- if(_1219&&typeof _1219.getAsynchStatus=="function"){
- var _121a=_1219.getAsynchStatus();
- if(_121a!="working"&&_121a!="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(_121b){
- 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",_121b);
- }
- return;
- }
- if(!this.m_faultDialog){
- this.m_faultDialog=new FaultDialog(this.getViewer());
- }
- if(_121b&&_121b.getResponseHeader&&_121b.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- this.m_faultDialog.handleUnknownHTMLResponse(_121b.getResponseText());
- }else{
- if(_121b&&_121b.getSoapFault){
- this.m_faultDialog.show(_121b.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _121d=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_faultDialog.show(_121d);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled fault was returned: %o",_121b);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.isAuthenticationFault=function(_121e){
- var oCV=this.getViewer();
- var _1220=null;
- if(_121e&&_121e.getSoapFault){
- _1220=_121e.getSoapFault();
- }else{
- if(oCV.getSoapFault()){
- _1220=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- }
- }
- if(_1220!=null){
- var _1221=XMLHelper_FindChildByTagName(_1220,"CAM",true);
- return (_1221!=null&&XMLHelper_FindChildByTagName(_1221,"promptInfo",true)!=null);
- }
- return false;
- };
- BaseRequestHandler.prototype.onPassportTimeout=function(_1222){
- 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(_1222&&_1222.getResponseHeader&&_1222.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- var _1224="";
- if(_1222.getResponseText){
- _1224=_1222.getResponseText();
- }
- if((_1224.indexOf("http-equiv=\"refresh\"")!=-1)||(_1224.indexOf("http-equiv='refresh'")!=-1)){
- this.m_logOnDialog.show(null);
- }else{
- this.m_logOnDialog.handleUnknownHTMLResponse(_1224);
- }
- }else{
- if(_1222&&_1222.getSoapFault){
- this.m_logOnDialog.show(_1222.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _1225=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_logOnDialog.show(_1225);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_1222);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.onWorking=function(_1226){
- if(this.m_workingDialog){
- var _1227=_1226&&typeof _1226.getAsynchStatus=="function"&&_1226.getAsynchStatus()=="stillWorking"?true:false;
- if(!_1227){
- 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 _122a=oCV.getViewerWidget();
- if(_122a.getLoadManager()){
- _122a.getLoadManager().processQueue();
- }
- }
- };
- BaseRequestHandler.prototype.onPrompting=function(_122b){
- 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"]=_122b;
- window["AsynchRequestPromptDialog"]=this.m_promptDialog;
- var _122d="?cv.id="+oCV.getId();
- window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_122d,400,400);
- window["AsynchRequestPromptDialog"].show();
- };
- BaseRequestHandler.prototype.processDATAReportResponse=function(_122e){
- 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 _1230=_122e.getResponseState();
- if(!_1230){
- this.resubmitInSafeMode();
- }
- if(this.loadReportHTML(_122e.getResult())===false){
- this.resubmitInSafeMode();
- }
- this.updateViewerState(_1230);
- };
- BaseRequestHandler.prototype.updateViewerState=function(_1231){
- var oCV=this.getViewer();
- applyJSONProperties(oCV,_1231);
- var _1233=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(_1233!="fault"){
- if(oCV.envParams["rapReportInfo"]){
- this._processRapReportInfo(oCV);
- }
- if(typeof _1231.clientunencodedexecutionparameters!="undefined"){
- var _1234=document.getElementById("formWarpRequest"+oCV.getId());
- if(_1234!=null&&typeof _1234["clientunencodedexecutionparameters"]!="undefined"){
- _1234["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters;
- }
- if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
- document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters;
- }
- }
- }else{
- oCV.setTracking("");
- }
- };
- BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
- if(oCV.envParams["rapReportInfo"]){
- var _1236=eval("("+oCV.envParams["rapReportInfo"]+")");
- if(typeof RAPReportInfo!="undefined"){
- var _1237=new RAPReportInfo(_1236,oCV);
- oCV.setRAPReportInfo(_1237);
- }
- }
- };
- BaseRequestHandler.prototype.loadReportHTML=function(_1238){
- if(!_1238){
- 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 sHTML=_1238.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
- oCV.m_sHTML=sHTML;
- oCV.setHasPrompts(false);
- var id=oCV.getId();
- var _123c=document.getElementById("RVContent"+id);
- var _123d=document.getElementById("CVReport"+id);
- if(window.gScriptLoader){
- var _123e=oCV.getViewerWidget()?true:false;
- var _123f=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_123d;
- sHTML=window.gScriptLoader.loadCSS(sHTML,_123f,_123e,id);
- }
- if(oCV.sBrowser=="ie"){
- sHTML="<span style='display:none'> </span>"+sHTML;
- }
- _123d.innerHTML=sHTML;
- this.massageHtmlBeforeDisplayed();
- if(window.gScriptLoader){
- var _1240=GUtil.generateCallback(oCV.showLoadedContent,[_123c],oCV);
- oCV.m_resizeReady=false;
- if(!window.gScriptLoader.loadAll(_123d,_1240,id,true)){
- if(window.gScriptLoader.containsAjaxWarnings()){
- return false;
- }
- }
- }else{
- _123c.style.display="block";
- }
- var _1241=document.querySelectorAll("button");
- var _1242=_1241.length;
- for(var k=0;k<_1242;k++){
- var _1244=_1241[k];
- var id=_1244.id;
- var _1245=id.match(/reprompt/);
- if(_1245){
- var _1246=_1244.outerHTML;
- var _1247=_1246.match(/layoutname="\w+"/);
- if(_1247!==null){
- var _1248=_1247[0];
- var _1249=/".*"/;
- var _124a=_1249.exec(_1248);
- if(oCV.getCurrentPromptControlFocus()==_124a){
- _1244.focus();
- oCV.setCurrentPromptControlFocus(null);
- _1244=null;
- }
- }else{
- oCV.setCurrentPromptControlFocus(null);
- _1244=null;
- }
- }
- }
- oCV.updateOutputForA11ySupport();
- this._clearFindState();
- return true;
- };
- BaseRequestHandler.prototype._clearFindState=function(){
- var oCV=this.getViewer();
- var _124c=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
- if(_124c&&!_124c.findOnServerInProgress()){
- oCV.getState().clearFindState();
- }
- };
- BaseRequestHandler.prototype.showReport=function(){
- var oCV=this.getViewer();
- var _124e=document.getElementById("CVReport"+oCV.getId());
- if(_124e){
- _124e.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(_1250){
- if(this.m_httpRequestConfig){
- var _1251=this.m_httpRequestConfig.getReportStatusCallback(_1250);
- if(_1251){
- _1251();
- }
- }
- };
- 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(_1252,_1253){
- var _1254=_1252;
- var _1255=this[_1253];
- this[_1253]=function(_1256){
- _1255.apply(this,arguments);
- var _1257=null;
- if(_1256&&typeof _1256.getAsynchStatus=="function"){
- _1257=_1256.getAsynchStatus();
- }else{
- _1257=_1254=="complete"?this.getViewer().getStatus():_1254;
- }
- if(_1257=="stillWorking"){
- return;
- }
- var _1258=this.m_httpRequestConfig.getReportStatusCallback(_1257);
- if(typeof _1258=="function"){
- setTimeout(_1258,10);
- }
- };
- };
- function ViewerBaseWorkingDialog(_1259){
- if(!_1259){
- return;
- }
- this.setCognosViewer(_1259);
- this.m_oCV=_1259;
- this.m_sNamespace=_1259.getId();
- this.m_sGateway=_1259.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(_125b){
- this.m_bCancelSubmitted=_125b;
- };
- ViewerBaseWorkingDialog.prototype.show=function(){
- var _125c=document.getElementById(this.getContainerId());
- if(_125c){
- _125c.style.display="block";
- this.enableCancelButton();
- }else{
- this.create();
- }
- var _125d=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_125d){
- _125d.style.display="block";
- }
- };
- ViewerBaseWorkingDialog.prototype.create=function(){
- if(typeof document.body!="undefined"){
- if(this.isModal()){
- this.createModalWaitDialog();
- }else{
- this.createInlineWaitDialog();
- }
- }
- };
- ViewerBaseWorkingDialog.prototype.createContainer=function(_125e){
- var _125f=document.createElement("div");
- _125f.setAttribute("id",this.getContainerId());
- _125f.className=_125e?"modalWaitPage":"inlineWaitPage";
- return _125f;
- };
- ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){
- this._createBlocker();
- var _1260=this.createContainer(true);
- _1260.innerHTML=this.renderHTML();
- _1260.style.zIndex="7002";
- _1260.setAttribute("role","region");
- _1260.setAttribute("aria-label",RV_RES.GOTO_WORKING);
- document.body.appendChild(_1260);
- var _1261=this.createModalIframeBackground();
- document.body.appendChild(_1261);
- var _1262=0;
- var iLeft=0;
- if(typeof window.innerHeight!="undefined"){
- _1262=Math.round((window.innerHeight/2)-(_1260.offsetHeight/2));
- iLeft=Math.round((window.innerWidth/2)-(_1260.offsetWidth/2));
- }else{
- _1262=Math.round((document.body.clientHeight/2)-(_1260.offsetHeight/2));
- iLeft=Math.round((document.body.clientWidth/2)-(_1260.offsetWidth/2));
- }
- _1260.style.bottom=_1262+"px";
- _1260.style.left=iLeft+"px";
- _1261.style.left=iLeft-1+"px";
- _1261.style.bottom=_1262-1+"px";
- _1261.style.width=_1260.offsetWidth+2+"px";
- _1261.style.height=_1260.offsetHeight+2+"px";
- };
- ViewerBaseWorkingDialog.prototype._createBlocker=function(){
- var _1264=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_1264){
- return;
- }
- var _1265=document.getElementById("mainViewerTable"+this.m_oCV.getId());
- if(_1265){
- _1264=document.createElement("div");
- _1265.parentNode.appendChild(_1264);
- _1264.id="reportBlocker"+this.m_oCV.getId();
- _1264.style.zIndex="6001";
- _1264.style.position="absolute";
- _1264.style.top="0px";
- _1264.style.left="0px";
- _1264.style.width="100%";
- _1264.style.height="100%";
- _1264.style.display="none";
- _1264.style.opacity="0";
- _1264.style.backgroundColor="#FFFFFF";
- _1264.style.filter="alpha(opacity:0)";
- }
- };
- ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){
- var _1266=this.m_oCV.getId();
- var _1267=document.getElementById("CVReport"+_1266);
- if(_1267){
- var _1268=this.createContainer(false);
- _1268.innerHTML="<table width=\"100%\" height=\"100%\"><tr><td valign=\"middle\" align=\"center\" role=\"presentation\">"+this.renderHTML()+"</td></tr></table>";
- _1267.appendChild(_1268);
- }
- };
- ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){
- var _1269=document.createElement("iframe");
- var _126a="..";
- var oCV=this.getCognosViewer();
- if(oCV!==null){
- _126a=oCV.getWebContentRoot();
- }
- _1269.setAttribute("id",this.getContainerId()+"Iframe");
- _1269.setAttribute("title","Empty iframe");
- _1269.setAttribute("src",_126a+"/common/images/spacer.gif");
- _1269.setAttribute("scrolling","no");
- _1269.setAttribute("frameborder","0");
- _1269.style.position="absolute";
- _1269.style.zIndex="6002";
- _1269.style.display="block";
- return _1269;
- };
- ViewerBaseWorkingDialog.prototype.updateCoords=function(_126c,_126d){
- if(this.m_container!==null&&m_iframeBackground!==null){
- var _126e=0;
- var iLeft=0;
- if(typeof window.innerHeight!="undefined"){
- _126e=Math.round((window.innerHeight/2)-(_126c.offsetHeight/2));
- iLeft=Math.round((window.innerWidth/2)-(_126c.offsetWidth/2));
- }else{
- _126e=Math.round((document.body.clientHeight/2)-(_126c.offsetHeight/2));
- iLeft=Math.round((document.body.clientWidth/2)-(_126c.offsetWidth/2));
- }
- _126c.style.bottom=_126e+"px";
- _126c.style.left=iLeft+"px";
- _126d.style.left=_126c.style.left;
- _126d.style.bottom=_126c.style.bottom;
- _126d.style.width=_126c.offsetWidth+"px";
- _126d.style.height=_126c.offsetHeight+"px";
- }
- };
- ViewerBaseWorkingDialog.prototype.hide=function(){
- var _1270=document.getElementById(this.getContainerId());
- if(_1270){
- _1270.parentNode.removeChild(_1270);
- }
- var _1271=document.getElementById(this.getContainerId()+"Iframe");
- if(_1271){
- _1271.parentNode.removeChild(_1271);
- }
- var _1272=document.getElementById("reportBlocker"+this.m_oCV.getId());
- if(_1272){
- _1272.parentNode.removeChild(_1272);
- }
- };
- ViewerBaseWorkingDialog.prototype.isModal=function(){
- var _1273=this.m_oCV.getId();
- var _1274=document.getElementById("CVReport"+_1273);
- var _1275=true;
- if(_1274&&_1274.innerHTML===""){
- _1275=false;
- }
- return _1275;
- };
- ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_1276){
- };
- ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){
- };
- function FaultDialog(oCV){
- this.m_oCV=oCV;
- };
- FaultDialog.prototype=new IFaultDialog();
- FaultDialog.prototype.show=function(_1278){
- if(typeof console!="undefined"){
- console.log("FaultDialog - an unhandled soap fault was returned: %o",_1278);
- }
- };
- FaultDialog.prototype.handleUnknownHTMLResponse=function(_1279){
- this.m_oCV.setTracking("");
- this.m_oCV.setConversation("");
- if(_1279){
- if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){
- var _127a=document.getElementsByTagName("head")[0];
- var _127b=_1279.match(/<body[^>]*>([\s\S]*)<\/body>/im)[1];
- var _127c=/<script[^>]*>([\s\S]*?)<\/script>/igm;
- var _127d=_127c.exec(_1279);
- while(_127d!=null){
- var _127e=document.createElement("script");
- _127e.type="text/javascript";
- var _127f=_127d[0].match(/src="([\s\S]*?)"/i);
- if(_127f==null){
- _127e.text=_127d[1];
- }else{
- _127e.src=_127f[1];
- }
- _127a.appendChild(_127e);
- _127d=_127c.exec(_1279);
- }
- document.body.innerHTML=_127b;
- }else{
- document.write(_1279);
- }
- }
- };
- function LogOnDialog(oCV){
- this.m_oCV=oCV;
- };
- LogOnDialog.prototype=new ILogOnDialog();
- LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1281){
- if(_1281){
- document.write(_1281);
- }
- };
- LogOnDialog.prototype.show=function(_1282){
- launchLogOnDialog(this.m_oCV.getId(),_1282);
- };
- LogOnDialog.prototype.hide=function(){
- };
- function PromptDialog(oCV){
- this.m_oCV=oCV;
- this.m_dialogImpl=null;
- };
- PromptDialog.prototype=new IPromptDialog();
- PromptDialog.prototype.initialize=function(url,width,_1286){
- this.m_dialogImpl=new CModal("","",document.body,null,null,width,_1286,true,true,false,true,this.m_oCV.getWebContentRoot());
- var _1287=document.getElementById(CMODAL_CONTENT_ID);
- _1287.src=url;
- };
- PromptDialog.prototype.show=function(){
- this.m_dialogImpl.show();
- };
- PromptDialog.prototype.hide=function(){
- this.m_dialogImpl.hide();
- destroyCModal();
- };
- function WorkingDialog(_1288){
- if(_1288){
- this.m_bSimpleWorkingDialog=false;
- this.m_bShowCancelButton=(_1288.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true;
- WorkingDialog.baseConstructor.call(this,_1288);
- this.m_secondaryRequests=_1288.getSecondaryRequests();
- }
- };
- WorkingDialog.prototype=new ViewerBaseWorkingDialog();
- WorkingDialog.baseConstructor=ViewerBaseWorkingDialog;
- WorkingDialog.prototype.setSecondaryRequests=function(_1289){
- this.m_secondaryRequests=_1289;
- };
- 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(bShow){
- var _128c=this.getNamespace();
- var _128d=document.getElementById("DeliveryOptionsVisible"+_128c);
- if(_128d){
- _128d.style.display=(bShow===false?"none":"block");
- if(bShow){
- var links=_128d.getElementsByTagName("a");
- for(var i=links.length;i>0;i--){
- if(links[i]&&links[i].getAttribute("tabIndex")=="0"){
- links[i].focus();
- }
- }
- }
- }
- _128d=document.getElementById("OptionsLinkSelected"+_128c);
- if(_128d){
- _128d.style.display=(bShow===false?"none":"block");
- }
- _128d=document.getElementById("OptionsLinkUnselected"+_128c);
- if(_128d){
- _128d.style.display=(bShow===false?"block":"none");
- }
- };
- WorkingDialog.prototype.renderHTML=function(){
- var _1290=this.getNamespace();
- var _1291=_1290+"_workingMsg "+_1290+"_workingMsg2";
- var html="<table class=\"viewerWorkingDialog\" id=\"CVWaitTable"+_1290+"\""+" role=\"presentation\">";
- html+=("<tr>"+"<td align=\"center\">"+"<div tabIndex=\"0\" role=\"presentation\" aria-labelledby=\""+_1291+"\""+" class=\"body_dialog_modal workingDialogDiv\">");
- html+=this.renderFirstInnerTable();
- html+=this.renderSecondInnerTable();
- html+=("</div>"+"</td>"+"</tr>"+"</table>");
- return html;
- };
- WorkingDialog.prototype.renderFirstInnerTable=function(){
- var _1293=this.getSimpleWorkingDialogFlag();
- var _1294=_1293?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING;
- var _1295=this.m_sNamespace;
- var _1296="<table class=\"workingDialogInnerTable\" role=\"presentation\">"+"<tr>"+"<td valign=\"middle\">";
- var _1297=this.getCognosViewer().getSkin()+"/branding/";
- _1296+="<img src=\""+_1297+"progress.gif\"";
- if(isIE()){
- _1296+=" width=\"48\" height=\"48\" border=\"0\"";
- }
- _1296+=" name=\"progress\"";
- if(isIE()){
- _1296+=" align=\"top\"";
- }
- _1296+=" alt=\"";
- _1296+=_1294;
- _1296+="\"/></td>";
- _1296+="<td width=\"20\"> </td>";
- _1296+="<td style=\"padding-top: 5px;\" class=\"tableText\">";
- _1296+="<span id=\""+_1295+"_workingMsg\">";
- _1296+=_1294;
- _1296+="</span>";
- _1296+="<br/><br/>";
- var _1298=this.getCognosViewer().envParams["cv.responseFormat"];
- if(_1293||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_1298&&("qs"===_1298||"fragment"===_1298))){
- _1296+=RV_RES.RV_PLEASE_WAIT;
- }else{
- var _1299=this.canShowDeliveryOptions();
- if(_1299){
- _1296+=this.optionLinkSelectedDiv();
- _1296+=this.optionLinkUnselectedDiv();
- }else{
- _1296+=RV_RES.RV_PLEASE_WAIT;
- }
- }
- _1296+="</td></tr><tr><td colspan=\"3\"> </td></tr></table>";
- return _1296;
- };
- WorkingDialog.prototype.optionLinkSelectedDiv=function(){
- var _129a="";
- _129a+="<div id=\"OptionsLinkSelected"+this.getNamespace()+"\" style=\"display: none\">";
- _129a+=RV_RES.RV_BUSY_OPTIONS_SELECTED;
- _129a+="</div>";
- return _129a;
- };
- WorkingDialog.prototype.optionLinkUnselectedDiv=function(){
- var _129b="";
- var _129c=this.getNamespace();
- var _129d="window.oCV"+_129c+".getWorkingDialog()";
- _129b+="<div id=\"OptionsLinkUnselected"+_129c+"\">";
- _129b+="<span id=\""+_129c+"_workingMsg2\">";
- _129b+=RV_RES.RV_BUSY_OPTIONS_UNSELECTED;
- _129b+="</span><br/>";
- _129b+="<a href=\"#\" class=\"deliveryOptionLink\" onclick=\"javascript:"+_129d+".showDeliveryOptions(true)\">";
- _129b+=RV_RES.RV_BUSY_OPTIONS_LINK;
- _129b+="</a></div>";
- return _129b;
- };
- WorkingDialog.prototype.canShowDeliveryOptions=function(){
- var _129e=this.getCognosViewer().envParams["ui.primaryAction"];
- if("saveAs"!==_129e&&"email"!==_129e&&this.getIsSavedReport()){
- return true;
- }
- return false;
- };
- WorkingDialog.prototype.isUIBlacklisted=function(item){
- var _12a0=this.getUIBlacklist();
- for(var index in _12a0){
- if(_12a0[index]===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(_12a2){
- var _12a3=this._getSecondaryRequests();
- if(_12a3){
- var _12a4=_12a3.length;
- for(var i=0;i<_12a4;i++){
- if(_12a3[i]==_12a2){
- return true;
- }
- }
- }
- return false;
- };
- WorkingDialog.prototype.renderSecondInnerTable=function(){
- var _12a6="";
- var _12a7=this.getCognosViewer().getWebContentRoot();
- _12a6+="<table width=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">";
- _12a6+="<tr id=\"DeliveryOptionsVisible"+this.getNamespace()+"\" class=\"workingDialogOptions\">";
- _12a6+="<td align=\"left\">";
- _12a6+="<table class=\"workingDialogInnerTable workingDialogLinks\" role=\"presentation\">";
- var _12a8=this.canShowDeliveryOptions();
- if(_12a8&&this.deliverySectionIsNeeded()){
- if(!this._isSaveBlackListed()){
- _12a6+=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()){
- _12a6+=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()){
- _12a6+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);");
- }
- }
- _12a6+="</table></td></tr> ";
- _12a6+="<tr style=\"padding-top: 5px\"> ";
- _12a6+="<td align=\"left\" colspan=\"3\" id=\"cancelButtonContainer"+this.getNamespace()+"\"> ";
- if(this.showCancelButton()){
- _12a6+=this.addCancelButton();
- }
- _12a6+="</td></tr> ";
- _12a6+="</table> ";
- return _12a6;
- };
- WorkingDialog.prototype.addDeliverOption=function(_12a9,sText,_12ab){
- var _12ac="";
- var _12ad=this.getCognosViewer().getWebContentRoot();
- var _12ae="javascript: window.oCV"+this.getNamespace()+".getRV().";
- var _12af=_12ae+_12ab;
- _12ac+="<tr><td> ";
- _12ac+="<a tabIndex=\"-1\" href=\""+_12ab+"\"> ";
- _12ac+="<img border=\"0\" src=\""+_12ad+_12a9+"\" alt=\" "+html_encode(sText)+"\"/></a> ";
- _12ac+="</td><td width=\"100%\" valign=\"middle\" class=\"tableText\"> ";
- _12ac+="<a tabIndex=\"0\" role=\"link\" href=\"#\" onclick=\""+_12af+"\" style=\"padding-left: 5px\" class=\"deliveryOptionLink\"> ";
- _12ac+=(sText+"</a></td></tr>");
- return _12ac;
- };
- WorkingDialog.prototype.addCancelButton=function(){
- var _12b0="";
- var _12b1=this.getCognosViewer().getWebContentRoot();
- _12b0+="<table role=\"presentation\"><tr><td> ";
- _12b0+="<table id=\"cvWorkingDialog"+this.getNamespace()+"\" role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" onmouseover=\"this.className = 'commandButtonOver'\" onmouseout=\"this.className = 'commandButton'\" onmousedown=\"this.className = 'commandButtonDown'\" class=\"commandButton\"> ";
- _12b0+="<tr> ";
- _12b0+="<td valign=\"middle\" align=\"center\" nowrap=\"nowrap\" class=\"workingDialogCancelButton\" ";
- if(isIE()){
- _12b0+="id=\"btnAnchorIE\" ";
- }else{
- _12b0+="id=\"btnAnchor\" ";
- }
- _12b0+="> ";
- var _12b2="window.oCV"+this.m_sNamespace+".cancel(this)";
- _12b0+="<a href=\"#\" onclick=\""+_12b2+"\"> ";
- _12b0+=RV_RES.CANCEL;
- _12b0+="</a> ";
- _12b0+="</td></tr></table></td> ";
- _12b0+="<td><img alt=\"\" height=\"1\" ";
- if(isIE()){
- _12b0+="width=\"10\" ";
- }
- _12b0+="src=\""+_12b1+"/ps/images/space.gif\"/></td> ";
- _12b0+="</tr></table> ";
- return _12b0;
- };
- WorkingDialog.prototype.disableCancelButton=function(_12b3){
- this.cancelButtonDisabled=true;
- var _12b4=document.getElementById("cvWorkingDialog"+this.getNamespace());
- if(_12b4){
- _12b4.style.cursor="default";
- _12b4.className="commandButtonOver";
- _12b4.removeAttribute("onmouseover");
- _12b4.removeAttribute("onmouseout");
- }
- if(_12b3){
- _12b3.removeAttribute("href");
- _12b3.removeAttribute("onclick");
- _12b3.style.cursor="default";
- }
- };
- WorkingDialog.prototype.enableCancelButton=function(){
- if(this.cancelButtonDisabled){
- var _12b5=document.getElementById("cancelButtonContainer"+this.getNamespace());
- if(_12b5){
- _12b5.innerHTML=this.addCancelButton();
- }
- this.cancelButtonDisabled=false;
- }
- };
- WorkingDialog.prototype.getContainerId=function(){
- return "CVWait"+this.getNamespace();
- };
- function RequestExecutedIndicator(_12b6){
- if(_12b6){
- RequestExecutedIndicator.baseConstructor.call(this,_12b6);
- }
- };
- RequestExecutedIndicator.baseConstructor=WorkingDialog;
- RequestExecutedIndicator.prototype=new WorkingDialog();
- RequestExecutedIndicator.prototype.renderHTML=function(){
- var _12b7="<table id=\"CVWaitTable"+this.getNamespace()+"\" requestExecutionIndicator=\"true\" class=\"viewerWorkingDialog\" role=\"presentation\">";
- _12b7+="<tr><td align=\"center\">";
- _12b7+="<div class=\"body_dialog_modal\">";
- _12b7+="<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" style=\"vertical-align:middle; text-align: left;\" role=\"presentation\">";
- _12b7+="<tr><td rowspan=\"2\">";
- _12b7+="<img alt=\""+RV_RES.GOTO_WORKING+"\" src=\""+this.getCognosViewer().getSkin()+"/branding/progress.gif\" style=\"margin:5px;\" width=\"48\" height=\"48\" name=\"progress\"/>";
- _12b7+="</td><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
- _12b7+=RV_RES.GOTO_WORKING;
- _12b7+="</span></td></tr><tr><td nowrap=\"nowrap\"><span class=\"busyUpdatingStr\">";
- _12b7+=RV_RES.RV_PLEASE_WAIT;
- _12b7+="</span></td></tr><tr><td style=\"height:7px;\" colspan=\"2\"></td></tr></table></div></td></tr></table>";
- return _12b7;
- };
- 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(_12b9){
- this.parent.onComplete.call(this,_12b9);
- this.processDATAReportResponse(_12b9);
- this.postComplete();
- };
- RequestHandler.prototype.processInitialResponse=function(_12ba){
- this.parent.processInitialResponse.call(this,_12ba);
- var oCV=this.getViewer();
- var _12bc=oCV.getStatus();
- oCV.setMaxContentSize();
- var _12bd=(oCV.isWorking(_12bc)||_12bc=="default");
- if(_12bd){
- if(oCV.getWorkingDialog()){
- oCV.getWorkingDialog().show();
- }
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
- }else{
- if(_12bc=="fault"){
- oCV.setSoapFault(_12ba.m_sSoapFault);
- oCV.executeCallback("fault");
- }else{
- if(_12ba.status=="cancel"){
- oCV.executeCallback("cancel");
- }else{
- oCV.updateSkipToReportLink();
- if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){
- var _12be=oCV.getPinFreezeManager();
- _12be.fromJSONString(oCV.envParams["pinFreezeInfo"]);
- delete oCV.envParams["pinFreezeInfo"];
- }
- if(_12bc!="prompting"||!oCV.executeCallback("prompt")){
- this.postComplete();
- }else{
- oCV.updateSkipToNavigationLink(true);
- }
- }
- }
- }
- this.showReport();
- this.getViewer().renderTabs();
- this.onAsynchStatusUpdate(_12bc);
- };
- RequestHandler.prototype.postComplete=function(){
- this.parent.postComplete.call(this);
- var oCV=this.getViewer();
- var _12c0=document.getElementById("RVContent"+oCV.getId());
- if(_12c0){
- _12c0.scrollTop=0;
- }
- oCV.updateSkipToReportLink();
- if(oCV.rvMainWnd){
- oCV.updateLayout(oCV.getStatus());
- if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){
- var _12c1=oCV.rvMainWnd.getToolbar();
- if(_12c1){
- oCV.rvMainWnd.updateToolbar(oCV.outputFormat);
- _12c1.draw();
- }
- }
- if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){
- var _12c2=oCV.rvMainWnd.getBannerToolbar();
- if(_12c2){
- _12c2.draw();
- }
- }
- }
- if(oCV.getBrowser()=="moz"){
- if(_12c0){
- if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){
- _12c0.style.overflow="hidden";
- }else{
- _12c0.style.overflow="auto";
- }
- }
- }
- oCV.gbPromptRequestSubmitted=false;
- this.showReport();
- if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
- var _12c3=document.getElementById("CVReport"+oCV.getId());
- if(_12c3){
- setTimeout(function(){
- oCV.getPinFreezeManager().renderReportWithFrozenContainers(_12c3);
- if(isIE()){
- oCV.repaintDiv(_12c0);
- }
- },1);
- }
- }
- oCV.setMaxContentSize();
- oCV.executeCallback("done");
- oCV.doneLoading();
- };
- function ActionFormFields(_12c4){
- this.m_dispatcherEntry=_12c4;
- this.m_oCV=_12c4.getViewer();
- };
- ActionFormFields.prototype.addFormFields=function(){
- var _12c5=this.m_dispatcherEntry;
- var _12c6=_12c5.getAction();
- _12c6.preProcess();
- _12c5.addFormField("ui.action","modifyReport");
- if(this.m_oCV.getModelPath()!==""){
- _12c5.addFormField("modelPath",this.m_oCV.getModelPath());
- if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){
- _12c5.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]);
- }
- }
- if(_12c6.doAddActionContext()===true){
- var _12c7=_12c6.addActionContext();
- _12c5.addFormField("cv.actionContext",_12c7);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Action context",_12c7,"xml");
- }
- }
- var isBux=this.m_oCV.envParams["bux"]=="true";
- if(isBux){
- _12c5.addFormField("cv.showFaultPage","false");
- }else{
- _12c5.addFormField("cv.showFaultPage","true");
- }
- _12c5.addFormField("ui.object",this.m_oCV.envParams["ui.object"]);
- _12c5.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]);
- _12c5.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]);
- _12c5.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]);
- _12c5.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]);
- _12c5.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]);
- _12c5.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]);
- _12c5.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]);
- _12c5.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]);
- _12c5.addNonNullFormField("bux",this.m_oCV.envParams["bux"]);
- _12c5.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]);
- _12c5.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]);
- var _12c9=this.m_oCV.getFlashChartOption();
- if(_12c9!=null){
- _12c5.addFormField("savedFlashChartOption",_12c9);
- if(_12c9&&_12c6!=null&&typeof (_12c6.m_requestParams)!="undefined"&&typeof (_12c6.m_requestParams.targetType)!="undefined"){
- var _12ca=false;
- var _12cb=null;
- if(typeof (_12c6.m_requestParams.targetType.targetType)!="undefined"){
- _12cb=_12c6.m_requestParams.targetType.targetType;
- }else{
- _12cb=_12c6.m_requestParams.targetType;
- }
- if(_12cb.match("v2_")!=null||_12cb.match("_v2")!=null){
- _12ca=true;
- }else{
- var _12cc=this.m_oCV.getRAPReportInfo();
- var _12cd=_12c6.getSelectedReportInfo();
- if(_12cc&&_12cd){
- var _12ce=_12cc.getDisplayTypes(_12cd.container);
- if(_12ce.match("v2_")!=null||_12ce.match("_v2")!=null){
- _12ca=true;
- }
- }
- }
- _12c5.addFormField("hasAVSChart",_12ca);
- }else{
- _12c5.addFormField("hasAVSChart",this.m_oCV.hasAVSChart());
- }
- }
- var sEP=this.m_oCV.getExecutionParameters();
- if(sEP){
- _12c5.addFormField("executionParameters",encodeURIComponent(sEP));
- }
- _12c5.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation()));
- _12c5.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking()));
- var sCAF=this.m_oCV.getCAFContext();
- if(sCAF){
- _12c5.addFormField("ui.cafcontextid",sCAF);
- }
- if(_12c6.forceRunSpecRequest()){
- _12c5.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(_12d1){
- this.m_bUsePageRequest=_12d1;
- };
- ViewerDispatcher.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- ViewerDispatcher.prototype.dispatchRequest=function(_12d2){
- if(this.m_activeRequest==null){
- this.startRequest(_12d2);
- }else{
- if(_12d2.canBeQueued()==true){
- this.m_requestQueue.push(_12d2);
- }else{
- if(window.cognosViewerDebug&&console&&console.warn){
- console.warn("Warning! Dropped a dispatcher entry!");
- }
- }
- }
- };
- ViewerDispatcher.prototype.startRequest=function(_12d3){
- this.m_activeRequest=_12d3;
- if(_12d3!=null){
- _12d3.setUsePageRequest(this.m_bUsePageRequest);
- _12d3.sendRequest();
- }
- };
- ViewerDispatcher.prototype.cancelRequest=function(key){
- for(var i=0;i<this.m_requestQueue.length;i++){
- var _12d6=this.m_requestQueue[i];
- if(_12d6.getKey()===key){
- _12d6.setCallbacks({"onEntryComplete":null});
- _12d6.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(_12d7){
- this.startRequest(this.nextRequest());
- };
- ViewerDispatcher.prototype.nextRequest=function(){
- var _12d8=null;
- if(this.m_requestQueue.length>0){
- _12d8=this.m_requestQueue.shift();
- if(_12d8.getKey()!=null){
- while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12d8.getKey()){
- _12d8=this.m_requestQueue.shift();
- }
- }
- }
- return _12d8;
- };
- 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(_12da){
- this.m_request.setHeaders(_12da);
- };
- DispatcherEntry.prototype.getHeaders=function(){
- return this.m_request.getHeaders();
- };
- DispatcherEntry.prototype.setOriginalFormFields=function(_12db){
- this.m_originalFormFields=_12db;
- };
- DispatcherEntry.prototype.getOriginalFormFields=function(){
- return this.m_originalFormFields;
- };
- DispatcherEntry.prototype.setRequestHandler=function(_12dc){
- _12dc.addCallbackHooks();
- this.m_requestHandler=_12dc;
- };
- DispatcherEntry.prototype.getRequestHandler=function(){
- return this.m_requestHandler;
- };
- DispatcherEntry.prototype.setWorkingDialog=function(_12dd){
- if(this.getRequestHandler()){
- this.m_requestHandler.setWorkingDialog(_12dd);
- }
- };
- DispatcherEntry.prototype.setRequestIndicator=function(_12de){
- if(this.getRequestHandler()){
- this.getRequestHandler().setRequestIndicator(_12de);
- }
- };
- DispatcherEntry.prototype.forceSynchronous=function(){
- this.getRequest().forceSynchronous();
- };
- DispatcherEntry.prototype.setUsePageRequest=function(_12df){
- this.m_bUsePageRequest=_12df;
- };
- DispatcherEntry.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- DispatcherEntry.prototype.setDefaultFormFields=function(){
- var _12e0=this.getViewer().envParams;
- this.addFormField("b_action","cognosViewer");
- this.addFormField("cv.catchLogOnFault","true");
- this.addDefinedNonNullFormField("protectParameters",_12e0["protectParameters"]);
- this.addDefinedNonNullFormField("ui.routingServerGroup",_12e0["ui.routingServerGroup"]);
- this.addDefinedNonNullFormField("cv.debugDirectory",_12e0["cv.debugDirectory"]);
- this.addDefinedNonNullFormField("cv.showFaultPage",_12e0["cv.showFaultPage"]);
- this.addDefinedNonNullFormField("cv.useRAPDrill",_12e0["cv.useRAPDrill"]);
- this.addDefinedNonNullFormField("container",_12e0["container"]);
- this.addNonEmptyStringFormField("cv.objectPermissions",_12e0["cv.objectPermissions"]);
- };
- DispatcherEntry.prototype.getViewer=function(){
- return this.m_oCV;
- };
- DispatcherEntry.prototype.prepareRequest=function(){
- };
- DispatcherEntry.addWidgetInfoToFormFields=function(_12e1,_12e2){
- if(_12e1){
- var _12e3=_12e1.getBUXRTStateInfoMap();
- if(_12e3){
- _12e2.addFormField("cv.buxRTStateInfo",_12e3);
- }
- var _12e4=_12e1.getDisplayName();
- if(_12e4&&_12e4.length>0){
- _12e2.addFormField("displayTitle",_12e4);
- }
- }
- };
- DispatcherEntry.prototype.canBeQueued=function(){
- return this.m_canBeQueued;
- };
- DispatcherEntry.prototype.setCanBeQueued=function(_12e5){
- this.m_canBeQueued=_12e5;
- };
- DispatcherEntry.prototype.getKey=function(){
- return this.m_requestKey;
- };
- DispatcherEntry.prototype.setKey=function(key){
- this.m_requestKey=key;
- };
- DispatcherEntry.prototype.setRequest=function(_12e7){
- this.m_request=_12e7;
- };
- DispatcherEntry.prototype.getRequest=function(){
- return this.m_request;
- };
- DispatcherEntry.prototype.setCallbacks=function(_12e8){
- this.getRequest().setCallbacks(_12e8);
- };
- DispatcherEntry.prototype.getCallbacks=function(){
- return this.getRequest().getCallbacks();
- };
- DispatcherEntry.prototype.sendRequest=function(){
- this.prepareRequest();
- var _12e9=this.getRequest().getFormFields();
- var _12ea=_12e9.keys();
- if(!this.m_originalFormFields){
- this.m_originalFormFields=new CDictionary();
- for(var index=0;index<_12ea.length;index++){
- this.m_originalFormFields.add(_12ea[index],_12e9.get(_12ea[index]));
- }
- }
- this.getRequest().sendRequest();
- };
- DispatcherEntry.prototype.onNewRequest=function(_12ec){
- this.setRequest(_12ec);
- };
- DispatcherEntry.prototype.retryRequest=function(){
- var oCV=this.getViewer();
- oCV.setRetryDispatcherEntry(null);
- var _12ee=this.getRequest().newRequest();
- _12ee.setHeaders(null);
- this.setRequest(_12ee);
- var _12ef=this.m_originalFormFields.keys();
- for(var index=0;index<_12ef.length;index++){
- var _12f1=_12ef[index];
- var _12f2=this.m_originalFormFields.get(_12f1);
- if(_12f1=="cv.responseFormat"&&_12f2=="iWidget"){
- this.addFormField("cv.responseFormat","data");
- }else{
- if(_12f1=="ui.action"&&_12f2=="wait"){
- this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
- }else{
- if(_12f1!="m_tracking"&&_12f1!="cv.outputKey"){
- this.addFormField(_12f1,_12f2);
- }
- }
- }
- }
- 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(_12f3){
- if(!this.m_bCancelCalled){
- this.m_bCancelCalled=true;
- if(this.getRequestHandler()){
- this.getRequestHandler().onCancel();
- }
- if(_12f3){
- 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,value){
- this.m_request.addFormField(name,value);
- };
- DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,value){
- if(typeof value!="undefined"&&value!=null){
- this.addFormField(name,value);
- }
- };
- DispatcherEntry.prototype.addDefinedFormField=function(name,value){
- if(typeof value!="undefined"){
- this.addFormField(name,value);
- }
- };
- DispatcherEntry.prototype.addNonNullFormField=function(name,value){
- if(value!=null){
- this.addFormField(name,value);
- }
- };
- DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,value){
- if(typeof value!="undefined"&&value!=null&&value!=""){
- this.addFormField(name,value);
- }
- };
- DispatcherEntry.prototype.onWorking=function(_1301,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onWorking(_1301);
- }
- };
- DispatcherEntry.prototype.onFault=function(_1303){
- if(this.getRequestHandler()){
- this.getRequestHandler().onFault(_1303);
- }
- };
- DispatcherEntry.prototype.onError=function(_1304){
- if(this.m_bCancelCalled){
- return;
- }
- if(this.getRequestHandler()){
- this.getRequestHandler().onError(_1304);
- }
- };
- DispatcherEntry.prototype.possibleUnloadEvent=function(){
- this.setCallbacks({"error":{}});
- };
- DispatcherEntry.prototype.onPreHttpRequest=function(_1305){
- if(this.getRequestHandler()){
- this.getRequestHandler().preHttpRequest(_1305);
- }
- };
- DispatcherEntry.prototype.onPostHttpRequest=function(_1306){
- if(this.getRequestHandler()){
- this.getRequestHandler().postHttpRequest(_1306);
- }
- };
- DispatcherEntry.prototype.onPassportTimeout=function(_1307){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPassportTimeout(_1307);
- }
- };
- DispatcherEntry.prototype.onPrompting=function(_1308){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPrompting(_1308);
- }
- };
- DispatcherEntry.prototype.onEntryComplete=function(_1309){
- if(!this.m_oCV._beingDestroyed){
- this.m_oCV.getViewerDispatcher().requestComplete(this);
- }
- };
- DispatcherEntry.prototype.onEntryFault=function(_130a){
- this.m_oCV.setFaultDispatcherEntry(this);
- this.m_oCV.resetViewerDispatcher();
- if(!this.m_bCancelCalled){
- this.m_oCV.setRetryDispatcherEntry(this);
- }
- };
- DispatcherEntry.prototype.onCloseErrorDlg=function(){
- var _130b=this.getCallbacks();
- if(_130b["closeErrorDlg"]){
- var _130c=GUtil.generateCallback(_130b["closeErrorDlg"].method,[],_130b["closeErrorDlg"].object);
- _130c();
- }
- };
- DispatcherEntry.prototype.onPostEntryComplete=function(){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPostEntryComplete();
- }
- this.executeCallback("postComplete");
- };
- DispatcherEntry.prototype.executeCallback=function(_130d){
- var _130e=this.getCallbacks();
- if(_130e[_130d]){
- var _130f=(_130e.customArguments)?[this,_130e.customArguments]:[this];
- var _1310=GUtil.generateCallback(_130e[_130d].method,_130f,_130e[_130d].object);
- _1310();
- 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 _1314=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_1314);
- 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 _1316=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_1316);
- 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 _1318=this.getFormField("ui.action");
- var _1319=this.getViewer().getActionState();
- if(_1319!==""&&(_1318=="wait"||_1318=="forward"||_1318=="back")){
- this.addFormField("cv.actionState",_1319);
- }
- var _131a=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
- var _131b=true;
- for(var i=0;i<_131a.length;i++){
- if(_131a[i]==_1318){
- _131b=false;
- break;
- }
- }
- if(_131b){
- 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 _131e=oCV.envParams;
- this.addFormField("cv.id",oCV.getId());
- if(_131e["cv.showFaultPage"]){
- this.addFormField("cv.showFaultPage",_131e["cv.showFaultPage"]);
- }else{
- this.addFormField("cv.showFaultPage","false");
- }
- this.addDefinedNonNullFormField("ui.object",_131e["ui.object"]);
- this.addDefinedNonNullFormField("ui.primaryAction",_131e["ui.primaryAction"]);
- this.addDefinedNonNullFormField("ui.objectClass",_131e["ui.objectClass"]);
- this.addNonEmptyStringFormField("specificationType",_131e["specificationType"]);
- this.addNonEmptyStringFormField("cv.promptForDownload",_131e["cv.promptForDownload"]);
- this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
- this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
- var _131f=oCV.getExecutionParameters();
- this.addNonEmptyStringFormField("executionParameters",_131f);
- var sCAF=oCV.getCAFContext();
- this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
- };
- ReportDispatcherEntry.prototype.onWorking=function(_1321,arg1){
- var _1323=_1321.getResponseState();
- var _1324=this.getRequestHandler();
- if(_1324){
- var _1325=_1324.getWorkingDialog();
- if(_1325&&_1325.setSecondaryRequests&&_1323.m_aSecRequests){
- _1325.setSecondaryRequests(_1323.m_aSecRequests);
- }
- }
- DispatcherEntry.prototype.onWorking.call(this,_1321,arg1);
- if(_1324){
- this.getRequestHandler().updateViewerState(_1323);
- }
- };
- ReportDispatcherEntry.prototype.onComplete=function(_1326,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onComplete(_1326);
- }
- };
- 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 _132a=oCV.envParams;
- this.addFormField("cv.showFaultPage","true");
- this.addDefinedNonNullFormField("cv.header",_132a["cv.header"]);
- this.addDefinedNonNullFormField("cv.toolbar",_132a["cv.toolbar"]);
- this.addDefinedNonNullFormField("ui.backURL",_132a["ui.backURL"]);
- this.addDefinedNonNullFormField("errURL",_132a["ui.backURL"]);
- this.addDefinedNonNullFormField("errURL",_132a["ui.errURL"]);
- this.addDefinedNonNullFormField("cv.catchLogOnFault","true");
- this.addDefinedNonNullFormField("m_sessionConv",_132a["m_sessionConv"]);
- if(_132a["m_session"]){
- this.addFormField("m_session",_132a["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 _132b=this.m_oCV.getPinFreezeManager();
- if(_132b&&_132b.hasFrozenContainers()){
- this.addFormField("pinFreezeInfo",_132b.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 _132c=this.buildRequestForm();
- if(typeof document.progress!="undefined"){
- setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1);
- }
- _132c.submit();
- }else{
- this.getViewer().closeContextMenuAndToolbarMenus();
- this.parent.sendRequest.call(this);
- }
- };
- ViewerDispatcherEntry.prototype.buildRequestForm=function(){
- var oCV=this.getViewer();
- var _132e=document.createElement("form");
- _132e.setAttribute("id","requestForm");
- _132e.setAttribute("name","requestForm");
- _132e.setAttribute("method","post");
- _132e.setAttribute("target","_self");
- _132e.setAttribute("action",oCV.getGateway());
- _132e.style.display="none";
- document.body.appendChild(_132e);
- var _132f=this.getRequest().getFormFields();
- var _1330=_132f.keys();
- for(var index=0;index<_1330.length;index++){
- _132e.appendChild(this.createHiddenFormField(_1330[index],_132f.get(_1330[index])));
- }
- for(param in oCV.envParams){
- if(!_132f.exists(param)&¶m!="cv.actionState"){
- _132e.appendChild(this.createHiddenFormField(param,oCV.envParams[param]));
- }
- }
- return _132e;
- };
- ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,value){
- var _1334=document.createElement("input");
- _1334.setAttribute("type","hidden");
- _1334.setAttribute("name",name);
- _1334.setAttribute("id",name);
- _1334.setAttribute("value",value);
- return (_1334);
- };
- ViewerDispatcherEntry.prototype.onCancel=function(){
- var oCV=this.getViewer();
- oCV.setStatus("complete");
- if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){
- oCV.executeCallback("cancel");
- }
- };
- ViewerDispatcherEntry.prototype.onFault=function(_1336){
- if(this.getViewer().callbackExists("fault")){
- this.getViewer().setSoapFault(_1336.getSoapFault());
- this.getViewer().executeCallback("fault");
- }else{
- this.parent.onFault.call(this,_1336);
- }
- };
- ViewerDispatcherEntry.prototype.onComplete=function(_1337){
- var oCV=this.getViewer();
- oCV.saveBackJaxInformation(_1337);
- if(oCV.isReportRenderingDone()){
- this.getViewer().getSelectionController().resetSelections();
- }
- this.parent.onComplete.call(this,_1337);
- };
- ViewerDispatcherEntry.prototype.onPrompting=function(_1339){
- var oCV=this.getViewer();
- oCV.updateSkipToNavigationLink(true);
- if(!oCV.executeCallback("prompt")){
- this.onComplete(_1339);
- }
- };
- ViewerDispatcherEntry.prototype.onEntryComplete=function(_133b){
- if(this.getRequestHandler()){
- this.getRequestHandler().setDispatcherEntry(this);
- }
- this.parent.onEntryComplete.call(this,_133b);
- };
|