From 25cb46731df0f0eabfe7a8441a31f38b6af299c4 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Mon, 23 Jan 2012 09:16:35 -0500 Subject: [PATCH] Sequential module stores position. Basic groundwork to make video module do the same --- seq_module.js | 6 +++++- video_init.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/seq_module.js b/seq_module.js index b4c116671c..a636045587 100644 --- a/seq_module.js +++ b/seq_module.js @@ -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 } ); }); diff --git a/video_init.js b/video_init.js index 91fe5fa953..0cd9408a8d 100644 --- a/video_init.js +++ b/video_init.js @@ -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;