temporary UNSTABLE since codemod went nuts

This commit is contained in:
Peter Cottle 2015-04-20 17:05:21 +10:00
parent 2257668f9d
commit f048f99e7f
14 changed files with 32 additions and 39 deletions

View file

@ -68,14 +68,14 @@ var MarkdownGrabber = ContainedBase.extend({
// do button stuff
var buttonDefer = Q.defer();
buttonDefer.promise
.then(this.confirmed, this))
.fail(this.cancelled, this))
.then(this.confirmed.bind(this))
.fail(this.cancelled.bind(this))
.done();
var confirmCancel = new Views.ConfirmCancelView({
deferred: buttonDefer,
destination: this.getDestination()
}.bind(this)
}.bind(this));
}
this.updatePreview();
@ -98,7 +98,7 @@ var MarkdownGrabber = ContainedBase.extend({
keyup: function() {
if (!this.throttledPreview) {
this.throttledPreview = _.throttle(
this.updatePreview, this),
this.updatePreview.bind(this),
500
);
}
@ -107,7 +107,7 @@ var MarkdownGrabber = ContainedBase.extend({
getRawText: function() {
return this.$('textarea').val();
}.bind(this)
}.bind(this),
exportToArray: function() {
return this.getRawText().split('\n');
@ -155,7 +155,7 @@ var MarkdownPresenter = ContainedBase.extend({
.fail(function() {
this.deferred.reject();
}.bind(this))
.done(this.die, this));
.done(this.die.bind(this));
}
this.show();
@ -230,8 +230,8 @@ var DemonstrationBuilder = ContainedBase.extend({
});
buttonDeferred.promise
.then(this.confirmed, this))
.fail(this.cancelled, this))
.then(this.confirmed.bind(this))
.fail(this.cancelled.bind(this))
.done();
},
@ -243,7 +243,7 @@ var DemonstrationBuilder = ContainedBase.extend({
options: this.getExportObj()
}]
});
}.bind(this)
}.bind(this),
getExportObj: function() {
return {

View file

@ -107,7 +107,7 @@ var GeneralButton = ContainedBase.extend({
click: function() {
if (!this.clickFunc) {
this.clickFunc = _.throttle(
this.sendClick, this),
this.sendClick.bind(this),
500
);
}
@ -578,11 +578,11 @@ var CanvasTerminalHolder = BaseView.extend({
// If the entire window gets resized such that the terminal is outside the view, then
// move it back into the view, and expand/shrink it vertically as necessary.
$(window).on('resize', _.debounce(this.recalcLayout, this), 300));
$(window).on('resize', _.debounce(this.recalcLayout.bind(this), 300));
if (options.additionalClass) {
this.$el.addClass(options.additionalClass);
}.bind(this)
}
},
getAnimationTime: function() { return 700; },

View file

@ -42,7 +42,7 @@ var LevelDropdownView = ContainedBase.extend({
this.navEvents = _.clone(Backbone.Events);
this.navEvents.on('clickedID', _.debounce(
this.loadLevelID, this),
this.loadLevelID.bind(this),
300,
true
));
@ -60,7 +60,7 @@ var LevelDropdownView = ContainedBase.extend({
enter: 'positive'
},
wait: true
}.bind(this)
});
this.sequences = LevelStore.getSequences();
this.sequenceToLevels = LevelStore.getSequenceToLevels();