Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow camera settings edit in single view. #2427

Merged
merged 6 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions motioneye/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ div.page-container.single-cam {
padding-bottom: 0;
}

div.page-container.single-cam-edit {
padding-bottom: 0;
padding-top: 50px;
}

/* icons & icon buttons */

Expand Down
23 changes: 19 additions & 4 deletions motioneye/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1414,9 +1414,15 @@ function openSettings(cameraId) {
}

$('div.settings').addClass('open').removeClass('closed');
getPageContainer().addClass('stretched');
var pageContainer = getPageContainer();
pageContainer.addClass('stretched');
$('div.settings-top-bar').addClass('open').removeClass('closed');

if (isSingleView()) {
pageContainer.addClass('single-cam-edit');
$('div.header').removeClass('single-cam');
MichaIng marked this conversation as resolved.
Show resolved Hide resolved
}

updateConfigUI();
doExitFullScreenCamera(true);
updateLayout();
Expand All @@ -1431,9 +1437,15 @@ function closeSettings() {
pushConfigReboot = false;

$('div.settings').removeClass('open').addClass('closed');
getPageContainer().removeClass('stretched');
var pageContainer = getPageContainer();
pageContainer.removeClass('stretched');
$('div.settings-top-bar').removeClass('open').addClass('closed');

if (isSingleView()) {
pageContainer.removeClass('single-cam-edit');
$('div.header').addClass('single-cam');
}

updateLayout();
}

Expand Down Expand Up @@ -2612,7 +2624,6 @@ function uploadFile(path, input, callback) {

function showApply() {
var applyButton = $('#applyButton');

applyButton.html(i18n.gettext("Apliki"));
applyButton.css('display', 'inline-block');
applyButton.removeClass('progress');
Expand Down Expand Up @@ -5093,12 +5104,15 @@ function recreateCameraFrames(cameras) {
updateCameras(cameras);
}
else {
if (isSingleView()) {
doExitSingleViewCamera();
}

ajax('GET', basePath + 'config/list/', null, function (data) {
if (data == null || data.error) {
showErrorMessage(data && data.error);
return;
}

updateCameras(data.cameras);
});
}
Expand Down Expand Up @@ -5218,6 +5232,7 @@ function doExitSingleViewCamera() {
$('div.header').removeClass('single-cam');
$('div.footer').removeClass('single-cam');
pageContainer.removeClass('single-cam');
pageContainer.removeClass('single-cam-edit');
tunkio marked this conversation as resolved.
Show resolved Hide resolved
cameraFrame.removeClass('single-cam');

var cameraIds = getCameraIds();
Expand Down