diff --git a/web/skins/classic/views/js/montagereview.js b/web/skins/classic/views/js/montagereview.js index 78dfbb937..ab25dae62 100644 --- a/web/skins/classic/views/js/montagereview.js +++ b/web/skins/classic/views/js/montagereview.js @@ -166,13 +166,12 @@ function drawSliderOnGraph(val) { // If we have data already saved first restore it from LAST time - if(typeof underSlider !== 'undefined') - { + if(typeof underSlider !== 'undefined') { ctx.putImageData(underSlider,underSliderX, 0, 0, 0, sliderWidth, sliderHeight); underSlider=undefined; } - if(liveMode==0) // we get rid of the slider if we switch to live (since it may not be in the "right" place) - { + if ( liveMode == 0 ) { + // we get rid of the slider if we switch to live (since it may not be in the "right" place) // Now save where we are putting it THIS time underSlider=ctx.getImageData(sliderX, 0, sliderWidth, sliderHeight); // And add in the slider' @@ -183,13 +182,10 @@ function drawSliderOnGraph(val) { underSliderX=sliderX; } var o = $('scruboutput'); - if(liveMode==1) - { + if(liveMode==1) { o.innerHTML="Live Feed @ " + (1000 / currentDisplayInterval).toFixed(1) + " fps"; o.style.color="red"; - } - else - { + } else { o.innerHTML=secs2dbstr(val); o.style.color="blue"; } @@ -494,7 +490,7 @@ function clicknav(minSecs,maxSecs,arch,live) {// we use the current time if we c var uri = "?view=" + currentView + fitStr + groupStr + minStr + maxStr + currentStr + intervalStr + liveStr + zoomStr + "&scale=" + scale[$j("#scaleslider")[0].value] + "&speed=" + speeds[$j("#speedslider")[0].value]; window.location = uri; -} +} // end function clickNav function lastHour() { var now = new Date() / 1000; @@ -690,6 +686,14 @@ function clickMonitor(event,monId) { return; } +function changeGroup() { + var group_id = $('group').get('value'); + Cookie.write( 'zmMontageReviewGroup', group_id, { duration: 10*365 } ); + var url = window.location.href; + url = url.replace(/group=\d+/, 'group='+group_id); + window.location.href = url; +} + // >>>>>>>>> Initialization that runs on window load by being at the bottom function initPage() { diff --git a/web/skins/classic/views/js/montagereview.js.php b/web/skins/classic/views/js/montagereview.js.php index 0bd0bacde..0722439d0 100644 --- a/web/skins/classic/views/js/montagereview.js.php +++ b/web/skins/classic/views/js/montagereview.js.php @@ -1,7 +1,6 @@ var currentScale=; var liveMode=; -console.log("Live mode?"+liveMode); var fitMode=; var currentSpeed=; // slider scale, which is only for replay and relative to real time var speedIndex=; @@ -18,7 +17,7 @@ var eId = []; var eStartSecs = []; var eEndSecs = []; var eventFrames = []; // this is going to presume all frames equal durationlength -var groupStr=; +var groupStr=;
+