Ticket #11325: 11325.2.diff
| File 11325.2.diff, 1.7 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/js/image-edit.js
385 385 }, 386 386 387 387 setCropSelection : function(postid, c) { 388 var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128',388 var sel, 389 389 sizer = this.hold.sizer; 390 min = min.split(':');391 390 c = c || 0; 392 391 393 392 if ( !c || ( c.width < 3 && c.height < 3 ) ) { … … 399 398 return false; 400 399 } 401 400 402 if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) {403 this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0);404 $('#imgedit-selection-' + postid).val('');405 return false;406 }407 408 401 sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height }; 409 402 this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1); 410 403 $('#imgedit-selection-' + postid).val( JSON.stringify(sel) ); -
src/wp-admin/includes/image-edit.php
170 170 </div> 171 171 172 172 <input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" /> 173 <input type="hidden" id="imgedit-minthumb-<?php echo $post_id; ?>" value="<?php echo ( get_option('thumbnail_size_w') . ':' . get_option('thumbnail_size_h') ); ?>" />174 173 <input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" /> 175 174 <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" /> 176 175 <input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />