pd.extra.js 169 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *|
  5. *| IBM Cognos Products: PS
  6. *|
  7. *| (C) Copyright IBM Corp. 2011
  8. *|
  9. *| US Government Users Restricted Rights - Use, duplication or
  10. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  11. *|
  12. *+------------------------------------------------------------------------+
  13. */
  14. function C_XmlSerializer(n){
  15. this.m_nRoot=n;
  16. };
  17. C_XmlSerializer.prototype.F_ToString=function(){
  18. var d=this.m_nRoot.nodeType==U_XML.K_iNODE_DOCUMENT?this.m_nRoot:this.m_nRoot.ownerDocument;
  19. if(d.m_oHALDefaultAttributeLookup){
  20. this.m_oElements=d.m_oHALDefaultAttributeLookup;
  21. }else{
  22. this.m_oElements=C_XmlSerializer.F_ParseDefaultAttributes(d);
  23. d.m_oHALDefaultAttributeLookup=this.m_oElements;
  24. }
  25. this.m_oStringStream=new C_StringStream();
  26. this.f_serialize(this.m_nRoot);
  27. return this.m_oStringStream.F_ToString();
  28. };
  29. C_XmlSerializer.prototype.f_serializeElement=function(n){
  30. var _1=n.nodeName;
  31. var _2=this.m_oElements[_1];
  32. this.m_oStringStream.F_Write("<");
  33. this.m_oStringStream.F_Write(_1);
  34. var nl=n.attributes;
  35. var _3=nl.length;
  36. for(var i=0;i<_3;i++){
  37. var _4=nl.item(i);
  38. var _5=_4.name;
  39. var _6=_4.value;
  40. if(_2&&_2[_5]&&(_2[_5]===_6)){
  41. continue;
  42. }
  43. this.m_oStringStream.F_Write(" ");
  44. this.m_oStringStream.F_Write(_5);
  45. this.m_oStringStream.F_Write("=\"");
  46. this.m_oStringStream.F_Write(this.f_encodeAttributeValue(_6));
  47. this.m_oStringStream.F_Write("\"");
  48. }
  49. var nl=n.selectNodes("* | text() | comment()");
  50. var _3=nl.length;
  51. this.f_writeOpeningTagCloseBracket(_1,_3);
  52. for(var i=0;i<_3;i++){
  53. var _7=nl.item(i);
  54. this.f_serialize(_7);
  55. }
  56. this.f_writeClosingTag(_1,_3);
  57. };
  58. C_XmlSerializer.prototype.f_serialize=function(n){
  59. switch(n.nodeType){
  60. case U_XML.K_iNODE_TEXT:
  61. this.m_oStringStream.F_Write(this.f_encode(n.nodeValue));
  62. break;
  63. case U_XML.K_iNODE_COMMENT:
  64. this.m_oStringStream.F_Write("<!--");
  65. this.m_oStringStream.F_Write(n.nodeValue);
  66. this.m_oStringStream.F_Write("-->");
  67. break;
  68. case U_XML.K_iNODE_CDATA_SECTION:
  69. this.m_oStringStream.F_Write("<"+"![CDATA[");
  70. this.m_oStringStream.F_Write(n.nodeValue);
  71. this.m_oStringStream.F_Write("]"+"]>");
  72. break;
  73. default:
  74. this.f_serializeElement(n);
  75. }
  76. };
  77. C_XmlSerializer.prototype.f_encode=function(s){
  78. return s.F_XMLEncode();
  79. };
  80. C_XmlSerializer.prototype.f_encodeAttributeValue=function(s){
  81. return s.F_XMLEncode();
  82. };
  83. C_XmlSerializer.prototype.f_writeOpeningTagCloseBracket=function(_8,_9){
  84. this.m_oStringStream.F_Write((_9>0)?">":"/>");
  85. };
  86. C_XmlSerializer.prototype.f_writeClosingTag=function(_a,_b){
  87. if(_b>0){
  88. this.m_oStringStream.F_Write("</");
  89. this.m_oStringStream.F_Write(_a);
  90. this.m_oStringStream.F_Write(">");
  91. }
  92. };
  93. C_XmlSerializer.F_ParseDefaultAttributes=function(d){
  94. var _c={};
  95. if(!d.doctype){
  96. return _c;
  97. }
  98. var _d=d.doctype.xml.split("<!ATTLIST ");
  99. var _e=_d.length;
  100. for(var i=1;i<_e;i++){
  101. var a2=_d[i].split(">");
  102. var a3=a2[0].split(/\r?\n/);
  103. if(a3.length>1){
  104. var _f=a3[0];
  105. var o={};
  106. for(var j=0;j<a3.length;j++){
  107. var a4=a3[j].F_Trim();
  108. var _10=C_XmlSerializer.f_parseAttributeValue(a4);
  109. if(_10){
  110. var _11=a4.split(/\s+/)[0];
  111. o[_11]=_10;
  112. }
  113. }
  114. _c[_f]=o;
  115. }
  116. }
  117. return _c;
  118. };
  119. C_XmlSerializer.f_parseAttributeValue=function(_12){
  120. var _13=null;
  121. var _14=_12.F_Trim();
  122. var _15=_14.lastIndexOf("\"");
  123. if(_15!=-1){
  124. _14=_14.substring(0,_15);
  125. _15=_14.lastIndexOf("\"");
  126. if(_15!=-1){
  127. _13=_14.substring(_15+1,_14.length);
  128. }
  129. }
  130. return _13;
  131. };
  132. var G_CCHL={};
  133. G_CCHL.M_oOptions={name:"cchl",path:"",imagePath:""};
  134. if(window["G_CCHLOptions"]){
  135. for(var s in G_CCHLOptions){
  136. G_CCHL.M_oOptions[s]=G_CCHLOptions[s];
  137. }
  138. }
  139. G_HAL.F_AddLibrary("cchl",G_CCHL.M_oOptions);
  140. G_CCHL.M_sPath=G_HAL.M_oLibraries["cchl"]["path"];
  141. G_CCHL.M_sImagePath=G_HAL.M_oLibraries["cchl"]["imagePath"]||(G_CCHL.M_sPath+"cchl/images/");
  142. G_CCHL.M_sProductLocale="";
  143. G_CCHL.M_sContentLocale="";
  144. G_CCHL.M_sGatewayURL="";
  145. G_CCHL.F_Init=function(_16,_17,_18,_19,_1a){
  146. G_CCHL.M_sProductLocale=_17;
  147. G_CCHL.M_sContentLocale=_18;
  148. G_CCHL.M_sGatewayURL=_16;
  149. if(window["G_ResManager"]){
  150. G_ResManager.F_SetLocale(_17);
  151. }
  152. if(window["G_BusServer"]){
  153. G_BusServer.F_SetCafContextId(_19);
  154. G_BusServer.F_SetRoutingServerGroup(_1a);
  155. }
  156. };
  157. G_CCHL.m_oIncludeMacros={includes:{"cchl/C_BusRequest.js":["cchl/G_BusServer.js","hal/C_Error.js"],"cchl/G_BusServer.js":["hal/U_CookieJar.js"],"cchl/C_PromptControl.js":["cchl/C_ParameterValue.js","hal/U_CoolButton.js"],"cchl/C_PromptBaseTextBox.js":["hal/G_ResManager.js","hal/C_ListView.js","cchl/U_PromptInputParser.js","cchl/C_SimpleValue.js","cchl/C_SimpleValue.js"],"cchl/C_PromptRange.js":["cchl/C_PromptBaseTextBox.js"],"cchl/C_PromptTextBox.js":["cchl/C_PromptRange.js"],"cchl/C_PromptBaseDateTextBox.js":["cchl/C_PromptBaseTextBox.js","cchl/C_PromptBaseDateCalendar.js","cchl/dialogs/D_PromptCalendar.js","cchl/C_DateValue.js"],"C_PromptBaseDateCalendar":["cchl/C_DateValue.js"],"cchl/C_PromptDate.js":["cchl/C_PromptBaseDateTextBox.js","cchl/C_PromptRange.js"],"cchl/C_PromptBaseTimeTextBox.js":["cchl/C_PromptBaseTextBox.js","cchl/C_TimeValue.js"],"cchl/C_PromptTime.js":["cchl/C_PromptBaseTimeTextBox.js","cchl/C_PromptClockUI.js","cchl/C_PromptRange.js"],"cchl/C_PromptDateTime.js":["cchl/C_PromptBaseDateTime.js","cchl/C_PromptRange.js"],"cchl/C_PromptBaseDateTime.js":["cchl/C_PromptBaseTimeTextBox.js","cchl/C_PromptClockUI.js","cchl/C_PromptBaseDateTextBox.js","cchl/C_DateTimeValue.js"],"cchl/C_PromptBaseIntervalTextBox.js":["cchl/C_PromptBaseTextBox.js","cchl/C_IntervalValue.js"],"cchl/C_PromptInterval.js":["cchl/C_PromptBaseIntervalTextBox.js","cchl/C_PromptRange.js","cchl/C_IntervalValue.js"],"cchl/C_ListViewRange.js":["hal/G_ResManager.js"],"cchl/C_ListViewConditional.js":["hal/G_ResManager.js","cchl/C_Condition.js"],"cchl/U_PromptInputParser.js":["hal/D_XmlError.js"],"cchl/C_ParameterValue.js":["cchl/U_PromptInputParser.js"],"cchl/dialogs/D_Border.js":["cchl/dialogs/D_Color.js"],"cchl/C_ModelTree.js":["hal/C_TreeView.js"],"cchl/C_ReportRequest.js":["cchl/C_RoutingServerGroupRequest.js"],"cchl/C_AngleChooser.js":["cchl/C_CanvasLink.js"]},prerequisites:{"cchl/C_BusRequest.js":["hal/C_SoapRequest.js"],"cchl/dialogs/D_Color.js":["hal/C_Dialog.js"],"cchl/dialogs/D_Font.js":["hal/C_Dialog.js"],"cchl/dialogs/D_About.js":["hal/C_Dialog.js"],"cchl/dialogs/D_Border.js":["hal/C_Dialog.js"],"cchl/dialogs/D_Margin.js":["hal/C_Dialog.js"],"cchl/dialogs/D_Padding.js":["hal/C_Dialog.js"],"cchl/dialogs/D_Color.js":["hal/C_Dialog.js"],"cchl/dialogs/D_PromptCalendar.js":["hal/C_MultiScriptRequest.js","hal/C_Dialog.js"],"cchl/C_PromptBaseTextBox.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptRange.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptBaseDateTextBox.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptBaseDateCalendar.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptTextBox.js":["cchl/C_PromptPublicControl.js"],"cchl/C_PromptDate.js":["cchl/C_PromptPublicControl.js"],"cchl/C_PromptTime.js":["cchl/C_PromptPublicControl.js"],"cchl/C_PromptBaseTimeTextBox.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptPublicControl.js":["cchl/C_PromptControl.js"],"cchl/C_PromptBaseControl.js":["cchl/C_PromptControl.js"],"cchl/C_PromptBaseDateTime.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptDateTime.js":["cchl/C_PromptPublicControl.js"],"cchl/C_PromptBaseIntervalTextBox.js":["cchl/C_PromptBaseControl.js"],"cchl/C_PromptInterval.js":["cchl/C_PromptPublicControl.js"],"cchl/dialogs/D_PromptDateTime.js":["hal/C_MultiScriptRequest.js","hal/C_Dialog.js"],"cchl/dialogs/D_PromptTextBox.js":["hal/C_MultiScriptRequest.js","hal/C_Dialog.js"],"cchl/dialogs/D_PromptInterval.js":["hal/C_MultiScriptRequest.js","hal/C_Dialog.js"],"cchl/dialogs/D_DetailedMsgBox.js":["hal/C_MultiScriptRequest.js","hal/C_Dialog.js"],"cchl/C_SimpleValue.js":["cchl/C_ParameterValue.js"],"cchl/C_IntervalValue.js":["cchl/C_ParameterValue.js"],"cchl/C_DateValue.js":["cchl/C_ParameterValue.js"],"cchl/C_TimeValue.js":["cchl/C_ParameterValue.js"],"cchl/C_DateTimeValue.js":["cchl/C_ParameterValue.js"],"cchl/C_ModelCache.js":["cchl/C_MetadataRequest.js"],"cchl/C_MetadataRequest.js":["cchl/C_BusRequest.js"]}};
  158. function C_BusRequest(_1b,_1c,_1d){
  159. this.F_ConstructBaseClass(_1b,G_CCHL.M_sGatewayURL,_1c);
  160. this.m_sRequest=_1d;
  161. this.m_sRequestSoapAction=_1c;
  162. this.m_docResponse=null;
  163. this.m_bProcessResponse=true;
  164. this.m_bServerPrompting=true;
  165. this.m_sPromptReport="";
  166. this.m_bAsyncBusRequest=false;
  167. this.m_sRoutingServerGroup=null;
  168. this.m_bUseDefaultRoutingServerGroup=false;
  169. this.m_bIsLoggingOn=false;
  170. this.m_bIsPrompting=false;
  171. this.m_sFollowOnRequestSOAPAction=C_BusRequest.K_sSOAPAction_reportService_absolute;
  172. this.m_sCancelRequestSOAPAction=C_BusRequest.K_sSOAPAction_reportService_control;
  173. this.m_aNamespaces=[];
  174. this.F_AddNamespace(C_BusRequest.k_sBIBusNamespaceDecl);
  175. this.F_AddNamespace(C_BusRequest.k_sBIBusRNSNamespaceDecl);
  176. };
  177. C_BusRequest.F_Extends(C_SoapRequest);
  178. C_BusRequest.K_sPrimaryWaitThreshold=5;
  179. C_BusRequest.K_sSecondaryWaitThreshold=30;
  180. C_BusRequest.m_sLastRequest="";
  181. C_BusRequest.m_sLastResponse="";
  182. C_BusRequest.m_aBusTracking=[];
  183. C_BusRequest.F_GetLastRequest=function(){
  184. return this.m_sLastRequest;
  185. };
  186. C_BusRequest.F_GetLastResponse=function(){
  187. return this.m_sLastResponse;
  188. };
  189. C_BusRequest.F_ReleaseAllTracking=function(){
  190. var _1e=this.m_aBusTracking.length;
  191. var _1f="<rns1:release>"+"<bus:conversation xsi:type=\"bus:asynchRequest\">"+"</bus:conversation>"+"</rns1:release>";
  192. for(var i=0;i<_1e;++i){
  193. var _20=new C_BusRequest(null,C_BusRequest.K_sSOAPAction_reportService_control,_1f);
  194. _20.m_bAsync=false;
  195. _20.F_Send();
  196. }
  197. };
  198. C_BusRequest.prototype.F_GetResponse=function(){
  199. return this.m_docResponse;
  200. };
  201. C_BusRequest.prototype.F_IsPrompting=function(){
  202. return this.m_bIsPrompting;
  203. };
  204. C_BusRequest.prototype.F_IsLoggingOn=function(){
  205. return this.m_bIsLoggingOn;
  206. };
  207. C_BusRequest.prototype.F_SetLocale=function(_21,_22){
  208. this.m_sProductLocale=_21;
  209. this.m_sContentLocale=_22;
  210. };
  211. C_BusRequest.prototype.F_SetNoResponseProcessing=function(){
  212. this.m_bProcessResponse=false;
  213. };
  214. C_BusRequest.prototype.F_SetNoServerPrompting=function(){
  215. this.m_bServerPrompting=false;
  216. };
  217. C_BusRequest.prototype.F_SetRoutingServerGroup=function(_23){
  218. this.m_sRoutingServerGroup=_23;
  219. };
  220. C_BusRequest.prototype.F_SetUseDefaultRoutingServerGroup=function(_24){
  221. this.m_bUseDefaultRoutingServerGroup=_24;
  222. };
  223. C_BusRequest.prototype.F_SetAsyncBusRequest=function(_25,_26,_27,_28,_29){
  224. this.m_bAsyncBusRequest=true;
  225. this.m_sWaitMethod=_25;
  226. this.m_sCancelMethod=_26;
  227. this.m_sGetOutputMethod=_27;
  228. this.m_sFollowOnRequestSOAPAction=_28?_28:this.m_sFollowOnRequestSOAPAction;
  229. this.m_sCancelRequestSOAPAction=_29?_29:this.m_sCancelRequestSOAPAction;
  230. };
  231. C_BusRequest.prototype.F_SetPromptReport=function(_2a){
  232. this.m_sPromptReport=_2a;
  233. };
  234. C_BusRequest.F_CreateContext=function(_2b){
  235. var _2c={};
  236. _2c.m_eType=_2b;
  237. return _2c;
  238. };
  239. C_BusRequest.K_sSOAPAction_reportService="http://developer.cognos.com/schemas/reportService/1";
  240. C_BusRequest.K_sSOAPAction_reportService_high="http://developer.cognos.com/schemas/reportService/1.high";
  241. C_BusRequest.K_sSOAPAction_reportService_absolute="http://developer.cognos.com/schemas/reportService/1.absolute";
  242. C_BusRequest.K_sSOAPAction_reportService_session="http://developer.cognos.com/schemas/reportService/1.session";
  243. C_BusRequest.K_sSOAPAction_reportService_control="http://developer.cognos.com/schemas/reportService/1.session";
  244. C_BusRequest.K_sSOAPAction_contentManagerService="http://developer.cognos.com/schemas/bibus/3#contentManagerService";
  245. C_BusRequest.K_sSOAPAction_systemService="http://developer.cognos.com/schemas/bibus/3#systemService";
  246. C_BusRequest.k_sBIBusNamespace="http://developer.cognos.com/schemas/bibus/3";
  247. C_BusRequest.k_sBIBusNamespaceDecl="xmlns:bus='"+C_BusRequest.k_sBIBusNamespace+"/'";
  248. C_BusRequest.k_sBIBusRNSNamespaceDecl="xmlns:rns1='http://developer.cognos.com/schemas/reportService/1'";
  249. C_BusRequest.prototype.F_AddNamespace=function(_2d){
  250. this.m_aNamespaces.push(_2d);
  251. };
  252. C_BusRequest.prototype.F_Send=function(){
  253. this.f_sendSoapRequest(this.f_createSoapRequest(this.m_sRequest,this.m_sProductLocale,this.m_sContentLocale),this.m_sRequestSoapAction);
  254. };
  255. C_BusRequest.prototype.f_sendSoapRequest=function(_2e,_2f){
  256. C_BusRequest.m_sLastRequest=_2e;
  257. C_BusRequest.m_sLastResponse="";
  258. this.F_SetSoapAction(_2f);
  259. this.F_SetRequestBody(_2e);
  260. C_BusRequest.superClass.F_Send.call(this);
  261. };
  262. C_BusRequest.prototype.F_IsReadyToProcess=function(){
  263. if(!C_BusRequest.superClass.F_IsReadyToProcess.call(this)){
  264. return false;
  265. }
  266. delete this.m_oFollowOnState;
  267. if(this.F_GetError()){
  268. return !this.m_bPendingAbort;
  269. }
  270. var _30=this.F_GetResponseText();
  271. var _31=U_XML.F_LoadString(null,_30,false,true);
  272. this.m_docResponse=_31;
  273. if(!_31||!_31.documentElement){
  274. return !this.m_bPendingAbort;
  275. }
  276. this.m_docResponse.setProperty("SelectionNamespaces","xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' "+this.m_aNamespaces.join(" "));
  277. C_BusRequest.m_sLastResponse=_31.xml;
  278. var _32=_31.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/SOAP-ENV:Fault");
  279. if(_32&&!this.m_bPendingAbort){
  280. if(this.m_bServerPrompting&&this.m_oListener&&G_BusServer.F_AuthenticationRequired(_31)){
  281. this.m_bLoggingOn=true;
  282. if(G_BusServer.F_Logon(this,_31)){
  283. delete this.m_docResponse;
  284. return false;
  285. }
  286. this.m_bLoggingOn=false;
  287. this.F_SetNewErrorRes("IDS_CCHL_INITIATE_LOGON_FAILED");
  288. }
  289. return true;
  290. }
  291. var _33=_31.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking");
  292. if(_33){
  293. var _34=_33.xml;
  294. if(this.m_bPendingAbort){
  295. this.m_bPendingAbort=false;
  296. var _35=(_31.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result[bus:status='working' or bus:status='stillWorking']")!=null);
  297. this.m_oFollowOnState=this.f_createFollowOnState(_31,_34,_35);
  298. this.F_Abort();
  299. return false;
  300. }
  301. C_BusRequest.m_aBusTracking.push(_34);
  302. if(this.m_bAsyncBusRequest){
  303. if(_31.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result[bus:status='complete'][bus:details/item/bus:status='responseReady']")){
  304. delete this.m_docResponse;
  305. this.f_sendFollowOnRequest(this.m_sGetOutputMethod,_31,_34,false);
  306. return false;
  307. }else{
  308. if(_31.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result[bus:status='working' or bus:status='stillWorking']")){
  309. delete this.m_docResponse;
  310. this.f_sendFollowOnRequest(this.m_sWaitMethod,_31,_34,true);
  311. return false;
  312. }
  313. }
  314. }
  315. }
  316. if(this.m_bPendingAbort){
  317. this.f_forcePendingAbortOnClient();
  318. return false;
  319. }
  320. if(this.m_bServerPrompting&&this.m_oListener&&G_BusServer.F_RequiresServerPrompting(_31)){
  321. this.m_bIsPrompting=true;
  322. if(G_BusServer.F_DoPrompting(this,_31,this.m_sPromptReport)){
  323. delete this.m_docResponse;
  324. return false;
  325. }
  326. this.m_bIsPrompting=false;
  327. this.F_SetNewErrorRes("IDS_CCHL_INITIATE_SERVERPROMTING_FAILED");
  328. return true;
  329. }
  330. return true;
  331. };
  332. C_BusRequest.prototype.F_ProcessResponse=function(){
  333. C_BusRequest.superClass.F_ProcessResponse.call(this);
  334. if(this.F_GetError()){
  335. this.m_docResponse=null;
  336. return;
  337. }
  338. if(this.m_docResponse&&this.m_docResponse.documentElement){
  339. var _36=this.m_docResponse.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/SOAP-ENV:Fault");
  340. if(_36){
  341. this.F_SetError(new C_BusSoapFault(this.m_docResponse));
  342. this.m_docResponse=null;
  343. }
  344. }else{
  345. var _37=[];
  346. var _38=this.F_GetResponseText();
  347. if(_38){
  348. _37.push(_38);
  349. }else{
  350. _37.push(G_ResManager.F_GetString("IDS_CCHL_HTTP_UNKNOWN_RESPONSE"));
  351. _37.push("\r\n");
  352. _37.push("Gateway URL: "+G_CCHL.M_sGatewayURL);
  353. _37.push("Document URL: "+document.URL);
  354. var _39=this.F_GetStatusText();
  355. if(_39){
  356. _37.push("HTTP Status Text: "+_39);
  357. }
  358. }
  359. this.m_docResponse=null;
  360. this.F_SetNewErrorRes("IDS_CCHL_XMLHTTPERROR",_37.join("\r\n"));
  361. }
  362. };
  363. C_BusRequest.prototype.f_sendFollowOnRequest=function(_3a,_3b,_3c,_3d){
  364. G_Debug.F_Print("C_BusRequest.f_sendFollowOnRequest : "+_3a);
  365. this.m_oFollowOnState=this.f_createFollowOnState(_3b,_3c,_3d);
  366. var _3e="<"+_3a+">"+"<bus:conversation xsi:type=\"bus:asynchRequest\">"+this.m_oFollowOnState.m_sConversation+"</bus:conversation>"+"<bus:parameterValues SOAP-ENC:arrayType=\"bus:parameterValue[]\" xsi:type=\"SOAP-ENC:Array\"/>"+"<bus:options SOAP-ENC:arrayType=\"bus:option[]\" xsi:type=\"SOAP-ENC:Array\"/>"+"</"+_3a+">";
  367. this.f_sendSoapRequest(this.f_createSoapRequest(_3e,this.m_sProductLocale,this.m_sContentLocale),this.m_sFollowOnRequestSOAPAction);
  368. };
  369. C_BusRequest.prototype.F_Abort=function(){
  370. if(this.m_bAsyncBusRequest&&!this.m_oFollowOnState&&!this.m_bCompleted){
  371. G_Debug.F_Print("C_BusRequest pending abort");
  372. this.m_bPendingAbort=true;
  373. var _3f=this;
  374. setTimeout(function(){
  375. _3f.f_forcePendingAbortOnClient();
  376. },10000);
  377. if(this.m_oListener&&this.m_oListener.F_Request_OnAborted){
  378. this.m_oListener.F_Request_OnAborted(this);
  379. }
  380. return;
  381. }
  382. C_BusRequest.superClass.F_Abort.call(this);
  383. if(this.m_oFollowOnState&&this.m_oFollowOnState.m_bCancellable){
  384. this.f_cancelRequest();
  385. }
  386. };
  387. C_BusRequest.prototype.f_forcePendingAbortOnClient=function(){
  388. if(this.m_bPendingAbort){
  389. G_Debug.F_Print("C_BusRequest pending abort forced on client");
  390. this.m_bCompleted=true;
  391. this.m_bPendingAbort=false;
  392. C_BusRequest.superClass.F_Abort.call(this);
  393. }
  394. };
  395. C_BusRequest.prototype.f_createFollowOnState=function(_40,_41,_42){
  396. var _43=[];
  397. var nl=_40.selectNodes("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:primaryRequest/*");
  398. for(var i=0;i<nl.length;i++){
  399. _43.push(nl.item(i).xml);
  400. }
  401. var _44=_43.join("");
  402. var _45={"m_sConversation":_44,"m_sBusTracking":_41,"m_bCancellable":_42};
  403. return _45;
  404. };
  405. C_BusRequest.prototype.f_cancelRequest=function(){
  406. G_Debug.F_Print("C_BusRequest cancelling request on server");
  407. var _46=this.m_oFollowOnState.m_sConversation;
  408. var _47=this.m_oFollowOnState.m_sBusTracking;
  409. delete this.m_oFollowOnState;
  410. C_BusRequest.m_aBusTracking.push(_47);
  411. var _48="<"+this.m_sCancelMethod+">"+"<bus:conversation xsi:type=\"bus:asynchRequest\">"+_46+"</bus:conversation>"+"</"+this.m_sCancelMethod+">";
  412. var _49=new C_BusRequest(null,this.m_sCancelRequestSOAPAction,_48);
  413. _49.F_Send();
  414. };
  415. C_BusRequest.prototype.F_OnServerLogonComplete=function(_4a){
  416. this.m_bIsLoggingOn=false;
  417. if(_4a){
  418. this.F_Send();
  419. return;
  420. }
  421. this.F_SetNewErrorRes("IDS_CCHL_REQUEST_CANCELLED_LOGON");
  422. this.m_docResponse=null;
  423. this.m_oListener.F_Request_OnComplete(this);
  424. };
  425. C_BusRequest.prototype.F_OnServerPromptingComplete=function(){
  426. this.m_bIsPrompting=false;
  427. if(G_BusServer.F_HasParameterValues()){
  428. var _4b=this.m_sRequest;
  429. var _4c=_4b.indexOf("<bus:parameterValues");
  430. var _4d=_4b.indexOf("</bus:parameterValues>");
  431. if(_4c!=-1&&_4d!=-1){
  432. _4b=_4b.substring(0,_4c)+G_BusServer.F_GetParameterValues()+_4b.substring(_4d+22);
  433. }else{
  434. if(_4c!=-1&&_4d==-1){
  435. v_sParamsStart=_4b.slice(_4c);
  436. _4d=v_sParamsStart.indexOf("/>");
  437. _4b=_4b.substring(0,_4c)+G_BusServer.F_GetParameterValues()+_4b.substring(_4c+_4d+2);
  438. }else{
  439. G_Debug.F_Alert("Could not replace params in request");
  440. }
  441. }
  442. this.m_sRequest=_4b;
  443. this.F_Send();
  444. return;
  445. }
  446. this.F_SetNewErrorRes("IDS_CCHL_REQUEST_CANCELLED_PROMPTING");
  447. this.m_docResponse=null;
  448. this.m_oListener.F_Request_OnComplete(this);
  449. };
  450. C_BusRequest.prototype.f_createSoapRequest=function(_4e,_4f,_50){
  451. var _51=G_BusServer.F_GetAuthenticityToken();
  452. var _52=false;
  453. var _53=null;
  454. if(this.m_bUseDefaultRoutingServerGroup){
  455. _53="";
  456. _52=true;
  457. }else{
  458. _53=(this.m_sRoutingServerGroup===null)?G_BusServer.F_GetRoutingServerGroup():this.m_sRoutingServerGroup;
  459. _52=Boolean(_53);
  460. }
  461. var _54=G_BusServer.F_GetCafContextId();
  462. var _55=(C_BusRequest.m_aBusTracking.length>0)?C_BusRequest.m_aBusTracking.pop():"";
  463. var _56="<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" "+this.m_aNamespaces.join(" ")+">"+"<SOAP-ENV:Header>"+"<bus:biBusHeader xsi:type=\"bus:biBusHeader\">"+(_51?("<bus:CAM xsi:type=\"bus:CAM\">"+"<authenticityToken xsi:type=\"xsd:base64Binary\">"+G_BusServer.F_GetAuthenticityToken()+"</authenticityToken>"+"</bus:CAM>"):"")+(_54?("<bus:CAF xsi:type=\"bus:CAF\">"+"<contextID xsi:type=\"xsd:string\">"+_54+"</contextID>"+"</bus:CAF>"):"")+"<bus:userPreferenceVars SOAP-ENC:arrayType=\"bus:userPreferenceVar[]\" xsi:type=\"SOAP-ENC:Array\">"+"<item>"+"<bus:name xsi:type=\"xsd:string\">productLocale</bus:name>"+"<bus:value xsi:type=\"xsd:string\">"+(_4f?_4f:G_CCHL.M_sProductLocale)+"</bus:value>"+"</item>"+"<item>"+"<bus:name xsi:type=\"xsd:string\">contentLocale</bus:name>"+"<bus:value xsi:type=\"xsd:string\">"+(_50?_50:G_CCHL.M_sContentLocale)+"</bus:value>"+"</item>"+"</bus:userPreferenceVars>"+"<bus:dispatcherTransportVars xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:dispatcherTransportVar[]\">"+"<item xsi:type=\"bus:dispatcherTransportVar\">"+"<name xsi:type=\"xsd:string\">rs</name>"+"<value xsi:type=\"xsd:string\">true</value>"+"</item>"+"</bus:dispatcherTransportVars>"+_55+(_52?("<bus:routing xsi:type=\"bus:routingInfo\">"+"<routingServerGroup xsi:type=\"xsd:string\">"+_53.F_XMLEncode()+"</routingServerGroup>"+"</bus:routing>"):"")+"</bus:biBusHeader>"+"</SOAP-ENV:Header>"+"<SOAP-ENV:Body>"+_4e+"</SOAP-ENV:Body>"+"</SOAP-ENV:Envelope>";
  464. return _56;
  465. };
  466. function C_BusSoapFault(_57){
  467. this.m_sErrorSummary="";
  468. this.m_sErrorDetails="";
  469. this.m_sErrorCode="";
  470. _57.setProperty("SelectionNamespaces","xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' "+C_BusRequest.k_sBIBusNamespaceDecl);
  471. var _58=_57.selectSingleNode("//SOAP-ENV:Fault");
  472. var nl=_58.selectNodes(".//bus:messageString | .//messageString | .//bus:message[not(*)] | .//message[not(*)]");
  473. if(nl.length>0){
  474. var _59=nl.item(0).text;
  475. var i=_59.indexOf(" ");
  476. this.m_sErrorSummary=(i>0)?_59.substring(i+1):_59;
  477. this.m_sErrorCode=(i>0)?_59.substring(0,i):"";
  478. var _5a=[];
  479. for(var j=1;j<nl.length;++j){
  480. _5a.push(nl.item(j).text);
  481. }
  482. this.m_sErrorDetails=_5a.join("\r\n");
  483. }else{
  484. var _5b=_58.selectSingleNode("faultstring | SOAP-ENV:faultstring");
  485. if(_5b){
  486. this.m_sErrorSummary=_5b.text;
  487. }
  488. var _5c=_58.selectSingleNode("faultcode | SOAP-ENV:faultcode");
  489. if(_5c){
  490. this.m_sErrorCode=_5c.text;
  491. }
  492. }
  493. if(!this.m_sErrorSummary){
  494. this.m_sErrorSummary=G_ResManager.F_GetString("IDS_CCHL_UNRECOGNIZED_SOAP_FAULT");
  495. this.m_sErrorDetails=_58.xml;
  496. }
  497. };
  498. C_BusSoapFault.prototype.F_GetErrorSummary=function(){
  499. return this.m_sErrorSummary;
  500. };
  501. C_BusSoapFault.prototype.F_GetErrorDetails=function(){
  502. return this.m_sErrorDetails;
  503. };
  504. C_BusSoapFault.prototype.F_GetErrorCode=function(){
  505. return this.m_sErrorCode;
  506. };
  507. function C_FolderContentsRequest(_5d,_5e){
  508. var _5f="<bus:query>"+"<search>"+_5e.F_XMLEncode()+"/*[permission('read') or permission('write') or permission('traverse') or permission('execute')]</search>"+"<sortBy xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:sort[]\">"+"<item xsi:type=\"bus:sort\">"+"<propName xsi:type=\"bus:propEnum\">usage</propName>"+"<order xsi:type=\"bus:orderEnum\">ascending</order>"+"</item>"+"<item xsi:type=\"bus:sort\">"+"<propName xsi:type=\"bus:propEnum\">displaySequence</propName>"+"<order xsi:type=\"bus:orderEnum\">descending</order>"+"</item>"+"<item xsi:type=\"bus:sort\">"+"<propName xsi:type=\"bus:propEnum\">defaultName</propName>"+"<order xsi:type=\"bus:orderEnum\">ascending</order>"+"</item>"+"</sortBy>"+"<properties xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:propEnum[]\">"+"<item>defaultName</item>"+"<item>searchPath</item>"+"<item>permissions</item>"+"<item>userInterfaces</item>"+"<item>shown</item>"+"<item>storeID</item>"+"</properties>"+"</bus:query>";
  509. this.F_ConstructBaseClass(_5d,C_BusRequest.K_sSOAPAction_contentManagerService,_5f);
  510. };
  511. C_FolderContentsRequest.F_Extends(C_BusRequest);
  512. var G_BusServer={};
  513. G_BusServer.k_iPollPromptWindow=1000;
  514. G_BusServer.m_aLogonListeners=[];
  515. G_BusServer.m_oPromptListeners={};
  516. G_BusServer.m_oPromptWindows={};
  517. G_BusServer.m_iPromptId=0;
  518. G_BusServer.m_iLastPromptTimeoutId=-1;
  519. G_BusServer.f_setNoParameterValues=function(){
  520. this.m_sParameterValues="<bus:parameterValues "+C_BusRequest.k_sBIBusNamespaceDecl+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" SOAP-ENC:arrayType=\"bus:parameterValue[]\" xsi:type=\"SOAP-ENC:Array\">"+"</bus:parameterValues>";
  521. };
  522. G_BusServer.f_setNoParameterValues();
  523. G_BusServer.m_aParametersListeners=[];
  524. G_BusServer.F_AddParametersListener=function(_60){
  525. this.m_aParametersListeners.push(_60);
  526. };
  527. G_BusServer.f_getPromptId=function(){
  528. return ++this.m_iPromptId;
  529. };
  530. G_BusServer.F_SetCafContextId=function(_61){
  531. this.m_sCafContextId=_61;
  532. };
  533. G_BusServer.F_GetCafContextId=function(){
  534. return this.m_sCafContextId;
  535. };
  536. G_BusServer.m_sRoutingServerGroup="";
  537. G_BusServer.F_SetRoutingServerGroup=function(_62){
  538. this.m_sRoutingServerGroup=_62?_62:"";
  539. };
  540. G_BusServer.F_GetRoutingServerGroup=function(){
  541. return this.m_sRoutingServerGroup;
  542. };
  543. G_BusServer.F_Logon=function(_63,_64){
  544. this.m_aLogonListeners.push(_63);
  545. var _65=G_CCHL.M_sGatewayURL+"?b_action=xts.run&m=portal/close.xts";
  546. if(_64){
  547. _64.setProperty("SelectionNamespaces",C_BusRequest.k_sBIBusNamespaceDecl);
  548. var _66=_64.selectNodes(".//*[self::bus:biBusHeader | self::biBusHeader]//*[self::bus:displayObjects | self::displayObjects]/item[(type | bus:type) ='hidden']");
  549. for(var i=0;i<_66.length;i++){
  550. var _67=_66.item(i).selectSingleNode("bus:name | name").text;
  551. var _68=_66.item(i).selectSingleNode("bus:value | value").text;
  552. _65=_65+"&"+_67+"="+_68;
  553. }
  554. _65+="&md.callBack=data";
  555. }else{
  556. var _65=G_CCHL.M_sGatewayURL+"?b_action=xts.run&m=portal/close.xts&h_CAM_action=logonAs&md.callBack=data";
  557. }
  558. if(this.m_aLogonListeners.length>1){
  559. return true;
  560. }
  561. var _69=U_DOM.F_ShowEventBlocker(10000);
  562. _69.onmousedown=G_BusServer.F_OnLogonBlockerMouseDown;
  563. this.m_oLogonWindow=window.open(_65,"_blank","directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640");
  564. if(U_DOM.F_WindowOpenWasBlocked(this.m_oLogonWindow)){
  565. return false;
  566. }
  567. setTimeout("G_BusServer.f_checkLogonWindowState()",G_BusServer.k_iPollPromptWindow);
  568. return true;
  569. };
  570. function ccModalCallBack(_6a){
  571. var _6b=false;
  572. if(_6a=="ok"){
  573. _6b=true;
  574. }
  575. G_BusServer.f_onLogonComplete(_6b);
  576. };
  577. G_BusServer.F_OnLogonBlockerMouseDown=function(){
  578. if(G_BusServer.m_oLogonWindow&&!G_BusServer.m_oLogonWindow.closed){
  579. G_BusServer.m_oLogonWindow.focus();
  580. return;
  581. }
  582. U_DOM.F_HideEventBlocker();
  583. G_Debug.F_Print("G_BusServer.F_OnLogonBlockerMouseDown: blocker was up, yet no logon window");
  584. };
  585. G_BusServer.f_onLogonComplete=function(_6c){
  586. U_DOM.F_HideEventBlocker();
  587. setTimeout("G_BusServer.f_onAfterLogonComplete("+_6c+")",0);
  588. if(G_BusServer.m_oLogonWindow&&!G_BusServer.m_oLogonWindow.closed){
  589. G_BusServer.m_oLogonWindow.close();
  590. }
  591. delete G_BusServer.m_oLogonWindow;
  592. G_BusServer.m_oLogonWindow=null;
  593. };
  594. G_BusServer.f_onAfterLogonComplete=function(_6d){
  595. for(var i=0;i<this.m_aLogonListeners.length;i++){
  596. if(this.m_aLogonListeners[i]&&this.m_aLogonListeners[i].F_OnServerLogonComplete){
  597. this.m_aLogonListeners[i].F_OnServerLogonComplete(_6d);
  598. }
  599. }
  600. this.m_aLogonListeners.F_Clear();
  601. };
  602. G_BusServer.f_checkLogonWindowState=function(){
  603. if(G_BusServer.m_oLogonWindow){
  604. if(G_BusServer.m_oLogonWindow.closed){
  605. G_BusServer.f_onLogonComplete();
  606. }else{
  607. setTimeout("G_BusServer.f_checkLogonWindowState()",G_BusServer.k_iPollPromptWindow);
  608. }
  609. }
  610. };
  611. G_BusServer.F_Logoff=function(){
  612. var _6e=new C_BusRequest(null,C_BusRequest.K_sSOAPAction_contentManagerService,"<bus:logoff/>");
  613. _6e.F_Send();
  614. U_CookieJar.F_DeleteCookie("cam_passport",U_DOM.F_GetBasePath());
  615. };
  616. G_BusServer.F_AuthenticationRequired=function(_6f){
  617. var _70=_6f.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader");
  618. if(_70&&_70.selectSingleNode(".//bus:errorCodeString[text() = 'camAuthUserRecoverable'] | .//errorCodeString[text() = 'camAuthUserRecoverable']")){
  619. return _70.selectSingleNode(".//bus:promptInfo | .//promptInfo")!=null;
  620. }
  621. return false;
  622. };
  623. G_BusServer.F_RequiresServerPrompting=function(_71){
  624. return (_71&&_71.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item[bus:status='prompting']"));
  625. };
  626. G_BusServer.F_DoPrompting=function(_72,_73,_74){
  627. G_HAL.F_VerifyDependencies("G_ResManager");
  628. var _75=document;
  629. var _76=_75.getElementById("CCHL_formServerPrompting");
  630. if(!_76){
  631. var _77=G_ResManager.F_GetResource("CCHL_formServerPrompting").text;
  632. var div=_75.body.appendChild(_75.createElement("DIV"));
  633. div.innerHTML=_77;
  634. _76=_75.getElementById("CCHL_formServerPrompting");
  635. }
  636. var _78=_73.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:primaryRequest");
  637. var _79=_73.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:outputPages/item");
  638. var _7a=_73.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking/bus:conversationContext");
  639. if(!(_78&&_79&&_7a)){
  640. return false;
  641. }
  642. _76.action=G_CCHL.M_sGatewayURL;
  643. _76.conversation.value=(_78&&!_74)?_78.xml:"";
  644. _76.htmlFragment.value=(_79&&!_74)?_79.text:"";
  645. _76.specification.value=_74?_74:"";
  646. _76.method.value=_74?"collectParameterValuesSpecification":"";
  647. _76.tracking.value=(_7a&&!_74)?_7a.xml:"";
  648. var _7b=this.f_getPromptId();
  649. _76.clientContext.value=_7b;
  650. var _7c=this.F_GetCafContextId();
  651. if(_7c){
  652. _76.cafcontextid.value=_7c;
  653. }
  654. _76.target="winPrompt_"+(new Date()).getTime();
  655. this.f_setNoParameterValues();
  656. if(D_Progress.F_IsActiveDialog()){
  657. D_Progress.F_DisableCancel();
  658. }
  659. var _7d=U_DOM.F_ShowEventBlocker(10000);
  660. _7d.onmousedown=G_BusServer.F_OnPromptBlockerMouseDown;
  661. this.m_oPromptListeners[_7b]=_72;
  662. this.m_oPromptWindows[_7b]=window.open(G_HAL.F_GetFileURL("hal/blank.htm"),_76.target,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=400,width=630");
  663. if(U_DOM.F_WindowOpenWasBlocked(this.m_oPromptWindows[_7b])){
  664. return false;
  665. }
  666. this.m_oPromptWindows[_7b].focus();
  667. _76.submit();
  668. this.m_iLastPromptTimeoutId=setTimeout("G_BusServer.f_checkPromptingWindowState('"+_7b+"')",G_BusServer.k_iPollPromptWindow);
  669. return true;
  670. };
  671. G_BusServer.F_OnPromptBlockerMouseDown=function(){
  672. for(var s in G_BusServer.m_oPromptWindows){
  673. G_BusServer.m_oPromptWindows[s].focus();
  674. return;
  675. }
  676. U_DOM.F_HideEventBlocker();
  677. G_Debug.F_Print("G_BusServer.F_OnPromptBlockerMouseDown: blocker was up, yet no prompt window");
  678. };
  679. G_BusServer.f_checkPromptingWindowState=function(_7e){
  680. if(this.m_oPromptWindows[_7e]){
  681. var _7f=false;
  682. try{
  683. _7f=this.m_oPromptWindows[_7e].closed;
  684. }
  685. catch(e){
  686. _7f=true;
  687. }
  688. if(_7f){
  689. delete this.m_oPromptWindows[_7e];
  690. if(U_Object.F_IsEmpty(this.m_oPromptWindows)){
  691. U_DOM.F_HideEventBlocker();
  692. }else{
  693. for(var s in this.m_oPromptWindows){
  694. this.m_oPromptWindows[s].focus();
  695. break;
  696. }
  697. }
  698. setTimeout("G_BusServer.f_fireOnPromptingComplete('"+_7e+"')",0);
  699. }else{
  700. this.m_iLastPromptTimeoutId=setTimeout("G_BusServer.f_checkPromptingWindowState('"+_7e+"')",G_BusServer.k_iPollPromptWindow);
  701. }
  702. }
  703. };
  704. G_BusServer.F_GetParameterValues=function(){
  705. return this.m_sParameterValues;
  706. };
  707. G_BusServer.F_SetParameterValues=function(_80){
  708. var _81=_80.replace(/bus:parameters(\W)/g,"bus:parameterValues$1");
  709. var _82=U_XML.F_LoadString(null,_81);
  710. var _83=U_XML.F_LoadString(null,this.m_sParameterValues);
  711. if(_82&&_83&&_82.documentElement.xml!=_83.documentElement.xml){
  712. this.m_sParameterValues=_81;
  713. this.f_fireOnParametersChange();
  714. return true;
  715. }
  716. return false;
  717. };
  718. G_BusServer.F_HasParameterValues=function(){
  719. var _84=U_XML.F_LoadString(D_XmlError,this.m_sParameterValues);
  720. return (_84.documentElement.text!="");
  721. };
  722. G_BusServer.F_ClearParameterValues=function(){
  723. this.f_setNoParameterValues();
  724. this.f_fireOnParametersChange();
  725. };
  726. G_BusServer.F_ClearNonCredentialParameterValues=function(){
  727. if(this.F_HasParameterValues()){
  728. var _85=this.F_GetParameterValues();
  729. var _86=U_XML.F_LoadString(D_XmlError,_85,false);
  730. _86.setProperty("SelectionNamespaces",C_BusRequest.k_sBIBusNamespaceDecl);
  731. var _87=false;
  732. var _88=_86.documentElement.selectNodes("item[not(starts-with(./bus:name,'credential'))]");
  733. for(var i=0;i<_88.length;i++){
  734. _86.documentElement.removeChild(_88.item(i));
  735. _87=true;
  736. }
  737. if(_87){
  738. this.m_sParameterValues=U_XML.F_SerializeNode(_86.documentElement);
  739. this.f_fireOnParametersChange();
  740. }
  741. }
  742. };
  743. G_BusServer.f_fireOnParametersChange=function(){
  744. for(var i=0;i<this.m_aParametersListeners.length;i++){
  745. if(this.m_aParametersListeners[i]&&this.m_aParametersListeners[i].F_OnServerParametersChange){
  746. this.m_aParametersListeners[i].F_OnServerParametersChange();
  747. }
  748. }
  749. };
  750. G_BusServer.f_fireOnPromptingComplete=function(_89){
  751. if(this.m_oPromptListeners[_89]&&this.m_oPromptListeners[_89].F_OnServerPromptingComplete){
  752. this.m_oPromptListeners[_89].F_OnServerPromptingComplete();
  753. }
  754. delete this.m_oPromptListeners[_89];
  755. };
  756. function pdsCallback(_8a){
  757. if(_8a.state!="Cancel"){
  758. G_BusServer.m_sParameterValues="<bus:parameterValues "+C_BusRequest.k_sBIBusNamespaceDecl+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" SOAP-ENC:arrayType=\"bus:parameterValue[]\" xsi:type=\"SOAP-ENC:Array\">"+(_8a.parameters?_8a.parameters.join(""):"")+"</bus:parameterValues>";
  759. setTimeout("G_BusServer.f_fireOnParametersChange()",0);
  760. }
  761. var _8b=_8a.v_sClientContext;
  762. if(!_8b){
  763. G_Debug.F_Print("Error: Prompting returned with no client context. Will attempt to inform any listener that can be found");
  764. for(var s in G_BusServer.m_oPromptWindows){
  765. _8b=s;
  766. }
  767. }
  768. if(G_BusServer.m_iLastPromptTimeoutId!=-1){
  769. window.clearTimeout(G_BusServer.m_iLastPromptTimeoutId);
  770. G_BusServer.m_iLastPromptTimeoutId=-1;
  771. }
  772. setTimeout("G_BusServer.f_fireOnPromptingComplete('"+_8b+"')",0);
  773. delete G_BusServer.m_oPromptWindows[_8b];
  774. if(U_Object.F_IsEmpty(G_BusServer.m_oPromptWindows)){
  775. U_DOM.F_HideEventBlocker();
  776. }else{
  777. for(var s in G_BusServer.m_oPromptWindows){
  778. G_BusServer.m_oPromptWindows[s].focus();
  779. break;
  780. }
  781. }
  782. };
  783. G_BusServer.F_GetAuthenticityToken=function(){
  784. if(!this.m_sAuthenticityToken){
  785. try{
  786. this.m_sAuthenticityToken=(new CAMAuthenticityTokenSession()).generate();
  787. }
  788. catch(e){
  789. alert("Exception thrown by CAMAuthenticityTokenSession"+"\n\n Make sure you've included the camcrypto javascript files:"+"\n camcrypto/base64.js"+"\n camcrypto/camcryptoutil.js"+"\n camcrypto/sha1.js"+"\n camcrypto/authtoken.js");
  790. }
  791. }
  792. return this.m_sAuthenticityToken;
  793. };
  794. function C_RunReportRequest(_8c,_8d,_8e,_8f,_90){
  795. var _91="";
  796. if(_8e&&_8e!=""){
  797. _91="<item xsi:type=\"bus:runOptionData\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">data</bus:name>"+"<bus:value xsi:type=\"bus:dataEnum\">"+_8e+"</bus:value>"+"</item>";
  798. }
  799. var _92="<item xsi:type=\"bus:runOptionAnyURI\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">outputLocation</bus:name>"+"<bus:value xsi:type=\"xsd:string\">http://developer.cognos.com/ceba/constants/temporaryObjectLocationEnum#serverFileSystem</bus:value>"+"</item>";
  800. if(_90){
  801. _92="";
  802. }
  803. var _93="<rns1:runSpecification>"+"<bus:specification xsi:type=\"bus:reportServiceReportSpecification\">"+"<bus:value xsi:type=\"bus:specification\">"+_8d.F_XMLEncode()+"</bus:value>"+"</bus:specification>"+G_BusServer.F_GetParameterValues()+"<bus:options SOAP-ENC:arrayType=\"bus:option[]\" xsi:type=\"SOAP-ENC:Array\">"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">primaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_BusRequest.K_sPrimaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">secondaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_BusRequest.K_sSecondaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionStringArray\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">outputFormat</bus:name>"+"<bus:value xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:string[1]\">"+"<item>"+(_8f?_8f:"XHTML")+"</item>"+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionAnyURI\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">xslURL</bus:name>"+"<bus:value xsi:type=\"xsd:string\">null.xsl</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionString\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">promptFormat</bus:name>"+"<bus:value xsi:type=\"xsd:string\">HTMLFragment</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionBoolean\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">prompt</bus:name>"+"<bus:value xsi:type=\"xsd:boolean\">false</bus:value>"+"</item>"+_91+_92+"</bus:options>"+"</rns1:runSpecification>";
  804. C_RunReportRequest.m_sLastRequest=_93;
  805. C_RunReportRequest.m_sLastResponse="";
  806. this.m_nReportProperties=null;
  807. this.F_ConstructBaseClass(_8c,C_BusRequest.K_sSOAPAction_reportService,_93);
  808. this.F_SetContext(this.e_RequestOutput);
  809. this.F_SetAsyncBusRequest("rns1:wait","rns1:cancel","rns1:getOutput");
  810. };
  811. C_RunReportRequest.F_Extends(C_BusRequest);
  812. C_RunReportRequest.prototype.F_ProcessResponse=function(){
  813. C_RunReportRequest.superClass.F_ProcessResponse.call(this);
  814. var _94=this.F_GetResponse();
  815. if(!_94){
  816. return;
  817. }
  818. C_RunReportRequest.m_sLastResponse=this.F_GetResponseText();
  819. var n=_94.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*//bus:outputPages/item");
  820. this.m_sReportOutput=U_XML.F_GetNodeText(n);
  821. };
  822. C_RunReportRequest.prototype.F_GetReportOutput=function(){
  823. return this.m_sReportOutput;
  824. };
  825. function C_MetadataRequest(_95,_96){
  826. C_MetadataRequest.m_sLastRequest=_96;
  827. C_MetadataRequest.m_sLastResponse="";
  828. this.m_aMetadataResponses=null;
  829. var _97="<rns1:runSpecification>"+"<bus:specification xsi:type=\"bus:reportServiceMetadataSpecification\">"+"<bus:value xsi:type=\"bus:specification\">"+_96.F_XMLEncode()+"</bus:value>"+"</bus:specification>"+G_BusServer.F_GetParameterValues()+"<bus:options SOAP-ENC:arrayType=\"bus:option[]\" xsi:type=\"SOAP-ENC:Array\">"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">primaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_BusRequest.K_sPrimaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">secondaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_BusRequest.K_sSecondaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionBoolean\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">prompt</bus:name>"+"<bus:value xsi:type=\"xsd:boolean\">false</bus:value>"+"</item>"+"</bus:options>"+"</rns1:runSpecification>";
  830. this.F_ConstructBaseClass(_95,C_BusRequest.K_sSOAPAction_reportService_session,_97);
  831. this.F_SetAsyncBusRequest("rns1:wait","rns1:cancel","rns1:getOutput");
  832. };
  833. C_MetadataRequest.F_Extends(C_BusRequest);
  834. C_MetadataRequest.F_GetLastRequest=function(){
  835. return this.m_sLastRequest?this.m_sLastRequest:"";
  836. };
  837. C_MetadataRequest.F_GetLastResponse=function(){
  838. return this.m_sLastResponse?this.m_sLastResponse:"";
  839. };
  840. C_MetadataRequest.prototype.F_ProcessResponse=function(){
  841. C_MetadataRequest.superClass.F_ProcessResponse.call(this);
  842. var _98=this.F_GetResponse();
  843. if(!_98){
  844. return;
  845. }
  846. var nl=_98.selectNodes("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata");
  847. if(nl.length==0){
  848. this.F_SetNewErrorRes("IDS_CCHL_BAD_MA_RESPONSE");
  849. return;
  850. }
  851. var _99=[];
  852. var _9a=[];
  853. _9a.push("<root>");
  854. for(var i=0;i<nl.length;i++){
  855. _9a.push("<response index=\""+i+"\">");
  856. var _9b=nl.item(i).text;
  857. var d=U_XML.F_LoadString(null,_9b);
  858. if(!d){
  859. this.F_SetNewErrorRes("IDS_CCHL_BAD_MA_RESPONSE",_9b);
  860. return;
  861. }
  862. _99.push(d.documentElement);
  863. _9a.push(d.documentElement.xml);
  864. _9a.push("</response>");
  865. }
  866. _9a.push("</root>");
  867. C_MetadataRequest.m_sLastResponse=_9a.join("");
  868. this.m_aMetadataResponses=_99;
  869. };
  870. C_MetadataRequest.prototype.F_GetMetadataResponses=function(){
  871. return this.m_aMetadataResponses;
  872. };
  873. C_MetadataRequest.prototype.F_GetMetadataResponse=function(){
  874. var a=this.F_GetMetadataResponses();
  875. return a?a[0]:null;
  876. };
  877. function C_ModelCache(){
  878. this.m_sModelPath="";
  879. this.m_sModelLocale="";
  880. this.m_sPackageName="";
  881. this.m_sPackagePath="";
  882. this.m_sModificationTime="";
  883. this.m_sRoutingServerGroup="";
  884. this.m_iMemberDisplayCountLimit=NaN;
  885. this.m_aListeners=[];
  886. this.m_bModelEnabled=false;
  887. this.f_initCache();
  888. };
  889. C_ModelCache.prototype.f_initCache=function(){
  890. this.m_oFunctionProperty={};
  891. this.m_oSupportsOperation={};
  892. this.m_oSupportsSuppression={};
  893. this.m_bContainsHierarchies=false;
  894. this.m_docModelCache=U_XML.F_CreateDocument();
  895. var _9c=this.m_docModelCache.appendChild(this.m_docModelCache.createElement("modelCache"));
  896. this.m_nModelRootCache=_9c.appendChild(this.m_docModelCache.createElement("modelRootCache"));
  897. this.m_nRootMembersCache=_9c.appendChild(this.m_docModelCache.createElement("rootMembersCache"));
  898. this.m_nChildrenCache=_9c.appendChild(this.m_docModelCache.createElement("childrenCache"));
  899. this.m_nMembersCache=_9c.appendChild(this.m_docModelCache.createElement("membersCache"));
  900. this.m_oAncestorInfoCache={};
  901. };
  902. C_ModelCache.prototype.F_SetModel=function(_9d,_9e,_9f,_a0,_a1,_a2,_a3){
  903. var _a4=!this.m_bModelEnabled;
  904. var _a5=(this.m_sModelPath!=_9d)||(this.m_sModelLocale!=_9e);
  905. this.m_sModelPath=_9d;
  906. this.m_sModelLocale=_9e;
  907. this.m_sPackageName=_9f;
  908. this.m_sPackagePath=_a0;
  909. this.m_sModificationTime=_a1;
  910. this.m_sRoutingServerGroup=_a3;
  911. this.m_iMemberDisplayCountLimit=_a2;
  912. if(_a5){
  913. this.F_ClearModelCache();
  914. }else{
  915. if(this.m_bModelEnabled){
  916. return;
  917. }
  918. }
  919. this.m_bModelEnabled=true;
  920. this.f_fireEvent("F_ModelCache_OnModelChanged");
  921. if(_a4&&!_a5&&this.F_GetModelRootResponses()){
  922. this.f_fireEvent("F_ModelCache_OnModelRootLoaded");
  923. }
  924. };
  925. C_ModelCache.prototype.F_DisableModel=function(){
  926. this.m_bModelEnabled=false;
  927. this.f_fireEvent("F_ModelCache_OnCacheCleared");
  928. this.f_fireEvent("F_ModelCache_OnModelChanged");
  929. this.f_fireEvent("F_ModelCache_OnModelRootLoaded");
  930. };
  931. C_ModelCache.prototype.F_ToString=function(){
  932. var _a6=this.m_docModelCache.documentElement;
  933. _a6.setAttribute("modelPath",this.m_sModelPath);
  934. _a6.setAttribute("modelLocale",this.m_sModelLocale);
  935. _a6.setAttribute("packageName",this.m_sPackageName);
  936. _a6.setAttribute("packagePath",this.m_sPackagePath);
  937. _a6.setAttribute("modificationTime",this.m_sModificationTime);
  938. _a6.setAttribute("memberDisplayCountLimit",this.m_iMemberDisplayCountLimit.toString());
  939. return _a6.xml;
  940. };
  941. C_ModelCache.prototype.F_IsCurrentModel=function(_a7,_a8){
  942. return ((_a7==this.m_sModelPath)&&(_a8==this.m_sModelLocale));
  943. };
  944. C_ModelCache.prototype.F_AddModelLoadedListener=function(_a9){
  945. this.m_aListeners.F_PushUnique(_a9);
  946. };
  947. C_ModelCache.prototype.F_RemoveModelLoadedListener=function(_aa){
  948. this.m_aListeners.F_RemoveItem(_aa);
  949. };
  950. C_ModelCache.prototype.F_LoadXML=function(_ab){
  951. this.F_ClearModelCache();
  952. this.m_docModelCache=U_XML.F_LoadString(null,_ab,false,false);
  953. if(!this.m_docModelCache){
  954. return;
  955. }
  956. var _ac=this.m_docModelCache.documentElement;
  957. this.m_nModelRootCache=_ac.selectSingleNode("modelRootCache");
  958. this.m_nRootMembersCache=_ac.selectSingleNode("rootMembersCache");
  959. this.m_nChildrenCache=_ac.selectSingleNode("childrenCache");
  960. this.m_nMembersCache=_ac.selectSingleNode("membersCache");
  961. this.m_sModelPath=_ac.getAttribute("modelPath");
  962. this.m_sModelLocale=_ac.getAttribute("modelLocale");
  963. this.m_sPackageName=_ac.getAttribute("packageName");
  964. this.m_sPackagePath=_ac.getAttribute("packagePath");
  965. this.m_sModificationTime=_ac.getAttribute("modificationTime");
  966. this.m_iMemberDisplayCountLimit=_ac.getAttribute("memberDisplayCountLimit");
  967. this.m_bModelEnabled=true;
  968. this.f_fireEvent("F_ModelCache_OnModelChanged");
  969. this.f_fireEvent("F_ModelCache_OnModelRootLoaded");
  970. };
  971. C_ModelCache.prototype.F_IsMultiDimensionalSource=function(){
  972. return Boolean(this.m_nModelRootCache.selectSingleNode(".//*[self::dimension | self::hierarchy | self::member]"));
  973. };
  974. C_ModelCache.prototype.F_ClearModelCache=function(){
  975. this.f_initCache();
  976. this.f_fireEvent("F_ModelCache_OnCacheCleared");
  977. };
  978. C_ModelCache.prototype.f_fireEvent=function(_ad){
  979. this.m_aListeners.F_CallEach(_ad,this);
  980. };
  981. C_ModelCache.prototype.F_GetMember=function(_ae){
  982. return this.m_nMembersCache.selectSingleNode(".//*[not(self::searchResult) and @_ref="+_ae.F_ToXPathString()+"]");
  983. };
  984. C_ModelCache.prototype.F_GetMembers=function(_af,_b0){
  985. if(!_b0){
  986. alert("F_GetMembers requires a max members parameter");
  987. return null;
  988. }
  989. var _b1=this.m_nMembersCache.selectSingleNode("*[not(self::searchResult) and @_ref="+_af.F_ToXPathString()+"]");
  990. if(_b1){
  991. var _b2=_b1.selectNodes("member").length;
  992. var _b3=_b1.getAttribute("maxMembers");
  993. var _b4=_b3?parseInt(_b3,10):Number.POSITIVE_INFINITY;
  994. if(_b0<=_b4||_b2<_b4){
  995. return _b1;
  996. }
  997. }
  998. return null;
  999. };
  1000. C_ModelCache.prototype.F_CacheMembersResponse=function(_b5,_b6){
  1001. if(_b6!=Number.POSITIVE_INFINITY){
  1002. _b5.setAttribute("maxMembers",_b6);
  1003. }
  1004. var n=U_XML.F_ImportNode(this.m_docModelCache,_b5,true);
  1005. this.m_nMembersCache.appendChild(n);
  1006. this.f_flagMembersWithNoChildren();
  1007. return n;
  1008. };
  1009. C_ModelCache.prototype.f_flagMembersWithNoChildren=function(){
  1010. if(!this.m_bUpdatingCache){
  1011. U_XML.F_SetNodeAttributeValues(this.m_nMembersCache.selectNodes("*/member[not(@hasChildren) and ../../member[not(member)]/@_path = @_path]"),"hasChildren","false");
  1012. }
  1013. };
  1014. C_ModelCache.prototype.F_GetSearchMembers=function(_b7,_b8,_b9,_ba){
  1015. if(!_b8){
  1016. alert("F_GetMembers requires a max members parameter");
  1017. return;
  1018. }
  1019. var _bb=this.m_nMembersCache.selectSingleNode("searchResult[@_path="+_b7.F_ToXPathString()+" and @descendants='"+(_b9?"true":"false")+"' and @constraints="+(_ba?_ba.F_ToXPathString():"''")+"]");
  1020. if(_bb){
  1021. var _bc=_bb.selectNodes("member").length;
  1022. var _bd=parseInt(_bb.getAttribute("maxMembers"));
  1023. if(_b8<=_bd||_bc<_bd){
  1024. return _bb;
  1025. }
  1026. }
  1027. return null;
  1028. };
  1029. C_ModelCache.prototype.F_CacheSearchMembersResponse=function(_be,_bf,_c0,_c1){
  1030. _be.setAttribute("maxMembers",_bf);
  1031. _be.setAttribute("descendants",(_c0?"true":"false"));
  1032. _be.setAttribute("constraints",_c1);
  1033. var n=U_XML.F_ImportNode(this.m_docModelCache,_be,true);
  1034. this.m_nMembersCache.appendChild(n);
  1035. n=U_XML.F_SetNodeName(n,"searchResult");
  1036. this.f_flagMembersWithNoChildren();
  1037. return n;
  1038. };
  1039. C_ModelCache.prototype.F_GetChildren=function(_c2){
  1040. return this.m_nChildrenCache.selectSingleNode("*[*[@_path="+_c2.F_ToXPathString()+"]]");
  1041. };
  1042. C_ModelCache.prototype.F_CacheChildrenResponse=function(_c3){
  1043. var n=U_XML.F_ImportNode(this.m_docModelCache,_c3,true);
  1044. this.m_nChildrenCache.appendChild(n);
  1045. return n;
  1046. };
  1047. C_ModelCache.prototype.F_GetModelRootResponses=function(){
  1048. var nl=this.m_nModelRootCache.selectNodes("*");
  1049. var _c4=nl.length;
  1050. if(_c4==0){
  1051. return null;
  1052. }
  1053. var _c5=[];
  1054. for(var i=0;i<_c4;i++){
  1055. _c5.push(nl.item(i).cloneNode(true));
  1056. }
  1057. return _c5;
  1058. };
  1059. C_ModelCache.prototype.F_GetDimensionalMetadataRoot=function(){
  1060. return this.m_nModelRootCache.selectSingleNode("*[1]");
  1061. };
  1062. C_ModelCache.prototype.F_IsMeasureDimension=function(_c6){
  1063. return (_c6&&_c6.nodeName=="dimension"&&_c6.getAttribute("type")=="measure");
  1064. };
  1065. C_ModelCache.prototype.F_GetDimensionalMetadata=function(_c7){
  1066. return this.m_nModelRootCache.selectSingleNode("*[1]//*[@_ref="+_c7.F_ToXPathString()+"]");
  1067. };
  1068. C_ModelCache.prototype.F_CacheModelRootResponse=function(_c8){
  1069. U_XML.F_RemoveNodes(this.m_nModelRootCache,"*");
  1070. var _c9=_c8?_c8.length:0;
  1071. if(_c9>0){
  1072. for(var i=0;i<_c9;i++){
  1073. var n=U_XML.F_ImportNode(this.m_docModelCache,_c8[i],true);
  1074. this.m_nModelRootCache.appendChild(n);
  1075. }
  1076. this.m_bContainsHierarchies=Boolean(_c8[C_ModelRootRequest.K_eResponse_MemberTreeMetadata].selectSingleNode(".//hierarchy/@_ref"));
  1077. }
  1078. this.f_fireEvent("F_ModelCache_OnModelRootLoaded");
  1079. };
  1080. C_ModelCache.prototype.F_GetMemberMetadata=function(_ca){
  1081. var _cb=this.F_GetModelRootResponses()[C_ModelRootRequest.K_eResponse_MemberTreeMetadata];
  1082. return _cb?_cb.selectSingleNode(".//*[@_ref="+_ca.F_ToXPathString()+"]"):null;
  1083. };
  1084. C_ModelCache.prototype.F_GetSiblingHierarchyRootMembers=function(_cc){
  1085. var _cd=this.m_nModelRootCache.selectSingleNode(".//hierarchy[@_ref="+_cc.F_ToXPathString()+"]");
  1086. return _cd.selectNodes("../hierarchy/member");
  1087. };
  1088. C_ModelCache.prototype.F_GetRootMembersResponses=function(){
  1089. var nl=this.m_nRootMembersCache.selectNodes("*");
  1090. var _ce=nl.length;
  1091. if(_ce==0){
  1092. return null;
  1093. }
  1094. var _cf=[];
  1095. for(var i=0;i<_ce;i++){
  1096. _cf.push(nl.item(i).cloneNode(true));
  1097. }
  1098. return _cf;
  1099. };
  1100. C_ModelCache.prototype.F_CacheRootMembersResponse=function(_d0){
  1101. var _d1=[];
  1102. U_XML.F_RemoveNodes(this.m_nRootMembersCache,"*");
  1103. var _d2=_d0?_d0.length:0;
  1104. for(var i=0;i<_d2;i++){
  1105. var n=U_XML.F_ImportNode(this.m_docModelCache,_d0[i],true);
  1106. this.m_nRootMembersCache.appendChild(n);
  1107. _d1.push(n);
  1108. }
  1109. return _d1;
  1110. };
  1111. C_ModelCache.prototype.F_GetFunctionProperty=function(_d3){
  1112. var _d4=this.m_oFunctionProperty[_d3];
  1113. if(_d4!=undefined){
  1114. return _d4;
  1115. }
  1116. var _d5=this.F_GetModelRootResponses();
  1117. if(!_d5){
  1118. G_Debug.F_Print("F_GetFunctionProperty("+_d3+") is undefined. Metadata is required.");
  1119. return;
  1120. }
  1121. var _d6=_d5[C_ModelRootRequest.K_eResponse_Operations];
  1122. var _d7=_d6.selectSingleNode(_d3+"/@value");
  1123. var _d4=_d7?_d7.value:"";
  1124. this.m_oFunctionProperty[_d3]=_d4;
  1125. return _d4;
  1126. };
  1127. C_ModelCache.prototype.F_SupportsSuppression=function(_d8){
  1128. var _d9=this.m_oSupportsSuppression[_d8];
  1129. if(_d9!=undefined){
  1130. return _d9;
  1131. }
  1132. var _da=this.F_GetModelRootResponses();
  1133. if(!_da){
  1134. G_Debug.F_Print("F_SupportsSuppression("+_d8+") is undefined. Metadata is required.");
  1135. return;
  1136. }
  1137. var _db=_da[C_ModelRootRequest.K_eResponse_MemberTreeMetadata];
  1138. var _dc=Boolean(_db.selectSingleNode(".//package[@"+_d8+"='false']"));
  1139. this.m_oSupportsSuppression[_d8]=!_dc;
  1140. return !_dc;
  1141. };
  1142. C_ModelCache.prototype.F_SupportsOperation=function(_dd){
  1143. var _de=this.m_oSupportsOperation[_dd];
  1144. if(_de!=undefined){
  1145. return _de;
  1146. }
  1147. var _df=this.F_GetModelRootResponses();
  1148. if(!_df){
  1149. G_Debug.F_Print("F_SupportsOperation("+_dd+") is undefined. Metadata is required.");
  1150. return;
  1151. }
  1152. var _e0=_df[C_ModelRootRequest.K_eResponse_Operations];
  1153. var _de=Boolean(_e0.selectSingleNode(".//function[@id='"+_dd+"' and (@qosLevel='OK' or @qosLevel='limited' or @qosLevel='restricted')]"));
  1154. this.m_oSupportsOperation[_dd]=_de;
  1155. return _de;
  1156. };
  1157. C_ModelCache.prototype.F_GetModelPath=function(){
  1158. return this.m_sModelPath;
  1159. };
  1160. C_ModelCache.prototype.F_GetModelLocale=function(){
  1161. return this.m_sModelLocale;
  1162. };
  1163. C_ModelCache.prototype.F_GetPackageName=function(){
  1164. return this.m_sPackageName;
  1165. };
  1166. C_ModelCache.prototype.F_GetPackagePath=function(){
  1167. return this.m_sPackagePath;
  1168. };
  1169. C_ModelCache.prototype.F_GetModificationTime=function(){
  1170. return this.m_sModificationTime;
  1171. };
  1172. C_ModelCache.prototype.F_GetRoutingServerGroup=function(){
  1173. return this.m_sRoutingServerGroup;
  1174. };
  1175. C_ModelCache.prototype.F_GetMemberDisplayCountLimit=function(){
  1176. return this.m_iMemberDisplayCountLimit;
  1177. };
  1178. C_ModelCache.prototype.F_ModelEnabled=function(){
  1179. return this.m_bModelEnabled;
  1180. };
  1181. C_ModelCache.prototype.F_ContainsHierarchies=function(){
  1182. return this.m_bContainsHierarchies;
  1183. };
  1184. C_ModelCache.m_sOperations="<Functions authoringLocale=\"@AUTHORING_LOCALE@\">"+"<Properties>"+"<Property name=\"/@listSeparator\"/>"+"<Property name=\"/@decimalSeparator\"/>"+"<Property name=\"./group\"/>"+"<Property name=\"group/@\"/>"+"<Property name=\"./function\"/>"+"<Property name=\"function/@id\"/>"+"<Property name=\"function/@name\"/>"+"<Property name=\"function/@qosLevel\"/>"+"</Properties>"+"<Constraint Condition=\"FDS[@type=&apos;operation&apos;]\"/>"+"</Functions>";
  1185. C_ModelCache.m_sQueryFunctions="<Functions authoringLocale=\"@AUTHORING_LOCALE@\">"+"<Properties>"+"<Property name=\"./group\"/>"+"<Property name=\"group/@id\"/>"+"<Property name=\"group/@name\"/>"+"<Property name=\"group/@qosLevel\"/>"+"<Property name=\"./function\"/>"+"<Property name=\"function/@id\"/>"+"<Property name=\"function/@name\"/>"+"<Property name=\"function/@tip\"/>"+"<Property name=\"function/@syntax\"/>"+"<Property name=\"function/@example.1\"/>"+"<Property name=\"function/@result.1\"/>"+"<Property name=\"function/@resultdata.1\"/>"+"<Property name=\"function/@example.2\"/>"+"<Property name=\"function/@result.2\"/>"+"<Property name=\"function/@resultdata.2\"/>"+"<Property name=\"function/@example.3\"/>"+"<Property name=\"function/@result.3\"/>"+"<Property name=\"function/@resultdata.3\"/>"+"<Property name=\"function/@example.4\"/>"+"<Property name=\"function/@result.4\"/>"+"<Property name=\"function/@resultdata.4\"/>"+"<Property name=\"function/@example.5\"/>"+"<Property name=\"function/@result.5\"/>"+"<Property name=\"function/@resultdata.5\"/>"+"<Property name=\"function/@dropText\"/>"+"<Property name=\"function/@type\"/>"+"<Property name=\"function/@qosLevel\"/>"+"<Property name=\"function/@datasourceQueryType\"/>"+"</Properties>"+"<Constraints>"+"<Constraint Condition=\"FDS[@type='function']\"/>"+"<Constraint Condition=\"FDS[@type='operator']\"/>"+"<Constraint Condition=\"FDS[@type='literal']\"/>"+"<Constraint Condition=\"FDS[@type='summary']\"/>"+"<Constraint Condition=\"FDS[@context='tabular']\"/>"+"<Constraint Condition=\"FDS[@context='crosstab']\"/>"+"</Constraints>"+"</Functions>";
  1186. C_ModelCache.m_sReportFunctions="<Functions authoringLocale=\"@AUTHORING_LOCALE@\">"+"<Properties>"+"<Property name=\"./group\"/>"+"<Property name=\"group/@id\"/>"+"<Property name=\"group/@name\"/>"+"<Property name=\"./function\"/>"+"<Property name=\"function/@id\"/>"+"<Property name=\"function/@name\"/>"+"<Property name=\"function/@tip\"/>"+"<Property name=\"function/@syntax\"/>"+"<Property name=\"function/@example.1\"/>"+"<Property name=\"function/@result.1\"/>"+"<Property name=\"function/@resultdata.1\"/>"+"<Property name=\"function/@example.2\"/>"+"<Property name=\"function/@result.2\"/>"+"<Property name=\"function/@resultdata.2\"/>"+"<Property name=\"function/@example.3\"/>"+"<Property name=\"function/@result.3\"/>"+"<Property name=\"function/@resultdata.3\"/>"+"<Property name=\"function/@example.4\"/>"+"<Property name=\"function/@result.4\"/>"+"<Property name=\"function/@resultdata.4\"/>"+"<Property name=\"function/@example.5\"/>"+"<Property name=\"function/@result.5\"/>"+"<Property name=\"function/@resultdata.5\"/>"+"<Property name=\"function/@dropText\"/>"+"<Property name=\"function/@type\"/>"+"</Properties>"+"<Constraints>"+"<Constraint Condition=\"FDS[@type='function']\"/>"+"<Constraint Condition=\"FDS[@type='operator']\"/>"+"<Constraint Condition=\"FDS[@type='literal']\"/>"+"<Constraint Condition=\"FDS[@context='CRX']\"/>"+"</Constraints>"+"</Functions>";
  1187. C_ModelCache.m_sMetadataChildren="<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"@DEPTH@\" start_atPath=\"@MODELPATH@\" no_collections=\"1\" _enumLabels=\"1\">"+"<Properties>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@isNamespace\"/>"+"<Property name=\"*/@screenTip\"/>"+"<Property name=\"*/@description\"/>"+"<Property name=\"*/@calcType\"/>"+"<Property name=\"*/@parentChild\"/>"+"<Property name=\"*/@_IntrinsicPropertiesOff\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"dimension/@type\"/>"+"<Property name=\"./queryItem\"/>"+"<Property name=\"queryItem/@datatype\"/>"+"<Property name=\"queryItem/@currency\"/>"+"<Property name=\"queryItem/@usage\"/>"+"<Property name=\"queryItem/@regularAggregate\"/>"+"<Property name=\"queryItem/@promptType\"/>"+"<Property name=\"queryItem/@promptFilterItemRef\"/>"+"<Property name=\"queryItem/@promptDisplayItemRef\"/>"+"<Property name=\"queryItem/@promptUseItemRef\"/>"+"<Property name=\"queryItem/@promptCascadeOnRef\"/>"+"<Property name=\"queryItem/@unSortable\"/>"+"<Property name=\"queryItem/@displayType\"/>"+"<Property name=\"./calculation\"/>"+"<Property name=\"calculation/@currency\"/>"+"<Property name=\"calculation/@usage\"/>"+"<Property name=\"calculation/@regularAggregate\"/>"+"<Property name=\"calculation/@promptType\"/>"+"<Property name=\"calculation/@promptFilterItemRef\"/>"+"<Property name=\"calculation/@promptDisplayItemRef\"/>"+"<Property name=\"calculation/@promptUseItemRef\"/>"+"<Property name=\"calculation/@promptCascadeOnRef\"/>"+"<Property name=\"calculation/@unSortable\"/>"+"<Property name=\"calculation/@displayType\"/>"+"<Property name=\"calculation/@calcType\"/>"+"<Property name=\"calculation/@hierarchies\"/>"+"<Property name=\"calculation/@dimensions\"/>"+"<Property name=\"./measure\"/>"+"<Property name=\"measure/@datatype\"/>"+"<Property name=\"measure/@currency\"/>"+"<Property name=\"measure/@isHierarchical\"/>"+"<Property name=\"measure/@regularAggregate\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./measureFolder\"/>"+"<Property name=\"./querySubject\"/>"+"<Property name=\"./queryItemFolder\"/>"+"<Property name=\"./filter\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./level\"/>"+"</Properties>"+"</Metadata>";
  1188. function C_ModelRootRequest(_e1,_e2){
  1189. this.m_oModelCache=_e1;
  1190. var _e3=C_ModelRootRequest.M_sRequest;
  1191. _e3=_e3.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1192. _e3=_e3.replace("@MODELPATH@","");
  1193. _e3=_e3.replace(/@AUTHORING_LOCALE@/g,this.m_oModelCache.F_GetModelLocale().F_XMLEncode());
  1194. _e3=_e3.replace("@DEPTH@","2");
  1195. this.F_ConstructBaseClass(_e2,_e3);
  1196. };
  1197. C_ModelRootRequest.F_Extends(C_MetadataRequest);
  1198. C_ModelRootRequest.prototype.F_ProcessResponse=function(){
  1199. C_ModelRootRequest.superClass.F_ProcessResponse.call(this);
  1200. this.m_aModelRootResponses=this.F_GetMetadataResponses();
  1201. if(this.m_aModelRootResponses){
  1202. var _e4=this.m_aModelRootResponses[C_ModelRootRequest.K_eResponse_MemberTreeMetadata];
  1203. if(_e4){
  1204. var d=_e4.ownerDocument;
  1205. var _e5=_e4.selectNodes(".//dimension");
  1206. var _e6=_e5.length;
  1207. this.m_oModelCache.m_bUpdatingCache=true;
  1208. for(var _e7=0;_e7<_e6;_e7++){
  1209. var _e8=_e5.item(_e7);
  1210. var _e9=_e8.getAttribute("_ref");
  1211. var nl=_e8.selectNodes(".//hierarchy[@multiRoot='0' and @rootCaption and @rootCaption!='' and @rootMUN and @rootMUN!='']");
  1212. var _ea=nl.length;
  1213. for(var i=0;i<_ea;i++){
  1214. var _eb=nl.item(i);
  1215. var _ec=_eb.getAttribute("rootCaption");
  1216. var _ed=_eb.getAttribute("rootMUN");
  1217. var _ee=_eb.appendChild(d.createElement("member"));
  1218. _ee.setAttribute("memberCaption",_ec);
  1219. _ee.setAttribute("memberUniqueName",_ed);
  1220. _ee.setAttribute("_path",_ed);
  1221. _ee.setAttribute("_ref",_ed);
  1222. _ee.setAttribute("dimensionUniqueName",_e9);
  1223. _ee.setAttribute("hierarchyUniqueName",_eb.getAttribute("_ref"));
  1224. var _ef=_eb.selectSingleNode("level");
  1225. if(_ef){
  1226. _ee.setAttribute("levelUniqueName",_ef.getAttribute("_ref"));
  1227. }
  1228. this.m_oModelCache.F_CacheMembersResponse(_eb,Number.POSITIVE_INFINITY);
  1229. }
  1230. }
  1231. this.m_oModelCache.m_bUpdatingCache=false;
  1232. this.m_oModelCache.f_flagMembersWithNoChildren();
  1233. }
  1234. }
  1235. this.m_oModelCache.F_CacheModelRootResponse(this.m_aModelRootResponses);
  1236. };
  1237. C_ModelRootRequest.prototype.F_GetModelRootResponses=function(){
  1238. return this.m_aModelRootResponses;
  1239. };
  1240. C_ModelRootRequest.m_sMemberTreeMetadata="<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"\" start_atPath=\"\" no_collections=\"1\" _enumLabels=\"1\">"+"<Properties>"+"<Property name=\"/@modelSearchPath\"/>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@isNamespace\"/>"+"<Property name=\"*/@screenTip\"/>"+"<Property name=\"*/@hierarchies\"/>"+"<Property name=\"*/@dimensions\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@usage\"/>"+"<Property name=\"*/@description\"/>"+"<Property name=\"./dataSource\"/>"+"<Property name=\"dataSource/@cubeDescription\"/>"+"<Property name=\"dataSource/@cubePath\"/>"+"<Property name=\"dataSource/@cubeCreatedOn\"/>"+"<Property name=\"dataSource/@cubeDataUpdatedOn\"/>"+"<Property name=\"dataSource/@cubeSchemaUpdatedOn\"/>"+"<Property name=\"dataSource/@cubeIsOptimized\"/>"+"<Property name=\"dataSource/@cubeDefaultMeasure\"/>"+"<Property name=\"dataSource/@cubeCurrentPeriod\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"dimension/@type\"/>"+"<Property name=\"dimension/@membersRollup\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"hierarchy/@parentChild\"/>"+"<Property name=\"hierarchy/@multiRoot\"/>"+"<Property name=\"hierarchy/@rootCaption\"/>"+"<Property name=\"hierarchy/@rootMUN\"/>"+"<Property name=\"./level\"/>"+"<Property name=\"./calculation\"/>"+"<Property name=\"calculation/@currency\"/>"+"<Property name=\"calculation/@usage\"/>"+"<Property name=\"calculation/@regularAggregate\"/>"+"<Property name=\"calculation/@promptType\"/>"+"<Property name=\"calculation/@promptFilterItemRef\"/>"+"<Property name=\"calculation/@promptDisplayItemRef\"/>"+"<Property name=\"calculation/@promptUseItemRef\"/>"+"<Property name=\"calculation/@promptCascadeOnRef\"/>"+"<Property name=\"calculation/@unSortable\"/>"+"<Property name=\"calculation/@displayType\"/>"+"<Property name=\"calculation/@calcType\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./package\"/>"+"<Property name=\"package/@isAccessToNullSuppressionOptionsAllowed\"/>"+"<Property name=\"package/@isMultiEdgeNullSuppressionAllowed\"/>"+"<Property name=\"package/@isNullSuppressionAllowed\"/>"+"</Properties>"+"</Metadata>";
  1241. C_ModelRootRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+C_ModelRootRequest.m_sMemberTreeMetadata+C_ModelCache.m_sOperations+C_ModelCache.m_sMetadataChildren+C_ModelCache.m_sQueryFunctions+C_ModelCache.m_sReportFunctions+"</metadataRequest>";
  1242. C_ModelRootRequest.K_eResponse_MemberTreeMetadata=0;
  1243. C_ModelRootRequest.K_eResponse_Operations=1;
  1244. C_ModelRootRequest.K_eResponse_MetadataRoot=2;
  1245. C_ModelRootRequest.K_eResponse_QueryFunctions=3;
  1246. C_ModelRootRequest.K_eResponse_ReportFunctions=4;
  1247. function C_MembersRequest(_f0,_f1,_f2,_f3){
  1248. this.m_oModelCache=_f0;
  1249. if(!_f3){
  1250. alert("C_MembersRequest requires a max members parameter");
  1251. return;
  1252. }
  1253. this.m_iMaxMembers=_f3;
  1254. this.m_nMembersRoot=null;
  1255. var _f4=C_MembersRequest.M_sRequest.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1256. _f4=_f4.replace(/@MODELPATH@/g,_f2.replace(/\$/g,"$$$$").F_XMLEncode());
  1257. _f4=_f4.replace("@AUTHORING_LOCALE@",this.m_oModelCache.F_GetModelLocale().F_XMLEncode());
  1258. _f4=_f4.replace("@RESULTCOUNT@",this.m_iMaxMembers);
  1259. this.F_ConstructBaseClass(_f1,_f4);
  1260. };
  1261. C_MembersRequest.F_Extends(C_MetadataRequest);
  1262. C_MembersRequest.prototype.F_ProcessResponse=function(){
  1263. C_MembersRequest.superClass.F_ProcessResponse.call(this);
  1264. var _f5=this.F_GetMetadataResponse();
  1265. if(_f5){
  1266. var _f6=_f5.selectSingleNode("member | level | hierarchy | dimension");
  1267. if(_f6){
  1268. this.m_nMembersRoot=this.m_oModelCache.F_CacheMembersResponse(_f6,this.m_iMaxMembers);
  1269. }
  1270. }
  1271. };
  1272. C_MembersRequest.prototype.F_GetMembersResponse=function(){
  1273. return this.m_nMembersRoot;
  1274. };
  1275. C_MembersRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+"<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"2\" start_atRef=\"@MODELPATH@\" ResultStart=\"0\" ResultCount=\"@RESULTCOUNT@\">"+"<Properties>"+"<Property name=\"./@_RootMembers\"/>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@dimensionUniqueName\"/>"+"<Property name=\"*/@hierarchyUniqueName\"/>"+"<Property name=\"*/@levelUniqueName\"/>"+"<Property name=\"*/@memberUniqueName\"/>"+"<Property name=\"*/@memberCaption\"/>"+"<Property name=\"*/@levelNumber\"/>"+"<Property name=\"*/@levelLabel\"/>"+"<Property name=\"*/@parentUniqueName\"/>"+"<Property name=\"*/@currencyCode\"/>"+"<Property name=\"*/@_IntrinsicPropertiesOff\"/>"+"<Property name=\"*/@parentChild\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./level\"/>"+"<Property name=\"./member\"/>"+"</Properties>"+"</Metadata>"+"</metadataRequest>";
  1276. function C_ChildrenMetadataRequest(_f7,_f8,_f9){
  1277. this.m_oModelCache=_f7;
  1278. this.m_nChildrenResponse=null;
  1279. var _fa=C_ChildrenMetadataRequest.M_sRequest;
  1280. _fa=_fa.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1281. _fa=_fa.replace(/@MODELPATH@/g,_f9.replace(/\$/g,"$$$$").F_XMLEncode());
  1282. _fa=_fa.replace("@AUTHORING_LOCALE@",this.m_oModelCache.F_GetModelLocale().F_XMLEncode());
  1283. _fa=_fa.replace("@DEPTH@","2");
  1284. this.F_ConstructBaseClass(_f8,_fa);
  1285. };
  1286. C_ChildrenMetadataRequest.F_Extends(C_MetadataRequest);
  1287. C_ChildrenMetadataRequest.prototype.F_ProcessResponse=function(){
  1288. C_ChildrenMetadataRequest.superClass.F_ProcessResponse.call(this);
  1289. var _fb=this.F_GetMetadataResponse();
  1290. if(_fb){
  1291. this.m_nChildrenResponse=this.m_oModelCache.F_CacheChildrenResponse(_fb);
  1292. }
  1293. };
  1294. C_ChildrenMetadataRequest.prototype.F_GetChildrenResponse=function(){
  1295. return this.m_nChildrenResponse;
  1296. };
  1297. function C_AllChildrenMetadataRequest(_fc,_fd,_fe){
  1298. this.m_oModelCache=_fc;
  1299. this.m_nChildrenResponse=null;
  1300. var _ff=C_ChildrenMetadataRequest.M_sRequest;
  1301. _ff=_ff.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1302. _ff=_ff.replace(/@MODELPATH@/g,_fe.replace(/\$/g,"$$$$").F_XMLEncode());
  1303. _ff=_ff.replace("@AUTHORING_LOCALE@",this.m_oModelCache.F_GetModelLocale().F_XMLEncode());
  1304. _ff=_ff.replace("@DEPTH@","");
  1305. this.F_ConstructBaseClass(_fd,_ff);
  1306. };
  1307. C_AllChildrenMetadataRequest.F_Extends(C_MetadataRequest);
  1308. C_AllChildrenMetadataRequest.prototype.F_ProcessResponse=function(){
  1309. C_AllChildrenMetadataRequest.superClass.F_ProcessResponse.call(this);
  1310. this.m_nChildrenResponse=this.F_GetMetadataResponse();
  1311. };
  1312. C_AllChildrenMetadataRequest.prototype.F_GetChildrenResponse=function(){
  1313. return this.m_nChildrenResponse;
  1314. };
  1315. C_ChildrenMetadataRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+C_ModelCache.m_sMetadataChildren+"</metadataRequest>";
  1316. function C_LevelMetadataRequest(_100,_101,_102){
  1317. this.m_oModelCache=_100;
  1318. this.m_nChildrenResponse=null;
  1319. var _103=C_LevelMetadataRequest.M_sRequest;
  1320. _103=_103.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1321. _103=_103.replace(/@MODELPATH@/g,_102.replace(/\$/g,"$$$$").F_XMLEncode());
  1322. _103=_103.replace("@AUTHORING_LOCALE@",this.m_oModelCache.F_GetModelLocale().F_XMLEncode());
  1323. this.F_ConstructBaseClass(_101,_103);
  1324. };
  1325. C_LevelMetadataRequest.F_Extends(C_MetadataRequest);
  1326. C_LevelMetadataRequest.prototype.F_ProcessResponse=function(){
  1327. C_LevelMetadataRequest.superClass.F_ProcessResponse.call(this);
  1328. var _104=this.F_GetMetadataResponse();
  1329. if(_104){
  1330. this.m_nChildrenResponse=this.m_oModelCache.F_CacheChildrenResponse(_104);
  1331. }
  1332. };
  1333. C_LevelMetadataRequest.prototype.F_GetChildrenResponse=function(){
  1334. return this.m_nChildrenResponse;
  1335. };
  1336. C_LevelMetadataRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+"<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"2\" start_atPath=\"@MODELPATH@\" no_collections=\"1\" _enumLabels=\"1\">"+"<Properties>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@isNamespace\"/>"+"<Property name=\"*/@screenTip\"/>"+"<Property name=\"*/@description\"/>"+"<Property name=\"*/@calcType\"/>"+"<Property name=\"*/@parentChild\"/>"+"<Property name=\"*/@_IntrinsicPropertiesOff\"/>"+"<Property name=\"./queryItem\"/>"+"<Property name=\"queryItem/@datatype\"/>"+"<Property name=\"queryItem/@currency\"/>"+"<Property name=\"queryItem/@usage\"/>"+"<Property name=\"queryItem/@regularAggregate\"/>"+"<Property name=\"queryItem/@promptType\"/>"+"<Property name=\"queryItem/@promptFilterItemRef\"/>"+"<Property name=\"queryItem/@promptDisplayItemRef\"/>"+"<Property name=\"queryItem/@promptUseItemRef\"/>"+"<Property name=\"queryItem/@promptCascadeOnRef\"/>"+"<Property name=\"queryItem/@unSortable\"/>"+"<Property name=\"queryItem/@displayType\"/>"+"<Property name=\"./calculation\"/>"+"<Property name=\"calculation/@currency\"/>"+"<Property name=\"calculation/@usage\"/>"+"<Property name=\"calculation/@regularAggregate\"/>"+"<Property name=\"calculation/@promptType\"/>"+"<Property name=\"calculation/@promptFilterItemRef\"/>"+"<Property name=\"calculation/@promptDisplayItemRef\"/>"+"<Property name=\"calculation/@promptUseItemRef\"/>"+"<Property name=\"calculation/@promptCascadeOnRef\"/>"+"<Property name=\"calculation/@unSortable\"/>"+"<Property name=\"calculation/@displayType\"/>"+"<Property name=\"calculation/@calcType\"/>"+"<Property name=\"./measure\"/>"+"<Property name=\"measure/@isHierarchical\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"dimension/@type\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./measureFolder\"/>"+"<Property name=\"./querySubject\"/>"+"<Property name=\"./queryItemFolder\"/>"+"<Property name=\"./filter\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./level\"/>"+"</Properties>"+"</Metadata>"+"</metadataRequest>";
  1337. function C_MembersSearchRequest(_105,_106,_107,_108,_109,_10a){
  1338. this.m_oModelCache=_105;
  1339. if(!_108){
  1340. alert("C_MembersSearchRequest requires a max members parameter");
  1341. return;
  1342. }
  1343. this.m_iMaxMembers=_108;
  1344. this.m_bDescendants=Boolean(_109);
  1345. this.m_sConstraints=_10a;
  1346. var _10b=C_MembersSearchRequest.M_sRequest.replace(/@MODEL@/g,_105.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1347. _10b=_10b.replace(/@MODELPATH@/g,_107.replace(/\$/g,"$$$$").F_XMLEncode());
  1348. _10b=_10b.replace("@AUTHORING_LOCALE@",_105.F_GetModelLocale().F_XMLEncode());
  1349. _10b=_10b.replace("@RESULTCOUNT@",this.m_iMaxMembers);
  1350. _10b=_10b.replace("@CONSTRAINTS@",_10a?_10a:"");
  1351. _10b=_10b.replace("@DEPTH@",_109?"":"2");
  1352. if(_109){
  1353. _10b=_10b.replace("<Property name=\"./@_RootMembers\"/>","");
  1354. }
  1355. this.m_nSearchResponse=null;
  1356. this.F_ConstructBaseClass(_106,_10b);
  1357. };
  1358. C_MembersSearchRequest.F_Extends(C_MetadataRequest);
  1359. C_MembersSearchRequest.prototype.F_ProcessResponse=function(){
  1360. C_MembersSearchRequest.superClass.F_ProcessResponse.call(this);
  1361. var _10c=this.F_GetMetadataResponse();
  1362. if(_10c){
  1363. var _10d=_10c.selectSingleNode("member | level | hierarchy | dimension");
  1364. if(_10d){
  1365. this.m_nSearchResponse=this.m_oModelCache.F_CacheSearchMembersResponse(_10d,this.m_iMaxMembers,this.m_bDescendants,this.m_sConstraints);
  1366. }
  1367. }
  1368. };
  1369. C_MembersSearchRequest.prototype.F_GetSearchResponse=function(){
  1370. return this.m_nSearchResponse;
  1371. };
  1372. C_MembersSearchRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+"<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"@DEPTH@\" start_atPath=\"@MODELPATH@\" ResultStart=\"0\" ResultCount=\"@RESULTCOUNT@\">"+"<Properties>"+"<Property name=\"./@_RootMembers\"/>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@dimensionUniqueName\"/>"+"<Property name=\"*/@hierarchyUniqueName\"/>"+"<Property name=\"*/@levelUniqueName\"/>"+"<Property name=\"*/@memberUniqueName\"/>"+"<Property name=\"*/@memberCaption\"/>"+"<Property name=\"*/@levelNumber\"/>"+"<Property name=\"*/@levelLabel\"/>"+"<Property name=\"*/@parentUniqueName\"/>"+"<Property name=\"*/@currencyCode\"/>"+"<Property name=\"*/@_IntrinsicPropertiesOff\"/>"+"<Property name=\"*/@parentChild\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./level\"/>"+"<Property name=\"./member\"/>"+"</Properties>"+"@CONSTRAINTS@"+"</Metadata>"+"</metadataRequest>";
  1373. function C_MeasuresSearchRequest(_10e,_10f,_110,_111,_112,_113){
  1374. if(!_111){
  1375. alert("C_MembersSearchRequest requires a max members parameter");
  1376. return;
  1377. }
  1378. this.m_bDescendants=Boolean(_112);
  1379. var _114=C_MeasuresSearchRequest.M_sRequest.replace(/@MODEL@/g,_10e.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1380. _114=_114.replace(/@MODELPATH@/g,_110.replace(/\$/g,"$$$$").F_XMLEncode());
  1381. _114=_114.replace("@AUTHORING_LOCALE@",_10e.F_GetModelLocale().F_XMLEncode());
  1382. _114=_114.replace("@RESULTCOUNT@",this.m_iMaxMeasures);
  1383. _114=_114.replace("@CONSTRAINTS@",_113?_113:"");
  1384. _114=_114.replace("@DEPTH@",_112?"":"2");
  1385. this.F_ConstructBaseClass(_10f,_114);
  1386. };
  1387. C_MeasuresSearchRequest.F_Extends(C_MetadataRequest);
  1388. C_MeasuresSearchRequest.prototype.F_ProcessResponse=function(){
  1389. C_MeasuresSearchRequest.superClass.F_ProcessResponse.call(this);
  1390. this.m_nSearchResponse=null;
  1391. var _115=this.F_GetMetadataResponse();
  1392. if(_115){
  1393. this.m_nSearchResponse=_115.cloneNode(false);
  1394. var _116=_115.selectSingleNode("dimension");
  1395. if(_116){
  1396. var _117=this.m_nSearchResponse.appendChild(_116.cloneNode(false));
  1397. var _118=_115.selectNodes(".//measure");
  1398. for(var i=0;i<_118.length;i++){
  1399. _117.appendChild(_118.item(i).cloneNode(false));
  1400. }
  1401. }
  1402. }
  1403. };
  1404. C_MeasuresSearchRequest.prototype.F_GetSearchResponse=function(){
  1405. return this.m_nSearchResponse;
  1406. };
  1407. C_MeasuresSearchRequest.M_sRequest="<metadataRequest connection=\"@MODEL@\">"+"<Metadata authoringLocale=\"@AUTHORING_LOCALE@\" xml:lang=\"\" Depth=\"@DEPTH@\" start_atPath=\"@MODELPATH@\" no_collections=\"1\" _enumLabels=\"1\">"+"<Properties>"+"<Property name=\"*/@name\"/>"+"<Property name=\"*/@_path\"/>"+"<Property name=\"*/@_ref\"/>"+"<Property name=\"*/@isNamespace\"/>"+"<Property name=\"*/@screenTip\"/>"+"<Property name=\"*/@description\"/>"+"<Property name=\"*/@parentChild\"/>"+"<Property name=\"*/@_IntrinsicPropertiesOff\"/>"+"<Property name=\"./dimension\"/>"+"<Property name=\"dimension/@type\"/>"+"<Property name=\"./queryItem\"/>"+"<Property name=\"queryItem/@datatype\"/>"+"<Property name=\"queryItem/@currency\"/>"+"<Property name=\"queryItem/@usage\"/>"+"<Property name=\"queryItem/@regularAggregate\"/>"+"<Property name=\"queryItem/@promptType\"/>"+"<Property name=\"queryItem/@promptFilterItemRef\"/>"+"<Property name=\"queryItem/@promptDisplayItemRef\"/>"+"<Property name=\"queryItem/@promptUseItemRef\"/>"+"<Property name=\"queryItem/@promptCascadeOnRef\"/>"+"<Property name=\"queryItem/@unSortable\"/>"+"<Property name=\"queryItem/@displayType\"/>"+"<Property name=\"./calculation\"/>"+"<Property name=\"calculation/@currency\"/>"+"<Property name=\"calculation/@usage\"/>"+"<Property name=\"calculation/@regularAggregate\"/>"+"<Property name=\"calculation/@promptType\"/>"+"<Property name=\"calculation/@promptFilterItemRef\"/>"+"<Property name=\"calculation/@promptDisplayItemRef\"/>"+"<Property name=\"calculation/@promptUseItemRef\"/>"+"<Property name=\"calculation/@promptCascadeOnRef\"/>"+"<Property name=\"calculation/@unSortable\"/>"+"<Property name=\"calculation/@displayType\"/>"+"<Property name=\"calculation/@calcType\"/>"+"<Property name=\"./measure\"/>"+"<Property name=\"measure/@isHierarchical\"/>"+"<Property name=\"measure/@datatype\"/>"+"<Property name=\"measure/@currency\"/>"+"<Property name=\"measure/@regularAggregate\"/>"+"<Property name=\"./folder\"/>"+"<Property name=\"./measureFolder\"/>"+"<Property name=\"./querySubject\"/>"+"<Property name=\"./queryItemFolder\"/>"+"<Property name=\"./filter\"/>"+"<Property name=\"./hierarchy\"/>"+"<Property name=\"./hierarchyFolder\"/>"+"<Property name=\"./level\"/>"+"</Properties>"+"@CONSTRAINTS@"+"</Metadata>"+"</metadataRequest>";
  1408. C_ModelCache.prototype.F_GetAncestorInfo=function(_119,_11a){
  1409. return this.m_oAncestorInfoCache[_119+" "+_11a];
  1410. };
  1411. C_ModelCache.prototype.f_cacheAncestorInfo=function(_11b,_11c,_11d,_11e){
  1412. var _11f={};
  1413. _11f.M_sMUN=_11d;
  1414. _11f.M_sMemberCaption=_11e;
  1415. this.m_oAncestorInfoCache[_11b+" "+_11c]=_11f;
  1416. return _11f;
  1417. };
  1418. function C_MemberAncestorRequest(_120,_121,_122,_123){
  1419. this.m_oModelCache=_120;
  1420. this.m_sMUN=_122;
  1421. this.m_iDistance=_123;
  1422. var _124=_122;
  1423. for(var i=0;i<_123;++i){
  1424. _124="parent("+_124+")";
  1425. }
  1426. var _125=G_ResManager.F_GetResource("CCHL_ReportAncestor").text;
  1427. _125=_125.replace("@XMLNS@",G_ReportSpec.F_GetServerSupportedReportSpecNamespace());
  1428. _125=_125.replace(/@MODEL@/g,this.m_oModelCache.F_GetModelPath().replace(/\$/g,"$$$$").F_XMLEncode());
  1429. _125=_125.replace("@ANCESTOREXPR@",_124.F_XMLEncode());
  1430. this.F_ConstructBaseClass(_121,_125,null,"XML");
  1431. };
  1432. C_MemberAncestorRequest.F_Extends(C_RunReportRequest);
  1433. C_MemberAncestorRequest.prototype.F_ProcessResponse=function(){
  1434. C_MemberAncestorRequest.superClass.F_ProcessResponse.call(this);
  1435. var _126=this.F_GetReportOutput();
  1436. if(_126){
  1437. var d=U_XML.F_LoadString(null,_126);
  1438. if(!d){
  1439. this.F_SetNewErrorRes("IDS_CCHL_BAD_ANCESTOR_RESPONSE",_126);
  1440. return;
  1441. }
  1442. d.setProperty("SelectionNamespaces","xmlns:xx='http://developer.cognos.com/schemas/xmldata/1/'");
  1443. var nl=d.documentElement.selectNodes(".//xx:value");
  1444. if(nl.length==2){
  1445. this.m_oAncestorInfo=this.m_oModelCache.f_cacheAncestorInfo(this.m_sMUN,this.m_iDistance,nl.item(0).text,nl.item(1).text);
  1446. }else{
  1447. this.m_oAncestorInfo=this.m_oModelCache.f_cacheAncestorInfo(this.m_sMUN,this.m_iDistance,null,null);
  1448. }
  1449. }
  1450. };
  1451. C_MemberAncestorRequest.prototype.F_GetAncestorInfo=function(){
  1452. return this.m_oAncestorInfo;
  1453. };
  1454. var D_ManagePersonalData={};
  1455. D_ManagePersonalData.F_Show=function(_127,_128,_129){
  1456. this.m_oExternalListener=_129;
  1457. this.m_sModelPath=_128;
  1458. this.m_iMaxExtFiles=0;
  1459. var _12a=G_ResManager.F_GetString("IDS_TITLE_MANAGE_PERSONALDATA");
  1460. this.M_fnSuper_Show(_127,this,_12a);
  1461. };
  1462. D_ManagePersonalData.F_Dialog_OnBeforeVisible=function(){
  1463. this.m_oAvailable=new C_ListView(this.F_GetDlgItem("divAvailable"),G_ResManager.F_GetResource("EmptyMultiSelectList"),this);
  1464. this.m_oToolbar=new C_Toolbar(this.F_GetDlgItem("divToolbar"),this.F_GetResource("ToolbarManagePersonalData"),this);
  1465. this.m_oAvailable.F_SelectByIndex(0);
  1466. this.f_setButtonState();
  1467. this.m_bPackageNameChanged=false;
  1468. };
  1469. D_ManagePersonalData.F_Dialog_OnAfterVisible=function(){
  1470. this.f_getPersonalData();
  1471. };
  1472. D_ManagePersonalData.F_Request_OnComplete=function(_12b){
  1473. if(this.pdWorkingDialog){
  1474. this.pdWorkingDialog.hide();
  1475. }
  1476. var _12c=_12b.F_GetError();
  1477. if(_12c){
  1478. pd.messageBox(pd.statics.MB_ERROR,PDMSG.ERR.IDS_ERR_PACKAGE_PUBLISH,_12c.m_sErrorCode+" "+_12c.m_sErrorSummary,_12c.m_sErrorDetails?_12c.m_sErrorDetails:null);
  1479. return;
  1480. }
  1481. if(_12b.constructor==C_PersonalDataRequest||_12b.constructor==C_PersonalDataSyncRequest){
  1482. var _12d=_12b.F_GetResponseXMLString();
  1483. this.m_oOuputXML=_12b.F_GetResponseXML();
  1484. switch(_12b.F_GetRequestType()){
  1485. case "getPersonalData":
  1486. if(_12c){
  1487. this.m_docInputXML=U_XML.F_LoadString(null,"<input><pdCollection><baseModelSearchPath>"+this.m_sModelPath+"</baseModelSearchPath></pdCollection></input>");
  1488. }else{
  1489. G_Debug.F_Print("getPersonalData response = "+_12d);
  1490. var _12e=_12d.replace(/<output>/g,"<addPersonalData><input>").replace(/<\/output>/g,"</input></addPersonalData>").replace(/<targetPackageSearchPath>/g,"<baseModelSearchPath>").replace(/<\/targetPackageSearchPath>/g,"</baseModelSearchPath>");
  1491. this.m_docInputXML=U_XML.F_LoadString(null,_12e);
  1492. var _12f=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/baseModelSearchPath").item(0);
  1493. if(_12f.text==""){
  1494. _12f.text=this.m_sModelPath;
  1495. }
  1496. var _130=_12f.text;
  1497. var i=_130.lastIndexOf("/model");
  1498. var _131=(i>=0)?_130.substr(0,i):_130;
  1499. var _132=_131+"/model[last()]";
  1500. _12f.text=_132;
  1501. this.f_getGovernorSettings();
  1502. var _133=this.f_populateAvailable();
  1503. this.f_setButtonState();
  1504. if(_133==0&&(this.m_nMaxExtFiles>0)){
  1505. this.m_bEditingPublishedPackage=false;
  1506. this.m_sBasePackageName=G_Model.F_GetPackageName();
  1507. D_AddPersonalWizard.F_Show(this,this.m_bEditingPublishedPackage,this.m_sModelPath);
  1508. }else{
  1509. this.m_bEditingPublishedPackage=true;
  1510. this.m_sBasePackageName=this.f_extractPackageNameFromXPath(this.m_docInputXML.selectSingleNode("/addPersonalData/input/pdCollection/baseModelSearchPath"));
  1511. }
  1512. if(this.m_bEditingPublishedPackage){
  1513. this.m_sTargetPath=G_Model.F_GetPackagePath().replace("/package[@name='"+G_Model.F_GetPackageName()+"']","");
  1514. this.m_sTargetName=G_Model.F_GetPackageName();
  1515. }else{
  1516. this.m_sTargetPath="~/folder";
  1517. this.m_sTargetName=G_Model.F_GetPackageName()+G_ResManager.F_GetString("IDS_EXTERNAL_DATA_FILE_ADDITION");
  1518. }
  1519. this.f_updatePackageName();
  1520. }
  1521. break;
  1522. case "addPersonalData":
  1523. this.F_Hide();
  1524. var _134=this.m_oOuputXML.selectNodes("/output/personalPackagePath").item(0);
  1525. G_App.F_ResetModel(_134.text,this.f_displayExternalDataAvailableMessage.F_CreateMethodCallback(this));
  1526. break;
  1527. case "addLOBData":
  1528. location.href=g_pd_backURL;
  1529. break;
  1530. }
  1531. }else{
  1532. if(_12b.constructor==C_FolderContentsRequest){
  1533. var _135=_12b.F_GetResponse();
  1534. this.f_checkPackageNameBeforePublishing(_135);
  1535. }
  1536. }
  1537. };
  1538. D_ManagePersonalData.f_extractPackageNameFromXPath=function(_136){
  1539. var _137="";
  1540. if(_136){
  1541. var _138=_136.text.lastIndexOf("package[@name='");
  1542. _137=_136.text.substring(_138+15);
  1543. var _139=_137.indexOf("']");
  1544. _137=_137.substring(0,_139);
  1545. }
  1546. return _137;
  1547. };
  1548. D_ManagePersonalData.f_displayExternalDataAvailableMessage=function(){
  1549. G_Toolbox.F_DisplayMessagePopup("manage_external_data.gif",null,"IDS_TOOLTIP_MANAGE_EXTERNAL_DATA",null,"IDS_TOOLTIPDESC_EXTERNAL_DATA_READY");
  1550. };
  1551. D_ManagePersonalData.F_Dialog_OnAfterHide=function(){
  1552. this.m_oAvailable.F_Detach();
  1553. this.m_oToolbar.F_Detach();
  1554. delete this.m_oToolbar;
  1555. delete this.m_oAvailable;
  1556. delete this.m_aAllowedExisting;
  1557. };
  1558. D_ManagePersonalData.F_OnOK=function(){
  1559. if(this.m_bPackageNameChanged||!this.m_bEditingPublishedPackage){
  1560. G_Debug.F_Print("Package name needs to be checked for uniqueness");
  1561. this.f_checkPackageNameOnOK();
  1562. return;
  1563. }else{
  1564. G_Debug.F_Print("Package just edited");
  1565. this.f_performOnOK();
  1566. }
  1567. };
  1568. D_ManagePersonalData.f_performOnOK=function(){
  1569. if(G_Model.F_IsMultiDimensionalSource()){
  1570. var fn=D_ManagePersonalData.f_publishPackage.F_CreateMethodCallback(this);
  1571. var _13a=this.m_sTargetName?this.m_sTargetName:"";
  1572. var _13b=this.f_getSafeExternalFileName();
  1573. var _13c=this.f_getSafeReportName();
  1574. var _13d=this.m_sBasePackageName?this.m_sBasePackageName:"";
  1575. var _13e=G_ResManager.F_GetString("IDS_MSG_OLAPEXTDATA_WARNING",_13a,_13b,_13c,_13d);
  1576. D_MsgBox.F_Show(null,_13e,null,D_MsgBox.K_iWarning,D_MsgBox.K_iOKOnly,fn,null,null,"dlgPackagesPersonalData");
  1577. return;
  1578. }else{
  1579. if(this.F_hasReportData()){
  1580. var fn=D_ManagePersonalData.f_publishPackage.F_CreateMethodCallback(this);
  1581. var _13a=this.m_sTargetName?this.m_sTargetName:"";
  1582. var _13b=this.f_getSafeExternalFileName();
  1583. var _13c=this.f_getSafeReportName();
  1584. var _13d=this.m_sBasePackageName?this.m_sBasePackageName:"";
  1585. var _13e=G_ResManager.F_GetString("IDS_MSG_REPORTEXTDATA_WARNING",_13a,_13b,_13c,_13d);
  1586. D_MsgBox.F_Show(null,_13e,null,D_MsgBox.K_iWarning,D_MsgBox.K_iOKOnly,fn,null,null,"dlgPackagesPersonalData");
  1587. return;
  1588. }
  1589. }
  1590. if(this.m_docInputXML){
  1591. this.f_publishPackage();
  1592. return;
  1593. }
  1594. this.M_fnSuper_OnOK();
  1595. };
  1596. D_ManagePersonalData.f_checkPackageNameOnOK=function(){
  1597. var _13f=new C_FolderContentsRequest(this,this.m_sTargetPath);
  1598. _13f.F_Send();
  1599. };
  1600. D_ManagePersonalData.f_checkPackageNameBeforePublishing=function(_140){
  1601. var _141=[];
  1602. var _142=G_ContentManager.F_ProcessCmResponse(_140);
  1603. if(_142){
  1604. var nl=_142.selectNodes("item");
  1605. var _143=nl.length;
  1606. for(var i=0;i<_143;i++){
  1607. var _144=nl.item(i);
  1608. var _145=_144.selectSingleNode("defaultName/value").text;
  1609. _141.push(_145.toLowerCase());
  1610. }
  1611. }
  1612. if(_141.indexOf(this.m_sTargetName.toLowerCase())!=-1){
  1613. D_ManagePersonalData.pd_packageOverwriteConfirm();
  1614. }else{
  1615. this.f_publishPackage();
  1616. }
  1617. };
  1618. D_ManagePersonalData.f_getSafeExternalFileName=function(){
  1619. var _146="";
  1620. var _147=this.m_docInputXML.selectSingleNode("/addPersonalData/input/pdCollection/pdSpec/dataSet/sourcePath");
  1621. if(_147){
  1622. _146=_147.text;
  1623. }
  1624. return _146;
  1625. };
  1626. D_ManagePersonalData.f_getSafeReportName=function(){
  1627. var _148=G_ResManager.F_GetString("IDS_MSG_EXTDATA_NO_REPORT_PARAM");
  1628. var _149=this.m_docInputXML.selectSingleNode("/addPersonalData/input/pdCollection/pdSpec/reportExtract/reportSubject/@name");
  1629. if(_149){
  1630. _148=_149.value;
  1631. }
  1632. return _148;
  1633. };
  1634. D_ManagePersonalData.F_hasReportData=function(){
  1635. return Boolean(this.m_docInputXML&&this.m_docInputXML.selectSingleNode("//reportExtract"));
  1636. };
  1637. D_ManagePersonalData.f_publishPackage=function(_14a){
  1638. this.pdWorkingDialog=pd.workingDialog(PDMSG.IPT.IDS_IPT_CREATING_PACKAGE);
  1639. var _14a=_14a||"addLOBData";
  1640. var _14b=this.m_docInputXML.selectSingleNode("/"+_14a+"/input/pdCollection/targetPath");
  1641. if(!_14b){
  1642. var _14c=this.m_docInputXML.selectSingleNode("/"+_14a+"/input/pdCollection");
  1643. _14b=U_XML.F_AppendChild(_14c,"targetPath");
  1644. }
  1645. _14b.text=this.m_sTargetPath;
  1646. var _14d=this.m_docInputXML.selectSingleNode("/"+_14a+"/input/pdCollection/targetName");
  1647. if(!_14d){
  1648. var _14c=this.m_docInputXML.selectSingleNode("/"+_14a+"/input/pdCollection");
  1649. _14d=U_XML.F_AppendChild(_14c,"targetName");
  1650. }
  1651. _14d.text=this.m_sTargetName;
  1652. G_Debug.F_Print("publish request XML = "+U_XML.F_SerializeNode(this.m_docInputXML.documentElement));
  1653. var _14e=new C_PersonalDataRequest(this,U_XML.F_SerializeNode(this.m_docInputXML.documentElement),_14a);
  1654. C_BusRequest.F_ReleaseAllTracking();
  1655. _14e.F_Send();
  1656. };
  1657. D_ManagePersonalData.F_OnCancel=function(){
  1658. this.M_fnSuper_OnCancel();
  1659. };
  1660. D_ManagePersonalData.F_ListView_OnItemClick=function(_14f,_150,_151){
  1661. this.f_setButtonState();
  1662. };
  1663. D_ManagePersonalData.F_OnDeleteClick=function(){
  1664. var _152=this.F_GetPersonalDataItemName();
  1665. var _153=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec/personalData");
  1666. if(_153){
  1667. for(var i=0;i<_153.length;i++){
  1668. var _154=_153.item(i).getAttribute("name").F_XMLDecode();
  1669. if(_152==_154){
  1670. var _155=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec").item(i);
  1671. _155.parentNode.removeChild(_155);
  1672. break;
  1673. }
  1674. }
  1675. }
  1676. this.f_populateAvailable();
  1677. this.f_setButtonState();
  1678. };
  1679. D_ManagePersonalData.F_OnAddPersonalData=function(){
  1680. D_AddPersonalWizard.F_Show(this,this.m_bEditingPublishedPackage,this.m_sModelPath);
  1681. };
  1682. D_ManagePersonalData.F_OnEditClick=function(){
  1683. this.f_modifyPersonalData(this.m_oAvailable.F_GetSelectedListItem().getAttribute("label"));
  1684. };
  1685. D_ManagePersonalData.F_Dialog_OnCommit=function(_156){
  1686. if(_156==this){
  1687. if(this.m_oExternalListener){
  1688. this.m_oExternalListener.F_Dialog_OnCommit(this);
  1689. }
  1690. }else{
  1691. if(_156==D_ContentManager){
  1692. if(this.m_sTargetPath!=D_ContentManager.F_GetSaveDirectory()){
  1693. this.m_sTargetPath=D_ContentManager.F_GetSaveDirectory();
  1694. this.m_bPackageNameChanged=true;
  1695. }
  1696. if(this.m_sTargetName!=D_ContentManager.F_GetSaveFileName()){
  1697. this.m_sTargetName=D_ContentManager.F_GetSaveFileName();
  1698. this.m_bPackageNameChanged=true;
  1699. }
  1700. this.f_updatePackageName();
  1701. G_Debug.F_Print("Package chosen: path '"+this.m_sTargetPath+"', name '"+this.m_sTargetName+"'");
  1702. }else{
  1703. this.f_populateAvailable();
  1704. this.f_setButtonState();
  1705. }
  1706. }
  1707. };
  1708. D_ManagePersonalData.F_GetPersonalDataItemName=function(){
  1709. return this.m_oAvailable.F_GetSelectedListItem().getAttribute("label");
  1710. };
  1711. D_ManagePersonalData.F_OnKeyDown=function(e){
  1712. e=e||window.event;
  1713. if(e.keyCode==U_DOM.K_iKeyDelete&&this.m_oAvailable.F_GetSelectedListItems().length>0){
  1714. this.F_OnDeleteClick();
  1715. }
  1716. this.M_fnSuper_OnKeyDown(e);
  1717. };
  1718. D_ManagePersonalData.f_updatePackageName=function(){
  1719. this.F_GetDlgItem("txtPackageName").value=this.m_sTargetName;
  1720. };
  1721. D_ManagePersonalData.f_pickPackagePath=function(){
  1722. var _157={"package":true,"folder":true};
  1723. D_ContentManager.F_ShowSave(this,_157,this.m_sTargetPath,this.m_sTargetName);
  1724. };
  1725. D_ManagePersonalData.f_setButtonState=function(){
  1726. var _158=0;
  1727. if(this.m_docInputXML){
  1728. var _159=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec/personalData");
  1729. if(_159){
  1730. _158=_159.length;
  1731. }
  1732. }
  1733. this.m_oToolbar.F_SetButtonEnabled("btnManagePersonalDataAdd",_158<this.m_nMaxExtFiles);
  1734. var _15a=this.m_oAvailable.F_GetSelectedListItems();
  1735. this.m_oToolbar.F_SetButtonEnabled("btnManagePersonalDataDelete",_15a.length>0);
  1736. this.m_oToolbar.F_SetButtonEnabled("btnManagePersonalDataEdit",_15a.length==1);
  1737. };
  1738. D_ManagePersonalData.f_getPersonalData=function(){
  1739. var _15b="<getPersonalData><input><modelSearchPath>"+this.m_sModelPath.F_XMLEncode()+"</modelSearchPath></input></getPersonalData>";
  1740. var _15c=new C_PersonalDataSyncRequest(this,_15b,"getPersonalData");
  1741. D_Progress.F_SendRequest(_15c,this.F_GetDialogWindow(),G_ResManager.F_GetString("IDS_MSG_GET_EXTERNAL_DATA"));
  1742. };
  1743. D_ManagePersonalData.f_addPersonalData=function(_15d,_15e){
  1744. this.m_oPDSpecsXML=_15d;
  1745. var _15f=_15d.selectNodes("/pdSpec").item(0);
  1746. if(_15e){
  1747. var _160=this.F_GetPersonalDataItemName();
  1748. var _161=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec/personalData");
  1749. if(_161){
  1750. for(var i=0;i<_161.length;i++){
  1751. var _162=_161.item(i).getAttribute("name").F_XMLDecode();
  1752. if(_160==_162){
  1753. var _163=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec").item(i);
  1754. _163.parentNode.removeChild(_163);
  1755. break;
  1756. }
  1757. }
  1758. }
  1759. }
  1760. var _164=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection").item(0);
  1761. _164.appendChild(U_XML.F_ImportNode(this.m_docInputXML,_15f,true));
  1762. G_Debug.F_Print("this.m_docInputXML = "+this.m_docInputXML.xml);
  1763. this.f_populateAvailable();
  1764. this.f_setButtonState();
  1765. };
  1766. D_ManagePersonalData.f_populateAvailable=function(){
  1767. this.m_oAvailable.F_Clear();
  1768. var _165;
  1769. if(this.m_docInputXML){
  1770. _165=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec/personalData");
  1771. if(_165){
  1772. for(var i=0;i<_165.length;i++){
  1773. var _166=_165.item(i).getAttribute("name").F_XMLDecode();
  1774. var _167=this.m_oAvailable.F_AppendNewListItem();
  1775. _167.setAttribute("label",_166);
  1776. _167.setAttribute("value",_166);
  1777. }
  1778. }
  1779. }
  1780. this.m_oAvailable.F_Draw();
  1781. this.m_oAvailable.F_SelectByIndex(0);
  1782. if(_165){
  1783. return _165.length;
  1784. }
  1785. };
  1786. D_ManagePersonalData.f_modifyPersonalData=function(_168){
  1787. var _169="";
  1788. if(this.m_docInputXML){
  1789. var _16a=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec/personalData");
  1790. if(_16a){
  1791. for(var i=0;i<_16a.length;i++){
  1792. var _16b=_16a.item(i).getAttribute("name").F_XMLDecode();
  1793. if(_168==_16b){
  1794. _169=this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec").item(i);
  1795. var _16c=U_XML.F_SerializeNode(this.m_docInputXML.selectNodes("/addPersonalData/input/pdCollection/pdSpec").item(i));
  1796. var _16d=U_XML.F_LoadString(null,_16c);
  1797. D_AddPersonalWizard.F_Show(this,this.m_bEditingPublishedPackage,this.m_sModelPath,_16d);
  1798. break;
  1799. }
  1800. }
  1801. }
  1802. }
  1803. };
  1804. D_ManagePersonalData.f_getGovernorSettings=function(){
  1805. this.m_nMaxExtFiles=0;
  1806. if(this.m_docInputXML){
  1807. var _16e=this.m_docInputXML.selectNodes("/addPersonalData/input/governors/governor");
  1808. if(_16e){
  1809. for(var i=0;i<_16e.length;i++){
  1810. var _16f=_16e.item(i).getAttribute("name");
  1811. if(_16f=="maxPersonalDataSources"){
  1812. var _170=_16e.item(i).childNodes[0].nodeValue;
  1813. this.m_nMaxExtFiles=parseInt(_170);
  1814. }
  1815. }
  1816. var x=this.m_docInputXML.getElementsByTagName("governors")[0];
  1817. if(x){
  1818. x.parentNode.removeChild(x);
  1819. }
  1820. }
  1821. }
  1822. };
  1823. function C_PersonalDataRequest(_171,_172,_173){
  1824. C_PersonalDataRequest.m_sLastRequest=_172;
  1825. C_PersonalDataRequest.m_sLastResponse="";
  1826. this.m_aMetadataResponses=null;
  1827. this.m_sPDResponseXMLString="";
  1828. this.m_nPDResponse=null;
  1829. this.m_sRequestType=_173;
  1830. var _174=this.f_buildBusRequest(_172);
  1831. this.F_ConstructBaseClass(_171,C_PersonalDataRequest.K_sSOAPAction_metadataService,_174);
  1832. this.f_setupAsync();
  1833. this.F_AddNamespace(C_PersonalDataRequest.k_sBIBusMDNamespaceDecl);
  1834. };
  1835. C_PersonalDataRequest.F_Extends(C_BusRequest);
  1836. C_PersonalDataRequest.K_sPrimaryWaitThreshold=30;
  1837. C_PersonalDataRequest.K_sSecondaryWaitThreshold=30;
  1838. C_PersonalDataRequest.K_sSOAPAction_metadataService_high="http://www.ibm.com/xmlns/prod/cognos/metadataService/201610/.high";
  1839. C_PersonalDataRequest.K_sSOAPAction_metadataService_absolute="http://www.ibm.com/xmlns/prod/cognos/metadataService/201610/.absolute";
  1840. C_PersonalDataRequest.K_sSOAPAction_metadataService_control="http://www.ibm.com/xmlns/prod/cognos/metadataService/201610/.session";
  1841. C_PersonalDataRequest.K_sSOAPAction_metadataService="http://www.ibm.com/xmlns/prod/cognos/metadataService/201610/";
  1842. C_PersonalDataRequest.k_sBIBusMDNamespaceDecl="xmlns:md1='http://developer.cognos.com/schemas/metadataService/3'";
  1843. C_PersonalDataRequest.prototype.f_buildBusRequest=function(_175){
  1844. var _176="<md1:runSpecification>"+"<bus:specification xsi:type=\"bus:metadataServiceSpecification\">"+"<bus:value xsi:type=\"bus:specification\">"+_175.F_XMLEncode()+"</bus:value>"+"</bus:specification>"+G_BusServer.F_GetParameterValues()+"<bus:options SOAP-ENC:arrayType=\"bus:option[]\" xsi:type=\"SOAP-ENC:Array\">"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">primaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_PersonalDataRequest.K_sPrimaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:asynchOptionInt\">"+"<bus:name xsi:type=\"bus:asynchOptionEnum\">secondaryWaitThreshold</bus:name>"+"<bus:value xsi:type=\"xsd:int\">"+C_PersonalDataRequest.K_sSecondaryWaitThreshold+"</bus:value>"+"</item>"+"<item xsi:type=\"bus:runOptionBoolean\">"+"<bus:name xsi:type=\"bus:runOptionEnum\">prompt</bus:name>"+"<bus:value xsi:type=\"xsd:boolean\">false</bus:value>"+"</item>"+"</bus:options>"+"</md1:runSpecification>";
  1845. return _176;
  1846. };
  1847. C_PersonalDataRequest.prototype.f_setupAsync=function(){
  1848. this.F_SetAsyncBusRequest("md1:wait","md1:cancel","md1:getOutput",C_PersonalDataRequest.K_sSOAPAction_metadataService_absolute,C_PersonalDataRequest.K_sSOAPAction_metadataService_control);
  1849. };
  1850. C_PersonalDataRequest.F_GetLastRequest=function(){
  1851. return this.m_sLastRequest?this.m_sLastRequest:"";
  1852. };
  1853. C_PersonalDataRequest.F_GetLastResponse=function(){
  1854. return this.m_sLastResponse?this.m_sLastResponse:"";
  1855. };
  1856. C_PersonalDataRequest.prototype.F_ProcessResponse=function(){
  1857. C_PersonalDataRequest.superClass.F_ProcessResponse.call(this);
  1858. var _177=this.F_GetResponse();
  1859. this.m_aMetadataResponses=this.F_GetResponse();
  1860. if(!_177){
  1861. return;
  1862. }
  1863. var _178=_177.selectNodes("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/details/item/data");
  1864. if(_178.length>0){
  1865. var _179=new Base64();
  1866. this.m_sPDResponseXMLString=this.f_utf8ByteStringToString(_179.decode64(_178.item(0).text));
  1867. this.m_nPDResponse=U_XML.F_LoadString(null,this.m_sPDResponseXMLString);
  1868. }
  1869. };
  1870. C_PersonalDataRequest.prototype.f_utf8ByteStringToString=function(_17a){
  1871. var _17b=[];
  1872. var _17c=_17a.length;
  1873. for(var i=0;i<_17c;){
  1874. var _17d=_17a.charCodeAt(i++);
  1875. if(_17d<128){
  1876. _17b.push(String.fromCharCode(_17d));
  1877. continue;
  1878. }
  1879. var _17e=_17a.charCodeAt(i++);
  1880. if((_17d>191)&&(_17d<224)){
  1881. _17b.push(String.fromCharCode(((_17d&31)<<6)|(_17e&63)));
  1882. continue;
  1883. }
  1884. var _17f=_17a.charCodeAt(i++);
  1885. _17b.push(String.fromCharCode(((_17d&15)<<12)|((_17e&63)<<6)|(_17f&63)));
  1886. }
  1887. return _17b.join("");
  1888. };
  1889. C_PersonalDataRequest.prototype.F_GetRequestType=function(){
  1890. return this.m_sRequestType?this.m_sRequestType:"";
  1891. };
  1892. C_PersonalDataRequest.prototype.F_GetResponseXMLString=function(){
  1893. return this.m_sPDResponseXMLString?this.m_sPDResponseXMLString:"";
  1894. };
  1895. C_PersonalDataRequest.prototype.F_GetResponseXML=function(){
  1896. return this.m_nPDResponse?this.m_nPDResponse:null;
  1897. };
  1898. C_PersonalDataRequest.prototype.F_GetMetadataResponses=function(){
  1899. return this.m_aMetadataResponses;
  1900. };
  1901. C_PersonalDataRequest.prototype.F_GetMetadataResponse=function(){
  1902. var a=this.F_GetMetadataResponses();
  1903. return a?a[0]:null;
  1904. };
  1905. function C_PersonalDataSyncRequest(_180,_181,_182){
  1906. this.F_ConstructBaseClass(_180,_181,_182);
  1907. };
  1908. C_PersonalDataSyncRequest.F_Extends(C_PersonalDataRequest);
  1909. C_PersonalDataSyncRequest.prototype.f_buildBusRequest=function(_183){
  1910. var _184=_183;
  1911. return _184;
  1912. };
  1913. C_PersonalDataSyncRequest.prototype.f_setupAsync=function(){
  1914. };
  1915. C_PersonalDataSyncRequest.prototype.F_ProcessResponse=function(){
  1916. C_PersonalDataRequest.superClass.F_ProcessResponse.call(this);
  1917. var _185=this.F_GetResponse();
  1918. if(!_185){
  1919. return;
  1920. }
  1921. var _186=_185.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/output");
  1922. if(_186){
  1923. this.m_sPDResponseXMLString=U_XML.F_SerializeNode(_186);
  1924. this.m_nPDResponse=_186;
  1925. }else{
  1926. this.m_sPDResponseXMLString="";
  1927. this.m_nPDResponse=null;
  1928. }
  1929. };
  1930. var D_AddPersonalWizard={};
  1931. D_AddPersonalWizard.F_Show=function(_187,_188,_189,_18a){
  1932. if(G_BrowserInfo.M_bIsIE&&!U_DOM.F_IsVmlSupported()){
  1933. F_MsgBoxRes("IDS_MSG_NO_VML");
  1934. return;
  1935. }
  1936. this.m_oDocUploadResponse=null;
  1937. this.m_sModelPath=_189;
  1938. this.m_oPecXML=_18a;
  1939. this.m_bIsModify=_18a!=null;
  1940. this.m_bEditingPublishedPackage=_188;
  1941. this.m_sQueryName="";
  1942. this.m_sProcessResponse="";
  1943. this.M_fnSuper_Show(null,_187,G_ResManager.F_GetString("IDS_TITLE_ADDPERSONAL_DATA"));
  1944. };
  1945. D_AddPersonalWizard.K_iSelectDataPage=0;
  1946. D_AddPersonalWizard.K_iLinksPage=1;
  1947. D_AddPersonalWizard.K_iDataAttribPage=2;
  1948. D_AddPersonalWizard.K_iLinkAttribPage=3;
  1949. D_AddPersonalWizard.K_iOneToMany=0;
  1950. D_AddPersonalWizard.K_iOneToOne=1;
  1951. D_AddPersonalWizard.K_iOptToMany=2;
  1952. D_AddPersonalWizard.K_iOptToOne=3;
  1953. D_AddPersonalWizard.F_Dialog_OnInit=function(){
  1954. this.m_divExternalQSItems=this.F_GetDlgItem("divExternalItems");
  1955. this.m_divLeft=this.m_divExternalQSItems;
  1956. this.m_divLinks=this.F_GetDlgItem("divLinks");
  1957. this.m_divLinks.onmousedown=new Function("D_AddPersonalWizard.f_selectLink(-1)");
  1958. this.m_divExistingQSItems=this.F_GetDlgItem("divExistingItems");
  1959. this.m_divRight=this.m_divExistingQSItems;
  1960. if(!G_BrowserInfo.M_bIsIE){
  1961. this.m_elSvg=this.m_divLinks.appendChild(document.createElementNS("http://www.w3.org/2000/svg","svg"));
  1962. this.m_elSvg.style.height="180px";
  1963. this.m_elSvg.style.width="150px";
  1964. }
  1965. this.m_nlCardinalityLabels=G_ResManager.F_GetResource("cardinality").selectNodes("listItems/listItem");
  1966. this.m_radAllValUniqueExternal=this.F_GetDlgItem("radAllValueUniqueExternal");
  1967. this.m_radMorethanOnceExternal=this.F_GetDlgItem("radValueMoreThanOnceExternal");
  1968. this.m_radAllValUniqueExisting=this.F_GetDlgItem("radAllValueUniqueExisting");
  1969. this.m_radMorethanOnceExisting=this.F_GetDlgItem("radValueMoreThanOnceExisting");
  1970. this.m_radExternalExcludeMissingValues=this.F_GetDlgItem("radExternalExcludeMissingValues");
  1971. this.m_radExternalIncludeMissingValues=this.F_GetDlgItem("radExternalIncludeMissingValues");
  1972. this.m_radExistingExcludeMissingValues=this.F_GetDlgItem("radExistingExcludeMissingValues");
  1973. this.m_radExistingIncludeMissingValues=this.F_GetDlgItem("radExistingIncludeMissingValues");
  1974. this.m_spanExternalCardinality=this.F_GetDlgItem("spanExternalCardinality");
  1975. this.m_spanExistingCardinality=this.F_GetDlgItem("spanExistingCardinality");
  1976. this.m_aTipText=[];
  1977. this.m_aTipText[D_AddPersonalWizard.K_iSelectDataPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_SELECT_FILE";
  1978. this.m_aTipText[D_AddPersonalWizard.K_iLinksPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_SELECT_MAPPINGITEMS";
  1979. this.m_aTipText[D_AddPersonalWizard.K_iDataAttribPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_SPECIFY_ATTRIBUTE";
  1980. this.m_aTipText[D_AddPersonalWizard.K_iLinkAttribPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_DISABLED_MAPPINGOPTIONS";
  1981. this.m_nCurrentCard=D_AddPersonalWizard.K_iSelectDataPage;
  1982. };
  1983. D_AddPersonalWizard.F_Dialog_OnBeforeVisible=function(){
  1984. this.m_bReadIncomingMappings=true;
  1985. this.m_bReadIncomingMappingOptions=true;
  1986. this.m_bExternalSourceChanged=true;
  1987. var _18b="NavigationListNew";
  1988. if(this.m_bIsModify){
  1989. _18b="NavigationList";
  1990. }
  1991. this.m_oNavigationList=new C_ListView(this.F_GetDlgItem("divNavigationList"),this.F_GetResource(_18b),this);
  1992. var _18c=this.m_oNavigationList.F_FindListItemByIndex(0);
  1993. _18c.setAttribute("html","<strong>1.</strong> "+G_ResManager.F_GetString("IDS_LBL_SELECTDATA"));
  1994. _18c=this.m_oNavigationList.F_FindListItemByIndex(1);
  1995. _18c.setAttribute("html","<strong>2.</strong> "+G_ResManager.F_GetString("IDS_LBL_DATAMAPPING"));
  1996. _18c=this.m_oNavigationList.F_FindListItemByIndex(2);
  1997. _18c.setAttribute("html","<strong>3.</strong> "+G_ResManager.F_GetString("IDS_LBL_DATAATTRIBUTE"));
  1998. _18c=this.m_oNavigationList.F_FindListItemByIndex(3);
  1999. _18c.setAttribute("html","<strong>4.</strong> "+G_ResManager.F_GetString("IDS_LBL_MAPPINGOPTIONS"));
  2000. this.m_oNavigationList.F_Draw();
  2001. var _18d=this.m_oNavigationList.F_GetContainer();
  2002. var _18e=_18d.getElementsByTagName("TD");
  2003. var _18f=_18e.length;
  2004. for(var i=0;i<_18f;i++){
  2005. var _190=_18e.item(i);
  2006. _190.style.whiteSpace="normal";
  2007. }
  2008. this.m_oDeck=new C_Deck(this.F_GetDlgItem("deckMain"),this);
  2009. this.F_GetDlgItem("btnBack").style.display=this.m_bIsModify?"none":"";
  2010. this.F_GetDlgItem("btnNext").style.display=this.m_bIsModify?"none":"";
  2011. this.F_GetDlgItem("btnFinish").style.display=this.m_bIsModify?"none":"";
  2012. this.F_GetDlgItem("btnOK").style.display=this.m_bIsModify?"":"none";
  2013. this.f_updateButtonStates();
  2014. this.m_oLvColumns=new C_ListView(this.F_GetDlgItem("divListViewColumns"),this.F_GetResource("Choose_Column_List"),this);
  2015. this.F_GetDlgItem("inFileName").value="";
  2016. this.F_GetDlgItem("pdmForm").reset();
  2017. this.m_oComboDataType=new C_ComboBox(this.F_GetDlgItem("tblDataType"),G_ResManager.F_GetResource("ComboBox_DataType"),null,this);
  2018. this.m_oComboAggration=new C_ComboBox(this.F_GetDlgItem("tblAggration"),G_ResManager.F_GetResource("ComboBox_Aggration"),null,this);
  2019. this.m_oComboScale=new C_ComboBox(this.F_GetDlgItem("tblDecimal"),G_ResManager.F_GetResource("ComboBox_Decimal"),null,this);
  2020. this.m_oComboJoinFilterType=new C_ComboBox(this.F_GetDlgItem("tblComboJoinFilterType"),G_ResManager.F_GetResource("ComboBox_JoinFilterType"),null,this);
  2021. this.m_oComboJoinFilterType.F_SetValue("in","IDS_LBL_JOINFILTERTYPE");
  2022. this.m_oComboJoinFilterType.F_SetTooltip(null,"IDS_LBL_JOINFILTERTYPE");
  2023. this.F_SetEnableDataItemAttribute(false);
  2024. this.m_iCurrentSelectItemAttribute=-1;
  2025. this.m_sFolderName="";
  2026. this.m_oExistingQSList=new C_ListView(this.m_divExistingQSItems,null,this);
  2027. this.m_nExistingQSListItems=this.m_oExistingQSList.F_GetListItemsNode();
  2028. this.m_oExternalQSList=new C_ListView(this.m_divExternalQSItems,null,this);
  2029. this.m_nExternalQSListItems=this.m_oExternalQSList.F_GetListItemsNode();
  2030. this.m_oNavigationList.F_SelectByIndex(0,true);
  2031. this.m_nCurrentCard=D_AddPersonalWizard.K_iSelectDataPage;
  2032. this.f_updateTipText(D_AddPersonalWizard.K_iSelectDataPage);
  2033. };
  2034. D_AddPersonalWizard.F_Dialog_OnAfterVisible=function(){
  2035. if(this.m_oPecXML){
  2036. this.F_SetColumnList(this.m_oPecXML,true);
  2037. }
  2038. };
  2039. D_AddPersonalWizard.F_Deck_OnBeforeCardVisible=function(_191,_192,_193,_194){
  2040. switch(_194){
  2041. case D_AddPersonalWizard.K_iDataAttribPage:
  2042. if(!this.m_oLvColumnsDataItem){
  2043. U_Utils.F_ShowLoadingMessage(this.F_GetDlgItem("divListViewColumnDataitem"));
  2044. }
  2045. break;
  2046. case D_AddPersonalWizard.K_iLinksPage:
  2047. if(this.m_oExistingQSList&&this.m_oExistingQSList.F_GetListItems().length==0){
  2048. var _195=G_Model.F_IsMultiDimensionalSource();
  2049. if(_195){
  2050. this.F_GetDlgItem("lblExistingQuerySubject").innerText=G_ResManager.F_GetString("IDS_LBL_EXISTING_REPORT");
  2051. }else{
  2052. this.F_GetDlgItem("lblExistingQuerySubject").innerText=G_ResManager.F_GetString("IDS_LBL_EXISTING_QS_OR_REP");
  2053. }
  2054. }
  2055. this.f_updateLinkButtons();
  2056. break;
  2057. }
  2058. this.f_updateTipText(_194);
  2059. };
  2060. D_AddPersonalWizard.f_EnsureValidLinks=function(){
  2061. if(this.m_bReadIncomingMappings){
  2062. this.f_restoreExistingQSOrReport(this.m_oPecXML);
  2063. this.f_setupLinkAttributesPage();
  2064. this.m_bReadIncomingMappings=false;
  2065. return;
  2066. }
  2067. if(this.m_aLinks&&(this.m_aLinks.length)&&(this.m_aLinks.length>0)){
  2068. var nl=this.m_oLvColumns.F_GetCheckedListItems();
  2069. for(var i=0;i<this.m_aLinks.length;i++){
  2070. var _196=this.m_aLinks[i];
  2071. var _197=_196.M_sLeftDataItem;
  2072. var j=0;
  2073. for(j=0;j<nl.length;j++){
  2074. var n=nl.item(j);
  2075. var _198=n.getAttribute("name");
  2076. if(_198==_197){
  2077. break;
  2078. }
  2079. }
  2080. if(j<nl.length){
  2081. continue;
  2082. }
  2083. if(_196.M_elPolyLine){
  2084. _196.M_elPolyLine.parentNode.removeChild(_196.M_elPolyLine);
  2085. _196.M_elLeftRect.parentNode.removeChild(_196.M_elLeftRect);
  2086. _196.M_elRightRect.parentNode.removeChild(_196.M_elRightRect);
  2087. }
  2088. this.m_aLinks.splice(i,1);
  2089. i--;
  2090. }
  2091. }
  2092. };
  2093. D_AddPersonalWizard.F_Deck_OnAfterCardVisible=function(_199,_19a,_19b,_19c){
  2094. if(this.m_nCurrentCard==D_AddPersonalWizard.K_iSelectDataPage){
  2095. this.f_EnsureValidLinks();
  2096. }
  2097. this.m_nCurrentCard=_19c;
  2098. switch(_19c){
  2099. case D_AddPersonalWizard.K_iSelectDataPage:
  2100. this.m_bExternalSourceChanged=true;
  2101. break;
  2102. case D_AddPersonalWizard.K_iDataAttribPage:
  2103. if(!this.m_oLvColumnsDataItem){
  2104. this.m_oLvColumnsDataItem=new C_ListView(this.F_GetDlgItem("divListViewColumnDataitem"),this.F_GetResource("Column_Attribute_List"),this);
  2105. }
  2106. this.F_SetDataItemAttributesList();
  2107. break;
  2108. case D_AddPersonalWizard.K_iLinkAttribPage:
  2109. case D_AddPersonalWizard.K_iLinksPage:
  2110. if(this.m_bExternalSourceChanged){
  2111. var _19d=null;
  2112. if(this.m_oPecXML){
  2113. _19d=this.m_oPecXML.selectSingleNode("/pdSpec/personalData");
  2114. }
  2115. this.f_setExternalQuerySubject(_19d);
  2116. this.m_bExternalSourceChanged=false;
  2117. this.F_eraseLinks(false);
  2118. }
  2119. if(_19c==D_AddPersonalWizard.K_iLinksPage){
  2120. this.f_refreshLinksControl();
  2121. }
  2122. if(this.m_bReadIncomingMappings){
  2123. this.f_restoreExistingQSOrReport(this.m_oPecXML);
  2124. this.f_setupLinkAttributesPage();
  2125. }
  2126. if(_19c==D_AddPersonalWizard.K_iLinkAttribPage){
  2127. this.f_updateLinkAttributes();
  2128. }
  2129. if(this.m_oPecXML&&this.m_bIsModify){
  2130. var _19e=this.m_oPecXML.selectSingleNode("/pdSpec/relationship/joinFilterType");
  2131. var _19f=_19e?_19e.text:"none";
  2132. this.m_oComboJoinFilterType.F_SelectByValue(_19f);
  2133. }
  2134. break;
  2135. }
  2136. this.f_updateButtonStates();
  2137. };
  2138. D_AddPersonalWizard.f_setupLinkAttributesPage=function(){
  2139. if(!this.m_oColExternalLink){
  2140. this.m_oColExternalLink=new C_ListView(this.F_GetDlgItem("divListViewColumnExternalDataitem"),this.F_GetResource("Normal_Column_List"),this);
  2141. }
  2142. if(!this.m_oColExistingLink){
  2143. this.m_oColExistingLink=new C_ListView(this.F_GetDlgItem("divListViewColumnExistingDataitem"),this.F_GetResource("Normal_Column_List"),this);
  2144. }
  2145. if(this.m_bReadIncomingMappingOptions){
  2146. this.f_updateLinkAttributes(this.m_oPecXML);
  2147. this.m_bReadIncomingMappingOptions=false;
  2148. }
  2149. };
  2150. D_AddPersonalWizard.f_refreshLinksControl=function(){
  2151. this.f_setSelectedIndexToFirstLink();
  2152. this.f_updateLinks();
  2153. this.f_showSelectedLink();
  2154. };
  2155. D_AddPersonalWizard.f_updateTipText=function(_1a0){
  2156. var _1a1=G_ResManager.F_GetString(this.m_aTipText[_1a0]);
  2157. this.f_setTipText(_1a1);
  2158. };
  2159. D_AddPersonalWizard.f_setTipText=function(_1a2){
  2160. this.F_GetDlgItem("divInfoBox").innerHTML=_1a2;
  2161. };
  2162. D_AddPersonalWizard.f_updateLinkButtons=function(){
  2163. var _1a3=this.m_nExternalQSListItems&&this.m_nExternalQSListItems.selectSingleNode("listItem")!=null;
  2164. var _1a4=this.m_nExistingQSListItems&&this.m_nExistingQSListItems.selectSingleNode("listItem")!=null;
  2165. this.F_SetButtonEnabled("btnNewLink",_1a3&&_1a4);
  2166. var _1a5=this.m_iSelectedLink!=null&&this.m_iSelectedLink!=-1;
  2167. this.F_SetButtonEnabled("btnDeleteLink",_1a5);
  2168. };
  2169. D_AddPersonalWizard.f_setExternalQuerySubject=function(_1a6){
  2170. this.m_oExternalQSList.F_Clear();
  2171. this.m_nExternalQSListItems=this.m_oExternalQSList.F_GetListItemsNode();
  2172. if(_1a6){
  2173. this.F_GetDlgItem("txtExternalQuerySubject").value=_1a6.getAttribute("name");
  2174. this.F_GetDlgItem("txtExternalQuerySubject").title=_1a6.getAttribute("name");
  2175. U_Utils.F_ShowLoadingMessage(this.m_divExternalQSItems);
  2176. this.f_populateExternalQSMembers(_1a6);
  2177. }
  2178. };
  2179. D_AddPersonalWizard.f_populateExternalQSMembers=function(_1a7){
  2180. if(!_1a7){
  2181. this.m_divExternalQSItems.innerHTML="";
  2182. return false;
  2183. }
  2184. var nl=_1a7.selectNodes("item");
  2185. var d=this.m_nExternalQSListItems.ownerDocument;
  2186. var _1a8=nl.length;
  2187. var _1a9=0;
  2188. var _1aa=this.m_oLvColumns.F_GetCheckedListItems();
  2189. for(var i=0;i<_1a8;i++){
  2190. var n=nl.item(i);
  2191. var _1ab=n.getAttribute("name");
  2192. if(_1a9<_1aa.length&&_1ab==_1aa.item(_1a9).getAttribute("label")){
  2193. this.f_appendExternalDataNode(d,this.m_nExistingQSListItems,n);
  2194. _1a9++;
  2195. }
  2196. }
  2197. this.m_oExternalQSList.F_Draw();
  2198. this.f_updateLinkButtons();
  2199. };
  2200. D_AddPersonalWizard.f_restoreExistingLinks=function(_1ac){
  2201. var _1ad=[];
  2202. if(_1ac){
  2203. var _1ae=_1ac.selectSingleNode("/pdSpec/relationship");
  2204. if(_1ae){
  2205. var _1af=_1ae.selectNodes("expression/relPart");
  2206. var _1b0=_1af.length;
  2207. var nl=this.m_oLvColumns.F_GetCheckedListItems();
  2208. for(var i=0;i<_1b0;i++){
  2209. var _1b1=_1af.item(i);
  2210. var _1b2=_1b1.selectNodes("itemRef");
  2211. if(!_1b2||_1b2.length!=2){
  2212. continue;
  2213. }
  2214. var _1b3=_1b2.item(0).selectSingleNode("text()").nodeValue;
  2215. var j;
  2216. for(j=0;j<nl.length;j++){
  2217. var n=nl.item(j);
  2218. var _1b4=n.getAttribute("name");
  2219. if(_1b4==_1b3){
  2220. break;
  2221. }
  2222. }
  2223. if(j<nl.length){
  2224. var _1b5={};
  2225. _1ad.push(_1b5);
  2226. _1b5.M_sLeftDataItem=_1b2.item(0).selectSingleNode("text()").nodeValue;
  2227. _1b5.M_sRightDataItem=_1b2.item(1).selectSingleNode("text()").nodeValue;
  2228. }
  2229. }
  2230. }
  2231. }
  2232. return _1ad;
  2233. };
  2234. D_AddPersonalWizard.f_pickObject=function(){
  2235. var _1b6=G_Model.F_IsMultiDimensionalSource();
  2236. if(_1b6){
  2237. this.f_pickReport();
  2238. }else{
  2239. if(!this.m_oMenuPopupSet){
  2240. this.m_oMenuPopupSet=new C_MenuPopupSet(G_ResManager.F_GetResource("MenuPopupPickObject"),this);
  2241. }
  2242. var _1b7=C_Toolbar.F_GetDropDownPos("D_AddPersonalWizard_btnBrowse",false);
  2243. this.m_oMenuPopupSet.F_ShowMenuPopup("D_AddPersonalWizard_Popup",_1b7.left,_1b7.top);
  2244. }
  2245. };
  2246. D_AddPersonalWizard.f_chooseExistingQuerySubject=function(){
  2247. var _1b8=G_ResManager.F_GetString("IDS_TITLE_CHOOSE_QUERYSUBJECT");
  2248. var _1b9={};
  2249. _1b9["modelSubject"]=true;
  2250. D_ChooseModelItem.F_Show(this.F_GetDialogWindow(),function(){
  2251. D_AddPersonalWizard.f_onExistingQuerySubjectPicked();
  2252. },null,_1b8,"",_1b9,false);
  2253. };
  2254. D_AddPersonalWizard.f_restoreExistingQSOrReport=function(_1ba){
  2255. this.f_clearExistingItemsList();
  2256. var _1bb=null;
  2257. var _1bc=null;
  2258. if(_1ba){
  2259. var _1bd=_1ba.selectSingleNode("/pdSpec/relationship/targetModelPath");
  2260. if(_1bd){
  2261. var _1be=_1bd.selectSingleNode("text()");
  2262. var _1bf=_1be.nodeValue;
  2263. if(!this.m_bEditingPublishedPackage&&_1bf.indexOf("[Model].")>=0){
  2264. _1bf=_1bf.substr(8);
  2265. }
  2266. var _1c0=G_Model.F_GetChildren(_1bf);
  2267. if(_1c0){
  2268. _1bb=_1c0.selectSingleNode("querySubject");
  2269. }else{
  2270. var _1c1=new C_AllChildrenMetadataRequest(G_Model,new C_RequestListenerRedirect(this,"f_onExistingQSMetadataRequestComplete"),_1bf);
  2271. _1c1.F_Send();
  2272. }
  2273. }else{
  2274. var _1bc=_1ba.selectSingleNode("/pdSpec/reportExtract/reportSearchPath");
  2275. }
  2276. }
  2277. if(_1bb){
  2278. var _1c2=_1bb.getAttribute("_path");
  2279. var _1c3=_1bb.getAttribute("name");
  2280. this.f_setExistingQuerySubject(_1c2,_1c3);
  2281. }else{
  2282. if(_1bc){
  2283. var _1c4=_1bc.text;
  2284. var _1c5=_1ba.selectSingleNode("/pdSpec/reportExtract/reportSubject/@name").value;
  2285. this.f_setExistingReport(_1c4,_1c5);
  2286. }
  2287. }
  2288. };
  2289. D_AddPersonalWizard.f_onExistingQSMetadataRequestComplete=function(_1c6){
  2290. var _1c7=_1c6.F_GetError();
  2291. if(_1c7){
  2292. F_ShowError(_1c7);
  2293. return;
  2294. }
  2295. var _1c8=_1c6.F_GetMetadataResponse();
  2296. var _1c9=_1c8.selectSingleNode("querySubject");
  2297. if(_1c9){
  2298. var _1ca=_1c9.getAttribute("_path");
  2299. var _1cb=_1c9.getAttribute("name");
  2300. this.f_setExistingQuerySubject(_1ca,_1cb);
  2301. }
  2302. };
  2303. D_AddPersonalWizard.f_pickReport=function(){
  2304. var _1cc={};
  2305. _1cc["report"]=true;
  2306. _1cc["reportView"]=true;
  2307. _1cc["query"]=false;
  2308. _1cc["reportTemplate"]=false;
  2309. _1cc["analysis"]=false;
  2310. D_ContentManager.F_ShowOpen(this,_1cc);
  2311. };
  2312. D_AddPersonalWizard.F_Dialog_OnCommit=function(){
  2313. var _1cd=D_ContentManager.F_GetOpenFilePath();
  2314. var _1ce=D_ContentManager.F_GetOpenFileName();
  2315. this.f_setExistingReport(_1cd,_1ce);
  2316. };
  2317. D_AddPersonalWizard.f_onExistingQuerySubjectPicked=function(){
  2318. var _1cf=D_ChooseModelItem.F_GetQueryItemPath();
  2319. var _1d0=D_ChooseModelItem.F_GetQueryItemLabel();
  2320. this.f_setExistingQuerySubject(_1cf,_1d0);
  2321. };
  2322. D_AddPersonalWizard.f_clearExistingItemsList=function(){
  2323. this.m_oExistingQSList.F_Clear();
  2324. this.m_nExistingQSListItems=this.m_oExistingQSList.F_GetListItemsNode();
  2325. this.F_GetDlgItem("txtExistingQuerySubject").value="";
  2326. this.F_GetDlgItem("txtExistingQuerySubject").title="";
  2327. this.m_sExistingQuerySubjectPath=null;
  2328. this.m_sExistingReportPath=null;
  2329. this.m_nExistingReportExtract=null;
  2330. };
  2331. D_AddPersonalWizard.f_setExistingQuerySubject=function(_1d1,_1d2){
  2332. this.f_clearExistingItemsList();
  2333. if(_1d1&&_1d2){
  2334. this.m_sExistingQuerySubjectPath=_1d1;
  2335. this.F_GetDlgItem("txtExistingQuerySubject").value=_1d2;
  2336. this.F_GetDlgItem("txtExistingQuerySubject").title=this.m_sExistingQuerySubjectPath;
  2337. this.F_GetDlgItem("lblExistingQuerySubject").innerText=G_ResManager.F_GetString("IDS_LBL_EXISTING_QUERY_SUBJECT");
  2338. var _1d3=this.m_sExistingQuerySubjectPath;
  2339. var _1d4=new C_AllChildrenMetadataRequest(G_Model,this,_1d3);
  2340. _1d4.F_Send();
  2341. U_Utils.F_ShowLoadingMessage(this.m_divExistingQSItems);
  2342. }
  2343. };
  2344. D_AddPersonalWizard.f_setExistingReport=function(_1d5,_1d6){
  2345. this.f_clearExistingItemsList();
  2346. if(_1d5&&_1d6){
  2347. this.m_sExistingReportPath=_1d5;
  2348. this.F_GetDlgItem("txtExistingQuerySubject").value=_1d6;
  2349. this.F_GetDlgItem("txtExistingQuerySubject").title=_1d5;
  2350. this.F_GetDlgItem("lblExistingQuerySubject").innerText=G_ResManager.F_GetString("IDS_LBL_EXISTING_REPORT");
  2351. var _1d7="<processExtractReport><input><reportSearchPath>"+this.m_sExistingReportPath.F_XMLEncode()+"</reportSearchPath></input></processExtractReport>";
  2352. var _1d8=new C_PersonalDataSyncRequest(this,_1d7,"processExtractReport");
  2353. _1d8.F_Send();
  2354. U_Utils.F_ShowLoadingMessage(this.m_divExistingQSItems);
  2355. }
  2356. };
  2357. D_AddPersonalWizard.f_populateExistingReportItems=function(_1d9){
  2358. if(!_1d9){
  2359. this.m_divExistingQSItems.innerHTML="";
  2360. return false;
  2361. }
  2362. this.m_nExistingReportExtract=_1d9;
  2363. var nl=this.m_nExistingReportExtract.selectNodes("reportSubject/item");
  2364. var d=this.m_nExistingQSListItems.ownerDocument;
  2365. var _1da=nl.length;
  2366. for(var i=0;i<_1da;i++){
  2367. var n=nl.item(i);
  2368. var _1db=this.f_appendReportNode(d,this.m_nExistingQSListItems,n);
  2369. }
  2370. this.m_oExistingQSList.F_Draw();
  2371. this.f_updateLinkButtons();
  2372. };
  2373. D_AddPersonalWizard.f_filterExistingQSMembers=function(_1dc){
  2374. if(!_1dc){
  2375. this.m_divExistingQSItems.innerHTML="";
  2376. return false;
  2377. }
  2378. var _1dd=_1dc.selectSingleNode("querySubject");
  2379. var _1de="<getQuerySubjectData><input><modelSearchPath>"+this.m_sModelPath.F_XMLEncode()+"</modelSearchPath>"+U_XML.F_SerializeNode(_1dd)+"</input></getQuerySubjectData>";
  2380. var _1df=new C_PersonalDataSyncRequest(this,_1de,"getQuerySubjectData");
  2381. _1df.F_Send();
  2382. U_Utils.F_ShowLoadingMessage(this.m_divExistingQSItems);
  2383. U_Utils.F_ShowLoadingMessage(this.F_GetDlgItem("divListViewColumnExternalDataitem"));
  2384. U_Utils.F_ShowLoadingMessage(this.F_GetDlgItem("divListViewColumnExistingDataitem"));
  2385. };
  2386. D_AddPersonalWizard.f_populateExistingQSMembers=function(_1e0){
  2387. if(!_1e0){
  2388. this.m_divExistingQSItems.innerHTML="";
  2389. return false;
  2390. }
  2391. var nl=_1e0.selectNodes(".//queryItem | .//calculation");
  2392. var d=this.m_nExistingQSListItems.ownerDocument;
  2393. var _1e1=nl.length;
  2394. for(var i=0;i<_1e1;i++){
  2395. var n=nl.item(i);
  2396. var _1e2=this.f_appendMetadataNode(d,this.m_nExistingQSListItems,n);
  2397. }
  2398. this.m_oExistingQSList.F_Draw();
  2399. this.f_updateLinkButtons();
  2400. return true;
  2401. };
  2402. D_AddPersonalWizard.f_appendReportNode=function(d,_1e3,_1e4){
  2403. var n=_1e3.appendChild(d.createElement("listItem"));
  2404. var _1e5=_1e4.getAttribute("name");
  2405. if(_1e5){
  2406. n.setAttribute("name",_1e5);
  2407. n.setAttribute("label",_1e5);
  2408. }
  2409. var _1e6=_1e4.getAttribute("ID");
  2410. if(_1e6){
  2411. n.setAttribute("_ref",_1e6);
  2412. n.setAttribute("_path",_1e6);
  2413. }
  2414. n.setAttribute("nodeName","modelItem");
  2415. switch(_1e4.getAttribute("usage")){
  2416. case "identifier":
  2417. n.setAttribute("smallIcon","queryItem_identifier.gif");
  2418. break;
  2419. case "fact":
  2420. n.setAttribute("smallIcon","queryItem_fact.gif");
  2421. n.setAttribute("isMeasure","true");
  2422. n.setAttribute("isOLAPMeasure","false");
  2423. var _1e7=_1e4.getAttribute("regularAggregate");
  2424. switch(_1e7){
  2425. case "sum":
  2426. _1e7="total";
  2427. break;
  2428. case "min":
  2429. _1e7="minimum";
  2430. break;
  2431. case "max":
  2432. _1e7="maximum";
  2433. break;
  2434. case "avg":
  2435. _1e7="average";
  2436. break;
  2437. case "count":
  2438. case "calculated":
  2439. case "countDistinct":
  2440. case "standardDeviation":
  2441. case "variance":
  2442. case "median":
  2443. case "automatic":
  2444. break;
  2445. default:
  2446. _1e7="";
  2447. break;
  2448. }
  2449. if(_1e7){
  2450. n.setAttribute("modelAggregate",_1e7);
  2451. }
  2452. break;
  2453. default:
  2454. n.setAttribute("smallIcon","metadata_attribute.gif");
  2455. break;
  2456. }
  2457. U_XML.F_CopyAttributes(n,_1e4,["usage","datatype"]);
  2458. return n;
  2459. };
  2460. D_AddPersonalWizard.f_appendMetadataNode=function(d,_1e8,_1e9){
  2461. var n=_1e8.appendChild(d.createElement("listItem"));
  2462. var _1ea=_1e9.getAttribute("name");
  2463. if(_1ea){
  2464. n.setAttribute("name",_1ea);
  2465. n.setAttribute("label",_1ea);
  2466. }
  2467. U_XML.F_CopyAttributes(n,_1e9,["_ref","_path","description"]);
  2468. var _1eb=_1e9.getAttribute("screenTip");
  2469. if(_1eb||_1ea){
  2470. n.setAttribute("tooltip",_1eb?(_1ea+" - "+_1eb):_1ea);
  2471. }
  2472. var _1ec=_1e9.getAttribute("linkable");
  2473. if(_1ec!=null){
  2474. if(_1ec=="false"){
  2475. n.setAttribute("selectable","false");
  2476. n.setAttribute("smallIcon","bad_item.gif");
  2477. return n;
  2478. }
  2479. }
  2480. var _1ed=_1e9.nodeName;
  2481. switch(_1ed){
  2482. case "queryItem":
  2483. case "calculation":
  2484. var _1ee=n.parentNode;
  2485. var _1ef=_1ee.getAttribute("nodeName");
  2486. var _1f0=G_App.F_getPackageTreeSettingsFull();
  2487. if((_1ef=="level")&&!_1f0.F_GetValue(C_PackageTreeSettings.K_iMemberProperties)){
  2488. n.parentNode.removeChild(n);
  2489. break;
  2490. }
  2491. var _1f1=(_1ed=="calculation");
  2492. n.setAttribute("nodeName","modelItem");
  2493. switch(_1ef){
  2494. case "hierarchy":
  2495. case "level":
  2496. n.setAttribute("nodeName","memberProperty");
  2497. var _1f2=_1ee.getAttribute("name");
  2498. if(_1ef=="level"){
  2499. n.setAttribute("LUN",_1ee.getAttribute("_ref"));
  2500. n.setAttribute("HUN",_1ee.parentNode.getAttribute("_ref"));
  2501. }else{
  2502. n.setAttribute("HUN",_1ee.getAttribute("_ref"));
  2503. }
  2504. n.setAttribute("parentName",_1f2);
  2505. n.setAttribute("parentLabel",_1f2);
  2506. break;
  2507. }
  2508. switch(_1e9.getAttribute("usage")){
  2509. case "identifier":
  2510. n.setAttribute("smallIcon",_1f1?"calculation_identifier.gif":"queryItem_identifier.gif");
  2511. break;
  2512. case "fact":
  2513. n.setAttribute("selectable","false");
  2514. n.setAttribute("smallIcon","fact_bad.gif");
  2515. n.setAttribute("isMeasure","true");
  2516. n.setAttribute("isOLAPMeasure","false");
  2517. var _1f3=_1e9.getAttribute("regularAggregate");
  2518. switch(_1f3){
  2519. case "sum":
  2520. _1f3="total";
  2521. break;
  2522. case "min":
  2523. _1f3="minimum";
  2524. break;
  2525. case "max":
  2526. _1f3="maximum";
  2527. break;
  2528. case "avg":
  2529. _1f3="average";
  2530. break;
  2531. case "count":
  2532. case "calculated":
  2533. case "countDistinct":
  2534. case "standardDeviation":
  2535. case "variance":
  2536. case "median":
  2537. case "automatic":
  2538. break;
  2539. default:
  2540. _1f3="";
  2541. break;
  2542. }
  2543. if(_1f3){
  2544. n.setAttribute("modelAggregate",_1f3);
  2545. }
  2546. break;
  2547. default:
  2548. n.setAttribute("smallIcon",_1f1?"calculation_attribute.gif":"metadata_attribute.gif");
  2549. break;
  2550. }
  2551. if(_1f1){
  2552. var _1f4=_1e9.getAttribute("calcType");
  2553. switch(_1f4){
  2554. case "namedSet":
  2555. n.setAttribute("nodeName","namedSet");
  2556. n.setAttribute("smallIcon","calcType_"+_1f4+".gif");
  2557. U_XML.F_CopyAttributes(n,_1e9,["hierarchies","dimensions"]);
  2558. break;
  2559. case "macros":
  2560. n.setAttribute("smallIcon","calcType_"+_1f4+".gif");
  2561. break;
  2562. }
  2563. }
  2564. U_XML.F_CopyAttributes(n,_1e9,["currency","usage","datatype","displayType","unSortable","promptType","promptDisplayItemRef","promptUseItemRef","promptFilterItemRef","promptCascadeOnRef","regularAggregate","calcType"]);
  2565. break;
  2566. }
  2567. return n;
  2568. };
  2569. D_AddPersonalWizard.f_appendExternalDataNode=function(d,_1f5,_1f6){
  2570. var n=this.m_nExternalQSListItems.appendChild(d.createElement("listItem"));
  2571. var _1f7=_1f6.getAttribute("name");
  2572. if(_1f7){
  2573. n.setAttribute("name",_1f7);
  2574. n.setAttribute("label",_1f7);
  2575. }
  2576. U_XML.F_CopyAttributes(n,_1f6,["ID","usage"]);
  2577. var _1f8=_1f6.getAttribute("screenTip");
  2578. if(_1f8||_1f7){
  2579. n.setAttribute("tooltip",_1f8?(_1f7+" - "+_1f8):_1f7);
  2580. }
  2581. switch(_1f6.getAttribute("usage")){
  2582. case "identifier":
  2583. case "Identifier":
  2584. n.setAttribute("smallIcon","queryItem_identifier.gif");
  2585. break;
  2586. case "fact":
  2587. case "Fact":
  2588. n.setAttribute("smallIcon","queryItem_fact.gif");
  2589. n.setAttribute("isMeasure","true");
  2590. n.setAttribute("isOLAPMeasure","false");
  2591. var _1f9=_1f6.getAttribute("regularAggregate");
  2592. switch(_1f9){
  2593. case "sum":
  2594. _1f9="total";
  2595. break;
  2596. case "min":
  2597. _1f9="minimum";
  2598. break;
  2599. case "max":
  2600. _1f9="maximum";
  2601. break;
  2602. case "avg":
  2603. _1f9="average";
  2604. break;
  2605. case "count":
  2606. case "calculated":
  2607. case "countDistinct":
  2608. case "standardDeviation":
  2609. case "variance":
  2610. case "median":
  2611. case "automatic":
  2612. break;
  2613. default:
  2614. _1f9="";
  2615. break;
  2616. }
  2617. if(_1f9){
  2618. n.setAttribute("modelAggregate",_1f9);
  2619. }
  2620. break;
  2621. default:
  2622. n.setAttribute("smallIcon","metadata_attribute.gif");
  2623. break;
  2624. }
  2625. return n;
  2626. };
  2627. D_AddPersonalWizard.f_updateButtonStates=function(){
  2628. };
  2629. D_AddPersonalWizard.F_OnBack=function(){
  2630. if(this.m_oDeck.F_HasBack()){
  2631. this.m_oNavigationList.F_SelectByIndex(this.m_oDeck.F_GetIndex()-1,true);
  2632. }
  2633. };
  2634. D_AddPersonalWizard.F_OnNext=function(){
  2635. if(this.m_oDeck.F_HasNext()){
  2636. this.m_oNavigationList.F_SelectByIndex(this.m_oDeck.F_GetIndex()+1,true);
  2637. }
  2638. };
  2639. D_AddPersonalWizard.F_OnFinish=function(){
  2640. if(!this.m_oPecXML){
  2641. return;
  2642. }
  2643. this.f_buildpdSpecitem(this.m_oPecXML);
  2644. D_ManagePersonalData.f_addPersonalData(this.m_oPecXML,this.m_bIsModify);
  2645. this.F_Hide();
  2646. };
  2647. D_AddPersonalWizard.f_localEditLinksOnly=function(_1fa){
  2648. var _1fb=_1fa.selectSingleNode("/pdSpec/relationship");
  2649. if(_1fb){
  2650. var nl=this.m_oLvColumns.F_GetCheckedListItems();
  2651. var _1fc=_1fb.selectNodes("expression/relPart");
  2652. var _1fd=_1fc.length;
  2653. var nl=this.m_oLvColumns.F_GetCheckedListItems();
  2654. for(var i=0;i<_1fd;i++){
  2655. var _1fe=_1fc.item(i);
  2656. var _1ff=_1fe.selectNodes("itemRef");
  2657. if(!_1ff||_1ff.length!=2){
  2658. _1fe.parentNode.removeChild(_1fe);
  2659. continue;
  2660. }
  2661. var _200=_1ff.item(0).selectSingleNode("text()").nodeValue;
  2662. var j;
  2663. for(j=0;j<nl.length;j++){
  2664. var n=nl.item(j);
  2665. var _201=n.getAttribute("name");
  2666. if(_201==_200){
  2667. break;
  2668. }
  2669. }
  2670. if(j<nl.length){
  2671. continue;
  2672. }
  2673. _1fe.parentNode.removeChild(_1fe);
  2674. }
  2675. }
  2676. };
  2677. D_AddPersonalWizard.f_buildpdSpecitem=function(_202){
  2678. var _203=this.m_oLvColumns.F_GetListItems();
  2679. var _204=_202.selectNodes("/pdSpec/personalData/item");
  2680. var _205=_202.selectNodes("/pdSpec/dataSet/name");
  2681. var _206=_205.item(0).text;
  2682. if(this.F_GetDlgItem("txtText").value!=_206){
  2683. _205.item(0).text=this.F_GetDlgItem("txtText").value;
  2684. var _207=_202.selectNodes("/pdSpec/personalData");
  2685. _207.item(0).setAttribute("name",this.F_GetDlgItem("txtText").value);
  2686. _207.item(0).setAttribute("ID","["+this.F_GetDlgItem("txtText").value+"]");
  2687. for(var i=0;i<_204.length;i++){
  2688. var _208=_204.item(i).getAttribute("ID");
  2689. var sID=_208.replace("["+_206+"]","["+this.F_GetDlgItem("txtText").value+"]");
  2690. _204.item(i).setAttribute("ID",sID);
  2691. }
  2692. var _209=_202.selectNodes("/pdSpec/relationship/expression/relPart");
  2693. for(var i=0;i<_209.length;i++){
  2694. var _20a=_209.item(i).selectSingleNode("itemRef");
  2695. if(_20a){
  2696. var _208=_20a.text;
  2697. var _20b=_208.replace("["+_206+"]","["+this.F_GetDlgItem("txtText").value+"]");
  2698. _20a.text=_20b;
  2699. }
  2700. }
  2701. var nl=this.m_oLvColumns.F_GetListItems();
  2702. for(var i=0;i<nl.length;i++){
  2703. var _20c=nl.item(i);
  2704. var _20d=_20c.getAttribute("name");
  2705. var _20e=_20d.replace("["+_206+"]","["+this.F_GetDlgItem("txtText").value+"]");
  2706. _20c.setAttribute("name",_20e);
  2707. }
  2708. if(this.m_aLinks){
  2709. for(var i=0;i<this.m_aLinks.length;i++){
  2710. var _20f=this.m_aLinks[i];
  2711. var _20d=_20f.M_sLeftDataItem;
  2712. var _20e=_20d.replace("["+_206+"]","["+this.F_GetDlgItem("txtText").value+"]");
  2713. _20f.M_sLeftDataItem=_20e;
  2714. }
  2715. }
  2716. }
  2717. for(var i=0;i<_204.length;i++){
  2718. var n=_204.item(i);
  2719. var _210=_203.item(i).getAttribute("checked");
  2720. if(_210=="true"){
  2721. n.setAttribute("hidden","false");
  2722. }else{
  2723. n.setAttribute("hidden","true");
  2724. }
  2725. }
  2726. U_XML.F_RemoveNode(_202,"/pdSpec/dataSet/accessDirectly");
  2727. var _211=U_XML.F_AppendChild(_202.selectNodes("/pdSpec/dataSet").item(0),"accessDirectly");
  2728. if(this.F_GetDlgItem("chkAlwaysTryToLoad").checked==true){
  2729. _211.text="true";
  2730. }else{
  2731. _211.text="false";
  2732. }
  2733. if(this.m_bReadIncomingMappings){
  2734. this.f_localEditLinksOnly(_202);
  2735. return;
  2736. }
  2737. this.f_EnsureValidLinks();
  2738. if(this.m_nExistingReportExtract){
  2739. U_XML.F_RemoveNode(_202,"/pdSpec/reportExtract");
  2740. var _212=U_XML.F_AppendChild(_202.selectNodes("/pdSpec").item(0),"reportExtract");
  2741. var _213=this.m_nExistingReportExtract.selectSingleNode("reportSearchPath");
  2742. if(_213){
  2743. var _214=U_XML.F_AppendChild(_212,"reportSearchPath");
  2744. _214.text=_213.text;
  2745. U_XML.F_CopyAttributes(_214,_213);
  2746. }
  2747. var _215=this.m_nExistingReportExtract.selectSingleNode("reportSubject");
  2748. if(_215){
  2749. var _216=U_XML.F_AppendChild(_212,"reportSubject");
  2750. _216.text=_215.text;
  2751. U_XML.F_CopyAttributes(_216,_215);
  2752. var _217=_215.selectNodes("item");
  2753. if(_217){
  2754. var _218=_217.length;
  2755. for(var i=0;i<_218;i++){
  2756. var _219=_217.item(i);
  2757. var _21a=U_XML.F_AppendChild(_216,"item");
  2758. _21a.text=_219.text;
  2759. U_XML.F_CopyAttributes(_21a,_219);
  2760. }
  2761. }
  2762. }
  2763. }else{
  2764. U_XML.F_RemoveNode(_202,"/pdSpec/reportExtract");
  2765. }
  2766. U_XML.F_RemoveNode(_202,"/pdSpec/relationship");
  2767. if(this.m_aLinks&&(this.m_aLinks.length)&&(this.m_aLinks.length>0)){
  2768. var _21b=U_XML.F_AppendChild(_202.selectNodes("/pdSpec").item(0),"relationship");
  2769. if(this.m_sExistingQuerySubjectPath){
  2770. _21b.setAttribute("target","baseModel");
  2771. var _21c=U_XML.F_AppendChild(_21b,"targetModelPath");
  2772. var _21d=this.m_sExistingQuerySubjectPath;
  2773. if(_21d.indexOf("[Model].")!=0){
  2774. _21d="[Model]."+_21d;
  2775. }
  2776. _21c.text=_21d;
  2777. }else{
  2778. _21b.setAttribute("target","reportExtract");
  2779. }
  2780. var _21e=U_XML.F_AppendChild(_21b,"sourceCardinality");
  2781. if(this.m_radAllValUniqueExternal.checked==true){
  2782. U_XML.F_AppendChild(_21e,"maxCard").text="one";
  2783. }else{
  2784. U_XML.F_AppendChild(_21e,"maxCard").text="many";
  2785. }
  2786. if(this.m_radExternalExcludeMissingValues.checked==true){
  2787. U_XML.F_AppendChild(_21e,"minCard").text="one";
  2788. }else{
  2789. U_XML.F_AppendChild(_21e,"minCard").text="zero";
  2790. }
  2791. var _21f=U_XML.F_AppendChild(_21b,"targetCardinality");
  2792. if(this.m_radAllValUniqueExisting.checked==true){
  2793. U_XML.F_AppendChild(_21f,"maxCard").text="one";
  2794. }else{
  2795. U_XML.F_AppendChild(_21f,"maxCard").text="many";
  2796. }
  2797. if(this.m_radExistingExcludeMissingValues.checked==true){
  2798. U_XML.F_AppendChild(_21f,"minCard").text="one";
  2799. }else{
  2800. U_XML.F_AppendChild(_21f,"minCard").text="zero";
  2801. }
  2802. var _220=U_XML.F_AppendChild(_21b,"expression");
  2803. if(this.m_aLinks&&this.m_aLinks.length){
  2804. for(var i=0;i<this.m_aLinks.length;i++){
  2805. var _221=U_XML.F_AppendChild(_220,"relPart");
  2806. var _20f=this.m_aLinks[i];
  2807. var _222=_20f.M_sLeftDataItem.split("].[");
  2808. var _223=_222[0].replace("[","");
  2809. if(_223!=this.F_GetDlgItem("txtText").value){
  2810. var _224=_20f.M_sLeftDataItem.replace("["+_223+"]","["+this.F_GetDlgItem("txtText").value+"]");
  2811. U_XML.F_AppendChild(_221,"itemRef").text=_224;
  2812. }else{
  2813. U_XML.F_AppendChild(_221,"itemRef").text=_20f.M_sLeftDataItem;
  2814. }
  2815. U_XML.F_AppendChild(_221,"compOpr").text="eq";
  2816. U_XML.F_AppendChild(_221,"itemRef").text=_20f.M_sRightDataItem;
  2817. if(i+1<this.m_aLinks.length){
  2818. U_XML.F_AppendChild(_220,"logicalOpr").text="and";
  2819. }
  2820. }
  2821. }
  2822. var _225=U_XML.F_AppendChild(_21b,"joinFilterType");
  2823. _225.text=this.m_oComboJoinFilterType.F_GetValue();
  2824. }
  2825. };
  2826. D_AddPersonalWizard.F_Request_OnComplete=function(_226){
  2827. var _227=(_226.constructor==C_PersonalDataRequest)||(_226.constructor==C_PersonalDataSyncRequest);
  2828. var _228=_226.F_GetError();
  2829. if(_228){
  2830. F_ShowError(_228);
  2831. if(_227){
  2832. switch(_226.F_GetRequestType()){
  2833. case "processExtractReport":
  2834. this.f_clearExistingItemsList();
  2835. this.m_divExistingQSItems.innerHTML="";
  2836. break;
  2837. }
  2838. }
  2839. return;
  2840. }
  2841. if(_227){
  2842. var _229=_226.F_GetResponseXMLString();
  2843. var _22a=_226.F_GetResponseXML();
  2844. switch(_226.F_GetRequestType()){
  2845. case "getPersonalData":
  2846. if(_228){
  2847. this.m_oInputXML=U_XML.F_LoadString(null,"<input><pdCollection><baseModelSearchPath>"+this.m_sModelPath+"</baseModelSearchPath></pdCollection></input>");
  2848. }else{
  2849. var _22b=_229.replace(/<output>/g,"<addPersonalData><input>").replace(/<\/output>/g,"</input></addPersonalData>").replace(/<targetPackageSearchPath>/g,"<baseModelSearchPath>").replace(/<\/targetPackageSearchPath>/g,"</baseModelSearchPath>");
  2850. this.m_oInputXML=U_XML.F_LoadString(null,_22b);
  2851. var _22c=this.m_oInputXML.selectNodes("/addPersonalData/input/pdCollection/baseModelSearchPath").item(0);
  2852. if(_22c.text==""){
  2853. _22c.text=this.m_sModelPath;
  2854. }
  2855. }
  2856. break;
  2857. case "processExtractReport":
  2858. var _22d=_22a.selectSingleNode("reportExtract");
  2859. this.f_populateExistingReportItems(_22d);
  2860. this.m_aLinks=this.f_restoreExistingLinks(this.m_oPecXML);
  2861. this.f_refreshLinksControl();
  2862. this.m_bReadIncomingMappingOptions=true;
  2863. this.f_setupLinkAttributesPage();
  2864. break;
  2865. case "getQuerySubjectData":
  2866. var _22e=_22a.selectSingleNode("querySubject");
  2867. this.f_populateExistingQSMembers(_22e);
  2868. if(this.m_aLinks&&(this.m_aLinks.length)&&(this.m_aLinks.length>0)){
  2869. this.F_eraseLinks(true);
  2870. }else{
  2871. this.m_aLinks=this.f_restoreExistingLinks(this.m_oPecXML);
  2872. }
  2873. this.f_refreshLinksControl();
  2874. this.m_bReadIncomingMappingOptions=true;
  2875. this.f_setupLinkAttributesPage();
  2876. break;
  2877. }
  2878. }else{
  2879. if(_226.constructor==C_LevelMetadataRequest||_226.constructor==C_AllChildrenMetadataRequest){
  2880. this.f_filterExistingQSMembers(_226.F_GetMetadataResponse());
  2881. }
  2882. }
  2883. };
  2884. D_AddPersonalWizard.F_Request_OnAborted=function(_22f){
  2885. };
  2886. D_AddPersonalWizard.F_FindSelectItemInProcessResponse=function(_230){
  2887. this.m_iCurrentSelectItemAttribute=-1;
  2888. var _231=_230.getAttribute("label");
  2889. var _232=_230.selectNodes("subItem").item(0).getAttribute("serverDatatype");
  2890. var _233=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  2891. for(var i=0;i<_233.length;i++){
  2892. var _234=_233.item(i);
  2893. if((_234.getAttribute("name")==_231)&&(_234.getAttribute("datatype")==_232)){
  2894. this.m_iCurrentSelectItemAttribute=i;
  2895. }
  2896. }
  2897. };
  2898. D_AddPersonalWizard.F_SetEnableDataItemAttribute=function(_235){
  2899. this.m_oComboDataType.F_SetEnabled(_235);
  2900. this.m_oComboAggration.F_SetEnabled(_235);
  2901. this.m_oComboScale.F_SetEnabled(_235);
  2902. };
  2903. D_AddPersonalWizard.F_SetEnableDecimalDataItemAttribute=function(_236){
  2904. this.m_oComboScale.F_SetEnabled(_236);
  2905. };
  2906. D_AddPersonalWizard.F_UpdataDataItemAttributeCombox=function(_237){
  2907. if(_237<0||_237>this.m_oPecXML.selectNodes("/pdSpec/personalData/item").length){
  2908. return;
  2909. }
  2910. var _238=this.m_oPecXML.selectNodes("/pdSpec/personalData/item").item(_237);
  2911. var _239=this.F_GetItemDataType(_238);
  2912. this.m_oComboDataType.F_SelectByValue(_239,true);
  2913. if((_239=="Integer")||(_239=="Decimal")){
  2914. if(null!=_238.getAttribute("regularAggregate")){
  2915. this.m_oComboAggration.F_SelectByValue(_238.getAttribute("regularAggregate"),true);
  2916. }
  2917. }else{
  2918. this.m_oComboAggration.F_SetEnabled(false);
  2919. }
  2920. if(this.F_GetItemDataType(_238)!="Decimal"){
  2921. this.m_oComboScale.F_SetEnabled(false);
  2922. }
  2923. if(this.F_GetItemScale(_238)!=null){
  2924. var _23a=this.F_GetItemScale(_238);
  2925. if((_23a>=0)&&(_23a<8)){
  2926. this.m_oComboScale.F_SelectByValue(_23a,true);
  2927. }
  2928. }
  2929. };
  2930. D_AddPersonalWizard.F_ComboBox_OnChange=function(_23b,_23c){
  2931. if(_23b==this.m_oComboJoinFilterType){
  2932. this.m_oComboJoinFilterType.F_SetTooltip(null,"IDS_LBL_JOINFILTERTYPE");
  2933. return;
  2934. }
  2935. if(this.m_iCurrentSelectItemAttribute<0){
  2936. return;
  2937. }
  2938. var _23d=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  2939. switch(_23b){
  2940. case this.m_oComboDataType:
  2941. this.F_SetItemDataType(this.m_iCurrentSelectItemAttribute,_23c.getAttribute("value"));
  2942. break;
  2943. case this.m_oComboAggration:
  2944. this.F_SetItemAggregate(this.m_iCurrentSelectItemAttribute,_23c.getAttribute("value"));
  2945. break;
  2946. case this.m_oComboScale:
  2947. if(_23c.getAttribute("scale")!=""){
  2948. _23d.item(this.m_iCurrentSelectItemAttribute).setAttribute("scale",_23c.getAttribute("value"));
  2949. }
  2950. break;
  2951. }
  2952. var _23e=-1;
  2953. var _23f=this.m_oLvColumnsDataItem.F_GetSingleSelectedListItem();
  2954. if(_23f){
  2955. var nl=this.m_oLvColumnsDataItem.F_GetListItems();
  2956. var _240=nl.length;
  2957. for(var i=0;i<_240;i++){
  2958. if(_23f==nl.item(i)){
  2959. _23e=i;
  2960. }
  2961. }
  2962. }
  2963. this.F_SetDataItemAttributesList();
  2964. if(_23e>=0){
  2965. this.m_oLvColumnsDataItem.F_SelectByIndex(_23e,true);
  2966. }
  2967. };
  2968. D_AddPersonalWizard.F_ListView_OnItemClick=function(_241,_242,_243){
  2969. switch(_241.F_GetId()){
  2970. case "D_AddPersonalWizard_divListViewColumnDataitem":
  2971. this.F_SetEnableDataItemAttribute(true);
  2972. var _244=_241.F_GetSelectedListItem();
  2973. this.F_FindSelectItemInProcessResponse(_244);
  2974. this.F_UpdataDataItemAttributeCombox(this.m_iCurrentSelectItemAttribute);
  2975. break;
  2976. case "D_AddPersonalWizard_divNavigationList":
  2977. var _245=_242.getAttribute("value");
  2978. var _246=G_ResManager.F_GetString(_242.getAttribute("idsLabel"));
  2979. var _247=_241.F_GetListViewNode().selectSingleNode("listItems/listItem[@value='"+_245+"']");
  2980. this.F_GetDlgItem("divTitle").innerText=_246;
  2981. this.m_oDeck.F_SetIndex(U_XML.F_GetIndex(_247));
  2982. break;
  2983. case "D_AddPersonalWizard_divExternalItems":
  2984. case "D_AddPersonalWizard_divExistingItems":
  2985. this.f_LinkedList_OnItemClick(_241,_242,_243);
  2986. break;
  2987. }
  2988. };
  2989. D_AddPersonalWizard.F_Dialog_OnAfterHide=function(){
  2990. this.m_oLvColumns.F_Detach();
  2991. delete this.m_oLvColumns;
  2992. if(this.m_oLvColumnsDataItem){
  2993. this.m_oLvColumnsDataItem.F_Detach();
  2994. delete this.m_oLvColumnsDataItem;
  2995. }
  2996. this.m_oDeck.F_Detach();
  2997. delete this.m_oDeck;
  2998. this.m_oComboDataType.F_Detach();
  2999. delete this.m_oComboDataType;
  3000. this.m_oComboAggration.F_Detach();
  3001. delete this.m_oComboAggration;
  3002. this.m_oComboScale.F_Detach();
  3003. delete this.m_oComboScale;
  3004. this.m_oComboJoinFilterType.F_Detach();
  3005. delete this.m_oComboJoinFilterType;
  3006. if(this.m_oNavigationList){
  3007. this.m_oNavigationList.F_Detach();
  3008. delete this.m_oNavigationList;
  3009. }
  3010. if(this.m_oExistingQSList){
  3011. this.m_oExistingQSList.F_Detach();
  3012. delete this.m_oExistingQSList;
  3013. }
  3014. if(G_BrowserInfo.M_bIsIE){
  3015. this.m_divLinks.innerHTML="";
  3016. }else{
  3017. U_DOM.F_RemoveAllChildren(this.m_elSvg);
  3018. }
  3019. if(this.m_oExternalQSList){
  3020. this.m_oExternalQSList.F_Detach();
  3021. delete this.m_oExternalQSList;
  3022. }
  3023. if(this.m_oColExternalLink){
  3024. this.m_oColExternalLink.F_Detach();
  3025. delete this.m_oColExternalLink;
  3026. }
  3027. if(this.m_oColExistingLink){
  3028. this.m_oColExistingLink.F_Detach();
  3029. delete this.m_oColExistingLink;
  3030. }
  3031. if(this.m_oMenuPopupSet){
  3032. this.m_oMenuPopupSet.F_Detach();
  3033. delete this.m_oMenuPopupSet;
  3034. }
  3035. D_ChooseModelItem.F_ClearModelTree();
  3036. this.m_aLinks=[];
  3037. };
  3038. D_AddPersonalWizard.f_cleanupCanvases=function(){
  3039. if(this.m_oCanvas){
  3040. this.m_oCanvas.F_Detach();
  3041. delete this.m_oCanvas;
  3042. this.m_oCanvas=null;
  3043. }
  3044. if(this.m_aLinks&&this.m_aLinks.length){
  3045. for(var i=0;i<this.m_aLinks.length;i++){
  3046. if(this.m_aLinks[i]&&this.m_aLinks[i].M_elPolyLine){
  3047. this.m_aLinks[i].M_elPolyLine.F_Detach();
  3048. delete this.m_aLinks[i].M_elPolyLine;
  3049. this.m_aLinks[i].M_elPolyLine=null;
  3050. }
  3051. }
  3052. }
  3053. };
  3054. D_AddPersonalWizard.F_OnKeyPress=function(){
  3055. };
  3056. D_AddPersonalWizard.F_OnSpecifyNameKeyPress=function(e){
  3057. e=e||window.event;
  3058. if(e.ctrlKey){
  3059. return;
  3060. }
  3061. var _248=e.keyCode;
  3062. if(!G_BrowserInfo.M_bIsIE){
  3063. _248=e.charCode;
  3064. if(_248==0){
  3065. return;
  3066. }
  3067. }
  3068. var _249=String.fromCharCode(_248);
  3069. var _24a=/[#&"'\[\]]/;
  3070. if(_24a.test(_249)){
  3071. e.returnValue=false;
  3072. if(G_BrowserInfo.M_bIsIE){
  3073. e.keyCode=0;
  3074. }
  3075. e.cancelBubble=true;
  3076. if(G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  3077. F_MsgBox(G_ResManager.F_GetString("IDS_AC_INVALID_KEYSTROKE",_249));
  3078. }
  3079. }
  3080. };
  3081. D_AddPersonalWizard.f_GetFilePath=function(){
  3082. var _24b=this.F_GetDlgItem("inFileName").value;
  3083. if(G_BrowserInfo.M_bIsFirefox&&!this.f_IsGoodFilePath(_24b)){
  3084. try{
  3085. netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  3086. _24b=this.F_GetDlgItem("inFileName").value;
  3087. }
  3088. catch(e){
  3089. }
  3090. }
  3091. return _24b;
  3092. };
  3093. D_AddPersonalWizard.f_IsGoodFilePath=function(_24c){
  3094. return ((_24c.indexOf("C:\\fakepath\\")==-1)&&((_24c.split("\\").length>1)||(_24c.split("/").length>1)));
  3095. };
  3096. D_AddPersonalWizard.f_SelectFileChange=function(){
  3097. this.m_bExternalSourceChanged=true;
  3098. var _24d=this.f_GetFilePath();
  3099. var _24e=this.F_GetDlgItem("chkAlwaysTryToLoad");
  3100. if(this.f_IsGoodFilePath(_24d)){
  3101. _24e.disabled=false;
  3102. }else{
  3103. _24e.disabled=true;
  3104. _24e.checked=false;
  3105. }
  3106. var _24f=_24d.split(".");
  3107. var _250="";
  3108. if((_24f[_24f.length-1]=="xml")||(_24f[_24f.length-1]=="XML")){
  3109. _250="XML";
  3110. }else{
  3111. if((_24f[_24f.length-1]=="xls")||(_24f[_24f.length-1]=="XLS")){
  3112. _250="Excel2003";
  3113. }else{
  3114. if((_24f[_24f.length-1]=="xlsx")||(_24f[_24f.length-1]=="XLSX")){
  3115. _250="Excel2003";
  3116. }else{
  3117. if((_24f[_24f.length-1]=="csv")||(_24f[_24f.length-1]=="CSV")){
  3118. _250="CSV";
  3119. }else{
  3120. _250="CSV";
  3121. }
  3122. }
  3123. }
  3124. }
  3125. this.m_sQueryNameItem="yyy";
  3126. var _251=this.F_GetDlgItem("pdmForm");
  3127. var _252="<input><dataSet type=\""+_250+"\">";
  3128. _252+="<name>"+this.F_GetDlgItem("txtText").value.F_XMLEncode()+"</name>";
  3129. _252+="<sourcePath>"+_24d.F_XMLEncode()+"</sourcePath></dataSet>";
  3130. _252+="<baseModelSearchPath>"+this.m_sModelPath.F_XMLEncode()+"</baseModelSearchPath>";
  3131. _251.inSpec.value=_252+"</input>";
  3132. F_SubmitUpload(_251);
  3133. this.m_sFolderName="";
  3134. _251.action=G_CCHL.M_sGatewayURL+"/metadataUIService?pid=pdm_process&c=processPersonalData";
  3135. _251.submit();
  3136. D_Progress.F_Show(null,G_ResManager.F_GetString("IDS_LBL_PROCESSEXTERNALDATA"));
  3137. };
  3138. D_AddPersonalWizard.F_ProcessResponse=function(_253){
  3139. if(_253){
  3140. this.m_sProcessResponse=_253;
  3141. }
  3142. this.m_oPecXML=U_XML.F_LoadString(null,this.m_sProcessResponse);
  3143. if(this.m_oPecXML){
  3144. var _254=this.m_oPecXML.selectNodes("/pdSpec/dataSet/name").item(0);
  3145. _254.text=_254.text.F_XMLDecode();
  3146. this.m_sFolderName=_254.text;
  3147. }
  3148. this.f_updateButtonStates();
  3149. return this.m_oPecXML;
  3150. };
  3151. D_AddPersonalWizard.F_GetItemDataType=function(_255){
  3152. var _256=_255.getAttribute("datatype");
  3153. if(_256=="int32"){
  3154. return "Integer";
  3155. }
  3156. if(_256=="characterLength16"){
  3157. return "Text";
  3158. }
  3159. if(_256=="date"){
  3160. return "Date";
  3161. }
  3162. if(_256=="dateTime"){
  3163. return "DateTime";
  3164. }
  3165. if(_256=="decimal"){
  3166. return "Decimal";
  3167. }
  3168. if(_256=="float32"){
  3169. return "Decimal";
  3170. }
  3171. if(_256=="float64"){
  3172. return "Decimal";
  3173. }
  3174. if(_256=="boolean"){
  3175. return "Boolean";
  3176. }
  3177. if(_256=="int16"){
  3178. return "Integer";
  3179. }
  3180. if(_256=="int64"){
  3181. return "Integer";
  3182. }
  3183. return "unknown";
  3184. };
  3185. D_AddPersonalWizard.F_GetItemDataTypeLabel=function(_257){
  3186. return G_ResManager.F_GetString("IDS_PDA_DTYPE_"+this.F_GetItemDataType(_257));
  3187. };
  3188. D_AddPersonalWizard.F_SetItemAsIdentifier=function(_258){
  3189. var _259=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3190. var _25a=-1;
  3191. for(var i=0;i<_259.length;i++){
  3192. var _25b=_259.item(i).getAttribute("ID");
  3193. if(_25b==_258){
  3194. _25a=i;
  3195. break;
  3196. }
  3197. }
  3198. if(_25a==-1){
  3199. return;
  3200. }
  3201. _259.item(_25a).setAttribute("regularAggregate","unsupported");
  3202. _259.item(_25a).setAttribute("semiAggregate","unsupported");
  3203. _259.item(_25a).setAttribute("usage","identifier");
  3204. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3205. this.m_oComboAggration.F_SetEnabled(false);
  3206. };
  3207. D_AddPersonalWizard.f_resetItemData=function(_25c){
  3208. var _25d=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3209. var _25e=null;
  3210. var _25f=-1;
  3211. for(var i=0;i<_25d.length;i++){
  3212. var _260=_25d.item(i).getAttribute("ID");
  3213. if(_260==_25c){
  3214. _25f=i;
  3215. _25e=_25d.item(i);
  3216. break;
  3217. }
  3218. }
  3219. if(_25f==-1){
  3220. return;
  3221. }
  3222. var _261=this.F_GetItemDataType(_25e);
  3223. this.F_SetItemDataType(_25f,_261);
  3224. };
  3225. D_AddPersonalWizard.F_SetItemDataType=function(i,_262){
  3226. var _263=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3227. this.F_SetEnableDecimalDataItemAttribute(false);
  3228. if(_262=="Integer"){
  3229. _263.item(i).setAttribute("datatype","int32");
  3230. _263.item(i).setAttribute("regularAggregate","unsupported");
  3231. _263.item(i).setAttribute("semiAggregate","unsupported");
  3232. _263.item(i).setAttribute("usage","attribute");
  3233. _263.item(i).setAttribute("length","4");
  3234. _263.item(i).removeAttribute("scale");
  3235. _263.item(i).removeAttribute("precision");
  3236. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3237. this.m_oComboAggration.F_SetEnabled(true);
  3238. return;
  3239. }
  3240. if(_262=="Text"){
  3241. _263.item(i).setAttribute("datatype","characterLength16");
  3242. _263.item(i).setAttribute("regularAggregate","unsupported");
  3243. _263.item(i).setAttribute("semiAggregate","unsupported");
  3244. _263.item(i).setAttribute("usage","attribute");
  3245. _263.item(i).setAttribute("length","-1");
  3246. _263.item(i).removeAttribute("scale");
  3247. _263.item(i).removeAttribute("precision");
  3248. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3249. return;
  3250. }
  3251. if(_262=="Decimal"){
  3252. _263.item(i).setAttribute("datatype","decimal");
  3253. _263.item(i).setAttribute("regularAggregate","unsupported");
  3254. _263.item(i).setAttribute("semiAggregate","unsupported");
  3255. _263.item(i).setAttribute("usage","attribute");
  3256. _263.item(i).setAttribute("scale","2");
  3257. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3258. this.m_oComboScale.F_SelectByValue("2",true);
  3259. this.F_SetEnableDecimalDataItemAttribute(true);
  3260. return;
  3261. }
  3262. if(_262=="Date"){
  3263. _263.item(i).setAttribute("datatype","date");
  3264. _263.item(i).setAttribute("regularAggregate","unsupported");
  3265. _263.item(i).setAttribute("semiAggregate","unsupported");
  3266. _263.item(i).setAttribute("usage","attribute");
  3267. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3268. return;
  3269. }
  3270. if(_262=="DateTime"){
  3271. _263.item(i).setAttribute("datatype","dateTime");
  3272. _263.item(i).setAttribute("regularAggregate","unsupported");
  3273. _263.item(i).setAttribute("semiAggregate","unsupported");
  3274. _263.item(i).setAttribute("usage","attribute");
  3275. this.m_oComboAggration.F_SelectByValue("unsupported",true);
  3276. return;
  3277. }
  3278. };
  3279. D_AddPersonalWizard.F_GetItemAggregate=function(_264){
  3280. var vAgg=_264.getAttribute("regularAggregate");
  3281. if(vAgg!="unsupported"){
  3282. switch(vAgg){
  3283. case "sum":
  3284. return G_ResManager.F_GetString("IDS_TOPBOTTOM_SUM");
  3285. case "average":
  3286. return G_ResManager.F_GetString("IDS_SUMMARY_average");
  3287. case "automatic":
  3288. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_AUTO");
  3289. case "count":
  3290. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_COUNT");
  3291. case "maximum":
  3292. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_MAX");
  3293. case "minimum":
  3294. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_MIN");
  3295. case "median":
  3296. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_median");
  3297. case "countDistinct":
  3298. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_countDistinct");
  3299. case "countNoZero":
  3300. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_countNoZero");
  3301. case "variance":
  3302. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_variance");
  3303. case "standardDeviation":
  3304. return G_ResManager.F_GetString("IDS_PROPVAL_AGGR_standardDeviation");
  3305. }
  3306. }
  3307. return "";
  3308. };
  3309. D_AddPersonalWizard.F_SetItemAggregate=function(i,_265){
  3310. var _266=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3311. var _267=_266.item(i).getAttribute("usage");
  3312. if(_267!="identifier"){
  3313. if(_265=="unsupported"){
  3314. _266.item(i).setAttribute("usage","attribute");
  3315. }else{
  3316. _266.item(i).setAttribute("usage","fact");
  3317. }
  3318. }
  3319. _266.item(i).setAttribute("regularAggregate",_265);
  3320. _266.item(i).setAttribute("semiAggregate",_265);
  3321. };
  3322. D_AddPersonalWizard.F_GetItemScale=function(_268){
  3323. if(this.F_GetItemDataType(_268)=="Decimal"){
  3324. var _269=_268.getAttribute("scale");
  3325. if(_269){
  3326. return _269;
  3327. }
  3328. }
  3329. return "";
  3330. };
  3331. D_AddPersonalWizard.F_GetItemPrecision=function(_26a){
  3332. if(this.F_GetItemDataType(_26a)=="Decimal"){
  3333. var _26b=_26a.getAttribute("precision");
  3334. if(_26b){
  3335. return _26b;
  3336. }
  3337. }
  3338. return "";
  3339. };
  3340. D_AddPersonalWizard.F_SetDataItemAttributesList=function(){
  3341. if(this.m_sProcessResponse==""&&(!this.m_oPecXML)){
  3342. this.m_oLvColumnsDataItem.F_Clear();
  3343. this.m_oLvColumnsDataItem.F_Draw();
  3344. return;
  3345. }
  3346. var _26c=0;
  3347. var _26d=this.m_oLvColumns.F_GetCheckedListItems();
  3348. this.m_oLvColumnsDataItem.F_Clear();
  3349. var _26e=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3350. var _26f=null;
  3351. for(var i=0;i<_26e.length;i++){
  3352. var _270=_26e.item(i);
  3353. var _271=_270.getAttribute("name");
  3354. if(_26c>=_26d.length){
  3355. break;
  3356. }
  3357. if(_271==_26d.item(_26c).getAttribute("label")){
  3358. var _272;
  3359. _272=this.m_oLvColumnsDataItem.F_AppendNewListItem();
  3360. if(_26f==null){
  3361. _26f=_272;
  3362. }
  3363. _272.setAttribute("label",_271);
  3364. var _273=U_XML.F_AppendChild(_272,"subItem");
  3365. _273.setAttribute("label",this.F_GetItemDataTypeLabel(_270));
  3366. _273.setAttribute("serverDatatype",_270.getAttribute("datatype"));
  3367. U_XML.F_AppendChild(_272,"subItem").setAttribute("label",this.F_GetItemAggregate(_270));
  3368. if(this.F_GetItemScale(_270)!=null){
  3369. U_XML.F_AppendChild(_272,"subItem").setAttribute("label",this.F_GetItemScale(_270));
  3370. }else{
  3371. U_XML.F_AppendChild(_272,"subItem").setAttribute("label","");
  3372. }
  3373. _26c++;
  3374. }
  3375. }
  3376. this.m_oLvColumnsDataItem.F_Draw();
  3377. if(_26f){
  3378. this.m_oLvColumnsDataItem.F_SelectListItem(_26f,true);
  3379. }
  3380. };
  3381. D_AddPersonalWizard.F_SetColumnList=function(_274,_275){
  3382. var _276=this.m_bIsModify?_274:U_XML.F_LoadString(null,this.m_sProcessResponse);
  3383. this.m_aColumnsList=[];
  3384. var _277=_276.selectNodes("/pdSpec/personalData/item");
  3385. if(_275){
  3386. var _278=_276.selectNodes("/pdSpec/dataSet/accessDirectly").item(0);
  3387. if(_278){
  3388. this.F_GetDlgItem("chkAlwaysTryToLoad").checked=_278.text=="true";
  3389. }else{
  3390. this.F_GetDlgItem("chkAlwaysTryToLoad").checked=false;
  3391. }
  3392. }
  3393. var _279=_276.selectNodes("/pdSpec/dataSet/name").item(0);
  3394. if(_279){
  3395. this.F_GetDlgItem("txtText").value=_279.text.replace(/[#&"'\[\]]/g,"");
  3396. }
  3397. for(var i=0;i<_277.length;i++){
  3398. this.m_aColumnsList[i]=[];
  3399. var _27a=_277.item(i).getAttribute("name");
  3400. var _27b=_277.item(i).getAttribute("ID");
  3401. var _27c=_277.item(i).getAttribute("hidden");
  3402. this.m_aColumnsList[i].m_sLabel=_27a;
  3403. this.m_aColumnsList[i].m_sName=_27b;
  3404. if(_27c&&(_27c=="true")){
  3405. this.m_aColumnsList[i].m_sSelected="false";
  3406. }else{
  3407. this.m_aColumnsList[i].m_sSelected="true";
  3408. }
  3409. }
  3410. this.m_oLvColumns.F_Clear();
  3411. for(var i=0;i<this.m_aColumnsList.length;i++){
  3412. var _27d;
  3413. _27d=this.m_oLvColumns.F_AppendNewListItem();
  3414. _27d.setAttribute("label",this.m_aColumnsList[i].m_sLabel);
  3415. _27d.setAttribute("name",this.m_aColumnsList[i].m_sName);
  3416. _27d.setAttribute("checked",this.m_aColumnsList[i].m_sSelected);
  3417. }
  3418. this.m_oLvColumns.F_Draw();
  3419. };
  3420. D_AddPersonalWizard.F_OnSelectAll=function(){
  3421. this.m_oLvColumns.F_CheckAll();
  3422. this.m_oLvColumns.F_Draw();
  3423. };
  3424. D_AddPersonalWizard.F_OnDeselectAll=function(){
  3425. this.m_oLvColumns.F_UncheckAll();
  3426. this.m_oLvColumns.F_Draw();
  3427. };
  3428. D_AddPersonalWizard.F_ListView_OnDragStart=function(_27e,_27f,_280){
  3429. this.m_oDragInfo={};
  3430. this.m_oDragInfo.v_nSourceItem=_27f[0];
  3431. this.m_oDragInfo.v_oSourceList=_27e;
  3432. if(_27e==this.m_oExternalQSList){
  3433. this.m_oDragInfo.v_oTargetList=this.m_oExistingQSList;
  3434. }else{
  3435. this.m_oDragInfo.v_oTargetList=this.m_oExternalQSList;
  3436. }
  3437. G_DragDrop.F_Start(null,this,this.m_oDragInfo.v_nSourceItem,G_DragDrop.eEffectLink,_280);
  3438. };
  3439. D_AddPersonalWizard.F_OnDragCancel=function(){
  3440. this.m_oDragInfo.v_oTargetList.F_EndDragDropFeedback();
  3441. this.m_oDragInfo={};
  3442. };
  3443. D_AddPersonalWizard.F_OnDragDrop=function(e,_281,_282,_283){
  3444. this.m_oDragInfo.v_oTargetList.F_EndDragDropFeedback();
  3445. if(_282==G_DragDrop.eEffectNone){
  3446. return;
  3447. }
  3448. var _284=null;
  3449. var _285=this.m_oDragInfo.v_oTargetList.F_DragInfoHitTest(e.clientX,e.clientY);
  3450. if(_285&&_285.nNode!=null){
  3451. _284=_285.nNode;
  3452. }
  3453. if(_284==null||this.m_oDragInfo.v_nSourceItem==null){
  3454. return;
  3455. }
  3456. this.m_oDragInfo.v_oSourceList.F_SelectListItem(this.m_oDragInfo.v_nSourceItem,false);
  3457. this.m_oDragInfo.v_oTargetList.F_SelectListItem(_284,false);
  3458. this.F_NewLink();
  3459. };
  3460. D_AddPersonalWizard.F_OnDragOver=function(e,_286,_287,_288,_289){
  3461. var _28a=G_DragDrop.eEffectLink;
  3462. var _28b=this.m_oDragInfo.v_oTargetList.F_DragInfoHitTest(e.clientX,e.clientY);
  3463. if(_28b){
  3464. this.m_oDragInfo.v_oTargetList.F_SelectListItem(_28b.nNode,false);
  3465. }
  3466. return (_28a&_287);
  3467. };
  3468. D_AddPersonalWizard.F_OnDragStart=function(){
  3469. this.f_selectLink(-1);
  3470. this.m_oDragInfo.v_oSourceList.F_SelectListItem(this.m_oDragInfo.v_nSourceItem,false);
  3471. return true;
  3472. };
  3473. D_AddPersonalWizard.F_OnDragComplete=function(_28c){
  3474. this.m_oDragInfo={};
  3475. };
  3476. D_AddPersonalWizard.f_setSelectedIndexToFirstLink=function(){
  3477. if(this.m_aLinks&&this.m_aLinks.length){
  3478. for(var i=0;i<this.m_aLinks.length;i++){
  3479. if(this.m_aLinks[i]){
  3480. this.m_iSelectedLink=i;
  3481. return;
  3482. }
  3483. }
  3484. }
  3485. this.m_iSelectedLink=-1;
  3486. };
  3487. D_AddPersonalWizard.f_updateLinks=function(){
  3488. if(this.m_oCanvas){
  3489. this.m_oCanvas.F_Clear();
  3490. }
  3491. if(this.m_aLinks&&this.m_aLinks.length){
  3492. for(var i=0;i<this.m_aLinks.length;i++){
  3493. this.f_updateLink(this.m_aLinks[i],i);
  3494. }
  3495. }
  3496. };
  3497. D_AddPersonalWizard.f_updateLink=function(_28d,i){
  3498. if(!_28d){
  3499. return;
  3500. }
  3501. if(!_28d.M_nLeftListItem){
  3502. _28d.M_nLeftListItem=C_ListView.F_FindListItem(this.m_oExternalQSList.F_GetListViewNode(),"ID",_28d.M_sLeftDataItem);
  3503. }
  3504. if(!_28d.M_nRightListItem){
  3505. _28d.M_nRightListItem=C_ListView.F_FindListItem(this.m_oExistingQSList.F_GetListViewNode(),"_ref",_28d.M_sRightDataItem);
  3506. }
  3507. var d=document;
  3508. var _28e=d.getElementById(_28d.M_nLeftListItem.getAttribute("htmlId")).cells.item(0);
  3509. var _28f=_28e.offsetHeight;
  3510. var _290=U_XML.F_GetIndex(_28d.M_nLeftListItem);
  3511. var _291=U_XML.F_GetIndex(_28d.M_nRightListItem);
  3512. var _292=this.m_divLinks.offsetWidth;
  3513. var _293=_28f/2;
  3514. var _294=_28f*_290;
  3515. var _295=_28f*_291;
  3516. var _296=_294+_293-this.m_divLeft.scrollTop;
  3517. var _297=_295+_293-this.m_divRight.scrollTop;
  3518. var _296=this.m_divLeft.offsetTop+_294+_293-this.m_divLeft.scrollTop;
  3519. if(_296<this.m_divLeft.offsetTop){
  3520. _296=this.m_divLeft.offsetTop-_293;
  3521. }
  3522. if(_296>(this.m_divLeft.offsetTop+this.m_divLeft.offsetHeight)){
  3523. _296=this.m_divLeft.offsetTop+this.m_divLeft.offsetHeight+_293;
  3524. }
  3525. _296-=this.m_divLinks.offsetTop;
  3526. var _297=this.m_divRight.offsetTop+_295+_293-this.m_divRight.scrollTop;
  3527. if(_297<this.m_divRight.offsetTop){
  3528. _297=this.m_divRight.offsetTop-_293;
  3529. }
  3530. if(_297>(this.m_divRight.offsetTop+this.m_divRight.offsetHeight)){
  3531. _297=this.m_divRight.offsetTop+this.m_divRight.offsetHeight+_293;
  3532. }
  3533. _297-=this.m_divLinks.offsetTop;
  3534. if(!_28d.M_elPolyLine){
  3535. var fn=this.f_asyncSelectLink.F_CreateMethodCallback(this,i);
  3536. if(G_BrowserInfo.M_bIsIE){
  3537. _28d.M_elPolyLine=this.m_divLinks.appendChild(d.createElement("<v:polyline points=\"0px,0px,10px,10px,20px,20px,30px,30px\" strokecolor=\"#C0C0C0\" strokeweight=\"1px\" filled=\"false\" style=\"position:absolute\"></v:polyline>"));
  3538. _28d.M_elPolyLine.onmousedown=fn;
  3539. var _298="<v:rect strokecolor=\"#C0C0C0\" strokeweight=\"0px\" filled=\"true\" fillcolor=\"#C0C0C0\" style=\"position:absolute; left:0px; top:0px; width:8px; height:8px\"></v:rect>";
  3540. _28d.M_elLeftRect=this.m_divLinks.appendChild(d.createElement(_298));
  3541. _28d.M_elLeftRect.onmousedown=fn;
  3542. _28d.M_elRightRect=this.m_divLinks.appendChild(d.createElement(_298));
  3543. _28d.M_elRightRect.onmousedown=fn;
  3544. _28d.M_elRightRect.style.left=(_292-8)+"px";
  3545. }else{
  3546. _28d.M_elPolyLine=this.m_elSvg.appendChild(d.createElementNS("http://www.w3.org/2000/svg","polyline"));
  3547. _28d.M_elPolyLine.setAttribute("points","0,0 10,10 20,20 30,30");
  3548. _28d.M_elPolyLine.setAttribute("fill","none");
  3549. _28d.M_elPolyLine.setAttribute("stroke","#C0C0C0");
  3550. _28d.M_elPolyLine.setAttribute("stroke-width","1px");
  3551. _28d.M_elPolyLine.onmousedown=fn;
  3552. _28d.M_elLeftRect=this.m_elSvg.appendChild(d.createElementNS("http://www.w3.org/2000/svg","rect"));
  3553. _28d.M_elLeftRect.setAttribute("stroke","#C0C0C0");
  3554. _28d.M_elLeftRect.setAttribute("stroke-width","0px");
  3555. _28d.M_elLeftRect.setAttribute("fill","#C0C0C0");
  3556. _28d.M_elLeftRect.setAttribute("width","8px");
  3557. _28d.M_elLeftRect.setAttribute("height","8px");
  3558. _28d.M_elLeftRect.setAttribute("y","0");
  3559. _28d.M_elLeftRect.setAttribute("x","0");
  3560. _28d.M_elLeftRect.onmousedown=fn;
  3561. _28d.M_elRightRect=this.m_elSvg.appendChild(d.createElementNS("http://www.w3.org/2000/svg","rect"));
  3562. _28d.M_elRightRect.setAttribute("stroke","#C0C0C0");
  3563. _28d.M_elRightRect.setAttribute("stroke-width","0px");
  3564. _28d.M_elRightRect.setAttribute("fill","#C0C0C0");
  3565. _28d.M_elRightRect.setAttribute("width","8px");
  3566. _28d.M_elRightRect.setAttribute("height","8px");
  3567. _28d.M_elRightRect.setAttribute("y","0");
  3568. _28d.M_elRightRect.setAttribute("x",(_292-8).toString());
  3569. _28d.M_elRightRect.onmousedown=fn;
  3570. }
  3571. }
  3572. if(G_BrowserInfo.M_bIsIE){
  3573. _28d.M_elPolyLine.points.item(0).value="0px,"+_296+"px";
  3574. _28d.M_elPolyLine.points.item(1).value="16px,"+_296+"px";
  3575. _28d.M_elPolyLine.points.item(2).value=(_292-16)+"px,"+_297+"px";
  3576. _28d.M_elPolyLine.points.item(3).value=_292+"px,"+_297+"px";
  3577. _28d.M_elLeftRect.style.top=(_296-4)+"px";
  3578. _28d.M_elRightRect.style.top=(_297-4)+"px";
  3579. }else{
  3580. _28d.M_elPolyLine.setAttribute("points","0,"+_296+" "+"16,"+_296+" "+(_292-16)+","+_297+" "+_292+","+_297);
  3581. _28d.M_elLeftRect.setAttribute("y",(_296-4).toString());
  3582. _28d.M_elRightRect.setAttribute("y",(_297-4).toString());
  3583. }
  3584. };
  3585. D_AddPersonalWizard.f_isLineSelected=function(_299,v_iX,v_iY){
  3586. if(!_299){
  3587. return false;
  3588. }
  3589. return _299.M_elPolyLine.F_IsOnLine(v_iX,v_iY);
  3590. };
  3591. D_AddPersonalWizard.f_asyncSelectLink=function(i){
  3592. setTimeout(this.f_selectLink.F_CreateMethodCallback(this,i),0);
  3593. };
  3594. D_AddPersonalWizard.f_selectLink=function(i){
  3595. this.m_iSelectedLink=i;
  3596. this.f_showSelectedLink();
  3597. this.f_updateLinkButtons();
  3598. };
  3599. D_AddPersonalWizard.f_getLink=function(_29a,_29b){
  3600. if(this.m_aLinks&&this.m_aLinks.length){
  3601. for(var i=0;i<this.m_aLinks.length;i++){
  3602. var _29c=this.m_aLinks[i];
  3603. if((_29c.M_sLeftDataItem==_29a)&&(_29c.M_sRightDataItem==_29b)){
  3604. return _29c;
  3605. }
  3606. }
  3607. }
  3608. return null;
  3609. };
  3610. D_AddPersonalWizard.f_showSelectedLink=function(){
  3611. if(this.m_aLinks&&this.m_aLinks.length){
  3612. for(var i=0;i<this.m_aLinks.length;i++){
  3613. var _29d=this.m_aLinks[i];
  3614. if(_29d){
  3615. var _29e=(i==this.m_iSelectedLink)?"highlight":"#C0C0C0";
  3616. if(G_BrowserInfo.M_bIsIE){
  3617. _29d.M_elPolyLine.strokeweight=(i==this.m_iSelectedLink)?"3px":"1px";
  3618. _29d.M_elPolyLine.strokecolor=_29e;
  3619. _29d.M_elLeftRect.fillcolor=_29e;
  3620. _29d.M_elLeftRect.strokecolor=_29e;
  3621. _29d.M_elRightRect.fillcolor=_29e;
  3622. _29d.M_elRightRect.strokecolor=_29e;
  3623. }else{
  3624. _29d.M_elPolyLine.setAttribute("stroke-width",(i==this.m_iSelectedLink)?"4px":"2px");
  3625. _29d.M_elPolyLine.setAttribute("stroke",_29e);
  3626. _29d.M_elLeftRect.setAttribute("fill",_29e);
  3627. _29d.M_elLeftRect.setAttribute("stroke",_29e);
  3628. _29d.M_elRightRect.setAttribute("fill",_29e);
  3629. _29d.M_elRightRect.setAttribute("strokecolor",_29e);
  3630. }
  3631. }
  3632. }
  3633. if(this.m_iSelectedLink==-1){
  3634. this.m_oExternalQSList.F_ClearSelections();
  3635. this.m_oExistingQSList.F_ClearSelections();
  3636. }else{
  3637. var _29d=this.m_aLinks[this.m_iSelectedLink];
  3638. this.m_oExternalQSList.F_SelectListItem(C_ListView.F_FindListItem(this.m_oExternalQSList.F_GetListViewNode(),"ID",_29d.M_sLeftDataItem),false);
  3639. this.m_oExistingQSList.F_SelectListItem(C_ListView.F_FindListItem(this.m_oExistingQSList.F_GetListViewNode(),"_ref",_29d.M_sRightDataItem),false);
  3640. }
  3641. }
  3642. };
  3643. D_AddPersonalWizard.F_eraseLinks=function(_29f){
  3644. if(this.m_aLinks&&this.m_aLinks.length){
  3645. for(var i=this.m_aLinks.length-1;i>=0;i--){
  3646. var _2a0=this.m_aLinks[i];
  3647. if(_2a0){
  3648. _2a0.M_nLeftListItem=null;
  3649. _2a0.M_nRightListItem=null;
  3650. this.m_iSelectedLink=i;
  3651. if(_2a0.M_elPolyLine){
  3652. _2a0.M_elPolyLine.parentNode.removeChild(_2a0.M_elPolyLine);
  3653. _2a0.M_elLeftRect.parentNode.removeChild(_2a0.M_elLeftRect);
  3654. _2a0.M_elRightRect.parentNode.removeChild(_2a0.M_elRightRect);
  3655. _2a0.M_elPolyLine=null;
  3656. _2a0.M_elLeftRect=null;
  3657. _2a0.M_elRightRect=null;
  3658. }
  3659. if(_29f){
  3660. this.m_aLinks.splice(this.m_iSelectedLink,1);
  3661. }
  3662. }
  3663. }
  3664. }
  3665. };
  3666. D_AddPersonalWizard.F_ListView_OnScroll=function(_2a1){
  3667. if(_2a1==this.m_oExternalQSList||_2a1==this.m_oExistingQSList){
  3668. this.f_updateLinks();
  3669. }
  3670. };
  3671. D_AddPersonalWizard.F_AlignLinkTypes=function(_2a2){
  3672. var _2a3=_2a2.M_sLeftDataItem;
  3673. var _2a4=null;
  3674. var _2a5=this.m_oPecXML.selectNodes("/pdSpec/personalData/item");
  3675. var _2a6=-1;
  3676. for(var i=0;i<_2a5.length;i++){
  3677. var _2a7=_2a5.item(i).getAttribute("ID");
  3678. if(_2a7==_2a3){
  3679. _2a6=i;
  3680. break;
  3681. }
  3682. }
  3683. if(_2a6==-1){
  3684. return;
  3685. }
  3686. _2a4=_2a5.item(_2a6);
  3687. var _2a8=null;
  3688. if(this.m_nExistingReportExtract){
  3689. var nl=this.m_nExistingReportExtract.selectNodes("reportSubject/item");
  3690. var _2a9=nl.length;
  3691. var i=0;
  3692. for(i=0;i<_2a9;i++){
  3693. var n=nl.item(i);
  3694. if(_2a2.M_sRightDataItem==n.getAttribute("ID")){
  3695. _2a8=n;
  3696. break;
  3697. }
  3698. }
  3699. }
  3700. if(this.m_nExistingQSListItems){
  3701. var nl=this.m_nExistingQSListItems.selectNodes("queryItem | calculation");
  3702. var _2a9=nl.length;
  3703. var i=0;
  3704. for(i=0;i<_2a9;i++){
  3705. var n=nl.item(i);
  3706. if(_2a2.M_sRightDataItem==n.getAttribute("ID")){
  3707. _2a8=n;
  3708. break;
  3709. }
  3710. }
  3711. }
  3712. if(_2a8==null){
  3713. return;
  3714. }
  3715. var _2aa=this.F_GetItemDataType(_2a8);
  3716. var _2ab=this.F_GetItemDataType(_2a4);
  3717. if(_2aa!=_2ab){
  3718. if(((_2aa=="Integer")||(_2aa=="Text"))&&((_2ab=="Integer")||(_2ab=="Text"))){
  3719. this.F_SetItemDataType(_2a6,_2aa);
  3720. }
  3721. }
  3722. this.F_SetItemAsIdentifier(_2a2.M_sLeftDataItem);
  3723. };
  3724. D_AddPersonalWizard.f_LinkedList_OnItemClick=function(_2ac,_2ad,_2ae){
  3725. if(!G_BrowserInfo.M_bIsIE&&!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){
  3726. this.F_SetFocusToDefaultButton();
  3727. }
  3728. if(this.m_iSelectedLink==-1){
  3729. return;
  3730. }
  3731. if(_2ad.getAttribute("selectable")=="false"){
  3732. return;
  3733. }
  3734. var _2af=this.m_aLinks[this.m_iSelectedLink];
  3735. if(_2ac.F_GetId()=="D_AddPersonalWizard_divExternalItems"){
  3736. var _2b0=_2af.M_sLeftDataItem;
  3737. _2af.M_sLeftDataItem=_2ad.getAttribute("ID");
  3738. _2af.M_nLeftListItem=null;
  3739. if(this.f_countLinks(_2b0)<1){
  3740. this.f_resetItemData(_2b0);
  3741. }
  3742. }else{
  3743. _2af.M_sRightDataItem=_2ad.getAttribute("_ref");
  3744. _2af.M_nRightListItem=null;
  3745. }
  3746. this.F_AlignLinkTypes(_2af);
  3747. this.f_updateLink(_2af,this.m_iSelectedLink);
  3748. this.f_showSelectedLink();
  3749. this.m_bReadIncomingMappingOptions=true;
  3750. };
  3751. D_AddPersonalWizard.f_countLinks=function(_2b1){
  3752. var _2b2=0;
  3753. if(this.m_aLinks&&this.m_aLinks.length){
  3754. for(var i=this.m_aLinks.length-1;i>=0;i--){
  3755. var _2b3=this.m_aLinks[i];
  3756. if(_2b3&&(_2b3.M_sLeftDataItem==_2b1)){
  3757. _2b2++;
  3758. }
  3759. }
  3760. }
  3761. return _2b2;
  3762. };
  3763. D_AddPersonalWizard.f_onKeyDown=function(e){
  3764. if(this.m_oDeck.F_GetIndex()==D_AddPersonalWizard.K_iLinksPage){
  3765. e=e||window.event;
  3766. if((e.keyCode==U_DOM.K_iKeyDelete)&&(this.m_iSelectedLink!=-1)){
  3767. this.f_removeLink(this.m_iSelectedLink);
  3768. }
  3769. }
  3770. this.M_fnSuper_OnKeyDown(e);
  3771. };
  3772. D_AddPersonalWizard.f_removeLink=function(_2b4){
  3773. if(_2b4<0||_2b4>=this.m_aLinks.length){
  3774. return;
  3775. }
  3776. var _2b5=this.m_aLinks[_2b4];
  3777. _2b5.M_elPolyLine.parentNode.removeChild(_2b5.M_elPolyLine);
  3778. _2b5.M_elLeftRect.parentNode.removeChild(_2b5.M_elLeftRect);
  3779. _2b5.M_elRightRect.parentNode.removeChild(_2b5.M_elRightRect);
  3780. this.m_aLinks.splice(_2b4,1);
  3781. if(_2b4==this.m_iSelectedLink){
  3782. this.f_setSelectedIndexToFirstLink();
  3783. }
  3784. this.f_showSelectedLink();
  3785. this.f_updateLinkAttributes();
  3786. this.f_updateLinkButtons();
  3787. };
  3788. D_AddPersonalWizard.F_NewLink=function(){
  3789. var _2b6={};
  3790. var _2b7=this.m_oExternalQSList.F_GetSelectedListItem();
  3791. if(_2b7==null||this.m_iSelectedLink!=-1){
  3792. _2b7=C_ListView.F_FindListItemByIndex(this.m_oExternalQSList.F_GetListViewNode(),0);
  3793. }
  3794. _2b6.M_sLeftDataItem=_2b7.getAttribute("ID");
  3795. var _2b8=this.m_oExistingQSList.F_GetSelectedListItem();
  3796. if(_2b8==null||this.m_iSelectedLink!=-1){
  3797. var _2b9=this.m_oExistingQSList.F_GetListItems();
  3798. var _2ba=_2b9.length;
  3799. for(var i=0;i<_2ba;i++){
  3800. var _2bb=_2b9.item(i);
  3801. if(_2bb.getAttribute("selectable")!="false"){
  3802. _2b8=_2bb;
  3803. break;
  3804. }
  3805. }
  3806. if(_2b8==null){
  3807. return;
  3808. }
  3809. }
  3810. _2b6.M_sRightDataItem=_2b8.getAttribute("_ref");
  3811. this.m_aLinks.push(_2b6);
  3812. if(this.m_aLinks.length==1){
  3813. this.f_setDefaultLinkAttributes();
  3814. }
  3815. this.m_iSelectedLink=this.m_aLinks.length-1;
  3816. this.f_updateLink(_2b6,this.m_iSelectedLink);
  3817. this.F_AlignLinkTypes(_2b6);
  3818. this.f_showSelectedLink();
  3819. this.f_updateLinkButtons();
  3820. };
  3821. D_AddPersonalWizard.F_DeleteLink=function(){
  3822. if(this.m_iSelectedLink!=-1){
  3823. this.f_removeLink(this.m_iSelectedLink);
  3824. }
  3825. };
  3826. D_AddPersonalWizard.f_onExternalValueClicked=function(){
  3827. if(this.m_radAllValUniqueExternal.checked==true){
  3828. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExisting,true);
  3829. }else{
  3830. if(this.m_radMorethanOnceExternal.checked==true){
  3831. this.m_radAllValUniqueExisting.checked=true;
  3832. this.m_radMorethanOnceExisting.checked=false;
  3833. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExisting,false);
  3834. }
  3835. }
  3836. this.f_updateMappingControlStates();
  3837. };
  3838. D_AddPersonalWizard.f_onExistingValueClicked=function(){
  3839. if(this.m_radAllValUniqueExisting.checked==true){
  3840. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExternal,true);
  3841. }else{
  3842. if(this.m_radMorethanOnceExisting.checked==true){
  3843. this.m_radAllValUniqueExternal.checked=true;
  3844. this.m_radMorethanOnceExternal.checked=false;
  3845. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExternal,false);
  3846. }
  3847. }
  3848. this.f_updateMappingControlStates();
  3849. };
  3850. D_AddPersonalWizard.f_updateMappingControlStates=function(){
  3851. var _2bc=D_AddPersonalWizard.K_iOneToOne;
  3852. var _2bd=D_AddPersonalWizard.K_iOneToOne;
  3853. if(this.m_radAllValUniqueExternal.checked==true){
  3854. if(this.m_radExternalExcludeMissingValues.checked==true){
  3855. _2bc=D_AddPersonalWizard.K_iOneToOne;
  3856. }else{
  3857. _2bc=D_AddPersonalWizard.K_iOptToOne;
  3858. }
  3859. }else{
  3860. if(this.m_radExternalExcludeMissingValues.checked==true){
  3861. _2bc=D_AddPersonalWizard.K_iOneToMany;
  3862. }else{
  3863. _2bc=D_AddPersonalWizard.K_iOptToMany;
  3864. }
  3865. }
  3866. if(this.m_radAllValUniqueExisting.checked==true){
  3867. if(this.m_radExistingExcludeMissingValues.checked==true){
  3868. _2bd=D_AddPersonalWizard.K_iOneToOne;
  3869. }else{
  3870. _2bd=D_AddPersonalWizard.K_iOptToOne;
  3871. }
  3872. }else{
  3873. if(this.m_radExistingExcludeMissingValues.checked==true){
  3874. _2bd=D_AddPersonalWizard.K_iOneToMany;
  3875. }else{
  3876. _2bd=D_AddPersonalWizard.K_iOptToMany;
  3877. }
  3878. }
  3879. this.m_spanExternalCardinality.innerHTML=this.m_nlCardinalityLabels.item(_2bc).getAttribute("label");
  3880. this.m_spanExistingCardinality.innerHTML=this.m_nlCardinalityLabels.item(_2bd).getAttribute("label");
  3881. this.m_spanExternalCardinality.style.visibility=this.m_spanExternalCardinality.innerHTML?"visible":"hidden";
  3882. this.m_spanExistingCardinality.style.visibility=this.m_spanExistingCardinality.innerHTML?"visible":"hidden";
  3883. };
  3884. D_AddPersonalWizard.f_updateLinkAttributes=function(_2be){
  3885. this.m_oColExternalLink.F_Clear();
  3886. this.m_oColExistingLink.F_Clear();
  3887. if(this.m_aLinks&&(this.m_aLinks.length)&&(this.m_aLinks.length>0)){
  3888. this.m_aTipText[D_AddPersonalWizard.K_iLinkAttribPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_SELECT_MAPPINGOPTIONS";
  3889. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExisting,true);
  3890. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExternal,true);
  3891. U_DOM.F_SetRadioButtonEnabled(this.m_radAllValUniqueExisting,true);
  3892. U_DOM.F_SetRadioButtonEnabled(this.m_radAllValUniqueExternal,true);
  3893. U_DOM.F_SetRadioButtonEnabled(this.m_radExternalExcludeMissingValues,true);
  3894. U_DOM.F_SetRadioButtonEnabled(this.m_radExternalIncludeMissingValues,true);
  3895. U_DOM.F_SetRadioButtonEnabled(this.m_radExistingExcludeMissingValues,true);
  3896. U_DOM.F_SetRadioButtonEnabled(this.m_radExistingIncludeMissingValues,true);
  3897. this.f_updateLinks();
  3898. for(var i=0;i<this.m_aLinks.length;i++){
  3899. var _2bf;
  3900. var _2c0=this.m_aLinks[i];
  3901. _2bf=this.m_oColExternalLink.F_AppendNewListItem();
  3902. _2bf.setAttribute("label",_2c0.M_nLeftListItem.getAttribute("label"));
  3903. _2bf.setAttribute("selectable","false");
  3904. var _2c1=this.m_oColExistingLink.F_AppendNewListItem();
  3905. _2c1.setAttribute("label",_2c0.M_nRightListItem.getAttribute("label"));
  3906. _2c1.setAttribute("selectable","false");
  3907. }
  3908. this.m_oColExternalLink.F_Draw();
  3909. this.m_oColExistingLink.F_Draw();
  3910. }else{
  3911. if(!this.m_bReadIncomingMappingOptions){
  3912. this.m_aTipText[D_AddPersonalWizard.K_iLinkAttribPage]="IDS_WIZ_ADDPERSONAL_SUBTITLE_DISABLED_MAPPINGOPTIONS";
  3913. this.m_radMorethanOnceExisting.checked=false;
  3914. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExisting,false);
  3915. this.m_radMorethanOnceExternal.checked=false;
  3916. U_DOM.F_SetRadioButtonEnabled(this.m_radMorethanOnceExternal,false);
  3917. this.m_radAllValUniqueExisting.checked=false;
  3918. U_DOM.F_SetRadioButtonEnabled(this.m_radAllValUniqueExisting,false);
  3919. this.m_radAllValUniqueExternal.checked=false;
  3920. U_DOM.F_SetRadioButtonEnabled(this.m_radAllValUniqueExternal,false);
  3921. this.m_radExternalExcludeMissingValues.checked=false;
  3922. U_DOM.F_SetRadioButtonEnabled(this.m_radExternalExcludeMissingValues,false);
  3923. this.m_radExternalIncludeMissingValues.checked=false;
  3924. U_DOM.F_SetRadioButtonEnabled(this.m_radExternalIncludeMissingValues,false);
  3925. this.m_radExistingExcludeMissingValues.checked=false;
  3926. U_DOM.F_SetRadioButtonEnabled(this.m_radExistingExcludeMissingValues,false);
  3927. this.m_radExistingIncludeMissingValues.checked=false;
  3928. U_DOM.F_SetRadioButtonEnabled(this.m_radExistingIncludeMissingValues,false);
  3929. this.m_spanExternalCardinality.innerHTML="";
  3930. this.m_spanExistingCardinality.innerHTML="";
  3931. this.m_spanExternalCardinality.style.visibility="hidden";
  3932. this.m_spanExistingCardinality.style.visibility="hidden";
  3933. this.m_oColExternalLink.F_Draw();
  3934. this.m_oColExistingLink.F_Draw();
  3935. this.f_updateTipText(this.m_nCurrentCard);
  3936. return;
  3937. }
  3938. }
  3939. if(_2be){
  3940. var _2c2=_2be.selectSingleNode("pdSpec/relationship/sourceCardinality/maxCard");
  3941. if(_2c2&&_2c2.text=="many"){
  3942. this.m_radAllValUniqueExternal.checked=false;
  3943. this.m_radMorethanOnceExternal.checked=true;
  3944. }else{
  3945. this.m_radAllValUniqueExternal.checked=true;
  3946. this.m_radMorethanOnceExternal.checked=false;
  3947. }
  3948. var _2c3=_2be.selectSingleNode("pdSpec/relationship/sourceCardinality/minCard");
  3949. if(_2c3&&_2c3.text=="zero"){
  3950. this.m_radExternalExcludeMissingValues.checked=false;
  3951. this.m_radExternalIncludeMissingValues.checked=true;
  3952. }else{
  3953. this.m_radExternalExcludeMissingValues.checked=true;
  3954. this.m_radExternalIncludeMissingValues.checked=false;
  3955. }
  3956. var _2c4=_2be.selectSingleNode("pdSpec/relationship/targetCardinality/maxCard");
  3957. if(_2c4&&_2c4.text=="many"){
  3958. this.m_radAllValUniqueExisting.checked=false;
  3959. this.m_radMorethanOnceExisting.checked=true;
  3960. }else{
  3961. this.m_radAllValUniqueExisting.checked=true;
  3962. this.m_radMorethanOnceExisting.checked=false;
  3963. }
  3964. var _2c5=_2be.selectSingleNode("pdSpec/relationship/targetCardinality/minCard");
  3965. if(_2c5&&_2c5.text=="zero"){
  3966. this.m_radExistingExcludeMissingValues.checked=false;
  3967. this.m_radExistingIncludeMissingValues.checked=true;
  3968. }else{
  3969. this.m_radExistingExcludeMissingValues.checked=true;
  3970. this.m_radExistingIncludeMissingValues.checked=false;
  3971. }
  3972. }
  3973. this.f_updateTipText(this.m_nCurrentCard);
  3974. this.f_updateMappingControlStates();
  3975. };
  3976. D_AddPersonalWizard.f_setDefaultLinkAttributes=function(){
  3977. this.m_radAllValUniqueExternal.checked=true;
  3978. this.m_radMorethanOnceExternal.checked=false;
  3979. this.m_radAllValUniqueExisting.checked=true;
  3980. this.m_radMorethanOnceExisting.checked=false;
  3981. this.m_radExternalExcludeMissingValues.checked=true;
  3982. this.m_radExternalIncludeMissingValues.checked=false;
  3983. this.m_radExistingExcludeMissingValues.checked=true;
  3984. this.m_radExistingIncludeMissingValues.checked=false;
  3985. };
  3986. var G_ContentManager={};
  3987. G_ContentManager.m_sLastDocumentRequest="";
  3988. G_ContentManager.m_sLastDocumentResponse="";
  3989. G_ContentManager.K_eTypeReport="report";
  3990. G_ContentManager.K_eTypeReportTemplate="reportTemplate";
  3991. G_ContentManager.K_eTypeInteractiveReport="interactiveReport";
  3992. G_ContentManager.F_GetLastDocumentRequest=function(){
  3993. return this.m_sLastDocumentRequest;
  3994. };
  3995. G_ContentManager.F_GetLastDocumentResponse=function(){
  3996. return this.m_sLastDocumentResponse;
  3997. };
  3998. G_ContentManager.F_GetReportType=function(){
  3999. if(U_Report.F_IsApplication(G_ReportSpec.F_GetReportNode())){
  4000. return G_ContentManager.K_eTypeInteractiveReport;
  4001. }else{
  4002. if(G_ReportSpec.F_IsTemplate()){
  4003. return G_ContentManager.K_eTypeReportTemplate;
  4004. }else{
  4005. return G_ContentManager.K_eTypeReport;
  4006. }
  4007. }
  4008. };
  4009. G_ContentManager.F_ValidateName=function(_2c6){
  4010. if(!_2c6){
  4011. F_MsgBoxRes("IDS_FILENAME_EMPTY");
  4012. return false;
  4013. }
  4014. switch(_2c6){
  4015. case "~":
  4016. case "~~":
  4017. F_MsgBoxRes("IDS_SQUIGGLE_NAME");
  4018. return false;
  4019. }
  4020. return true;
  4021. };
  4022. G_ContentManager.F_PromptForNewFolder=function(_2c7,_2c8,_2c9){
  4023. D_InputBox.F_SelectDefaultText(true);
  4024. D_InputBox.F_Show(_2c7,G_ResManager.F_GetString("IDS_LBL_NAME"),G_ResManager.F_GetString("IDS_TITLE_NEWFOLDER"),_2c8,null,function(){
  4025. var s=D_InputBox.F_GetText();
  4026. if(s){
  4027. _2c9(s);
  4028. }
  4029. });
  4030. };
  4031. G_ContentManager.F_PromptForRename=function(_2ca,_2cb,_2cc){
  4032. D_InputBox.F_SelectDefaultText(true);
  4033. D_InputBox.F_Show(_2ca,G_ResManager.F_GetString("IDS_LBL_NAME"),G_ResManager.F_GetString("IDS_TITLE_RENAME"),_2cb,null,function(){
  4034. var s=D_InputBox.F_GetText();
  4035. if(s){
  4036. _2cc(s);
  4037. }
  4038. });
  4039. };
  4040. G_ContentManager.F_ConfirmDelete=function(_2cd,_2ce,_2cf){
  4041. D_MsgBox.F_Show(_2cd,G_ResManager.F_GetString("IDS_MSG_CONFIRMDELETE"),null,D_MsgBox.K_iWarning,D_MsgBox.K_iOKCancel,_2cf);
  4042. };
  4043. G_ContentManager.F_SendPaperSizesRequest=function(_2d0,_2d1){
  4044. if(this.m_nPaperSizesResponse){
  4045. _2d1.F_ContentManager_OnPaperSizesLoaded();
  4046. return;
  4047. }
  4048. var _2d2="<bus:query>"+"<search>/configuration/pageDefinition</search>"+"<properties xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:propEnum[]\">"+"<item>defaultName</item>"+"<item>searchPath</item>"+"<item>width</item>"+"<item>height</item>"+"<item>unit</item>"+"</properties>"+"</bus:query>";
  4049. var _2d3=C_BusRequest.F_CreateContext(this.e_RequestPaperSize);
  4050. _2d3.m_oListener=_2d1;
  4051. var _2d4=new C_BusRequest(this,C_BusRequest.K_sSOAPAction_contentManagerService,_2d2);
  4052. _2d4.F_SetContext(_2d3);
  4053. D_Progress.F_SendRequest(_2d4,_2d0,G_ResManager.F_GetString("IDS_MSG_LOADING_PAGESIZES"));
  4054. };
  4055. G_ContentManager.e_RequestPaperSize=1;
  4056. G_ContentManager.F_Request_OnComplete=function(_2d5){
  4057. var _2d6=_2d5.F_GetError();
  4058. if(_2d6){
  4059. F_ShowError(_2d6);
  4060. }
  4061. var _2d7=_2d5.F_GetContext();
  4062. var _2d8=_2d5.F_GetResponse();
  4063. switch(_2d7.m_eType){
  4064. case this.e_RequestPaperSize:
  4065. this.m_nPaperSizesResponse=_2d8?_2d8.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/queryResult"):null;
  4066. _2d7.m_oListener.F_ContentManager_OnPaperSizesLoaded();
  4067. break;
  4068. }
  4069. };
  4070. G_ContentManager.F_GetPaperSizeLabel=function(_2d9){
  4071. if(this.m_nPaperSizesResponse){
  4072. var n=this.m_nPaperSizesResponse.selectSingleNode("item[searchPath/value/text()="+_2d9.F_ToXPathString()+"]/defaultName/value");
  4073. if(n){
  4074. return n.text;
  4075. }
  4076. }
  4077. return _2d9;
  4078. };
  4079. G_ContentManager.F_AddPaperSizesToListView=function(_2da,_2db){
  4080. U_Utils.F_AddDefaultListItem(_2da.F_GetListViewNode());
  4081. if(_2db){
  4082. var _2dc=_2da.F_AppendNewListItem();
  4083. _2dc.setAttribute("idsLabel","IDS_PROPVAL_CUSTOM");
  4084. _2dc.setAttribute("value","custom");
  4085. }
  4086. if(this.m_nPaperSizesResponse){
  4087. var nl=this.m_nPaperSizesResponse.selectNodes("item");
  4088. for(var i=0;i<nl.length;++i){
  4089. var _2dd=nl.item(i);
  4090. var _2de=_2dd.selectSingleNode("defaultName/value").text;
  4091. var _2df=_2dd.selectSingleNode("searchPath/value").text;
  4092. var _2dc=_2da.F_AppendNewListItem();
  4093. _2dc.setAttribute("label",_2de);
  4094. _2dc.setAttribute("value",_2df);
  4095. _2dc.setAttribute("width",_2dd.selectSingleNode("width/value").text);
  4096. _2dc.setAttribute("height",_2dd.selectSingleNode("height/value").text);
  4097. _2dc.setAttribute("unit",_2dd.selectSingleNode("unit/value").text);
  4098. }
  4099. }
  4100. };
  4101. G_ContentManager.F_CreateGetConnectionsRequest=function(_2e0){
  4102. var _2e1="<bus:query>"+"<search>//dataSource[@shown='true'][permission('read') or permission('write') or permission('traverse') or permission('execute')]</search>"+"<sortBy xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:sort[1]\">"+"<item xsi:type=\"bus:sort\">"+"<propName xsi:type=\"bus:propEnum\">defaultName</propName>"+"<order xsi:type=\"bus:orderEnum\">ascending</order>"+"</item>"+"</sortBy>"+"<properties xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:propEnum[]\">"+"<item>defaultName</item>"+"</properties>"+"</bus:query>";
  4103. return new C_BusRequest(_2e0,C_BusRequest.K_sSOAPAction_contentManagerService,_2e1);
  4104. };
  4105. G_ContentManager.F_ProcessCmResponse=function(_2e2){
  4106. return _2e2?_2e2.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/queryResult"):null;
  4107. };
  4108. G_ContentManager.F_CreateSaveDocumentRequest=function(_2e3,_2e4,_2e5,_2e6,_2e7,_2e8,_2e9){
  4109. var _2ea="bus:"+_2e7;
  4110. var _2eb=U_Report.F_GetXML(_2e4);
  4111. var _2ec="";
  4112. if(_2e8){
  4113. _2ec="<rns1:add>"+"<parentPath>"+_2e5.F_XMLEncode()+"</parentPath>"+"<object xsi:type=\""+_2ea+"\">"+"<defaultName>"+"<value xsi:type=\"xsd:string\">"+_2e6.F_XMLEncode()+"</value>"+"</defaultName>"+"<specification>"+"<value xsi:type=\"xsd:string\" xml:space=\"preserve\">"+_2eb.F_XMLEncode()+"</value>"+"</specification>"+"<parameters xsi:type=\"bus:parameterValueArrayProp\" SOAP-ENC:arrayType=\"bus:parameterValue[]\">"+"<value xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:parameterValue[]\"/>"+"</parameters>"+"</object>"+"<options xsi:type=\"bus:addOptions\">"+"<updateAction xsi:type=\"bus:updateActionEnum\">"+(_2e9?"fail":"replace")+"</updateAction>"+"</options>"+"</rns1:add>";
  4114. }else{
  4115. var _2ed=(_2e6.indexOf("\"")==-1)?"\"":"'";
  4116. _2ec="<rns1:update>"+"<object xsi:type=\""+_2ea+"\">"+"<searchPath>"+"<value xsi:type=\"xsd:string\">"+_2e5.F_XMLEncode()+"/"+_2e7+"[@name="+_2ed+_2e6.F_XMLEncode()+_2ed+"]</value>"+"</searchPath>"+"<specification>"+"<value xsi:type=\"xsd:string\" xml:space=\"preserve\">"+_2eb.F_XMLEncode()+"</value>"+"</specification>"+"<parameters xsi:type=\"bus:parameterValueArrayProp\" SOAP-ENC:arrayType=\"bus:parameterValue[]\">"+"<value xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:parameterValue[]\"/>"+"</parameters>"+"</object>"+"<options xsi:type=\"bus:updateOptions\"/>"+"</rns1:update>";
  4117. }
  4118. G_ContentManager.m_sLastDocumentRequest=_2ec;
  4119. G_ContentManager.m_sLastDocumentResponse="";
  4120. return new C_BusRequest(_2e3,C_BusRequest.K_sSOAPAction_reportService,_2ec);
  4121. };
  4122. function C_AddCMObjectRequest(_2ee,_2ef,_2f0,_2f1,_2f2,_2f3){
  4123. this.m_sNewPath="";
  4124. var _2f4="";
  4125. if(!_2f2){
  4126. _2f2="fail";
  4127. }
  4128. if(_2f3){
  4129. _2f4="<specification xsi:type=\"bus:anyTypeProp\">"+"<value xsi:type=\"xsd:string\">"+_2f3.F_XMLEncode()+"</value>"+"</specification>";
  4130. }
  4131. var _2f5="<bus:add>"+"<search>"+_2ef.F_XMLEncode()+"</search>"+"<objects SOAP-ENC:arrayType=\"bus:baseClass[1]\">"+"<item xsi:type=\""+_2f1+"\">"+"<defaultName xsi:type=\"bus:stringProp\">"+"<value xsi:type=\"xsd:string\">"+_2f0.F_XMLEncode()+"</value>"+"</defaultName>"+_2f4+"</item>"+"</objects>"+"<options xsi:type=\"bus:addOptions\">"+"<updateAction xsi:type=\"bus:updateActionEnum\">"+_2f2+"</updateAction>"+"</options>"+"</bus:add>";
  4132. G_ContentManager.m_sLastDocumentRequest=_2f5;
  4133. G_ContentManager.m_sLastDocumentResponse="";
  4134. this.F_ConstructBaseClass(_2ee,C_BusRequest.K_sSOAPAction_contentManagerService,_2f5);
  4135. };
  4136. C_AddCMObjectRequest.F_Extends(C_BusRequest);
  4137. C_AddCMObjectRequest.prototype.F_GetNewPath=function(){
  4138. return this.m_sNewPath;
  4139. };
  4140. C_AddCMObjectRequest.prototype.F_ProcessResponse=function(){
  4141. C_AddCMObjectRequest.superClass.F_ProcessResponse.call(this);
  4142. var _2f6=this.F_GetResponse();
  4143. if(_2f6){
  4144. var _2f7=_2f6.selectSingleNode(".//addResult/item/searchPath/value");
  4145. this.m_sNewPath=_2f7.text;
  4146. }
  4147. };
  4148. G_ContentManager.F_CreateRenameObjectRequest=function(_2f8,_2f9,_2fa,_2fb){
  4149. if(_2fa=="folder"){
  4150. var _2fc="<bus:update>"+"<objects xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"bus:baseClass[1]\">"+"<item xsi:type=\"bus:"+_2fa+"\">"+"<defaultName>"+"<value xsi:type=\"xsd:string\">"+_2fb.F_XMLEncode()+"</value>"+"</defaultName>"+"<bus:searchPath>"+"<value xsi:type=\"xsd:string\">"+_2f9.F_XMLEncode()+"</value>"+"</bus:searchPath>"+"</item>"+"</objects>"+"<options xsi:type=\"bus:updateOptions\"/>"+"</bus:update>";
  4151. G_ContentManager.m_sLastDocumentRequest=_2fc;
  4152. G_ContentManager.m_sLastDocumentResponse="";
  4153. return new C_BusRequest(_2f8,C_BusRequest.K_sSOAPAction_contentManagerService,_2fc);
  4154. }
  4155. var _2fc="<bus:update>"+"<object xsi:type=\"bus:"+_2fa+"\">"+"<searchPath>"+"<value xsi:type=\"xsd:string\">"+_2f9.F_XMLEncode()+"</value>"+"</searchPath>"+"<defaultName>"+"<value xsi:type=\"xsd:string\">"+_2fb.F_XMLEncode()+"</value>"+"</defaultName>"+"</object>"+"<options xsi:type=\"bus:updateOptions\"/>"+"</bus:update>";
  4156. G_ContentManager.m_sLastDocumentRequest=_2fc;
  4157. G_ContentManager.m_sLastDocumentResponse="";
  4158. return new C_BusRequest(_2f8,C_BusRequest.K_sSOAPAction_reportService,_2fc);
  4159. };
  4160. G_ContentManager.F_CreateDeleteObjectRequest=function(_2fd,_2fe){
  4161. var _2ff="<bus:delete>"+"<search>"+_2fe.F_XMLEncode()+"</search>"+"<options xsi:type=\"bus:deleteOptions\">"+"<force xsi:type=\"xsd:boolean\">true</force>"+"<recursive xsi:type=\"xsd:boolean\">true</recursive>"+"</options>"+"</bus:delete>";
  4162. G_ContentManager.m_sLastDocumentRequest=_2ff;
  4163. G_ContentManager.m_sLastDocumentResponse="";
  4164. return new C_BusRequest(_2fd,C_BusRequest.K_sSOAPAction_contentManagerService,_2ff);
  4165. };
  4166. G_ContentManager.F_UpdateRequestSucceed=function(_300){
  4167. G_ContentManager.m_sLastDocumentResponse=_300?_300.xml:"";
  4168. return (_300!=null);
  4169. };
  4170. var G_Model=new C_ModelCache();
  4171. G_Model.m_aListeners=[];
  4172. G_Model.F_ReloadModel=function(_301){
  4173. if(!this.F_ModelEnabled()){
  4174. return;
  4175. }
  4176. if(this.F_GetModelRootResponses()){
  4177. this.F_ClearModelCache();
  4178. }
  4179. this.m_aListeners.F_CallEach("F_Model_OnLoad");
  4180. var _302=new C_ModelRootRequest(this,this);
  4181. _302.F_SetContext(_301);
  4182. D_Progress.F_SendRequest(_302,null,G_ResManager.F_GetString("IDS_MSG_LOADING_MODEL"),G_UserDataSettings.F_GetValue("LoadingModelDialogDelay"));
  4183. };
  4184. G_Model.F_Request_OnComplete=function(_303){
  4185. switch(_303.constructor){
  4186. case C_ModelRootRequest:
  4187. this.m_aListeners.F_CallEach("F_Model_OnLoadComplete");
  4188. var _304=_303.F_GetError();
  4189. var _305=_303.F_GetContext();
  4190. if(_304){
  4191. F_ShowError(_304,_305);
  4192. return;
  4193. }
  4194. if(_305){
  4195. _305();
  4196. }
  4197. break;
  4198. }
  4199. };
  4200. G_Model.F_Request_OnAborted=function(_306){
  4201. this.m_aListeners.F_CallEach("F_Model_OnAbortLoad");
  4202. };
  4203. G_Model.F_AddListener=function(_307){
  4204. this.m_aListeners.push(_307);
  4205. };
  4206. G_Model.F_RemoveListener=function(_308){
  4207. this.m_aListeners.F_RemoveItem(_308);
  4208. };
  4209. G_Model.F_CreateSharedSetsReportRequest=function(_309,_30a,_30b,_30c){
  4210. return new C_SharedSetsStoreIDAndPathReportRequest(_309,_30a,_30b,_30c);
  4211. };
  4212. G_Model.f_getAllSharedSetsPackagesAndReports=function(_30d){
  4213. return U_SharedSets.F_GetAllModelsAndReports();
  4214. };
  4215. G_Model.f_setAllSharedSetsPackagesAndReports=function(_30e){
  4216. G_UserDataSettings.F_SetValue("SharedSetsCache",_30e.F_GetSharedSetsDoc().xml,false);
  4217. };
  4218. G_Model.F_GetSharedSetProperties=function(d){
  4219. return U_SharedSets.F_GetSharedSetProperties(d.documentElement);
  4220. };