[wp-trac] [WordPress Trac] #15580: Fixes to Ajaxify Admin before 3.1

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 1 05:45:21 UTC 2010


#15580: Fixes to Ajaxify Admin before 3.1
-----------------------------+----------------------------------------------
 Reporter:  jane             |       Owner:  scribu              
     Type:  defect (bug)     |      Status:  assigned            
 Priority:  highest omg bbq  |   Milestone:  3.1                 
Component:  Administration   |     Version:  3.1                 
 Severity:  blocker          |    Keywords:  needs-patch needs-ui
-----------------------------+----------------------------------------------

Comment(by batmoo):

 If I enter non-digits (e.g. 'abc') into the page number input and search,
 it returns an NaN. We can either have the parseInt call (in the keypress
 function for .current-page)  fallback to 1

 {{{
 var page = parseInt( $el.val() ) || 1;
 change_page( page, $el );
 }}}

 or alert the user and ask them to enter a valid number.

 Similarly, if a user enters a page number higher than the total pages or
 below 1, we should either handle it gracefully (entering 11 with 9 total
 pages sends you to page 9; entering -1 sends you to page 1) or alert them.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15580#comment:45>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list