before refactor

This commit is contained in:
Peter Cottle 2012-12-25 17:39:31 -08:00
parent ee02aea414
commit bbdaa37abd
5 changed files with 30 additions and 24 deletions

View file

@ -4537,10 +4537,7 @@ var CommandBuffer = Backbone.Model.extend({
}, },
initialize: function(options) { initialize: function(options) {
require('../app').getEvents().on('gitCommandReady', _.bind( require('../app').getEvents().on('gitCommandReady', this.addCommand, this);
this.addCommand, this
));
options.collection.bind('add', this.addCommand, this); options.collection.bind('add', this.addCommand, this);
this.buffer = []; this.buffer = [];
@ -4644,7 +4641,7 @@ function GitEngine(options) {
this.commandOptions = {}; this.commandOptions = {};
this.generalArgs = []; this.generalArgs = [];
this.events.on('processCommand', _.bind(this.dispatch, this)); this.events.on('processCommand', this.dispatch, this);
// backbone or something uses _.uniqueId, so we make our own here // backbone or something uses _.uniqueId, so we make our own here
this.uniqueId = (function() { this.uniqueId = (function() {
@ -11926,9 +11923,7 @@ function GitVisuals(options) {
this.deferred = []; this.deferred = [];
this.events = require('../app').getEvents(); this.events = require('../app').getEvents();
this.events.on('refreshTree', _.bind( this.events.on('refreshTree', this.refreshTree, this);
this.refreshTree, this
));
} }
GitVisuals.prototype.defer = function(action) { GitVisuals.prototype.defer = function(action) {
@ -14063,6 +14058,10 @@ exports.init = init;
}); });
require("/src/js/app/index.js"); require("/src/js/app/index.js");
require.define("/src/js/app/inputWaterfall.js",function(require,module,exports,__dirname,__filename,process,global){undefined
});
require("/src/js/app/inputWaterfall.js");
require.define("/src/js/git/headless.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore'); require.define("/src/js/git/headless.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
var Backbone = require('backbone'); var Backbone = require('backbone');
@ -14150,7 +14149,7 @@ function GitEngine(options) {
this.commandOptions = {}; this.commandOptions = {};
this.generalArgs = []; this.generalArgs = [];
this.events.on('processCommand', _.bind(this.dispatch, this)); this.events.on('processCommand', this.dispatch, this);
// backbone or something uses _.uniqueId, so we make our own here // backbone or something uses _.uniqueId, so we make our own here
this.uniqueId = (function() { this.uniqueId = (function() {
@ -15954,10 +15953,7 @@ var CommandBuffer = Backbone.Model.extend({
}, },
initialize: function(options) { initialize: function(options) {
require('../app').getEvents().on('gitCommandReady', _.bind( require('../app').getEvents().on('gitCommandReady', this.addCommand, this);
this.addCommand, this
));
options.collection.bind('add', this.addCommand, this); options.collection.bind('add', this.addCommand, this);
this.buffer = []; this.buffer = [];
@ -17986,9 +17982,7 @@ function GitVisuals(options) {
this.deferred = []; this.deferred = [];
this.events = require('../app').getEvents(); this.events = require('../app').getEvents();
this.events.on('refreshTree', _.bind( this.events.on('refreshTree', this.refreshTree, this);
this.refreshTree, this
));
} }
GitVisuals.prototype.defer = function(action) { GitVisuals.prototype.defer = function(action) {

View file

@ -0,0 +1,17 @@
var _ = require('underscore');
var Backbone = require('backbone');
var Main = require('../main');
function InputWaterfall() {
Main.getEvents().on('processCommand', this.process)
};
InputWaterfall.prototype.listen = function() {
Main.getEvents().
};
exports.InputWaterfall = InputWaterfall;

View file

@ -28,7 +28,7 @@ function GitEngine(options) {
this.commandOptions = {}; this.commandOptions = {};
this.generalArgs = []; this.generalArgs = [];
this.events.on('processCommand', _.bind(this.dispatch, this)); this.events.on('processCommand', this.dispatch, this);
// backbone or something uses _.uniqueId, so we make our own here // backbone or something uses _.uniqueId, so we make our own here
this.uniqueId = (function() { this.uniqueId = (function() {

View file

@ -32,10 +32,7 @@ var CommandBuffer = Backbone.Model.extend({
}, },
initialize: function(options) { initialize: function(options) {
require('../app').getEvents().on('gitCommandReady', _.bind( require('../app').getEvents().on('gitCommandReady', this.addCommand, this);
this.addCommand, this
));
options.collection.bind('add', this.addCommand, this); options.collection.bind('add', this.addCommand, this);
this.buffer = []; this.buffer = [];

View file

@ -37,9 +37,7 @@ function GitVisuals(options) {
this.deferred = []; this.deferred = [];
this.events = require('../app').getEvents(); this.events = require('../app').getEvents();
this.events.on('refreshTree', _.bind( this.events.on('refreshTree', this.refreshTree, this);
this.refreshTree, this
));
} }
GitVisuals.prototype.defer = function(action) { GitVisuals.prototype.defer = function(action) {