123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125 |
- /****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: mdsrv
- **
- ** (C) Copyright IBM Corp. 2008, 2010
- **
- ** US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *****************************************************************/
- if(!IMPORT_UTIL){
- var IMPORT_UTIL={};
- }
- IMPORT_UTIL.KEYCODE_SPACEBAR=32;
- IMPORT_UTIL.KEYCODE_ENTER=13;
- function URLRequestInvoker(){
- };
- URLRequestInvoker.prototype.MakeAsyncRequestInIFrame=function(_1,_2){
- var _3=document.getElementById("debuggingPane");
- if(_3&&_3.style.display!="none"){
- var _4="";
- for(var p in _2){
- _4+="<b>"+p+"</b> = "+_2[p]+"<br>\n";
- }
- _3.innerHTML="<u><b>URL</b></u>: "+_1+"<br><br>"+"<u><b>POST Data</b></u>: <pre>"+_4+"</pre>\n\n";
- }
- var _6=document.getElementById("communicationIFramePlaceholder");
- if(!_6){
- _6=document.createElement("div");
- _6.setAttribute("id","communicationIFramePlaceholder");
- document.body.appendChild(_6);
- }
- _6.innerHTML="<iframe id=\"communicationIFrame\" name=\"communicationIFrame\" title=\"communicationIFrame\" width=\"1000\" height=\"200\" "+"frameborder=\"0\" style=\"display: none; margin-top: 50px; border: 1px dotted darkgray; \">\n"+"This browser does not support iframes!\n"+"</iframe>\n";
- var _7=document.getElementById("communicationIFrame");
- var _8=_7.contentWindow.document;
- if(_8.body==null){
- var _9=_8.createElement("body");
- _8.appendChild(_9);
- }
- this.InvokeUrlThroughPostRequest(_1,_2,_8);
- };
- URLRequestInvoker.prototype.MakeAsyncRequestInIFrame2=function(_a,_b){
- var _c=document.getElementById("debuggingPane");
- if(_c&&_c.style.display!="none"){
- var _d="";
- for(var p in _b){
- _d+="<b>"+p+"</b> = "+_b[p]+"<br>\n";
- }
- _c.innerHTML="<u><b>URL</b></u>: "+_a+"<br><br>"+"<u><b>POST Data</b></u>: <pre>"+_d+"</pre>\n\n";
- }
- var _f=document.getElementById("communicationIFramePlaceholder2");
- if(!_f){
- _f=document.createElement("div");
- _f.setAttribute("id","communicationIFramePlaceholder2");
- document.body.appendChild(_f);
- }
- _f.innerHTML="<iframe id=\"communicationIFrame2\" name=\"communicationIFrame\" title=\"communicationIFrame\" width=\"1000\" height=\"200\" "+"frameborder=\"0\" style=\"display: none; margin-top: 50px; border: 1px dotted darkgray; \">\n"+"This browser does not support iframes!\n"+"</iframe>\n";
- var _10=document.getElementById("communicationIFrame2");
- var _11=_10.contentWindow.document;
- if(_11.body==null){
- var _12=_11.createElement("body");
- _11.appendChild(_12);
- }
- this.InvokeUrlThroughPostRequest(_a,_b,_11);
- };
- URLRequestInvoker.prototype.InvokeUrlThroughPostRequest=function(url,_14,_15){
- _15.write("<html><head><base href=\""+window.location+"\"></head><body></body></html>");
- buildAndSubmitDynamicForm(_15,_15.body,url,_14);
- };
- function buildAndSubmitDynamicForm(_16,_17,url,_19){
- var _1a=_16.createElement("form");
- _1a.setAttribute("method","POST");
- _1a.setAttribute("id","communicationForm");
- _1a.setAttribute("name","communicationForm");
- _1a.setAttribute("action",url);
- for(var p in _19){
- var _1c=_16.createElement("input");
- _1c.setAttribute("type","hidden");
- _1c.setAttribute("id",p);
- _1c.setAttribute("name",p);
- _1c.setAttribute("value",_19[p]);
- _1a.appendChild(_1c);
- }
- var _1d=_17.appendChild(_1a);
- _1a.submit();
- };
- URLRequestInvoker.prototype.DestroyCommunicationIFrame_work=function(){
- };
- URLRequestInvoker.prototype.RequestFinished=function(){
- var _1e=this;
- setTimeout(function(){
- _1e.DestroyCommunicationIFrame_work();
- },500);
- };
- urlRequestInvoker=new URLRequestInvoker();
- function AreObjectsEqual(_1f,_20,_21){
- if(_1f==null&&_20==null){
- return true;
- }else{
- if(_20==null){
- return false;
- }
- }
- var _22=true;
- for(var i in _1f){
- if(_21.indexOf(i)!=-1){
- continue;
- }
- if(_1f[i]!=_20[i]){
- _22=false;
- break;
- }
- }
- return _22;
- };
- function EncloseInQuotes(str){
- var _25="'";
- if(str.indexOf(_25)!=-1){
- _25="\"";
- }
- return _25+str+_25;
- };
- function DumpHtmlDomElement(_26){
- var _27=Math.min(_26.childNodes.length,3);
- var _28="";
- for(var a=0;a<_27;a++){
- _28+="\tchildNodes["+a+"].nodeName:\t\t"+_26.childNodes[a].nodeName+"\n"+"\tchildNodes["+a+"].nodeValue:\t\t"+_26.childNodes[a].nodeValue+"\n"+"\tchildNodes["+a+"].childNodes.length:\t"+_26.childNodes[a].childNodes.length+"\n"+"\n";
- }
- alert("tagName:\t\t"+_26.tagName+"\n"+"nodeName:\t"+_26.nodeName+"\n"+"name:\t\t"+_26.name+"\n"+"\n"+"type:\t\t"+_26.type+"\n"+"className:\t"+_26.className+"\n"+"id:\t\t"+_26.id+"\n"+"value:\t\t"+_26.value+"\n"+"\n"+"innerHTML:\t"+_26.innerHTML+"\n"+"\n"+"childNodes.length:\t"+_26.childNodes.length+"\n"+_28);
- };
- function handle_onkeydown(e){
- e=window.event||e;
- keycode=e.keyCode||e.which;
- if(keycode==IMPORT_UTIL.KEYCODE_ENTER||keycode==IMPORT_UTIL.KEYCODE_SPACEBAR){
- var _2b=e.target||e.srcElement;
- _2b.click(e);
- return false;
- }
- return true;
- };
- function DumpXmlDomElement(_2c){
- var _2d=Math.min(_2c.attributes.length,3);
- var _2e="";
- for(var a=0;a<_2d;a++){
- var _30=_2c.attributes[a].nodeValue;
- _2e+="\tattributes["+a+"].nodeName:\t\t"+_2c.attributes[a].nodeName+"\n"+"\tattributes["+a+"].nodeValue:\t\t"+_30+"\n"+"\tattributes["+a+"].childNodes.length:\t"+_2c.attributes[a].childNodes.length+"\n"+"\n";
- }
- var _31=Math.min(_2c.childNodes.length,3);
- var _32="";
- for(var a=0;a<_31;a++){
- _32+="\tchildNodes["+a+"].nodeName:\t\t"+_2c.childNodes[a].nodeName+"\n"+"\tchildNodes["+a+"].nodeValue:\t\t"+_2c.childNodes[a].nodeValue+"\n"+"\tchildNodes["+a+"].childNodes.length:\t"+_2c.childNodes[a].childNodes.length+"\n"+"\n";
- }
- alert("DumpXmlDomElement\n"+"\n"+"nodeName:\t"+_2c.nodeName+"\n"+"nodeType:\t"+_2c.nodeType+"\n"+"nodeValue:\t"+_2c.nodeValue+"\n"+"\n"+"attributes.length: "+_2c.attributes.length+"\t(showing first "+_2d+" attributes out of "+_2c.attributes.length+")\n"+_2e+"\n"+"childNodes.length: "+_2c.childNodes.length+"\t(showing first "+_31+" attributes out of "+_2c.childNodes.length+")\n"+_32+"\n"+"\n");
- };
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_Deck.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_TreeView.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_ListView.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/U_CookieJar.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_Dialog.js");
- G_HAL.F_Include(WEB_CONTENT+"/common/json/json2.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/G_ResManager.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_MultiScriptRequest.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_ComboBox.js");
- G_HAL.F_Include(WEB_CONTENT+"/hal/C_PropertySheet.js");
- var kDatabaseTypeStr="database";
- var kCatalogTypeStr="catalog";
- var kCubeTypeStr="cube";
- var kInfoQueryTypeStr="infoQuery";
- var kDimensionGroupTypeStr="dimensionGroup";
- var kDimensionTypeStr="dimension";
- var kMeasuresGroupTypeStr="Measures";
- var kMeasureTypeStr="measure";
- var asyncErrorPagePid="importWizard_communication_error_page";
- var G_App={};
- function ImportWizard(){
- this.credentials="";
- };
- ImportWizard.prototype.setDataSourceCredentials=function(_33){
- this.credentials=_33;
- urlRequestInvoker.RequestFinished();
- };
- ImportWizard.prototype.updateCredentials=function(_34){
- var _35=new Object();
- _35["pid"]="updateCredentials";
- _35["current_credentials"]=this.credentials;
- _35["newcredentials_password"]=_34;
- _35["error_pid"]=asyncErrorPagePid;
- var _36=GATEWAY_URL+"/metadataUIService";
- urlRequestInvoker.MakeAsyncRequestInIFrame(_36,_35);
- };
- ImportWizard.prototype.checkNext=function(){
- var _37=G_App.m_oDeck.F_GetIndex();
- switch(_37){
- case 0:
- var msg=this.checkImportSelectionRestraints();
- if(msg&&msg!=null){
- return msg;
- }
- break;
- case 1:
- var msg=this.checkDesignLocaleSelected();
- if(msg&&msg!=null){
- return msg;
- }
- break;
- case 2:
- break;
- case 3:
- break;
- }
- return null;
- };
- ImportWizard.prototype.checkDesignLocaleSelected=function(){
- var _39=document.getElementById("designLanguage");
- if(_39.selectedIndex<0){
- return localizedStrings["MSR_SAP_designLocaleRequired"];
- }
- };
- ImportWizard.prototype.checkImportSelectionRestraints=function(){
- var _3a=G_App.m_oTreeViewCheckboxes.F_GetCheckedNodes();
- var _3b=0;
- var _3c=0;
- for(var n=0;n<_3a.length;n++){
- var _3e=_3a.item(n);
- var _3f=_3e.getAttribute("value");
- var _40=eval("("+_3f+")");
- if(_40.type==kCubeTypeStr){
- _3b++;
- }else{
- if(_40.type==kInfoQueryTypeStr){
- _3c++;
- }
- }
- if(_3b>this.maxCubes){
- return localizedStrings["MSR_SAP_tooManyCubes"].replace("{0}",this.maxCubes);
- }
- if(_3c>this.maxInfoQueries){
- return localizedStrings["MSR_SAP_tooManyInfoQueries"].replace("{0}",this.maxInfoQueries);
- }
- }
- if(_3a.length==0){
- return localizedStrings["MSR_SAP_mustImportAtLeastOneItem"];
- }
- return null;
- };
- IMPORTWIZARD=new ImportWizard();
- G_App.F_HAL_OnLoad=function(){
- G_ResManager.F_SetLocale("en");
- G_ResManager.F_LoadStrings([],this);
- G_HAL.F_EnableAccessibility(G_BrowserInfo.M_bIsFirefox);
- };
- var useV5DataServerCheckBox=null;
- G_App.initControls=function(){
- this.m_oDeck=new C_Deck(document.getElementById("divDeck"),this);
- UpdateButtonsEnableStatus(0);
- var obj=document.getElementById("radioShortName");
- obj.checked=true;
- this.F_ApplySkin("corporate|portal");
- this.m_treeViewNodesDoc=U_XML.F_CreateDocument();
- var _42=this.m_treeViewNodesDoc.appendChild(this.m_treeViewNodesDoc.createElement("treeView"));
- _42.setAttribute("id","TreeView");
- _42.setAttribute("showCheckboxes","true");
- if(!IMPORTWIZARD.isEdit){
- this.PopulateTreeView_RootNode(this.m_treeViewNodesDoc,_42);
- }
- this.m_oTreeViewCheckboxes=new C_TreeView(document.getElementById("divTreeViewCheckboxes"),_42,this);
- var _43=document.getElementById("cbSAPBWDualStructuresSupport");
- _43.checked="true";
- useV5DataServerCheckBox=document.getElementById("useV5DataServer");
- useV5DataServerCheckBox.checked=IMPORTWIZARD.bUseV5DataServer;
- if(IMPORTWIZARD.bDisableClassic=="true"){
- useV5DataServerCheckBox.style.display="none";
- }
- var _44=U_XML.F_CreateDocument();
- var _45=_44.appendChild(_44.createElement("listView"));
- _45.setAttribute("id","LanguagesListView");
- _45.setAttribute("showCheckboxes","true");
- _45.appendChild(_44.createElement("listItems"));
- this.m_oListViewCheckboxes=new C_ListView(document.getElementById("divListViewCheckboxes"),_45,this);
- ShowPackageRenameDlgIfNeeded();
- if(IMPORTWIZARD.isEdit){
- var _46=document.getElementById("editVariables");
- if(_46){
- _46.focus();
- }
- }
- };
- G_App.initializeTreeViewCheckBox=function(){
- this.m_treeViewNodesDoc=U_XML.F_CreateDocument();
- var _47=this.m_treeViewNodesDoc.appendChild(this.m_treeViewNodesDoc.createElement("treeView"));
- _47.setAttribute("id","TreeView");
- _47.setAttribute("showCheckboxes","true");
- this.PopulateTreeView_RootNode(this.m_treeViewNodesDoc,_47);
- this.m_oTreeViewCheckboxes=new C_TreeView(document.getElementById("divTreeViewCheckboxes"),_47,this);
- mapCubeAliasLanguages=new Object();
- mapCubeDimTables=new Object();
- };
- function selectFirstItemInTreeControl(){
- var _48=G_App.m_oTreeViewCheckboxes.F_GetFirstVisibleTreeItem();
- if(_48){
- _48.focus();
- }
- };
- G_App.F_ResManager_OnStringsLoaded=function(_49){
- G_ResManager.F_LoadResources([WEB_CONTENT+"/mdsrv/res/EditVariablesResources.xml"],this);
- };
- G_App.F_ResManager_OnResourcesLoaded=function(_4a){
- this.initControls();
- };
- function retrieveImportSpec(){
- var _4b=GATEWAY_URL+"/metadataUIService";
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_Loading"]);
- var _4c={};
- _4c["pid"]="importWizard_ImportSpec_pid";
- _4c["packageLocation"]=IMPORTWIZARD.packageLocation;
- _4c["packageName"]=IMPORTWIZARD.packageName;
- _4c["error_pid"]=asyncErrorPagePid;
- IMPORTWIZARD.onResumeFromNonRecoverableError=function(){
- hideProgressIfShowing();
- };
- urlRequestInvoker.MakeAsyncRequestInIFrame(_4b,_4c);
- };
- function GenerateJSONString(obj){
- var _4e="";
- for(var i in obj){
- _4e+="\t\t\""+i+"\": ";
- _4e+="\""+obj[i]+"\",\n";
- }
- var _50=_4e.lastIndexOf(",");
- _4e="\t{\n"+_4e.substr(0,_50)+"\n\t}\n";
- return _4e;
- };
- G_App.PopulateTreeView_RootNode=function(_51,_52){
- var _53=_52.appendChild(_51.createElement("treeNode"));
- var _54={};
- _54["type"]=kDatabaseTypeStr;
- _54["uniqueName"]=kDatabaseTypeStr;
- var _55=GetIconFilePath(kDatabaseTypeStr);
- var _56=GenerateJSONString(_54);
- _53.setAttribute("value",_56);
- _53.setAttribute("label",IMPORTWIZARD.dataSourceName);
- _53.setAttribute("smallIcon",_55);
- _53.setAttribute("expandedSmallIcon",_55);
- _53.setAttribute("expandable","true");
- _53.setAttribute("staticCheckbox","true");
- _53.setAttribute("role","treeItem");
- _53.setAttribute("tooltip",kDatabaseTypeStr);
- };
- var bIsLanguagesListPopulated=false;
- function PopulateLanguagesListBox(){
- var _57=GATEWAY_URL+"/metadataUIService";
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_Loading"]);
- var _58={};
- _58["pid"]="importWizard_Languages_pid";
- _58["datasource"]=IMPORTWIZARD.dataSourceName;
- _58["dataSourceCredentials"]=IMPORTWIZARD.credentials;
- _58["useV5DataServer"]=useV5DataServerCheckBox.checked?"true":"false";
- _58["error_pid"]=asyncErrorPagePid;
- urlRequestInvoker.MakeAsyncRequestInIFrame(_57,_58);
- };
- G_App.PopulateLanguagesListView=function(_59){
- var _5a=document.getElementById("designLanguage");
- for(var i=0;i<_59.length;i++){
- var _5c=this.m_oListViewCheckboxes.F_AppendNewListItem();
- _5c.setAttribute("value",_59[i].localeId);
- _5c.setAttribute("label",_59[i].localeName);
- _5c.setAttribute("staticCheckbox","false");
- _5c.setAttribute("checked","false");
- _5a.options[i]=new Option(_59[i].localeName,_59[i].localeId);
- }
- bIsLanguagesListPopulated=true;
- };
- function OnUseV5DataServerBtnClicked(_5d){
- G_App.m_oTreeViewCheckboxes.F_Detach();
- G_App.initializeTreeViewCheckBox();
- };
- function providerLangResultsReceived(_5e){
- G_App.PopulateLanguagesListView(_5e.lang);
- G_App.m_oListViewCheckboxes.F_Draw();
- D_Progress.F_Hide();
- urlRequestInvoker.RequestFinished();
- var _5f=G_App.m_oListViewCheckboxes.F_GetFirstSelectableItem();
- if(_5f){
- var _60=document.getElementById(_5f.getAttribute("htmlId"));
- if(_60){
- _60.focus();
- }
- }
- };
- function importSpecReceivedReceived(_61){
- D_Progress.F_Hide();
- urlRequestInvoker.RequestFinished();
- G_App.m_oTreeViewCheckboxes.F_StartAsyncLoad();
- var _62=G_App.m_treeViewNodesDoc;
- var _63=G_App.m_oTreeViewCheckboxes.F_GetTreeViewNode();
- IMPORTWIZARD.dataSourceName=_61.node.Name;
- PopulateTreeView(_61.node,_62,_63);
- G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad(true);
- selectFirstItemInTreeControl();
- };
- function SaveModifiedSettings(){
- var _64=GATEWAY_URL+"/metadataUIService";
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_Saving"]);
- var _65={};
- _65["pid"]="saveModifiedPackageSettings_pid";
- _65["searchPath"]=IMPORTWIZARD.packageLocation+"/package[@name="+EncloseInQuotes(IMPORTWIZARD.packageName)+"]/model";
- _65["property"]="http://developer.cognos.com/ceba/constants/queryOptionEnum#mode";
- if(useV5DataServerCheckBox.checked){
- _65["value"]="http://developer.cognos.com/ceba/constants/queryModeEnum#dynamic";
- }else{
- _65["value"]="http://developer.cognos.com/ceba/constants/queryModeEnum#compatible";
- }
- _65["error_pid"]=asyncErrorPagePid;
- urlRequestInvoker.MakeAsyncRequestInIFrame(_64,_65);
- };
- function OnSaveModifiedPackageSettingsRequestCompleted(){
- D_Progress.F_Hide();
- urlRequestInvoker.RequestFinished();
- window.location.replace(IMPORTWIZARD.backURL);
- };
- function PopulateTreeView(_66,_67,_68){
- var _69=_66.Name;
- var _6a=_66.Type;
- var _6b=_66.Selected!=null&&_66.Selected!="false";
- var _6c={};
- _6c["type"]=_6a;
- _6c["uniqueName"]=(_66.uniqueName!=null)?_66.uniqueName:_66.Name;
- var _6d=GenerateJSONString(_6c);
- var _6e=GetIconFilePath(_6a);
- var _6f=GetIconFilePath(_6a);
- var _70=(_6a!=kDimensionTypeStr&&_6a!=kMeasureTypeStr);
- var _71=(_6a==kDimensionGroupTypeStr||_6a==kDimensionTypeStr||_6a==kMeasuresGroupTypeStr||_6a==kMeasureTypeStr);
- var _72=(_6a==kDatabaseTypeStr||_6a==kCatalogTypeStr);
- var _73=!_71&&_6b;
- var _74=_68.appendChild(_67.createElement("treeNode"));
- _74.setAttribute("value",_6d);
- _74.setAttribute("label",_69);
- _74.setAttribute("smallIcon",_6e);
- _74.setAttribute("expandedSmallIcon",_6f);
- _74.setAttribute("tooltip",_6a);
- _74.setAttribute("expandable",_70?"true":"false");
- _74.setAttribute("hideCheckbox",_71?"true":"false");
- _74.setAttribute("staticCheckbox",_72?"true":"false");
- _74.setAttribute("checked",_73?"true":"false");
- if(_66.children!=null){
- for(var i=0;i<_66.children.length;i++){
- PopulateTreeView(_66.children[i],_67,_74);
- }
- }
- };
- function ExtractSelectedTreeNodes(_76,_77){
- if(_76.childNodes!=null&&_76.childNodes.length>0){
- _77.children=[];
- for(var i=0;i<_76.childNodes.length;i++){
- var _79=_76.childNodes[i].getAttribute("label");
- var _7a=_76.childNodes[i].getAttribute("value");
- var _7b=eval("("+_7a+")");
- var _7c=_7b.type;
- var _7d=_7b.uniqueName;
- _77.children[i]={};
- _77.children[i]["uniqueName"]=_7d;
- _77.children[i].Selected="true";
- _77.children[i].Type=_7c;
- _77.children[i].Value="false";
- _77.children[i].Name=_79;
- ExtractSelectedTreeNodes(_76.childNodes[i],_77.children[i]);
- }
- }
- };
- var g_treeNodeBeingPopulated=null;
- G_App.F_TreeView_OnPopulateChildren=function(_7e,_7f){
- var _80=document.getElementById("nextButton");
- EnableButton(_80,false);
- var _81=document.getElementById("finishButton");
- IMPORTWIZARD.isFinishButtonEnabled=IsButtonEnabled(_81);
- EnableButton(_81,false);
- var _82=_7f;
- var _83="";
- do{
- var _84=_82.getAttribute("label");
- var _85=_82.getAttribute("value");
- var _86=eval("("+_85+")");
- var _87=_86.type;
- var _88=_86.uniqueName;
- var _89=(_83=="");
- var _8a={};
- _8a.Name=_84;
- _8a.Type=_87;
- _8a.Value="false";
- if(_87==kDatabaseTypeStr){
- _8a.dbType="BW";
- var _8b=document.getElementById("cbSAPBWDualStructuresSupport");
- _8a.dualStructures=_8b.checked?"true":"false";
- _8a.isSystem="false";
- }else{
- _8a.uniqueName=_88;
- }
- if(_89){
- _8a.Selected="true";
- _8a.expansion="true";
- ExtractSelectedTreeNodes(_7f,_8a);
- }
- strNodePathEntry=JSON.stringify(_8a,null,"\t");
- var _8c=(_82==_7f)?"\n":",\n";
- _83=strNodePathEntry+_8c+_83;
- _82=_82.parentNode;
- }while(_82!=null&&_82.tagName=="treeNode");
- _83="{\"node\":[\n"+_83+"]}";
- g_treeNodeBeingPopulated=_7f;
- var _8d=GATEWAY_URL+"/metadataUIService";
- var _8e={};
- _8e["pid"]="importWizard_GetTreeNodes_pid";
- _8e["connectionName"]=IMPORTWIZARD.dataSourceName;
- _8e["nodePath"]=_83;
- _8e["dataSourceCredentials"]=IMPORTWIZARD.credentials;
- _8e["error_pid"]=asyncErrorPagePid;
- _8e["useV5DataServer"]=useV5DataServerCheckBox.checked?"true":"false";
- IMPORTWIZARD.onResumeFromRecoveredErrorHandler=function(){
- urlRequestInvoker.RequestFinished();
- G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad(false);
- g_treeNodeBeingPopulated=null;
- if(this.retry){
- this.retry=false;
- G_App.m_oTreeViewCheckboxes.F_ExpandNode(_7f);
- }
- };
- IMPORTWIZARD.onResumeFromNonRecoverableError=function(){
- G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad(false);
- g_treeNodeBeingPopulated=null;
- urlRequestInvoker.RequestFinished();
- };
- urlRequestInvoker.MakeAsyncRequestInIFrame(_8d,_8e);
- return true;
- };
- G_App.F_HAL_OnUnLoad=function(){
- this.m_oTreeViewCheckboxes.F_Detach();
- this.m_oListViewCheckboxes.F_Detach();
- if(this.m_oPropertySheet!=null){
- this.m_oPropertySheet.F_Detach();
- }
- };
- G_App.F_ApplySkin=function(_8f){
- var _90=_8f.split("|");
- var _91=_90[0];
- var _92=_90[1];
- var _93=WEB_CONTENT+"/skins/"+_91+"/hal/hal_portal_skin.css";
- var _94=WEB_CONTENT+"/skins/"+_91+"/hal/hal_skin.css";
- var _95=document.getElementById("idHALSkinCSS");
- if(_95){
- _95.parentNode.removeChild(_95);
- }
- var _96=document.getElementsByTagName("head")[0];
- var _97=document.createElement("link");
- _97.id="idHALSkinCSS";
- _97.type="text/css";
- _97.rel="stylesheet";
- _97.href=_93;
- _96.appendChild(_97);
- var _98=document.createElement("link");
- _98.id="idHALSkinCSS";
- _98.type="text/css";
- _98.rel="stylesheet";
- _98.href=_94;
- _96.appendChild(_98);
- document.body.style.backgroundColor=(_92=="portal")?"#FFFFFF":"";
- var _99=new Date();
- _99.setUTCFullYear(_99.getUTCFullYear()+1);
- U_CookieJar.F_SetCookie("skin",_8f,_99);
- };
- G_App.F_Deck_OnBeforeCardVisible=function(_9a,_9b,_9c,_9d){
- };
- G_App.F_Deck_OnAfterCardVisible=function(_9e,_9f,_a0,_a1){
- if(_9e==this.m_oDeck){
- var _a2=[localizedStrings["MSR_SAP_selectObjectsTitle"],localizedStrings["MSR_SAP_selectLanguagesTitle"],localizedStrings["MSR_SAP_generateDimensionsTitle"]];
- document.getElementById("dialogHeaderTitle").innerHTML=_a2[_a1];
- UpdateButtonsEnableStatus(_a1);
- if(_a1==1&&bIsLanguagesListPopulated==false){
- PopulateLanguagesListBox();
- }else{
- if(_a1==2){
- var _a3=document.getElementById("radioShortName");
- if(_a3){
- _a3.focus();
- }
- }
- }
- }
- };
- G_App.F_Next=function(){
- var msg=IMPORTWIZARD.checkNext();
- if(msg){
- alert(msg);
- }else{
- this.m_oDeck.F_Next();
- }
- };
- G_App.F_Back=function(){
- this.m_oDeck.F_Back();
- };
- G_App.F_TreeView_OnNodeCheck=function(_a5,_a6){
- var _a7=_a6;
- while(_a7.parentNode!=null&&_a7.parentNode.tagName=="treeNode"){
- var _a8=_a7.parentNode;
- var _a9=(_a7.getAttribute("checked")=="true");
- var _aa=!_a9;
- var _ab=(_a8.getAttribute("checked")=="true");
- var _ac=G_App.m_oTreeViewCheckboxes.F_GetCheckedChildrenNodes(_a8).length;
- if(_a7==_a6){
- _ac+=_aa?+1:-1;
- }
- _a8.setAttribute("checked",_ac>0?"true":"false");
- G_App.m_oTreeViewCheckboxes.F_UpdateNode(_a8);
- _a7=_a8;
- }
- };
- G_App.F_TreeView_OnNodeClick=function(_ad,_ae,_af){
- };
- G_App.F_TreeView_OnNodeDblClick=function(_b0,_b1){
- };
- function IsButtonEnabled(_b2){
- return (_b2.className=="commandButton");
- };
- function EnableButton(_b3,_b4){
- var _b5=IsButtonEnabled(_b3);
- if(_b4==true){
- _b3.className="commandButton";
- _b3.onmouseover=function(e){
- this.className="commandButtonOver";
- };
- _b3.onmouseout=function(e){
- this.className="commandButton";
- };
- _b3.onmousedown=function(e){
- this.className="commandButton";
- };
- _b3.onkeypress=handle_onkeydown;
- _b3.children[0].tabIndex=0;
- if(_b5==false){
- if(_b3.onclick_enabled!=null){
- _b3.onclick=_b3.onclick_enabled;
- }
- if(_b3.ondblclick_enabled!=null){
- _b3.ondblclick=_b3.ondblclick_enabled;
- }
- }
- }else{
- if(_b4==false){
- _b3.className="commandButtonInactiveII";
- _b3.onmouseover=null;
- _b3.onmouseout=null;
- _b3.onmousedown=null;
- _b3.onkeypress=null;
- _b3.children[0].tabIndex=-1;
- if(_b5==true){
- _b3.onclick_enabled=_b3.onclick;
- _b3.ondblclick_enabled=_b3.ondblclick;
- }
- _b3.onclick="";
- _b3.ondblclick="";
- }
- }
- };
- function UpdateButtonsEnableStatus(_b9){
- var _ba=document.getElementById("prevButton");
- var _bb=(_b9!=0);
- if(_bb){
- _ba.onclick=function(e){
- G_App.F_Back();
- };
- _ba.ondblclick=function(e){
- G_App.F_Back();
- };
- }
- EnableButton(_ba,_bb);
- var _be=document.getElementById("nextButton");
- var _bf=(_b9!=G_App.m_oDeck.F_GetNumberOfCards()-1);
- if(_bf){
- _be.onclick=function(e){
- G_App.F_Next();
- };
- _be.ondblclick=function(e){
- G_App.F_Next();
- };
- }
- EnableButton(_be,_bf);
- var _c2=document.getElementById("finishButton");
- var _c3=(_b9==G_App.m_oDeck.F_GetNumberOfCards()-1);
- if(_c3){
- _c2.onclick=function(e){
- WizardDone();
- };
- _c2.ondblclick=function(e){
- WizardDone();
- };
- EnableButton(_c2,_c3);
- }
- };
- function WizardDone(){
- var _c6=G_App.m_oTreeViewCheckboxes.F_GetCheckedNodes();
- if(_c6.length==0){
- alert("No objects have been selected for the import.\n\nImport action cancelled.\n");
- return;
- }
- var _c7=[];
- for(var n=0;n<_c6.length;n++){
- var _c9=_c6.item(n);
- _c7[n]=GetTreeNodePath(_c9);
- }
- ConsolidateTree(_c7,0);
- if(_c7.length!=1){
- alert("ASSERT FAILED: The number tree objects must be 1!\n\nIt is currently: "+_c7.length);
- }
- var _ca={};
- _ca["node"]=[];
- _ca["node"][0]=_c7[0];
- var _cb=JSON.stringify(_ca,null,"\t");
- var _cc=G_App.m_oListViewCheckboxes.F_GetCheckedListItems();
- var _cd=[];
- var _ce=[];
- for(var i=0;i<_cc.length;i++){
- var _d0=_cc.item(i);
- var _d1=_d0.getAttribute("value");
- var _d2=_d0.getAttribute("label");
- _cd.push(_d2);
- _ce.push(_d1);
- }
- var _d3=document.getElementById("radioShortName");
- var _d4=document.getElementById("radioLongName");
- var _d5=document.getElementById("radioTechnicalName");
- var _d6=_d3.value;
- if(_d4.checked){
- _d6=_d4.value;
- }else{
- if(_d5.checked){
- _d6=_d5.value;
- }
- }
- var _d7=document.getElementById("enhanceModelForSAP");
- var _d8=document.getElementById("useV5DataServer");
- var _d9=document.getElementById("designLanguage");
- var _da={};
- _da["params"]={};
- _da["params"]["ObjectName"]=_d6;
- _da["params"]["ObjectLayout"]=_d7.checked?"true":"false";
- _da["params"]["UseV5DataServer"]=_d8.checked?"true":"false";
- _da["params"].languages=_ce;
- _da["params"].designLocale=_d9.options[_d9.selectedIndex].value;
- var _db=JSON.stringify(_da,null,"\t");
- var _dc={};
- _dc["pkgInfo"]={};
- _dc["pkgInfo"]["Name"]=IMPORTWIZARD.packageName;
- _dc["pkgInfo"]["Description"]=IMPORTWIZARD.packageDescription;
- _dc["pkgInfo"]["ScreenTip"]=IMPORTWIZARD.packageScreentip;
- _dc["pkgInfo"]["Location"]=IMPORTWIZARD.packageLocation;
- var _dd=JSON.stringify(_dc,null,"\t");
- IMPORTWIZARD.onResumeFromNonRecoverableError=function(){
- hideProgressIfShowing();
- };
- var _de=new ImportHelper(_cb,_db,_dd);
- _de.runImport();
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_creatingPackage"]);
- };
- function hideProgressIfShowing(){
- if(D_Progress.F_IsActiveDialog()){
- D_Progress.F_Hide();
- }
- };
- function GetTreeNodePath(_df){
- var _e0=_df;
- var _e1={};
- var _e2=true;
- do{
- var _e3=_e0.getAttribute("label");
- var _e4=_e0.getAttribute("value");
- var _e5=eval("("+_e4+")");
- var _e6=_e5.type;
- var _e7=_e5.uniqueName;
- var _e8={};
- _e8.Name=_e3;
- _e8.Type=_e6;
- _e8.Value=(_e6==kDatabaseTypeStr||_e6==kCatalogTypeStr)?"partial":"true";
- if(_e6==kDatabaseTypeStr){
- _e8.dbType="BW";
- var _e9=document.getElementById("cbSAPBWDualStructuresSupport");
- _e8.dualStructures=_e9.checked?"true":"false";
- _e8.isSystem="false";
- }else{
- _e8.uniqueName=_e7;
- }
- if(!_e2){
- _e8.children=[_e1];
- }
- _e1=_e8;
- _e0=_e0.parentNode;
- _e2=false;
- }while(_e0!=null&&_e0.tagName=="treeNode");
- return _e1;
- };
- function ConsolidateTree(_ea,_eb){
- if(_eb<_ea.length-2){
- ConsolidateTree(_ea,_eb+1);
- }
- for(var n=_ea.length-1;n>(_eb);n--){
- var _ed=_ea[_eb];
- var _ee=_ea[n];
- if(AreObjectsEqual(_ed,_ee,["children"])){
- if(_ed.children==undefined||_ed.children==null){
- _ed.children=_ee.children;
- }else{
- _ed.children=_ed.children.concat(_ee.children);
- }
- _ea.splice(n,1);
- ConsolidateTree(_ed.children,0);
- }
- }
- };
- G_App.F_OnCancel=function(){
- D_Progress.F_Hide();
- };
- function GetIconFilePath(_ef){
- var _f0=WEB_CONTENT+"/mdsrv/importWizardUI/images/";
- var _f1=[];
- _f1[kDatabaseTypeStr]=_f0+"icon_data_source.gif";
- _f1[kCatalogTypeStr]=_f0+"icon_catalog.gif";
- _f1[kCubeTypeStr]=_f0+"icon_cube.gif";
- _f1[kInfoQueryTypeStr]=_f0+"icon_info_query.gif";
- _f1[kDimensionGroupTypeStr]=_f0+"icon_folder_dimensions.gif";
- _f1[kDimensionTypeStr]=_f0+"icon_dimension.gif";
- _f1[kMeasuresGroupTypeStr]=_f0+"icon_folder_measures.gif";
- _f1[kMeasureTypeStr]=_f0+"icon_measure.gif";
- _f1["unknown"]=WEB_CONTENT+"/hal/images/btn_new.gif";
- var _f2=_f1[_ef];
- if(_f2==null){
- _f2=_f1["unknown"];
- }
- return _f2;
- };
- function metadataTreeResultsReceived(_f3){
- if(g_treeNodeBeingPopulated==null){
- return;
- }
- if(_f3==null){
- G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad(true);
- g_treeNodeBeingPopulated=null;
- urlRequestInvoker.RequestFinished();
- return;
- }
- G_App.m_oTreeViewCheckboxes.F_Clear(g_treeNodeBeingPopulated);
- for(var i=0;i<_f3.node.children.length;i++){
- var _f5=G_App.m_treeViewNodesDoc;
- PopulateTreeView(_f3.node.children[i],_f5,g_treeNodeBeingPopulated);
- }
- G_App.m_oTreeViewCheckboxes.F_EndAsyncLoad(true);
- g_treeNodeBeingPopulated=null;
- urlRequestInvoker.RequestFinished();
- var _f6=document.getElementById("nextButton");
- EnableButton(_f6,true);
- var _f7=document.getElementById("finishButton");
- EnableButton(_f7,IMPORTWIZARD.isFinishButtonEnabled);
- };
- function HandleException(_f8){
- hideProgressIfShowing();
- var _f9=new ErrorPageManager();
- if(_f8.isQF){
- document.getElementById("main").style.display="none";
- _f9.handleQF(_f8.faultDom,ErrorPageClosed);
- }else{
- if(_f8.isCAM){
- document.getElementById("main").style.display="none";
- _f9.handleCAM(_f8,ErrorPageClosed);
- }else{
- var msg=_f8.messageString;
- if(msg===""){
- msg=localizedStrings["MSR_SAP_unknownErrorMessage"];
- }
- var _fb=_f8.stackTrace;
- _fb=unescape(_fb);
- document.getElementById("main").style.display="none";
- document.getElementById("editSelection").style.display="none";
- _f9.setupAndDisplayErrorPage(localizedStrings["MSR_SAP_errorPageTitle"],"",msg,_fb,ErrorPageClosed);
- }
- }
- };
- function ErrorPageClosed(_fc){
- document.getElementById("main").style.display="block";
- if(IMPORTWIZARD.onResumeFromNonRecoverableError&&!_fc){
- IMPORTWIZARD.onResumeFromNonRecoverableError();
- }
- };
- function launchFromEdit(){
- var _fd=document.getElementById("modifyMetadataSelections");
- var _fe=document.getElementById("editVariables");
- var _ff=document.getElementById("modifySettings");
- var _100=document.getElementById("editSelection");
- if(_fd.checked){
- _100.style.display="none";
- var main=document.getElementById("main");
- main.style.display="block";
- retrieveImportSpec();
- }else{
- if(_fe.checked){
- _100.style.display="none";
- OnShowVariables();
- }else{
- if(_ff.checked){
- SaveModifiedSettings();
- }
- }
- }
- };
- function ImportHelper(_102,_103,_104){
- this.m_importSpec=_102;
- this.m_parameters=_103;
- this.m_packageInfo=_104;
- };
- ImportHelper.prototype.runImport=function(){
- var _105=GATEWAY_URL+"/metadataUIService";
- this.m_requestId=new Date().getTime();
- var _106={};
- _106["pid"]="importWizard_Import_pid";
- _106["importSpec"]=this.m_importSpec;
- _106["parameters"]=this.m_parameters;
- _106["packageInfo"]=this.m_packageInfo;
- _106["requestId"]=this.m_requestId;
- _106["dataSourceCredentials"]=IMPORTWIZARD.credentials;
- _106["error_pid"]=asyncErrorPagePid;
- urlRequestInvoker.MakeAsyncRequestInIFrame(_105,_106);
- };
- function VariablesHelper(_107,_108){
- this.m_pkgLocation=_107;
- this.m_pkgName=_108;
- };
- VariablesHelper.prototype.retrieveVariables=function(_109,_10a){
- var _10b=GATEWAY_URL+"/metadataUIService";
- var _10c=new Object();
- _10c["pid"]="getSAPBWVariables_pid";
- _10c["packageLocation"]=this.m_pkgLocation;
- _10c["packageName"]=this.m_pkgName;
- _10c["error_pid"]=_10a;
- this.m_retrievedCallback=_109;
- urlRequestInvoker.MakeAsyncRequestInIFrame(_10b,_10c);
- };
- VariablesHelper.prototype.setJsonVariables=function(_10d){
- this.m_jsonVariables=_10d;
- this.m_retrievedCallback();
- };
- VariablesHelper.prototype.saveChanges=function(_10e,_10f){
- var _110=GATEWAY_URL+"/metadataUIService";
- var _111=new Object();
- _111["pid"]="updateSAPBWVariables_pid";
- _111["modelPath"]=this.m_pkgLocation+"/package[@name="+EncloseInQuotes(this.m_pkgName)+"]/model";
- _111["variables"]=JSON.stringify(this.m_jsonVariables,null,"\t");
- _111["error_pid"]=_10f;
- this.m_saveCallback=_10e;
- urlRequestInvoker.MakeAsyncRequestInIFrame(_110,_111);
- };
- VariablesHelper.prototype.saveStatus=function(_112){
- urlRequestInvoker.RequestFinished();
- this.m_saveCallback(_112);
- };
- function OnShowVariables(){
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_Loading"]);
- var _113=document.getElementById("main");
- _113.innerHTML=document.getElementById("editVariablesPane").innerHTML;
- _113.style.display="block";
- variablesHelper.retrieveVariables(OnVariablesResultsReceived,asyncErrorPagePid);
- };
- function OnVariablesResultsReceived(){
- G_App.F_SetupPropSheet(variablesHelper);
- urlRequestInvoker.RequestFinished();
- D_Progress.F_Hide();
- var _114=G_App.m_nPropertySheet.selectSingleNode(".//properties/group");
- if(_114){
- var _115=G_App.m_oPropertySheet.F_GetFocusableElements(_114.getAttribute("name"));
- if(_115&&_115.length>0){
- _115[0].focus();
- }
- }
- };
- function OnEditVariablesOKBtnClick(){
- D_Progress.F_DisableCancel();
- D_Progress.F_Show(null,localizedStrings["MSR_SAP_Saving"]);
- variablesHelper.saveChanges(OnSaveVariablesDoneResult,asyncErrorPagePid);
- };
- function OnSaveVariablesDoneResult(_116){
- D_Progress.F_Hide();
- window.location.replace(IMPORTWIZARD.backURL);
- };
- function OnEditVariablesCancelBtnClick(){
- window.location.replace(IMPORTWIZARD.backURL);
- };
- G_App.F_SetupPropSheet=function(_117){
- this.m_nPropertySheet=G_ResManager.F_GetResource("VariablesPropertySheet");
- var _118=this.m_nPropertySheet.getElementsByTagName("properties")[0];
- var _119=this.m_nPropertySheet.getElementsByTagName("objects")[0];
- var _11a=_119.getElementsByTagName("object")[0];
- var _11b=false;
- for(var _11c=0;_11c<_117.m_jsonVariables.dataSource.length;_11c++){
- var _11d=_117.m_jsonVariables.dataSource[_11c];
- for(var _11e=0;_11e<_11d.variables.length;_11e++){
- _11b=true;
- var _11f=_11d.variables[_11e];
- var _120=this.m_nPropertySheet.ownerDocument.createElement("group");
- _120.setAttribute("name","Group_"+_11c+"_"+_11e);
- _120.setAttribute("label",_11d.cube+" - "+_11f.name);
- _118.appendChild(_120);
- for(var _121=0;_121<_11f.children.length;_121++){
- var _122=_11f.children[_121];
- if(!_122){
- continue;
- }
- var _123="variablesHelper.m_jsonVariables.dataSource["+_11c+"].variables["+_11e+"].children["+_121+"]";
- var _124=this.m_nPropertySheet.ownerDocument.createElement("property");
- _124.setAttribute("name",_123);
- var type="text";
- if(_122.name=="isKeyDate"||_122.name=="showKeyAndCaption"){
- type="boolean";
- }else{
- if(_122.name=="promptType"){
- type="dropDownList";
- }
- }
- _124.setAttribute("type",type);
- if(type=="dropDownList"){
- _124.setAttribute("listView","VariablesPropertySheet_ListView1");
- }
- _124.setAttribute("label",_122.displayName);
- _120.appendChild(_124);
- var _126=this.m_nPropertySheet.ownerDocument.createElement("propertyRef");
- _126.setAttribute("ref",_123);
- _11a.appendChild(_126);
- }
- }
- }
- if(!_11b){
- var _127=document.getElementById("divPropertySheet1");
- _127.style.borderWidth=0;
- _127.innerHTML="<div class=\"formLabel\" style=\"margin-top: 2em;\">"+localizedStrings["MSR_SAP_noVariablesForEdit"]+"</div>";
- var _128=document.getElementById("editVariablesOKButton");
- EnableButton(_128,false);
- return;
- }else{
- this.m_oPropertySheet=new C_PropertySheet(document.getElementById("divPropertySheet1"),this.m_nPropertySheet,this,document.body,"clsPropertiesPaneInputBlocker");
- this.m_divPropertySheet=document.getElementById("divPropertySheet1");
- this.m_divPropertySheet.onkeydown=this.m_oPropertySheet.F_OnKeyDown.F_CreateEventMethodCallback(this.m_oPropertySheet);
- this.f_showProperties();
- }
- };
- G_App.F_RetrieveData=function(){
- };
- G_App.f_showProperties=function(_129){
- if(!_129){
- this.f_updatePropertyInfo();
- this.m_oPropertySheet.F_Clear();
- }
- this.m_oPropertySheet.F_SetUpdate(Boolean(_129));
- for(var _12a=0;_12a<this.m_oPropertySheet.Groups.length;_12a++){
- var _12b=this.m_oPropertySheet.Groups[_12a];
- this.m_oPropertySheet.F_StartPropertyGroup(_12b.Name);
- var _12c=_12b.Properties;
- var _12d=_12c.length;
- for(var i=0;i<_12d;i++){
- var _12f=_12c[i];
- if(this.m_oPropertySheet.F_ObjectSupportsProperty("Object1",_12f)){
- var _130=this.m_nPropertySheet.selectSingleNode("properties/group/property[@name='"+_12f+"']");
- var _12f=_130.getAttribute("name");
- var _131=eval(_12f).value;
- this.m_oPropertySheet.F_ShowProperty(_12f,_131?_131:"");
- }
- }
- this.m_oPropertySheet.F_EndPropertyGroup();
- }
- this.m_oPropertySheet.F_EndAllPropertyGroups();
- };
- G_App.F_PropertySheet_GetPropertyListView=function(_132,_133,_134,_135){
- return G_ResManager.F_GetResource(_133);
- };
- G_App.F_PropertySheet_OnShowDropDown=function(_136,_137,_138,_139,td){
- G_Debug.F_Print("F_PropertySheet_OnShowDropDown: "+_137+"="+_138);
- var _13b=parseInt(this.m_oPropertySheet.F_GetPropertyAttribute(_137,"listViewHeight"));
- var _13c=parseInt(this.m_oPropertySheet.F_GetPropertyAttribute(_137,"listViewWidth"));
- this.m_oPropertySheet.F_ShowListView(_137,_138,_139,_13b,_13c);
- };
- G_App.F_PropertySheet_OnPropertyChange=function(_13d,_13e,_13f){
- G_Debug.F_Print("F_PropertySheet_OnPropertyChange: "+_13e+"="+_13f);
- eval(_13e).value=_13f;
- setTimeout(G_App.f_showProperties.bind(G_App,true),0);
- };
- G_App.F_PropertySheet_OnPropertyDelete=function(_140,_141){
- G_Debug.F_Print("F_PropertySheet_OnPropertyDelete: "+_141);
- eval(_141).value="";
- setTimeout(G_App.f_showProperties.bind(G_App,true),0);
- };
- G_App.F_PropertySheet_OnPropertyAction=function(_142,_143,_144,_145){
- };
- G_App.F_PropertySheet_OnCycleDropDownList=function(_146,_147,_148){
- G_Debug.F_Print("F_PropertySheet_OnCycleDropDownList: "+_147+"="+_148);
- };
- G_App.F_PropertySheet_OnPropertyFailedValidation=function(_149,_14a,_14b,_14c,_14d,_14e){
- G_Debug.F_Print("F_PropertySheet_OnPropertyFailedValidation: "+_14b+"="+_14c);
- };
- G_App.F_PropertySheet_OnPropertyActivated=function(_14f,_150){
- G_Debug.F_Print("F_PropertySheet_OnPropertyActivated: "+_150);
- this.f_updatePropertyInfo(_150);
- };
- G_App.F_PropertySheet_OnPropertyDeactivated=function(_151,_152){
- G_Debug.F_Print("F_PropertySheet_OnPropertyDeactivated: "+_152);
- this.f_updatePropertyInfo();
- };
- G_App.f_updatePropertyInfo=function(_153){
- var _154="";
- var _155="";
- if(_153){
- _154=this.m_oPropertySheet.F_GetLabel(_153);
- _155="This is the description of "+_154;
- }
- document.getElementById("idPropertiesPane_divInfoTitle").innerText=_154;
- document.getElementById("idPropertiesPane_divInfoDescription").innerText=_155;
- };
|