Use correct media db overlay for theme options.

References #110
This commit is contained in:
Matthias Mees 2014-04-28 15:56:29 +02:00
parent 9c061a77ae
commit 7b5ef26e7e
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,8 @@
<input id="serendipity[{$postKey}][{$config_item}]" class="change_preview" name="serendipity[{$postKey}][{$config_item}]" type="text" data-configitem="{$config_item}" data-pmwidth="{$preview_width}" data-pmheight="{$preview_height}" value="{$value}">{* This should maybe be input[type=file] *} <input id="serendipity[{$postKey}][{$config_item}]" class="change_preview" name="serendipity[{$postKey}][{$config_item}]" type="text" data-configitem="{$config_item}" data-pmwidth="{$preview_width}" data-pmheight="{$preview_height}" value="{$value}">{* This should maybe be input[type=file] *}
<a class="button_link choose_media" href="#serendipity[{$postKey}][{$config_item}]" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture"></span><span class="visuallyhidden"> {$CONST.MEDIA_LIBRARY}</span></a> <button class="icon_link choose_media" type="button" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture"></span><span class="visuallyhidden">{$CONST.MEDIA_LIBRARY}</span></a>
{if $cdesc != ''}<span id="{$postKey}_{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} {if $cdesc != ''}<span id="{$postKey}_{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if}
</div> </div>
{elseif $ctype == 'sequence'} {elseif $ctype == 'sequence'}

View File

@ -1104,10 +1104,9 @@ $(function() {
serendipity.change_preview($(this).attr('data-configitem')); serendipity.change_preview($(this).attr('data-configitem'));
}); });
$('.choose_media').click(function(e) { $('.choose_media').click(function() {
var configitem = $(this).parent().find('.change_preview').attr('id'); var configitem = $(this).parent().find('.change_preview').attr('id');
serendipity.choose_media(configitem); serendipity.choose_media(configitem);
e.preventDefault();
}); });
$('.customfieldMedia').click(function() { $('.customfieldMedia').click(function() {