Changeset 26308 for extensions/header_manager/admin
- Timestamp:
- Dec 29, 2013, 11:02:14 AM (10 years ago)
- Location:
- extensions/header_manager/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/header_manager/admin/add.php
r26298 r26308 13 13 { 14 14 include_once(HEADER_MANAGER_PATH . 'include/banner.class.php'); 15 16 $conf['header_manager']['keep_ratio'] = isset($_POST['keep_ratio']); 17 conf_update_param('header_manager', serialize($conf['header_manager'])); 15 18 16 19 $banner = get_banner($_POST['picture_file']); … … 118 121 'picture' => $picture, 119 122 'crop' => hm_get_crop_display($picture), 123 'keep_ratio' => $conf['header_manager']['keep_ratio'], 120 124 )); 121 125 } -
extensions/header_manager/admin/template/add.tpl
r26299 r26308 17 17 boxHeight: {$crop.box_height}, 18 18 trueSize: [{$picture.width}, {$picture.height}], 19 aspectRatio: {$crop.real_width}/{$crop.real_height},19 {if $keep_ratio}aspectRatio: {$crop.real_width}/{$crop.real_height},{/if} 20 20 setSelect: [{$crop.l}, {$crop.t}, {$crop.r}, {$crop.b}], 21 21 onChange: function(sel) { … … 37 37 function() { 38 38 jcrop_api = this; 39 {if $keep_ratio}jQuery(".jcrop-holder").addClass('fixed-ratio');{/if} 39 40 }); 40 41 … … 46 47 jcrop_api.release(); 47 48 } 49 jQuery(".jcrop-holder").toggleClass('fixed-ratio'); 48 50 }); 49 51 }()); … … 60 62 <li><b>{'Width'|translate}:</b> <span id="width"></span>px</li> 61 63 <li><b>{'Height'|translate}:</b> <span id="height"></span>px</li> 62 <li><label><input type="checkbox" name="keep_ratio" checked> {'Respect %s aspect ratio'|translate:($crop.desired_width|cat:'/'|cat:$crop.desired_height)}</label></li>64 <li><label><input type="checkbox" name="keep_ratio" {if $keep_ratio}checked{/if}> {'Respect %s aspect ratio'|translate:($crop.desired_width|cat:'/'|cat:$crop.desired_height)}</label></li> 63 65 </ul> 64 66 -
extensions/header_manager/admin/template/style.css
r24010 r26308 62 62 vertical-align:middle; 63 63 } 64 65 .jcrop-holder.fixed-ratio .ord-s, 66 .jcrop-holder.fixed-ratio .ord-n, 67 .jcrop-holder.fixed-ratio .ord-e, 68 .jcrop-holder.fixed-ratio .ord-w { 69 display:none; 70 }
Note: See TracChangeset
for help on using the changeset viewer.