From 08b5c26a15d53ea4c33f209962b0ee2d182e61b1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 7 Dec 2017 14:11:06 -0500 Subject: [PATCH 1/9] 2019 maxscoreframeid (#2020) * added MaxScoreFrameId to address #2019 * consistent quotes --- web/api/app/Controller/EventsController.php | 34 ++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index f3e054c42..38e4d7211 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -76,11 +76,10 @@ public function beforeFilter() { ); $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; } @@ -278,6 +277,32 @@ public function beforeFilter() { )); } + 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']; + + +} + // Create a thumbnail and return the thumbnail's data for a given event id. public function createThumbnail($id = null) { $this->Event->recursive = -1; @@ -301,6 +326,7 @@ public function beforeFilter() { throw new NotFoundException(__("Can not find Frame for Event " . $event['Event']['Id'])); } + $this->loadModel('Config'); // Get the config options required for reScale and getImageSrc From ef1af9cc155e43747a7bf12179965b627e2432ca Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 9 Dec 2017 14:03:42 -0500 Subject: [PATCH 2/9] disable FilterComponent as it doesn't actually do anything. Add Groups join when needed --- .../app/Controller/Component/FilterComponent.php | 2 +- web/api/app/Controller/EventsController.php | 9 +++++---- web/api/app/Controller/MonitorsController.php | 14 ++++++-------- web/skins/classic/css/flat/control.css | 3 ++- 4 files changed, 14 insertions(+), 14 deletions(-) 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..0bd429139 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 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/flat/control.css b/web/skins/classic/css/flat/control.css index 56fc0e41c..4a0f66761 100644 --- a/web/skins/classic/css/flat/control.css +++ b/web/skins/classic/css/flat/control.css @@ -2,6 +2,7 @@ vertical-align: top; margin: 10px auto 0; width: 500px; + min-height: 20px; } .ptzControls input.ptzTextBtn { @@ -75,7 +76,7 @@ width: 100px; } -.ptzControls .controlsPanel .pantiltPanel .pantiltControls .pantiltButtons { +.pantiltButtons { margin: 5px auto; border: 1px solid #006699; text-align: center; From a867c488e0723d22f7bac0dd4d348292dafd1329 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 9 Dec 2017 14:05:18 -0500 Subject: [PATCH 3/9] ned to actually remove the MonitorIds column --- db/zm_update-1.31.16.sql | 2 -- 1 file changed, 2 deletions(-) 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; -*/ From a2d266f8f9b4c567f5a2dccd53af84be17a53b15 Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Sat, 9 Dec 2017 16:05:42 -0600 Subject: [PATCH 4/9] fix floreen ptz control sql --- db/zm_create.sql.in | 1 + db/zm_update-1.31.2.sql | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 db/zm_update-1.31.2.sql diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 62424c286..157c55a06 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -603,6 +603,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.2.sql b/db/zm_update-1.31.2.sql deleted file mode 100644 index 0bc10c8ce..000000000 --- a/db/zm_update-1.31.2.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `Controls` VALUES (28,'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); From 6974c847e59af2ee33e7bc8bfa83f6de563e4e2b Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Sat, 9 Dec 2017 11:14:10 -0500 Subject: [PATCH 5/9] Fix controlcss Missing viewCssFileExtra --- web/skins/classic/css/classic/control.css | 148 ----------------- .../classic/css/classic/views/control.css | 149 +++++++++++++++++- web/skins/classic/css/classic/views/watch.css | 2 - web/skins/classic/css/dark/control.css | 148 ----------------- web/skins/classic/css/dark/views/control.css | 149 +++++++++++++++++- web/skins/classic/css/dark/views/watch.css | 2 - web/skins/classic/css/flat/control.css | 149 ------------------ web/skins/classic/css/flat/views/control.css | 149 +++++++++++++++++- web/skins/classic/css/flat/views/watch.css | 2 - web/skins/classic/includes/functions.php | 14 +- 10 files changed, 457 insertions(+), 455 deletions(-) delete mode 100644 web/skins/classic/css/classic/control.css delete mode 100644 web/skins/classic/css/dark/control.css delete mode 100644 web/skins/classic/css/flat/control.css 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..e6f1575e4 100644 --- a/web/skins/classic/css/classic/views/control.css +++ b/web/skins/classic/css/classic/views/control.css @@ -1 +1,148 @@ -@import url(../control.css); +.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("../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..8c9981c71 100644 --- a/web/skins/classic/css/dark/views/control.css +++ b/web/skins/classic/css/dark/views/control.css @@ -1 +1,148 @@ -@import url(../control.css); +.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("../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 4a0f66761..000000000 --- a/web/skins/classic/css/flat/control.css +++ /dev/null @@ -1,149 +0,0 @@ -.ptzControls { - vertical-align: top; - margin: 10px auto 0; - width: 500px; - min-height: 20px; -} - -.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; -} - -.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..de57653f0 100644 --- a/web/skins/classic/css/flat/views/control.css +++ b/web/skins/classic/css/flat/views/control.css @@ -1 +1,148 @@ -@import url(../control.css); +.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("../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"> + +