mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
8d7137136b
* update * update * tabs test * update * test * ... * fix editor * update ui * fix visual glitch if help is off * fix fadecandy error and th [skip ci]
31 lines
853 B
JavaScript
31 lines
853 B
JavaScript
|
|
var conf_editor = null;
|
|
$(hyperion).one("cmd-config-getschema", function(event) {
|
|
schema = parsedConfSchemaJSON.properties;
|
|
|
|
$('#conf_cont').append(createOptPanel('fa-wrench', $.i18n("edt_conf_webc_heading_title"), 'editor_container', 'btn_submit'));
|
|
if(showOptHelp)
|
|
{
|
|
$('#conf_cont').append(createHelpTable(schema.webConfig.properties, $.i18n("edt_conf_webc_heading_title")));
|
|
}
|
|
|
|
conf_editor = createJsonEditor('editor_container', {
|
|
webConfig : schema.webConfig
|
|
}, 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();
|
|
});
|
|
|