unpopup zone view
This commit is contained in:
parent
5a6e793b76
commit
ae9139b00c
|
@ -487,6 +487,16 @@ function makePopupButton($url, $winName, $winSize, $buttonValue, $condition=1, $
|
|||
return $string;
|
||||
}
|
||||
|
||||
function makeButton($url, $buttonValue, $condition=1, $options='') {
|
||||
$string = '<button type="button" data-on-click-this="'.$buttonValue.'"';
|
||||
$string .= ' data-url="' .$url. '"';
|
||||
if (!$condition) {
|
||||
$string .= ' disabled="disabled"';
|
||||
}
|
||||
$string .= ($options ? (' ' . $options) : '') . '/>'.translate($buttonValue).'</button>'.PHP_EOL;
|
||||
return $string;
|
||||
}
|
||||
|
||||
function htmlSelect($name, $contents, $values, $behaviours=false) {
|
||||
$behaviourText = '';
|
||||
if ( !empty($behaviours) ) {
|
||||
|
|
|
@ -9,6 +9,12 @@ function streamCmdQuit( ) {
|
|||
}
|
||||
}
|
||||
|
||||
// Manage the Add New Zone button
|
||||
function AddNewZone(el) {
|
||||
url = el.getAttribute('data-url');
|
||||
window.location.assign(url);
|
||||
}
|
||||
|
||||
var monitors = new Array();
|
||||
|
||||
function initPage() {
|
||||
|
|
|
@ -118,6 +118,7 @@ $StreamHTML = getStreamHTML($monitor, array('mode'=>'single'));
|
|||
xhtmlHeaders(__FILE__, translate('Zone'));
|
||||
?>
|
||||
<body>
|
||||
<?php echo getNavBarHTML() ?>
|
||||
<div id="page">
|
||||
<div id="header">
|
||||
<h2><?php echo translate('Monitor').' '.$monitor->Name().' - '.translate('Zone').' '.$newZone['Name'] ?></h2>
|
||||
|
|
|
@ -101,7 +101,7 @@ xhtmlHeaders(__FILE__, translate('Zones'));
|
|||
foreach( $zones as $zone ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="colName"><?php echo makePopupLink('?view=zone&mid='.$mid.'&zid='.$zone['Id'], 'zmZone', array('zone', $monitor->ViewWidth(), $monitor->ViewHeight()), validHtmlStr($zone['Name']), true, 'data-on-click-true="streamCmdQuit"'); ?></td>
|
||||
<td class="colName"><?php echo makeLink('?view=zone&mid='.$mid.'&zid='.$zone['Id'], validHtmlStr($zone['Name']), true, 'data-on-click-true="streamCmdQuit"'); ?></td>
|
||||
<td class="colType"><?php echo validHtmlStr($zone['Type']) ?></td>
|
||||
<td class="colUnits"><?php echo $zone['Area'] ?> / <?php echo sprintf('%.2f', ($zone['Area']*100)/($monitor->ViewWidth()*$monitor->ViewHeight()) ) ?></td>
|
||||
<td class="colMark"><input type="checkbox" name="markZids[]" value="<?php echo $zone['Id'] ?>" data-on-click-this="configureDeleteButton"<?php if ( !canEdit('Monitors') ) { ?> disabled="disabled"<?php } ?>/></td>
|
||||
|
@ -112,7 +112,7 @@ xhtmlHeaders(__FILE__, translate('Zones'));
|
|||
</tbody>
|
||||
</table>
|
||||
<div id="contentButtons">
|
||||
<?php echo makePopupButton('?view=zone&mid='.$mid.'&zid=0', 'zmZone', array('zone', $monitor->ViewWidth(), $monitor->ViewHeight()), translate('AddNewZone'), canEdit('Monitors')); ?>
|
||||
<?php echo makeButton('?view=zone&mid='.$mid.'&zid=0', 'AddNewZone', canEdit('Monitors')); ?>
|
||||
<button type="submit" name="deleteBtn" value="Delete" disabled="disabled"><?php echo translate('Delete') ?></button>
|
||||
</div>
|
||||
</div><!--zones-->
|
||||
|
|
Loading…
Reference in New Issue