X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9baaf0aa657110f7481ea24dc6bc68bf4fc64cd1..f5ad229ebb7d746137b50d6c8cd957e7dc9b4c0a:/wolnelektury/static/js/catalogue.js diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index 519280a27..66bebcf2f 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -40,6 +40,20 @@ function changeBannerText() { } } +function autocomplete_result_handler(event, item) { + $(event.target).closest('form').submit(); +} +function serverTime() { + var time = null; + $.ajax({url: '/katalog/zegar/', + async: false, dataType: 'text', + success: function(text) { + time = new Date(text); + }, error: function(http, message, exc) { + time = new Date(); + }}); + return time; +} (function($) { $(function() { @@ -65,14 +79,16 @@ function changeBannerText() { function() { $(this).css({background: '#FFF'}); } ).click(function() { $(this).fadeOut(function() { - $(this).prev().fadeIn() + $(this).prev().fadeIn(); }); + return false; }) } }); $('.fragment-short-text').click(function() { $(this).fadeOut(function() { $(this).next().fadeIn() }); + return false; }).hover( function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, function() { $(this).css({background: '#FFF'}); }