#4816 closed enhancement (fixed)
Add class to whats-new-form re-factor form var to use .closest - global/buddypress.js
Reported by: | hnla | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | normal |
Severity: | normal | Version: | 1.7 |
Component: | Templates | Keywords: | has-patch needs-testing |
Cc: | hnla |
Description
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.
Attachments (2)
Change History (8)
#1
@
12 years ago
- Keywords needs-refresh added; has-patch removed
- Milestone changed from Awaiting Review to Future Release
Patch needs refreshing to make the indentation consistent, and we'll put it in the next next release so we have time to double-check the javascript change.
#3
@
12 years ago
- Keywords has-patch needs-testing added; needs-refresh removed
- Milestone changed from Future Release to 1.8
Adds/removes 'submitted' class to update form - removes use of .parent()