5 [%# Prevent XFS attacks -%]
9 var antiClickjack = document.getElementById("antiClickjack");
10 antiClickjack.parentNode.removeChild(antiClickjack);
12 top.location = self.location;
17 [% Asset.js("lib/jquery/jquery-2.2.3.min.js") | $raw %]
18 [% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") | $raw %]
19 [% Asset.js("lib/jquery/jquery-ui-1.11.4.min.js") | $raw %]
20 [% Asset.js("lib/shortcut/shortcut.js") | $raw %]
21 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
22 [% Asset.js("lib/js-cookie/js.cookie-2.2.1.min.js") | $raw %]
23 [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
24 [% Asset.js("lib/bootstrap/bootstrap.min.js") | $raw %]
25 [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
27 [% Asset.js("js/staff-global.js") | $raw %]
29 [% INCLUDE 'validator-strings.inc' %]
30 [% IF ( IntranetUserJS ) %]
31 <!-- js_includes.inc: IntranetUserJS -->
33 [% IntranetUserJS | $raw %]
35 <!-- / js_includes.inc: IntranetUserJS -->
38 <!-- js_includes.inc -->
39 [% IF ( virtualshelves || intranetbookbag ) %]
41 // virtualshelves || intranetbookbag
42 var MSG_BASKET_EMPTY = _("Your cart is currently empty");
43 var MSG_RECORD_IN_BASKET = _("This item is already in your cart");
44 var MSG_RECORD_ADDED = _("This item has been added to your cart");
45 var MSG_NRECORDS_ADDED = _("%s item(s) added to your cart");
46 var MSG_NRECORDS_IN_BASKET = _("%s already in your cart");
47 var MSG_NO_RECORD_SELECTED = _("No item was selected");
48 var MSG_NO_RECORD_ADDED = _("No item was added to your cart (already in your cart)!");
49 var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
50 var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
51 var MSG_IN_YOUR_CART = _("Items in your cart: %s");
52 var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved.");
53 var MSG_ITEM_NOT_IN_CART = _("Add to cart");
54 var MSG_ITEM_IN_CART = _("In your cart");
55 var MSG_RECORD_REMOVED = _("The item has been removed from your cart");
58 [% Asset.js("js/basket.js") | $raw %]
61 [% IF LocalCoverImages %]
62 [% Asset.js("js/localcovers.js") | $raw %]
65 var NO_LOCAL_JACKET = _("No cover image available");
69 [% IF Koha.Preference('AudioAlerts') || AudioAlertsPage %]
72 var AUDIO_ALERT_PATH = '[% interface | html %]/[% theme | html %]/sound/';
73 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
75 $( document ).ready(function() {
77 for ( var k in AUDIO_ALERTS ) {
78 var alert = AUDIO_ALERTS[k];
79 if ( $( alert.selector ).length ) {
80 playSound( alert.sound );
89 [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
90 [% IF ( PatronAutoComplete ) %]
92 // PatronAutoComplete && CAN_user_circulate_circulate_remaining_permissions
93 $(document).ready(function(){
94 var obj = $( "#findborrower" ).autocomplete({
95 source: "/cgi-bin/koha/circ/ysearch.pl",
97 select: function( event, ui ) {
98 window.location.href = ui.item.link;
100 }).data( "ui-autocomplete" );
102 obj._renderItem = function( ul, item ) {
103 item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
105 if( item.cardnumber != "" ){
106 // Display card number in parentheses if it exists
107 cardnumber = " (" + item.cardnumber + ") ";
109 return $( "<li></li>" )
110 .data( "ui-autocomplete-item", item )
111 .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
119 [% IF ( PatronAutoComplete ) %]
121 // PatronAutoComplete
122 $(document).ready(function(){
123 var obj = $( "#searchmember" ).autocomplete({
124 source: "/cgi-bin/koha/circ/ysearch.pl",
126 select: function( event, ui ) {
127 window.location.href = ui.item.link;
129 }).data( "ui-autocomplete" );
131 obj._renderItem = function( ul, item ) {
132 item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
134 if( item.cardnumber != "" ){
135 // Display card number in parentheses if it exists
136 cardnumber = " (" + item.cardnumber + ") ";
138 return $( "<li></li>" )
139 .data( "ui-autocomplete-item", item )
140 .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
147 <!-- / js_includes.inc -->