X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FSMESH%2Fwhphost.js;h=163913247956d4652d87cc17a03ca8a70e52d0b5;hp=d4c80bbb93a45278ad6097bc7f2d64537424881a;hb=54d277e9e3ba8789be5a561d280b86b979266c87;hpb=bc37f0b49f9713347749b6325e1c7062de8857ae;ds=sidebyside diff --git a/doc/salome/gui/SMESH/whphost.js b/doc/salome/gui/SMESH/whphost.js index d4c80bbb9..163913247 100755 --- a/doc/salome/gui/SMESH/whphost.js +++ b/doc/salome/gui/SMESH/whphost.js @@ -1,3 +1,4 @@ +// WebHelp 5.10.005 var gaProj=new Array(); var gnChecked=0; var gsProjName=""; @@ -87,7 +88,7 @@ function whCom(sName,sComFile) var strFile= _getFullPath(getPath(), this.msComFile); var oDiv=getElement(this.msDivId); if(oDiv){ - if(gbIE4){ + if(gbIE4||gbOpera7){ var nIFrameHeight=oDiv.style.pixelHeight; var nIFrameWidth=oDiv.style.pixelWidth; var sHTML=""; + gsHTML=""; goDiv = oDiv; setTimeout("delayLoad()", 100); } @@ -119,11 +119,12 @@ function whCom(sName,sComFile) var sHTML=""; if(gbMac&&gbIE4) sHTML+="
"; + else if(gbIE5) + sHTML+="
"; + else if(gbIE4||gbWindows) + sHTML+="
"; else - if (gbIE5) - sHTML+="
"; - else - sHTML+="
"; + sHTML+="
"; sHTML+="
"; return sHTML; } @@ -203,29 +204,68 @@ function getPath() goMan=new whComMan(); function addPane(sName,sFileName) { - goMan.addCom(sName,sFileName); + var oParam=new Object(); + oParam.sName=sName; + var oMsg=new whMessage(WH_MSG_GETPANE, this, 1, oParam); + if (SendMessage(oMsg)) + { + if (oMsg.oParam.bEnable) + goMan.addCom(sName,sFileName); + } + else + goMan.addCom(sName,sFileName); } function setShowPane(sName, bForce) { if ((gsFirstPane == "") || bForce) - gsFirstPane=sName; + { + var oMsg=new whMessage(WH_MSG_GETDEFPANE, this, 1, null); + if (SendMessage(oMsg)) + { + if (oMsg.oParam) + gsFirstPane = oMsg.oParam; + else + gsFirstPane=sName; + } + else + gsFirstPane=sName; + } } function window_OnLoad() { - if(gsProjName!="") + var oMsg=new whMessage(WH_MSG_GETCMD,this,1,null); + var bHidePane=false; + if (SendMessage(oMsg)) { - goMan.init(); - if(gsFirstPane!="") - goMan.show(gsFirstPane); - else - goMan.showById(0); - loadData2(gsProjName); + if(oMsg.oParam>0) + { + if(oMsg.oParam==1) + gsFirstPane="toc"; + else if(oMsg.oParam==2) + gsFirstPane="idx"; + else if(oMsg.oParam==3) + gsFirstPane="fts"; + else if(oMsg.oParam==4) + gsFirstPane="glo"; + } + else if(oMsg.oParam==0) + { + bHidePane=true; + } } - else if (gServerEnabled) + goMan.init(); + if(gsProjName!="") + loadData2(gsProjName); + if (bHidePane) + { + gsFirstPane=""; + var oMsg1=new whMessage(WH_MSG_HIDEPANE, this, 1, null) + SendMessage(oMsg1); + } + else { - goMan.init(); if(gsFirstPane!="") goMan.show(gsFirstPane); else @@ -249,7 +289,7 @@ function loadData2(strFile) function addProject(bPreferXML,sXMLName,sHTMLName) { var bLoadXML=bPreferXML; - if(!gbIE4&&!gbNav6) + if(!gbIE4&&!gbNav6&&!gbOpera7) return; if(gbIE4&&!gbIE5) bLoadXML=false; @@ -257,6 +297,8 @@ function addProject(bPreferXML,sXMLName,sHTMLName) bLoadXML=true; if(gbIE55||gbNav6) bLoadXML=true; + if(gbOpera7) + bLoadXML=false; if(bLoadXML) addProjectXML(sXMLName); else @@ -316,6 +358,8 @@ function putDataXML(xmlDoc,sdocPath) var sURL=RmtProject[i].getAttribute("url"); if(sURL) { + if(sURL.lastIndexOf("/")!=sURL.length-1) + sURL+="/"; aRProj[nCount]=new Object(); aRProj[nCount++].sPPath=_getFullPath(aRProj[0].sPPath,sURL); } @@ -326,11 +370,23 @@ function putDataXML(xmlDoc,sdocPath) { // on Netscape 6.0 under some situation the xml file cannot be loaded. // so we use pure html instead. - setTimeout("redirectToList();",100); + if (gnChecked == 0) + setTimeout("redirectToList();",100); + else + { + gnChecked++; + setTimeout("checkRemoteProject();", 1); + } } } } +function onLoadXMLError() +{ + gnChecked++; + setTimeout("checkRemoteProject();", 1); +} + function redirectToList() { if(gbReDirectThis) @@ -346,7 +402,7 @@ function putProjectInfo(aRProj) if(gnChecked!=0) { if(aRProj[0].sLangId!=gaProj[0].sLangId) - alert("The project: "+aRProj[0].sPPath+" is using a different language to the main project, which will cause the index and full text search functionality to be disabled for this remote project."); + alert("The merged Help system "+aRProj[0].sPPath+" is using a different language from the master Help system, which will cause the index and full-text search functionality to be disabled in the merged Help system."); } gaProj[gnChecked]=aRProj[0]; for(var i=1;i