aboutsummaryrefslogtreecommitdiffstats
path: root/mcc/5/fr/content/nwSearchFnt.js
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-10-02 20:54:20 +0200
committerPapoteur <papoteur@mageialinux-online.org>2016-10-02 20:54:20 +0200
commite5308594fdb8a54b25175418b535b6f2e42e8371 (patch)
tree22f4a30987b3af0d23c2c93a79d0f2a5f71f232e /mcc/5/fr/content/nwSearchFnt.js
parentf70661f9d26d7b3ef74a0d8314a0c8c5f88efd57 (diff)
downloaddoc-e5308594fdb8a54b25175418b535b6f2e42e8371.tar
doc-e5308594fdb8a54b25175418b535b6f2e42e8371.tar.gz
doc-e5308594fdb8a54b25175418b535b6f2e42e8371.tar.bz2
doc-e5308594fdb8a54b25175418b535b6f2e42e8371.tar.xz
doc-e5308594fdb8a54b25175418b535b6f2e42e8371.zip
Adding or refreshing mcc in fr
Diffstat (limited to 'mcc/5/fr/content/nwSearchFnt.js')
-rw-r--r--mcc/5/fr/content/nwSearchFnt.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/mcc/5/fr/content/nwSearchFnt.js b/mcc/5/fr/content/nwSearchFnt.js
index fc12d113..13327867 100644
--- a/mcc/5/fr/content/nwSearchFnt.js
+++ b/mcc/5/fr/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):