Merge pull request #58 from digital-gnome/storageareas-view-button
Storageareas view button & popups
This commit is contained in:
commit
6b2eb89a61
|
@ -92,13 +92,13 @@ $connkey = generateConnKey();
|
|||
|
||||
$focusWindow = true;
|
||||
|
||||
$popup = ((!isset($_REQUEST['popup'])) or ($_REQUEST['popup'] != 1)) ? 0 : 1;
|
||||
$popup = ((isset($_REQUEST['popup'])) && ($_REQUEST['popup'] = 1));
|
||||
|
||||
xhtmlHeaders(__FILE__, translate('Event') );
|
||||
?>
|
||||
<body>
|
||||
<div id="page">
|
||||
<?php if ( $popup ) echo getNavBarHTML() ?>
|
||||
<?php if ( !$popup ) echo getNavBarHTML() ?>
|
||||
<div id="header">
|
||||
<?php
|
||||
if ( ! $Event->Id() ) {
|
||||
|
@ -113,7 +113,7 @@ if ( ! $Event->Id() ) {
|
|||
<span id="dataFrames" title="<?php echo translate('AttrFrames')."/".translate('AttrAlarmFrames') ?>"><?php echo $Event->Frames() ?>/<?php echo $Event->AlarmFrames() ?></span>
|
||||
<span id="dataScore" title="<?php echo translate('AttrTotalScore')."/".translate('AttrAvgScore')."/".translate('AttrMaxScore') ?>"><?php echo $Event->TotScore() ?>/<?php echo $Event->AvgScore() ?>/<?php echo $Event->MaxScore() ?></span>
|
||||
<span id="Storage"> <?php echo human_filesize($Event->DiskSpace(null)) . ' on ' . $Event->Storage()->Name() ?></span>
|
||||
<div id="closeWindow"><a href="#" onclick="<?php echo $popup ? 'window.close()' : 'window.history.back()' ?>"><?php echo $popup ? translate('Close') : translate('Back') ?></a></div>
|
||||
<div id="closeWindow"><a href="#" onclick="<?php echo $popup ? 'window.close()' : 'window.history.back()' ?>"><?php echo $popup ? translate('Close') : translate('Back') ?></a></div>
|
||||
</div>
|
||||
<div id="menuBar1">
|
||||
<div id="nameControl">
|
||||
|
|
|
@ -113,7 +113,8 @@ function viewEvents( element, name ) {
|
|||
}
|
||||
}
|
||||
if ( events.length > 0 ) {
|
||||
createPopup( '?view=event&eid='+events[0]+'&filter[terms][0][attr]=Id&&filter[terms][0][op]=%3D%5B%5D&&filter[terms][0][val]='+events.join('%2C')+sortQuery+'&page=1&play=1', 'zmEvent', 'event', maxWidth, maxHeight );
|
||||
let filter = '&filter[Query][terms][0][attr]=Id&filter[Query][terms][0][op]=%3D%5B%5D&filter[Query][terms][0][val]='+events.join('%2C');
|
||||
window.location.href = thisUrl+'?view=event&eid='+events[0]+filter+sortQuery+'&page=1&play=1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,11 +58,13 @@ $showDvrControls = ( $streamMode == 'jpeg' && $monitor->StreamReplayBuffer() !=
|
|||
|
||||
noCacheHeaders();
|
||||
|
||||
$popup = ((isset($_REQUEST['popup'])) && ($_REQUEST['popup'] = 1));
|
||||
|
||||
xhtmlHeaders( __FILE__, $monitor->Name()." - ".translate('Feed') );
|
||||
?>
|
||||
<body>
|
||||
<div id="page">
|
||||
<?php if ($_REQUEST['popup'] != 1) echo getNavBarHTML() ?>
|
||||
<?php if ( !$popup ) echo getNavBarHTML() ?>
|
||||
<div id="header">
|
||||
<div id="monitorName"><?php echo $monitor->Name() ?></div>
|
||||
<div id="menuControls">
|
||||
|
@ -75,7 +77,7 @@ if ( canView( 'Control' ) && $monitor->Type() == 'Local' ) {
|
|||
?>
|
||||
<div id="scaleControl"><?php echo translate('Scale') ?>: <?php echo buildSelect( "scale", $scales, "changeScale( this );" ); ?></div>
|
||||
</div>
|
||||
<div id="closeControl"><a href="#" onclick="<?php echo $_REQUEST['popup'] != 1?'window.history.back()':'window.close()' ?>"><?php echo $_REQUEST['popup'] != 1? translate('Back'):translate('Close') ?></a></div>
|
||||
<div id="closeControl"><a href="#" onclick="<?php echo $popup ? 'window.close()' : 'window.history.back()' ?>"><?php echo $popup ? translate('Close') : translate('Back') ?></a></div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div id="imageFeed"><?php echo getStreamHTML( $monitor, array('scale'=>$scale) ); ?></div>
|
||||
|
|
Loading…
Reference in New Issue