From 9b4c97e4680a77035fa2c0e9342bace969d02a8e Mon Sep 17 00:00:00 2001 From: Jason White Date: Sat, 22 Aug 2015 05:59:48 -0400 Subject: [PATCH] Fixes for issue #32 - lessons/menu not loading --- .../src/main/webapp/js/goatApp/view/CookieView.js | 6 +++--- .../src/main/webapp/js/goatApp/view/LessonContentView.js | 6 ++---- .../src/main/webapp/js/goatApp/view/MenuView.js | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/CookieView.js b/webgoat-container/src/main/webapp/js/goatApp/view/CookieView.js index aa8bb9d82..106b6f952 100644 --- a/webgoat-container/src/main/webapp/js/goatApp/view/CookieView.js +++ b/webgoat-container/src/main/webapp/js/goatApp/view/CookieView.js @@ -1,16 +1,16 @@ define(['jquery', 'underscore', 'backbone', - 'goatApp/model/LessonCookieCollection'], + 'goatApp/model/CookieCollection'], function($, _, Backbone, - LessonCookieCollection) { + CookieCollection) { return Backbone.View.extend({ el:'#cookies-view', initialize: function() { - this.collection = new LessonCookieCollection(); + this.collection = new CookieCollection(); this.listenTo(this.collection,'reset',this.render) this.collection.fetch({reset:true}); }, diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js b/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js index 5b7bf44ae..2ae247b96 100644 --- a/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js +++ b/webgoat-container/src/main/webapp/js/goatApp/view/LessonContentView.js @@ -2,14 +2,12 @@ define(['jquery', 'underscore', 'backbone', - 'libs/jquery.form', - 'goatApp/model/LessonContent'], + 'libs/jquery.form'], function( $, _, Backbone, - JQueryForm, - LessonContent) { + JQueryForm) { return Backbone.View.extend({ el:'#lesson-content-wrapper', //TODO << get this fixed up in DOM initialize: function(options) { diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/MenuView.js b/webgoat-container/src/main/webapp/js/goatApp/view/MenuView.js index a45d4e71f..4ed9340ad 100644 --- a/webgoat-container/src/main/webapp/js/goatApp/view/MenuView.js +++ b/webgoat-container/src/main/webapp/js/goatApp/view/MenuView.js @@ -65,7 +65,7 @@ define(['jquery', var stageSpan = $(''); stageSpan.append(stageLink); categoryLessonList.append(stageSpan); - if (stages[j].complete) { + if (stages[k].complete) { stageSpan.append($('',{class:'glyphicon glyphicon-check lesson-complete'})); } }