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_ITEM_NOT_IN_CART = _("Add to cart");
53 var MSG_ITEM_IN_CART = _("In your cart");
54 var MSG_RECORD_REMOVED = _("The item has been removed from your cart");
57 [% Asset.js("js/basket.js") | $raw %]
60 [% IF LocalCoverImages %]
61 [% Asset.js("js/localcovers.js") | $raw %]
64 [% IF Koha.Preference('AudioAlerts') || AudioAlertsPage %]
67 var AUDIO_ALERT_PATH = '[% interface | html %]/[% theme | html %]/sound/';
68 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
70 $( document ).ready(function() {
72 for ( var k in AUDIO_ALERTS ) {
73 var alert = AUDIO_ALERTS[k];
74 if ( $( alert.selector ).length ) {
75 playSound( alert.sound );
84 [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
85 [% IF ( PatronAutoComplete ) %]
87 // PatronAutoComplete && CAN_user_circulate_circulate_remaining_permissions
88 $(document).ready(function(){
89 var obj = $( "#findborrower" ).autocomplete({
90 source: "/cgi-bin/koha/circ/ysearch.pl",
92 select: function( event, ui ) {
93 window.location.href = ui.item.link;
95 }).data( "ui-autocomplete" );
97 obj._renderItem = function( ul, item ) {
98 item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
100 if( item.cardnumber != "" ){
101 // Display card number in parentheses if it exists
102 cardnumber = " (" + item.cardnumber + ") ";
104 var itemString = "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>";
105 if( item.dateofbirth ) {
106 itemString += item.dateofbirth + "<span class=\"age_years\"> (" + item.age + " " + _("years") + ")</span>, ";
108 itemString += item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>";
109 return $( "<li></li>" )
110 .data( "ui-autocomplete-item", item )
111 .append( itemString )
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/members/moremember.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 -->