Fix resetting of page number when entering it manually, fixes #18002 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@18436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-07-11 21:53:29 +00:00
parent 6fba9adeaf
commit b87d9d50d6
3 changed files with 7 additions and 7 deletions

View File

@ -229,7 +229,7 @@ screenMeta = {
$(document).ready( function() {
var lastClicked = false, checks, first, last, checked, dropdown,
pageInput = $('input[name="paged"]'), currentPage;
pageInput = $('input.current-page'), currentPage = pageInput.val();
// Move .updated and .error alert boxes. Don't move boxes designed to be inline.
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
@ -346,10 +346,10 @@ $(document).ready( function() {
});
if ( pageInput.length ) {
currentPage = pageInput.val();
pageInput.closest('form').submit( function(){
// Reset paging var for new filters/searches. See #17685.
if ( pageInput.val() == currentPage )
pageInput.closest('form').submit( function(e){
// Reset paging var for new filters/searches but not for bulk actions. See #17685.
if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage )
pageInput.val('1');
});
}

File diff suppressed because one or more lines are too long

View File

@ -64,7 +64,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110610' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110711' );
$scripts->add_data( 'common', 'group', 1 );
$scripts->localize( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),