Include image_selector.js in serendipity_editor.js.tpl.
This commit is contained in:
parent
1a3f4d37be
commit
5058866698
@ -72,7 +72,6 @@
|
||||
<div class="clearfix">
|
||||
{if !$mediajs_output}
|
||||
<script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script>
|
||||
<script src="{serendipity_getFile file='admin/image_selector.js'}"></script>
|
||||
{/if}
|
||||
<label for="serendipity[{$postKey}][{$config_item}]">{$cname}
|
||||
{if $cdesc != ''}<span>{$cdesc}</span>{/if}
|
||||
|
@ -1,18 +0,0 @@
|
||||
// File referenced in:
|
||||
// – include/admin/tpl/out_stack_loop.tpl
|
||||
|
||||
// Switches preview of image selected from media db by changing the
|
||||
// container's background image
|
||||
function change_preview(id) {
|
||||
var text_box = document.getElementById('serendipity[template][' + id + ']');
|
||||
var image_box = document.getElementById(id + '_preview');
|
||||
var filename = text_box.value;
|
||||
|
||||
image_box.style.backgroundImage = 'url(' + filename + ')';
|
||||
image_box.style.backgroundRepeat = 'no-repeat';
|
||||
}
|
||||
|
||||
// Opens media db image selection in new window
|
||||
function choose_media(id) {
|
||||
window.open('serendipity_admin_image_selector.php?serendipity[htmltarget]=' + id + '&serendipity[filename_only]=true', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
|
||||
}
|
@ -119,6 +119,22 @@ function wrapInsImage(txtarea) {
|
||||
}
|
||||
/* end Better-Editor functions */
|
||||
|
||||
// Switches preview of image selected from media db by changing the
|
||||
// container's background image
|
||||
function change_preview(id) {
|
||||
var text_box = document.getElementById('serendipity[template][' + id + ']');
|
||||
var image_box = document.getElementById(id + '_preview');
|
||||
var filename = text_box.value;
|
||||
|
||||
image_box.style.backgroundImage = 'url(' + filename + ')';
|
||||
image_box.style.backgroundRepeat = 'no-repeat';
|
||||
}
|
||||
|
||||
// Opens media db image selection in new window
|
||||
function choose_media(id) {
|
||||
window.open('serendipity_admin_image_selector.php?serendipity[htmltarget]=' + id + '&serendipity[filename_only]=true', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1');
|
||||
}
|
||||
|
||||
// "Transfer" value from media db popup to form element, used for example for selecting a category-icon
|
||||
function serendipity_imageSelector_addToElement (str, id) {
|
||||
var $input = jQuery('#'+id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user