Commit 1f609974 by Piotr Mitros

Offline/made tabs better

parent d0fffb7c
......@@ -3,24 +3,23 @@
<head>
<title> MITX 6.002 </title>
<link rel="stylesheet" href="/static/css/theme.css" type="text/css" media="all" />
<script src="//www.google.com/jsapi"></script>
<link href="/static/css/cupertino/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/>
<style type="text/css">#slider { margin: 10px; }</style>
<script type="text/javascript" src="/static/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
<script>google.load("swfobject", "2.1");</script>
<script type="text/javascript" src="/static/lib/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="/static/lib/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="/static/lib//swfobject/swfobject.js"></script>
<script type="text/javascript" src="/static/js/video_player.js"></script>
<style type="text/css">#slider { margin: 10px; }</style>
<!-- Warning: Do not upgrade FancyBox. V2.0 is under a non-free CC license -->
<script type="text/javascript" src="/static/js/fancybox/jquery.fancybox-1.3.4.js"></script>
<link rel="stylesheet" href="/static/js/fancybox/jquery.fancybox-1.3.4.css">
<script type="text/javascript" src="/static/lib/fancybox/jquery.fancybox-1.3.4.js"></script>
<link rel="stylesheet" href="/static/lib/fancybox/jquery.fancybox-1.3.4.css">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [["\\(","\\)"]],
displayMath: [["\\[","\\]"]]}
});
</script>
<script type="text/javascript" src="/static/js/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script type="text/javascript" src="/static/lib/mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
</head>
......
......@@ -25,6 +25,7 @@
// Possible cleanup: Move from getJSON to just load
$.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
$('#main_${ id }').html(json);
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
});
}
});
......
......@@ -16,9 +16,13 @@ var ${ id }functions=["",
var ${ id }loc;
function ${ id }goto(i) {
// TODO:
// ${ id }contents[${ id }loc] = $('#content').html();
$('#content').html(${ id }contents[i]);
${ id }functions[i]()
$('#tt_'+${ id }loc).attr("style", "background-color:grey");
${ id }loc=i;
$('#tt_'+i).attr("style", "background-color:red");
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
}
......@@ -27,15 +31,15 @@ function ${ id }setup_click(i) {
}
function ${ id }next() {
${ id }loc=${ id }loc+1;
if(${ id }loc> ${ len(items) } ) ${ id }loc=${ len(items) };
${ id }goto(${ id }loc);
var i=${ id }loc+1;
if(i > ${ len(items) } ) i = ${ len(items) };
${ id }goto(i);
}
function ${ id }prev() {
${ id }loc=${ id }loc-1;
if(${ id }loc<1) ${ id }loc=1;
${ id }goto(${ id }loc);
var i=${ id }loc-1;
if (i < 1 ) i = 1;
${ id }goto(i);
}
$(function() {
......
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