From d568e4f3a20d1b83b5b8e88c25c59700296ef3d1 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 3 Apr 2012 21:01:40 +0000 Subject: feature 2606: first step on multiple size configuration screen redesign. Multiple size configuration moved to [Administration > Configuration > Photo Sizes] Less details by default, less options also (sharpen had disappeared) TODO : save settings on form submission. The old screen is still available. git-svn-id: http://piwigo.org/svn/trunk@13883 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/configuration.tpl | 146 ++++++++++++++++++++++-- 1 file changed, 137 insertions(+), 9 deletions(-) (limited to 'admin/themes/default') diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index faa3d8517..ca54e90d1 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -268,11 +268,17 @@ jQuery(document).ready(function () { {if isset($sizes)} -{footer_script}{literal} +{footer_script} +var labelMaxWidth = "{'Maximum Width'|@translate}"; +var labelWidth = "{'Width'|@translate}"; + +var labelMaxHeight = "{'Maximum Height'|@translate}"; +var labelHeight = "{'Height'|@translate}"; +{literal} jQuery(document).ready(function(){ - function toggleResizeFields(prefix) { - var checkbox = jQuery("#"+prefix+"_resize"); - var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).parents('tr'); + function toggleResizeFields(size) { + var checkbox = jQuery("#original_resize"); + var needToggle = jQuery("#sizeEdit-original"); if (jQuery(checkbox).is(':checked')) { needToggle.show(); @@ -284,17 +290,58 @@ jQuery(document).ready(function(){ toggleResizeFields("original"); jQuery("#original_resize").click(function () {toggleResizeFields("original")}); + + jQuery("a[id^='sizeEditOpen-']").click(function(){ + var sizeName = jQuery(this).attr("id").split("-")[1]; + jQuery("#sizeEdit-"+sizeName).toggle(); + jQuery(this).hide(); + }); + + jQuery(".cropToggle").click(function() { + var labelBoxWidth = jQuery(this).parents('table.sizeEditForm').find('td.sizeEditWidth'); + var labelBoxHeight = jQuery(this).parents('table.sizeEditForm').find('td.sizeEditHeight'); + + if (jQuery(this).is(':checked')) { + jQuery(labelBoxWidth).html(labelWidth); + jQuery(labelBoxHeight).html(labelHeight); + } + else { + jQuery(labelBoxWidth).html(labelMaxWidth); + jQuery(labelBoxHeight).html(labelMaxHeight); + } + }); + + jQuery("#showDetails").click(function() { + jQuery(".sizeDetails").show(); + jQuery(this).css("visibility", "hidden"); + }); + }); {/literal}{/footer_script} +{literal} + +{/literal} +
{'Original Size'|@translate} - - - - - +
+ +
+ +
@@ -310,6 +357,87 @@ jQuery(document).ready(function(){
{'Maximum Width'|@translate} {'pixels'|@translate}
+ +
Warning: the following fields are for test "user interface" test only. Any change won't be saved.
See screen [Administration > Configuration > Multiple Size] to configure sizes.
+ +
+ {'Multiple Size'|@translate} + + + + +{foreach from=$derivatives item=d key=type} + + + + + + + + + + + +{/foreach} +
+ + + {$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if} + + + {'edit'|@translate} + +
+ + {if !$d.must_square} + + + + {/if} + + + + + + + {if !$d.must_square} + + + + + {/if} +
+ +
{if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum Width'|@translate}{/if} + + {'pixels'|@translate} + {if isset($ferrors.$type.w)}!{/if} +
{if $d.crop}{'Height'|@translate}{else}{'Maximum Height'|@translate}{/if} + + {'pixels'|@translate} + {if isset($ferrors.$type.h)}!{/if} +
{* #sizeEdit *} +
+ +

+ {'Image Quality'|@translate} + % +

+
{/if} {if isset($display)} -- cgit v1.2.3