From: Janusz Dobrowolski Date: Tue, 4 Nov 2008 15:31:31 +0000 (+0000) Subject: Fixed missing focus on first/last page. X-Git-Tag: v2.4.2~19^2~1801 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=44d00255d78bd56e9071e1fce0f0f9713cd3c7b8;p=fa-stable.git Fixed missing focus on first/last page. --- diff --git a/includes/db_pager.inc b/includes/db_pager.inc index ce739535..f00cc906 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -300,6 +300,12 @@ class db_pager { $sort = find_submit($this->name.'_sort_', false); if ($page) { $this->change_page($page); + if ($page == 'next' && !$this->next_page || + $page == 'last' && !$this->last_page) + set_focus($this->name.'_page_prev'); + if ($page == 'prev' && !$this->prev_page || + $page == 'first' && !$this->first_page) + set_focus($this->name.'_page_next'); } elseif ($sort) { $this->sort_table($sort); } else