2017-02-08 14:36:28 +01:00
|
|
|
$(document).ready( function() {
|
|
|
|
var conf_editor = null;
|
|
|
|
performTranslation();
|
2017-01-17 21:53:35 +01:00
|
|
|
|
|
|
|
$('#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")));
|
|
|
|
}
|
|
|
|
|
2016-10-10 23:15:50 +02:00
|
|
|
conf_editor = createJsonEditor('editor_container', {
|
|
|
|
kodiVideoChecker: schema.kodiVideoChecker
|
2016-12-21 18:24:03 +01:00
|
|
|
}, true, true);
|
2016-10-09 10:23:04 +02:00
|
|
|
|
2017-01-17 21:53:35 +01:00
|
|
|
conf_editor.on('change',function() {
|
|
|
|
conf_editor.validate().length ? $('#btn_submit').attr('disabled', true) : $('#btn_submit').attr('disabled', false);
|
|
|
|
});
|
|
|
|
|
2016-10-10 23:15:50 +02:00
|
|
|
$('#btn_submit').off().on('click',function() {
|
|
|
|
requestWriteConfig(conf_editor.getValue());
|
|
|
|
});
|
2016-12-21 18:24:03 +01:00
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//create introduction
|
|
|
|
if(showOptHelp)
|
|
|
|
createHint("intro", $.i18n('conf_kodi_intro'), "editor_container");
|
|
|
|
|
|
|
|
removeOverlay();
|
2016-10-09 10:23:04 +02:00
|
|
|
});
|
|
|
|
|