diff --git a/webgoat-container/src/main/webapp/css/main.css b/webgoat-container/src/main/webapp/css/main.css
index d12e74068..c81b51679 100644
--- a/webgoat-container/src/main/webapp/css/main.css
+++ b/webgoat-container/src/main/webapp/css/main.css
@@ -659,6 +659,10 @@ fieldset[disabled] .btn-warning.active {
max-height: 375px;
overflow-y: auto;
}
+
+#about-modal {
+ opacity: 95%;
+}
/* ==========================================================================
Media Queries
========================================================================== */
diff --git a/webgoat-container/src/main/webapp/js/goatApp/controller/LessonController.js b/webgoat-container/src/main/webapp/js/goatApp/controller/LessonController.js
index 3ac5e074e..b45b1db1d 100644
--- a/webgoat-container/src/main/webapp/js/goatApp/controller/LessonController.js
+++ b/webgoat-container/src/main/webapp/js/goatApp/controller/LessonController.js
@@ -11,7 +11,9 @@ define(['jquery',
'goatApp/view/CookieView',
'goatApp/view/ParamView',
'goatApp/model/ParamModel',
- 'goatApp/support/GoatUtils'
+ 'goatApp/support/GoatUtils',
+ 'goatApp/view/UserAndInfoView',
+ 'goatApp/view/MenuButtonView'
],
function($,
_,
@@ -26,7 +28,9 @@ define(['jquery',
CookieView,
ParamView,
ParamModel,
- GoatUtils
+ GoatUtils,
+ UserAndInfoView,
+ MenuButtonView
) {
'use strict'
@@ -36,8 +40,12 @@ define(['jquery',
this.lessonView = options.lessonView;
_.extend(Controller.prototype,Backbone.Events);
+
this.start = function() {
this.listenTo(this.lessonContent,'contentLoaded',this.onContentLoaded);
+ //'static' elements of page/app
+ this.userAndInfoView = new UserAndInfoView();
+ this.menuButtonView = new MenuButtonView();
};
//load View, which can pull data
this.loadLesson = function(scr,menu,stage) {
diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/MenuButtonView.js b/webgoat-container/src/main/webapp/js/goatApp/view/MenuButtonView.js
new file mode 100644
index 000000000..b82e62b89
--- /dev/null
+++ b/webgoat-container/src/main/webapp/js/goatApp/view/MenuButtonView.js
@@ -0,0 +1,27 @@
+//
+//UserAndInfoView
+define(['jquery',
+ 'underscore',
+ 'backbone'],
+function($,
+ _,
+ Backbone) {
+ return Backbone.View.extend({
+ el:'#toggle-menu', //Check this,
+
+ initialize: function() {
+ this.$el.on('click',this.toggleMenu);
+ },
+
+ toggleMenu: function() {
+ //left
+ if (!$('.sidebarRight').hasClass('.sidebar-toggle-right')) {
+ $('.sidebarRight').removeClass('sidebar-toggle-right');
+ $('.main-content-wrapper').removeClass('main-content-toggle-right');
+ }
+ $('.sidebar').toggleClass('sidebar-toggle');
+ $('.main-content-wrapper').toggleClass('main-content-toggle-left');
+ //e.stopPropagation();
+ }
+ });
+});
\ No newline at end of file
diff --git a/webgoat-container/src/main/webapp/js/goatApp/view/UserAndInfoView.js b/webgoat-container/src/main/webapp/js/goatApp/view/UserAndInfoView.js
new file mode 100644
index 000000000..b6ee51c86
--- /dev/null
+++ b/webgoat-container/src/main/webapp/js/goatApp/view/UserAndInfoView.js
@@ -0,0 +1,45 @@
+//UserAndInfoView
+define(['jquery',
+ 'underscore',
+ 'backbone'],
+function($,
+ _,
+ Backbone) {
+ return Backbone.View.extend({
+ el:'#user-and-info-nav', //Check this,
+
+ events: {
+ 'click #about-button': 'showAboutModal',
+ 'click #user-menu': 'showUserMenu'
+ },
+
+ initialize: function() {
+
+ },
+
+ render:function(title) {
+ },
+
+ showUserMenu: function() {
+ var menu = this.$el.find('.dropdown-menu');
+ if (menu.is(':visible')) {
+ menu.hide(200);
+ } else {
+ menu.show(400);
+ /*menu.on('mouseout', function() {
+ $('#user-and-info-nav .dropdown-menu').hide(200);
+ });*/
+ }
+
+ },
+
+ showAboutModal: function() {
+ $('#about-modal').show(400);
+ $('#about-modal div.modal-header button.close').unbind('click').on('click', function() {
+ $('#about-modal').hide(200);
+ });
+ }
+
+
+ });
+});
\ No newline at end of file