summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-05-28 13:18:45 +0300
committerYuval Adam <yuv.adm@gmail.com>2014-05-28 13:18:45 +0300
commit5c27b257eea9a9c8f5a70f5ffc9c2a290626f001 (patch)
tree527dadb402f1de1121c129d28d95541bfe3a5378 /templates
parent4bcc90496f7400fbd409f93c632c374800ef8ae0 (diff)
Proper channels and subchannels
Diffstat (limited to 'templates')
-rw-r--r--templates/home.html17
1 files changed, 12 insertions, 5 deletions
diff --git a/templates/home.html b/templates/home.html
index 0140224..b8f8e18 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -11,10 +11,11 @@
<script>
$(document).ready(function() {
var CHANNELS = 8;
- var LIGHTS = 8;
+ var SUB_CHANNELS = 8;
+ var LOOP_LENGTH = 24;
_.each(_.range(CHANNELS), function(i) {
- var row = $(_.template($('#light-row-template').text(), {i: i, lights: LIGHTS}));
+ var row = $(_.template($('#light-row-template').text(), {i: i, subchannels: SUB_CHANNELS, cells: LOOP_LENGTH}));
$('#light-container').append(row);
});
});
@@ -26,9 +27,15 @@
<div id="light-container"></div>
</div>
<script type="text/template" class="template" id="light-row-template">
- <div class="light-row" data-light-row="<%= i %>">
- <% _.each(_.range(lights), function(j) { %>
- <button type="button" class="btn btn-success light-cell-btn" data-toggle="button" data-light-cell="<%= j %>">&nbsp;</button>
+ <div class="light-channel" data-light-channel="<%= i %>">
+ <h3>Channel <%= i %></h3>
+ <% _.each(_.range(subchannels), function(j) { %>
+ <div class="light-row" data-light-row="<%= j %>">
+ <span>Subchan <%= j %></span>
+ <% _.each(_.range(cells), function(k) { %>
+ <button type="button" class="btn btn-success light-cell-btn" data-toggle="button" data-light-cell="<%= k %>">&nbsp;</button>
+ <% }); %>
+ </div>
<% }); %>
</div>
</script>