From f0d5c6c010ebf651ca6db8c35ef7124b8ca95369 Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 13 Mar 2012 21:13:17 +0000 Subject: git-svn-id: http://piwigo.org/svn/trunk@13544 68402e56-0260-453c-a942-63ccdbb3a9ee --- .../default/template/batch_manager_global.tpl | 348 ++++++++++----------- admin/themes/default/template/maintenance.tpl | 2 +- 2 files changed, 160 insertions(+), 190 deletions(-) (limited to 'admin/themes/default') diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index d368591c2..8dfd08cb1 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -94,14 +94,13 @@ jQuery(document).ready(function() {ldelim} var nb_thumbs_page = {$nb_thumbs_page}; var nb_thumbs_set = {$nb_thumbs_set}; var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}"; -var elements = new Array(); +var elements = []; var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}]; +var generate_derivatives_done=false; var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}"; var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}"; var selectedMessage_all = "{'All %d photos are selected'|@translate}"; -var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}"; -var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}"; var width_str = '{'Width'|@translate}'; var height_str = '{'Height'|@translate}'; @@ -162,12 +161,16 @@ function progress(val, max, success) { boxImage: 'themes/default/images/progressbar.gif', barImage: 'themes/default/images/progressbg_orange.gif' }); - type = success ? 'regenerateSuccess': 'regenerateError' - s = jQuery('[name="'+type+'"]').val(); - jQuery('[name="'+type+'"]').val(++s); - - if (val == max) - jQuery('#applyAction').click(); + if (success !== undefined) { + var type = success ? 'regenerateSuccess': 'regenerateError', + s = jQuery('[name="'+type+'"]').val(); + jQuery('[name="'+type+'"]').val(++s); + } + + if (val == max) { + generate_derivatives_done = true; + jQuery('#applyAction').click(); + } } $(document).ready(function() { @@ -402,112 +405,97 @@ $(document).ready(function() { }); jQuery('#applyAction').click(function() { - if (elements.length != 0) - { - return true; - } - else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails') - { - resizeMethod = 'pwg.images.resizeThumbnail'; - maxRequests = 3; - maxwidth = jQuery('input[name="thumb_maxwidth"]').val(); - maxheight = jQuery('input[name="thumb_maxheight"]').val(); - regenerationText = regenerateThumbnailsMessage; - crop = jQuery('input[name="thumb_crop"]').is(':checked'); - follow_orientation = jQuery('input[name="thumb_follow_orientation"]').is(':checked'); - } - else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize') - { - resizeMethod = 'pwg.images.resizeWebsize'; - maxRequests = 1; - maxwidth = jQuery('input[name="websize_maxwidth"]').val(); - maxheight = jQuery('input[name="websize_maxheight"]').val(); - regenerationText = regenerateWebsizeMessage; - crop = false; - follow_orientation = false; - } - else return true; - - jQuery('.bulkAction').hide(); - jQuery('#regenerationText').html(regenerationText); - - var queuedManager = jQuery.manageAjax.create('queued', { - queue: true, - cacheResponse: false, - maxRequests: maxRequests - }); - - 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()); - } - }); - - progressBar_max = elements.length; - todo = 0; - - jQuery('#applyActionBlock').hide(); - jQuery('select[name="selectAction"]').hide(); - jQuery('#regenerationMsg').show(); - - jQuery('#progressBar').progressBar(0, { - max: progressBar_max, - textFormat: 'fraction', - boxImage: 'themes/default/images/progressbar.gif', - barImage: 'themes/default/images/progressbg_orange.gif' - }); - - for (i=0;i @@ -686,8 +670,8 @@ jQuery(window).load(function() { {else} {/if} - - + + {if !empty($element_set_global_plugins_actions)} {foreach from=$element_set_global_plugins_actions item=action} @@ -784,59 +768,45 @@ jQuery(window).load(function() {
- -
- - - - - - - - - - - - - - - - - - - - - -
{'Maximum Width'|@translate} {'pixels'|@translate}
{'Maximum Height'|@translate} {'pixels'|@translate}
{'Image Quality'|@translate} %
-
- - -
-

- ! - {'By default, Piwigo will create a new websize from the HD (high definition) version of your photo.'|@translate} - {'If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.'|@translate} -

- - - - - - - - - - - - - - -
{'Maximum Width'|@translate} {'pixels'|@translate}
{'Maximum Height'|@translate} {'pixels'|@translate}
{'Image Quality'|@translate} %
-
- + +
+ {'All'|@translate}, + {'None'|@translate} +
+ {foreach from=$generate_derivatives_types key=type item=disp} + + {/foreach} + {footer_script} + function selectGenerateDerivAll() {ldelim} + $("#action_generate_derivatives input[type=checkbox]").attr("checked", true); + } + function selectGenerateDerivNone() {ldelim} + $("#action_generate_derivatives input[type=checkbox]").attr("checked", false); + } + {/footer_script} +
+ + +
+ {'All'|@translate}, + {'None'|@translate} +
+ {foreach from=$del_derivatives_types key=type item=disp} + + {/foreach} + {footer_script} + function selectDelDerivAll() {ldelim} + $("#action_delete_derivatives input[type=checkbox]").attr("checked", true); + } + function selectDelDerivNone() {ldelim} + $("#action_delete_derivatives input[type=checkbox]").attr("checked", false); + } + {/footer_script} +
+ -
-

+