Ticket #5799 (closed enhancement: fixed)

Opened 10 months ago

Last modified 10 months ago

Save state of postboxes on page/link pages

Reported by: nbachiyski Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords: js postboxes
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

postboxes-on-all-pages.diff (17.2 kB) - added by nbachiyski on 02/08/08 19:02:29.
page.js (91 bytes) - added by nbachiyski on 02/08/08 19:02:51.
slug.js (1.6 kB) - added by nbachiyski on 02/08/08 19:03:05.

Change History

02/08/08 19:02:29 changed by nbachiyski

  • attachment postboxes-on-all-pages.diff added.

02/08/08 19:02:51 changed by nbachiyski

  • attachment page.js added.

02/08/08 19:03:05 changed by nbachiyski

  • attachment slug.js added.

02/08/08 19:57:51 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

02/09/08 11:42:46 changed by azaozz

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.

02/09/08 12:52:11 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.

02/09/08 13:08:28 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

02/09/08 13:09:09 changed by ryan

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

02/10/08 21:41:15 changed by nbachiyski

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.