button clicking and left right nav integration for git demonstration view

This commit is contained in:
Peter Cottle 2013-01-10 19:58:31 -08:00
parent 0c4319911e
commit e0c4ac795b
5 changed files with 143 additions and 14 deletions

View file

@ -95,7 +95,17 @@ var MultiView = Backbone.View.extend({
}, this), this.navEventDebounce, true);
},
lock: function() {
this.locked = true;
},
unlock: function() {
this.locked = false;
},
navForward: function() {
// we need to prevent nav changes when a git demonstration view hasnt finished
if (this.locked) { return; }
if (this.currentIndex === this.childViews.length - 1) {
this.hideViewIndex(this.currentIndex);
this.finish();
@ -166,6 +176,9 @@ var MultiView = Backbone.View.extend({
showLeft: (index !== 0),
lastNav: (index === this.childViewJSONs.length - 1)
});
if (view.receiveMetaNav) {
view.receiveMetaNav(leftRight, this);
}
},
render: function() {