When no history.search.value -> display all

This commit is contained in:
xdrm-brackets 2017-11-13 13:37:50 +01:00
parent f99d1a8435
commit d064e304ee
1 changed files with 16 additions and 0 deletions

View File

@ -43,6 +43,22 @@ if( section.view.element != null ){
/* (2) Gestion de la recherche instantannee */
section.view.search.func = function(){
// if no keyword -> show all
if( section.view.search.bar.value.length == 0 ){
// On recupere la liste des elements correspondants aux utilisateurs
var history_list = document.querySelectorAll(section.view.text + '> article.inline-row[id]');
// Affiche chaque carte
for( var i = 0 ; i < history_list.length ; i++ )
history_list[i].remClass('hidden');
return;
}
var search = {
path: 'historyDefault/search',
keywords: section.view.search.bar.value