From f91ff4503aed3aa436f611b4495f39f59ac030b7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 4 Apr 2016 13:20:04 -0400 Subject: [PATCH 1/2] rework the ptz controls to take up less vertical space, also don't set width of buttons --- web/skins/classic/css/classic/control.css | 11 ++++++----- web/skins/classic/css/dark/control.css | 15 ++++++++------- web/skins/classic/css/flat/control.css | 15 ++++++++------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/web/skins/classic/css/classic/control.css b/web/skins/classic/css/classic/control.css index e9b8b9b3d..737191cd7 100644 --- a/web/skins/classic/css/classic/control.css +++ b/web/skins/classic/css/classic/control.css @@ -1,12 +1,11 @@ .ptzControls { vertical-align: top; margin: 10px auto 0; - width: 300px; + width: 500px; } .ptzControls input.ptzTextBtn { margin-top: 2px; - width: 40px; } .ptzControls .controlsPanel { @@ -72,6 +71,8 @@ .ptzControls .controlsPanel .pantiltPanel { margin: 0 auto; height: 180px; + float: left; + width: 100px; } .ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { @@ -126,12 +127,12 @@ background: url("../../graphics/arrow-dr.gif") no-repeat 0 0; } -.ptzControls .controlsPanel .pantiltPanel .powerControls { - margin: 0 auto; +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; } .ptzControls .presetControls { - margin: 0 auto; + margin: 5px auto; } .ptzControls .presetControls input { diff --git a/web/skins/classic/css/dark/control.css b/web/skins/classic/css/dark/control.css index 4a7f05a5b..737191cd7 100644 --- a/web/skins/classic/css/dark/control.css +++ b/web/skins/classic/css/dark/control.css @@ -1,12 +1,11 @@ .ptzControls { vertical-align: top; margin: 10px auto 0; - width: 300px; + width: 500px; } .ptzControls input.ptzTextBtn { margin-top: 2px; - width: 40px; } .ptzControls .controlsPanel { @@ -72,6 +71,8 @@ .ptzControls .controlsPanel .pantiltPanel { margin: 0 auto; height: 180px; + float: left; + width: 100px; } .ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { @@ -79,8 +80,8 @@ border: 1px solid #006699; text-align: center; padding: 1px; - width: 96px; - height: 96px; + width: 100px; + height: 100px; } .ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { @@ -126,12 +127,12 @@ background: url("../../graphics/arrow-dr.gif") no-repeat 0 0; } -.ptzControls .controlsPanel .pantiltPanel .powerControls { - margin: 0 auto; +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; } .ptzControls .presetControls { - margin: 0 auto; + margin: 5px auto; } .ptzControls .presetControls input { diff --git a/web/skins/classic/css/flat/control.css b/web/skins/classic/css/flat/control.css index 4a7f05a5b..737191cd7 100644 --- a/web/skins/classic/css/flat/control.css +++ b/web/skins/classic/css/flat/control.css @@ -1,12 +1,11 @@ .ptzControls { vertical-align: top; margin: 10px auto 0; - width: 300px; + width: 500px; } .ptzControls input.ptzTextBtn { margin-top: 2px; - width: 40px; } .ptzControls .controlsPanel { @@ -72,6 +71,8 @@ .ptzControls .controlsPanel .pantiltPanel { margin: 0 auto; height: 180px; + float: left; + width: 100px; } .ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { @@ -79,8 +80,8 @@ border: 1px solid #006699; text-align: center; padding: 1px; - width: 96px; - height: 96px; + width: 100px; + height: 100px; } .ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { @@ -126,12 +127,12 @@ background: url("../../graphics/arrow-dr.gif") no-repeat 0 0; } -.ptzControls .controlsPanel .pantiltPanel .powerControls { - margin: 0 auto; +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; } .ptzControls .presetControls { - margin: 0 auto; + margin: 5px auto; } .ptzControls .presetControls input { From 5f3e7134fb308095dec7175f1eb4a89374af0b4c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 4 Apr 2016 13:22:26 -0400 Subject: [PATCH 2/2] split power out of the Panel box so that I can style it better --- web/skins/classic/includes/control_functions.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/skins/classic/includes/control_functions.php b/web/skins/classic/includes/control_functions.php index c22c39da6..cc99cacbc 100644 --- a/web/skins/classic/includes/control_functions.php +++ b/web/skins/classic/includes/control_functions.php @@ -367,24 +367,22 @@ function ptzControls( $monitor ) echo controlIris( $monitor, $cmds ); if ( $monitor->CanWhite() ) echo controlWhite( $monitor, $cmds ); - if ( $monitor->CanMove() || ( $monitor->CanWake() || $monitor->CanSleep() || $monitor->CanReset() ) ) - { + if ( $monitor->CanMove() ) { ?>
CanMove() ) echo controlPanTilt( $monitor, $cmds ); - if ( $monitor->CanWake() || $monitor->CanSleep() || $monitor->CanReset() ) - echo controlPower( $monitor, $cmds ); ?>
CanWake() || $monitor->CanSleep() || $monitor->CanReset() ) + echo controlPower( $monitor, $cmds ); + if ( $monitor->HasPresets() ) + echo controlPresets( $monitor, $cmds ); ?> HasPresets() ) - echo controlPresets( $monitor, $cmds ); return( ob_get_clean() ); } ?>