Minor cleanups. Basic infrastructure for restoring video playback state (but unfinished)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
submit_data[value.id]=value.value;
|
||||
});
|
||||
|
||||
if($('#check_${ id }').attr('value') == 'Check') {
|
||||
if($('#check_${ id }').attr('value').substring(0,5) != 'Reset') {
|
||||
$.getJSON('/modx/problem/${ id }/problem_check',
|
||||
submit_data,
|
||||
function(json) {
|
||||
@@ -30,8 +30,6 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
% if not done:
|
||||
<input id="check_${ id }" type="button" value="Check" >
|
||||
% else:
|
||||
<input id="check_${ id }" type="button" value="Reset" >
|
||||
% if check_button:
|
||||
<input id="check_${ id }" type="button" value="${ check_button }" >
|
||||
% endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// CRITICAL TODO: Namespace
|
||||
|
||||
var files=["",
|
||||
%for t in items:
|
||||
${t[1]['content']} ,
|
||||
@@ -5,10 +7,17 @@ var files=["",
|
||||
""
|
||||
];
|
||||
|
||||
var functions=["",
|
||||
%for t in items:
|
||||
function(){ ${t[1]['js']} },
|
||||
%endfor
|
||||
""];
|
||||
|
||||
var loc;
|
||||
|
||||
function goto(i) {
|
||||
$('#content').html(files[i]);
|
||||
functions[i]()
|
||||
loc=i;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,4 +5,12 @@ swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=y
|
||||
var captions=0;
|
||||
$("#slider").slider({slide:function(event,ui){seek_slide('slide',event.originalEvent,ui.value);},
|
||||
stop:function(event,ui){seek_slide('stop',event.originalEvent,ui.value);}});
|
||||
loadNewVideo('${id}');
|
||||
|
||||
function good() {
|
||||
window['console'].log(ytplayer.getCurrentTime());
|
||||
}
|
||||
|
||||
ajax_video=good;
|
||||
|
||||
loadNewVideo('${id}', ${ video_time });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user