maj css home + new js
This commit is contained in:
parent
6ffe9e1f78
commit
544a9d5473
@ -47,8 +47,8 @@ body {
|
|||||||
{
|
{
|
||||||
border: 7px solid white;
|
border: 7px solid white;
|
||||||
box-shadow: 0px 0px 3px black;
|
box-shadow: 0px 0px 3px black;
|
||||||
width: 250px;
|
width: 250px !important;
|
||||||
height: 250px;
|
height: 250px !important;
|
||||||
max-height : 250px;
|
max-height : 250px;
|
||||||
max-width : 250px;
|
max-width : 250px;
|
||||||
background: #ffffff; /* Old browsers */
|
background: #ffffff; /* Old browsers */
|
||||||
|
19
SRC/public/js/rechercheRef.js
Normal file
19
SRC/public/js/rechercheRef.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// fonction qui recherche le referent donnee en parametre
|
||||||
|
function rechercherReferent()
|
||||||
|
{
|
||||||
|
// on recupere le mot cle rentrer dans le champs de recherche
|
||||||
|
var motCle = document.getElementById("searchfield").value;
|
||||||
|
|
||||||
|
//boucle sur chaque item
|
||||||
|
var list = document.getElementsByClassName("item");
|
||||||
|
|
||||||
|
for (var i = 0; i < list.length; i++)
|
||||||
|
{
|
||||||
|
referent = list[i].getElementsByClassName('nomRef')[0].innerHTML; //recupere le nom du referent referent
|
||||||
|
if (referent.indexOf(motCle) > -1) //on compare si la recherche correspond au nom
|
||||||
|
{
|
||||||
|
//on remplace la classe
|
||||||
|
list[i].className = "item active";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,10 +6,10 @@
|
|||||||
<center>
|
<center>
|
||||||
<img style="height:auto; width:auto; max-width:100px;" alt="" src="./pictures/homePic/home.png">
|
<img style="height:auto; width:auto; max-width:100px;" alt="" src="./pictures/homePic/home.png">
|
||||||
<nav>
|
<nav>
|
||||||
<form class="form-inline navbar">
|
<form class="form-inline navbar" onsubmit="rechercherReferent()">
|
||||||
<div class="row divRecherche">
|
<div class="row divRecherche">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<input class="form-control inpSear" placeholder="Rechercher un Référant" name="search" onchange="hideIcon(this);" type="text">
|
<input id="searchfield" class="form-control inpSear" placeholder="Rechercher un Référant" name="search" type="text"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Parametres des images -->
|
<!-- Parametres des images -->
|
||||||
<div class="carousel-inner" role="listbox">
|
<div id="caroussel" class="carousel-inner" role="listbox">
|
||||||
@foreach ($referent as $ref)
|
@foreach ($referent as $ref)
|
||||||
@if ($ref -> id == $referent[0] -> id)
|
@if ($ref -> id == $referent[0] -> id)
|
||||||
<div class="item active">
|
<div class="item active">
|
||||||
@ -58,18 +58,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
|
|
||||||
blabla LOL
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.oncontextmenu = new Function("return false");
|
document.oncontextmenu = new Function("return true");
|
||||||
|
|
||||||
function hideIcon(self) {
|
function hideIcon(self) {
|
||||||
self.style.backgroundImage = 'none';
|
self.style.backgroundImage = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript" src="/js/rechercheRef.js"> </script>
|
||||||
</center>
|
</center>
|
||||||
@endsection
|
@endsection
|
||||||
|
Reference in New Issue
Block a user