[buddypress-trac] [BuddyPress Trac] #5364: Collapsible feature is not working in component single item administration screens
buddypress-trac
noreply at wordpress.org
Thu Jan 30 21:23:26 UTC 2014
#5364: Collapsible feature is not working in component single item administration
screens
----------------------------+-----------------------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 2.0
Component: Administration | Version: 1.9.1
Severity: normal | Keywords: has-patch 2nd-opinion
----------------------------+-----------------------------------
Sarah (@pollyplummer) alerted me that the collapsible feature was not
working on the new "Community Profile" administration screen. I remembered
same behavior was happening in single Group Administration screen and in
single Activity Administration screen.
I've dived a little in WordPress javascripts we are enqueueing to benefit
from this feature. And i've found that the problem was linked to the
script comment.js. We enqueue it in Groups single item, Activity single
item and Community profile.
comment.js uses this function
{{{postboxes.add_postbox_toggles('comment');}}} and as a result the page
argument of the save state function is "comment" instead of the right
administration page id.
I think Groups single item and Community profile doesn't need this script,
so we might simply avoid enqueueing it to make the collapsible feature
work (+ user options saved).
Activity single item Administration screen needs it in order to change the
date of the activity. Hopefully the admin.js of this component is loaded
after comment.js so we can rerun the postboxes.add_postbox_toggles in
favor of the right administration page id.
That's what i've attached in the patch. I've tested and it seems to solve
the trouble : collapsible works and the states are saved.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5364>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list