1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979 |
- /*
- *+------------------------------------------------------------------------+
- *| 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.
- *|
- *+------------------------------------------------------------------------+
- */
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Viewer
- *| (C) Copyright IBM Corp. 2013
- *|
- *| US Government Users Restricted Rights - Use, duplication or
- *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *|
- *+------------------------------------------------------------------------+
- */
- if (!RV_RES) {
- var RV_RES = {};
- }
- RV_RES.RV_BROWSER_POPUP_IS_ENABLED = "Your software to block pop-up windows is enabled. Change the settings in your web browser to allow pop-up windows from this website to be displayed.";
- RV_RES.RV_RUNNING = "Your report is running.";
- RV_RES.RV_PLEASE_WAIT = "Please wait...";
- RV_RES.CANCEL = "Cancel";
- RV_RES.IDS_JS_OK = "OK";
- RV_RES.IDS_JS_RETRY = "Retry";
- RV_RES.IDS_JS_DETAILS = "Details";
- RV_RES.RV_BUSY_OPTIONS_SELECTED = "Instead of waiting, you can set it to run in the background with one of the following delivery options:";
- RV_RES.RV_BUSY_OPTIONS_UNSELECTED = "Instead of waiting, you can select a delivery method to run the report in the background.";
- RV_RES.RV_BUSY_OPTIONS_LINK = "Select a delivery method.";
- RV_RES.PRINT_AS_PDF = "Print as PDF";
- RV_RES.COPY = "Copy Widget";
- RV_RES.CUT = "Cut Widget";
- RV_RES.IDS_PRINT_AS_PDF = "Print as PDF";
- RV_RES.RV_EMAIL_REPORT = "Email Report...";
- RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE = "Set the email options dialog";
- RV_RES.RV_SAVE_REPORT = "Save Report";
- RV_RES.RV_SAVE_AS_REPORT_VIEW = "Save as Report View...";
- RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE = "Save as report view dialog";
- RV_RES.RV_RUN = "Run Report";
- RV_RES.RV_VIEW = "View";
- RV_RES.RV_VIEW_HTML = "View in HTML Format";
- RV_RES.RV_VIEW_PDF = "View in PDF Format";
- RV_RES.RV_VIEW_CSV = "View in CSV Format";
- RV_RES.RV_PDF = "PDF";
- RV_RES.RV_CSV = "CSV";
- RV_RES.RV_XML = "XML";
- RV_RES.RV_EXCEL_2000 = "Excel 2000";
- RV_RES.RV_EXCEL_2000SF = "Excel 2000 Single Sheet";
- RV_RES.RV_EXCEL_2002 = "Excel 2002";
- RV_RES.RV_EXCEL_2007 = "Excel 2007";
- RV_RES.RV_EXCEL_2007_DATA = "Excel 2007 Data";
- RV_RES.RV_VIEW_OPTIONS = "View in Excel Options";
- RV_RES.RV_VIEW_EXCEL = "View in Excel 2000 Format";
- RV_RES.RV_VIEW_XML = "View in XML Format";
- RV_RES.RV_VIEW_XLWA = "View in Excel 2002 Format";
- RV_RES.RV_VIEW_SINGLE_EXCEL = "View in Excel 2000 Single Sheet Format";
- RV_RES.RV_VIEW_SPREADSHEETML = "View in Excel 2007 Format";
- RV_RES.RV_VIEW_SPREADSHEETML_DATA = "View in Excel 2007 Data";
- RV_RES.RV_PREVIOUS_REPORT = "Previous Report";
- RV_RES.RV_DRILL_UP = "Drill Up";
- RV_RES.RV_DRILL_DOWN = "Drill Down";
- RV_RES.RV_DRILL_DEFAULT = "Default";
- RV_RES.RV_NEW = "New";
- RV_RES.RV_GO_TO = "Go To";
- RV_RES.RV_MORE = "Related Links...";
- RV_RES.RV_SEARCH = "Search...";
- RV_RES.RV_DOWNLOAD_CHART = "Download Chart";
- RV_RES.RV_ALERT_NEW_VERSION = "Alert Me About New Versions";
- RV_RES.RV_DO_NOT_ALERT_NEW_VERSION = "Do Not Alert Me About New Versions";
- RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM = "You will no longer be alerted when new versions of this report become available.";
- RV_RES.RV_NEW_WATCH_RULE = "Alert Using New Watch Rule...";
- RV_RES.RV_NO_WATCH_RULES = "No entries";
- RV_RES.RV_MODIFY_WATCH_RULE = "Modify...";
- RV_RES.RV_DELETE_WATCH_RULE = "Delete";
- RV_RES.RV_CONFIRM_DELETE_WATCH_RULE = "Are you sure you want to delete this entry?";
- RV_RES.GOTO_LOADING = "Loading...";
- RV_RES.GOTO_WORKING = "Working.";
- RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE = "Add to My Folders dialog";
- RV_RES.RV_VIEW_RECENT_REPORT = "View the most recent report";
- RV_RES.RV_RUN_REPORT = "Run the report";
- RV_RES.RV_VIEW_REPORT = "View the report version";
- RV_RES.RV_NEW_COMMENT = "Add a comment...";
- RV_RES.RV_VIEW_COMMENT_NAME = "Name:";
- RV_RES.RV_VIEW_COMMENT_CONTENTS = "Comment:";
- RV_RES.RV_VIEW_COMMENT_MODTIME = "Modification Time:";
- RV_RES.RV_VIEW_COMMENT_OWNER = "Owner:";
- RV_RES.RV_VIEW_COMMENT = "View";
- RV_RES.RV_ABOUT_DESCRIPTION = "About IBM Cognos Viewer";
- RV_RES.RV_LINEAGE = "Lineage";
- RV_RES.RV_GLOSSARY = "Glossary";
- RV_RES.IDS_JS_CALCULATE = "Calculate";
- RV_RES.IDS_JS_CALCULATION = "Calculation";
- RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE = "% Difference";
- RV_RES.IDS_JS_CALCULATE_NUMBER = "number";
- RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_TITLE = "Enter the number";
- RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_DESCRIPTION = "Specify the number to use in the calculation '{0}'";
- RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER = "Number:";
- RV_RES.IDS_JS_SORT = "Sort";
- RV_RES.IDS_JS_DONT_SORT = "Don't Sort";
- RV_RES.IDS_JS_NOT_SORTED = "Not Sorted";
- RV_RES.IDS_JS_SORT_ASCENDING = "Sort Ascending";
- RV_RES.IDS_JS_SORT_DESCENDING = "Sort Descending";
- RV_RES.IDS_JS_SORT_BY_ASCENDING = "Ascending";
- RV_RES.IDS_JS_SORT_BY_DESCENDING = "Descending";
- RV_RES.IDS_JS_SORT_BY_LABEL = "Sort By Label";
- RV_RES.IDS_JS_SORT_BY_VALUE = "Sort By Value";
- RV_RES.IDS_JS_SORT_APPLIED = "Sort applied";
- RV_RES.IDS_JS_SORTED_BY_LABEL = "Sorted by label";
- RV_RES.IDS_JS_SORTED_BY_VALUE = "Sorted by value";
- RV_RES.IDS_JS_SORT_ASCENDING_ORDER = "ascending";
- RV_RES.IDS_JS_SORT_DESCENDING_ORDER = "descending";
- RV_RES.IDS_JS_FILTER = "Filter";
- RV_RES.IDS_JS_REMOVE_FILTER = "Remove Filter";
- RV_RES.IDS_JS_FILTER_INCLUDE = "Include {0}";
- RV_RES.IDS_JS_FILTER_EXCLUDE = "Exclude {0}";
- RV_RES.IDS_JS_FILTER_GREATER_THAN = ">";
- RV_RES.IDS_JS_FILTER_LESS_THAN = "<";
- RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL = "≥";
- RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL = "≤";
- RV_RES.IDS_JS_FILTER_BETWEEN = "Between {0} and {1}";
- RV_RES.IDS_JS_FILTER_NOT_BETWEEN = "Not between {0} and {1}";
- RV_RES.IDS_JS_FILTER_ENDS_WITH = "ends with";
- RV_RES.IDS_JS_FILTER_BEGINS_WITH = "starts with";
- RV_RES.IDS_JS_FILTER_CONTAINS = "contains";
- RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER = "matches SQL pattern";
- RV_RES.IDS_JS_FILTER_IS_NOT = "not";
- RV_RES.IDS_JS_FILTER_APPLIED = "Filter applied";
- RV_RES.IDS_JS_REMOVE_FILTER_FOR = "Remove filter for";
- RV_RES.IDS_JS_REMOVE_ALL_FILTERS = "Remove all filters";
- RV_RES.IDS_JS_REMOVE_ALL_FILTERS_FOR_WIDGET = "Remove all filters for this widget";
- RV_RES.IDS_JS_DELETE = "Delete";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE = "Change Display Type";
- RV_RES.IDS_JS_ANNOTATIONS = "Comments";
- RV_RES.IDS_JS_ANNOTATION = "Comment";
- RV_RES.IDS_JS_ANNOTATION_WIDGET = "Comment Widget";
- RV_RES.IDS_JS_ANNOTATION_NEW = "Add";
- RV_RES.IDS_JS_ANNOTATION_EDIT = "Edit Last";
- RV_RES.IDS_JS_ANNOTATION_DELETE = "Delete Last";
- RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW = "Add";
- RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT = "Edit Last";
- RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE = "Delete Last";
- RV_RES.IDS_JS_GROUP_UNGROUP = "Group / Ungroup";
- RV_RES.IDS_JS_SWAP_ROWS_AND_COLUMNS = "Swap Rows and Columns";
- RV_RES.IDS_JS_MODAL_BACK_IFRAME = "Empty frame";
- RV_RES.IDS_JS_EMPTY_CELL = "Empty cell";
- RV_RES.IDS_JS_NO_ENABLED_MENU_ITEMS = "No active links in the opened menu.";
- RV_RES.IDS_JS_CHANGE_PALETTE = "Change Color Palette";
- RV_RES.IDS_JS_SELECTION_FILTER_SWITCH = "Turn on Master filter";
- RV_RES.IDS_JS_SELECTION_FILTER_SWITCH_DISABLE = "Turn off Master filter";
- RV_RES.IDS_JS_UNDO = "Undo";
- RV_RES.IDS_JS_REDO = "Redo";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_BAR = "Bar Chart";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_COLUMN = "Column Chart";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LINE = "Line Chart";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE = "Pie Chart";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB = "Crosstab";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST = "List Table";
- RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE = "More...";
- RV_RES.IDS_JS_CHANGE_DISPLAY_RECOMMENDED = "Recommended";
- RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT = "includes {0}";
- RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT = "excludes {0}";
- RV_RES.IDS_JS_INFOBAR_AND_TEXT = "and";
- RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT = "between {0} and {1}";
- RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT = "not between {0} and {1}";
- RV_RES.IDS_JS_INFOBAR_EXPAND = "Expand";
- RV_RES.IDS_JS_INFOBAR_COLLAPSE = "Collapse";
- RV_RES.IDS_JS_INFOBAR_ITEM_COUNT = "{0} of {1}";
- RV_RES.IDS_JS_INFOBAR_EXPLANATION = "Use the up and down arrow keys to review the filters and sorts applied to the report. You can remove sorts and filters with the delete key.";
- RV_RES.IDS_JS_INFOBAR_LOCKED = "cannot be deleted";
- RV_RES.IDS_JS_INFOBAR_PROMPT = "Prompt details";
- RV_RES.IDS_JS_INFOBAR_SLIDER = "Slider filter";
- RV_RES.IDS_JS_ANNO_INFOBAR_SHOW = "Show";
- RV_RES.IDS_JS_ANNO_INFOBAR_HIDE = "Hide";
- RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION = "Filter was applied. Hit tab to focus show/hide button.";
- RV_RES.IDS_JS_COMMENT_DLG_TITLE = "Add Comment";
- RV_RES.IDS_JS_COMMENT_DLG_MESSAGE = "Do you want to save this workspace?";
- RV_RES.IDS_JS_COMMENT_DLG_DETAILS = "You must save the workspace to add comments.";
- RV_RES.IDS_JS_CHANGE_DISPLAY = "Change Display";
- RV_RES.IDS_JS_CHANGE_DISPLAY_SELECT_DATA = "Select data first before changing display";
- RV_RES.IDS_JS_ADVANCED_EDITING = "Do More";
- RV_RES.IDS_JS_RENAME = "Rename";
- RV_RES.IDS_JS_FREEZEROWHEADINGS = "Freeze Row Headings";
- RV_RES.IDS_JS_UNFREEZEROWHEADINGS = "Unfreeze Row Headings";
- RV_RES.IDS_JS_FREEZECOLUMNHEADINGS = "Freeze Column Headings";
- RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS = "Unfreeze Column Headings";
- RV_RES.IDS_JS_EXPAND_MEMBER = "Expand";
- RV_RES.IDS_JS_COLLAPSE_MEMBER = "Collapse";
- RV_RES.IDS_JS_RENAMED_ITEM = "Renamed item";
- RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL = "Original label :";
- RV_RES.IDS_JS_MOVE = "Move";
- RV_RES.IDS_JS_LEFT = "Left";
- RV_RES.IDS_JS_RIGHT = "Right";
- RV_RES.IDS_JS_CROSSTAB_CORNER = "Crosstab Corner";
- RV_RES.IDS_JS_RENAME_LABEL = "Rename type and text";
- RV_RES.IDS_JS_LOADING_EDITING_TOOLS = "Loading additional actions";
- RV_RES.IDS_JS_DRILL_DOWN_JAWS = "Drill down available.";
- RV_RES.IDS_JS_DRILL_UP_JAWS = "Drill up available.";
- RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS = "Drill down and up available.";
- RV_RES.IDS_JS_DRILL_THROUGH_JAWS = "Drill through available.";
- RV_RES.IDS_JS_RESET_TO_ORIGINAL = "Reset";
- RV_RES.IDS_JS_WIDGET_PROPERTIES = "Set Properties";
- RV_RES.IDS_JS_REPORT_INFO_TITLE = "Info";
- RV_RES.IDS_JS_REPORT_INFO_TEXT = "A new version of this report is available.";
- RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT = "Get new version";
- RV_RES.IDS_JS_VIEW_ALL_SNAPSHOTS = "More...";
- RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_TITLE = "Report Versions";
- RV_RES.IDS_JS_SNAPSHOTS_LIVE = "Live";
- RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_DESC = "Select a different version of this report.";
- RV_RES.IDS_JS_MOST_RECENT_SNAPSHOT = "Most Recent";
- RV_RES.IDS_JS_LIST_SEPARATOR = ",";
- RV_RES.IDS_JS_CHART_IMAGE = "Chart image";
- RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE = "Maximum number of rows to show per page (maximum: 1000):";
- RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR = "This value is out of range.";
- RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD = "Prompt when workspace is opened (prompted reports only)";
- RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON = "Enable expand and collapse controls";
- RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT = "Retrieve entire report (saved output only)";
- RV_RES.IDS_JS_PROPERTY_DRILL_OPTIONS_LABEL = "Drill options:";
- RV_RES.IDS_JS_PROPERTY_ADD_SUMMARY_MEMBERS = "Add summary members";
- RV_RES.IDS_JS_PROPERTY_BACKWARDS_COMPATIBLE = "Backwards compatible";
- RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION = "Location:";
- RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE = "Unavailable";
- RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION = "Output Version:";
- RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE = "Unavailable";
- RV_RES.IDS_JS_CALCULATION_SELECT_DATA = "Select data first before calculating";
- RV_RES.IDS_JS_PROPERTY_FLASHCHARTS = "Enable chart animation for applicable charts";
- RV_RES.IDS_JS_SHOW_REPORT_SPEC = "View report specification";
- RV_RES.IDS_JS_ANNOTATION_JAWS = "Comments are available";
- RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED = "Label has been renamed";
- RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING = "Do you want to reset the widget to the most recent available version?";
- RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING_DESC = "Reset replaces the widget content and any changes are lost.";
- RV_RES.IDS_JS_CHART_TABLE = "Table";
- RV_RES.IDS_JS_CHART_CROSSTAB = "Crosstab";
- RV_RES.IDS_JS_CHART_LIST_TABLE = "List Table";
- RV_RES.IDS_JS_CHART_COLUMN = "Column";
- RV_RES.IDS_JS_CHART_COLUMN_3D = "Column with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_STACKED_COLUMN = "Stacked Column";
- RV_RES.IDS_JS_CHART_STACKED_COLUMN_3D = "Stacked Column with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN = "100% Stacked Column";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN_3D = "100% Stacked Column with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_3D_AXIS_COLUMN = "3-D Axis Column";
- RV_RES.IDS_JS_CHART_BAR = "Bar";
- RV_RES.IDS_JS_CHART_BAR_3D = "Bar with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_STACKED_BAR = "Stacked Bar";
- RV_RES.IDS_JS_CHART_STACKED_BAR_3D = "Stacked Bar with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR = "100% Stacked Bar";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR_3D = "100% Stacked Bar with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_LINE = "Line";
- RV_RES.IDS_JS_CHART_LINE_WITH_MARKERS = "Line with Markers";
- RV_RES.IDS_JS_CHART_LINE_3D = "Line with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_LINE_WITH_3D_MARKERS = "Line with 3-D Visual Effect Markers";
- RV_RES.IDS_JS_CHART_STEP_LINE_MARKERS = "Step Line with Markers";
- RV_RES.IDS_JS_CHART_STEP_LINE = "Step Line";
- RV_RES.IDS_JS_CHART_STEP_LINE_3D = "Step Line with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_STACKED_LINE_MARKERS = "Stacked Line with Markers";
- RV_RES.IDS_JS_CHART_STACKED_LINE = "Stacked Line";
- RV_RES.IDS_JS_CHART_STACKED_LINE_3D = "Stacked Line with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE_MARKERS = "100% Stacked Line with Markers";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE = "100% Stacked Line";
- RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE__3D = "100% Stacked Line with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_3D_AXIS_LINE = "3-D Axis Line";
- RV_RES.IDS_JS_CHART_PIE_DONUT = "Pie, Donut";
- RV_RES.IDS_JS_CHART_PIE = "Pie";
- RV_RES.IDS_JS_CHART_DONUT = "Donut";
- RV_RES.IDS_JS_CHART_PIE_3D = "Pie with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_DONUT_3D = "Donut with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_AREA = "Area";
- RV_RES.IDS_JS_CHART_AREA_3D = "Area with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_STACKED_AREA = "Stacked Area";
- RV_RES.IDS_JS_CHART_STACKED_AREA_3D = "Stacked Area with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_PERCENT_AREA = "100% Stacked Area";
- RV_RES.IDS_JS_CHART_PERCENT_AREA_3D = "100% Stacked Area with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_3D_AXIS_AREA = "3-D Axis Area";
- RV_RES.IDS_JS_CHART_SCATTER_BUBBLE_POINT = "Scatter, Bubble, Point";
- RV_RES.IDS_JS_CHART_SCATTER = "Scatter";
- RV_RES.IDS_JS_CHART_BUBBLE = "Bubble";
- RV_RES.IDS_JS_CHART_BUBBLE_3D = "Bubble with 3-D Visual Effect";
- RV_RES.IDS_JS_CHART_BUBBLE_WITH_EXCEL_BUBBLE_SIZING = "Bubble with Excel Bubble Sizing";
- RV_RES.IDS_JS_CHART_POINT = "Point";
- RV_RES.IDS_JS_CHART_POINT_3D = "Point with 3-D Markers";
- RV_RES.IDS_JS_CHART_3D_SCATTER = "3-D Scatter";
- RV_RES.IDS_JS_CHART_GAUGE = "Gauge";
- RV_RES.IDS_JS_CHART_DIAL_GAUGE = "Dial Gauge";
- RV_RES.IDS_BROWSER_SUPPORT_ERROR = "The content cannot be displayed in the current web browser. Try using another web browser.";
- RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR = "The content cannot be saved. You do not have sufficient privileges.";
- RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR = "Cannot load annotations. The widget or workspace was deleted after this workspace was opened.";
- RV_RES.IDS_JS_NULL = "Null";
- RV_RES.IDS_JS_GLOBAL_PROMPTS_NOT_RESPONDING_WARNING = "To prevent unexpected results, this widget is not currently responding to prompts.\n\nSet the prompts you want this widget to respond to using the Listen for Widget Events.";
- RV_RES.IDS_JS_WAIT_PAGE_LOADING = "Loading...";
- RV_RES.IDS_JS_ERROR = "Error";
- RV_RES.IDS_JS_READY = "Ready";
- RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Report";
- RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Active Report";
- RV_RES.IDS_CONV_CANCELED_ERROR = "Cannot complete your request.";
- RV_RES.IDS_JS_CLIPBOARD = "Clipboard";
- RV_RES.IDS_JS_NO_SAVED_OUTPUTS = "There are no available saved report output versions.";
- RV_RES.UNAVAILABLE = "Unavailable";
- RV_RES.IDS_PROP_LEGAL = "Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation and other(s) 2001, 2016. IBM, the IBM logo, ibm.com and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. A current list of IBM trademarks is available on the Web at www.ibm.com/legal/copytrade.shtml. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Other product and service names might be trademarks of IBM or other companies. This Program is licensed under the terms of the license agreement accompanying the Program. This license agreement may be either located in a Program directory folder or library identified as \"License\" or \"Non_IBM_License\", if applicable, or provided as a printed license agreement. Please read the agreement carefully before using the Program. By using the Program you agree to these terms.";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TITLE = "Business Processes";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_DESC = "Select a process:";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TABLE_HEADER = "Process";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_START_BUTTON_LABEL = "Start";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS = "None";
- RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS_A11Y = "No process is available";
- RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_LINK_LABEL = "View input values";
- RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_DESCRIPTION = "Input values:";
- RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DATA_ITEM = "Data item";
- RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DISPLAY_VALUE_HEADER = "Display value";
- RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_NO_INPUT_VALUE_MSG = "No input value selected";
- RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG = "The process, {0}, failed to start.";
- RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG = "The process, {0}, started successfully.";
- RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_DETAIL = "To view the status of the process, open your business process application.";
- RV_RES.IDS_JS_BUSINESS_PROCESS_GET_PROCESSES_FAIL_MSG = "An error had occured while trying to get processes.";
- RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_TITLE = "Start process";
- RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_A11Y_DESC_VALUE = "value";
- RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_WITH_NO_BUA = "Some data referenced in the report no longer exists. Contact the report author.";
- RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_FOR_SPEC_PARAM = "Some data referenced in the report no longer exists. The affected report areas are report specification and parameter value. Click Edit to update the referenced data now. You can also click Close to dismiss this message.";
- RV_RES.IDS_JS_EDIT = "Edit";
- RV_RES.IDS_JS_CLOSE = "Close";
- RV_RES.IDS_JS_ERROR_INVALID_INT = "Page number provided is not a positive integer.";
- RV_RES.IDS_JS_ERROR_REPORT_NOT_COMPLETE = "Report status is not complete.";
- RV_RES.IDS_JS_ERROR_INVALID_PAGE_RANGE = "Page range is invalid.";
- RV_RES.IDS_JS_CWA_DIALOG_TITLE = "Report - Design";
- RV_RES.IDS_JS_SAVE_AS_FDG_TITLE = "Save As";
- RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS = "Filter applied to related widgets.";
- RV_RES.IDS_JS_A11Y_DYNAMIC_MENU = "Dynamic menu";
- 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 CSelectionDefaultStyles(_15d){
- this.m_primarySelectionColor=null;
- this.m_highContrastBorderStyle="solid";
- this.m_secondarySelectionIsDisabled=false;
- if(_15d){
- this.m_selectionController=_15d;
- this.m_oCognosViewer=_15d.m_oCognosViewer;
- if(this.m_oCognosViewer){
- var _15e=this.m_oCognosViewer.getUIConfig();
- if(_15e){
- if(_15e.getPrimarySelectionColor()){
- this.m_primarySelectionColor=_15e.getPrimarySelectionColor();
- }
- if(!_15e.getShowSecondarySelection()){
- this.m_secondarySelectionIsDisabledConfig=true;
- }else{
- if(_15e.getSeondarySelectionColor()){
- this.m_secondarySelectionColor=_15e.getSeondarySelectionColor();
- }
- }
- }
- }
- }
- };
- CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_15f){
- return this.m_primarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){
- return this.m_secondarySelectionColor;
- };
- CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){
- return this.m_highContrastBorderStyle;
- };
- CSelectionDefaultStyles.prototype.canApplyToSelection=function(_160){
- return true;
- };
- CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){
- return this.m_secondarySelectionIsDisabled;
- };
- CSelectionDefaultStyles.prototype.setStyleForSelection=function(){
- };
- function CSelectionFilterStyles(_161){
- this.m_selectionController=_161;
- 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(_162){
- 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(_163){
- return !this.selectionHasOnlyMeasure(_163);
- };
- CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_164){
- return (_164.length===1&&_164[0].length===1&&this.m_selectionController.isMeasure(_164[0][0]));
- };
- CSelectionFilterStyles.prototype.setStyleForSelection=function(_165){
- this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_165))?null:this.m_primarySelectionFilterColor;
- };
- function CSelectionFilterContextMenuStyles(_166){
- CSelectionDefaultStyles.call(this,_166);
- 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(_167){
- var _168=this.getDataItems();
- var item="";
- if(_168&&_168[0]&&_168[0][0]){
- item=this.getDataItems()[0][0];
- if(_167&&_167.itemInfo&&_167.itemInfo.length){
- var _16a=_167.itemInfo;
- for(var i=0;i<_16a.length;i++){
- if(_16a[i].item===item&&_16a[i].itemLabel){
- return _16a[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 _16e=this.m_contextIds[i][j];
- this.m_aDataItems[this.m_aDataItems.length-1].push(this.m_selectionController.isContextId(_16e)?this.m_selectionController.getRefDataItem(_16e):"");
- }
- }
- }
- 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 _171=this.m_contextIds[i][j];
- this.m_aUseValues[this.m_aUseValues.length-1].push(this.m_selectionController.isContextId(_171)?this.m_selectionController.getUseValue(_171):"");
- }
- }
- }
- 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 _174=this.m_contextIds[i][j];
- this.m_aMuns[this.m_aMuns.length-1].push(this.m_selectionController.isContextId(_174)?this.m_selectionController.getMun(_174):"");
- }
- }
- }
- 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 _177=this.m_contextIds[i][j];
- this.m_aRefQueries[this.m_aRefQueries.length-1].push(this.m_selectionController.isContextId(_177)?this.m_selectionController.getRefQuery(_177):"");
- }
- }
- }
- return this.m_aRefQueries;
- };
- CSelectionObject.prototype.getDimensionalItems=function(_178){
- var _179=[];
- this.fetchContextIds();
- for(var i=0;i<this.m_contextIds.length;++i){
- _179[_179.length]=[];
- for(var j=0;j<this.m_contextIds[i].length;++j){
- var _17c=this.m_contextIds[i][j];
- var _17d="";
- if(this.m_selectionController.isContextId(_17c)){
- switch(_178){
- case "hun":
- _17d=this.m_selectionController.getHun(_17c);
- break;
- case "lun":
- _17d=this.m_selectionController.getLun(_17c);
- break;
- case "dun":
- _17d=this.m_selectionController.getDun(_17c);
- break;
- }
- }
- _179[_179.length-1].push(_17d);
- }
- }
- return _179;
- };
- 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 _180=this.m_contextIds[i][j];
- var _181="";
- if(this.m_selectionController.isContextId(_180)){
- var sLun=this.m_selectionController.getLun(_180);
- var sHun=this.m_selectionController.getHun(_180);
- if(sLun&&sLun!=""){
- _181=sLun;
- }else{
- if(sHun&&sHun!=""){
- _181=sHun;
- }else{
- _181=this.m_selectionController.getQueryModelId(_180);
- }
- }
- }
- this.m_aMetadataItems[this.m_aMetadataItems.length-1].push(_181);
- }
- }
- }
- 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 _186=this.m_contextIds[i][j];
- this.m_aDrillOptions[this.m_aDrillOptions.length-1].push(this.m_selectionController.isContextId(_186)?this.m_selectionController.getDrillFlag(_186):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 _187=[];
- for(var i=0;i<this.m_contextIds.length;i++){
- for(var j=0;j<this.m_contextIds[i].length;j++){
- _187.push(this.m_contextIds[i][j]);
- }
- }
- this.m_selectionController.fetchContextData(_187);
- 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 _18d=this.getCellRef().className;
- if(_18d&&(_18d=="xm"||_18d.indexOf("xm ")!=-1||_18d.indexOf(" xm")!=-1)){
- return true;
- }
- return false;
- };
- CSelectionObject.prototype.getDataContainerType=function(){
- return this.m_dataContainerType;
- };
- CSelectionObject.prototype.getContextJsonObject=function(_18e,_18f){
- if(this.m_oJsonContext===null){
- var _190={};
- var _191=[];
- var _192=null;
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return null;
- }
- var i=0,j=0;
- var _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e);
- _192=_195;
- this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191);
- j++;
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e);
- if(!_192){
- _192=_195;
- }
- this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191);
- }
- }
- this.m_oJsonContext=this._createGenericPayloadStructureJson(_192,_190,_191,_18f);
- }
- return this.m_oJsonContext;
- };
- CSelectionObject.prototype._getBestPossibleItemName=function(_196,_197,_198){
- var _199=null;
- if(_198.isMeasure(_197)){
- if(!_198.isValidColumnTitle(this.m_oCellRef)){
- if(!_198.isRelational([_197])){
- _199=_198.getCCDManager().GetBestPossibleDimensionMeasureName(_197);
- }
- return (_199)?_199:_196;
- }
- }
- _199=_198.getCCDManager().GetBestPossibleItemName(_197);
- return (_199)?_199:_196;
- };
- 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(_19a,_19b,_19c,mun,_19e,_19f){
- if(_19e&&_19f&&_19a&&typeof _19e[_19a]=="undefined"){
- var _1a0=_19c?_19c:_19b;
- _19e[_19a]=[_1a0];
- var _1a1={};
- if(_19c){
- _1a1["caption"]=_19c;
- }
- if(mun){
- _1a1["mun"]=mun;
- }
- if(_19b){
- _1a1["use"]=_19b;
- }
- _19f.push(_1a1);
- }
- };
- CSelectionObject.prototype._createGenericPayloadStructureJson=function(_1a2,_1a3,_1a4,_1a5){
- if(_1a2&&_1a3&&_1a4){
- var _1a6=(_1a5)?_1a5:".";
- var _1a7={};
- _1a7[_1a6]={"values":_1a4};
- var obj={"com.ibm.widget.context":{"values":_1a3},"com.ibm.widget.context.report.select":{"select":{"selectedItem":_1a2,"itemSpecification":_1a7}}};
- return obj;
- }
- return null;
- };
- CSelectionObject.prototype.populateSelectionPayload=function(_1a9,_1aa,_1ab){
- this.getDataItems();
- this.getUseValues();
- if(this.m_contextIds.length==0){
- return false;
- }
- _1ab=((_1ab===undefined)?false:_1ab);
- var _1ac=this.m_selectionController;
- for(var i=0,j=0;i<this.m_aDataItems.length;i++,j=0){
- var _1af=(_1ab?1:this.m_aDataItems[i].length);
- for(;j<_1af;j++){
- if(!_1ac.isMeasure(this.m_contextIds[i][j])){
- var _1b0=this.m_aDataItems[i][j];
- this._populateItemInSelectionPayload(_1b0,this.m_aUseValues[i][j],_1ac.getDisplayValue(this.m_contextIds[i][j]),_1ac.getMun(this.m_contextIds[i][j]),_1a9,_1aa);
- }
- }
- }
- return true;
- };
- CSelectionObject.prototype._populateItemInSelectionPayload=function(_1b1,_1b2,_1b3,mun,_1b5,_1b6){
- if(_1b5&&_1b1){
- var _1b7=_1b2?_1b2:_1b3;
- if(_1b5[_1b1]){
- _1b5[_1b1].push(_1b7);
- }else{
- _1b5[_1b1]=[_1b7];
- }
- var _1b8={};
- _1b8["caption"]=_1b7;
- if(mun){
- _1b8["mun"]=mun;
- }
- var _1b9=_1b6[_1b1];
- if(!_1b9){
- _1b9={"values":[]};
- _1b6[_1b1]=_1b9;
- }
- _1b9.values.push(_1b8);
- }
- };
- 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(_1ba,_1bb){
- if(!this.m_oJsonForMarshal){
- var _1bc={};
- var _1bd=[];
- var _1be=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 _1c1=false;
- do{
- for(;j<this.m_contextIds[i].length;j++){
- if(this.m_contextIds[i][j].length>0){
- _1c1=true;
- break;
- }
- }
- if(!_1c1){
- j=0;
- i++;
- }
- }while(!_1c1);
- }
- var _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba);
- var _1c3=_1ba.isMeasure(this.m_contextIds[i][j]);
- var _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager());
- var _1c5=_1ba.getCCDManager().GetQuery(this.m_contextIds[i][j]);
- var _1c6=this.isDataValueOrChartElement();
- var _1c7=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]),_1c6);
- j++;
- var _1c8=[];
- for(;i<this.m_aDataItems.length;i++,j=0){
- for(;j<this.m_aDataItems[i].length;j++){
- _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba);
- _1c3=_1ba.isMeasure(this.m_contextIds[i][j]);
- _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager());
- var _1c9=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]));
- if(_1c9){
- _1c8.push(_1c9);
- }
- }
- }
- var lid=(typeof this.getArea=="function")?getImmediateLayoutContainerId(this.getArea()):getImmediateLayoutContainerId(this.getCellRef());
- if(lid&&lid.indexOf(_1bb)>0){
- lid=lid.substring(0,lid.indexOf(_1bb)-1);
- }
- this.m_oJsonForMarshal={"lid":lid,"query":_1c5,"selectedItem":_1c7,"context":_1c8};
- }
- return this.m_oJsonForMarshal;
- };
- CSelectionObject.prototype._populateJsonForMarshal=function(_1cb,_1cc,_1cd,_1ce,_1cf,mun,_1d1){
- if(_1cb){
- var _1d2={};
- _1d2["itemName"]=_1cb;
- _1d2["isMeasure"]=_1cd?"true":"false";
- _1d2["mdProperty"]=_1cc.mdProperty;
- _1d2["mdValue"]=_1cc.mdValue;
- _1d2["isDataValueOrChartElement"]=_1d1?"true":"false";
- if(mun){
- _1d2["mun"]=mun;
- }
- if(_1ce){
- _1d2["use"]=_1ce;
- }
- return _1d2;
- }
- return null;
- };
- CSelectionObject.prototype._getBestPossibleItemReference=function(_1d3,_1d4,_1d5){
- var _1d6=null;
- var _1d7=null;
- if(_1d4){
- _1d7="i";
- _1d6=_1d5.GetQMID(_1d3);
- if(_1d6==null){
- _1d7="m";
- _1d6=_1d5.GetMUN(_1d3);
- }
- if(_1d6==null){
- _1d7="r";
- _1d6=_1d5.GetRDIValue(_1d3);
- }
- }else{
- _1d7="l";
- _1d6=_1d5.GetLUN(_1d3);
- if(_1d6==null){
- _1d7="h";
- _1d6=_1d5.GetHUN(_1d3);
- }
- if(_1d6==null){
- _1d7="i";
- _1d6=_1d5.GetQMID(_1d3);
- }
- if(_1d6==null){
- _1d7="r";
- _1d6=_1d5.GetRDIValue(_1d3);
- }
- }
- return {"mdProperty":_1d7,"mdValue":_1d6};
- };
- 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(_1d8){
- var _1d9=this.m_selectionController.getSelectedChartImageFromChartArea(_1d8);
- if(_1d9){
- this.m_selectedVizChart=_1d9.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(_1da){
- this.m_chartCtxAreas=_1da;
- };
- CSelectionChartObject.prototype.getCtxAttributeString=function(){
- return this.m_context;
- };
- function CChartHelper(_1db,_1dc,_1dd){
- var _1de=_1db.parentNode;
- this.m_selectionObjectFactory=_1dc;
- this.m_map=_1de;
- _1dd.loadExtra();
- this.imageMapHighlighter=new CImageMapHighlight(_1de,_1dd.sWebContentRoot);
- this.initialize();
- };
- CChartHelper.prototype.initialize=function(){
- this.buildMapCtxAreas();
- this.m_chartCtxNodes={};
- };
- CChartHelper.prototype.buildMapCtxAreas=function(){
- var _1df={};
- var _1e0=this.m_map.childNodes;
- var _1e1=_1e0.length;
- var _1e2=null;
- for(var i=0;i<_1e1;i++){
- var a=_1e0[i];
- _1e2=a.getAttribute("ctx");
- if(_1e2){
- if(_1df[_1e2]){
- _1df[_1e2].push(a);
- }else{
- _1df[_1e2]=[a];
- }
- }
- }
- this.m_ctxAreas=_1df;
- };
- CChartHelper.prototype.getChartNode=function(_1e5){
- if(!this.isAreaInitialized(_1e5)){
- var _1e6=_1e5.parentNode;
- this.m_map=_1e6;
- this.initialize();
- this.imageMapHighlighter.initialize(_1e6);
- }
- var _1e7=_1e5.getAttribute("ctx");
- if(!this.m_chartCtxNodes[_1e7]){
- this.m_chartCtxNodes[_1e7]=this.m_selectionObjectFactory.getSelectionChartObject(_1e5);
- this.m_chartCtxNodes[_1e7].setCtxAreas(this.m_ctxAreas[_1e7]);
- }
- return this.m_chartCtxNodes[_1e7];
- };
- CChartHelper.prototype.isAreaInitialized=function(_1e8){
- return this.imageMapHighlighter.isAreaInitialized(_1e8);
- };
- CChartHelper.prototype.getImageMapHighlighter=function(){
- return this.imageMapHighlighter;
- };
- function CSelectionObjectFactory(_1e9){
- this.m_selectionController=_1e9;
- };
- CSelectionObjectFactory.prototype.getSelectionController=function(){
- return this.m_selectionController;
- };
- CSelectionObjectFactory.prototype.getChildSpans=function(_1ea){
- var _1eb=[];
- for(var i=0;i<_1ea.childNodes.length;i++){
- var _1ed=_1ea.childNodes[i];
- if(!_1ed.getAttribute||_1ed.getAttribute("skipSelection")!="true"){
- _1eb.push(_1ea.childNodes[i]);
- }
- }
- var _1ee=_1ea;
- var _1ef="";
- while(!_1ef&&_1ee){
- _1ef=_1ee.attributes?_1ee.attributes["LID"]:"";
- _1ee=_1ee.parentNode;
- }
- _1ef=_1ef?_1ef.value:"";
- var _1f0=[];
- while(_1eb.length>0){
- var _1ed=_1eb.pop();
- var lid=_1ed.attributes?_1ed.attributes["LID"]:"";
- lid=lid?lid.value:"";
- if(!lid||lid==_1ef){
- if(_1ed.nodeName.toLowerCase()=="span"){
- _1f0.push(_1ed);
- }else{
- for(i=0;i<_1ed.childNodes.length;i++){
- _1eb.push(_1ed.childNodes[i]);
- }
- }
- }
- }
- return _1f0;
- };
- CSelectionObjectFactory.prototype.getSelectionObject=function(_1f2,_1f3){
- var _1f4=new CSelectionObject();
- try{
- _1f4.setSelectionController(this.getSelectionController());
- _1f4.m_oCellRef=_1f2;
- _1f4.m_sColumnRef=_1f2.getAttribute("cid");
- _1f4.m_sCellTypeId=_1f2.getAttribute("uid");
- _1f4.m_sLayoutType=_1f2.getAttribute("type");
- _1f4.m_sTag=_1f2.getAttribute("tag");
- _1f4.m_layoutElementId=this.getLayoutElementId(_1f2);
- _1f4.m_dataContainerType=this.getContainerType(_1f2);
- if(typeof cf!="undefined"){
- var _1f5=cf.cfgGet("MiniQueryObj");
- if(_1f5){
- var _1f6=_1f5.findChildWithAttribute("tag",_1f4.m_sTag);
- if(_1f6&&_1f6.getAttribute("id")!=null){
- _1f4.m_sColumnName=_1f6.getAttribute("id");
- }
- }
- }
- var _1f7=this.getChildSpans(_1f2);
- if(_1f7.length>0){
- for(var i=0;i<_1f7.length;i++){
- var _1f9=_1f7[i];
- if(_1f9.nodeType==1&&_1f9.nodeName.toLowerCase()=="span"&&_1f9.style.visibility!="hidden"){
- var _1fa=null;
- if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""){
- _1fa=_1f2;
- }else{
- if(_1f9.getAttribute("ctx")!=null&&_1f9.getAttribute("ctx")!=""){
- _1fa=_1f9;
- }else{
- if(_1f9.getAttribute("dtTargets")&&_1f9.childNodes&&_1f9.childNodes.length){
- for(var _1fb=0;_1fb<_1f9.childNodes.length;_1fb++){
- if(_1f9.childNodes[_1fb].nodeType==1&&_1f9.childNodes[_1fb].style.visibility!="hidden"){
- _1fa=_1f9.childNodes[_1fb];
- }
- }
- }else{
- for(var _1fc=0;_1fc<_1f9.childNodes.length;_1fc++){
- var _1fd=_1f9.childNodes[_1fc];
- if(typeof _1fd.getAttribute!="undefined"&&_1fd.getAttribute("ctx")!=null&&_1fd.getAttribute("ctx")!=""){
- _1fa=_1fd;
- break;
- }
- }
- }
- }
- }
- var _1fe="";
- if(_1fa&&_1fa.getAttribute("ctx")){
- _1fe=_1fa.getAttribute("ctx");
- }
- _1f4.m_aDisplayValues[_1f4.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_1fe,_1f2.parentNode);
- if(typeof _1f3!="undefined"&&_1f3!=_1fe){
- continue;
- }
- _1f4=this.processCTX(_1f4,_1fe);
- }
- }
- }else{
- if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""&&_1f4.m_sLayoutType=="datavalue"){
- _1f4=this.processCTX(_1f4,_1f2.getAttribute("ctx"));
- }
- }
- this.getSelectionController().processColumnTitleNode(_1f4);
- }
- catch(ex){
- }
- return _1f4;
- };
- CSelectionObjectFactory.prototype.processCTX=function(_1ff,_200){
- if(typeof _200!="string"||_200.length==0){
- return _1ff;
- }
- var ctx;
- if(typeof _1ff.m_contextIds=="object"&&_1ff.m_contextIds!==null&&_1ff.m_contextIds.length>0){
- var _202=_200.split("::");
- for(ctx=0;ctx<_1ff.m_contextIds.length;++ctx){
- try{
- if(_202[ctx]){
- _1ff.m_contextIds[ctx]=_1ff.m_contextIds[ctx].concat(_202[ctx].split(":"));
- }
- }
- catch(e){
- }
- }
- }else{
- _1ff.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_200);
- }
- _1ff.m_ctxAttributeString=_200;
- return _1ff;
- };
- CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_204,_205){
- if(!_205){
- _205=document;
- }
- var _206=new CSelectionObject();
- _206.setSelectionController(this.getSelectionController());
- _206.m_oCellRef=null;
- _206.m_sColumnRef=null;
- _206.m_sCellTypeId=null;
- _206.refQuery="";
- var _207=_205.getElementsByTagName("td");
- for(var i=0;i<_207.length;i++){
- var _209=_207[i].getAttribute("tag");
- if(_209!=null&&_209!=""){
- if(tag==_209){
- var _20a=_207[i].className;
- if(_20a!=null&&_209!=""){
- if((_204=="columnTitle"&&_20a=="lt")||(_204=="datavalue"&&_20a=="lc")){
- _206.m_sColumnRef=_207[i].getAttribute("cid");
- _206.m_sCellTypeId=_207[i].getAttribute("uid");
- break;
- }
- }
- }
- }
- }
- if(_206.m_sCellTypeId==null){
- return null;
- }
- return _206;
- };
- CSelectionObjectFactory.prototype.getSelectionChartObject=function(_20b){
- var _20c="";
- if(_20b.getAttribute("flashChart")!=null){
- if(typeof _20b.getCtx!="undefined"){
- try{
- _20c=_20b.getCtx();
- }
- catch(e){
- _20c="";
- }
- }
- }else{
- _20c=_20b.getAttribute("ctx");
- }
- var _20d=new CSelectionChartObject();
- _20d.setSelectionController(this.getSelectionController());
- if(_20c!=null){
- _20d.m_contextIds=_20c.split("::");
- for(var ctx=0;ctx<_20d.m_contextIds.length;++ctx){
- _20d.m_contextIds[ctx]=_20d.m_contextIds[ctx].split(":");
- }
- }
- _20d.m_layoutElementId=this.getLayoutElementId(_20b);
- _20d.m_sLayoutType=_20b.getAttribute("type");
- _20d.m_chartArea=_20b;
- _20d.m_context=_20c;
- _20d.setSelectionOnVizChart(_20b);
- return _20d;
- };
- CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_20f){
- var _210="";
- switch(_20f){
- case "ls":
- _210="list";
- break;
- case "xt":
- _210="crosstab";
- break;
- case "rt":
- _210="repeaterTable";
- break;
- }
- return _210;
- };
- CSelectionObjectFactory.prototype.getContainerType=function(el){
- var type="";
- if(el){
- if(el.className){
- type=this.getContainerTypeFromClass(el.className);
- }
- if(!type){
- var _213=el.parentNode;
- if(_213){
- type=this.getContainerType(_213);
- }
- }
- }
- return type;
- };
- CSelectionObjectFactory.prototype.getLayoutElementId=function(el){
- var id="";
- var _216=this.getSelectionController().getNamespace();
- if(el){
- if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){
- for(var _217=0;_217<el.childNodes.length;_217++){
- var _218=el.childNodes[_217];
- if(_218.nodeName.toLowerCase()=="img"&&_218.getAttribute("lid")!=null){
- return _218.getAttribute("lid");
- }
- }
- }
- id=(el.getAttribute&&el.getAttribute("LID"))||"";
- if(!id){
- var _219=el.parentNode;
- if(_219){
- id=this.getLayoutElementId(_219);
- }
- }else{
- if(el.tagName.toUpperCase()=="MAP"){
- id=id.replace(_216,"");
- id=_216+id;
- var _21a="#"+id;
- var _21b=getElementsByAttribute(el.parentNode,"IMG","usemap",_21a);
- if(_21b.length>0){
- id=_21b[0].getAttribute("LID");
- }
- }
- }
- }
- return id;
- };
- function CSelectionController(_21c,_21d){
- this.m_bSelectionBasedFeaturesEnabled=false;
- this.m_bDrillUpDownEnabled=false;
- this.m_bModelDrillThroughEnabled=false;
- this.m_oCognosViewer=null;
- this.m_bSavedSelections=false;
- if(_21d){
- this.m_oCognosViewer=_21d;
- }
- this.initialize(_21c);
- this.FILTER_SELECTION_STYLE=0;
- this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1;
- };
- CSelectionController.prototype.initialize=function(_21e){
- this.m_sNamespace=_21e;
- 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(_21f){
- switch(_21f){
- 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(_220){
- this.m_bAllowHorizontalDataValueSelection=_220;
- };
- 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(_221){
- if(!this.m_bUsingCCDManager){
- var _222=this.getReportContextDataArray();
- var _223=1;
- for(var _224 in _222){
- var _225=_222[_224];
- if(_225[_223]==_221){
- return _224;
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForDisplayValue(_221);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_229){
- return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_229);
- };
- 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 _230=this.getReportMetadataArray();
- var _231=0;
- for(var sKey in _230){
- var _233=_230[sKey];
- if(_233[_231]==sMun){
- var _234=2;
- var _235=this.getReportContextDataArray();
- for(var _236 in _235){
- var _237=_235[_236];
- if(_237[_234]==sKey){
- return _236;
- }
- }
- }
- }
- return "";
- }else{
- var sId=this.m_oCDManager.GetContextIdForMUN(sMun);
- return (sId==null)?"":sId;
- }
- };
- CSelectionController.prototype.canDrillDown=function(_239){
- var _23a=this.getDrillFlagForMember(_239);
- return (_23a==3||_23a==2);
- };
- CSelectionController.prototype.canDrillUp=function(_23b){
- var _23c=this.getDrillFlagForMember(_23b);
- return (_23c==3||_23c==1);
- };
- CSelectionController.prototype.getQueryModelId=function(_23d){
- var qmid="";
- if(!this.m_bUsingCCDManager){
- var _23f=this.m_aReportContextDataArray[_23d];
- if(_23f&&typeof _23f[3]!="undefined"){
- var _240=_23f[3];
- var _241=this.m_aReportMetadataArray[_240];
- if(typeof _241!="undefined"&&typeof _241[1]!="undefined"&&_241[1]=="I"){
- qmid=_241[0];
- }
- }
- }else{
- qmid=this.m_oCDManager.GetQMID(_23d);
- }
- return qmid;
- };
- CSelectionController.prototype.getRefQuery=function(_242){
- if(!this.m_bUsingCCDManager){
- return this.getMetaDataItemUseValue(4,_242);
- }else{
- var _243=this.m_oCDManager.GetQuery(_242);
- return (_243==null)?"":_243;
- }
- };
- CSelectionController.prototype.getRefDataItem=function(_244){
- return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_244);
- };
- CSelectionController.prototype.getMun=function(_245){
- return this.m_oCognosViewer.getReportContextHelper().getMun(_245);
- };
- CSelectionController.prototype.getHun=function(_246){
- if(!this.m_bUsingCCDManager){
- var sHun=null;
- var _248=this.getRDI(_246);
- if(_248&&_248.length>4&&_248[1]=="R"){
- var _249=_248[4];
- var _24a=this.getReportMetadataArray();
- _248=_24a[_249];
- }
- if(_248&&_248.length>1&&_248[1]=="H"){
- sHun=_248[0];
- }
- return sHun;
- }else{
- return this.m_oCDManager.GetHUN(_246);
- }
- };
- CSelectionController.prototype.fetchContextData=function(_24b,_24c){
- var _24d=0;
- if(this.m_bUsingCCDManager){
- _24d=this.m_oCDManager.FetchContextData(_24b,_24c);
- }
- return _24d;
- };
- CSelectionController.prototype.getMetaDataItem=function(sKey){
- var _24f=this.getReportMetadataArray();
- if(typeof _24f[sKey]!="undefined"){
- return _24f[sKey];
- }
- return null;
- };
- CSelectionController.prototype.getContextDataItem=function(_250){
- var _251=this.getReportContextDataArray();
- if(typeof _251[_250]!="undefined"){
- return _251[_250];
- }
- return null;
- };
- CSelectionController.prototype.getMetaDataItemUseValue=function(_252,_253){
- var _254=this.getContextDataItem(_253);
- if(_254!=null){
- var _255=_254[_252];
- if(_255!=""){
- var _256=this.getMetaDataItem(_255);
- if(_256!=null){
- return _256[0];
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.getRDI=function(_257){
- var _258=this.getContextDataItem(_257);
- if(_258!=null){
- var _259=_258[0];
- if(_259!=""){
- var _25a=this.getMetaDataItem(_259);
- if(_25a!=null){
- return _25a;
- }
- }
- }
- };
- CSelectionController.prototype.getNamespace=function(){
- return this.m_sNamespace;
- };
- CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_25b){
- this.m_bSelectionBasedFeaturesEnabled=_25b;
- };
- CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){
- return this.m_bSelectionBasedFeaturesEnabled;
- };
- CSelectionController.prototype.setDrillUpDownEnabled=function(_25c){
- this.m_bDrillUpDownEnabled=_25c;
- };
- CSelectionController.prototype.getDrillUpDownEnabled=function(){
- return this.m_bDrillUpDownEnabled;
- };
- CSelectionController.prototype.setModelDrillThroughEnabled=function(_25d){
- this.m_bModelDrillThroughEnabled=_25d;
- };
- CSelectionController.prototype.getBookletItemForCurrentSelection=function(){
- var _25e=this.getAllSelectedObjects();
- if(_25e&&_25e.length>0){
- var _25f=_25e[0];
- if(_25f.hasContextInformation()){
- var _260=this.m_oCDManager.GetBIValue(_25f.m_contextIds[0][0]);
- if(!_260){
- return null;
- }
- return _260;
- }
- }
- return null;
- };
- CSelectionController.prototype.getModelPathForCurrentSelection=function(){
- var _261=null;
- var _262=this.getBookletItemForCurrentSelection();
- if(_262){
- var _261=this.m_oCDManager.getModelPathFromBookletItem(_262);
- }
- return _261;
- };
- CSelectionController.prototype.getModelDrillThroughEnabled=function(){
- var _263=this.getBookletItemForCurrentSelection();
- if(_263){
- var _264=this.m_oCDManager.GetBookletModelBasedDrillThru(_263);
- return _264==1?true:false;
- }else{
- return this.m_bModelDrillThroughEnabled;
- }
- };
- CSelectionController.prototype.clearSelectedObjects=function(_265){
- try{
- if(!_265){
- _265=document;
- }
- this.updateUI(_265,this.getSelections(),true,false);
- this.m_aSelectedObjects=[];
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.resetSelections=function(_266){
- try{
- if(!_266){
- _266=document;
- }
- if(this.hasSelectedChartNodes()){
- this.resetChartSelections(_266);
- }
- this.m_oSelectedDrillThroughImage=null;
- this.m_oSelectedDrillThroughSingleton=null;
- if(this.getSelections()){
- this.updateUI(_266,this.getSelections(),true,false);
- this.updateUI(_266,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(_267){
- var _268=this.m_chartHelpers;
- for(var _269 in _268){
- if(_268[_269]){
- var _26a=_268[_269].getImageMapHighlighter();
- if(_26a.hideAllAreas){
- _26a.hideAllAreas();
- }
- }
- }
- this.m_selectedChartNodes=[];
- this.m_selectionContainerMap=null;
- };
- CSelectionController.prototype.addSelectionObject=function(_26b,_26c){
- try{
- if(!_26c){
- _26c=document;
- }
- var _26d=_26b.getCellRef();
- if(this.isCellSelected(_26d)!==true||(typeof _26d!="object"||_26d===null)){
- if(this.isColumnCut(_26b.getTag())!==true){
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_26b;
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- this.updateUI(_26c,this.getSelections(),false,false);
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.removeSelectionObject=function(_26e,_26f){
- try{
- if(!_26f){
- _26f=document;
- }
- var _270=[];
- var _271;
- for(_271=0;_271<this.m_aSelectedObjects.length;_271++){
- var _272=this.m_aSelectedObjects[_271].getCellRef();
- var _273=_26e.getCellRef();
- if(typeof _272=="object"&&typeof _273=="object"&&_272!==null&&_273!==null){
- if(_272==_273){
- _270[_270.length]=_271;
- }
- }
- }
- if(_270.length>0){
- this.updateUI(_26f,this.getSelections(),true,false);
- var _274=[];
- for(_271=0;_271<this.m_aSelectedObjects.length;_271++){
- var _275=true;
- for(var j=0;j<_270.length;j++){
- if(_271==_270[j]){
- _275=false;
- }
- }
- if(_275){
- _274[_274.length]=this.m_aSelectedObjects[_271];
- }
- }
- this.m_aSelectedObjects=_274;
- this.updateUI(_26f,this.getSelections(),false,false);
- }
- if(typeof this.onSelectionChange=="function"){
- this.onSelectionChange();
- }
- return true;
- }
- catch(e){
- return false;
- }
- };
- CSelectionController.prototype.isSavedCellSelected=function(_277){
- return this.isCellSelectedHelper(_277,this.getSavedSelectedObjects());
- };
- CSelectionController.prototype.isCellSelected=function(_278){
- return this.isCellSelectedHelper(_278,this.getSelections());
- };
- CSelectionController.prototype.isCellSelectedHelper=function(_279,_27a){
- try{
- for(var i=0;i<_27a.length;i++){
- var _27c=_27a[i].getCellRef();
- if(typeof _27c=="object"&&_27c!==null){
- if(_27c==_279){
- return true;
- }
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnSelected=function(_27d){
- try{
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- if(this.m_aSelectedObjects[i].getTag()==_27d){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.isColumnCut=function(_27f){
- try{
- for(var i=0;i<this.m_aCutColumns.length;i++){
- if(this.m_aCutColumns[i].getTag()==_27f){
- return true;
- }
- }
- }
- catch(e){
- }
- return false;
- };
- CSelectionController.prototype.getSelections=function(){
- return this.m_aSelectedObjects;
- };
- CSelectionController.prototype.selectSingleDomNode=function(_281){
- this.clearSelectedObjects();
- var _282=this.getSelectionObjectFactory().getSelectionObject(_281);
- var _283=null;
- if(isIE()){
- _283=_281.document;
- }else{
- _283=_281.ownerDocument;
- }
- this.addSelectionObject(_282,_283);
- };
- CSelectionController.prototype.hasCutColumns=function(){
- if(this.m_aCutColumns.length===0){
- return false;
- }else{
- return true;
- }
- };
- CSelectionController.prototype.setCutColumns=function(_284,_285){
- try{
- if(!_285){
- _285=document;
- }
- this.updateUI(_285,this.getSelections(),true,false);
- this.updateUI(_285,this.getCutColumns(),true,1);
- this.m_aCutColumns=[];
- if(_284===true){
- for(var i=0;i<this.m_aSelectedObjects.length;i++){
- this.m_aCutColumns[i]=this.m_aSelectedObjects[i];
- }
- this.m_aSelectedObjects=[];
- }
- this.updateUI(_285,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(_287){
- this.m_oObserver.attach(_287);
- };
- CSelectionController.prototype.onSelectionChange=function(){
- this.getObservers().notify();
- };
- CSelectionController.prototype.getSelectedColumns=function(_288){
- var _289=[];
- if(typeof _288=="undefined"){
- _288=this.getSelections();
- }
- var _28a=_288.length;
- for(var i=0;i<_28a;i++){
- var _28c=_288[i];
- var _28d=true;
- for(var j=0;j<_289.length;j++){
- if(_289[j][0]==_28c.getColumnRef()&&_289[j][1]==_28c.getCellTypeId()){
- _28d=false;
- break;
- }
- }
- if(_28d){
- _289[_289.length]=[_28c.getColumnRef(),_28c.getCellTypeId(),_28c.getLayoutType(),_28c.getTag(),_28c.getColumnName()];
- }
- }
- return _289;
- };
- CSelectionController.prototype.getAllSelectedObjectsWithUniqueCTXIDs=function(){
- var _28f=[];
- var _290=this.getAllSelectedObjects();
- for(var i=0;i<_290.length;i++){
- var _292=false;
- var _293=_290[i];
- for(var ii=0;ii<_28f.length;ii++){
- if(_293.m_contextIds[0][0]==_28f[ii].m_contextIds[0][0]){
- _292=true;
- break;
- }
- }
- if(!_292){
- _28f.push(_293);
- }
- }
- return _28f;
- };
- CSelectionController.prototype.getAllSelectedObjects=function(){
- var _295=this.getSelections();
- if(this.hasSelectedChartNodes()){
- _295=_295.concat(this.getSelectedChartNodes());
- }
- return _295;
- };
- CSelectionController.prototype.getSelectedColumnIds=function(_296){
- var _297=[];
- if(typeof _296=="undefined"){
- _296=this.getSelections();
- }
- var _298=this.getSelectedColumns(_296);
- for(var _299=0;_299<_298.length;_299++){
- var _29a=true;
- for(var _29b=0;_29b<_297.length;_29b++){
- if(_297[_29b]==_298[_299][4]){
- _29a=false;
- break;
- }
- }
- if(_29a){
- _297[_297.length]=_298[_299][4];
- }
- }
- return _297;
- };
- var STYLE_SELECTION={};
- CSelectionController.prototype.selecting=function(c,_29d){
- var _29e="."+c+_29d;
- var doc=document;
- var _2a0=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_2a0){
- doc=_2a0.contentWindow.document;
- }
- var _2a1=doc.createElement("style");
- _2a1.setAttribute("type","text/css");
- if(_2a1.styleSheet){
- _2a1.styleSheet.cssText=_29e;
- }else{
- _2a1.appendChild(doc.createTextNode(_29e));
- }
- doc.getElementsByTagName("head").item(0).appendChild(_2a1);
- STYLE_SELECTION[c]=_2a1;
- };
- CSelectionController.prototype.deselecting=function(_2a2){
- for(var i=0;i<_2a2.length;++i){
- if(STYLE_SELECTION[_2a2[i]]){
- var node=STYLE_SELECTION[_2a2[i]];
- node.parentNode.removeChild(node);
- STYLE_SELECTION[_2a2[i]]=null;
- }
- }
- if(isIE()&&typeof this.m_oCognosViewer.m_viewerFragment!="undefined"){
- var _2a5=document.getElementById("CVReport"+this.m_oCognosViewer.getId());
- if(_2a5!=null){
- var _2a6=_2a5.style.display;
- _2a5.style.display="none";
- _2a5.style.display=_2a6;
- }
- }
- };
- 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 _2aa=(ss.cssRules?ss.cssRules:ss.rules);
- for(var j=0;j<_2aa.length;j++){
- var cr=_2aa[j];
- var _2ad=new RegExp("\\b"+c+"\\b","g");
- if(cr.selectorText&&cr.selectorText.match(_2ad)){
- return cr;
- }
- }
- }
- return 0;
- };
- CSelectionController.prototype.canUpdateSelection=function(_2ae){
- return this.m_selectionStyles.canApplyToSelection(_2ae);
- };
- CSelectionController.prototype.setStyleForSelection=function(_2af){
- return this.m_selectionStyles.setStyleForSelection(_2af);
- };
- CSelectionController.prototype.updateUI=function(_2b0,_2b1,_2b2,_2b3){
- if(!_2b0){
- _2b0=document;
- }
- try{
- if(_2b1&&_2b1.length>0){
- var _2b4,_2b5,_2b6;
- if(_2b3==1||_2b3==2){
- if(_2b2){
- this.deselecting(this.m_cutClass);
- }else{
- var _2b7=getStyleFromClass("cutSelection").style.color;
- var _2b8=getStyleFromClass("cutSelection").style.backgroundColor;
- _2b4=_2b1.length;
- for(_2b5=0;_2b5<_2b4;_2b5++){
- _2b6=_2b1[_2b5].getCellRef();
- var _2b9="cutQS"+_2b6.getAttribute("cid");
- this.selecting(_2b9,"\n{ background-color: "+_2b8+"; color: "+_2b7+";}\n");
- this.m_cutClass.push(_2b9);
- }
- }
- }else{
- if(this.m_oCognosViewer){
- this.findSelectionURLs();
- _2b6="";
- _2b4=_2b1.length;
- for(_2b5=0;_2b5<_2b4;_2b5++){
- _2b6=_2b1[_2b5].getCellRef();
- if(_2b6.getAttribute("oldClassName")!=null){
- _2b6.className=_2b6.getAttribute("oldClassName");
- _2b6.removeAttribute("oldClassName");
- }
- this.setStyleForSelection(_2b1[_2b5].m_contextIds);
- if(!this.secondarySelectionIsDisabled()||_2b2){
- var _2ba=document.getElementById("CVReport"+this.getNamespace());
- var _2bb=getElementsByAttribute(_2ba,["td","th"],"name",_2b6.getAttribute("name"),this.m_maxSecondarySelection);
- for(var _2bc=0;_2bc<_2bb.length;_2bc++){
- var cell=_2bb[_2bc];
- if(_2b2){
- this.restoreOldBackgroundImage(cell);
- }else{
- if(cell.getAttribute("oldBackgroundImageStyle")==null){
- this.saveOldCellStyles(cell);
- this.setSecondarySelectionStyles(cell);
- }
- }
- }
- }
- this.saveOldCellStyles(_2b6);
- if(_2b2){
- this.restoreOldBackgroundImage(_2b6);
- if(this.m_oCognosViewer.isHighContrast()){
- this.restoreOldBorder(_2b6);
- this.restoreOldPadding(_2b6);
- }
- }else{
- this.setPrimarySelectionStyles(_2b6);
- if(this.m_oCognosViewer.isHighContrast()){
- var size=getBoxInfo(_2b6,true);
- this.saveOldBorder(_2b6);
- this.saveOldPadding(_2b6,size);
- var _2bf=3;
- var _2c0=size.borderTopWidth+size.paddingTop-_2bf;
- var _2c1=size.borderBottomWidth+size.paddingBottom-_2bf;
- var _2c2=size.borderLeftWidth+size.paddingLeft-_2bf;
- var _2c3=size.borderRightWidth+size.paddingRight-_2bf;
- _2b6.style.border=_2bf+"px "+this.getHighContrastBorderStyle()+" black";
- _2b6.style.padding=_2c0+"px "+_2c3+"px "+_2c1+"px "+_2c2+"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(_2c4){
- var _2c5=true;
- var _2c6=_2c4.getAttribute("rsvpChart");
- var _2c7=_2c4.parentNode.getAttribute("chartContainer");
- if(_2c6!="true"&&_2c7!="true"){
- this.m_selectedChartNodes=[];
- _2c5=false;
- }else{
- var _2c8=this.getSelectionObjectFactory().getSelectionChartObject(_2c4);
- this.m_selectedChartNodes=[_2c8];
- }
- return _2c5;
- };
- CSelectionController.prototype.setSelectedChartArea=function(_2c9,e){
- var _2cb=typeof this.m_oCognosViewer.isBux!=="undefined";
- var _2cc=false;
- if(_2c9!==null){
- if(_2c9.tagName=="IMG"){
- _2cc=this.setSelectedChartImgArea(_2c9);
- }else{
- if(_2c9.nodeName=="AREA"&&_2c9.attributes["ctx"]){
- _2cc=true;
- if(_2cb){
- this.setBuxSelectedChartArea(_2c9,e);
- }else{
- this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_2c9)];
- }
- }
- }
- if(_2cc){
- this.getObservers().notify();
- }
- }
- return _2cc;
- };
- CSelectionController.prototype.setBuxSelectedChartArea=function(_2cd,e){
- var _2cf=this.getChartHelper(_2cd);
- var _2d0=_2cf.getChartNode(_2cd);
- this.setStyleForSelection(_2d0.m_contextIds);
- var _2d1=_2cf.getImageMapHighlighter();
- _2d1.setFillColour(this.getPrimarySelectionColor());
- _2d1.setStrokeColour(this.getPrimarySelectionColor());
- if(typeof e=="undefined"){
- e={};
- }
- if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){
- if(_2d1.isAreaHighlighted(_2cd)){
- _2d1.hideAreas(_2d0.getCtxAreas());
- var _2d2=_2cd.getAttribute("ctx");
- var _2d3=this.m_selectedChartNodes.length;
- for(var i=0;i<_2d3;i++){
- var _2d5=this.m_selectedChartNodes[i];
- if(_2d2==_2d5.getContext()){
- this.m_selectedChartNodes.splice(i,1);
- break;
- }
- }
- }else{
- this.updateSelectionContainer(_2cd);
- _2d1.highlightAreas(_2d0.getCtxAreas(),true);
- this.m_selectedChartNodes.push(_2d0);
- }
- }else{
- if(this.hasSavedSelectedChartNodes()){
- var _2d6=this.m_savedSelectedChartNodes.length;
- var _2d7=this.m_savedSelectedChartNodes;
- for(var i=0;i<_2d6;i++){
- var area=_2d7[i].getArea();
- var _2d9=this.getSavedChartHelper(area);
- var _2da=_2d9.getImageMapHighlighter();
- var _2db=_2da.getAreaId(area);
- if(_2d1.getAreaId(_2cd)===_2db){
- _2da.hideAreaById(_2db+this.m_savedPrimarySelectionColor);
- break;
- }
- }
- }
- this.updateSelectionContainer(_2cd);
- _2d1.highlightAreas(_2d0.getCtxAreas());
- this.m_selectedChartNodes=[_2d0];
- }
- };
- CSelectionController.prototype.updateSelectionContainer=function(_2dc){
- var _2dd=_2dc.parentNode;
- if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_2dd.name){
- var _2de=this.getChartHelper(_2dc).getImageMapHighlighter();
- _2de.hideAllAreas();
- }
- this.m_selectionContainerMap=_2dd;
- };
- CSelectionController.prototype.getChartHelper=function(_2df){
- var _2e0=_2df.parentNode;
- var _2e1=_2e0.name;
- if(!this.m_chartHelpers[_2e1]){
- this.m_chartHelpers[_2e1]=new CChartHelper(_2df,this.getSelectionObjectFactory(),this.m_oCognosViewer);
- }
- return this.m_chartHelpers[_2e1];
- };
- CSelectionController.prototype.getSavedChartHelper=function(_2e2){
- var _2e3=_2e2.parentNode;
- var _2e4=_2e3.name;
- return this.m_savedChartHelpers[_2e4];
- };
- 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 _2e5=null;
- if(this.hasSelectedChartNodes()){
- var _2e6=this.m_selectedChartNodes[0];
- _2e5=_2e6.getArea();
- }
- if(_2e5===null){
- return null;
- }
- if(_2e5.tagName=="IMG"){
- return _2e5;
- }
- return this.getSelectedChartImageFromChartArea(_2e5);
- };
- CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_2e7){
- var _2e8=_2e7.parentNode;
- var _2e9="#"+_2e8.getAttribute("name");
- return this.checkChildrenForChart(_2e8.parentNode,_2e9);
- };
- CSelectionController.prototype.checkChildrenForChart=function(_2ea,_2eb){
- var _2ec=_2ea.firstChild;
- while(_2ec!==null){
- if(!_2ec.tagName){
- return null;
- }else{
- if(_2ec.tagName=="IMG"&&_2ec.getAttribute("usemap")==_2eb){
- return _2ec;
- }else{
- if(_2ec.tagName==="DIV"||_2ec.tagName==="SPAN"){
- var _2ed=this.checkChildrenForChart(_2ec,_2eb);
- if(_2ed){
- return _2ed;
- }
- }
- }
- }
- _2ec=_2ec.nextSibling;
- }
- return null;
- };
- CSelectionController.prototype.downloadSelectedChartImage=function(_2ee){
- var _2ef=this.getSelectedChartImage();
- if(_2ef!==null){
- var _2f0=this.getDocumentFromImage(_2ef);
- var _2f1=_2ef.name.replace(".","_");
- var _2f2=_2f1.substr(5);
- var _2f3="?m_name=";
- _2f3+=_2f2;
- _2f3+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj=";
- if(isIE()){
- _2f1=_2f0.parentWindow.eval("graphicSrc"+_2f2);
- }else{
- _2f1=_2f0.defaultView.eval("graphicSrc"+_2f2);
- }
- var _2f4="";
- if(typeof _2f1!="undefined"&&_2f1!==null){
- var _2f5=_2f1.split("&");
- if(_2f5.length===0){
- return;
- }
- if(_2f1.indexOf("/repository/")<0){
- for(var i=0;i<_2f5.length;++i){
- var _2f7=_2f5[i];
- var _2f8=_2f7.indexOf("=");
- if(_2f8!=-1){
- var _2f9=_2f7.substr(0,_2f8);
- var _2fa=_2f7.slice(_2f8+1);
- if(_2f9=="search"){
- _2f4+=_2fa;
- break;
- }
- }
- }
- }
- if(_2f4==""){
- _2f3=_2ef.getAttribute("src");
- if(_2f3.indexOf("?")!=-1){
- _2f3+="&download=true";
- }else{
- _2f3+="?download=true";
- }
- }
- if(typeof getConfigFrame=="function"){
- _2f3+=_2f4;
- _2f3=getConfigFrame().constructGETRequestParamsString(_2f3);
- window.open(_2f3,"_blank","width=0,height=0");
- }else{
- _2f3=constructGETRequestParamsString(_2f3);
- _2f3+=_2f4;
- var _2fb=this.m_oCognosViewer.getGateway();
- var _2fc=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(_2fc){
- var _2fd=_2fc.src;
- if(_2fd.indexOf("repository")>=0&&_2f3.indexOf("repository")<0){
- var _2fe=_2fd.indexOf("content");
- _2f3=_2fd.substring(0,_2fe)+_2f3;
- }
- }
- if(_2f3.indexOf(_2fb)==-1){
- var _2ff=document.forms["formWarpRequest"+_2ee];
- _2f3=_2ff.action+_2f3;
- }
- if(typeof window.detachLeavingRV=="function"){
- window.detachLeavingRV();
- }
- location.href=_2f3;
- if(typeof window.attachLeavingRV=="function"){
- setTimeout(window.attachLeavingRV,100);
- }
- }
- }
- }
- };
- CSelectionController.prototype.getDocumentFromImage=function(_300){
- var _301=null;
- if(_300.ownerDocument){
- _301=_300.ownerDocument;
- }else{
- _301=_300.document;
- }
- return _301;
- };
- CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){
- var _303=this.getSelections();
- if(_303.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 _305=this.getSelectionObjectFactory().getContainerType(node);
- if(_305==="list"){
- for(var i=0;i<_303.length;i++){
- if(_303[i].m_oCellRef==node){
- return false;
- }
- }
- }
- }
- }
- return true;
- };
- CSelectionController.prototype.getContainerType=function(){
- var _307="";
- if(this.hasSelectedChartNodes()){
- _307="chart";
- }else{
- if(this.getDataContainerType()==="list"){
- _307="list";
- }else{
- _307="crosstab";
- }
- }
- return _307;
- };
- CSelectionController.prototype.getDisplayValues=function(){
- var _308={};
- var _309=this.getAllSelectedObjects()[0];
- if(_309){
- var _30a=_309.getSelectedContextIds();
- if(_30a){
- for(var axis=0;axis<_30a.length;axis++){
- var _30c=[];
- var _30d=_30a[axis];
- for(var _30e=0;_30e<_30d.length;_30e++){
- var _30f=_30d[_30e];
- var _310=this.getDisplayValue(_30f);
- _30c.push(_310);
- if(axis===0){
- break;
- }
- }
- var _311="";
- switch(axis){
- case 0:
- _311="selected";
- break;
- case 1:
- _311="rows";
- break;
- default:
- _311="columns";
- }
- _308[_311]=_30c;
- }
- }
- }
- return _308;
- };
- CSelectionController.prototype.getChartTooltip=function(){
- var _312=this.getAllSelectedObjects()[0];
- if(_312){
- var area=_312.getArea();
- if(area){
- var _314=area.getAttribute("title");
- if(_314&&_314.length>0){
- return area.getAttribute("title");
- }
- }
- }
- return "";
- };
- CSelectionController.prototype.pageClickedForMobile=function(e){
- this.pageClicked(e);
- var _316=this.getAllSelectedObjects().length;
- if(_316==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 _318=this.m_savedChartHelpers;
- for(var _319 in _318){
- if(_318[_319]){
- var _31a=_318[_319].getImageMapHighlighter();
- if(_31a.hideAllAreas){
- _31a.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 _31b=this.m_aSelectedObjects.length;
- var temp=[];
- for(var i=0;i<_31b;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 _31e=this.m_selectedChartNodes.length;
- var temp=[];
- for(var i=0;i<_31e;i++){
- if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){
- var _31f=this.m_selectedChartNodes[i].getArea();
- var _320=this.getImageMapName(_31f);
- this.m_chartHelpers[_320]=this.m_savedChartHelpers[_320];
- delete this.m_savedChartHelpers[_320];
- 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(_321){
- var _322=_321.parentNode;
- return _322.name;
- };
- CSelectionController.prototype.repaintBUXSelectedChartArea=function(_323,_324,_325){
- var _326={};
- var _327=_323.length;
- for(var i=0;i<_327;i++){
- var _329=_323[i].getArea();
- var _32a=this.getImageMapName(_329);
- var _32b;
- if(!_326[_32a]){
- _32b=(_324)?this.getSavedChartHelper(_329):this.getChartHelper(_329);
- _326[_32a]=_32b;
- var _32c=_32b.getImageMapHighlighter();
- _32c.hideAllAreas();
- _32c.setFillColour(this.getPrimarySelectionColor());
- _32c.setStrokeColour(this.getPrimarySelectionColor());
- }else{
- _32b=_326[_32a];
- }
- var _32d=_323[i].m_contextIds;
- if(_325&&_32d.length===1&&_32d[0].length===1&&this.isMeasure(_32d[0][0])){
- continue;
- }
- _32c.highlightAreas(_323[i].getCtxAreas(),1);
- }
- };
- CSelectionController.prototype.repaintSavedSelections=function(){
- var _32e=this.m_selectionStyles;
- this.m_selectionStyles=this.m_savedSelectionStyles;
- var _32f=this.getSavedSelectedChartNodes();
- var _330=false;
- if(_32f&&_32f.length>0){
- bIsChart=true;
- }else{
- _32f=this.getSavedSelectedObjects();
- }
- this.repaintSelectionsHelper(_32f,true,_330);
- this.resetSelectionStyles();
- this.m_selectionStyles=_32e;
- };
- CSelectionController.prototype.repaintSelections=function(){
- var _331=this.getSelectedChartNodes();
- var _332=false;
- if(_331&&_331.length>0){
- _332=true;
- }else{
- _331=this.getSelections();
- }
- this.repaintSelectionsHelper(_331,false,_332);
- };
- CSelectionController.prototype.repaintSelectionsHelper=function(_333,_334,_335){
- try{
- if(_335){
- this.repaintBUXSelectedChartArea(_333,_334);
- }else{
- this.updateUI(document,_333,true,false);
- this.updateUI(document,_333,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 _338=node;
- if(!_338.getAttribute("uid")){
- var _339=_338.parentNode;
- if(_339&&_339.nodeType==1&&typeof _339.getAttribute!="undefined"&&_339.getAttribute("uid")!=null){
- _338=_339;
- }
- }
- if(this.isCellSelected(_338)){
- 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 _33a=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 _33b=node;
- node=node.selectedCell;
- _33b.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(_33a);
- }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 _33c=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,_341){
- var _342=this.getCtxIdFromMun(sMun);
- if(_342==""){
- _342=this.getCtxIdFromMetaData(sLun,sHun,_341);
- }
- if(_342!=null&&this.m_oCDManager.GetUsage(_342)!="2"){
- var _343=document.getElementById("rt"+this.getNamespace());
- if(_343!=null){
- var _344=getElementsByAttribute(_343,"*","ctx",_342);
- if(_344&&_344.length===0){
- var _345=new RegExp("(^|:)"+_342+"(:|$)","i");
- _344=getElementsByAttribute(_343,"*","ctx",_342,-1,_345);
- }
- var _346=null;
- if(_344!=null&&_344.length>0){
- _346=new CSelectionObject();
- _346.setSelectionController(this);
- _346.m_sColumnRef=_344[0].getAttribute("cid");
- _346.m_sCellTypeId=_344[0].getAttribute("uid");
- _346.m_sLayoutType=_344[0].getAttribute("type");
- _346.m_sTag=_344[0].getAttribute("tag");
- _346.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_344[0]);
- _346.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_344[0]);
- _346.m_contextIds=[[_342]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346;
- }else{
- var _347=getElementsByAttribute(_343,"*","flashChart","true");
- if(_347!=null){
- for(var _348=0;_348<_347.length;++_348){
- var ldx=_347[_348].getLDX();
- if(ldx.indexOf("<ctx>"+_342+"</ctx>")!=-1){
- _346=new CSelectionObject();
- _346.setSelectionController(this);
- var lid=_347[_348].getAttribute("lid");
- _346.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),"");
- _346.m_dataContainerType="chart";
- _346.m_contextIds=[[_342]];
- this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346;
- }
- }
- }
- }
- }
- }
- };
- CSelectionController.prototype.buildSelectionObject=function(node,e){
- var _34d=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 _350=node.childNodes;
- for(var i=0;i<_350.length;i++){
- if(_350[i].nodeName.toUpperCase()=="TABLE"&&(_350[i].className=="ls"||_350[i].className=="xt")){
- var trs=_350[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){
- _34d=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _34d=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- }
- }
- catch(e){
- }
- return _34d;
- };
- 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(_358){
- var _359=false;
- if(!this.m_aSavedSelectedObjects||!this.m_aSavedSelectedObjects.length||!_358||!_358.length){
- return false;
- }
- for(var i=0;i<_358.length;i++){
- if(this.isSavedCellSelected(_358[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 _35d=null;
- if(isIE()){
- _35d=node.document;
- }else{
- _35d=node.ownerDocument;
- }
- var ctx=node.getAttribute("ctx");
- var uid=node.getAttribute("uid");
- var _360=false;
- if(typeof e=="undefined"){
- e={};
- }
- var _361=false;
- if(typeof g_reportSelectionController!="undefined"){
- _361=this.checkForReportElementNode(node);
- }
- if((ctx==null&&uid==null&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")==null&&_361==false)||(!this.ctrlKeyPressed(e)&&!this.shiftKeyPressed(e))){
- if(this.getSelections().length>0){
- _360=true;
- }
- if(this.hasCutColumns()==true){
- this.clearSelectedObjects(_35d);
- }else{
- this.resetSelections(_35d);
- 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(_35d);
- }
- if(typeof g_reportSelectionController!="undefined"&&_361==false){
- if(g_reportSelectionController.getSelections().length>0){
- _360=true;
- }
- g_reportSelectionController.clearSelections();
- }
- }
- var _362=node.getAttribute("dtTargets")?node:null;
- var _363=(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 _364;
- var _365=3;
- do{
- node=node.parentNode;
- if(node){
- _362=(!_362&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_362;
- uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null;
- _364=node.nodeName.toLowerCase();
- }
- }while((uid==null)&&node&&(--_365>0)&&(_364=="span"||_364=="div"));
- }
- if(uid!=null){
- var _366=node.childNodes;
- for(var i=0;i<_366.length;i++){
- if(_366[i].nodeName.toUpperCase()=="TABLE"&&(_366[i].className=="ls"||_366[i].className=="xt")){
- var trs=_366[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 _36c;
- if(node.className.toUpperCase()=="REPEATERTABLECELL"&&ctx!=null){
- _36c=this.getSelectionObjectFactory().getSelectionObject(node,ctx);
- }else{
- _36c=this.getSelectionObjectFactory().getSelectionObject(node);
- }
- if(this.isCellSelected(node)==false){
- if(this.shiftKeyPressed(e)){
- var _36d=this.getSelections();
- if(_36d.length>0){
- var _36e=_36d[_36d.length-1];
- if(_36e.getLayoutType()==_36c.getLayoutType()&&(_36e.getCellRef().parentNode.parentNode==_36c.getCellRef().parentNode.parentNode)){
- if(this.cellsAreInSameColumn(_36e.getCellRef(),_36c.getCellRef())){
- this.selectVertical(_36e,_36c,_35d);
- }else{
- if(_36e.getCellRef().parentNode.rowIndex==_36c.getCellRef().parentNode.rowIndex){
- this.selectHorizontal(_36e,_36c,_35d);
- }
- }
- }
- }
- clearTextSelection(_35d);
- }else{
- if(this.ctrlKeyPressed(e)){
- clearTextSelection(_35d);
- }
- }
- this.addSelectionObject(_36c,_35d);
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_36c.getColumnName());
- }
- this.m_oCognosViewer.setCurrentNodeFocus(node);
- }else{
- if(this.ctrlKeyPressed(e)){
- this.removeSelectionObject(_36c,_35d);
- if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){
- if(!this.isColumnSelected(_36c.getTag())){
- cf.removeSelectionFromCfgVariables(_36c.getTag());
- }
- }
- clearTextSelection(_35d);
- }else{
- if(this.shiftKeyPressed(e)){
- clearTextSelection(_35d);
- }
- }
- }
- _360=true;
- }else{
- if(_361){
- var _36f=null;
- while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){
- node=node.parentNode;
- }
- if(node.id=="reportTitle"){
- _36f="TitleStyle";
- }else{
- if(node.id=="reportSubtitle"){
- _36f="SubtitleStyle";
- }else{
- if(node.id.indexOf("reportFilter")==0){
- _36f="FilterStyle";
- }
- }
- }
- if(_36f!=null){
- selectReportElement(e,node.id,_36f);
- _360=true;
- }
- }else{
- if(_362!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_363){
- var _36c=this.getSelectionObjectFactory().getSelectionObject(_362);
- this.addSelectionObject(_36c,_35d);
- }
- }
- }
- if(_360==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(_372){
- this.m_aReportContextDataArray=_372;
- };
- CSelectionController.prototype.setupMetaDataArray=function(_373){
- this.m_aReportMetadataArray=_373;
- };
- CSelectionController.prototype.addContextData=function(_374){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetContextData(_374);
- 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(_376){
- this.m_aSelectedObjects=[];
- this.m_oCDManager.SetMetadata(_376);
- if(!this.m_bUsingCCDManager){
- this.m_bUsingCCDManager=true;
- }
- };
- CSelectionController.prototype.getDrillFlag=function(_377){
- var _378="";
- if(!this.m_bUsingCCDManager){
- var _379=this.m_aReportContextDataArray[_377];
- var _37a=_379[0];
- var _37b=this.m_aReportMetadataArray[_37a];
- if(typeof _37b!="undefined"&&typeof _37b[3]!="undefined"){
- _378=_37b[3];
- }
- }else{
- _378=this.m_oCDManager.GetDrillFlag(_377);
- }
- return _378;
- };
- CSelectionController.prototype.getDrillFlagForMember=function(_37c){
- var _37d="0";
- if(!this.m_bUsingCCDManager){
- var _37e=this.getContextDataItem(_37c);
- if(_37e!=null){
- var _37f=_37e[2];
- if(_37f!=""){
- var _380=_37e[0];
- var _381=this.getMetaDataItem(_380);
- if(_381!=null){
- _37d=_381[3];
- }
- }
- }
- }else{
- _37d=this.m_oCDManager.GetDrillFlagForMember(_37c);
- }
- return (_37d==null)?0:_37d;
- };
- CSelectionController.prototype.getDataType=function(_382){
- var _383=null;
- if(!this.m_bUsingCCDManager){
- var _384=this.getRDI(_382);
- if(_384&&_384.length>2){
- _383=parseInt(_384[2],10);
- }
- }else{
- _383=parseInt(this.m_oCDManager.GetDataType(_382),10);
- }
- return _383;
- };
- CSelectionController.prototype.getUsageInfo=function(_385){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetUsage(_385);
- }
- };
- CSelectionController.prototype.isMeasure=function(_386){
- return (this.getUsageInfo(_386)==this.c_usageMeasure);
- };
- CSelectionController.prototype.getDepth=function(_387){
- var _388=null;
- if(!this.m_bUsingCCDManager){
- var _389=this.getRDI(_387);
- if(_389&&_389.length>5&&_389[1]=="R"){
- _388=_389[5];
- }
- }else{
- _388=this.m_oCDManager.GetDepth(_387);
- }
- return _388;
- };
- CSelectionController.prototype.getUseValue=function(_38a){
- var _38b="";
- if(!this.m_bUsingCCDManager){
- var _38c=this.m_aReportContextDataArray[_38a];
- if(typeof _38c[1]!="undefined"){
- _38b=_38c[1];
- }
- }else{
- _38b=this.m_oCDManager.GetDisplayValue(_38a);
- }
- return _38b;
- };
- CSelectionController.prototype.getTextValue=function(_38d){
- var _38e=null;
- for(var _38f=0;_38f<_38d.length;_38f++){
- if(_38d[_38f].style.visisbility!="hidden"){
- if(isIE()){
- _38e=_38d[_38f].innerText;
- }else{
- _38e=_38d[_38f].textContent;
- }
- var _390=_38d[_38f].nextSibling;
- while(_390!=null){
- if(_390.nodeName.toUpperCase()=="SPAN"&&_390.style.visibility!="hidden"){
- if(isIE()){
- _38e+=_390.innerText;
- }else{
- _38e+=_390.textContent;
- }
- }
- _390=_390.nextSibling;
- }
- break;
- }
- }
- return _38e;
- };
- CSelectionController.prototype.getDisplayValueFromDOM=function(_391,_392){
- var _393=null;
- var _394;
- var _395=new RegExp("(^|\\s)"+_391+"(\\s|$|:)","i");
- if(typeof _392!="undefined"){
- _394=getElementsByAttribute(_392,["span","td","th"],"ctx",_391,1,_395);
- }else{
- var _396=document.getElementById("CVIFrame"+this.m_sNamespace);
- if(typeof _396=="undefined"||_396==null){
- var _397=document.getElementById("RVContent"+this.m_sNamespace);
- if(typeof _397=="undefined"||_397==null){
- _394=getElementsByAttribute(document.body,["span","td","th"],"ctx",_391,1,_395);
- }else{
- _394=getElementsByAttribute(_397,["span","td","th"],"ctx",_391,1,_395);
- }
- }else{
- _394=getElementsByAttribute(_396.contentWindow.document.body,["span","td","th"],"ctx",_391,1,_395);
- }
- }
- var _398;
- if(_394.length>0&&(_394[0].nodeName.toUpperCase()=="TD"||_394[0].nodeName.toUpperCase()=="TH")){
- _398=_394[0].childNodes;
- }else{
- _398=_394;
- }
- if(_398.length==0||(_398[0].className.indexOf("chart_area")==-1&&_398[0].className.indexOf("bux-comment")==-1)){
- _393=this.getTextValue(_398);
- }
- return _393;
- };
- CSelectionController.prototype.getDisplayValue=function(_399,_39a){
- var _39b=this.getDisplayValueFromDOM(_399,_39a);
- if(_39b==null){
- _39b=this.getUseValue(_399);
- }
- return _39b;
- };
- CSelectionController.prototype.getDun=function(_39c){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetDUN(_39c);
- }else{
- var _39d=this.m_aReportContextDataArray[_39c];
- if(_39d&&typeof _39d[5]!="undefined"){
- var _39e=_39d[5];
- var _39f=this.m_aReportMetadataArray[_39e];
- if(typeof _39f!="undefined"&&typeof _39f[1]!="undefined"&&_39f[1]=="D"){
- return _39f[0];
- }
- }
- }
- };
- CSelectionController.prototype.getPun=function(_3a0){
- if(this.m_bUsingCCDManager){
- return this.m_oCDManager.GetPUN(_3a0);
- }
- };
- CSelectionController.prototype.getLun=function(_3a1){
- var lun="";
- if(!this.m_bUsingCCDManager){
- var _3a3=this.m_aReportContextDataArray[_3a1];
- if(_3a3&&typeof _3a3[3]!="undefined"){
- var _3a4=_3a3[3];
- var _3a5=this.m_aReportMetadataArray[_3a4];
- if(typeof _3a5!="undefined"&&typeof _3a5[1]!="undefined"&&_3a5[1]=="L"){
- lun=_3a5[0];
- }
- }
- }else{
- lun=this.m_oCDManager.GetLUN(_3a1);
- }
- return lun;
- };
- CSelectionController.prototype.isContextId=function(_3a6){
- var _3a7=false;
- if(!this.m_bUsingCCDManager){
- var _3a8=this.m_aReportContextDataArray[_3a6];
- _3a7=(typeof _3a8=="object");
- }else{
- this.m_oCDManager.FetchContextData([_3a6]);
- _3a7=this.m_oCDManager.ContextIdExists(_3a6);
- }
- return _3a7;
- };
- CSelectionController.prototype.hasContextData=function(){
- var _3a9=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){
- return true;
- }
- }else{
- _3a9=this.m_oCDManager.HasContextData();
- }
- return _3a9;
- };
- CSelectionController.prototype.hasMetadata=function(){
- var _3aa=false;
- if(!this.m_bUsingCCDManager){
- if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){
- return true;
- }
- }else{
- _3aa=this.m_oCDManager.HasMetadata();
- }
- return _3aa;
- };
- CSelectionController.prototype.getDifferentCellIndex=function(_3ab,_3ac,_3ad){
- for(var i=0;i<_3ab.cells.length;i++){
- if(this.getSelectionObjectFactory().getSelectionObject(_3ab.cells[i]).getLayoutType()=="datavalue"){
- break;
- }
- }
- if(_3ad=="relative"){
- return (_3ac-i);
- }else{
- if(_3ad=="actual"){
- return (_3ac+i);
- }
- }
- };
- CSelectionController.prototype.cellsAreInSameColumn=function(_3af,_3b0){
- if(_3af.parentNode.rowIndex==_3b0.parentNode.rowIndex){
- return false;
- }
- if(_3af.getAttribute("cid")===null){
- if(_3af.getAttribute("uid")===_3b0.getAttribute("uid")){
- if(_3af.getAttribute("type")!="datavalue"){
- return true;
- }else{
- if(this.getDifferentCellIndex(_3af.parentNode,_3af.cellIndex,"relative")==this.getDifferentCellIndex(_3b0.parentNode,_3b0.cellIndex,"relative")){
- return true;
- }
- }
- }else{
- return false;
- }
- }else{
- if(_3af.getAttribute("cid")===_3b0.getAttribute("cid")){
- return true;
- }else{
- return false;
- }
- }
- };
- CSelectionController.prototype.selectVertical=function(_3b1,_3b2,_3b3){
- if(!_3b3){
- _3b3=document;
- }
- var _3b4=_3b1.getCellRef().parentNode;
- var _3b5,i;
- var _3b7=(_3b1.getCellRef().parentNode.rowIndex<_3b2.getCellRef().parentNode.rowIndex);
- var _3b8=(_3b1.getCellRef().parentNode.cells.length-_3b1.getCellRef().cellIndex);
- while(_3b4.rowIndex!=_3b2.getCellRef().parentNode.rowIndex){
- if(_3b7){
- _3b4=_3b4.nextSibling;
- }else{
- _3b4=_3b4.previousSibling;
- }
- if(_3b4==null){
- break;
- }
- if(_3b4.cells.length>=_3b8){
- for(i=0;i<_3b4.cells.length;i++){
- if((_3b4.cells[i].getAttribute("type")==_3b1.getLayoutType())&&this.cellsAreInSameColumn(_3b1.getCellRef(),_3b4.cells[i])){
- _3b5=this.getSelectionObjectFactory().getSelectionObject(_3b4.cells[i]);
- if(this.addSelectionObject(_3b5,_3b3)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_3b5.getColumnName());
- }
- }
- break;
- }
- }
- }
- }
- };
- CSelectionController.prototype.selectHorizontal=function(_3b9,_3ba,_3bb){
- var _3bc="";
- if(_3b9.getColumnRef()==null){
- if(_3b9.getCellRef().getAttribute("uid")==_3ba.getCellRef().getAttribute("uid")){
- _3bc=_3b9.getCellRef().getAttribute("uid");
- }else{
- return;
- }
- }
- var _3bd,_3be;
- var _3bf=_3ba.getCellRef().parentNode;
- var _3c0;
- if(_3ba.getCellRef().cellIndex<_3b9.getCellRef().cellIndex){
- _3bd=_3ba.getCellRef().cellIndex;
- _3be=_3b9.getCellRef().cellIndex;
- }else{
- _3be=_3ba.getCellRef().cellIndex;
- _3bd=_3b9.getCellRef().cellIndex;
- }
- for(var i=_3bd+1;i<_3be;i++){
- if(((_3b9.getColumnRef()!=null)&&(_3b9.getLayoutType()==_3ba.getLayoutType())&&(_3b9.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_3b9.getColumnRef()==null)&&(_3bf.cells[i].getAttribute("uid")==_3bc))){
- _3c0=this.getSelectionObjectFactory().getSelectionObject(_3bf.cells[i]);
- if(this.addSelectionObject(_3c0,_3bb)){
- if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){
- cf.addSelectionToCfgVariables(_3c0.getColumnName());
- }
- }
- }
- }
- };
- CSelectionController.prototype.pageDoubleClicked=function(e){
- try{
- var node=getNodeFromEvent(e);
- if(typeof node.selectedCell!="undefined"){
- var _3c4=node;
- node=node.selectedCell;
- _3c4.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(_3c7){
- this.m_aSelectionHoverNodes=_3c7;
- };
- 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 _3cb=this.getSelectionHoverNodes();
- var _3cc=this.getAllSelectedObjects().length;
- if(!(_3cb.length==1&&_3cb[0]==node)){
- for(var i=0;i<_3cb.length;i++){
- this.sortIconHover(_3cb[i],true);
- if(_3cc==0){
- this.pageChangeHover(_3cb[i],true);
- }
- }
- this.setSelectionHoverNodes([]);
- if(_3cc==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,_3cf){
- if(!this.isValidColumnTitle(node)){
- return false;
- }
- var _3d0=this.getSortImgNode(node);
- if(_3d0!=null&&_3d0!="undefined"){
- if(_3d0.getAttribute("sortOrder")==="nosort"){
- if(_3cf){
- _3d0.style.visibility="hidden";
- }else{
- _3d0.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,_3d4){
- 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 _3d5=this.isColumnSelected(node.getAttribute("tag"));
- if(!_3d5){
- _3d5=this.isColumnCut(node.getAttribute("tag"));
- }
- if(!_3d5){
- if(_3d4){
- 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 _3d7=node.getElementsByTagName("img");
- for(var i=0;i<_3d7.length;i++){
- var sId=_3d7[i].id.toString();
- if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){
- node=_3d7[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,_3e4){
- if(node&&node.style&&node.style[_3e4]){
- return node.style[_3e4];
- }
- 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 _3e8=node;
- node=node.selectedCell;
- _3e8.removeAttribute("selectedCell");
- }
- while(node!=null&&node.tagName!="TD"){
- node=node.parentNode;
- }
- if(node!=null){
- var _3e9=this.getBackgroundImage(node);
- this.findSelectionURLs();
- if(this.getSelections().length==0||_3e9!=this.pS_backgroundImageURL){
- this.pageClicked(e);
- }
- }
- if(typeof populateContextMenu!="undefined"){
- populateContextMenu();
- moveContextMenu(e);
- }
- var _3ea=false;
- if(this.showViewerContextMenu()){
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- _3ea=true;
- }
- return _3ea;
- };
- 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,_3ed,sId){
- if(typeof populateContextMenu!="undefined"){
- goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_3ed);
- goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId);
- populateContextMenu(_3ed.toUpperCase());
- moveContextMenu(e,_3ed.toUpperCase());
- }
- if(typeof e.preventDefault=="function"){
- e.preventDefault();
- }
- return false;
- };
- CSelectionController.prototype.selectionsAreAllSameType=function(){
- var _3ef=this.getSelections();
- if(_3ef.length>0){
- var _3f0=_3ef[0].getLayoutType();
- for(var i=1;i<_3ef.length;i++){
- if(_3f0!=_3ef[i].getLayoutType()){
- return 0;
- }
- }
- return 1;
- }
- return -1;
- };
- CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){
- var _3f2=this.getSelections();
- var i=0;
- if(_3f2.length>0){
- var _3f4=_3f2[0].getColumnRef();
- if(_3f4!=null&&_3f4!=""){
- for(i=1;i<_3f2.length;i++){
- if(_3f4!=_3f2[i].getColumnRef()){
- return false;
- }
- }
- }else{
- var _3f5=_3f2[0].getCellTypeId();
- for(i=1;i<_3f2.length;i++){
- if(_3f5!=_3f2[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 _3f7=node.parentNode;
- while(typeof _3f7!="undefined"&&_3f7!=null){
- if(typeof _3f7.className!="undefined"&&_3f7.className!=null&&_3f7.className.substr(0,2)=="ft"){
- node=_3f7;
- break;
- }else{
- _3f7=_3f7.parentNode;
- }
- }
- }else{
- return false;
- }
- }
- var _3f8=node.className.substr(0,2);
- if(_3f8=="ta"||_3f8=="ts"||_3f8=="ft"){
- return true;
- }
- }
- return false;
- };
- CSelectionController.prototype.chartClicked=function(_3f9){
- this.setSelectedChartArea(_3f9);
- };
- CSelectionController.prototype.processColumnTitleNode=function(_3fa){
- if(!_3fa||!this.m_oCognosViewer.isBux){
- return;
- }
- var _3fb=_3fa.getCellRef();
- if(_3fb.getAttribute("contextAugmented")=="true"||"list"!=_3fa.getDataContainerType()||"columnTitle"!=_3fa.getLayoutType()){
- return;
- }
- var _3fc=_3fa.getSelectedContextIds();
- var _3fd=false;
- if(typeof _3fc=="object"&&_3fc!=null&&_3fc.length>0){
- if(this.isRelational(_3fc)&&this.getQueryModelId(_3fc[0][0])==null){
- _3fd=true;
- }else{
- return;
- }
- }
- var lid=_3fb.parentNode.parentNode.parentNode.getAttribute("lid");
- var _3ff=_3fb.parentNode.nextSibling;
- var _400=getChildElementsByAttribute(_3ff,"td","cid",_3fb.getAttribute("cid"));
- var _401=null;
- var _402=true;
- var _403;
- if(_400.length>0){
- var _404=_400[0];
- var _405=_404.childNodes.length;
- for(var _406=0;_406<_405;_406++){
- var _407=_404.childNodes[_406];
- if(_407.getAttribute&&((_407.nodeName.toLowerCase()=="table"&&typeof _407.getAttribute("lid")=="string")||_407.nodeName.toLowerCase()=="map"||_407.nodeName.toLowerCase()=="img"||_407.getAttribute("chartcontainer")=="true")){
- if(_406==0){
- _402=false;
- }
- }else{
- _403=[];
- if(_407.nodeName.toLowerCase()=="span"){
- _403.push(_407);
- }
- var _408=_407.getElementsByTagName?_407.getElementsByTagName("span"):[];
- for(var _409=0;_409<_408.length;++_409){
- if(lid==getImmediateLayoutContainerId(_408[_409])){
- _403.push(_408[_409]);
- }
- }
- for(var _40a=0;_40a<_403.length;++_40a){
- var _40b=_403[_40a];
- if(_40b.nodeType==1&&_40b.nodeName.toLowerCase()=="span"&&_40b.style.visibility!="hidden"){
- if(_40b.getAttribute("ctx")!=null&&_40b.getAttribute("ctx")!=""){
- _401=_40b.getAttribute("ctx");
- break;
- }
- }
- }
- }
- }
- }
- if(_401!=null){
- var _40c=_401.split("::")[0].split(":")[0];
- if(!_3fd){
- _403=_3fb.getElementsByTagName("span");
- if(_403.length!=0){
- var _40d=this.m_oCDManager.m_cd[_40c];
- var _40e=this.getTextValue(_403);
- var _40f={"u":_40e===null?"":_40e};
- if(typeof _40d!="undefined"){
- if(typeof _40d["r"]!="undefined"){
- _40f.r=_40d["r"];
- }
- if(typeof _40d["q"]!="undefined"){
- _40f.q=_40d["q"];
- }
- if(typeof _40d["i"]!="undefined"){
- _40f.i=_40d["i"];
- }
- }
- var _410="cloned"+_40c;
- this.m_oCDManager.m_cd[_410]=_40f;
- _403[0].setAttribute("ctx",_410);
- _3fa=this.getSelectionObjectFactory().processCTX(_3fa,_410);
- }
- }else{
- var qmid=this.getQueryModelId(_40c);
- if(qmid==null){
- }
- if(qmid!=null){
- var _412=_3fc[0][0];
- this.m_oCDManager.m_cd[_412].i=this.m_oCDManager.m_cd[_40c].i;
- return false;
- }
- }
- }else{
- _402=false;
- }
- if(!_402){
- _3fb.setAttribute("canSort","false");
- }
- _3fb.setAttribute("contextAugmented","true");
- };
- CSelectionController.prototype.selectionsInSameDataContainer=function(){
- try{
- var _413=this.getAllSelectedObjects();
- var _414=_413[0].getLayoutElementId();
- for(var _415=1;_415<_413.length;_415++){
- if(_414!=_413[_415].getLayoutElementId()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsFromSameDataItem=function(){
- try{
- var _416=this.getAllSelectedObjects();
- var _417=_416[0].getDataItems()[0][0];
- for(var _418=1;_418<_416.length;_418++){
- if(_417!=_416[_418].getDataItems()[0][0]){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isRelational=function(_419){
- try{
- if(!_419){
- var _41a=this.getAllSelectedObjects()[0];
- _419=_41a.getSelectedContextIds();
- }
- for(var _41b=0;_41b<_419.length;_41b++){
- for(var _41c=0;_41c<_419[_41b].length;_41c++){
- var ctx=_419[_41b][_41c];
- 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 _421=this.getAllSelectedObjects();
- for(var _422=0;_422<_421.length;_422++){
- var _423=_421[_422];
- if(_423.getLayoutType()!="columnTitle"||_423.isHomeCell()){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreMeasures=function(){
- try{
- var _424=this.getAllSelectedObjects();
- for(var _425=0;_425<_424.length;_425++){
- var _426=_424[_425];
- if(this.getUsageInfo(_426.getSelectedContextIds()[0][0])!=this.c_usageMeasure){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){
- var _427=this.getAllSelectedObjects();
- if(_427.length==0){
- return false;
- }
- for(var _428=0;_428<_427.length;_428++){
- var _429=_427[0];
- if(_429.getSelectedContextIds().length==0){
- return false;
- }
- var _42a=_429.getSelectedContextIds()[0][0];
- var mun=this.getMun(_42a);
- var _42c=this.getUsageInfo(_42a);
- if(mun==null||typeof mun=="undefined"||mun.length==0||_42c==this.c_usageMeasure){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){
- var _42d=this.getAllSelectedObjects();
- if(_42d.length==0){
- return false;
- }
- var _42e=this.selectionsHaveCalculationMetadata();
- for(var _42f=0;_42f<_42d.length;_42f++){
- var _430=_42d[_42f];
- var _431=_430.getSelectedContextIds()[0][0];
- if(!this.isCalculationOrMeasure(_431,_42e)){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){
- try{
- var _432=this.getDataContainerType();
- var _433=this.getAllSelectedObjects();
- for(var _434=0;_434<_433.length;_434++){
- var _435=_433[_434];
- var _436=_435.getSelectedContextIds();
- var _437=_436[0][0];
- var sHun=this.getHun(_437);
- if(!this.hasCalculationMetadata(_437,_436,_432)){
- return false;
- }
- }
- }
- catch(e){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.isCalculationOrMeasure=function(_439,_43a){
- var mun=this.getMun(_439);
- var _43c=this.getUsageInfo(_439);
- if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_43a)||_43c==this.c_usageMeasure)){
- return false;
- }
- return true;
- };
- CSelectionController.prototype.hasCalculationMetadata=function(_43d,_43e,_43f){
- var sHun=this.getHun(_43d);
- if(this.getUsageInfo(_43d)!=this.c_usageMeasure){
- if((this.isRelational(_43e)&&this.getQueryModelId(_43d)!=null)||(!this.isRelational(_43e)&&_43f=="list"&&(sHun&&sHun!=""))){
- return false;
- }
- }
- return true;
- };
- CSelectionController.prototype.selectionsAreDateTime=function(){
- try{
- var _441=this.getAllSelectedObjects();
- for(var _442=0;_442<_441.length;_442++){
- var _443=_441[_442];
- var _444=_443.getSelectedContextIds();
- var _445=_444[0][0];
- var _446=this.getDataType(_445);
- if(_446&&typeof this.m_ccl_dateTypes[_446]!=="undefined"){
- return true;
- }
- }
- }
- catch(e){
- return false;
- }
- return false;
- };
- CSelectionController.prototype.getSelectedObjectsJsonContext=function(){
- try{
- var _447=this.getAllSelectedObjects();
- if(_447===null||_447.length<=0){
- return null;
- }
- var _448=this.m_oCognosViewer.getModelPath();
- var _449=[];
- for(var i=0;i<_447.length;i++){
- var obj=_447[i].getContextJsonObject(this,_448);
- _449.push(obj);
- }
- return _449;
- }
- 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(_44c){
- if(!_44c){
- _44c=document;
- }
- try{
- if(typeof _44c.selection=="object"&&_44c.selection!==null){
- _44c.selection.empty();
- }else{
- if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){
- window.getSelection().removeAllRanges();
- }
- }
- }
- catch(e){
- }
- };
- function CDrillThroughTarget(_44d,_44e,_44f,_450,_451,path,_453,_454,_455,_456,_457,_458){
- this.m_label=_44d;
- this.m_outputFormat=_44e;
- this.m_outputLocale=_44f;
- this.m_showInNewWindow=_450;
- this.m_method=_451;
- this.m_path=path;
- this.m_bookmark=_453;
- this.m_parameters=_454;
- this.m_objectPaths=_455;
- this.m_prompt="false";
- this.m_dynamicDrillThrough=false;
- this.m_parameterProperties=_458;
- if(typeof _456!="undefined"&&_456!=null){
- if(_456=="yes"){
- this.m_prompt="true";
- }else{
- if(_456=="target"){
- this.m_prompt="";
- }
- }
- }
- if(typeof _457!="undefined"&&_457!=null){
- if(typeof _457=="string"){
- _457=_457=="true"?true:false;
- }
- this.m_dynamicDrillThrough=_457;
- }
- };
- 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(_459){
- var _45a=""+_459;
- if((_45a=="0")||((_459!=null)&&(_459!=false))){
- _45a=_45a.replace(/&/g,"&");
- _45a=_45a.replace(/</g,"<");
- _45a=_45a.replace(/>/g,">");
- _45a=_45a.replace(/"/g,""");
- _45a=_45a.replace(/'/g,"'");
- }else{
- if(_459==null){
- _45a="";
- }
- }
- return _45a;
- };
- function createFormField(name,_45c){
- var _45d=document.createElement("input");
- _45d.setAttribute("type","hidden");
- _45d.setAttribute("name",name);
- _45d.setAttribute("value",_45c);
- return (_45d);
- };
- function setBackURLToCloseWindow(_45e){
- var _45f=_45e.childNodes;
- if(_45f){
- for(var _460=0;_460<_45f.length;++_460){
- var _461=_45f[_460];
- var _462=_461.getAttribute("name");
- if(_462&&_462=="ui.backURL"){
- _45e.removeChild(_461);
- }
- }
- }
- _45e.appendChild(createFormField("ui.backURL","javascript:window.close();"));
- };
- function doMultipleDrills(_463,cvId){
- if(parent!=this&&parent.doMultipleDrills){
- if(getCVId()!=""&&getCVId()!=cvId){
- cvId=getCVId();
- }
- return parent.doMultipleDrills(_463,cvId);
- }else{
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Targets",_463,"text");
- }
- var oCV=null;
- try{
- oCV=getCognosViewerObjectRef(cvId);
- }
- catch(exception){
- }
- var _466=buildDrillForm(oCV);
- addDrillEnvironmentFormFields(_466,oCV);
- if(typeof oCV!="undefined"&&oCV!=null){
- var _467=oCV.getModelPath();
- _466.appendChild(createFormField("modelPath",_467));
- var _468=oCV.getSelectionController();
- var _469="";
- if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){
- _469=getViewerSelectionContext(_468,new CSelectionContext(_467));
- }
- _466.appendChild(createFormField("drillContext",_469));
- _466.appendChild(createFormField("modelDrillEnabled",_468.getModelDrillThroughEnabled()));
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _466.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value));
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _466.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"]));
- }
- }
- }
- _466.setAttribute("launchGotoPage","true");
- _466.appendChild(createFormField("drillTargets",_463));
- _466.appendChild(createFormField("invokeGotoPage","true"));
- _466.appendChild(createFormField("m","portal/drillthrough.xts"));
- _466.appendChild(createFormField("b_action","xts.run"));
- var _46a="winNAT_"+(new Date()).getTime();
- var _46b="..";
- if(oCV!=null){
- _46b=oCV.getWebContentRoot();
- var _46c=oCV.getExecutionParameters();
- if(_46c!=""){
- _466.appendChild(createFormField("encExecutionParameters",_46c));
- }
- }
- if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_466)){
- if(oCV&&typeof oCV.launchGotoPage==="function"){
- oCV.launchGotoPage(_466);
- }else{
- var _46d=_46b+"/rv/blankDrillWin.html";
- _466.target=_46a;
- window.open(_46d,_46a);
- }
- }
- }
- };
- function buildDrillForm(oCV){
- var _46f=document.getElementById("drillForm");
- if(_46f){
- document.body.removeChild(_46f);
- }
- _46f=document.createElement("form");
- if(typeof oCV!="undefined"&&oCV!=null){
- var _470=document.getElementById("formWarpRequest"+oCV.getId());
- _46f.setAttribute("target",_470.getAttribute("target"));
- _46f.setAttribute("action",_470.getAttribute("action"));
- }else{
- _46f.setAttribute("action",location.pathname);
- }
- _46f.setAttribute("id","drillForm");
- _46f.setAttribute("name","drillForm");
- _46f.setAttribute("method","post");
- _46f.style.display="none";
- document.body.appendChild(_46f);
- return _46f;
- };
- function addDrillEnvironmentFormFields(_471,oCV){
- if(window.g_dfEmail){
- _471.appendChild(createFormField("dfemail",window.g_dfEmail));
- }
- if(oCV!=null){
- _471.appendChild(createFormField("cv.id",oCV.getId()));
- if(typeof oCV.envParams["ui.sh"]!="undefined"){
- _471.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"]));
- }
- if(oCV.getViewerWidget()==null){
- if(typeof oCV.envParams["cv.header"]!="undefined"){
- _471.appendChild(createFormField("cv.header",oCV.envParams["cv.header"]));
- }
- if(typeof oCV.envParams["cv.toolbar"]!="undefined"){
- _471.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"]));
- }else{
- var _473=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH");
- if(oCV.m_viewerFragment&&_473!=null&&_473===true){
- var _474=oCV.m_viewerFragment.canShowToolbar()?"true":"false";
- _471.appendChild(createFormField("cv.toolbar",_474));
- }
- }
- }
- if(typeof oCV.envParams["ui.backURL"]!="undefined"){
- _471.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"]));
- }
- if(typeof oCV.envParams["ui.postBack"]!="undefined"){
- _471.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"]));
- }
- if(typeof oCV.envParams["savedEnv"]!="undefined"){
- _471.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"]));
- }
- if(typeof oCV.envParams["ui.navlinks"]!="undefined"){
- _471.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"]));
- }
- if(typeof oCV.envParams["lang"]!="undefined"){
- _471.appendChild(createFormField("lang",oCV.envParams["lang"]));
- }
- if(typeof oCV.envParams["ui.errURL"]!="undefined"){
- _471.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"]));
- }
- var _475="";
- if(oCV.envParams["ui.routingServerGroup"]){
- _475=oCV.envParams["ui.routingServerGroup"];
- }
- _471.appendChild(createHiddenFormField("ui.routingServerGroup",_475));
- }else{
- _471.appendChild(createFormField("cv.header","false"));
- _471.appendChild(createFormField("cv.toolbar","false"));
- }
- };
- function appendReportHistoryObjects(oCV,_477){
- if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_477!=null){
- oCV.rvMainWnd.addCurrentReportToReportHistory();
- var _478=oCV.rvMainWnd.saveReportHistoryAsXML();
- _477.appendChild(createFormField("cv.previousReports",_478));
- }
- };
- function doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483){
- var _484="";
- if(typeof cvId=="string"){
- _484=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(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483);
- }else{
- if(typeof _47b=="undefined"){
- _47b="default";
- }else{
- if(_47b=="execute"){
- _47b="run";
- }
- }
- if(_47b=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){
- _479="_blank";
- }
- var _486=buildDrillForm(oCV);
- var _487="<authoredDrillRequest>";
- _487+="<param name=\"action\">"+sXmlEncode(_47b)+"</param>";
- _487+="<param name=\"target\">"+sXmlEncode(args[0][1])+"</param>";
- _487+="<param name=\"format\">"+sXmlEncode(_47c)+"</param>";
- _487+="<param name=\"locale\">"+sXmlEncode(_47d)+"</param>";
- _487+="<param name=\"prompt\">"+sXmlEncode(_482)+"</param>";
- _487+="<param name=\"dynamicDrill\">"+sXmlEncode(_483)+"</param>";
- if(typeof oCV!="undefined"&&oCV!=null){
- _487+="<param name=\"sourceTracking\">"+oCV.getTracking()+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){
- _487+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }
- var _488=oCV.getModelPath();
- _487+="<param name=\"metadataModel\">"+sXmlEncode(_488)+"</param>";
- _487+="<param name=\"selectionContext\">"+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_488)))+"</param>";
- if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){
- _487+="<param name=\"source\">"+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+"</param>";
- }else{
- if(typeof oCV.envParams["ui.spec"]!="undefined"){
- _487+="<param name=\"sourceSpecification\">"+sXmlEncode(oCV.envParams["ui.spec"])+"</param>";
- }
- }
- }
- if(_47e!=""){
- _487+="<param name=\"bookmark\">"+_47e+"</param>";
- }
- if(_47b!="view"){
- if(typeof _47f!="undefined"){
- _487+="<param name=\"sourceContext\">"+sXmlEncode(_47f)+"</param>";
- }
- if(typeof _480!="undefined"){
- _487+="<param name=\"objectPaths\">"+sXmlEncode(_480)+"</param>";
- }
- }
- var _489=0;
- _487+="<drillParameters>";
- var _48a=[];
- for(_489=1;_489<args.length;_489++){
- var sSel=args[_489][1];
- if(_47c=="HTML"&&(sSel.indexOf("<selectChoices")==0)){
- var _48c=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(args[_489][1])));
- if(_48c){
- var sMun=_48c.getAttribute("mun");
- if(sMun!=null&&sMun!=""){
- _48c.setAttribute("useValue",sMun);
- sSel="<selectChoices>"+XMLBuilderSerializeNode(_48c)+"</selectChoices>";
- }
- }
- }
- var _48e=args[_489][0];
- var _48f=false;
- for(var i=0;i<_48a.length;i++){
- var _491=_48a[i];
- if(_491.name===_48e&&_491.value===sSel){
- _48f=true;
- break;
- }
- }
- if(!_48f){
- _48a.push({"name":_48e,"value":sSel});
- _487+="<param name=\""+sXmlEncode(_48e)+"\">"+sXmlEncode(sSel)+"</param>";
- }
- }
- _487+="</drillParameters>";
- _487+=getExecutionParamNode(oCV);
- _487+="</authoredDrillRequest>";
- _486.appendChild(createFormField("authoredDrill.request",_487));
- _486.appendChild(createFormField("ui.action","authoredDrillThrough2"));
- _486.appendChild(createFormField("b_action","cognosViewer"));
- addDrillEnvironmentFormFields(_486,oCV);
- if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_486)){
- if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){
- oCV.sendDrillThroughRequest(_486);
- }else{
- if(_479==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){
- oCV.m_viewerFragment.raiseAuthoredDrillEvent(_487);
- }else{
- if((oCV!=null&&oCV.getViewerWidget()!=null)||_479!=""){
- setBackURLToCloseWindow(_486);
- var _492="winNAT_"+(new Date()).getTime();
- var _493="..";
- if(oCV!=null){
- _493=oCV.getWebContentRoot();
- }
- var _494=_493+"/rv/blankDrillWin.html";
- if(_484){
- _494+="?cv.id="+_484;
- }
- if(oCV==null){
- _494=window.location.href.substring(0,window.location.href.indexOf("/v1"));
- _494+="/?perspective=classicviewer";
- _494+="&altDrillFlag=true";
- _494+="&format="+sXmlEncode(_47c);
- var _495=_486.getAttribute("name")+Date.now().toString();
- _486.setAttribute("name",_495);
- if(typeof (Storage)!=="undefined"){
- localStorage.setItem(_495,_486.outerHTML);
- _494+="&drillFormLabel="+_495;
- }else{
- console.log("Sorry! No Web Storage support...");
- }
- }
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_487,"xml");
- }
- _486.target=_492;
- newWindow=window.open(_494,_492);
- }else{
- appendReportHistoryObjects(oCV,_486);
- if(window.gViewerLogger){
- window.gViewerLogger.log("Drill Specification",_487,"xml");
- }
- _486.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self";
- _486.submit();
- if(oCV!=null&&!oCV.getDrillFormTarget){
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10);
- }
- }
- }
- }
- }
- }
- };
- function getExecutionParamNode(oCV){
- var _497="";
- if(typeof oCV!="undefined"&&oCV!=null){
- var _498=oCV.getExecutionParameters();
- if(_498!=""){
- _497+="<param name=\"executionParameters\">";
- _497+=sXmlEncode(_498);
- _497+="</param>";
- }
- }
- return _497;
- };
- function doSingleDrillThrough(_499,_49a,cvId){
- var _49c=_499[0][0];
- if(typeof _49c=="undefined"||_49c==null){
- return;
- }
- var _49d=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_49c]:drillTargets[_49c];
- if(typeof _49d=="undefined"){
- return;
- }
- if(_49a!=""&&_49d.getPath()==""){
- document.location="#"+_49a;
- }else{
- var args=[];
- args[args.length]=["ui.object",_49d.getPath()];
- for(var _49f=1;_49f<_499.length;++_49f){
- args[args.length]=_499[_49f];
- }
- var _4a0="";
- if(_49d.getShowInNewWindow()=="true"){
- _4a0="_blank";
- }
- var _4a1=_49d.getParameters();
- var _4a2=_49d.getObjectPaths();
- var _4a3=cvId;
- if(!cvId){
- _4a3=getCVId();
- }
- doSingleDrill(_4a0,args,_49d.getMethod(),_49d.getOutputFormat(),_49d.getOutputLocale(),_49a,_4a1,_4a2,_4a3,_49d.getPrompt(),false);
- }
- };
- function getCVId(){
- var _4a4="";
- try{
- _4a4=this.frameElement.id.substring("CVIFrame".length);
- }
- catch(exception){
- }
- return _4a4;
- };
- function doMultipleDrillThrough(_4a5,cvId){
- var _4a7="<rvDrillTargets>";
- for(var _4a8=0;_4a8<_4a5.length;++_4a8){
- var _4a9=_4a5[_4a8];
- if(_4a9.length<3){
- continue;
- }
- var _4aa=_4a9[0];
- if(typeof _4aa=="undefined"||_4aa==null){
- continue;
- }
- var _4ab=_4a9[1];
- if(typeof _4ab=="undefined"||_4ab==null){
- continue;
- }
- var _4ac=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_4aa]:drillTargets[_4aa];
- if(typeof _4ac=="undefined"||_4ac==null){
- continue;
- }
- if(_4ab===null||_4ab===""){
- _4ab=_4ac.getLabel();
- }
- _4a7+="<drillTarget ";
- _4a7+="outputFormat=\"";
- _4a7+=_4ac.getOutputFormat();
- _4a7+="\" ";
- _4a7+="outputLocale=\"";
- _4a7+=_4ac.getOutputLocale();
- _4a7+="\" ";
- _4a7+="label=\"";
- _4a7+=sXmlEncode(_4ab);
- _4a7+="\" ";
- _4a7+="path=\"";
- _4a7+=sXmlEncode(_4ac.getPath());
- _4a7+="\" ";
- _4a7+="showInNewWindow=\"";
- _4a7+=_4ac.getShowInNewWindow();
- _4a7+="\" ";
- _4a7+="method=\"";
- _4a7+=_4ac.getMethod();
- _4a7+="\" ";
- _4a7+="prompt=\"";
- _4a7+=_4ac.getPrompt();
- _4a7+="\" ";
- _4a7+="dynamicDrill=\"";
- _4a7+=_4ac.isDynamicDrillThrough();
- _4a7+="\">";
- for(var _4ad=2;_4ad<_4a9.length;++_4ad){
- _4a7+=_4a9[_4ad];
- }
- _4a7+=_4ac.getParameters();
- _4a7+=_4ac.getObjectPaths();
- _4a7+="</drillTarget>";
- }
- _4a7+="</rvDrillTargets>";
- if(!cvId){
- cvId=getCVId();
- }
- doMultipleDrills(_4a7,cvId);
- };
- function CScriptLoader(_4ae){
- 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=_4ae;
- 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(_4af){
- this.m_bHandleStylesheetLimit=_4af;
- };
- CScriptLoader.prototype.executeScripts=function(_4b0,_4b1){
- if(this.isReadyToExecute()){
- for(var _4b2=0;_4b2<this.m_aScripts.length;_4b2++){
- if(this.m_aScripts[_4b2]){
- var _4b3=document.createElement("script");
- _4b3.setAttribute("language","javascript");
- _4b3.setAttribute("type","text/javascript");
- this.addNamespaceAttribute(_4b3,_4b1);
- _4b3.text=this.m_aScripts[_4b2];
- document.getElementsByTagName("head").item(0).appendChild(_4b3);
- }
- }
- this.m_aScripts=[];
- for(var idx=0;idx<this.m_aDocumentWriters.length;++idx){
- var _4b5=this.m_aDocumentWriters[idx];
- _4b5.execute();
- }
- this.m_aDocumentWriters=[];
- if(!this.m_aScripts.length&&!this.m_aDocumentWriters.length){
- if(typeof _4b0=="function"){
- _4b0();
- }
- this.m_bHasCompletedExecution=true;
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_4b0,_4b1);
- },this.m_iInterval);
- }
- }else{
- setTimeout(function(){
- window.gScriptLoader.executeScripts(_4b0,_4b1);
- },this.m_iInterval);
- }
- };
- CScriptLoader.prototype.isReadyToExecute=function(){
- for(var _4b6 in this.m_oFiles){
- if(this.m_oFiles[_4b6]!="complete"){
- return false;
- }
- }
- if(this.m_aScriptLoadQueue.length>0){
- return false;
- }
- return true;
- };
- CScriptLoader.prototype.loadCSS=function(_4b7,_4b8,_4b9,_4ba){
- var aM=_4b7.match(this.m_reHasCss);
- if(aM){
- for(var i=0;i<aM.length;i++){
- if(aM[i].match(this.m_reFindCssPath)){
- var _4bd=RegExp.$1;
- if(_4bd.indexOf("GlobalReportStyles")!=-1){
- this.validateGlobalReportStyles(_4bd);
- if(_4b9){
- if(_4bd.indexOf("GlobalReportStyles.css")!=-1){
- _4bd=_4bd.replace("GlobalReportStyles.css","GlobalReportStyles_10.css");
- }
- var _4be=this.getGlobalReportStylesClassPrefix(_4bd);
- _4bd=_4bd.replace(".css","_NS.css");
- if(_4b8){
- _4b8.className="buxReport "+_4be;
- }
- }
- }
- this.loadObject(_4bd,_4ba);
- }
- _4b7=_4b7.replace(aM[i],"");
- }
- }
- return _4b7;
- };
- CScriptLoader.prototype.getGlobalReportStylesClassPrefix=function(_4bf){
- var _4c0=null;
- if(_4bf.indexOf("GlobalReportStyles_11.4.css")!=-1){
- _4c0="v114";
- }
- if(_4bf.indexOf("GlobalReportStyles_11.css")!=-1){
- _4c0="v11";
- }
- if(_4bf.indexOf("GlobalReportStyles_10.css")!=-1){
- _4c0="v10";
- }else{
- if(_4bf.indexOf("GlobalReportStyles_1.css")!=-1){
- _4c0="v1";
- }else{
- if(_4bf.indexOf("GlobalReportStyles_none.css")!=-1){
- _4c0="vnone";
- }else{
- if(_4bf.indexOf("GlobalReportStyles.css")!=-1){
- _4c0="v8";
- }
- }
- }
- }
- return _4c0;
- };
- CScriptLoader.prototype.validateGlobalReportStyles=function(_4c1){
- var _4c2=document.getElementsByTagName("link");
- for(var i=0;i<_4c2.length;++i){
- var _4c4=_4c2[i];
- if(_4c4.getAttribute("href").indexOf("GlobalReportStyles")!=-1){
- if(_4c4.getAttribute("href").toLowerCase()!=_4c1.toLowerCase()){
- var _4c5=_4c1.split("/");
- var _4c6=_4c4.getAttribute("href").split("/");
- if(_4c5[_4c5.length-1]!=_4c6[_4c6.length-1]){
- this.m_ajaxWarnings.push("Ajax response contains different versions of the GlobalReportStyles.css.");
- }
- }
- break;
- }
- }
- };
- CScriptLoader.prototype.loadFile=function(_4c7,_4c8,_4c9){
- var sURL="";
- if(_4c7){
- sURL=_4c7;
- }
- var _4cb=null;
- if(typeof _4c8=="string"){
- _4cb=_4c8;
- }
- var _4cc="POST";
- if(_4c9=="GET"){
- _4cc="GET";
- }
- var _4cd=null;
- if(typeof ActiveXObject!="undefined"){
- _4cd=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- _4cd=new XMLHttpRequest();
- }
- _4cd.open(_4cc,sURL,false);
- _4cd.send(_4cb);
- return _4cd.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 _4cf=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift();
- window.gScriptLoader.loadObject(_4cf.sName,_4cf.sNamespaceId);
- }
- }
- if(window.gScriptLoader.m_aScriptLoadQueue.length>0){
- window.gScriptLoader.loadObject();
- }
- }
- };
- CScriptLoader.prototype.moveLinks=function(node){
- if(!node){
- return;
- }
- var _4d1=node.getAttribute("href");
- if(!_4d1||this.m_oFiles[_4d1]){
- return;
- }
- this.m_oFiles[_4d1]="complete";
- document.getElementsByTagName("head").item(0).appendChild(node);
- };
- CScriptLoader.prototype.loadObject=function(_4d2,_4d3){
- var _4d4=null;
- if(typeof _4d2==="undefined"){
- if(this.m_aScriptLoadQueue.length>0){
- var _4d5=this.m_aScriptLoadQueue.shift();
- _4d2=_4d5.name;
- _4d3=_4d5.namespaceId;
- }else{
- return;
- }
- }
- if(this.m_oFiles[_4d2]){
- return;
- }
- if(this.m_bBlockScriptLoading){
- this.m_aScriptLoadQueue.push({"name":_4d2,"namespaceId":_4d3});
- }else{
- if(_4d2.match(this.m_reIsCss)){
- _4d4=document.createElement("link");
- _4d4.setAttribute("rel","stylesheet");
- _4d4.setAttribute("type","text/css");
- _4d4.setAttribute("href",_4d2);
- if(window.isIE&&window.isIE()){
- _4d4.onreadystatechange=CScriptLoader_onReadyStateChange;
- _4d4.onload=CScriptLoader_onReadyStateChange;
- _4d4.onerror=CScriptLoader_onReadyStateChange;
- this.m_oFiles[_4d2]="new";
- }else{
- this.m_oFiles[_4d2]="complete";
- }
- }else{
- if(_4d2.match(this.m_reIsJavascript)){
- if(_4d2.match(this.m_reIsPromptingLocaleJavascript)){
- if(this.m_bBlockPromptingLocaleScripts){
- this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_4d2,"sNamespaceId":_4d3});
- return;
- }
- this.m_bBlockPromptingLocaleScripts=true;
- }
- this.m_bBlockScriptLoading=this.m_bUseScriptBlocking;
- _4d4=document.createElement("script");
- _4d4.setAttribute("language","javascript");
- _4d4.setAttribute("type","text/javascript");
- _4d4.setAttribute("src",_4d2);
- _4d4.sFilePath=_4d2;
- _4d4.onreadystatechange=CScriptLoader_onReadyStateChange;
- _4d4.onload=CScriptLoader_onReadyStateChange;
- _4d4.onerror=CScriptLoader_onReadyStateChange;
- this.addNamespaceAttribute(_4d4,_4d3);
- this.m_oFiles[_4d2]="new";
- }
- }
- if(_4d4){
- document.getElementsByTagName("head").item(0).appendChild(_4d4);
- }
- }
- };
- CScriptLoader.prototype.loadScriptsFromDOM=function(_4d6,_4d7,_4d8){
- if(!_4d6){
- return;
- }
- var _4d9=_4d6.getElementsByTagName("script");
- while(_4d9.length>0){
- var _4da=_4d9[0];
- if(_4da.getAttribute("src")!=null&&_4da.getAttribute("src").length>0){
- this.loadObject(_4da.getAttribute("src"),_4d7);
- }else{
- var _4db=_4da.innerHTML;
- var _4dc=false;
- if(_4db.indexOf("document.write")!=-1){
- var _4dd=_4db.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,"");
- _4dc=(_4dd.indexOf("document.write")!=-1);
- }
- if(_4dc){
- if(_4d8){
- var sId="CVScriptFromDOMPlaceHolder"+_4d9.length+_4d7;
- var _4df=_4da.ownerDocument.createElement("span");
- _4df.setAttribute("id",sId);
- _4da.parentNode.insertBefore(_4df,_4da);
- this.m_aDocumentWriters.push(new CDocumentWriter(sId,_4db));
- }
- }else{
- if(_4db.length>0){
- this.m_aScripts.push(_4db);
- }
- }
- }
- _4da.parentNode.removeChild(_4da);
- }
- };
- CScriptLoader.prototype.loadStyles=function(_4e0,_4e1){
- if(!_4e0||!_4e0.parentNode){
- return;
- }
- var _4e2=_4e0.parentNode.getElementsByTagName("style");
- while(_4e2.length>0){
- var _4e3=_4e2[0];
- if(_4e1){
- this.addNamespaceAttribute(_4e3,_4e1);
- }
- 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(_4e3);
- }
- };
- CScriptLoader.prototype.loadAll=function(_4e5,_4e6,_4e7,_4e8){
- this.m_bScriptLoaderCalled=true;
- this.m_bHasCompletedExecution=false;
- this.loadScriptsFromDOM(_4e5,_4e7,_4e8);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.loadStyles(_4e5,_4e7);
- if(this.containsAjaxWarnings()){
- return false;
- }
- this.executeScripts(_4e6,_4e7);
- return true;
- };
- CScriptLoader.prototype.setFileState=function(_4e9,_4ea){
- this.m_oFiles[_4e9]=_4ea;
- };
- CScriptLoader.prototype.containsAjaxWarnings=function(){
- if(this.m_bIgnoreAjaxWarnings){
- return false;
- }else{
- return (this.m_ajaxWarnings.length>0);
- }
- };
- CScriptLoader.prototype.addNamespaceAttribute=function(_4eb,_4ec){
- if(typeof _4ec==="string"){
- _4eb.setAttribute("namespaceId",_4ec);
- }
- };
- if(typeof window.gScriptLoader=="undefined"){
- window.gScriptLoader=new CScriptLoader();
- }
- var InfoBarHelper={};
- InfoBarHelper.getContainerId=function(oCV,_4ee){
- var _4ef=oCV.getLayoutElement(_4ee);
- var lid=_4ef.getAttribute("lid");
- var _4f1=lid===null?"":lid;
- _4f1=_4f1.replace(oCV.getViewerWidget().getViewerId(),"").replace("RAP_NDH_","");
- return _4f1;
- };
- InfoBarHelper.infoBarRemoveFilter=function(_4f2,_4f3,_4f4,_4f5){
- var oCV=eval("window.oCV"+_4f2);
- if(typeof oCV!="undefined"){
- var _4f7=this.getContainerId(oCV,_4f3);
- oCV.executeAction("Filter",{type:"remove",id:_4f7,item:_4f4,details:_4f5});
- }
- };
- InfoBarHelper.infoBarRemoveSlider=function(_4f8,_4f9){
- var oCV=eval("window.oCV"+_4f8);
- var _4fb={};
- _4fb[_4f9]={blockedEvents:["*"]};
- oCV.fireWidgetEvent("com.ibm.bux.widget.updateEventFilter",_4fb);
- if(typeof oCV!="undefined"){
- oCV.executeAction("UpdateDataFilter",{"filterPayload":"{ \"clientId\" :\""+_4f9+"\"}"});
- }
- };
- InfoBarHelper.infoBarRemoveSort=function(_4fc,_4fd,_4fe,_4ff){
- var oCV=eval("window.oCV"+_4fc);
- if(typeof oCV!="undefined"){
- var _501=this.getContainerId(oCV,_4fd);
- if(_4ff=="true"){
- oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe,type:"label"});
- }else{
- oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe});
- }
- }
- };
- dojo.provide("InfoBarBase");
- dojo.declare("InfoBarBase",null,{constructor:function(_502){
- this.m_cognosViewer=_502;
- this.m_parameterValues=new CParameterValues();
- var _503=XMLBuilderLoadXMLFromString(this.m_cognosViewer.getExecutionParameters());
- if(_503.childNodes.length==1){
- this.m_parameterValues.loadWithOptions(_503.childNodes[0],false);
- }
- this.m_parameterStringOperators=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN,RV_RES.IDS_JS_INFOBAR_AND_TEXT,RV_RES.IDS_JS_FILTER_EXCLUDE);
- this.c_SliderCheckboxParameterPrefix="BusinessInsight.";
- this.m_containerInfo=null;
- this.m_editableFilters=null;
- this.m_editableSorts=null;
- this.m_editableSliders=null;
- this.m_id=null;
- this.m_layoutIndex=null;
- this.m_timingDetails=null;
- },setContainerInfo:function(_504){
- this.m_containerInfo=_504;
- },setTimingDetails:function(_505){
- this.m_timingDetails=_505;
- },setEditableFilters:function(_506){
- this.m_editableFilters=_506;
- },setId:function(_507){
- this.m_id=_507;
- },getId:function(){
- return this.m_id;
- },hasPrompts:function(){
- var _508=this.m_parameterValues.length();
- for(var _509=0;_509<_508;++_509){
- var _50a=this.m_parameterValues.getAt(_509);
- if(_50a!==null&&_50a.length()>0&&_50a.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
- return true;
- }
- }
- return false;
- },addPromptDetails:function(_50b){
- var _50c="";
- var _50d=(_50b!==true);
- if(this.hasPrompts()){
- var _50e=this.m_id+"instructions "+this.m_id+"_promptString "+this.m_id+"_lockedString ";
- for(var _50f=0,_510=this.m_parameterValues.length();_50f<_510;++_50f){
- var _511=_50e+this.m_id+_50f+"_promptDetail";
- var _512=this.m_parameterValues.getAt(_50f);
- var _513=_512.length();
- if(_512!==null&&_513>0&&_512.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
- _50c+="<div class=\"infoBarDetailRow\" aria-labelledby=\""+_511+"\" role=\"listitem\""+(!_50d?">":" tabindex=\"-1\">");
- _50c+="<table role=\"presentation\"><tr>";
- _50c+=this.addInfoBarIcon("infobar_filter.gif",true);
- _50c+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_50f+"_promptDetail\">";
- _50c+="<span class=\"bibi\">";
- _50c+=html_encode(_512.name());
- _50c+="</span>";
- _50c+=" : ";
- _50c+=_512.toString(this.m_parameterStringOperators);
- _50c+="</td>";
- _50c+=(_50d?this.addInfoBarIcon("infobar_locked.gif",false):"");
- _50c+="</tr></table></div>";
- }
- }
- }
- return _50c;
- },getPromptDetailsInJSON:function(){
- var _514=[];
- if(this.hasPrompts()){
- for(var _515=0,_516=this.m_parameterValues.length();_515<_516;++_515){
- var _517=this.m_parameterValues.getAt(_515);
- var _518=_517.length();
- if(_517!==null&&_518>0&&_517.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){
- _514.push({"type":"prompt","label":_517.name(),"description":_517.toString(this.m_parameterStringOperators)});
- }
- }
- }
- return _514;
- },addSliderDetails:function(_519){
- var _51a="";
- var _51b=(_519!==true);
- if(this.m_containerInfo!==null&&this.m_editableSliders){
- var _51c=this.m_id+"instructions "+this.m_id+"_sliderString ";
- var _51d=this.m_editableSliders.length;
- for(var _51e=0;_51e<_51d;++_51e){
- var _51f=_51c+this.m_id+_51e+"_sliderDetail";
- var _520=this.m_editableSliders[_51e];
- if(_520&&_520.name){
- _51a+="<div class=\"infoBarDetailRow\" type=\"slider\" aria-labelledby=\""+_51f+"\" role=\"listitem\""+(!_51b?">":" tabindex=\"-1\">");
- _51a+="<table role=\"presentation\"><tr>";
- if(typeof _520.controlType!="undefined"&&_520.controlType=="checkbox"){
- _51a+=this.addInfoBarIcon("infobar_select.gif",true);
- }else{
- _51a+=this.addInfoBarIcon("infobar_slider.gif",true);
- }
- _51a+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_51e+"_sliderDetail\">";
- _51a+="<span class=\"bibi\">";
- _51a+=(_520.label?_520.label:_520.name);
- _51a+=(_520.attributeName)?(" - "+_520.attributeName):"";
- _51a+="</span>";
- _51a+=" : ";
- if(typeof _520.values!="undefined"){
- _51a+=this.processFilterOperatorItems(_520.values);
- }else{
- if(_520.min==_520.max){
- _51a+=_520.min;
- }else{
- _51a+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_520.min,_520.max);
- }
- }
- _51a+="</td>";
- _51a+=(_51b?this.addRemoveSliderButton(_520.clientId):"");
- _51a+="</tr></table></div>";
- }
- }
- }
- return _51a;
- },getSliderDetailsInJSON:function(){
- var _521=[];
- if(this.m_containerInfo!==null&&this.m_editableSliders){
- var _522=this.m_id+"instructions "+this.m_id+"_sliderString ";
- var _523=this.m_editableSliders.length;
- for(var _524=0;_524<_523;++_524){
- var _525=this.m_editableSliders[_524];
- if(_525&&_525.name){
- var _526=(_525.label?_525.label:_525.name);
- if(_525.attributeName){
- _526+=(" "+_525.attributeName);
- }
- var _527="";
- if(typeof _525.values!="undefined"){
- _527+=this.processFilterOperatorItems(_525.values);
- }else{
- if(_525.min==_525.max){
- _527+=_525.min;
- }else{
- _527+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_525.min,_525.max);
- }
- }
- _521.push({"type":"slider","label":_526,"description":_527});
- }
- }
- }
- return _521;
- },hasLockedFilters:function(){
- var _528=false;
- if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){
- var _529=this.m_containerInfo.lockedFilters.length;
- for(var _52a=0;_52a<_529;++_52a){
- var _52b=this.m_containerInfo.lockedFilters[_52a];
- if(typeof _52b.staticText!="undefined"&&_52b.staticText.charAt(0)!==" "){
- _528=true;
- }
- }
- }
- return _528;
- },addLockedFilterDetails:function(_52c){
- var _52d="";
- var _52e=(_52c!==true);
- if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){
- var _52f=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+"_lockedString ";
- var _530=this.m_containerInfo.lockedFilters.length;
- for(var _531=0;_531<_530;++_531){
- var _532=_52f+this.m_id+_531+"_lockedFilterDetail";
- var _533=this.m_containerInfo.lockedFilters[_531];
- if(typeof _533.staticText!="undefined"&&_533.staticText.charAt(0)!==" "){
- _52d+="<div class=\"infoBarDetailRow\" aria-labelledby=\""+_532+"\" role=\"listitem\""+(!_52e?">":" tabindex=\"-1\">");
- _52d+="<table role=\"presentation\"><tr>";
- _52d+=this.addInfoBarIcon("infobar_filter.gif",true);
- _52d+="</td>";
- _52d+="<td class=\"infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_531+"_lockedFilterDetail\">";
- _52d+="<span class=\"bibi\">";
- _52d+=html_encode(_533.staticText);
- _52d+="</span>";
- _52d+="</td>";
- _52d+=(_52e?this.addInfoBarIcon("infobar_locked.gif",false):"");
- _52d+="</tr></table></div>";
- }
- }
- }
- return _52d;
- },addFilteredItemsDetails:function(_534){
- var _535="";
- var _536=(_534!==true);
- if(this.m_editableFilters){
- for(var _537=0,_538=this.m_editableFilters.length;_537<_538;++_537){
- var _539=this.m_editableFilters[_537];
- var _53a=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+_537+"_filterDetail";
- var _53b=(typeof _539.itemLabel=="string")?_539.itemLabel:_539.item;
- _535+="<div class=\"infoBarDetailRow\" type=\"filter\" aria-labelledby=\""+_53a+"\" role=\"listitem\""+(!_536?">":" tabindex=\"-1\">");
- _535+="<table role=\"presentation\"><tr>";
- _535+=this.addInfoBarIcon("infobar_filter.gif",true);
- _535+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_537+"_filterDetail\">";
- _535+=this.createHiddenSpan(this.m_id+_537+"_filterPosition",getCurrentPosistionString(this.m_cognosViewer,_537+1,_538));
- _535+=html_encode(enforceTextDir(_53b));
- _535+=this.processFilterOperator(_539);
- _535+="</td>";
- _535+=(_536?this.addRemoveFilterButton(_539.item,this.processFilterDetails(_539)):"");
- _535+="</tr></table></div>";
- }
- }
- return _535;
- },getFilteredItemsDetailsInJSON:function(){
- var _53c=[];
- if(this.m_editableFilters){
- for(var _53d=0,_53e=this.m_editableFilters.length;_53d<_53e;++_53d){
- var _53f=this.m_editableFilters[_53d];
- var _540=(typeof _53f.itemLabel=="string")?_53f.itemLabel:_53f.item;
- _53c.push({"type":"filter","label":enforceTextDir(_540)+this.processFilterOperator(_53f),"description":""});
- }
- }
- return _53c;
- },addSortDetails:function(_541){
- var _542="";
- var _543=(_541!==true);
- if(this.m_editableSorts){
- for(var _544=0,_545=this.m_editableSorts.length;_544<_545;++_544){
- var _546=this.m_editableSorts[_544];
- var _547=this.m_id+"instructions "+this.m_id+"_sortString "+this.m_id+_544+"_sortDetail";
- _542+="<div class=\"infoBarDetailRow\" type=\"sort\" aria-labelledby=\""+_547+"\" role=\"listitem\""+(!_543?">":" tabindex=\"-1\">");
- _542+="<table role=\"presentation\"><tr>";
- _542+=this.addInfoBarIcon("infobar_sort.gif",true);
- var _548;
- if(typeof _546.labels=="string"||typeof _546.valuesOf=="string"){
- var _549=(typeof _546.labels=="string")?_546.labels:_546.valuesOf;
- _548=(typeof _546.itemLabel=="string")?_546.itemLabel:_549;
- _542+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_544+"_sortDetail\">";
- _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545));
- _542+=html_encode(_548);
- _542+=" : ";
- if(_546.byItems instanceof Array){
- for(var _54a=0;_54a<_546.byItems.length;++_54a){
- _542+=(_54a>0)?" - ":"";
- _542+=_546.byItems[_54a].item;
- _542+=", ";
- _542+=this.m_sortStrings[_546.byItems[_54a].order];
- }
- }else{
- if(typeof _546.valuesOf=="string"){
- _542+=this.m_sortStrings["byValue"];
- }else{
- _542+=this.m_sortStrings["byLabel"];
- }
- _542+=", ";
- _542+=this.m_sortStrings[_546.order];
- }
- _542+="</td>";
- _542+=(_543?this.addRemoveSortButton(_549,"true"):"");
- }else{
- if(_546.valuesOf instanceof Array){
- if(_546.valuesOf.length>0&&typeof _546.valuesOf[0].item=="string"){
- _542+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_544+"_sortDetail\">";
- _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545));
- _548="";
- if(typeof _546.itemLabel=="string"){
- _548=_546.itemLabel;
- }else{
- for(var _54b=0;_54b<_546.valuesOf.length;++_54b){
- _548+=" - ";
- _548+=_546.valuesOf[_54b].item;
- }
- _548=_548.substring(3);
- }
- _542+=_548;
- _542+=" : ";
- _542+=this.m_sortStrings["byValue"];
- _542+=", ";
- _542+=this.m_sortStrings[_546.order];
- _542+="</td>";
- _542+=(_543?this.addRemoveSortButton(_546.valuesOf[0].item,"false"):"");
- }
- }
- }
- _542+="</tr></table></div>";
- }
- }
- return _542;
- },addInfoBarIcon:function(_54c,_54d){
- return "<td class=\"infoBar"+(_54d?"Left":"Right")+"Icon\">"+"<img alt=\"\" src=\""+this.m_cognosViewer.getWebContentRoot()+"/rv/images/"+_54c+"\"/>"+"</td>";
- },createHiddenSpan:function(id,text){
- return "<span style=\"display:none\" id=\""+id+"\"> "+text+" </span>";
- },addRemoveFilterButton:function(item,_551){
- var _552="";
- var _553=this.m_cognosViewer.getViewerWidget();
- if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_553.isConsumeUser()){
- var _554=RV_RES.IDS_JS_DELETE;
- var _555=this.m_id+"_delete";
- _552="<td class=\"infoBarRightIcon\" filterItem=\""+item+"\""+(_551?" details=\""+_551+"\"":"")+">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveFilter('"+this.m_cognosViewer.getId()+"',"+this.m_layoutIndex+",'"+item+"'"+(_551?",'"+_551+"'":"")+");\" aria-labelledby=\""+_555+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_554+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_554+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
- }
- return _552;
- },addRemoveSliderButton:function(_556){
- var _557="";
- var _558=this.m_cognosViewer.getViewerWidget();
- if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_558.isConsumeUser()){
- var _559=RV_RES.IDS_JS_DELETE;
- var _55a=this.m_id+"_delete";
- _557="<td class=\"infoBarRightIcon\" slider=\""+_556+"\">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveSlider('"+this.m_cognosViewer.getId()+"','"+_556+"');\" aria-labelledby=\""+_55a+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_559+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_559+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
- }
- return _557;
- },addRemoveSortButton:function(item,_55c){
- var _55d="";
- var _55e=this.m_cognosViewer.getViewerWidget();
- if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!this.m_cognosViewer.isBlacklisted("Sort")){
- var _55f=RV_RES.IDS_JS_DELETE;
- var _560=this.m_id+"_delete";
- _55d="<td class=\"infoBarRightIcon\" sortItem=\""+item+"\" byLabel=\""+_55c+"\">"+"<button class=\"dijitStretch infoBarDeleteButton BUXNoPrint\" onclick=\"InfoBarHelper.infoBarRemoveSort('"+this.m_cognosViewer.getId()+"',"+this.m_layoutIndex+",'"+item+"','"+_55c+"');\" aria-labelledby=\""+_560+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_55f+"\">"+"<span class=\"dijitInline infoBarIconDelete\" title=\""+_55f+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarDeleteButtonText\">x</span>"+"</button>"+"</td>";
- }
- return _55d;
- },processFilterOperator:function(_561){
- var _562="";
- if(typeof _561["in"]!="undefined"){
- _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT,this.processFilterOperatorItems(_561["in"]));
- }else{
- if(typeof _561["notIn"]!="undefined"){
- _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT,this.processFilterOperatorItems(_561["notIn"]));
- }else{
- if(typeof _561["range"]!="undefined"||typeof _561["notRange"]!="undefined"){
- var _563=typeof _561["range"]!="undefined"?RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT:RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT;
- var _564=typeof _561["range"]!="undefined"?_561["range"]:_561["notRange"];
- for(var _565=0;_565<_564.length;++_565){
- var _566=_564[_565];
- _562+=" "+CViewerCommon.getMessage(_563,[_566.from,_566.to]);
- }
- }else{
- if(typeof _561["lessThan"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_561["lessThan"];
- }else{
- if(typeof _561["lessThanEqual"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_561["lessThanEqual"];
- }else{
- if(typeof _561["greaterThan"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_561["greaterThan"];
- }else{
- if(typeof _561["greaterThanEqual"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_561["greaterThanEqual"];
- }else{
- if(typeof _561["not"]!="undefined"&&_561["not"]=="true"){
- _562+=" "+RV_RES.IDS_JS_FILTER_IS_NOT;
- }
- if(typeof _561["endsWith"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_ENDS_WITH+" "+_561["endsWith"];
- }else{
- if(typeof _561["beginsWith"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_BEGINS_WITH+" "+_561["beginsWith"];
- }else{
- if(typeof _561["contains"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_CONTAINS+" "+_561["contains"];
- }else{
- if(typeof _561["isMatchesSQLPatternFilter"]!="undefined"){
- _562+=" "+RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER+" "+_561["isMatchesSQLPatternFilter"];
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return _562;
- },processFilterDetails:function(_567){
- return html_encode("["+dojo.toJson(_567)+"]");
- },processFilterOperatorItems:function(_568){
- var _569="";
- for(var _56a=0;_56a<_568.length;++_56a){
- if(_56a!==0){
- _569+=(RV_RES.IDS_JS_LIST_SEPARATOR+" ");
- }
- _569+=enforceTextDir(_568[_56a]);
- }
- return _569;
- },processFilterOperatorRange:function(_56b,_56c,_56d){
- if(typeof _56c=="undefined"){
- _56c=" ";
- }
- if(typeof _56d=="undefined"){
- _56d=" ";
- }
- return CViewerCommon.getMessage(_56b,[_56c,_56d]);
- }});
- dojo.declare("InfoBar",InfoBarBase,{constructor:function(_56e,_56f,_570,_571,_572){
- this.m_layoutElement=_56f;
- this.m_containerInfo=_570;
- this.m_bRendered=false;
- this.initializeEditableSorts(_571);
- this.initializeEditableFilters(_571);
- this.initializeEditableSliders(_571);
- this.m_id=_572+_56e.getId();
- this.m_layoutIndex=_572;
- this.m_sortStrings={byLabel:RV_RES.IDS_JS_SORTED_BY_LABEL,byValue:RV_RES.IDS_JS_SORTED_BY_VALUE,descending:RV_RES.IDS_JS_SORT_DESCENDING_ORDER,ascending:RV_RES.IDS_JS_SORT_ASCENDING_ORDER};
- this.connections=[];
- },getLayoutElement:function(){
- var _573=this.m_layoutElement;
- var _574=_573.getAttribute("lid");
- if(_574==null){
- _574=_573.getAttribute("pflid");
- }
- if(_574!==null){
- if(_573.tagName.toUpperCase()=="MAP"){
- var _575=_573.parentNode.childNodes;
- for(var _576=0;_576<_575.length;++_576){
- var _577=_575[_576].getAttribute("usemap");
- if(_577!==null&&_577==("#"+this.m_cognosViewer.getId()+_574)){
- return _575[_576];
- }
- }
- }else{
- if(_573.parentNode.getAttribute("chartcontainer")=="true"){
- return _573.parentNode;
- }
- }
- return _573;
- }
- return null;
- },initializeEditableSorts:function(_578){
- if(this.m_containerInfo!==null){
- if(typeof this.m_containerInfo.sort!=="undefined"){
- this.m_editableSorts=this.m_containerInfo.sort;
- }
- if(typeof _578!=="undefined"){
- for(var i=0;i<_578.length;++i){
- this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"labels");
- this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"valuesOf");
- }
- }
- }
- },initializeEditableFilters:function(_57a){
- if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){
- if(typeof this.m_containerInfo.filter!=="undefined"){
- this.m_editableFilters=this.m_containerInfo.filter;
- }
- if(typeof _57a!=="undefined"){
- for(var i=0;i<_57a.length;++i){
- this.m_editableFilters=this.mergeChildInfo(this.m_editableFilters,_57a[i].filter,"item");
- }
- }
- }
- },initializeEditableSliders:function(_57c){
- if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){
- if(typeof this.m_containerInfo.sliders!=="undefined"){
- this.m_editableSliders=this.m_containerInfo.sliders;
- }
- if(typeof _57c!=="undefined"){
- for(var i=0;i<_57c.length;++i){
- this.m_editableSliders=this.mergeChildInfo(this.m_editableSliders,_57c[i].sliders,"name");
- }
- }
- }
- },mergeChildInfo:function(_57e,_57f,key){
- if(typeof _57f!="undefined"){
- if(typeof _57e==="undefined"||_57e===null){
- _57e=_57f;
- }else{
- var _581=[];
- for(var i=0;i<_57e.length;++i){
- _581[_57e[i][key]]=_57e[i];
- }
- for(var j=0;j<_57f.length;++j){
- var _584=_57f[j];
- if(typeof _581[_584[key]]=="undefined"){
- _57e.push(_584);
- _581[_584.item]=_584;
- }
- }
- }
- }
- return _57e;
- },hasSomethingRendered:function(){
- return this.m_bRendered;
- },render:function(){
- var _585=document.getElementById("infoBar"+this.m_id);
- if(_585===null){
- var _586=(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton")?true:false;
- if(_586&&!this.m_editableFilters&&!this.m_editableSliders){
- return;
- }
- if(this.m_timingDetails||this.m_editableSorts||this.m_editableFilters||this.m_editableSliders||this.hasPrompts()||this.hasLockedFilters()){
- var _587=this.getLayoutElement();
- var _588=document.createElement("div");
- _588.setAttribute("dir",this.m_cognosViewer.getDirection()==="rtl"?"rtl":"ltr");
- _585=document.createElement("div");
- _585.className="infoBar";
- _585.setAttribute("id","infoBar"+this.m_id);
- _585.setAttribute("cvid",this.m_cognosViewer.getId());
- _585.setAttribute("layoutid",this.m_id);
- _585.setAttribute("containerid",this.m_layoutIndex);
- _585.setAttribute("role","region");
- _585.setAttribute("aria-label",RV_RES.IDS_JS_REPORT_INFO_TITLE);
- if(_586){
- dojo.style(_585,{opacity:"0.6"});
- }
- _585.appendChild(this.renderHeader());
- _585.appendChild(this.renderDetails());
- _588.appendChild(_585);
- _587.parentNode.insertBefore(_588,_587);
- this.connections.push(dojo.connect(_585,"onkeydown",this,this.onKeyDown));
- this.connections.push(dojo.query(".infoBarHeader",_585).connect("onmousedown",this,this.toggle));
- this.connections.push(dojo.query(".infoBarLeftIcon",_585).connect("onmousedown",this,this.ignoreEvent));
- this.connections.push(dojo.query(".infoBarDetailsText",_585).connect("onmousedown",this,this.ignoreEvent));
- this.connections.push(dojo.query(".infoBarLockedItems",_585).connect("onmousedown",this,this.ignoreEvent));
- this.m_bRendered=true;
- if(this.wasInfoBarExpanded(this.m_id)){
- this.show();
- }
- }
- }
- },renderHeader:function(){
- var _589=this.isFilterApplied();
- var _58a=this.isSortApplied();
- var _58b=document.createElement("div");
- _58b.id="infoBarHeader"+this.m_id;
- _58b.className="infoBarHeaderDiv";
- var _58c="<div role=\"presentation\" class=\"infoBarHeader BUXNoPrint\" style=\"width:100%\">"+this.addHeaderCloseButton()+this.addHeaderNavigationButton(_589,_58a)+this.addHeaderText(_589,_58a)+"</div>";
- _58b.innerHTML=_58c;
- return _58b;
- },addHeaderNavigationButton:function(_58d,_58e){
- var _58f=RV_RES.IDS_JS_INFOBAR_EXPAND;
- var _590="infoBarIcon"+(_58d?"Filter":"")+(_58e?"Sort":"")+"Applied";
- var _591="infoBarHeaderButton"+this.m_id+" infoBarHeaderText"+this.m_id;
- return "<button class=\"dijitStretch infoBarHeaderButton\" id=\"infoBarHeaderButton"+this.m_id+"\" aria-labelledby=\""+_591+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_58f+"\">"+"<span class=\"dijitInline "+_590+"\" title=\""+_58f+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarHeaderButtonText\">!</span>"+"</button>";
- },addHeaderText:function(_592,_593){
- var _594=[];
- if(_592){
- _594.push(RV_RES.IDS_JS_FILTER_APPLIED);
- }
- if(_593){
- _594.push(RV_RES.IDS_JS_SORT_APPLIED);
- }
- return "<span class=\"infoBarHeaderText\" id=\"infoBarHeaderText"+this.m_id+"\">"+_594.join(", ")+"</span>";
- },addHeaderCloseButton:function(){
- var _595=RV_RES.IDS_JS_INFOBAR_COLLAPSE;
- var _596=this.m_id+"_collapse";
- return "<button class=\"dijitStretch infoBarHeaderCloseButton\" id=\"infoBarHeaderCloseButton"+this.m_id+"\" aria-labelledby=\""+_596+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_595+"\">"+"<span class=\"dijitInline infoBarIconClose BUXNoPrint\" title=\""+_595+"\"></span>"+"<span class=\"dijitInline dijitDisplayNone infoBarCloseButtonText\">x</span>"+"</button>";
- },isFilterApplied:function(){
- if(this.m_editableFilters||this.m_editableSliders||typeof this.m_containerInfo.lockedFilters!=="undefined"||this.hasPrompts()){
- return true;
- }
- return false;
- },isSortApplied:function(){
- if(this.m_editableSorts){
- return true;
- }
- return false;
- },renderDetails:function(){
- var _597=document.getElementById("infoBarFlyout"+this.m_id);
- var _598=document.getElementById(this.m_id+"instructions");
- if(_597===null){
- this.getLayoutElement();
- _597=document.createElement("div");
- _597.setAttribute("id","infoBarFlyout"+this.m_id);
- _597.setAttribute("cvid",this.m_cognosViewer.getId());
- _597.setAttribute("layoutid",this.m_id);
- _597.setAttribute("containerid",this.m_layoutIndex);
- _597.className="infoBarFlyout";
- _597.style.display="none";
- _597.innerHTML="<div class=\"infoBarFlyoutContent\" id=\"infoBarFlyoutContent"+this.m_id+"\" role=\"list\">"+this.addLockedInfoBarDetails()+this.addEditableInfoBarDetails()+this.addRAPTimingDetails()+"</div>"+this.createHiddenSpan(this.m_id+"_filterString",RV_RES.IDS_JS_FILTER)+this.createHiddenSpan(this.m_id+"_sortString",RV_RES.IDS_JS_SORT)+this.createHiddenSpan(this.m_id+"_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.createHiddenSpan(this.m_id+"_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER)+this.createHiddenSpan(this.m_id+"_lockedString",RV_RES.IDS_JS_INFOBAR_LOCKED)+this.createHiddenSpan(this.m_id+"_collapse",RV_RES.IDS_JS_INFOBAR_COLLAPSE)+this.createHiddenSpan(this.m_id+"_delete",RV_RES.IDS_JS_DELETE);
- this.connections.push(dojo.connect(_597,"onkeydown",this,this.onKeyDown));
- this.connections.push(dojo.query(".infoBarDetailRow",_597).forEach(function(item,_59a,_59b){
- dojo.attr(item,{"aria-setsize":_59b.length,"aria-posinset":_59a+1});
- }).connect("onfocus",function(e){
- dojo.query(e.currentTarget).addClass("infoBarDetailRowHover");
- }).connect("onblur",function(e){
- var el=typeof e.explicitOriginalTarget!=="undefined"?e.explicitOriginalTarget:document.activeElement;
- if(dojo.hasClass(el,"infoBarDeleteButton")){
- return true;
- }
- dojo.query(e.currentTarget).removeClass("infoBarDetailRowHover");
- }).connect("onmouseover",this,function(e){
- this.focusDetailRow(e.currentTarget);
- }));
- }
- if(_598===null){
- _598=document.createElement("span");
- _598.id=this.m_id+"instructions";
- _598.setAttribute("role","presentation");
- _598.style.visibility="hidden";
- _598.style.display="none";
- document.body.appendChild(_598);
- _598.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION;
- }
- return _597;
- },addRAPTimingDetails:function(){
- if(this.m_timingDetails){
- var _5a0=this.m_timingDetails.length-1;
- var _5a1=this.m_timingDetails[_5a0].time-this.m_timingDetails[0].time;
- return "<div><table role=\"presentation\" class=\"infoBarLockedItems\">"+"<tr>"+this.addTimingIcon(_5a1,250,500)+"<td colspan=\"2\" class=\"bibi inforBarDetailsText\" role=\"presentation\" id=\""+this.m_id+"_timingDetail\" style=\"background-color:LightGray\"><b>RAP Total Time: ("+_5a1+")</b></td>"+"</tr>"+this.addRAPTimingItemDetails()+"</table></div>";
- }
- return "";
- },addRAPTimingItemDetails:function(){
- var _5a2="";
- if(this.m_timingDetails){
- for(var _5a3=0;_5a3<=this.m_timingDetails.length-1;++_5a3){
- var _5a4=this.m_timingDetails[_5a3];
- var _5a5=this.getTimeDiff(_5a3);
- _5a2+="<tr class=\"infoBarDetailRow\" type=\"filter\" tabindex=\"-1\">";
- if(_5a4.level){
- _5a2+="<td colspan=3><font size=\"1\">"+_5a5+":"+html_encode(_5a4.event)+"</font></td></tr>";
- }else{
- _5a2+=this.addTimingIcon(_5a5,100,500);
- _5a2+="<td class=\"bibi infoBarDetailsText\" role=\"presentation\" id=\""+this.m_id+_5a3+"_timingDetail\">";
- _5a2+=html_encode(_5a4.event);
- _5a2+="</td><td align=\"right\">"+_5a5+"</td>";
- }
- _5a2+="</tr>";
- }
- }
- return _5a2;
- },getTimeDiff:function(_5a6){
- var _5a7=_5a6+1;
- if(_5a7>=this.m_timingDetails.length){
- return 0;
- }
- var _5a8=this.m_timingDetails[_5a6].level;
- if(!(_5a8==this.m_timingDetails[_5a7].level)){
- while(_5a7<this.m_timingDetails.length&&this.m_timingDetails[_5a7].level!=_5a8&&typeof this.m_timingDetails[_5a7].level!="undefined"){
- _5a7++;
- }
- }
- return (this.m_timingDetails[_5a7].time-this.m_timingDetails[_5a6].time);
- },addTimingIcon:function(_5a9,_5aa,red){
- var _5ac="icon_excellent_traffic.gif";
- if(_5a9>red){
- _5ac="icon_poor_traffic.gif";
- }else{
- if(_5a9>_5aa){
- _5ac="icon_average_traffic.gif";
- }
- }
- return this.addInfoBarIcon(_5ac,true);
- },addLockedInfoBarDetails:function(){
- if(this.hasPrompts()||typeof this.m_containerInfo.lockedFilters!=="undefined"){
- return "<div role=\"presentation\" class=\"infoBarLockedItems\">"+this.addPromptDetails()+this.addLockedFilterDetails()+"</div>";
- }
- return "";
- },addEditableInfoBarDetails:function(){
- if(this.m_editableFilters||this.m_editableSorts||this.m_editableSliders){
- return "<div role=\"presentation\" class=\"infoBarEditableItems\">"+this.addFilteredItemsDetails()+this.addSliderDetails()+this.addSortDetails()+"</div>";
- }
- return "";
- },onKeyDown:function(evt){
- var _5ae=evt.target;
- var cvId=this.m_cognosViewer.getId();
- var _5b0=document.getElementById("infoBarHeaderButton"+this.m_id);
- var _5b1=document.getElementById(this.m_id+"instructions");
- var node;
- if(evt.keyCode=="13"){
- _5b1.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION;
- if(_5ae===_5b0){
- this.toggle();
- return stopEventBubble(evt);
- }
- }else{
- if(evt.keyCode=="27"){
- var _5b3=this.m_cognosViewer.getA11YHelper();
- if(this.m_cognosViewer.getCurrentNodeFocus()){
- node=this.m_cognosViewer.getCurrentNodeFocus();
- if(node.nodeName.toLowerCase()!="span"){
- var _5b4=node.getElementsByTagName("span");
- for(var _5b5=0;_5b5<_5b4.length;_5b5++){
- if(_5b4[_5b5].style.display!="hidden"){
- node=_5b4[_5b5];
- break;
- }
- }
- }
- this.hide(false);
- _5b3.setFocusToNode(node);
- }else{
- this.hide();
- }
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="46"){
- if(dojo.hasClass(_5ae,"infoBarDetailRow")){
- node=dojo.query("td.infoBarRightIcon",_5ae)[0];
- if(typeof node!=="undefined"){
- if(_5ae.getAttribute("type")=="filter"){
- InfoBarHelper.infoBarRemoveFilter(cvId,this.m_layoutIndex,node.getAttribute("filterItem"),node.getAttribute("details"));
- }else{
- if(_5ae.getAttribute("type")=="sort"){
- InfoBarHelper.infoBarRemoveSort(cvId,this.m_layoutIndex,node.getAttribute("sortItem"),node.getAttribute("byLabel"));
- }else{
- if(_5ae.getAttribute("type")=="slider"){
- InfoBarHelper.infoBarRemoveSlider(cvId,node.getAttribute("slider"));
- }
- }
- }
- }
- }
- }else{
- if(evt.keyCode=="38"){
- if(dojo.hasClass(_5ae,"infoBarDetailRow")){
- this.focusDetailRow(_5ae,"prev");
- }else{
- this.focusDetailRow();
- }
- _5b1.innerHTML="";
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="40"){
- if(dojo.hasClass(_5ae,"infoBarDetailRow")){
- this.focusDetailRow(_5ae,"next");
- }else{
- this.focusDetailRow();
- }
- _5b1.innerHTML="";
- return stopEventBubble(evt);
- }else{
- if(evt.keyCode=="9"){
- var _5b6=document.getElementById("infoBar"+this.m_id);
- if(dojo.hasClass(_5b6,"infoBarExpanded")){
- if(dojo.hasClass(_5ae,"infoBarDetailRow")){
- dojo.byId("infoBarHeaderCloseButton"+this.m_id).focus();
- }else{
- this.focusDetailRow();
- }
- return stopEventBubble(evt);
- }
- }
- }
- }
- }
- }
- }
- },focusDetailRow:function(_5b7,dir){
- var _5b9=document.getElementById("infoBarFlyout"+this.m_id);
- var _5ba=document.getElementById("infoBar"+this.m_id);
- if(!dojo.hasClass(_5ba,"infoBarExpanded")){
- return;
- }
- if(typeof _5b7=="undefined"||_5b7===null){
- var _5bb=dojo.query(".infoBarLockedItems .infoBarDetailRow, .infoBarEditableItems .infoBarDetailRow",_5b9);
- _5b7=_5bb[0];
- }
- if(_5b7&&dojo.hasClass(_5b7,"infoBarDetailRow")){
- var _5bc,rows,len,i;
- if(dir==="prev"){
- if(_5b7.parentNode.previousSibling){
- _5bc=_5b7.parentNode.previousSibling.childNodes[1];
- }else{
- rows=dojo.query(".infoBarDetailRow",_5b9);
- len=rows.length;
- if(_5b7===rows[0]){
- _5bc=rows[len-1];
- }else{
- for(i=1;i<len;i++){
- if(_5b7===rows[i]){
- _5bc=rows[i-1];
- break;
- }
- }
- }
- }
- }else{
- if(dir==="next"){
- if(_5b7.parentNode.nextSibling){
- _5bc=_5b7.parentNode.nextSibling.childNodes[1];
- }else{
- rows=dojo.query(".infoBarDetailRow",_5b9);
- len=rows.length;
- if(_5b7===rows[len-1]){
- _5bc=rows[0];
- }else{
- for(i=0;i<len-1;i++){
- if(_5b7===rows[i]){
- _5bc=rows[i+1];
- break;
- }
- }
- }
- }
- }else{
- _5bc=_5b7;
- }
- }
- _5bc.focus();
- }
- },toggle:function(evt){
- var _5c1=document.getElementById("infoBar"+this.m_id);
- if(dojo.hasClass(_5c1,"infoBarExpanded")){
- this.hide();
- }else{
- this.show();
- }
- stopEventBubble(evt);
- },ignoreEvent:function(evt){
- stopEventBubble(evt);
- },show:function(){
- var _5c3=document.getElementById("infoBar"+this.m_id);
- if(!dojo.hasClass(_5c3,"infoBarExpanded")){
- var _5c4=document.getElementById("infoBarHeader"+this.m_id);
- var _5c5=document.getElementById("infoBarFlyout"+this.m_id);
- var _5c6=document.getElementById("infoBarHeaderButton"+this.m_id);
- var _5c7,_5c8,_5c9;
- var _5ca=dojo.fx.wipeIn({node:_5c5,duration:300,onEnd:dojo.hitch(this,function(){
- this.focusDetailRow();
- _5c6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_COLLAPSE);
- _5c6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_COLLAPSE);
- })});
- this.updateInfoBarRenderedState(this.m_id,"true");
- dojo.addClass(_5c3,"infoBarExpanded");
- if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){
- dojo.style(_5c3,{opacity:"1"});
- }
- dojo.style(_5c3,"width","auto");
- _5ca.play();
- var _5cb=document.getElementById("infoBarHeaderText"+this.m_id).innerHTML;
- var _5cc=this._getTextWidth(_5cb)+40;
- if(_5cc<500){
- _5cc=500;
- }
- var _5cd=this.m_cognosViewer.getViewerWidget();
- var _5ce=_5cd.findContainerDiv().clientWidth;
- if(_5cc>_5ce){
- _5cc=_5ce-5;
- }
- _5c3.style.width=_5cc+"px";
- dojo.removeClass(_5c4,"BUXNoPrint");
- }
- },_getTextWidth:function(text){
- var div=document.createElement("div");
- div.className="infoBar infoBarHeader";
- div.style.fontWeight="bold";
- div.style.position="absolute";
- div.style.visibility="hidden";
- div.style.height="auto";
- div.style.width="auto";
- document.body.appendChild(div);
- div.innerHTML=text;
- var _5d1=div.clientWidth;
- document.body.removeChild(div);
- return _5d1;
- },hide:function(_5d2){
- var _5d3=document.getElementById("infoBar"+this.m_id);
- if(dojo.hasClass(_5d3,"infoBarExpanded")){
- this.updateInfoBarRenderedState(this.m_id,"false");
- var _5d4=document.getElementById("infoBarHeader"+this.m_id);
- var _5d5=document.getElementById("infoBarFlyout"+this.m_id);
- var _5d6=document.getElementById("infoBarHeaderButton"+this.m_id);
- dojo.addClass(_5d4,"BUXNoPrint");
- dojo.fx.wipeOut({node:_5d5,duration:300,onEnd:dojo.hitch(this,function(){
- dojo.removeClass(_5d3,"infoBarExpanded");
- dojo.style(_5d3,"width","auto");
- if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){
- dojo.style(_5d3,{opacity:"0.6"});
- }
- _5d6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND);
- _5d6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND);
- if(!_5d2){
- _5d6.focus();
- }
- })}).play();
- }
- },updateInfoBarRenderedState:function(_5d7,_5d8){
- var _5d9=this.m_cognosViewer.getViewerWidget();
- if(_5d9){
- var _5da=_5d9.getInfoBarRenderedState();
- _5da[_5d7]=_5d8;
- }
- },wasInfoBarExpanded:function(_5db){
- var _5dc=this.m_cognosViewer.getViewerWidget();
- if(_5dc){
- var _5dd=_5dc.getInfoBarRenderedState();
- if(_5dd){
- if(_5dd[_5db]){
- if("true"===_5dd[_5db]){
- return true;
- }
- }
- }
- }
- return false;
- },destroy:function(){
- for(var i=0;i<this.connections.length;i++){
- var _5df=this.connections[i];
- if(_5df&&_5df.remove){
- dojo.disconnect(_5df);
- }
- }
- var _5e0=document.getElementById("infoBar"+this.m_id);
- if(_5e0){
- var _5e1=_5e0.parentNode;
- if(_5e1){
- _5e1.removeChild(_5e0);
- }
- }
- _5e0=document.getElementById(this.m_id+"instructions");
- if(_5e0){
- _5e0.parentNode.removeChild(_5e0);
- }
- delete this.m_layoutElement;
- delete this.m_containerInfo;
- }});
- dojo.declare("AnnotationFilterContext",null,{m_parameterValuesString:null,m_parameterValuesSpec:null,m_slidersJSON:null,m_filterJSON:null,constructor:function(_5e2,_5e3,_5e4,_5e5){
- this.m_parameterValuesString=_5e2;
- this.m_parameterValuesSpec=_5e3;
- this.m_slidersJSON=_5e4;
- this.m_filterJSON=_5e5;
- },setParameterValuesString:function(_5e6){
- this.m_parameterValuesString=_5e6;
- },setParameterValuesSpec:function(_5e7){
- this.m_parameterValuesSpec=_5e7;
- },setSlidersJSON:function(_5e8){
- this.m_slidersJSON=_5e8;
- },setFilterJSON:function(_5e9){
- this.m_filterJSON=_5e9;
- },getParameterValuesString:function(){
- return this.m_parameterValuesString||null;
- },getParameterValuesSpec:function(){
- return this.m_parameterValuesSpec||null;
- },getPromptsJSON:function(){
- var _5ea=null;
- if(this.m_parameterValuesString){
- _5ea={};
- _5ea.parameterValuesString=this.m_parameterValuesString;
- }
- if(this.m_parameterValuesString){
- _5ea=_5ea||{};
- _5ea.parameterValuesSpec=this.m_parameterValuesSpec;
- }
- return _5ea;
- },getSlidersJSON:function(){
- return this.m_slidersJSON||null;
- },getFilterJSON:function(){
- return this.m_filterJSON||null;
- },isEmpty:function(){
- if(this.m_parameterValuesString||this.m_parameterValuesSpec||this.m_slidersJSON||this.m_filterJSON){
- return false;
- }
- return true;
- }});
- dojo.declare("AnnotationInfoBar",InfoBarBase,{constructor:function(_5eb,lid){
- this.m_id="annoInfoBar_"+lid;
- this.m_layoutElementId=lid;
- },createFilterContext:function(){
- var _5ed=null;
- var _5ee=null;
- var _5ef=null;
- var _5f0=null;
- if(this.m_cognosViewer.getRAPReportInfo()){
- var _5f1=this.m_cognosViewer.getRAPReportInfo();
- if(_5f1.getContainers()){
- var _5f2=_5f1.getContainers();
- if(_5f2[this.m_layoutElementId]){
- var _5f3=_5f2[this.m_layoutElementId];
- if(typeof _5f3.filter!=="undefined"){
- _5ed=_5f3.filter;
- }
- if(typeof _5f3.sliders!=="undefined"){
- _5ee=_5f3.sliders;
- }
- }
- }
- }
- if(this.hasPrompts()){
- _5ef=CViewerCommon.buildParameterValuesSpec(this.m_cognosViewer);
- _5f0=this.m_cognosViewer.getExecutionParameters();
- }
- if(_5ed||_5ee||_5ef||_5f0){
- return new AnnotationFilterContext(_5f0,_5ef,_5ee,_5ed);
- }
- return null;
- }});
- dojo.declare("AnnotationInfoBarRenderer",null,{m_AnnotationInfoBar:null,m_id:null,m_labelledByHideButton:"",miniCognosViewer:null,m_editableSliders:null,constructor:function(_5f4,lid,_5f6,_5f7){
- this.m_AnnotationInfoBar=null;
- this.miniCognosViewer={};
- this.miniCognosViewer.m_sId=_5f4.id;
- this.miniCognosViewer.getId=_5f4.getId;
- this.miniCognosViewer.m_sParameters=(_5f6===null||_5f6.getParameterValuesString()===null)?"":_5f6.getParameterValuesString();
- this.miniCognosViewer.getExecutionParameters=_5f4.getExecutionParameters;
- this.miniCognosViewer.getWebContentRoot=_5f4.getWebContentRoot;
- this.m_AnnotationInfoBar=new AnnotationInfoBar(this.miniCognosViewer,lid);
- this.m_AnnotationInfoBar.setId("annoInfoBar_"+_5f7+lid);
- this.m_id="annoInfoBar_"+_5f7+lid+"_renderer";
- if(_5f6){
- if(_5f6.getSlidersJSON()){
- this.m_AnnotationInfoBar.setContainerInfo({"sliders":_5f6.getSlidersJSON()});
- this.m_AnnotationInfoBar.m_editableSliders=_5f6.getSlidersJSON();
- }
- if(_5f6.getFilterJSON()){
- this.m_AnnotationInfoBar.setEditableFilters(_5f6.getFilterJSON());
- }
- }
- },render:function(){
- var _5f8="<div class=\"infoBar infoBarCollapsed\" id=\"infoBarHeaderCollapsed"+this.m_id+"\" >"+this.renderHeader(false)+"</div>";
- var _5f9="<div class=\"infoBar infoBarExpanded\" id=\"infoBarHeaderExpanded"+this.m_id+"\" style=\"display:none;\" >"+this.renderHeader(true)+this.renderDetails()+"</div>";
- _5f9=this.updateHideButtonLabelledBy(_5f9);
- var _5fa=document.getElementById("annotationInfoBarInstructions");
- if(_5fa===null){
- _5fa=document.createElement("span");
- _5fa.id="annotationInfoBarInstructions";
- _5fa.setAttribute("role","presentation");
- _5fa.style.visibility="hidden";
- _5fa.style.display="none";
- var _5fb=this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBarButtonInstruction",RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_filterString",RV_RES.IDS_JS_FILTER)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER);
- document.body.appendChild(_5fa);
- _5fa.innerHTML=_5fb;
- }
- return _5f8+_5f9;
- },renderInJSON:function(){
- var _5fc=[];
- return _5fc.concat(this.m_AnnotationInfoBar.getPromptDetailsInJSON(),this.m_AnnotationInfoBar.getFilteredItemsDetailsInJSON(),this.m_AnnotationInfoBar.getSliderDetailsInJSON());
- },renderHeader:function(_5fd){
- var mode=(_5fd)?"Hide":"Show";
- var _5ff=(_5fd)?RV_RES.IDS_JS_ANNO_INFOBAR_HIDE:RV_RES.IDS_JS_ANNO_INFOBAR_SHOW;
- var _600=(_5fd)?("XXREPLACEXX"):" annoInfoBarHeaderControlButtonText"+mode+this.m_id;
- var _601="<table class=\"annoInfoBarHeader\" id=\"annoInfoBarHeader"+mode+this.m_id+"\" role=\"presentation\">"+"<tr>"+"<td class=\"annoInfoBarHeaderText\" id=\"infoBarHeaderText"+this.m_id+"\" >"+RV_RES.IDS_JS_FILTER_APPLIED+"</td>"+"<td class=\"annoInfoBarHeaderControl\" id=\"infoBarHeader"+mode+this.m_id+"\" >"+"<button id=\"annoInfoBarHeaderControl"+mode+this.m_id+"\" aria-labelledby=\""+_600+"\" type=\"button\" role=\"button\" tabindex=\"0\" value=\"\" title=\""+_5ff+"\""+" onmousedown=\"annotationInfoBarToggle('"+this.m_id+"', '"+mode+"');\">"+"<span id=\"annoInfoBarHeaderControlButtonText"+mode+this.m_id+"\"class=\"dijitInline annoInfoBarHeaderControlText\" title=\""+_5ff+"\" >"+_5ff+"</span>"+"</button>"+"</td>"+"</tr>"+"</table>";
- return _601;
- },renderDetails:function(){
- var _602=this.m_AnnotationInfoBar.addPromptDetails(true);
- var _603=this.m_AnnotationInfoBar.addFilteredItemsDetails(true);
- var _604=this.m_AnnotationInfoBar.addSliderDetails(true);
- var _605="<div class=\"annoInfoBarDetails\" id=\"annoInfoBarDetails"+this.m_id+"\" role=\"presentation\">"+_602+_603+_604+"</div>";
- this.m_labelledByHideButton=(_602.length===0)?"":(" annoInfoBar_promptString "+this.m_AnnotationInfoBar.getId()+"0_promptDetail ");
- this.m_labelledByHideButton+=(_603.length===0)?"":(" annoInfoBar_filterString "+this.m_AnnotationInfoBar.getId()+"0_filterDetail ");
- this.m_labelledByHideButton+=(_604.length===0)?"":(" annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"0_sliderDetail annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"1_sliderDetail ");
- this.m_labelledByHideButton+=" annoInfoBarHeaderControlButtonTextHide"+this.m_id;
- return _605;
- },updateHideButtonLabelledBy:function(_606){
- return _606.replace("XXREPLACEXX",this.m_labelledByHideButton);
- }});
- function annotationInfoBarToggle(mId,_608){
- var _609=document.getElementById("infoBarHeaderExpanded"+mId);
- var _60a=document.getElementById("infoBarHeaderCollapsed"+mId);
- var _60b=null;
- if("Show"===_608){
- dojo.style(_609,{display:""});
- dojo.style(_60a,{display:"none"});
- _60b=document.getElementById("annoInfoBarHeaderControlHide"+mId);
- }else{
- dojo.style(_60a,{display:""});
- dojo.style(_609,{display:"none"});
- _60b=document.getElementById("annoInfoBarHeaderControlShow"+mId);
- }
- if(_60b){
- _60b.focus();
- }
- };
- var CV_BACKGROUND_LAYER_ID="CV_BACK";
- if(typeof window.gaRV_INSTANCES=="undefined"){
- window.gaRV_INSTANCES=[];
- }
- if(!window.gViewerLogger){
- window.gViewerLogger={log:function(hint,_60d,type){
- },addContextInfo:function(_60f){
- }};
- }
- 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,_612){
- 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=_612;
- 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 _613=false;
- for(var _614=0;_614<window.gaRV_INSTANCES.length;_614++){
- if(window.gaRV_INSTANCES[_614].m_sId==sId){
- window.gaRV_INSTANCES[_614]=this;
- _613=true;
- break;
- }
- }
- if(!_613){
- 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(_615){
- this.m_mobileScheduledOutput=_615;
- if(_615){
- this.m_sStatus="complete";
- }
- };
- CCognosViewer.prototype.setTabInfo=function(_616){
- this.m_tabsPayload=_616;
- if(this.m_tabsPayload&&this.m_tabsPayload.tabs&&this._keepTabSelected){
- var _617=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(_61a){
- this._keepTabSelected=_61a;
- };
- 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 _61b=this.isSavedOutput()&&!this.m_mobileScheduledOutput;
- var _61c=document.getElementById("CVNavLinks"+this.getId());
- if(_61c||!this.shouldWriteNavLinks()||_61b){
- var _61d=this.getReportDiv();
- this.m_bHasTabs=true;
- if(this.m_tabControl&&this.m_tabControl.isSavedOutput()!=_61b){
- this.deleteTabs();
- }
- if(!this.m_tabControl){
- if(this.getStatus()!="complete"&&!_61b){
- return;
- }
- var tr=document.createElement("tr");
- var _61f=document.createElement("td");
- tr.appendChild(_61f);
- var _620=document.getElementById("mainViewerTR"+this.getId());
- if(!_620){
- return;
- }
- if(this.m_tabsPayload.position=="topLeft"){
- _620.parentNode.insertBefore(tr,_620);
- }else{
- _620.parentNode.appendChild(tr);
- }
- var _621=null;
- if(this.m_viewerWidget){
- _621=this.m_viewerWidget.findContainerDiv().firstChild;
- }else{
- _621=_61f;
- }
- var oCV=this;
- if(_61b){
- this.m_tabControl=new CognosTabControl(_621,function(_623){
- oCV.switchSavedOutputTab(_623,true);
- });
- this.switchSavedOutputTab(this.m_tabsPayload.currentTabId,false);
- }else{
- this.m_tabControl=new CognosTabControl(_621,function(_624){
- oCV.switchTabs(_624);
- });
- }
- if(this.m_viewerWidget){
- this.m_tabControl.setSpaceSaverContainer(_61f);
- this.m_tabControl.setScrollAttachNode(this.m_viewerWidget.findContainerDiv());
- this.m_tabControl.useAbsolutePosition(true);
- }
- this.m_tabControl.setIsSavedOutput(_61b);
- if(!window.gScriptLoader.m_bScriptLoaderCalled){
- var _625=document.getElementById("RVContent"+this.getId());
- var _626=this._getNodesWithViewerId(_625,"link",null);
- for(var i=0;i<_626.length;i++){
- window.gScriptLoader.moveLinks(_626[i]);
- }
- window.gScriptLoader.loadStyles(_625,this.getId());
- this.repaintDiv(_625);
- }
- }
- 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(_61d.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_61d.parentNode,this.m_currentlySelectedTab);
- if(_61c){
- this._removeTabContent(_61c.parentNode,this.m_switchingToTabId);
- this._removeTabContent(_61c.parentNode,this.m_currentlySelectedTab);
- }
- this.m_tabInfo={};
- }
- this.m_switchingToTabId=null;
- _61d.setAttribute("tabId",this.m_currentlySelectedTab);
- if(_61c){
- _61c.setAttribute("tabId",this.m_currentlySelectedTab);
- }
- if(isIE()&&_61b&&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 _629=this.getReportDiv();
- var _62a=this.m_switchingToTabId;
- this.m_currentlySelectedTab=_62a;
- this.m_tabControl.selectTab(this.previouslySelectedTab,false);
- this.switchTabs(this.previouslySelectedTab);
- if(_629){
- _629.parentNode.removeChild(_629);
- }
- 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[_62a]=null;
- };
- CCognosViewer.prototype.switchSavedOutputTab=function(_62b,_62c){
- var _62d=this.getSelectionController();
- if(_62d){
- _62d.clearSelectedObjects();
- }
- this.m_currentlySelectedTab=this.m_tabControl.getSelectedTabId();
- if(_62c){
- this.notifyTabChange(_62b);
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.getSavedOutput().switchSavedOutputTab(_62b,_62c);
- this.getTabController().resetPosition();
- }else{
- if(!this.savedOutputTabNodes){
- var _62e=document.getElementById("CVIFrame"+this.getId());
- this.savedOutputTabNodes=getElementsByAttribute(_62e.contentWindow.document.body,"*","tabid");
- }
- if(!this.savedOutputTabNodes){
- return;
- }
- for(var i=0;i<this.savedOutputTabNodes.length;i++){
- var _630=this.savedOutputTabNodes[i];
- _630.style.display=_630.getAttribute("tabid")==_62b?"":"none";
- }
- this.setMaxContentSize();
- }
- };
- CCognosViewer.prototype.notifyTabChange=function(_631){
- };
- CCognosViewer.prototype._getNodesWithViewerId=function(_632,_633,id){
- var _635=[];
- var _636=_632.getElementsByTagName(_633);
- for(var i=0;i<_636.length;i++){
- var node=_636[i];
- if(!id||(node.getAttribute&&node.getAttribute("namespaceId")==id)){
- node.parentNode.removeChild(node);
- _635.push(node);
- i--;
- }
- }
- return _635;
- };
- CCognosViewer.prototype._removeTabStylesFromHead=function(){
- var id=this.getId();
- return this._getNodesWithViewerId(document.getElementsByTagName("head").item(0),"style",id);
- };
- CCognosViewer.prototype._addTabStylesToHead=function(_63a){
- if(!_63a){
- return;
- }
- for(var i=0;i<_63a.length;i++){
- document.getElementsByTagName("head").item(0).appendChild(_63a[i]);
- }
- };
- CCognosViewer.prototype.switchTabs=function(_63c){
- if(this.m_currentlySelectedTab==_63c){
- return;
- }
- var _63d=this.getSelectionController();
- if(_63d){
- _63d.clearSelectedObjects();
- }
- var _63e=this.getReportDiv();
- this.m_nReportDiv=null;
- var _63f=_63e.clientHeight;
- _63e.removeAttribute("id");
- _63e.style.display="none";
- if(!this.m_tabInfo){
- this.m_tabInfo={};
- }
- var _640=this._removeTabStylesFromHead();
- var _641=this.getSelectionController().getCCDManager();
- this.m_tabInfo[this.m_currentlySelectedTab]={"conversation":this.getConversation(),"metadata":_641.getClonedMetadataArray(),"contextdata":_641.getClonedContextdataArray(),"secondaryRequests":this.getSecondaryRequests(),"styles":_640,"hasPromptControl":this.getHasPrompts()};
- var _642=this._findChildWithTabId(_63e.parentNode,_63c);
- this.previouslySelectedTab=this.m_currentlySelectedTab;
- if(_642&&this.m_tabInfo[_63c]&&this.m_tabInfo[_63c].hasPromptControl){
- if(_642){
- _642.parentNode.removeChild(_642);
- _642=null;
- }
- delete this.m_tabInfo[_63c];
- this.m_tabInfo[_63c]=null;
- }
- if(_642){
- this.m_currentlySelectedTab=_63c;
- _642.style.display="block";
- _642.setAttribute("id","CVReport"+this.getId());
- if(this.m_tabInfo&&this.m_tabInfo[_63c]){
- var _643=this.m_tabInfo[_63c];
- if(_643.conversation){
- this.setConversation(_643.conversation);
- }
- if(_643.metadata){
- _641.SetMetadata(_643.metadata);
- }
- if(_643.contextdata){
- _641.SetContextData(_643.contextdata);
- }
- if(_643.secondaryRequests){
- this.setSecondaryRequests(_643.secondaryRequests);
- }
- if(_643.styles){
- this._addTabStylesToHead(_643.styles);
- }
- this.setHasPrompts(_643.hasPromptControl);
- }
- if(this.shouldWriteNavLinks()){
- this.writeNavLinks(this.getSecondaryRequests().join(" "));
- }
- if(this.getPinFreezeManager()&&this.getPinFreezeManager().hasFrozenContainers()){
- this.getPinFreezeManager().rePaint();
- if(isIE()){
- var _644=document.getElementById("RVContent"+this.getId());
- this.repaintDiv(_644);
- }
- }
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this._keepFocus=null;
- this.doneLoadingUpdateA11Y("complete");
- this.getTabController().resetPosition();
- this.setMaxContentSize();
- }else{
- this.m_switchingToTabId=_63c;
- var _645=_63e.cloneNode(false);
- _645.style.display="block";
- _645.setAttribute("id","CVReport"+this.getId());
- _645.removeAttribute("tabId");
- _63e.parentNode.appendChild(_645);
- _645.innerHTML="<table height='"+_63f+"px'><tr><td height='100%'></td></tr></table>";
- var _646=new ViewerDispatcherEntry(this);
- _646.addFormField("ui.action","reportAction");
- _646.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_63c);
- if(this.m_viewerWidget){
- this.m_viewerWidget.placeTabControlInView();
- }
- this.dispatchRequest(_646);
- }
- };
- CCognosViewer.prototype._removeTabContent=function(_647,_648){
- var _649=this._findChildWithTabId(_647,_648);
- while(_649){
- _649.parentNode.removeChild(_649);
- _649=this._findChildWithTabId(_647,_648);
- }
- };
- CCognosViewer.prototype._findChildWithTabId=function(_64a,_64b){
- var _64c=null;
- for(var i=0;i<_64a.childNodes.length;i++){
- var _64e=_64a.childNodes[i];
- if(_64e.getAttribute("tabId")==_64b){
- _64c=_64e;
- break;
- }
- }
- return _64c;
- };
- CCognosViewer.prototype.clearTabs=function(){
- if(!this.m_bHasTabs){
- return;
- }
- this.m_tabInfo={};
- var _64f=this.getReportDiv();
- var _650=_64f.parentNode;
- for(var i=0;i<_650.childNodes.length;i++){
- var node=_650.childNodes[i];
- if(node.getAttribute("id")!="CVReport"+this.m_sId){
- _650.removeChild(node);
- i--;
- }
- }
- };
- CCognosViewer.prototype.isSavedOutput=function(){
- var _653=this.envParams["ui.action"];
- return _653==="view"||_653==="buxView";
- };
- CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_655,_656){
- var _657=document.getElementById("CVReport"+this.getId());
- var _658=document.createElement("iframe");
- _658.style.width="100%";
- _658.style.height="99%";
- _658.id="CVIFrame"+this.getId();
- _658.title=_655;
- _658.setAttribute("frameBorder","0");
- _657.appendChild(_658);
- var obj=this;
- var func=function(){
- obj.renderTabs();
- };
- setTimeout(function(){
- if(_656){
- if(_658.attachEvent){
- _658.attachEvent("onload",func);
- }else{
- _658.addEventListener("load",func,true);
- }
- }
- _658.src=url;
- },1);
- };
- CCognosViewer.prototype.updatePageState=function(_65b){
- if(_65b&&this.getState()){
- this.getState().setPageState(_65b);
- }
- };
- CCognosViewer.prototype.getPageInfo=function(){
- if(this.m_viewerState&&this.m_viewerState.getPageState()){
- var _65c=this.m_viewerState.getPageState();
- return {"currentPage":_65c.getCurrentPage(),"pageCount":_65c.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(_663){
- this.m_retryDispatcherEntry=_663;
- };
- 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(_664){
- this.m_faultDispatcherEntry=_664;
- };
- CCognosViewer.prototype.getFaultDispatcherEntry=function(){
- return this.m_faultDispatcherEntry;
- };
- CCognosViewer.prototype.dispatchRequest=function(_665){
- this.setFaultDispatcherEntry(null);
- this.getViewerDispatcher().dispatchRequest(_665);
- };
- 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(_666){
- var _666=this.getActionFactory().load(_666);
- _666.setCognosViewer(this);
- return _666;
- };
- CCognosViewer.prototype.getCalculationCache=function(){
- return this.m_calculationCache;
- };
- CCognosViewer.prototype.updateOutputForA11ySupport=function(){
- this.updateBorderCollapse();
- if(this.getA11YHelper()){
- this.getA11YHelper().addLabelledByForItemsOutsideOfContainers();
- }
- var _667=navigator.userAgent.toLowerCase();
- var _668=_667.indexOf("iphone")!=-1;
- var _669=_667.indexOf("ipod")!=-1;
- var _66a=_667.indexOf("ipad")!=-1;
- var _66b=_668||_669||_66a;
- var _66c=_667.indexOf("android")!=-1;
- if(_66b||_66c){
- 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 _66d=document.createElement("div");
- _66d.id=this.m_sId+"hc";
- _66d.style.border="1px solid";
- _66d.style.borderColor="red green";
- _66d.style.height="10px";
- _66d.style.top="-999px";
- _66d.style.position="absolute";
- document.body.appendChild(_66d);
- var _66e=null;
- if(isIE()){
- _66e=_66d.currentStyle;
- }else{
- _66e=_66d.ownerDocument.defaultView.getComputedStyle(_66d,null);
- }
- if(!_66e){
- return;
- }
- this.m_bHighContrast=_66e.borderTopColor==_66e.borderRightColor;
- document.body.removeChild(_66d);
- }
- };
- 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 _66f=null;
- if(this.envParams["ui.action"]=="view"&&!this.isBux){
- var _670=document.getElementById("CVIFrame"+this.getId());
- _66f=_670.contentWindow.document;
- }else{
- _66f=document.getElementById("CVReport"+this.getId());
- }
- var _671=_66f.getElementsByTagName("table");
- for(var i=0;i<_671.length;i++){
- if(_671[i].style.borderCollapse=="collapse"){
- _671[i].style.borderCollapse="separate";
- }
- }
- }
- };
- CCognosViewer.prototype.isAccessibleMode=function(){
- if(this.m_bAccessibleMode==true){
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.isSinglePageReport=function(){
- for(var _673 in this.m_aSecRequests){
- if(this.m_aSecRequests[_673]=="nextPage"||this.m_aSecRequests[_673]=="previousPage"){
- return false;
- }
- }
- return true;
- };
- CCognosViewer.prototype.hasNextPage=function(){
- for(var _674 in this.m_aSecRequests){
- if(this.m_aSecRequests[_674]=="nextPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.hasPrevPage=function(){
- for(var _675 in this.m_aSecRequests){
- if(this.m_aSecRequests[_675]=="previousPage"){
- return true;
- }
- }
- return false;
- };
- CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){
- evt=(evt)?evt:((event)?event:null);
- if(evt){
- var node=getNodeFromEvent(evt);
- var _678=(node&&node.nodeName)?node.nodeName.toLowerCase():null;
- if((evt.keyCode==8&&_678!="input"&&_678!="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(_679){
- this.m_bUseWorkingDialog=_679;
- };
- 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(_67a){
- if(!_67a){
- this.preProcessControlArray=[];
- }
- this.m_bReportHasPrompts=_67a;
- };
- CCognosViewer.prototype.getHasPrompts=function(){
- return this.m_bReportHasPrompts;
- };
- CCognosViewer.prototype.setUsePageRequest=function(_67b){
- this.m_viewerDispatcher.setUsePageRequest(_67b);
- };
- CCognosViewer.prototype.getUsePageRequest=function(){
- return this.m_viewerDispatcher.getUsePageRequest();
- };
- CCognosViewer.prototype.setKeepSessionAlive=function(_67c){
- this.m_bKeepSessionAlive=_67c;
- };
- 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 _67d;
- try{
- _67d=getCognosViewerSCObjectRef(this.m_sId);
- }
- catch(e){
- _67d=null;
- }
- return _67d;
- };
- CCognosViewer.prototype.addCallback=function(_67e,oFct,_680){
- if(!this.m_aCallback){
- this.m_aCallback=[];
- }
- this.m_aCallback=this.m_aCallback.concat({m_sEvent:_67e,m_oCallback:oFct,m_bCaptureEvent:(_680===true)});
- };
- CCognosViewer.prototype.canDrillDown=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _683=this.getSelectionController();
- if(_683){
- return (_683.canDrillDown(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canDrillUp=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _686=this.getSelectionController();
- if(_686){
- return (_686.canDrillUp(sCtx));
- }
- }
- return false;
- };
- CCognosViewer.prototype.canSubmitPrompt=function(){
- var _687=null;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- var _688=this.preProcessControlArray.length;
- for(var k=0;k<_688;k++){
- _687=eval(this.preProcessControlArray[k]);
- if(_687.isValid()===false){
- if(!this.m_reportRenderingDone||!_687.getCascadeOnParameter||!_687.getCascadeOnParameter()){
- return false;
- }
- }
- }
- }
- return true;
- };
- CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){
- if(this.rvMainWnd){
- this.rvMainWnd.closeContextMenuAndToolbarMenus();
- }
- };
- CCognosViewer.prototype.dcm=function(_68a,_68b){
- if(this.canDisplayContextMenu()){
- if(this.preSelectNode==true){
- _68b=false;
- this.preSelectNode=false;
- }
- if(this.rvMainWnd.displayContextMenu(_68a,_68b)!=false){
- return stopEventBubble(_68a);
- }
- }
- };
- 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(_68c){
- var _68d=this.getDrillMgr();
- if(_68d){
- _68d.singleClickDrillEvent(_68c,"RV");
- }
- };
- CCognosViewer.prototype.debug=function(sMsg){
- if(this.m_bDebug){
- var _68f="";
- var _690=this.debug.caller;
- if(typeof _690=="object"&&_690!==null){
- _68f=_690.toString().match(/function (\w*)/)[1];
- }
- if(!_68f){
- _68f="?";
- }
- alert(_68f+": "+sMsg);
- }
- };
- CCognosViewer.prototype.callbackExists=function(_691){
- var _692=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _693=0;_693<this.m_aCallback.length;++_693){
- var oCB=this.m_aCallback[_693];
- if(oCB.m_sEvent==_691){
- return true;
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.executeCallback=function(_695){
- var _696=false;
- if(this.m_aCallback&&this.m_aCallback.length){
- for(var _697=0;_697<this.m_aCallback.length;++_697){
- var oCB=this.m_aCallback[_697];
- if(oCB.m_sEvent==_695){
- if(typeof oCB.m_oCallback=="function"){
- oCB.m_oCallback();
- }
- if(oCB.m_bCaptureEvent){
- _696=true;
- }
- }
- }
- }
- return _696;
- };
- 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(_69a){
- if(typeof _69a!="string"){
- _69a=this.getStatus();
- }
- return ((""+_69a).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 _69c=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _69e=this.getSelectionController();
- if(_69e){
- var _69f=_69e.getRefDataItem(sCtx);
- if(_69f){
- _69c=_69f;
- }
- }
- }
- return _69c;
- };
- CCognosViewer.prototype.getDataType=function(sId){
- var _6a1=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6a3=this.getSelectionController();
- if(_6a3){
- var _6a4=_6a3.getDataType(sCtx);
- if(_6a4){
- _6a1=_6a4;
- }
- }
- }
- return _6a1;
- };
- CCognosViewer.prototype.getDepth=function(sId){
- var _6a6=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6a8=this.getSelectionController();
- if(_6a8){
- var _6a9=_6a8.getDepth(sCtx);
- if(_6a9){
- _6a6=_6a9;
- }
- }
- }
- return _6a6;
- };
- 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(_6aa){
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action","forward");
- oReq.addFormField("generic.anyURI.runOptionEnum#globalParameters",_6aa);
- 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 _6af=this.getSelectionController();
- if(_6af){
- var aHUN=_6af.getHun(sCtx);
- if(aHUN){
- sHun=aHUN;
- }
- }
- }
- return sHun;
- };
- CCognosViewer.prototype.getDimensionUniqueName=function(sId){
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6b3=this.getSelectionController();
- if(_6b3){
- var aDUN=_6b3.getDun(sCtx);
- if(aDUN){
- return aDUN;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getId=function(){
- return this.m_sId;
- };
- CCognosViewer.prototype.getLevelId=function(sId){
- var _6b6=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6b8=this.getSelectionController();
- if(_6b8){
- var aLUN=_6b8.getLun(sCtx);
- if(aLUN){
- _6b6=aLUN;
- }
- }
- }
- return _6b6;
- };
- CCognosViewer.prototype.getMemberUniqueName=function(sId){
- var sMUN=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6bd=this.getSelectionController();
- if(_6bd){
- var aMUN=_6bd.getMun(sCtx);
- if(aMUN){
- sMUN=aMUN;
- }
- }
- }
- return sMUN;
- };
- CCognosViewer.prototype.getObjectId=function(){
- var _6bf="window";
- if(typeof this.getId()=="string"){
- _6bf=getCognosViewerObjectRefAsString(this.getId());
- }
- return _6bf;
- };
- CCognosViewer.prototype.getQueryModelId=function(sId){
- var _6c1=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6c3=this.getSelectionController();
- if(_6c3){
- var _6c4=_6c3.getQueryModelId(sCtx);
- if(_6c4){
- _6c1=_6c4;
- }
- }
- }
- return _6c1;
- };
- CCognosViewer.prototype.getQueryName=function(sId){
- var _6c6=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6c8=this.getSelectionController();
- if(_6c8){
- var _6c9=_6c8.getRefQuery(sCtx);
- if(_6c9){
- _6c6=_6c9;
- }
- }
- }
- return _6c6;
- };
- CCognosViewer.prototype.getContextIds=function(sId,_6cb){
- var aIds=[];
- var sCtx=this.findCtx(sId);
- if(sCtx){
- var _6ce=sCtx.split("::");
- if(_6ce&&_6ce.length>1&&_6cb<_6ce.length){
- aIds=_6ce[_6cb].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 _6d5=aCtx[0][0];
- var _6d6=this.getSelectionController();
- if(_6d6){
- if(_6d6.isContextId(_6d5)){
- sCtx=sId;
- }
- }
- }
- if(!sCtx){
- var _6d7=this.findElementWithCtx(sId);
- if(_6d7){
- sCtx=_6d7.getAttribute("ctx");
- }
- }
- return sCtx;
- };
- CCognosViewer.prototype.findElementWithCtx=function(sId){
- var _6d9=sId;
- if(typeof sId=="string"){
- _6d9=this.findElementWithCtx(document.getElementById(sId));
- }
- if(_6d9){
- if(_6d9.getAttribute&&_6d9.getAttribute("ctx")){
- return _6d9;
- }
- for(var _6da=0;_6da<_6d9.childNodes.length;_6da++){
- var _6db=this.findElementWithCtx(_6d9.childNodes[_6da]);
- if(_6db){
- return _6db;
- }
- }
- }
- return null;
- };
- CCognosViewer.prototype.getUseValue=function(sId){
- var sVal=null;
- var sCtx=this.findCtx(sId).split("::")[0];
- if(sCtx){
- var _6df=this.getSelectionController();
- if(_6df){
- sVal=_6df.getUseValue(sCtx);
- }
- }
- return sVal;
- };
- CCognosViewer.prototype.init=function(_6e0){
- if(_6e0&&typeof _6e0=="object"){
- for(var _6e1 in _6e0){
- this[_6e1]=_6e0[_6e1];
- }
- }
- };
- CCognosViewer.prototype.initViewer=function(_6e2){
- var _6e3=new RequestHandler(this);
- var _6e4=document.getElementById("formBackJax"+this.getId());
- if(_6e4&&typeof _6e4.state!="undefined"&&_6e4.state.value.length>0){
- _6e3.loadReportHTML(_6e4.result.value);
- var _6e5=eval("("+_6e4.state.value+")");
- _6e3.updateViewerState(_6e5);
- _6e3.postComplete();
- }else{
- if(this.getUsePageRequest()){
- var _6e6=_6e2?_6e2.m_sStatus:null;
- if(isIE()){
- if(window.location.hash=="#working"){
- window.history.go(-2);
- return;
- }else{
- if(_6e6==="working"||_6e6==="stillWorking"){
- window.location.hash="#working";
- }
- }
- }else{
- if(_6e4&&_6e4.working){
- if(_6e4.working.value=="true"){
- window.history.go(-1);
- return;
- }else{
- if(_6e6==="working"||_6e6==="stillWorking"){
- _6e4.working.value="true";
- }
- }
- }
- }
- }
- _6e3.processInitialResponse(_6e2);
- }
- };
- CCognosViewer.prototype.saveBackJaxInformation=function(_6e7){
- var _6e8=document.getElementById("formBackJax"+this.getId());
- if(_6e8){
- if(typeof _6e8.state!="undefined"){
- _6e8.state.value=_6e7.getResponseStateText();
- }
- if(typeof _6e8.result!="undefined"){
- _6e8.result.value=_6e7.getResult();
- }
- }
- };
- CCognosViewer.prototype.pcc=function(evt){
- if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){
- this.preSelectNode=true;
- var _6ea=this.getSelectionController();
- if(_6ea){
- _6ea.pageContextClicked(evt);
- }
- }
- };
- CCognosViewer.prototype.isValidAjaxResponse=function(_6eb){
- return (_6eb&&_6eb.childNodes&&_6eb.childNodes.length>0&&_6eb.childNodes[0].nodeName!="parsererror"?true:false);
- };
- CCognosViewer.prototype.resubmitInSafeMode=function(_6ec){
- if(this.m_bUseSafeMode){
- this.resetViewerDispatcher();
- this.setUsePageRequest(true);
- this.envParams["cv.useAjax"]="false";
- if(_6ec){
- _6ec.retryRequest();
- }
- }
- };
- CCognosViewer.prototype.showLoadedContent=function(_6ed){
- if(_6ed!==null&&typeof _6ed!="undefined"){
- _6ed.style.display="block";
- }
- this.m_resizeReady=true;
- this.doneLoading();
- var obj=this;
- setTimeout(function(){
- obj.renderTabs();
- },1);
- };
- CCognosViewer.prototype.doneLoading=function(){
- var _6ef=this.getViewerWidget();
- if(_6ef){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- var _6f0=this.getStatus();
- if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){
- var _6f1=_6f0=="working"||_6f0=="stillWorking"||_6f0=="fault";
- _6ef.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_6f1});
- if(_6f0=="complete"){
- if(window.IBM&&window.IBM.perf){
- window.IBM.perf.log("viewer_doneLoading",this);
- }
- if(typeof _6ef.postLoadContent=="function"){
- _6ef.postLoadContent();
- }
- this.m_reportRenderingDone=true;
- if(!_6f1){
- var _6f2=this;
- setTimeout(function(){
- _6f2.m_readyToRespondToResizeEvent=true;
- },20);
- }
- }
- }
- if(_6f0!="fault"){
- _6ef.clearErrorDlg();
- }
- this.doneLoadingUpdateA11Y(_6f0);
- }else{
- var _6f0=this.getStatus();
- if(_6f0=="complete"){
- this.m_reportRenderingDone=true;
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_6f0=="working"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_6f3){
- if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){
- var _6f4=this.getKeepFocus();
- if(_6f3=="complete"){
- this.setKeepFocus(false);
- }
- var _6f5=null;
- if(this.getVisibleDialog()!==null){
- _6f5=this.getVisibleDialog().getDialogDiv();
- }else{
- if(_6f4===true){
- _6f5=document.getElementById("CVReport"+this.getId());
- }else{
- if(typeof _6f4=="string"){
- _6f5=document.getElementById(_6f4);
- }else{
- if(_6f4!==null){
- _6f5=_6f4;
- if(this.isBux){
- dojo.window.scrollIntoView(_6f5);
- }
- }
- }
- }
- }
- if(_6f5){
- setFocusToFirstTabItem(_6f5);
- }
- if(_6f3=="complete"){
- this.JAWSTalk(RV_RES.IDS_JS_READY);
- }else{
- if(_6f3=="working"||_6f3=="stillWorking"){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- }
- }
- }
- };
- CCognosViewer.prototype.JAWSTalk=function(_6f6){
- 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(_6f6));
- var _6f9=document.getElementById("RVContent"+id);
- if(_6f9){
- _6f9.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 _6fa=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
- if(_6fa===null){
- return false;
- }
- var _6fb=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag();
- return (_6fa.toLowerCase()==="on"&&_6fb!==false)||(_6fa.toLowerCase()==="off"&&_6fb===true);
- };
- CCognosViewer.prototype.setMaxContentSize=function(){
- if("10"!=window.getIEVersion()){
- return;
- }
- if(document.body.className==="viewer"){
- var _6fc=document.body.offsetHeight;
- var _6fd=this.getNonReportHeight(document.getElementById("CVReport"+this.getId()));
- var _6fe=document.getElementById("mainViewerTable"+this.getId());
- _6fe.style.maxHeight=_6fc-_6fd-2+"px";
- var _6ff=GUtil.generateCallback(this.setMaxContentSize,[true],this);
- if(!this.attachedOnResize){
- this.attachedOnResize=true;
- if(window.attachEvent){
- window.attachEvent("onresize",_6ff);
- }else{
- if(window.addEventListener){
- window.addEventListener("resize",_6ff,false);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.getNonReportHeight=function(node){
- var _701=0;
- var _702=node.parentNode;
- if(!_702){
- return _701;
- }
- if(_702.childNodes.length>1){
- for(var i=0;i<_702.childNodes.length;i++){
- var _704=_702.childNodes[i];
- if(_704!=node&&!isNaN(_704.clientHeight)&&_704.style.display!="none"){
- _701+=_704.clientHeight;
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _701+=this.getNonReportHeight(_702);
- }
- return _701;
- };
- CCognosViewer.prototype.addPageAdornments=function(){
- this.m_layoutElements=null;
- this.m_lidToElement=null;
- this.initFlashCharts();
- this.insertSortIconsForAllLists();
- var _705=this.getViewerWidget().getProperties();
- if(this.canInsertExpandIconsForAllCrosstabs()){
- this.insertExpandIconsForAllCrosstabs();
- }
- var _706=document.getElementById("CVReport"+this.getId());
- if(_706){
- var oCV=this;
- setTimeout(function(){
- if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){
- oCV.getPinFreezeManager().renderReportWithFrozenContainers(_706);
- }
- oCV.addInfoBar();
- },1);
- }
- this.getViewerWidget().reselectSelectionFilterObjects();
- this.getViewerWidget().addChromeWhitespaceHandler(this.getId());
- };
- CCognosViewer.prototype.addFlashChart=function(_708){
- this.m_flashChartsObjectIds.push(_708);
- };
- CCognosViewer.prototype.flashChartError=function(_709){
- var _70a=this.getViewerWidget();
- var _70b=_70a.getProperties();
- _70b.setProperty("flashCharts",false);
- var _70c=this.getAction("Redraw");
- _70c.isUndoable=function(){
- return false;
- };
- _70c.execute();
- };
- CCognosViewer.prototype.initFlashCharts=function(){
- var _70d=this.getViewerWidget();
- if(this.m_flashChartsObjectIds.length>0){
- var _70e=document.getElementById("rt"+this.getId());
- if(window.addEventListener){
- _70e.addEventListener("mousedown",onFlashChartRightClick,true);
- }else{
- var _70f={};
- var _710=function(){
- this.releaseCapture();
- };
- var _711=function(){
- onFlashChartRightClick(event);
- this.setCapture();
- };
- for(var i=0;i<this.m_flashChartsObjectIds.length;++i){
- var _713=this.m_flashChartsObjectIds[i];
- var _714=document.getElementById(_713);
- _70f[_713]=1;
- _714.parentNode.onmouseup=_710;
- _714.parentNode.onmousedown=_711;
- }
- if(this.m_flashChartsObjectIds.length>0){
- _70e.attachEvent("oncontextmenu",function(){
- if(_70f[window.event.srcElement.id]){
- return false;
- }
- });
- }
- }
- if(_70d){
- _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true);
- }
- }else{
- if(_70d){
- _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false);
- }
- }
- };
- CCognosViewer.prototype.initializeLayoutElements=function(){
- var _715=document.getElementById("rt"+this.getId());
- var _716=getElementsByAttribute(_715,"*","lid");
- this.m_lidToElement={};
- this.m_layoutElements=[];
- var _717=0;
- var _718=this.getPinFreezeManager();
- for(var i=0;i<_716.length;i++){
- var e=_716[i];
- if(!_718||!_718.getContainerElement(e)||_718.isElementInMainOutput(e)){
- this.m_layoutElements[_717]=e;
- this.m_lidToElement[e.getAttribute("lid")]=e;
- _717++;
- }
- }
- };
- CCognosViewer.prototype.getLayoutElement=function(_71b){
- if(!this.m_layoutElements){
- this.initializeLayoutElements();
- }
- if(this.m_layoutElements){
- return this.m_layoutElements[_71b];
- }
- 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 _71d=this.getRAPReportInfo();
- if(_71d){
- var _71e=document.getElementById("rt"+this.getId());
- this.initializeLayoutElements();
- var _71f=[];
- this.m_aInfoBar=[];
- for(var _720=0;_720<this.m_layoutElements.length;++_720){
- var _721=this.m_layoutElements[_720];
- var lid=_721.getAttribute("lid");
- if(lid){
- if(lid.indexOf("RAP_NDH_")>-1){
- lid=lid.substring(8);
- }
- lid=lid.substring(0,lid.indexOf(this.getId()));
- }
- var _723=_71d.getContainer(lid);
- if(_723&&typeof _723.parentContainer=="undefined"){
- var _724=this.collectChildContainers(_723.container);
- if(this.getPinFreezeManager()){
- oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_721);
- _721=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_721;
- }
- var _725=new InfoBar(this,_721,_723,_724,_720);
- _725.setTimingDetails(_71d._getEventTimings());
- _725.render();
- if(_725.hasSomethingRendered()){
- _71f.push(_725.getId());
- }
- this.m_aInfoBar.push(_725);
- }
- }
- var _726=this.getViewerWidget();
- if(_726){
- _726.refreshInfoBarRenderedState(_71f);
- }
- }
- };
- CCognosViewer.prototype.collectChildContainers=function(_727){
- var _728=[];
- var _729=this.getRAPReportInfo();
- if(_729){
- var _72a=_729.getContainerCount();
- for(var cidx=0;cidx<_72a;++cidx){
- var _72c=_729.getContainerFromPos(cidx);
- if(typeof _72c.parentContainer!="undefined"&&_72c.parentContainer==_727){
- _728.push(_72c);
- }
- }
- }
- return _728;
- };
- CCognosViewer.prototype.addReportInfo=function(){
- var _72d=this.getViewerWidget();
- if(typeof _72d==="undefined"||_72d===null){
- return;
- }
- if(!_72d.getAttributeValue("originalReport")||this.isIWidgetMobile()){
- return;
- }
- var _72e=this.envParams["baseReportModificationTime"];
- var _72f=_72d.getAttributeValue("baseReportModificationTime");
- if(typeof _72e!=="undefined"&&typeof _72f!=="undefined"&&_72f&&_72f!="<empty>"&&_72e!==_72f){
- var cvid=this.getId();
- var _731=document.getElementById("CVReport"+cvid);
- var _732=_731.parentNode;
- var id="ReportInfo"+cvid;
- var _734=document.createElement("div");
- _734.setAttribute("id",id+"_container");
- _734.setAttribute("cvid",cvid);
- _734.className="new-info-indicator BUXNoPrint";
- var _735=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";
- }
- _735.src=this.getWebContentRoot()+img;
- _735.className="reportInfoIcon";
- _735.setAttribute("tabIndex","0");
- _735.setAttribute("alt","");
- _735.setAttribute("title","");
- _735.setAttribute("role","presentation");
- var _737=RV_RES.IDS_JS_REPORT_INFO_TITLE;
- var _738=RV_RES.IDS_JS_REPORT_INFO_TEXT;
- var _739=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT;
- _734.appendChild(_735);
- _732.insertBefore(_734,_731);
- this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_735,position:["above","below"],title:_737,text:_738,linkText:_739,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true});
- }
- };
- CCognosViewer.prototype.reportInfoResetReport=function(){
- this.executeAction("ResetToOriginal");
- };
- CCognosViewer.prototype.hideReportInfo=function(){
- var _73a=document.getElementById("ReportInfo"+this.getId()+"_container");
- if(typeof _73a!=="undefined"&&_73a!==null){
- _73a.style.visibility="hidden";
- }
- };
- CCognosViewer.prototype.insertSortIcons=function(){
- var _73b=this.envParams?this.envParams.limitedInteractiveMode:true;
- if(typeof _73b==="undefined"||_73b===true){
- return;
- }
- if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){
- this.insertSortIconsForAllLists();
- }
- };
- CCognosViewer.prototype._getContainers=function(_73c){
- var _73d=[];
- var _73e="",_73f="";
- if(_73c==="list"){
- _73e="list";
- _73f="ls";
- }else{
- if(_73c==="crosstab"){
- _73e="crosstab";
- _73f="xt";
- }
- }
- var _740=document.getElementById("CVReport"+this.getId());
- if(this.getRAPReportInfo()){
- var _741=this.getRAPReportInfo().getContainerIds(_73e);
- for(var i=0;i<_741.length;++i){
- var _743=getElementsByAttribute(_740,"table","lid",_741[i]+this.getId(),1);
- if(_743&&_743.length>0){
- _73d.push(_743[0]);
- }
- }
- }else{
- _73d=getElementsByClassName(_740,"table",_73f);
- }
- return _73d;
- };
- CCognosViewer.prototype.insertSortIconsForAllLists=function(){
- var _744=this._getContainers("list");
- for(var i=0;i<_744.length;++i){
- this.insertSortIconsToList(_744[i]);
- }
- };
- CCognosViewer.prototype.insertSortIconsToList=function(_746){
- var _747=getElementsByAttribute(_746,"*","type","columnTitle");
- for(var i=0;i<_747.length;++i){
- var _749=_747[i];
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_749);
- if(_749.getAttribute("canSort")!="false"&&_749.getAttribute("CTNM")===null&&_749.getAttribute("CC")===null){
- var _74a=false;
- for(var _74b=0;_74b<_749.childNodes.length;_74b++){
- var _74c=_749.childNodes[_74b];
- if(_74c.nodeName.toLowerCase()=="img"){
- if(_74c.id&&_74c.id.indexOf("sortimg")===0){
- _74a=true;
- break;
- }
- var sLid=_74c.getAttribute("lid");
- if(sLid&&sLid.indexOf("SortIcon")!==-1){
- _749.removeChild(_74c);
- break;
- }
- }
- }
- if(!_74a&&this.canInsertSortIcon(_749)){
- this.insertSortIconToColumnHeader(_749);
- }
- }
- }
- };
- 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(_74f){
- var _750=_74f.getAttribute("rp_sort");
- return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_750!==undefined&&_750!==null&&_750.length>0));
- };
- CCognosViewer.prototype.insertSortIconToColumnHeader=function(_751){
- if(!_751.style.whiteSpace){
- _751.style.whiteSpace="nowrap";
- }
- var _752=document.createElement("img");
- _752.setAttribute("id","sortimg"+Math.random());
- if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){
- _752.onmouseover=function(){
- this.setAttribute("oldClassName",this.className);
- this.className+=" sortIconOver";
- };
- _752.onmouseout=function(){
- this.className=this.getAttribute("oldClassName");
- this.removeAttribute("oldClassName");
- };
- }
- _752.src=this.getImgSrc(_751);
- var _753=this.getSortInfo(_751);
- var _754=this.getSortOrder(_753);
- _752.setAttribute("alt",this.getSortAltText(_754));
- _752.setAttribute("title",this.getSortAltText(_754));
- _752.className=this.getSortClass(_753);
- _752.setAttribute("sortOrder",_754);
- _751.appendChild(_752);
- };
- CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_755,_756){
- var _757=this.getSelectionController();
- var _758=_757.hasCalculationMetadata(_756,[_756],"crosstab");
- return ((_757.canDrillDown(_756)||_755.alwaysCanExpandCollapse)&&!_757.isCalculationOrMeasure(_756,_758));
- };
- CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){
- var _759=this._getContainers("crosstab");
- var _75a=this;
- var _75b=this.getRAPReportInfo();
- var _75c=this.getReportContextHelper();
- for(var i=0;i<_759.length;i++){
- var _75e=_759[i];
- var _75f=_75e.getAttribute("lid");
- _75f=_75f.substring(0,_75f.length-this.getId().length);
- var _760=getElementsByAttribute(_75e,["td","th"],"ctnm","true");
- for(var j=0;j<_760.length;j++){
- var _762=_760[j];
- var sCtx=this.findCtx(_762);
- var _764=_75c.getDataItemName(sCtx);
- if(_764){
- var _765=_75b.getItemInfo(_75f,_764);
- var _766=_75c.processCtx(sCtx);
- if(this.canInsertShowExpandCollapseIconForNode(_765,_766[0][0])){
- var sMun=_75c.getMun(sCtx);
- var _768=sMun&&_765.expandedMembers&&_765.expandedMembers[sMun]===true;
- var _769=document.createElement("div");
- _769.setAttribute("skipSelection","true");
- _769.className="expandButton "+(_768?"collapse":"expand");
- _762.insertBefore(_769,_762.firstChild);
- var _76a=document.createElement("span");
- _76a.className="expandButtonCaption";
- _76a.innerHTML=(_768?"[-]":"[+]");
- _769.appendChild(_76a);
- }
- }
- }
- }
- };
- CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){
- var _76b=this._getContainers("crosstab");
- for(var i=0;i<_76b.length;i++){
- var _76d=_76b[i];
- var _76e=_76d.getAttribute("lid");
- _76e=_76e.substring(0,_76e.length-this.getId().length);
- var _76f=getElementsByAttribute(_76d,"td","ctnm","true");
- for(var j=0;j<_76f.length;j++){
- var _771=_76f[j];
- if(_771.firstChild.className==="expandButton collapse"||_771.firstChild.className==="expandButton expand"){
- _771.removeChild(_771.firstChild);
- }
- }
- }
- };
- CCognosViewer.prototype.fillInContextData=function(){
- if(!this.isLimitedInteractiveMode()){
- var _772=document.getElementById("CVReport"+this.getId());
- var _773=getElementsByClassName(_772,"table","ls");
- for(var i=0;i<_773.length;++i){
- var _775=getElementsByAttribute(_773[i],"*","type","columnTitle");
- for(var j=0;j<_775.length;++j){
- this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_775[j]);
- }
- }
- }
- };
- CCognosViewer.prototype.getSortAltText=function(_777){
- if(_777==="ascending"){
- return RV_RES.IDS_JS_SORT_ASCENDING;
- }else{
- if(_777==="descending"){
- return RV_RES.IDS_JS_SORT_DESCENDING;
- }else{
- if(_777==="nosort"){
- return RV_RES.IDS_JS_NOT_SORTED;
- }
- }
- }
- };
- CCognosViewer.prototype.getSortInfo=function(_778){
- var _779=_778.getAttribute("rp_sort");
- if(_779){
- _779=_779.split(".");
- }
- return _779;
- };
- CCognosViewer.prototype.getSortClass=function(_77a){
- var _77b="sortIconHidden";
- if(_77a){
- if(_77a[0]==="d"||_77a[0]==="a"){
- _77b="sortIconVisible";
- }
- }
- return _77b;
- };
- CCognosViewer.prototype.getSortOrder=function(_77c){
- var _77d="nosort";
- if(_77c){
- if(_77c[0]==="d"){
- _77d="descending";
- }else{
- if(_77c[0]==="a"){
- _77d="ascending";
- }
- }
- }
- return _77d;
- };
- CCognosViewer.prototype.getImgSrc=function(_77e){
- var _77f=_77e.getAttribute("rp_sort");
- var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_77f);
- return src;
- };
- CCognosViewer.prototype.getSortIconName=function(_781){
- var _782="sort_no.gif";
- if(_781){
- _781=_781.split(".");
- if(_781[0]==="d"){
- _782="sort_descending.gif";
- }else{
- if(_781[0]==="a"){
- _782="sort_ascending.gif";
- }
- }
- }
- return _782;
- };
- 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 _783=this.getViewerWidget();
- return (_783&&_783.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0);
- };
- CCognosViewer.prototype.getPromptParametersInfo=function(){
- var _784=null;
- if(this.widgetHasPromptParameters()){
- _784="<widget><parameterValues>"+sXmlEncode(this.getExecutionParameters())+"</parameterValues>"+this.envParams["reportPrompts"]+"</widget>";
- }
- return _784;
- };
- CCognosViewer.prototype.raisePromptEvent=function(_785,_786,_787){
- try{
- var _788=this.getViewerWidget();
- _788.getWidgetContextManager().raisePromptEvent(_785,_786,_786.get("ui.action"),this.getModelPath(),_787);
- }
- catch(e){
- }
- };
- CCognosViewer.prototype.getModelPath=function(){
- var _789=this.getSelectionController().getModelPathForCurrentSelection();
- if(_789){
- return _789;
- }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(_78a){
- this._keepFocus=_78a;
- };
- CCognosViewer.prototype.getKeepFocus=function(){
- if(typeof this._keepFocus!="undefined"){
- return this._keepFocus;
- }
- return false;
- };
- CCognosViewer.prototype.onFocus=function(evt){
- var _78c=this.getA11YHelper();
- if(_78c){
- _78c.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 _78e=this.getStatus();
- var _78f=document.getElementById("cvSkipToReport"+this.getId());
- if(_78f){
- _78f.style.display=_78e=="prompting"?"none":"";
- }
- };
- CCognosViewer.prototype.updateSkipToNavigationLink=function(_790){
- var _791=document.getElementById("cvSkipToNavigation"+this.getId());
- if(_791){
- _791.style.display=_790?"none":"";
- }
- };
- CCognosViewer.prototype.pageAction=function(_792){
- this.setKeepFocus("CVNavLinks"+this.getId());
- var _793=new ViewerDispatcherEntry(this);
- _793.addFormField("ui.action",_792);
- if(this.getCurrentlySelectedTab()){
- _793.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab());
- }
- this.dispatchRequest(_793);
- };
- CCognosViewer.prototype.writeNavLink=function(_794,_795,_796,_797){
- var _798="";
- if(_796){
- _798="<td nowrap=\"nowrap\">"+"<img src=\"LINK_IMG\" width=\"15\" height=\"15\" alt=\"\" style=\"vertical-align:middle;\">"+"</td>"+"<td nowrap=\"nowrap\">";
- if(_797){
- _798+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".getViewerWidget().getSavedOutput().pageAction('LINK_REQUEST');return false;\"";
- }else{
- _798+="<a href=\"#\" tabindex=\"0\" onclick=\""+getCognosViewerObjectRefAsString(this.getId())+".pageAction('LINK_REQUEST');return false;\"";
- }
- _798+=">LINK_TEXT</a> "+"</td>";
- }else{
- _798="<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+(!_796&&_794.sImgDisabled?_794.sImgDisabled:_794.sImg);
- return _798.replace(/LINK_REQUEST/g,_795).replace(/LINK_TEXT/g,_794.sText).replace(/LINK_IMG/g,sImg);
- };
- CCognosViewer.prototype.loadNavLinks=function(){
- var _79a=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts");
- if(_79a){
- this.init(eval("("+_79a+")"));
- }
- };
- CCognosViewer.prototype.writeNavLinks=function(sSR,_79c){
- var _79d=document.getElementById("CVNavLinks"+this.getId());
- if(_79d){
- var _79e=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)){
- _79d.style.display="none";
- if(_79e){
- _79e.style.display="none";
- }
- this.updateSkipToNavigationLink(true);
- return;
- }
- this.updateSkipToNavigationLink(false);
- if(_79e){
- _79e.style.display="";
- }
- _79d.style.display=(isIE()?"block":"table-cell");
- var _79f="";
- _79f+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"pageControls BUXNoPrint\" role=\"presentation\"><tbody><tr>";
- _79f+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_79c);
- _79f+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_79c);
- _79f+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_79c);
- _79f+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_79c);
- _79f+="</tr></tbody></table>";
- var _7a0=document.getElementById("CVNavLinks_label"+this.getId());
- var _7a1="";
- if(_7a0){
- _7a1+="<span id=\"CVNavLinks_label"+this.getId()+"\" style=\"visibilty:hidden; display:none;\">"+_7a0.innerHTML+"</span>";
- }
- _79d.innerHTML=_7a1+_79f;
- }else{
- if(this.shouldWriteNavLinks()){
- setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_79c+"\");",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 _7a5=this.getActiveRequest();
- if(_7a5){
- _7a5.abortHttpRequest();
- }
- };
- CCognosViewer.prototype.canCancel=function(){
- var _7a6=this.getTracking();
- var _7a7=this.getStatus();
- return _7a6!=""&&_7a7!="complete";
- };
- CCognosViewer.prototype.cancel=function(_7a8){
- if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){
- this.getWorkingDialog().disableCancelButton(_7a8);
- }
- this.removeTransparentBackgroundLayer();
- this.clearPrompts();
- if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){
- this.envParams["fragment.fireEventWhenComplete"]="";
- }
- var _7a9=null;
- if(this.m_undoStack.length>0){
- _7a9=this.m_undoStack.pop();
- }
- var _7aa=this.getActiveRequest();
- if(this.canCancel()===true||_7aa){
- if(_7aa){
- _7aa.cancelRequest(true);
- }else{
- var _7ab=null;
- var _7ac=_7a9!=null&&_7a9.m_bRefreshPage;
- if(typeof this.getCancelDispatcherEntry=="function"){
- _7ab=this.getCancelDispatcherEntry();
- }else{
- if(_7ac||this.m_viewerFragment){
- _7ab=new ViewerDispatcherEntry(this);
- }else{
- if(this.getId()=="RS"){
- _7ab=new ViewerDispatcherEntry(this);
- _7ab.addFormField("cv.responseFormat","rs");
- }else{
- _7ab=new DispatcherEntry(this);
- _7ab.addFormField("cv.responseFormat","successfulRequest");
- }
- }
- }
- _7ab.forceSynchronous();
- _7ab.addFormField("ui.action","cancel");
- _7ab.addFormField("m_tracking",this.getTracking());
- this.setTracking("");
- if(_7ac){
- var _7ad="<CognosViewerUndo><conversation>";
- _7ad+=_7a9.m_sConversation;
- _7ad+="</conversation></CognosViewerUndo>";
- _7ab.addFormField("cv.previousSession",_7ad);
- }
- this.dispatchRequest(_7ab);
- if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){
- this.executeCallback("cancel");
- }
- }
- this.setStatus("complete");
- var _7ae=this.envParams["ui.action"];
- var _7af=this.getUsePageRequest();
- var _7b0=this.m_undoStack.length;
- if(_7a9!=null){
- this.m_sConversation=_7a9.m_sConversation;
- this.m_sParameters=_7a9.m_sParameters;
- this.envParams={};
- applyJSONProperties(this.envParams,_7a9.m_envParams);
- this.m_undoStack.push(_7a9);
- }
- this.setTracking("");
- if(this.previouslySelectedTab){
- this.cancelTabSwitch();
- }else{
- if(_7ae!="view"&&_7b0<=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 _7b1=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_7b1;k++){
- var _7b3=eval(this.preProcessControlArray[k]);
- if(_7b3){
- if(_7b3.clearSubmit){
- _7b3.clearSubmit();
- }
- }
- }
- }
- };
- CCognosViewer.prototype.wait=function(){
- if(this.isWorking()){
- this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING);
- var _7b4=new ViewerDispatcherEntry(this);
- _7b4.addFormField("ui.action","wait");
- _7b4.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _7b4.addFormField("cv.actionState",this.envParams["cv.actionState"]);
- _7b4.addNonEmptyStringFormField("bux",this.envParams["bux"]);
- _7b4.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]);
- this.dispatchRequest(_7b4);
- return true;
- }
- return false;
- };
- CCognosViewer.prototype.setCAFContext=function(_7b5){
- this.m_sCAFContext=_7b5;
- };
- CCognosViewer.prototype.setContextInfo=function(sXML){
- this.m_sContextInfoXML=sXML;
- };
- CCognosViewer.prototype.setConversation=function(_7b7){
- this.m_sConversation=_7b7;
- };
- CCognosViewer.prototype.setActionState=function(_7b8){
- this.m_sActionState=_7b8;
- };
- CCognosViewer.prototype.setStatus=function(_7b9){
- this.m_sStatus=_7b9;
- };
- CCognosViewer.prototype.setDebug=function(_7ba){
- this.m_bDebug=_7ba;
- };
- CCognosViewer.prototype.setExecutionParameters=function(_7bb){
- this.m_sParameters=_7bb;
- };
- CCognosViewer.prototype.setMetadataInfo=function(sXML){
- this.m_sMetadataInfoXML=sXML;
- };
- CCognosViewer.prototype.setSecondaryRequests=function(_7bd){
- if(_7bd){
- this.m_aSecRequests=_7bd;
- }else{
- this.m_aSecRequests=[];
- }
- };
- CCognosViewer.prototype.setTracking=function(_7be){
- this.m_sTracking=_7be;
- };
- CCognosViewer.prototype.setSoapFault=function(_7bf){
- this.m_sSoapFault=_7bf;
- };
- CCognosViewer.prototype.showOutputInNewWindow=function(sURL){
- var _7c1=document.getElementById("formWarpRequest"+this.getId());
- var _7c2=_7c1.elements["ui.postBack"];
- var _7c3=_7c1.elements["ui.backURL"];
- if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){
- window.detachLeavingRV();
- }
- if(window.opener||_7c2||(_7c3&&_7c3.value!=="javascript:window.close();")){
- window.open(sURL,"","");
- this.updateNewBrowserWindow();
- }else{
- window.location=sURL;
- }
- };
- CCognosViewer.prototype.hideToolbar=function(_7c4){
- this.m_bHideToolbar=_7c4;
- };
- CCognosViewer.prototype.showExcel=function(sURL){
- var _7c6=true;
- var _7c7=document.getElementById("formWarpRequest"+this.getId());
- var _7c8=_7c7.elements["ui.backURL"];
- if(_7c8&&_7c8.value.indexOf("javascript:window.close()")!==0&&_7c8.value.indexOf("close.html")===-1){
- _7c6=false;
- }
- if(window.detachLeavingRV){
- window.detachLeavingRV();
- }
- var _7c9=window;
- if(window.opener&&(isIE()||isFF())&&_7c6){
- _7c9=window.opener?window.opener:window;
- }else{
- if(!window.opener&&_7c6){
- window.location=sURL;
- return;
- }
- }
- var _7ca=null;
- var _7cb="";
- try{
- if(this.envParams["cv.excelWindowOpenProperties"]){
- _7cb=this.envParams["cv.excelWindowOpenProperties"];
- }
- _7ca=_7c9.open(sURL,"",_7cb);
- }
- catch(e){
- _7c9=window;
- _7ca=_7c9.open(sURL,"",_7cb);
- }
- if(!_7ca||_7ca.closed||typeof _7ca.closed=="undefined"){
- alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED);
- }
- this.updateNewBrowserWindow();
- };
- CCognosViewer.prototype.updateNewBrowserWindow=function(){
- var id=this.getId();
- var _7cd=document.forms["formWarpRequest"+id].elements["ui.postBack"];
- var _7ce=document.forms["formWarpRequest"+id].elements["ui.backURL"];
- if(_7cd&&_7cd.value){
- setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100);
- }else{
- if(_7ce&&_7ce.value){
- if(_7ce.value.length<2048){
- setTimeout("location.replace(\""+_7ce.value+"\");",100);
- }else{
- _7ce=decodeURIComponent(_7ce.value);
- var _7cf=_7ce.split("?");
- var _7d0=document.createElement("form");
- _7d0.style.display="none";
- _7d0.setAttribute("target","_self");
- _7d0.setAttribute("method","post");
- _7d0.setAttribute("action",_7cf[0]);
- var _7d1=_7cf[1].split("&");
- for(var _7d2=0;_7d2<_7d1.length;_7d2++){
- var _7d3=_7d1[_7d2].indexOf("=");
- var _7d4=_7d1[_7d2].substr(0,_7d3);
- var _7d5=_7d1[_7d2].substr(_7d3+1);
- var _7d6=document.createElement("img");
- _7d6.setAttribute("type","hidden");
- _7d6.setAttribute("name",decodeURIComponent(_7d4));
- _7d6.setAttribute("value",decodeURIComponent(_7d5));
- _7d0.appendChild(_7d6);
- }
- document.body.appendChild(_7d0);
- _7d0.submit();
- }
- }else{
- window.close();
- }
- }
- };
- CCognosViewer.prototype.showWaitPage=function(){
- };
- CCognosViewer.prototype.sendRequest=function(_7d7){
- var _7d8=new ViewerDispatcherEntry(this);
- _7d8.addFormField("ui.action",_7d7.getAction());
- if(_7d7.getCallback()!=null){
- _7d8.setCallbacks({"complete":{"object":null,"method":_7d7.getCallback()}});
- }
- var _7d9=_7d7.getFormFields().keys();
- for(var _7da=0;_7da<_7d9.length;_7da++){
- _7d8.addFormField(_7d9[_7da],_7d7.getFormFields().get(_7d9[_7da]));
- }
- var _7db=_7d7.m_oOptions.keys();
- for(var _7dc=0;_7dc<_7db.length;_7dc++){
- _7d8.addFormField(_7db[_7dc],_7d7.getOption(_7db[_7dc]));
- }
- var _7dd=_7d7.m_oParams.keys();
- for(var _7de=0;_7de<_7dd.length;_7de++){
- _7d8.addFormField(_7dd[_7de],_7d7.getParameter(_7dd[_7de]));
- }
- this.dispatchRequest(_7d8);
- };
- CCognosViewer.prototype.promptAction=function(_7df,sUrl){
- this.setKeepFocus(true);
- if(typeof datePickerObserverNotify=="function"){
- datePickerObserverNotify();
- }
- var _7e1=this.getViewerWidget();
- if(_7df=="cancel"){
- this.cancelPrompt(sUrl);
- if(_7e1){
- if(!this.isReportRenderingDone()){
- var _7e2={action:"deleteWidget"};
- _7e1.fireEvent("com.ibm.bux.widget.action",null,_7e2);
- }
- }
- }else{
- var oReq=new ViewerDispatcherEntry(this);
- oReq.addFormField("ui.action",_7df=="back"?"back":"forward");
- if(_7df=="finish"){
- oReq.addFormField("run.prompt",false);
- }else{
- if(_7df=="back"||_7df=="next"){
- oReq.addFormField("run.prompt",true);
- }
- }
- if(_7df=="reprompt"){
- if(typeof repromptObserverNotify=="function"){
- repromptObserverNotify(this);
- }
- oReq.addFormField("_promptControl",_7df);
- }else{
- oReq.addFormField("_promptControl","prompt");
- }
- if(_7e1){
- _7e1.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true});
- if(_7e1.isSelectionFilterEnabled){
- _7e1.clearSelectionFilter();
- }
- }
- this.submitPromptValues(oReq);
- }
- };
- CCognosViewer.prototype.cancelPrompt=function(sUrl){
- this.cancel();
- };
- CCognosViewer.prototype.notify=function(_7e5,_7e6){
- var _7e7=0,k=0;
- var _7e9=null;
- if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){
- _7e7=this.rangeObserverArray.length;
- for(k=0;k<_7e7;k++){
- _7e9=eval(this.rangeObserverArray[k]);
- if(_7e9&&typeof _7e9=="object"&&typeof _7e9.update=="function"){
- _7e9.update();
- }
- }
- }
- var _7ea=true;
- if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){
- _7e7=this.preProcessControlArray.length;
- for(k=0;k<_7e7;k++){
- _7e9=eval(this.preProcessControlArray[k]);
- if((typeof _7e9.getValid=="function")&&!_7e9.getValid()){
- _7ea=false;
- break;
- }
- }
- }
- this.notifyPageNavEnabled(_7ea);
- if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){
- _7e7=this.multipleObserverArray.length;
- for(k=0;k<_7e7;k++){
- _7e9=eval(this.multipleObserverArray[k]);
- if(_7e9&&typeof _7e9=="object"&&typeof _7e9.checkInsertRemove=="function"){
- _7e9.checkInsertRemove();
- }
- }
- }
- for(var _7eb=0;_7eb<gaNotifyTargets.length;_7eb++){
- var _7ec=gaNotifyTargets[_7eb];
- if(typeof _7ec!="undefined"&&typeof _7ec.notify=="function"){
- _7ec.notify(_7e5,_7e6);
- }
- }
- };
- CCognosViewer.prototype.notifyPageNavEnabled=function(_7ed){
- if(this.pageNavigationObserverArray&&this.pageNavigationObserverArray instanceof Array){
- var _7ee=this.pageNavigationObserverArray.length;
- var _7ef=false;
- var _7f0=null;
- var _7f1=null;
- var k=0;
- for(k=0;k<_7ee;k++){
- try{
- _7f0=eval(this.pageNavigationObserverArray[k]);
- _7f1=_7f0.getType();
- if(_7f1==PROMPTBUTTON_FINISH){
- _7ef=true;
- break;
- }
- }
- catch(e){
- }
- }
- for(k=0;k<_7ee;k++){
- try{
- _7f0=eval(this.pageNavigationObserverArray[k]);
- _7f1=_7f0.getType();
- if(!_7ed){
- if((_7f1==PROMPTBUTTON_NEXT)||(_7f1==PROMPTBUTTON_OK)||(_7f1==PROMPTBUTTON_FINISH)){
- _7f0.setEnabled(false);
- }
- }else{
- if(_7f1==PROMPTBUTTON_FINISH){
- _7f0.setEnabled(this.bCanFinish);
- }else{
- if(_7f1==PROMPTBUTTON_NEXT){
- _7f0.setEnabled(this.bNextPage||!_7ef);
- }else{
- if(_7f1==PROMPTBUTTON_OK){
- _7f0.setEnabled(true);
- }
- }
- }
- }
- }
- catch(e2){
- }
- }
- }
- };
- CCognosViewer.prototype.getDrillResetHUNs=function(_7f3){
- var _7f4=null;
- if(this.getRAPReportInfo()){
- _7f4=this.getRAPReportInfo().getDrilledOnHUNs();
- }
- if(!_7f4){
- return null;
- }
- var _7f5=this.getExecutionParameters();
- if(!_7f5){
- return null;
- }
- var _7f6=this._getListOfChangedPromptParameters(_7f3);
- if(!_7f6||_7f6.length===0){
- return null;
- }
- var _7f7=[];
- for(var i=0;i<_7f4.length;i++){
- for(var j=0;j<_7f6.length;j++){
- if(_7f6[j].indexOf(_7f4[i])!==-1){
- _7f7.push(_7f4[i]);
- }
- }
- }
- return _7f7;
- };
- CCognosViewer.prototype.getOldParameters=function(){
- var _7fa=new CParameterValues();
- var _7fb=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_7fb.childNodes.length==1){
- _7fa.loadWithOptions(_7fb.childNodes[0],false);
- }
- if(!_7fa||!_7fa.m_parameterValues||!_7fa.m_parameterValues.m_aValues){
- return null;
- }
- return _7fa.m_parameterValues.m_aValues;
- };
- CCognosViewer.prototype._createDummyRequest=function(){
- var _7fc=new ViewerDispatcherEntry(this);
- return this.preparePromptValues(_7fc);
- };
- CCognosViewer.prototype._getChangedPromptParametersValues=function(_7fd,_7fe,_7ff){
- var _800=XMLBuilderLoadXMLFromString(_7fe);
- if(!_800){
- for(var j=0;j<_7fd.length;j++){
- var _802=_7fd[j].m_useValue;
- if(_7fe.indexOf(sXmlEncode(_802))<0){
- _7ff.push(_802);
- }
- }
- return;
- }
- var _803=_800.getElementsByTagName("selectOption");
- if(!_803){
- return;
- }
- var _804=_7fd.length;
- var _805=_803.length;
- for(var i=0;i<_805;i++){
- var _7fe=_803[i].attributes.getNamedItem("useValue").nodeValue;
- bMatchOldParam=false;
- for(var j=0;j<_804;j++){
- var _802=_7fd[j].m_useValue;
- if(_7fe.indexOf(_802)===0){
- bMatchOldParam=true;
- break;
- }
- }
- if(!bMatchOldParam){
- _7ff.push(_7fe);
- }
- }
- };
- CCognosViewer.prototype._getListOfChangedPromptParameters=function(_807){
- var _808=this.getOldParameters();
- if(!_808){
- return null;
- }
- var _809=[];
- if(!_807){
- var _80a=this._createDummyRequest();
- for(var _80b in _808){
- var _80c=_808[_80b].m_parmValueItems;
- var _80d=_80a.getRequest().getFormFields().get("p_"+_80b);
- if(!_80d){
- continue;
- }
- this._getChangedPromptParametersValues(_80c,_80d,_809);
- }
- }else{
- if(!_807.parameters){
- return null;
- }
- var _80e=_807.parameters;
- for(var i=0;i<_80e.length;i++){
- var _810=_80e[i].parmName;
- if(!_810||!_808[_810]){
- continue;
- }
- var _80c=_808[_810].m_parmValueItems;
- if(!_80c||_80c.length==0){
- continue;
- }
- this._getChangedPromptParametersValues(_80c,_80e[i].parmValue,_809);
- }
- }
- return _809;
- };
- CCognosViewer.prototype.submitPromptValues=function(oReq){
- if(this.gbPromptRequestSubmitted===true){
- return false;
- }
- this.gbPromptRequestSubmitted=true;
- if(this.isBux){
- var _812=this.getDrillResetHUNs(null);
- if(_812&&_812.length!==0){
- var _813={"drilledResetHUNs":_812};
- this.executeAction("DrillReset",_813);
- return;
- }
- }
- oReq=this.preparePromptValues(oReq);
- if(window.portletSharePrompt){
- var _814=this.portletPromptParams(oReq);
- if(_814.length>0){
- portletSharePrompt(_814);
- }
- }
- this.dispatchRequest(oReq);
- };
- CCognosViewer.prototype.portletPromptParams=function(oReq){
- var _816=[];
- var _817=null;
- var _818=true;
- var _819=oReq.getFormFields().keys();
- for(var _81a=0;_81a<_819.length;_81a++){
- _817=_819[_81a];
- if(_817=="_promptControl"&&oReq.getFormField(_817)=="search"){
- _818=false;
- break;
- }else{
- if(_817.indexOf("p_")===0){
- if(_817.indexOf("p_credential")===0){
- _818=false;
- break;
- }else{
- _816.push([_817,oReq.getFormField(_817)]);
- }
- }
- }
- }
- if(_816&&!_818){
- _816=[];
- }
- return _816;
- };
- CCognosViewer.prototype.preparePromptValues=function(oReq){
- var _81c=[];
- if(this.preProcessControlArray){
- var _81d=this.preProcessControlArray.length;
- var k=0;
- for(k=0;k<_81d;k++){
- var _81f=eval(this.preProcessControlArray[k]);
- var _820=(typeof _81f.isEnabled=="function"?_81f.isEnabled():true);
- if(_81f&&typeof _81f.preProcess=="function"&&_820){
- _81f.preProcess();
- if(_81f.m_oSubmit){
- if(oReq.addParameter){
- oReq.addParameter(_81f.m_oSubmit.name,_81f.m_oSubmit.value);
- }else{
- oReq.addFormField(_81f.m_oSubmit.name,_81f.m_oSubmit.value);
- }
- _81c.push(_81f.m_oSubmit);
- if(_81f.m_sPromptId&&_81f.m_oForm&&_81f.m_oForm.elements&&typeof _81f.m_oForm.elements["p_"+_81f.m_sRef]=="object"){
- if(oReq.addParameter){
- oReq.addParameter("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value);
- }else{
- oReq.addFormField("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value);
- }
- }
- }
- }
- }
- }
- var _821=document.getElementById("formWarpRequest"+this.getId());
- if(_821){
- var _822=_821.elements;
- for(var _823=0;_823<_822.length;_823++){
- var _824=_822[_823];
- if(!_824.name||!_824.name.match(/^p_/)){
- continue;
- }
- var _825=true;
- for(var _826=0;_826<_81c.length;_826++){
- if(_81c[_826]==_824){
- _825=false;
- break;
- }
- }
- if(_825){
- oReq.addFormField(_824.name,_824.value);
- _81c.push(_824);
- }
- }
- }
- var oRM=this["CognosReport"];
- if(oRM){
- var _828=oRM.prompt.getParameters();
- for(var i=0;i<_828.length;i++){
- var _82a="p_"+_828[i].getName();
- if(!oReq.getFormField(_82a)){
- oReq.addFormField(_82a,_828[i].getXML());
- }
- }
- }
- return oReq;
- };
- CCognosViewer.prototype.setViewerWidget=function(_82b){
- this.m_viewerWidget=_82b;
- };
- CCognosViewer.prototype.getViewerWidget=function(){
- return this.m_viewerWidget;
- };
- CCognosViewer.prototype.getFlashChartOption=function(){
- var _82c=this.getViewerWidget();
- var _82d=null;
- if(_82c){
- var _82e=_82c.getProperties();
- if(_82e){
- _82d=_82e.getFlashCharts();
- }
- }
- return _82d;
- };
- CCognosViewer.prototype.fireWidgetEvent=function(evt,_830){
- var _831=this.getViewerWidget();
- if(_831!=null){
- _831.fireEvent(evt,null,_830);
- }
- };
- CCognosViewer.prototype.isMobile=function(){
- return false;
- };
- CCognosViewer.prototype.setVisibleDialog=function(_832){
- this.m_visibleDialog=_832;
- };
- CCognosViewer.prototype.getVisibleDialog=function(){
- if(typeof this.m_visibleDialog!="undefined"){
- return this.m_visibleDialog;
- }
- return null;
- };
- CCognosViewer.prototype.getContentLocale=function(){
- var _833=document.getElementById("formWarpRequest"+this.getId());
- if(_833&&_833["ui.contentLocale"]&&_833["reRunObj"]&&_833["reRunObj"].value.length>0){
- return _833["ui.contentLocale"].value;
- }
- return null;
- };
- CCognosViewer.prototype.updateLayout=function(_834){
- var cvid=this.getId();
- var _836=document.getElementById("CVHeader"+cvid);
- var _837=document.getElementById("CVToolbar"+cvid);
- if(!_836&&!_837){
- setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_834+"\");",100);
- return;
- }
- if(_836){
- var _838=this.getUIConfig()&&!this.getUIConfig().getShowBanner();
- if((_834=="prompting"&&!this.bShowHeaderWithPrompts)||_838){
- _836.parentNode.style.display="none";
- }else{
- _836.parentNode.style.display="";
- }
- }
- if(_837){
- if(_834=="prompting"||this.m_bHideToolbar==true){
- _837.parentNode.style.display="none";
- }else{
- _837.parentNode.style.display="";
- }
- }
- };
- CCognosViewer.prototype.updateResponseSpecification=function(_839){
- this.sResponseSpecification=_839;
- };
- CCognosViewer.prototype.getResponseSpecification=function(){
- return this.sResponseSpecification;
- };
- CCognosViewer.prototype.release=function(_83a){
- if(this.getStatus()!="fault"){
- this._release(_83a);
- }
- };
- CCognosViewer.prototype._release=function(_83b){
- var form=document.getElementById("formWarpRequest"+this.getId());
- var _83d=this.getTracking();
- if(!_83d&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _83d=form["m_tracking"].value;
- form["m_tracking"].value="";
- }
- this.setTracking("");
- if(_83d){
- var _83e=new DispatcherEntry(this);
- if(this.isWorkingOrPrompting()){
- _83e.addFormField("ui.action","cancel");
- }else{
- _83e.addFormField("ui.action","release");
- }
- _83e.addFormField("cv.responseFormat","successfulRequest");
- _83e.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]);
- _83e.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]);
- _83e.addFormField("m_tracking",_83d);
- if(_83b!=true){
- _83e.forceSynchronous();
- }
- var _83f=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry();
- if(_83f&&_83f.getFormField("cv.outputKey")){
- _83e.addFormField("b_action","cvx.high");
- _83e.addFormField("cv.outputKey",_83f.getFormField("cv.outputKey"));
- _83e.addFormField("cv.waitForResponse","false");
- _83e.setHeaders(_83f.getHeaders());
- }
- var _840=_83e.getRequest().getFormFields();
- var _841=_840.keys();
- var data=new URLSearchParams();
- for(var _843=0;_843<_841.length;_843++){
- data.append(_841[_843],_840.get(_841[_843]));
- }
- 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(_844){
- this.release(_844);
- if(!this.m_destroyed){
- if(typeof window.gaRV_INSTANCES!="undefined"){
- for(var _845=0;_845<window.gaRV_INSTANCES.length;_845++){
- if(window.gaRV_INSTANCES[_845].m_sId==this.getId()){
- window.gaRV_INSTANCES.splice(_845,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 _849=e.parentNode;
- if(_849){
- _849.removeChild(e);
- }
- }
- delete this.m_layoutElements;
- delete this.m_lidToElement;
- }
- if(this.m_oDrillMgr){
- this.m_oDrillMgr.setCV(null);
- }
- var _84a=this.getSelectionController();
- if(_84a){
- GUtil.destroyProperties(_84a);
- }
- var cvId=this.getId();
- this.m_viewerDispatcher=null;
- GUtil.destroyProperties(this,true);
- cleanupGlobalObjects(cvId);
- }
- };
- CCognosViewer.prototype.exit=function(){
- this.release();
- };
- CCognosViewer.prototype.executeAction=function(_84c,_84d){
- var _84e=this.getAction(_84c);
- _84e.setRequestParms(_84d);
- return _84e.execute();
- };
- CCognosViewer.prototype.getCalculation=function(_84f){
- var calc=null;
- var _851=this.getCalculationCache();
- if(_851[_84f]){
- calc=_851[_84f];
- }else{
- if(window[_84f]&&typeof window[_84f]=="function"){
- calc=new window[_84f]();
- calc.setCognosViewer(this);
- }
- _851[_84f]=calc;
- }
- return calc;
- };
- CCognosViewer.prototype.findBlueDotMenu=function(_852){
- var root=null;
- var _854=(_852)?_852:this.getToolbar();
- for(var idx=0;idx<_854.length;++idx){
- if(typeof _854[idx]._root!="undefined"){
- root=_854[idx]._root;
- break;
- }
- }
- return root;
- };
- CCognosViewer.prototype.findToolbarItem=function(_856,_857){
- var spec=typeof _857=="undefined"||_857==null?this.getToolbar():_857;
- var _859=null;
- for(var _85a=0;_85a<spec.length;++_85a){
- var name=spec[_85a]["name"];
- if(typeof name!="undefined"&&name==_856){
- _859=spec[_85a];
- break;
- }
- }
- return _859;
- };
- CCognosViewer.prototype.findToolbarItemIndex=function(_85c,_85d){
- var spec=typeof _85d=="undefined"||_85d==null?this.getToolbar():_85d;
- var _85f=null;
- for(var _860=0;_860<spec.length;++_860){
- var name=spec[_860]["name"];
- if(typeof name!="undefined"&&name==_85c){
- _85f=_860;
- break;
- }
- }
- return _85f;
- };
- CCognosViewer.prototype.addedButtonToToolbar=function(_862,_863,_864,_865){
- if(typeof _863!="undefined"&&_863!=null){
- if(this.findToolbarItem(_863.name,_862)==null){
- _864=this.findToolbarItemIndex(_864,_862);
- if(typeof _864!="undefined"&&_864!=null){
- _862.splice(++_864,0,_863);
- return true;
- }else{
- if(typeof _865!="undefined"&&_865!=null){
- _862.splice(_865,0,_863);
- return true;
- }
- }
- }
- }
- return false;
- };
- CCognosViewer.prototype.addDrillTargets=function(_866){
- this.m_drillTargets=_866;
- };
- CCognosViewer.prototype.getDrillTargets=function(){
- if(this.m_drillTargets.length==0&&this.envParams["ui.action"]=="view"){
- var _867=document.getElementById("CVIFrame"+this.getId());
- if(typeof _867!="undefined"&&_867!=null){
- if(_867.contentWindow.drillTargets){
- return _867.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 _86a=this.getRAPReportInfo();
- if(_86a){
- var _86b=_86a.getDisplayTypes();
- return _86b.match("_v2")!=null||_86b.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(_86c){
- this.m_RAPReportInfo=_86c;
- };
- 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 _86f=oDiv.style.display;
- oDiv.style.display="none";
- oDiv.style.display=_86f;
- };
- CCognosViewer.prototype.isMetadataEmpty=function(){
- var oSC=this.getSelectionController();
- if(oSC){
- var _871=oSC.getCCDManager();
- if(_871){
- return _871.isMetadataEmpty();
- }
- }
- return true;
- };
- CCognosViewer.prototype.setContextMenu=function(_872){
- this.m_contextMenu=_872;
- };
- CCognosViewer.prototype.getContextMenu=function(){
- return this.m_contextMenu;
- };
- CCognosViewer.prototype.setToolbar=function(_873){
- this.m_toolbar=_873;
- };
- CCognosViewer.prototype.getToolbar=function(){
- return this.m_toolbar;
- };
- CCognosViewer.prototype.getAdvancedServerProperty=function(_874){
- if(this.m_advancedProperties&&this.m_advancedProperties[_874]!==undefined&&this.m_advancedProperties[_874]!==null){
- return this.m_advancedProperties[_874];
- }else{
- return null;
- }
- };
- CCognosViewer.prototype.hasPrompt=function(){
- if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){
- var _875=false;
- if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){
- _875=true;
- }else{
- var _876=new CParameterValues();
- var _877=XMLBuilderLoadXMLFromString(this.getExecutionParameters());
- if(_877.childNodes.length==1){
- _876.loadWithOptions(_877.childNodes[0],true);
- var _878=_876.length();
- for(var _879=0;_879<_878;++_879){
- var _87a=_876.getAt(_879);
- if(_87a!==null&&_87a.length()>0&&_87a.name().indexOf("credential:")!=-1){
- _875=true;
- break;
- }
- }
- }
- }
- this.m_bHasPrompt=_875;
- }
- 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,_87c){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastContextChange(_87c);
- }
- stopEventBubble(evt);
- };
- CCognosViewer.prototype.broadcastParameterChange=function(evt,_87e){
- if(this.getViewerWidget()){
- this.getViewerWidget().broadcastParameterChange(_87e);
- }
- 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,_880){
- this.m_sId=sId;
- this.m_sText="";
- this.m_sScript=_880;
- };
- 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 _881=/document\.write(ln)?\s*\(/gi;
- var _882=this.m_sScript.replace(_881,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,"");
- try{
- eval(_882);
- var _883=document.getElementById(this.m_sId);
- if(_883){
- _883.innerHTML=this.m_sText;
- return true;
- }
- }
- catch(e){
- }
- }
- return false;
- };
- CDocumentWriter.prototype.write=function(_884){
- var _885="";
- if(typeof _884=="function"){
- _885=eval(_884);
- }else{
- if(typeof _884=="string"){
- _885=_884;
- }
- }
- this.m_sText+=_885;
- };
- function setFocusToFirstTabItem(_886){
- if(!window.dojo){
- return;
- }
- var _887=dojo.query("*",_886);
- var _888=_887.length;
- for(var i=0;i<_888;i++){
- var node=_887[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(_88b){
- this.m_oCDManager=_88b;
- };
- 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 _88d=sCtx.split("::");
- var _88e=[];
- for(var i=0;i<_88d.length;++i){
- _88e[i]=_88d[i].split(":");
- }
- if(_88e&&_88e.length&&_88e[0].length){
- return _88e;
- }else{
- return null;
- }
- };
- ReportContextHelper.prototype.getDataItemName=function(sCtx){
- var _891=this.processCtx(sCtx);
- if(_891){
- return this.getRefDataItem(_891[0][0]);
- }
- return null;
- };
- ReportContextHelper.prototype.getRefDataItem=function(_892){
- var _893=this.m_oCDManager.GetRDIValue(_892);
- return (_893==null)?"":_893;
- };
- ReportContextHelper.prototype.getMun=function(_894){
- var aCtx=null;
- if(typeof _894==="string"){
- aCtx=this.processCtx(_894);
- }else{
- if(typeof _894==="number"){
- aCtx=this.processCtx(_894.toString());
- }else{
- aCtx=_894;
- }
- }
- 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(_897){
- if(!_897){
- return;
- }
- if(_897.findAction&&this.findConfig){
- this.findConfig.configure(_897.findAction);
- }
- if(_897.UI){
- this.uiConfig.configure(_897.UI);
- }
- if(_897.httpRequestCallbacks&&this.httpRequestConfig){
- this.httpRequestConfig.configure(_897.httpRequestCallbacks);
- }
- if(_897.events&&this.eventsConfig){
- this.eventsConfig.configure(_897.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(_898){
- applyJSONProperties(this,_898);
- };
- 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(_899){
- applyJSONProperties(this,_899);
- };
- 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(_89a){
- if(this.reportStatus){
- var _89b=this.reportStatus[_89a];
- if(_89b){
- return _89b;
- }
- if(_89a=="complete"&&this.reportStatus["initialComplete"]){
- var _89c=this.reportStatus["initialComplete"];
- this.reportStatus["initialComplete"]=null;
- return _89c;
- }
- }
- return null;
- };
- function ViewerState(){
- this.findState=null;
- this.pageState=null;
- };
- ViewerState.prototype.setFindState=function(_89d){
- if(typeof ViewerFindState!="function"){
- return;
- }
- if(!this.findState){
- this.findState=new ViewerFindState();
- }
- this.findState.setState(_89d);
- };
- ViewerState.prototype.clearFindState=function(){
- this.findState=null;
- };
- ViewerState.prototype.getFindState=function(){
- return this.findState;
- };
- ViewerState.prototype.setPageState=function(_89e){
- if(typeof ViewerPageState!="function"){
- return;
- }
- if(!this.pageState){
- this.pageState=new ViewerPageState();
- }
- this.pageState.setState(_89e);
- };
- ViewerState.prototype.clearPageState=function(){
- this.pageState=null;
- };
- ViewerState.prototype.getPageState=function(){
- return this.pageState;
- };
- function ViewerEventsConfig(){
- this.showContextMenuOnClick=false;
- };
- ViewerEventsConfig.prototype.configure=function(_89f){
- applyJSONProperties(this,_89f);
- };
- ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){
- return this.showContextMenuOnClick;
- };
- CCognosViewer.prototype.loadExtra=function(){
- var _8a0=this.getViewerWidget();
- if(_8a0){
- _8a0.loadExtraJavascriptFiles(this.getWebContentRoot());
- }
- };
- function CCognosViewerToolbarHelper(){
- };
- CCognosViewerToolbarHelper.updateToolbarForCurrentSelection=function(oCV,_8a2){
- if(_8a2){
- var _8a3=oCV.getActionFactory();
- for(var _8a4=0;_8a4<_8a2.length;++_8a4){
- var name=_8a2[_8a4]["name"];
- if(typeof name!="undefined"&&name!=null){
- var _8a6=_8a3.load(name);
- if(_8a6!=null&&typeof _8a6!="undefined"){
- var _8a7=_8a6.updateMenu(_8a2[_8a4]);
- if(_8a7.visible==false){
- if(_8a7.save){
- oCV.getViewerWidget().addButtonToSavedToolbarButtons(name,_8a2[_8a4],_8a4);
- }
- _8a2.splice(_8a4,1);
- --_8a4;
- }else{
- _8a2[_8a4]=_8a7;
- }
- }
- }else{
- if(typeof _8a2[_8a4]._root!="undefined"){
- CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(oCV,_8a2[_8a4]._root);
- }else{
- if(_8a2[_8a4].separator){
- if(_8a4==0||(_8a4>0&&_8a2[_8a4-1].separator)||_8a4==_8a2.length){
- _8a2.splice(_8a4,1);
- --_8a4;
- }
- }
- }
- }
- }
- }
- };
- CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection=function(oCV,_8a9){
- var _8aa=[];
- if(_8a9){
- var _8ab=oCV.getActionFactory();
- for(var _8ac=0;_8ac<_8a9.length;++_8ac){
- var _8ad=_8a9[_8ac];
- var name=_8a9[_8ac]["name"];
- var _8af=true;
- if(typeof name!="undefined"){
- var _8b0=_8ab.load(name);
- if(!_8b0){
- if(name=="drillDown"){
- _8b0=_8ab.load("DrillDown");
- }else{
- if(name=="drillUp"){
- _8b0=_8ab.load("DrillUp");
- }
- }
- }
- if(_8b0!=null&&typeof _8b0!="undefined"){
- if(typeof _8b0.buildMenu=="function"){
- _8ad=_8b0.buildMenu(_8a9[_8ac]);
- }else{
- _8ad=_8b0.updateMenu(_8a9[_8ac]);
- }
- _8af=_8b0.isValidMenuItem();
- }else{
- if(typeof _8ad.items!="undefined"){
- _8ad.items=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad.items);
- _8af=(_8ad.items&&_8ad.items.length>0)?true:false;
- if(_8af&&_8ad.items.length==1){
- _8ad=_8ad.items[0];
- }
- }
- }
- }
- if(_8ad&&_8ad.visible!==false&&_8af){
- if(_8ad.separator===true){
- if(_8aa.length>0&&typeof _8aa[_8aa.length-1].separator=="undefined"){
- _8aa[_8aa.length]=_8ad;
- }
- }else{
- if(_8ad.useChildrenItems==true&&_8ad.items&&_8ad.items.length>0){
- if(!_8ad.disabled){
- for(var _8b1=0;_8b1<_8ad.items.length;_8b1++){
- _8aa[_8aa.length]=_8ad.items[_8b1];
- }
- }
- }else{
- if(typeof _8ad._root!="undefined"){
- _8aa[_8aa.length]={"_root":CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad._root)};
- }else{
- _8aa[_8aa.length]=_8ad;
- }
- }
- }
- }
- }
- if(_8aa.length>1){
- if(_8aa[_8aa.length-1].separator){
- _8aa=_8aa.splice(0,_8aa.length-1);
- }
- }
- }
- return _8aa;
- };
- 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 _8b9={};
- applyJSONProperties(_8b9,this.m_md);
- return _8b9;
- };
- CCDManager.prototype.getClonedContextdataArray=function(){
- var _8ba={};
- applyJSONProperties(_8ba,this.m_cd);
- return _8ba;
- };
- CCDManager.prototype.SetCognosViewer=function(_8bb){
- if(_8bb){
- this.m_oCV=_8bb;
- }
- };
- CCDManager.prototype.onComplete_GetCDRequest=function(_8bc,_8bd){
- if(_8bc){
- var _8be=_8bc.getResult();
- var _8bf=XMLBuilderLoadXMLFromString(_8be);
- if(_8bf){
- var _8c0=_8bf.getElementsByTagName("Block");
- for(var i=0;i<_8c0.length;i++){
- var _8c2="";
- var _8c3=_8c0[i].firstChild;
- while(_8c3){
- _8c2+=_8c3.nodeValue;
- _8c3=_8c3.nextSibling;
- }
- var cd=eval("("+_8c2+")");
- this.AddContextData(cd);
- }
- }
- }
- if(_8bd&&typeof _8bd=="function"){
- _8bd();
- }
- };
- CCDManager.prototype.FetchContextData=function(_8c5,_8c6){
- var _8c7=[];
- var c=null,_8c9=_8c5.length;
- for(var i=0;i<_8c9;++i){
- c=_8c5[i];
- if(c!=""&&!this.ContextIdExists(c)){
- _8c7.push(c);
- }
- }
- if(_8c7.length){
- if(this.m_oCV){
- this.getContextData(_8c7,_8c6);
- }
- }
- return _8c7.length;
- };
- CCDManager.prototype.getContextData=function(_8cb,_8cc){
- var oCV=this.m_oCV;
- var _8ce=new AsynchDataDispatcherEntry(oCV);
- _8ce.setCanBeQueued(false);
- if(!oCV.isBux){
- _8ce.forceSynchronous();
- }
- var form=document["formWarpRequest"+oCV.getId()];
- var _8d0=oCV.getConversation();
- var _8d1=oCV.getTracking();
- if(!_8d1&&form&&form["m_tracking"]&&form["m_tracking"].value){
- _8d1=form["m_tracking"].value;
- }
- if(oCV.m_viewerFragment){
- var _8d2=oCV.getActiveRequest();
- if(_8d2&&_8d2.getFormField("m_tracking")==_8d1){
- return;
- }
- }
- var _8d3={customArguments:[_8cc],"complete":{"object":this,"method":this.onComplete_GetCDRequest}};
- if(oCV.getStatus()=="prompting"){
- _8d3["prompting"]={"object":this,"method":this.onComplete_GetCDRequest};
- }
- _8ce.setCallbacks(_8d3);
- if(_8d0&&oCV.envParams["ui.action"]!="view"){
- _8ce.addFormField("ui.action","getContext");
- _8ce.addFormField("ui.conversation",_8d0);
- }else{
- var _8d4=form["ui.object"];
- if(typeof _8d4.length!="undefined"&&_8d4.length>1){
- _8ce.addFormField("ui.object",form["ui.object"][0].value);
- }else{
- _8ce.addFormField("ui.object",form["ui.object"].value);
- }
- _8ce.addFormField("ui.action","getObjectContext");
- }
- _8ce.addFormField("cv.responseFormat","asynchDetailContext");
- _8ce.addFormField("context.format","initializer");
- _8ce.addFormField("context.type","reportService");
- _8ce.addFormField("context.selection",_8cb.join(","));
- _8ce.addNonEmptyStringFormField("m_tracking",_8d1);
- oCV.dispatchRequest(_8ce);
- };
- CCDManager.prototype.ContextIdExists=function(_8d5){
- return (this.m_cd&&this.m_cd[_8d5]?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(_8d6,_8d7,_8d8){
- var p=null;
- this.FetchContextData([_8d6]);
- var cd=this.m_cd&&this.m_cd[_8d6];
- if(cd){
- var md=this.m_md[cd[_8d7]];
- if(md){
- p=md[_8d8];
- }
- }
- return p;
- };
- CCDManager.prototype.GetDrillFlag=function(_8dc){
- return this._getMDPropertyFromCD(_8dc,"r","drill");
- };
- CCDManager.prototype.getModelPathFromBookletItem=function(_8dd){
- var mp=null;
- var md=this.m_md[_8dd];
- 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(_8e0){
- var p=null;
- var md=this.m_md[_8e0];
- if(md){
- p=md.modelBasedDrillThru;
- }
- return p?p:0;
- };
- CCDManager.prototype.GetDrillFlagForMember=function(_8e3){
- var _8e4=null;
- var d=this._getMDPropertyFromCD(_8e3,"r","drill");
- if(d!==null&&this.m_cd[_8e3].m){
- _8e4=d;
- }
- return _8e4;
- };
- CCDManager.prototype.GetDataType=function(_8e6){
- return this._getMDPropertyFromCD(_8e6,"r","dtype");
- };
- CCDManager.prototype.GetUsage=function(_8e7){
- return this._getMDPropertyFromCD(_8e7,"r","usage");
- };
- CCDManager.prototype.GetHUN=function(_8e8){
- var hun=this._getMDPropertyFromCD(_8e8,"h","h");
- if(!hun){
- var h=this._getMDPropertyFromCD(_8e8,"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(_8eb){
- var qry=null;
- var q=this._getMDPropertyFromCD(_8eb,"r","q");
- if(q){
- qry=this.m_md[q].q;
- }
- return qry;
- };
- CCDManager.prototype.GetDepth=function(_8ee){
- return this._getMDPropertyFromCD(_8ee,"r","level");
- };
- CCDManager.prototype.GetDisplayValue=function(_8ef){
- var _8f0=null;
- this.FetchContextData([_8ef]);
- if(this.ContextIdExists(_8ef)&&this.m_cd[_8ef]){
- _8f0=this.m_cd[_8ef].u;
- }
- return _8f0;
- };
- CCDManager.prototype.GetPUN=function(_8f1){
- return this._getMDPropertyFromCD(_8f1,"p","p");
- };
- CCDManager.prototype.GetLUN=function(_8f2){
- return this._getMDPropertyFromCD(_8f2,"l","l");
- };
- CCDManager.prototype.GetMUN=function(_8f3){
- return this._getMDPropertyFromCD(_8f3,"m","m");
- };
- CCDManager.prototype.GetDUN=function(_8f4){
- return this._getMDPropertyFromCD(_8f4,"d","d");
- };
- CCDManager.prototype.GetQMID=function(_8f5){
- return this._getMDPropertyFromCD(_8f5,"i","i");
- };
- CCDManager.prototype.GetRDIValue=function(_8f6){
- return this._getMDPropertyFromCD(_8f6,"r","r");
- };
- CCDManager.prototype.GetBIValue=function(_8f7){
- return this._getMDPropertyFromCD(_8f7,"r","bi");
- };
- CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_8fa){
- var _8fb=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}];
- for(var _8fc=0;_8fc<_8fb.length;++_8fc){
- var _8fd=_8fb[_8fc].expression;
- var _8fe=_8fb[_8fc].type;
- if(_8fd==""){
- continue;
- }
- for(var _8ff in this.m_md){
- if(this.m_md[_8ff][_8fe]==_8fd){
- for(var _900 in this.m_md){
- if(this.m_md[_900].r&&this.m_md[_900][_8fe]==_8ff){
- if(this.m_md[_900].drill!=0||_8fa==true){
- for(var ctx in this.m_cd){
- if(this.m_cd[ctx].r==_900&&this.m_cd[ctx].m){
- return ctx;
- }
- }
- }
- }
- }
- }
- }
- }
- return "";
- };
- CCDManager.prototype.GetContextIdForMUN=function(mun){
- var _903=null;
- var _904=null;
- for(var i in this.m_md){
- if(this.m_md[i].m==mun){
- _903=i;
- break;
- }
- }
- if(_903!=null){
- for(var j in this.m_cd){
- if(this.m_cd[j].m==_903){
- _904=j;
- break;
- }
- }
- }
- return _904;
- };
- CCDManager.prototype.GetContextIdsForRDI=function(rdi){
- var _908=[];
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi){
- _908.push(i);
- }
- }
- return _908;
- };
- CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_90b){
- var _90c=this.GetContextIdsForRDI(rdi);
- for(var i in this.m_cd){
- for(var j in _90c){
- if(this.m_cd[i].r==_90c[j]&&this.m_cd[i].u==_90b){
- var _90f=this.m_cd[i].m;
- if(_90f){
- return this.m_md[_90f].m;
- }
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){
- var _911=null;
- var _912=null;
- var _913=this.GetContextIdsForRDI(rdi);
- this.FetchContextData([0]);
- for(var i in this.m_cd){
- for(var j in _913){
- if(this.m_cd[i].r==_913[j]){
- var _916=parseFloat(this.m_cd[i].u);
- if(_916==this.m_cd[i].u){
- if(_911==null||_916<_911){
- _911=_916;
- }
- if(_912==null||_916>_912){
- _912=_916;
- }
- }
- }
- }
- }
- if(_911!=null&&_912!=null){
- return eval("({ pageMin: "+_911+", pageMax: "+_912+"})");
- }
- };
- CCDManager.prototype.GetContextIdForDisplayValue=function(_917){
- var _918=null;
- for(var i in this.m_cd){
- if(this.m_cd[i].u==_917){
- _918=i;
- break;
- }
- }
- return _918;
- };
- CCDManager.prototype.GetContextIdForUseValue=function(_91a){
- var _91b=null;
- var _91c=null;
- var _91d=null;
- for(var i in this.m_md){
- var md=this.m_md[i];
- for(var j in md){
- if(md[j]==_91a){
- _91b=i;
- _91c=j;
- break;
- }
- }
- }
- if(_91b!=null){
- for(var k in this.m_cd){
- if(this.m_cd[k][_91c]==_91b){
- _91d=k;
- break;
- }
- }
- }
- return _91d;
- };
- CCDManager.prototype.getDataItemInfo=function(){
- if(this.m_cd){
- var _922={};
- this.m_dataItemInfo={};
- for(var i in this.m_cd){
- var _924=this.m_cd[i].r;
- if(typeof _924!="undefined"){
- var _925=this.m_md[_924].r;
- if(this.m_dataItemInfo[_925]==null){
- this.m_dataItemInfo[_925]=1;
- }else{
- this.m_dataItemInfo[_925]++;
- }
- }
- }
- 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(_926){
- if(_926<=0){
- return this.ContextDataToJSON();
- }
- if(this.m_cd){
- var _927={};
- var _928={};
- for(var i in this.m_cd){
- var _92a=this.m_cd[i].r;
- if(typeof _92a!="undefined"){
- if(_927[_92a]==null){
- _927[_92a]=0;
- }else{
- _927[_92a]++;
- }
- if(_927[_92a]<_926){
- _928[i]=this.m_cd[i];
- }
- }
- }
- return CViewerCommon.toJSON(_928);
- }
- return "";
- };
- CCDManager.prototype.GetHUNForRDI=function(rdi,_92c){
- for(var i in this.m_md){
- if(this.m_md[i].r==rdi&&this.m_md[i].q==_92c){
- var _92e=this.m_md[i].h;
- if(_92e){
- return this.m_md[_92e].h;
- }
- }
- }
- return null;
- };
- CCDManager.prototype.GetMetadataIdForQueryName=function(_92f){
- for(var i in this.m_md){
- if(this.m_md[i].q===_92f){
- return i;
- }
- }
- return null;
- };
- CCDManager.prototype._isEmptyObject=function(obj){
- for(var _932 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(_933){
- var item=this.m_cd[_933];
- 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(_935){
- var item=this.m_cd[_935];
- 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 _938=str.split("].[");
- var _939=_938[_938.length-1];
- return _939.substring(0,_939.length-1);
- }
- return str;
- };
- CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_93a){
- var _93b=this._getNamespaceAndDimensionFromUniqueName(_93a);
- if(_93b&&this.m_md){
- for(var _93c in this.m_md){
- var sMun=this.m_md[_93c].m;
- if(sMun&&sMun.length>0){
- if(sMun.indexOf("->:[TM].")>0){
- var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun);
- if(oObj.dimension&&oObj.dimension===_93b.dimension&&oObj.namespace!==_93b.namespace){
- var _93f=_93a.indexOf(".");
- return oObj.namespace+_93a.substr(_93f,_93a.length);
- }
- }else{
- var _940=sMun.indexOf("->:[");
- if(_940>0){
- if(sMun.substr(_940+4,4)!=="TM]."){
- return _93a;
- }
- }
- }
- }
- }
- }
- return _93a;
- };
- CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_941){
- if(_941&&_941.length>0&&_941.indexOf("].[")>0){
- var _942=_941.split("].[");
- if(_942.length>1){
- return {"namespace":_942[0]+"]","dimension":"["+_942[1]+"]"};
- }
- }
- return null;
- };
- CCDManager.prototype.destroy=function(){
- delete this.m_cd;
- delete this.m_md;
- delete this.m_oCV;
- delete this.m_dataItemInfo;
- };
- var GUtil={};
- GUtil.createHiddenForm=function(name,_944,_945,_946){
- var form=document.getElementById(name);
- if(form){
- document.body.removeChild(form);
- }
- form=document.createElement("form");
- form.id=name;
- form.name=name;
- form.method=_944;
- form.style.display="none";
- form.action=document.forms["formWarpRequest"+_945].action;
- form.target=_946+(new Date()).getTime();
- document.body.appendChild(form);
- return form;
- };
- GUtil.createFormField=function(el,name,_94a){
- var _94b=document.createElement("input");
- _94b.type="hidden";
- _94b.name=name;
- _94b.value=_94a;
- el.appendChild(_94b);
- };
- GUtil.generateCallback=function(func,_94d,_94e){
- if(func){
- var _94f=_94e||this;
- _94d=(_94d instanceof Array)?_94d:[];
- return (function(_950){
- if(typeof _950!="undefined"&&_94d.length==0){
- _94d.push(_950);
- }
- return func.apply(_94f,_94d);
- });
- }else{
- return (function(){
- });
- }
- };
- GUtil.destroyProperties=function(_951,_952){
- var _953;
- if(_951 instanceof Array){
- for(var i=0;i<_951.length;i++){
- _953=_951[i];
- if(_953 instanceof String){
- _953=null;
- }else{
- if(_953&&_953.destroy&&!_953._beingDestroyed){
- _953.destroy();
- }
- GUtil.destroyProperties(_953);
- }
- }
- }else{
- if(_951 instanceof Object){
- if(_951._beingDestroyed){
- return;
- }
- var obj=_951;
- obj._beingDestroyed=true;
- for(var _956 in obj){
- _953=obj[_956];
- if(_956==="_beingDestroyed"||_956==="m_destroyed"||_956==="_destroyed"||typeof _953=="function"){
- continue;
- }
- if(_953 instanceof Array){
- GUtil.destroyProperties(_953);
- }else{
- if(_953 instanceof Object){
- if(typeof _953.destroy=="function"&&!_953._destroyed&&(_953!==CCognosViewer||_952)){
- _953.destroy();
- }
- }
- }
- delete obj[_956];
- }
- }
- }
- };
- cvLoadDialog=function(_957,_958,_959,_95a,_95b,_95c){
- _95c=((_95c===undefined)?true:_95c);
- var _95d=document.getElementById("formWarpRequest"+_957.getId());
- if(_95d&&_957){
- _957.getWorkingDialog().hide();
- var _95e="";
- var _95f="";
- var _960=null;
- if(_957.isAccessibleMode()){
- _95e="winNAT_"+(new Date()).getTime();
- _95f=_957.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId();
- }else{
- var _961=document.body;
- _960=new CModal("","",_961,null,null,_95a,_959,true,true,false,true,_957.getWebContentRoot());
- if(typeof _95b=="string"){
- document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_95b);
- }
- document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME);
- _95e=CMODAL_CONTENT_ID;
- }
- var _962=document.createElement("FORM");
- _962.method="POST";
- _962.action=_957.getGateway();
- _962.target=_95e;
- _962.style.margin="0px";
- document.body.appendChild(_962);
- for(var _963 in _958){
- _962.appendChild(createHiddenFormField(_963,_958[_963]));
- }
- if(_95c){
- _962.appendChild(createHiddenFormField("cv.id",_957.getId()));
- _962.appendChild(createHiddenFormField("b_action","xts.run"));
- _962.appendChild(createHiddenFormField("ui.action",_95d["ui.action"].value));
- _962.appendChild(createHiddenFormField("ui.object",_95d["ui.object"].value));
- if(typeof _957.rvMainWnd!="undefined"){
- _962.appendChild(createHiddenFormField("run.outputFormat",_957.rvMainWnd.getCurrentFormat()));
- }
- if(typeof _95d["run.outputLocale"]!="undefined"){
- _962.appendChild(createHiddenFormField("run.outputLocale",_95d["run.outputLocale"].value));
- }
- if(typeof _962["backURL"]=="undefined"&&typeof _962["ui.backURL"]=="undefined"&&typeof _95d["ui.backURL"]!="undefined"){
- _962.appendChild(createHiddenFormField("ui.backURL",_95d["ui.backURL"].value));
- }
- if(typeof _957!="undefined"&&typeof _957.getConversation!="undefined"&&typeof _957.getTracking!="undefined"){
- _962.appendChild(createHiddenFormField("ui.conversation",_957.getConversation()));
- _962.appendChild(createHiddenFormField("m_tracking",_957.getTracking()));
- if(_957.envParams["ui.name"]!="undefined"){
- _962.appendChild(createHiddenFormField("ui.name",_957.envParams["ui.name"]));
- }
- }
- }
- var _964=window.onbeforeunload;
- window.onbeforeunload=null;
- if(_957.isAccessibleMode()){
- window.open(_95f,_95e,"rv");
- _962.submit();
- }else{
- _962.submit();
- _960.show();
- }
- window.onbeforeunload=_964;
- document.body.removeChild(_962);
- _957.modalShown=true;
- }
- };
- function createHiddenFormField(name,_966){
- var _967=document.createElement("input");
- _967.setAttribute("type","hidden");
- _967.setAttribute("name",name);
- _967.setAttribute("id",name);
- _967.setAttribute("value",_966);
- return (_967);
- };
- function isAuthenticationFault(_968){
- if(_968!=null){
- var _969=XMLHelper_FindChildByTagName(_968,"CAM",true);
- return (_969!=null&&XMLHelper_FindChildByTagName(_969,"promptInfo",true)!=null);
- }
- };
- function processAuthenticationFault(_96a,_96b){
- if(isAuthenticationFault(_96a)){
- launchLogOnDialog(_96b,_96a);
- return true;
- }
- return false;
- };
- function isObjectEmpty(_96c){
- for(var _96d in _96c){
- if(_96c.hasOwnProperty(_96d)){
- return false;
- }
- }
- return true;
- };
- function launchLogOnDialog(cvID,_96f){
- try{
- var oCV=getCognosViewerObjectRef(cvID);
- var _971={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"};
- if(_96f!=null){
- var _972=XMLHelper_FindChildrenByTagName(_96f,"namespace",true);
- if(_972!=null){
- for(var _973=0;_973<_972.length;++_973){
- var _974=_972[_973];
- if(_974!=null){
- var _975=XMLHelper_FindChildByTagName(_974,"name",false);
- var _976=XMLHelper_FindChildByTagName(_974,"value",false);
- if(_975!=null&&_976!=null){
- var _977=XMLHelper_GetText(_975);
- var _978=XMLHelper_GetText(_976);
- if(_977!=null&&_977.length>0){
- _971[_977]=_978;
- }
- }
- }
- }
- }
- }
- cvLoadDialog(oCV,_971,540,460,null,false);
- }
- catch(exception){
- }
- };
- function getCVWaitingOnFault(){
- var oCV=null;
- for(var _97a=0;_97a<window.gaRV_INSTANCES.length;_97a++){
- if(window.gaRV_INSTANCES[_97a].getRetryDispatcherEntry()!=null){
- oCV=window.gaRV_INSTANCES[_97a];
- break;
- }
- }
- return oCV;
- };
- function ccModalCallBack(_97b,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 _97b!="undefined"&&_97b=="ok"){
- var _97e=oCV.getRetryDispatcherEntry();
- if(_97e){
- _97e.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,_981){
- var node=null;
- if(_981&&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,_984){
- 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(!_984&&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 _989=node.nodeName.toUpperCase();
- if((_989=="SPAN"||_989=="AREA"||_989=="IMG")&&node.getAttribute("ctx")!=null){
- return node;
- }else{
- if(_989=="SPAN"&&(node.parentNode.getAttribute("ctx")!=null)){
- return node.parentNode;
- }
- }
- }
- catch(exception){
- }
- return null;
- };
- function getDocumentFromEvent(evt){
- var node=getCrossBrowserNode(evt,true);
- var _98c=node.document?node.document:node.ownerDocument;
- return _98c;
- };
- 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 _98f=getNodeFromEvent(evt);
- if(_98f&&_98f.nodeName){
- var _990=_98f.nodeName.toLowerCase();
- if((_990=="td"||_990=="span")&&_98f.childNodes&&_98f.childNodes.length>0&&_98f.childNodes[0].className=="textItem"){
- try{
- _98f.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(_992){
- var regX=/\r\n|\r|\n/g;
- var _994="<br/>";
- return _992.replace(regX,_994);
- };
- function xml_encode(_995){
- var _996=""+_995;
- if((_996=="0")||((_995!=null)&&(_995!=false))){
- _996=_996.replace(/&/g,"&");
- _996=_996.replace(/</g,"<");
- _996=_996.replace(/>/g,">");
- _996=_996.replace(/"/g,""");
- _996=_996.replace(/'/g,"'");
- }else{
- if(_995==null){
- _996="";
- }
- }
- return _996;
- };
- function xml_decodeParser(sAll,_998){
- var _999=sAll;
- switch(_998){
- case "amp":
- _999="&";
- break;
- case "lt":
- _999="<";
- break;
- case "gt":
- _999=">";
- break;
- case "quot":
- _999="\"";
- break;
- case "apos":
- _999="'";
- break;
- }
- return _999;
- };
- function xml_decode(_99a){
- var _99b=""+_99a;
- if((_99b=="0")||((_99a!=null)&&(_99a!=false))){
- _99b=_99b.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser);
- }else{
- if(_99a==null){
- _99b="";
- }
- }
- return _99b;
- };
- function xpath_attr_encode(_99c){
- var _99d=null;
- if(_99c.indexOf("'")>=0&&_99c.indexOf("\"")>=0){
- var _99e=_99c.split("\"");
- _99d="concat(";
- for(var i=0;i<_99e.length;++i){
- if(i>0){
- _99d+=",";
- }
- if(_99e[i].length>0){
- _99d+=("\""+_99e[i]+"\"");
- }else{
- _99d+="'\"'";
- }
- }
- _99d+=")";
- }else{
- if(_99c.indexOf("'")>=0){
- _99d="\""+_99c+"\"";
- }else{
- _99d="'"+_99c+"'";
- }
- }
- return _99d;
- };
- 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(_9a7){
- if(typeof window[_9a7]!="undefined"&&window[_9a7]){
- if(isIE()){
- eval("delete "+_9a7);
- }else{
- delete window[_9a7];
- }
- }
- };
- function loadClass(_9a8){
- try{
- var _9a9=eval("new "+_9a8+"();");
- return _9a9;
- }
- catch(e){
- return null;
- }
- };
- function getElementsByClassName(oElm,_9ab,_9ac){
- var _9ad=(_9ab=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9ab);
- var _9ae=[];
- var _9af=new RegExp("(^|\\s)"+_9ac+"(\\s|$)");
- var _9b0=_9ad.length;
- for(var i=0;i<_9b0;i++){
- var _9b2=_9ad[i];
- if(_9af.test(_9b2.className)){
- _9ae.push(_9b2);
- }
- }
- return _9ae;
- };
- function getImmediateLayoutContainerId(node){
- var _9b4=node;
- while(_9b4!=null){
- if(_9b4.getAttribute&&_9b4.getAttribute("lid")!=null){
- return _9b4.getAttribute("lid");
- }
- _9b4=_9b4.parentNode;
- }
- return null;
- };
- function getChildElementsByAttribute(oElm,_9b6,_9b7,_9b8){
- return getDescendantElementsByAttribute(oElm,_9b6,_9b7,_9b8,true);
- };
- function getElementsByAttribute(oElm,_9ba,_9bb,_9bc,_9bd,_9be){
- return getDescendantElementsByAttribute(oElm,_9ba,_9bb,_9bc,false,_9bd,_9be);
- };
- function getDescendantElementsByAttribute(oElm,_9c0,_9c1,_9c2,_9c3,_9c4,_9c5){
- var _9c6=[];
- var _9c7=null;
- if(typeof _9c5==="undefined"){
- _9c7=(typeof _9c2!="undefined")?new RegExp("(^|\\s)"+_9c2+"(\\s|$)","i"):null;
- }else{
- _9c7=_9c5;
- }
- if(typeof _9c0=="string"){
- _9c0=[_9c0];
- }
- var _9c8=(oElm?_9c0.length:0);
- for(var _9c9=0;_9c9<_9c8;_9c9++){
- var _9ca=null;
- if(_9c3){
- if(_9c0[_9c9]=="*"&&oElm.all){
- _9ca=oElm.childNodes;
- }else{
- _9ca=[];
- var _9cb=oElm.childNodes;
- for(var i=0;i<_9cb.length;++i){
- if(_9cb[i].nodeName.toLowerCase()==_9c0[_9c9].toLowerCase()){
- _9ca.push(_9cb[i]);
- }
- }
- }
- }else{
- _9ca=(_9c0[_9c9]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9c0[_9c9]);
- }
- var _9cd=_9ca.length;
- for(var idx=0;idx<_9cd;idx++){
- var _9cf=_9ca[idx];
- var _9d0=_9cf.getAttribute&&_9cf.getAttribute(_9c1);
- if(_9d0!==null){
- var _9d1=null;
- if(typeof _9d0==="number"){
- _9d1=String(_9d0);
- }else{
- if(typeof _9d0==="string"&&_9d0.length>0){
- _9d1=_9d0;
- }
- }
- if(_9d1!==null){
- if(typeof _9c2=="undefined"||(_9c7&&_9c7.test(_9d1))){
- _9c6.push(_9cf);
- if(_9c4!=-1&&_9c6.length>_9c4){
- return [];
- }else{
- if(_9c4==1&&_9c6.length==1){
- return _9c6;
- }
- }
- }
- }
- }
- }
- }
- return _9c6;
- };
- function savedOutputDoneLoading(cvId,_9d3){
- var oCV=window["oCV"+cvId];
- var _9d5=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null);
- var _9d6=(_9d5?_9d5.getSavedOutput():null);
- if(_9d6){
- _9d6.outputDoneLoading();
- }else{
- if(_9d3<5){
- _9d3++;
- var _9d7=function(){
- savedOutputDoneLoading(cvId,_9d3);
- };
- setTimeout(_9d7,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 _9d9=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
- return _9d9?parseFloat(_9d9[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(_9da,_9db,_9dc,_9dd){
- if(_9db.length>1){
- document.images[_9da].src=_9db;
- }
- };
- 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 _9e3=node.getAttribute("viewerId");
- if(!_9e3){
- _9e3=node.parentNode.getAttribute("viewerId");
- }
- if(!_9e3){
- return;
- }
- var oCV=window["oCV"+_9e3];
- var _9e5=oCV.getAction("Selection");
- _9e5.pageClicked(evt);
- return stopEventBubble(evt);
- };
- function clientToScreenCoords(_9e6,_9e7){
- var _9e8=_9e6;
- var _9e9={topCoord:0,leftCoord:0};
- while(_9e8!=null&&_9e8!=_9e7){
- _9e9.topCoord+=_9e8.offsetTop;
- _9e9.leftCoord+=_9e8.offsetLeft;
- _9e8=_9e8.offsetParent;
- }
- return _9e9;
- };
- function getCurrentPosistionString(oCV,_9eb,_9ec){
- var _9ed=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT;
- var _9ee=/\{0\}/;
- var _9ef=/\{1\}/;
- _9ed=_9ed.replace(_9ee,_9eb);
- _9ed=" "+_9ed.replace(_9ef,_9ec)+" ";
- return _9ed;
- };
- function applyJSONProperties(obj,_9f1){
- for(property in _9f1){
- if(typeof _9f1[property]=="object"&&!(_9f1[property] instanceof Array)){
- if(typeof obj[property]=="undefined"){
- obj[property]={};
- }
- applyJSONProperties(obj[property],_9f1[property]);
- }else{
- obj[property]=_9f1[property];
- }
- }
- };
- function CViewerCommon(){
- };
- CViewerCommon.openNewWindowOrTab=function(sURL,_9f3){
- return window.open(sURL,_9f3);
- };
- CViewerCommon.toJSON=function(obj){
- var type=typeof (obj);
- if(type!="object"||type===null){
- if(type==="string"){
- obj="\""+obj+"\"";
- }
- return String(obj);
- }else{
- var _9f6;
- var prop;
- var json=[];
- var _9f9=(obj&&obj.constructor==Array);
- for(_9f6 in obj){
- prop=obj[_9f6];
- type=typeof (prop);
- if(type==="string"){
- prop="\""+prop+"\"";
- }else{
- if(type=="object"&&prop!==null){
- prop=CViewerCommon.toJSON(prop);
- }
- }
- json.push((_9f9?"":"\""+_9f6+"\":")+String(prop));
- }
- return (_9f9?"[":"{")+String(json)+(_9f9?"]":"}");
- }
- };
- function resizePinnedContainers(){
- var oCV=window.gaRV_INSTANCES[0];
- if(oCV&&!oCV.m_viewerFragment){
- var _9fb=oCV.getPinFreezeManager();
- if(_9fb&&_9fb.hasFrozenContainers()){
- var _9fc=document.getElementById("RVContent"+oCV.getId());
- var _9fd=document.getElementById("mainViewerTable"+oCV.getId());
- var _9fe=_9fc.clientWidth;
- var _9ff=_9fd.clientHeight;
- _9fb.resize(_9fe,_9ff);
- if(isIE()){
- oCV.repaintDiv(_9fc);
- }
- }
- }
- };
- function setWindowHref(url){
- var _a01=window.onbeforeunload;
- window.onbeforeunload=null;
- window.location.href=url;
- window.onbeforeunload=_a01;
- };
- 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 _a05=gaRV_INSTANCES[0].isBidiEnabled();
- if(_a05){
- return true;
- }
- }
- return false;
- };
- function getViewerBaseTextDirection(){
- if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){
- return gaRV_INSTANCES[0].getBaseTextDirection();
- }
- return "";
- };
- function enforceTextDir(_a06){
- if(isViewerBidiEnabled()&&_a06){
- var sDir=getViewerBaseTextDirection();
- var _a08=BidiUtils.getInstance();
- if(sDir=="auto"){
- sDir=_a08.resolveStrBtd(_a06);
- }
- var _a09=(!dojo._isBodyLtr())?_a08.RLM:_a08.LRM;
- return _a09+((sDir==="rtl")?_a08.RLE:_a08.LRE)+_a06+_a08.PDF+_a09;
- }
- return _a06;
- };
- function getElementDirection(_a0a){
- var dir=null;
- if(_a0a.currentStyle){
- dir=_a0a.currentStyle.direction;
- }else{
- if(window.getComputedStyle){
- var _a0c=window.getComputedStyle(_a0a,null);
- if(_a0c){
- dir=_a0c.getPropertyValue("direction");
- }
- }
- }
- if(dir){
- dir=dir.toLowerCase();
- }
- return dir;
- };
- function getScrollLeft(_a0d){
- if(getElementDirection(_a0d)==="rtl"&&isFF()){
- return _a0d.scrollWidth-_a0d.offsetWidth+_a0d.scrollLeft;
- }
- return _a0d.scrollLeft;
- };
- function setScrollLeft(_a0e,_a0f){
- if(getElementDirection(_a0e)==="rtl"&&isFF()){
- _a0e.scrollLeft=_a0e.offsetWidth+_a0f-_a0e.scrollWidth;
- }else{
- _a0e.scrollLeft=_a0f;
- }
- };
- function setScrollRight(_a10,_a11){
- if(getElementDirection(_a10)==="rtl"&&isFF()){
- _a10.scrollLeft=-_a11;
- }else{
- _a10.scrollLeft=_a10.scrollWidth-_a10.offsetWidth-_a11;
- }
- };
- function getBoxInfo(el,_a13){
- 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 _a14={};
- var _a15=null;
- if(el.currentStyle){
- _a15=el.currentStyle;
- }else{
- if(window.getComputedStyle){
- _a15=window.getComputedStyle(el,null);
- }
- }
- if(!_a15){
- return null;
- }
- for(i in getBoxInfo.aStyles){
- var _a16=getBoxInfo.aStyles[i];
- var size=null;
- if(_a15.getPropertyValue){
- size=_a15.getPropertyValue(_a16.ff);
- }else{
- size=_a15[_a16.ie];
- }
- if(size&&_a13){
- size=Number(size.replace("px",""));
- }
- _a14[_a16.name]=size;
- }
- return _a14;
- };
- if(!CViewerCommon){
- var CViewerCommon={};
- }
- CViewerCommon.buildParameterValuesSpec=function(oCV){
- var _a19=XMLBuilderLoadXMLFromString(oCV.getExecutionParameters());
- var _a1a=new CParameterValues();
- if(_a19.childNodes.length==1){
- _a1a.loadWithOptions(_a19.childNodes[0],false);
- }
- var _a1b=_a1a.length();
- var _a1c="<pvs>";
- if(_a1b>0){
- var _a1d=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN);
- for(var _a1e=0;_a1e<_a1b;++_a1e){
- var _a1f=_a1a.getAt(_a1e);
- if(_a1f!=null){
- _a1c+="<pv>";
- _a1c+="<name>";
- _a1c+=xml_encode(_a1f.name());
- _a1c+="</name>";
- _a1c+="<value>";
- _a1c+=xml_encode(_a1f.toString(_a1d));
- _a1c+="</value>";
- _a1c+="</pv>";
- }
- }
- }
- _a1c+="</pvs>";
- return _a1c;
- };
- function PinFreezeContainer(_a20,lid,_a22,_a23,_a24,_a25,_a26){
- this.m_pinFreezeManager=_a20;
- this.m_lid=lid;
- this.m_lidNS=lid+_a22+_a26;
- this.m_viewerId=_a22;
- this.m_freezeTop=_a23;
- this.m_freezeSide=_a24;
- this.m_cachedReportDiv=null;
- this.m_cachedPFContainer=null;
- this.m_cachedBaseContainer=_a25;
- 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=_a26;
- 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 _a27="{";
- _a27+="\"m_clientWidth\":"+this.m_clientWidth+"";
- _a27+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+"";
- _a27+=",\"m_clientHeight\":"+this.m_clientHeight+"";
- _a27+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+"";
- _a27+="}";
- return _a27;
- };
- PinFreezeContainer.prototype.copyProperties=function(_a28){
- this.m_clientWidth=_a28.m_clientWidth;
- this.m_scrollableClientWidth=_a28.m_scrollableClientWidth;
- this.m_clientHeight=_a28.m_clientHeight;
- this.m_scrollableClientHeight=_a28.m_scrollableClientHeight;
- };
- PinFreezeContainer.prototype.setViewerId=function(id){
- this.m_viewerId=id;
- };
- PinFreezeContainer.prototype.getLid=function(){
- return this.m_lid;
- };
- PinFreezeContainer.prototype.createPFContainer=function(_a2a,_a2b){
- var _a2c=document.createElement("temp");
- if(this.m_cachedBaseContainer){
- this.applyAuthoredFixedSizes(this.m_cachedBaseContainer);
- this.m_cachedReportDiv=_a2a;
- var _a2d=this.m_cachedBaseContainer.parentNode;
- var _a2e=this.loadTemplateHTML();
- if(_a2e){
- _a2c.innerHTML=_a2e;
- var _a2f=this.getContainerByLID(_a2c);
- var _a30=this.getSectionByLID(_a2c.firstChild,"pfMainOutput");
- if(_a30){
- var i=this.getChildPosition(_a2d,this.m_cachedBaseContainer);
- if(i!=-1){
- var _a32=this.m_pinFreezeManager.m_oCV;
- if(_a32&&_a32.envParams["freezeDefaultWrap"]){
- if(this.m_cachedBaseContainer.style.whiteSpace===""&&_a32.envParams["freezeDefaultWrap"].toLowerCase()==="true"){
- var _a33=this.m_cachedBaseContainer.getElementsByTagName("span");
- if(_a33){
- for(var k=0;k<_a33.length;k++){
- _a33[k].style.whiteSpace="nowrap";
- }
- }
- this.m_wrapFlag=true;
- }
- }
- if(!_a2b){
- 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";
- }
- _a30.style.width=this.m_cachedBaseContainer.clientWidth+2+"px";
- _a30.style.height=this.m_cachedBaseContainer.clientHeight+2+"px";
- }
- _a30.appendChild(this.m_cachedBaseContainer);
- this.insertAt(_a2d,_a2f,i);
- }
- if(this.m_cachedBaseContainer.style.border!==""){
- _a2f.style.border=this.m_cachedBaseContainer.style.border;
- this.m_cachedBaseContainer.style.border="";
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype._getFixedWidth=function(_a35){
- if(_a35&&_a35.style.width&&!_a35.getAttribute("authoredFixedWidth")){
- var _a36=Number(_a35.style.width.split("px")[0]);
- return isNaN(_a36)?null:_a36;
- }
- return null;
- };
- PinFreezeContainer.prototype._getFixedHeight=function(_a37){
- if(_a37&&_a37.style.height&&!_a37.getAttribute("authoredFixedHeight")){
- var _a38=Number(_a37.style.height.split("px")[0]);
- return isNaN(_a38)?null:_a38;
- }
- return null;
- };
- PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_a39){
- var _a3a=this._getFixedWidth(_a39);
- if(_a3a){
- this.m_fixedWidth=_a3a;
- this.m_clientWidth=this.m_fixedWidth;
- this.m_scrollableClientWidth=this.m_fixedWidth;
- }
- var _a3b=this._getFixedHeight(_a39);
- if(_a3b){
- this.m_fixedHeight=_a3b;
- this.m_clientHeight=this.m_fixedHeight;
- this.m_scrollableClientHeight=this.m_fixedHeight;
- }
- };
- PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){
- var _a3c="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeTop\"><td align=\"center\" templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfHomeCell_"+this.m_lidNS+"\" style=\"overflow-x:hidden; overflow-y:hidden; width:100%; height:100%\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td templatePart=\"freezeTop\"></td></tr>"+"<tr><td class=\"BUXNoPrint\" valign=top templatePart=\"freezeSide\"><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"<td class=\"BUXNoPrint\" templatePart=\"freezeTop\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr>"+"<tr class=\"BUXNoPrint\" templatePart=\"freezeSide\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td><td></td></tr></table>";
- return _a3c;
- };
- PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){
- var _a3d="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\"><tr>"+"<td class=\"BUXNoPrint\" valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfSideHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td>"+"<td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\">"+"</div></td>"+"</tr>"+"<tr class=\"BUXNoPrint\"><td></td><td>"+"<div style=\"overflow-x:scroll; overflow-y:hidden;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfHorizontalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchScroll()\">"+"<div style=\"height:2px;\"> </div>"+"</div>"+"</td></tr></table>";
- return _a3d;
- };
- PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){
- var _a3e="<table pflid=\""+this.m_lidNS+"\" pfclid=\"pfContainer_"+this.m_lidNS+"\" cellpadding=\"0\" style=\"white-space:nowrap; width:0px; height:0px;\" cellspacing=\"0\">"+"<tr class=\"BUXNoPrint\"><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfTopHeadings_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"/></td><td></td></tr>"+"<tr><td valign=top><div pflid=\""+this.m_lidNS+"\" pfslid=\"pfMainOutput_"+this.m_lidNS+"\" style=\"width:0px; height:0px; overflow-x:hidden; overflow-y:hidden; position:relative;\"></div></td>"+"<td class=\"BUXNoPrint\">"+"<div style=\"padding-right:1px;overflow-x:hidden; overflow-y:scroll;\" pflid=\""+this.m_lidNS+"\" pfslid=\"pfVerticalScrollBar_"+this.m_lidNS+"\" tabIndex=\"-1\" onmouseup=\"stopEventBubble(event);\" onmousedown=\"stopEventBubble(event);\" onscroll=\""+getCognosViewerObjectRefAsString(this.m_viewerId)+".m_pinFreezeManager.getContainer('"+this.m_lid+"', "+this.m_cachedContainerIndex+").synchVScroll()\">"+"<div style=\"padding-right:1px;\"/>"+"</div>"+"</td>"+"</tr></table>";
- return _a3e;
- };
- 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(_a3f){
- var _a40=this.getSection("pfMainOutput");
- var _a41=_a40.getAttribute("pfslid");
- var _a42=this.getSection("pfSideHeadings");
- var _a43=_a42.getAttribute("pfslid");
- var _a44=this.getMainOutputHomeCell();
- if(!_a44){
- return;
- }
- var _a45=_a3f;
- var _a46=_a42;
- var _a47=this.isA11yEnabled(_a45);
- var _a48=this.m_pinFreezeManager.deepCloneNode(_a45);
- _a46.appendChild(_a48);
- var _a49=this.getSectionHomeCell(_a42);
- if(!_a49){
- return;
- }
- var _a4a=_a45.getElementsByTagName("tbody");
- var _a4b=_a48.getElementsByTagName("tbody");
- if(_a4a.length>0&&_a4b.length>0){
- var _a4c=_a4a[0];
- var _a4d=_a4b[0];
- var _a4e=_a4c.firstChild;
- var _a4f=_a4d.firstChild;
- var _a50=_a44.rowSpan;
- this.markAsCopy(_a44,_a49,_a41,_a43);
- for(var r=0;r<_a50;++r){
- var _a52=_a4d.rows[r];
- this.removeCTX(_a52);
- }
- for(var r=_a50;r<_a4d.rows.length;++r){
- var _a53=_a4c.rows[r];
- var _a52=_a4d.rows[r];
- _a52.style.visibility="hidden";
- for(var c=0;c<_a52.cells.length;++c){
- var _a55=_a52.cells[c];
- if(_a47){
- _a55=this.m_pinFreezeManager.removeIdAttribute(_a55);
- }
- if(_a55.getAttribute("type")=="datavalue"){
- _a55.removeAttribute("ctx");
- _a55.removeAttribute("uid");
- _a55.removeAttribute("name");
- }else{
- var _a56=_a53.cells[c];
- this.markAsCopy(_a56,_a55,_a41,_a43);
- }
- }
- _a52.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_a57,_a58){
- if(isFF()||isIE()){
- if(_a57&&_a57.length&&_a57[0].cells&&_a57[0].cells.length>1){
- if(this.m_freezeSide){
- var _a59=this.getBorderInfo(_a57[0].cells[1],"right");
- if(_a59){
- _a58.style.borderRightWidth=_a59.borderRightWidth;
- _a58.style.borderRightStyle=_a59.borderRightStyle;
- _a58.style.borderRightColor=_a59.borderRightColor;
- }
- }
- if(this.m_freezeTop){
- var _a59=this.getBorderInfo(_a57[0].cells[1],"bottom");
- if(_a59){
- _a58.style.borderBottomWidth=_a59.borderBottomWidth;
- _a58.style.borderBottomStyle=_a59.borderBottomStyle;
- _a58.style.borderBottomColor=_a59.borderBottomColor;
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.createTopHeadings=function(_a5a){
- var _a5b=this.getSection("pfMainOutput");
- var _a5c=_a5b.getAttribute("pfslid");
- var _a5d=this.getSection("pfTopHeadings");
- var _a5e=_a5d.getAttribute("pfslid");
- var _a5f=this.getMainOutputHomeCell();
- if(!_a5f){
- return;
- }
- var _a60=_a5a;
- var _a61=_a5d;
- var _a62=this.isA11yEnabled(_a60);
- var _a63=this.m_pinFreezeManager.deepCloneNode(_a60);
- _a63.setAttribute("clonednode","true");
- _a61.appendChild(_a63);
- var _a64=_a60.getElementsByTagName("tbody");
- var _a65=_a63.getElementsByTagName("tbody");
- if(_a64.length>0&&_a65.length>0){
- var _a66=_a64[0];
- var _a67=_a65[0];
- var _a68=_a5f.rowSpan;
- for(var r=0;r<_a67.rows.length;++r){
- var _a6a=_a66.rows[r];
- var _a6b=_a67.rows[r];
- if(_a62){
- _a6b=this.m_pinFreezeManager.removeIdAttribute(_a6b);
- }
- _a6b.style.visibility="hidden";
- for(var c=0;c<_a6b.cells.length;++c){
- var _a6d=_a6b.cells[c];
- if(r>_a68||_a6d.getAttribute("type")=="datavalue"){
- _a6d.removeAttribute("ctx");
- _a6d.removeAttribute("uid");
- _a6d.removeAttribute("name");
- }else{
- var _a6e=_a6a.cells[c];
- this.markAsCopy(_a6e,_a6d,_a5c,_a5e);
- if(_a6e===_a5f){
- this.initializeHomeCellTabIndex(_a6d);
- this.applyNeighbouringBorderStylesToHomeCell(_a66.rows,_a6d);
- }
- }
- }
- _a6b.style.visibility="visible";
- }
- }
- };
- PinFreezeContainer.prototype.createHomeCellHeading=function(){
- var _a6f=this.getSection("pfMainOutput");
- var _a70=_a6f.getAttribute("pfslid");
- var _a71=this.getSection("pfHomeCell");
- var _a72=_a71.parentNode;
- var _a73=_a71.getAttribute("pfslid");
- var _a74=this.getMainOutputHomeCell();
- if(!_a74){
- return;
- }
- _a72.style.height="100%";
- var _a75=this.getTopHeadingSectionHeight(_a74);
- _a71.style.height=_a75-this.m_containerMargin.top+"px";
- _a71.style.width=this.getSideHeadingSectionWidth(_a74)-this.m_containerMargin.left+"px";
- _a71.style.marginTop=this.m_containerMargin.top+"px";
- _a71.style.marginLeft=this.m_containerMargin.left+"px";
- var _a76=_a74.parentNode;
- var _a77=_a76.cloneNode(false);
- var _a78=this._findBestGuessHomeCell(_a74);
- var _a79=document.createElement("div");
- _a79.style.width="100%";
- _a79.style.height="100%";
- while(_a74.offsetLeft<=_a78.offsetLeft){
- oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_a74);
- if(isFF()||isIE()){
- _a74.appendChild(_a79);
- oTargetHomeCell.style.width=_a79.clientWidth+"px";
- _a74.removeChild(_a79);
- }else{
- oTargetHomeCell.style.width=_a74.clientWidth+1+"px";
- }
- oTargetHomeCell.style.borderBottomWidth="0px";
- _a77.appendChild(oTargetHomeCell);
- this.markAsCopy(_a74,oTargetHomeCell,_a70,_a73);
- if(_a74.nextSibling){
- _a74=_a74.nextSibling;
- }else{
- break;
- }
- }
- if(oTargetHomeCell){
- oTargetHomeCell.style.borderRightWidth="0px";
- }
- var _a7a=_a76.parentNode;
- var _a7b=_a7a.cloneNode(false);
- _a7b.appendChild(_a77);
- var _a7c=_a7a.parentNode;
- var _a7d=_a7c.cloneNode(false);
- _a7d.appendChild(_a7b);
- _a7d.style.width="100%";
- _a7d.style.height="100%";
- _a7d.style.marginLeft="";
- _a7d.style.marginTop="";
- _a71.appendChild(_a7d);
- this.initializeHomeCellTabIndex(oTargetHomeCell);
- this.applyNeighbouringBorderStylesToHomeCell(_a6f.firstChild.rows,_a71);
- };
- PinFreezeContainer.prototype.markAsCopy=function(main,copy,_a80,_a81){
- if(!main.pfCopy){
- main.setAttribute("pfslid",_a80);
- main.pfCopy=[];
- }
- main.pfCopy.push(copy);
- copy.pfMain=main;
- copy.setAttribute("pfslid",_a81);
- };
- PinFreezeContainer.prototype.getCopy=function(_a82){
- if(_a82.pfCopy){
- var _a83={};
- for(var i in _a82.pfCopy){
- var copy=_a82.pfCopy[i];
- if(copy.getAttribute){
- var _a86=copy.getAttribute("pfslid");
- if(_a86){
- var _a87=PinFreezeContainer.getSectionNameFromSlid(_a86);
- var _a88=this.getSection(_a87);
- if(_a88&&PinFreezeContainer.isSectionVisible(_a88)){
- _a83[_a87]=copy;
- }
- }
- }
- }
- if(_a83["pfHomeCell"]){
- return _a83["pfHomeCell"];
- }
- for(i in _a83){
- return _a83[i];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMain=function(_a89){
- if(_a89.pfMain){
- return _a89.pfMain;
- }
- return null;
- };
- PinFreezeContainer.isSectionVisible=function(_a8a){
- var node=_a8a;
- 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 _a8c={isSideFrozen:false,isTopFrozen:false};
- if(this.m_freezeSide){
- var side=this.getSection("pfSideHeadings");
- if(side){
- _a8c.isSideFrozen=PinFreezeContainer.isSectionVisible(side);
- }
- }
- if(this.m_freezeTop){
- var top=this.getSection("pfTopHeadings");
- if(top){
- _a8c.isTopFrozen=PinFreezeContainer.isSectionVisible(top);
- }
- }
- return _a8c;
- };
- PinFreezeContainer.prototype.checkSectionStructureChange=function(_a8f,_a90){
- if(_a8f.isSideFrozen!==_a90.isSideFrozen||_a8f.isTopFrozen!==_a90.isTopFrozen){
- this.m_pinFreezeManager.sectionStructureChange();
- }
- };
- PinFreezeContainer.prototype.freezeContainerInReport=function(_a91){
- this.cacheContainerAndSections(this.getContainerByLID(_a91));
- this.m_homeCellNodes={};
- this.updateContainer();
- };
- PinFreezeContainer.prototype.frozenSectionsRequired=function(){
- return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired());
- };
- PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){
- var _a92=this.getSection("pfMainOutput");
- if(_a92){
- if(this.m_freezeSide){
- var _a93=_a92.scrollWidth;
- return ((this.m_clientWidth<_a93)||_a93==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){
- var _a94=this.getSection("pfMainOutput");
- if(_a94){
- if(this.m_freezeTop){
- var _a95=_a94.scrollHeight;
- return ((this.m_clientHeight<_a95)||_a95==0);
- }
- }
- return false;
- };
- PinFreezeContainer.prototype.showTemplatePart=function(_a96,_a97){
- var _a98=this.getContainer().rows;
- for(var r=0;r<_a98.length;++r){
- if(_a98[r].getAttribute("templatePart")===_a96){
- _a98[r].style.display=((_a97)?"":"none");
- }else{
- var _a9a=_a98[r].cells;
- for(var c=0;c<_a9a.length;++c){
- if(_a9a[c].getAttribute("templatePart")===_a96){
- _a9a[c].style.display=((_a97)?"":"none");
- }
- }
- }
- }
- };
- PinFreezeContainer.prototype.showFreezeTopOnly=function(_a9c){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _a9d=(_a9c.scrollWidth==0)?_a9c.clientWidth:_a9c.scrollWidth;
- this.updateMainOutputWidth(_a9d);
- this.setScrollX(_a9c,0);
- if(this.getSection("pfTopHeadings")){
- this.getSection("pfTopHeadings").style.width=_a9d+"px";
- this.setScrollX(this.getSection("pfTopHeadings"),0);
- }
- this.showTemplatePart("freezeSide",false);
- };
- PinFreezeContainer.prototype.showFreezeSideOnly=function(_a9e){
- if(!(this.m_freezeTop&&this.m_freezeSide)){
- return;
- }
- var _a9f=(_a9e.scrollHeight==0)?_a9e.clientHeight:_a9e.scrollHeight;
- this.updateMainOutputHeight(_a9f);
- this.setScrollY(_a9e,0);
- if(this.getSection("pfSideHeadings")){
- this.getSection("pfSideHeadings").style.height=_a9f+"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(_aa0){
- this.updateMainOutputWidth((_aa0.scrollWidth==0)?_aa0.clientWidth:_aa0.scrollWidth);
- this.updateMainOutputHeight((_aa0.scrollHeight==0)?_aa0.clientHeight:_aa0.scrollHeight);
- this.setInitialScrollPosition(_aa0,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(_aa3){
- return _aa3.firstChild?true:false;
- };
- PinFreezeContainer.prototype.updateContainer=function(){
- var _aa4=this.getSection("pfMainOutput");
- var _aa5=this.getMainOutputHomeCell();
- if(_aa5){
- if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){
- this.m_scrollableClientHeight-=_aa5.offsetHeight;
- var _aa6=this.calculateMinCrossTabScrollableClientHeight();
- if(_aa6>this.m_scrollableClientHeight){
- this.m_scrollableClientHeight=_aa6;
- }
- }
- if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){
- this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_aa5);
- }
- }
- if(_aa4&&_aa5){
- this.showAll();
- if(this.frozenSectionsRequired()){
- this.updateMainOutputSize();
- this.initializeHomeCellTabIndex(_aa5);
- if(this.m_freezeSide){
- var _aa7=this.getSection("pfSideHeadings");
- if(!this.headingsCreated(_aa7)){
- this.createSideHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeTop){
- this.initializeTouchScrolling(_aa7);
- }
- }
- var _aa8=this.getSection("pfHorizontalScrollBar");
- _aa8.scrollLeft="0px";
- }
- if(this.m_freezeTop){
- var _aa9=this.getSection("pfTopHeadings");
- if(!this.headingsCreated(_aa9)){
- this.createTopHeadings(this.m_cachedBaseContainer);
- if(this.m_freezeSide){
- this.initializeTouchScrolling(_aa9);
- }
- }
- var _aaa=this.getSection("pfVerticalScrollBar");
- _aaa.scrollTop="0px";
- }
- if(this.m_freezeSide&&this.m_freezeTop){
- var _aab=this.getSection("pfHomeCell");
- if(!this.headingsCreated(_aab)){
- this.createHomeCellHeading();
- }
- _aab.style.display="";
- }
- var _aac=this.updateSideHeadingSize(_aa5);
- var _aad=this.updateTopHeadingSize(_aa5);
- if(!this.frozenSectionsRequired()){
- this.showMainOutputOnly(_aa4);
- }
- this.setInitialScrollPosition(_aa4,_aac,_aad);
- if(this.m_freezeTop&&this.m_freezeSide){
- this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_aad);
- this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_aac,0);
- }
- this.initializeTouchScrolling(_aa4);
- }else{
- this.showMainOutputOnly(_aa4);
- this.removeTouchScrolling();
- }
- this.updateTabIndexValues();
- }
- };
- PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){
- var _aae=0;
- if(this.m_cachedPFContainer){
- var _aaf=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId);
- if(_aaf){
- var _ab0=0;
- for(var r=0;r<_aaf.rows.length;r++){
- var row=_aaf.rows[r];
- for(var c=0;c<row.cells.length;c++){
- var cell=row.cells[c];
- if(cell.getAttribute("type")=="datavalue"){
- _ab0++;
- if(cell.childNodes.length===1&&cell.childNodes[0].getAttribute&&cell.childNodes[0].getAttribute("class")==="textItem"){
- _aae=_aae+cell.offsetHeight;
- }else{
- _ab0++;
- var _ab5=this.getSection("pfVerticalScrollBar");
- if(_ab5){
- _aae=_ab5.offsetWidth*2;
- }
- }
- break;
- }
- }
- if(_ab0>=2){
- break;
- }
- }
- }
- }
- return _aae;
- };
- PinFreezeContainer.prototype.updateSideHeadingSize=function(_ab6){
- var _ab7=0;
- if(this.m_freezeSide){
- var _ab8=this.getSection("pfMainOutput");
- if(!_ab8){
- return 0;
- }
- if(!this.frozenSideHeadingsRequired()){
- this.showFreezeTopOnly(_ab8);
- return 0;
- }
- var _ab9=this.getSection("pfSideHeadings");
- _ab7=this.getSideHeadingSectionWidth(_ab6);
- var _aba=this.getSection("pfHorizontalScrollBar");
- var _abb=this.getSectionHomeCell(_ab9);
- if(_ab9.style.display=="none"){
- _ab9.style.display="";
- _aba.style.display="";
- }
- _ab9.style.width=_ab7+"px";
- _ab9.style.height=_ab8.clientHeight+"px";
- }
- return _ab7;
- };
- PinFreezeContainer.prototype.updateTopHeadingSize=function(_abc){
- var _abd=0;
- if(this.m_freezeTop){
- var _abe=this.getSection("pfMainOutput");
- if(!_abe){
- return 0;
- }
- if(!this.frozenTopHeadingsRequired()){
- this.showFreezeSideOnly(_abe);
- return 0;
- }
- var _abf=this.getSection("pfTopHeadings");
- _abd=this.getTopHeadingSectionHeight(_abc);
- var _ac0=this.getSection("pfVerticalScrollBar");
- var _ac1=this.getSectionHomeCell(_abf);
- if(_abf.style.display=="none"){
- _abf.style.display="";
- _ac0.style.display="";
- }
- _abf.style.height=_abd+"px";
- _abf.style.width=_abe.clientWidth+"px";
- }
- return _abd;
- };
- PinFreezeContainer.prototype.setScrollX=function(_ac2,_ac3){
- if(getElementDirection(_ac2)==="rtl"){
- setScrollRight(_ac2,_ac3);
- }else{
- setScrollLeft(_ac2,_ac3);
- }
- };
- PinFreezeContainer.prototype.setScrollY=function(_ac4,_ac5){
- _ac4.scrollTop=_ac5;
- };
- PinFreezeContainer.prototype.setInitialScrollPosition=function(_ac6,_ac7,_ac8){
- if(getElementDirection(_ac6)==="rtl"){
- setScrollRight(_ac6,_ac7);
- }else{
- setScrollLeft(_ac6,_ac7);
- }
- _ac6.scrollTop=_ac8;
- };
- PinFreezeContainer.prototype.getScrollableClientWidth=function(){
- return this.m_scrollableClientWidth;
- };
- PinFreezeContainer.prototype.setScrollableClientWidth=function(_ac9){
- this.m_scrollableClientWidth=_ac9;
- };
- 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(_aca){
- this.m_scrollableClientHeight=_aca;
- };
- PinFreezeContainer.prototype.getClientHeight=function(){
- return this.m_clientHeight;
- };
- PinFreezeContainer.prototype.clientHeight=function(_acb){
- return _acb.clientHeight;
- };
- PinFreezeContainer.prototype.findBestContainerHeight=function(_acc){
- if(this.m_freezeTop&&this.m_cachedReportDiv){
- var _acd=this.m_cachedReportDiv.parentNode;
- if(_acd){
- var _ace=this._findRestOfPageHeight(this.getContainer());
- return _acc-_ace-(this.c_pageMargin/2)-this.m_containerMargin.top;
- }
- }
- return _acc-this.c_pageMargin;
- };
- PinFreezeContainer.prototype.findBestContainerWidth=function(_acf){
- 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 _ad1=0;
- var _ad2=node.parentNode.childNodes;
- for(var i=0;i<_ad2.length;i++){
- if(_ad2[i]!==node){
- _ad1+=_ad2[i].clientWidth;
- }
- }
- return _acf-_ad1-(this.c_pageMargin/2);
- }
- return _acf;
- };
- PinFreezeContainer.prototype._findRestOfPageHeight=function(node){
- var _ad5=0;
- var _ad6=node.parentNode;
- if(!_ad6){
- return _ad5;
- }
- if(_ad6.childNodes.length>1){
- for(var i=0;i<_ad6.childNodes.length;i++){
- var _ad8=_ad6.childNodes[i];
- if(_ad8.nodeType==1){
- var _ad9=this.getStyleDisplay(_ad8);
- if(_ad8!=node&&!isNaN(_ad8.clientHeight)&&_ad9!="none"&&_ad9!="table-cell"){
- _ad5+=this.clientHeight(_ad8);
- }
- }
- }
- }
- if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){
- _ad5+=this._findRestOfPageHeight(_ad6);
- }
- return _ad5;
- };
- PinFreezeContainer.prototype.resize=function(_ada,_adb,_adc,_add){
- if(this.m_fixedWidth&&this.m_fixedHeight){
- return;
- }
- _ada=(this.m_fixedWidth)?this.m_fixedWidth:_ada;
- _adb=(this.m_fixedHeight)?this.m_fixedHeight:_adb;
- var _ade=this.getSectionStructure();
- if(this.m_sectionCache&&this.m_cachedPFContainer){
- var _adf=0;
- if(_adb!==0){
- _adf=this.findBestContainerHeight(_adb);
- if(_adc&&_adf<300){
- _adf=300;
- }else{
- if(_adf<100){
- _adf=100;
- }
- }
- }
- this.m_clientHeight=_adf>0?_adf:this.m_clientHeight;
- var _ae0=0;
- if(_ada!==0){
- _ae0=this.findBestContainerWidth(_ada);
- }
- this.m_clientWidth=(_ae0>0)?_ae0-5-(this.c_pageMargin/2):this.m_clientWidth;
- var _ae1=this.getSection("pfMainOutput");
- var _ae2=this.getSectionHomeCell(_ae1);
- if(_ae2){
- this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_ae2);
- this.m_scrollableClientHeight=this.m_clientHeight-_ae2.offsetHeight;
- }
- if(_add){
- var _ae3=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_add.lid);
- if(_ae3){
- var node=_ae3[0];
- while(node.nodeName.toLowerCase()!="table"){
- node=node.parentNode;
- }
- node.style.width=_add.width+"px";
- }
- }
- this.updateContainer();
- }else{
- this.m_clientWidth=_ada-this.c_pageMargin;
- this.m_clientHeight=_adb-this.c_pageMargin;
- }
- var _ae5=this.getSectionStructure();
- this.checkSectionStructureChange(_ade,_ae5);
- };
- 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(_ae6){
- var _ae7=this.getSection("pfMainOutput");
- if(!_ae7){
- return;
- }
- if(this.m_freezeSide==true){
- _ae7.style.width=(_ae6+"px");
- if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){
- _ae7.style.height=_ae7.firstChild.clientHeight+"px";
- }
- var _ae8=this.getSection("pfHorizontalScrollBar");
- if(_ae8){
- _ae8.style.width=(_ae6+"px");
- var _ae9=_ae8.firstChild;
- if(_ae9){
- var _aea=this.getSectionHomeCell(_ae7);
- var _aeb=_ae7.scrollWidth-this.getHomeCellOffsetWidth(_aea);
- _ae9.style.width=_aeb+"px";
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateMainOutputHeight=function(_aec){
- var _aed=this.getSection("pfMainOutput");
- if(!_aed){
- return;
- }
- _aed.style.height=(_aec+"px");
- if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){
- _aed.style.width=_aed.firstChild.clientWidth+2+"px";
- }
- var _aee=this.getSection("pfVerticalScrollBar");
- if(_aee){
- _aee.style.height=(_aec+"px");
- var _aef=_aee.firstChild;
- if(_aef){
- var _af0=this.getSectionHomeCell(_aed);
- var _af1=_aed.scrollHeight-_af0.offsetHeight;
- _aef.style.height=_af1+"px";
- }
- }
- };
- PinFreezeContainer.prototype.getElementByLID=function(_af2,tag,lid){
- var _af5=getElementsByAttribute(_af2,tag,"lid",lid);
- if(_af5.length>0){
- return _af5[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getContainerByLID=function(_af6){
- var _af7=getElementsByAttribute(_af6,"table","pfclid","pfContainer_"+this.m_lidNS);
- if(_af7.length>0){
- return _af7[0];
- }
- return null;
- };
- PinFreezeContainer.prototype.getSectionByLID=function(_af8,_af9){
- var _afa=getElementsByAttribute(_af8,"div","pfslid",_af9+"_"+this.m_lidNS);
- if(_afa.length>0){
- return _afa[0];
- }
- return null;
- };
- PinFreezeContainer.getSectionNameFromSlid=function(slid){
- return slid?slid.split("_")[0]:null;
- };
- PinFreezeContainer.getLidFromSlid=function(slid){
- return slid.split("_")[1];
- };
- PinFreezeContainer.nodeToSlid=function(_afd){
- while(_afd.parentNode&&!_afd.getAttribute("pfslid")){
- _afd=_afd.parentNode;
- }
- if(_afd.getAttribute){
- return _afd.getAttribute("pfslid");
- }
- return null;
- };
- PinFreezeContainer.prototype.cacheContainerAndSections=function(_afe){
- if(!_afe){
- return _afe;
- }
- this.m_cachedPFContainer=_afe;
- var _aff=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS);
- this.m_sectionCache={};
- for(var i=0;i<_aff.length;++i){
- var key=_aff[i].getAttribute("pfslid");
- key=key.split("_",1);
- this.m_sectionCache[key]=_aff[i];
- }
- return _afe;
- };
- 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(_b03){
- var slid=PinFreezeContainer.nodeToSlid(_b03);
- if(!this.m_homeCellNodes[slid]){
- var _b05=getElementsByAttribute(_b03,"*","tabIndex","*");
- for(var i in _b05){
- if(!_b05[i].getAttribute("widgetid")){
- this.m_homeCellNodes[slid]=_b05[i];
- break;
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateTabIndexValues=function(){
- if(this.isContainerFrozen()){
- for(var slid in this.m_homeCellNodes){
- var _b08=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08);
- }
- }else{
- for(var slid in this.m_homeCellNodes){
- var _b08=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1";
- this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08);
- }
- }
- };
- PinFreezeContainer.prototype.getSectionHomeCell=function(_b09){
- if(_b09){
- var _b0a=this.getElementByLID(_b09,"table",this.m_lid+this.m_viewerId);
- if(_b0a&&_b0a.rows.length&&_b0a.rows[0].cells.length){
- return _b0a.rows[0].cells[0];
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getMainOutputHomeCell=function(){
- var _b0b=this.getSection("pfMainOutput");
- if(!_b0b){
- _b0b=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput");
- }
- return this.getSectionHomeCell(_b0b);
- };
- PinFreezeContainer.prototype.getChildPosition=function(_b0c,_b0d){
- for(var i=0;i<_b0c.childNodes.length;++i){
- if(_b0c.childNodes[i]==_b0d){
- return i;
- }
- }
- return -1;
- };
- PinFreezeContainer.prototype.insertAt=function(_b0f,_b10,_b11){
- if(_b11==_b0f.childNodes.length){
- _b0f.appendChild(_b10);
- }else{
- _b0f.insertBefore(_b10,_b0f.childNodes[_b11]);
- }
- };
- PinFreezeContainer.prototype.synchScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _b12=this.getMainOutputHomeCell();
- var _b13=this.getSection("pfMainOutput");
- var _b14=this.getSection("pfSideHeadings");
- if(_b14!=null){
- var _b15=this.getSection("pfHorizontalScrollBar");
- if(_b15){
- var _b16=this.getSideHeadingSectionWidth(_b12);
- if(getElementDirection(_b13)==="rtl"){
- _b16=0;
- }
- setScrollLeft(_b13,getScrollLeft(_b15)+_b16);
- if(this.m_freezeTop){
- setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_b15)+_b16);
- }
- }
- }
- };
- PinFreezeContainer.prototype.updateScroll=function(_b17){
- var slid=PinFreezeContainer.nodeToSlid(_b17);
- if(!slid){
- return;
- }
- var _b19=PinFreezeContainer.getSectionNameFromSlid(slid);
- if(!_b19){
- return;
- }
- var _b1a=document.getElementById("CVReport"+this.m_viewerId);
- if(!_b1a){
- return;
- }
- if(!this.m_cachedPFContainer){
- return;
- }
- var _b1b=_b17.parentNode;
- if(_b1b){
- var _b1c=_b1b.tagName.toLowerCase();
- if(_b1c==="td"||_b1c==="th"){
- var _b1d=this.getMainOutputHomeCell();
- var _b1e=this.getSection("pfMainOutput");
- if(_b19==="pfMainOutput"||_b19==="pfTopHeadings"){
- var _b1f=this.getSection("pfHorizontalScrollBar");
- if(_b1f){
- var _b20=PinFreezeContainer.calculateNewPosition(_b1b.offsetLeft,_b1b.offsetWidth,getScrollLeft(_b1e),_b1e.offsetWidth);
- var _b21=this.getHomeCellOffsetWidth(_b1d);
- if(getElementDirection(_b1e)==="rtl"){
- _b21=0;
- }
- setScrollLeft(_b1f,_b20-_b21);
- setScrollLeft(_b1e,_b20);
- }
- }
- if(_b19==="pfMainOutput"||_b19==="pfSideHeadings"){
- var _b22=this.getSection("pfVerticalScrollBar");
- if(_b22){
- var _b23=PinFreezeContainer.calculateNewPosition(_b1b.offsetTop,_b1b.offsetHeight,_b1e.scrollTop,_b1e.offsetHeight);
- _b22.scrollTop=_b23-_b1d.offsetHeight;
- _b1e.scrollTop=_b23;
- }
- }
- }
- }
- };
- PinFreezeContainer.calculateNewPosition=function(_b24,_b25,_b26,_b27){
- var _b28=_b24+_b25;
- var _b29=_b26+_b27;
- if(_b26>_b24){
- return _b24;
- }else{
- if(_b29<_b28){
- if(_b25>_b27){
- return _b24;
- }
- return _b28-_b27;
- }
- }
- return _b26;
- };
- PinFreezeContainer.prototype.synchVScroll=function(){
- if(!this.m_cachedPFContainer){
- return;
- }
- var _b2a=this.getMainOutputHomeCell();
- var _b2b=this.getSection("pfMainOutput");
- var _b2c=this.getSection("pfTopHeadings");
- if(_b2c!=null){
- var _b2d=this.getSection("pfVerticalScrollBar");
- if(_b2d){
- _b2b.scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a);
- if(this.m_freezeSide){
- this.getSection("pfSideHeadings").scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a);
- }
- }
- }
- };
- PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_b2e){
- return _b2e.offsetHeight+_b2e.offsetTop+this.m_containerMargin.top;
- };
- PinFreezeContainer.prototype._findBestGuessHomeCell=function(_b2f){
- if(this.m_bestGuessHomeCell){
- return this.m_bestGuessHomeCell;
- }
- if(_b2f){
- var _b30=_b2f.parentNode.parentNode;
- var _b31=_b2f.rowSpan?(_b2f.rowSpan):1;
- var tr=_b30.childNodes[_b31];
- if(tr){
- var _b33=tr.childNodes.length;
- var _b34=null;
- var td=null;
- for(var i=0;i<_b33;i++){
- td=tr.childNodes[i];
- if(td.getAttribute("type")=="datavalue"){
- break;
- }
- _b34=td;
- }
- if(_b34){
- this.m_bestGuessHomeCell=_b34;
- return this.m_bestGuessHomeCell;
- }
- }else{
- return _b2f;
- }
- }
- return null;
- };
- PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_b37){
- var _b38=this._findBestGuessHomeCell(_b37);
- return _b38?_b38.offsetWidth:0;
- };
- PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_b39){
- var _b3a=this._findBestGuessHomeCell(_b39);
- if(_b3a){
- return _b3a.offsetWidth+_b3a.offsetLeft+this.m_containerMargin.left;
- }else{
- return _b39.offsetWidth+_b39.offsetLeft;
- }
- };
- PinFreezeContainer.prototype.isContainerFrozen=function(){
- return (this.m_freezeTop||this.m_freezeSide);
- };
- PinFreezeContainer.prototype.unfreeze=function(_b3b){
- var _b3c=this.getContainerByLID(_b3b);
- this.m_freezeTop=false;
- this.m_freezeSide=false;
- if(_b3c){
- var _b3d=_b3c.parentNode;
- pfMainOutput=this.getSectionByLID(_b3c,"pfMainOutput");
- if(pfMainOutput&&_b3d){
- if(_b3c.style.border!==""){
- pfMainOutput.firstChild.style.border=_b3c.style.border;
- _b3c.style.border="";
- }
- if(this.m_wrapFlag){
- var _b3e=pfMainOutput.firstChild.getElementsByTagName("span");
- if(_b3e){
- for(var k=0;k<_b3e.length;k++){
- _b3e[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;
- }
- _b3d.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_b3c);
- }
- }
- };
- PinFreezeContainer.prototype.getBorderInfo=function(el,_b41){
- var _b42={};
- var _b43="border-"+_b41+"-";
- var _b44="border"+_b41.charAt(0).toUpperCase()+_b41.substring(1);
- if(el.currentStyle){
- _b42[_b44+"Width"]=el.currentStyle[_b44+"Width"];
- _b42[_b44+"Style"]=el.currentStyle[_b44+"Style"];
- _b42[_b44+"Color"]=el.currentStyle[_b44+"Color"];
- }else{
- if(window.getComputedStyle){
- _b42[_b44+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"width");
- _b42[_b44+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"style");
- _b42[_b44+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"color");
- }else{
- return null;
- }
- }
- return _b42;
- };
- PinFreezeContainer.prototype.isA11yEnabled=function(_b45){
- return (_b45.getAttribute("role")==="grid");
- };
- PinFreezeContainer.isElementInMainOutput=function(_b46){
- var _b47=PinFreezeContainer.nodeToSlid(_b46);
- if(_b47){
- return (_b47.indexOf("pfMainOutput_")===0);
- }
- return false;
- };
- PinFreezeContainer.prototype.removeCTX=function(_b48){
- _b48.removeAttribute("ctx");
- var _b49=getElementsByAttribute(_b48,"*","ctx","*");
- if(_b49&&_b49.length){
- for(var i=0;i<_b49.length;i++){
- _b49[i].removeAttribute("ctx");
- }
- }
- };
- PinFreezeContainer.prototype.initializeTouchScrolling=function(_b4b){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_b4b){
- _b4b.m_pinFreezeContainer=this;
- if(document.attachEvent){
- _b4b.attachEvent("touchstart",this.touchStart);
- _b4b.attachEvent("touchmove",this.touchMove);
- _b4b.attachEvent("touchend",this.touchEnd);
- }else{
- _b4b.addEventListener("touchstart",this.touchStart,false);
- _b4b.addEventListener("touchmove",this.touchMove,false);
- _b4b.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(_b4c){
- if(!this.m_pinFreezeManager.isIWidgetMobile()){
- return;
- }
- if(_b4c){
- if(document.detachEvent){
- _b4c.detachEvent("touchstart",this.touchStart);
- _b4c.detachEvent("touchmove",this.touchMove);
- _b4c.detachEvent("touchend",this.touchEnd);
- }else{
- _b4c.removeEventListener("touchstart",this.touchStart,false);
- _b4c.removeEventListener("touchmove",this.touchMove,false);
- _b4c.removeEventListener("touchend",this.touchEnd,false);
- }
- }
- };
- PinFreezeContainer.prototype.touchMove=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _b4e=e.changedTouches[0];
- if(_b4e&&_b4e.clientX&&_b4e.clientY){
- var _b4f=parseInt(_b4e.clientX);
- var _b50=parseInt(_b4e.clientY);
- if(this.m_pinFreezeContainer.touchMoveHandler(_b4f,_b50)){
- return stopEventBubble(e);
- }
- }
- }
- };
- PinFreezeContainer.prototype.touchStart=function(e){
- if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _b52=e.changedTouches[0];
- if(_b52&&_b52.clientX&&_b52.clientY){
- var _b53=parseInt(_b52.clientX);
- var _b54=parseInt(_b52.clientY);
- this.m_pinFreezeContainer.touchStartHandler(_b53,_b54);
- }
- }
- };
- PinFreezeContainer.prototype.touchStartHandler=function(_b55,_b56){
- this.touchScrollSections=false;
- this.touchPreviousX=_b55;
- this.touchPreviousY=_b56;
- };
- PinFreezeContainer.prototype.touchEnd=function(e){
- if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){
- stopEventBubble(e);
- }
- };
- PinFreezeContainer.prototype.touchEndHandler=function(){
- var _b58=this.touchScrollSections;
- this.touchScrollSections=false;
- this.touchPreviousX=-1;
- this.touchPreviousY=-1;
- return _b58;
- };
- PinFreezeContainer.prototype.touchMoveHandler=function(_b59,_b5a){
- var _b5b=this.getSection("pfMainOutput");
- if(!_b5b){
- return;
- }
- var _b5c=this.getSectionHomeCell(_b5b);
- var _b5d=this.getTopHeadingSectionHeight(_b5c);
- var _b5e=this.getSideHeadingSectionWidth(_b5c);
- var _b5f=_b5a-this.touchPreviousY;
- var _b60=_b59-this.touchPreviousX;
- if(this.touchScrollSections){
- if(_b5f!=0){
- var _b61=_b5b.scrollTop-_b5f;
- _b61=(_b61>_b5d)?_b61:_b5d;
- _b5b.scrollTop=_b61;
- var _b62=this.getSection("pfSideHeadings");
- if(_b62){
- _b62.scrollTop=_b61;
- }
- }
- if(_b60!=0){
- var _b63=_b5b.scrollLeft-_b60;
- _b63=(_b63>_b5e)?_b63:_b5e;
- _b5b.scrollLeft=_b63;
- var _b64=this.getSection("pfTopHeadings");
- if(_b64){
- _b64.scrollLeft=_b63;
- }
- }
- }else{
- this.firstTouchMove(_b5b,_b60,_b5f,_b5e,_b5d);
- }
- this.touchPreviousX=_b59;
- this.touchPreviousY=_b5a;
- return this.touchScrollSections;
- };
- PinFreezeContainer.prototype.firstTouchMove=function(_b65,_b66,_b67,_b68,_b69){
- var _b6a=this.mostlyVerticalTouchMove(_b66,_b67);
- var _b6b=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings"));
- var _b6c=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings"));
- if(_b6a&&(!_b6b||(_b67>0&&_b65.scrollTop<=_b69)||(_b67<0&&_b65.scrollTop+_b65.clientHeight>=_b65.scrollHeight))){
- this.touchScrollSections=false;
- }else{
- if(!_b6a&&(!_b6c||(_b66>0&&_b65.scrollLeft<=_b68)||(_b66<0&&_b65.scrollLeft+_b65.clientWidth>=_b65.scrollWidth))){
- this.touchScrollSections=false;
- }else{
- this.touchScrollSections=true;
- }
- }
- };
- PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_b6d,_b6e){
- var _b6f=(_b6d>0)?_b6d:0-_b6d;
- var _b70=(_b6e>0)?_b6e:0-_b6e;
- return (_b70>_b6f);
- };
- 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,_b73,_b74,_b75,_b76){
- if(_b73||_b74){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- if(!this.m_frozenInfo[lid]){
- this._createDefaultFrozenInfo(lid);
- }
- this.m_frozenInfo[lid].freezeTop=_b73;
- this.m_frozenInfo[lid].freezeSide=_b74;
- var _b77=this.newContainer(lid,_b73,_b74,_b75,_b76);
- this.m_frozenInfo[lid].pinFreezeContainers.push(_b77);
- return _b77;
- }
- return null;
- };
- PinFreezeManager.prototype.newContainer=function(lid,_b79,_b7a,_b7b,_b7c){
- return new PinFreezeContainer(this,lid,this.m_viewerId,_b79,_b7a,_b7b,_b7c);
- };
- 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 _b80=this.m_frozenInfo[lid];
- if(_b80){
- delete _b80.pinFreezeContainers;
- _b80.pinFreezeContainers=[];
- _b80.freezeTop=false;
- _b80.freezeSide=false;
- }
- };
- PinFreezeManager.prototype.prepopulateFrozenInfo=function(_b81){
- var _b82=getDescendantElementsByAttribute(_b81,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_b82){
- if(!this.m_frozenInfo){
- this.m_frozenInfo={};
- }
- for(var i=0;i<_b82.length;i++){
- var _b84=_b82[i];
- if(_b84.getAttribute("id")=="rt"+this.m_viewerId){
- continue;
- }
- var lid=this.removeNamespace(_b84.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 _b86=getDescendantElementsByAttribute(_b84,"table","lid","",false,-1,new RegExp("[\\s\\S]*"));
- if(_b86){
- for(var _b87=0;_b87<_b86.length;_b87++){
- var _b88=_b86[_b87];
- var _b89=this.removeNamespace(_b88.getAttribute("lid"));
- if(!this.m_frozenInfo[lid].childContainers[_b89]){
- var _b8a=_b88.parentNode;
- while(_b8a&&!_b8a.getAttribute("lid")){
- _b8a=_b8a.parentNode;
- }
- if(_b8a&&this.removeNamespace(_b8a.getAttribute("lid"))==lid){
- this.m_frozenInfo[lid].childContainers[_b89]=true;
- }
- }
- }
- }
- }
- this._updateParentContainerInfo();
- }
- };
- PinFreezeManager.prototype._updateParentContainerInfo=function(){
- for(var _b8b in this.m_frozenInfo){
- var _b8c=this.m_frozenInfo[_b8b].childContainers;
- if(_b8c){
- for(var _b8d in _b8c){
- if(this.m_frozenInfo[_b8d]){
- this.m_frozenInfo[_b8d].parentContainer=_b8b;
- 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,_b90,_b91){
- var _b92=document.getElementById("CVReport"+this.m_viewerId);
- this.prepopulateFrozenInfo(_b92);
- var _b93=this.getTopLevelContainerLID(lid);
- this.unfreezeAllNestedContainers(_b93,_b92);
- this.m_frozenInfo[lid].freezeTop=_b90;
- this.m_frozenInfo[lid].freezeSide=_b91;
- var _b94=this._createPinAndFreezeObject(_b92,_b93);
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this._resizePinFreezeObjects(_b94);
- this.sectionStructureChange();
- if(isIE()){
- var obj=this;
- setTimeout(function(){
- obj.refresh();
- },1);
- var _b96=document.getElementById("RVContent"+this.m_viewerId);
- this.m_oCV.repaintDiv(_b96);
- }
- return _b94;
- };
- 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,_b9b){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){
- _b9b=_b9b?_b9b:0;
- return this.m_frozenInfo[lid].pinFreezeContainers[_b9b];
- }
- return null;
- };
- PinFreezeManager.prototype.nodeToContainer=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- var _b9e=null;
- if(slid){
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- _b9e=this.getContainer(lid);
- }
- return _b9e;
- };
- PinFreezeManager.prototype.getContainerElement=function(_ba0){
- var lid=this.removeNamespace(_ba0.getAttribute("lid"));
- if(lid){
- var _ba2=this.getContainer(lid);
- if(_ba2){
- return _ba2.getContainer();
- }
- }
- return null;
- };
- PinFreezeManager.prototype._createPinAndFreezeObject=function(_ba3,lid){
- var _ba5=null;
- if(this.m_frozenInfo){
- var _ba6=this.m_frozenInfo[lid];
- var _ba7=_ba6.initialLoad;
- if(_ba7){
- delete _ba6.initialLoad;
- }
- var _ba8=_ba6.freezeTop;
- var _ba9=_ba6.freezeSide;
- var _baa=null;
- if(_ba7&&_ba6.pinFreezeContainers&&(_ba8||_ba9)){
- _baa=_ba6.pinFreezeContainers.slice(0);
- }
- var _bab=_ba3;
- if(_ba6&&_ba6.parentContainer){
- var _bac=getElementsByAttribute(_ba3,"table","lid",_ba6.parentContainer+this.m_viewerId);
- if(_bac){
- for(parentIndex=0;parentIndex<_bac.length;parentIndex++){
- if(!_bac[parentIndex].getAttribute("clonednode")){
- _bab=_bac[parentIndex];
- break;
- }
- }
- }
- }
- if(_ba6.childContainers){
- for(var _bad in _ba6.childContainers){
- var _bae=this._createPinAndFreezeObject(_bab,_bad);
- _ba5=_ba5?_ba5:_bae;
- }
- }
- var _baf=getElementsByAttribute(_bab,"table","lid",lid+this.m_viewerId);
- if(_baf&&_baf.length>0){
- delete _ba6.pinFreezeContainers;
- _ba6.pinFreezeContainers=[];
- }else{
- return null;
- }
- if(_baf&&(_ba8||_ba9)){
- var _bb0=(_ba5!==null);
- for(var i=0;i<_baf.length;i++){
- var _bb2=_baf[i];
- if(_bb2.getAttribute("clonednode")=="true"){
- continue;
- }
- _ba5=this.addContainerObject(lid,_ba8,_ba9,_bb2,i);
- if(_ba5){
- _ba5.createPFContainer(_bab,_bb0);
- if(_ba7){
- _ba5.copyProperties(_baa[0]);
- }
- _ba5.freezeContainerInReport(_ba3);
- }
- }
- }
- }
- return _ba5;
- };
- PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_bb3){
- if(this.m_frozenInfo){
- var _bb4=false;
- var _bb5=null;
- for(var _bb6 in this.m_frozenInfo){
- var _bb7=this.m_frozenInfo[_bb6];
- if(!_bb4){
- _bb4=_bb7.initialLoad;
- }
- if(!_bb7.parentContainer){
- var temp=this._createPinAndFreezeObject(_bb3,_bb7.lid);
- _bb5=_bb5?_bb5:temp;
- }
- }
- if(!_bb4&&_bb5){
- this._resizePinFreezeObjects(_bb5);
- }
- this.refresh();
- }
- };
- PinFreezeManager.prototype._resizePinFreezeObjects=function(_bb9){
- var _bba,_bbb;
- var _bbc=this.m_oCV.getViewerWidget();
- if(_bbc){
- var size=_bbc.getWidgetSize();
- _bbb=(size&&size.w&&(size.w<this.getInitialWidthThreshold()))?size.w:_bb9.getClientWidth();
- _bba=(size&&size.h&&(size.h<this.getInitialHeightThreshold()))?size.h:_bb9.getClientHeight();
- }else{
- var _bbe=document.getElementById("RVContent"+this.m_viewerId);
- var _bbf=document.getElementById("mainViewerTable"+this.m_viewerId);
- _bbb=_bbe.clientWidth;
- _bba=_bbf.clientHeight;
- }
- this.m_lastWidthProcessed=0;
- this.m_lastHeightProcessed=0;
- this.resize(_bbb,_bba);
- };
- PinFreezeManager.prototype.resize=function(_bc0,_bc1){
- var _bc2=(Math.abs(_bc0-this.m_lastWidthProcessed)<this.c_resizeTweekLimit);
- var _bc3=(Math.abs(_bc1-this.m_lastHeightProcessed)<this.c_resizeTweekLimit);
- if(_bc2&&_bc3){
- return;
- }
- var _bc4=(Math.abs(_bc0-this.m_lastWidthProcessed)>2)?_bc0:0;
- var _bc5=(Math.abs(_bc1-this.m_lastHeightProcessed)>2)?_bc1:0;
- for(var lid in this.m_frozenInfo){
- if(!this.m_frozenInfo[lid].parentContainer){
- this.resizeContainer(lid,_bc4,_bc5);
- }
- }
- this.m_lastWidthProcessed=_bc0;
- this.m_lastHeightProcessed=_bc1;
- };
- PinFreezeManager.prototype.resizeContainer=function(lid,_bc8,_bc9){
- var _bca=this.m_frozenInfo[lid];
- if(_bca){
- var _bcb=null;
- if(_bca.childContainers){
- var _bcc=_bc8>10?_bc8-10:_bc8;
- var _bcd=_bc9>10?_bc9-10:_bc9;
- for(var _bce in _bca.childContainers){
- _bcb=this.resizeContainer(_bce,_bcc,_bcd);
- }
- }
- var _bcf=_bca.pinFreezeContainers;
- var _bd0=null;
- var _bd1=null;
- if(_bcf){
- for(var i=0;i<_bcf.length;i++){
- _bd0=_bcf[i];
- _bd0.resize(_bc8,_bc9,_bca.parentContainer,_bcb);
- var _bd3=_bd0.getContainer();
- if(_bd3&&(!_bd1||(_bd1.width<_bd3.clientWidth))){
- _bd1={"width":_bd3.clientWidth,"lid":_bd0.m_lidNS};
- }
- }
- }
- return _bd1;
- }
- };
- PinFreezeManager.prototype.processAutoResize=function(_bd4,_bd5){
- this.m_lastWidthProcessed=_bd4;
- this.m_lastHeightProcessed=_bd5;
- };
- PinFreezeManager.prototype.onSetVisible=function(){
- this.refresh();
- if(this.m_repaintOnVisible){
- this.rePaint();
- this.m_repaintOnVisible=false;
- }
- };
- PinFreezeManager.prototype.onResizeCanvas=function(_bd6){
- if(_bd6){
- 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 _bd8 in this.m_frozenInfo){
- var _bd9=this.m_frozenInfo[_bd8].pinFreezeContainers;
- if(_bd9){
- for(var i=0;i<_bd9.length;i++){
- var _bdb=_bd9[i];
- _bdb.synchScroll();
- _bdb.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(_be8){
- var _be9=this.m_oCV.getSelectionController().getAllSelectedObjects();
- if(_be9&&_be9.length&&(_be9[0].getDataContainerType()==="crosstab"||(_be8&&_be9[0].getDataContainerType()==="list"))){
- var lid=(_be9[0].getLayoutElementId());
- if(lid){
- if(!this.hasPromptControlsInFreezableCells(lid)){
- return this.removeNamespace(lid);
- }
- }
- }
- return null;
- };
- PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){
- var _bec=this.m_oCV.getLayoutElementFromLid(lid);
- var _bed=getElementsByAttribute(_bec,["td","th"],"type","columnTitle");
- var _bee=new RegExp("(^|[W])clsPromptComponent($|[W])");
- var _bef=isIE()?"className":"class";
- for(var j in _bed){
- if(_bed.hasOwnProperty(j)){
- var _bf1=getElementsByAttribute(_bed[j],"*",_bef,null,1,_bee);
- if(_bf1.length>0){
- return true;
- }
- }
- }
- return false;
- };
- PinFreezeManager.prototype.unfreeze=function(lid,_bf3,_bf4){
- if(this.m_frozenInfo&&this.m_frozenInfo[lid]){
- var _bf5=this.m_frozenInfo[lid].pinFreezeContainers;
- if(_bf5){
- for(var i=0;i<_bf5.length;i++){
- var _bf7=_bf5[i];
- _bf7.unfreeze(_bf3);
- }
- if(_bf4){
- this._resetFrozenInfo(lid);
- }
- }
- }
- };
- PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_bf9){
- var _bfa=this.m_frozenInfo[lid];
- if(_bfa){
- if(_bfa.freezeTop||_bfa.freezeSide){
- this.unfreeze(lid,_bf9,false);
- }
- if(_bfa.childContainers){
- for(var _bfb in _bfa.childContainers){
- this.unfreezeAllNestedContainers(_bfb,_bf9);
- }
- }
- }
- };
- PinFreezeManager.prototype.isNodeVisible=function(node){
- var slid=PinFreezeContainer.nodeToSlid(node);
- if(!slid){
- return true;
- }
- var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid));
- var _bff=this.getContainer(lid);
- if(!_bff){
- return true;
- }
- var _c00=PinFreezeContainer.getSectionNameFromSlid(slid);
- var _c01=_bff.getSection(_c00);
- var _c02=null,_c03=null;
- var _c04=node;
- var _c05=null;
- while(_c04&&_c04!==_c01&&!_c02&&!_c03){
- _c02=_bff.getMain(_c04);
- _c03=_bff.getCopy(_c04);
- _c05=_c04;
- _c04=_c04.parentNode;
- }
- var _c06=_c02?true:false;
- var _c07=_c03?true:false;
- if(_c06){
- return _bff.getCopy(_c02)===_c05;
- }else{
- if(_c07){
- return _bff.getCopy(_c05)?false:true;
- }else{
- return true;
- }
- }
- };
- PinFreezeManager.prototype.sectionStructureChange=function(){
- var _c08=this.m_oCV.getViewerWidget();
- if(_c08&&_c08.getAnnotationHelper()){
- _c08.getAnnotationHelper().repositionCommentIndicators();
- }
- };
- PinFreezeManager.prototype.deepCloneNode=function(_c09){
- var copy=_c09.cloneNode(true);
- var _c0b=this.m_oCV.getViewerWidget();
- if(_c0b){
- if(_c0b.reportContainsDijits()){
- var _c0c=getElementsByAttribute(copy,"*","widgetid","*");
- if(_c0c&&_c0c.length){
- for(var i=0;i<_c0c.length;i++){
- _c0c[i].parentNode.removeChild(_c0c[i]);
- }
- }
- }
- }
- return copy;
- };
- PinFreezeManager.prototype.toJSONString=function(){
- var _c0e="";
- var _c0f="";
- for(var _c10 in this.m_frozenInfo){
- if(_c0e.length>0){
- _c0e+=",";
- }
- var _c11=this.m_frozenInfo[_c10];
- _c0e+="{";
- _c0e+="\"lid\":\""+_c11.lid.replace("\"","\\\"")+"\",";
- _c0e+="\"freezeTop\":"+_c11.freezeTop+",";
- _c0e+="\"freezeSide\":"+_c11.freezeSide+",";
- if(_c11.parentContainer){
- _c0e+="\"parentContainer\":\""+_c11.parentContainer+"\",";
- }
- if(_c11.pinFreezeContainers&&_c11.pinFreezeContainers.length>0){
- _c0e+="\"properties\":"+_c11.pinFreezeContainers[0].toJSONString()+",";
- }
- _c0e+="\"childContainers\": {";
- if(_c11.childContainers){
- var _c12=true;
- for(var _c13 in _c11.childContainers){
- if(!_c12){
- _c0e+=",";
- }
- _c0e+="\""+_c13+"\":true";
- _c12=false;
- }
- }
- _c0e+="}}";
- }
- if(_c0e.length>0){
- _c0f="{\"version\":1, \"containers\":["+_c0e+"]}";
- }
- return _c0f;
- };
- PinFreezeManager.prototype.fromJSONString=function(_c14){
- if(!_c14||_c14.length===0){
- return;
- }
- var _c15=null;
- try{
- _c15=eval("("+_c14+")");
- }
- catch(e){
- if(typeof console!="undefined"){
- console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_c14);
- console.log(e);
- }
- }
- if(!_c15){
- return;
- }
- var _c16=_c15.containers;
- var _c17=_c15.version;
- if(_c16.length>0){
- this.m_frozenInfo={};
- }
- for(var _c18=0;_c18<_c16.length;_c18++){
- var _c19=_c16[_c18];
- var lid=_c19.lid;
- var _c1b=_c19.freezeTop;
- var _c1c=_c19.freezeSide;
- var _c1d=document.getElementById("CVReport"+this.m_viewerId);
- var _c1e=getElementsByAttribute(_c1d,"table","lid",lid+this.m_viewerId);
- var _c1f=[];
- if(_c1e&&(_c1b||_c1c)){
- for(var i=0;i<_c1e.length;i++){
- var _c21=_c1e[i];
- var _c22=new PinFreezeContainer(this,lid,this.m_viewerId,_c19.freezeTop,_c19.freezeSide,_c21,i);
- if(_c19.properties){
- applyJSONProperties(_c22,_c19.properties);
- }
- _c1f.push(_c22);
- }
- }
- this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_c1b,"freezeSide":_c1c,"pinFreezeContainers":_c1f,"initialLoad":true};
- if(_c17>=1){
- if(_c19.childContainers){
- this.m_frozenInfo[lid].childContainers=_c19.childContainers;
- }
- if(_c19.parentContainer){
- this.m_frozenInfo[lid].parentContainer=_c19.parentContainer;
- }
- }
- }
- };
- PinFreezeManager.prototype.removeIdAttribute=function(_c23){
- var _c24=_c23.getAttribute("id");
- if(_c24!==null&&_c24!==""){
- _c23.removeAttribute("id");
- }
- var _c25=getElementsByAttribute(_c23,"*","id","*");
- if(_c25&&_c25.length){
- for(var i=0;i<_c25.length;i++){
- _c25[i].removeAttribute("id");
- }
- }
- return _c23;
- };
- PinFreezeManager.prototype.isElementInMainOutput=function(_c27){
- return PinFreezeContainer.isElementInMainOutput(_c27);
- };
- PinFreezeManager.prototype.isIWidgetMobile=function(){
- return (this.m_oCV&&this.m_oCV.isIWidgetMobile());
- };
- PinFreezeManager.prototype.destroy=function(){
- GUtil.destroyProperties(this);
- };
- dojo.provide("WidgetContextManager");
- dojo.declare("WidgetContextManager",null,{PP_WIDGET_CONTEXT:"com.ibm.widget.context",PP_REPORT_PROMPT_CONTEXT:"com.ibm.widget.context.report.prompt",PP_REPORT_DRILL_CONTEXT:"com.ibm.widget.context.report.drill",PP_VALUES:"values",PP_RANGES:"ranges",PP_MULTIVALUED:"multivalued",PP_MODELITEM:"modelItem",PP_MODELINFO:"modelInfo",PP_PROMPT:"prompt",PP_DRILL:"drill",PP_SELECT_CHOICES:"selectChoices",PP_BUX_SELECTVALUECONTROL_CONTEXT:"com.ibm.widget.context.bux.selectValueControl",PP_BUX_SELECTION_CONTEXT:"com.ibm.widget.context.bux.selection",PP_CASCADEPROMPT_CLEAR:"clearCascadePromptParams",EVENT_NAME_PROMPT:"com.ibm.widget.contextChanged.prompt",EVENT_NAME_DRILL:"com.ibm.widget.contextChanged.drill",EVENT_NAME_SELECTVALUECONTROL:"com.ibm.widget.contextChanged.selectValueControl",DEFAULT_MODEL_PATH:".",m_widget:null,m_oWidgetContextContainer:null,m_oPromptContextContainer:null,m_oDrillContextContainer:null,m_oPromptGenericContext:null,m_oDrillGenericContext:null,m_oFilterGenericContext:null,m_oSelectionFilterContext:null,m_oContextCollection:null,m_oWidgetContextObject:null,m_oPromptContextObject:null,m_oDrillContextObject:null,m_aSelectionFilterObjects:null,constructor:function(_c28){
- this.m_widget=_c28;
- this.m_oWidgetContextContainer={};
- this.m_oPromptContextContainer={};
- this.m_oDrillContextContainer={};
- this.m_oPromptGenericContext={};
- this.m_oDrillGenericContext={};
- this.m_oFilterGenericContext={};
- this.m_oSelectionFilterContext={};
- this.m_oContextCollection={};
- this.m_oWidgetContextObject={};
- this.m_oPromptContextObject={};
- this.m_oDrillContextObject={};
- this.m_aSelectionFilterObjects=null;
- },getWidgetContextObject:function(){
- var _c29={};
- if(this.m_oWidgetContextContainer){
- _c29[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextContainer;
- if(this.m_widget){
- _c29.clientId=this.m_widget.getWidgetId();
- }
- }
- return _c29;
- },getFilterFirstItemName:function(){
- var _c2a=this.m_oFilterGenericContext;
- if(_c2a){
- var _c2b=(_c2a.values?_c2a.values:_c2a.ranges);
- for(_c2c in _c2b){
- return _c2c;
- }
- }
- for(var _c2c in _c2a){
- return _c2c;
- }
- return null;
- },getItemNames:function(_c2d){
- var _c2e=[];
- var _c2f=_c2d[this.PP_WIDGET_CONTEXT];
- if(_c2f){
- var _c30=(_c2f.values?_c2f.values:_c2f.ranges);
- for(var _c31 in _c30){
- _c2e.push(_c31);
- }
- return _c2e;
- }
- for(var _c31 in _c2f){
- _c2e.push(_c31);
- }
- return _c2e;
- },raisePromptEvent:function(_c32,_c33,_c34,_c35,_c36){
- var _c37=this._buildGeneralizedPromptPayload(_c32,_c33,_c34,_c35,_c36);
- if(_c37){
- this.m_widget.fireEvent(this.EVENT_NAME_PROMPT,null,_c37);
- this._updatePromptContext(_c37);
- this._updateWidgetContextContainer();
- }
- },_updatePromptContext:function(_c38){
- this._updatePromptGenericContext(_c38);
- this._updatePromptContextContainer(_c38);
- },_resetWorkingMembers:function(){
- this.m_oWidgetContextObject={};
- this.m_oPromptContextObject={};
- this.m_oDrillContextObject={};
- },updateFilterContext:function(_c39){
- this.m_oFilterGenericContext=_c39[this.PP_WIDGET_CONTEXT];
- this._updateWidgetContextContainer();
- },getSelectValueControlTypeFromPayload:function(_c3a){
- var _c3b=_c3a[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
- if(_c3b&&_c3b["selectValueControl"]){
- return _c3b["selectValueControl"]["controlType"];
- }
- return null;
- },getSelectValuePropertyFromPayload:function(_c3c,_c3d){
- var _c3e=_c3c[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
- if(_c3e&&_c3e["selectValueControl"]){
- return _c3e["selectValueControl"][_c3d];
- }
- return null;
- },_updateWidgetContextContainer:function(){
- this.m_oWidgetContextContainer={};
- var _c3f=null;
- if(this.m_oDrillGenericContext[this.PP_VALUES]){
- _c3f=dojo.mixin(_c3f,this.m_oDrillGenericContext[this.PP_VALUES]);
- }
- if(this.m_oPromptGenericContext[this.PP_VALUES]){
- _c3f=dojo.mixin(_c3f,this.m_oPromptGenericContext[this.PP_VALUES]);
- }
- if(this.m_oFilterGenericContext[this.PP_VALUES]){
- _c3f=dojo.mixin(_c3f,this.m_oFilterGenericContext[this.PP_VALUES]);
- }
- if(this.m_oSelectionFilterContext[this.PP_VALUES]){
- _c3f=dojo.mixin(_c3f,this.m_oSelectionFilterContext[this.PP_VALUES]);
- }
- if(_c3f){
- this.m_oWidgetContextContainer[this.PP_VALUES]=_c3f;
- }
- var _c40=null;
- if(this.m_oPromptGenericContext[this.PP_RANGES]){
- _c40=dojo.mixin(_c40,this.m_oPromptGenericContext[this.PP_RANGES]);
- }
- if(this.m_oFilterGenericContext[this.PP_RANGES]){
- _c40=dojo.mixin(_c40,this.m_oFilterGenericContext[this.PP_RANGES]);
- }
- if(_c40){
- this.m_oWidgetContextContainer[this.PP_RANGES]=_c40;
- }
- },_updatePromptGenericContext:function(_c41){
- if(_c41[this.PP_WIDGET_CONTEXT]){
- this.m_oPromptGenericContext=_c41[this.PP_WIDGET_CONTEXT];
- }
- },_updatePromptContextContainer:function(_c42){
- if(_c42[this.PP_REPORT_PROMPT_CONTEXT]&&_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]){
- this.m_oPromptContextContainer=_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT];
- }
- },_buildGeneralizedPromptPayload:function(_c43,_c44,_c45,_c46,_c47){
- var _c48=null;
- this._resetWorkingMembers();
- var _c49=this._buildContextsFromPrompt(_c43,_c44);
- if(_c49){
- _c48={};
- _c48[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextObject;
- var _c4a={};
- _c4a[_c46]=this.m_oPromptContextObject;
- _c48[this.PP_REPORT_PROMPT_CONTEXT]={"prompt":{"id":this.m_widget.iContext.widgetId,"action":_c45,"itemSpecification":_c4a}};
- _c48[this.PP_CASCADEPROMPT_CLEAR]=_c47;
- }
- return _c48;
- },_getReportParameterNodes:function(_c4b){
- var _c4c=XMLBuilderLoadXMLFromString(_c4b);
- if(!_c4c){
- return null;
- }
- var _c4d=_c4c.firstChild;
- if(!_c4d){
- return null;
- }
- var _c4e=XMLHelper_FindChildByTagName(_c4d,"reportParameters",true);
- if(!_c4e){
- return null;
- }
- var _c4f=XMLHelper_FindChildrenByTagName(_c4e,"reportParameter",false);
- if(!_c4f){
- return null;
- }
- return _c4f;
- },_getSelectChoicesXMLString:function(_c50,_c51){
- var _c52=null;
- var _c53="p_"+_c50;
- if(_c51.get(_c53)){
- _c52=_c51.get(_c53);
- }
- return _c52;
- },_getSelectChoicesNode:function(_c54){
- var _c55=null;
- if(_c54){
- var _c56=XMLBuilderLoadXMLFromString(_c54,true);
- if(_c56&&_c56.firstChild){
- _c55=_c56.firstChild;
- }
- }
- return _c55;
- },_buildContextsFromPrompt:function(_c57,_c58){
- var _c59=this._getReportParameterNodes(_c57);
- if(_c59===null){
- return false;
- }
- for(var i in _c59){
- var _c5b=_c59[i];
- var _c5c=_c5b.getAttribute("parameterName");
- var _c5d=this._getSelectChoicesXMLString(_c5c,_c58);
- var _c5e=this._getSelectChoicesNode(_c5d);
- if(_c5e){
- var _c5f,_c60,_c61;
- if(!this._isPromptRangeType(_c5d)){
- var _c62=this._buildReportContextValuesFromPromptSelectOption(_c5e);
- _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c62);
- _c60=this._buildValuesArrayFromReportContextValueArray(_c62);
- _c61=this.PP_VALUES;
- }else{
- _c60=this._buildMinMaxArrayFromRangePrompt(_c5e);
- _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c60);
- _c61=this.PP_RANGES;
- }
- this.m_oPromptContextObject[_c5c]=_c5f;
- if(!this.m_oWidgetContextObject[_c61]){
- this.m_oWidgetContextObject[_c61]={};
- }
- this.m_oWidgetContextObject[_c61][_c5c]=_c60;
- }
- }
- return true;
- },_createPromptDetailObject:function(_c63,_c64,_c65,_c66){
- var _c67={};
- _c67[this.PP_SELECT_CHOICES]=_c63;
- if(_c64!==null){
- _c67[this.PP_MODELITEM]=_c64;
- }
- if(_c65!==null){
- _c67[this.PP_MULTIVALUED]=true;
- }
- _c67[this.PP_VALUES]=_c66;
- return _c67;
- },_isPromptRangeType:function(_c68){
- var _c69=new RegExp(/^<selectChoices><select[\s\S]*Range/);
- return _c69.test(_c68);
- },_buildReportContextValuesFromPromptSelectOption:function(_c6a){
- var _c6b=[];
- if(_c6a){
- var _c6c=dojo.query("selectOption[displayValue]",_c6a);
- if(_c6c.length>0){
- for(var i=0;i<_c6c.length;i++){
- var _c6e=_c6c[i].getAttribute("displayValue");
- var _c6f=_c6c[i].getAttribute("useValue");
- var _c70={"caption":_c6e,"use":_c6f};
- _c6b.push(_c70);
- }
- }
- }
- return _c6b;
- },_buildValuesArrayFromReportContextValueArray:function(_c71){
- var _c72=[];
- if(_c71&&_c71.length>0){
- for(var i=0;i<_c71.length;i++){
- var _c74=_c71[i].caption;
- if(_c74){
- _c72.push(_c74);
- }
- }
- }
- return _c72;
- },_buildMinMaxArrayFromRangePrompt:function(_c75){
- var _c76=[];
- if(_c75&&_c75.childNodes&&_c75.childNodes.length>0){
- var _c77=_c75.childNodes.length;
- for(var i=0;i<_c77;i++){
- var _c79=this._buildMinMaxFromSelectAnyRange(_c75.childNodes[i]);
- if(_c79){
- _c76.push(_c79);
- }
- }
- }
- return _c76;
- },_buildMinMaxFromSelectAnyRange:function(_c7a){
- var _c7b=null;
- if(_c7a){
- var _c7c=dojo.query("[displayValue]",_c7a);
- if(_c7c.length>0){
- _c7b={};
- for(var i=0;i<_c7c.length;i++){
- var node=_c7c[i];
- var _c7f=(node.nodeName==="start")?"min":"max";
- _c7b[_c7f]=node.getAttribute("useValue");
- _c7b[_c7f+"Display"]=node.getAttribute("displayValue");
- }
- }
- }
- return _c7b;
- },handleIncomingPromptEvent:function(evt){
- if(!evt||!evt.payload){
- return;
- }
- var _c81=this._convertToLegacyPromptPayload(evt.payload);
- if(_c81){
- var _c82={"payload":_c81};
- this.m_widget.onPromptLegacyPayload(_c82);
- }
- },_convertToLegacyPromptPayload:function(_c83){
- var _c84=null;
- var _c85=_c83[this.PP_REPORT_PROMPT_CONTEXT];
- if(_c85&&_c85.prompt){
- _c85=_c85.prompt;
- _c84={};
- _c84.cv_id=_c85.id;
- _c84.parameters=this._genLegacyPromptParameterArrayFromItemSpec(_c85.itemSpecification);
- _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR];
- }else{
- if(_c83[this.PP_WIDGET_CONTEXT]&&_c83[this.PP_WIDGET_CONTEXT].values){
- _c84={};
- _c84.parameters=[];
- var _c86=_c83[this.PP_WIDGET_CONTEXT].values;
- for(var _c87 in _c86){
- var _c88=_c86[_c87];
- if(_c88&&_c88.length>0){
- if(_c88.length==1&&_c88[0].indexOf("<selectChoices>")===0){
- _c84.parameters.push({"parmName":_c87,"parmValue":_c88[0]});
- }else{
- var _c89="<selectChoices>";
- for(var i=0;i<_c88.length;i++){
- _c89+="<selectOption useValue=\""+_c88[i]+"\" displayValue=\""+_c88[i]+"\"/>";
- }
- _c89+="</selectChoices>";
- _c84.parameters.push({"parmName":_c87,"parmValue":_c89});
- }
- }
- }
- _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR];
- }
- }
- return _c84;
- },_genLegacyPromptParameterArrayFromItemSpec:function(_c8b){
- if(!_c8b){
- return null;
- }
- var _c8c=this._getFirstPropertyOfObject(_c8b);
- var _c8d=[];
- for(var _c8e in _c8c){
- var _c8f=_c8c[_c8e];
- var _c90={parmName:_c8e,parmValue:_c8f[this.PP_SELECT_CHOICES],modelItem:_c8f[this.PP_MODELITEM]};
- if(_c8f[this.PP_MULTIVALUES]!==null){
- _c90.multivalued=true;
- }
- _c8d.push(_c90);
- }
- return _c8d;
- },_isRangeTypeValues:function(_c91){
- if(_c91){
- if(_c91.min||_c91.max){
- return true;
- }
- }
- return false;
- },_getFirstPropertyOfObject:function(_c92){
- var _c93=null;
- for(var _c94 in _c92){
- _c93=_c92[_c94];
- break;
- }
- return _c93;
- },_getFirstPropertyNameOfObject:function(_c95){
- var _c96=null;
- for(var _c97 in _c95){
- _c96=_c97;
- break;
- }
- return _c96;
- },extractWidgetContextObject:function(_c98){
- if(_c98){
- var _c99=_c98[this.PP_WIDGET_CONTEXT];
- if(_c99){
- var obj={};
- obj[this.PP_WIDGET_CONTEXT]=_c99;
- return obj;
- }
- }
- return null;
- },genMergedWidgetContextObject:function(){
- var _c9b=null;
- var _c9c=null;
- for(var key in this.m_oContextCollection){
- var _c9e=this.m_oContextCollection[key];
- if(_c9e){
- var _c9f=_c9e[this.PP_WIDGET_CONTEXT];
- if(_c9f){
- if(_c9f[this.PP_VALUES]){
- _c9b=dojo.mixin(_c9b,_c9f[this.PP_VALUES]);
- }
- if(_c9f[this.PP_RANGES]){
- _c9c=dojo.mixin(_c9c,this._convertRangeArrayToObjectForActiveReport(_c9f[this.PP_RANGES]));
- }
- }
- }
- }
- if(_c9b||_c9c){
- var obj={};
- obj[this.PP_WIDGET_CONTEXT]={};
- if(_c9b){
- obj[this.PP_WIDGET_CONTEXT][this.PP_VALUES]=_c9b;
- }
- if(_c9c){
- obj[this.PP_WIDGET_CONTEXT][this.PP_RANGES]=_c9c;
- }
- return obj;
- }
- return null;
- },raiseDrillEvent:function(_ca1,_ca2,_ca3){
- var _ca4=this._buildGeneralizedDrillPayload(_ca1,_ca2,_ca3);
- if(_ca4){
- this.m_widget.fireEvent(this.EVENT_NAME_DRILL,null,_ca4);
- this._updateDrillContext(_ca4);
- this._updateWidgetContextContainer();
- }
- },_updateDrillContext:function(_ca5){
- this._updateDrillGenericContext(_ca5);
- this._updateDrillContextContainer(_ca5);
- },_updateDrillGenericContext:function(_ca6){
- if(_ca6[this.PP_WIDGET_CONTEXT]){
- this.m_oDrillGenericContext=_ca6[this.PP_WIDGET_CONTEXT];
- }
- },_updateDrillContextContainer:function(_ca7){
- if(_ca7[this.PP_REPORT_DRILL_CONTEXT]&&_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]){
- this.m_oDrillContextContainer=_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL];
- }
- },_buildGeneralizedDrillPayload:function(_ca8,_ca9,_caa){
- if(!_ca8||!_ca9){
- return null;
- }
- var _cab={};
- var _cac={};
- for(var i in _ca8){
- var _cae=_ca8[i];
- var mun=(_cae.mun)?_cae.mun:"";
- var lun=(_cae.lun)?_cae.lun:"";
- var hun=(_cae.hun)?_cae.hun:"";
- var _cb2={};
- _cb2[this.PP_VALUES]=[{"caption":_cae.displayValue,"mun":mun,"lun":lun,"hun":hun}];
- if(_cae.summary){
- _cb2["summary"]=_cae.summary;
- }
- _cab[_cae.dataItem]=_cb2;
- _cac[_cae.dataItem]=[_cae.displayValue];
- }
- var _cb3={};
- _cb3[this.PP_VALUES]=_cac;
- var _cb4={};
- _cb4[_caa]=_cab;
- var _cb5={};
- _cb5[_ca9]={"id":this.m_widget.iContext.widgetId,"action":_ca9,"itemSpecification":_cb4};
- var _cb6={};
- _cb6[this.PP_WIDGET_CONTEXT]=_cb3;
- _cb6[this.PP_REPORT_DRILL_CONTEXT]=_cb5;
- return _cb6;
- },genDrillSpecObjects:function(_cb7){
- if(!_cb7||!_cb7[this.PP_REPORT_DRILL_CONTEXT]){
- return null;
- }
- var _cb8=[];
- var _cb9=_cb7[this.PP_REPORT_DRILL_CONTEXT];
- var _cba=this._getFirstPropertyOfObject(_cb9);
- var _cbb=this._getFirstPropertyOfObject(_cba.itemSpecification);
- for(var _cbc in _cbb){
- var _cbd=_cbb[_cbc];
- var _cbe=_cbd[this.PP_VALUES];
- if(_cbe&&_cbe.length>0){
- var _cbf=_cbe[0];
- var _cc0={"dataItem":_cbc,"displayValue":_cbf.caption,"mun":_cbf.mun,"lun":_cbf.lun,"hun":_cbf.hun};
- if(_cbf.summary){
- _cc0["summary"]=_cbf.summary;
- }
- _cb8.push(_cc0);
- }
- }
- return (_cb8.length>0)?_cb8:null;
- },getDrillActionType:function(_cc1){
- if(!_cc1||!_cc1[this.PP_REPORT_DRILL_CONTEXT]){
- return null;
- }
- return this._getFirstPropertyNameOfObject(_cc1[this.PP_REPORT_DRILL_CONTEXT]);
- },_convertRangeArrayToObjectForActiveReport:function(_cc2){
- if(_cc2){
- var _cc3={};
- for(var name in _cc2){
- var _cc5=_cc2[name];
- if(_cc5&&_cc5.length>0){
- _cc3[name]=_cc5[0];
- }else{
- _cc3[name]=_cc5;
- }
- }
- return _cc3;
- }
- return _cc2;
- },getItemsInItemSpecification:function(_cc6){
- var _cc7=_cc6[this.PP_BUX_SELECTVALUECONTROL_CONTEXT];
- if(_cc7&&_cc7["selectValueControl"]&&_cc7["selectValueControl"]["itemSpecification"]){
- return this._getFirstPropertyOfObject(_cc7["selectValueControl"]["itemSpecification"]);
- }
- return null;
- },genRemoveDiscreteFilterPayload:function(_cc8){
- var _cc9={"clientId":_cc8,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selectValueControl":{"selectValueControl":{"id":_cc8,"controlType":"selectValueFilter","type":"discrete","valueType":"string"}}};
- return _cc9;
- },genEmptySelectionPayload:function(oCV,_ccb){
- var obj={"clientId":_ccb,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selection":{"selection":{"id":_ccb,"valueType":"string"}}};
- this.m_oSelectionFilterContext={};
- this._updateWidgetContextContainer();
- this.setSelectionFilterObjects(null);
- return obj;
- },genSelectionPayload:function(oCV,_cce,_ccf){
- var _cd0={};
- var _cd1={"id":_cce,"valueType":"string"};
- var obj={"clientId":_cce,"com.ibm.widget.context":_cd0,"com.ibm.widget.context.bux.selection":{"selection":_cd1}};
- var _cd3=false;
- var _cd4=[];
- var oSC=oCV.getSelectionController();
- var _cd6=oSC.getAllSelectedObjects();
- if(_cd6&&_cd6.length>0){
- var _cd7={};
- var _cd8=null;
- var _cd9={};
- var _cda={};
- for(var i=0;i<_cd6.length;i++){
- if(_cd6[i].populateSelectionPayload(_cd9,_cda,_ccf)){
- _cd3=true;
- _cd8=_cd6[i].getCtxAttributeString();
- if(typeof _cd7[_cd8]=="undefined"){
- _cd7[_cd8]=true;
- _cd4.push(_cd6[i].marshal(oSC,oCV.getId()));
- }
- }
- }
- if(_cd3){
- _cd0.values=_cd9;
- var _cdc={};
- var _cdd=oCV.getModelPath();
- var _cde=(_cdd)?_cdd:".";
- _cdc[_cde]=_cda;
- _cd1.itemSpecification=_cdc;
- }
- }
- this.m_oSelectionFilterContext=obj[this.PP_WIDGET_CONTEXT];
- this._updateWidgetContextContainer();
- this.setSelectionFilterObjects(_cd4.length>0?_cd4:null);
- return obj;
- },isSelectionPayloadForReset:function(obj){
- if(obj&&obj[this.PP_WIDGET_CONTEXT]){
- return this.isEmptyObject(obj[this.PP_WIDGET_CONTEXT]);
- }
- return true;
- },setSelectionFilterObjects:function(_ce0){
- this.m_aSelectionFilterObjects=_ce0;
- },getSelectionFilterObjects:function(){
- return this.m_aSelectionFilterObjects;
- },toStringSelectionFilterObjects:function(){
- var str="";
- for(var idx in this.m_aSelectionFilterObjects){
- if(str.length>0){
- str+=",";
- }
- str+=JSON.stringify(this.m_aSelectionFilterObjects[idx]);
- }
- return "["+str+"]";
- },convertSelectionToSelectValueControlPayload:function(_ce3){
- if(_ce3["com.ibm.widget.context.bux.selection"]){
- var _ce4=_ce3["com.ibm.widget.context.bux.selection"]["selection"];
- _ce4.controlType="selectValueFilter";
- _ce4.type="discrete";
- _ce3["com.ibm.widget.context.bux.selectValueControl"]={"selectValueControl":_ce4};
- delete _ce3["com.ibm.widget.context.bux.selection"];
- }
- return _ce3;
- },convertGenericToSelectValueControlPayload:function(_ce5){
- if(this._hasItemSpecification(_ce5)){
- return;
- }
- if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
- var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
- for(dataItem in _ce6){
- if(_ce6[dataItem].length==0){
- delete _ce6[dataItem];
- }
- }
- var _ce7=true;
- for(dataItem in _ce6){
- _ce7=false;
- break;
- }
- if(_ce7){
- delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
- }
- }
- if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]){
- var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
- var _ce7=true;
- for(dataItem in _ce6){
- _ce7=false;
- break;
- }
- if(_ce7){
- delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
- }
- }
- var _ce6=null;
- if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
- key=this.PP_VALUES;
- _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
- }else{
- key=this.PP_RANGES;
- _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES];
- }
- var cv=this.m_widget.getViewerObject();
- var _ce9=null;
- if(cv){
- var sc=cv.getSelectionController();
- _ce9=sc.getCCDManager();
- }
- for(dataItem in _ce6){
- var _ceb=true;
- var _cec={};
- for(var _ced in _ce6){
- var _cee=[];
- for(var i=0;i<_ce6[_ced].length;i++){
- var _cf0=_ce6[_ced][i];
- var _cf1={"caption":_cf0};
- if(_ceb){
- var mun=_ce9?_ce9.getMUNForRDIAndUseValue(_ced,_cf0):null;
- if(mun!=null){
- _cf1.mun=mun;
- }else{
- _ceb=false;
- for(var i=0;i<_cee.length;i++){
- delete _cee[i].mun;
- }
- }
- }
- _cee.push(_cf1);
- }
- _cec[_ced]={"values":_cee};
- }
- var _cf3={};
- var _cf4=cv?cv.getModelPath():null;
- var _cf5=(_cf4)?_cf4:"unknown";
- _cf3[_cf5]=_cec;
- _ce5[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]={"selectValueControl":{"valueType":"string","type":"discrete","controlType":"selectValueFilter","id":_ce5.clientId?_ce5.clientId:"","itemSpecification":_cf3}};
- }
- },getMUNOfItemValueInItemSpecification:function(_cf6,_cf7){
- var _cf8=this.getItemsInItemSpecification(_cf6);
- if(_cf8&&_cf8[_cf7]){
- var _cf9=_cf8[_cf7];
- if(_cf9.values&&_cf9.values.length>0){
- return _cf9.values[0].mun;
- }
- }
- return null;
- },_hasItemSpecification:function(_cfa){
- if(_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["itemSpecification"]){
- return true;
- }
- if(_cfa[this.PP_BUX_SELECTION_CONTEXT]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]["itemSpecification"]){
- return true;
- }
- return false;
- },getSourceUniqueId:function(_cfb,_cfc){
- var id=null;
- var _cfe=null;
- if(_cfb["clientId"]){
- id=_cfb["clientId"];
- }
- if(_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]){
- _cfe="selectValueControl";
- if(!id&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]){
- id=_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"];
- }
- }else{
- if(_cfb[this.PP_BUX_SELECTION_CONTEXT]){
- _cfe="selection";
- if(!id&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]){
- id=_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"];
- }
- }else{
- if(_cfb[this.PP_REPORT_PROMPT_CONTEXT]){
- _cfe="prompt";
- if(!id&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]){
- id=_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"];
- }
- }else{
- if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){
- _cfe="drill";
- if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]){
- id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"];
- }
- }else{
- if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){
- _cfe="drill";
- if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]){
- id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"];
- }
- }
- }
- }
- }
- }
- if(!id){
- id="unknown";
- }
- if(!_cfe){
- _cfe="unknown";
- }
- if(typeof _cfc=="string"){
- _cfe=_cfc;
- }
- return id+"_"+_cfe;
- },isWidgetContextEmpty:function(_cff){
- return (this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT])||(this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_VALUES])&&this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_RANGES])));
- },isEmptyObject:function(obj){
- var _d01=true;
- if(obj){
- for(var _d02 in obj){
- _d01=false;
- break;
- }
- }
- return _d01;
- },updateContextCollection:function(_d03){
- if(!this.isEmptyObject(_d03)){
- var _d04=this.getSourceUniqueId(_d03);
- if(this.isWidgetContextEmpty(_d03)){
- if(this.m_oContextCollection[_d04]){
- this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d04]);
- }else{
- var _d05=this.getSourceUniqueId(_d03,"unknown");
- if(this.m_oContextCollection[_d05]){
- this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d05]);
- }
- }
- }else{
- if(_d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
- for(var name in _d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
- for(var key in this.m_oContextCollection){
- var _d08=this.m_oContextCollection[key];
- if(_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES]&&_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]){
- delete _d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name];
- }
- }
- }
- }
- this.m_oContextCollection[_d04]=dojo.clone(_d03);
- }
- return this.m_oContextCollection;
- }
- },setEmptyArrayToWidgetContextValues:function(_d09){
- if(_d09&&_d09[this.PP_WIDGET_CONTEXT]&&_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){
- var _d0a=_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES];
- for(var name in _d0a){
- _d0a[name]=[];
- }
- }
- }});
- dojo.provide("viewer.AnnotationHelper");
- dojo.declare("viewer.AnnotationHelper",null,{m_loadAnnotationsDfd:null,m_bCallGetAnnotations:true,m_bAnnotationsEnabled:null,constructor:function(_d0c){
- this.m_viewerIWidget=_d0c;
- this.m_bCallGetAnnotations=true;
- this.m_bAnnotationsEnabled=null;
- },getAnnotationStore:function(){
- return this.m_viewerIWidget.getAnnotationStore();
- },setCallGetAnnotations:function(flag){
- this.m_bCallGetAnnotations=flag;
- },isEnabled:function(){
- if(this.m_bAnnotationsEnabled===null){
- this.m_bAnnotationsEnabled=this.m_viewerIWidget.getViewerObject().bBuxAnnotationsAvailable;
- }
- return this.m_bAnnotationsEnabled;
- },refreshAnnotationData:function(){
- if(this.m_loadAnnotationsDfd){
- return null;
- }
- this.m_loadAnnotationsDfd=new dojo.Deferred();
- this.fetchAnnotationData();
- return this.m_loadAnnotationsDfd;
- },fetchAnnotationData:function(){
- var _d0e=this.m_viewerIWidget;
- if(!this.m_bCallGetAnnotations||!this.isEnabled()){
- return;
- }
- dojo.when(_d0e.getWidgetStoreID(),dojo.hitch(this,function(_d0f){
- if(!_d0f){
- return;
- }
- this.m_viewerIWidget.getLoadManager().runWhenHasViewer(dojo.hitch(this,this._fetchAnnotationData,_d0f));
- }));
- },_fetchAnnotationData:function(_d10){
- var _d11=this.m_viewerIWidget.getViewerObject();
- var _d12=_d11.getSelectionController();
- var _d13=_d12.getCCDManager().m_md;
- if(!_d13){
- _d13={};
- }
- _d13=dojo.toJson(_d13);
- var _d14=_d12.getCCDManager().m_cd;
- if(!_d14){
- _d14={};
- }
- _d14=dojo.toJson(_d14);
- var _d15={"complete":{},"fault":{}};
- _d15.complete["object"]=this;
- _d15.complete["method"]=this.fetchAnnotationDataResponse;
- _d15.fault["object"]=this;
- _d15.fault["method"]=this.fetchAnnotationDataResponseFault;
- var _d16=new AsynchJSONDispatcherEntry(_d11);
- _d16.setCallbacks(_d15);
- _d16.addFormField("widgetStoreID",_d10);
- _d16.addFormField("ui.action","getAnnotations");
- _d16.addFormField("cv.metatdata",_d13);
- _d16.addFormField("cv.context",_d14);
- _d16.sendRequest();
- },fetchAnnotationDataResponseFault:function(_d17){
- this.m_bCallGetAnnotations=false;
- var _d18=new FaultDialog(this.m_viewerIWidget.getViewerObject());
- var _d19=_d17.getSoapFault();
- var _d1a=null;
- var _d1b=XMLHelper_FindChildByTagName(_d19,"exception",true);
- if(_d1b){
- var _d1c=XMLHelper_FindChildByTagName(_d1b,"errorCode",false);
- if(_d1c){
- _d1a=XMLHelper_GetText(_d1c);
- }
- }
- if(_d1a==="0"){
- var _d1d=null;
- var _d1e=XMLHelper_FindChildByTagName(_d1b,"message",false);
- if(_d1e){
- var _d1f=XMLHelper_FindChildByTagName(_d1e,"messageString",true);
- if(_d1f){
- _d1d=XMLHelper_GetText(_d1f,false);
- }
- }
- if(_d1d){
- var _d20=/ANS-GEN-(\d{2,4})/;
- var _d21=_d20.exec(_d1d);
- if(_d21&&_d21.length&&_d21.length>1){
- var _d22=_d21[1];
- if(_d22==="0075"){
- _d18.setErrorMessage(RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR);
- }
- }
- }
- }
- this._cleanupPreviousAnnotations();
- this.getAnnotationStore().clear();
- _d18.show(_d19);
- if(this.m_loadAnnotationsDfd){
- this.m_loadAnnotationsDfd.errback();
- this.m_loadAnnotationsDfd=null;
- }
- },fetchAnnotationDataResponse:function(_d23){
- var _d24=window["CVEditContentActionInstance"];
- var _d25=_d23.getResult();
- this.m_bCallGetAnnotations=this.m_bCallGetAnnotations&&_d25!==null;
- if(_d25===null){
- _d25=[];
- }
- var _d26=this.m_viewerIWidget.getViewerObject();
- _d26.envParams["cv.annotationData"]=_d25;
- this._cleanupPreviousAnnotations();
- if(_d25.length>0){
- if(this.getAnnotationStore()){
- var _d27=this._generateMatchedAnnotationsFromViewerObject();
- this.getAnnotationStore().load(_d27);
- this.displayCommentIndicators();
- }
- }
- if(this.m_loadAnnotationsDfd){
- this.m_loadAnnotationsDfd.callback();
- this.m_loadAnnotationsDfd=null;
- }
- },_cleanupPreviousAnnotations:function(){
- var _d28=this.getAnnotationStore();
- if(_d28){
- var _d29=_d28.getAll();
- for(var _d2a in _d29){
- var _d2b=this.m_viewerIWidget.getWidgetId()+"_"+_d2a+"_comment";
- var _d2c=dijit.byId(_d2b);
- if(typeof _d2c!="undefined"&&_d2c!=null){
- _d2c.destroy();
- delete _d2c;
- }
- _d28.clear(_d2a);
- }
- }
- },_generateMatchedAnnotationsFromViewerObject:function(){
- var _d2d=this.m_viewerIWidget.getViewerObject();
- var _d2e=[];
- if(_d2d&&_d2d.envParams&&_d2d.envParams["cv.annotationData"]){
- _d2e=eval(_d2d.envParams["cv.annotationData"]);
- }
- var _d2f=this._generateAnnotationListWithoutORoperator(_d2e);
- return this._updateAnnotationCtxWithMatchedCellCtx(_d2f,_d2d);
- },_generateAnnotationListWithoutORoperator:function(_d30){
- var _d31=[];
- for(var i=0,len=_d30.length;i<len;i++){
- var anno=_d30[i];
- if(anno.ctx){
- var _d35=bux.AnnotationHelper.generateCTXList(anno.ctx);
- for(var j=0,jLen=_d35.length;j<jLen;j++){
- var _d38={ann:anno.ann,lmt:anno.lmt,lmtf:anno.lmtf,ctx:anno.ctx,desc:anno.desc,fd:anno.fd,layoutElementId:anno.layoutElementId,owner:anno.owner,ownerSearchPath:anno.ownerSearchPath,pv:anno.pv,rdi:anno.rdi,sd:anno.sd,version:anno.version||1};
- _d38.ctx=_d35[j];
- _d31.splice(0,0,_d38);
- }
- }else{
- _d31.splice(0,0,anno);
- }
- }
- return _d31;
- },_updateAnnotationCtxWithMatchedCellCtx:function(_d39,_d3a){
- var _d3b=[];
- var _d3c=new AnnotationCTXLookup(this.m_viewerIWidget.getViewerObject().getSelectionController().getCCDManager());
- _d3c.populateCtxDetailsForAllAnnotations(_d39);
- var _d3d=[];
- for(var i=0,len=_d39.length;i<len;i++){
- var anno=_d39[i];
- if(anno.ctx){
- if(_d3d.length===0){
- _d3d=dojo.query("[ctx]",this.m_viewerIWidget.iContext.getRootElement());
- }
- for(var j=0,jLen=_d3d.length;j<jLen;j++){
- var _d43=_d3d[j].getAttribute("ctx");
- if(_d3c.isAnnotatedCell(anno,_d43)){
- anno.ctx=_d43;
- _d3b.splice(0,0,anno);
- break;
- }
- }
- }else{
- _d3b.splice(0,0,anno);
- }
- }
- return _d3b;
- },displayCommentIndicators:function(){
- var _d44=this.getAnnotationStore();
- var _d45=_d44.getAll();
- for(var cell in _d45){
- var _d47=new bux.AnnotationIndicator({annotationStore:_d44,context:cell,iWidgetContainer:this.m_viewerIWidget,dir:this.m_viewerIWidget.getViewerObject().getDirection()});
- _d47.addExistingCommentToCell();
- }
- },repositionCommentIndicators:function(){
- var _d48=this.getAnnotationStore();
- var _d49=_d48.getAll();
- for(var id in _d49){
- var _d4b=_d49[id];
- var ctx=_d4b[0].getContext();
- var _d4d=_d48.getIndicatorWidgetId(ctx);
- if(_d4d!==null){
- var _d4e=dijit.byId(_d4d);
- _d4e.addToPage();
- }
- }
- },promptForSave:function(_d4f){
- dojo["require"]("bux.dialogs.InformationDialog");
- var _d50=new bux.dialogs.InformationDialog({title:RV_RES.IDS_JS_COMMENT_DLG_TITLE,sMainMessage:RV_RES.IDS_JS_COMMENT_DLG_MESSAGE,sDescription:RV_RES.IDS_JS_COMMENT_DLG_DETAILS,sInfoIconClass:"bux-informationDialog-warning-icon",buttons:["YES","NO"],yesOKHandler:_d4f});
- _d50.startup();
- _d50.show();
- },addComment:function(_d51,_d52){
- if(this.m_viewerIWidget.isSaveNecessary()){
- this.promptForSave(dojo.hitch(this,this.onCommentSaveAcknowledge,_d51,_d52));
- }else{
- this.addNewComment(_d51,_d52);
- }
- },editComment:function(_d53){
- var _d54=bux.getComment(this.m_viewerIWidget.iContext,this.getAnnotationStore().getEffectiveIds(_d53));
- if(_d54&&_d54.edit){
- _d54.edit();
- }
- },deleteComment:function(_d55){
- this.getAnnotationStore().deleteOneComment(_d55);
- },addNewComment:function(_d56,_d57){
- this.addAsNewComment(_d56,(_d57==null)?"":(_d57+" - "));
- },addAsNewComment:function(_d58,text){
- var _d5a=null;
- var _d5b=(_d58===null)?this.getAnnotationStore().WIDGET_CONTEXT:_d58;
- var _d5c=this.getAnnotationStore().getIndicatorWidgetId(_d5b);
- if(_d5c!=null){
- _d5a=dijit.byId(_d5c);
- }
- if(_d5a==null){
- dojo["require"]("bux.AnnotationIndicator");
- _d5a=new bux.AnnotationIndicator({annotationStore:this.getAnnotationStore(),context:_d5b,iWidgetContainer:this.m_viewerIWidget,dir:this.m_viewerIWidget.getViewerObject().getDirection()});
- window.setTimeout(function(){
- _d5a.addNewCommentToCell(text);
- },0);
- }else{
- window.setTimeout(function(){
- _d5a.comment.editNewComment(_d5b,text);
- },0);
- }
- },onCommentSaveAcknowledge:function(_d5d,_d5e){
- this.m_viewerIWidget._pendingContextId=_d5d;
- this.m_viewerIWidget._pendingCellValue=_d5e;
- this.m_viewerIWidget.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.save"});
- },addWidgetComment:function(){
- if(this.m_viewerIWidget.isSaveNecessary()){
- this.promptForSave(dojo.hitch(this,this.onCommentSaveAcknowledge,null,this.m_viewerIWidget.getDisplayName()));
- }else{
- this.addNewComment(null,this.m_viewerIWidget.getDisplayName());
- }
- },editWidgetComment:function(){
- var _d5f=bux.getComment(this.m_viewerIWidget.iContext,[this.getAnnotationStore().WIDGET_CONTEXT]);
- if(_d5f&&_d5f.edit){
- _d5f.edit();
- }
- },deleteWidgetComment:function(){
- this.deleteComment(this.getAnnotationStore().WIDGET_CONTEXT);
- },commitComment:function(_d60){
- if(_d60.getContext()!==this.getAnnotationStore().WIDGET_CONTEXT){
- return this.commitCellComment(_d60);
- }else{
- return this.commitWidgetComment(_d60,this.getAnnotationStore());
- }
- },commitCellComment:function(_d61){
- var _d62=new dojo.Deferred();
- var _d63=this.m_viewerIWidget.getViewerObject();
- var _d64={customArguments:[_d61,_d62],"complete":{"object":this,"method":this.handleCellCommentSaveResponse},"fault":{"object":this,"method":this.handleCellCommentSaveErrorResponse},"error":{"object":this,"method":this.handleCellCommentSaveServerErrorResponse}};
- var _d65=new AsynchJSONDispatcherEntry(_d63);
- _d65.setCallbacks(_d64);
- this.preparePostForCommitCellComment(_d65,_d61).then(function(){
- _d63.dispatchRequest(_d65);
- });
- return _d62;
- },preparePostForCommitCellComment:function(_d66,_d67){
- var dfd=new dojo.Deferred();
- dojo.when(this.m_viewerIWidget.getWidgetStoreID(),dojo.hitch(this,function(_d69){
- var _d6a=this.m_viewerIWidget.getViewerObject();
- var _d6b=_d6a.getSelectionController();
- _d66.addFormField("widgetStoreID",_d69);
- _d66.addFormField("ui.action","commentSave");
- _d66.addFormField("cv.metatdata",dojo.toJson(_d6b.getCCDManager().m_md));
- _d66.addFormField("cv.context",dojo.toJson(_d6b.getCCDManager().m_cd));
- _d66.addFormField("cv.commentId",_d67.getContext());
- _d66.addFormField("cv.commentDesc",xml_encode(_d67.getDescription()));
- var lid=_d6b.getAllSelectedObjects()[0].getLayoutElementId();
- if(lid){
- lid=lid.replace(this.m_viewerIWidget.getViewerId(),"");
- _d67.setParentId(lid);
- _d66.addFormField("cv.commentLayoutId",_d67.getParentId());
- var _d6d=new AnnotationInfoBar(_d6a,lid);
- var _d6e=_d6d.createFilterContext();
- if(_d6e!=null){
- _d67.setFilterContext(_d6e);
- if(_d6e.getPromptsJSON()){
- _d66.addFormField("cv.filterContext_prompts",dojo.toJson(_d6e.getPromptsJSON()));
- }
- if(_d6e.getFilterJSON()){
- _d66.addFormField("cv.filterContext_filter",dojo.toJson(_d6e.getFilterJSON()));
- }
- if(_d6e.getSlidersJSON()){
- _d66.addFormField("cv.filterContext_sliders",dojo.toJson(_d6e.getSlidersJSON()));
- }
- }
- }
- dfd.callback();
- }));
- return dfd;
- },commitWidgetComment:function(_d6f){
- dojo["require"]("bux.Services");
- var _d70=bux.Services.getGateway()+"/annotationService/creation";
- var _d71={};
- _d71["annotationName"]=_d6f.getName();
- if(_d71["annotationName"]==null){
- _d71["annotationName"]="";
- }
- _d71["annotationDescription"]=_d6f.getDescription();
- var dfd=new dojo.Deferred();
- dojo.when(this.m_viewerIWidget.getWidgetStoreID(),dojo.hitch(this,function(_d73){
- _d71["annotationParentID"]=_d73;
- bux.xhrPost({url:_d70,sync:true,content:_d71}).then(dojo.hitch(this,function(_d74){
- this.handleCommentSaveDone(_d74,_d6f,this.getAnnotationStore(),this.m_viewerIWidget);
- _d6f.loadDetails();
- dfd.callback();
- }));
- }));
- return dfd;
- },handleCellCommentSaveResponse:function(_d75,_d76,_d77){
- var _d78=_d75.getJSONResponseObject();
- if(_d78){
- var _d79=_d78.json;
- if(_d79){
- var _d7a=this.handleCommentSaveDone(_d79,_d76,this.getAnnotationStore(),this.m_viewerIWidget);
- if(typeof _d7a!="Error"){
- _d76.loadDetails();
- }
- }
- }
- _d77.callback(_d75);
- },handleCellCommentSaveErrorResponse:function(_d7b,_d7c,_d7d){
- _d7d.errback(new Error(_d7b.getSoapFaultDetailMessageString()));
- },handleCellCommentSaveServerErrorResponse:function(_d7e,_d7f,_d80){
- var _d81=new Error(_d7e.xmlHttp.statusText);
- _d81.xhr=_d7e.xmlHttp;
- _d80.errback(_d81);
- },handleCommentSaveDone:function(_d82,_d83,_d84,_d85){
- var _d86=XMLBuilderLoadXMLFromString(_d82);
- if(_d86){
- var _d87=_d86.firstChild;
- var _d88=XMLHelper_FindChildByTagName(_d87,"annotation",false);
- if(_d88){
- var _d89=XMLHelper_FindChildByTagName(_d88,"id",false);
- if(_d89){
- var _d8a=XMLHelper_GetText(_d89);
- _d83.setServiceId(_d8a);
- _d83.setIWidgetContainer(_d85);
- _d84.setWidgetContainer(_d85);
- this.setCallGetAnnotations(true);
- return _d82;
- }
- }
- }
- return new Error(_d82.toString());
- }});
- dojo.provide("bux.reportViewer");
- dojo.require("dojo.buxViewer");
- dojo.require("bux.AnnotationHelper");
- dojo.require("bux.AnnotationIndicator");
- dojo.require("viewer.AnnotationHelper");
- dojo.require("bux.data.AnnotationStore");
- dojo.require("bux.iwidget.common.MultilingualWidgetBase");
- dojo.require("InfoBarBase");
- dojo.require("WidgetContextManager");
- var globalViewerIdentifier=1;
- dojo.declare("bux.reportViewer",bux.iwidget.common.MultilingualWidgetBase,{annotationStore:null,annotationHelper:null,savedOutput:null,undoRedoQueue:null,dojoConnections:null,properties:null,promptParametersRetrieved:false,viewerId:null,xNodeId:null,namespacePrefix:"x",timer:null,timerInterval:20,GODASHBOARD_REPORT_VERSION:"1.0.0.0",BUX_REPORT_VERSION:"4.0.0.0.0",BUX_REPORT_CASPIAN_RP1_VERSION:"3.0.0.0.0",RAP_REPORT_INFO_VERSION:"1.0.0.0",viewerWidgetLastAction:null,sliderState:null,sViewerIWidgetId:null,bToolbarInitialized:false,m_oWidgetContextManager:null,m_oInfoBarRenderedState:{},m_bRunReportOption:null,m_oLoadManager:null,m_visible:null,m_debugDelayedViewerLoadingMode:0,m_delayedLoadingContext:null,m_doGetParametersOnLoad:null,widgetSize:null,copyPasteResource:null,_pastedWidget:false,ciPublishedReportPath:null,touchStartX:-1,touchPaging:false,_BUXDBInfoArray:null,m_bSelectionFilterSwitch:false,savedToolbarButtons:null,constructor:function(){
- this.onUnloadInProgress=false;
- this.annotationHelper=new viewer.AnnotationHelper(this);
- this.savedOutput=new CIWidgetSavedOutput(this);
- this.undoRedoQueue=new UndoRedoQueue(this);
- this.viewerIdentifier=(globalViewerIdentifier++).toString();
- this.m_oCV=null;
- this.m_oLoadManager=new ViewerLoadManager(this);
- this.m_doGetParametersOnLoad=false;
- this._isMobile=false;
- this.m_bSelectionFilterSwitch=false;
- this.m_oWidgetContextManager=new WidgetContextManager(this);
- this.addWindowEventListeners();
- this.m_bReportDropped=false;
- this.sliderState={};
- this.savedToolbarButtons={};
- },getWidgetId:function(){
- return this.sViewerIWidgetId;
- },getAnnotationHelper:function(){
- return this.annotationHelper;
- },getUndoRedoQueue:function(){
- return this.undoRedoQueue;
- },getDisplayName:function(){
- var _d8b=this.iContext.getItemSet("buxrtstate",false);
- if(_d8b){
- var _d8c=_d8b.getItemValue("displayTitle");
- return _d8c?_d8c:"";
- }
- return "";
- },getSavedOutput:function(){
- return this.savedOutput;
- },getAttributeValue:function(name){
- return this.iContext.getiWidgetAttributes().getItemValue(name);
- },setAttributeValue:function(name,_d8f){
- this.iContext.getiWidgetAttributes().setItemValue(name,_d8f);
- },removeAttributeValue:function(name){
- this.iContext.getiWidgetAttributes().removeItem(name);
- },getViewerObject:function(){
- if(!this.m_oCV){
- try{
- this.m_oCV=window["oCV"+this.getViewerId()];
- }
- catch(ex){
- return null;
- }
- if(!this.m_oCV){
- var _d91=this.getWidgetId();
- for(var _d92=0;_d92<window.gaRV_INSTANCES.length;_d92++){
- if(window.gaRV_INSTANCES[_d92].widgetId==_d91){
- this.m_oCV=window.gaRV_INSTANCES[_d92];
- var _d93=this.getViewerId();
- var _d94=this.m_oCV.getId();
- this.setViewerId(_d94);
- var _d95=document.getElementsByTagName("head").item(0).childNodes;
- for(var i=0;i<_d95.length;i++){
- var node=_d95[i];
- if(node.getAttribute&&node.getAttribute("namespaceId")==_d93){
- node.setAttribute("namespaceId",_d94);
- }
- }
- break;
- }
- }
- }
- }
- return this.m_oCV;
- },setViewerId:function(id){
- this.viewerId=id;
- },getViewerId:function(){
- if(!this.viewerId){
- this.viewerId=this.namespacePrefix+this.viewerIdentifier;
- }
- return this.viewerId;
- },getLoadManager:function(){
- return this.m_oLoadManager;
- },getReportBlocker:function(){
- if(!this.m_reportBlocker){
- this.m_reportBlocker=new Blocker(this.m_oCV.getId());
- }
- return this.m_reportBlocker;
- },placeTabControlInView:function(){
- var oCV=this.getViewerObject();
- if(oCV&&oCV.getTabController()){
- if(oCV.getTabController().getSelectedTab()&&oCV.getTabController().getSelectedTab().getFocusableDiv()){
- oCV.setKeepFocus(oCV.getTabController().getSelectedTab().getFocusableDiv());
- }
- dojo.window.scrollIntoView(oCV.getTabController().getWrapperDiv());
- }
- },setReportBlocker:function(_d9a){
- this.m_reportBlocker=_d9a;
- },isSavedOutput:function(){
- var _d9b=this.getViewerObject();
- if(typeof _d9b!=="undefined"&&_d9b!==null){
- var _d9c=(_d9b.envParams["ui.action"]);
- return (_d9c==="view"||_d9c==="buxView");
- }
- return false;
- },isMobile:function(){
- return this._isMobile;
- },getEmbeddedMobileItem:function(){
- var _d9d=false;
- var _d9e=this.iContext.getItemSet("buxrtstate",false);
- if(_d9e){
- _d9d=_d9e.getItemValue("embeddedMobile")=="true"?true:false;
- }
- return _d9d;
- },getBUXRTStateInfoMap:function(_d9f){
- if(!window.icdConfig||!window.icdConfig.ZIPIMode||window.icdConfig.ZIPIMode==="0"){
- return "";
- }
- var _da0=["<RTStateInfo>"];
- if(_d9f&&_d9f.length>0){
- _da0.push(_d9f);
- }
- var _da1=this.getDisplayName();
- if(_da1&&_da1.length>0){
- _da0.push("<widgetTitle>",xml_encode(_da1),"</widgetTitle>");
- }
- if(this._BUXDBInfoArray&&this._BUXDBInfoArray.length>0){
- _da0=_da0.concat(this._BUXDBInfoArray);
- }
- _da0.push("</RTStateInfo>");
- return _da0.length>2?_da0.join(""):"";
- },getBUXDBInfoArray:function(_da2){
- var _da3=null;
- var _da4=null;
- if(_da2){
- _da3=_da2.dbTitle;
- _da4=_da2.dbSearchPath;
- }else{
- var _da5=this.iContext.getItemSet("buxrtstate",false);
- if(_da5){
- _da3=_da5.getItemValue("dbTitle");
- _da4=_da5.getItemValue("dbSearchPath");
- }
- }
- var _da6=[];
- if(_da3&&_da4&&_da4.length>0){
- _da6.push("<dbTitle>",xml_encode(_da3),"</dbTitle><dbSearchPath>",xml_encode(_da4),"</dbSearchPath>");
- }
- return _da6;
- },loadExtraJavascriptFiles:function(_da7){
- if(typeof CSelectionContext=="undefined"){
- this._loadFile("/drill/CSelectionContextBuilder.js",_da7);
- }
- this._loadFile("/mdsrv/lineage.js",_da7);
- if(window.cognosViewerDebug){
- this._loadFile("/rv/viewer.extra.debug.js",_da7);
- }else{
- this._loadFile("/rv/viewer.extra.js",_da7);
- }
- },_loadFile:function(_da8,_da9){
- if(dojo.isIE||dojo.isTrident||_da9.indexOf("..")==0){
- var _daa=window.gScriptLoader.loadFile(_da9+_da8,"","GET");
- var _dab=document.createElement("script");
- _dab.type="text/javascript";
- _dab.text=_daa;
- document.getElementsByTagName("head")[0].appendChild(_dab);
- }else{
- dojo._loadPath(_da9+_da8,null);
- }
- },_getCWALaunchInformation:function(){
- var args={url:this.buildPostUrl(),sync:false,handleAs:"json",preventCache:true,content:{"b_action":"cognosViewer","ui.action":"noOp","cv.responseFormat":"getCWALaunchParameters"},error:dojo.hitch(this,function(_dad){
- this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
- this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dad.message,description:_dad.description});
- }),load:dojo.hitch(this,function(_dae,_daf){
- var _db0=_daf.xhr.getResponseHeader("Content-Type");
- if(_db0&&_db0.indexOf("text/html")!=-1&&_dae&&_dae.match(/<ERROR_CODE>CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){
- this.handlePassportErrorFromDispatcher();
- }else{
- this._launchCWA(_dae);
- }
- })};
- dojo.xhrPost(args);
- },_launchCWA:function(_db1){
- if(_db1){
- if(typeof NewReportAction=="undefined"){
- this.loadExtraJavascriptFiles(_db1.webContentRoot);
- if(_db1.productLocale!="en"){
- this._loadFile("rv/res/viewer_"+_db1.productLocale+".js",_db1.webContentRoot);
- }
- }
- var _db2=new NewReportAction();
- _db2.setRequestParms({"packageSearchPath":this.getAttributeValue("packageSearchPath"),"viewerIWidget":this,"webContentRoot":_db1.webContentRoot,"gateway":_db1.gateway,"capabilitiesXml":_db1.capabilitiesXML,"cafContextId":_db1.cafContextId});
- this.removeAttributeValue("packageSearchPath");
- _db2.execute();
- }
- },setNewReportInfo:function(info){
- this._newReportInfo=info;
- },_handleFileDialogCancel:function(){
- this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"});
- },_handleFileDialogOk:function(_db4){
- this.removeAttributeValue("newReport");
- this.setAttributeValue("packageSearchPath","storeID(\""+_db4+"\")");
- this.onLoad();
- },onLoad:function(){
- this.sViewerIWidgetId=this.iContext.getRootElement().id;
- if(this.getAttributeValue("packageSearchPath")){
- this._getCWALaunchInformation();
- return;
- }else{
- if(this.getAttributeValue("newReport")==="true"){
- dojo["require"]("bux.dialogs.FileDialog");
- var oDlg=new bux.dialogs.PackageDialog({onCancelHandler:dojo.hitch(this,this._handleFileDialogCancel),selectPackageHandler:dojo.hitch(this,this._handleFileDialogOk)});
- oDlg.startup();
- oDlg.show();
- return;
- }
- }
- var _db6=this.getAttributeValue("ViewerConcurrentRequestLimit");
- if(_db6){
- this.removeAttributeValue("ViewerConcurrentRequestLimit");
- if(!window["gReportWidgetLoadQueue"]){
- window["gReportWidgetLoadQueue"]=new ReportWidgetLoadQueue(_db6);
- }
- }
- this._isMobile=this.getEmbeddedMobileItem();
- this._BUXDBInfoArray=this.getBUXDBInfoArray();
- var _db7=this.getAttributeValue("viewerProperties");
- var _db8=this.getAttributeValue("promptParametersRetrieved");
- if(_db8!==null&&_db8=="true"){
- this.promptParametersRetrieved=true;
- }
- this.properties=this.createProperties(_db7);
- this.savedOutput.setPagedOutput(!this.properties.getRetrieveAll());
- this.setWidgetCopyPasteParameters();
- this.m_bSelectionFilterSwitch=this.getAttributeValue("selectionFilterEnabled")=="true"?true:false;
- if(this.isOpeningSavedDashboard()&&this.copyPasteResource==null){
- this.disableListenToIfFullReportUpgraded();
- this.enableFlashChartsToIfReportPartUpgraded();
- this.disableListenToIfReportPartUpgraded();
- if(this.isVisible()){
- if(window["gReportWidgetLoadQueue"]){
- window["gReportWidgetLoadQueue"].add(this);
- }else{
- this.postReport(null);
- }
- }
- }else{
- var _db9={action:"canvas.filters"};
- this.fireEvent("com.ibm.bux.widget.action",null,_db9);
- this.getLoadManager().viewerLoadInitiated();
- this.m_visible=true;
- }
- this.addWidgetEventListeners();
- this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.widget.contextChanged","widgetBuxCanvasTabs","com.ibm.widget.contextChanged");
- this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.bux.data.filterCache.init","widgetBuxCanvasTabs","com.ibm.bux.data.filterCache.init");
- this.fireEvent("com.ibm.bux.widget.updateStoreID",null,{});
- },addWindowEventListeners:function(){
- if(!this.dojoConnections){
- this.dojoConnections=[];
- }
- this.dojoConnections.push(dojo.connect(window,"onresize",this,this.onBrowserResize));
- this.dojoConnections.push(dojo.connect(window,"onbeforeunload",this,this.possibleUnloadEvent));
- },addWidgetEventListeners:function(){
- if(this.isMobile()){
- this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchstart",this,this.onTouchStart));
- this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchmove",this,this.onTouchMove));
- }
- },addChromeWhitespaceHandler:function(_dba){
- if(isIE()){
- var _dbb=document.getElementById("mainViewerTR"+_dba);
- if(_dbb){
- this.dojoConnections.push(dojo.connect(_dbb,"onmousedown",this,this.onMouseDownOnChromeDiv));
- }
- }
- },onMouseDownOnChromeDiv:function(evt){
- if(evt.srcElement.id.indexOf("PRMT",0)===0){
- return;
- }
- var oCV=this.getViewerObject();
- if(oCV){
- var _dbe=oCV.getReportDiv();
- if(_dbe){
- var _dbf=_dbe.getBoundingClientRect();
- var _dc0=_dbf.top+_dbe.offsetHeight;
- if(evt.clientY>_dc0&&evt.button!==2){
- if(oCV.getSelectionController()){
- oCV.getSelectionController().clearSelectedObjects();
- this.onSelectionChange();
- stopEventBubble(evt);
- }
- }
- }
- }
- },removeWindowEventListeners:function(){
- if(this.dojoConnections){
- for(var i=0;i<this.dojoConnections.length;++i){
- dojo.disconnect(this.dojoConnections[i]);
- }
- delete this.dojoConnections;
- }
- },onBrowserResize:function(){
- var oCV=this.getViewerObject();
- if(oCV&&oCV.getPinFreezeManager()){
- oCV.getPinFreezeManager().onResizeCanvas(this.isVisible());
- }
- },onTouchStart:function(e){
- this.touchPaging=false;
- if(this.m_oCV&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _dc4=e.changedTouches[0];
- if(_dc4&&_dc4.clientX){
- this.touchStartX=parseInt(_dc4.clientX);
- }
- }
- },onTouchMove:function(e){
- if(!this.touchPaging&&this.touchStartX!=-1&&this.m_oCV&&e&&e.changedTouches&&e.touches&&e.touches.length==1){
- var _dc6=e.changedTouches[0];
- if(_dc6&&_dc6.clientX){
- var _dc7=parseInt(_dc6.clientX);
- if(this.m_oCV.hasNextPage()&&this.touchStartX-_dc7>10){
- this.touchPaging=true;
- this.m_oCV.pageAction("nextPage");
- this.m_oCV.setKeepFocus(false);
- }else{
- if(this.m_oCV.hasPrevPage()&&_dc7-this.touchStartX>10){
- this.touchPaging=true;
- this.m_oCV.pageAction("previousPage");
- this.m_oCV.setKeepFocus(false);
- }else{
- this.touchPaging=false;
- this.touchStartX=-1;
- }
- }
- }
- }
- if(this.touchStartX>0){
- stopEventBubble(e);
- }
- },isLiveReport:function(){
- return this.isSavedOutput()===false&&!this.isLimitedInteractiveMode();
- },createProperties:function(_dc8){
- return new bux.reportViewer.Properties(this,_dc8);
- },disableListenToIfFullReportUpgraded:function(){
- if(this.isGoDashboardReportUpgrade()){
- if(this.getAttributeValue("flexParam_properties")==null){
- var _dc9={};
- _dc9["*"]={blockedEvents:["com.ibm.bux.data.filter","com.ibm.bux.filter.values.get","com.ibm.bux.filter.items.get"]};
- this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dc9);
- }
- }
- },enableFlashChartsToIfReportPartUpgraded:function(){
- if(this.isGoDashboardReportUpgrade()){
- var _dca=this.getAttributeValue("originalReportPart");
- if(typeof _dca!=="undefined"&&_dca!==null){
- this.properties.setProperty("flashCharts","true");
- }
- }
- },disableListenToIfReportPartUpgraded:function(){
- if(this.isGoDashboardReportUpgrade()){
- var _dcb=this.getAttributeValue("originalReportPart");
- if(typeof _dcb!=="undefined"&&_dcb!==null){
- var _dcc={};
- _dcc["*"]={blockedEvents:["com.ibm.bux.viewer.drill","com.ibm.bux.viewer.prompt"]};
- this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dcc);
- }
- }
- },possibleUnloadEvent:function(){
- var oCV=this.getViewerObject();
- if(oCV){
- oCV.getViewerDispatcher().possibleUnloadEvent();
- }
- },onUnload:function(){
- this.onUnloadInProgress=true;
- this.destroy();
- this.iContext=null;
- },onGetFiltersDone:function(evt){
- if(typeof this.filterRequiredAction!="undefined"&&this.filterRequiredAction!=null){
- var _dcf=this.buildDataFiltersParam(evt.payload.filters);
- var _dd0=new ActionFactory(this.getViewerObject());
- var _dd1=_dd0.load(this.filterRequiredAction);
- _dd1.dispatchRequest(_dcf,this.filterRequiredAction);
- this.filterRequiredAction=null;
- }else{
- this.postReport(evt.payload.filters);
- this.postSetWidgetCopyPasteParameters();
- }
- },getOriginalFormFields:function(){
- return this.m_originalFormFields;
- },setOriginalFormFields:function(_dd2){
- this.m_originalFormFields=_dd2;
- },getXNodeId:function(){
- return this.xNodeId;
- },setXNodeId:function(_dd3){
- this.xNodeId=_dd3;
- },postReport:function(_dd4){
- this.getLoadManager().viewerLoadInitiated();
- this.viewerWidgetLastAction={"functionName":"postReport","param":[_dd4]};
- if(this.getRunReportOption()!==false){
- this.m_oLoadManager.runningReport();
- }
- var _dd5=this.buildPostContent(_dd4);
- if(_dd5["ui.reportDrop"]=="true"){
- this.m_bReportDropped=true;
- }
- this.m_originalFormFields=new CDictionary();
- for(var _dd6 in _dd5){
- if(_dd6!="cv.outputKey"){
- this.m_originalFormFields.add(_dd6,_dd5[_dd6]);
- }
- }
- var _dd7={};
- if(this.getAttributeValue("X-Node-ID")){
- this.setXNodeId(this.getAttributeValue("X-Node-ID"));
- _dd7["X-Node-ID"]=this.getAttributeValue("X-Node-ID");
- this.removeAttributeValue("X-Node-ID");
- }
- var args={url:this.buildPostUrl(),sync:false,preventCache:true,content:_dd5,headers:_dd7,error:dojo.hitch(this,function(_dd9){
- this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
- this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dd9.message,description:_dd9.description});
- })};
- if(typeof xhrMultiPart!=="undefined"&&xhrMultiPart.active){
- args.load=dojo.hitch(this,function(_dda){
- this.loadContent(_dda.responseText);
- });
- xhrMultiPart.Post(args);
- }else{
- args.load=dojo.hitch(this,function(_ddb,_ddc){
- var _ddd=_ddc.xhr.getResponseHeader("Content-Type");
- if(_ddd&&_ddd.indexOf("text/html")!=-1&&_ddb&&_ddb.match(/<ERROR_CODE>CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){
- this.handlePassportErrorFromDispatcher();
- }else{
- this.loadContent(_ddb);
- }
- });
- dojo.xhrPost(args);
- }
- },isDropped:function(){
- return this.m_bReportDropped;
- },cleanupStyles:function(){
- this._cssLimitReached=true;
- if(!this.isVisible()){
- if(!this._styles){
- this._styles=[];
- }
- var id=this.getViewerId();
- var _ddf=document.getElementsByTagName("head").item(0).getElementsByTagName("style");
- for(var i=0;i<_ddf.length;i++){
- var _de1=_ddf[i];
- if(_de1.getAttribute&&_de1.getAttribute("namespaceId")==id){
- _de1.parentNode.removeChild(_de1);
- this._styles.push(_de1);
- i--;
- }
- }
- }
- },reloadStyles:function(){
- if(this._styles){
- while(this._styles.length>0){
- var _de2=this._styles.pop();
- document.getElementsByTagName("head").item(0).appendChild(_de2);
- }
- }
- },loadStylesAndScripts:function(_de3,_de4,_de5){
- window.gScriptLoader.m_bIgnoreAjaxWarnings=true;
- window.gScriptLoader.setHandlerStylesheetLimit(true);
- var _de6=this.iContext.getRootElement();
- if(!_de6){
- return;
- }
- _de3=window.gScriptLoader.loadCSS(_de3,_de4,true,this.getViewerId());
- if(dojo.isIE||dojo.isTrident){
- _de3="<span style='display:none'> </span>"+_de3;
- }
- _de4.innerHTML=_de3;
- if(this.isSelectionFilterEnabled()){
- this.updateDrillThroughLinks();
- }
- var _de7=GUtil.generateCallback(this.fireResizeEvent,[],this);
- this.m_sScriptLoaderNamespace=this.getViewerId();
- window.gScriptLoader.loadAll(_de4,_de7,this.m_sScriptLoaderNamespace,_de5);
- },fireResizeEvent:function(){
- var _de8=this.getViewerObject();
- if(_de8==null){
- this.fireEvent("com.ibm.bux.widget.render.done",null,{});
- }else{
- var _de9=_de8.getViewerWidget();
- if(_de9){
- _de8.m_resizeReady=true;
- _de8.doneLoading();
- }else{
- var _dea=this;
- setTimeout(function(){
- _dea.fireResizeEvent();
- },100);
- }
- }
- },getSavedReportSearchPath:function(_deb){
- var _dec=this.getAttributeValue("savedReportPath");
- if(_dec){
- return _dec;
- }
- var _ded=this.getAttributeValue("dashboardID");
- _ded=_ded.substr("$$dbid$$".length);
- var _dee="storeID(\""+_ded+"\")/*[@name="+xpath_attr_encode(_deb)+"]";
- return _dee;
- },isSavedReport:function(_def,_df0){
- return (typeof _df0!=="undefined"&&_df0!==null&&_df0.length>0&&_def!==_df0);
- },getGlobalPromptsInfo:function(){
- var _df1=null;
- var oCV=null;
- var _df3=[];
- var _df4=null;
- if(window.gaRV_INSTANCES){
- for(var _df5=0;_df5<window.gaRV_INSTANCES.length;_df5++){
- oCV=window.gaRV_INSTANCES[_df5];
- _df4=oCV.getPromptParametersInfo();
- if(_df4!=null){
- _df3.push(_df4);
- }
- }
- }
- if(_df3.length>0){
- _df1="<globalPromptInfo>"+_df3.join("")+"</globalPromptInfo>";
- }
- return _df1;
- },buildPostUrl:function(){
- return this.getAttributeValue("gateway");
- },getSavedItem:function(){
- var _df6=this.getAttributeValue("savedReportPath");
- if(!_df6){
- _df6=this.getAttributeValue("savedReportName");
- }
- return _df6;
- },setRunReportOption:function(_df7){
- this.m_bRunReportOption=_df7;
- },getRunReportOption:function(){
- return this.m_bRunReportOption;
- },resetRunReportOption:function(){
- this.m_bRunReportOption=null;
- },buildPostContent:function(_df8){
- var _df9=this.getAttributeValue("originalReport");
- var _dfa=this.getSavedItem();
- var _dfb=this.getAttributeValue("originalReportPart");
- var _dfc=this.getAttributeValue("flexParam_properties");
- var _dfd=this.getAttributeValue("flexParam_promptData");
- var _dfe=this.isSavedReport(_df9,_dfa);
- var _dff=this.getPromptRunOption(_dfd,_dfe);
- var _e00=this.getAttributeValue("cv.outputKey")?"cvx.high":"cognosViewer";
- var _e01={"b_action":_e00,"run.outputFormat":"HTML","bux":"true","cv.responseFormat":"iWidget","cv.id":this.getViewerId()};
- if(this.isMobile()){
- _e01["container"]="mobile";
- }
- if(this.getAttributeValue("cv.outputKey")){
- _e01["cv.outputKey"]=this.getAttributeValue("cv.outputKey");
- this.removeAttributeValue("cv.outputKey");
- _e01["widget.id"]=this.getWidgetId();
- }
- if(this.getAttributeValue("gateway")){
- _e01["cv.gateway"]=this.getAttributeValue("gateway");
- }
- if(this.getAttributeValue("webcontent")){
- _e01["cv.webcontent"]=this.getAttributeValue("webcontent");
- }
- this.sInitialSpec=this.getAttributeValue("specification");
- if(_dfe){
- this.addUserParamsToContent(_e01);
- }
- if(!this.sInitialSpec||this.copyPasteResource){
- if(_dfe){
- _e01["ui.object"]=this.getSavedReportSearchPath(_dfa);
- if(!this.getAttributeValue("savedReportPath")&&this.getAttributeValue("savedReportName")){
- _e01["savedReportName"]=_dfa;
- }
- _e01["widget.isSavedReport"]="true";
- _e01["ui.reRunObj"]=this.getSavedReportSearchPath(_dfa);
- }else{
- _e01["ui.object"]=_df9;
- if(_dfc&&_dfc.length>0){
- _e01["flexParamProperties"]=_dfc;
- }
- if(_dfd&&_dfd.length>0){
- _e01["gdPromptAnswers"]=_dfd;
- }
- }
- _e01["originalReport"]=_df9;
- }
- if(this.getAttributeValue("savedOutputSearchPath")!=null){
- this.setSavedOutputSearchPath(this.getAttributeValue("savedOutputSearchPath"));
- _e01["ui.savedOutputSearchPath"]=this.getAttributeValue("savedOutputSearchPath");
- _e01["ui.action"]="buxView";
- }else{
- if(this.getAttributeValue("mostRecentSavedOutput")=="true"){
- _e01["ui.action"]="buxView";
- }else{
- if(_dfe){
- if(this.getAttributeValue("limitedInteractiveMode")==="true"){
- _e01["limitedInteractiveMode"]="true";
- _e01["ui.action"]="run";
- _e01["run.xslURL"]="bux.xsl";
- }else{
- _e01["ui.action"]="bux";
- }
- if(this.getRunReportOption()!==null){
- _e01["widget.runReport"]=(this.getRunReportOption())?"true":"false";
- if(this.getDoGetParametersOnLoad()){
- _e01["widget.globalPromptInfo"]="<globalPromptInfo></globalPromptInfo>";
- }
- this.resetRunReportOption();
- }
- }else{
- if(_dfb&&_dfb.length>0&&this.copyPasteResource==null){
- _e01["ui.reportDrop"]="true";
- _e01["ui.action"]="bux";
- _e01["reportpart_id"]=_dfb;
- }else{
- if(this.copyPasteResource){
- if(this.ciPublishedReportPath!=null){
- _e01["ui.object"]=this.ciPublishedReportPath;
- }
- var _e02=dojo.fromJson(this.copyPasteResource);
- if(_e02[0]&&_e02[0].body){
- var _e03=this.getAttributeValue("copy.conversation");
- if(_e03){
- _e01["ui.conversation"]=_e03;
- }
- if(_e02[0].body.specification){
- _e01["ui.spec"]=_e02[0].body.specification;
- _e01["ui.action"]="buxCopyPaste";
- if(this.getAttributeValue("reportCreatedInCW")==="true"){
- _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
- }
- }else{
- _e01["ui.reportDrop"]="true";
- _e01["ui.action"]="buxDropReportOnCanvas";
- }
- }
- }else{
- if(this.sInitialSpec){
- _e01["ui.spec"]=this.sInitialSpec;
- _e01["ui.action"]="buxRunSpecification";
- _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
- }else{
- if(this._newReportInfo){
- for(prop in this._newReportInfo){
- _e01[prop]=this._newReportInfo[prop];
- }
- _e01["ui.reportDrop"]="true";
- _e01["ui.action"]="bux";
- _e01["cv.objectPermissions"]="read write execute setPolicy traverse";
- _e01["ui.objectClass"]="report";
- _e01["openReportFromClipboard"]="true";
- }else{
- _e01["ui.reportDrop"]="true";
- _e01["ui.action"]="buxDropReportOnCanvas";
- }
- }
- }
- }
- }
- }
- }
- if(_dff!==null){
- _e01["run.prompt"]=(_dff?"true":"false");
- }
- if(this.getAttributeValue("lastLocaleSaved")!=null){
- _e01["lastLocaleSaved"]=this.getAttributeValue("lastLocaleSaved");
- }
- var _e04="";
- if(this.copyPasteResource){
- _e04=this.updateCopyPasteFilters(_df8);
- }else{
- _e04=this.buildDataFiltersParam(_df8);
- if(typeof _df8=="undefined"||_df8==null){
- _e04=this.buildFiltersParamFromLoadedSliderState();
- }
- }
- if(_e04!=""){
- _e01["cv.updateDataFilters"]=_e04;
- }
- if(this.properties&&this.properties.getFlashCharts()!==null){
- _e01["savedFlashChartOption"]=(this.properties.getFlashCharts()?"true":"false");
- var _e05=this.getAttributeValue("hasAVSChart");
- if(_e05=="true"){
- _e01["hasAVSChart"]="true";
- }else{
- _e01["hasAVSChart"]="false";
- }
- }
- if(this.properties.getRowsPerPage()!=null){
- _e01["run.verticalElements"]=this.properties.getRowsPerPage();
- }
- var _e06=this.getAttributeValue("syncNewWidgets");
- if(_e06===null||_e06==="true"){
- _e06=true;
- }else{
- _e06=false;
- }
- if(!_dfe&&_e06){
- var _e07=this.getGlobalPromptsInfo();
- if(_e07!==null){
- _e01["widget.globalPromptInfo"]=_e07;
- }
- }
- if(this.isOpeningSavedDashboard()){
- _e01["ui.preserveRapTags"]="true";
- }
- if(_dfe===true&&this.getAttributeValue("limitedInteractiveMode")!=="true"){
- this.getUserId();
- }
- if(window.cognosViewerDebug){
- _e01.debug=true;
- }
- _e01["cv.buxCurrentUserRole"]=this.getUserRole();
- if(this.shouldUseSavedReportInfo()){
- _e01["rap.getReportInfo"]="false";
- }
- if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){
- this.addBUXRTStateInfoToContent(_e01);
- }
- this.addBUXWidgetTitleToContent(_e01);
- return _e01;
- },addBUXRTStateInfoToContent:function(_e08){
- if(_e08!=null){
- var _e09=this.getBUXRTStateInfoMap();
- if(_e09&&_e09.length>0){
- _e08["cv.buxRTStateInfo"]=_e09;
- }
- }
- },addBUXWidgetTitleToContent:function(_e0a){
- if(_e0a!=null){
- var _e0b=this.getAttributeValue("widgetTitle");
- if(_e0b&&_e0b.length>0){
- _e0a["widgetTitle"]=_e0b;
- }
- var _e0c=this.getDisplayName();
- if(_e0c&&_e0c.length>0){
- _e0a["displayTitle"]=_e0c;
- }
- }
- },addUserParamsToContent:function(_e0d){
- var _e0e=this.getAttributeValue("userParams");
- if(!_e0e){
- return;
- }
- var doc=XMLBuilderLoadXMLFromString(_e0e);
- if(!doc){
- return;
- }
- var _e10=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false);
- var _e11=_e10.length;
- for(var i=0;i<_e11;i++){
- if(!_e10[i]){
- continue;
- }
- var _e13=XMLHelper_FindChildByTagName(_e10[i],"name",false);
- if(!_e13){
- continue;
- }
- var _e14=XMLHelper_FindChildByTagName(_e10[i],"value",false);
- _e0d[XMLHelper_GetText(_e13)]=(!_e14?"":XMLHelper_GetText(_e14));
- }
- if(_e11>0){
- _e0d["widget.userParameters"]="true";
- if(this.getAttributeValue("viewerReportPrompts")){
- _e0d["viewerReportPrompts"]=this.getAttributeValue("viewerReportPrompts");
- }
- }
- this.removeAttributeValue("userParams");
- },shouldUseSavedReportInfo:function(){
- return this.getAttributeValue("rapReportInfoVersion")===this.RAP_REPORT_INFO_VERSION&&this.getAttributeValue("rapReportInfo")!=null;
- },isConsumeUser:function(){
- return this.getUserRole()==="consume";
- },getUserRole:function(){
- var _e15=null;
- var _e16=this.iContext.getItemSet("buxuserprofile",false);
- if(_e16){
- _e15=_e16.getItemValue("currentUserRole");
- }
- return _e15==null?"assemble":_e15;
- },getUserId:function(){
- dojo["require"]("bux.UserAccount");
- return bux.UserAccount.getUserAccount().then(dojo.hitch(this,function(_e17){
- this.m_sUserId=_e17.cm$searchPath;
- return this.m_sUserId;
- }));
- },_genMobileFormFieldPayload:function(form){
- var _e19={};
- var _e1a=form.getElementsByTagName("input");
- if(_e1a){
- for(var i=0;i<_e1a.length;i++){
- var name=_e1a[i].getAttribute("name");
- var _e1d=_e1a[i].getAttribute("value");
- if(name&&_e1d){
- _e19[name]=_e1d;
- }
- }
- }
- return _e19;
- },launchGotoPageForIWidgetMobile:function(form){
- var _e1f={"action":"goto","payload":this._genMobileFormFieldPayload(form)};
- if(typeof console!="undefined"&&console&&console.log){
- console.log(_e1f);
- }
- this.fireEvent("com.ibm.bux.widget.openView",null,_e1f);
- },executeDrillThroughForIWidgetMobile:function(form){
- var _e21=getChildElementsByAttribute(form,"input","name","ui.action");
- if(_e21&&_e21.length>0){
- _e21[0].setAttribute("value","authoredDrillThroughMobile");
- }
- var _e22={"action":"drillThrough","payload":this._genMobileFormFieldPayload(form)};
- if(typeof console!="undefined"&&console&&console.log){
- console.log(_e22);
- }
- this.fireEvent("com.ibm.bux.widget.openView",null,_e22);
- },isBuxAvailable:function(){
- return (this.bux&&this.bux._base?true:false);
- },getDrillOptions:function(){
- return this.properties.getDrillOptions();
- },getPromptRunOption:function(_e23,_e24){
- if(!_e24&&_e23&&_e23.length>0){
- return false;
- }else{
- if(_e24){
- return this.properties.getPromptUserOnLoad();
- }else{
- return null;
- }
- }
- },buildDataFiltersParam:function(_e25){
- var _e26="";
- if(_e25&&_e25.length>0){
- this.sliderState={};
- _e26="<UpdateDataFilters>";
- for(var _e27=0;_e27<_e25.length;++_e27){
- var _e28=_e25[_e27];
- var _e29=dojo.fromJson(_e28);
- if(_e29.clientId==this.getWidgetId()){
- continue;
- }
- if(!(_e29["com.ibm.widget.context.bux.selectValueControl"])){
- this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e29);
- this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e29);
- _e28=dojo.toJson(_e29);
- }
- _e26+="<filter>"+xml_encode(_e28)+"</filter>";
- this.sliderState[_e29.clientId]=_e28;
- }
- _e26+="</UpdateDataFilters>";
- }
- return _e26;
- },updateCopyPasteFilters:function(_e2a){
- this.loadSliderState();
- if(this.sliderState){
- for(var _e2b in this.sliderState){
- this.sliderState[_e2b]="{'clientId':'"+_e2b+"',\t'com.ibm.widget.context':{},'com.ibm.widget.context.bux.selectValueControl':"+"{'selectValueControl':{'id':'"+_e2b+"','controlType':'slider','type':'discrete','valueType':'string'}}}";
- }
- }
- if(_e2a&&_e2a.length>0){
- for(var _e2c=0;_e2c<_e2a.length;++_e2c){
- var _e2d=_e2a[_e2c];
- var _e2e=dojo.fromJson(_e2d);
- if(_e2e["com.ibm.widget.context.bux.selection"]){
- this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e2e);
- this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e2e);
- _e2d=dojo.toJson(_e2e);
- }
- this.sliderState[_e2e.clientId]=_e2d;
- }
- }
- return this.buildDataFiltersParam_fromState();
- },buildFiltersParamFromLoadedSliderState:function(){
- var _e2f="";
- this.loadSliderState();
- _e2f=this.buildDataFiltersParam_fromState();
- return _e2f;
- },loadSliderState:function(){
- this.sliderState={};
- var _e30=dojo.fromJson(this.getAttributeValue("sliderIDs"));
- if(_e30){
- for(var i=0;i<_e30.length;++i){
- var _e32=_e30[i];
- var _e33=this.getItemValue("sliderState_"+_e32);
- if(_e33!=null&&_e33!=""){
- this.sliderState[_e32]=_e33;
- }
- }
- }
- },buildDataFiltersParam_fromState:function(){
- var _e34="";
- if(this.sliderState){
- for(var _e35 in this.sliderState){
- _e34+="<filter>"+xml_encode(this.sliderState[_e35])+"</filter>";
- }
- if(_e34!==""){
- return ("<UpdateDataFilters>"+_e34+"</UpdateDataFilters>");
- }
- }
- return _e34;
- },loadContent:function(_e36){
- var _e37=dojo.byId("_"+this.iContext.widgetId+"_cv");
- this.loadStylesAndScripts(_e36,_e37,true);
- if(!window.gScriptLoader.hasCompletedExecution()){
- var obj=this;
- this.timer=setInterval(function(){
- window.gInitializeViewer(obj);
- },this.timerInterval);
- }else{
- window.gInitializeViewer(this);
- }
- this.viewerWidgetLastAction=null;
- },executeAction:function(evt,_e3a){
- var _e3b=this.getViewerObject();
- if(evt&&_e3b){
- var _e3c=_e3a?_e3a:evt.payload.name;
- var _e3d=evt.payload;
- if(_e3c&&typeof _e3d!="undefined"&&_e3d!=null){
- if(evt.payload.payload){
- _e3d=evt.payload.payload;
- }
- _e3b.executeAction(_e3c,_e3d);
- }
- }
- },onContextMenuAction:function(evt){
- this.executeAction(evt);
- },onToolbarAction:function(evt){
- this.executeAction(evt);
- },updateToolbar:function(){
- var _e40=this.getViewerObject();
- if(!_e40||(!this.bToolbarInitialized&&typeof CognosViewerAction!="function")){
- return;
- }
- if(_e40.getStatus()==="prompting"){
- return;
- }
- var _e41=_e40.getToolbar();
- CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(_e40,_e41);
- this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init",null,_e40.getToolbar());
- },onSelect:function(){
- if(!this.bToolbarInitialized){
- this.bToolbarInitialized=true;
- var _e42=this.getViewerObject();
- if(_e42){
- var _e43=_e42.getStatus();
- if(_e43!=="prompting"&&_e43!=="working"&&_e43!="stillWorking"){
- this.updateToolbar();
- }
- }
- }
- this.fireEvent("com.ibm.bux.widget.select.done",null,{});
- },hideToolbarAndContextMenu:function(){
- this.fireEvent("com.ibm.bux.widget.contextMenu.update");
- this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init");
- },updateSavedAttributes:function(_e44){
- this.setAttributeValue("version",this.BUX_REPORT_VERSION);
- this.setAttributeValue("viewerProperties",this.properties.toString());
- if(this.m_oWidgetContextManager.getSelectionFilterObjects()){
- this.setAttributeValue("selectionObjects",this.m_oWidgetContextManager.toStringSelectionFilterObjects());
- }
- if(_e44==="live"){
- var oCV=this.getViewerObject();
- var _e46=this.getEnvParam("reportPrompts");
- if(this.promptParametersRetrieved==true&&_e46&&_e46.length>0){
- this.setAttributeValue("viewerReportPrompts",this.getEnvParam("reportPrompts"));
- }
- this.setAttributeValue("promptParametersRetrieved",(this.promptParametersRetrieved?"true":"false"));
- this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false");
- if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){
- this.setAttributeValue("fromReportPart","true");
- }
- if(this.isLimitedInteractiveMode()){
- this.setAttributeValue("limitedInteractiveMode","true");
- }else{
- this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]);
- }
- var _e47=oCV.envParams["contentLocale"];
- if(_e47!=null){
- this.saveSliderState();
- this.setAttributeValue("lastLocaleSaved",_e47);
- }
- this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]);
- this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false");
- this.setAttributeValue("displayTypes",this.getDisplayTypes());
- this.setSavedOutputsCMResponse(null);
- if(oCV.getPinFreezeManager()){
- var _e48=oCV.getPinFreezeManager().toJSONString();
- this.setAttributeValue("PinFreezeInfo",_e48);
- }
- if(oCV.envParams["rapReportInfo"]){
- this.setAttributeValue("rapReportInfoVersion",this.RAP_REPORT_INFO_VERSION);
- this.setAttributeValue("rapReportInfo",oCV.envParams["rapReportInfo"]);
- }
- }
- if(_e44==="savedOutput"){
- if(this.getSavedOutputSearchPath()==null){
- this.setAttributeValue("mostRecentSavedOutput","true");
- }else{
- this.setAttributeValue("savedOutputSearchPath",this.getSavedOutputSearchPath());
- }
- this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false");
- }
- },onItemSetChanged:function(_e49){
- if(this.getViewerObject()){
- var _e4a=_e49.payload.changes;
- for(var i in _e4a){
- if(_e4a[i].id==="savedReportPath"&&_e4a[i].newVal){
- this.updateCVEnvParam();
- }
- }
- }
- },updateCVEnvParam:function(){
- var oCV=this.getViewerObject();
- oCV.envParams["ui.objectClass"]=this.isSavedOutput()?"reportView":"report";
- oCV.envParams["widget.isSavedReport"]="true";
- var _e4d=this.getAttributeValue("savedReportName");
- if(_e4d){
- oCV.envParams["ui.object"]=_e4d;
- oCV.envParams["savedReportName"]=_e4d;
- }else{
- oCV.envParams["ui.object"]=this.getAttributeValue("savedReportPath");
- }
- },onWidgetSave:function(evt){
- var _e4f=this.getViewerObject();
- var _e50={"status":false};
- if(evt&&evt.payload&&evt.payload.isCopy===true){
- this.setAttributeValue("copy.conversation",_e4f.getConversation());
- }else{
- this.removeItem("copy.conversation");
- this.removeItem("copy.ciPublishedReportPath");
- }
- var _e51=evt&&evt.payload&&evt.payload.operation=="saveAs"?true:false;
- if(!_e4f&&!_e51){
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
- return;
- }
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _e52=this.getViewerObject();
- _e52.loadExtra();
- if(this.isSavedOutput()){
- this.cleanSavedAttributes();
- this.updateSavedAttributes("savedOutput");
- _e50.status=true;
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
- }else{
- if(this.sInitialSpec){
- _e50.status=true;
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
- }else{
- var _e53=this.getEnvParam("cv.objectPermissions");
- var _e54=new ViewerIWidgetSave(this,evt.payload);
- if(!_e54.canSave(_e53)){
- this.showErrorMessage(RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR);
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
- return;
- }
- if(this.isLimitedInteractiveMode()||(_e52.envParams["ui.spec"]&&_e52.envParams["ui.spec"].length>0)){
- this.cleanSavedAttributes();
- this.updateSavedAttributes("live");
- if(_e54.doGetSavePropertiesFromServer()){
- _e54.getSavePropertiesFromServer();
- }else{
- this.doWidgetSaveDone(_e54);
- }
- }else{
- if(!_e52.envParams["ui.spec"]){
- _e54.setDoCWCopy(true);
- this.doWidgetSaveDone(_e54);
- }else{
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e50);
- }
- }
- }
- }
- }),evt);
- },doWidgetSaveDone:function(_e55){
- var _e56=_e55.getPayload();
- _e56.status=true;
- if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){
- var _e57=_e55.m_payload.dashboard;
- if(_e57){
- this._BUXDBInfoArray=this.getBUXDBInfoArray({dbTitle:_e57.title._text,dbSearchPath:_e57.cm$searchPath});
- }
- }
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e56);
- },handleGetSavePropertiesFromServerResponse:function(_e58,_e59){
- var _e5a=new ViewerIWidgetSave(this,_e59);
- if(_e58&&_e58.getJSONResponseObject()){
- applyJSONProperties(this.getViewerObject(),_e58.getJSONResponseObject());
- }
- this.doWidgetSaveDone(_e5a);
- },isPreCaspianRP1BUXReport:function(){
- var _e5b=this.getAttributeValue("version");
- if(!_e5b||_e5b<this.BUX_REPORT_CASPIAN_RP1_VERSION){
- return true;
- }
- return false;
- },isGoDashboardReportUpgrade:function(){
- var _e5c=this.getAttributeValue("version");
- if(_e5c==this.GODASHBOARD_REPORT_VERSION){
- return true;
- }
- return false;
- },isOpeningSavedDashboard:function(){
- var _e5d=this.getAttributeValue("viewerProperties");
- if((_e5d&&_e5d.indexOf("{")===0)||this.isGoDashboardReportUpgrade()){
- return true;
- }
- return false;
- },cleanSavedAttributes:function(){
- this.removeAttributeValue("savedOutputSearchPath");
- this.removeAttributeValue("mostRecentSavedOutput");
- this.removeAttributeValue("savedReportName");
- this.removeAttributeValue("dashboardID");
- this.removeAttributeValue("savedReportId");
- this.removeAttributeValue("baseReportModificationTime");
- this.removeAttributeValue("viewerReportPrompts");
- this.removeAttributeValue("promptParametersRetrieved");
- this.removeAttributeValue("selectionFilterEnabled");
- this.removeAttributeValue("PinFreezeInfo");
- this.removeAttributeValue("rapReportInfoVersion");
- this.removeAttributeValue("rapReportInfo");
- this.removeAttributeValue("selectionObjects");
- if(this.isSavedOutput()){
- this.removeAttributeValue("savedReportPath");
- }
- },handleWidgetSaveDone:function(_e5e){
- var oCV=this.getViewerObject();
- var _e60=_e5e.getResult();
- if(_e60===null){
- _e60={};
- }
- this.cleanSavedAttributes();
- this.updateSavedAttributes("live");
- var _e61=_e60.reportName;
- var _e62=_e60.dashboard_id;
- this.setAttributeValue("savedReportName",_e61);
- this.setAttributeValue("dashboardID","$$dbid$$"+_e62);
- if(_e60.permissions){
- oCV.envParams["cv.objectPermissions"]=_e60.permissions;
- }
- if(_e60.objectClass){
- oCV.envParams["ui.objectClass"]=_e60.objectClass;
- }
- if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){
- this.setAttributeValue("fromReportPart","true");
- }
- if(this.isLimitedInteractiveMode()){
- this.setAttributeValue("limitedInteractiveMode","true");
- }else{
- this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]);
- }
- var _e63=oCV.envParams["contentLocale"];
- if(_e63!=null){
- this.saveSliderState();
- this.setAttributeValue("lastLocaleSaved",_e63);
- }
- this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]);
- oCV.envParams["ui.object"]=this.getSavedReportSearchPath(_e61);
- oCV.envParams["savedReportName"]=_e61;
- this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false");
- this.setAttributeValue("displayTypes",this.getDisplayTypes());
- this.setSavedOutputsCMResponse(null);
- var _e64={"status":true};
- this.fireEvent("com.ibm.bux.widget.save.done",null,_e64);
- },getDisplayTypes:function(){
- var oCV=this.getViewerObject();
- if(oCV.getRAPReportInfo()){
- return oCV.getRAPReportInfo().getDisplayTypes();
- }
- },saveSliderState:function(){
- var _e66=this.getViewerObject();
- var _e67=_e66.getRAPReportInfo();
- var _e68={};
- if(_e67){
- _e68=_e67.collectSliderSetFromReportInfo();
- }
- var i=0;
- var _e6a=[];
- for(var _e6b in this.sliderState){
- if(typeof _e68[_e6b]!="undefined"){
- this.setItemValue("sliderState_"+_e6b,this.sliderState[_e6b]);
- _e6a[i++]=_e6b;
- }else{
- this.removeItem("sliderState_"+_e6b);
- }
- }
- this.setAttributeValue("sliderIDs",dojo.toJson(_e6a));
- },onWidgetRefresh:function(evt){
- var _e6d={};
- var _e6e=this.getViewerObject();
- if(evt&&_e6e){
- if(_e6e.envParams["ui.action"]=="view"||_e6e.envParams["ui.action"]=="buxView"){
- _e6e.executeAction("RefreshViewEvent");
- }else{
- if(evt.payload&&evt.payload.refreshType=="preferencesChanged"){
- this.clearRAPCache();
- _e6e.executeAction("EditContent",{"preferencesChanged":true});
- _e6e.executeAction("Reprompt",{"preferencesChanged":true});
- }else{
- if(!this.isVisible()){
- this.getDelayedLoadingContext().setForceRunReport(true);
- }else{
- _e6e.executeAction("Refresh");
- }
- }
- }
- this.fireEvent("com.ibm.bux.widget.refresh.done",null,_e6d);
- }
- },invokeDisplayTypeDialog:function(_e6f,_e70){
- if(!this.m_chart){
- this.m_chart=new bux.reportViewer.chart();
- }
- var _e71=this.m_chart.getDisplayTypeDialogDefinition(_e6f);
- var _e72={"supportedChartTypes":_e71,"suggestedDisplayTypes":_e70};
- this.fireEvent("com.ibm.bux.widget.invokeDisplayTypeDialog",null,_e72);
- },onChangeDisplayType:function(evt){
- var _e74=this.getViewerObject();
- if(evt&&_e74){
- _e74.executeAction("ChangeDisplayType",evt.payload);
- }
- },onDisplayTypeDialogVariations:function(evt){
- var _e76=this.getViewerObject();
- if(evt&&_e76){
- _e76.executeAction("ChangeDisplayVariations",evt.payload);
- }
- },updateDisplayTypeDialogVariations:function(_e77,_e78){
- if(!this.m_chart){
- this.m_chart=new bux.reportViewer.chart();
- }
- var _e79=this.m_chart.getDisplayTypeDialogDefinition(_e77);
- var _e7a={"supportedChartTypes":_e79,"variationGroups":_e78};
- this.fireEvent("com.ibm.bux.widget.updateDisplayTypeDialogVariations",null,_e7a);
- },onGetDisplayTitleDone:function(evt){
- if(evt&&evt.payload&&evt.payload.callback){
- evt.payload.callback(evt.payload.title);
- }
- },getWidgetStoreID:function(){
- if(typeof this.widgetStoreId==="undefined"){
- if(!this.widgetStoreIdDfd){
- this.widgetStoreIdDfd=new dojo.Deferred();
- }
- return this.widgetStoreIdDfd;
- }
- return this.widgetStoreId;
- },setWidgetStoreID:function(_e7c){
- this.widgetStoreId=_e7c;
- if(this.widgetStoreIdDfd){
- this.widgetStoreIdDfd.callback(this.widgetStoreId);
- this.widgetStoreIdDfd=null;
- }
- },onUpdateWidgetStoreIDDone:function(evt){
- var _e7e=evt.payload.storeID;
- var _e7f="storeID(\"";
- if(_e7e&&(_e7e.indexOf(_e7f)>-1)){
- _e7e=_e7e.substr(_e7f.length,_e7e.length-_e7f.length-1);
- }
- dojo.when(this.getWidgetStoreID(),dojo.hitch(this,function(_e80){
- if(_e80&&_e80!=_e7e){
- this._copyComments(_e80,_e7e);
- }
- }));
- this.setWidgetStoreID(_e7e);
- },_copyComments:function(_e81,_e82){
- var _e83=this.buildPostUrl();
- if(_e83){
- var _e84=new XmlHttpObject();
- _e84.addFormField("b_action","cognosViewer");
- _e84.addFormField("widgetOldStoreID",_e81);
- _e84.addFormField("widgetStoreID",_e82);
- _e84.addFormField("ui.action","cloneAnnotations");
- _e84.addFormField("cv.responseFormat","json");
- _e84.sendHtmlRequest("POST",_e83,"",true);
- }
- },onRemoveDone:function(evt){
- this.destroy();
- },onGetProperties:function(evt){
- this.initializeProperties();
- this.fireEvent("com.ibm.bux.widget.properties.get.done",null,this.properties.onGet());
- },onSetProperties:function(evt){
- if(evt&&evt.payload&&evt.payload.properties){
- this.properties.onSet(evt.payload);
- }
- this.fireEvent("com.ibm.bux.widget.properties.set.done");
- var _e88={"modified":true};
- this.fireEvent("com.ibm.bux.widget.modified",null,_e88);
- },getProperties:function(){
- return this.properties;
- },clearPropertiesDialog:function(){
- if(this.properties){
- this.properties.clearDialogSpec();
- }
- },onGenericSelectValueControl:function(evt,_e8a){
- if(evt){
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _e8b=false;
- var _e8c=this._getFilterPayload(evt);
- var _e8d=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e8c):null;
- if(_e8d&&_e8d!=="facet"){
- var _e8e=dojo.clone(evt);
- this.preProcessFilterValues(_e8e);
- this.m_oWidgetContextManager.updateFilterContext(_e8e.payload);
- _e8b=this.onFilter(_e8e,_e8a);
- }else{
- this.m_oWidgetContextManager.updateFilterContext(_e8c);
- _e8b=this.onFilter(evt,_e8a);
- }
- return _e8b;
- }),evt.source);
- }
- },onFilter:function(evt,_e90){
- if(evt){
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _e91=false;
- if(this.isLiveReport()===false){
- return _e91;
- }
- var _e92=this._getFilterPayload(evt);
- var _e93=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e92):null;
- var _e94=null;
- var _e95=this.m_oWidgetContextManager.getItemNames(_e92);
- var _e96=false;
- for(var i=0;!_e96&&i<_e95.length;i++){
- _e94=_e95[i];
- _e96=this.canFilter(_e92,_e94,_e93,evt);
- }
- if(_e94==null&&!_e96){
- _e96=this.canFilter(_e92,_e94,_e93,evt);
- }
- if(_e96){
- var _e98={};
- var _e99=this._getDrillResetHUNForFacet(_e94,_e93);
- if(_e99&&_e99.length>0){
- _e98.drillResetHUN=_e99;
- }
- var _e9a=(evt.type=="string")?evt.payload:dojo.toJson(evt.payload);
- this.sliderState[evt.source]=_e9a;
- _e98.filterPayload=_e9a;
- _e98.isFacet=("facet"===_e93);
- if(_e90){
- _e98.forceCleanup=this.m_oWidgetContextManager.genRemoveDiscreteFilterPayload(this.getWidgetId());
- }
- this.getViewerObject().executeAction("UpdateDataFilter",_e98);
- if(!this.shouldReportBeRunOnAction()){
- this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true);
- }
- _e91=true;
- }
- return _e91;
- }),evt.source);
- }
- },clearSelectionFilter:function(){
- if(this.m_oWidgetContextManager){
- var _e9b=this.m_oWidgetContextManager.genEmptySelectionPayload(this.getViewerObject(),this.getWidgetId());
- this._fireContextChangedEvent(_e9b,false);
- }
- },broadcastSelectionFilter:function(){
- this.onSelectionChange();
- },onSelectionChange:function(){
- if(this.isSelectionFilterEnabled()){
- var _e9c=(this.getContainerTypeForSelection()==="list");
- var _e9d=this.m_oWidgetContextManager.genSelectionPayload(this.getViewerObject(),this.getWidgetId(),_e9c);
- this._fireContextChangedEvent(_e9d,!this.m_oWidgetContextManager.isSelectionPayloadForReset(_e9d));
- }
- },_fireContextChangedEvent:function(_e9e,_e9f){
- this.setSelectionFilterSent(_e9f);
- this.fireEvent("com.ibm.widget.contextChanged",null,_e9e);
- },somethingSelected:function(){
- var oCV=this.getViewerObject();
- return (oCV&&oCV.getSelectionController()&&oCV.getSelectionController().getAllSelectedObjects().length>0);
- },selectionFilterSent:function(){
- return this.m_bSelectionFilterSent;
- },setSelectionFilterSent:function(flag){
- this.m_bSelectionFilterSent=flag;
- },reselectSelectionFilterObjects:function(){
- if(this.isSelectionFilterEnabled()){
- var oCV=this.getViewerObject();
- var _ea3=oCV.getSelectionController();
- var _ea4=this.m_oWidgetContextManager.getSelectionFilterObjects();
- if(!_ea4){
- var str=this.getAttributeValue("selectionObjects");
- if(str&&str.length>0){
- _ea4=eval(str);
- this.m_oWidgetContextManager.setSelectionFilterObjects(_ea4);
- this.removeAttributeValue("selectionObjects");
- }
- }
- if(_ea4&&_ea4.length>0){
- var _ea6=new ReselectAction(oCV,_ea4);
- _ea6.executeAction();
- }
- }
- },_getFilterPayload:function(evt){
- return (evt.type=="string"?dojo.fromJson(evt.payload):evt.payload);
- },_getFilterPayloadItemName:function(_ea8){
- var _ea9=_ea8.name;
- if(!_ea8.name){
- _ea9=this.m_oWidgetContextManager.getFilterFirstItemName();
- }
- return _ea9;
- },canFilter:function(_eaa,_eab,_eac,evt){
- var _eae;
- var _eaf=this.getRAPCachedItem("filterableItems");
- if(_eac!=="facet"&&typeof _eab!="undefined"&&_eab!=null&&_eaf!=null){
- for(var type in _eaf){
- for(_eae=0;_eae<_eaf[type].length;++_eae){
- if(_eaf[type][_eae].name==_eab||_eaf[type][_eae].label==_eab){
- return true;
- }
- }
- }
- }else{
- var _eb1=this.getViewerObject();
- var _eb2=_eb1.getRAPReportInfo();
- if(_eb2){
- var _eb3=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"dimension"):null;
- var _eb4=_eb2.getContainers();
- for(var lid in _eb4){
- var _eb6=_eb4[lid];
- var _eb7=_eb6.sliders;
- if(_eb7&&_eb7.length){
- for(var _eb8=0;_eb8<_eb7.length;++_eb8){
- var _eb9=_eb7[_eb8];
- if(_eb9.clientId==_eaa.clientId||(_eb9.clientId==evt.source)||(_eb9.clientId==_eb9.name&&_eb9.name==_eab)){
- return true;
- }
- }
- }
- var _eba=_eb6.itemInfo;
- if(_eba&&_eba.length){
- for(var _ebb=0;_ebb<_eba.length;++_ebb){
- if(_eba[_ebb].item==_eab){
- return true;
- }
- if(_eac==="facet"&&_eba[_ebb].dimensionName==_eab){
- return true;
- }
- if(_eac==="facet"&&_eba[_ebb].dimensionName===_eb3){
- return true;
- }
- }
- }
- if(_eac==="facet"){
- var _ebc=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"filterType"):null;
- if(_eac==="facet"&&_ebc==="attribute"){
- return true;
- }
- var _ebd=_eb6.filter;
- if(_ebd&&_ebd.length){
- for(var _ebe=0;_ebe<_ebd.length;++_ebe){
- if(_ebd[_ebe].hierarchyName===_eab){
- return true;
- }
- }
- }
- }else{
- if(_eb2.getFilterObjectFromContainer(lid,_eab,false)){
- return true;
- }
- }
- }
- if(_eb2.isReportLevel_nonVisibleFilterItem(_eab)){
- return true;
- }
- }
- }
- return false;
- },_getDrillResetHUNForFacet:function(_ebf,_ec0){
- if(_ec0!=="facet"){
- return null;
- }
- var _ec1=null;
- var _ec2=this.getViewerObject();
- if(_ec2.getRAPReportInfo()){
- _ec1=_ec2.getRAPReportInfo().getDrilledOnHUNs();
- }
- if(!_ec1){
- return null;
- }
- var _ec3=[];
- for(var i=0;i<_ec1.length;i++){
- if(_ec1[i].indexOf(_ebf)!==-1){
- _ec3.push(_ec1[i]);
- break;
- }
- }
- return _ec3;
- },preProcessFilterValues:function(evt){
- var _ec6=evt.payload["com.ibm.widget.context"]["values"];
- _ec6=(_ec6)?_ec6:evt.payload["com.ibm.widget.context"]["ranges"];
- var _ec7=this.m_oWidgetContextManager.getItemsInItemSpecification(evt.payload);
- var _ec8=(_ec6)?false:true;
- if(_ec8){
- _ec6=evt.payload["com.ibm.widget.context"];
- }
- var _ec9=this.getViewerObject();
- if(_ec9){
- var _eca=_ec9.getRAPReportInfo();
- for(var _ecb in _ec6){
- if(!_eca.isReferenced(_ecb)||_ec8){
- delete _ec6[_ecb];
- if(_ec7&&_ec7[_ecb]){
- delete _ec7[_ecb];
- }
- }
- }
- }
- if(isObjectEmpty(_ec6)){
- evt.payload["com.ibm.widget.context"]={};
- }
- },isLimitedInteractiveMode:function(){
- var _ecc=this.getViewerObject();
- if(_ecc){
- return _ecc.isLimitedInteractiveMode();
- }
- return false;
- },onMouseOver:function(evt){
- if(DragDropAction_isDragging(evt)==false&&this.getViewerObject().getStatus()=="complete"){
- var _ece=ActionFactory_loadActionHandler(evt,this.getViewerObject());
- if(_ece){
- return _ece.onMouseOver(evt);
- }
- }
- return true;
- },onMouseOut:function(evt){
- var _ed0=ActionFactory_loadActionHandler(evt,this.getViewerObject());
- if(_ed0&&this.getViewerObject().getStatus()=="complete"){
- return _ed0.onMouseOut(evt);
- }
- return true;
- },onMouseOverRenamedItem:function(evt){
- var node=getNodeFromEvent(evt);
- if(node.getAttribute){
- var _ed3=node.getAttribute("rp_name");
- if(_ed3!=null){
- var _ed4=this.getViewerObject().getSelectionController().getTextValue(node.childNodes);
- if(_ed3!=_ed4){
- var id=node.getAttribute("id");
- node.m_tooltip=new bux.reportViewer.ReportInfo({connectId:[id],position:["above","below"],title:RV_RES.IDS_JS_RENAMED_ITEM,text:RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL+" "+node.getAttribute("rp_name")});
- node.m_tooltip.open();
- }
- }
- }
- },onMouseOutRenamedItem:function(evt){
- var node=getNodeFromEvent(evt);
- node.m_tooltip=null;
- },onDoubleClick:function(evt){
- var _ed9=ActionFactory_loadActionHandler(evt,this.getViewerObject());
- if(_ed9&&this.getViewerObject().getStatus()=="complete"){
- return _ed9.onDoubleClick(evt);
- }
- return true;
- },onMouseDown:function(evt){
- var oCV=this.getViewerObject();
- var _edc=oCV.getActionFactory();
- this._selectionAction=_edc.load("Selection");
- if(this.isMobile()){
- var _edd=oCV.getSelectionController();
- var _ede=_edd.pageClickedForMobile(evt);
- if(this.isSelectionFilterEnabled()){
- this.onSelectionChange();
- }else{
- if(_ede){
- this.onContextMenu(evt);
- }
- }
- }else{
- if(oCV.envParams["ui.action"]=="view"){
- this._selectionAction.onMouseDown(evt);
- }else{
- if(oCV.getStatus()=="complete"){
- if((evt.button==1||evt.button==0)){
- if(!this._selectionAction.onMouseDown(evt)&&!_edc.load("RenameDataItem").onMouseDown(evt)){
- this.initDragAndDrop();
- _edc.load("DragDrop").onMouseDown(evt);
- }
- }else{
- this._selectionAction.onMouseDown(evt);
- }
- }
- }
- }
- },onMouseUp:function(evt){
- if(this.isMobile()){
- return;
- }
- var _ee0=getCrossBrowserNode(evt);
- try{
- var _ee1=_ee0.nodeName.toLowerCase();
- if(_ee1=="input"||_ee1=="textarea"){
- evt.cancelBubble=true;
- return false;
- }
- }
- catch(ex){
- }
- var _ee2=false;
- if(this.getViewerObject().envParams["ui.action"]=="view"){
- setNodeFocus(evt);
- }else{
- if(this.getViewerObject().getStatus()=="complete"){
- _ee2|=DragDropAction_isDragging(evt);
- DragDropAction_onmouseup(evt);
- this.removeDragAndDrop();
- setNodeFocus(evt);
- }
- }
- if(!this._selectionAction){
- var oCV=this.getViewerObject();
- var _ee4=oCV.getActionFactory();
- this._selectionAction=_ee4.load("Selection");
- }
- this._selectionAction.onMouseUp(evt,_ee2);
- clearTextSelection();
- },getContainerTypeForSelection:function(){
- var _ee5=this.getViewerObject();
- if(_ee5){
- var _ee6=_ee5.getSelectionController();
- return _ee6.getDataContainerType();
- }
- return null;
- },onContextMenu:function(evt){
- var _ee8=this.getViewerObject();
- if(_ee8.getStatus()=="complete"||this.isSavedOutput()){
- var _ee9=_ee8.getContextMenu();
- var _eea=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(_ee8,_ee9);
- if(this.isMobile()){
- var _eeb=_ee8.getSelectionController();
- var _eec=_eeb.getContainerType();
- var _eed=_eec==="chart"?_eeb.getChartTooltip():null;
- if(this.getAnnotationStore()&&this.getAnnotationStore().hasAnnotation()){
- var _eee=this._genMobileCommentMenuItem(_eeb);
- if(_eee){
- _eea.push(_eee);
- }
- var _eef=this._genMobileCommentMenuItem();
- if(_eef){
- var _ef0=_ee8.findBlueDotMenu(_eea);
- if(_ef0){
- _ef0.push(_eef);
- }
- }
- }
- var _ef1={"context":{"event":evt,"viewerContext":{"displayValues":_eeb.getDisplayValues(),"chartTooltip":_eed,"containerType":_eec}},"menuItems":_eea};
- if(typeof console!="undefined"&&console&&console.log){
- console.log(_ef1);
- }
- this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_ef1);
- }else{
- this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_eea);
- }
- }
- },_genMobileCommentMenuItem:function(_ef2){
- var ctx=null;
- if(_ef2){
- if(_ef2.getSelections().length==1){
- ctx=_ef2.getSelections()[0].getCtxAttributeString();
- }
- if(!ctx){
- return null;
- }
- }
- var _ef4=this.getAnnotationStore().getAsJSON(ctx);
- if(_ef4.length>0){
- return {"name":RV_RES.IDS_JS_ANNOTATIONS,"label":RV_RES.IDS_JS_ANNOTATIONS,"flatten":false,"comments":_ef4};
- }
- return null;
- },initDragAndDrop:function(){
- if(window.attachEvent){
- document.attachEvent("onmouseup",DragDropAction_onmouseup);
- document.attachEvent("onmousemove",DragDropAction_onmousemove);
- }else{
- if(document.addEventListener){
- document.addEventListener("mouseup",DragDropAction_onmouseup,false);
- document.addEventListener("mousemove",DragDropAction_onmousemove,false);
- }
- }
- },removeDragAndDrop:function(){
- if(window.detachEvent){
- document.detachEvent("onmouseup",DragDropAction_onmouseup);
- document.detachEvent("onmousemove",DragDropAction_onmousemove);
- }else{
- if(document.removeEventListener){
- document.removeEventListener("mouseup",DragDropAction_onmouseup,false);
- document.removeEventListener("mousemove",DragDropAction_onmousemove,false);
- }
- }
- },onWidgetResize:function(evt){
- var _ef6=evt.payload.resize;
- if(_ef6){
- if(!this.m_visible||(this.widgetSize&&this.widgetSize.h===_ef6.h&&this.widgetSize.w===_ef6.w)){
- return;
- }
- var _ef7=!this.widgetSize;
- this.widgetSize={h:_ef6.h,w:_ef6.w};
- if(_ef7){
- return;
- }
- if(!_ef6.autoResize){
- this.executeAction(evt,"ResizeChart");
- }
- var oCV=this.getViewerObject();
- if(oCV&&oCV.getPinFreezeManager()){
- if(_ef6.autoResize){
- oCV.getPinFreezeManager().processAutoResize(_ef6.w,_ef6.h);
- }
- setTimeout(function(){
- oCV.getPinFreezeManager().refresh();
- },100);
- }
- if(oCV.getTabController()){
- oCV.getTabController().onResize(evt);
- }
- }
- },getWidgetSize:function(){
- return this.widgetSize;
- },refreshAnnotationData:function(){
- return this.getAnnotationHelper().refreshAnnotationData();
- },fetchAnnotationData:function(){
- this.getAnnotationHelper().fetchAnnotationData();
- },reportContainsDijits:function(){
- var _ef9=this.getAnnotationStore();
- var _efa=_ef9.getAll();
- for(var key in _efa){
- if(typeof _efa[key]!=="function"){
- return true;
- }
- }
- return false;
- },isSaveNecessary:function(){
- var _efc=false;
- if(this.isSavedOutput()){
- var _efd=this.getAttributeValue("mostRecentSavedOutput");
- var _efe=_efd==="true"||_efd===true;
- var _eff=this.getAttributeValue("savedOutputSearchPath");
- _efc=!_efe&&_eff==null;
- }else{
- var _f00=this.getAttributeValue("originalReport");
- var _f01=this.getAttributeValue("savedReportName")||this.getAttributeValue("savedReportPath");
- if(!this.isSavedReport(_f00,_f01)){
- _efc=true;
- }
- }
- return _efc;
- },addAsNewComment:function(_f02,text){
- this.getAnnotationHelper().addAsNewComment(_f02,text);
- },onWidgetActionDone:function(_f04){
- if(_f04&&_f04.payload&&_f04.payload.status===true){
- this.getAnnotationHelper().addNewComment(this._pendingContextId,this._pendingCellValue);
- }
- this._pendingContextId=null;
- this._pendingCellValue=null;
- },commitComment:function(_f05){
- if(!_f05.isNew){
- return null;
- }
- if(!_f05.isLoaded){
- return this.getAnnotationHelper().commitComment(_f05);
- }
- return null;
- },getAnnotationStore:function(){
- if(!this.annotationStore){
- dojo["require"]("bux.data.AnnotationStore");
- this.annotationStore=new bux.data.AnnotationStore(this,this.commitComment,this);
- }
- return this.annotationStore;
- },fireEvent:function(_f06,arg,_f08){
- if(window.gViewerLogger){
- var id=this.getViewerObject()?this.getViewerObject().getId()+" ":"";
- window.gViewerLogger.log(id+_f06,_f08,"json");
- }
- this.iContext.iEvents.fireEvent(_f06,arg,_f08);
- },onGetFilterableItems:function(evt){
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _f0b=false;
- var _f0c=this.getRAPCachedItem("filterableItems");
- if(_f0c==null&&this.isLiveReport()&&(this.getViewerObject().getStatus()=="complete"||this.isFaultStatusWithSpec())){
- this.executeAction(evt,"GetFilterableItems");
- _f0b=true;
- }else{
- if(!_f0c){
- _f0c={visible:[],hidden:[]};
- }
- if(this.isLiveReport()){
- this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f0c);
- }else{
- this.savedOutputResponseHandler("com.ibm.bux.filter.items.get.done",_f0c);
- }
- }
- return _f0b;
- }));
- },isFaultStatusWithSpec:function(){
- var oVO=this.getViewerObject();
- if(oVO.getStatus()==="fault"){
- if(oVO.envParams["ui.spec"]){
- return true;
- }
- }
- return false;
- },onGetFilterValues:function(oEvt){
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _f0f=oEvt.payload;
- if(typeof oEvt.source!="undefined"&&typeof _f0f!="undefined"){
- if(typeof _f0f.payload!="undefined"){
- _f0f=_f0f.payload;
- }
- if(typeof _f0f.source=="undefined"){
- _f0f.source=oEvt.source;
- }
- }
- var _f10=false;
- var _f11=this.isLiveReport();
- var _f12=this.getViewerObject().getStatus();
- var _f13=this.isFaultStatusWithSpec();
- if(_f11&&(_f12==="complete"||_f13)){
- var _f14=null;
- if(!_f0f.forceRefresh&&_f0f.name){
- _f14=this.getRAPCachedItem("filterValues."+_f0f.name);
- }
- if(_f14){
- this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f14);
- }else{
- this.executeAction(oEvt,"GetFilterValues");
- _f10=true;
- }
- }else{
- if(this.getViewerObject().isWorking(_f12)){
- var self=this;
- var _f16=function(){
- self.onGetFilterValues(oEvt);
- };
- setTimeout(_f16,10);
- }else{
- var _f17={};
- if(_f0f.name){
- _f17.name=_f0f.name;
- }
- this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f17);
- }
- }
- return _f10;
- }));
- },onGetFilterValuesCancel:function(evt){
- if(evt&&evt.payload){
- var oCV=this.getViewerObject();
- var _f1a=oCV.getAction("GetFilterValues");
- _f1a.setRequestParms(evt);
- var _f1b=_f1a.getActionKey();
- if(_f1b){
- oCV.getViewerDispatcher().cancelRequest(_f1b);
- }
- }
- },savedOutputResponseHandler:function(_f1c,_f1d){
- var oCV=this.getViewerObject();
- var _f1f=dojo.toJson(_f1d);
- var _f20="window[\"oCV"+oCV.getId()+"\"].getViewerWidget().fireEvent(\""+_f1c+"\", null, "+_f1f+");";
- if(oCV){
- var _f21=window["oCV"+oCV.getId()];
- if(typeof _f21=="object"){
- setTimeout(_f20,1);
- }
- }
- return _f20;
- },handleGetFilterableItemsResponse:function(_f22){
- var _f23={};
- var json=this.getJsonFromResponse(_f22);
- if(json){
- _f23=json.filterableItems;
- if(!_f23){
- _f23={"visible":[],"invisible":[]};
- }
- this.addToRAPCache("filterableItems",_f23);
- }
- this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f23);
- },handleGetFilterValuesResponse:function(_f25,_f26){
- var _f27={};
- var json=this.getJsonFromResponse(_f25);
- if(json&&json.filterValues){
- _f27=json.filterValues;
- if(_f27&&_f27.name){
- this.addToRAPCache("filterValues."+_f27.name,_f27);
- }
- }
- if(_f26&&_f26.name&&!_f27.name){
- _f27.name=_f26.name;
- }
- _f27=dojo.clone(_f27);
- this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f27);
- },getJsonFromResponse:function(_f29){
- var json=null;
- if(_f29&&_f29.m_jsonResponse&&_f29.m_jsonResponse.json){
- json=dojo.eval("("+_f29.m_jsonResponse.json+")");
- }else{
- if(_f29&&_f29.responseText){
- json=dojo.eval("["+_f29.responseText+"]");
- if(json&&json[0]){
- json=json[0];
- }
- }
- }
- return json;
- },onContextChanged:function(evt){
- if(evt){
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _f2c=false;
- var _f2d=dojo.clone(evt);
- var _f2e=this._getFilterPayload(_f2d);
- this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_f2e);
- this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_f2e);
- var _f2f=this.getViewerObject();
- var _f30=_f2f.getRAPReportInfo();
- if(_f30&&(_f30.containsFilters()||_f30.hasSlider())){
- var _f31=_f2e["com.ibm.widget.context"].values;
- var _f32=this.m_oWidgetContextManager.getItemsInItemSpecification(_f2e);
- var _f33=dojo.clone(_f32);
- for(var _f34 in _f33){
- if(!_f30.isReferenced(_f34)&&_f32[_f34].values){
- var mun=_f32[_f34].values[0].mun;
- var _f36=_f30.hunHasFilterOrSlider(mun);
- if(_f36&&!_f32[_f36]){
- _f32[_f36]=_f32[_f34];
- delete _f32[_f34];
- _f31[_f36]=_f31[_f34];
- delete _f31[_f34];
- }
- }
- }
- }
- _f2d.payload=_f2e;
- _f2c=this.onGenericSelectValueControl(_f2d,true);
- return _f2c;
- }),evt.source);
- }
- },broadcastParameterChange:function(_f37){
- var _f38={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f37};
- this.fireEvent("com.ibm.widget.contextChanged.prompt",null,_f38);
- },broadcastContextChange:function(_f39){
- if(this.isSelectionFilterEnabled()){
- var _f3a={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f39,"com.ibm.widget.context.bux.selection":{"selection":{"id":this.getWidgetId(),"valueType":"string"}}};
- this.m_oWidgetContextManager.updateFilterContext(_f3a);
- this.m_oWidgetContextManager.setSelectionFilterObjects(null);
- this._fireContextChangedEvent(_f3a,true);
- }
- },onGenericDrill:function(evt){
- this.m_handleDrill=false;
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){
- var _f3c=false;
- if(!(evt&&evt.payload)||this.isLimitedInteractiveMode()){
- return _f3c;
- }
- if(evt.payload.cv_id===this.iContext.widgetId){
- return _f3c;
- }
- var _f3d=this.m_oWidgetContextManager.getDrillActionType(evt.payload);
- var _f3e=this.m_oWidgetContextManager.genDrillSpecObjects(evt.payload);
- var _f3f=null;
- if(_f3d==="DrillDown"){
- _f3f=this.getViewerObject().getAction("DrillDown");
- }else{
- if(_f3d==="DrillUp"){
- _f3f=this.getViewerObject().getAction("DrillUp");
- }else{
- return _f3c;
- }
- }
- _f3f.setKeepFocusOnWidget(false);
- if(this.getViewerObject().isMetadataEmpty()||!this.shouldReportBeRunOnAction()){
- _f3f.setUseReportInfoSelection(true);
- }
- if(_f3f.parseDrillSpecObjects(_f3e)){
- if(!this.shouldReportBeRunOnAction()){
- this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true);
- }
- _f3f.execute();
- _f3c=true;
- }
- this.m_handleDrill=true;
- return _f3c;
- }));
- },setDoGetParametersOnLoad:function(_f40){
- this.m_doGetParametersOnLoad=_f40;
- },getDoGetParametersOnLoad:function(){
- return this.m_doGetParametersOnLoad;
- },onPromptLegacyPayload:function(evt){
- try{
- if(evt.payload.cv_id===this.iContext.widgetId){
- return false;
- }
- var _f42=null;
- this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(_f43){
- _f42=false;
- if(this.isSavedOutput()){
- return _f42;
- }
- if(this.promptParametersRetrieved===false){
- var _f44=this.getViewerObject().getAction("GetParameters");
- _f44.setRequestParms(evt.payload);
- _f44.execute();
- _f42=true;
- }else{
- _f42=this.sharePrompts(evt.payload);
- }
- return _f42;
- }));
- return _f42;
- }
- catch(e){
- return false;
- }
- },sharePrompts:function(_f45){
- var _f46=this.getViewerObject().getAction("SharePrompt");
- _f46.setRequestParms(_f45);
- if(this.shouldReportBeRunOnAction()){
- var _f47=this.getViewerObject().getDrillResetHUNs(_f45);
- if(!_f47||_f47.length===0){
- return _f46.executePrompt();
- }else{
- var _f48={"drilledResetHUNs":_f47,"promptValues":_f46.getPromptValues()};
- this.getViewerObject().executeAction("DrillReset",_f48);
- }
- return true;
- }
- var _f49=this.getLoadManager().getDelayedLoadingContext();
- _f49.setPromptValues(_f46.getPromptValues());
- _f49.setCascadingPromptParamsToClear(_f45.clearCascadePromptParams);
- return false;
- },onGenericPrompt:function(evt){
- this.clearRAPCacheFilterValues();
- this.m_oWidgetContextManager.handleIncomingPromptEvent(evt);
- },setPromptParametersRetrieved:function(_f4b){
- this.promptParametersRetrieved=_f4b;
- },getEnvParam:function(_f4c){
- return this.getViewerObject().envParams[_f4c];
- },destroy:function(){
- var _f4d=this.getViewerObject();
- if(_f4d){
- if(this.isSelectionFilterEnabled()){
- if(this.selectionFilterSent()){
- this.clearSelectionFilter();
- }
- }
- if(this.onUnloadInProgress){
- _f4d.destroy(false);
- }else{
- _f4d.destroy(true);
- }
- var _f4e=function(_f4f){
- if(_f4f&&_f4f.parentNode&&_f4f.parentNode.removeChild){
- _f4f.parentNode.removeChild(_f4f);
- }
- };
- var _f50=dojo.query("[namespaceId='"+this.getViewerId()+"'],[namespaceId='"+this.m_sScriptLoaderNamespace+"']",document.getElementsByTagName("head").item(0));
- if(_f50&&_f50.length>0){
- _f50.forEach(_f4e);
- }
- _f50=dojo.query("> [namespaceId=\""+this.getViewerId()+"\"]",document.getElementsByTagName("body").item(0));
- if(typeof _f50!="undefined"&&_f50&&_f50.length>0){
- _f50.forEach(_f4e);
- }
- if(this.getAnnotationHelper()){
- this.getAnnotationHelper()._cleanupPreviousAnnotations();
- }
- }
- if(this.annotationHelper){
- this.annotationHelper.m_viewerIWidget=null;
- }
- this.annotationHelper=null;
- if(this.savedOutput){
- this.savedOutput.iWidget=null;
- }
- this.savedOutput=null;
- if(this.m_oLoadManager){
- this.m_oLoadManager.m_oWidget=null;
- }
- this.m_oLoadManager=null;
- if(this.m_oWidgetContextManager){
- this.m_oWidgetContextManager.m_widget=null;
- }
- this.m_oWidgetContextManager=null;
- this.removeWindowEventListeners();
- if(this.undoRedoQueue){
- GUtil.destroyProperties(this.undoRedoQueue);
- delete this.undoRedoQueue;
- }
- GUtil.destroyProperties(this.getAnnotationStore());
- delete this.getAnnotationStore();
- GUtil.destroyProperties(this.savedOutput);
- delete this.savedOutput;
- delete this.m_oCV;
- _f4d=null;
- },setSavedOutputsCMResponse:function(_f51){
- this.savedOutputsCMResponse=_f51;
- if(_f51==null){
- var _f52=this.getViewerObject().getActionFactory();
- var _f53=_f52.load("Snapshots");
- _f53.resetMenu();
- }
- },getSavedOutputsCMResponse:function(){
- if(typeof this.savedOutputsCMResponse=="undefined"||this.savedOutputsCMResponse==null){
- return null;
- }
- return this.savedOutputsCMResponse;
- },setSavedOutputSearchPath:function(_f54){
- this.m_savedOutputSearchPath=_f54;
- },getSavedOutputSearchPath:function(){
- if(typeof this.m_savedOutputSearchPath=="undefined"){
- return null;
- }
- return this.m_savedOutputSearchPath;
- },initializeProperties:function(){
- if(this.properties){
- var _f55=this.getViewerObject();
- this.properties.initialize(_f55.envParams);
- }
- },addToRAPCache:function(name,_f57){
- if(!this.m_RAPCache){
- this.m_RAPCache={};
- }
- this.m_RAPCache[name]=_f57;
- },getRAPCachedItem:function(name){
- if(this.m_RAPCache&&typeof this.m_RAPCache[name]!="undefined"){
- return this.m_RAPCache[name];
- }
- return null;
- },clearRAPCacheFilterValues:function(){
- for(var key in this.m_RAPCache){
- if(key.indexOf("filterValues.")===0){
- delete this.m_RAPCache[key];
- }
- }
- },clearRAPCache:function(){
- this.m_RAPCache=null;
- },reset:function(){
- this.m_bCallGetAnnotations=true;
- this.promptParametersRetrieved=false;
- this.getViewerObject().envParams["reportPrompts"]="";
- this.setSavedOutputsCMResponse(null);
- this.getUndoRedoQueue().clearQueue();
- if(this.isSelectionFilterEnabled){
- this.clearSelectionFilter();
- }
- this.m_bSelectionFilterSwitch=false;
- },handleFault:function(){
- if(typeof console!="undefined"&&console&&console.log){
- console.log("ViewrIWidget:handle fault is deprecated and should not be used anymore.");
- }
- var _f5a=this.getViewerObject();
- var _f5b=new RequestHandler(_f5a);
- _f5b.onFault();
- },disableListenToForGlobalPrompt:function(){
- this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:["com.ibm.widget.contextChanged.prompt"]}});
- var _f5c=this.getViewerObject();
- if(window.gaRV_INSTANCES){
- var _f5d={};
- _f5d[this.iContext.widgetId]={blockedEvents:["com.ibm.widget.contextChanged.prompt"]};
- for(var _f5e=0;_f5e<window.gaRV_INSTANCES.length;_f5e++){
- if(window.gaRV_INSTANCES[_f5e].getId()!=_f5c.getId()){
- var _f5f=window.gaRV_INSTANCES[_f5e].getViewerWidget();
- if(_f5f){
- _f5f.iContext.iEvents.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_f5d);
- }
- }
- }
- }
- },disableListenToForEvent:function(_f60){
- this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:_f60}});
- var _f61=this.getViewerObject();
- if(window.gaRV_INSTANCES){
- var _f62={};
- _f62[this.iContext.widgetId]={blockedEvents:_f60};
- for(var _f63=0;_f63<window.gaRV_INSTANCES.length;_f63++){
- if(window.gaRV_INSTANCES[_f63].getId()!=_f61.getId()){
- var _f64=window.gaRV_INSTANCES[_f63].getViewerWidget();
- if(_f64){
- _f64.iContext.iEvents.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_f62);
- }
- }
- }
- }
- },handlePassportErrorFromDispatcher:function(){
- if(this.viewerWidgetLastAction){
- var _f65=GUtil.generateCallback(this[this.viewerWidgetLastAction.functionName],this.viewerWidgetLastAction.param,this);
- dojo["require"]("bux.dialogs.IFrameDialog");
- var _f66=new bux.dialogs.LogonDialog({okHandler:_f65,cancelHandler:dojo.hitch(this,function(){
- this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"});
- })});
- _f66.startup();
- _f66.show();
- }
- },showErrorMessage:function(_f67){
- var _f68=this.getViewerObject();
- if(_f68){
- this.m_widgetErrorDlg=new FaultMessageDialog(_f68,_f67);
- this.m_widgetErrorDlg.renderInlineDialog();
- }
- },getErrorDlg:function(){
- if(this.m_widgetErrorDlg){
- return this.m_widgetErrorDlg;
- }
- return null;
- },setErrorDlg:function(dlg){
- this.m_widgetErrorDlg=dlg;
- },clearErrorDlg:function(dlg){
- if(this.getErrorDlg()!==null){
- this.m_widgetErrorDlg.ok();
- }
- },onOpen:function(evt){
- if(evt&&evt.payload&&evt.payload.author){
- this.m_sDashboardOwnerId=evt.payload.author.cm$searchPath;
- }
- },onNotifyPreviousEventsAreDone:function(evt){
- this.m_resizeReady=true;
- },isDashboardOwner:function(){
- if(typeof this.m_sDashboardOwnerId!=="undefined"&&typeof this.m_sUserId!=="undefined"){
- return this.m_sDashboardOwnerId===this.m_sUserId;
- }
- },isCurrentUser:function(user){
- return this.m_sUserId===user;
- },findContainerDiv:function(){
- var _f6e=dojo.byId("RVContent"+this.getViewerObject().getId());
- var _f6f=_f6e;
- while(_f6f){
- if(_f6f.style&&_f6f.style.height&&_f6f.style.height.indexOf("px")!=-1){
- return _f6f;
- }
- _f6f=_f6f.parentNode;
- }
- if(typeof console!="undefined"&&console&&console.log){
- console.log("ViewrIWidget: Could not find the container div.");
- }
- return _f6e;
- },getPaneOnRight:function(){
- return this.getAttributeValue("paneOnRight");
- },getWidgetContextManager:function(){
- return this.m_oWidgetContextManager;
- },getInfoBarRenderedState:function(){
- return this.m_oInfoBarRenderedState;
- },refreshInfoBarRenderedState:function(_f70){
- var len=_f70.length;
- var _f72={};
- for(var idx=0;idx<len;idx++){
- var sId=_f70[idx];
- if(this.m_oInfoBarRenderedState[sId]){
- _f72[sId]=this.m_oInfoBarRenderedState[sId];
- }
- }
- this.m_oInfoBarRenderedState=_f72;
- },onGetWidgetContext:function(_f75){
- var _f76=this.getWidgetContextManager().getWidgetContextObject();
- if(!_f76){
- _f76={};
- }
- this.fireEvent("com.ibm.widget.context.get.done",null,_f76);
- },onGetCanvasContextDone:function(evt){
- },onSetVisible:function(evt){
- if(this.m_debugDelayedViewerLoadingMode===2){
- return;
- }
- if(evt&&evt.payload){
- this.m_visible=evt.payload.isVisible?true:false;
- if(!this.m_visible){
- if(this._cssLimitReached){
- this.cleanupStyles();
- }
- return;
- }
- if(!this.getLoadManager().isViewerLoadInitiated()){
- this.postReport(null);
- }else{
- this._updateOnVisible();
- }
- }
- },_updateOnVisible:function(){
- var _f79=this.getLoadManager();
- if(_f79.isViewerReady()){
- var oCV=this.getViewerObject();
- if(this._cssLimitReached){
- this.reloadStyles();
- }
- if(this.isSavedOutput()){
- _f79.getDelayedLoadingContext().setForceRunReport(false);
- return;
- }
- if(!_f79.getDelayedLoadingContext().isEmpty()){
- _f79.runWhenHasViewer(function(){
- _f79.runningReport();
- var _f7b=oCV.getActionFactory();
- var _f7c=_f7b.load("BuxRunReport");
- var _f7d=_f79.getDelayedLoadingContext();
- var _f7e={promptValues:_f7d.getPromptValues(),clearCascadeParamsList:_f7d.getCascadingPromptParamsToClear()};
- _f7c.setRequestParams(_f7e);
- if(!oCV.getConversation()){
- _f7c.setSendParameterValues(true);
- }
- var _f7f=_f7c.execute();
- _f79.getDelayedLoadingContext().reset();
- return _f7f;
- });
- }else{
- if(oCV.getPinFreezeManager()){
- oCV.getPinFreezeManager().onSetVisible();
- }
- }
- }else{
- _f79.setOnEmptyCallback(dojo.hitch(this,function(){
- if(this.isVisible()){
- this._updateOnVisible();
- }
- }));
- }
- },shouldReportBeRunOnAction:function(){
- return (this.isVisible()&&this.getLoadManager().isViewerLoaded()&&this.getLoadManager().canRunReports());
- },isVisible:function(){
- if(this.m_debugDelayedViewerLoadingMode===2){
- return true;
- }
- if(this.m_visible===null){
- var _f80=this.iContext.getItemSet("buxdelayedload",false);
- if(_f80){
- this.m_visible=(_f80.getItemValue("widgetVisible")==="true");
- }else{
- this.m_visible=true;
- }
- }
- return this.m_visible;
- },isPastedWidget:function(){
- return this._pastedWidget;
- },setWidgetCopyPasteParameters:function(){
- this.copyPasteResource=this.getAttributeValue("resource");
- if(this.copyPasteResource){
- this._pastedWidget=true;
- if(this.getAttributeValue("copy.ciPublishedReportPath")&&this.getAttributeValue("originalReport")==null&&this.getSavedItem()==null){
- this.ciPublishedReportPath=this.getAttributeValue("copy.ciPublishedReportPath");
- }else{
- if(this.getAttributeValue("originalReport")==null){
- this.ciPublishedReportPath=this.getSavedItem();
- this.setAttributeValue("copy.ciPublishedReportPath",this.ciPublishedReportPath);
- }
- }
- this.removeAttributeValue("savedReportPath");
- this.removeAttributeValue("savedReportPath.resource");
- this.removeAttributeValue("resource");
- }
- },postSetWidgetCopyPasteParameters:function(){
- if(this.copyPasteResource){
- this.removeAttributeValue("copy.conversation");
- this.copyPasteResource=null;
- }
- },isSelectionFilterEnabled:function(){
- return this.m_bSelectionFilterSwitch;
- },toggleSelectionFilterSwitch:function(){
- this.m_bSelectionFilterSwitch=!this.isSelectionFilterEnabled();
- var _f81=this.getViewerObject().getSelectionController();
- if(_f81){
- if(this.isSelectionFilterEnabled()){
- _f81.setSelectionStyles(_f81.FILTER_SELECTION_STYLE);
- _f81.repaintSelections();
- }else{
- _f81.resetAll();
- }
- }
- },preprocessPageClicked:function(_f82,evt){
- if(!this.isSelectionFilterEnabled()){
- return;
- }
- var _f84=this.getViewerObject().getSelectionController();
- _f84.setAllowHorizontalDataValueSelection(true);
- if(_f82){
- if(!_f84.hasSavedSelections()){
- _f84.saveSelections();
- }
- _f84.setSelectionStyles(_f84.FILTER_SELECTION_CONTEXT_MENU_STYLE);
- }else{
- _f84.setSelectionStyles(_f84.FILTER_SELECTION_STYLE);
- _f84.clearSavedSelections();
- }
- },ignoreEvent:function(evt){
- stopEventBubble(evt);
- },updateDrillThroughLinks:function(){
- var oCV=this.getViewerObject();
- if(!oCV){
- return;
- }
- var _f87=this.isSelectionFilterEnabled();
- var _f88=oCV.envParams["ui.action"]=="view"||oCV.envParams["ui.action"]=="buxView";
- var _f89=_f87?"":"_temp";
- var _f8a=_f87?"_temp":"";
- var _f8b=["onclick","onkeypress","style"];
- var _f8c=_f88?"onclick"+_f89:"dttargets";
- var _f8d=document.getElementById("RVContent"+oCV.getId());
- var _f8e=getElementsByAttribute(_f8d,"*",_f8c);
- if(!_f8e){
- return;
- }
- for(var i=0;i<_f8e.length;i++){
- var node=_f8e[i];
- if(node.nodeName.toLowerCase()!=="area"){
- if(_f88){
- var _f91=node.getAttribute("onclick"+_f89);
- if(!_f91||(_f91.indexOf("doSingleDrillThrough")==-1&&_f91.indexOf("doMultipleDrillThrough"))){
- continue;
- }
- for(var ii=0;ii<_f8b.length;ii++){
- var _f93=_f8b[ii];
- if(node.getAttribute(_f93+_f89)){
- this._renameAttribute(node,_f93+_f89,_f93+_f8a);
- }
- }
- }
- this._updateCellStyle(node,_f87);
- }
- }
- },_updateCellStyle:function(node,_f95){
- if(node.nodeType==3){
- return;
- }
- if(_f95&&node.className==="hy"){
- this._renameAttribute(node,"class","class_temp");
- }else{
- if(!_f95&&node.getAttribute("class_temp")){
- this._renameAttribute(node,"class_temp","class");
- }
- }
- if(node.childNodes){
- for(i=0;i<node.childNodes.length;i++){
- this._updateCellStyle(node.childNodes[i],_f95);
- }
- }
- },_renameAttribute:function(node,_f97,_f98){
- node.setAttribute(_f98,node.getAttribute(_f97));
- node.removeAttribute(_f97);
- },addButtonToSavedToolbarButtons:function(name,_f9a,_f9b){
- if(typeof name!="undefined"&&name!=null){
- this.savedToolbarButtons[name]={};
- this.savedToolbarButtons[name]["button"]=_f9a;
- this.savedToolbarButtons[name]["position"]=_f9b;
- }
- },getButtonFromSavedToolbarButtons:function(name){
- return this.savedToolbarButtons[name];
- },removeFromSavedToolbarButtons:function(name){
- if(typeof this.savedToolbarButtons[name]!="undefined"&&this.savedToolbarButtons[name]!=null){
- delete this.savedToolbarButtons[name];
- }
- }});
- function UndoRedoQueue(_f9e){
- this.m_queue=[];
- this.m_queueLimit=20;
- this.m_iCurrentPos=0;
- this.m_widget=_f9e;
- this.m_bUndoRedoCalled=false;
- this.m_lastAction=null;
- this.currentUndoObj=null;
- this.beenUsed=false;
- this.m_originalSpec=null;
- };
- UndoRedoQueue.prototype.setOriginalSpec=function(spec){
- if(this.m_queue.length==0){
- this.m_originalSpec=spec;
- }
- };
- UndoRedoQueue.prototype.clearQueue=function(){
- while(this.m_queue.length>0){
- this.m_queue.pop();
- }
- this.m_iCurrentPos=0;
- };
- UndoRedoQueue.prototype.getPosition=function(){
- return this.m_iCurrentPos;
- };
- UndoRedoQueue.prototype.hasBeenUsed=function(){
- return this.beenUsed;
- };
- UndoRedoQueue.prototype.getLength=function(){
- return this.m_queue.length;
- };
- UndoRedoQueue.prototype.initUndoObj=function(obj){
- if(this.m_queue.length==0){
- var oCV=this.m_widget.getViewerObject();
- var spec=this.m_originalSpec==null?oCV.envParams["ui.spec"]:this.m_originalSpec;
- this.m_originalSpec=null;
- this.m_queue.push({"spec":spec,"parameters":oCV.getExecutionParameters(),"tooltip":obj.tooltip,"infoBar":oCV.envParams["rapReportInfo"],"widgetProperties":this.m_widget.getProperties().getOldProperties(),"hasAVSChart":oCV.hasAVSChart(),"undoType":"server"});
- this.m_iCurrentPos=this.m_queue.length-1;
- this.beenUsed=true;
- }
- this.currentUndoObj=obj;
- };
- UndoRedoQueue.prototype.add=function(obj){
- if(this.m_bUndoRedoCalled){
- this.m_bUndoRedoCalled=false;
- return;
- }else{
- if(this.currentUndoObj==null){
- return;
- }else{
- if(obj.reportUpdated==true){
- while(this.m_queue.length>this.m_queueLimit){
- this.m_queue.shift();
- }
- this.clearEnd();
- var _fa4=this.m_widget.getViewerObject();
- if(this.currentUndoObj.saveSpec==true||_fa4.envParams["ui.doNotUseConversationForUndo"]==="true"){
- this.currentUndoObj.spec=_fa4.envParams["ui.spec"];
- this.currentUndoObj.parameters=_fa4.getExecutionParameters();
- }else{
- this.currentUndoObj.conversation=_fa4.getConversation();
- }
- if(_fa4.envParams["rapReportInfo"]){
- this.currentUndoObj.infoBar=_fa4.envParams["rapReportInfo"];
- }
- this.currentUndoObj.widgetProperties=this.m_widget.getProperties().getUndoInfo();
- this.currentUndoObj.palette=_fa4.m_sPalette;
- if(this.m_widget.getProperties().getFlashCharts()){
- this.currentUndoObj.hasAVSChart=_fa4.hasAVSChart();
- }
- this.currentUndoObj.undoType="server";
- this.finalizeAdd();
- }
- }
- }
- };
- UndoRedoQueue.prototype.addClientSideUndo=function(obj){
- if(this.m_bUndoRedoCalled){
- this.m_bUndoRedoCalled=false;
- return;
- }
- if(obj.undoCallback&&obj.redoCallback){
- this.initUndoObj(obj);
- this.currentUndoObj.undoType="client";
- this.finalizeAdd();
- }
- };
- UndoRedoQueue.prototype.finalizeAdd=function(){
- this.m_queue.push(this.currentUndoObj);
- this.m_iCurrentPos=this.m_queue.length-1;
- this.m_bUndoRedoCalled=false;
- this.m_lastAction="";
- this.currentUndoObj=null;
- this.beenUsed=true;
- };
- UndoRedoQueue.prototype.moveBack=function(){
- if(this.m_iCurrentPos<=0){
- return null;
- }
- var _fa6=this.m_queue[this.m_iCurrentPos].undoType;
- this.m_bUndoRedoCalled=true;
- this.m_lastAction="undo";
- this.m_iCurrentPos--;
- this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]};
- if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){
- this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette;
- if(_fa6=="client"){
- return this.m_queue[this.m_iCurrentPos+1];
- }
- var _fa7=this.m_iCurrentPos;
- while(_fa7>0&&this.m_queue[_fa7]&&this.m_queue[_fa7].undoType!="server"){
- _fa7--;
- }
- return this.m_queue[_fa7];
- }
- return null;
- };
- UndoRedoQueue.prototype.moveForward=function(){
- if(this.m_iCurrentPos>=this.m_queue.length){
- return null;
- }
- this.m_bUndoRedoCalled=true;
- this.m_iCurrentPos++;
- this.m_lastAction="redo";
- this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]};
- if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){
- this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette;
- return this.m_queue[this.m_iCurrentPos];
- }
- return null;
- };
- UndoRedoQueue.prototype.clearEnd=function(){
- while(this.m_queue.length-1>this.m_iCurrentPos){
- this.m_queue.pop();
- }
- };
- UndoRedoQueue.prototype.handleCancel=function(){
- if(this.m_lastAction=="undo"){
- this.m_iCurrentPos++;
- }else{
- if(this.m_lastAction=="redo"){
- this.m_iCurrentPos--;
- }
- }
- if(this.m_lastAction=="redo"||this.m_lastAction=="undo"){
- var _fa8=this.m_widget.getProperties();
- var _fa9=this.m_queue[this.m_iCurrentPos];
- if(_fa8&&_fa9&&_fa9.widgetProperties){
- _fa8.doUndo(_fa9.widgetProperties);
- }
- }
- this.m_lastAction="";
- this.m_bUndoRedoCalled=false;
- this.currentUndoObj=null;
- };
- UndoRedoQueue.prototype.handleFault=function(){
- this.currentUndoObj=null;
- this.m_bUndoRedoCalled=false;
- };
- UndoRedoQueue.prototype.getUndoTooltip=function(){
- if(this.m_iCurrentPos>0){
- return RV_RES.IDS_JS_UNDO+" "+this.m_queue[this.m_iCurrentPos].tooltip;
- }
- return RV_RES.IDS_JS_UNDO;
- };
- UndoRedoQueue.prototype.getRedoTooltip=function(){
- if(this.m_iCurrentPos<(this.m_queue.length-1)){
- return RV_RES.IDS_JS_REDO+" "+this.m_queue[this.m_iCurrentPos+1].tooltip;
- }
- return RV_RES.IDS_JS_REDO;
- };
- function CIWidgetSavedOutput(_faa){
- this.iWidget=_faa;
- this.bContainsChart=false;
- this.bContainsDrillThrough=false;
- this.bPagedOutput=true;
- };
- CIWidgetSavedOutput.prototype.getIWidget=function(){
- return this.iWidget;
- };
- CIWidgetSavedOutput.prototype.isPagedOutput=function(){
- return this.bPagedOutput;
- };
- CIWidgetSavedOutput.prototype.setPagedOutput=function(_fab){
- this.bPagedOutput=_fab;
- };
- CIWidgetSavedOutput.prototype.getCognosViewer=function(){
- return this.getIWidget().getViewerObject();
- };
- CIWidgetSavedOutput.prototype.getIframeWindow=function(){
- return this.savedOutputWindow;
- };
- CIWidgetSavedOutput.prototype.getSavedOutputDiv=function(){
- return this.savedOutputDiv;
- };
- CIWidgetSavedOutput.prototype.render=function(){
- if(this.isPagedOutput()&&this.getFirstPage()){
- this.currentPageIndex=0;
- this._showPages([this.getFirstPage()]);
- }else{
- if(this.tabbedSavedOutput&&this.currentPageIndex&&this.pageNodes){
- var _fac=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
- this.switchSavedOutputTab(_fac);
- }else{
- if(this.getCognosViewer()&&this.getCognosViewer().getCurrentlySelectedTab()){
- this.switchSavedOutputTab(this.getCognosViewer().getCurrentlySelectedTab());
- }else{
- this.showHTMLFragment(this.getIframeWindow().document.body.innerHTML);
- }
- }
- }
- };
- CIWidgetSavedOutput.prototype.outputDoneLoading=function(){
- if(window["gReportWidgetLoadQueue"]){
- window["gReportWidgetLoadQueue"].widgetDoneLoading(this.getIWidget());
- }
- this.getIWidget().setOriginalFormFields(null);
- var _fad=this.getCognosViewer();
- var _fae=_fad.getId();
- this.savedOutputWindow=dojo.byId("CVHiddenIFrame"+_fae).contentWindow;
- this.savedOutputDiv=dojo.byId("CVSavedOutputDiv"+_fae);
- var sc=_fad.getSelectionController();
- if(!sc.hasContextData()&&this.savedOutputWindow.onLoadEvent){
- this.savedOutputWindow.onLoadEvent();
- }
- this._populatePageNode();
- var _fb0=dojo.byId("_"+this.iWidget.iContext.widgetId+"_cv");
- this.loadStyleInfoFromIframe(_fb0);
- this.bContainsChart=typeof this.savedOutputWindow.displayChart=="function"?true:false;
- this.bContainsDrillThrough=typeof this.savedOutputWindow.drillThroughTarget!="undefined"?true:false;
- this.render();
- this.getMetaDataFromIFrame();
- if(this.bContainsDrillThrough){
- window[_fae+"drillTargets"]=this.getIframeWindow().drillTargets;
- }
- _fad.fillInContextData();
- _fad.updateBorderCollapse();
- this.getIWidget().updateToolbar();
- _fad.setReportRenderingDone(true);
- var _fb1=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget());
- var _fb2=this.getPageContextData(_fb1);
- if(_fb2==0){
- this.getIWidget().fetchAnnotationData();
- }
- this.fixDuplicateFormFields();
- this.getIWidget().getLoadManager().processQueue();
- delete _fad.envParams["cv.outputKey"];
- this.getIWidget().setXNodeId(null);
- var _fb3=this.getIWidget();
- var _fb4=function(){
- _fb3.iContext.iEvents.fireEvent("com.ibm.bux.widget.render.done",null,{});
- _fad.renderTabs();
- if(_fad.getCurrentlySelectedTab()!=null){
- _fb3.getSavedOutput().tabbedSavedOutput=true;
- _fb3.getSavedOutput().switchSavedOutputTab(_fad.getCurrentlySelectedTab());
- }
- };
- setTimeout(_fb4,100);
- };
- CIWidgetSavedOutput.prototype._populatePageNode=function(){
- this.pageNodes=[];
- var node=this.getIframeWindow().document.body.firstChild;
- while(node){
- if(node.nodeName.toLowerCase()=="table"){
- this.pageNodes.push(node);
- }
- node=node.nextSibling;
- }
- };
- CIWidgetSavedOutput.prototype.switchSavedOutputTab=function(_fb6,_fb7){
- if(!this.pageNodes){
- return;
- }
- if(_fb7){
- if(!this.lastVisitedPage){
- this.lastVisitedPage={};
- }
- if(this.isPagedOutput()){
- var _fb8=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
- this.lastVisitedPage[_fb8]=this.currentPageIndex;
- if(this.lastVisitedPage[_fb6]){
- this.currentPageIndex=this.lastVisitedPage[_fb6];
- this._showPages([this.pageNodes[this.currentPageIndex]]);
- return;
- }
- }
- }
- var _fb9=[];
- for(var i=0;i<this.pageNodes.length;i++){
- var node=this.pageNodes[i];
- if(node&&node.getAttribute&&node.getAttribute("tabid")==_fb6){
- _fb9.push(node);
- this.currentPageIndex=i;
- if(this.isPagedOutput()){
- break;
- }
- }
- }
- this._showPages(_fb9);
- };
- CIWidgetSavedOutput.prototype.fixDuplicateFormFields=function(){
- var _fbc=document.getElementById("formWarpRequest"+this.getCognosViewer().getId());
- if(_fbc){
- for(var _fbd=0;_fbd<_fbc.elements.length;_fbd++){
- var name=_fbc.elements[_fbd].name;
- if(name&&name.length>0){
- if(_fbc[name].length>1){
- var _fbf=_fbc[name][_fbc[name].length-1].value;
- while(_fbc[name].length>1){
- _fbc[name][1].parentNode.removeChild(_fbc[name][1]);
- }
- if(_fbc[name][0]){
- _fbc[name][0].value=_fbf;
- }
- _fbc[name].value=_fbf;
- }
- }
- }
- }
- };
- CIWidgetSavedOutput.prototype.getPageContextData=function(_fc0){
- var _fc1={};
- dojo.query("[ctx]",this.getSavedOutputDiv()).forEach(function(item){
- var ctx=item.getAttribute("ctx");
- var _fc4=ctx.split(":");
- for(var i=0;i<_fc4.length;i++){
- var _fc6=_fc4[i];
- if(_fc6&&_fc6.length>0){
- _fc1[_fc6]=true;
- }
- }
- });
- var _fc7=[];
- for(var item in _fc1){
- _fc7.push(item);
- }
- return this.getCognosViewer().getSelectionController().fetchContextData(_fc7,_fc0);
- };
- CIWidgetSavedOutput.prototype.loadStyleInfoFromIframe=function(_fc9){
- var _fca=null;
- var _fcb=this.savedOutputWindow.document;
- for(var _fcc=0;_fcc<_fcb.childNodes.length;_fcc++){
- if(_fcb.childNodes[_fcc].childNodes&&_fcb.childNodes[_fcc].childNodes.length>0){
- _fca=_fcb.childNodes[_fcc];
- break;
- }
- }
- window.gScriptLoader.loadStyles(_fca.firstChild,this.iWidget.getViewerId());
- var _fcd=dojo.query("link",_fca);
- var _fce="";
- for(i=0;i<_fcd.length;i++){
- var href=_fcd[i].getAttribute("href");
- if(href){
- _fce+="<link href=\""+href+"\" />";
- }
- }
- window.gScriptLoader.loadCSS(_fce,_fc9,true,this.iWidget.getViewerId());
- };
- CIWidgetSavedOutput.prototype.getFirstPage=function(){
- return this.pageNodes[0];
- };
- CIWidgetSavedOutput.prototype.getLastPage=function(){
- return this.pageNodes?this.pageNodes[this.pageNodes.length-1]:null;
- };
- CIWidgetSavedOutput.prototype.writeNavLinks=function(){
- var _fd0="";
- if(this.isPagedOutput()){
- if(this.tabbedSavedOutput&&!isNaN(this.currentPageIndex)){
- var _fd1=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
- if(this.currentPageIndex>0&&this.pageNodes[this.currentPageIndex-1].getAttribute("tabid")==_fd1){
- _fd0+=" firstPage previousPage ";
- }
- if(this.currentPageIndex<(this.pageNodes.length-1)&&this.pageNodes[this.currentPageIndex+1].getAttribute("tabid")==_fd1){
- _fd0+=" nextPage lastPage ";
- }
- }else{
- if(this.currentPageIndex>0){
- _fd0+=" firstPage previousPage ";
- }
- if(this.currentPageIndex<(this.pageNodes.length-1)){
- _fd0+=" nextPage lastPage ";
- }
- }
- }
- this.getCognosViewer().writeNavLinks(_fd0,true);
- };
- CIWidgetSavedOutput.prototype.pageAction=function(_fd2){
- switch(_fd2){
- case "firstPage":
- if(this.tabbedSavedOutput){
- var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
- for(var i=0;i<this.pageNodes.length;i++){
- var node=this.pageNodes[i];
- if(node&&node.getAttribute&&node.getAttribute("tabid")==_fd3){
- this.currentPageIndex=i;
- break;
- }
- }
- }else{
- this.currentPageIndex=0;
- }
- break;
- case "previousPage":
- this.currentPageIndex=this.currentPageIndex-1;
- break;
- case "nextPage":
- this.currentPageIndex=this.currentPageIndex+1;
- break;
- case "lastPage":
- if(this.tabbedSavedOutput){
- var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid");
- var _fd6=false;
- for(var i=0;i<this.pageNodes.length;i++){
- var node=this.pageNodes[i];
- if(node&&node.getAttribute&&node.getAttribute("tabid")==_fd3){
- _fd6=true;
- }else{
- if(_fd6){
- this.currentPageIndex=i-1;
- break;
- }
- }
- }
- }else{
- this.currentPageIndex=this.pageNodes.length-1;
- }
- break;
- }
- this._showPages([this.pageNodes[this.currentPageIndex]]);
- };
- CIWidgetSavedOutput.prototype._showPages=function(_fd7){
- var oCV=this.getCognosViewer();
- oCV.getSelectionController().clearSelectedObjects();
- if(_fd7.length==1){
- this.showHTMLFragment(_fd7[0].innerHTML);
- }else{
- var _fd9="";
- for(var i=0;i<_fd7.length;i++){
- _fd9+=_fd7[i].innerHTML;
- }
- this.showHTMLFragment(_fd9);
- }
- this.writeNavLinks();
- if(this.tabbedSavedOutput&&this.lastVisitedPage){
- this.getIWidget().placeTabControlInView();
- }else{
- oCV.setKeepFocus(true);
- }
- oCV.doneLoadingUpdateA11Y("complete");
- var _fdb=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget());
- var _fdc=this.getPageContextData(_fdb);
- if(_fdc==0){
- this.getIWidget().fetchAnnotationData();
- }
- };
- CIWidgetSavedOutput.prototype.getMetaDataFromIFrame=function(){
- if(typeof this.getIframeWindow().getSelectionController=="function"){
- var _fdd=this.getIframeWindow().getSelectionController();
- if(_fdd){
- var _fde=this.getCognosViewer().getSelectionController();
- _fde.addMetaData(_fdd.getCCDManager().m_md);
- _fde.addContextData(_fdd.getCCDManager().m_cd);
- _fde.setSelectionBasedFeaturesEnabled(true);
- }
- }
- };
- CIWidgetSavedOutput.prototype.processDrillThrough=function(_fdf){
- if(this.bContainsDrillThrough&&(typeof this.bOldOutput=="undefined"||this.bOldOutput==true)){
- var _fe0=new RegExp("onclick=\"doSingleDrillThrough[^\"]*\"|onclick='doMultipleDrillThrough[^']*'","gim");
- var aM=_fdf.match(_fe0);
- if(aM){
- if(typeof this.bOldOutput=="undefined"&&aM.length>0&&aM[0].indexOf("'_THIS_'")>0){
- this.bOldOutput=false;
- }else{
- this.bOldOutput=true;
- var _fe2="";
- var quot="'";
- if(aM.length>0){
- _fe2=aM[0].charAt(aM[0].length-1);
- }
- if(_fe2=="'"){
- quot="\"";
- }
- for(var i=0;i<aM.length;i++){
- _fdf=_fdf.replace(aM[i],aM[i].substring(0,aM[i].length-3)+","+quot+this.getCognosViewer().getId()+quot+");"+_fe2);
- }
- }
- }
- }
- return _fdf;
- };
- CIWidgetSavedOutput.prototype.processChart=function(_fe5){
- if(isIE()){
- _fe5=_fe5.replace(/preSelectNode\(event\);/g,getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".pcc(event);");
- }else{
- _fe5=_fe5.replace(/preSelectNode\(event\);/g,"");
- }
- var _fe6=this.getCognosViewer().getId();
- var _fe7=document.getElementById("CVHiddenIFrame"+_fe6);
- var _fe8=_fe7.src;
- if(_fe8.indexOf("repository")>=0){
- var _fe9=_fe8.indexOf("content");
- var _fea=_fe8.substring(0,_fe9);
- _fe5=_fe5.replace(/src\=\"images\//g,"src=\""+_fea+"images/");
- }
- _fe5=this.fixupChartUseMapValue(_fe5);
- return _fe5.replace(/displayChart[^;].*;|var graphicSrc[^;].*;|var graphicName[^;].*;/g,"");
- };
- CIWidgetSavedOutput.prototype.fixupChartUseMapValue=function(_feb){
- var re=/usemap\s*=\s*"*#(\w+)"*/gi;
- var _fed,_fee=[];
- while((_fed=re.exec(_feb))){
- _fee.push(_fed[1]);
- }
- for(var i=0;i<_fee.length;i++){
- var _ff0=new RegExp(_fee[i],"g");
- _feb=_feb.replace(_ff0,_fee[i]+this.getCognosViewer().getId());
- }
- return _feb;
- };
- CIWidgetSavedOutput.prototype.showHTMLFragment=function(_ff1){
- if(this.bContainsChart){
- _ff1=this.processChart(_ff1);
- }
- _ff1=this.processDrillThrough(_ff1);
- _ff1=_ff1.replace(/_THIS_/g,this.getCognosViewer().getId());
- this.getIWidget().loadStylesAndScripts(_ff1,this.getSavedOutputDiv(),false);
- this.getIWidget().reselectSelectionFilterObjects();
- this.getIWidget().addChromeWhitespaceHandler(this.getCognosViewer().getId());
- };
- function gInitializeViewer(obj){
- if(window.gScriptLoader.hasCompletedExecution()){
- var _ff3=obj.getViewerObject();
- if(_ff3&&_ff3.inlineScriptsDoneExecuting==true){
- clearInterval(obj.timer);
- if(typeof _ff3.errorOccured!="undefined"){
- obj.fireEvent("com.ibm.bux.widget.render.done",null,{});
- }else{
- if(typeof _ff3.getToolbar()!="undefined"){
- _ff3.setViewerWidget(obj);
- if(obj.isSelectionFilterEnabled()){
- obj.updateDrillThroughLinks();
- }
- if(obj.isDashboardOwner()){
- _ff3.addReportInfo();
- }
- if(obj.promptParametersRetrieved==true){
- var _ff4=obj.getAttributeValue("viewerReportPrompts");
- _ff3.envParams["reportPrompts"]=_ff4;
- }else{
- if(_ff3.envParams&&_ff3.envParams["widget.promptParametersRetrievedOnDrop"]=="true"){
- obj.promptParametersRetrieved=true;
- }
- }
- var _ff5=obj.getAttributeValue("syncNewWidgets");
- if(_ff5===null||_ff5==="true"){
- _ff5=true;
- }else{
- _ff5=false;
- }
- if(!_ff5&&(obj.isPastedWidget()||obj.isOpeningSavedDashboard()==false)){
- obj.disableListenToForEvent(["com.ibm.widget.contextChanged.drill","com.ibm.widget.contextChanged.prompt","com.ibm.widget.contextChanged"]);
- }
- obj.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,(_ff3.m_flashChartsObjectIds.length!==0));
- }
- }
- }
- }
- };
- function gVWEvent(sId,evt,_ff8){
- var oCV=window["oCV"+sId];
- if(oCV){
- oCV.loadExtra();
- var _ffa=oCV.getViewerWidget();
- if(_ffa){
- _ffa[_ff8](evt);
- }
- }
- };
- function ReportWidgetLoadQueue(_ffb){
- this._concurrentLoadSetting=_ffb;
- this._widgetsRunning=[];
- this._queue=[];
- };
- ReportWidgetLoadQueue.prototype.add=function(_ffc){
- this._queue.push(_ffc);
- this.loadNextWidget();
- };
- ReportWidgetLoadQueue.prototype.widgetDoneLoading=function(_ffd){
- for(var i=0;i<this._widgetsRunning.length;++i){
- var _fff=this._widgetsRunning[i];
- if(_fff==_ffd){
- this._widgetsRunning.splice(i,1);
- break;
- }
- }
- this.loadNextWidget();
- };
- ReportWidgetLoadQueue.prototype.loadNextWidget=function(){
- if(this._widgetsRunning.length<this._concurrentLoadSetting){
- var _1000=this._queue.shift();
- if(typeof _1000!="undefined"){
- this._widgetsRunning.push(_1000);
- _1000.postReport(null);
- }
- }
- };
- function CognosViewerAnnotation(){
- this.m_oCV=null;
- };
- CognosViewerAnnotation.prototype.setCognosViewer=function(oCV){
- this.m_oCV=oCV;
- };
- CognosViewerAnnotation.prototype.getCognosViewer=function(){
- return this.m_oCV;
- };
- CognosViewerAnnotation.prototype.isEnabled=function(_1002){
- };
- CognosViewerAnnotation.prototype.areAnnotationsEnabled=function(){
- var _1003=this.m_oCV.getViewerWidget();
- return _1003.getAnnotationHelper().isEnabled();
- };
- CognosViewerAnnotation.prototype.getMenuItemBaseString=function(){
- };
- CognosViewerAnnotation.prototype.getMenuItemIconClass=function(){
- };
- CognosViewerAnnotation.prototype.getSelections=function(){
- var _1004=[];
- var _1005=this.getCognosViewer();
- if(_1005){
- var _1006=_1005.getSelectionController();
- if(_1006){
- _1004=_1006.getSelections();
- }
- }
- return _1004;
- };
- CognosViewerAnnotation.prototype.hasAnnotation=function(){
- var has=false;
- var _1008=this.getCognosViewer();
- if(_1008){
- var _1009=_1008.getViewerWidget();
- if(_1009){
- var store=_1009.getAnnotationStore();
- if(store){
- has=store.hasAnnotation();
- }
- }
- }
- return has;
- };
- function CognosViewerCellAnnotation(){
- };
- CognosViewerCellAnnotation.prototype=new CognosViewerAnnotation();
- CognosViewerCellAnnotation.prototype.getMenuItemString=function(_100b){
- var _100c=_100b;
- var _100d=this.getSelections();
- if(_100d&&_100d.length==1){
- var sel=_100d[0];
- _100c=sel.getDisplayValues()[0];
- }
- var text=this.getMenuItemBaseString();
- if(_100c&&_100c.length>0){
- text+=" - "+enforceTextDir(_100c);
- }
- return text;
- };
- CognosViewerCellAnnotation.prototype.hasAnnotaionsOnSelectedCell=function(){
- var _1010=this.getSelections();
- if(_1010&&_1010.length==1){
- var _1011=_1010[0].getCellRef();
- var ctxId=this.getCognosViewer().findCtx(_1011);
- var _1013=this.getCognosViewer().getViewerWidget();
- if(_1013){
- var _1014=_1013.getAnnotationStore();
- if(_1014){
- var _1015=_1014.get(ctxId);
- if(_1015&&_1015.length>0){
- return true;
- }
- }
- }
- }
- return false;
- };
- CognosViewerCellAnnotation.prototype.getChangeableAnnotation=function(){
- var _1016=this.getSelections();
- if(_1016&&_1016.length==1){
- var _1017=_1016[0].getCellRef();
- var ctxId=this.getCognosViewer().findCtx(_1017);
- var _1019=this.getCognosViewer().getViewerWidget();
- if(_1019){
- var _101a=_1019.getAnnotationStore();
- if(_101a){
- return _101a.getChangeableAnnotation(ctxId);
- }
- }
- }
- return null;
- };
- CognosViewerCellAnnotation.prototype.hasValidContextOnSelectedCell=function(){
- var _101b=this.getSelections();
- if(_101b&&_101b.length==1){
- var _101c=_101b[0].getCellRef();
- var ctxId=this.getCognosViewer().findCtx(_101c);
- if(ctxId){
- var ids=AnnotationCTXLookup.generateIDArrayFromCellCtxValue(ctxId);
- for(var i=0;i<ids.length;i++){
- var id=ids[i];
- if(id!=="*"&&!(/^\d+$/).test(id)){
- return false;
- }
- }
- return true;
- }
- }
- return false;
- };
- function NewAnnotation(){
- };
- NewAnnotation.prototype=new CognosViewerCellAnnotation();
- NewAnnotation.prototype.isEnabled=function(_1021){
- return this.areAnnotationsEnabled()&&(_1021!=="widgetActions")&&this.hasValidContextOnSelectedCell();
- };
- NewAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_ANNOTATION_NEW;
- };
- NewAnnotation.prototype.getMenuItemIconClass=function(){
- return "NewAnnotation";
- };
- function EditAnnotation(){
- };
- EditAnnotation.prototype=new CognosViewerCellAnnotation();
- EditAnnotation.prototype.isEnabled=function(_1022){
- return this.areAnnotationsEnabled()&&(_1022!=="widgetActions")&&this.getChangeableAnnotation()!==null;
- };
- EditAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_ANNOTATION_EDIT;
- };
- EditAnnotation.prototype.getMenuItemIconClass=function(){
- return "EditAnnotation";
- };
- function DeleteAnnotation(){
- };
- DeleteAnnotation.prototype=new CognosViewerCellAnnotation();
- DeleteAnnotation.prototype.isEnabled=function(_1023){
- return this.areAnnotationsEnabled()&&(_1023!=="widgetActions")&&this.getChangeableAnnotation()!==null;
- };
- DeleteAnnotation.prototype.getMenuItemString=function(_1024){
- return this.getMenuItemBaseString();
- };
- DeleteAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_ANNOTATION_DELETE;
- };
- DeleteAnnotation.prototype.getMenuItemIconClass=function(){
- return "DeleteAnnotation";
- };
- function CognosViewerWidgetAnnotation(){
- };
- CognosViewerWidgetAnnotation.prototype=new CognosViewerAnnotation();
- CognosViewerWidgetAnnotation.prototype.getMenuItemString=function(){
- var _1025=this.getCognosViewer().getViewerWidget().getDisplayName();
- var text=this.getMenuItemBaseString();
- if(_1025&&_1025.length>0){
- _1025=enforceTextDir(_1025);
- text+=" - "+_1025;
- }
- return text;
- };
- CognosViewerWidgetAnnotation.prototype.hasWidgetLevelAnnotations=function(){
- var _1027=false;
- var _1028=this.getCognosViewer().getViewerWidget();
- if(_1028){
- var _1029=_1028.getAnnotationStore();
- var _102a=_1029.get(_1029.WIDGET_CONTEXT);
- if(_102a&&_102a.length>0){
- _1027=true;
- }
- }
- return _1027;
- };
- CognosViewerWidgetAnnotation.prototype.getWidgetLevelChangeableAnnotation=function(){
- var _102b=this.getCognosViewer().getViewerWidget();
- if(_102b){
- var _102c=_102b.getAnnotationStore();
- if(_102c){
- return _102c.getChangeableAnnotation(_102c.WIDGET_CONTEXT);
- }
- }
- return null;
- };
- CognosViewerWidgetAnnotation.prototype.hasValidSelection=function(_102d){
- var _102e=this.m_oCV.getSelectionController();
- var _102f=_102e.getSelections();
- var _1030=false;
- if(_102e.hasSelectedChartNodes()){
- _1030=(_102e.getSelectedChartNodes()[0].m_contextIds.length>0);
- }
- return (_102d==="widgetActions")||(_102f.length!=1&&!_1030);
- };
- function NewWidgetAnnotation(){
- };
- NewWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
- NewWidgetAnnotation.prototype.isEnabled=function(_1031){
- return this.areAnnotationsEnabled()&&(_1031!=="contextMenu")&&this.hasValidSelection(_1031);
- };
- NewWidgetAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW;
- };
- NewWidgetAnnotation.prototype.getMenuItemIconClass=function(){
- return "NewWidgetAnnotation";
- };
- function EditWidgetAnnotation(){
- };
- EditWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
- EditWidgetAnnotation.prototype.isEnabled=function(_1032){
- return (this.areAnnotationsEnabled()&&(_1032!=="contextMenu")&&this.hasValidSelection(_1032)&&this.getWidgetLevelChangeableAnnotation())?true:false;
- };
- EditWidgetAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT;
- };
- EditWidgetAnnotation.prototype.getMenuItemIconClass=function(){
- return "EditWidgetAnnotation";
- };
- function DeleteWidgetAnnotation(){
- };
- DeleteWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation();
- DeleteWidgetAnnotation.prototype.isEnabled=function(_1033){
- return (this.areAnnotationsEnabled()&&(_1033!=="contextMenu")&&this.hasValidSelection(_1033)&&this.getWidgetLevelChangeableAnnotation())?true:false;
- };
- DeleteWidgetAnnotation.prototype.getMenuItemBaseString=function(){
- return RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE;
- };
- DeleteWidgetAnnotation.prototype.getMenuItemIconClass=function(){
- return "DeleteWidgetAnnotation";
- };
- function AnnotationCTXLookup(_1034){
- this.m_ccdManager=_1034;
- this.m_md=this.m_ccdManager.m_md;
- this.m_cd=this.m_ccdManager.m_cd;
- this.m_RDIVALUE_KEY="annotationHook";
- this.m_oContextDetailsMap={};
- };
- AnnotationCTXLookup.prototype.populateCtxDetailsForAllAnnotations=function(_1035){
- for(var i=0,len=_1035.length;i<len;i++){
- var anno=_1035[i];
- var ctx=anno.ctx;
- if(ctx){
- this._populateCtxDetailsForOneCtxValue(ctx);
- }
- }
- };
- AnnotationCTXLookup.prototype._populateCtxDetailsForOneCtxValue=function(_103a){
- if(_103a){
- var _103b=this.generateIDArrayFromCellCtxValue(_103a);
- for(var i=0,len=_103b.length;i<len;i++){
- var id=_103b[i];
- this._populateCtxDetailsForOneId(id);
- }
- }
- };
- AnnotationCTXLookup.generateIDArrayFromCellCtxValue=function(_103f){
- if(_103f){
- return _103f.replace(/::/g,":").split(":");
- }
- return null;
- };
- AnnotationCTXLookup.prototype.generateIDArrayFromCellCtxValue=AnnotationCTXLookup.generateIDArrayFromCellCtxValue;
- AnnotationCTXLookup.prototype._populateCtxDetailsForOneId=function(id){
- if(id.match(/\*/)){
- return;
- }
- var _1041=this.m_oContextDetailsMap[id];
- if(_1041){
- return;
- }else{
- _1041={};
- var _1042=this.m_cd[id];
- if(_1042){
- if(_1042.u){
- _1041["u"]=_1042.u;
- }
- if(_1042.r){
- _1041["r"]=_1042.r;
- var _1043=this.m_md[_1042.r];
- if(_1043){
- if(_1043.usage!=="undefined"){
- _1041["usage"]=_1043.usage;
- }
- if(_1043.dtype){
- _1041.dtype=_1043.dtype;
- }
- }
- }
- this._populateRdiValueInDetail(_1041,id);
- this.m_oContextDetailsMap[id]=_1041;
- }
- }
- };
- AnnotationCTXLookup.prototype._getMDValue=function(item,key1,key2){
- if(typeof key2=="undefined"){
- key2=key1;
- }
- if(typeof item[key1]!="undefined"&&typeof this.m_md[item[key1]][key2]!="undefined"){
- return this.m_md[item[key1]][key2];
- }
- return null;
- };
- AnnotationCTXLookup.prototype._findMDValue=function(item,aKeys){
- for(var i=0;i<aKeys.length;i++){
- var value=this._getMDValue(item,aKeys[i]);
- if(value!==null){
- return value;
- }
- }
- return null;
- };
- AnnotationCTXLookup.prototype._populateRdiValueInDetail=function(_104b,id){
- var item=this.m_cd[id];
- var aKeys=[];
- var oRdi={};
- oRdi[1]=this._findMDValue(item,["l","h","i","r"]);
- if(this._getMDValue(item,"r","usage")==2){
- oRdi[2]=this._findMDValue(item,["i","m","r"]);
- }
- _104b[this.m_RDIVALUE_KEY]=oRdi;
- };
- AnnotationCTXLookup.prototype.getDetail=function(id){
- if(!id){
- return null;
- }
- return this.m_oContextDetailsMap[id];
- };
- AnnotationCTXLookup.prototype.isAnnotatedId=function(_1051,_1052,id){
- if(!_1051||!id){
- return false;
- }
- if(_1051.match(/\*/)){
- var _1054=this.getDetail(id);
- if(_1054&&_1054[this.m_RDIVALUE_KEY]){
- var rdi=_1054[this.m_RDIVALUE_KEY][1];
- if(_1052.version>=2&&_1054[this.m_RDIVALUE_KEY][2]){
- rdi=_1054[this.m_RDIVALUE_KEY][2];
- }
- return this._compareWithoutNS(_1052.rdi,rdi);
- }else{
- return false;
- }
- }else{
- return _1051===id;
- }
- };
- AnnotationCTXLookup.prototype._compareWithoutNS=function(rdi1,rdi2){
- if(!rdi1||!rdi2){
- return false;
- }
- if(rdi1!==rdi2){
- var _1058=rdi2.indexOf("].[");
- if(_1058>0){
- return rdi1.lastIndexOf(rdi2.substr(_1058))>0;
- }
- return false;
- }
- return true;
- };
- AnnotationCTXLookup.prototype.isAnnotatedCell=function(_1059,_105a){
- if(!_1059||!_1059.ctx||!_105a){
- return false;
- }
- this._populateCtxDetailsForOneCtxValue(_105a);
- var _105b=this.generateIDArrayFromCellCtxValue(_1059.ctx);
- var _105c=this.generateIDArrayFromCellCtxValue(_105a);
- if(!this.isAnnotatedId(_105b[0],_1059,_105c[0])){
- return false;
- }
- var _105d=this._generateDataItemIDArrayFromAnnotationIDs(_105b);
- var _105e=this._generateDataItemIDArrayFromCellIDs(_105c);
- if(_105d.length>_105e.length){
- return false;
- }
- for(var i=0,len=_105d.length;i<len;i++){
- for(var j=0,jLen=_105e.length;j<jLen;j++){
- if(_105d[i]===_105e[j]){
- _105d[i]=true;
- _105e[j]=true;
- break;
- }
- }
- }
- for(i=0,len=_105d.length;i<len;i++){
- if(_105d[i]!==true){
- return false;
- }
- }
- for(i=0,len=_105e.length;i<len;i++){
- if(_105e[i]!==true){
- return false;
- }
- }
- return true;
- };
- AnnotationCTXLookup.prototype._generateDataItemIDArrayFromCellIDs=function(_1063){
- var _1064=[];
- for(var i=1,len=_1063.length;i<len;i++){
- var id=_1063[i];
- var _1068=this.getDetail(id);
- if(this._isDataItem(_1068)){
- _1064.splice(0,0,id);
- }
- }
- return _1064;
- };
- AnnotationCTXLookup.dtypeLookup={"1":true,"25":true,"26":true,"27":true,"28":true,"29":true,"30":true,"31":true,"32":true,"34":true,"35":true,"36":true,"43":true,"45":true,"55":true,"56":true};
- AnnotationCTXLookup.prototype._isDataItem=function(_1069){
- if(_1069){
- var usage=_1069.usage;
- var dtype=_1069.dtype;
- if(usage===0||usage===1||(usage===3&&AnnotationCTXLookup.dtypeLookup[dtype]===true)){
- return true;
- }
- }
- return false;
- };
- AnnotationCTXLookup.prototype._generateDataItemIDArrayFromAnnotationIDs=function(_106c){
- var _106d=[];
- for(var i=1,len=_106c.length;i<len;i++){
- var id=_106c[i];
- if(id.match(/\*/)===null){
- _106d.splice(0,0,id);
- }
- }
- return _106d;
- };
- dojo.provide("bux.reportViewer.ReportInfo");
- dojo.require("bux.Tooltip");
- dojo.declare("bux.reportViewer.ReportInfo",bux.TooltipBase,{templateString:"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n",title:"",text:"",linkText:null,linkScript:null,constructor:function(args){
- if(args.focusElement){
- dojo.connect(args.focusElement,"onfocus",this,"_onHover");
- dojo.connect(args.focusElement,"onblur",this,"_onUnHover");
- }
- },createMarkup:function(){
- var _1072=this.connectId+"_linkId";
- var _1073=dojo.isIE||dojo.isTrident?"\"#\"":"\"javascript:void(0);\"";
- var _1074="";
- _1074+="<table role=\"presentation\" class=\"bux-tooltip-table\" cellspacing=\"0\" cellpadding=\"0\">";
- _1074+="<tr>";
- _1074+="<td class=\"bux-tooltip-title\">";
- _1074+=html_encode(this.title);
- _1074+="</td>";
- _1074+="</tr>";
- _1074+="<tr>";
- _1074+="<td class=\"bux-tooltip-text\">";
- _1074+=html_encode(this.text);
- _1074+="</td>";
- _1074+="</tr>";
- _1074+="<tr>";
- if(this.linkScript){
- _1074+="<td class=\"bux-tooltip-text\">";
- _1074+="<a role=\"link\" id=\""+_1072+"\" href="+_1073+" onmousedown=\""+this.linkScript+"\">"+html_encode(this.linkText)+"</a>";
- _1074+="</td>";
- }else{
- _1074+="<td></td>";
- }
- _1074+="</tr>";
- _1074+="</table>";
- return _1074;
- }});
- dojo.provide("ViewerIWidgetInlineDialog");
- dojo.require("dijit._base.focus");
- dojo.declare("ViewerIWidgetInlineDialog",null,{constructor:function(oCV,sHTML,_1077,_1078){
- this.initialize(oCV,sHTML);
- this.m_aButtons=_1077;
- this.m_sButtonContainerId=_1078;
- },initialize:function(oCV,sHTML){
- this.m_oCV=oCV;
- this.m_html=sHTML;
- this.m_viewerDiv=dojo.byId("RVContent"+this.m_oCV.getId());
- this.positionOptions={horizontal:"center",vertical:"center"};
- this.onScrollHandle=null;
- this.m_dialogDiv=null;
- if(this.m_oCV.getViewerWidget){
- this.m_background=this.m_oCV.getViewerWidget().getReportBlocker();
- }
- },setVerticalPositionOption:function(_107b){
- this.positionOptions.vertical=_107b;
- },getDialogDiv:function(){
- return this.m_dialogDiv;
- },initializeDialog:function(){
- this.m_dialogDiv=document.createElement("div");
- dojo.addClass(this.m_dialogDiv,"inlineDialog");
- this.m_dialogDiv.style.display="none";
- this.m_dialogDiv.innerHTML=this.m_html;
- dojo.place(this.m_dialogDiv,this.m_background.getNode().nextSibling,"before");
- var _107c=dojo.byId(this.m_sButtonContainerId);
- if(_107c&&this.m_aButtons&&this.m_aButtons.length>0){
- dojo.forEach(this.m_aButtons,function(_107d){
- var span=document.createElement("span");
- _107c.appendChild(span);
- var _107f=new dijit.form.Button(_107d,span);
- });
- }
- },createBackgroundTabCatchDiv:function(){
- if(this.m_tabCatch==null){
- this.m_tabCatch=dojo.byId("BACKGROUND_TABCATCH"+this.m_oCV.getId());
- if(!this.m_tabCatch){
- this.m_tabCatch=document.createElement("div");
- this.m_tabCatch.id="BACKGROUND_TABCATCH"+this.m_oCV.getId();
- this.m_tabCatch.style.display="none";
- this.m_tabCatch.style.position="absolute";
- this.m_tabCatch.style.left="0";
- this.m_tabCatch.style.top="0";
- this.m_tabCatch.style.height="0px";
- this.m_tabCatch.style.width="0px";
- this.m_tabCatch.setAttribute("tabIndex","0");
- if(this.m_viewerDiv.firstChild){
- dojo.place(this.m_tabCatch,this.m_viewerDiv.firstChild,"before");
- }else{
- this.m_viewerDiv.appendChild(this.m_tabCatch);
- }
- }
- }
- },initializeBackground:function(){
- this.createBackgroundTabCatchDiv();
- },initializeKeyboardSupport:function(){
- var _1080=dijit._getTabNavigable(this.m_dialogDiv);
- var _1081=_1080.lowest||_1080.first;
- var _1082=_1080.last||_1080.highest||_1081;
- if(_1081){
- this.m_tabCatch.onfocus=function(){
- dijit.focus(_1081);
- };
- this.m_background.getNode().onfocus=function(){
- dijit.focus(_1081);
- };
- }
- if(_1082&&_1081){
- _1082.onblur=function(){
- dijit.focus(_1081);
- };
- }else{
- if(_1081){
- _1081.onblur=function(){
- dijit.focus(_1081);
- };
- }
- }
- if(this.m_oCV.getKeepFocus()!=false&&_1081&&_1081.focus){
- _1081.focus();
- }
- },show:function(){
- this.m_oCV.setVisibleDialog(this);
- if(this.m_tabCatch==null){
- this.initializeBackground();
- }
- if(this.m_dialogDiv==null){
- this.initializeDialog();
- }
- this.m_background.setClassNameOverride("inlineDialog-background-error");
- this.m_background.show();
- this.m_tabCatch.style.display="block";
- this.m_dialogDiv.style.display="block";
- this.initializeKeyboardSupport();
- },hide:function(){
- this.m_oCV.setVisibleDialog(null);
- if(this.onScrollHandle!=null){
- dojo.disconnect(this.onScrollHandle);
- this.onScrollHandle=null;
- }
- if(this.m_background!=null){
- this.m_background.hide();
- }
- if(this.m_tabCatch!=null){
- this.m_tabCatch.style.display="none";
- }
- if(this.m_dialogDiv!=null){
- this.m_dialogDiv.style.display="none";
- }
- },destroy:function(){
- this.hide();
- if(this.m_dialogDiv!=null){
- this.m_dialogDiv.parentNode.removeChild(this.m_dialogDiv);
- this.m_dialogDiv=null;
- }
- if(this.m_tabCatch!=null){
- this.m_tabCatch.parentNode.removeChild(this.m_tabCatch);
- this.m_tabCatch=null;
- }
- if(this.m_background!=null){
- this.m_background.destroy();
- this.m_background=null;
- }
- },setDebugHelper:function(_1083){
- var _1084=document.createElement("div");
- _1084.style.zIndex="100";
- _1084.style.display="block";
- _1084.style.position="relative";
- _1084.style.backgroundColor="#FFFFFF";
- _1084.innerHTML="<table><tr><td>"+"<a href=\"#\" onclick=\""+_1083+".show();\">show</a>"+" "+"<a href=\"#\" onclick=\""+_1083+".hide();\">hide</a></td></tr></table>";
- document.body.insertBefore(_1084,document.body.firstChild);
- }});
- dojo.provide("bux.reportViewer.Properties");
- dojo.declare("bux.reportViewer.Properties",null,{iWidget:null,masterDialogSpec:null,masterDialogSpecProperties:null,flashChartSpec:null,isFlashChartOptionEnabled:true,oldProperties:null,dialogDisplayValues:null,constructor:function(_1085,_1086){
- this.isInitialized=false;
- this.initializeDialogDisplayValues();
- this.oldProperties={};
- this.iWidget=_1085;
- if(_1086==="<empty>"){
- return;
- }
- var json=dojo.eval("["+_1086+"]");
- if(json&&json[0]){
- this.initializeWithSavedPropertyValues(json[0]);
- }
- },initializeDialogDisplayValues:function(){
- this.dialogDisplayValues={flashCharts:{value:null,canUndo:true,runReport:true},rowsPerPage:{value:null,canUndo:true,runReport:true},promptUserOnLoad:{value:false},retrieveAll:{value:false,refreshSavedOutput:true},showExpandCollapseIcon:{value:null}};
- },clearDialogSpec:function(){
- this.masterDialogSpec=null;
- this.masterDialogSpecProperties=null;
- },initializeWithSavedPropertyValues:function(_1088){
- for(var prop in _1088){
- if(typeof prop!="undefined"&&prop!=null){
- if(this.dialogDisplayValues[prop]){
- this.dialogDisplayValues[prop].value=_1088[prop];
- }else{
- this.dialogDisplayValues[prop]={value:_1088[prop],canUndo:false};
- }
- }
- }
- },setProperty:function(_108a,value){
- this.dialogDisplayValues[_108a].value=value;
- },getProperty:function(_108c){
- if(this.dialogDisplayValues[_108c]){
- return this.dialogDisplayValues[_108c].value;
- }
- return null;
- },getOldProperty:function(_108d){
- if(this.oldProperties&&this.oldProperties[_108d]){
- return this.oldProperties[_108d].value;
- }
- return null;
- },getOldProperties:function(){
- var _108e={};
- for(var prop in this.oldProperties){
- if(this.dialogDisplayValues[prop].canUndo===true){
- _108e[prop]={};
- _108e[prop].value=this.oldProperties[prop].value;
- }
- }
- return _108e;
- },onGet:function(){
- this.copyPropertyValues(this.dialogDisplayValues,this.oldProperties);
- if(!this.masterDialogSpec){
- this.initializeDialogSpec();
- }else{
- this.updateDialogSpec();
- }
- var _1090={tabTitle:this._getReportWidgetTabTitle(),properties:this.dialogDisplayValues,propertiesDialogSpec:this.masterDialogSpec};
- return _1090;
- },_getReportWidgetTabTitle:function(){
- var _1091;
- if(this.iWidget&&this.iWidget.getViewerObject()){
- _1091=RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE;
- }
- return _1091;
- },onSet:function(_1092){
- if(this.isSavedOutput()){
- this.updateSavedOutput();
- }else{
- if(!this.runReportWithNewOptions()){
- this._updateReport();
- }
- }
- },_updateReport:function(){
- var _1093=this.getProperty("showExpandCollapseIcon");
- if(this.getOldProperty("showExpandCollapseIcon")!=_1093){
- var oCV=this.iWidget.getViewerObject();
- if(_1093===true){
- oCV.insertExpandIconsForAllCrosstabs();
- }else{
- oCV.removeExpandIconsForAllCrosstabs();
- }
- }
- },copyPropertyValues:function(from,to){
- for(var prop in from){
- if(!to[prop]){
- to[prop]={};
- }
- to[prop].value=from[prop].value;
- }
- },doUndo:function(_1098){
- this.copyPropertyValues(_1098,this.dialogDisplayValues);
- },getUndoInfo:function(){
- if(!this.isInitialized){
- var oCV=this.iWidget.getViewerObject();
- this.initialize(oCV.envParams);
- }
- var _109a={};
- for(var prop in this.dialogDisplayValues){
- if(this.dialogDisplayValues[prop].canUndo===true){
- _109a[prop]={value:this.getProperty(prop)};
- }
- }
- return _109a;
- },shouldUpdateReport:function(_109c){
- for(var prop in this.dialogDisplayValues){
- if(this.dialogDisplayValues[prop][_109c]==true&&this.getOldProperty(prop)!=this.getProperty(prop)){
- return true;
- }
- }
- return false;
- },runReportWithNewOptions:function(){
- if(this.shouldUpdateReport("runReport")){
- var oCV=this.iWidget.getViewerObject();
- var _109f=oCV.getAction("RunReport");
- _109f.setReuseQuery(true);
- _109f.execute();
- this.iWidget.getUndoRedoQueue().initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":this.saveSpecForUndo()});
- return true;
- }
- return false;
- },updateSavedOutput:function(){
- if(this.shouldUpdateReport("refreshSavedOutput")){
- var _10a0=this.iWidget.getSavedOutput();
- _10a0.setPagedOutput(!this.getRetrieveAll());
- _10a0.render();
- }
- },toString:function(){
- var str="{";
- for(var prop in this.dialogDisplayValues){
- var _10a3=this.getProperty(prop);
- if(_10a3!=null&&typeof _10a3!=="undefined"){
- if(str!="{"){
- str+=", ";
- }
- str+="\""+prop+"\": ";
- str+=(typeof (_10a3)=="string")?_10a3.toString():dojo.toJson(_10a3);
- }
- }
- str+="}";
- return str;
- },isSavedOutput:function(){
- return this.iWidget.getViewerObject().envParams["ui.action"]==="view";
- },getUndoHint:function(){
- return RV_RES.IDS_JS_WIDGET_PROPERTIES;
- },saveSpecForUndo:function(){
- return false;
- },getRetrieveAll:function(){
- return this.getProperty("retrieveAll");
- },getPromptUserOnLoad:function(){
- return this.getProperty("promptUserOnLoad");
- },getFlashCharts:function(){
- return this.getProperty("flashCharts");
- },getRowsPerPage:function(){
- return this.getProperty("rowsPerPage");
- },getOriginalReportLocation:function(_10a4){
- if(_10a4.getAttributeValue&&!_10a4.getAttributeValue("originalReport")){
- return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE;
- }
- var _10a5=_10a4.getViewerObject().envParams["originalReportLocation"];
- if(typeof _10a5=="undefined"||_10a5==null||_10a5=="Unavailable"){
- return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE;
- }
- return (RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+_10a5);
- },getShowExpandCollapseIconFlag:function(){
- return this.getProperty("showExpandCollapseIcon");
- },getAdvancedServerProperty:function(_10a6){
- if(!this.iWidget&&!this.iWidget.getViewerObject()){
- return null;
- }
- return this.iWidget.getViewerObject().getAdvancedServerProperty(_10a6);
- },initializeShowExpandCollapseIconFlag:function(){
- var _10a7=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT");
- this.bHideExpandCollapseOption=(!_10a7);
- if(this.bHideExpandCollapseOption){
- return;
- }
- if(this.getShowExpandCollapseIconFlag()===null){
- this.setProperty("showExpandCollapseIcon",_10a7.toLowerCase()==="on");
- }
- },initialize:function(_10a8){
- if(this.isInitialized){
- return;
- }
- this.isInitialized=true;
- this.initializeFlashChartSettings(_10a8.flashChartOption);
- this.initializeShowExpandCollapseIconFlag();
- if(this.getRowsPerPage()==null){
- if(_10a8["run.verticalElements"]!=null){
- this.setProperty("rowsPerPage",_10a8["run.verticalElements"]);
- }else{
- this.setProperty("rowsPerPage",20);
- }
- }
- this.initializeDialogSpec();
- },createViewReportSpecLink:function(){
- var oCV=this.iWidget.getViewerObject();
- var _10aa=oCV.envParams["ui.spec"];
- if(oCV.bCanUseReportStudio&&_10aa&&_10aa.length>0&&oCV.envParams["ui.action"]!="view"){
- return {columns:[{propertyName:"viewReportSpecification",uiElementType:"link",label:RV_RES.IDS_JS_SHOW_REPORT_SPEC,eventHandler:this,onClickAction:dojo.hitch(this,this.onClickViewReportSpecification)}]};
- }else{
- return {};
- }
- },isBlackListedOption:function(_10ab){
- return this.iWidget.getViewerObject().isBlacklisted(_10ab);
- },createFlashChartOption:function(){
- var _10ac=[{columns:[{propertyName:"flashCharts",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_FLASHCHARTS}]},{columns:[{uiElementType:"hSpacer"}]}];
- return _10ac;
- },getShowExpandCollapseIconOptionSpec:function(){
- var spec=[{columns:[{propertyName:"showExpandCollapseIcon",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON}]},{columns:[{uiElementType:"hspacer"}]}];
- return spec;
- },generateDialogSpec:function(role){
- var _10af;
- if(role=="consume"){
- _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE}]}];
- this.masterDialogSpec={rows:_10af};
- }else{
- var _10b0=this.createViewReportSpecLink();
- _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE,constraints:{min:1,max:1000},required:true,invalidMessage:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR}]},{columns:[{uiElementType:"hspacer"}]},{columns:[{propertyName:"promptUserOnLoad",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD}]},{columns:[{propertyName:"retrieveAll",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT}]},_10b0,{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]}];
- if(this.isFlashChartOptionEnabled&&!this.hasAVSChart()&&role!=="consume"){
- var _10b1=this.createFlashChartOption();
- _10af=_10b1.concat(_10af);
- }
- if(!this.bHideExpandCollapseOption&&!this.isBlackListedOption("ExpandMember")){
- _10af=this.getShowExpandCollapseIconOptionSpec().concat(_10af);
- }
- this.masterDialogSpec={rows:_10af};
- }
- if(this.masterDialogSpec&&this.masterDialogSpec.rows){
- this.masterDialogSpecProperties={};
- for(var r in this.masterDialogSpec.rows){
- var row=this.masterDialogSpec.rows[r];
- if(row.columns){
- for(var c in row.columns){
- var col=row.columns[c];
- if(col.propertyName){
- this.masterDialogSpecProperties[col.propertyName]=col;
- }
- }
- }
- }
- }
- },updateDialogSpec:function(){
- if(this.masterDialogSpecProperties){
- if(this.masterDialogSpecProperties.originalReportLocation){
- this.masterDialogSpecProperties.originalReportLocation.label=this.getOriginalReportLocation(this.iWidget);
- }
- }
- },initializeDialogSpec:function(){
- var _10b6=this.iWidget.getUserRole();
- this.generateDialogSpec(_10b6);
- },hasAVSChart:function(){
- if(this.iWidget==null||typeof this.iWidget.getViewerObject()=="undefined"){
- return false;
- }
- var oCV=this.iWidget.getViewerObject();
- if(typeof oCV=="undefined"){
- return false;
- }
- return oCV.hasAVSChart();
- },initializeFlashChartSettings:function(value){
- if(!value){
- return;
- }
- var json=(typeof value==="string")?(eval(value)):value;
- var _10ba=json[0];
- this.setProperty("flashCharts",_10ba.defaultValue);
- this.isFlashChartOptionEnabled=!_10ba.isOptionDisabled;
- },onClickViewReportSpecification:function(){
- var _10bb=this.iWidget.getViewerObject().envParams["ui.spec"];
- this._viewSpecInWindow(_10bb);
- },_getWindowOptions:function(w,h){
- var _10be="resizable=yes,scrollbars=yes,menubar=no,directories=no,location=no,status=no,toolbar=no,titlebar=no";
- var left=(screen.width-w)/2;
- var top=(screen.height-h)/2;
- _10be+=",top="+top;
- _10be+=",left="+left;
- _10be+=",width="+w;
- _10be+=",height="+h;
- return _10be;
- },_viewSpecInWindow:function(_10c1){
- var _10c2=dijit.getViewport();
- var _10c3="debugWindow"+this.iWidget.getViewerObject().getId();
- var _10c4=this._getWindowOptions(_10c2.w,_10c2.h);
- var _10c5=window.open("",_10c3,_10c4);
- var head="<html><body><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"+"<tbody><tr><td>"+"<textarea wrap=\"off\" style=\"font-family:arial; font-size: 10px; overflow: auto; width:100%; height:";
- head+=_10c2.h*0.95;
- head+="px;\">";
- var tail="</textarea></td></tr></tbody></table></body></html>";
- _10c5.document.write(head+html_encode(_10c1)+tail);
- }});
- dojo.require("bux.reportViewer.Properties");
- dojo.provide("ActiveReportIWidgetProperties");
- dojo.declare("ActiveReportIWidgetProperties",[bux.reportViewer.Properties],{initializeDialogDisplayValues:function(){
- this.dialogDisplayValues={activeReportState:{value:null,canUndo:false,runReport:false}};
- },getActiveReportState:function(){
- return this.getProperty("activeReportState");
- },setActiveReportState:function(_10c8){
- this.setProperty("activeReportState",_10c8);
- },initialize:function(_10c9){
- if(this.isInitialized){
- return;
- }
- this.isInitialized=true;
- this.initializeDialogSpec();
- },initializeDialogSpec:function(){
- var _10ca=[{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]},{columns:[{propertyName:"ActiveReportOutputVersion",uiElementType:"text",label:this._getAcitveReportOutputVersion(this.iWidget),allowWrapping:true}]}];
- if(this.iWidget.isDebugMode()){
- _10ca.push({columns:[{propertyName:"PublicVariables",uiElementType:"text",label:this._getPublicVariableNames(this.iWidget),allowWrapping:true}]});
- }
- this.masterDialogSpec={rows:_10ca};
- },_getAcitveReportOutputVersion:function(_10cb){
- var _10cc=_10cb.getActiveReportOutputVersion();
- if(_10cc==null){
- _10cc=RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE;
- }
- return (RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION+" "+_10cc);
- },_getPublicVariableNames:function(_10cd){
- var _10ce=_10cd.getPublicVariableNames();
- var _10cf="";
- for(var name in _10ce){
- var sType=_10ce[name];
- if(_10cf.length>0){
- _10cf+=", ";
- }
- _10cf+=name;
- _10cf+=(sType==="D")?" (Discrete)":"(Range)";
- }
- if(_10cf.length>0){
- _10cf="Public Variables: "+_10cf;
- }
- return _10cf;
- },_getReportWidgetTabTitle:function(){
- var _10d2;
- if(this.iWidget&&this.iWidget.getViewerObject()){
- _10d2=RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE;
- }
- return _10d2;
- }});
- function RAPReportInfo(_10d3,oCV){
- this.m_reportInfoJSON=_10d3;
- this.m_containerInfoJSON={};
- this.m_iContainerCount=0;
- this.m_bPromptPart=null;
- this.m_bSingleContainer=null;
- this.m_bDetailFilteringDisabled=null;
- this.m_aDrilledOnHUNs=null;
- this.m_bPassTrackingToBUA=null;
- this.m_sDisplayTypes=null;
- this.m_bContainsInteractiveDataContainer=null;
- this.m_bContainsFilters=false;
- this.m_bContainsSlider=false;
- this.m_referenceInfoObject={};
- this.initializeContainerInfo();
- this._addNonVisibleReferences(this.m_reportInfoJSON.reportLevelProperties);
- this._populateHun(oCV);
- };
- RAPReportInfo.prototype.initializeContainerInfo=function(){
- if(this.m_reportInfoJSON){
- var _10d5=this.m_reportInfoJSON.containers;
- if(_10d5){
- this.m_iContainerCount=_10d5.length;
- for(var _10d6=0;_10d6<this.m_iContainerCount;++_10d6){
- var _10d7=_10d5[_10d6].container;
- this.m_containerInfoJSON[_10d7]=_10d5[_10d6];
- this.m_containerInfoJSON[_10d7].m_itemInfoJSON=this._initializeItemInfo(_10d5[_10d6].itemInfo);
- this.m_containerInfoJSON[_10d7].m_drillabilityJSON=this._initializeDrillability(_10d5[_10d6].drillability);
- this._addFilterReferences(_10d5[_10d6].filter);
- this._addSliderReferences(_10d5[_10d6].sliders);
- this.m_containerInfoJSON[_10d7].layoutIndex=_10d6;
- if(_10d5[_10d6].filter){
- this.m_bContainsFilters=true;
- }
- if(_10d5[_10d6].sliders){
- this.m_bContainsSlider=true;
- }
- }
- }
- }
- };
- RAPReportInfo.prototype._initializeItemInfo=function(_10d8){
- var _10d9={};
- for(var idx in _10d8){
- _10d9[_10d8[idx].item]=_10d8[idx];
- this.m_referenceInfoObject[_10d8[idx].item]=true;
- }
- return _10d9;
- };
- RAPReportInfo.prototype._initializeDrillability=function(_10db){
- var _10dc={};
- for(var idx in _10db){
- _10dc[_10db[idx].item]=_10db[idx];
- this.m_referenceInfoObject[_10db[idx].item]=true;
- }
- return _10dc;
- };
- RAPReportInfo.prototype._addFilterReferences=function(_10de){
- for(var idx in _10de){
- this.m_referenceInfoObject[_10de[idx].item]=true;
- if(_10de[idx].type==="contextSlice"&&_10de[idx].hierarchyName){
- this.m_referenceInfoObject[_10de[idx].hierarchyName]=true;
- }
- }
- };
- RAPReportInfo.prototype._addSliderReferences=function(_10e0){
- for(var idx in _10e0){
- this.m_referenceInfoObject[_10e0[idx].name]=true;
- }
- };
- RAPReportInfo.prototype._addNonVisibleReferences=function(_10e2){
- if(_10e2&&_10e2.nonVisibleFiltersMemberItemInfo){
- for(var i=0;i<_10e2.nonVisibleFiltersMemberItemInfo.length;i++){
- this.m_referenceInfoObject[_10e2.nonVisibleFiltersMemberItemInfo[i]]=true;
- }
- }
- };
- RAPReportInfo.prototype.isReferenced=function(item){
- return (this.m_referenceInfoObject[item])?true:false;
- };
- RAPReportInfo.prototype.getDrillability=function(_10e5,_10e6){
- if(!_10e6){
- return this.m_containerInfoJSON[_10e5].m_drillabilityJSON;
- }else{
- return this.m_containerInfoJSON[_10e5].m_drillabilityJSON[_10e6];
- }
- };
- RAPReportInfo.prototype.getContainers=function(){
- return this.m_containerInfoJSON;
- };
- RAPReportInfo.prototype.getContainer=function(lid){
- return this.m_containerInfoJSON[lid];
- };
- RAPReportInfo.prototype.getContainerIds=function(_10e8){
- var _10e9=[];
- for(containerName in this.m_containerInfoJSON){
- var _10ea=this.m_containerInfoJSON[containerName];
- if(_10ea&&_10ea.displayTypeId==_10e8){
- _10e9.push(_10ea.container);
- }
- }
- return _10e9;
- };
- RAPReportInfo.prototype.getContainerFromPos=function(iPos){
- return this.m_reportInfoJSON.containers[iPos];
- };
- RAPReportInfo.prototype.getReportLevelProperties=function(){
- return this.m_reportInfoJSON.reportLevelProperties;
- };
- RAPReportInfo.prototype.getItemInfo=function(_10ec,_10ed){
- if(!_10ed){
- return this.m_containerInfoJSON[_10ec].m_itemInfoJSON;
- }
- if(this.m_containerInfoJSON[_10ec]){
- return this.m_containerInfoJSON[_10ec].m_itemInfoJSON[_10ed];
- }
- return null;
- };
- RAPReportInfo.prototype.isReportLevel_nonVisibleFilterItem=function(_10ee){
- if(_10ee&&_10ee.length>0){
- var _10ef=this.m_reportInfoJSON.reportLevelProperties;
- if(_10ef){
- if(_10ef&&_10ef.nonVisibleFiltersMemberItemInfo){
- for(var i=0;i<_10ef.nonVisibleFiltersMemberItemInfo.length;i++){
- if(_10ee===_10ef.nonVisibleFiltersMemberItemInfo[i]){
- return true;
- }
- }
- }
- }
- }
- return false;
- };
- RAPReportInfo.prototype.isChildContainer=function(lid){
- return ((this.m_containerInfoJSON[lid]&&this.m_containerInfoJSON[lid].parentContainer)?true:false);
- };
- RAPReportInfo.prototype.getItemDetails=function(_10f2,sHun){
- var obj=null;
- for(var lid in this.m_containerInfoJSON){
- var oItem=this.getItemInfo(lid,_10f2);
- if(oItem&&oItem.hun===sHun){
- obj={};
- obj.item=oItem.item;
- if(oItem.hun){
- obj.hun=oItem.hun;
- }
- obj.lid=lid;
- obj.queryName=oItem.queryName;
- break;
- }
- }
- return (obj)?obj:null;
- };
- RAPReportInfo.prototype.getItemDetailsByHun=function(sHun){
- var _10f8=null;
- for(var lid in this.m_containerInfoJSON){
- var _10fa=this.getItemInfo(lid);
- for(var sName in _10fa){
- var oItem=_10fa[sName];
- if(oItem.hun===sHun){
- _10f8=sName;
- break;
- }
- }
- }
- return (_10f8?this.getItemDetails(_10f8,sHun):null);
- };
- RAPReportInfo.prototype._populateHun=function(oCV){
- if(oCV){
- var _10fe=oCV.getSelectionController().getCCDManager();
- var _10ff=oCV.envParams;
- var _1100=oCV.getRAPReportInfo();
- var _1101=false;
- for(var lid in this.m_containerInfoJSON){
- var _1103=this.m_containerInfoJSON[lid].m_itemInfoJSON;
- for(var _1104 in _1103){
- var oItem=_1103[_1104];
- if(oItem.hun){
- continue;
- }
- var sHun=this.getHUNForItem(oItem,_10fe,lid,_1100);
- if(sHun){
- oItem.hun=sHun;
- _1101=true;
- }
- }
- }
- if(_1101&&typeof JSON!="undefined"&&JSON!=null&&JSON.stringify){
- _10ff["rapReportInfo"]=JSON.stringify(this.m_reportInfoJSON);
- }
- }
- };
- RAPReportInfo.prototype.getHUNForItem=function(oItem,_1108,lid,_110a){
- var sHun=this.getHUNFromCCDManager(_1108,oItem);
- var _110c=null;
- if(!sHun&&_110a){
- _110c=_110a.getItemInfo(lid,oItem.item);
- if(_110c){
- sHun=_110c.hun;
- }
- }
- return sHun;
- };
- RAPReportInfo.prototype.getHUNFromCCDManager=function(_110d,oItem){
- var _110f={};
- var sHUN=null;
- var _1111=this._findQueryMetadataId(_110d,_110f,oItem.queryName);
- if(_1111){
- sHUN=_110d.GetHUNForRDI(oItem.item,_1111);
- }
- return sHUN;
- };
- RAPReportInfo.prototype._findQueryMetadataId=function(_1112,oMap,_1114){
- if(oMap[_1114]){
- return oMap[_1114];
- }
- var ctxId=_1112.GetMetadataIdForQueryName(_1114);
- if(ctxId){
- oMap[_1114]=ctxId;
- return ctxId;
- }
- return null;
- };
- RAPReportInfo.prototype.isPromptPart=function(){
- if(this.m_bPromptPart===null){
- if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.promptWidget===true){
- this.m_bPromptPart=true;
- }else{
- this.m_bPromptPart=false;
- }
- }
- return this.m_bPromptPart;
- };
- RAPReportInfo.prototype.getContainerCount=function(){
- return this.m_iContainerCount;
- };
- RAPReportInfo.prototype.isSingleContainer=function(){
- if(this.m_bSingleContainer===null){
- if(this.m_iContainerCount===1&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.singleContainerReport===true){
- this.m_bSingleContainer=true;
- }else{
- this.m_bSingleContainer=false;
- }
- }
- return this.m_bSingleContainer;
- };
- RAPReportInfo.prototype.isDetailFilteringDisabled=function(){
- if(this.m_bDetailFilteringDisabled===null){
- if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.detailFilteringDisabled===true){
- this.m_bDetailFilteringDisabled=true;
- }else{
- this.m_bDetailFilteringDisabled=false;
- }
- }
- return this.m_bDetailFilteringDisabled;
- };
- RAPReportInfo.prototype.getPassTrackingtoBUA=function(){
- if(this.m_bPassTrackingToBUA===null){
- if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.shouldNotPassTrackingtoBUA===true){
- this.m_bPassTrackingToBUA=false;
- }else{
- this.m_bPassTrackingToBUA=true;
- }
- }
- return this.m_bPassTrackingToBUA;
- };
- RAPReportInfo.prototype.getDrilledOnHUNs=function(){
- if(!this.m_aDrilledOnHUNs&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs){
- this.m_aDrilledOnHUNs=this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs;
- }
- return this.m_aDrilledOnHUNs;
- };
- RAPReportInfo.prototype.getDisplayTypes=function(_1116){
- if(this.m_sDisplayTypes===null||_1116){
- var _1117="";
- var _1118=[];
- for(var lid in this.m_containerInfoJSON){
- if(!_1116||lid!=_1116){
- _1118.push(this.m_containerInfoJSON[lid].displayTypeId);
- }
- }
- _1117=_1118.join(",");
- if(_1117==""&&this.isPromptPart()){
- _1117="promptWidget";
- }
- if(!_1116){
- this.m_sDisplayTypes=_1117;
- }
- return _1117;
- }
- return this.m_sDisplayTypes;
- };
- RAPReportInfo.prototype.isChart=function(lid){
- var id=lid.toLowerCase();
- return id!="mapchart"&&id.match("chart$")=="chart";
- };
- RAPReportInfo.prototype.isViz=function(lid){
- if(this.m_containerInfoJSON[lid]){
- var _111d=this.m_containerInfoJSON[lid].displayTypeId;
- if(_111d){
- return (_111d.toLowerCase()=="viz");
- }
- }
- return false;
- };
- RAPReportInfo.prototype.isInteractiveDataContainer=function(lid){
- var _111f=false;
- if(this.m_containerInfoJSON[lid]){
- var _1120=this.m_containerInfoJSON[lid].displayTypeId;
- if(_1120){
- var id=_1120.toLowerCase();
- _111f=id=="crosstab"||id=="list"||id=="viz"||this.isChart(id);
- }
- }
- return _111f;
- };
- RAPReportInfo.prototype.containsInteractiveDataContainer=function(){
- if(this.m_bContainsInteractiveDataContainer==null){
- this.m_bContainsInteractiveDataContainer=false;
- for(var lid in this.m_containerInfoJSON){
- if(this.isInteractiveDataContainer(lid)){
- this.m_bContainsInteractiveDataContainer=true;
- break;
- }
- }
- }
- return this.m_bContainsInteractiveDataContainer;
- };
- RAPReportInfo.prototype.containsFilters=function(){
- return this.m_bContainsFilters;
- };
- RAPReportInfo.prototype.getFilterObject=function(_1123,_1124){
- for(var lid in this.m_containerInfoJSON){
- var _1126=this.getFilterObjectFromContainer(lid,_1123,_1124);
- if(_1126){
- return _1126;
- }
- }
- return null;
- };
- RAPReportInfo.prototype.getFilterObjectFromContainer=function(lid,_1128,_1129){
- var _112a=this.m_containerInfoJSON[lid];
- if(_112a&&_112a.filter){
- var _112b=_112a.filter.length;
- for(var i=0;i<_112b;++i){
- var _112d=_112a.filter[i];
- if(_1128==_112d.item){
- if(!_1129||(_112d.itemLabel&&_112d.itemLabel.length>0)){
- return _112d;
- }
- }
- }
- }
- return null;
- };
- RAPReportInfo.prototype.hunHasFilterOrSlider=function(_112e){
- if(!_112e){
- return null;
- }
- for(var lid in this.m_containerInfoJSON){
- var _1130=this.m_containerInfoJSON[lid];
- if(_1130&&_1130.filter){
- var _1131=_1130.filter.length;
- for(var i=0;i<_1131;++i){
- var _1133=_1130.filter[i];
- if(_1133.HUN&&_112e.indexOf(_1133.HUN)==0){
- return _1133.item;
- }
- }
- }
- if(_1130&&_1130.sliders){
- var _1131=_1130.sliders.length;
- for(var i=0;i<_1131;++i){
- var _1134=_1130.sliders[i];
- if(_1134.hun&&_112e.indexOf(_1134.hun)==0){
- return _1134.name;
- }
- }
- }
- }
- return null;
- };
- RAPReportInfo.prototype.hasSlider=function(){
- return this.m_bContainsSlider;
- };
- RAPReportInfo.prototype.collectSliderSetFromReportInfo=function(){
- var _1135={};
- for(var lid in this.m_containerInfoJSON){
- var _1137=this.m_containerInfoJSON[lid].sliders;
- if(_1137){
- for(var _1138=0;_1138<_1137.length;++_1138){
- var _1139=_1137[_1138].clientId;
- _1135[_1139]=_1137[_1138];
- }
- }
- }
- return _1135;
- };
- RAPReportInfo.prototype._getEventTimings=function(){
- return (this.m_reportInfoJSON&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.eventTimings)?this.m_reportInfoJSON.reportLevelProperties.eventTimings:null;
- };
- RAPReportInfo.prototype.destroy=function(){
- GUtil.destroyProperties(this);
- };
- function DelayedLoadingContext(id){
- this.widgetid=id;
- this.m_promptValues=null;
- };
- DelayedLoadingContext.prototype.setPromptValues=function(_113b){
- if(_113b===null){
- this.m_promptValues=null;
- return;
- }
- if(!this.m_promptValues){
- this.m_promptValues={};
- }
- applyJSONProperties(this.m_promptValues,_113b);
- };
- DelayedLoadingContext.prototype.getPromptValues=function(){
- return this.m_promptValues;
- };
- DelayedLoadingContext.prototype.setForceRunReport=function(_113c){
- this.m_forceRunReport=_113c;
- };
- DelayedLoadingContext.prototype.getForceRunReport=function(){
- return this.m_forceRunReport;
- };
- DelayedLoadingContext.prototype.isEmpty=function(){
- return !(this.m_promptValues||this.m_forceRunReport);
- };
- DelayedLoadingContext.prototype.reset=function(){
- delete (this.m_promptValues);
- this.m_promptValues=null;
- this.m_forceRunReport=false;
- delete (this._cascadingPromptParamsToClear);
- };
- DelayedLoadingContext.prototype.setCascadingPromptParamsToClear=function(_113d){
- this._cascadingPromptParamsToClear=_113d;
- };
- DelayedLoadingContext.prototype.getCascadingPromptParamsToClear=function(){
- return this._cascadingPromptParamsToClear;
- };
- function ViewerLoadManager(_113e){
- this.m_oWidget=_113e;
- this.m_oDelayedLoadingContext=new DelayedLoadingContext();
- this.m_aQueue=[];
- this.m_fOnEmptyCallback=null;
- this.m_bPendingRequest=false;
- this.m_bViewerLoadInitiated=false;
- this.m_bCanRunReports=false;
- };
- ViewerLoadManager.prototype.viewerLoadInitiated=function(){
- this.m_bViewerLoadInitiated=true;
- };
- ViewerLoadManager.prototype.isViewerLoadInitiated=function(){
- return this.m_bViewerLoadInitiated;
- };
- ViewerLoadManager.prototype.canRunReports=function(){
- return this.m_bCanRunReports;
- };
- ViewerLoadManager.prototype.runningReport=function(){
- if(!this.m_bCanRunReports){
- this._queue({fCallback:dojo.hitch(this,function(){
- this.m_bCanRunReports=true;
- return false;
- })});
- }
- };
- ViewerLoadManager.prototype.isViewerReady=function(){
- if(!this.isViewerLoaded()){
- return false;
- }
- if(!this._isEmpty()||this.m_fOnEmptyCallback||this.m_bPendingRequest){
- return false;
- }
- return true;
- };
- ViewerLoadManager.prototype.isViewerLoaded=function(){
- var oCV=this.m_oWidget.getViewerObject();
- if(!oCV){
- return false;
- }
- if(this.m_oWidget.isLiveReport()){
- var _1140=oCV.getStatus();
- return _1140==="complete"||_1140==="prompting"||_1140==="fault";
- }
- return true;
- };
- ViewerLoadManager.prototype.runWhenHasViewer=function(f,_1142){
- if(this.isViewerReady()){
- this._run(f);
- return true;
- }else{
- var _1143={fCallback:f};
- if(_1142){
- _1143.sGroupId=_1142;
- }
- this._queue(_1143);
- if(!this.m_bViewerLoadInitiated){
- this.getDelayedLoadingContext().setForceRunReport(true);
- this.m_oWidget.setRunReportOption(false);
- this.m_oWidget.postReport(null);
- }
- return false;
- }
- };
- ViewerLoadManager.prototype.processQueue=function(){
- this.m_bPendingRequest=false;
- var _1144=false;
- while(!_1144&&!this._isEmpty()){
- var _1145=this.m_aQueue.shift();
- while(_1145.sGroupId&&!this._isEmpty()&&this.m_aQueue[0].sGroupId===_1145.sGroupId){
- _1145=this.m_aQueue.shift();
- }
- _1144=this._run(_1145.fCallback);
- }
- if(this._isEmpty()&&!_1144&&this.m_fOnEmptyCallback){
- var _1146=this.m_fOnEmptyCallback;
- this.m_fOnEmptyCallback=null;
- _1146();
- }
- };
- ViewerLoadManager.prototype._run=function(f){
- var _1148=f.call();
- if(_1148){
- this.m_bPendingRequest=true;
- }
- return _1148;
- };
- ViewerLoadManager.prototype._isEmpty=function(){
- return !this.m_aQueue.length;
- };
- ViewerLoadManager.prototype._queue=function(_1149){
- this.m_aQueue.push(_1149);
- };
- ViewerLoadManager.prototype.setOnEmptyCallback=function(_114a){
- this.m_fOnEmptyCallback=_114a;
- };
- ViewerLoadManager.prototype.getDelayedLoadingContext=function(){
- return this.m_oDelayedLoadingContext;
- };
- 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(_114b){
- this.m_headers=_114b;
- };
- XmlHttpObject.prototype.getHeaders=function(){
- return this.m_headers;
- };
- XmlHttpObject.prototype.newRequest=function(){
- var _114c=new XmlHttpObject();
- _114c.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch);
- this.executeHttpCallback("newRequest");
- return _114c;
- };
- 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(_114d){
- if(this.m_httpCallbacks&&this.m_httpCallbacks[_114d]){
- var _114e=this.concatResponseArguments(this.m_httpCallbacks.customArguments);
- var _114f=GUtil.generateCallback(this.m_httpCallbacks[_114d].method,_114e,this.m_httpCallbacks[_114d].object);
- _114f();
- return true;
- }
- return false;
- };
- XmlHttpObject.prototype.setCallbacks=function(_1150){
- if(!this.m_httpCallbacks){
- this.m_httpCallbacks={};
- }
- for(callback in _1150){
- this.m_httpCallbacks[callback]=_1150[callback];
- }
- };
- XmlHttpObject.prototype.getCallbacks=function(){
- return this.m_httpCallbacks;
- };
- XmlHttpObject.createRequestObject=function(){
- var _1151=null;
- if(window.XMLHttpRequest){
- _1151=new XMLHttpRequest();
- }else{
- if(window.ActiveXObject){
- _1151=new ActiveXObject("Msxml2.XMLHTTP");
- }else{
- }
- }
- return _1151;
- };
- XmlHttpObject.prototype.waitForXmlHttpResponse=function(){
- var _1152=this.xmlHttp;
- if(_1152&&_1152.readyState===4){
- if(_1152.status===200){
- this.httpSuccess();
- }else{
- this.httpError();
- }
- }else{
- }
- };
- XmlHttpObject.prototype.init=function(_1153,_1154,url,_1156){
- this.m_action=_1153;
- this.m_gateway=_1154;
- this.m_url=url;
- this.m_asynch=_1156;
- };
- 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(_1157,_1158,url,async){
- var _115b=this.xmlHttp;
- if(_115b){
- _115b.open(_1157,_1158,async);
- if(async){
- _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- }else{
- _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this);
- if(!isIE()){
- _115b.onload=GUtil.generateCallback(this.httpSuccess,[],this);
- _115b.onerror=GUtil.generateCallback(this.httpError,[],this);
- }
- }
- _115b.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
- if(this.m_headers){
- for(header in this.m_headers){
- _115b.setRequestHeader(header,this.m_headers[header]);
- }
- }
- this.executeHttpCallback("preHttpRequest");
- var _115c=this.convertFormFieldsToUrl();
- if(url){
- _115c+=url;
- }
- _115b.send(_115c);
- }
- };
- 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(_1160){
- return this.m_formFields.get(_1160);
- };
- XmlHttpObject.prototype.clearFormFields=function(){
- this.m_formFields=new CDictionary();
- };
- XmlHttpObject.prototype.convertFormFieldsToUrl=function(){
- var url="";
- var _1162=this.m_formFields.keys();
- for(var index=0;index<_1162.length;index++){
- if(index>0){
- url+="&";
- }
- url+=encodeURIComponent(_1162[index])+"="+encodeURIComponent(this.m_formFields.get(_1162[index]));
- }
- return url;
- };
- XmlHttpObject.prototype.concatResponseArguments=function(_1164){
- var _1165=[this];
- if(_1164){
- _1165=_1165.concat(_1164);
- }
- return _1165;
- };
- function AsynchRequest(_1166,_1167){
- AsynchRequest.baseConstructor.call(this);
- this.m_gateway=_1166;
- this.m_webContentRoot=_1167;
- 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(_1168){
- if(this.m_callbacks[_1168]){
- var _1169=this.concatResponseArguments(this.m_callbacks.customArguments);
- var _116a=GUtil.generateCallback(this.m_callbacks[_1168].method,_1169,this.m_callbacks[_1168].object);
- _116a();
- return true;
- }
- return false;
- };
- AsynchRequest.prototype.setCallbacks=function(_116b){
- if(!this.m_callbacks){
- this.m_callbacks={};
- }
- for(callback in _116b){
- this.m_callbacks[callback]=_116b[callback];
- }
- };
- AsynchRequest.prototype.getCallbacks=function(){
- return this.m_callbacks;
- };
- AsynchRequest.prototype.newRequest=function(){
- var _116c=this.construct();
- _116c.setHeaders(this.getHeaders());
- if(this.getFormFields().exists("b_action")){
- _116c.addFormField("b_action",this.getFormField("b_action"));
- }
- if(this.getFormFields().exists("cv.catchLogOnFault")){
- _116c.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- _116c.setPromptDialog(this.m_promptDialog);
- _116c.setFaultDialog(this.m_faultDialog);
- _116c.setLogonDialog(this.m_logonDialog);
- _116c.m_asynch=this.m_asynch;
- if(this.m_callbacks.newRequest){
- var _116d=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_116c],this.m_callbacks.newRequest.object);
- _116d();
- }
- return _116c;
- };
- AsynchRequest.prototype.success=function(){
- var _116e=this.getAsynchStatus();
- switch(_116e){
- 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(_116f){
- if(_116f instanceof IFaultDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setFaultDialog is deprecated");
- }
- this.m_faultDialog=_116f;
- }else{
- if(_116f&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- };
- AsynchRequest.prototype.setPromptDialog=function(_1170){
- if(_1170 instanceof IPromptDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setPromptDialog is deprecated");
- }
- this.m_promptDialog=_1170;
- }else{
- if(_1170&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- };
- AsynchRequest.prototype.setLogonDialog=function(_1171){
- if(_1171 instanceof ILogOnDialog){
- if(typeof console!="undefined"){
- console.log("AsynchRequest.prototype.setLogonDialog is deprecated");
- }
- this.m_logonDialog=_1171;
- }else{
- if(_1171&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- };
- AsynchRequest.prototype.resubmitRequest=function(){
- var _1172=this.newRequest();
- _1172.m_formFields=this.m_formFields;
- _1172.sendRequest();
- return _1172;
- };
- AsynchRequest.prototype.sendRequest=function(){
- var _1173=this;
- var _1174={"complete":{"object":_1173,"method":_1173.successHandler},"fault":{"object":_1173,"method":_1173.errorHandler}};
- this.init("POST",this.m_gateway,"",this.m_asynch);
- this.executeCallback("preHttpRequest");
- this.parent.setCallbacks.call(this,_1174);
- 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 _1175=this.getResponseText();
- if(_1175.indexOf("<ERROR_CODE>CAM_PASSPORT_ERROR</ERROR_CODE>")!=-1){
- this.passportTimeout();
- }else{
- if((_1175.indexOf("http-equiv=\"refresh\"")!=-1)||(_1175.indexOf("http-equiv='refresh'")!=-1)){
- this.passportTimeout();
- }else{
- this.executeCallback("entryFault");
- if(!this.executeCallback("fault")){
- var _1176=window.open("","","height=400,width=500");
- if(_1176!=null){
- _1176.document.write(_1175);
- }
- }
- }
- }
- }else{
- this.m_soapFault=this.constructFaultEnvelope();
- if(this.m_soapFault!=null){
- var _1177=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true);
- if(_1177!=null&&XMLHelper_FindChildByTagName(_1177,"promptInfo",true)){
- this.passportTimeout();
- }else{
- this.fault();
- }
- }else{
- this.success();
- }
- }
- };
- AsynchRequest.prototype.cancel=function(){
- this.parent.cancel.call(this);
- var _1178=this.getFormField("m_tracking");
- if(_1178){
- var _1179=new XmlHttpObject();
- _1179.init("POST",this.m_gateway,"",false);
- if(this.getFormField("cv.outputKey")){
- _1179.addFormField("b_action","cvx.high");
- _1179.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _1179.setHeaders(this.getHeaders());
- }else{
- _1179.addFormField("b_action","cognosViewer");
- }
- _1179.addFormField("cv.responseFormat","successfulRequest");
- _1179.addFormField("ui.action","cancel");
- _1179.addFormField("m_tracking",_1178);
- if(this.getFormField("cv.debugDirectory")){
- _1179.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _1179.sendRequest();
- this.executeCallback("cancel");
- }
- };
- AsynchRequest.prototype.working=function(){
- this.executeCallback("working");
- var _117a=this.newRequest();
- _117a.addFormField("m_tracking",this.getTracking());
- if(this.getFormField("cv.outputKey")){
- _117a.addFormField("cv.outputKey",this.getFormField("cv.outputKey"));
- _117a.addFormField("b_action","cvx.high");
- }
- if(this.isRAPWaitTrue()){
- _117a.m_formFields=this.m_formFields;
- _117a.addFormField("m_tracking",this.getTracking());
- _117a.addFormField("rapWait","true");
- var _117b=this.getRAPRequestCache();
- if(_117b!==null&&typeof _117b!="undefined"){
- _117a.addFormField("rapRequestCache",_117b);
- }
- var _117c=this.getMainConversation();
- if(_117c){
- _117a.addFormField("mainConversation",_117c);
- }
- var _117d=this.getMainTracking();
- if(_117d){
- _117a.addFormField("mainTracking",_117d);
- }
- }else{
- _117a.addFormField("ui.action","wait");
- _117a.addFormField("ui.primaryAction",this.getPrimaryAction());
- _117a.addFormField("cv.actionState",this.getActionState());
- if(this.getFormField("ui.preserveRapTags")){
- _117a.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags"));
- }
- if(this.getFormField("ui.backURL")){
- _117a.addFormField("ui.backURL",this.getFormField("ui.backURL"));
- }
- if(this.getFormField("errURL")){
- _117a.addFormField("errURL",this.getFormField("errURL"));
- }
- if(this.getFormField("cv.showFaultPage")){
- _117a.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage"));
- }
- if(this.getFormField("cv.catchLogOnFault")){
- _117a.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault"));
- }
- }
- if(this.getFormField("bux")){
- _117a.addFormField("bux",this.getFormField("bux"));
- }
- if(this.getFormField("cv.debugDirectory")){
- _117a.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory"));
- }
- _117a.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(_117e){
- var _117f=this.newRequest();
- _117f.addFormField("ui.action","forward");
- _117f.addFormField("m_tracking",this.getTracking());
- _117f.addFormField("ui.conversation",this.getConversation());
- _117f.addFormField("ui.primaryAction",this.getPrimaryAction());
- _117f.addFormField("cv.actionState",this.getActionState());
- for(var _1180 in _117e){
- _117f.addFormField(_1180,_117e[_1180]);
- }
- _117f.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 _1181=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId();
- window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_1181,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 _1182=this.constructFaultEnvelope();
- if(_1182){
- var _1183=XMLHelper_FindChildByTagName(_1182,"faultcode",true);
- if(_1183!=null){
- return XMLHelper_GetText(_1183);
- }
- }
- return null;
- };
- AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){
- var _1184=this.constructFaultEnvelope();
- if(_1184){
- var entry=XMLHelper_FindChildByTagName(_1184,"messageString",true);
- if(entry!=null){
- return XMLHelper_GetText(entry);
- }
- }
- return null;
- };
- function AsynchDATARequest(_1186,_1187){
- AsynchDATARequest.baseConstructor.call(this,_1186,_1187);
- 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 _1188=this.getResponseText().substring(0,12);
- if(_1188==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 _118a=state.m_sSoapFault;
- this.m_soapFault=XMLBuilderLoadXMLFromString(_118a);
- }
- }
- }
- return this.m_soapFault;
- };
- AsynchDATARequest.prototype.construct=function(){
- var _118b=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot);
- _118b.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _118b.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _118b.addFormField("cv.responseFormat","data");
- }
- return _118b;
- };
- AsynchDATARequest.prototype.getEnvParam=function(param){
- var _118d=this.getResponseState();
- if(_118d&&typeof _118d.envParams!="undefined"&&typeof _118d.envParams[param]!="undefined"){
- return _118d.envParams[param];
- }
- return null;
- };
- AsynchDATARequest.prototype.isRAPWaitTrue=function(){
- var _118e=this.getEnvParam("rapWait");
- if(_118e!=null){
- return _118e=="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(_118f,_1190){
- AsynchJSONRequest.baseConstructor.call(this,_118f,_1190);
- 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 _1192=this.removeInvalidCharacters(text);
- this.m_jsonResponse=eval("("+_1192+")");
- }
- }
- }
- return this.m_jsonResponse;
- };
- AsynchJSONRequest.prototype.getTracking=function(){
- var _1193=this.getJSONResponseObject();
- if(_1193){
- return _1193.tracking;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getConversation=function(){
- var _1194=this.getJSONResponseObject();
- if(_1194){
- return _1194.conversation;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getAsynchStatus=function(){
- var _1195=this.getJSONResponseObject();
- if(_1195){
- return _1195.status;
- }
- return "unknown";
- };
- AsynchJSONRequest.prototype.getPrimaryAction=function(){
- var _1196=this.getJSONResponseObject();
- if(_1196){
- return _1196.primaryAction;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getActionState=function(){
- var _1197=this.getJSONResponseObject();
- if(_1197){
- return _1197.actionState;
- }
- return "";
- };
- AsynchJSONRequest.prototype.getDebugLogs=function(){
- var _1198=this.getJSONResponseObject();
- if(_1198){
- return _1198.debugLogs;
- }
- return "";
- };
- AsynchJSONRequest.prototype.isRAPWaitTrue=function(){
- var _1199=this.getJSONResponseObject();
- if(_1199){
- return (_1199.rapWait==="true");
- }
- return false;
- };
- AsynchJSONRequest.prototype.getRAPRequestCache=function(){
- var _119a=this.getJSONResponseObject();
- if(_119a){
- var _119b=_119a.rapRequestCache;
- if(_119b!==null&&typeof _119b!="undefined"){
- return _119b;
- }
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainConversation=function(){
- var _119c=this.getJSONResponseObject();
- if(_119c){
- return _119c.mainConversation;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getMainTracking=function(){
- var _119d=this.getJSONResponseObject();
- if(_119d){
- return _119d.mainTracking;
- }
- return null;
- };
- AsynchJSONRequest.prototype.getResult=function(){
- var _119e=this.getJSONResponseObject();
- if(_119e&&_119e.json){
- var _119f=this.removeInvalidCharacters(_119e.json);
- return eval("("+_119f+")");
- }
- return null;
- };
- AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){
- if(text){
- text=text.replace(/(\n|\r|\t)+/g,"");
- }
- return text;
- };
- AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){
- var _11a1=this.getJSONResponseObject();
- if(_11a1&&_11a1.promptHTMLFragment){
- return _11a1.promptHTMLFragment;
- }
- return "";
- };
- AsynchJSONRequest.prototype.constructFaultEnvelope=function(){
- if(this.m_soapFault==null){
- var _11a2=this.getJSONResponseObject();
- if(_11a2.status=="fault"){
- this.m_soapFault=XMLBuilderLoadXMLFromString(_11a2.fault);
- }
- }
- return this.m_soapFault;
- };
- AsynchJSONRequest.prototype.construct=function(){
- var _11a3=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot);
- _11a3.setCallbacks(this.m_callbacks);
- if(this.getFormFields().exists("cv.responseFormat")){
- _11a3.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat"));
- }else{
- _11a3.addFormField("cv.responseFormat","asynchJSON");
- }
- return _11a3;
- };
- 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(_11a4){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:show not implemented.");
- }
- };
- ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_11a5){
- if(typeof console!="undefined"){
- console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented.");
- }
- };
- function IPromptDialog(){
- };
- IPromptDialog.prototype.initialize=function(url,width,_11a8){
- 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(_11a9){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:preHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postHttpRequest=function(_11aa){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postHttpRequest not implemented.");
- }
- };
- IRequestHandler.prototype.postComplete=function(_11ab){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:postComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onComplete=function(_11ac){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onPostEntryComplete=function(_11ad){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPostEntryComplete not implemented.");
- }
- };
- IRequestHandler.prototype.onFault=function(_11ae){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onFault not implemented.");
- }
- };
- IRequestHandler.prototype.onPrompting=function(_11af){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onPrompting not implemented.");
- }
- };
- IRequestHandler.prototype.onWorking=function(_11b0){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:onWorking not implemented.");
- }
- };
- IRequestHandler.prototype.setWorkingDialog=function(_11b1){
- if(typeof console!="undefined"){
- console.log("Required method IRequestHandler:setWorkingDialog not implemented.");
- }
- };
- IRequestHandler.prototype.setRequestIndicator=function(_11b2){
- 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(_11b4){
- };
- 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(_11b5){
- this.m_oDispatcherEntry=_11b5;
- };
- BaseRequestHandler.prototype.getDispatcherEntry=function(){
- return this.m_oDispatcherEntry;
- };
- BaseRequestHandler.prototype.processInitialResponse=function(_11b6){
- this.updateViewerState(_11b6);
- };
- BaseRequestHandler.prototype.setLogOnDialog=function(_11b7){
- if(_11b7==null){
- this.m_logOnDialog=null;
- }else{
- if(_11b7 instanceof ILogOnDialog){
- this.m_logOnDialog=_11b7;
- }else{
- if(_11b7&&typeof console!="undefined"){
- console.log("The parameter logOnDialog must be an instance of ILogOnDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setWorkingDialog=function(_11b8){
- if(_11b8==null){
- this.m_workingDialog=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){
- this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog();
- }else{
- if(_11b8 instanceof IRequestIndicator){
- this.m_workingDialog=_11b8;
- }else{
- if(_11b8&&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(_11b9){
- if(_11b9==null){
- this.m_requestIndicator=null;
- }else{
- if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){
- this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator();
- }else{
- if(_11b9 instanceof IRequestIndicator){
- this.m_requestIndicator=_11b9;
- }else{
- if(_11b9&&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(_11ba){
- if(_11ba==null){
- this.m_faultDialog=null;
- }else{
- if(_11ba instanceof IFaultDialog){
- this.m_faultDialog=_11ba;
- }else{
- if(_11ba&&typeof console!="undefined"){
- console.log("The parameter faultDialog must be an instance of IFaultDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.setPromptDialog=function(_11bb){
- if(_11bb==null){
- this.m_promptDialog=null;
- }else{
- if(_11bb instanceof IPromptDialog){
- this.m_promptDialog=_11bb;
- }else{
- if(_11bb&&typeof console!="undefined"){
- console.log("The parameter promptDialog must be an instance of IPromptDialog");
- }
- }
- }
- };
- BaseRequestHandler.prototype.preHttpRequest=function(_11bc){
- if(_11bc&&typeof _11bc.getFormField=="function"){
- if(_11bc.getFormField("ui.action")!="wait"&&_11bc.getFormField("rapWait")!="true"){
- if(this.m_requestIndicator){
- this.m_requestIndicator.show();
- }
- }
- }
- };
- BaseRequestHandler.prototype.postHttpRequest=function(_11bd){
- if(_11bd&&typeof _11bd.getAsynchStatus=="function"){
- var _11be=_11bd.getAsynchStatus();
- if(_11be!="working"&&_11be!="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(_11bf){
- 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",_11bf);
- }
- return;
- }
- if(!this.m_faultDialog){
- this.m_faultDialog=new FaultDialog(this.getViewer());
- }
- if(_11bf&&_11bf.getResponseHeader&&_11bf.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- this.m_faultDialog.handleUnknownHTMLResponse(_11bf.getResponseText());
- }else{
- if(_11bf&&_11bf.getSoapFault){
- this.m_faultDialog.show(_11bf.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _11c1=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_faultDialog.show(_11c1);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("An unhandled fault was returned: %o",_11bf);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.isAuthenticationFault=function(_11c2){
- var oCV=this.getViewer();
- var _11c4=null;
- if(_11c2&&_11c2.getSoapFault){
- _11c4=_11c2.getSoapFault();
- }else{
- if(oCV.getSoapFault()){
- _11c4=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- }
- }
- if(_11c4!=null){
- var _11c5=XMLHelper_FindChildByTagName(_11c4,"CAM",true);
- return (_11c5!=null&&XMLHelper_FindChildByTagName(_11c5,"promptInfo",true)!=null);
- }
- return false;
- };
- BaseRequestHandler.prototype.onPassportTimeout=function(_11c6){
- 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(_11c6&&_11c6.getResponseHeader&&_11c6.getResponseHeader("Content-type").indexOf("text/html")!=-1){
- var _11c8="";
- if(_11c6.getResponseText){
- _11c8=_11c6.getResponseText();
- }
- if((_11c8.indexOf("http-equiv=\"refresh\"")!=-1)||(_11c8.indexOf("http-equiv='refresh'")!=-1)){
- this.m_logOnDialog.show(null);
- }else{
- this.m_logOnDialog.handleUnknownHTMLResponse(_11c8);
- }
- }else{
- if(_11c6&&_11c6.getSoapFault){
- this.m_logOnDialog.show(_11c6.getSoapFault());
- }else{
- if(oCV.getSoapFault()){
- var _11c9=XMLBuilderLoadXMLFromString(oCV.getSoapFault());
- this.m_logOnDialog.show(_11c9);
- oCV.setSoapFault("");
- }else{
- if(typeof console!="undefined"){
- console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_11c6);
- }
- }
- }
- }
- };
- BaseRequestHandler.prototype.onWorking=function(_11ca){
- if(this.m_workingDialog){
- var _11cb=_11ca&&typeof _11ca.getAsynchStatus=="function"&&_11ca.getAsynchStatus()=="stillWorking"?true:false;
- if(!_11cb){
- 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 _11ce=oCV.getViewerWidget();
- if(_11ce.getLoadManager()){
- _11ce.getLoadManager().processQueue();
- }
- }
- };
- BaseRequestHandler.prototype.onPrompting=function(_11cf){
- 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"]=_11cf;
- window["AsynchRequestPromptDialog"]=this.m_promptDialog;
- var _11d1="?cv.id="+oCV.getId();
- window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_11d1,400,400);
- window["AsynchRequestPromptDialog"].show();
- };
- BaseRequestHandler.prototype.processDATAReportResponse=function(_11d2){
- 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 _11d4=_11d2.getResponseState();
- if(!_11d4){
- this.resubmitInSafeMode();
- }
- if(this.loadReportHTML(_11d2.getResult())===false){
- this.resubmitInSafeMode();
- }
- this.updateViewerState(_11d4);
- };
- BaseRequestHandler.prototype.updateViewerState=function(_11d5){
- var oCV=this.getViewer();
- applyJSONProperties(oCV,_11d5);
- var _11d7=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(_11d7!="fault"){
- if(oCV.envParams["rapReportInfo"]){
- this._processRapReportInfo(oCV);
- }
- if(typeof _11d5.clientunencodedexecutionparameters!="undefined"){
- var _11d8=document.getElementById("formWarpRequest"+oCV.getId());
- if(_11d8!=null&&typeof _11d8["clientunencodedexecutionparameters"]!="undefined"){
- _11d8["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters;
- }
- if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){
- document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters;
- }
- }
- }else{
- oCV.setTracking("");
- }
- };
- BaseRequestHandler.prototype._processRapReportInfo=function(oCV){
- if(oCV.envParams["rapReportInfo"]){
- var _11da=eval("("+oCV.envParams["rapReportInfo"]+")");
- if(typeof RAPReportInfo!="undefined"){
- var _11db=new RAPReportInfo(_11da,oCV);
- oCV.setRAPReportInfo(_11db);
- }
- }
- };
- BaseRequestHandler.prototype.loadReportHTML=function(_11dc){
- if(!_11dc){
- 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=_11dc.replace(/<form[^>]*>/gi,"").replace(/<\/form[^>]*>/gi,"");
- oCV.m_sHTML=sHTML;
- oCV.setHasPrompts(false);
- var id=oCV.getId();
- var _11e0=document.getElementById("RVContent"+id);
- var _11e1=document.getElementById("CVReport"+id);
- if(window.gScriptLoader){
- var _11e2=oCV.getViewerWidget()?true:false;
- var _11e3=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_11e1;
- sHTML=window.gScriptLoader.loadCSS(sHTML,_11e3,_11e2,id);
- }
- if(oCV.sBrowser=="ie"){
- sHTML="<span style='display:none'> </span>"+sHTML;
- }
- _11e1.innerHTML=sHTML;
- this.massageHtmlBeforeDisplayed();
- if(window.gScriptLoader){
- var _11e4=GUtil.generateCallback(oCV.showLoadedContent,[_11e0],oCV);
- oCV.m_resizeReady=false;
- if(!window.gScriptLoader.loadAll(_11e1,_11e4,id,true)){
- if(window.gScriptLoader.containsAjaxWarnings()){
- return false;
- }
- }
- }else{
- _11e0.style.display="block";
- }
- var _11e5=document.querySelectorAll("button");
- var _11e6=_11e5.length;
- for(var k=0;k<_11e6;k++){
- var _11e8=_11e5[k];
- var id=_11e8.id;
- var _11e9=id.match(/reprompt/);
- if(_11e9){
- var _11ea=_11e8.outerHTML;
- var _11eb=_11ea.match(/layoutname="\w+"/);
- if(_11eb!==null){
- var _11ec=_11eb[0];
- var _11ed=/".*"/;
- var _11ee=_11ed.exec(_11ec);
- if(oCV.getCurrentPromptControlFocus()==_11ee){
- _11e8.focus();
- oCV.setCurrentPromptControlFocus(null);
- _11e8=null;
- }
- }else{
- oCV.setCurrentPromptControlFocus(null);
- _11e8=null;
- }
- }
- }
- oCV.updateOutputForA11ySupport();
- this._clearFindState();
- return true;
- };
- BaseRequestHandler.prototype._clearFindState=function(){
- var oCV=this.getViewer();
- var _11f0=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null;
- if(_11f0&&!_11f0.findOnServerInProgress()){
- oCV.getState().clearFindState();
- }
- };
- BaseRequestHandler.prototype.showReport=function(){
- var oCV=this.getViewer();
- var _11f2=document.getElementById("CVReport"+oCV.getId());
- if(_11f2){
- _11f2.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(_11f4){
- if(this.m_httpRequestConfig){
- var _11f5=this.m_httpRequestConfig.getReportStatusCallback(_11f4);
- if(_11f5){
- _11f5();
- }
- }
- };
- 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(_11f6,_11f7){
- var _11f8=_11f6;
- var _11f9=this[_11f7];
- this[_11f7]=function(_11fa){
- _11f9.apply(this,arguments);
- var _11fb=null;
- if(_11fa&&typeof _11fa.getAsynchStatus=="function"){
- _11fb=_11fa.getAsynchStatus();
- }else{
- _11fb=_11f8=="complete"?this.getViewer().getStatus():_11f8;
- }
- if(_11fb=="stillWorking"){
- return;
- }
- var _11fc=this.m_httpRequestConfig.getReportStatusCallback(_11fb);
- if(typeof _11fc=="function"){
- setTimeout(_11fc,10);
- }
- };
- };
- dojo.provide("FaultDialog");
- dojo.declare("FaultDialog",IFaultDialog,{m_soapFault:null,m_errorMessage:null,m_oCV:null,constructor:function(oCV){
- this.m_oCV=oCV;
- },show:function(_11fe){
- this.m_soapFault=_11fe;
- this.m_oCV.m_resizeReady=true;
- this.renderInlineDialog();
- this.m_oCV.getViewerWidget().setErrorDlg(this);
- },handleUnknownHTMLResponse:function(_11ff){
- if(_11ff){
- var _1200=window.open("","","height=400,width=500");
- if(_1200!=null){
- _1200.document.write(_11ff);
- }
- }
- },canRetryRequest:function(){
- var _1201=true;
- var _1202=XMLHelper_FindChildrenByTagName(this.m_soapFault,"allowRetry",true);
- if(_1202.length>0){
- _1201=(XMLHelper_GetText(_1202[0],false)==="true");
- }
- return _1201;
- },isWarningMessage:function(){
- return false;
- },getButtons:function(){
- var _1203=[{label:RV_RES.IDS_JS_OK,action:dojo.hitch(this,this.ok)}];
- if(this.canRetryRequest()){
- _1203.push({label:RV_RES.IDS_JS_RETRY,action:dojo.hitch(this,this.retry)});
- }
- return _1203;
- },renderInlineDialog:function(){
- var _1204={"type":this.isWarningMessage()?"warning":"error","message":this.getErrorMessage(),"buttons":this.getButtons()};
- var _1205=this.getDetails();
- if(_1205&&_1205.length>0){
- _1204.details=_1205;
- }
- this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,_1204);
- },setErrorMessage:function(_1206){
- this.m_errorMessage=_1206;
- },getErrorMessage:function(){
- if(this.m_errorMessage==null){
- var _1207=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true);
- if(_1207.length>0){
- var _1208=XMLHelper_FindChildByTagName(_1207[0],"messageString",false);
- this.checkAndSetErrorMessage(XMLHelper_GetText(_1208,false));
- }
- }
- return this.m_errorMessage;
- },checkAndSetErrorMessage:function(_1209){
- this.m_detailMessageStartIndex=1;
- if(_1209.indexOf("RSV-BBP-0038")==0){
- _1209=RV_RES.IDS_CONV_CANCELED_ERROR;
- this.m_detailMessageStartIndex=0;
- }
- this.m_errorMessage=_1209;
- },getDetails:function(){
- var _120a="";
- var _120b=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true);
- if(_120b.length>0){
- if(typeof this.m_detailMessageStartIndex==="undefined"||this.m_detailMessageStartIndex===null){
- this.m_detailMessageStartIndex=1;
- }
- for(var _120c=this.m_detailMessageStartIndex;_120c<_120b.length;++_120c){
- var _120d=XMLHelper_FindChildByTagName(_120b[_120c],"messageString",false);
- _120a+=XMLHelper_GetText(_120d,false)+"\n";
- }
- }
- return _120a;
- },retry:function(){
- var _120e=this.m_oCV.getRetryDispatcherEntry();
- this.hide();
- if(_120e){
- _120e.retryRequest();
- }else{
- var _120f=this.m_oCV.getViewerWidget().getOriginalFormFields();
- if(_120f&&(_120f.get("b_action")=="cvx"||_120f.get("b_action")=="cvx.high")){
- _120f.add("b_action","cognosViewer");
- }
- this.m_oCV.executeAction("RetryRequest",_120f);
- }
- },ok:function(){
- var _1210=this.m_oCV.getRetryDispatcherEntry();
- this.hide();
- if(_1210){
- _1210.onCloseErrorDlg();
- }
- },hide:function(){
- this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,{remove:1});
- this.m_oCV.getViewerWidget().setErrorDlg(null);
- this.m_oCV.setRetryDispatcherEntry(null);
- }});
- function buxErrorPage_toggleErrorDetails(event,cvId,_1213){
- if((event.button==0&&(event.keyCode=="0"||typeof event.keyCode=="undefined"))||event.keyCode=="32"||event.keyCode=="13"){
- var _1214=document.getElementById("buxErrorPageDetailContentOuter"+cvId);
- var _1215=document.getElementById("buxErrorPageDetails"+cvId);
- var _1216=document.getElementById("titlePaneTitle"+cvId);
- var _1217=(_1215.style.display=="none");
- dojo.removeClass(_1214,_1217?"dijitTitlePaneContentOuterClosed":"dijitTitlePaneContentOuterOpen");
- dojo.addClass(_1214,_1217?"dijitTitlePaneContentOuterOpen":"dijitTitlePaneContentOuterClosed");
- dojo.removeClass(_1216,_1217?"dijitClose":"dijitOpen");
- dojo.addClass(_1216,_1217?"dijitOpen":"dijitClose");
- _1215.style.display=_1217?"":"none";
- }
- };
- function ModalFaultDialog(){
- };
- ModalFaultDialog.prototype=new FaultDialog();
- ModalFaultDialog.prototype.show=function(_1218){
- var _1219="";
- var _121a="",_121b="";
- var _121c=XMLHelper_FindChildrenByTagName(_1218,"message",true);
- if(_121c.length>0){
- for(var _121d=1;_121d<_121c.length;++_121d){
- _121b=XMLHelper_FindChildByTagName(_121c[_121d],"messageString",false);
- _1219+=XMLHelper_GetText(_121b,false)+"\n";
- }
- _121b=XMLHelper_FindChildByTagName(_121c[0],"messageString",false);
- _121a=XMLHelper_GetText(_121b,false);
- }
- bux.messageBox(bux.MB_ERROR,_121a,"",_1219);
- };
- dojo.provide("GlobalPromptFaultDialog");
- dojo.require("FaultDialog");
- dojo.declare("GlobalPromptFaultDialog",FaultDialog,{m_sendRequestOnOK:false,setSendRequestOnOK:function(_121e){
- this.m_sendRequestOnOK=_121e;
- },ok:function(){
- this.hide();
- this.m_oCV.getViewerWidget().disableListenToForGlobalPrompt();
- if(this.m_sendRequestOnOK){
- var _121f=this.m_oCV.getRetryDispatcherEntry();
- var _1220=null;
- if(_121f){
- _1220=_121f.getOriginalFormFields();
- }else{
- _1220=this.m_oCV.getViewerWidget().getOriginalFormFields();
- }
- if(_1220&&_1220.exists("widget.globalPromptInfo")){
- _1220.remove("widget.globalPromptInfo");
- }
- this.retry();
- }
- }});
- dojo.provide("FaultMessageDialog");
- dojo.declare("FaultMessageDialog",FaultDialog,{m_oCV:null,m_errorMessage:"",constructor:function(oCV,_1222){
- this.m_errorMessage=_1222;
- },getErrorMessage:function(){
- return this.m_errorMessage;
- },getDetails:function(){
- return "";
- },canRetryRequest:function(){
- return false;
- }});
- dojo.provide("WarningMessageDialog");
- dojo.declare("WarningMessageDialog",FaultMessageDialog,{constructor:function(oCV,_1224){
- },isWarningMessage:function(){
- return true;
- }});
- function LogOnDialog(oCV){
- if(oCV){
- this.m_oCV=oCV;
- }
- };
- LogOnDialog.prototype=new ILogOnDialog();
- LogOnDialog.prototype.getViewer=function(){
- return this.m_oCV;
- };
- LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1226){
- this.show(null);
- };
- LogOnDialog.prototype.show=function(_1227){
- var _1228=this.getPromptInfoNamespacesFromAuthenticationFault(_1227);
- if(window["CVEditContentActionInstance"]){
- window["CVEditContentActionInstance"].transitionFromBUA();
- }
- IWidgetLogonhandler.handleLogon(this.getViewer().getId(),_1228);
- };
- LogOnDialog.prototype.getPromptInfoNamespacesFromAuthenticationFault=function(_1229){
- if(!_1229){
- return null;
- }
- var _122a=XMLHelper_FindChildByTagName(_1229,"CAM",true);
- if(_122a==null){
- return null;
- }
- var _122b=XMLHelper_FindChildByTagName(_122a,"promptInfo",true);
- if(_122b==null){
- return null;
- }
- var _122c=XMLHelper_FindChildByTagName(_122a,"displayObjects",true);
- if(_122c==null){
- return null;
- }
- var items=XMLHelper_FindChildrenByTagName(_122c,"item",true);
- if(items==null||items.length!=1){
- return null;
- }
- var _122e=items[0];
- if(_122e==null){
- return null;
- }
- var _122f=XMLHelper_FindChildByTagName(_122e,"name",true);
- var name=XMLHelper_GetText(_122f,false);
- if(name==="CAMNamespace"){
- var _1231=XMLHelper_FindChildByTagName(_122e,"value",true);
- var value=XMLHelper_GetText(_1231,false);
- if(value!=null){
- return value;
- }
- }
- return null;
- };
- dojo.provide("LogOnHandler");
- dojo.declare("LogOnHandler",null,{constructor:function(){
- this.m_cvIdList=[];
- },handleLogon:function(cvId,_1234){
- this.m_cvIdList.push(cvId);
- if(this.m_cvIdList.length==1){
- dojo["require"]("bux.dialogs.IFrameDialog");
- var _1235=(_1234==null||_1234.length==0)?new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this)}):new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this),params:{"h_CAM_action":"logonAs","CAMNamespace":_1234}});
- _1235.startup();
- _1235.show();
- }
- },okHandler:function(){
- for(var index=0;index<this.m_cvIdList.length;++index){
- var cvId=this.m_cvIdList[index];
- var oCV=window["oCV"+cvId];
- if(index===0&&oCV.getViewerWidget){
- oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.action",null,{action:"refreshAfterLogon"});
- }
- if(oCV.getRetryDispatcherEntry()){
- oCV.getRetryDispatcherEntry().retryRequest();
- }else{
- var _1239=oCV.getViewerWidget().getOriginalFormFields();
- if(_1239){
- oCV.executeAction("RetryRequest",_1239);
- }
- }
- }
- this.m_cvIdList=[];
- },cancelHandler:function(){
- for(var index=0;index<this.m_cvIdList.length;++index){
- var cvId=this.m_cvIdList[index];
- var oCV=window["oCV"+cvId];
- if(oCV.getRetryDispatcherEntry()){
- oCV.getRetryDispatcherEntry().onCloseErrorDlg();
- }
- }
- this.m_cvIdList=[];
- }});
- IWidgetLogonhandler=new LogOnHandler();
- function PromptDialog(oCV){
- this.m_oCV=oCV;
- this.m_url="";
- this.m_width=0;
- this.m_height=0;
- this.m_dialogImpl=null;
- };
- PromptDialog.prototype=new IPromptDialog();
- PromptDialog.prototype.initialize=function(url,width,_1240){
- this.m_url=url;
- this.m_width=width;
- this.m_height=_1240;
- };
- PromptDialog.prototype.show=function(){
- this.m_dialogImpl=new bux.dialogs.IFrameDialog();
- this.m_dialogImpl.src=this.m_url;
- this.m_dialogImpl.width=this.m_width;
- this.m_dialogImpl.height=this.m_height;
- this.m_dialogImpl.startup();
- this.m_dialogImpl.show();
- };
- PromptDialog.prototype.hide=function(){
- this.m_dialogImpl.hide();
- this.m_dialogImpl.destroy();
- delete this.m_dialogImpl;
- this.m_dialogImpl=null;
- };
- function RequestHandler(oCV){
- if(oCV){
- RequestHandler.baseConstructor.call(this,oCV);
- this.m_originalFormFields=null;
- this.m_forceRaiseSharePrompt=false;
- }
- };
- RequestHandler.prototype=new BaseRequestHandler();
- RequestHandler.baseConstructor=BaseRequestHandler;
- RequestHandler.prototype.parent=BaseRequestHandler.prototype;
- RequestHandler.prototype.postHttpRequest=function(_1242){
- var oCV=this.getViewer();
- this.parent.postHttpRequest.call(this,_1242);
- };
- RequestHandler.prototype.setForceRaiseSharePrompt=function(bFlag){
- this.m_forceRaiseSharePrompt=bFlag;
- };
- RequestHandler.prototype.preHttpRequest=function(_1245){
- var oCV=this.getViewer();
- var _1247=oCV.getViewerWidget();
- oCV.setCurrentNodeFocus(null);
- if(this.doRaiseSharePromptEvent(_1245)){
- if(oCV.widgetHasPromptParameters()){
- this.setRequestIndicator(new BaseRequestExecutedIndicator(oCV));
- var _1248=this.getListOfCascadingPromptParametersToReset(oCV,_1245);
- oCV.raisePromptEvent(oCV.envParams["reportPrompts"],_1245.getFormFields(),_1248);
- }else{
- if(!(_1247&&_1247.promptParametersRetrieved==true)){
- var _1249=oCV.getAction("GetParameters");
- _1249.isPrimaryPromptWidget=true;
- _1249.execute();
- }
- }
- }
- oCV.resetRaiseSharePromptEventFlag();
- this.parent.preHttpRequest.call(this,_1245);
- };
- RequestHandler.prototype.getListOfChangedPromptParameters=function(oCV,_124b){
- var _124c=oCV.getOldParameters();
- if(!_124c){
- return null;
- }
- var _124d=[];
- for(var _124e in _124c){
- oldParmValueItems=_124c[_124e].m_parmValueItems;
- var _124f=_124b.getFormFields().get("p_"+_124e);
- if(!_124f){
- continue;
- }
- for(var j=0;j<oldParmValueItems.length;++j){
- var _1251=sXmlEncode(oldParmValueItems[j].m_useValue);
- if(_124f.indexOf(_1251)<0){
- _124d.push("p_"+_124e);
- }
- }
- }
- return _124d;
- };
- RequestHandler.prototype.getListOfCascadingPromptParametersToReset=function(oCV,_1253){
- if(!oCV.preProcessControlArray){
- return null;
- }
- var _1254=this.getListOfChangedPromptParameters(oCV,_1253);
- if(!_1254||!_1254.length){
- return null;
- }
- var _1255=[];
- var _1256=oCV.preProcessControlArray.length;
- var _1257=_1254.slice();
- for(var k=0;k<_1256;k++){
- var _1259=(oCV.preProcessControlArray[k]);
- if(!_1259.getCascadeOnParameter){
- return;
- }
- var _125a=_1259.getCascadeOnParameter();
- if(!_125a){
- continue;
- }
- var _125b=_1259.getParameterName();
- var _125c=_125a.getName();
- if(this.contains(_1257,_125c)&&!this.contains(_1257,_125b)){
- _1257.push(_125b);
- _1255.push(_125b);
- }
- }
- return _1255;
- };
- RequestHandler.prototype.contains=function(a,obj){
- var i=a.length;
- while(i--){
- if(a[i]===obj){
- return true;
- }
- }
- return false;
- };
- RequestHandler.prototype.doRaiseSharePromptEvent=function(_1260){
- var oCV=this.getViewer();
- var _1262=false;
- var _1263=_1260.getFormField("ui.action");
- if(((typeof _1263!=="undefined"&&(_1263==="forward"||_1263==="back"))&&oCV.m_raiseSharePromptEvent)||this.m_forceRaiseSharePrompt){
- _1262=true;
- var _1264=null;
- var _1265=false;
- var _1266=0;
- var _1267=_1260.getFormFields();
- var keys=_1267.keys();
- for(_1264 in keys){
- _1264=keys[_1264];
- if(_1264=="_promptControl"&&_1267.get(_1264)=="search"){
- _1262=false;
- break;
- }else{
- if(_1264.indexOf("p_")===0){
- if(_1264.indexOf("p_credential:")===0){
- _1265=true;
- }else{
- _1266+=1;
- }
- }
- }
- }
- if(_1262&&_1265&&_1266===0){
- _1262=false;
- }
- }
- return _1262;
- };
- RequestHandler.prototype.onComplete=function(_1269){
- var oCV=this.getViewer();
- if(oCV&&!oCV.m_destroyed){
- this.parent.onComplete.call(this,_1269);
- this.processDATAReportResponse(_1269);
- this.postComplete();
- }else{
- if(console){
- console.warn("Tried to complete a request on an invalid CCognosViewer",oCV);
- }
- }
- };
- RequestHandler.prototype.onPrompting=function(_126b){
- var oCV=this.getViewer();
- if(oCV&&!oCV.m_destroyed){
- var _126d=oCV.getViewerWidget();
- _126d.hideToolbarAndContextMenu();
- this.onComplete(_126b);
- }else{
- if(console){
- console.warn("Tried to prompt on an invalid CCognosViewer",oCV);
- }
- }
- };
- RequestHandler.prototype.onError=function(_126e){
- var oCV=this.getViewer();
- if(_126e&&oCV){
- var _1270=oCV.getViewerWidget();
- if(typeof console!="undefined"&&console&&console.log){
- console.log("Viewer http error: "+_126e.getResponseText()+" "+_126e.getStatus());
- }
- _1270.fireEvent("com.ibm.bux.widget.action",null,{action:"httpError",responseText:_126e.getResponseText(),status:_126e.getStatus()});
- }
- };
- RequestHandler.prototype.onFault=function(_1271){
- var oCV=this.getViewer();
- var _1273=oCV.getViewerWidget();
- var _1274=oCV.getRetryDispatcherEntry();
- if(_1274&&_1274.getOriginalFormFields()){
- this.m_originalFormFields=_1274.getOriginalFormFields();
- }else{
- this.m_originalFormFields=_1273.getOriginalFormFields();
- }
- if(window["gReportWidgetLoadQueue"]){
- window["gReportWidgetLoadQueue"].widgetDoneLoading(_1273);
- }
- if(this.isGlobalPromptException()){
- this.handleGlobalPromptException();
- }
- if(this.isMissingMemberException(oCV,_1271)){
- this.handleMissingMemberException(oCV);
- }
- if(oCV.envParams&&oCV.envParams["updateToolbar"]==="true"){
- _1273.savedOutputMenuUpdated=false;
- _1273.updateToolbar();
- }
- if(oCV.envParams&&oCV.envParams["ui.action"]==="buxView"){
- _1273.setSavedOutputsCMResponse(null);
- }
- if(typeof _1273.postOnFault=="function"){
- _1273.postOnFault();
- }
- this.parent.onFault.call(this,_1271);
- if(_1274&&_1271&&_1271.getResponseState){
- var _1275=_1271.getResponseState();
- if(_1275){
- this.updateViewerState(_1275);
- }
- this.onPostEntryComplete();
- }
- };
- RequestHandler.prototype.handleGlobalPromptException=function(){
- var oCV=this.getViewer();
- var _1277=new GlobalPromptFaultDialog(oCV);
- oCV.disableRaiseSharePromptEvent();
- if(this.m_originalFormFields&&!this.m_originalFormFields.exists("sharedPromptRequest")){
- _1277.setSendRequestOnOK(true);
- }
- _1277.setErrorMessage(RV_RES.IDS_JS_GLOBAL_PROMPTS_NOT_RESPONDING_WARNING);
- this.setFaultDialog(_1277);
- };
- RequestHandler.prototype.isGlobalPromptException=function(){
- var oCV=this.getViewer();
- if(this.m_originalFormFields){
- if(this.m_originalFormFields.exists("sharedPromptRequest")||(this.m_originalFormFields.get("ui.reportDrop")==="true"&&this.m_originalFormFields.exists("widget.globalPromptInfo"))){
- return true;
- }
- }
- return false;
- };
- RequestHandler.prototype.postComplete=function(){
- var oCV=this.getViewer();
- if(oCV.getStatus()=="complete"&&!oCV.inlineScriptsDoneExecuting){
- var _127a=this;
- setTimeout(function(){
- _127a.postComplete();
- },10);
- return;
- }
- this.parent.postComplete.call(this);
- if(oCV&&oCV.m_destroyed){
- if(console){
- console.warn("Tried to postComplete on an invalid CCognosViewer",oCV);
- }
- return;
- }
- var _127b=oCV.getViewerWidget();
- if(window["gReportWidgetLoadQueue"]){
- window["gReportWidgetLoadQueue"].widgetDoneLoading(_127b);
- }
- this.showReport();
- oCV.getSelectionController().clearSelectionData();
- oCV.addPageAdornments();
- _127b.savedOutputMenuUpdated=false;
- if(oCV.getStatus()!="prompting"){
- _127b.fetchAnnotationData();
- _127b.getUndoRedoQueue().add({"reportUpdated":true});
- }
- _127b.updateToolbar();
- oCV.m_stateSet=true;
- oCV.doneLoading();
- if(typeof _127b.postComplete=="function"){
- _127b.postComplete();
- }
- };
- RequestHandler.prototype.updateViewerState=function(_127c){
- var oCV=this.getViewer();
- if(oCV&&oCV.m_destroyed){
- if(console){
- console.warn("Tried to update state on an invalid CCognosViewer",oCV);
- }
- return;
- }
- this.parent.updateViewerState.call(this,_127c);
- var _127e=oCV.getStatus();
- if(_127e!="fault"){
- if(oCV.envParams["buxToolbarPayload"]){
- oCV.setToolbar(eval(oCV.envParams["buxToolbarPayload"]));
- delete oCV.envParams["buxToolbarPayload"];
- }
- if(oCV.envParams["buxContextMenuPayload"]){
- oCV.setContextMenu(eval(oCV.envParams["buxContextMenuPayload"]));
- delete oCV.envParams["buxContextMenuPayload"];
- }
- if(oCV.envParams.reportPrompts){
- oCV.getViewerWidget().setPromptParametersRetrieved(true);
- }
- if(oCV.envParams.reRunObject){
- var _127f=document.getElementById("formWarpRequest"+oCV.getId());
- if(_127f["reRunObj"]){
- _127f["reRunObj"].value=oCV.envParams.reRunObject;
- }else{
- _127f.appendChild(createHiddenFormField("reRunObj",oCV.envParams.reRunObject));
- }
- }
- }
- };
- RequestHandler.prototype.processInitialResponse=function(_1280){
- var oCV=this.getViewer();
- var _1282=oCV.getViewerWidget();
- if(_1282!=null){
- if(_1282.shouldUseSavedReportInfo()){
- oCV.envParams["rapReportInfo"]=_1282.getAttributeValue("rapReportInfo");
- }
- this.parent.processInitialResponse.call(this,_1280);
- _1282.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true});
- this.getViewer().renderTabs();
- oCV.getPinFreezeManager().fromJSONString(_1282.getAttributeValue("PinFreezeInfo"));
- var _1283=oCV.getStatus();
- if(_1283!="working"&&_1283!="stillWorking"){
- delete oCV.envParams["cv.outputKey"];
- _1282.setXNodeId(null);
- }
- switch(_1283){
- case "complete":
- _1282.setOriginalFormFields(null);
- this.postComplete();
- break;
- case "working":
- case "stillWorking":
- oCV.getWorkingDialog().show();
- setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10);
- break;
- case "prompting":
- _1282.hideToolbarAndContextMenu();
- break;
- case "fault":
- if(this.isAuthenticationFault()){
- this.onPassportTimeout();
- }else{
- this.onFault();
- }
- }
- this.showReport();
- this.onPostEntryComplete();
- oCV.m_stateSet=true;
- this.onAsynchStatusUpdate(_1283);
- }else{
- var _1284=this;
- setTimeout(function(){
- _1284.processInitialResponse(_1280);
- },100);
- }
- };
- RequestHandler.prototype.onPostEntryComplete=function(){
- var oCV=this.getViewer();
- if(oCV&&oCV.getViewerWidget()){
- var _1286=oCV.getViewerWidget();
- _1286.getLoadManager().processQueue();
- }
- };
- RequestHandler.prototype.isMissingMemberException=function(oCV,_1288){
- if(oCV.bMissingMemberException){
- return true;
- }
- if(_1288&&_1288.getResponseState){
- var _1289=_1288.getResponseState();
- if(_1289&&_1289.envParams&&_1289.envParams.bMissingMemberException){
- this._populateMissingMemberDetails(oCV,_1289);
- return true;
- }
- }
- return false;
- };
- RequestHandler.prototype._populateMissingMemberDetails=function(oCV,_128b){
- if(!oCV||!_128b||!_128b.envParams){
- return;
- }
- oCV.bCanEditContent=_128b.envParams.bCanEditContent;
- oCV.bHasParameters=_128b.envParams.bHasParameters;
- if(_128b.envParams["ui.spec"]){
- if(oCV.envParams){
- if(!oCV.envParams["ui.spec"]){
- oCV.envParams["ui.spec"]=xml_decode(_128b.envParams["ui.spec"]);
- }
- }
- }
- };
- RequestHandler.prototype.handleMissingMemberException=function(oCV){
- var _128d=null;
- _128d=(oCV.bCanEditContent)?RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_FOR_SPEC_PARAM:RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_WITH_NO_BUA;
- var _128e=new MissingMemberFaultDialog(oCV,_128d,oCV.bCanEditContent,oCV.bHasParameters);
- this.setFaultDialog(_128e);
- };
- RequestHandler.prototype.massageHtmlBeforeDisplayed=function(){
- var oCV=this.getViewer();
- if(!oCV){
- return;
- }
- var _1290=oCV.getViewerWidget();
- if(!_1290){
- return;
- }
- _1290.updateDrillThroughLinks();
- };
- function BaseRequestExecutedIndicator(oCV){
- this.m_oCV=oCV;
- if(oCV){
- this.m_oCVId=oCV.getId();
- if(oCV.getViewerWidget()){
- this.m_background=oCV.getViewerWidget().getReportBlocker();
- }
- }
- };
- BaseRequestExecutedIndicator.prototype=new IRequestIndicator();
- BaseRequestExecutedIndicator.prototype.getViewer=function(){
- return this.m_oCV;
- };
- BaseRequestExecutedIndicator.prototype.show=function(){
- this.m_background.setClassNameOverride("report-blocker");
- this.m_background.show();
- };
- BaseRequestExecutedIndicator.prototype.hide=function(){
- if(this.m_background){
- this.m_background.hide();
- }
- };
- function RequestExecutedIndicator(oCV){
- RequestExecutedIndicator.baseConstructor.call(this,oCV);
- };
- RequestExecutedIndicator.prototype=new BaseRequestExecutedIndicator();
- RequestExecutedIndicator.baseConstructor=BaseRequestExecutedIndicator;
- RequestExecutedIndicator.prototype.parent=BaseRequestExecutedIndicator.prototype;
- RequestExecutedIndicator.prototype.show=function(){
- var oCV=this.getViewer();
- var cvid=oCV.getId();
- var _1295=document.getElementById("executionCursor"+cvid);
- var _1296=document.getElementById("formWarpRequest"+cvid);
- if(!_1295&&_1296){
- _1295=document.createElement("span");
- _1295.className="executionCursor";
- _1295.setAttribute("id","executionCursor"+cvid);
- var _1297="<img alt=\"\" src=\""+oCV.getWebContentRoot()+"/rv/images/action_busy_32x32.gif"+"\"/>";
- _1295.innerHTML=_1297;
- _1296.appendChild(_1295);
- }
- this.parent.show.call(this);
- };
- RequestExecutedIndicator.prototype.hide=function(){
- var _1298=document.getElementById("executionCursor"+this.getViewer().getId());
- if(_1298!=null){
- _1298.parentNode.removeChild(_1298);
- }
- this.parent.hide.call(this);
- };
- dojo.provide("WorkingDialog");
- dojo.declare("WorkingDialog",IRequestIndicator,{constructor:function(oCV){
- this.m_oCV=oCV;
- this.m_sNamespace=oCV.getId();
- this.m_sGateway=oCV.getGateway();
- try{
- var _129a=[];
- if(oCV.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")!="true"){
- _129a.push({"class":"icdDialogButton",label:RV_RES.CANCEL,onClick:dojo.hitch(this,this.doCancel)});
- }
- this.m_waitPageDialog=new ViewerIWidgetInlineDialog(this.getCognosViewer(),this.getWaitPageHTML(),_129a,"waitButtonContainer_"+this.getCognosViewer().getId());
- }
- catch(e){
- if(console&&console.log){
- console.log(e);
- }
- }
- },setSimpleWorkingDialogFlag:function(flag){
- },getCognosViewer:function(){
- return this.m_oCV;
- },show:function(){
- this.m_waitPageDialog.show();
- },getWaitPageHTML:function(){
- var id=this.getCognosViewer().getId();
- return "<table cellspacing=\"4\" cellpadding=\"0\" border=\"0\" wairole=\"presentation\" role=\"presentation\" style=\"width:100%;height:100%\">"+"<tbody><tr><td align=\"center\">"+"<div class=\"dijitInline widget_load_background\" role=\"presentation\" tabindex=\"0\">"+"<div id=\"working"+id+"\" class=\"widget_load\" aria-labelledby=\"working"+id+"\">"+RV_RES.IDS_JS_WAIT_PAGE_LOADING+"</div>"+"<div id=\"waitButtonContainer_"+id+"\" class=\"icdDialogButtonBar\" style=\"text-align:center;padding-left:12px;padding-right:12px;\"></div>"+"</div>"+"</td></tr></tbody>"+"</table>";
- },hide:function(){
- this.m_waitPageDialog.hide();
- this.m_cancelCallback=null;
- },setCancelCallback:function(_129d){
- this.m_cancelCallback=_129d;
- },doCancel:function(){
- var oCV=this.getCognosViewer();
- if(this.m_cancelCallback){
- this.m_cancelCallback();
- this.m_cancelCallback=null;
- }else{
- var _129f=oCV.cancel();
- if(_129f){
- var _12a0=oCV.getViewerWidget().getUndoRedoQueue();
- if(_12a0){
- _12a0.handleCancel();
- }
- }
- }
- if(oCV.isReportRenderingDone()){
- this.hide();
- }else{
- var _12a1={action:"deleteWidget"};
- oCV.getViewerWidget().iContext.iEvents.fireEvent("com.ibm.bux.widget.action",null,_12a1);
- }
- }});
- dojo.provide("ModalFaultMessageDialog");
- dojo.declare("ModalFaultMessageDialog",IFaultDialog,{m_errorMessage:"",m_errorDetails:"",constructor:function(_12a2,_12a3){
- this.m_errorMessage=_12a2;
- this.m_errorDetails=_12a3;
- },getErrorMessage:function(){
- return this.m_errorMessage;
- },getDetails:function(){
- return this.m_errorDetails;
- },show:function(){
- bux.messageBox(bux.MB_ERROR,this.getErrorMessage(),"",this.getDetails());
- }});
- dojo.provide("MissingMemberFaultDialog");
- dojo.declare("MissingMemberFaultDialog",FaultDialog,{m_oCV:null,m_errorMessage:null,m_bHasBUACapability:false,m_bHasParameters:false,constructor:function(oCV,_12a5,_12a6,_12a7){
- this.m_errorMessage=_12a5;
- this.m_bHasBUACapability=_12a6;
- this.m_bHasParameters=_12a7;
- },getErrorMessage:function(){
- return this.m_errorMessage;
- },canRetryRequest:function(){
- return false;
- },getButtons:function(){
- var _12a8=[];
- if(this.m_bHasBUACapability){
- _12a8.push({label:RV_RES.IDS_JS_EDIT,action:dojo.hitch(this,this.invokeEditContentAction)});
- }
- _12a8.push({label:RV_RES.IDS_JS_CLOSE,action:dojo.hitch(this,this.ok)});
- return _12a8;
- },invokeEditContentAction:function(){
- var _12a9={};
- _12a9.oFaultDialog=this;
- _12a9.bHasParameters=this.m_bHasParameters;
- this.m_oCV.executeAction("EditContent",{"MissingMemberRecoveryMode":_12a9});
- }});
- 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(_12aa){
- this.m_bUsePageRequest=_12aa;
- };
- ViewerDispatcher.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- ViewerDispatcher.prototype.dispatchRequest=function(_12ab){
- if(this.m_activeRequest==null){
- this.startRequest(_12ab);
- }else{
- if(_12ab.canBeQueued()==true){
- this.m_requestQueue.push(_12ab);
- }else{
- if(window.cognosViewerDebug&&console&&console.warn){
- console.warn("Warning! Dropped a dispatcher entry!");
- }
- }
- }
- };
- ViewerDispatcher.prototype.startRequest=function(_12ac){
- this.m_activeRequest=_12ac;
- if(_12ac!=null){
- _12ac.setUsePageRequest(this.m_bUsePageRequest);
- _12ac.sendRequest();
- }
- };
- ViewerDispatcher.prototype.cancelRequest=function(key){
- for(var i=0;i<this.m_requestQueue.length;i++){
- var _12af=this.m_requestQueue[i];
- if(_12af.getKey()===key){
- _12af.setCallbacks({"onEntryComplete":null});
- _12af.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(_12b0){
- this.startRequest(this.nextRequest());
- };
- ViewerDispatcher.prototype.nextRequest=function(){
- var _12b1=null;
- if(this.m_requestQueue.length>0){
- _12b1=this.m_requestQueue.shift();
- if(_12b1.getKey()!=null){
- while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12b1.getKey()){
- _12b1=this.m_requestQueue.shift();
- }
- }
- }
- return _12b1;
- };
- 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(_12b3){
- this.m_request.setHeaders(_12b3);
- };
- DispatcherEntry.prototype.getHeaders=function(){
- return this.m_request.getHeaders();
- };
- DispatcherEntry.prototype.setOriginalFormFields=function(_12b4){
- this.m_originalFormFields=_12b4;
- };
- DispatcherEntry.prototype.getOriginalFormFields=function(){
- return this.m_originalFormFields;
- };
- DispatcherEntry.prototype.setRequestHandler=function(_12b5){
- _12b5.addCallbackHooks();
- this.m_requestHandler=_12b5;
- };
- DispatcherEntry.prototype.getRequestHandler=function(){
- return this.m_requestHandler;
- };
- DispatcherEntry.prototype.setWorkingDialog=function(_12b6){
- if(this.getRequestHandler()){
- this.m_requestHandler.setWorkingDialog(_12b6);
- }
- };
- DispatcherEntry.prototype.setRequestIndicator=function(_12b7){
- if(this.getRequestHandler()){
- this.getRequestHandler().setRequestIndicator(_12b7);
- }
- };
- DispatcherEntry.prototype.forceSynchronous=function(){
- this.getRequest().forceSynchronous();
- };
- DispatcherEntry.prototype.setUsePageRequest=function(_12b8){
- this.m_bUsePageRequest=_12b8;
- };
- DispatcherEntry.prototype.getUsePageRequest=function(){
- return this.m_bUsePageRequest;
- };
- DispatcherEntry.prototype.setDefaultFormFields=function(){
- var _12b9=this.getViewer().envParams;
- this.addFormField("b_action","cognosViewer");
- this.addFormField("cv.catchLogOnFault","true");
- this.addDefinedNonNullFormField("protectParameters",_12b9["protectParameters"]);
- this.addDefinedNonNullFormField("ui.routingServerGroup",_12b9["ui.routingServerGroup"]);
- this.addDefinedNonNullFormField("cv.debugDirectory",_12b9["cv.debugDirectory"]);
- this.addDefinedNonNullFormField("cv.showFaultPage",_12b9["cv.showFaultPage"]);
- this.addDefinedNonNullFormField("cv.useRAPDrill",_12b9["cv.useRAPDrill"]);
- this.addDefinedNonNullFormField("container",_12b9["container"]);
- this.addNonEmptyStringFormField("cv.objectPermissions",_12b9["cv.objectPermissions"]);
- };
- DispatcherEntry.prototype.getViewer=function(){
- return this.m_oCV;
- };
- DispatcherEntry.prototype.prepareRequest=function(){
- };
- DispatcherEntry.addWidgetInfoToFormFields=function(_12ba,_12bb){
- if(_12ba){
- var _12bc=_12ba.getBUXRTStateInfoMap();
- if(_12bc){
- _12bb.addFormField("cv.buxRTStateInfo",_12bc);
- }
- var _12bd=_12ba.getDisplayName();
- if(_12bd&&_12bd.length>0){
- _12bb.addFormField("displayTitle",_12bd);
- }
- }
- };
- DispatcherEntry.prototype.canBeQueued=function(){
- return this.m_canBeQueued;
- };
- DispatcherEntry.prototype.setCanBeQueued=function(_12be){
- this.m_canBeQueued=_12be;
- };
- DispatcherEntry.prototype.getKey=function(){
- return this.m_requestKey;
- };
- DispatcherEntry.prototype.setKey=function(key){
- this.m_requestKey=key;
- };
- DispatcherEntry.prototype.setRequest=function(_12c0){
- this.m_request=_12c0;
- };
- DispatcherEntry.prototype.getRequest=function(){
- return this.m_request;
- };
- DispatcherEntry.prototype.setCallbacks=function(_12c1){
- this.getRequest().setCallbacks(_12c1);
- };
- DispatcherEntry.prototype.getCallbacks=function(){
- return this.getRequest().getCallbacks();
- };
- DispatcherEntry.prototype.sendRequest=function(){
- this.prepareRequest();
- var _12c2=this.getRequest().getFormFields();
- var _12c3=_12c2.keys();
- if(!this.m_originalFormFields){
- this.m_originalFormFields=new CDictionary();
- for(var index=0;index<_12c3.length;index++){
- this.m_originalFormFields.add(_12c3[index],_12c2.get(_12c3[index]));
- }
- }
- this.getRequest().sendRequest();
- };
- DispatcherEntry.prototype.onNewRequest=function(_12c5){
- this.setRequest(_12c5);
- };
- DispatcherEntry.prototype.retryRequest=function(){
- var oCV=this.getViewer();
- oCV.setRetryDispatcherEntry(null);
- var _12c7=this.getRequest().newRequest();
- _12c7.setHeaders(null);
- this.setRequest(_12c7);
- var _12c8=this.m_originalFormFields.keys();
- for(var index=0;index<_12c8.length;index++){
- var _12ca=_12c8[index];
- var _12cb=this.m_originalFormFields.get(_12ca);
- if(_12ca=="cv.responseFormat"&&_12cb=="iWidget"){
- this.addFormField("cv.responseFormat","data");
- }else{
- if(_12ca=="ui.action"&&_12cb=="wait"){
- this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction"));
- }else{
- if(_12ca!="m_tracking"&&_12ca!="cv.outputKey"){
- this.addFormField(_12ca,_12cb);
- }
- }
- }
- }
- 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(_12cc){
- if(!this.m_bCancelCalled){
- this.m_bCancelCalled=true;
- if(this.getRequestHandler()){
- this.getRequestHandler().onCancel();
- }
- if(_12cc){
- 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(_12da,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onWorking(_12da);
- }
- };
- DispatcherEntry.prototype.onFault=function(_12dc){
- if(this.getRequestHandler()){
- this.getRequestHandler().onFault(_12dc);
- }
- };
- DispatcherEntry.prototype.onError=function(_12dd){
- if(this.m_bCancelCalled){
- return;
- }
- if(this.getRequestHandler()){
- this.getRequestHandler().onError(_12dd);
- }
- };
- DispatcherEntry.prototype.possibleUnloadEvent=function(){
- this.setCallbacks({"error":{}});
- };
- DispatcherEntry.prototype.onPreHttpRequest=function(_12de){
- if(this.getRequestHandler()){
- this.getRequestHandler().preHttpRequest(_12de);
- }
- };
- DispatcherEntry.prototype.onPostHttpRequest=function(_12df){
- if(this.getRequestHandler()){
- this.getRequestHandler().postHttpRequest(_12df);
- }
- };
- DispatcherEntry.prototype.onPassportTimeout=function(_12e0){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPassportTimeout(_12e0);
- }
- };
- DispatcherEntry.prototype.onPrompting=function(_12e1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPrompting(_12e1);
- }
- };
- DispatcherEntry.prototype.onEntryComplete=function(_12e2){
- if(!this.m_oCV._beingDestroyed){
- this.m_oCV.getViewerDispatcher().requestComplete(this);
- }
- };
- DispatcherEntry.prototype.onEntryFault=function(_12e3){
- this.m_oCV.setFaultDispatcherEntry(this);
- this.m_oCV.resetViewerDispatcher();
- if(!this.m_bCancelCalled){
- this.m_oCV.setRetryDispatcherEntry(this);
- }
- };
- DispatcherEntry.prototype.onCloseErrorDlg=function(){
- var _12e4=this.getCallbacks();
- if(_12e4["closeErrorDlg"]){
- var _12e5=GUtil.generateCallback(_12e4["closeErrorDlg"].method,[],_12e4["closeErrorDlg"].object);
- _12e5();
- }
- };
- DispatcherEntry.prototype.onPostEntryComplete=function(){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPostEntryComplete();
- }
- this.executeCallback("postComplete");
- };
- DispatcherEntry.prototype.executeCallback=function(_12e6){
- var _12e7=this.getCallbacks();
- if(_12e7[_12e6]){
- var _12e8=(_12e7.customArguments)?[this,_12e7.customArguments]:[this];
- var _12e9=GUtil.generateCallback(_12e7[_12e6].method,_12e8,_12e7[_12e6].object);
- _12e9();
- 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 _12ed=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_12ed);
- 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 _12ef=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot());
- this.setRequest(_12ef);
- 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 _12f1=this.getFormField("ui.action");
- var _12f2=this.getViewer().getActionState();
- if(_12f2!==""&&(_12f1=="wait"||_12f1=="forward"||_12f1=="back")){
- this.addFormField("cv.actionState",_12f2);
- }
- var _12f3=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"];
- var _12f4=true;
- for(var i=0;i<_12f3.length;i++){
- if(_12f3[i]==_12f1){
- _12f4=false;
- break;
- }
- }
- if(_12f4){
- 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 _12f7=oCV.envParams;
- this.addFormField("cv.id",oCV.getId());
- if(_12f7["cv.showFaultPage"]){
- this.addFormField("cv.showFaultPage",_12f7["cv.showFaultPage"]);
- }else{
- this.addFormField("cv.showFaultPage","false");
- }
- this.addDefinedNonNullFormField("ui.object",_12f7["ui.object"]);
- this.addDefinedNonNullFormField("ui.primaryAction",_12f7["ui.primaryAction"]);
- this.addDefinedNonNullFormField("ui.objectClass",_12f7["ui.objectClass"]);
- this.addNonEmptyStringFormField("specificationType",_12f7["specificationType"]);
- this.addNonEmptyStringFormField("cv.promptForDownload",_12f7["cv.promptForDownload"]);
- this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation());
- this.addNonEmptyStringFormField("m_tracking",oCV.getTracking());
- var _12f8=oCV.getExecutionParameters();
- this.addNonEmptyStringFormField("executionParameters",_12f8);
- var sCAF=oCV.getCAFContext();
- this.addDefinedNonNullFormField("ui.cafcontextid",sCAF);
- };
- ReportDispatcherEntry.prototype.onWorking=function(_12fa,arg1){
- var _12fc=_12fa.getResponseState();
- var _12fd=this.getRequestHandler();
- if(_12fd){
- var _12fe=_12fd.getWorkingDialog();
- if(_12fe&&_12fe.setSecondaryRequests&&_12fc.m_aSecRequests){
- _12fe.setSecondaryRequests(_12fc.m_aSecRequests);
- }
- }
- DispatcherEntry.prototype.onWorking.call(this,_12fa,arg1);
- if(_12fd){
- this.getRequestHandler().updateViewerState(_12fc);
- }
- };
- ReportDispatcherEntry.prototype.onComplete=function(_12ff,arg1){
- if(this.getRequestHandler()){
- this.getRequestHandler().onComplete(_12ff);
- }
- };
- function ViewerDispatcherEntry(oCV){
- ViewerDispatcherEntry.baseConstructor.call(this,oCV);
- if(oCV){
- ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this);
- this.setCallbacks({"prompting":{"object":this,"method":this.onPrompting}});
- var _1302=oCV.getViewerWidget();
- if(_1302.m_originalFormFields){
- this.setOriginalFormFields(_1302.m_originalFormFields);
- _1302.m_originalFormFields=null;
- }
- }
- };
- ViewerDispatcherEntry.prototype=new ReportDispatcherEntry();
- ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry;
- ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype;
- ViewerDispatcherEntry.prototype.prepareRequest=function(){
- this.parent.prepareRequest.call(this);
- var _1303=this.getViewer().getViewerWidget();
- if(this.getFormField("widget.reloadToolbar")){
- this.addFormField("cv.buxCurrentUserRole",_1303.getUserRole());
- }
- if(_1303){
- DispatcherEntry.addWidgetInfoToFormFields(_1303,this);
- }
- this.getViewer().inlineScriptsDoneExecuting=false;
- };
- ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){
- var oCV=this.getViewer();
- var _1305=oCV.getViewerWidget();
- var _1306=oCV.envParams;
- this.addFormField("bux","true");
- this.addFormField("cv.showFaultPage","false");
- this.addDefinedNonNullFormField("baseReportModificationTime",_1306["baseReportModificationTime"]);
- this.addDefinedNonNullFormField("originalReport",_1306["originalReport"]);
- this.addDefinedNonNullFormField("ui.reportDrop",_1306["ui.reportDrop"]);
- this.addDefinedNonNullFormField("ui.preserveRapTags",_1306["ui.preserveRapTags"]);
- if(_1305.getProperties()){
- var _1307=_1305.getProperties().getFlashCharts();
- if(_1307!=null){
- this.addDefinedNonNullFormField("savedFlashChartOption",_1307);
- if(_1306.hasAVSChart){
- this.addDefinedNonNullFormField("hasAVSChart",_1306.hasAVSChart);
- }else{
- this.addDefinedNonNullFormField("hasAVSChart",oCV.hasAVSChart());
- }
- }
- }
- var _1308=_1305.getAttributeValue("gateway");
- if(_1308){
- this.addDefinedNonNullFormField("cv.gateway",_1308);
- }
- var _1309=_1305.getAttributeValue("webcontent");
- if(_1309){
- this.addDefinedNonNullFormField("cv.webcontent",_1309);
- }
- if(oCV.envParams["cv.outputKey"]){
- this.addFormField("cv.outputKey",oCV.envParams["cv.outputKey"]);
- this.addFormField("b_action","cvx.high");
- delete oCV.envParams["cv.outputKey"];
- }
- if(_1305.getXNodeId()){
- this.setHeaders({"X-Node-ID":_1305.getXNodeId()});
- _1305.setXNodeId(null);
- }
- };
- ViewerDispatcherEntry.prototype.onPrompting=function(_130a){
- if(this.getRequestHandler()){
- this.getRequestHandler().onPrompting(_130a);
- }
- };
- function Blocker(oCVId){
- this.oCV_Id=oCVId;
- this.m_viewerDiv=dojo.byId("RVContent"+this.oCV_Id);
- this.m_containerDiv=this._findContainerDiv();
- this.initialize();
- };
- Blocker.prototype._findContainerDiv=function(){
- var _130c=null;
- if(!this.m_containerDiv){
- _130c=this.m_viewerDiv;
- while(_130c){
- if(_130c.style&&_130c.style.height&&_130c.style.height.indexOf("px")!=-1){
- return _130c;
- }
- _130c=_130c.parentNode;
- }
- }
- if(typeof console!="undefined"&&console&&console.log){
- console.log("ViewerIWidgetInlineDialog: Could not find the container div for showing the dialog.");
- }
- return this.m_viewerDiv;
- };
- Blocker.prototype.setClassNameOverride=function(_130d){
- if(!_130d){
- return;
- }
- this.m_classNameOverride=_130d;
- this.applyClassNameOverride();
- };
- Blocker.prototype.applyClassNameOverride=function(){
- if(!this.m_classNameOverride||!this.m_background){
- return;
- }
- dojo.removeClass(this.m_background);
- dojo.addClass(this.m_background,this.m_classNameOverride);
- };
- Blocker.prototype.getNode=function(){
- return this.m_background;
- };
- Blocker.prototype.initialize=function(){
- if(!this.m_background){
- this.m_background=dojo.byId("BACKGROUND"+this.oCV_Id);
- if(!this.m_background){
- this.m_background=document.createElement("div");
- this.m_background.id="BACKGROUND"+this.oCV_Id;
- this.m_background.className="report-blocker";
- this.m_background.tabIndex="0";
- dojo.place(this.m_background,this.m_containerDiv,"before");
- }
- }
- };
- Blocker.prototype.show=function(){
- if(this.m_background){
- this.m_background.style.display="block";
- }
- };
- Blocker.prototype.hide=function(){
- if(this.m_background){
- this.m_background.style.display="none";
- }
- };
- Blocker.prototype.destroy=function(){
- if(this.m_background!=null){
- this.m_background.parentNode.removeChild(this.m_background);
- this.m_background=null;
- }
- };
- function ReselectAction(oCV,_130f){
- this.m_aSelectionFilterObjects=_130f;
- this.m_oCV=oCV;
- this.m_oSC=oCV.getSelectionController();
- this.m_cd=this.m_oSC.getCCDManager().m_cd;
- this.m_md=this.m_oSC.getCCDManager().m_md;
- this.m_nReportDiv=oCV.getReportDiv();
- this.m_oRAPReportContainers=oCV.getRAPReportInfo().getContainers();
- };
- ReselectAction.prototype.executeAction=function(){
- this.mapCdMd();
- if(this.show()){
- var oVW=this.m_oCV.getViewerWidget();
- if(oVW){
- var _1311=oVW.m_oWidgetContextManager.genSelectionPayload(this.m_oCV,oVW.getWidgetId());
- oVW.setSelectionFilterSent(true);
- oVW.fireEvent("com.ibm.bux.data.filterCache.init",null,_1311);
- if(oVW.isPastedWidget()&&!oVW.pastedSelectedBroadcasted){
- oVW.pastedSelectedBroadcasted=true;
- oVW.onSelectionChange();
- }
- }
- }
- };
- ReselectAction.prototype.mapCdMd=function(){
- var _1312=this.m_aSelectionFilterObjects;
- for(var i in _1312){
- var _1314=_1312[i];
- var oItem=_1314.selectedItem;
- var aCtx=[];
- var _1317=null;
- var _1318=this._findMdIndex("q",_1314.query);
- _1317=this._setNewCtx(oItem,_1318);
- if(_1317){
- aCtx.push(_1317);
- }else{
- continue;
- }
- for(var j in _1314.context){
- var _131a=_1314.context[j];
- _1317=this._setNewCtx(_131a,_1318);
- if(_1317){
- aCtx.push(_1317);
- }
- }
- _1314.ctxArray=aCtx;
- }
- };
- ReselectAction.prototype._setNewCtx=function(oItem,_131c){
- var _131d=null;
- var ctxId=null;
- if(oItem.isMeasure==="true"){
- _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c);
- if(_131d){
- oItem.ctxRef={"property":oItem.mdProperty,"mdIndex":_131d};
- return oItem.ctxRef;
- }
- }else{
- if(oItem.mun){
- _131d=this._findMdIndex("m",oItem.mun,_131c);
- ctxId=this._getContextIdForCdProperty(_131c,"m",_131d);
- }else{
- _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c);
- ctxId=this._getContextIdForCdPropertyAndMdProperty(_131c,"u",oItem.use,oItem.mdProperty,_131d);
- }
- if(ctxId){
- oItem.ctxId=ctxId;
- return oItem.ctxId;
- }
- }
- return null;
- };
- ReselectAction.prototype._getContextIdForCdProperty=function(_131f,_1320,_1321){
- var ctxid=null;
- for(var j in this.m_cd){
- if(this.m_cd[j].q==_131f&&this.m_cd[j][_1320]==_1321){
- ctxid=j;
- break;
- }
- }
- return ctxid;
- };
- ReselectAction.prototype._getContextIdForCdPropertyAndMdProperty=function(_1324,_1325,_1326,_1327,_1328){
- var ctxid=null;
- for(var j in this.m_cd){
- if(this.m_cd[j].q==_1324&&this.m_cd[j][_1327]==_1328&&this.m_cd[j][_1325]==_1326){
- ctxid=j;
- break;
- }
- }
- return ctxid;
- };
- ReselectAction.prototype._findMdIndex=function(_132b,value,_132d){
- var _132e=null;
- for(var j in this.m_md){
- if(this.m_md[j][_132b]===value){
- if(this.m_md[j]["q"]&&_132d){
- if(this.m_md[j]["q"]==_132d){
- _132e=j;
- break;
- }
- }else{
- _132e=j;
- break;
- }
- }
- }
- return _132e;
- };
- ReselectAction.prototype.show=function(){
- var _1330=false;
- var oCV=this.m_oCV;
- var oVW=oCV.getViewerWidget();
- var _1333=oCV.getReportDiv();
- var _1334=null;
- var _1335=null;
- var _1336=null;
- oVW.preprocessPageClicked(false);
- if(oVW&&_1333){
- for(var _1337 in this.m_aSelectionFilterObjects){
- var _1338=this.m_aSelectionFilterObjects[_1337];
- var _1339=(_1338.selectedItem.isMeasure==="true");
- var _133a=true;
- if(_1339){
- var _133b=_1338.context;
- for(var idx in _133b){
- if(_133b[idx].isMeasure!=="true"){
- _133a=false;
- break;
- }
- }
- if(_133a){
- continue;
- }
- }
- var aCtx=_1338.ctxArray;
- if(aCtx&&aCtx.length>0){
- _1334=this._getLayoutContainers(_1338.lid);
- var _133e=false;
- for(var _133f=0;!_133e&&_133f<_1334.length;_133f++){
- if(/img|IMG/.test(_1334[_133f].tagName)){
- var _1340=_1334[_133f];
- for(_1336=null;!_1336&&_1340.parentNode;){
- _1340=_1340.parentNode;
- var _1341=_1340.getElementsByTagName("map");
- if(_1341&&_1341.length>0){
- _1336=_1341[0];
- }
- }
- }else{
- _1336=_1334[_133f].parentNode;
- }
- if(_1336){
- var _1342=this._buildCtxQueryRegExp(aCtx);
- _1335=getElementsByAttribute(_1336,"*","ctx",null,-1,_1342);
- var _1343=_1338.selectedItem;
- for(var idx in _1335){
- if(_1335[idx].getAttribute){
- if(_1339&&_1343.isDataValueOrChartElement==="false"&&(_1335[idx].getAttribute("type")==="datavalue"||_1335[idx].getAttribute("type")==="chartElement")){
- continue;
- }
- if(this.isMatchingCell(aCtx,_1335[idx])){
- var _1344=_1335[idx];
- if(_1344.tagName==="SPAN"||_1344.tagName==="span"){
- var _1345=_1344.parentNode.tagName;
- if(_1345=="td"||_1345=="TD"||_1345=="TH"||_1345=="th"){
- if(_1344.parentNode.getAttribute("ctx")==_1344.getAttribute("ctx")){
- continue;
- }
- }
- }
- var evt={"target":_1344,"button":1,"ctrlKey":true};
- this.m_oSC.pageClicked(evt);
- _133e=true;
- _1330=true;
- }
- }
- }
- }
- }
- }
- }
- }
- return _1330;
- };
- ReselectAction.prototype.isMatchingCell=function(aCtx,_1348){
- var _1349=_1348.getAttribute("ctx");
- if(!_1349||_1349.length==0){
- return false;
- }
- var _134a=_1349.replace(/::/g,":").split(":");
- var _134b=0;
- var _134c=null;
- var _134d=0;
- var _134e=null;
- var _134f=0;
- var _1350=false;
- for(;_134b<_134a.length;_134b++){
- if(_134a[_134b].length>0){
- _134c=_134a[_134b++];
- break;
- }
- }
- _134e=aCtx[_134d];
- if(typeof _134e=="string"){
- if(_134e==_134c){
- _134f++;
- }
- }else{
- if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){
- _134f++;
- }
- }
- if(_134f!=1){
- return false;
- }
- if(aCtx.length==1){
- _1350=true;
- }
- for(_134d=1;!_1350&&_134d<aCtx.length;_134d++){
- _134e=aCtx[_134d];
- if(typeof _134e=="string"){
- for(_134b=1;_134b<_134a.length;_134b++){
- if(_134a[_134b].length>0&&_134a[_134b]!="0"){
- _134c=_134a[_134b];
- if(_134e==_134c){
- _134f++;
- _134a[_134b]="0";
- break;
- }
- }
- }
- }else{
- for(_134b=1;_134b<_134a.length;_134b++){
- if(_134a[_134b].length>0&&_134a[_134b]!="0"){
- _134c=_134a[_134b];
- if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){
- _134f++;
- _134a[_134b]="0";
- break;
- }
- }
- }
- }
- if(aCtx.length==_134f){
- _1350=true;
- }
- }
- return _1350;
- };
- ReselectAction.prototype._buildCtxQueryRegExp=function(aCtx){
- var _1352="";
- var _1353=false;
- var i=0;
- if(typeof aCtx[i]=="string"){
- _1352+="^"+aCtx[i];
- }else{
- _1352+="^[\\d:]+";
- }
- i++;
- var _1355="";
- for(;!_1353&&i<aCtx.length;i++){
- if(typeof aCtx[i]=="string"){
- if(_1355.length>0){
- _1355+="+";
- }
- _1355+=aCtx[i];
- _1353=true;
- }else{
- if(i<aCtx.length-1){
- if(_1355.length>0){
- _1355+="+";
- }
- _1355+="[\\d:]";
- }
- }
- }
- if(_1355.length>0){
- _1352+=":{1,}"+_1355;
- }
- return new RegExp(_1352);
- };
- ReselectAction.prototype._getLayoutContainers=function(sLid){
- var _1357="";
- if(this.m_oRAPReportContainers&&this.m_oRAPReportContainers[sLid]){
- _1357=sLid+".+";
- }else{
- for(var name in this.m_oRAPReportContainers){
- if(_1357.length>0){
- _1357+="|";
- }
- _1357+=name+".+";
- }
- }
- return getElementsByAttribute(this.m_nReportDiv,"*","lid",null,-1,new RegExp(_1357));
- };
|