Skip to:
Content

BuddyPress.org

Changeset 7000


Ignore:
Timestamp:
05/06/2013 12:09:17 AM (11 years ago)
Author:
boonebgorges
Message:

When activity comments are deleted via AJAX, remove them from the DOM entirely

Previously, deleted comments were merely hidden using jQuery.fadeOut(). As a
result, when the show/hide comment button was toggled - applying $.show() to
all comment items - the comments would appear again, even though they had been
deleted from the server. Removing them from the DOM ensures that this won't
happen.

See #4844

Props merty

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/js/buddypress.js

    r6974 r7000  
    511511                            child_count++;
    512512                    });
    513                     comment_li.fadeOut(200);
     513                    comment_li.fadeOut(200, function() {
     514                        comment_li.remove();
     515                    });
    514516
    515517                    /* Decrease the "Reply (X)" button count */
  • trunk/bp-themes/bp-default/_inc/global.js

    r6940 r7000  
    505505                            child_count++;
    506506                    });
    507                     comment_li.fadeOut(200);
     507                    comment_li.fadeOut(200, function() {
     508                        comment_li.remove();
     509                    });
    508510
    509511                    /* Decrease the "Reply (X)" button count */
Note: See TracChangeset for help on using the changeset viewer.