1 | {footer_script require='jquery'} |
---|
2 | var batchdown_count = {$BATCH_DWN_COUNT}; |
---|
3 | var batchdown_string = "{'Confirm the download of %d pictures?'|@translate}"; |
---|
4 | {literal} |
---|
5 | jQuery().ready(function() { |
---|
6 | jQuery("#batchDownloadLink").click(function() { |
---|
7 | var elt = jQuery("#batchDownloadBox"); |
---|
8 | |
---|
9 | elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) |
---|
10 | .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true)) |
---|
11 | .toggle(); |
---|
12 | |
---|
13 | return false; |
---|
14 | }); |
---|
15 | |
---|
16 | jQuery("#batchDownloadBox").on("mouseleave click", function() { |
---|
17 | jQuery(this).hide(); |
---|
18 | }); |
---|
19 | |
---|
20 | jQuery("#batchDownloadBox a").click(function() { |
---|
21 | return confirm(batchdown_string.replace('%d', batchdown_count)); |
---|
22 | }); |
---|
23 | }); |
---|
24 | {/literal}{/footer_script} |
---|
25 | |
---|
26 | {html_style}{literal} |
---|
27 | .downloadSizeDetails {font-style:italic; font-size:80%;} |
---|
28 | {/literal}{/html_style} |
---|
29 | |
---|
30 | <li><a href="{$BATCH_DWN_URL}" id="batchDownloadLink" title="{'Download all pictures of this selection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
31 | <span class="pwg-icon batch-downloader-icon" style="background:url('{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/zip.png') center center no-repeat;"> </span><span class="pwg-button-text">{'Download'|@translate}</span> |
---|
32 | </a></li> |
---|
33 | |
---|
34 | <div id="batchDownloadBox" class="switchBox" style="display:none"> |
---|
35 | <div class="switchBoxTitle">{'Download'|@translate} - {'Photo sizes'|@translate}</div> |
---|
36 | {foreach from=$BATCH_DOWNLOAD_SIZES item=size name=loop}{if !$smarty.foreach.loop.first}<br>{/if} |
---|
37 | <a href="{$BATCH_DWN_URL}{$size.TYPE}" rel="nofollow"> |
---|
38 | {$size.DISPLAY} {if $size.SIZE}<span class="downloadSizeDetails">({$size.SIZE})</span>{/if} |
---|
39 | </a> |
---|
40 | {/foreach} |
---|
41 | </div> |
---|