Made event window variable width.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@696 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-12-03 15:29:52 +00:00
parent 34f902e87b
commit d5acf76049
3 changed files with 15 additions and 10 deletions

View File

@ -151,7 +151,7 @@ $jws = array(
'device' => array( 'w'=>196, 'h'=>164 ), 'device' => array( 'w'=>196, 'h'=>164 ),
'function' => array( 'w'=>248, 'h'=>92 ), 'function' => array( 'w'=>248, 'h'=>92 ),
'events' => array( 'w'=>720, 'h'=>480 ), 'events' => array( 'w'=>720, 'h'=>480 ),
'event' => array( 'w'=>420, 'h'=>500 ), 'event' => array( 'w'=>60, 'h'=>160 ),
'filter' => array( 'w'=>560, 'h'=>250 ), 'filter' => array( 'w'=>560, 'h'=>250 ),
'filtersave' => array( 'w'=>520, 'h'=>200 ), 'filtersave' => array( 'w'=>520, 'h'=>200 ),
'zones' => array( 'w'=>72, 'h'=>232 ), 'zones' => array( 'w'=>72, 'h'=>232 ),

View File

@ -154,7 +154,7 @@ function newWindow(Url,Name,Width,Height)
} }
function eventWindow(Url,Name) function eventWindow(Url,Name)
{ {
var Name = window.open(Url,Name,"resizable,scrollbars,width=<?= $jws['event']['w'] ?>,height=<?= $jws['event']['h'] ?>"); var Name = window.open(Url,Name,"resizable,scrollbars,width=<?= $monitor[Width]+$jws['event']['w'] ?>,height=<?= $monitor[Height]+$jws['event']['h'] ?>");
} }
function filterWindow(Url,Name) function filterWindow(Url,Name)
{ {

View File

@ -39,16 +39,26 @@
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0 header("Pragma: no-cache"); // HTTP/1.0
$result = mysql_query( "select * from Monitors where Id = '$mid'" );
if ( !$result )
die( mysql_error() );
$monitor = mysql_fetch_assoc( $result );
?> ?>
<html> <html>
<head> <head>
<title>ZM - <?= $monitor ?> - Events</title> <title>ZM - <?= $monitor[Name] ?> - Events</title>
<link rel="stylesheet" href="zm_styles.css" type="text/css"> <link rel="stylesheet" href="zm_styles.css" type="text/css">
<script language="JavaScript"> <script language="JavaScript">
function newWindow(Url,Name,Width,Height) function newWindow(Url,Name,Width,Height)
{ {
var Name = window.open(Url,Name,"resizable,scrollbars,width="+Width+",height="+Height); var Name = window.open(Url,Name,"resizable,scrollbars,width="+Width+",height="+Height);
} }
function eventWindow(Url,Name)
{
var Name = window.open(Url,Name,"resizable,scrollbars,width=<?= $monitor[Width]+$jws['event']['w'] ?>,height=<?= $monitor[Height]+$jws['event']['h'] ?>");
}
function closeWindow() function closeWindow()
{ {
top.window.close(); top.window.close();
@ -95,11 +105,6 @@ window.setTimeout( "window.location.replace( '<?= "$PHP_SELF?view=watchevents&mi
<tr> <tr>
<td valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <td valign="top"><table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php <?php
$result = mysql_query( "select * from Monitors where Id = '$mid'" );
if ( !$result )
die( mysql_error() );
$monitor = mysql_fetch_assoc( $result );
$sql = "select E.Id,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.AvgScore,E.MaxScore from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Id = '$mid' and E.Archived = 0"; $sql = "select E.Id,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.AvgScore,E.MaxScore from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Id = '$mid' and E.Archived = 0";
$sql .= " order by $sort_column $sort_order"; $sql .= " order by $sort_column $sort_order";
$sql .= " limit 0,$max_events"; $sql .= " limit 0,$max_events";
@ -132,8 +137,8 @@ window.setTimeout( "window.location.replace( '<?= "$PHP_SELF?view=watchevents&mi
{ {
?> ?>
<tr bgcolor="#FFFFFF"> <tr bgcolor="#FFFFFF">
<td align="center" class="text"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=event&mid=<?= $mid ?>&eid=<?= $event[Id] ?>&page=1', 'zmEvent', <?= $jws['event']['w'] ?>, <?= $jws['event']['h'] ?> );"><?= $event[Id] ?></a></td> <td align="center" class="text"><a href="javascript: eventWindow( '<?= $PHP_SELF ?>?view=event&mid=<?= $mid ?>&eid=<?= $event[Id] ?>&page=1', 'zmEvent' );"><?= $event[Id] ?></a></td>
<td align="center" class="text"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=event&mid=<?= $mid ?>&eid=<?= $event[Id] ?>&page=1', 'zmEvent', <?= $jws['event']['w'] ?>, <?= $jws['event']['h'] ?> );"><?= $event[Name] ?></a></td> <td align="center" class="text"><a href="javascript: eventWindow( '<?= $PHP_SELF ?>?view=event&mid=<?= $mid ?>&eid=<?= $event[Id] ?>&page=1', 'zmEvent' );"><?= $event[Name] ?></a></td>
<td align="center" class="text"><?= strftime( "%m/%d %H:%M:%S", strtotime($event[StartTime]) ) ?></td> <td align="center" class="text"><?= strftime( "%m/%d %H:%M:%S", strtotime($event[StartTime]) ) ?></td>
<td align="center" class="text"><?= $event[Length] ?></td> <td align="center" class="text"><?= $event[Length] ?></td>
<td align="center" class="text"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=frames&mid=<?= $mid ?>&eid=<?= $event[Id] ?>', 'zmFrames', <?= $jws['frames']['w'] ?>, <?= $jws['frames']['h'] ?> );"><?= $event[Frames] ?>/<?= $event[AlarmFrames] ?></a></td> <td align="center" class="text"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=frames&mid=<?= $mid ?>&eid=<?= $event[Id] ?>', 'zmFrames', <?= $jws['frames']['w'] ?>, <?= $jws['frames']['h'] ?> );"><?= $event[Frames] ?>/<?= $event[AlarmFrames] ?></a></td>