diff --git a/templates/2k11/admin/plugin_config_item.tpl b/templates/2k11/admin/plugin_config_item.tpl index 05fb3eb8..0812e5a3 100644 --- a/templates/2k11/admin/plugin_config_item.tpl +++ b/templates/2k11/admin/plugin_config_item.tpl @@ -62,11 +62,9 @@ {if $cdesc != ''}{$cdesc}{/if} - {* This should be input[type=file] … *} + {* This should be input[type=file] … *} {$CONST.MEDIA_LIBRARY} - -
{elseif $ctype == 'sequence'} {if !$sequencejs_output} diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index a513addc..f4d18ef7 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -758,6 +758,27 @@ function highlightComment(id, checkvalue) { } // Config option add media + var $hasChooseMedia = $('body').has('.media_choose'); + + if($hasChooseMedia.size() > 0) { + var $el = $('.media_choose'); + var $item = $el.find('> input'); + var configItem = $item.attr('data-configitem'); + var mWidth = $item.attr('data-pmwidth'); + var mHeight = $item.attr('data-pmheight'); + if($item.val() != '') { + var bgImg = 'url(' + $item.val() + ')'; + } else { + var bgImg = 'none'; + } + $('
').appendTo($el) + .css({ + backgroundImage: bgImg, + minWidth: mWidth, + minHeight: mHeight + }); + } + $('.change_preview').change(function(e) { change_preview($(this).attr('data-configitem')); }); diff --git a/templates/2k11/admin/style.css b/templates/2k11/admin/style.css index 5970373a..875f7692 100644 --- a/templates/2k11/admin/style.css +++ b/templates/2k11/admin/style.css @@ -1159,7 +1159,7 @@ main { width: 100%; } -.configuration_group .media_choose input { +.js .configuration_group .media_choose input { width: 90%; } @@ -1692,6 +1692,7 @@ form > .button_link:first-of-type { .no-js .invert_selection, .no-js .toggle_comment_full, .no-js #add_upload, +.no-js .choose_media, .no-js .media_show_info, .no-js .media_rename, .no-js .template_show_info, @@ -1868,7 +1869,7 @@ input[name="serendipity[filter][fileCategory]"] { max-width: 48%; } - .configuration_group .media_choose input { + .js .configuration_group .media_choose input { margin-right: 1%; max-width: 41.5%; } @@ -2052,7 +2053,7 @@ input[name="serendipity[filter][fileCategory]"] { /* LARGER SCREEN (e.g. laptops) ----------------------------------------------------------------- */ @media only screen and (min-width: 1280px) { - .configuration_group .media_choose input { + .js .configuration_group .media_choose input { max-width: 42.5%; }