diff options
author | plegall <plg@piwigo.org> | 2010-12-22 15:15:35 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-12-22 15:15:35 +0000 |
commit | 902c8f19278f389c53b23fcfbd0a0fe87a733372 (patch) | |
tree | c656c64325a4bd3f4b5b889c687ddc4111b6082d /admin/themes/default/template | |
parent | 48aa7f582191b39bc4b94fd2b2fc7a57523b95af (diff) |
feature 2077 added: when ImageMagick is active, ability to remove or resize
the high definition version of the photo.
git-svn-id: http://piwigo.org/svn/trunk@8227 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/themes/default/template/photos_add_settings.tpl | 67 |
1 files changed, 62 insertions, 5 deletions
diff --git a/admin/themes/default/template/photos_add_settings.tpl b/admin/themes/default/template/photos_add_settings.tpl index d4fb74400..fe9830e9e 100644 --- a/admin/themes/default/template/photos_add_settings.tpl +++ b/admin/themes/default/template/photos_add_settings.tpl @@ -1,20 +1,48 @@ {literal} <script type="text/javascript"> $(document).ready(function(){ - function toggleResizeFields() { - var checkbox = $("#websize_resize"); - var needToggle = $("input[name^=websize_]").not(checkbox).parents('tr'); + function toggleResizeFields(prefix) { + var checkbox = $("#"+prefix+"_resize"); + var needToggle = $("input[name^="+prefix+"_]").not(checkbox).not($("#hd_keep")).parents('tr'); + if ($(checkbox).is(':checked')) { needToggle.show(); + + if (prefix == "websize") { + $("#hd_keep").parents("fieldset").show(); + } } else { needToggle.hide(); + + if (prefix == "websize") { + $("#hd_keep").parents("fieldset").hide(); + } } } - toggleResizeFields(); - $("#websize_resize").click(function () {toggleResizeFields()}); + toggleResizeFields("websize"); + $("#websize_resize").click(function () {toggleResizeFields("websize")}); + + toggleResizeFields("hd"); + $("#hd_resize").click(function () {toggleResizeFields("hd")}); + + function toggleHdFields() { + var checkbox = $("#hd_keep"); + var needToggle = $("input[name^=hd_]").not(checkbox).parents('tr'); + + if ($(checkbox).is(':checked')) { + needToggle.show(); + toggleResizeFields("hd"); + } + else { + needToggle.hide(); + } + } + + toggleHdFields(); + $("#hd_keep").click(function () {toggleHdFields()}); }); </script> {/literal} @@ -69,6 +97,35 @@ $(document).ready(function(){ </table> </fieldset> +{if $MANAGE_HD} + <fieldset> + <legend>{'High definition'|@translate}</legend> + + <table> + <tr> + <th><label for="hd_keep">{'Keep high definition'|@translate}</label></th> + <td><input type="checkbox" name="hd_keep" id="hd_keep" {$values.hd_keep}></td> + </tr> + <tr> + <th><label for="hd_resize">{'Resize'|@translate}</label></th> + <td><input type="checkbox" name="hd_resize" id="hd_resize" {$values.hd_resize}></td> + </tr> + <tr> + <th>{'Maximum Width'|@translate}</th> + <td><input type="text" name="hd_maxwidth" value="{$values.hd_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Maximum Height'|@translate}</th> + <td><input type="text" name="hd_maxheight" value="{$values.hd_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Image Quality'|@translate}</th> + <td><input type="text" name="hd_quality" value="{$values.hd_quality}" size="3" maxlength="3"> %</td> + </tr> + </table> + </fieldset> +{/if} + <p> <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/> </p> |