{combine_css path=$BATCH_DOWNLOAD_PATH|cat:"template/style.css"} {if $set.U_DOWNLOAD} {footer_script} setTimeout(function() { document.location.href = '{$set.U_DOWNLOAD}'; }, 1000); {/footer_script} {/if} {if $missing_derivatives} {combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'} {combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'} {footer_script} var derivatives = { elements: ["{'","'|@implode:$missing_derivatives}"], done: 0, total: {$missing_derivatives|@count}, finished: function() { return derivatives.done == derivatives.total; } }; function progress() { jQuery('#progressBar').progressBar(derivatives.done/derivatives.total*100, { width: 300, height: 24, boxImage: '{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/progress_box.png', barImage: '{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/progress_bar.png' }); } var queuedManager = jQuery.manageAjax.create('queued', { queue: true, cacheResponse: false, maxRequests: 1 }); function next_derivative() { if (derivatives.finished()) { setTimeout(function() { location.reload(true); }, 1000); return; } queuedManager.add({ type: 'GET', url: derivatives.elements[ derivatives.done ], dataType: 'json', data: { ajaxload: 'true' }, success: function() { derivatives.done++; progress(); next_derivative(); }, error: function() { derivatives.done++; progress(); next_derivative(); } }); } progress(); setTimeout(next_derivative, 1000); {/footer_script} {/if} {if $set}
{'Download info'|translate}

{$set.NAME}

{if $set.COMMENT}
{$set.COMMENT}
{/if}
{if $missing_derivatives}
{'Preparation'|translate}

{'Please wait, your download is being prepared. This page will automatically refresh when it is ready.'|translate}

{'Cancel this download'|translate}
{elseif $zip_links}
{'Download links'|translate} {if $set.U_CANCEL}{'Cancel this download'|translate}{/if}
{/if} {/if}