pretty delete animation, fix squashed icons and use 80x60 thumbs, add rel attrs to attachment links inserted from uploader. Props andy. see #5911

git-svn-id: https://develop.svn.wordpress.org/trunk@7466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-21 23:21:27 +00:00
parent db66d57993
commit e2145503bf
5 changed files with 18 additions and 12 deletions
+6 -3
View File
@@ -91,13 +91,16 @@ function deleteSuccess(data, textStatus) {
jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
}
// Vanish it.
jQuery('#media-item-' + this.id + ' .filename:empty').remove();
jQuery('#media-item-' + this.id + ' .filename').append(' <span class="file-error">'+swfuploadL10n.deleted+'</span>').siblings('a.toggle').remove();
jQuery('#media-item-' + this.id + ' .describe').slideUp(500, function(){jQuery(this).parents('.media-item').slideUp(1500,function(){jQuery(this).remove();updateMediaForm();})}).end.remove();
jQuery('#media-item-' + this.id).children('.describe').css({backgroundColor:'#fff'}).end()
.animate({backgroundColor:'#ffc0c0'}, {queue:false,duration:50})
.animate({minHeight:0,height:36,}, 400, null, function(){jQuery(this).children('.describe').remove()})
.animate({backgroundColor:'#fff'}, 400)
.animate({height:0}, 800, null, function(){jQuery(this).remove();updateMediaForm();});
return;
// Vanish it.
item.slideToggle(300,function(){jQuery(this).remove();if(jQuery('.media-item').length==0)jQuery('.insert-gallery').hide();updateMediaForm();});
}
function deleteError(X, textStatus, errorThrown) {
+2 -2
View File
@@ -91,12 +91,12 @@ function image_downsize($id, $size = 'medium') {
}
// return an <img src /> tag for the given image attachment, scaling it down if requested
function get_image_tag($id, $alt, $title, $align, $rel = false, $size='medium') {
function get_image_tag($id, $alt, $title, $align, $size='medium') {
list( $img_src, $width, $height ) = image_downsize($id, $size);
$hwstring = image_hwstring($width, $height);
$html = '<img src="'.attribute_escape($img_src).'" alt="'.attribute_escape($alt).'" title="'.attribute_escape($title).'" '.$hwstring.'class="align'.attribute_escape($align).' size-'.attribute_escape($size).' attachment wp-att-'.attribute_escape($id).'" />';
$html = '<img src="'.attribute_escape($img_src).'" alt="'.attribute_escape($alt).'" title="'.attribute_escape($title).'" '.$hwstring.'class="align'.attribute_escape($align).' size-'.attribute_escape($size).' wp-image-'.$id.'" />';
$html = apply_filters( 'image_send_to_editor', $html, $id, $alt, $title, $align, $url );