diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index eb2e6a9a4..ec035d227 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -700,6 +700,7 @@ INSERT INTO `Controls` VALUES (NULL,'Netcat ONVIF','Ffmpeg','Netcat',0,0,1,1,0,0 INSERT INTO `Controls` VALUES (NULL,'Keekoon','Remote','Keekoon', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `Controls` VALUES (NULL,'HikVision','Local','',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,1,1,1,1,0,0,0,1,1,0,0,0,0,1,1,100,0,0,1,0,0,0,0,1,1,100,1,0,0,0); INSERT INTO `Controls` VALUES (NULL,'Maginon Supra IPC','cURL','MaginonIPC',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Floureon 1080P','Ffmpeg','Floureon',0,0,0,1,0,0,0,1,1,18,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,8,0,0,1,0,0,0,0,1,1,8,0,0,0,0); -- -- Add some monitor preset values diff --git a/db/zm_update-1.31.16.sql b/db/zm_update-1.31.16.sql index b44f92215..71255bbf0 100644 --- a/db/zm_update-1.31.16.sql +++ b/db/zm_update-1.31.16.sql @@ -82,7 +82,6 @@ SET @s = (SELECT IF( )); PREPARE stmt FROM @s; EXECUTE stmt; -/* SET @s = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() AND table_name = 'Groups' @@ -93,4 +92,3 @@ SET @s = (SELECT IF( )); PREPARE stmt FROM @s; EXECUTE stmt; -*/ diff --git a/distros/ubuntu1204/zoneminder.postinst b/distros/ubuntu1204/zoneminder.postinst index d01d27925..10bdaca2e 100644 --- a/distros/ubuntu1204/zoneminder.postinst +++ b/distros/ubuntu1204/zoneminder.postinst @@ -38,6 +38,10 @@ if [ "$1" = "configure" ]; then zmupdate.pl --nointeractive zmupdate.pl --nointeractive -f + + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + else echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' fi diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst index da2b444fe..5a4e5694d 100644 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst +++ b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst @@ -73,6 +73,9 @@ if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then # Run the ZoneMinder update tool zmupdate.pl --nointeractive + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + fi #DEBHELPER# diff --git a/distros/ubuntu1604/zoneminder.postinst b/distros/ubuntu1604/zoneminder.postinst index a703983be..d67e68c32 100644 --- a/distros/ubuntu1604/zoneminder.postinst +++ b/distros/ubuntu1604/zoneminder.postinst @@ -40,6 +40,10 @@ if [ "$1" = "configure" ]; then zmupdate.pl --nointeractive zmupdate.pl --nointeractive -f + + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + else echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' fi diff --git a/web/api/app/Controller/Component/FilterComponent.php b/web/api/app/Controller/Component/FilterComponent.php index bf6e423f7..326c1ce45 100644 --- a/web/api/app/Controller/Component/FilterComponent.php +++ b/web/api/app/Controller/Component/FilterComponent.php @@ -21,7 +21,7 @@ class FilterComponent extends Component { $query = array($attribute => $array); array_push($conditions, $query); } else { - array_push($conditions, array($attribute => $value)); + $conditions[$attribute] = $value; } } diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 27ee20e5d..3f3c3c8b4 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -41,8 +41,9 @@ class EventsController extends AppController { } if ($this->request->params['named']) { - $this->FilterComponent = $this->Components->load('Filter'); - $conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + //$this->FilterComponent = $this->Components->load('Filter'); + //$conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + $conditions = $this->request->params['named']; } else { $conditions = array(); } @@ -60,7 +61,7 @@ class EventsController extends AppController { 'order' => array('StartTime'), 'paramType' => 'querystring', ); - //if ( $this->request->params['GroupId'] ) { + if ( isset( $conditions['GroupId'] ) ) { $settings['joins'] = array( array( 'table' => 'Groups_Monitors', @@ -71,7 +72,7 @@ class EventsController extends AppController { ), ); $settings['contain'] = array('Group'); - //} + } $settings['conditions'] = array($conditions, $mon_options); // How many events to return @@ -83,11 +84,10 @@ class EventsController extends AppController { $this->Paginator->settings = $settings; $events = $this->Paginator->paginate('Event'); - // For each event, get its thumbnail data (path, width, height) + // For each event, get the frameID which has the largest score foreach ($events as $key => $value) { - //$thumbData = $this->createThumbnail($value['Event']['Id']); - $thumbData = ""; - $events[$key]['thumbData'] = $thumbData; + $maxScoreFrameId = $this->getMaxScoreAlarmFrameId($value['Event']['Id']); + $events[$key]['Event']['MaxScoreFrameId'] = $maxScoreFrameId; } $this->set(compact('events')); @@ -114,12 +114,9 @@ class EventsController extends AppController { $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); - if (!empty($allowedMonitors)) - { + if (!empty($allowedMonitors)) { $mon_options = array('Event.MonitorId' => $allowedMonitors); - } - else - { + } else { $mon_options=''; } @@ -156,8 +153,7 @@ class EventsController extends AppController { */ public function add() { - if ($this->Session->Read('eventPermission') != 'Edit') - { + if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); return; } @@ -181,8 +177,7 @@ class EventsController extends AppController { */ public function edit($id = null) { - if ($this->Session->Read('eventPermission') != 'Edit') - { + if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); return; } @@ -213,8 +208,7 @@ class EventsController extends AppController { * @return void */ public function delete($id = null) { - if ($this->Session->Read('eventPermission') != 'Edit') - { + if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); return; } @@ -230,7 +224,7 @@ class EventsController extends AppController { } else { return $this->flash(__('The event could not be deleted. Please, try again.'), array('action' => 'index')); } - } + } // end public function delete public function search() { $this->Event->recursive = -1; @@ -254,9 +248,7 @@ class EventsController extends AppController { 'results' => $results, '_serialize' => array('results') )); - - - } + } // end public function search // format expected: // you can changed AlarmFrames to any other named params @@ -320,7 +312,7 @@ class EventsController extends AppController { 'ZM_WEB_LIST_THUMB_HEIGHT', 'ZM_EVENT_IMAGE_DIGITS', 'ZM_DIR_IMAGES', - "$thumbs", + $thumbs, 'ZM_DIR_EVENTS' ) )), @@ -334,13 +326,11 @@ class EventsController extends AppController { $thumbWidth = $config['ZM_WEB_LIST_THUMB_WIDTH']; $scale = (100 * $thumbWidth) / $event['Event']['Width']; $thumbHeight = $this->Scaler->reScale( $event['Event']['Height'], $scale ); - } - elseif ( $config['ZM_WEB_LIST_THUMB_HEIGHT'] ) { + } elseif ( $config['ZM_WEB_LIST_THUMB_HEIGHT'] ) { $thumbHeight = $config['ZM_WEB_LIST_THUMB_HEIGHT']; $scale = (100*$thumbHeight)/$event['Event']['Height']; $thumbWidth = $this->Scaler->reScale( $event['Event']['Width'], $scale ); - } - else { + } else { throw new NotFoundException(__('No thumbnail width or height specified, please check in Options->Web')); } @@ -350,7 +340,6 @@ class EventsController extends AppController { $thumbData['Height'] = (int)$thumbHeight; return( $thumbData ); - } public function archive($id = null) { @@ -377,4 +366,28 @@ class EventsController extends AppController { )); } -} + public function getMaxScoreAlarmFrameId($id = null) { + $this->Event->recursive = -1; + + if (!$this->Event->exists($id)) { + throw new NotFoundException(__('Invalid event')); + } + + $event = $this->Event->find('first', array( + 'conditions' => array('Id' => $id) + )); + + // Find the max Frame for this Event. Error out otherwise. + $this->loadModel('Frame'); + + if (! $frame = $this->Frame->find('first', array( + 'conditions' => array( + 'EventId' => $event['Event']['Id'], + 'Score' => $event['Event']['MaxScore'] + ) + ))) { + throw new NotFoundException(__("Can not find Frame for Event " . $event['Event']['Id'])); + } + return $frame['Frame']['Id']; + } +} // end class EventsController diff --git a/web/api/app/Controller/MonitorsController.php b/web/api/app/Controller/MonitorsController.php index a49b022dc..af9cc8488 100644 --- a/web/api/app/Controller/MonitorsController.php +++ b/web/api/app/Controller/MonitorsController.php @@ -34,7 +34,8 @@ class MonitorsController extends AppController { if ($this->request->params['named']) { $this->FilterComponent = $this->Components->load('Filter'); - $conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + //$conditions = $this->FilterComponent->buildFilter($this->request->params['named']); + $conditions = $this->request->params['named']; } else { $conditions = array(); } @@ -45,7 +46,7 @@ class MonitorsController extends AppController { } $find_array = array('conditions'=>$conditions,'contain'=>array('Group')); - //if ( $this->request->params['GroupId'] ) { + if ( isset( $conditions['GroupId'] ) ) { $find_array['joins'] = array( array( 'table' => 'Groups_Monitors', @@ -63,7 +64,7 @@ class MonitorsController extends AppController { //), //) ); - //} + } $monitors = $this->Monitor->find('all',$find_array); $this->set(array( 'monitors' => $monitors, @@ -84,12 +85,9 @@ class MonitorsController extends AppController { throw new NotFoundException(__('Invalid monitor')); } $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); - if (!empty($allowedMonitors)) - { + if (!empty($allowedMonitors)) { $restricted = array('Monitor.' . $this->Monitor->primaryKey => $allowedMonitors); - } - else - { + } else { $restricted = ''; } diff --git a/web/skins/classic/css/classic/control.css b/web/skins/classic/css/classic/control.css deleted file mode 100644 index 320d391e4..000000000 --- a/web/skins/classic/css/classic/control.css +++ /dev/null @@ -1,148 +0,0 @@ -.ptzControls { - vertical-align: top; - margin: 10px auto 0; - width: 500px; -} - -.ptzControls input.ptzTextBtn { - margin-top: 2px; -} - -.ptzControls .controlsPanel { - margin: 0 auto; -} - -.ptzControls input[type=image] { - border: 0px; -} - -.ptzControls .controlsPanel .arrowControl { - width: 40px; - height: 180px; - margin: 0 4px; -} - -.ptzControls .controlsPanel .arrowControl input { - display: block; -} - -.ptzControls .controlsPanel .longArrowBtn { - width: 32px; - height: 48px; - margin: 0 auto; - cursor: pointer; -} - -/* - * This is a bit of a hack as these lines should be in the above - * section but that messes up layout on IE6 - */ -/* -.ptzControls .controlsPanel > div > div.longArrowBtn { - left: 50%; - margin-left: -16px; -} -*/ - -.ptzControls .controlsPanel .upBtn { - background: url("../../graphics/arrow-l-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .downBtn { - background: url("../../graphics/arrow-l-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .focusControls { - float: left; -} - -.ptzControls .controlsPanel .zoomControls { - float: left; -} - -.ptzControls .controlsPanel .irisControls { - float: right; -} - -.ptzControls .controlsPanel .whiteControls { - float: right; -} - -.ptzControls .controlsPanel .pantiltPanel { - margin: 0 auto; - height: 180px; - float: left; - width: 100px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { - margin: 5px auto; - border: 1px solid #006699; - text-align: center; - padding: 1px; - width: 100px; - height: 100px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { - width: 32px; - height: 32px; - cursor: pointer; - float: left; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { - background: url("../../graphics/arrow-ul.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { - background: url("../../graphics/arrow-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { - background: url("../../graphics/arrow-ur.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { - background: url("../../graphics/arrow-l.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { - background: url("../../graphics/center.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { - background: url("../../graphics/arrow-r.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { - background: url("../../graphics/arrow-dl.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { - background: url("../../graphics/arrow-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { - background: url("../../graphics/arrow-dr.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .powerControls { - margin: 5px auto; -} - -.ptzControls .presetControls { - margin: 5px auto; -} - -.ptzControls .presetControls input { - margin: 1px; -} - -.ptzControls .presetControls input.ptzNumBtn { - padding: 1px 2px; - width: 24px; - color: #ffffff; - text-align: center; - background-color: #016A9D; -} diff --git a/web/skins/classic/css/classic/views/control.css b/web/skins/classic/css/classic/views/control.css index 5e10dcfd9..381c9687c 100644 --- a/web/skins/classic/css/classic/views/control.css +++ b/web/skins/classic/css/classic/views/control.css @@ -1 +1,155 @@ -@import url(../control.css); +.ptzControls { + vertical-align: top; + margin: 10px auto 0; + width: 500px; +} + +.ptzControls::after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +.ptzControls input.ptzTextBtn { + margin-top: 2px; +} + +.ptzControls .controlsPanel { + margin: 0 auto; +} + +.ptzControls input[type=image] { + border: 0px; +} + +.ptzControls .controlsPanel .arrowControl { + width: 40px; + margin: 0 4px; +} + +.ptzControls .controlsPanel .arrowControl input { + display: block; +} + +.ptzControls .controlsPanel .longArrowBtn { + width: 32px; + height: 48px; + margin: 0 auto; + cursor: pointer; +} + +/* + * This is a bit of a hack as these lines should be in the above + * section but that messes up layout on IE6 + */ +/* +.ptzControls .controlsPanel > div > div.longArrowBtn { + left: 50%; + margin-left: -16px; +} +*/ + +.ptzControls .controlsPanel .upBtn { + background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .downBtn { + background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .focusControls { + float: left; +} + +.ptzControls .controlsPanel .zoomControls { + float: left; +} + +.ptzControls .controlsPanel .irisControls { + float: right; +} + +.ptzControls .controlsPanel .whiteControls { + float: right; +} + +.ptzControls .controlsPanel .pantiltPanel { + margin: 0 auto; + height: 180px; + float: left; + width: 100px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { + margin: 5px auto; + border: 1px solid #006699; + text-align: center; + padding: 1px; + width: 100px; + height: 100px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { + width: 32px; + height: 32px; + cursor: pointer; + float: left; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { + background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { + background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { + background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { + background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { + background: url("../skins/classic/graphics/graphics/center.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { + background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { + background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { + background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { + background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; +} + +.ptzControls .presetControls { + margin: 5px auto; +} + +.ptzControls .presetControls input { + margin: 1px; +} + +.ptzControls .presetControls input.ptzNumBtn { + padding: 1px 2px; + width: 24px; + color: #ffffff; + text-align: center; + background-color: #016A9D; +} diff --git a/web/skins/classic/css/classic/views/watch.css b/web/skins/classic/css/classic/views/watch.css index 28bda54ef..4ebb30dda 100644 --- a/web/skins/classic/css/classic/views/watch.css +++ b/web/skins/classic/css/classic/views/watch.css @@ -1,5 +1,3 @@ -@import url(../control.css); - #header { display: flex; justify-content: space-between; diff --git a/web/skins/classic/css/dark/control.css b/web/skins/classic/css/dark/control.css deleted file mode 100644 index 56fc0e41c..000000000 --- a/web/skins/classic/css/dark/control.css +++ /dev/null @@ -1,148 +0,0 @@ -.ptzControls { - vertical-align: top; - margin: 10px auto 0; - width: 500px; -} - -.ptzControls input.ptzTextBtn { - margin-top: 2px; -} - -.ptzControls .controlsPanel { - margin: 0 auto; -} - -.ptzControls input[type=image] { - border: 0px; -} - -.ptzControls .controlsPanel .arrowControl { - width: 40px; - height: 180px; - margin: 0 4px; -} - -.ptzControls .controlsPanel .arrowControl input { - display: block; -} - -.ptzControls .controlsPanel .longArrowBtn { - width: 32px; - height: 48px; - margin: 0 auto; - cursor: pointer; -} - -/* - * This is a bit of a hack as these lines should be in the above - * section but that messes up layout on IE6 - */ -/* -.ptzControls .controlsPanel > div > div.longArrowBtn { - left: 50%; - margin-left: -16px; -} -*/ - -.ptzControls .controlsPanel .upBtn { - background: url("../../graphics/arrow-l-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .downBtn { - background: url("../../graphics/arrow-l-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .focusControls { - float: left; -} - -.ptzControls .controlsPanel .zoomControls { - float: left; -} - -.ptzControls .controlsPanel .irisControls { - float: right; -} - -.ptzControls .controlsPanel .whiteControls { - float: right; -} - -.ptzControls .controlsPanel .pantiltPanel { - margin: 0 auto; - height: 180px; - float: left; - width: 100px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { - margin: 5px auto; - border: 1px solid #006699; - text-align: center; - padding: 1px; - width: 102px; - height: 102px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { - width: 32px; - height: 32px; - cursor: pointer; - float: left; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { - background: url("../../graphics/arrow-ul.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { - background: url("../../graphics/arrow-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { - background: url("../../graphics/arrow-ur.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { - background: url("../../graphics/arrow-l.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { - background: url("../../graphics/center.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { - background: url("../../graphics/arrow-r.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { - background: url("../../graphics/arrow-dl.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { - background: url("../../graphics/arrow-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { - background: url("../../graphics/arrow-dr.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .powerControls { - margin: 5px auto; -} - -.ptzControls .presetControls { - margin: 5px auto; -} - -.ptzControls .presetControls input { - margin: 1px; -} - -.ptzControls .presetControls input.ptzNumBtn { - padding: 1px 2px; - width: 24px; - color: #ffffff; - text-align: center; - background-color: #016A9D; -} diff --git a/web/skins/classic/css/dark/views/control.css b/web/skins/classic/css/dark/views/control.css index 5e10dcfd9..af0eeccf2 100644 --- a/web/skins/classic/css/dark/views/control.css +++ b/web/skins/classic/css/dark/views/control.css @@ -1 +1,155 @@ -@import url(../control.css); +.ptzControls { + vertical-align: top; + margin: 10px auto 0; + width: 500px; +} + +.ptzControls::after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +.ptzControls input.ptzTextBtn { + margin-top: 2px; +} + +.ptzControls .controlsPanel { + margin: 0 auto; +} + +.ptzControls input[type=image] { + border: 0px; +} + +.ptzControls .controlsPanel .arrowControl { + width: 40px; + margin: 0 4px; +} + +.ptzControls .controlsPanel .arrowControl input { + display: block; +} + +.ptzControls .controlsPanel .longArrowBtn { + width: 32px; + height: 48px; + margin: 0 auto; + cursor: pointer; +} + +/* + * This is a bit of a hack as these lines should be in the above + * section but that messes up layout on IE6 + */ +/* +.ptzControls .controlsPanel > div > div.longArrowBtn { + left: 50%; + margin-left: -16px; +} +*/ + +.ptzControls .controlsPanel .upBtn { + background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .downBtn { + background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .focusControls { + float: left; +} + +.ptzControls .controlsPanel .zoomControls { + float: left; +} + +.ptzControls .controlsPanel .irisControls { + float: right; +} + +.ptzControls .controlsPanel .whiteControls { + float: right; +} + +.ptzControls .controlsPanel .pantiltPanel { + margin: 0 auto; + height: 180px; + float: left; + width: 100px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { + margin: 5px auto; + border: 1px solid #006699; + text-align: center; + padding: 1px; + width: 102px; + height: 102px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { + width: 32px; + height: 32px; + cursor: pointer; + float: left; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { + background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { + background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { + background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { + background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { + background: url("../skins/classic/graphics/graphics/center.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { + background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { + background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { + background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { + background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; +} + +.ptzControls .presetControls { + margin: 5px auto; +} + +.ptzControls .presetControls input { + margin: 1px; +} + +.ptzControls .presetControls input.ptzNumBtn { + padding: 1px 2px; + width: 24px; + color: #ffffff; + text-align: center; + background-color: #016A9D; +} diff --git a/web/skins/classic/css/dark/views/watch.css b/web/skins/classic/css/dark/views/watch.css index 28bda54ef..4ebb30dda 100644 --- a/web/skins/classic/css/dark/views/watch.css +++ b/web/skins/classic/css/dark/views/watch.css @@ -1,5 +1,3 @@ -@import url(../control.css); - #header { display: flex; justify-content: space-between; diff --git a/web/skins/classic/css/flat/control.css b/web/skins/classic/css/flat/control.css deleted file mode 100644 index 56fc0e41c..000000000 --- a/web/skins/classic/css/flat/control.css +++ /dev/null @@ -1,148 +0,0 @@ -.ptzControls { - vertical-align: top; - margin: 10px auto 0; - width: 500px; -} - -.ptzControls input.ptzTextBtn { - margin-top: 2px; -} - -.ptzControls .controlsPanel { - margin: 0 auto; -} - -.ptzControls input[type=image] { - border: 0px; -} - -.ptzControls .controlsPanel .arrowControl { - width: 40px; - height: 180px; - margin: 0 4px; -} - -.ptzControls .controlsPanel .arrowControl input { - display: block; -} - -.ptzControls .controlsPanel .longArrowBtn { - width: 32px; - height: 48px; - margin: 0 auto; - cursor: pointer; -} - -/* - * This is a bit of a hack as these lines should be in the above - * section but that messes up layout on IE6 - */ -/* -.ptzControls .controlsPanel > div > div.longArrowBtn { - left: 50%; - margin-left: -16px; -} -*/ - -.ptzControls .controlsPanel .upBtn { - background: url("../../graphics/arrow-l-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .downBtn { - background: url("../../graphics/arrow-l-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .focusControls { - float: left; -} - -.ptzControls .controlsPanel .zoomControls { - float: left; -} - -.ptzControls .controlsPanel .irisControls { - float: right; -} - -.ptzControls .controlsPanel .whiteControls { - float: right; -} - -.ptzControls .controlsPanel .pantiltPanel { - margin: 0 auto; - height: 180px; - float: left; - width: 100px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { - margin: 5px auto; - border: 1px solid #006699; - text-align: center; - padding: 1px; - width: 102px; - height: 102px; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { - width: 32px; - height: 32px; - cursor: pointer; - float: left; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { - background: url("../../graphics/arrow-ul.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { - background: url("../../graphics/arrow-u.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { - background: url("../../graphics/arrow-ur.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { - background: url("../../graphics/arrow-l.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { - background: url("../../graphics/center.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { - background: url("../../graphics/arrow-r.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { - background: url("../../graphics/arrow-dl.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { - background: url("../../graphics/arrow-d.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { - background: url("../../graphics/arrow-dr.png") no-repeat 0 0; -} - -.ptzControls .controlsPanel .powerControls { - margin: 5px auto; -} - -.ptzControls .presetControls { - margin: 5px auto; -} - -.ptzControls .presetControls input { - margin: 1px; -} - -.ptzControls .presetControls input.ptzNumBtn { - padding: 1px 2px; - width: 24px; - color: #ffffff; - text-align: center; - background-color: #016A9D; -} diff --git a/web/skins/classic/css/flat/views/control.css b/web/skins/classic/css/flat/views/control.css index 5e10dcfd9..a2dbb9429 100644 --- a/web/skins/classic/css/flat/views/control.css +++ b/web/skins/classic/css/flat/views/control.css @@ -1 +1,155 @@ -@import url(../control.css); +.ptzControls { + vertical-align: top; + margin: 10px auto 0; + width: 500px; +} + +.ptzControls::after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +.ptzControls input.ptzTextBtn { + margin-top: 2px; +} + +.ptzControls .controlsPanel { + margin: 0 auto; +} + +.ptzControls input[type=image] { + border: 0px; +} + +.ptzControls .controlsPanel .arrowControl { + width: 40px; + margin: 0 4px; +} + +.ptzControls .controlsPanel .arrowControl input { + display: block; +} + +.ptzControls .controlsPanel .longArrowBtn { + width: 32px; + height: 48px; + margin: 0 auto; + cursor: pointer; +} + +/* + * This is a bit of a hack as these lines should be in the above + * section but that messes up layout on IE6 + */ +/* +.ptzControls .controlsPanel > div > div.longArrowBtn { + left: 50%; + margin-left: -16px; +} +*/ + +.ptzControls .controlsPanel .upBtn { + background: url("../skins/classic/graphics/arrow-l-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .downBtn { + background: url("../skins/classic/graphics/arrow-l-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .focusControls { + float: left; +} + +.ptzControls .controlsPanel .zoomControls { + float: left; +} + +.ptzControls .controlsPanel .irisControls { + float: right; +} + +.ptzControls .controlsPanel .whiteControls { + float: right; +} + +.ptzControls .controlsPanel .pantiltPanel { + margin: 0 auto; + height: 180px; + float: left; + width: 100px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { + margin: 5px auto; + border: 1px solid #006699; + text-align: center; + padding: 1px; + width: 102px; + height: 102px; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn { + width: 32px; + height: 32px; + cursor: pointer; + float: left; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upLeftBtn { + background: url("../skins/classic/graphics/arrow-ul.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upBtn { + background: url("../skins/classic/graphics/arrow-u.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .upRightBtn { + background: url("../skins/classic/graphics/arrow-ur.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .leftBtn { + background: url("../skins/classic/graphics/arrow-l.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .centerBtn { + background: url("../skins/classic/graphics/center.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .rightBtn { + background: url("../skins/classic/graphics/arrow-r.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downLeftBtn { + background: url("../skins/classic/graphics/arrow-dl.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downBtn { + background: url("../skins/classic/graphics/arrow-d.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .pantiltPanel .pantiltControls .downRightBtn { + background: url("../skins/classic/graphics/arrow-dr.png") no-repeat 0 0; +} + +.ptzControls .controlsPanel .powerControls { + margin: 5px auto; +} + +.ptzControls .presetControls { + margin: 5px auto; +} + +.ptzControls .presetControls input { + margin: 1px; +} + +.ptzControls .presetControls input.ptzNumBtn { + padding: 1px 2px; + width: 24px; + color: #ffffff; + text-align: center; + background-color: #016A9D; +} diff --git a/web/skins/classic/css/flat/views/watch.css b/web/skins/classic/css/flat/views/watch.css index ef7937db2..17bf1593d 100644 --- a/web/skins/classic/css/flat/views/watch.css +++ b/web/skins/classic/css/flat/views/watch.css @@ -1,5 +1,3 @@ -@import url(../control.css); - #header { display: flex; justify-content: space-between; diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index e73336c09..2338bbeab 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -34,6 +34,9 @@ function xhtmlHeaders( $file, $title ) { $basename = basename( $file, '.php' ); $viewCssFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css' ); + if ($basename == 'watch') { + $viewCssFileExtra = getSkinFile( '/css/'.$css.'/views/control.css' ); + } $viewCssPhpFile = getSkinFile( '/css/'.$css.'/views/'.$basename.'.css.php' ); $viewJsFile = getSkinFile( 'views/js/'.$basename.'.js' ); $viewJsPhpFile = getSkinFile( 'views/js/'.$basename.'.js.php' ); @@ -67,6 +70,12 @@ if ( file_exists( "skins/$skin/css/$css/graphics/favicon.ico" ) ) { if ( $viewCssFile ) { ?> + + + /js/video.js"> + +