[buddypress-trac] [BuddyPress] #4966: Activity Post Form ajax submit enhancement

buddypress-trac noreply at wordpress.org
Tue Apr 30 13:29:14 UTC 2013


#4966: Activity Post  Form ajax submit enhancement
-------------------------+-----------------------------
 Reporter:  megainfo     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Activity     |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 It would be great if you change the submit ajax code to give posibility to
 developer to send more input fileds

 why not send serialize the form ?


 the actual code,

 {{{
                 jq.post( ajaxurl, {
                         action: 'post_update',
                         'cookie': encodeURIComponent(document.cookie),
                         '_wpnonce_post_update':
 jq("input#_wpnonce_post_update").val(),
                         'content': content,
                         'object': object,
                         'item_id': item_id,
                         '_bp_as_nonce': jq('#_bp_as_nonce').val() || ''
                 },

 }}}

 To :


 {{{
        jq.post( ajaxurl, {
                         action: 'post_update',
                         'data' :   $("#whats-new-form").serialize(),
                         'cookie': encodeURIComponent(document.cookie),
                         '_wpnonce_post_update':
 jq("input#_wpnonce_post_update").val(),
                         '_bp_as_nonce': jq('#_bp_as_nonce').val() || ''
                 },

 }}}

 I think this will give more flexibility and enhancement.

 thanks.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4966>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list