Commit 17158477 authored by Nicolas's avatar Nicolas

fix bug déplier ne fonctionne qu'une seule fois

parent 0954d1e0
......@@ -60,7 +60,16 @@ window.W = window.W || {};
toggleLine: function() {
var val = this.$el.attr("data-toggled");
this.$el.attr("data-toggled", !val);
//bug: le bouton ne déplie qu'une fois
//bug fix: check que la valeur est bien booléenne
var boolval;
if(val == 'false'){
boolval = true;
boolval = !val;
//console.log("v et !v et boolval",val, !val, boolval)
this.$el.attr("data-toggled", boolval);
return false;
......@@ -13,9 +13,10 @@
<script id="score-template" type="text/template">
<button class="save">save</button>
<h1><%- title %></h1>
<div><%= stage_set %></div>
<h1 contenteditable="true" id="title"><%- title %></h1>
<div contenteditable="true" id="stage_set" ><%= stage_set %></div>
<button class="save">Enregistrer</button>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment