Commit Graph

1063 Commits

Author SHA1 Message Date
Daryl Koopersmith f6a737ed34 Media: Add Embed from URL tab.
Note: There is a bug that currently blocks adding several successive embeds.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22547 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 05:57:12 +00:00
bumpbot ac3a589c8d Compress scripts/styles: 3.5-beta2-22546.
git-svn-id: https://develop.svn.wordpress.org/trunk@22546 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 22:58:32 +00:00
Daryl Koopersmith e672eb2166 Media in QuickPress: Ensure wpActiveEditor is set when the "Add Media" button is clicked. fixes #22021, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22542 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 01:40:47 +00:00
bumpbot 9c7e947d79 Compress scripts/styles: 3.5-beta2-22540.
git-svn-id: https://develop.svn.wordpress.org/trunk@22540 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 22:58:34 +00:00
Daryl Koopersmith 5096f387d1 Media: Add custom URL as an option to attachment display properties. see #21390, #22206.
git-svn-id: https://develop.svn.wordpress.org/trunk@22537 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 20:36:46 +00:00
Andrew Nacin e655cbc2d1 Use event delegation for Add Media, allowing the event to bubble up to #wpbody. Keeps the Add Media button functional on a second use of QuickPress. fixes #22255.
git-svn-id: https://develop.svn.wordpress.org/trunk@22518 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 04:39:44 +00:00
Andrew Ozz 8081489c94 QuickPress: add some JS to set wpActiveEditor when the title or content is focused, fixes #22021
git-svn-id: https://develop.svn.wordpress.org/trunk@22517 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 03:05:48 +00:00
bumpbot 68f1c2fd82 Compress scripts/styles: 3.5-beta2-22515.
git-svn-id: https://develop.svn.wordpress.org/trunk@22515 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 22:58:35 +00:00
Andrew Nacin 6680184c9e Customizer: Passes focus to the upload tab to avoid focus changing when a drag event occurs from outside the browser. props lessbloat. fixes #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22512 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 20:57:09 +00:00
Daryl Koopersmith 1d6fa49ae2 Integrate media with the custom header page. fixes #21820, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22505 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:59:05 +00:00
Daryl Koopersmith c4b070dd07 Custom Headers: Ensure the ready event fires before fetching the existing headers to apply jQuery.masonry. see #20346, #21820.
git-svn-id: https://develop.svn.wordpress.org/trunk@22504 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:55:20 +00:00
Daryl Koopersmith 9c1f2e577a Integrate media with the custom background page. fixes #21818, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22502 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:37:24 +00:00
Daryl Koopersmith 63dd1ca518 Media JS: Use basic upload/library by default.
`wp.media` now recognizes the `frame` attribute (currently a string; either'select' or 'post') and defaults to using a basic select frame. It also checks for the existence of classes in a safer fashion, as it does not assume the `MediaFrame` property exists.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22495 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 09:59:36 +00:00
Daryl Koopersmith 3da7fa8d1e Customizer: Restrict image control uploaders to only allow image file types. see #22149.
git-svn-id: https://develop.svn.wordpress.org/trunk@22492 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 05:47:02 +00:00
Daryl Koopersmith dd39a3b3d2 Pinking shears. see #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22491 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 05:44:00 +00:00
Andrew Nacin a4c23b9423 Properly set upload context when uploading a background image through the customizer. props kovshenin. fixes #22215.
git-svn-id: https://develop.svn.wordpress.org/trunk@22484 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 03:02:54 +00:00
Daryl Koopersmith b9a5374e64 Media: Add batch insertion workflow. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22480 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 01:44:02 +00:00
bumpbot 08a5af03ed Compress scripts/styles: 3.5-beta2-22475.
git-svn-id: https://develop.svn.wordpress.org/trunk@22475 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 22:58:34 +00:00
Daryl Koopersmith 68d143d20d Media: Improve sidebar handling and make attachment display properties attachment-specific.
`wp.mce.media`
* Watch all workflows for the `insert` event and attempt to insert the current state's `selection` if it exists.
* Fetch and pass attachment display properties through to `wp.media.string.image()`.

`wp.media.controller.Region`
* Separate the concept of events and modes.
* All events triggered on a `Region` trigger both `event` and `event:mode` callbacks.
* When a mode is deactivated, `deactivate` and `deactivate:mode` events are fired.
* When a mode is activated, `activate` and `activate:mode` events are fired.

`wp.media.controller.Library`
* Remove the `details()`, `buildDetails()`, and `clearDetails()` methods that juggled sidebar views. Instead, handle the sidebar views using modes.

`wp.media.controller.Gallery`
* Shift the overloaded `sidebar()` method to use modes.

`wp.media.view.MediaFrame.Post`
* Declare `activate:mode` event bindings using an nested object to reduce repetition.
* Update sidebar activation callbacks.

`wp.media.view.Settings`
* Refactor to leverage HTML data attributes and implicit values (instead of setting the fallback whenever an object was created). This has the additional benefit that gallery shortcode parameters are not output when the user has left them set to the default.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22466 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 14:15:09 +00:00
Andrew Nacin 85efa182f7 Forms with the class .wp-upload-form will now have their submit button disabled until a file is selected. props kovshenin, helenyhou, lessbloat, SergeyBiryukov, tommcfarlin. fixes #20855.
git-svn-id: https://develop.svn.wordpress.org/trunk@22459 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 23:54:03 +00:00
Andrew Nacin 0b66789582 Swatches for the color picker. Improves discoverability of colors especially when the picker is opened with a grayscale color. props mattwiebe. FIXES #21206.
git-svn-id: https://develop.svn.wordpress.org/trunk@22457 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 23:32:03 +00:00
bumpbot 6b78173371 Compress scripts/styles: 3.5-beta2-22455.
git-svn-id: https://develop.svn.wordpress.org/trunk@22456 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:58:33 +00:00
Peter Westwood 2bd843f1e7 Post UI: Provide visual feedback to the user if they try to set an invalid date for a post. Fixes #17180 props jkudish.
git-svn-id: https://develop.svn.wordpress.org/trunk@22442 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:31:08 +00:00
bumpbot 7ec25963e0 Compress scripts/styles: 3.5-beta2-22438. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22438 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:29:58 +00:00
Daryl Koopersmith b636e94e47 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
2012-11-07 20:14:41 +00:00
bumpbot 75201ce1e5 Compress scripts/styles: 3.5-beta2-22407.
git-svn-id: https://develop.svn.wordpress.org/trunk@22407 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:58:35 +00:00
Andrew Nacin b59c8c73f1 Revert [22387]. see #14466. see #22374.
git-svn-id: https://develop.svn.wordpress.org/trunk@22406 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:36:24 +00:00
Andrew Nacin 67ac51fe73 Keyboard accessibility for the theme customizer. props lessbloat, jorbin, JustinSainton. fixes #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22400 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 14:47:25 +00:00
Andrew Ozz 330c10d1a9 Kill use of colons in class names, props SergeyBiryukov, fixes #21152
git-svn-id: https://develop.svn.wordpress.org/trunk@22396 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 01:01:52 +00:00
Andrew Nacin f10e3e59c5 Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: https://develop.svn.wordpress.org/trunk@22387 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:17:25 +00:00
Ryan Boren f6d899210a Restore keyboard accessibility to the color picker. Props lessbloat. see #21206
git-svn-id: https://develop.svn.wordpress.org/trunk@22385 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:00:15 +00:00
bumpbot db035ece96 Compress scripts/styles: 3.5-beta2-22326.
git-svn-id: https://develop.svn.wordpress.org/trunk@22326 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 22:58:31 +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
bumpbot d69a863ac2 Compress scripts/styles: 3.5-beta2-22269.
git-svn-id: https://develop.svn.wordpress.org/trunk@22269 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 22:58:34 +00:00
Andrew Ozz 1380819bfe Improve visible focus in the admin, props lessbloat, fixes #21324
git-svn-id: https://develop.svn.wordpress.org/trunk@22268 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 19:51:51 +00:00
bumpbot b270741ecd Compress scripts/styles: 3.5-beta2-22265.
git-svn-id: https://develop.svn.wordpress.org/trunk@22265 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 22:58:33 +00:00
Andrew Ozz 469a3d226b Make the admin menu and toolbar work well on mobile devices, props georgestephanis, see #20614
git-svn-id: https://develop.svn.wordpress.org/trunk@22262 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 18:31:21 +00:00
bumpbot 7f2fa09f5c Compress scripts/styles: 3.5-beta2-22252. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22252 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 22:58:39 +00:00
Andrew Ozz 2f8193421c Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: https://develop.svn.wordpress.org/trunk@22250 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:38:35 +00:00
Andrew Ozz 7c30ff0dcb Accessibility shortcuts: new looks and fix for the WebKit focus bug, props lessbloat, fixes #21471
git-svn-id: https://develop.svn.wordpress.org/trunk@22249 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:26:59 +00:00
Andrew Nacin bb5d96a722 jQuery Masonry for uploaded custom headers. props zamoose. fixes #20346.
git-svn-id: https://develop.svn.wordpress.org/trunk@22228 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:05:16 +00:00
bumpbot d1b1bdfe8c Compress scripts/styles: 3.5-beta1-22223. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22223 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:58:48 +00:00
Daryl Koopersmith 4966b15409 Properly align MCE attachment views.
* Adds a `$wrapper` property to MCE views to allow them to manipulate the wrapper on render. This should be used sparingly — only for layout changes that cannot be accomplished through altering the wrapper's children — and likely only for adding/removing classes.
* Uses `wp.html.string()` in `wp.mce.view.toView()`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22220 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:36:21 +00:00
bumpbot 936cf22c7a Compress scripts/styles: 3.5-beta1-22204.
git-svn-id: https://develop.svn.wordpress.org/trunk@22204 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 22:58:47 +00:00
Daryl Koopersmith d27568e703 Caption editing in the media modal library.
* Adds a `describe` option to the workflow controller to support inline caption editing.
* For images, descriptions are mapped to the `caption` attribute.
* For other media items, descriptions are mapped to the `title` attribute.
* Descriptions are saved when the textarea's `change` event fires (i.e. when the textarea is blurred).

fixes #21807, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22173 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:32:48 +00:00
bumpbot 2a0622aaba Compress scripts/styles: 3.5-beta1-22172.
git-svn-id: https://develop.svn.wordpress.org/trunk@22172 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 22:58:38 +00:00
Daryl Koopersmith a830567a92 Correctly insert non-image attachments as links.
* Adds `wp.media.string.link( attachment )` for printing attachment links.
* Adds the `link` attribute to `Attachment` models that corresponds to the link to the attachment post.

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22170 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:54:21 +00:00
Daryl Koopersmith a04930b340 Reset the media modal to the library view after inserting a gallery. fixes #22151, see #21390, #21809.
git-svn-id: https://develop.svn.wordpress.org/trunk@22156 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:47:15 +00:00
Daryl Koopersmith db21ce7189 Gallery editing in the media modal.
The edit button on gallery MCE views will open a new instance of the media modal. Images can be removed, uploaded, and reordered. However, the "Add images from media library" button is not yet functional.

see #21390, #21809, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22155 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:31:12 +00:00
bumpbot 9036d1e57b Compress scripts/styles: 3.5-beta1-22130.
git-svn-id: https://develop.svn.wordpress.org/trunk@22130 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:46:14 +00:00