quick-reply.js: make display of embed and remote upload fields optional
This commit is contained in:
parent
0894a65f88
commit
f50eb94929
|
@ -216,13 +216,16 @@
|
||||||
if ($td.find('input[name="file_url"]').length) {
|
if ($td.find('input[name="file_url"]').length) {
|
||||||
$file_url = $td.find('input[name="file_url"]');
|
$file_url = $td.find('input[name="file_url"]');
|
||||||
|
|
||||||
|
if (settings.get('show_remote', false)) {
|
||||||
// Make a new row for it
|
// Make a new row for it
|
||||||
var $newRow = $('<tr><td colspan="2"></td></tr>');
|
var $newRow = $('<tr><td colspan="2"></td></tr>');
|
||||||
|
|
||||||
$file_url.clone().attr('placeholder', _('Upload URL')).appendTo($newRow.find('td'));
|
$file_url.clone().attr('placeholder', _('Upload URL')).appendTo($newRow.find('td'));
|
||||||
$file_url.parent().remove();
|
|
||||||
|
|
||||||
$newRow.insertBefore(this);
|
$newRow.insertBefore(this);
|
||||||
|
}
|
||||||
|
$file_url.parent().remove();
|
||||||
|
|
||||||
|
|
||||||
$td.find('label').remove();
|
$td.find('label').remove();
|
||||||
$td.contents().filter(function() {
|
$td.contents().filter(function() {
|
||||||
|
@ -236,6 +239,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable embedding if configured so
|
||||||
|
if (!settings.get('show_embed', false) && $td.find('input[name="embed"]').length) {
|
||||||
|
$(this).remove();
|
||||||
|
}
|
||||||
|
|
||||||
// Remove oekaki if existent
|
// Remove oekaki if existent
|
||||||
if ($(this).is('#oekaki')) {
|
if ($(this).is('#oekaki')) {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
|
|
|
@ -30,7 +30,11 @@ tb_settings['quick-reply'] = {
|
||||||
// Hide form when scrolled to top of page (where original form is visible)
|
// Hide form when scrolled to top of page (where original form is visible)
|
||||||
hide_at_top: true,
|
hide_at_top: true,
|
||||||
// "Quick reply" button floating at the top right hand corner of the page at all times
|
// "Quick reply" button floating at the top right hand corner of the page at all times
|
||||||
floating_link: true
|
floating_link: true,
|
||||||
|
// Show remote in quick reply
|
||||||
|
show_remote: false,
|
||||||
|
// Show embedding in quick reply
|
||||||
|
show_embed: false
|
||||||
};
|
};
|
||||||
|
|
||||||
// ajax.js
|
// ajax.js
|
||||||
|
|
Loading…
Reference in New Issue
Block a user