Issue 106 exit button on first slide

This commit is contained in:
Peter Cottle 2013-06-15 21:57:02 -07:00
parent 31ad2a586b
commit e99dce8948
10 changed files with 59 additions and 20 deletions

View file

@ -50,6 +50,10 @@ var PositiveNegativeBase = BaseView.extend({
this.navEvents.trigger('positive');
},
exit: function() {
this.navEvents.trigger('exit');
},
negative: function() {
this.navEvents.trigger('negative');
}
@ -148,9 +152,15 @@ var LeftRightView = PositiveNegativeBase.extend({
template: _.template($('#left-right-template').html()),
events: {
'click .left': 'negative',
'click .exit': 'exit',
'click .right': 'positive'
},
exit: function() {
this.pipeEvents.trigger('exit');
LeftRightView.__super__.exit.apply(this);
},
positive: function() {
this.pipeEvents.trigger('positive');
LeftRightView.__super__.positive.apply(this);

View file

@ -57,6 +57,7 @@ var MultiView = Backbone.View.extend({
this.navEvents.on('negative', this.getNegFunc(), this);
this.navEvents.on('positive', this.getPosFunc(), this);
this.navEvents.on('quit', this.finish, this);
this.navEvents.on('exit', this.finish, this);
this.keyboardListener = new KeyboardListener({
events: this.navEvents,