Commit 1bd924be by Piotr Mitros

Sequence steps logged

parent 83c8fb84
......@@ -29,6 +29,7 @@ var ${ id }destroy_functions=["",
var ${ id }loc = -1;
function ${ id }goto(i) {
log_event("seq_goto", {'old':${id}loc, 'new':i,'id':'${id}'});
if (${ id }loc!=-1)
${ id }destroy_functions[ ${ id }loc ]();
$('#seq_content').html(${ id }contents[i]);
......@@ -52,12 +53,14 @@ function ${ id }setup_click(i) {
function ${ id }next() {
var i=${ id }loc+1;
log_event("seq_next", {'old':${id}loc, 'new':i,'id':'${id}'});
if(i > ${ len(items) } ) i = ${ len(items) };
${ id }goto(i);
}
function ${ id }prev() {
var i=${ id }loc-1;
log_event("seq_prev", {'old':${id}loc, 'new':i,'id':'${id}'});
if (i < 1 ) i = 1;
${ id }goto(i);
}
......
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