Commit 6ddcbab2 authored by Sindre Sorhus's avatar Sindre Sorhus

various code style twerks

parent cf5d2f12
......@@ -18,12 +18,12 @@ var app = app || {};
// Filter down the list of all todo items that are finished.
completed: function () {
return this.where({completed:true});
return this.where({completed: true});
},
// Filter down the list to only todo items that are still not finished.
remaining: function () {
return this.where({completed:false});
return this.where({completed: false});
},
// We keep the Todos in sequential order, despite being saved by unordered
......@@ -32,6 +32,7 @@ var app = app || {};
if (!this.length) {
return 1;
}
return this.last().get('order') + 1;
},
......
/*global define */
define([
'backbone',
'models/Todo',
......@@ -13,11 +12,11 @@ define([
localStorage: new Backbone.LocalStorage('todos-backbone'),
getCompleted: function () {
return this.where({completed:true});
return this.where({completed: true});
},
getActive: function () {
return this.where({completed:false});
return this.where({completed: false});
},
comparator: function (todo) {
......
......@@ -7,23 +7,19 @@ require.config({
localStorage: '../bower_components/backbone.localStorage/backbone.localStorage',
tpl: 'lib/tpl'
},
shim: {
underscore: {
exports: '_'
},
backbone: {
exports: 'Backbone',
deps: ['jquery', 'underscore']
},
marionette: {
exports: 'Backbone.Marionette',
deps: ['backbone']
}
},
deps: ['jquery', 'underscore']
});
......
/*global define */
define([
'backbone',
'localStorage'
......
/*global define */
define([
'marionette'
], function (Marionette) {
......
/*global define */
define(function (require) {
'use strict';
......@@ -10,4 +9,3 @@ define(function (require) {
header: require('tpl!templates/header.tmpl')
};
});
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