Commit Graph

32 Commits

Author SHA1 Message Date
Mark Jaquith b7a4314cbc Ignore failed uploads. props koopersmith. fixes #22849
git-svn-id: https://develop.svn.wordpress.org/trunk@23162 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-10 22:58:28 +00:00
Andrew Nacin 3403c1d157 Properly apply CSS and an ID attribute to the select files container. props koopersmith. fixes #22780. see #22762.
git-svn-id: https://develop.svn.wordpress.org/trunk@23100 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 07:00:41 +00:00
Ryan Boren f549a8baa6 Fix uploads in IE9
Props koopersmith
fixes #22762


git-svn-id: https://develop.svn.wordpress.org/trunk@23079 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 21:21:17 +00:00
Daryl Koopersmith eae68af55c Toggle display of plupload overlays when the select files button is hidden. see #22732.
git-svn-id: https://develop.svn.wordpress.org/trunk@23053 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 00:45:21 +00:00
Ryan Boren 71d333f660 In the QuickPress media modal, use the new post id when a post is published.
Props nacin, koopersmith
fixes #22673


git-svn-id: https://develop.svn.wordpress.org/trunk@22994 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 07:17:10 +00:00
Andrew Nacin a83710408f `wp.media` instead of just `media`. props alexkingorg, see #22676.
git-svn-id: https://develop.svn.wordpress.org/trunk@22974 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 19:24:22 +00:00
Ryan Boren d7ec10376b Update the "Uploaded to this post" filter view when uploading new files.
* Add an Attachments collection filter for uploadedTo (post_parent).
* Correct an erroneous map from the non-existent parent prop to post_parent.
* Define default menuOrder and uploadedTo props for uploading attachments.
* Unify filterable props into a single method (improving validation performance for calls to set with multiple properties).

Props koopersmith
fixes #22654


git-svn-id: https://develop.svn.wordpress.org/trunk@22951 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:11:44 +00:00
Daryl Koopersmith 6841b73925 Uploader: Display a more specific error message when a file exceeds the file size limit. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22822 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 12:18:17 +00:00
Daryl Koopersmith b007f89d0d Media: Display WordPress and plupload error messages whenever an upload fails. see #22243, #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22818 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 10:56:10 +00:00
Daryl Koopersmith ff6ae18d2d Media: Add global upload progress to the sidebar. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22816 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 09:32:21 +00:00
Daryl Koopersmith 8be5a507aa Uploader: Route plupload errors to the correct handler and prevent naming conflicts. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22789 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 20:17:25 +00:00
Daryl Koopersmith afa98fa041 Uploader: Correctly trigger error callback. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22788 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 20:12:02 +00:00
Daryl Koopersmith e707481dcf Media Uploader: Change an uploaded attachment's 'updating' key with the rest of the returned attributes to allow events bound to 'change:updating' to access the new properties. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22709 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 11:52:08 +00:00
Daryl Koopersmith 9cd3c458c7 Media: Ensure variables in the attachment details template have defined defaults.
* Adds styling to the upload progress bar in the attachment details template.
* Defines the `filename` attribute when Plupload creates the client-side `Attachment` model.

fixes #22410, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22543 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 05:16:41 +00:00
Daryl Koopersmith 15c451d2f6 Give media a heart transplant.
Revises the concept of the media controller and workspace views (i.e. two central points of control) to be more granular. The main media object is now the `Frame`, which is a hybrid view and state machine.

The state machine is a collection of states, which are just generic instances of `Backbone.Model`. This circumvents the problem of juggling global parameters when changing states. Each state contains its own event loop. All events are also forwarded to the frame itself (as is the case in all model/collection relationships).

The frame view contains several regions, each of which can be overridden without harming or re-rendering the other regions. These work well when used in conjunction with the state machine events.

This removes the upload sidebar (don't worry, visible upload UI will return). Drag and drop uploading still works. The ability to upload has been abstracted into its own view (instead of being attached to the central workspace view).

Editing galleries is temporarily broken — the gallery creation and editing experiences will be unified in a future patch.

Adds events to detect dragging changes in `wp.Uploader` and adds methods to detect and leverage browser support for CSS3 transitions.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22320 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 23:29:17 +00:00
Daryl Koopersmith a165bdfb83 Improve the lazy instantiation of the 'wp' JavaScript variable. props evansolomon, fixes #22113.
git-svn-id: https://develop.svn.wordpress.org/trunk@22126 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-06 00:43:36 +00:00
Daryl Koopersmith 424f5b21e6 When uploading files through the Plupload bridge, attempt to detect images on upload. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22041 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 05:52:42 +00:00
Daryl Koopersmith 1cc9c42bc4 Use JS Attachment models in wp.Uploader. fixes #21868.
Moves the uploading Attachments queue from the media workspace view to the uploader itself. This ensures that all attachments are added to the central attachmnet store.

Updates wp.Uploader to pass Attachment models to callbacks instead of Plupload file objects. Attachments in the process of uploading have a reference to the file object (which can be fetched by calling `attachment.get('file');`).

Also updates the customizer to be compatible with the API changes.


git-svn-id: https://develop.svn.wordpress.org/trunk@21814 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 16:55:58 +00:00
Daryl Koopersmith aa1446319d Do not instantiate a Plupload instance when the wp-plupload bridge has neither a browse button nor a dropzone. fixes #21707.
git-svn-id: https://develop.svn.wordpress.org/trunk@21722 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 04:10:00 +00:00
Daryl Koopersmith ff1dd048f4 Improve consistency in wp.Uploader callbacks; pass file objects to all handlers. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21656 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-29 19:56:42 +00:00
Daryl Koopersmith 5d3e630f2b Allow elements within a wp.Uploader dropzone to be repositioned when the drag-over class is added. fixes #21705.
git-svn-id: https://develop.svn.wordpress.org/trunk@21630 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-27 22:20:23 +00:00
Andrew Nacin db981a3b27 Switch to .min for compressed JS and CSS files.
* This moves our "development" versions from .dev.js to .js (same for css).
 * The compressed version then moves from .js to .min.js (same for css).

By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.

fixes #21633.



git-svn-id: https://develop.svn.wordpress.org/trunk@21592 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 00:04:18 +00:00
bumpbot 1f6ab35e33 Compress scripts/styles: 3.5-alpha-21382.
git-svn-id: https://develop.svn.wordpress.org/trunk@21382 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-01 02:58:20 +00:00
bumpbot 028e1c35cf Compress scripts/styles: 3.4-RC1-21015.
git-svn-id: https://develop.svn.wordpress.org/trunk@21015 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-06 21:51:13 +00:00
bumpbot 00bccb6d74 Compress scripts/styles: 3.4-beta4-20929.
git-svn-id: https://develop.svn.wordpress.org/trunk@20929 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-26 05:58:26 +00:00
bumpbot 5b4edeb721 Compress scripts/styles: 3.4-beta4-20762.
git-svn-id: https://develop.svn.wordpress.org/trunk@20762 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-10 00:58:25 +00:00
bumpbot 243ecb7b13 Compress scripts/styles: 3.4-beta4-20760.
git-svn-id: https://develop.svn.wordpress.org/trunk@20760 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-09 21:58:31 +00:00
bumpbot 1235945716 Compress scripts/styles: 3.4-beta3-20578.
git-svn-id: https://develop.svn.wordpress.org/trunk@20578 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-24 19:58:21 +00:00
bumpbot 909935606a Compress scripts/styles: 3.4-beta2-20546.
git-svn-id: https://develop.svn.wordpress.org/trunk@20546 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-20 02:58:21 +00:00
bumpbot 4d703df740 Compress scripts/styles: 3.4-alpha-20296.
git-svn-id: https://develop.svn.wordpress.org/trunk@20296 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-28 04:58:24 +00:00
bumpbot 5f9f15402c Compress scripts/styles: 3.4-alpha-20180.
git-svn-id: https://develop.svn.wordpress.org/trunk@20180 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 04:15:22 +00:00
Daryl Koopersmith d254551dd7 Theme Customizer: First pass for upload controls, using background image as an example. Add a wrapper for Plupload that allows for custom upload UIs. see #19910.
wp.Uploader is a wrapper that provides a simple way to upload an attachment (using the wp_ajax_upload_attachment handler). It is intentionally decoupled from the UI. When an upload succeeds, it will receive the attachment information (id, url, meta, etc) as a JSON response. If the upload fails, the wrapper handles both WordPress and plupload errors through a single handler.

As todos, we should add drag classes for the uploader dropzone and account for the rough 100mb filesize limit in most browsers. The UI for the customizer upload controls could be improved as well.

git-svn-id: https://develop.svn.wordpress.org/trunk@20179 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 04:14:05 +00:00