Bug 245 - Made progress behaviour optional.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1803 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2006-01-14 13:38:46 +00:00
parent 0ec21218c2
commit 994604e1e8
2 changed files with 9 additions and 10 deletions

View File

@ -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

View File

@ -154,7 +154,7 @@ function newWindow(Url,Name,Width,Height)
var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height);
}
<?php
if ( $mode == "stream" )
if ( $mode == "stream" && ZM_WEB_SHOW_PROGRESS )
{
?>
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( '<?= $PHP_SELF ?>?
{
$start_section = (int)floor(($fid * $panel_sections)/($event['Frames']+1));
}
if ( ZM_WEB_SHOW_PROGRESS )
{
?>
window.setTimeout( "incrementPanel( <?= $start_section ?> )", <?= 2000+$panel_timeout ?> );
function incrementPanel( section )
{
document.getElementById( 'PanelSection'+section ).style.backgroundColor = '<?= $panel_done_color ?>';
section++;
if ( section < <?= $panel_sections ?> )
{
window.setTimeout( "incrementPanel( "+section+" )", <?= $panel_timeout ?> );
<?php
}
}
?>
</script>
<?php
}