X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FSMESH%2Fwhstart.js;h=50883b8e2bf80c18f40f88111d97fdf9103c93cb;hb=1366d8ffbaae7bad8dfc95a31d34967e24f371fa;hp=0cb5e2c8dd3010cbccfa1902348f4b6f85cadc9b;hpb=bc37f0b49f9713347749b6325e1c7062de8857ae;p=modules%2Fsmesh.git diff --git a/doc/salome/gui/SMESH/whstart.js b/doc/salome/gui/SMESH/whstart.js index 0cb5e2c8d..50883b8e2 100755 --- a/doc/salome/gui/SMESH/whstart.js +++ b/doc/salome/gui/SMESH/whstart.js @@ -1,3 +1,4 @@ +// WebHelp 5.10.003 RegisterListener2(this, WH_MSG_GETSTARTFRAME); RegisterListener2(this, WH_MSG_GETDEFAULTTOPIC); RegisterListener2(this, WH_MSG_MINIBARORDER); @@ -8,6 +9,9 @@ RegisterListener2(this, WH_MSG_ISAVENUESUPPORT); RegisterListener2(this, WH_MSG_GETPANETYPE); RegisterListener2(this, WH_MSG_GETPANES); RegisterListener2(this, WH_MSG_RELOADNS6); +RegisterListener2(this, WH_MSG_GETCMD); +RegisterListener2(this, WH_MSG_GETPANE); +RegisterListener2(this, WH_MSG_GETDEFPANE); if (gbNav6) { @@ -17,20 +21,128 @@ if (gbNav6) function delayReload() { - if(!gnReload) + if (!(this.cMRServer && cMRServer.m_strVersion)) { - if(nViewFrameType&&nViewFrameType==1) - document.location=document.location; + if(gnReload!=2) + { + if(nViewFrameType&&nViewFrameType==1) + document.location=document.location; + } } } -var gsToolbarOrder = "toc|fts|glo|blankblock|banner"; -var gsMinibarOrder = "blankblock|hide2|"; +var gsToolbarOrder = ""; +var gsMinibarOrder = ""; -var gsTopic = "files/introduction_to_smesh.htm"; +var gsTopic = "mesh.htm"; +var PANE_OPT_SEARCH = 1; +var PANE_OPT_BROWSESEQ = 2; +var gnOpts=-1; +var gnCmd=-1; +var gnPans=2; +var gsBtns="invalid"; +var gsDefaultBtn="invalid"; +var gbHasTitle=false; if (location.hash.length > 1) - gsTopic = location.hash.substring(1); +{ + var sParam = location.hash; + if (sParam.indexOf("#<") == 0) + { + document.location = "whcsh_home.htm#" + sParam.substring(2); + } + else if (sParam.indexOf("#>>") == 0) + { + parseParam(sParam.substring(3)); + sParam = "#" + gsTopic + sParam.substring(1); + } + else + { + var nPos = sParam.indexOf(">>"); + if (nPos>1) + { + gsTopic = sParam.substring(1, nPos); + parseParam(sParam.substring(nPos+2)); + } + else + gsTopic = sParam.substring(1); + } + if (gnPans == 1 && gsTopic) + { + var strURL=location.href; + if (location.hash) + { + var nPos=location.href.indexOf(location.hash); + strURL=strURL.substring(0, nPos); + } + if (gbHasTitle) + document.location=_getPath(strURL)+ "whskin_tw.htm" + sParam; + else + document.location=_getPath(strURL)+ gsTopic; + } +} + +function parseParam(sParam) +{ + if (sParam) + { + var nBPos=0; + do + { + var nPos=sParam.indexOf(">>", nBPos); + if (nPos!=-1) + { + if (nPos>0) + { + var sPart=sParam.substring(nBPos, nPos); + parsePart(sPart); + } + nBPos = nPos + 2; + } + else + { + var sPart=sParam.substring(nBPos); + parsePart(sPart); + break; + } + } while(nBPos < sParam.length); + } +} + +function parsePart(sPart) +{ + if(sPart.toLowerCase().indexOf("cmd=")==0) + { + gnCmd=parseInt(sPart.substring(4)); + } + else if(sPart.toLowerCase().indexOf("cap=")==0) + { + document.title=_browserStringToText(sPart.substring(4)); + gbHasTitle=true; + } + else if(sPart.toLowerCase().indexOf("pan=")==0) + { + gnPans=parseInt(sPart.substring(4)); + } + else if(sPart.toLowerCase().indexOf("pot=")==0) + { + gnOpts=parseInt(sPart.substring(4)); + } + else if(sPart.toLowerCase().indexOf("pbs=")==0) + { + var sRawBtns = sPart.substring(4); + var aBtns = sRawBtns.split("|"); + for (var i=0;i