mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Concider Access level for item filtering
This commit is contained in:
parent
332655abfb
commit
5b0ce3c0f2
@ -277,13 +277,13 @@ $(document).ready(function () {
|
||||
fps = parseInt(framerates);
|
||||
}
|
||||
|
||||
//Show Frameskipping only when more than 2 fps
|
||||
if (fps > 2 && storedAccess === "expert") {
|
||||
showInputOptions("framegrabber", ["fpsSoftwareDecimation"], true);
|
||||
}
|
||||
else {
|
||||
showInputOptions("framegrabber", ["fpsSoftwareDecimation"], false);
|
||||
}
|
||||
////Show Frameskipping only when more than 2 fps
|
||||
//if (fps > 2) {
|
||||
// showInputOptionForItem(conf_editor_screen, "framegrabber", "fpsSoftwareDecimation", true);
|
||||
//}
|
||||
//else {
|
||||
// showInputOptionForItem(conf_editor_screen, "framegrabber", "fpsSoftwareDecimation", false);
|
||||
//}
|
||||
conf_editor_screen.getEditor("root.framegrabber.fps").setValue(fps);
|
||||
});
|
||||
|
||||
@ -317,9 +317,9 @@ $(document).ready(function () {
|
||||
true);
|
||||
|
||||
if (jQuery.isEmptyObject(properties)) {
|
||||
showInputOptions("grabberV4L2", [key], false);
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", key, false);
|
||||
} else {
|
||||
showInputOptions("grabberV4L2", [key], true);
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", key, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -620,13 +620,12 @@ $(document).ready(function () {
|
||||
if (framerates !== "NONE") {
|
||||
fps = parseInt(framerates);
|
||||
}
|
||||
|
||||
//Show Frameskipping only when more than 2 fps
|
||||
if (fps > 2 && storedAccess === "expert") {
|
||||
showInputOptions("grabberV4L2", ["fpsSoftwareDecimation"], true);
|
||||
if (fps > 2) {
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", true);
|
||||
}
|
||||
else {
|
||||
showInputOptions("grabberV4L2", ["fpsSoftwareDecimation"], false);
|
||||
showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", false);
|
||||
}
|
||||
conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
|
||||
});
|
||||
|
@ -1155,6 +1155,14 @@ function showInputOptions(path, elements, state) {
|
||||
}
|
||||
}
|
||||
|
||||
function showInputOptionForItem(editor, path, item, state) {
|
||||
var accessLevel = editor.schema.properties[path].properties[item].access;
|
||||
// Enable element only, if access level compliant
|
||||
if (!state || isAccessLevelCompliant(accessLevel)) {
|
||||
showInputOptions(path, [item], state);
|
||||
}
|
||||
}
|
||||
|
||||
function showInputOptionsForKey(editor, item, showForKeys, state) {
|
||||
var elements = [];
|
||||
var keysToshow = [];
|
||||
|
Loading…
Reference in New Issue
Block a user