diff --git a/public_html/view/js/history.js b/public_html/view/js/history.js index 5d661ce..80ec14e 100644 --- a/public_html/view/js/history.js +++ b/public_html/view/js/history.js @@ -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