Sequential module stores position. Basic groundwork to make video module do the same

This commit is contained in:
Piotr Mitros
2012-01-23 09:16:35 -05:00
parent a2f83751b3
commit 25cb46731d
2 changed files with 6 additions and 2 deletions

View File

@@ -30,6 +30,10 @@ var ${ id }loc = -1;
function ${ id }goto(i) {
log_event("seq_goto", {'old':${id}loc, 'new':i,'id':'${id}'});
postJSON('/modx/sequential/${ id }/goto_position',
{'position' : i });
if (${ id }loc!=-1)
${ id }destroy_functions[ ${ id }loc ]();
$('#seq_content').html(${ id }contents[i]);
@@ -72,5 +76,5 @@ $(function() {
}
$('#${ id }next').click(function(eo) { ${ id }next();});
$('#${ id }prev').click(function(eo) { ${ id }prev();});
${ id }goto(1);
${ id }goto( ${ position } );
});

View File

@@ -30,7 +30,7 @@ function good() {
ajax_video=good;
loadNewVideo(streams["1.0"], ${ video_time });
loadNewVideo(streams["1.0"], ${ position });
function add_speed(key, stream) {
var id = 'speed_' + stream;