Commit 544d0535 by Reda Lemeden

Merge with head

parents 90e83773 aed83b15
......@@ -69,20 +69,22 @@
</div>
<div id="calculator_div" class="leanModal_box">
<input type="text" id="calculator_input">
<input id="calculator_button" type=button value="=&gt;">
<input type="text" id="calculator_output" readonly>
<form id="calculator">
<input type="text" id="calculator_input">
<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>
<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">Constants</td><td>&nbsp;:&nbsp;</td><td align="left"> e</td></tr>
<!--p> Unsupported: ||, j </p
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.
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.
-->
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.
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.
-->
</table>
</div>
......@@ -103,7 +105,8 @@ $(function() {
// Calculator
$(function() {
$("#calculator_button").click(function(){
$("form#calculator").submit(function(e){
e.preventDefault();
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
function(data){
$("#calculator_output").attr("value",data.result);
......
......@@ -2,8 +2,6 @@
<%inherit file="main.html"/>
<%block name="title"><title>${"wiki_title"}</title></%block>
<%block name="headextra">
<!-- <link rel="stylesheet" media="screen,print" href="/static/simplewiki/css/base.css" /> -->
<!-- <link rel="stylesheet" media="print" href="/static/simplewiki/css/base_print.css" /> -->
......
......@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Create Article - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
Create article
</%block>
......
......@@ -2,6 +2,8 @@
<%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">
${ wiki_article.title }
</%block>
......
......@@ -6,6 +6,9 @@
from django.core.urlresolvers import reverse
%>
<%block name="title"><title>Oops... - MITX 6.002 Wiki</title></%block>
<%block name="wiki_page_title">
Oops...
</%block>
......
......@@ -2,6 +2,8 @@
<%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
%>
......
......@@ -2,6 +2,8 @@
<%inherit file="simplewiki_base.html"/>
<%block name="title"><title>Search Results - MITX 6.002 Wiki</title></%block>
<%!
from django.core.urlresolvers import reverse
%>
......
......@@ -2,6 +2,8 @@
<%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">
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
</%block>
......
......@@ -15,8 +15,7 @@
<section>
<ul class="vcr">
<li><a class="play" onclick="play();">Play</a></li>
<li><a class="pause" onclick="pause();">Pause</a></li>
<li><a id="video_control" class="pause">Pause</a></li>
</ul>
<div id="vidtime">0:00/0:00</div>
......
......@@ -34,7 +34,7 @@ loadNewVideo(streams["1.0"], ${ position });
function add_speed(key, 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(){
change_video_speed(key, stream);
});
......@@ -57,3 +57,16 @@ l.sort(sort_by_value);
for(var i=0; i<l.length; 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