db981a3b27
* This moves our "development" versions from .dev.js to .js (same for css). * The compressed version then moves from .js to .min.js (same for css). By switching to the standard .min convention, it sets expectations for developers, and works nicely with existing tools such as ack. fixes #21633. git-svn-id: https://develop.svn.wordpress.org/trunk@21592 602fd350-edb4-49c9-b593-d223f7449a82
26 lines
748 B
JavaScript
26 lines
748 B
JavaScript
jQuery(function($){
|
|
$( 'body' ).bind( 'click.wp-gallery', function(e){
|
|
var target = $( e.target ), id, img_size;
|
|
|
|
if ( target.hasClass( 'wp-set-header' ) ) {
|
|
( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' );
|
|
e.preventDefault();
|
|
} else if ( target.hasClass( 'wp-set-background' ) ) {
|
|
id = target.data( 'attachment-id' );
|
|
img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
|
|
|
|
jQuery.post(ajaxurl, {
|
|
action: 'set-background-image',
|
|
attachment_id: id,
|
|
size: img_size
|
|
}, function(){
|
|
var win = window.dialogArguments || opener || parent || top;
|
|
win.tb_remove();
|
|
win.location.reload();
|
|
});
|
|
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
});
|