X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ab8ffbde2df33d9c699e029ba613d2b014ba44b8..4bb39ab3814f4b13deeea984f143695205f3a663:/apps/wolnelektury_core/static/js/picture.js diff --git a/apps/wolnelektury_core/static/js/picture.js b/apps/wolnelektury_core/static/js/picture.js index 174a9ffa4..0c2e35b84 100644 --- a/apps/wolnelektury_core/static/js/picture.js +++ b/apps/wolnelektury_core/static/js/picture.js @@ -24,7 +24,7 @@ self._zoom = 0; self._ratio = 1.0; - self.original = self.element.find('img.original').eq(0); + self.original = $(''); self._original_avaialble = self.ORIGINAL_LOADING; function original_loaded() { @@ -230,39 +230,22 @@ return $mark.get(0); }, }); -}(jQuery)); $(document).ready(function() { $.highlightFade.defaults.speed = 3000; - $('.toolbar a.dropdown').each(function() { + $('#menu .dropdown').each(function() { $t = $(this); $($t.attr('href')).hide().insertAfter(this); }); - function closeDD() { - $(this).removeClass('selected'); - $($(this).attr('href')).slideUp('fast'); - - } - $('.toolbar a.dropdown').click(function(ev) { - $("#sponsors:not(:hidden)").fadeOut(); - ev.preventDefault(); - if ($(this).hasClass('selected')) { - closeDD.call(this); - } else { - $(this).addClass('selected'); - $($(this).attr('href')).slideDown('fast'); - $(this).parent().siblings(".button:has(.dropdown)").children(".dropdown").each(closeDD); - } - }); - $(".picture-wrap").pictureviewer({ - plus_button: $(".toolbar .button.plus"), - minus_button: $(".toolbar .button.minus"), + plus_button: $(".button.plus"), + minus_button: $(".button.minus"), areas_links: $("#picture-objects a, #picture-themes a"), }); }); +}(jQuery));