Changeset 8227 for trunk/admin/themes
- Timestamp:
- Dec 22, 2010, 4:15:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/photos_add_settings.tpl
r6363 r8227 2 2 <script type="text/javascript"> 3 3 $(document).ready(function(){ 4 function toggleResizeFields() { 5 var checkbox = $("#websize_resize"); 6 var needToggle = $("input[name^=websize_]").not(checkbox).parents('tr'); 4 function toggleResizeFields(prefix) { 5 var checkbox = $("#"+prefix+"_resize"); 6 var needToggle = $("input[name^="+prefix+"_]").not(checkbox).not($("#hd_keep")).parents('tr'); 7 7 8 8 9 if ($(checkbox).is(':checked')) { 9 10 needToggle.show(); 11 12 if (prefix == "websize") { 13 $("#hd_keep").parents("fieldset").show(); 14 } 15 } 16 else { 17 needToggle.hide(); 18 19 if (prefix == "websize") { 20 $("#hd_keep").parents("fieldset").hide(); 21 } 22 } 23 } 24 25 toggleResizeFields("websize"); 26 $("#websize_resize").click(function () {toggleResizeFields("websize")}); 27 28 toggleResizeFields("hd"); 29 $("#hd_resize").click(function () {toggleResizeFields("hd")}); 30 31 function toggleHdFields() { 32 var checkbox = $("#hd_keep"); 33 var needToggle = $("input[name^=hd_]").not(checkbox).parents('tr'); 34 35 if ($(checkbox).is(':checked')) { 36 needToggle.show(); 37 toggleResizeFields("hd"); 10 38 } 11 39 else { … … 14 42 } 15 43 16 toggle ResizeFields();17 $("# websize_resize").click(function () {toggleResizeFields()});44 toggleHdFields(); 45 $("#hd_keep").click(function () {toggleHdFields()}); 18 46 }); 19 47 </script> … … 70 98 </fieldset> 71 99 100 {if $MANAGE_HD} 101 <fieldset> 102 <legend>{'High definition'|@translate}</legend> 103 104 <table> 105 <tr> 106 <th><label for="hd_keep">{'Keep high definition'|@translate}</label></th> 107 <td><input type="checkbox" name="hd_keep" id="hd_keep" {$values.hd_keep}></td> 108 </tr> 109 <tr> 110 <th><label for="hd_resize">{'Resize'|@translate}</label></th> 111 <td><input type="checkbox" name="hd_resize" id="hd_resize" {$values.hd_resize}></td> 112 </tr> 113 <tr> 114 <th>{'Maximum Width'|@translate}</th> 115 <td><input type="text" name="hd_maxwidth" value="{$values.hd_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> 116 </tr> 117 <tr> 118 <th>{'Maximum Height'|@translate}</th> 119 <td><input type="text" name="hd_maxheight" value="{$values.hd_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> 120 </tr> 121 <tr> 122 <th>{'Image Quality'|@translate}</th> 123 <td><input type="text" name="hd_quality" value="{$values.hd_quality}" size="3" maxlength="3"> %</td> 124 </tr> 125 </table> 126 </fieldset> 127 {/if} 128 72 129 <p> 73 130 <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/>
Note: See TracChangeset
for help on using the changeset viewer.