hyperion.ng/assets/webconfig/js/content_kodi.js
brindosch 8d7137136b priorities rework, webc update (#366)
* update

* update

* tabs test

* update

* test

* ...

* fix editor

* update ui

* fix visual glitch if help is off

* fix fadecandy error and th

[skip ci]
2017-01-17 21:53:35 +01:00

32 lines
869 B
JavaScript

var conf_editor = null;
$(hyperion).one("cmd-config-getschema", function(event) {
schema = parsedConfSchemaJSON.properties;
$('#conf_cont').append(createOptPanel('fa-play-circle-o', $.i18n("conf_kodi_label_title"), 'editor_container', 'btn_submit'));
if(showOptHelp)
{
$('#conf_cont').append(createHelpTable(schema.kodiVideoChecker.properties, $.i18n("conf_kodi_label_title")));
}
conf_editor = createJsonEditor('editor_container', {
kodiVideoChecker: schema.kodiVideoChecker
}, true, true);
conf_editor.on('change',function() {
conf_editor.validate().length ? $('#btn_submit').attr('disabled', true) : $('#btn_submit').attr('disabled', false);
});
$('#btn_submit').off().on('click',function() {
requestWriteConfig(conf_editor.getValue());
});
});
$(document).ready( function() {
performTranslation();
requestServerConfigSchema();
});