Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5610 closed enhancement (fixed)

2.5 Toggle boxes should save

Reported by: matt's profile matt Owned by: nbachiyski's profile nbachiyski
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

The toggle boxes recently added to the write page should save state.

They should save the state in an asynchronous (and possibly batched on unload?) fashion, and save it as box_id + state.

When the page is loaded, it should add the "closed" class to those post boxes which are marked as such in the user's prefs. That way there's no delay and then redrawing, it's all built in to the CSS.

Attachments (3)

save-postboxes-state.diff (3.8 KB) - added by nbachiyski 17 years ago.
cookies.js (717 bytes) - added by nbachiyski 17 years ago.
save-postboxes-state-usermeta.diff (8.3 KB) - added by nbachiyski 17 years ago.
This one saves the list of closed boxes in usermeta instead of in a cookie

Download all attachments as: .zip

Change History (7)

@nbachiyski
17 years ago

#1 @nbachiyski
17 years ago

Here is a patch, which saves in a cookie list of the id's of closed boxes and closes them on page load.

Since the cookie functions were already present in upload.js I took them out in cookies.js.

@nbachiyski
17 years ago

This one saves the list of closed boxes in usermeta instead of in a cookie

#2 @nbachiyski
17 years ago

New patch, which saves the list of closed boxes in usermeta.

#3 @lloydbudd
17 years ago

  • Keywords has-patch added

Context for why cookie based solution discarded, matt:
"there's no reason to save it in a cookie. it's a permanent pref, not session or browser-based"

#4 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6584]) Save toggle box open/closed state. Props nbachiyski. fixes #5610

Note: See TracTickets for help on using tickets.