mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-21 03:05:31 +02:00
removed all horrible hack references
This commit is contained in:
parent
3a710c8ab4
commit
b3cf8263a2
12 changed files with 11 additions and 53 deletions
|
@ -1,14 +1,12 @@
|
|||
var _ = require('underscore');
|
||||
var Q = require('q');
|
||||
// horrible hack to get localStorage Backbone plugin
|
||||
var Backbone = (!require('../util').isBrowser()) ? Backbone = require('backbone') : Backbone = window.Backbone;
|
||||
var Backbone = require('backbone');
|
||||
|
||||
var Commit = require('../git').Commit;
|
||||
var Branch = require('../git').Branch;
|
||||
var Tag = require('../git').Tag;
|
||||
|
||||
var Command = require('../models/commandModel').Command;
|
||||
var CommandEntry = require('../models/commandModel').CommandEntry;
|
||||
var TIME = require('../util/constants').TIME;
|
||||
|
||||
var CommitCollection = Backbone.Collection.extend({
|
||||
|
@ -27,11 +25,6 @@ var TagCollection = Backbone.Collection.extend({
|
|||
model: Tag
|
||||
});
|
||||
|
||||
var CommandEntryCollection = Backbone.Collection.extend({
|
||||
model: CommandEntry,
|
||||
localStorage: (Backbone.LocalStorage) ? new Backbone.LocalStorage('CommandEntries') : null
|
||||
});
|
||||
|
||||
var CommandBuffer = Backbone.Model.extend({
|
||||
defaults: {
|
||||
collection: null
|
||||
|
@ -131,6 +124,5 @@ exports.CommitCollection = CommitCollection;
|
|||
exports.CommandCollection = CommandCollection;
|
||||
exports.BranchCollection = BranchCollection;
|
||||
exports.TagCollection = TagCollection;
|
||||
exports.CommandEntryCollection = CommandEntryCollection;
|
||||
exports.CommandBuffer = CommandBuffer;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var _ = require('underscore');
|
||||
// horrible hack to get localStorage Backbone plugin
|
||||
var Backbone = (!require('../util').isBrowser()) ? Backbone = require('backbone') : Backbone = window.Backbone;
|
||||
var Backbone = require('backbone');
|
||||
|
||||
var Errors = require('../util/errors');
|
||||
|
||||
|
@ -291,12 +290,4 @@ var Command = Backbone.Model.extend({
|
|||
}
|
||||
});
|
||||
|
||||
// command entry is for the commandview
|
||||
var CommandEntry = Backbone.Model.extend({
|
||||
defaults: {
|
||||
text: ''
|
||||
}
|
||||
});
|
||||
|
||||
exports.CommandEntry = CommandEntry;
|
||||
exports.Command = Command;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue