|
Lines 1-5
Link Here
|
| 1 |
[% USE Koha %] |
1 |
[% USE Koha %] |
| 2 |
[% USE KohaDates %] |
2 |
[% USE KohaDates %] |
|
|
3 |
[% USE AudioAlerts %] |
| 3 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 4 |
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title> |
5 |
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
Lines 315-320
Link Here
|
| 315 |
</div> <!-- / .row-fluid --> |
316 |
</div> <!-- / .row-fluid --> |
| 316 |
</div> <!-- / .container-fluid --> |
317 |
</div> <!-- / .container-fluid --> |
| 317 |
</div> <!-- / .main --> |
318 |
</div> <!-- / .main --> |
|
|
319 |
<span id="audio-alert"></span> |
| 320 |
</body> |
| 318 |
|
321 |
|
| 319 |
[% INCLUDE 'opac-bottom.inc' %] |
322 |
[% INCLUDE 'opac-bottom.inc' %] |
| 320 |
[% BLOCK jsinclude %] |
323 |
[% BLOCK jsinclude %] |
|
Lines 353-358
Link Here
|
| 353 |
} |
356 |
} |
| 354 |
return true; |
357 |
return true; |
| 355 |
} |
358 |
} |
|
|
359 |
[% IF Koha.Preference('AudioAlerts') %] |
| 360 |
var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' ); |
| 361 |
$( document ).ready(function() { |
| 362 |
if ( AUDIO_ALERTS ) { |
| 363 |
for ( var k in AUDIO_ALERTS ) { |
| 364 |
var alert = AUDIO_ALERTS[k]; |
| 365 |
if ( $( alert.selector ).length ) { |
| 366 |
playSound( alert.sound ); |
| 367 |
break; |
| 368 |
} |
| 369 |
} |
| 370 |
} |
| 371 |
}); |
| 372 |
function playSound( sound ) { |
| 373 |
if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) { |
| 374 |
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; |
| 375 |
} |
| 376 |
} |
| 377 |
[% END %] |
| 378 |
|
| 356 |
|
379 |
|
| 357 |
$(document).ready(function() { |
380 |
$(document).ready(function() { |
| 358 |
dofocus(); |
381 |
dofocus(); |
| 359 |
- |
|
|