Skip to content

Commit d414d1a

Browse files
author
Jason White
committed
basic updates to UI, some js clean-up (moving some literals into goatConstants)
1 parent 1c72097 commit d414d1a

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<header id="header">
6565
<!--logo start-->
6666
<div class="brand">
67-
<a href="/webgoat/start.mvc" class="logo"><span>Web</span>Goat</a>
67+
<a href="${pageContext.request.contextPath}/start.mvc" class="logo"><span>Web</span>Goat</a>
6868
</div>
6969
<!--logo end-->
7070
<div class="toggle-navigation toggle-left">
@@ -74,6 +74,11 @@
7474
<span id="lessonTitle">Welcome To WebGoat</span>
7575

7676
</div><!--toggle navigation end-->
77+
<div id="topLinks">
78+
<span><a href="#">About</a></span><br/>
79+
<span><a href="#">Contact</a></span><br/>
80+
<span><a href="${pageContext.request.contextPath}/j_spring_security_logout">Log out</a></span><br/>
81+
</div>
7782
</header>
7883

7984
<!--sidebar left start-->

src/main/webapp/css/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,4 +747,10 @@ fieldset[disabled] .btn-warning.active {
747747
#buttonPanel {
748748
padding:3px;
749749
width:auto;
750+
}
751+
752+
#topLinks {
753+
float:right;
754+
margin-right:5px;
755+
margin-top:3px;
750756
}

src/main/webapp/js/goatConstants.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ var goatConstants = {
1111
children:null,
1212
class:'fa-bars static'
1313
}],
14-
lessonService: 'service/lessonmenu.mvc'
14+
lessonService: 'service/lessonmenu.mvc',
15+
cookieService: 'service/cookies_widget.mvc',
16+
hintService:'service/hint_widget.mvc',
17+
sourceService:'service/source.mvc',
18+
solutionService:'service/solution.mvc',
19+
lessonPlanService:'service/lessonplan.mvc'
1520
};
1621

src/main/webapp/js/goatUtil.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ goat.utils = {
2424
return title;
2525
},
2626
showLessonCookiesAndParams: function() {
27-
$.get("service/cookies_widget.mvc", {}, function(reply) {
27+
$.get(goatConstants.cookieService, {}, function(reply) {
2828
$("#lesson_cookies").html(reply);
2929
}, "html");
3030
},
3131
showLessonHint: function() {
32-
$.get("service/hint_widget.mvc", {}, function(reply) {
32+
$.get(goatConstants.hintService, {}, function(reply) {
3333
$("#lesson_hint").html(reply);
3434
}, "html");
3535
},
3636
showLessonSource: function() {
37-
$.get("service/source.mvc", {}, function(reply) {
37+
$.get(goatConstants.sourceService, {}, function(reply) {
3838
$("#lesson_source").html("<pre>"+reply+"</pre>");
3939
}, "html");
4040
},
4141
showLessonSolution: function() {
42-
$.get("service/solution.mvc", {}, function(reply) {
42+
$.get(goatConstants.solutionService, {}, function(reply) {
4343
$("#lesson_solution").html(reply);
4444
}, "html");
4545
},
4646
showLessonPlan: function() {
47-
$.get("service/lessonplan.mvc", {}, function(reply) {
47+
$.get(goatConstants.lessonPlanService, {}, function(reply) {
4848
$("#lesson_plan").html(reply);
4949
}, "html");
5050
}

src/main/webapp/lessonJS/sameOrigin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ function submitXHR(){
77

88
document.getElementById("responseArea").innerHTML="";
99

10-
alert("creating XHR request for: " + document.getElementById("requestedURL").value);
11-
10+
//alert("creating XHR request for: " + document.getElementById("requestedURL").value);
11+
console.log("creating XHR request for: " + document.getElementById("requestedURL").value);
1212

1313

1414
try{

0 commit comments

Comments
 (0)