X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d99d71844b7b97800dcab7cbb81c3a4185acbb48..5b8a2f8a0fb67caeca3f4483390c97e24fdac52f:/wolnelektury/static/js/catalogue.js?ds=inline diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index 510c543ce..671568596 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -391,7 +391,6 @@ function serverTime() { $('#createNewShelf').show(); }); } catch (e){} - $("#putOnShelf input[type=checkbox]").attr("checked",false); var serverResponse; $('form', hash.w).ajaxForm({ target: serverResponse, @@ -501,11 +500,13 @@ function serverTime() { // we don't want to interact with "audiobook" label, just 'format' tabs var $this = $(this); $this.addClass("active"); - $("#"+$this.html().toLowerCase()+"-files").show(); + $("#"+$this.attr('data-format')+"-files").show(); }); $('.audiobook-list').hide(); - $("#"+$(".audiotabs .active").html().toLowerCase()+"-files").show(); + if($(".audiotabs .active").length > 0) { + $("#"+$(".audiotabs .active").html().toLowerCase()+"-files").show(); + } /* this will be useful for javascript html player var medias = $('.audiobook-list a');