From 9c30a2ebe2dd8dd278721f2590716ee10676480e Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Tue, 23 Jun 2015 16:24:17 -0600 Subject: [PATCH] Bug 11559: (followup) Fix keyboard control bugs, make labels clickable This fixes the following issues: * Labels of search server checkboxes cannot be clicked * Quick search fields cannot be focused * Search results cannot be scrolled with a keyboard Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- .../prog/en/includes/cateditor-ui.inc | 17 +++++++++-------- .../prog/en/modules/cataloguing/editor.tt | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 89a11ec0b0..f6975ba0c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -105,25 +105,25 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr } ); shortcut.add( 'alt+ctrl+k', function(event) { - if ( Search.IsAvailable() ) $( '#search-by-keywords' ).focus(); + $( '#search-by-keywords' ).focus(); return false; } ); shortcut.add( 'alt+ctrl+a', function(event) { - if ( Search.IsAvailable() ) $( '#search-by-author' ).focus(); + $( '#search-by-author' ).focus(); return false; } ); shortcut.add( 'alt+ctrl+i', function(event) { - if ( Search.IsAvailable() ) $( '#search-by-isbn' ).focus(); + $( '#search-by-isbn' ).focus(); return false; } ); shortcut.add( 'alt+ctrl+t', function(event) { - if ( Search.IsAvailable() ) $( '#search-by-title' ).focus(); + $( '#search-by-title' ).focus(); return false; } ); @@ -351,7 +351,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr function showAdvancedSearch() { $('#advanced-search-servers').empty(); $.each( z3950Servers, function( server_id, server ) { - $('#advanced-search-servers').append( '
  • ' : '>' ) + server.name + '
  • ' ); + $('#advanced-search-servers').append( '
  • ' ); } ); $('#advanced-search-ui').modal('show'); } @@ -413,7 +413,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr num_fetched += '+'; } - $('#search-serversinfo').append( '
  • ' : '>' ) + server.name + ' (' + num_fetched + ')' + '
  • ' ); + $('#search-serversinfo').append( '
  • ' ); } ); var seenColumns = {}; @@ -527,6 +527,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr } else { $overlay.find('.bar').css( { display: 'block', width: '100%' } ); $overlay.fadeOut(); + $('#searchresults')[0].focus(); } } @@ -607,7 +608,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr break; case 'selected_search_targets': $( document ).on( 'change', 'input.search-toggle-server', function() { - var server_id = $( this ).parent().data('server-id'); + var server_id = $( this ).closest('li').data('server-id'); Preferences.user.selected_search_targets[server_id] = this.checked; Preferences.Save( [% USER_INFO.0.borrowernumber %] ); } ); @@ -974,7 +975,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr }); $( document ).on( 'change', 'input.search-toggle-server', function() { - var server = z3950Servers[ $( this ).parent().data('server-id') ]; + var server = z3950Servers[ $( this ).closest('li').data('server-id') ]; server.checked = this.checked; if ( $('#search-results-ui').is( ':visible' ) ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt index 0991dde0e3..4e2bbdf7fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt @@ -184,7 +184,8 @@
    -
    + +
    -- 2.39.5