mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-03 19:24:29 +02:00
one event baton in practice, but keyboard is complicated...
This commit is contained in:
parent
0779bdeadb
commit
8e8eb4f4a9
5 changed files with 53 additions and 59 deletions
|
@ -68,6 +68,10 @@ var MultiView = Backbone.View.extend({
|
|||
this.start();
|
||||
},
|
||||
|
||||
onWindowFocus: function() {
|
||||
// nothing here for now...
|
||||
},
|
||||
|
||||
getPromise: function() {
|
||||
return this.deferred.promise;
|
||||
},
|
||||
|
@ -120,7 +124,7 @@ var MultiView = Backbone.View.extend({
|
|||
// first we stop listening to keyboard and give that back to UI, which
|
||||
// other views will take if they need to
|
||||
this.keyboardListener.mute();
|
||||
require('../app').getUI().modalEnd();
|
||||
require('../app').getEventBaton().releaseBaton('windowFocus', this.onWindowFocus, this);
|
||||
|
||||
setTimeout(_.bind(function() {
|
||||
_.each(this.childViews, function(childView) {
|
||||
|
@ -132,7 +136,8 @@ var MultiView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
start: function() {
|
||||
require('../app').getUI().modalStart();
|
||||
// steal the window focus baton
|
||||
require('../app').getEventBaton().stealBaton('windowFocus', this.onWindowFocus, this);
|
||||
this.showViewIndex(this.currentIndex);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue