Commit 61a713f2 by Kyle Fiedler

Changed some style for the courseware, fixed the footer links and fixed the modal window

parent 8b29b153
$("#accordion").accordion({active:${ active_chapter }}); $("#accordion").accordion({
active:${ active_chapter },
autoHeight: false
});
$('.ui-accordion').bind('accordionchange', function(event, ui) { $('.ui-accordion').bind('accordionchange', function(event, ui) {
var event_data = {'newheader':ui.newHeader.text(), var event_data = {'newheader':ui.newHeader.text(),
'oldheader':ui.oldHeader.text()}; 'oldheader':ui.oldHeader.text()};
log_event('accordion', event_data); log_event('accordion', event_data);
}); });
\ No newline at end of file
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
<script> <script>
$(function() { $(function() {
/* Set up FancyBox pop-ups */ /* Set up FancyBox pop-ups */
$("a#inline").fancybox({
'hideOnContentClick': false
});
// TODO: Clean up as per http://stackoverflow.com/questions/169506/obtain-form-input-fields-using-jquery // TODO: Clean up as per http://stackoverflow.com/questions/169506/obtain-form-input-fields-using-jquery
...@@ -107,8 +104,8 @@ $(function() { ...@@ -107,8 +104,8 @@ $(function() {
<center> <center>
<table> <table>
<tr><td align=right><big><a id="inline" href="#enroll">Enroll &gt;&gt;</a><br><br><br> <tr><td align=right><big><a class="modal" href="#enroll">Enroll &gt;&gt;</a><br><br><br>
<a id="inline" href="#login">Log In &gt;&gt;</a></big></td><td><div style="width:50px; float:center;"></div></td><td> <a class="modal" href="#login">Log In &gt;&gt;</a></big></td><td><div style="width:50px; float:center;"></div></td><td>
<div style="width:300px; float:center;"> <div style="width:300px; float:center;">
Taught by Anant Agarwal, with Gerald Sussman, Piotr Mitros, and Chris Taught by Anant Agarwal, with Gerald Sussman, Piotr Mitros, and Chris
Terman, "6.002 Circuits and Electronics" is an an on-line adaption of Terman, "6.002 Circuits and Electronics" is an an on-line adaption of
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
</form> </form>
</td></tr></table> </td></tr></table>
<div align=center> <div align=center>
<div id="lost_password"><a id="inline" href="#pwd_reset">Lost password?</a></div> <div id="lost_password"><a class="modal" href="#pwd_reset">Lost password?</a></div>
</div> </div>
</div> </div>
...@@ -28,13 +28,12 @@ ...@@ -28,13 +28,12 @@
<script> <script>
$(function() { $(function() {
// Set up FancyBox pop-ups // Set up FancyBox pop-ups
$("a#inline").fancybox({ $("a.modal").fancybox({
'hideOnContentClick': false 'hideOnContentClick': false
}); });
}); });
</script> </script>
<%block name="headextra"/> <%block name="headextra"/>
</head> </head>
...@@ -45,57 +44,68 @@ $(function() { ...@@ -45,57 +44,68 @@ $(function() {
<%block name="bodyextra"/> <%block name="bodyextra"/>
<footer> <footer>
<p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a> Please give us <a id="inline" <!-- Template based on a design from http://www.dotemplate.com/ - Donated $10 (pmitros) so we don't need to include credit. -->
href="#feedback_div">feedback</a>. Try our <a id="inline" <p> Copyright (c). 2011. MIT. <a href=http://creativecommons.org/licenses/by-sa/3.0/>Some rights reserved.</a></p>
href="#calculator_div">calculator</a>.
<!-- Template based on a design from http://www.dotemplate.com/ - Donated $10 (pmitros) so we don't need to include credit. -->
</p>
<div style="display:none"><div id="feedback_div">Found a bug? Got an
idea for improving our system? Let us know.
<br> Subject: <br><input id="feedback_subject" size=40>
<br> Feedback: <br><textarea id="feedback_message" cols="40" rows="5">
</textarea>
<br> <input id="feedback_button" type="button" value="Submit">
<script>$(function() {
$("#feedback_button").click(function(){
postJSON("/send_feedback", {"subject":$("#feedback_subject").attr("value"),
"url":document.URL,
"message":$("#feedback_message").attr("value")},
function(data){
$("#feedback_subject").attr("value","");
$("#feedback_message").attr("value","");
$("#feedback_div").html("Feedback submitted. Thank you");
});
});
});</script>
</div></div>
<div style="display:none"><div id="calculator_div">
<input id="calculator_input" > <input id="calculator_button" type=button value="=&gt;">
<input id="calculator_output" readonly>
<script>$(function() {
$("#calculator_button").click(function(){
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){
$("#calculator_output").attr("value",data.result);
});
});
});</script>
<br>
Supported operations: ^ * / + - || ()
<br>
Supported suffixes: %kMGTcmunp
</div></div>
<ul> <ul>
<li><a href="#feedback_div" class="modal">Feedback</a></li>
<li><a href="#calculator_div" class="modal">Calculator</a></li>
<li><a href="/s/help.html">Help</a></li> <li><a href="/s/help.html">Help</a></li>
<li><a href="/logout">Log out</a></li> <li><a href="/logout">Log out</a></li>
</ul> </ul>
</footer> </footer>
<div style="display:none">
<div id="feedback_div">
Found a bug? Got an idea for improving our system? Let us know.
<form>
<ol>
<li><label>Subject:</label> <input id="feedback_subject" size=40></li>
<li><label>Feedback: </label><textarea id="feedback_message" cols="40" rows="5"></textarea></li>
<li><input id="feedback_button" type="button" value="Submit"></li>
</ol>
</form>
</div>
</div>
<div style="display:none">
<div id="calculator_div">
<input id="calculator_input" >
<input id="calculator_button" type=button value="=&gt;">
<input id="calculator_output" readonly>
<p>Supported operations: ^ * / + - || ()</p>
<p>Supported suffixes: %kMGTcmunp</p>
</div>
</div>
<script>
// Feedback form
$(function() {
$("#feedback_button").click(function(){
postJSON("/send_feedback", {"subject":$("#feedback_subject").attr("value"),
"url":document.URL,
"message":$("#feedback_message").attr("value")},
function(data){
$("#feedback_subject").attr("value","");
$("#feedback_message").attr("value","");
$("#feedback_div").html("Feedback submitted. Thank you");
});
});
});
// Calculator
$(function() {
$("#calculator_button").click(function(){
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){
$("#calculator_output").attr("value",data.result);
});
});
});
</script>
</body> </body>
</html> </html>
...@@ -45,9 +45,8 @@ $(function() { ...@@ -45,9 +45,8 @@ $(function() {
} }
}); });
$('#change_password').click(function(){ $('#change_password').click(function(){
$('#inline').trigger('click'); $('.modal').trigger('click');
log_event("profile", {"type":"password_show"}); log_event("profile", {"type":"password_show"});
}); });
...@@ -75,10 +74,9 @@ $(function() { ...@@ -75,10 +74,9 @@ $(function() {
<li>E-mail: ${email}</li> <li>E-mail: ${email}</li>
<li>Location: ${location}</li> <li>Location: ${location}</li>
<li>Language: ${language}</li> <li>Language: ${language}</li>
<li>Password: ********</li>
</ul> </ul>
<!-- <div><a href="#change_password_pop">Reset password</a></div> --> <!-- <div><a class="modal" href="#change_password_pop">Reset password</a></div> -->
<!-- hidden trigger for password --> <!-- hidden trigger for password -->
<div id="change_password_pop"> <div id="change_password_pop">
......
...@@ -14,6 +14,9 @@ div.course-wrapper { ...@@ -14,6 +14,9 @@ div.course-wrapper {
width: grid-width(3); width: grid-width(3);
h3 { h3 {
overflow: hidden;
margin: 0;
&:last-child { &:last-child {
@include box-shadow(none); @include box-shadow(none);
} }
......
...@@ -136,4 +136,4 @@ update_schematics();}); ...@@ -136,4 +136,4 @@ update_schematics();});
<%block name="wiki_body"/> <%block name="wiki_body"/>
</section> </section>
</%block> </%block>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment