@@ -, +, @@ header form field - On pages where focus is not being directed to a form field within the main content of the page, the form field in the active search header tab should have focus on page load: - Patron details - System preferences - Cities and towns Also test pages where a tab other than the first one is preselected: - Bibliographic details page - Patron lists On these pages, focus should move to the active tab's form field when you switch tabs. - On pages where focus is being sent to another form field, it should work correctly: - Patrons home page - Check in - Acquisitions home page --- .../intranet-tmpl/prog/en/includes/patron-search-box.inc | 4 ++-- .../prog/en/includes/patron-search-header.inc | 2 +- .../intranet-tmpl/prog/en/modules/admin/admin-home.tt | 8 -------- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 9 ++++++++- 4 files changed, 11 insertions(+), 12 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc @@ -4,7 +4,7 @@ [% IF ( PatronAutoComplete ) %]
- + [% IF ( stickyduedate ) %] @@ -12,7 +12,7 @@ [% END %]
[% ELSE %] - + [% IF ( stickyduedate ) %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -11,7 +11,7 @@
- + [-] [+] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -275,12 +275,4 @@
-[% MACRO jsinclude BLOCK %] - -[% END %] - [% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -49,7 +49,14 @@ $.fn.selectTabByID = function (tabID) { }; $(document).ready(function() { - $('#header_search').tabs().on( "tabsactivate", function() { $(this).find("div:visible").find('input').eq(0).focus(); }); + $('#header_search').tabs({ + create: function( e, ui ){ + ui.panel.find("input:text:first").focus(); + }, + activate: function ( e, ui ) { + ui.newPanel.find("input:text:first").focus(); + } + }); $(".close").click(function(){ window.close(); }); --