diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-01-05 21:35:25 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-01-05 21:35:25 +0000 |
commit | e64ab974df242b25ade46d9795294ae859060355 (patch) | |
tree | 87c98fb3c4f7e0cd4318744edef74f4507be5482 /admin/themes/default | |
parent | 19b58d483bf3c8de06e6b494040cda6ce446bec2 (diff) |
feature 2548 multisize - sharpen + watermarks (partially implemented / no test with imagick extension)
git-svn-id: http://piwigo.org/svn/trunk@12851 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/themes/default/template/derivatives.tpl | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/admin/themes/default/template/derivatives.tpl b/admin/themes/default/template/derivatives.tpl index e0796024b..59f6344a7 100644 --- a/admin/themes/default/template/derivatives.tpl +++ b/admin/themes/default/template/derivatives.tpl @@ -23,6 +23,42 @@ {/literal}{/html_head} <form method="post" id="derviativesForm"> +<fieldset> +<legend>{'Watermark'|@translate}</legend> + + +<select name="w[file]" id="wSelect"> + {html_options options=$watermark_files selected=$watermark.file} +</select> + +<p><img id="wImg"></img></p> + +<label>{'Min Width'|@translate} + <input type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)}class="dError"{/if}> +</label> + +<label>{'Min Height'|@translate} + <input type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)}class="dError"{/if}> +</label> + +<label>{'X Position'|@translate} + <input type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)}class="dError"{/if}> +%</label> + +<label>{'Y Position'|@translate} + <input type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)}class="dError"{/if}> +%</label> + +<label>{'X Repeat'|@translate} + <input type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)}class="dError"{/if}> +</label> + +<label>{'Opacity'|@translate} + <input type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)}class="dError"{/if}> +</label> + +</fieldset> + <table class="table2"> <thead> <tr> @@ -33,6 +69,8 @@ <td>{'Crop'|@translate} (%)</td> <td>{'Min Width'|@translate}</td> <td>{'Min Height'|@translate}</td> + <td>{'Sharpen'|@translate} (%)</td> + <td>{'Quality'|@translate} (%)</td> </tr> </thead> {foreach from=$derivatives item=d key=type} @@ -65,7 +103,14 @@ <input type="text" name="d[{$type}][minh]" value="{$d.minh}"{if isset($ferrors.$type.minh)}class="dError"{/if}> {if isset($ferrors.$type.minh)}<span class="dErrorDesc" title="{$ferrors.$type.minh}">!</span>{/if} {/if}</td> - + <td> + <input type="text" name="d[{$type}][sharpen]" value="{$d.sharpen}"{if isset($ferrors.$type.sharpen)}class="dError"{/if}> + {if isset($ferrors.$type.sharpen)}<span class="dErrorDesc" title="{$ferrors.$type.sharpen}">!</span>{/if} + </td> + <td> + <input type="text" name="d[{$type}][quality]" value="{$d.quality}"{if isset($ferrors.$type.quality)}class="dError"{/if}> + {if isset($ferrors.$type.quality)}<span class="dErrorDesc" title="{$ferrors.$type.quality}">!</span>{/if} + </td> </tr> {/foreach} </table> @@ -76,4 +121,18 @@ jQuery(".dError").bind("focus", function () { jQuery(this).removeClass("dError"); } ); + +function onWatermarkChange() +{ + var val = jQuery("#wSelect").val(); + if (val.length) { + jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show(); + } + else { + jQuery("#wImg").hide(); + } +} + +onWatermarkChange(); +jQuery("#wSelect").bind("change", onWatermarkChange ); {/literal}{/footer_script}
\ No newline at end of file |