Commit cec047e7 authored by Peter Michaux's avatar Peter Michaux

hide #main and #footer when no todos

parent bfb97855
......@@ -11,6 +11,10 @@ maria.SetView.subclass(checkit, 'TodosAppView', {
buildData: function() {
var model = this.getModel();
var length = model.length;
this.find('#main').style.display = (length > 0) ? '' : 'none';
this.find('#footer').style.display = (length > 0) ? '' : 'none';
var checkbox = this.find('#toggle-all');
checkbox.checked = model.isAllCompleted();
checkbox.disabled = model.isEmpty();
......
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