Skip to:
Content

BuddyPress.org

Ticket #8439: 8439.patch

File 8439.patch, 794 bytes (added by imath, 6 years ago)
  • src/bp-core/bp-core-cssjs.php

    diff --git src/bp-core/bp-core-cssjs.php src/bp-core/bp-core-cssjs.php
    index 5e5691f51..c8d34388d 100644
    function bp_core_add_cropper_inline_js() {  
    300300        ?>
    301301
    302302        <script type="text/javascript">
    303                 jQuery(window).load( function(){
    304                         jQuery('#avatar-to-crop').Jcrop({
     303                jQuery( window ).on( 'load', function() {
     304                        jQuery( '#avatar-to-crop' ).Jcrop( {
    305305                                onChange: showPreview,
    306306                                onSelect: updateCoords,
    307307                                aspectRatio: <?php echo (int) $aspect_ratio; ?>,
    308308                                setSelect: [ <?php echo (int) $crop_left; ?>, <?php echo (int) $crop_top; ?>, <?php echo (int) $crop_right; ?>, <?php echo (int) $crop_bottom; ?> ]
    309                         });
    310                 });
     309                        } );
     310                } );
    311311
    312312                function updateCoords(c) {
    313313                        jQuery('#x').val(c.x);