aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-12-20 20:38:30 +0100
committerplegall <plg@piwigo.org>2015-12-20 20:38:30 +0100
commite7183e91d9c7fd84ae21a7f59926824ec6c78d9e (patch)
treeeec288d15c762ff849934e092bf28d4fa80e67eb /themes/default/template
parent11f37b24b48ed9307ecdb2ac19f5809876d9227a (diff)
use window.SwitchBox instead of duplicating code
Diffstat (limited to 'themes/default/template')
-rw-r--r--themes/default/template/picture.tpl14
1 files changed, 1 insertions, 13 deletions
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index f18fdd615..3cccf6b29 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -74,19 +74,7 @@ function changeImgSrc(url,typeSave,typeMap)
jQuery().ready(function() {
jQuery("#downloadSwitchLink").removeAttr("href");
- jQuery("#downloadSwitchLink").click(function() {
- var elt = jQuery("#downloadSwitchBox");
-
- elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
- .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
- .toggle();
-
- return false;
- });
-
- jQuery("#downloadSwitchBox").on("mouseleave click", function() {
- jQuery(this).hide();
- });
+ (window.SwitchBox=window.SwitchBox||[]).push("#downloadSwitchLink", "#downloadSwitchBox");
});
{/literal}{/footer_script}