Commit 544d0535 by Reda Lemeden

Merge with head

parents 90e83773 aed83b15
...@@ -69,20 +69,22 @@ ...@@ -69,20 +69,22 @@
</div> </div>
<div id="calculator_div" class="leanModal_box"> <div id="calculator_div" class="leanModal_box">
<input type="text" id="calculator_input"> <form id="calculator">
<input id="calculator_button" type=button value="=&gt;"> <input type="text" id="calculator_input">
<input type="text" id="calculator_output" readonly> <input id="calculator_button" type="submit" value="=&gt;">
<input type="text" id="calculator_output" readonly>
</form>
<table> <tr><td align="right">Suffixes</td><td>&nbsp;:&nbsp;</td><td align="left"> %kMGTcmunp</td></tr> <table> <tr><td align="right">Suffixes</td><td>&nbsp;:&nbsp;</td><td align="left"> %kMGTcmunp</td></tr>
<tr><td align="right">Operations</td><td>&nbsp;:&nbsp;</td><td align="left"> ^ * / + - ()</td></tr> <tr><td align="right">Operations</td><td>&nbsp;:&nbsp;</td><td align="left"> ^ * / + - ()</td></tr>
<tr><td align="right">Functions</td><td>&nbsp;:&nbsp;</td><td align="left"> sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </td></tr> <tr><td align="right">Functions</td><td>&nbsp;:&nbsp;</td><td align="left"> sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </td></tr>
<tr><td align="right">Constants</td><td>&nbsp;:&nbsp;</td><td align="left"> e</td></tr> <tr><td align="right">Constants</td><td>&nbsp;:&nbsp;</td><td align="left"> e</td></tr>
<!--p> Unsupported: ||, j </p <!--p> Unsupported: ||, j </p
Students won't know what parallel means at this time. Students won't know what parallel means at this time.
Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. Complex numbers aren't well tested in the courseware, so we would prefer to not expose them.
If you read the comments in the source, feel free to use them. If you run into a bug, please If you read the comments in the source, feel free to use them. If you run into a bug, please
let us know. But we can't officially support them right now. let us know. But we can't officially support them right now.
--> -->
</table> </table>
</div> </div>
...@@ -103,7 +105,8 @@ $(function() { ...@@ -103,7 +105,8 @@ $(function() {
// Calculator // Calculator
$(function() { $(function() {
$("#calculator_button").click(function(){ $("form#calculator").submit(function(e){
e.preventDefault();
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")}, $.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){ function(data){
$("#calculator_output").attr("value",data.result); $("#calculator_output").attr("value",data.result);
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
<%inherit file="main.html"/> <%inherit file="main.html"/>
<%block name="title"><title>${"wiki_title"}</title></%block>
<%block name="headextra"> <%block name="headextra">
<!-- <link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" /> --> <!-- <link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" /> -->
<!-- <link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" /> --> <!-- <link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" /> -->
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Create Article - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Create article Create article
</%block> </%block>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${"Edit " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
${ wiki_article.title } ${ wiki_article.title }
</%block> </%block>
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
<%block name="title"><title>Oops... - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
Oops... Oops...
</%block> </%block>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${"Revision history of " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Search Results - MITX 6.002 Wiki</title></%block>
<%! <%!
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
%> %>
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/> <%inherit file="simplewiki_base.html"/>
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title"> <%block name="wiki_page_title">
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''} ${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
</%block> </%block>
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<section> <section>
<ul class="vcr"> <ul class="vcr">
<li><a class="play" onclick="play();">Play</a></li> <li><a id="video_control" class="pause">Pause</a></li>
<li><a class="pause" onclick="pause();">Pause</a></li>
</ul> </ul>
<div id="vidtime">0:00/0:00</div> <div id="vidtime">0:00/0:00</div>
......
...@@ -34,7 +34,7 @@ loadNewVideo(streams["1.0"], ${ position }); ...@@ -34,7 +34,7 @@ loadNewVideo(streams["1.0"], ${ position });
function add_speed(key, stream) { function add_speed(key, stream) {
var id = 'speed_' + stream; var id = 'speed_' + stream;
$("#video_speeds").append(' <span id="'+id+'">'+key+'X</span>'); $("#video_speeds").append(' <span id="'+id+'">'+key+'x</span>');
$("#"+id).click(function(){ $("#"+id).click(function(){
change_video_speed(key, stream); change_video_speed(key, stream);
}); });
...@@ -57,3 +57,16 @@ l.sort(sort_by_value); ...@@ -57,3 +57,16 @@ l.sort(sort_by_value);
for(var i=0; i<l.length; i++) { for(var i=0; i<l.length; i++) {
add_speed(l[i], streams[l[i]]) add_speed(l[i], streams[l[i]])
} }
//toggle video play/pause. the HTML assumes video is always autoplayed
//initially since it starts with class "pause". may want to set that in
//javascript
$("#video_control").click(function(){
if ($(this).hasClass("play")){
play();
$(this).removeClass().addClass("pause");
} else {
pause();
$(this).removeClass().addClass("play");
}
});
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