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:
parent
0ec21218c2
commit
994604e1e8
|
@ -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_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_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_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;
|
break;
|
||||||
}
|
}
|
||||||
case "medium" :
|
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_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_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_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;
|
break;
|
||||||
}
|
}
|
||||||
case "low" :
|
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_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_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_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;
|
break;
|
||||||
}
|
}
|
||||||
case "mobile" : // Very incomplete at present
|
case "mobile" : // Very incomplete at present
|
||||||
|
|
|
@ -154,7 +154,7 @@ function newWindow(Url,Name,Width,Height)
|
||||||
var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height);
|
var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height);
|
||||||
}
|
}
|
||||||
<?php
|
<?php
|
||||||
if ( $mode == "stream" )
|
if ( $mode == "stream" && ZM_WEB_SHOW_PROGRESS )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
function incrementPanel( section )
|
function incrementPanel( section )
|
||||||
|
@ -402,7 +402,7 @@ if ( $mode == "stream" )
|
||||||
for ( $i = 0; $i < $panel_sections; $i++ )
|
for ( $i = 0; $i < $panel_sections; $i++ )
|
||||||
{
|
{
|
||||||
$start_frame = 1+(int)round(($i * $event[Frames])/$panel_sections);
|
$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;
|
$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));
|
$start_section = (int)floor(($fid * $panel_sections)/($event['Frames']+1));
|
||||||
}
|
}
|
||||||
|
if ( ZM_WEB_SHOW_PROGRESS )
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
window.setTimeout( "incrementPanel( <?= $start_section ?> )", <?= 2000+$panel_timeout ?> );
|
window.setTimeout( "incrementPanel( <?= $start_section ?> )", <?= 2000+$panel_timeout ?> );
|
||||||
function incrementPanel( section )
|
<?php
|
||||||
{
|
|
||||||
document.getElementById( 'PanelSection'+section ).style.backgroundColor = '<?= $panel_done_color ?>';
|
|
||||||
section++;
|
|
||||||
if ( section < <?= $panel_sections ?> )
|
|
||||||
{
|
|
||||||
window.setTimeout( "incrementPanel( "+section+" )", <?= $panel_timeout ?> );
|
|
||||||
}
|
}
|
||||||
}
|
?>
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue