{combine_css path=$BATCH_DOWNLOAD_PATH|@cat:"template/style.css"}
{if $set.U_DOWNLOAD}
{footer_script}
setTimeout("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 = {ldelim}
elements: ["{'","'|@implode:$missing_derivatives}"],
done: 0,
total: {$missing_derivatives|@count},
finished: function() {ldelim}
return derivatives.done == derivatives.total;
}
};
function progress(success) {ldelim}
jQuery('#progressBar').progressBar(derivatives.done, {ldelim}
max: derivatives.total,
textFormat: 'fraction',
boxImage: '{$ROOT_PATH}themes/default/images/progressbar.gif',
barImage: '{$ROOT_PATH}themes/default/images/progressbg_red.gif'
});
if (success !== undefined) {ldelim}
var type = success ? '.regenerateSuccess': '.regenerateError',
s = parseInt(jQuery(type).html());
jQuery(type).html(++s);
}
}
{literal}
var queuedManager = jQuery.manageAjax.create('queued', {
queue: true,
cacheResponse: false,
maxRequests: 1
});
function next_derivative() {
if (derivatives.finished()) {
alert("finish");
return;
}
$("#damn").append(derivatives.elements[ derivatives.done ]+"
");
jQuery.manageAjax.add("queued", {
type: 'GET',
url: derivatives.elements[ derivatives.done ]+'&ajaxload=true',
dataType: 'json',
success: function(data) {
derivatives.done++;
progress(true);
next_derivative();
},
error: function(data) {
derivatives.done++;
progress(false);
next_derivative();
}
});
}
$("#begin").click(function() {
progress();
next_derivative();
});
{/literal}{/footer_script}
{/if}
{* *}
{if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}
{include file=$BATCH_DOWNLOAD_ABS_PATH|@cat:'template/themes/stripped.tpl'}
{assign var="clear" value="true"}
{elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}
{include file=$BATCH_DOWNLOAD_ABS_PATH|@cat:'template/themes/simple.tpl'}
{assign var="clear" value="true"}
{else}
{include file=$BATCH_DOWNLOAD_ABS_PATH|@cat:'template/themes/default.tpl'}
{/if}
{if isset($errors) or not empty($infos)}
{include file='infos_errors.tpl'}
{/if}
{if $set}