[buddypress-trac] [BuddyPress] #4816: Add class to whats-new-form re-factor form var to use .closest - global/buddypress.js

buddypress-trac noreply at wordpress.org
Fri Feb 8 16:42:54 UTC 2013


#4816: Add class to whats-new-form re-factor form var to use .closest -
global/buddypress.js
-------------------------+-----------------------------
 Reporter:  hnla         |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Theme        |    Version:  1.7
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 This patch provides a class for the whats-new-form form on submission of
 new update via ajax.

 A class added after submit and existing for the page view state after
 submit and before page re-fresh aids the developer in having a hook that
 represents the ajax action and allows styling based on this event.

 Patch adds the class on submit & removes the class onfocus of the
 textarea.

 Patch also clears up another instance of traversing the DOM tree using
 .parent().parent().parent() in favour of the less resource hungry and
 lighter object .closest() to find the submits parent form element -
 relates to older ticket:
 http://buddypress.trac.wordpress.org/ticket/3821#comment:16

 These changes ought to be safe, class can be ignored and not effect
 established themes.

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


More information about the buddypress-trac mailing list