Lines 3-16
if ( KOHA === undefined ) var KOHA = {};
Link Here
|
3 |
|
3 |
|
4 |
function _(s) { return s; } // dummy function for gettext |
4 |
function _(s) { return s; } // dummy function for gettext |
5 |
|
5 |
|
|
|
6 |
// http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804 |
7 |
$.fn.tabIndex = function () { |
8 |
return $(this).parent().find(this).index() - 1; |
9 |
}; |
10 |
$.fn.selectTabByID = function (tabID) { |
11 |
$(this).tabs("option", "active", $(tabID).tabIndex()); |
12 |
}; |
13 |
|
6 |
$(document).ready(function() { |
14 |
$(document).ready(function() { |
7 |
$('#header_search').tabs().on( "tabsactivate", function(e, ui) { $(this).find("div:visible").find('input').eq(0).focus(); }); |
15 |
$('#header_search').tabs().on( "tabsactivate", function(e, ui) { $(this).find("div:visible").find('input').eq(0).focus(); }); |
8 |
|
16 |
|
9 |
$(".close").click(function(){ window.close(); }); |
17 |
$(".close").click(function(){ window.close(); }); |
10 |
|
18 |
|
11 |
if($("#header_search #checkin_search").length > 0){ shortcut.add('Alt+r',function (){ $("#header_search").tabs("select","#checkin_search"); $("#ret_barcode").focus(); }); } else { shortcut.add('Alt+r',function (){ location.href="/cgi-bin/koha/circ/returns.pl"; }); } |
19 |
if($("#header_search #checkin_search").length > 0){ shortcut.add('Alt+r',function (){ $("#header_search").selectTabByID("#checkin_search"); $("#ret_barcode").focus(); }); } else { shortcut.add('Alt+r',function (){ location.href="/cgi-bin/koha/circ/returns.pl"; }); } |
12 |
if($("#header_search #circ_search").length > 0){ shortcut.add('Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { shortcut.add('Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); } |
20 |
if($("#header_search #circ_search").length > 0){ shortcut.add('Alt+u',function (){ $("#header_search").selectTabByID("#circ_search"); $("#findborrower").focus(); }); } else { shortcut.add('Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); } |
13 |
if($("#header_search #catalog_search").length > 0){ shortcut.add('Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { shortcut.add('Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } |
21 |
if($("#header_search #catalog_search").length > 0){ shortcut.add('Alt+q',function (){ $("#header_search").selectTabByID("#catalog_search"); $("#search-form").focus(); }); } else { shortcut.add('Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } |
14 |
|
22 |
|
15 |
$(".focus").focus(); |
23 |
$(".focus").focus(); |
16 |
$(".validated").each(function() { |
24 |
$(".validated").each(function() { |
17 |
- |
|
|