X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Fwhutils.js;h=85fae7e05b81c3ae6071ef877ba6715b66a1c82a;hb=c6a0df686bae87821d7acf929b4bb8f4ae3b1d78;hp=7fa6c28a860ebf9337dc1482b58e39af4ee6313b;hpb=a2002fd875d9e4312db75e61296f063c4d8db697;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/whutils.js b/doc/salome/gui/GEOM/whutils.js index 7fa6c28a8..85fae7e05 100755 --- a/doc/salome/gui/GEOM/whutils.js +++ b/doc/salome/gui/GEOM/whutils.js @@ -1,19 +1,26 @@ +// WebHelp 5.10.004 var gsFileName=""; +var gsDivName=""; var xmlDoc=null; var sdocPath=null; var gsInsertBeforeEndHTML=""; var sReplaceStringsSrc=new Array(); +var gsDivName="dataDiv"; +var gnLoadDivNum=0; sReplaceStringsSrc[0]="&"; sReplaceStringsSrc[1]=">"; sReplaceStringsSrc[2]="<"; sReplaceStringsSrc[3]="""; -sReplaceStringsSrc[4]=" "; +sReplaceStringsSrc[4]=String.fromCharCode(8364); +sReplaceStringsSrc[5]=" "; + var sReplaceStringsDst=new Array(); sReplaceStringsDst[0]="&"; sReplaceStringsDst[1]=">"; sReplaceStringsDst[2]="<"; sReplaceStringsDst[3]="\""; -sReplaceStringsDst[4]=" "; +sReplaceStringsDst[4]=String.fromCharCode(128); +sReplaceStringsDst[5]=" "; var goHighLighted=null; function _getRelativePath(strParentPath,strCurrentPath) @@ -45,7 +52,7 @@ function _getRelativePath(strParentPath,strCurrentPath) return strCurrentPath; } -function _getRelativeFileName(strParentPath, strCurrentPath) +function _getRelativeFileName(strParentPath,strCurrentPath) { strParentPath=_replaceSlash(strParentPath); strParentPath=_getPath(strParentPath); @@ -108,7 +115,7 @@ function _getFullPath(sPath,sRelPath) { sRelPath=sRelPath.substring(nPathPos+3); sFullPath=sFullPath.substring(0,sFullPath.length-1); - var nPos2 = sFullPath.lastIndexOf("/"); + var nPos2=sFullPath.lastIndexOf("/"); if(nPos2!=-1) sFullPath=sFullPath.substring(0,nPos2+1); else @@ -123,7 +130,7 @@ function _getFullPath(sPath,sRelPath) function _isAbsPath(strPath) { var strUpper=strPath.toUpperCase(); - return (strUpper.indexOf(":")!=-1); + return (strUpper.indexOf(":")!=-1||strUpper.indexOf("\\\\")==0); } function _replaceSlash(strURL) @@ -166,21 +173,29 @@ function insertItemIntoArray(oArray,i,obj) function loadData(sFileName) { - if(!getElement("dataDiv")) + var i=gnLoadDivNum; + var sName=gsDivName+gnLoadDivNum++; + loadData_2(sFileName,sName); +} + +function loadData_2(sFileName,sDivName) +{ + if(!getElement(sDivName)) { - if(!insertDataDiv()) + if(!insertDataDiv(sDivName)) { gsFileName=sFileName; + gsDivName=sDivName; return; } } var sHTML=""; if(gbMac) - sHTML+=""; + sHTML+=""; else - sHTML+=""; + sHTML+=""; - var oDivCon=getElement("dataDiv"); + var oDivCon=getElement(sDivName); if(oDivCon) { if(gbNav6) @@ -231,21 +246,21 @@ function checkState() if(state==4) { var err=xmlDoc.parseError; - if(err.errorCode!=0) - alert(err.reason); - else + if(err.errorCode==0) putDataXML(xmlDoc,sdocPath); + else + onLoadXMLError(); } } } -function insertDataDiv() +function insertDataDiv(sName) { var sHTML=""; if(gbMac) - sHTML+="
"; + sHTML+=""; else - sHTML+=""; + sHTML+=""; if((gbIE5||gbNav6)&&document.body) document.body.insertAdjacentHTML("beforeEnd",sHTML); else @@ -264,7 +279,7 @@ function insertWhenBodyReady() { document.body.insertAdjacentHTML("beforeEnd",gsInsertBeforeEndHTML); gsInsertBeforeEndHTML=""; - loadData(gsFileName); + loadData_2(gsFileName,gsDivName); } else { @@ -274,9 +289,12 @@ function insertWhenBodyReady() function window_BUnload() { - var oDivCon=getElement("dataDiv"); - if(oDivCon) - oDivCon.innerHTML=""; + for(var i=0;i