// Show individual cameras in Current Camera dropdown
function PopulateHomegroupSelector()
{
var box = $("#homegroupselector");
box.empty();
if (typeof (lastCameraListResponse.data) == "undefined" || lastCameraListResponse.data.length == 0)
return;
for (var i = 0; i < lastCameraListResponse.data.length; i++)
{
var displayName = lastCameraListResponse.data[i].optionDisplay;
if (CameraIsGroupOrCycle(lastCameraListResponse.data[i]) || lastCameraListResponse.data[i].isEnabled)
{
var thisGroupId = JavaScriptStringEncode(lastCameraListResponse.data[i].optionValue);
var thisGroupName = CleanUpGroupName(lastCameraListResponse.data[i].optionDisplay);
var thisGroupSelected = currentlySelectedHomeGroupId == lastCameraListResponse.data[i].optionValue;
box.append('<div' + (thisGroupSelected ? ' class="selected"' : '')
+ ' onclick="SelectCameraGroup(\'' + thisGroupId + '\')">' + thisGroupName + '</div>');
}
}
}
// Allow clicking individual cameras in Current Camera dropdown
function SelectCameraGroup(groupId)
{
$("#homegroupselector").hide();
for (var i = 0; i < lastCameraListResponse.data.length; i++)
{
if (lastCameraListResponse.data[i].optionValue == groupId)
{
if (CameraIsGroupOrCycle(lastCameraListResponse.data[i]) || lastCameraListResponse.data[i].isEnabled)
{
settings.ui2_defaultCameraGroupId = currentlySelectedHomeGroupId = groupId;
currentlyLoadingCamera = lastCameraListResponse.data[i];
UpdateSelectedLiveCameraFields();
break;
}
}
}
}
// Show individual cameras in Current Camera dropdown
function PopulateHomegroupSelector()
{
var box = $("#homegroupselector");
box.empty();
if (typeof (lastCameraListResponse.data) == "undefined" || lastCameraListResponse.data.length == 0)
return;
var boxArray = [];
for (var i = 0; i < lastCameraListResponse.data.length; i++)
{
var displayName = lastCameraListResponse.data[i].optionDisplay;
if (CameraIsGroupOrCycle(lastCameraListResponse.data[i]) || lastCameraListResponse.data[i].isEnabled)
{
var thisGroupId = JavaScriptStringEncode(lastCameraListResponse.data[i].optionValue);
var thisGroupName = CleanUpGroupName(lastCameraListResponse.data[i].optionDisplay);
var thisGroupSelected = currentlySelectedHomeGroupId == lastCameraListResponse.data[i].optionValue;
boxArray.push('##' +thisGroupName + '##\n<div' + (thisGroupSelected ? ' class="selected"' : '')
+ ' onclick="SelectCameraGroup(\'' + thisGroupId + '\')">' + thisGroupName + '</div>');
// box.append('<div' + (thisGroupSelected ? ' class="selected"' : '')
// + ' onclick="SelectCameraGroup(\'' + thisGroupId + '\')">' + thisGroupName + '</div>');
}
}
boxArray.sort();
for (i = 0; i < boxArray.length; i++) {
box.append(boxArray[i].replace(/##.*##/g,"");
}
}
haven't had a chance to read all the threads here, but was wondering if the sidebar close/open (default tilde key) is also suppose to reset your screen back to the LIVE camera mode when pressed as well. If I'm viewing a clip/alert and want to close the sidebar it also resets view back to main LIVE camera screen. Would like to look at alerts/clips (no sidebar).
I haven't had a chance to look at the java script (using latest chrome on win 10 (server/clients)) yet, but wanted to ask if this is a bug/limitation before proceeding.
great UI though.