Merged branch 'next' of https://github.com/WebGoat/WebGoat into next
This commit is contained in:
@ -28,7 +28,9 @@
|
||||
|
||||
<!-- JS -->
|
||||
<script src="js/angular/angular.min.js"></script>
|
||||
<!-- angular modules -->
|
||||
<script src="js/angular/angular-animate.min.js"></script>
|
||||
<script src="js/angular/ui-bootstrap-tpls-0.11.0.min.js"></script>
|
||||
<!-- Feature detection -->
|
||||
<script src="js/modernizr-2.6.2.min.js"></script>
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
@ -36,50 +38,60 @@
|
||||
<script src="js/html5shiv.js"></script>
|
||||
<script src="js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script src="js/application.js"></script>
|
||||
<script type="text/javascript">
|
||||
var goat=angular.module("goatApp", ['ngAnimate']);
|
||||
|
||||
<!--Global JS-->
|
||||
<script src="js/jquery/jquery-1.10.2.min.js"></script>
|
||||
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="js/application.js"></script>
|
||||
<script type="text/javascript">
|
||||
var goat=angular.module("goatApp", ['ngAnimate','ui.bootstrap']);
|
||||
</script>
|
||||
<script type="text/javascript" src="js/goat.js"></script>
|
||||
<script type="text/javascript" src="js/goatConstants.js"></script>
|
||||
<!-- end of JS -->
|
||||
<script type="text/javascript" src="js/goatUtil.js"></script>
|
||||
<script type="text/javascript" src="js/goatData.js"></script>
|
||||
<script type="text/javascript" src="js/goatControllers.js"></script>
|
||||
<!-- end of JS -->
|
||||
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>WebGoat V6.0</title>
|
||||
</head>
|
||||
|
||||
<body class="animated fadeIn" ng-app="goatApp">
|
||||
<body class="animated fadeIn" ng-app="goatApp" ng-controller="goatLesson">
|
||||
<section id="container">
|
||||
<header id="header">
|
||||
<!--logo start-->
|
||||
<div class="brand">
|
||||
<a href="index.html" class="logo"><span>Web</span>Goat</a>
|
||||
<a href="/webgoat/start.mvc" class="logo"><span>Web</span>Goat</a>
|
||||
</div>
|
||||
<!--logo end-->
|
||||
<div class="toggle-navigation toggle-left">
|
||||
<button type="button" class="btn btn-default" id="toggle-left" data-toggle="tooltip" data-placement="right" title="Toggle Navigation">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<span id="lessonTitle">Welcome To WebGoat</span>
|
||||
|
||||
</div><!--toggle navigation end-->
|
||||
</header>
|
||||
|
||||
<!--sidebar left start-->
|
||||
<aside class="sidebar">
|
||||
<div id="leftside-navigation" class="nano" ng-controller="goatMenu">
|
||||
<ul class="nano-content">
|
||||
<li class="sub-menu" ng-repeat="item in menuTopics">
|
||||
<!-- TODO: implement conditional rendering -->
|
||||
<a ng-click="expanded = !expanded" href=""><i class="fa {{item.class}}"></i><span>{{item.name}}</span></a>
|
||||
<ul class="slideDown" ng-show="expanded">
|
||||
<li ng-repeat="lesson in item.children">
|
||||
<a ng-click="renderLesson(lesson.link)" title="link to {{lesson.name}}" href="">{{lesson.name}}</a>
|
||||
<span ng-repeat="stage in lesson.children" >
|
||||
<a ng-click="renderLesson(stage.link)" title="link to {{stage.name}}" href="">{{stage.name}}</a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="leftside-navigation" class="nano" >
|
||||
<ul class="nano-content">
|
||||
<li class="sub-menu" ng-repeat="item in menuTopics">
|
||||
<a ng-click="expanded = !expanded" href=""><i class="fa {{item.class}}"></i><span>{{item.name}}</span></a>
|
||||
<ul class="slideDown" ng-show="expanded">
|
||||
<li ng-repeat="lesson in item.children">
|
||||
<a ng-click="renderLesson(lesson.link)" title="link to {{lesson.name}}" href="">{{lesson.name}}</a>
|
||||
<span ng-repeat="stage in lesson.children" >
|
||||
<a ng-click="renderLesson(stage.link)" title="link to {{stage.name}}" href="">{{stage.name}}</a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@ -87,33 +99,81 @@
|
||||
<!--sidebar left end-->
|
||||
<!--main content start-->
|
||||
<section class="main-content-wrapper">
|
||||
|
||||
<section id="main-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel" id="buttonPanel">
|
||||
<button type="button" class="btn btn-primary btn-xs">Params/Cookies</button>
|
||||
<button type="button" class="btn btn-primary btn-xs">Hints</button>
|
||||
<button type="button" class="btn btn-primary btn-xs">Lesson Plan</button>
|
||||
<button type="button" class="btn btn-primary btn-xs" ng-click="showSource('lg')">Java [Source]</button>
|
||||
<button type="button" class="btn btn-primary btn-xs" ng-click="showSolution('lg')">Solution</button>
|
||||
</div>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_content">
|
||||
<b>This should default to the "How to Work with Webgoat" lesson</b>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="lesson_cookies_row">
|
||||
<div class="col-md-12">
|
||||
<h4>Lesson Parameters and Cookies</h4>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_content">
|
||||
<b>This should default to the "How to Work with Webgoat" lesson</b>
|
||||
</div>
|
||||
<div class="panel-body" id="lesson_cookies">
|
||||
1
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="lesson_hint_row">
|
||||
<div class="col-md-12">
|
||||
<h4>Lesson Hints</h4>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_hint">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="lesson_plan_row">
|
||||
<div class="col-md-12">
|
||||
<h4>Lesson Plan</h4>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_plan">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="lesson_solution_row">
|
||||
<div class="col-md-12">
|
||||
<h4>Lesson Solution</h4>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_solution">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="lesson_source_row">
|
||||
<div class="col-md-12">
|
||||
<h4>Lesson Source Code</h4>
|
||||
<div class="panel" >
|
||||
<div class="panel-body" id="lesson_source">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!--main content end-->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<!--Global JS-->
|
||||
<script src="js/jquery/jquery-1.10.2.min.js"></script>
|
||||
<script src="plugins/bootstrap/js/bootstrap.min.js"></script>
|
||||
<!-- <script src="plugins/waypoints/waypoints.min.js"></script> -->
|
||||
<!-- <script src="js/application.js"></script> -->
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> -->
|
||||
<!-- TODO pull source into project instead of loading from external -->
|
||||
<script src="http://malsup.github.com/jquery.form.js"></script>
|
||||
<script>
|
||||
//Load global functions
|
||||
@ -128,9 +188,11 @@
|
||||
event.preventDefault();
|
||||
$.get(this.href, {}, function(reply) {
|
||||
$("#lesson_content").html(reply);
|
||||
goat.utils.showLessonSource();
|
||||
}, "html");
|
||||
});
|
||||
app.init();
|
||||
|
||||
});
|
||||
// make all forms ajax forms
|
||||
var options = {
|
||||
@ -183,12 +245,13 @@
|
||||
alert('status: ' + statusText + '\n\nresponseText: \n' + responseText +
|
||||
'\n\nThe output div should have already been updated with the responseText.');
|
||||
}
|
||||
makeFormsAjax();
|
||||
}
|
||||
function makeFormsAjax() {
|
||||
//console.log("Hooking any lesson forms to make them ajax");
|
||||
$("form").ajaxForm(options);
|
||||
// JASON - SEE THIS HOOK
|
||||
// update lesson cookies and params
|
||||
// make any embedded forms ajaxy
|
||||
goat.utils.showLessonCookiesAndParams();
|
||||
goat.utils.makeFormsAjax();
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user