Archived
1
0

fix ML-Image insert in template options

This commit is contained in:
onli
2013-06-18 22:05:36 +02:00
parent f32de44b19
commit a52e05598b

View File

@@ -175,9 +175,11 @@ function choose_media(id) {
// "Transfer" value from media db popup to form element, used for example for selecting a category-icon
function serendipity_imageSelector_addToElement (str, id) {
id = id.replace(/\[/g, "\\["); // jQuery fails to select the input when the selector contains unescaped [ or ]
id = id.replace(/\]/g, "\\]");
var $input = $('#'+id);
$input.val(str);
if ($input.attr('type') != 'hidden') {
$input.focus(); // IE would generate an error when focusing an hidden element
}