Ajout début JS+vue
This commit is contained in:
parent
e14e61c29a
commit
9d0c8d10fd
|
@ -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);
|
||||
|
||||
}
|
|
@ -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é ?>
|
|||
<p>Notification 2</p>
|
||||
<p>Notification 1</p>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php /* [3] Résultats de recherche
|
||||
=======================================================*/
|
||||
|
||||
if( permission('admin') ){ // si on est admin
|
||||
|
||||
/* (1) Recherche des étudiants */
|
||||
$requestEtu = new stdClass(); $answerEtu = new stdClass();
|
||||
$requestEtu->level_1 = 'search';
|
||||
$requestEtu->keywords = $keywords;
|
||||
|
||||
groupsManager::switch_level_1($requestEtu, $answerEtu);
|
||||
|
||||
if( $answerEtu->request == 'success' ){
|
||||
|
||||
echo "<section name='search' data-title='recherche'>";
|
||||
|
||||
var_dump($keywords);
|
||||
|
||||
echo "</section>";
|
||||
|
||||
}else
|
||||
echo "<section name='search' data-title='recherche' class='basic'><table class=basic><tbody><tr><td>Aucun résultat trouvé</td></tr></tbody></table></section>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue