Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 4 years ago

#5799 closed enhancement (fixed)

Save state of postboxes on page/link pages

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: js postboxes
Focuses: Cc:

Description

Current: opening/closing a postbox on one of the three pages, which have them: post, page, link makes the state of the other two pages empty out

Should be: every page should keep its own list of closed boxes, and not keep them in one option

The patch abstracts keeping the state of the boxes, introducing one more level -- page. The states are now kept in option named closedpostboxes_$page.

The patch also takes out some more common javascript to post/page in another js file: slug.js Page creation page doesn't load the whole post.js file, but has its own page.js.

Finally the patch, adds nonces for the closed-postboxes admin-ajax action.

Attachments (3)

postboxes-on-all-pages.diff (17.2 KB) - added by nbachiyski 17 years ago.
page.js (91 bytes) - added by nbachiyski 17 years ago.
slug.js (1.6 KB) - added by nbachiyski 17 years ago.

Download all attachments as: .zip

Change History (9)

@nbachiyski
17 years ago

@nbachiyski
17 years ago

#1 @ryan
17 years ago

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

(In [6761]) Postbox save updates and admin js refactoring from nbachiyski. fixes #5799

#2 @azaozz
17 years ago

This all is well, but post.js also includes the switchEditors functions, the js version of wpautop, TinyMCE's cleanup callback, etc. and now they're not included on page.php, so the editor is broken.

They can, of course, be put in a separate file, but that's another file to load. There are already 12-13 js files loaded on the write/edit page.

They can also be added directly to tiny_mce_gzip, but the idea was to be able to use them even when TinyMCE is not used.

#3 @ryan
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#4 @ryan
17 years ago

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

(In [6770]) Move editor js to editor.js. fixes #5799

#5 @ryan
17 years ago

Even though it's yet another file, I created editor.js for now.

#6 @nbachiyski
17 years ago

I think we should not fear to create new js files, because we can combine them in whatever way we want, using the script loader.

Note: See TracTickets for help on using tickets.