fixed a global scope issue on LessonController | fixed the listenTo yntax for goatRouter.js

This commit is contained in:
Michael Katz 2015-08-14 17:24:34 +03:00
parent da5a63453b
commit 68d952eb5d
3 changed files with 6 additions and 4 deletions

View File

@ -132,7 +132,7 @@ define(['jquery',
};
this.restartLesson = function() {
self=this;
var self=this;
$.ajax({
url:'service/restartlesson.mvc',
method:'GET'

View File

@ -5,8 +5,9 @@ define(['jquery',
'goatApp/controller/MenuController',
'goatApp/view/LessonContentView',
'goatApp/view/MenuView',
'goatApp/view/TitleView'
], function ($,_,Backbone,LessonController,MenuController,LessonContentView,MenuView,TitleView) {
'goatApp/view/TitleView',
'goatApp/model/MenuData'
], function ($,_,Backbone,LessonController,MenuController,LessonContentView,MenuView,TitleView, MenuModel) {
var lessonView = new LessonContentView();
var menuView = new MenuView();
@ -43,7 +44,7 @@ define(['jquery',
});
Backbone.history.start();
this.listenTo('menu:reload',this.reloadMenu)
this.listenTo(this.menuController, 'menu:reload',this.reloadMenu)
},
reloadMenu: function (curLesson) {

File diff suppressed because one or more lines are too long