Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 11:15:54 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Fix bug with confirm JS not working on AJAX refreshed activity streams. Props boonegorges. Fixes #4458.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r6558 r6597  
    1414                wp_print_scripts( 'jquery' ); ?>
    1515
    16         <script type="text/javascript"> jQuery(document).ready( function() { jQuery("a.confirm").click( function() { if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) ) return true; else return false; }); });</script>
    17 
     16        <script type="text/javascript">
     17                jQuery( document ).ready( function() {
     18                        jQuery( 'body' ).click( function(e) {
     19                                if ( 'a' == e.target.nodeName.toLowerCase() && jQuery(e.target).hasClass( 'confirm' ) ) {
     20                                        if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) )
     21                                                return true; else return false;
     22                                } else {
     23                                        return true;
     24                                }
     25                        });
     26                });
     27        </script>
    1828<?php
    1929}
    … …  
    5464                $aspect_ratio = $full_width / $full_height;
    5565
    56         $width  = $image[0] / 2;
    57         $height = $image[1] / 2;
     66                $width  = $image[0] / 2;
     67                $height = $image[1] / 2;
    5868?>
    5969
Note: See TracChangeset for help on using the changeset viewer.