Commit Graph

55 Commits

Author SHA1 Message Date
Daryl Koopersmith
1851f98eb9 Correct alignment of new buttons in media modal. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 00:48:41 +00:00
Daryl Koopersmith
3ec7265074 The first inklings of a gallery management screen.
* Adds `view.Workspace.Library` and `view.Workspace.Gallery` as extensions of `view.Workspace` to implement the individual screens
* Shifts the toolbar logic that was library-specific from the generic `Workspace` view to `Workspace.Library`.
* Adds a toolbar to the `Gallery` view.
* 'Create a gallery' and 'Return to media library' buttons toggle between the two views.
* 'Insert gallery into post' closes the modal, but does not actually perform its namesake action.
* Note that elements can still be deselected in the gallery view. This will be fixed in a future commit.

Improvements to avoid over-eager event unbinding:
* `Modal` views now properly detach their contents before replacing them with a new element.
* Likewise, `Workspace` views detach their main content blocks when re-rendering the view.

To test the gallery workflow (which is incomplete), run the following in your browser's console:

	`wp.media({ multiple: true });`

see #21809, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 00:34:00 +00:00
Daryl Koopersmith
5b525c0281 Make browser text-selections ignore attachment views. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 22:15:52 +00:00
Daryl Koopersmith
43fc38330a Adds UI for media modal toolbars, buttons, and the selected item(s) status.
Currently uses actions for inserting media into a post as an example (hence the raw text). To test a workflow that supports multiple selection, run the following in your browser's JavaScript console:

	wp.media({ multiple: true });

see #21390, #21808.



git-svn-id: http://core.svn.wordpress.org/trunk@21769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 07:46:15 +00:00
Daryl Koopersmith
c217397faa Add new media workflow scripts, styles, and templates.
Please note that this commit does not integrate media into the existing UI. If you would like to see the new UI, navigate to the post editor and run the following in your browser's Javascript console:

	new wp.media.controller.Workflow().render().modal.open();


The Javascript is broken up into two files, with the slugs media-models and media-views.

* media-models: The models are UI agnostic, and can be used independent of the views. If you'd like to create custom UIs, this is the script for you.

* media-views: This is the Media Experience. The views (and controllers) depend on the models (which are listed as a dependency and will automatically be included thanks to wp_enqueue_script). The views also require the media templates, media-view styles, and the plupload bridge settings. Perhaps we should create a function to include the whole shebang, but in the meantime...

To include media-views in the admin, run the following PHP in or after 'admin_enqueue_scripts':

	wp_enqueue_script( 'media-views' );
	wp_enqueue_style( 'media-views' );
	wp_plupload_default_settings();
	add_action( 'admin_footer', 'wp_print_media_templates' );

see #21390.



git-svn-id: http://core.svn.wordpress.org/trunk@21683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 04:54:23 +00:00