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);
|
fps = parseInt(framerates);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Show Frameskipping only when more than 2 fps
|
////Show Frameskipping only when more than 2 fps
|
||||||
if (fps > 2 && storedAccess === "expert") {
|
//if (fps > 2) {
|
||||||
showInputOptions("framegrabber", ["fpsSoftwareDecimation"], true);
|
// showInputOptionForItem(conf_editor_screen, "framegrabber", "fpsSoftwareDecimation", true);
|
||||||
}
|
//}
|
||||||
else {
|
//else {
|
||||||
showInputOptions("framegrabber", ["fpsSoftwareDecimation"], false);
|
// showInputOptionForItem(conf_editor_screen, "framegrabber", "fpsSoftwareDecimation", false);
|
||||||
}
|
//}
|
||||||
conf_editor_screen.getEditor("root.framegrabber.fps").setValue(fps);
|
conf_editor_screen.getEditor("root.framegrabber.fps").setValue(fps);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -317,9 +317,9 @@ $(document).ready(function () {
|
|||||||
true);
|
true);
|
||||||
|
|
||||||
if (jQuery.isEmptyObject(properties)) {
|
if (jQuery.isEmptyObject(properties)) {
|
||||||
showInputOptions("grabberV4L2", [key], false);
|
showInputOptionForItem(conf_editor_video, "grabberV4L2", key, false);
|
||||||
} else {
|
} else {
|
||||||
showInputOptions("grabberV4L2", [key], true);
|
showInputOptionForItem(conf_editor_video, "grabberV4L2", key, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -620,13 +620,12 @@ $(document).ready(function () {
|
|||||||
if (framerates !== "NONE") {
|
if (framerates !== "NONE") {
|
||||||
fps = parseInt(framerates);
|
fps = parseInt(framerates);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Show Frameskipping only when more than 2 fps
|
//Show Frameskipping only when more than 2 fps
|
||||||
if (fps > 2 && storedAccess === "expert") {
|
if (fps > 2) {
|
||||||
showInputOptions("grabberV4L2", ["fpsSoftwareDecimation"], true);
|
showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showInputOptions("grabberV4L2", ["fpsSoftwareDecimation"], false);
|
showInputOptionForItem(conf_editor_video, "grabberV4L2", "fpsSoftwareDecimation", false);
|
||||||
}
|
}
|
||||||
conf_editor_video.getEditor("root.grabberV4L2.fps").setValue(fps);
|
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) {
|
function showInputOptionsForKey(editor, item, showForKeys, state) {
|
||||||
var elements = [];
|
var elements = [];
|
||||||
var keysToshow = [];
|
var keysToshow = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user