Fixes for issue #32 - lessons/menu not loading
This commit is contained in:
parent
16c262f3bc
commit
9b4c97e468
@ -1,16 +1,16 @@
|
|||||||
define(['jquery',
|
define(['jquery',
|
||||||
'underscore',
|
'underscore',
|
||||||
'backbone',
|
'backbone',
|
||||||
'goatApp/model/LessonCookieCollection'],
|
'goatApp/model/CookieCollection'],
|
||||||
function($,
|
function($,
|
||||||
_,
|
_,
|
||||||
Backbone,
|
Backbone,
|
||||||
LessonCookieCollection) {
|
CookieCollection) {
|
||||||
return Backbone.View.extend({
|
return Backbone.View.extend({
|
||||||
el:'#cookies-view',
|
el:'#cookies-view',
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.collection = new LessonCookieCollection();
|
this.collection = new CookieCollection();
|
||||||
this.listenTo(this.collection,'reset',this.render)
|
this.listenTo(this.collection,'reset',this.render)
|
||||||
this.collection.fetch({reset:true});
|
this.collection.fetch({reset:true});
|
||||||
},
|
},
|
||||||
|
@ -2,14 +2,12 @@
|
|||||||
define(['jquery',
|
define(['jquery',
|
||||||
'underscore',
|
'underscore',
|
||||||
'backbone',
|
'backbone',
|
||||||
'libs/jquery.form',
|
'libs/jquery.form'],
|
||||||
'goatApp/model/LessonContent'],
|
|
||||||
function(
|
function(
|
||||||
$,
|
$,
|
||||||
_,
|
_,
|
||||||
Backbone,
|
Backbone,
|
||||||
JQueryForm,
|
JQueryForm) {
|
||||||
LessonContent) {
|
|
||||||
return Backbone.View.extend({
|
return Backbone.View.extend({
|
||||||
el:'#lesson-content-wrapper', //TODO << get this fixed up in DOM
|
el:'#lesson-content-wrapper', //TODO << get this fixed up in DOM
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
|
@ -65,7 +65,7 @@ define(['jquery',
|
|||||||
var stageSpan = $('<span>');
|
var stageSpan = $('<span>');
|
||||||
stageSpan.append(stageLink);
|
stageSpan.append(stageLink);
|
||||||
categoryLessonList.append(stageSpan);
|
categoryLessonList.append(stageSpan);
|
||||||
if (stages[j].complete) {
|
if (stages[k].complete) {
|
||||||
stageSpan.append($('<span>',{class:'glyphicon glyphicon-check lesson-complete'}));
|
stageSpan.append($('<span>',{class:'glyphicon glyphicon-check lesson-complete'}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user