Skip to content

Commit 8b2eeb1

Browse files
committed
WEB-43 Implement Accordion on Menu
tried to implement jQuery UI Accordion; issues raised in the ticket
1 parent d6e68e4 commit 8b2eeb1

File tree

2 files changed

+111
-101
lines changed

2 files changed

+111
-101
lines changed

src/main/webapp/WEB-INF/pages/main_new.jsp

Lines changed: 104 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,54 @@
88
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
99
<html xmlns="http://www.w3.org/1999/xhtml">
1010
<head>
11-
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
12-
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
13-
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
14-
<!--[if gt IE 8]><!-->
15-
16-
<!-- CSS -->
17-
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
18-
<!-- Bootstrap core CSS -->
19-
<link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css">
20-
<!-- Fonts from Font Awsome -->
21-
<link rel="stylesheet" href="css/font-awesome.min.css">
22-
<!-- CSS Animate -->
23-
<link rel="stylesheet" href="css/animate.css">
24-
<!-- Custom styles for this theme -->
25-
<link rel="stylesheet" href="css/main.css">
11+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
12+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
13+
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
14+
<!--[if gt IE 8]><!-->
15+
16+
<!-- CSS -->
17+
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
18+
<!-- Bootstrap core CSS -->
19+
<link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css">
20+
<!-- Fonts from Font Awsome -->
21+
<link rel="stylesheet" href="css/font-awesome.min.css">
22+
<!-- CSS Animate -->
23+
<link rel="stylesheet" href="css/animate.css">
24+
<!-- Custom styles for this theme -->
25+
<link rel="stylesheet" href="css/main.css">
2626
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/>
2727
<!-- end of CSS -->
28-
29-
<!-- JS -->
30-
<script src="js/angular/angular.min.js"></script>
31-
<!-- angular modules -->
32-
<script src="js/angular/angular-animate.min.js"></script>
33-
<script src="js/angular/ui-bootstrap-tpls-0.11.0.min.js"></script>
34-
<!-- Feature detection -->
35-
<script src="js/modernizr-2.6.2.min.js"></script>
36-
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
37-
<!--[if lt IE 9]>
38-
<script src="js/html5shiv.js"></script>
39-
<script src="js/respond.min.js"></script>
40-
<![endif]-->
41-
42-
<!--Global JS-->
43-
<script src="js/jquery/jquery-1.10.2.min.js"></script>
44-
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
28+
29+
<!-- JS -->
30+
<script src="js/angular/angular.min.js"></script>
31+
<!-- angular modules -->
32+
<script src="js/angular/angular-animate.min.js"></script>
33+
<script src="js/angular/ui-bootstrap-tpls-0.11.0.min.js"></script>
34+
<!-- Feature detection -->
35+
<script src="js/modernizr-2.6.2.min.js"></script>
36+
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
37+
<!--[if lt IE 9]>
38+
<script src="js/html5shiv.js"></script>
39+
<script src="js/respond.min.js"></script>
40+
<![endif]-->
41+
42+
<!--Global JS-->
43+
<script src="js/jquery/jquery-1.10.2.min.js"></script>
44+
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
4545

4646
<script src="js/application.js"></script>
4747
<script type="text/javascript">
48-
var goat=angular.module("goatApp", ['ngAnimate','ui.bootstrap']);
49-
</script>
50-
<script type="text/javascript" src="js/goatConstants.js"></script>
51-
<script type="text/javascript" src="js/goatUtil.js"></script>
52-
<script type="text/javascript" src="js/goatData.js"></script>
53-
<script type="text/javascript" src="js/goatControllers.js"></script>
54-
<!-- end of JS -->
48+
var goat=angular.module("goatApp", ['ngAnimate','ui.bootstrap']);
49+
</script>
50+
<script type="text/javascript" src="js/goatConstants.js"></script>
51+
<script type="text/javascript" src="js/goatUtil.js"></script>
52+
<script type="text/javascript" src="js/goatData.js"></script>
53+
<script type="text/javascript" src="js/goatControllers.js"></script>
54+
<script type="text/javascript" src="js/jquery/jquery-ui-1.10.4.custom.min.js"></script>
55+
<!-- end of JS -->
5556

56-
57-
5857
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
59-
<title>WebGoat V6.0</title>
58+
<title>WebGoat V6.0 fsdafasd</title>
6059
</head>
6160

6261
<body class="animated fadeIn" ng-app="goatApp" ng-controller="goatLesson">
@@ -71,100 +70,104 @@
7170
<button type="button" class="btn btn-default" id="toggle-left" data-toggle="tooltip" data-placement="right" title="Toggle Navigation">
7271
<i class="fa fa-bars"></i>
7372
</button>
74-
<span id="lessonTitle">Welcome To WebGoat</span>
73+
<span id="lessonTitle">Welcome To WebGoat</span>
7574

7675
</div><!--toggle navigation end-->
7776
</header>
78-
79-
<!--sidebar left start-->
77+
78+
<!--sidebar left start-->
8079
<aside class="sidebar">
8180
<div id="leftside-navigation" class="nano" >
82-
<ul class="nano-content">
83-
<li class="sub-menu" ng-repeat="item in menuTopics">
84-
<a ng-click="expanded = !expanded" href=""><i class="fa {{item.class}}"></i><span>{{item.name}}</span></a>
85-
<ul class="slideDown" ng-show="expanded">
86-
<li ng-repeat="lesson in item.children">
87-
<a ng-click="renderLesson(lesson.link)" title="link to {{lesson.name}}" href="">{{lesson.name}}</a>
88-
<span ng-repeat="stage in lesson.children" >
89-
<a ng-click="renderLesson(stage.link)" title="link to {{stage.name}}" href="">{{stage.name}}</a>
90-
</span>
91-
</li>
92-
</ul>
93-
</li>
94-
</ul>
95-
81+
<ul id="accordion" class="nano-content">
82+
<li class="sub-menu" ng-repeat="item in menuTopics">
83+
<h6>
84+
<a ng-click="expanded = !expanded" href=""><i class="fa {{item.class}}"></i><span>{{item.name}}</span></a>
85+
</h6>
86+
<div>
87+
<ul class="slideDown" ng-show="expanded">
88+
<li ng-repeat="lesson in item.children">
89+
<a ng-click="renderLesson(lesson.link)" title="link to {{lesson.name}}"
90+
href="">{{lesson.name}}</a>
91+
<span ng-repeat="stage in lesson.children" >
92+
<a ng-click="renderLesson(stage.link)" title="link to {{stage.name}}"
93+
href="">{{stage.name}}</a>
94+
</span>
95+
</li>
96+
</ul>
97+
</div>
98+
</li>
99+
</ul>
96100
</div>
97-
98101
</aside>
99102
<!--sidebar left end-->
100103
<!--main content start-->
101104
<section class="main-content-wrapper">
102105

103106
<section id="main-content">
104107
<div class="row">
105-
<div class="col-md-12">
106-
<div class="panel" id="buttonPanel">
107-
<button type="button" class="btn btn-primary btn-xs">Params/Cookies</button>
108-
<button type="button" class="btn btn-primary btn-xs">Hints</button>
109-
<button type="button" class="btn btn-primary btn-xs">Lesson Plan</button>
110-
<button type="button" class="btn btn-primary btn-xs" ng-click="showSource('lg')">Java [Source]</button>
111-
<button type="button" class="btn btn-primary btn-xs" ng-click="showSolution('lg')">Solution</button>
112-
</div>
113-
<div class="panel" >
114-
<div class="panel-body" id="lesson_content">
115-
<b>This should default to the "How to Work with Webgoat" lesson</b>
116-
</div>
117-
118-
</div>
119-
</div>
108+
<div class="col-md-12">
109+
<div class="panel" id="buttonPanel">
110+
<button type="button" class="btn btn-primary btn-xs">Params/Cookies</button>
111+
<button type="button" class="btn btn-primary btn-xs">Hints</button>
112+
<button type="button" class="btn btn-primary btn-xs">Lesson Plan</button>
113+
<button type="button" class="btn btn-primary btn-xs" ng-click="showSource('lg')">Java [Source]</button>
114+
<button type="button" class="btn btn-primary btn-xs" ng-click="showSolution('lg')">Solution</button>
115+
</div>
116+
<div class="panel" >
117+
<div class="panel-body" id="lesson_content">
118+
<b>This should default to the "How to Work with Webgoat" lesson</b>
119+
</div>
120+
121+
</div>
122+
</div>
120123
</div>
121124
<div class="row" id="lesson_cookies_row">
122-
<div class="col-md-12">
125+
<div class="col-md-12">
123126
<h4>Lesson Parameters and Cookies</h4>
124-
<div class="panel" >
125-
<div class="panel-body" id="lesson_cookies">
127+
<div class="panel" >
128+
<div class="panel-body" id="lesson_cookies">
126129
1
127130
</div>
128-
</div>
129-
</div>
131+
</div>
132+
</div>
130133
</div>
131134
<div class="row" id="lesson_hint_row">
132-
<div class="col-md-12">
135+
<div class="col-md-12">
133136
<h4>Lesson Hints</h4>
134-
<div class="panel" >
135-
<div class="panel-body" id="lesson_hint">
137+
<div class="panel" >
138+
<div class="panel-body" id="lesson_hint">
136139

137140
</div>
138-
</div>
139-
</div>
141+
</div>
142+
</div>
140143
</div>
141144
<div class="row" id="lesson_plan_row">
142-
<div class="col-md-12">
145+
<div class="col-md-12">
143146
<h4>Lesson Plan</h4>
144-
<div class="panel" >
145-
<div class="panel-body" id="lesson_plan">
147+
<div class="panel" >
148+
<div class="panel-body" id="lesson_plan">
146149

147150
</div>
148-
</div>
149-
</div>
151+
</div>
152+
</div>
150153
</div>
151154
<div class="row" id="lesson_solution_row">
152-
<div class="col-md-12">
155+
<div class="col-md-12">
153156
<h4>Lesson Solution</h4>
154-
<div class="panel" >
155-
<div class="panel-body" id="lesson_solution">
157+
<div class="panel" >
158+
<div class="panel-body" id="lesson_solution">
156159
</div>
157-
</div>
158-
</div>
160+
</div>
161+
</div>
159162
</div>
160163
<div class="row" id="lesson_source_row">
161-
<div class="col-md-12">
164+
<div class="col-md-12">
162165
<h4>Lesson Source Code</h4>
163-
<div class="panel" >
164-
<div class="panel-body" id="lesson_source">
166+
<div class="panel" >
167+
<div class="panel-body" id="lesson_source">
165168
</div>
166-
</div>
167-
</div>
169+
</div>
170+
</div>
168171
</div>
169172
</section>
170173
</section>
@@ -177,7 +180,7 @@
177180
<script src="http://malsup.github.com/jquery.form.js"></script>
178181
<script>
179182
//Load global functions
180-
183+
181184
// set this to true if you want to see form submissions
182185
// set to false once we get all the kinks worked out
183186
var DEBUG_FORM_SUBMISSION = false;

src/main/webapp/js/jquery/jquery-ui-1.10.4.custom.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)