From b302aa1705a01a4519ed520376b3ddef7dad51c9 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 2 Oct 2016 20:54:46 +0200 Subject: Adding or refreshing installer in tr --- installer/5/tr/content/nwSearchFnt.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'installer/5/tr/content/nwSearchFnt.js') diff --git a/installer/5/tr/content/nwSearchFnt.js b/installer/5/tr/content/nwSearchFnt.js index fc12d113..13327867 100644 --- a/installer/5/tr/content/nwSearchFnt.js +++ b/installer/5/tr/content/nwSearchFnt.js @@ -104,11 +104,17 @@ function Effectuer_recherche(expressionInput) { } } finalWordsList = tempTab; + + if (!finalWordsList.length) { + finalWordsList = wordsList; + } + + fileAndWordList = SortResults(finalWordsList); - if (finalWordsList.length) { + if (fileAndWordList && fileAndWordList.length) { //search 'and' and 'or' one time - fileAndWordList = SortResults(finalWordsList); + //fileAndWordList = SortResults(finalWordsList); var cpt = fileAndWordList.length; for (var i = cpt - 1; i >= 0; i--) { @@ -432,6 +438,11 @@ function SortResults(mots) { // get the list of the indices of the files. var listNumerosDesFicStr = w[mots[t].toString()]; //alert ("listNumerosDesFicStr "+listNumerosDesFicStr); + + if (!listNumerosDesFicStr) { + return; + } + var tab = listNumerosDesFicStr.split(","); //for each file (file's index): -- cgit v1.2.1