diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2016-10-02 20:54:26 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2016-10-02 20:54:26 +0200 |
commit | 99b22866f1ebbabb0111a2f58c9a372c969aedc7 (patch) | |
tree | 3180333785a9aea5d586f7f5b34073091c4e6c72 /mcc/5/tr/content/nwSearchFnt.js | |
parent | 85d52f4beef547fb96394c82e41c240e176fd773 (diff) | |
download | doc-99b22866f1ebbabb0111a2f58c9a372c969aedc7.tar doc-99b22866f1ebbabb0111a2f58c9a372c969aedc7.tar.gz doc-99b22866f1ebbabb0111a2f58c9a372c969aedc7.tar.bz2 doc-99b22866f1ebbabb0111a2f58c9a372c969aedc7.tar.xz doc-99b22866f1ebbabb0111a2f58c9a372c969aedc7.zip |
Adding or refreshing mcc in tr
Diffstat (limited to 'mcc/5/tr/content/nwSearchFnt.js')
-rw-r--r-- | mcc/5/tr/content/nwSearchFnt.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mcc/5/tr/content/nwSearchFnt.js b/mcc/5/tr/content/nwSearchFnt.js index fc12d113..13327867 100644 --- a/mcc/5/tr/content/nwSearchFnt.js +++ b/mcc/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):
|