also style the whole box

pull/1/head
ansuz 7 years ago
parent d7d7f212bb
commit f0581f2cf4

@ -65,11 +65,17 @@ define([
'class': 'cp-task' 'class': 'cp-task'
}).appendTo($list); }).appendTo($list);
makeCheckbox(el, function (state) { var $box = makeCheckbox(el, function (state) {
display(); display();
}).appendTo($taskDiv); })
.appendTo($taskDiv);
var entry = APP.lm.proxy.data[el]; var entry = APP.lm.proxy.data[el];
if (entry.state) {
$taskDiv.addClass('cp-task-complete');
}
$('<span>', { 'class': 'cp-task-text' }) $('<span>', { 'class': 'cp-task-text' })
.text(entry.task) .text(entry.task)
.appendTo($taskDiv); .appendTo($taskDiv);

@ -63,6 +63,11 @@ body {
align-items: center; align-items: center;
background-color: white; background-color: white;
&.cp-task-complete {
background-color: #f0f0f0;
color: #777;
}
.cp-task-text { .cp-task-text {
margin: @spacing; margin: @spacing;
flex: 1; flex: 1;

Loading…
Cancel
Save