From 9d0c8d10fda22151196152b67129bbd514abc816 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 9 Jan 2016 16:46:39 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d=C3=A9but=20JS+vue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/action-script.js | 17 +++++++++++++++++ page/home.php | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/js/action-script.js b/js/action-script.js index a791518..ed17176 100755 --- a/js/action-script.js +++ b/js/action-script.js @@ -463,4 +463,21 @@ function updateCurrentYear(y){ var anneeScolaire = y+' - '+(y+1); DOM.CURRENTYEAR.children[1].innerHTML = anneeScolaire;; +} + + + +/* GESTION DE LA RECHERCHE */ +var searchbar = document.querySelector('.searchbar'); + +if( searchbar != null ){ + + searchbar.addEventListener('keyup', function(e){ + + pageM.page = 'home'; + pageM.vars = ['search', e.target.value]; + reload(); + + }, false); + } \ No newline at end of file diff --git a/page/home.php b/page/home.php index f06d741..d626665 100755 --- a/page/home.php +++ b/page/home.php @@ -13,6 +13,13 @@ require_once __ROOT__.'/manager/security.php'; * [4] Répartir les élèves (admin) * *****************************************/ + +$postVars = array(); +foreach($_POST as $key=>$val) + array_push($postVars, $key); + +$keywords = (count($postVars)>1) ? $postVars[1] : ''; + ?> @@ -175,4 +182,34 @@ if( connected() ){ // si on est connecté ?>

Notification 2

Notification 1

- \ No newline at end of file + + + + + +level_1 = 'search'; + $requestEtu->keywords = $keywords; + + groupsManager::switch_level_1($requestEtu, $answerEtu); + + if( $answerEtu->request == 'success' ){ + + echo "
"; + + var_dump($keywords); + + echo "
"; + + }else + echo "
Aucun résultat trouvé
"; + +} + +?> \ No newline at end of file