mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-03 01:25:08 +02:00
import export tree done
This commit is contained in:
parent
aa9cfea3a4
commit
45aa088796
6 changed files with 262 additions and 34 deletions
|
@ -140,6 +140,7 @@ var MarkdownPresenter = ContainedBase.extend({
|
|||
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
this.deferred = options.deferred || Q.defer();
|
||||
this.JSON = {
|
||||
previewText: options.previewText || 'Here is something for you',
|
||||
fillerText: options.fillerText || '# Yay'
|
||||
|
@ -150,14 +151,25 @@ var MarkdownPresenter = ContainedBase.extend({
|
|||
});
|
||||
this.render();
|
||||
|
||||
var confirmCancel = new Views.ConfirmCancelView({
|
||||
destination: this.getDestination()
|
||||
});
|
||||
confirmCancel.deferred.promise
|
||||
.fail(function() { })
|
||||
.done(_.bind(this.die, this));
|
||||
if (!options.noConfirmCancel) {
|
||||
var confirmCancel = new Views.ConfirmCancelView({
|
||||
destination: this.getDestination()
|
||||
});
|
||||
confirmCancel.deferred.promise
|
||||
.then(_.bind(function() {
|
||||
this.deferred.resolve(this.grabText());
|
||||
}, this))
|
||||
.fail(_.bind(function() {
|
||||
this.deferred.reject();
|
||||
}, this))
|
||||
.done(_.bind(this.die, this));
|
||||
}
|
||||
|
||||
this.show();
|
||||
},
|
||||
|
||||
grabText: function() {
|
||||
return this.$('textarea').val();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue