omg finally works

This commit is contained in:
Peter Cottle 2012-12-17 10:24:55 -08:00
parent aadeab8299
commit f34c606d87
12 changed files with 496 additions and 251 deletions

View file

@ -1,6 +1,12 @@
var _;
var Backbone;
// horrible hack to get localStorage Backbone plugin
if (!require('../util').isBrowser()) {
var _ = require('underscore');
var Backbone = require('backbone');
_ = require('underscore');
Backbone = require('backbone');
} else {
Backbone = window.Backbone;
_ = window._;
}
var Commit = require('../git').Commit;
@ -27,6 +33,12 @@ var CommandEntryCollection = Backbone.Collection.extend({
localStorage: (Backbone.LocalStorage) ? new Backbone.LocalStorage('CommandEntries') : null
});
if (Backbone.LocalStorage) {
console.log('local storage there');
} else {
console.log('not htere');
}
var CommandBuffer = Backbone.Model.extend({
defaults: {
collection: null