Commit Graph

132 Commits

Author SHA1 Message Date
Daryl Koopersmith
688b8de348 Media: Display WordPress and plupload error messages whenever an upload fails. see #22243, #22186, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 10:56:10 +00:00
Daryl Koopersmith
1e472d8974 Media: Add global upload progress to the sidebar. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 09:32:21 +00:00
Daryl Koopersmith
e63ef3a443 Media: Move sidebar from the frame view to the attachment browser view. Prevents juggling sidebar visibility state, and makes managing sidebar contents more reasonable. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 06:30:25 +00:00
Daryl Koopersmith
98494fdfe1 Media: Check to see if we need more attachments when the browser is attached to the DOM. fixes #22480, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 03:19:08 +00:00
Daryl Koopersmith
f80e93ebf8 Media: Convert the attachments browser to use internal views. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 01:43:31 +00:00
Daryl Koopersmith
de54f9318f Media: Make priority list views leverage the subview management class. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 00:41:39 +00:00
Daryl Koopersmith
4aa6a83d47 Media: Rename PriorityList's add/remove methods to set/unset (to prevent the default remove from being overridden). see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 20:43:42 +00:00
Daryl Koopersmith
452c486d5f Media: Refresh the window-wide uploader whenever a state is activated. Properly unbind controller events. fixes #22504, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 20:34:46 +00:00
Daryl Koopersmith
1923278143 Media: Make the window-wide uploader a subview of the frame view.
Allows the uploader to leverage the ready event to know when it has been attached to the page.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 20:27:49 +00:00
Daryl Koopersmith
1480429ec0 Media: Make inline uploader use main dispose method. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 19:54:06 +00:00
Daryl Koopersmith
f8630d2be3 Media: Remove unused variable for state attributes. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 19:21:08 +00:00
Daryl Koopersmith
b5335a5d24 Media: Make the upload state a dedicated screen, instead of including its own library view. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 18:29:53 +00:00
Daryl Koopersmith
7de56d32db Media: Use a more specific class for toolbar buttons. see #22284, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 17:50:02 +00:00
Daryl Koopersmith
5cecff80b8 Media: Calculate image width and height when embedding images. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 14:32:52 +00:00
Daryl Koopersmith
5e39581c13 Media: Remove redundant code.
Make the composite gallery library use `mirror` instead of `observe`, as one method now invokes the other. Also, make `mirror` return the attachment collection for chaining.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 12:11:38 +00:00
Daryl Koopersmith
ff482e86fb Media: Add filters for image-only libraries. see #22514, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 11:04:23 +00:00
Daryl Koopersmith
5b11aea8f5 Media: Dynamically generate attachment filters using get_post_mime_types().
Moves `get_post_mime_types()` from `wp-admin/includes/post.php` to `wp-includes/post.php`.

fixes #22514, see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 10:18:59 +00:00
Daryl Koopersmith
a763641235 Media: Remove debug cruft. props ocean90. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 09:28:58 +00:00
Daryl Koopersmith
46bc46d88a Media: Dropping images on the edit gallery view will automatically add those images to the gallery. fixes #22521, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 08:17:45 +00:00
Daryl Koopersmith
d63026f2ba Media: Maintain event bindings in the main embed view. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 14:44:23 +00:00
Daryl Koopersmith
e25565f4b7 Media: Allow all galleries to be sortable. fixes #22488, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 14:04:59 +00:00
Daryl Koopersmith
6fb316b1fb Media: Add filters to the media library. fixes #22514, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 13:49:35 +00:00
Daryl Koopersmith
9350f67e28 Media: Refresh the attachment display settings when the active attachment finishes uploading. fixes #22452, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 11:57:08 +00:00
Daryl Koopersmith
31c525b289 Media: Remove dead dropdown code from button view. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 11:29:00 +00:00
Daryl Koopersmith
220a5175d5 Media: Attachment checkboxes now function as such. fixes #22462, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 11:10:04 +00:00
Daryl Koopersmith
d4744fda0a Media: Prevent undefined errors when media scripts are enqueued outside of wp_enqueue_media(). fixes #22495, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 01:48:37 +00:00
Daryl Koopersmith
05db7000c4 Media: Detect when views are added to the DOM and fire a ready event. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 00:53:02 +00:00
Daryl Koopersmith
663cde2c51 Media: Add render tracking to views. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 22:48:11 +00:00
Daryl Koopersmith
e6943d1033 Media: Add silent options to the views; improve documentation. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 12:11:16 +00:00
Daryl Koopersmith
028d378322 Media: Add a method to fetch the first subview. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 10:41:24 +00:00
Daryl Koopersmith
31576e6c0c Media: Add documentation to media.Views. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 10:40:49 +00:00
Daryl Koopersmith
549b5f61ae Media: Only show the alignment setting when viewing an image. fixes #21836, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 07:24:47 +00:00
Daryl Koopersmith
1af6c38db3 Media: Add default render method to views.
* Use default `render` method in the `Frame` view.
* Rename `Views.attach` to `Views.insert`.
* Add `Views.all` to retrieve all subviews.
* Add `Views.detach` to detach all subviews.
* Detect whether views are going to be reused in `View.set` and `detach` them instead of calling `dispose`.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 06:02:00 +00:00
Daryl Koopersmith
473583a4f4 Media: Allow subviews to be inserted at a specific index. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 04:41:57 +00:00
Daryl Koopersmith
795ba27d10 Media: Convert the attachments browser view's destroy method to the newer dispose method. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 03:33:29 +00:00
Daryl Koopersmith
ff204257db Media: Remove unused batch edit states and strings. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 03:11:48 +00:00
Daryl Koopersmith
25ebc64c20 Media: Remove debug cruft from [22655]. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 02:44:34 +00:00
Daryl Koopersmith
561f01bd79 Media: Optimize media models.
* Merge `Composite` model with general `Attachments` model, as `Attachments.validate` and `Composite.evaluate` were functionally equivalent.
* Queries should only watch `wp.Uploader.queue`, as watching `Attachments.all` results in queries attempting to add attachments before their properties are set (which then results a few too many irrelevant adds/removes). `Attachments.all` should potentially be removed or rethought.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 02:43:10 +00:00
Daryl Koopersmith
10eada54dc Media: Move Attachments view preventDefault handler to the events object. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 01:17:30 +00:00
Daryl Koopersmith
13a3cc30b2 Media: Allow for the views manager to be extended. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 00:54:18 +00:00
Daryl Koopersmith
4256ba0b48 Media: Add a base view class.
* Centralizes view and subview management, unifying several disjointed constructs.
* Utilizes the `dispose` functionality found in Backbone master, providing a standard method for memory management.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 00:36:47 +00:00
Daryl Koopersmith
b57d3ff767 Media: zIndex peace was only temporary.
Revert [22611] in favor of using plupload's `container` setting. Turns out, plupload's flash shim is forced to the exact same index as the admin bar, so balancing the two is better solved by nesting the shim.

see #22441, #22446, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-16 10:30:36 +00:00
Daryl Koopersmith
24910d5c06 Media: Only show the edit selection link for the media library. Make the upload attachments list sortable. Only retain the silent option when running Attachments.validate(). see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-15 03:09:35 +00:00
Daryl Koopersmith
79c74bbe1e Media: Enter batch insert workflow by editing the selection instead of having an explicit button. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-15 02:36:06 +00:00
Daryl Koopersmith
511c14e4ed Media: Unify the "Insert" and "Insert.Post" toolbars. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 22:40:34 +00:00
Daryl Koopersmith
8227b30046 Media: Improve image size-related UI and code.
* Add dimensions to the "sizes" dropdown.
* Ensure a `full` size is generated in `wp_prepare_attachment_for_js()`.
* Print the dimensions for the full size in the attachment summary (instead of those for the current size).
* When generating the attachment view's template, map `imageSize()` to the `size` property instead of overriding the default data.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 22:08:02 +00:00
Daryl Koopersmith
8e775dff4b Media: Better image detection in the embed from URL tab. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-13 03:33:41 +00:00
Daryl Koopersmith
8c73f531b9 Media: Add an "upload more files" button to upload states. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-12 23:52:17 +00:00
Daryl Koopersmith
1ec12cccb9 Media: Allow successive embed URLs. see [22547], #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-12 06:02:03 +00:00
Daryl Koopersmith
2d87f983ad Media: Add Embed from URL tab.
Note: There is a bug that currently blocks adding several successive embeds.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-12 05:57:12 +00:00