Commit Graph

34 Commits

Author SHA1 Message Date
Andrew Nacin
adbf36d393 Fix JSHint errors in wp-plupload.js.
props atimmer.
fixes #26044.

Built from https://develop.svn.wordpress.org/trunk@26213


git-svn-id: http://core.svn.wordpress.org/trunk@26121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 14:27:09 +00:00
Sergey Biryukov
8d659b278c Fix docblock formatting. fixes #25893.
Built from https://develop.svn.wordpress.org/trunk@26081


git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Mark Jaquith
0e5fcefe03 Ignore failed uploads. props koopersmith. fixes #22849
git-svn-id: http://core.svn.wordpress.org/trunk@23162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-10 22:58:28 +00:00
Andrew Nacin
c29cae34d0 Properly apply CSS and an ID attribute to the select files container. props koopersmith. fixes #22780. see #22762.
git-svn-id: http://core.svn.wordpress.org/trunk@23100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-06 07:00:41 +00:00
Ryan Boren
52a9a8cb81 Fix uploads in IE9
Props koopersmith
fixes #22762


git-svn-id: http://core.svn.wordpress.org/trunk@23079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-05 21:21:17 +00:00
Daryl Koopersmith
81d474cda0 Toggle display of plupload overlays when the select files button is hidden. see #22732.
git-svn-id: http://core.svn.wordpress.org/trunk@23053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-05 00:45:21 +00:00
Ryan Boren
63662a9b7b In the QuickPress media modal, use the new post id when a post is published.
Props nacin, koopersmith
fixes #22673


git-svn-id: http://core.svn.wordpress.org/trunk@22994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-03 07:17:10 +00:00
Andrew Nacin
d8c942f26c wp.media instead of just media. props alexkingorg, see #22676.
git-svn-id: http://core.svn.wordpress.org/trunk@22974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-02 19:24:22 +00:00
Ryan Boren
b73c43e0e2 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: http://core.svn.wordpress.org/trunk@22951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-30 15:11:44 +00:00
Daryl Koopersmith
14af860aab Uploader: Display a more specific error message when a file exceeds the file size limit. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-22 12:18:17 +00:00
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
095093e390 Uploader: Route plupload errors to the correct handler and prevent naming conflicts. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 20:17:25 +00:00
Daryl Koopersmith
46020c6dd0 Uploader: Correctly trigger error callback. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 20:12:02 +00:00
Daryl Koopersmith
fd78be75d9 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: http://core.svn.wordpress.org/trunk@22709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 11:52:08 +00:00
Daryl Koopersmith
498e4c1366 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: http://core.svn.wordpress.org/trunk@22543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-11 05:16:41 +00:00
Daryl Koopersmith
53ccb09bce 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: http://core.svn.wordpress.org/trunk@22320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-28 23:29:17 +00:00
Daryl Koopersmith
1baac22e9d Improve the lazy instantiation of the 'wp' JavaScript variable. props evansolomon, fixes #22113.
git-svn-id: http://core.svn.wordpress.org/trunk@22126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-06 00:43:36 +00:00
Daryl Koopersmith
336cd3d632 When uploading files through the Plupload bridge, attempt to detect images on upload. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 05:52:42 +00:00
Daryl Koopersmith
7fb2c8b4f7 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: http://core.svn.wordpress.org/trunk@21814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 16:55:58 +00:00
Daryl Koopersmith
fefc19f7be Do not instantiate a Plupload instance when the wp-plupload bridge has neither a browse button nor a dropzone. fixes #21707.
git-svn-id: http://core.svn.wordpress.org/trunk@21722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 04:10:00 +00:00
Daryl Koopersmith
c2e9648620 Improve consistency in wp.Uploader callbacks; pass file objects to all handlers. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-29 19:56:42 +00:00
Daryl Koopersmith
0015503c26 Allow elements within a wp.Uploader dropzone to be repositioned when the drag-over class is added. fixes #21705.
git-svn-id: http://core.svn.wordpress.org/trunk@21630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-27 22:20:23 +00:00
Andrew Nacin
2710bcade1 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: http://core.svn.wordpress.org/trunk@21592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-23 00:04:18 +00:00
bumpbot
50b0511449 Compress scripts/styles: 3.5-alpha-21382.
git-svn-id: http://core.svn.wordpress.org/trunk@21382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 02:58:20 +00:00
bumpbot
d15f104e4b Compress scripts/styles: 3.4-RC1-21015.
git-svn-id: http://core.svn.wordpress.org/trunk@21015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-06 21:51:13 +00:00
bumpbot
71b00f37aa Compress scripts/styles: 3.4-beta4-20929.
git-svn-id: http://core.svn.wordpress.org/trunk@20929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-26 05:58:26 +00:00
bumpbot
e12aedf713 Compress scripts/styles: 3.4-beta4-20762.
git-svn-id: http://core.svn.wordpress.org/trunk@20762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-10 00:58:25 +00:00
bumpbot
572fc170fe Compress scripts/styles: 3.4-beta4-20760.
git-svn-id: http://core.svn.wordpress.org/trunk@20760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-09 21:58:31 +00:00
bumpbot
f92e8411f8 Compress scripts/styles: 3.4-beta3-20578.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-24 19:58:21 +00:00
bumpbot
ca047faab9 Compress scripts/styles: 3.4-beta2-20546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-20 02:58:21 +00:00
bumpbot
3c1ed96efe Compress scripts/styles: 3.4-alpha-20296.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 04:58:24 +00:00
bumpbot
88fbf34f8f Compress scripts/styles: 3.4-alpha-20180.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 04:15:22 +00:00
koopersmith
c06576d410 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: http://svn.automattic.com/wordpress/trunk@20179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 04:14:05 +00:00