diff --git a/problem.html b/problem.html index 5505692bb3..062f45affa 100644 --- a/problem.html +++ b/problem.html @@ -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 @@ }); }); -% if not done: - -% else: - +% if check_button: + % endif diff --git a/seq_module.js b/seq_module.js index f666069910..65841db024 100644 --- a/seq_module.js +++ b/seq_module.js @@ -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; } diff --git a/video_init.js b/video_init.js index 872098cc92..c38c721218 100644 --- a/video_init.js +++ b/video_init.js @@ -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 }); +