From 994604e1e8e98d3746e501715cbff26c1dd798fe Mon Sep 17 00:00:00 2001 From: stan Date: Sat, 14 Jan 2006 13:38:46 +0000 Subject: [PATCH] Bug 245 - Made progress behaviour optional. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1803 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_config.php.in | 3 +++ web/zm_html_view_event.php | 16 ++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/web/zm_config.php.in b/web/zm_config.php.in index 83596c1ed..6f3f202f0 100644 --- a/web/zm_config.php.in +++ b/web/zm_config.php.in @@ -76,6 +76,7 @@ switch ( $bandwidth ) define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling define( "ZM_WEB_USE_STREAMS", ZM_WEB_H_USE_STREAMS ); // Whether to use streaming or stills for live and events views define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_H_EVENTS_VIEW ); // What the default view of multiple events should be. + define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_H_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. break; } case "medium" : @@ -92,6 +93,7 @@ switch ( $bandwidth ) define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling define( "ZM_WEB_USE_STREAMS", ZM_WEB_M_USE_STREAMS ); // Whether to use streaming or stills for live and events views define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_M_EVENTS_VIEW ); // What the default view of multiple events should be. + define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_M_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. break; } case "low" : @@ -108,6 +110,7 @@ switch ( $bandwidth ) define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling define( "ZM_WEB_USE_STREAMS", ZM_WEB_L_USE_STREAMS ); // Whether to use streaming or stills for live and events views define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_L_EVENTS_VIEW ); // What the default view of multiple events should be. + define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_L_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. break; } case "mobile" : // Very incomplete at present diff --git a/web/zm_html_view_event.php b/web/zm_html_view_event.php index c0357a6af..3ee47a6c4 100644 --- a/web/zm_html_view_event.php +++ b/web/zm_html_view_event.php @@ -154,7 +154,7 @@ function newWindow(Url,Name,Width,Height) var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height); } function incrementPanel( section ) @@ -402,7 +402,7 @@ if ( $mode == "stream" ) for ( $i = 0; $i < $panel_sections; $i++ ) { $start_frame = 1+(int)round(($i * $event[Frames])/$panel_sections); - if ( !empty($fid) && $start_frame < $fid ) + if ( ZM_WEB_SHOW_PROGRESS && !empty($fid) && $start_frame < $fid ) { $section_color = $panel_done_color; } @@ -552,17 +552,13 @@ var timeout_id = window.setTimeout( "window.location.replace( '? { $start_section = (int)floor(($fid * $panel_sections)/($event['Frames']+1)); } + if ( ZM_WEB_SHOW_PROGRESS ) + { ?> window.setTimeout( "incrementPanel( )", ); -function incrementPanel( section ) -{ - document.getElementById( 'PanelSection'+section ).style.backgroundColor = ''; - section++; - if ( section < ) - { - window.setTimeout( "incrementPanel( "+section+" )", ); +