mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-10 22:54:24 +02:00
awesome hooking everything up
This commit is contained in:
parent
378fcc0377
commit
0735eb3d64
11 changed files with 266 additions and 139 deletions
|
@ -20,6 +20,8 @@ var LevelDropdownView = ContainedBase.extend({
|
|||
options = options || {};
|
||||
this.JSON = {};
|
||||
|
||||
Main.getEvents().on('levelSolved', this.updateSolvedStatus, this);
|
||||
|
||||
this.navEvents = _.clone(Backbone.Events);
|
||||
this.navEvents.on('clickedID', _.debounce(
|
||||
_.bind(this.loadLevelID, this),
|
||||
|
@ -39,6 +41,20 @@ var LevelDropdownView = ContainedBase.extend({
|
|||
}
|
||||
},
|
||||
|
||||
show: function(deferred) {
|
||||
this.showDeferred = deferred;
|
||||
LevelDropdownView.__super__.show.apply(this);
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
if (this.showDeferred) {
|
||||
this.showDeferred.resolve();
|
||||
}
|
||||
this.showDeferred = undefined;
|
||||
|
||||
LevelDropdownView.__super__.hide.apply(this);
|
||||
},
|
||||
|
||||
loadLevelID: function(id) {
|
||||
Main.getEventBaton().trigger(
|
||||
'commandSubmitted',
|
||||
|
@ -105,8 +121,6 @@ var SeriesView = BaseView.extend({
|
|||
},
|
||||
|
||||
click: function(ev) {
|
||||
console.log(ev.srcElement);
|
||||
console.log(ev.srcElement.id);
|
||||
if (!ev || !ev.srcElement || !ev.srcElement.id) {
|
||||
console.warn('wut, no id'); return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue