From 277b464054b24f8d680ddbe762c9e438f6679592 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 3 Sep 2009 19:42:50 +0000 Subject: Created autofocus method to give focus to an element (primarily a form control) on page onload. Updated some of the pages to use autofocus. --- actions/noticesearch.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actions/noticesearch.php') diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 1188e7e10..1cd987df3 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -137,6 +137,12 @@ class NoticesearchAction extends SearchAction $this->pagination($page > 1, $cnt > NOTICES_PER_PAGE, $page, 'noticesearch', array('q' => $q)); } + + function showScripts() + { + parent::showScripts(); + $this->autofocus('q'); + } } class SearchNoticeList extends NoticeList { -- cgit v1.2.3-54-g00ecf