clean up
This commit is contained in:
parent
d4af09c72a
commit
0628a27b34
@ -52,7 +52,6 @@ define(['jquery',
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.loadLesson = function(scr,menu,stage,num) {
|
this.loadLesson = function(scr,menu,stage,num) {
|
||||||
console.log("Loading a lesson, scr: " + scr + ", menu: " + menu + ", stage: " + stage + ", num: " + num);
|
|
||||||
this.titleView = new TitleView();
|
this.titleView = new TitleView();
|
||||||
this.helpsLoaded = {};
|
this.helpsLoaded = {};
|
||||||
if (typeof(scr) == "undefined") {
|
if (typeof(scr) == "undefined") {
|
||||||
@ -85,7 +84,6 @@ define(['jquery',
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.onInfoLoaded = function() {
|
this.onInfoLoaded = function() {
|
||||||
console.log("Lesson info loaded")
|
|
||||||
this.helpControlsView = new HelpControlsView({
|
this.helpControlsView = new HelpControlsView({
|
||||||
hasPlan:this.lessonInfoModel.get('hasPlan'),
|
hasPlan:this.lessonInfoModel.get('hasPlan'),
|
||||||
hasSolution:this.lessonInfoModel.get('hasSolution'),
|
hasSolution:this.lessonInfoModel.get('hasSolution'),
|
||||||
@ -105,7 +103,6 @@ define(['jquery',
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.onContentLoaded = function(loadHelps) {
|
this.onContentLoaded = function(loadHelps) {
|
||||||
console.log("Lesson content loaded")
|
|
||||||
this.lessonInfoModel = new LessonInfoModel();
|
this.lessonInfoModel = new LessonInfoModel();
|
||||||
this.listenTo(this.lessonInfoModel,'info:loaded',this.onInfoLoaded);
|
this.listenTo(this.lessonInfoModel,'info:loaded',this.onInfoLoaded);
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ define(['jquery',
|
|||||||
//var id =
|
//var id =
|
||||||
return lessonName.replace(/\s|\(|\)|\!|\:|\;|\@|\#|\$|\%|\^|\&|\*/g, '');
|
return lessonName.replace(/\s|\(|\)|\!|\:|\;|\@|\#|\$|\%|\^|\&|\*/g, '');
|
||||||
},
|
},
|
||||||
|
|
||||||
addMenuClasses: function(arr) {
|
addMenuClasses: function(arr) {
|
||||||
for (var i = 0; i < arr.length; i++) {
|
for (var i = 0; i < arr.length; i++) {
|
||||||
var menuItem = arr[i];
|
var menuItem = arr[i];
|
||||||
@ -46,7 +47,8 @@ define(['jquery',
|
|||||||
if (show) {
|
if (show) {
|
||||||
$('#' + id).show();
|
$('#' + id).show();
|
||||||
} else {
|
} else {
|
||||||
a }
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -40,13 +40,12 @@ define(['jquery',
|
|||||||
goatRouter.on('route:attackRoute', function(scr,menu,stage,num) {
|
goatRouter.on('route:attackRoute', function(scr,menu,stage,num) {
|
||||||
this.lessonController.loadLesson(scr,menu,stage,num);
|
this.lessonController.loadLesson(scr,menu,stage,num);
|
||||||
this.menuController.updateMenu(scr,menu);
|
this.menuController.updateMenu(scr,menu);
|
||||||
//update menu
|
|
||||||
});
|
});
|
||||||
goatRouter.on('route:welcomeRoute', function() {
|
goatRouter.on('route:welcomeRoute', function() {
|
||||||
this.lessonController.loadWelcome();
|
this.lessonController.loadWelcome();
|
||||||
});
|
});
|
||||||
goatRouter.on("route", function(route, params) {
|
goatRouter.on("route", function(route, params) {
|
||||||
console.log("Got a route event: " + route + ", params: " + params);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Backbone.history.start();
|
Backbone.history.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user