1 | <h2>{'Multiple Size'|@translate}</h2> |
---|
2 | |
---|
3 | {html_head}{literal} |
---|
4 | <style type="text/css"> |
---|
5 | #derviativesForm .dError { |
---|
6 | background-color: red; |
---|
7 | color: yellow; |
---|
8 | } |
---|
9 | |
---|
10 | #derviativesForm .dErrorDesc { |
---|
11 | } |
---|
12 | |
---|
13 | #derviativesForm TABLE THEAD { |
---|
14 | height: 3em; |
---|
15 | } |
---|
16 | |
---|
17 | #derviativesForm TABLE INPUT[type="text"] { |
---|
18 | border: 0; |
---|
19 | width: 5em; |
---|
20 | } |
---|
21 | |
---|
22 | </style> |
---|
23 | {/literal}{/html_head} |
---|
24 | |
---|
25 | <p><a href="admin.php?page=derivatives_build">Build missing derivatives</a></p> |
---|
26 | <form method="post" id="derviativesForm"> |
---|
27 | <fieldset> |
---|
28 | <legend>{'Watermark'|@translate}</legend> |
---|
29 | |
---|
30 | |
---|
31 | <select name="w[file]" id="wSelect"> |
---|
32 | {html_options options=$watermark_files selected=$watermark.file} |
---|
33 | </select> |
---|
34 | |
---|
35 | <p><img id="wImg"></img></p> |
---|
36 | |
---|
37 | <label>{'Min Width'|@translate} |
---|
38 | <input type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)}class="dError"{/if}> |
---|
39 | </label> |
---|
40 | |
---|
41 | <label>{'Min Height'|@translate} |
---|
42 | <input type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)}class="dError"{/if}> |
---|
43 | </label> |
---|
44 | |
---|
45 | <label>{'X Position'|@translate} |
---|
46 | <input type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)}class="dError"{/if}> |
---|
47 | %</label> |
---|
48 | |
---|
49 | <label>{'Y Position'|@translate} |
---|
50 | <input type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)}class="dError"{/if}> |
---|
51 | %</label> |
---|
52 | |
---|
53 | <label>{'X Repeat'|@translate} |
---|
54 | <input type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)}class="dError"{/if}> |
---|
55 | </label> |
---|
56 | |
---|
57 | <label>{'Opacity'|@translate} |
---|
58 | <input type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)}class="dError"{/if}> |
---|
59 | </label> |
---|
60 | |
---|
61 | </fieldset> |
---|
62 | |
---|
63 | <table class="table2"> |
---|
64 | <thead> |
---|
65 | <tr> |
---|
66 | <td></td> |
---|
67 | <td>Enabled</td> |
---|
68 | <td>{'Width'|@translate}</td> |
---|
69 | <td>{'Height'|@translate}</td> |
---|
70 | <td>{'Crop'|@translate} (%)</td> |
---|
71 | <td>{'Min Width'|@translate}</td> |
---|
72 | <td>{'Min Height'|@translate}</td> |
---|
73 | <td>{'Sharpen'|@translate} (%)</td> |
---|
74 | <td>{'Quality'|@translate} (%)</td> |
---|
75 | </tr> |
---|
76 | </thead> |
---|
77 | {foreach from=$derivatives item=d key=type} |
---|
78 | <tr> |
---|
79 | <td>{$type|@translate}</td> |
---|
80 | <td> |
---|
81 | {if $d.must_enable} |
---|
82 | x |
---|
83 | {else} |
---|
84 | <input type="checkbox" name="d[{$type}][enabled]" {if $d.enabled}checked="checked"{/if}> |
---|
85 | {/if} |
---|
86 | </td> |
---|
87 | <td> |
---|
88 | <input type="text" name="d[{$type}][w]" value="{$d.w}"{if isset($ferrors.$type.w)}class="dError"{/if}> |
---|
89 | {if isset($ferrors.$type.w)}<span class="dErrorDesc" title="{$ferrors.$type.w}">!</span>{/if} |
---|
90 | </td> |
---|
91 | <td>{if !$d.must_square} |
---|
92 | <input type="text" name="d[{$type}][h]" value="{$d.h}"{if isset($ferrors.$type.h)}class="dError"{/if}> |
---|
93 | {if isset($ferrors.$type.h)}<span class="dErrorDesc" title="{$ferrors.$type.h}">!</span>{/if} |
---|
94 | {/if}</td> |
---|
95 | <td>{if !$d.must_square} |
---|
96 | <input type="text" name="d[{$type}][crop]" value="{$d.crop}"{if isset($ferrors.$type.crop)}class="dError"{/if}> |
---|
97 | {if isset($ferrors.$type.crop)}<span class="dErrorDesc" title="{$ferrors.$type.crop}">!</span>{/if} |
---|
98 | {/if}</td> |
---|
99 | <td>{if !$d.must_square} |
---|
100 | <input type="text" name="d[{$type}][minw]" value="{$d.minw}"{if isset($ferrors.$type.minw)}class="dError"{/if}> |
---|
101 | {if isset($ferrors.$type.minw)}<span class="dErrorDesc" title="{$ferrors.$type.minw}">!</span>{/if} |
---|
102 | {/if}</td> |
---|
103 | <td>{if !$d.must_square} |
---|
104 | <input type="text" name="d[{$type}][minh]" value="{$d.minh}"{if isset($ferrors.$type.minh)}class="dError"{/if}> |
---|
105 | {if isset($ferrors.$type.minh)}<span class="dErrorDesc" title="{$ferrors.$type.minh}">!</span>{/if} |
---|
106 | {/if}</td> |
---|
107 | <td> |
---|
108 | <input type="text" name="d[{$type}][sharpen]" value="{$d.sharpen}"{if isset($ferrors.$type.sharpen)}class="dError"{/if}> |
---|
109 | {if isset($ferrors.$type.sharpen)}<span class="dErrorDesc" title="{$ferrors.$type.sharpen}">!</span>{/if} |
---|
110 | </td> |
---|
111 | <td> |
---|
112 | <input type="text" name="d[{$type}][quality]" value="{$d.quality}"{if isset($ferrors.$type.quality)}class="dError"{/if}> |
---|
113 | {if isset($ferrors.$type.quality)}<span class="dErrorDesc" title="{$ferrors.$type.quality}">!</span>{/if} |
---|
114 | </td> |
---|
115 | </tr> |
---|
116 | {/foreach} |
---|
117 | </table> |
---|
118 | <p><input type="submit" value="{'Submit'|@translate}"></p> |
---|
119 | </form> |
---|
120 | |
---|
121 | {footer_script}{literal} |
---|
122 | jQuery(".dError").bind("focus", function () { |
---|
123 | jQuery(this).removeClass("dError"); |
---|
124 | } ); |
---|
125 | |
---|
126 | function onWatermarkChange() |
---|
127 | { |
---|
128 | var val = jQuery("#wSelect").val(); |
---|
129 | if (val.length) { |
---|
130 | jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show(); |
---|
131 | } |
---|
132 | else { |
---|
133 | jQuery("#wImg").hide(); |
---|
134 | } |
---|
135 | } |
---|
136 | |
---|
137 | onWatermarkChange(); |
---|
138 | jQuery("#wSelect").bind("change", onWatermarkChange ); |
---|
139 | {/literal}{/footer_script} |
---|