Flash through red when sending an item to the trash, flash through green when undoing it, props caesarsgrunt, see #4529

git-svn-id: http://svn.automattic.com/wordpress/trunk@12289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-11-28 02:56:15 +00:00
parent 0c0bfbce3e
commit 00a9b90dc9
11 changed files with 19 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -188,7 +188,8 @@ strong .post-com-count span {
border-right-color: #99d;
}
#media-upload {
#media-upload,
#media-upload .media-item .slidetoggle {
background: #fff;
}

File diff suppressed because one or more lines are too long

View File

@ -188,7 +188,8 @@ strong .post-com-count span {
border-right-color: #99d;
}
#media-upload {
#media-upload,
#media-upload .media-item .slidetoggle {
background: #fff;
}

View File

@ -1164,7 +1164,7 @@ function get_media_item( $attachment_id, $args = null ) {
}
$display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
$display_title = $show_title ? "<div class='filename new'>" . wp_html_excerpt($display_title, 60) . "</div>" : '';
$display_title = $show_title ? "<div class='filename new'><span class='title'>" . wp_html_excerpt($display_title, 60) . "</span></div>" : '';
$gallery = ( (isset($_REQUEST['tab']) && 'gallery' == $_REQUEST['tab']) || (isset($redir_tab) && 'gallery' == $redir_tab) ) ? true : false;
$order = '';

View File

@ -2183,9 +2183,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
} elseif ( 'spam' == $the_comment_status ) {
$actions['unspam'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:ABF888:unspam=1 vim-z vim-destructive'>" . __( 'Not Spam' ) . '</a>';
$actions['unspam'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . __( 'Not Spam' ) . '</a>';
} elseif ( 'trash' == $the_comment_status ) {
$actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:ABF888:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
$actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
}
if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) {

View File

@ -71,7 +71,7 @@ setCommentsList = function() {
a.click(function(){
list.wpList.del(this);
$('#undo-' + id).fadeOut(300, function(){
$('#undo-' + id).css( {backgroundColor:'#6c6'} ).fadeOut(300, function(){
$(this).remove();
$('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show() });
});

File diff suppressed because one or more lines are too long

View File

@ -112,9 +112,10 @@ function prepareMediaItemInit(fileObj) {
jQuery('#attachments-count').text(jQuery('#attachments-count').text()-0+1);
jQuery('.filename .trashnotice', item).remove();
jQuery('.filename .title', item).css('font-weight','normal');
jQuery('a.undo', item).addClass('hidden');
jQuery('a.describe-toggle-on, .menu_order_input', item).show();
item.animate( {backgroundColor: '#fff'}, { queue: false, duration: 300, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('trash-undo');
item.css( {backgroundColor:'#3c3'} ).animate( {backgroundColor: '#fff'}, { queue: false, duration: 300, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('trash-undo');
}
});
return false;
@ -153,9 +154,10 @@ function deleteSuccess(data, textStatus) {
// Vanish it.
jQuery('.toggle', item).toggle();
jQuery('.slidetoggle', item).slideUp(200).siblings().removeClass('hidden');
item.css( {backgroundColor:'#fff'} ).animate( {backgroundColor:'#ffffe0'}, {queue:false, duration:500} ).addClass('trash-undo');
item.css( {backgroundColor:'#f33'} ).animate( {backgroundColor:'#fff'}, {queue:false, duration:500} ).addClass('trash-undo');
jQuery('.filename:empty', item).remove();
jQuery('.filename .title', item).css('font-weight','bold');
jQuery('.filename', item).append('<span class="trashnotice"> ' + swfuploadL10n.deleted + ' </span>').siblings('a.toggle').hide();
jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') );
jQuery('.menu_order_input', item).hide();

File diff suppressed because one or more lines are too long

View File

@ -193,7 +193,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201');
}
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091125');
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091127');
$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;
if ( empty($max_upload_size) )
$max_upload_size = __('not configured');
@ -263,7 +263,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery'), '20090514' );
$scripts->add_data( 'user-profile', 'group', 1 );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091126' );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091127' );
$scripts->add_data( 'admin-comments', 'group', 1 );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
@ -425,7 +425,7 @@ function wp_default_styles( &$styles ) {
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20091126';
$colors_version = '20091127';
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091126' );
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );