summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-05-30 14:22:28 +0300
committerYuval Adam <yuv.adm@gmail.com>2014-05-30 14:22:28 +0300
commit214473c650918282ec4bceee883f3bcd86a1bc3d (patch)
treeb4fdbefcaff424a17d67828d9412f4b8950c8f1b
parent7f9016aa0010325a4a06691d0b5a61b92d284cd0 (diff)
Add clear row button
-rw-r--r--templates/home.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/home.html b/templates/home.html
index 4aba7f2..0d7b4f5 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -74,9 +74,16 @@
$(row).find('.light-cell-btn').toggleClass('active');
})
+ $('.clear-row-btn').click(function() {
+ var row = $(this).parent('.light-row');
+ $(row).find('.light-cell-btn').removeClass('active');
+ })
+
$('#save-btn').click(function(){
save_data();
});
+
+ load_data();
});
</script>
</head>
@@ -108,7 +115,8 @@
<% _.each(_.range(cells), function(k) { %>
<button type="button" class="btn btn-success light-cell-btn" data-toggle="button" data-light-cell="<%= k %>">&nbsp;</button>
<% }); %>
- <button type="button" class="btn btn-warning toggle-row-btn">Toggle Row</button>
+ <button type="button" class="btn btn-warning toggle-row-btn">Toggle</button>
+ <button type="button" class="btn btn-warning clear-row-btn">Clear</button>
</div>
<% }); %>
</div>