Changeset 10846
- Timestamp:
- 03/27/2009 04:45:55 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-header.php
r10623 r10846 80 80 wp_enqueue_script('farbtastic'); 81 81 elseif ( 2 == $step ) 82 wp_enqueue_script(' cropper');82 wp_enqueue_script('jcrop'); 83 83 } 84 84 … … 91 91 $step = $this->step(); 92 92 93 if ( 1 == $step ) {93 if ( 1 == $step ) 94 94 wp_enqueue_style('farbtastic'); 95 } 95 elseif ( 2 == $step ) 96 wp_enqueue_style('jcrop'); 96 97 } 97 98 … … 216 217 function js_2() { ?> 217 218 <script type="text/javascript"> 218 function onEndCrop( coords , dimensions) {219 jQuery( '#x1' ).val(coords.x 1);220 jQuery( '#y1' ).val(coords.y 1);219 function onEndCrop( coords ) { 220 jQuery( '#x1' ).val(coords.x); 221 jQuery( '#y1' ).val(coords.y); 221 222 jQuery( '#x2' ).val(coords.x2); 222 223 jQuery( '#y2' ).val(coords.y2); 223 jQuery( '#width' ).val( dimensions.width);224 jQuery( '#height' ).val( dimensions.height);224 jQuery( '#width' ).val(coords.w); 225 jQuery( '#height' ).val(coords.h); 225 226 } 226 227 … … 241 242 } 242 243 } 243 new Cropper.Img( 244 'upload', 245 { 246 ratioDim: { x: xinit, y: yinit }, 247 displayOnInit: true, 248 onEndCrop: onEndCrop 249 } 250 ) 244 245 $('#upload').Jcrop({ 246 aspectRatio: ratio, 247 setSelect: [ 0, 0, xinit, yinit ], 248 onSelect: onEndCrop 249 }); 251 250 }); 252 251 </script> -
trunk/wp-includes/script-loader.php
r10845 r10846 168 168 $scripts->add_data( 'thickbox', 'group', 1 ); 169 169 170 170 $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.5'); 171 171 172 if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) { 172 173 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031'); … … 449 450 $styles->add( 'theme-install', '/wp-admin/css/theme-install.css', array(), '20090319' ); 450 451 $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' ); 452 $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.5' ); 451 453 452 454 foreach ( $rtl_styles as $rtl_style )
Note: See TracChangeset
for help on using the changeset viewer.