{combine_script id='jquery.progressBar' path='plugins/regenerateWebsize/js/jquery.progressbar.min.js' load='footer'}
{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
{footer_script require='jquery.progressBar,jquery.ajaxmanager'}
var elements = new Array();
var all_elements = [{','|@implode:$all_elements}];
var redirect = '{$redirect_url}';
{literal}
var queuedManagerWebsize = $.manageAjax.create('queued', {
queue: true,
cacheResponse: false,
maxRequests: 1
});
function progressWebsize(val, max, success) {
jQuery('#progressBarWebsize').progressBar(val, {
max: max,
textFormat: 'fraction',
boxImage: 'plugins/regenerateWebsize/images/progressbar.gif',
barImage: 'plugins/regenerateWebsize/images/progressbg_orange.gif'
});
type = success ? 'regenerateWebsizeSuccess': 'regenerateWebsizeError'
s = jQuery('[name="'+type+'"]').val();
jQuery('[name="'+type+'"]').val(++s);
if (val == max)
jQuery('#applyAction').click();
}
jQuery(document).ready(function() {
jQuery('#applyAction').click(function() {
if (jQuery('[name="selectAction"]').val() == 'regenerateWebsize') {
if (elements.length != 0)
return true;
if (jQuery('input[name="setSelected"]').attr('checked'))
elements = all_elements;
else
jQuery('input[name="selection[]"]').each(function() {
if (jQuery(this).attr('checked')) {
elements.push(jQuery(this).val());
}
});
maxwidth = jQuery('input[name="websize_maxwidth"]').val();
maxheight = jQuery('input[name="websize_maxheight"]').val();
progressBar_max = elements.length;
todo = 0;
jQuery('.websize_config').hide();
jQuery('#applyActionBlock').hide();
jQuery('select[name="selectAction"]').hide();
jQuery('#regenerationMsgWebsize').show();
jQuery('#progressBarWebsize').progressBar(0, {
max: progressBar_max,
textFormat: 'fraction',
boxImage: 'plugins/regenerateWebsize/images/progressbar.gif',
barImage: 'plugins/regenerateWebsize/images/progressbg_orange.gif'
});
for (i=0;i
{'Maximum Width'|@translate} | {'pixels'|@translate} |
---|---|
{'Maximum Height'|@translate} | {'pixels'|@translate} |
{'Image Quality'|@translate} | % |