Skip to content

Commit

Permalink
Minor ptz page fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Dec 22, 2019
1 parent 8454016 commit 70c9986
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 35 deletions.
6 changes: 5 additions & 1 deletion src/www/httpd/htdocs/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ nav ul li.icon { display: none; }
cursor: pointer;
}

table.ptz-table {
width: 35%;
}

table.ptz-table tr td {
padding: 1px 1px 1px;
padding: 1px 1px 1px 1px;
border: 0px;
text-align: center;
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/www/httpd/htdocs/images/arrow-up-bold-box-outline.svg

This file was deleted.

15 changes: 8 additions & 7 deletions src/www/httpd/htdocs/js/modules/ptz.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ APP.ptz = (function ($) {
jQuery.get('/cgi-bin/snapshot.sh?res=low&base64=yes', function(data) {
image = document.getElementById('imgSnap');
image.src = 'data:image/png;base64,' + data;
image.style = 'width:100%;';
})
setTimeout(p, interval);
})();
Expand All @@ -60,12 +59,14 @@ APP.ptz = (function ($) {
dataType: "json",
success: function(data) {
for (let key in data) {
if (key == "model_suffix" && data[key] == "h201c") {
$('#ptz_title').hide();
$('#ptz_main').show();
} else {
$('#ptz_title').show();
$('#ptz_main').hide();
if (key == "model_suffix") {
if (data[key] == "h201c") {
$('#ptz_title').hide();
$('#ptz_main').show();
} else {
$('#ptz_title').show();
$('#ptz_main').hide();
}
}
}
},
Expand Down
37 changes: 14 additions & 23 deletions src/www/httpd/htdocs/pages/ptz.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,24 @@ <h3 class="no-margin" id="header">PTZ</h3>
<p>PTZ functions are not available for this camera model.</p>
</div>

<table id="ptz_main" class="u-full-width padded-table">
<img id="imgSnap" src="images/loading.gif" width="35%"/>

<table class="u-full-width ptz-table">
<tbody>
<tr class="row">
<td><img id="imgSnap" src="images/loading.gif" /></td>
<td></td>
<td><input type="image" id="img-au" src="images/arrow-up-bold-box-outline.png" /></td>
<td></td>
</tr>
<tr class="row">
<td><input type="image" id="img-al" src="images/arrow-left-bold-box-outline.png" /></td>
<td></td>
<td><input type="image" id="img-ar" src="images/arrow-right-bold-box-outline.png" /></td>
</tr>
<tr class="row">
<td>
<table class="u-full-width ptz-table">
<tbody>
<tr class="row">
<td></td>
<td><input type="image" id="img-au" src="images/arrow-up-bold-box-outline.svg" width="75%"/></td>
<td></td>
</tr>
<tr class="row">
<td><input type="image" id="img-al" src="images/arrow-left-bold-box-outline.svg" width="75%" /></td>
<td></td>
<td><input type="image" id="img-ar" src="images/arrow-right-bold-box-outline.svg" width="75%" /></td>
</tr>
<tr class="row">
<td></td>
<td><input type="image" id="img-ad" src="images/arrow-down-bold-box-outline.svg" width="75%" /></td>
<td></td>
</tr>
</tbody>
</table>
</td>
<td></td>
<td><input type="image" id="img-ad" src="images/arrow-down-bold-box-outline.png" /></td>
<td></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 70c9986

Please sign in to comment.