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

various code style twerks

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