Media: Integrate the gallery workflow with the media menu.

`wp.media.model.Query.more()`
* If a request has already been sent out for more attachments, return that request object instead of creating another.

`wp.media.controller.Region`
* A region allows views to be swapped in and out of a section of the page without either view having to know about the other.
* Application components can use the same callbacks and resources by leveraging `Region.mode()`, which triggers a set of callbacks to create or transform the current view, but only if necessary.

`wp.media.view.Frame`
* Leverage `Region` controllers instead of forcing states to swap view objects, which causes states to fit more comfortably in the controller-camp.
* Add `previous()`, a method to fetch the previous state `id`.
* Separate out the default settings over several objects (so blank frames can be instantiated).

`wp.media.view.MediaFrame`
* The base `Frame` used for media management: handles integration with the `Modal` and `UploaderWindow` views.

`wp.media.view.MediaFrame.Post`
* Includes all default media states and callbacks necessary for inserting media into a post.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22437 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-11-07 20:14:41 +00:00
parent df6d81af5b
commit b636e94e47
7 changed files with 648 additions and 407 deletions

View File

@@ -330,8 +330,9 @@ function wp_default_scripts( &$scripts ) {
'selected' => __( 'selected' ),
// Upload
'uploadFilesTitle' => __( 'Upload Files' ),
'selectFiles' => __( 'Select files' ),
'uploadFilesTitle' => __( 'Upload Files' ),
'selectFiles' => __( 'Select files' ),
'uploadImagesTitle' => __( 'Upload Images' ),
// Library
'mediaLibraryTitle' => __( 'Media Library' ),
@@ -342,8 +343,14 @@ function wp_default_scripts( &$scripts ) {
// Embed
'embedFromUrlTitle' => __( 'Embed From URL' ),
// Batch
'batchInsert' => __( 'Batch insert' ),
'cancelBatchTitle' => __( '← Cancel Batch' ),
// Gallery
'createGalleryTitle' => __( 'Create Gallery' ),
'editGalleryTitle' => __( 'Edit Gallery' ),
'cancelGalleryTitle' => __( '← Cancel Gallery' ),
'insertGallery' => __( 'Insert gallery' ),
'updateGallery' => __( 'Update gallery' ),
'continueEditing' => __( 'Continue editing' ),