mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
got rid of every underscore bind i think -- 1500 line diff
This commit is contained in:
parent
3833319476
commit
2257668f9d
21 changed files with 229 additions and 230 deletions
|
@ -272,9 +272,9 @@ var LevelBuilder = Level.extend({
|
|||
deferred: whenDoneEditing
|
||||
});
|
||||
whenDoneEditing.promise
|
||||
.then(_.bind(function(levelObj) {
|
||||
.then(function(levelObj) {
|
||||
this.startDialogObj = levelObj;
|
||||
}, this))
|
||||
}.bind(this))
|
||||
.fail(function() {
|
||||
// nothing to do, they dont want to edit it apparently
|
||||
})
|
||||
|
@ -316,10 +316,10 @@ var LevelBuilder = Level.extend({
|
|||
]
|
||||
});
|
||||
askForHintView.getPromise()
|
||||
.then(_.bind(this.defineHint, this))
|
||||
.fail(_.bind(function() {
|
||||
.then(this.defineHint, this))
|
||||
.fail(function() {
|
||||
this.level.hint = {'en_US': ''};
|
||||
}, this))
|
||||
}.bind(this))
|
||||
.done(function() {
|
||||
askForHintDeferred.resolve();
|
||||
});
|
||||
|
@ -337,13 +337,13 @@ var LevelBuilder = Level.extend({
|
|||
]
|
||||
});
|
||||
askForStartView.getPromise()
|
||||
.then(_.bind(function() {
|
||||
.then(function() {
|
||||
// oh boy this is complex
|
||||
var whenEditedDialog = Q.defer();
|
||||
// the undefined here is the command that doesnt need resolving just yet...
|
||||
this.editDialog(undefined, whenEditedDialog);
|
||||
return whenEditedDialog.promise;
|
||||
}, this))
|
||||
}.bind(this))
|
||||
.fail(function() {
|
||||
// if they dont want to edit the start dialog, do nothing
|
||||
})
|
||||
|
@ -352,14 +352,14 @@ var LevelBuilder = Level.extend({
|
|||
});
|
||||
}
|
||||
|
||||
chain = chain.done(_.bind(function() {
|
||||
chain = chain.done(function() {
|
||||
// ok great! lets just give them the goods
|
||||
new MarkdownPresenter({
|
||||
fillerText: JSON.stringify(this.getExportObj(), null, 2),
|
||||
previewText: intl.str('share-json')
|
||||
});
|
||||
command.finishWith(deferred);
|
||||
}, this));
|
||||
}.bind(this));
|
||||
|
||||
masterDeferred.resolve();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue