Stop the fade-out of the Undo notices on Edit Comments screen, props caesarsgrunt, fixes #11259, see #4529

git-svn-id: http://svn.automattic.com/wordpress/trunk@12278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-11-26 04:37:39 +00:00
parent 9d68962762
commit fc341ce3ab
11 changed files with 33 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@ -634,8 +634,8 @@ tr.inactive + tr.plugin-update-tr .plugin-update {
color: #d98500;
}
table.widefat .delete a,
table.widefat .trash a,
table.widefat span.delete a,
table.widefat span.trash a,
#dashboard_recent_comments .delete a,
#dashboard_recent_comments .trash a {
color: #bc0b0b;
@ -1685,10 +1685,6 @@ div.widgets-sortables,
opacity: 0.4;
}
.trash-undo {
background-color: #ebffe0;
}
#dashboard_recent_comments .trash-undo {
border-top-color: #dfdfdf;
}

File diff suppressed because one or more lines are too long

View File

@ -629,8 +629,8 @@ tr.inactive + tr.plugin-update-tr .plugin-update {
color: #d98500;
}
table.widefat .delete a,
table.widefat .trash a,
table.widefat span.delete a,
table.widefat span.trash a,
#dashboard_recent_comments .delete a,
#dashboard_recent_comments .trash a {
color: #bc0b0b;
@ -1674,10 +1674,6 @@ div.widgets-sortables,
opacity: 0.4;
}
.trash-undo {
background-color: #ebffe0;
}
#dashboard_recent_comments .trash-undo {
border-top-color: #dfdfdf;
}

View File

@ -32,7 +32,7 @@ setCommentsList = function() {
// Send current total, page, per_page and url
delBefore = function( settings, list ) {
var cl = $(settings.target).attr('className'), id, el, n, h, a, to, author;
var cl = $(settings.target).attr('className'), id, el, n, h, a, author;
settings.data._total = totalInput.val() || 0;
settings.data._per_page = perPageInput.val() || 0;
@ -49,19 +49,20 @@ setCommentsList = function() {
if ( el.is('tr') ) {
n = el.children(':visible').length;
author = $('.author strong', el).html();
h = $('<tr id="trashundo-' + id + '" style="display:none;"><td class="trash-undo" colspan="' + n + '">' + note + '</td></tr>');
author = $('.author strong', el).text();
h = $('<tr id="trashundo-' + id + '" class="trash-undo" style="display:none;"><td colspan="' + n + '">' + note + '</td></tr>');
} else {
author = $('.comment-author', el).html();
author = $('.comment-author', el).text();
h = $('<div id="trashundo-' + id + '" style="display:none;" class="trash-undo">' + note + '</div>');
}
el.before(h);
$('strong', '#trashundo-' + id).html(author + ' ');
$('strong', '#trashundo-' + id).text(author + ' ');
a = $('a.undo-trash', '#trashundo-' + id);
a.attr('href', 'comment.php?action=untrashcomment&c=' + id + '&_ajax_nonce=' + settings.data._ajax_nonce);
a.attr('className', 'delete:the-comment-list:comment-' + id + '::untrash=1 vim-z vim-destructive');
$('.avatar', el).clone().prependTo('#trashundo-' + id + ' .trash-undo-inside');
a.click(function(){
list.wpList.del(this);
@ -71,13 +72,6 @@ setCommentsList = function() {
});
return false;
});
if ( to )
window.clearTimeout(to);
to = window.setTimeout( function(){
$('#trashundo-' + id).fadeOut('slow', function(){ $(this).remove(); });
}, 7000 );
}
return settings;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3520,11 +3520,20 @@ span.imgedit-scale-warn {
border-top-style: solid;
border-top-width: 1px;
margin: 0 -10px;
padding: 3px;
padding: 3px 8px;
font-size: 11px;
}
.trash-undo-inside {
margin: 3px 8px;
margin: 1px 8px 1px 0;
line-height: 16px;
}
.trash-undo-inside .avatar {
height: 20px;
width: 20px;
margin-right: 8px;
vertical-align: middle;
}
/* tag hints */

View File

@ -114,7 +114,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('.filename .trashnotice', item).remove();
jQuery('a.undo', item).addClass('hidden');
jQuery('a.describe-toggle-on, .menu_order_input', item).show();
item.animate( {backgroundColor: '#fff'}, { queue: false, duration: 200, complete: function(){ jQuery(this).css({backgroundColor:''}); } });
item.animate( {backgroundColor: '#fff'}, { queue: false, duration: 300, complete: function(){ jQuery(this).css({backgroundColor:''}); } }).removeClass('trash-undo');
}
});
return false;
@ -153,13 +153,13 @@ function deleteSuccess(data, textStatus) {
// Vanish it.
jQuery('.toggle', item).toggle();
jQuery('.slidetoggle', item).slideUp(200).siblings().removeClass('hidden');
item.css( {backgroundColor:'#fff'} ).animate( {backgroundColor:'#ffc0c0'}, {queue:false, duration:500} );
item.css( {backgroundColor:'#fff'} ).animate( {backgroundColor:'#ffffe0'}, {queue:false, duration:500} ).addClass('trash-undo');
jQuery('.filename:empty', item).remove();
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();
return;
}

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-20091115');
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20091125');
$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'), '20091112' );
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091125' );
$scripts->add_data( 'admin-comments', 'group', 1 );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
@ -425,9 +425,9 @@ 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 = '20091119';
$colors_version = '20091125';
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091026' );
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091125' );
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090922' );