Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 5 years ago

#5799 closed enhancement (fixed)

Save state of postboxes on page/link pages

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

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 19 years ago.
page.js​ (91 bytes ) - added by nbachiyski 19 years ago.
slug.js​ (1.6 KB ) - added by nbachiyski 19 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ryan
19 years ago

  • Resolution → fixed
  • Status new → closed

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

#2 @azaozz
19 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
19 years ago

  • Resolution fixed
  • Status closed → reopened

#4 @ryan
19 years ago

  • Resolution → fixed
  • Status reopened → closed

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

#5 @ryan
19 years ago

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

#6 @nbachiyski
19 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.