{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} {footer_script} (function(){ var labelMaxWidth = "{'Maximum width'|translate}", labelWidth = "{'Width'|translate}", labelMaxHeight = "{'Maximum height'|translate}", labelHeight = "{'Height'|translate}"; function toggleResizeFields(size) { var checkbox = jQuery("[name=original_resize]"); var needToggle = jQuery("#sizeEdit-original"); if (jQuery(checkbox).is(':checked')) { needToggle.show(); } else { needToggle.hide(); } } toggleResizeFields("original"); jQuery("[name=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(); return false; }); 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"); return false; }); }()); {/footer_script} {html_style} .sizeEnable { width:50px; } .sizeEnable .mustEnable { display:inline-block; width:13px; margin:0 3px; } .sizeEditForm { margin:0 0 10px 20px; } .sizeEdit { display:none; } #sizesConf table { margin:0; } .showDetails { padding:0; } .sizeDetails { display:none;margin-left:10px; } .sizeEditOpen { margin-left:10px; } {/html_style}