Fixed issues with control capabilities and moveMap on watch view.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2648 e3e1d417-86f3-4887-817a-d78f3d33393f
pull/27/merge
stan 2008-10-05 19:58:13 +00:00
parent 3714e5175c
commit d2856ed019
3 changed files with 100 additions and 7 deletions

View File

@ -46,10 +46,103 @@ if ( !empty($_REQUEST['cid']) )
}
else
{
$control = array();
$control['Name'] = $SLANG['New'];
$control['Type'] = "Local";
$control['Protocol'] = "";
$control = array(
'Name' => $SLANG['New'],
'Type' => "Local",
'Protocol' => "",
'CanWake' => "",
'CanSleep' => "",
'CanReset' => "",
'CanMove' => "",
'CanMoveDiag' => "",
'CanMoveMap' => "",
'CanMoveAbs' => "",
'CanMoveRel' => "",
'CanMoveCon' => "",
'CanPan' => "",
'MinPanRange' => "",
'MaxPanRange' => "",
'MinPanStep' => "",
'MaxPanStep' => "",
'HasPanSpeed' => "",
'MinPanSpeed' => "",
'MaxPanSpeed' => "",
'HasTurboPan' => "",
'TurboPanSpeed' => "",
'CanTilt' => "",
'MinTiltRange' => "",
'MaxTiltRange' => "",
'MinTiltStep' => "",
'MaxTiltStep' => "",
'HasTiltSpeed' => "",
'MinTiltSpeed' => "",
'MaxTiltSpeed' => "",
'HasTurboTilt' => "",
'TurboTiltSpeed' => "",
'CanZoom' => "",
'CanZoomAbs' => "",
'CanZoomRel' => "",
'CanZoomCon' => "",
'MinZoomRange' => "",
'MaxZoomRange' => "",
'MinZoomStep' => "",
'MaxZoomStep' => "",
'HasZoomSpeed' => "",
'MinZoomSpeed' => "",
'MaxZoomSpeed' => "",
'CanFocus' => "",
'CanAutoFocus' => "",
'CanFocusAbs' => "",
'CanFocusRel' => "",
'CanFocusCon' => "",
'MinFocusRange' => "",
'MaxFocusRange' => "",
'MinFocusStep' => "",
'MaxFocusStep' => "",
'HasFocusSpeed' => "",
'MinFocusSpeed' => "",
'MaxFocusSpeed' => "",
'CanIris' => "",
'CanAutoIris' => "",
'CanIrisAbs' => "",
'CanIrisRel' => "",
'CanIrisCon' => "",
'MinIrisRange' => "",
'MaxIrisRange' => "",
'MinIrisStep' => "",
'MaxIrisStep' => "",
'HasIrisSpeed' => "",
'MinIrisSpeed' => "",
'MaxIrisSpeed' => "",
'CanGain' => "",
'CanAutoGain' => "",
'CanGainAbs' => "",
'CanGainRel' => "",
'CanGainCon' => "",
'MinGainRange' => "",
'MaxGainRange' => "",
'MinGainStep' => "",
'MaxGainStep' => "",
'HasGainSpeed' => "",
'MinGainSpeed' => "",
'MaxGainSpeed' => "",
'CanWhite' => "",
'CanAutoWhite' => "",
'CanWhiteAbs' => "",
'CanWhiteRel' => "",
'CanWhiteCon' => "",
'MinWhiteRange' => "",
'MaxWhiteRange' => "",
'MinWhiteStep' => "",
'MaxWhiteStep' => "",
'HasWhiteSpeed' => "",
'MinWhiteSpeed' => "",
'MaxWhiteSpeed' => "",
'HasPresets' => "",
'NumPresets' => "",
'HasHomePreset' => "",
'CanSetPresets' => "",
);
}
if ( !isset( $newControl ) )
{
@ -79,7 +172,7 @@ foreach ( $tabs as $name=>$value )
else
{
?>
<li><a href="?view=<?= $view ?>&tab=<?= $name ?>"><?= $value ?></a></li>
<li><a href="?view=<?= $view ?>&cid=<?= requestVar( 'cid' ) ?>&tab=<?= $name ?>"><?= $value ?></a></li>
<?php
}
}

View File

@ -39,7 +39,7 @@ var SOUND_ON_ALARM = <?= ZM_WEB_SOUND_ON_ALARM ?>;
var POPUP_ON_ALARM = <?= ZM_WEB_POPUP_ON_ALARM ?>;
var streamMode = "<?= $streamMode ?>";
var showMode = "<?= ($showControls && !empty($_REQUEST['control']))?"control":"events" ?>";
var showMode = "<?= ($showControls && !empty($control))?"control":"events" ?>";
var connKey = '<?= $connkey ?>';
var maxDisplayEvents = <?= 2 * MAX_EVENTS ?>;

View File

@ -528,7 +528,7 @@ switch ( $tab )
{
?>
<tr><td><?= $SLANG['Controllable'] ?></td><td><input type="checkbox" name="newMonitor[Controllable]" value="1"<?php if ( !empty($newMonitor['Controllable']) ) { ?> checked="checked"<?php } ?>/></td></tr>
<tr><td><?= $SLANG['ControlType'] ?></td><td><?= buildSelect( "newMonitor[ControlId]", $controlTypes, 'loadLocations( this )' ); ?><?php if ( canEdit( 'Control' ) ) { ?>&nbsp;<a href="#" onlick="createPopup( '?view=controlcaps', 'zmControlCaps', 'controlcaps' );"><?= $SLANG['Edit'] ?></a><?php } ?></td></tr>
<tr><td><?= $SLANG['ControlType'] ?></td><td><?= buildSelect( "newMonitor[ControlId]", $controlTypes, 'loadLocations( this )' ); ?><?php if ( canEdit( 'Control' ) ) { ?>&nbsp;<a href="#" onclick="createPopup( '?view=controlcaps', 'zmControlCaps', 'controlcaps' );"><?= $SLANG['Edit'] ?></a><?php } ?></td></tr>
<tr><td><?= $SLANG['ControlDevice'] ?></td><td><input type="text" name="newMonitor[ControlDevice]" value="<?= validHtmlStr($newMonitor['ControlDevice']) ?>" size="32"/></td></tr>
<tr><td><?= $SLANG['ControlAddress'] ?></td><td><input type="text" name="newMonitor[ControlAddress]" value="<?= validHtmlStr($newMonitor['ControlAddress']) ?>" size="32"/></td></tr>
<tr><td><?= $SLANG['AutoStopTimeout'] ?></td><td><input type="text" name="newMonitor[AutoStopTimeout]" value="<?= validHtmlStr($newMonitor['AutoStopTimeout']) ?>" size="4"/></td></tr>