From: <ka...@us...> - 2011-09-30 18:30:20
|
Revision: 9095 http://docbook.svn.sourceforge.net/docbook/?rev=9095&view=rev Author: kasunbg Date: 2011-09-30 18:30:14 +0000 (Fri, 30 Sep 2011) Log Message: ----------- Fix for missing "No results found for..." bug Modified Paths: -------------- trunk/xsl/webhelp/template/content/search/nwSearchFnt.js Modified: trunk/xsl/webhelp/template/content/search/nwSearchFnt.js =================================================================== --- trunk/xsl/webhelp/template/content/search/nwSearchFnt.js 2011-09-30 11:20:48 UTC (rev 9094) +++ trunk/xsl/webhelp/template/content/search/nwSearchFnt.js 2011-09-30 18:30:14 UTC (rev 9095) @@ -671,26 +671,31 @@ var scoringArr = Array(); for (var t in mots) { // get the list of the indices of the files. - var listNumerosDesFicStr = w[mots[t].toString()]; - //alert ("listNumerosDesFicStr "+listNumerosDesFicStr); - var tab = listNumerosDesFicStr.split(","); - //for each file (file's index): - for (var t2 in tab) { - var tmp = ''; - var idx = ''; - var temp = tab[t2].toString(); - if (temp.indexOf('*') != -1){ - idx = temp.indexOf('*'); - tmp = temp.substring(idx + 3, temp.length); - temp = temp.substring(0,idx); + var listNumerosDesFicStr = w[mots[t].toString()]; + + if (listNumerosDesFicStr != undefined) { + + //alert ("listNumerosDesFicStr "+listNumerosDesFicStr); + var tab = listNumerosDesFicStr.split(","); + //for each file (file's index): + for (var t2 in tab) { + var tmp = ''; + var idx = ''; + var temp = tab[t2].toString(); + if (temp.indexOf('*') != -1) { + idx = temp.indexOf('*'); + tmp = temp.substring(idx + 3, temp.length); + temp = temp.substring(0, idx); + } + scoringArr.push(tmp); + if (fileAndWordList[temp] == undefined) { + fileAndWordList[temp] = "" + mots[t]; + } else { + fileAndWordList[temp] += "," + mots[t]; + } + //console.info("fileAndWordList[" + temp + "]=" + fileAndWordList[temp] + " : " + tmp); } - scoringArr.push(tmp); - if (fileAndWordList[temp] == undefined) { - fileAndWordList[temp] = "" + mots[t]; - } else { - fileAndWordList[temp] += "," + mots[t]; - } - //console.info("fileAndWordList[" + temp + "]=" + fileAndWordList[temp] + " : " + tmp); + } } var fileAndWordListValuesOnly = new Array(); @@ -881,4 +886,4 @@ return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); } -//-------------------------OXYGEN PATCH END------------------------- \ No newline at end of file +//-------------------------OXYGEN PATCH END------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |