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:
parent
6fba9adeaf
commit
b87d9d50d6
|
@ -229,7 +229,7 @@ screenMeta = {
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
var lastClicked = false, checks, first, last, checked, dropdown,
|
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.
|
// 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');
|
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
|
||||||
|
@ -346,10 +346,10 @@ $(document).ready( function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( pageInput.length ) {
|
if ( pageInput.length ) {
|
||||||
currentPage = pageInput.val();
|
pageInput.closest('form').submit( function(e){
|
||||||
pageInput.closest('form').submit( function(){
|
|
||||||
// Reset paging var for new filters/searches. See #17685.
|
// Reset paging var for new filters/searches but not for bulk actions. See #17685.
|
||||||
if ( pageInput.val() == currentPage )
|
if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 && pageInput.val() == currentPage )
|
||||||
pageInput.val('1');
|
pageInput.val('1');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -64,7 +64,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
|
|
||||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
|
$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->add_data( 'common', 'group', 1 );
|
||||||
$scripts->localize( 'common', 'commonL10n', array(
|
$scripts->localize( 'common', 'commonL10n', array(
|
||||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
||||||
|
|
Loading…
Reference in New Issue