|
Lines 1-7
Link Here
|
| 1 |
// staff-global.js |
1 |
// staff-global.js |
| 2 |
if ( KOHA === undefined ) var KOHA = {}; |
2 |
if ( KOHA === undefined ) var KOHA = {}; |
| 3 |
|
3 |
|
| 4 |
function _(s) { return s } // dummy function for gettext |
4 |
function _(s) { return s; } // dummy function for gettext |
| 5 |
|
5 |
|
| 6 |
$(document).ready(function() { |
6 |
$(document).ready(function() { |
| 7 |
$('#header_search').tabs().bind('tabsshow', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); }); |
7 |
$('#header_search').tabs().bind('tabsshow', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); }); |
|
Lines 10-18
function _(s) { return s } // dummy function for gettext
Link Here
|
| 10 |
if($("#header_search #circ_search").length > 0){ $(document).bind('keydown','Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { $(document).bind('keydown','Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); } |
10 |
if($("#header_search #circ_search").length > 0){ $(document).bind('keydown','Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { $(document).bind('keydown','Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); } |
| 11 |
if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } |
11 |
if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); } |
| 12 |
$(".focus").focus(); |
12 |
$(".focus").focus(); |
|
|
13 |
$("#logout").click(function(){ |
| 14 |
logOut(); |
| 15 |
}); |
| 16 |
$("#helper").click(function(){ |
| 17 |
openHelp(); |
| 18 |
return false; |
| 19 |
}); |
| 13 |
}); |
20 |
}); |
| 14 |
|
21 |
|
| 15 |
|
|
|
| 16 |
YAHOO.util.Event.onContentReady("header", function () { |
22 |
YAHOO.util.Event.onContentReady("header", function () { |
| 17 |
var oMoremenu = new YAHOO.widget.Menu("moremenu", { zindex: 2 }); |
23 |
var oMoremenu = new YAHOO.widget.Menu("moremenu", { zindex: 2 }); |
| 18 |
|
24 |
|
|
Lines 48-54
function _(s) { return s } // dummy function for gettext
Link Here
|
| 48 |
YAHOO.util.Event.onContentReady("changelanguage", function () { |
54 |
YAHOO.util.Event.onContentReady("changelanguage", function () { |
| 49 |
$(".sublangs").each(function(){ |
55 |
$(".sublangs").each(function(){ |
| 50 |
var menuid = $(this).attr("id"); |
56 |
var menuid = $(this).attr("id"); |
| 51 |
var menuid = menuid.replace("show",""); |
57 |
menuid = menuid.replace("show",""); |
| 52 |
|
58 |
|
| 53 |
var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 }); |
59 |
var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 }); |
| 54 |
function positionoMenu() { |
60 |
function positionoMenu() { |
|
Lines 72-78
YAHOO.util.Event.onContentReady("changelanguage", function () {
Link Here
|
| 72 |
YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); |
78 |
YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); |
| 73 |
}); |
79 |
}); |
| 74 |
}); |
80 |
}); |
| 75 |
|
81 |
|
| 76 |
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html |
82 |
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html |
| 77 |
function checkEnter(e){ //e is event object passed from function invocation |
83 |
function checkEnter(e){ //e is event object passed from function invocation |
| 78 |
var characterCode; // literal character code will be stored in this variable |
84 |
var characterCode; // literal character code will be stored in this variable |
|
Lines 95-100
function clearHoldFor(){
Link Here
|
| 95 |
$.cookie("holdfor",null, { path: "/", expires: 0 }); |
101 |
$.cookie("holdfor",null, { path: "/", expires: 0 }); |
| 96 |
} |
102 |
} |
| 97 |
|
103 |
|
|
|
104 |
function logOut(){ |
| 105 |
if( typeof delBasket == 'function' ){ |
| 106 |
delBasket('main', true); |
| 107 |
} |
| 108 |
clearHoldFor(); |
| 109 |
} |
| 110 |
|
| 111 |
function openHelp(){ |
| 112 |
openWindow("/cgi-bin/koha/help.pl","Koha help",600,600); |
| 113 |
} |
| 114 |
|
| 98 |
jQuery.fn.preventDoubleFormSubmit = function() { |
115 |
jQuery.fn.preventDoubleFormSubmit = function() { |
| 99 |
jQuery(this).submit(function() { |
116 |
jQuery(this).submit(function() { |
| 100 |
if (this.beenSubmitted) |
117 |
if (this.beenSubmitted) |
| 101 |
- |
|
|