mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Details coming soon.
This commit is contained in:
@@ -2,7 +2,8 @@ $(document).ready( function() {
|
||||
performTranslation();
|
||||
var conf_editor_v4l2 = null;
|
||||
var conf_editor_fg = null;
|
||||
|
||||
var conf_editor_instCapt = null;
|
||||
|
||||
function hideEl(el)
|
||||
{
|
||||
for(var i = 0; i<el.length; i++)
|
||||
@@ -10,14 +11,19 @@ $(document).ready( function() {
|
||||
$('[data-schemapath*="root.framegrabber.'+el[i]+'"]').toggle(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(showOptHelp)
|
||||
{
|
||||
//fg
|
||||
$('#conf_cont').append(createRow('conf_cont_instCapt'))
|
||||
$('#conf_cont_instCapt').append(createOptPanel('fa-camera', $.i18n("edt_conf_instCapture_heading_title"), 'editor_container_instCapt', 'btn_submit_instCapt'));
|
||||
$('#conf_cont_instCapt').append(createHelpTable(schema.instCapture.properties, $.i18n("edt_conf_instCapture_heading_title")));
|
||||
|
||||
//fg
|
||||
$('#conf_cont').append(createRow('conf_cont_fg'))
|
||||
$('#conf_cont_fg').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_fg', 'btn_submit_fg'));
|
||||
$('#conf_cont_fg').append(createHelpTable(schema.framegrabber.properties, $.i18n("edt_conf_fg_heading_title")));
|
||||
|
||||
|
||||
//v4l
|
||||
$('#conf_cont').append(createRow('conf_cont_v4l'))
|
||||
$('#conf_cont_v4l').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_v4l2', 'btn_submit_v4l2'));
|
||||
@@ -26,10 +32,24 @@ $(document).ready( function() {
|
||||
else
|
||||
{
|
||||
$('#conf_cont').addClass('row');
|
||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_instCapture_heading_title"), 'editor_container_instCapt', 'btn_submit_instCapt'));
|
||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_fg_heading_title"), 'editor_container_fg', 'btn_submit_fg'));
|
||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_v4l2', 'btn_submit_v4l2'));
|
||||
$('#conf_cont').append(createOptPanel('fa-camera', $.i18n("edt_conf_v4l2_heading_title"), 'editor_container_v4l2', 'btn_submit_v4l2'));
|
||||
}
|
||||
|
||||
//instCapt
|
||||
conf_editor_instCapt = createJsonEditor('editor_container_instCapt', {
|
||||
instCapture: schema.instCapture
|
||||
}, true, true);
|
||||
|
||||
conf_editor_instCapt.on('change',function() {
|
||||
conf_editor_instCapt.validate().length ? $('#btn_submit_instCapt').attr('disabled', true) : $('#btn_submit_instCapt').attr('disabled', false);
|
||||
});
|
||||
|
||||
$('#btn_submit_instCapt').off().on('click',function() {
|
||||
requestWriteConfig(conf_editor_instCapt.getValue());
|
||||
});
|
||||
|
||||
|
||||
//fg
|
||||
conf_editor_fg = createJsonEditor('editor_container_fg', {
|
||||
framegrabber: schema.framegrabber
|
||||
@@ -38,11 +58,11 @@ $(document).ready( function() {
|
||||
conf_editor_fg.on('change',function() {
|
||||
conf_editor_fg.validate().length ? $('#btn_submit_fg').attr('disabled', true) : $('#btn_submit_fg').attr('disabled', false);
|
||||
});
|
||||
|
||||
|
||||
$('#btn_submit_fg').off().on('click',function() {
|
||||
requestWriteConfig(conf_editor_fg.getValue());
|
||||
});
|
||||
|
||||
|
||||
//vl4
|
||||
conf_editor_v4l2 = createJsonEditor('editor_container_v4l2', {
|
||||
grabberV4L2 : schema.grabberV4L2
|
||||
@@ -51,32 +71,31 @@ $(document).ready( function() {
|
||||
conf_editor_v4l2.on('change',function() {
|
||||
conf_editor_v4l2.validate().length ? $('#btn_submit_v4l2').attr('disabled', true) : $('#btn_submit_v4l2').attr('disabled', false);
|
||||
});
|
||||
|
||||
|
||||
$('#btn_submit_v4l2').off().on('click',function() {
|
||||
requestWriteConfig(conf_editor_v4l2.getValue());
|
||||
});
|
||||
|
||||
|
||||
//create introduction
|
||||
if(showOptHelp)
|
||||
{
|
||||
createHint("intro", $.i18n('conf_grabber_fg_intro'), "editor_container_fg");
|
||||
createHint("intro", $.i18n('conf_grabber_v4l_intro'), "editor_container_v4l2");
|
||||
}
|
||||
|
||||
|
||||
//hide specific options
|
||||
conf_editor_fg.on('ready',function() {
|
||||
var grabbers = serverInfo.grabbers.available;
|
||||
|
||||
if(grabbers.indexOf('dispmanx') > -1)
|
||||
hideEl(["device","verticalPixelDecimation","horizontalPixelDecimation","useXGetImage"]);
|
||||
hideEl(["device","pixelDecimation"]);
|
||||
else if(grabbers.indexOf('x11') > -1)
|
||||
hideEl(["device","width","height"]);
|
||||
else if(grabbers.indexOf('osx') > -1 )
|
||||
hideEl(["device","verticalPixelDecimation","horizontalPixelDecimation","useXGetImage"]);
|
||||
hideEl(["device","pixelDecimation"]);
|
||||
else if(grabbers.indexOf('amlogic') > -1)
|
||||
hideEl(["verticalPixelDecimation","horizontalPixelDecimation","useXGetImage"]);
|
||||
hideEl(["pixelDecimation"]);
|
||||
});
|
||||
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user