Skip to:
Content

BuddyPress.org

Changeset 9058


Ignore:
Timestamp:
10/02/2014 07:13:10 PM (12 years ago)
Author:
boonebgorges
Message:

Add 'bp-ajax-message' class to message divs returned in AJAX responses.

This allows for better styling of these dynamically created items.

Fixes #5918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r9054 r9058  
    706706
    707707        if ( empty( $_POST['content'] ) )
    708                 exit( '-1<div id="message" class="error"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' );
     708                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' );
    709709
    710710        $activity_id = 0;
     
    721721
    722722        if ( empty( $activity_id ) )
    723                 exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update; please try again.', 'buddypress' ) . '</p></div>' );
     723                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem posting your update; please try again.', 'buddypress' ) . '</p></div>' );
    724724
    725725        $last_recorded = ! empty( $_POST['since'] ) ? date( 'Y-m-d H:i:s', intval( $_POST['since'] ) ) : 0;
     
    773773
    774774        if ( empty( $_POST['content'] ) ) {
    775                 exit( '-1<div id="message" class="error"><p>' . esc_html__( 'Please do not leave the comment area blank.', 'buddypress' ) . '</p></div>' );
     775                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html__( 'Please do not leave the comment area blank.', 'buddypress' ) . '</p></div>' );
    776776        }
    777777
    778778        if ( empty( $_POST['form_id'] ) || empty( $_POST['comment_id'] ) || ! is_numeric( $_POST['form_id'] ) || ! is_numeric( $_POST['comment_id'] ) ) {
    779                 exit( '-1<div id="message" class="error"><p>' . esc_html( $feedback ) . '</p></div>' );
     779                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html( $feedback ) . '</p></div>' );
    780780        }
    781781
     
    792792                }
    793793
    794                 exit( '-1<div id="message" class="error"><p>' . esc_html( $feedback ) . '</p></div>' );
     794                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html( $feedback ) . '</p></div>' );
    795795        }
    796796
     
    853853
    854854        if ( ! bp_activity_delete( array( 'id' => $activity->id, 'user_id' => $activity->user_id ) ) )
    855                 exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' );
     855                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' );
    856856
    857857        do_action( 'bp_activity_action_delete_activity', $activity->id, $activity->user_id );
     
    889889
    890890        if ( ! bp_activity_delete_comment( $comment->item_id, $comment->id ) )
    891                 exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' );
     891                exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' );
    892892
    893893        do_action( 'bp_activity_action_delete_activity', $_POST['id'], $comment->user_id );
Note: See TracChangeset for help on using the changeset viewer.