2017-02-08 14:36:28 +01:00
|
|
|
$(document).ready( function() {
|
|
|
|
performTranslation();
|
|
|
|
var editor_color = null;
|
|
|
|
var editor_smoothing = null;
|
|
|
|
var editor_blackborder = null;
|
2017-01-17 21:53:35 +01:00
|
|
|
|
2019-06-05 18:19:08 +02:00
|
|
|
if(window.showOptHelp)
|
2017-01-17 21:53:35 +01:00
|
|
|
{
|
|
|
|
//color
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont').append(createRow('conf_cont_color'));
|
2017-01-17 21:53:35 +01:00
|
|
|
$('#conf_cont_color').append(createOptPanel('fa-photo', $.i18n("edt_conf_color_heading_title"), 'editor_container_color', 'btn_submit_color'));
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont_color').append(createHelpTable(window.schema.color.properties, $.i18n("edt_conf_color_heading_title")));
|
2017-01-17 21:53:35 +01:00
|
|
|
|
|
|
|
//smoothing
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont').append(createRow('conf_cont_smoothing'));
|
2017-01-17 21:53:35 +01:00
|
|
|
$('#conf_cont_smoothing').append(createOptPanel('fa-photo', $.i18n("edt_conf_smooth_heading_title"), 'editor_container_smoothing', 'btn_submit_smoothing'));
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont_smoothing').append(createHelpTable(window.schema.smoothing.properties, $.i18n("edt_conf_smooth_heading_title")));
|
2017-01-17 21:53:35 +01:00
|
|
|
|
|
|
|
//blackborder
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont').append(createRow('conf_cont_blackborder'));
|
2017-01-17 21:53:35 +01:00
|
|
|
$('#conf_cont_blackborder').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
|
2019-06-05 18:19:08 +02:00
|
|
|
$('#conf_cont_blackborder').append(createHelpTable(window.schema.blackborderdetector.properties, $.i18n("edt_conf_bb_heading_title")));
|
2017-01-17 21:53:35 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#conf_cont').addClass('row');
|
|
|
|
$('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_color_heading_title"), 'editor_container_color', 'btn_submit_color'));
|
|
|
|
$('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_smooth_heading_title"), 'editor_container_smoothing', 'btn_submit_smoothing'));
|
|
|
|
$('#conf_cont').append(createOptPanel('fa-photo', $.i18n("edt_conf_bb_heading_title"), 'editor_container_blackborder', 'btn_submit_blackborder'));
|
|
|
|
}
|
|
|
|
|
|
|
|
//color
|
|
|
|
editor_color = createJsonEditor('editor_container_color', {
|
2019-06-05 18:19:08 +02:00
|
|
|
color : window.schema.color
|
2017-01-17 21:53:35 +01:00
|
|
|
}, true, true);
|
|
|
|
|
|
|
|
editor_color.on('change',function() {
|
|
|
|
editor_color.validate().length ? $('#btn_submit_color').attr('disabled', true) : $('#btn_submit_color').attr('disabled', false);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#btn_submit_color').off().on('click',function() {
|
|
|
|
requestWriteConfig(editor_color.getValue());
|
|
|
|
});
|
|
|
|
|
|
|
|
//smoothing
|
|
|
|
editor_smoothing = createJsonEditor('editor_container_smoothing', {
|
2019-06-05 18:19:08 +02:00
|
|
|
smoothing : window.schema.smoothing
|
2017-01-17 21:53:35 +01:00
|
|
|
}, true, true);
|
|
|
|
|
|
|
|
editor_smoothing.on('change',function() {
|
|
|
|
editor_smoothing.validate().length ? $('#btn_submit_smoothing').attr('disabled', true) : $('#btn_submit_smoothing').attr('disabled', false);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#btn_submit_smoothing').off().on('click',function() {
|
|
|
|
requestWriteConfig(editor_smoothing.getValue());
|
|
|
|
});
|
|
|
|
|
|
|
|
//blackborder
|
|
|
|
editor_blackborder = createJsonEditor('editor_container_blackborder', {
|
2019-06-05 18:19:08 +02:00
|
|
|
blackborderdetector: window.schema.blackborderdetector
|
2017-01-17 21:53:35 +01:00
|
|
|
}, true, true);
|
|
|
|
|
|
|
|
editor_blackborder.on('change',function() {
|
|
|
|
editor_blackborder.validate().length ? $('#btn_submit_blackborder').attr('disabled', true) : $('#btn_submit_blackborder').attr('disabled', false);
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#btn_submit_blackborder').off().on('click',function() {
|
|
|
|
requestWriteConfig(editor_blackborder.getValue());
|
2016-10-10 23:15:50 +02:00
|
|
|
});
|
2017-02-08 14:36:28 +01:00
|
|
|
|
2017-04-07 21:33:40 +02:00
|
|
|
//wiki links
|
|
|
|
$('#editor_container_blackborder').append(buildWL("user/moretopics/bbmode","edt_conf_bb_mode_title",true));
|
|
|
|
|
2017-02-08 14:36:28 +01:00
|
|
|
//create introduction
|
2019-06-05 18:19:08 +02:00
|
|
|
if(window.showOptHelp)
|
2017-02-08 14:36:28 +01:00
|
|
|
{
|
|
|
|
createHint("intro", $.i18n('conf_colors_color_intro'), "editor_container_color");
|
|
|
|
createHint("intro", $.i18n('conf_colors_smoothing_intro'), "editor_container_smoothing");
|
|
|
|
createHint("intro", $.i18n('conf_colors_blackborder_intro'), "editor_container_blackborder");
|
|
|
|
}
|
|
|
|
|
|
|
|
removeOverlay();
|
2016-10-09 10:23:04 +02:00
|
|
|
});
|