Changeset 13319
- Timestamp:
- Feb 23, 2012, 3:25:41 PM (12 years ago)
- Location:
- extensions/rotateImage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rotateImage/language/en_UK/plugin.lang.php
r12481 r13319 7 7 $lang['90° left'] = '90° left'; 8 8 $lang['180°'] = '180°'; 9 $lang['auto (EXIF orientation tag)'] = 'auto (EXIF orientation tag)'; 9 10 ?> -
extensions/rotateImage/language/fr_FR/plugin.lang.php
r12417 r13319 7 7 $lang['90° left'] = '90° à gauche'; 8 8 $lang['180°'] = '180°'; 9 $lang['auto (EXIF orientation tag)'] = 'automatique (selon le tag d\'orientation EXIF)'; 9 10 ?> -
extensions/rotateImage/rotate_image.tpl
r13314 r13319 1 1 {footer_script} 2 2 var rotateImagesMessage = "{'Images rotation in progress...'|@translate}"; 3 var autoRotateOptionText = "{'auto (EXIF orientation tag)'|@translate}"; 3 4 var ri_pwg_token = '{$RI_PWG_TOKEN}'; 4 5 {literal} 6 jQuery(document).ready(function() { 7 function autoRotateOption() { 8 if (jQuery("#rotate_hd").is(':checked')) { 9 jQuery("<option/>") 10 .attr("id", "autoRotateOption") 11 .attr("value", "auto") 12 .attr("selected", "selected") 13 .text(autoRotateOptionText) 14 .appendTo('select[name="rotate_angle"]') 15 ; 16 } 17 else { 18 jQuery("#autoRotateOption").remove(); 19 } 20 } 21 22 autoRotateOption(); 23 jQuery('#rotate_hd').click(function() { 24 autoRotateOption(); 25 }); 26 5 27 jQuery('#applyAction').click(function(e) { 6 28 if (elements.length != 0) … … 67 89 return false; 68 90 }); 69 91 }); 70 92 {/literal}{/footer_script} 71 93 72 94 <div id="rotate_image" class="bulkAction"> 73 <table style="margin-left:20px;"> 74 <tr> 75 <th id="thumb_width_th">{'Angle'|@translate}</th> 76 <td> 77 <select name="rotate_angle"> 78 {foreach from=$angles item=angle} 79 <option value="{$angle.value}" {if $saved_angle eq $angle.value}selected="selected"{/if}>{$angle.name}</option> 80 {/foreach} 81 </select> 82 </td> 83 </tr> 84 {if $library != 'gd'} 85 <tr> 86 <th><label for="rotate_hd">{'Also rotate HD image'|@translate}</label></th> 87 <td><input type="checkbox" name="rotate_hd" id="rotate_hd" checked="checked"></td> 88 </tr> 89 {/if} 90 </table> 95 {if $library != 'gd'} 96 <p><label> 97 <input type="checkbox" name="rotate_hd" id="rotate_hd" checked="checked"> 98 <strong>{'Also rotate HD image'|@translate}</strong> 99 </label></p> 100 {/if} 101 <p><label> 102 <strong>{'Angle'|@translate}</strong> 103 <br> 104 <select name="rotate_angle"> 105 {foreach from=$angles item=angle} 106 <option value="{$angle.value}" {if $saved_angle eq $angle.value}selected="selected"{/if}>{$angle.name}</option> 107 {/foreach} 108 </select> 109 </label></p> 91 110 </div> -
extensions/rotateImage/ws_functions.inc.php
r13316 r13319 37 37 include_once(PHPWG_ROOT_PATH.'admin/include/image.class.php'); 38 38 $image_id=(int)$params['image_id']; 39 $angle=(int)$params['angle']; 40 $rotate_hd = get_boolean($params['rotate_hd']); 39 41 40 $query=' 42 41 SELECT id, path, tn_ext, has_high … … 50 49 } 51 50 52 if ($rotate_hd and get_boolean($image['has_high'])) { 51 // rotation angle 52 if ('auto' == $params['angle']) { 53 $angle = $params['angle']; 54 } 55 else { 56 $angle = (int)$params['angle']; 57 } 58 59 if (get_boolean($params['rotate_hd']) and get_boolean($image['has_high'])) { 53 60 $to_rotate_path = file_path_for_type($image['path'], 'high'); 54 61 $quality = $conf['upload_form_hd_quality']; 55 62 $regenerate_websize = true; 63 64 if ('auto' == $angle) { 65 $angle = pwg_image::get_rotation_angle($to_rotate_path); 66 } 56 67 } 57 68 else {
Note: See TracChangeset
for help on using the changeset viewer.