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