Skip to content

Commit

Permalink
Fix #275 : Ajout des libellés quand on change le curseur du range
Browse files Browse the repository at this point in the history
  • Loading branch information
axel584 committed Aug 28, 2016
1 parent 046035d commit 92e2e30
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
18 changes: 14 additions & 4 deletions fr/cge/konfirmo.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@
<input type='hidden' name="leciono" value='<?=$leciono?>'/>
<div class="tasko enketo">
<p>Notez l'intérêt que vous avez eu à effectuer la leçon : de 1 (très ennuyeux) à 5 (très amusant) </p>
<div class="rating">
<p class="range-field"><input name="intereso" type="range" value="3" min="1" max="5" step="1"></p>
<div class="row">
<div class="rating col s12 m6 l6">
<p class="range-field"><input id="range_intereso" name="intereso" type="range" value="3" min="1" max="5" step="1"></p>
</div>
<div class="rating col s12 m6 l6">
<p id="libelle_intereso"></p>
</div>
</div>
<p>Notez la difficulté que vous avez eue à effectuer la leçon : de 1 (très facile) à 5 (très compliqué) </p>
<div class="rating">
<p class="range-field"><input name="malfacileco" type="range" min="1" max="5" step="1"></p>
<div class="row">
<div class="rating col s12 m6 l6">
<p class="range-field"><input id="range_malfacileco" name="malfacileco" type="range" min="1" max="5" step="1"></p>
</div>
<div class="rating col s12 m6 l6">
<p id="libelle_malfacileco"></p>
</div>
</div>
<div class="input-field col s12">
<textarea name="komento" class="materialize-textarea"></textarea>
Expand Down
37 changes: 37 additions & 0 deletions js/ikurso.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,43 @@
Materialize.toast('Mauvaise réponse, essaye encore !', 4000);
});

// outil pour évaluer la leçon, on met des phrases plus lisibles
$('#range_intereso').on("change mousemove", function() {
if ($(this).val()==1) {
$("#libelle_intereso").html("1. Trop barbant");
}
if ($(this).val()==2) {
$("#libelle_intereso").html("2. Plutôt ennuyeux.");
}
if ($(this).val()==3) {
$("#libelle_intereso").html("3. Moyen");
}
if ($(this).val()==4) {
$("#libelle_intereso").html("4. Assez intéressant");
}
if ($(this).val()==5) {
$("#libelle_intereso").html("5. Génial ! J'ai adoré !");
}
});

$('#range_malfacileco').on("change mousemove", function() {
if ($(this).val()==1) {
$("#libelle_malfacileco").html("1. Les doigts dans le nez !");
}
if ($(this).val()==2) {
$("#libelle_malfacileco").html("2. Assez facile.");
}
if ($(this).val()==3) {
$("#libelle_malfacileco").html("3. Quelques difficultés mais dans l'ensemble je m'en suis sorti.");
}
if ($(this).val()==4) {
$("#libelle_malfacileco").html("4. Assez difficile.");
}
if ($(this).val()==5) {
$("#libelle_malfacileco").html("5. Trop compliqué. Je m'en suis arraché les cheveux !");
}
});


$('#eniri_identigilo,#eniri_pasvorto').keyup(function(e) {
if(e.keyCode == 13) { // KeyCode de la touche entrée
Expand Down

0 comments on commit 92e2e30

Please sign in to comment.