source: extensions/BatchDownloader/template/download_button.tpl @ 23291

Last change on this file since 23291 was 23291, checked in by mistic100, 11 years ago

fininalize download page
handle no-image files
correct link error when zips number changes

File size: 1.7 KB
Line 
1{footer_script require='jquery'}
2var batchdown_count = {$BATCH_DWN_COUNT};
3var batchdown_string = "{'Confirm the download of %d pictures?'|@translate}";
4{literal}
5jQuery().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<script type="text/javascript"></script>
31<li><a href="{$BATCH_DWN_URL}" id="batchDownloadLink" title="{'Download all pictures of this selection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
32  <span class="pwg-icon batch-downloader-icon" style="background:url('{$ROOT_PATH}{$BATCH_DOWNLOAD_PATH}template/images/zip.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Download'|@translate}</span>
33</a></li>
34
35<div id="batchDownloadBox" class="switchBox" style="display:none">
36  <div class="switchBoxTitle">{'Download'|@translate} - {'Photo sizes'|@translate}</div>
37  {foreach from=$BATCH_DOWNLOAD_SIZES item=size name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
38  <a href="{$BATCH_DWN_URL}{$size.TYPE}" rel="nofollow">
39    {$size.DISPLAY} {if $size.SIZE}<span class="downloadSizeDetails">({$size.SIZE})</span>{/if}
40  </a>
41  {/foreach}
42</div>
Note: See TracBrowser for help on using the repository browser.