Commit Graph

389 Commits

Author SHA1 Message Date
Daryl Koopersmith
9c20d148b9 Media: Add instructions to drag and drop to reorder images on gallery and batch edit pages.
Removes search boxes from these pages as well.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 09:11:33 +00:00
Daryl Koopersmith
bed08350f4 Media: Backwards compatibility for media_upload_tabs.
* Adds `createIframeStates()` to the `MediaFrame` view. It creates states and bindings for the `media_upload_tabs` output, and is included on `MediaFrame.Post` by default.
* Hijacks `tb_remove()` when the media modal is open to ensure the modal closes correctly.
* Adds a `chromeless` parameter to thickbox media tab URLs to render the UI without the old row of tabs.

see #22186, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 07:51:37 +00:00
Bot (Assets)
c57076aab7 Compress scripts/styles: 3.5-beta2-22515.
git-svn-id: http://core.svn.wordpress.org/trunk@22515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 22:58:35 +00:00
Andrew Nacin
56c1b7c7ff Final HiDPI tweaks. Don't use rss-2x.png on a front-end widget. Improve selectors for favicons in the toolbar to avoid breaking existing images. Remove unnecessary RTL styles. FIXES #21019.
git-svn-id: http://core.svn.wordpress.org/trunk@22481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 02:06:59 +00:00
Bot (Assets)
0f3d286dd3 Compress scripts/styles: 3.5-beta2-22475.
git-svn-id: http://core.svn.wordpress.org/trunk@22475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-08 22:58:34 +00:00
Daryl Koopersmith
ef0774026b 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: http://core.svn.wordpress.org/trunk@22466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-08 14:15:09 +00:00
Bot (Assets)
9cc507b1c9 Compress scripts/styles: 3.5-beta2-22455.
git-svn-id: http://core.svn.wordpress.org/trunk@22456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 22:58:33 +00:00
Andrew Nacin
033506e18c Allow the .hidden class to hide a button. props helenyhou. fixes #22018.
git-svn-id: http://core.svn.wordpress.org/trunk@22440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 21:25:25 +00:00
Andrew Ozz
1276bcefb5 More retina backgrounds and bits, props saracannon, empireoflight and lessbloat, see #21019
git-svn-id: http://core.svn.wordpress.org/trunk@22439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:54:08 +00:00
Bot (Assets)
a94a72e010 Compress scripts/styles: 3.5-beta2-22438. TinyMCE updated.
git-svn-id: http://core.svn.wordpress.org/trunk@22438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:29:58 +00:00
Daryl Koopersmith
90781c9e83 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: http://core.svn.wordpress.org/trunk@22437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:14:41 +00:00
Bot (Assets)
aa464fde32 Compress scripts/styles: 3.5-beta2-22407.
git-svn-id: http://core.svn.wordpress.org/trunk@22407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 22:58:35 +00:00
Andrew Nacin
1a3e4a1207 Don't show a hand cursor when hovering over a disabled button. props sabreuse, fixes #22371.
git-svn-id: http://core.svn.wordpress.org/trunk@22405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 22:30:41 +00:00
Andrew Ozz
e58fb0852b Fix the right border of the editor textarea, props SergeyBiryukov, fixes #21906
git-svn-id: http://core.svn.wordpress.org/trunk@22390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 23:55:10 +00:00
Bot (Assets)
c94990017b Compress scripts/styles: 3.5-beta2-22384.
git-svn-id: http://core.svn.wordpress.org/trunk@22384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 22:58:34 +00:00
Ryan Boren
ccac2185c1 Fix field alignment in the "Insert/edit link" dialog.
Props SergeyBiryukov
fixes #22275


git-svn-id: http://core.svn.wordpress.org/trunk@22383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 22:42:22 +00:00
Daryl Koopersmith
92823b8635 Streamlining media, part I.
The main goal here is to rearrange the media components in a modularized structure to support more linear workflows. This is that structure using the pre-existing workflows, which will be improved over the course of the next few commits.

This leaves a few pieces a bit rough around the edges: namely gallery editing and selecting a featured image.

The fine print follows.

----

'''Styles'''
* Tightened padding around the modal to optimize for a smaller default screen size.
* Added a light dashed line surrounding the modal to provide a subtle cue for the persistent dropzone (which is evolving into a power user feature since we now have a dedicated `upload` state).
* Add a size for `hero` buttons.
* Remove transitions from frame subviews (e.g. menu, content, sidebar, toolbar).

----

'''Code'''

`wp.media.controller.StateManager`
* Don't fire `activate` and `deactivate` if attempting to switch to the current state.

`wp.media.controller.State`
* Add a base state class to bind default methods (as not all states will inherit from the `Library` state).
* On `activate`, fire `activate()`, `menu()`, `content()`, `sidebar()`, and `toolbar()`.
* The menu view is often a shared object (as its most common use case is switching between states). Assign the view to the state's `menu` attribute.
* `menu()` automatically fetches the state's `menu` attribute, attaches the menu view to the frame, and attempts to select a menu item that matches the state's `id`.

`wp.media.controller.Library`
* Now inherits from `wp.media.controller.State`.

`wp.media.controller.Upload`
* A new state to improve the upload experience.
* Displays a large dropzone when empty (a `UploaderInline` view).
* When attachments are uploaded, displays management interface (a `library` state restricted to attachments uploaded during the current session).

`wp.media.view.Frame`
* In `menu()`, `content()`, `sidebar()`, and `toolbar()`, only change the view if it differs from the current view. Also, ensure `hide-*` classes are properly removed.
*

`wp.media.view.PriorityList`
* A new container view used to sort and render child views by the `priority` property.
* Used by `wp.media.view.Sidebar` and `wp.media.view.Menu`.
* Next step: Use two instances to power `wp.media.view.Toolbar`.

`wp.media.view.Menu` and `wp.media.view.MenuItem`
* A new `PriorityList` view that renders a list of views used to switch between states.
* `MenuItem` instances have `id` attributes that are tied directly to states.
* Separators can be added as plain `Backbone.View` instances with the `separator` class.
* Supports any type of `Backbone.View`.

`media.view.Menu.Landing`
* The landing menu for the 'insert media' workflow.
* Includes an inactive link to an "Embed from URL" state.
* Next steps: only use in select cases to allot for other workflows (such as featured images).

`wp.media.view.AttachmentsBrowser`
* A container to render an `Attachments` view with accompanying UI controls (similar to what the `Attachments` view was when it contained the `$list` property).
* Currently only renders a `Search` view as a control.
* Next steps: Add optional view counts (e.g. "21 images"), upload buttons, and collection filter UI.

`wp.media.view.Attachments`
* If the `Attachments` scroll buffer is not filled with `Attachment` views, continue loading more attachments.
* Use `this.model` instead of `this.controller.state()` to allow `Attachments` views to have differing `edge` and `gutter` properties.
* Add `edge()`, a method used to calculate the optimal dimensions for an attachment based on the current width of the `Attachments` container element.
* `edge()` is currently only enabled on resize, as the relative positioning and CSS transforms used to center thumbnails are suboptimal when coupled with frequent resizing.
* Next steps: For infinite scroll performance improvements, look into absolutely positioning attachment views and paging groups of attachment views.

`wp.media.view.UploaderWindow`
* Now generates a `$browser` element as the browse button (instead of a full `UploaderInline` view). Using a portable browse button prevents us from having to create a new `wp.Uploader` instance every time we want access to a browse button.

`wp.media.view.UploaderInline`
* No longer directly linked to the `UploaderWindow` view or its `wp.Uploader` instance.
* Used as the default `upload` state view.

`wp.media.view.Selection`
* An interactive representation of the selected `Attachments`.
* Based on the improved workflows, this is likely overkill. For simplicity's sake, will probably remove this in favor of `SelectionPreview`.

----

see #21390.



git-svn-id: http://core.svn.wordpress.org/trunk@22362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-04 22:59:12 +00:00
Bot (Assets)
3e51d043ab Compress scripts/styles: 3.5-beta2-22352.
git-svn-id: http://core.svn.wordpress.org/trunk@22352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 22:58:32 +00:00
Daryl Koopersmith
c419700f93 Fix positioning of attachment thumbnail overlays.
Prevents the overlay from blocking buttons inside the attachment preview, such as the remove button in the gallery editor.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-31 20:34:50 +00:00
Daryl Koopersmith
6670666b27 Media CSS: Remove inner shadow when attachment is selected. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-30 23:16:28 +00:00
Daryl Koopersmith
640edbdfbc Media JS: Improve handling of single attachments in selections.
* Adds `wp.media.model.Selection.single()` to specify a single item used in a multi-item selection.
* Fixes a bug where the `details` class would not be removed when "Clear Selection" was clicked.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-30 23:15:16 +00:00
Bot (Assets)
b502e1e0c2 Compress scripts/styles: 3.5-beta2-22334.
git-svn-id: http://core.svn.wordpress.org/trunk@22334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-30 22:58:31 +00:00
Daryl Koopersmith
097cb6117d Improve selection UI/behavior in the media modal.
* Moves handling which models are in the selection into the `Library` state.
* Adds highlight for the last-selected view in a multi-view state.
* A view must be the last-selected view before it can be deselected.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-30 21:09:45 +00:00
Bot (Assets)
2e1aaeb2c5 Compress scripts/styles: 3.5-beta2-22326.
git-svn-id: http://core.svn.wordpress.org/trunk@22326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 22:58:31 +00:00
Daryl Koopersmith
01f3ca5a6c Improve attachment detailed preview styling. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 18:16:12 +00:00
Daryl Koopersmith
c0bc7a7903 Add dynamic attachment view sizing. Removes the attachment view zooming in the process. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 18:05:03 +00:00
Daryl Koopersmith
16c1011cdb Add attachment details to the media sidebar.
* Also moves most of the `Frame` view's `createSelection` method to a real `Selection` model (which inherits from the `Attachments` model).
* Properly assigns the library within the `Gallery` state, allowing for the `Gallery` state to inherit from the `Library` state.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 15:13:02 +00:00
Daryl Koopersmith
aa52a02dd1 Add inline uploader UI to media modal sidebar. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 07:38:13 +00:00
Daryl Koopersmith
f7c1aaf26d Add a sidebar to the media modal.
* Adds `wp.media.view.Sidebar`, to aid in rendering the sidebar.
* Removes the `directions` from the `Attachments` view and shifts search into a separate view (`wp.mce.view.Search`) that can be relocated at will. This also serves to simplify the `Attachments` view by removing the nested `list` and `$list` parameters.
* Show the toolbar on the featured image workflow, effectively requiring confirmation before closing the dialog.

see #21390, #21776, #21808.


git-svn-id: http://core.svn.wordpress.org/trunk@22321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 06:56:23 +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
Bot (Assets)
4681d3b3e3 Compress scripts/styles: 3.5-beta2-22315.
git-svn-id: http://core.svn.wordpress.org/trunk@22315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-26 22:58:34 +00:00
Andrew Ozz
efbc9d2336 Buttons:
- Update the install/initial configuration/repair screens buttons, props DrewAPicture
- Fix the welcome screen buttons and fine-tune the buttons css, props lessbloat

fixes #21598


git-svn-id: http://core.svn.wordpress.org/trunk@22314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-26 19:40:39 +00:00
Bot (Assets)
c7f18926e6 Compress scripts/styles: 3.5-beta2-22292.
git-svn-id: http://core.svn.wordpress.org/trunk@22292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-24 22:58:36 +00:00
Andrew Ozz
239650f87a Fix the buttons in IE, make them better in IE7, remove the default padding in Firefox, make all .button <a> and <input> look the same, fixes #21598
git-svn-id: http://core.svn.wordpress.org/trunk@22289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-24 01:33:59 +00:00
Andrew Ozz
8c4d96b05a Buttons: slightly bolder :focus styles, make the "Log In" button '.button-large', props lessbloat, see #21598
git-svn-id: http://core.svn.wordpress.org/trunk@22288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-24 01:27:56 +00:00
Bot (Assets)
852f080ef2 Compress scripts/styles: 3.5-beta2-22287.
git-svn-id: http://core.svn.wordpress.org/trunk@22287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-23 22:58:40 +00:00
Andrew Nacin
62156e8ad3 Reset box-sizing to toolbar CSS to avoid conflicts with themes. props betzster, fixes #21863.
git-svn-id: http://core.svn.wordpress.org/trunk@22280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-23 14:30:03 +00:00
Bot (Assets)
3cc79b6461 Compress scripts/styles: 3.5-beta2-22269.
git-svn-id: http://core.svn.wordpress.org/trunk@22269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-22 22:58:34 +00:00
Andrew Ozz
5b8108a3fd Improve visible focus in the admin, props lessbloat, fixes #21324
git-svn-id: http://core.svn.wordpress.org/trunk@22268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-22 19:51:51 +00:00
Bot (Assets)
19d83ff7e8 Compress scripts/styles: 3.5-beta2-22252. TinyMCE updated.
git-svn-id: http://core.svn.wordpress.org/trunk@22252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 22:58:39 +00:00
Andrew Ozz
e8b10439bb Accessibility shortcuts: new looks and fix for the WebKit focus bug, props lessbloat, fixes #21471
git-svn-id: http://core.svn.wordpress.org/trunk@22249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 21:26:59 +00:00
Daryl Koopersmith
74cea87b2c Add attachment display settings to the media modal.
* Add a media view for button groups.
* Add button dropdown containers.
* Add a dropdown property to the button media model.

fixes #22206, #21814, see #21390, #21813, #21598.


git-svn-id: http://core.svn.wordpress.org/trunk@22247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 19:25:17 +00:00
Daryl Koopersmith
439b77aab9 Add a down arrow button. see #21598, #21390, #21813.
git-svn-id: http://core.svn.wordpress.org/trunk@22245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 15:42:34 +00:00
Daryl Koopersmith
597cd8620d Add button groups. see #21598, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 13:34:01 +00:00
Bot (Assets)
52a91255a5 Compress scripts/styles: 3.5-beta2-22241.
git-svn-id: http://core.svn.wordpress.org/trunk@22241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 22:58:34 +00:00
Daryl Koopersmith
5fee0949ac Revise and combine button selectors.
* Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
* Adds buttons documentation.
* Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
* Moves basic button color standardization to the beginning of wp-admin.

see #21598, #22197.



git-svn-id: http://core.svn.wordpress.org/trunk@22239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 21:25:25 +00:00
Daryl Koopersmith
e9503f9086 Consolidate buttons CSS into a single file.
Adds `wp-includes/css/buttons.css` to consolidate buttons files and make them available in a modular fashion. Buttons are included automatically with the `colors` styles, and can be included independently by running:

	`wp_enqueue_style('buttons');`

fixes #22197, see #21598.


git-svn-id: http://core.svn.wordpress.org/trunk@22236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 14:55:29 +00:00
Bot (Assets)
28cddba189 Compress scripts/styles: 3.5-beta1-22204.
git-svn-id: http://core.svn.wordpress.org/trunk@22204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 22:58:47 +00:00
Daryl Koopersmith
6a8cccc226 Media Modal: Improve attachment remove button styles. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 04:11:47 +00:00
Daryl Koopersmith
583b13ab04 Media Modal: Remove the outline from the modal's close button. props lessbloat, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 02:54:19 +00:00
Daryl Koopersmith
24748a6d16 Media Modal: Increase delay of attachment zoom. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 01:28:41 +00:00
Daryl Koopersmith
e5285ef380 Media Modal: Reduce height on the attachment captions from three lines to two. see #21390, #21807.
git-svn-id: http://core.svn.wordpress.org/trunk@22178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 00:55:38 +00:00
Daryl Koopersmith
70bc71402b Media Modal: Remove unused CSS. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 00:37:23 +00:00
Daryl Koopersmith
22ad35710b Media Modal: Show progress bars for uploading images, and adjust progress bar styles to compensate for the darker attachment background. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 00:36:42 +00:00
Daryl Koopersmith
1daa774b27 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: http://core.svn.wordpress.org/trunk@22173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-10 23:32:48 +00:00
Bot (Assets)
d71143817e Compress scripts/styles: 3.5-beta1-22172.
git-svn-id: http://core.svn.wordpress.org/trunk@22172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-10 22:58:38 +00:00
Daryl Koopersmith
38b0a99f26 Show filenames for non-image attachments in the new media modal.
Also passes all attachment model attributes to the attachment view template by default (instead of selecting specific values).

see #21390, #21836.


git-svn-id: http://core.svn.wordpress.org/trunk@22159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-10 09:55:47 +00:00
Daryl Koopersmith
2a3859aced Media JS: Improve markup and CSS of the modal view's title.
Also improves the accuracy of closing the modal when the backdrop is clicked (which became error-prone around the title bar in [22144]).

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-10 09:40:22 +00:00
Bot (Assets)
4efe0b5efa Compress scripts/styles: 3.5-beta1-22150.
git-svn-id: http://core.svn.wordpress.org/trunk@22150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 22:58:33 +00:00
Daryl Koopersmith
8efdcc915a Media modal search box style updates. props helenyhou, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 03:14:18 +00:00
Daryl Koopersmith
fed20bc298 Improve media modal title bar styling. props helenyhou, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 02:56:39 +00:00
Daryl Koopersmith
7788ddab90 Increase the delay on the attachment zooming in the media modal. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 01:57:34 +00:00
Daryl Koopersmith
dcf8cc17cb Change the cursor to a pointer when hovering above an attachment in the media modal. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-09 01:17:35 +00:00
Daryl Koopersmith
aa19c0d66c Better thumbnail previews in the image editor.
* Images are auto-cropped, then fit to the preview on hover (with a slight delay). This is an experiment; we'll see how it turns out.
* Various style changes.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-08 23:20:04 +00:00
Bot (Assets)
06d16327f5 Compress scripts/styles: 3.5-beta1-22128.
git-svn-id: http://core.svn.wordpress.org/trunk@22128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-07 02:27:48 +00:00
Daryl Koopersmith
4220ed466a On the gallery creation screen, only display the remove icon on hover.
git-svn-id: http://core.svn.wordpress.org/trunk@22125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-05 22:14:00 +00:00
Andrew Ozz
5c0c0a199f Fix typo in wp-pointer.css, props TobiasBg, fixes #21019
git-svn-id: http://core.svn.wordpress.org/trunk@22078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-28 00:38:07 +00:00
Andrew Ozz
d62abf57d6 Fix "add media" icon in DFW for IE < 9, restore media-button.png, add media-button-2x.png and make them background images, see #21019
git-svn-id: http://core.svn.wordpress.org/trunk@22077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-28 00:33:40 +00:00
Bot (Assets)
8c36f67e11 Compress scripts/styles: 3.5-alpha-22071.
git-svn-id: http://core.svn.wordpress.org/trunk@22071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 19:21:47 +00:00
Daryl Koopersmith
3cf9d9d905 Add quick insert buttons to attachment views in the library and remove buttons to attachment views in the gallery editor. see #21390, #21809.
git-svn-id: http://core.svn.wordpress.org/trunk@22053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 07:45:26 +00:00
Daryl Koopersmith
e14d191fb6 Media JS: Use a custom Attachment views for both the media library and gallery screens.
To do so, the Attachment view code had to be shifted above the Workspace view code to ensure the subview is defined (preventing errors).

Also corrects an error in `wp.media.view.Attachments.add` where it was still using the default Attachment view.

see #21390, #21809.


git-svn-id: http://core.svn.wordpress.org/trunk@22046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 06:53:54 +00:00
Daryl Koopersmith
eec758fd26 BUTTON.
Add a "Beta Media" button to the post editor. Currently, it is only capable of inserting images. Other attachment types and galleries need not apply... yet.

* Added `wp.media.string.image( attachment, props )` for generating an image as a string from an attachment and relevant attachment display properties.
* Properly localized the gallery workflow.
* Added `Workflow.update()`, which closes the modal, triggers an `update` event, and resets the selection.
* Added `wp.mce.media` to manage the various media workflows for editors.

see #21813, #21814, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 04:09:43 +00:00
Andrew Ozz
a43feb2b4d Fix image button in DFW, props ocean90, see #21019
git-svn-id: http://core.svn.wordpress.org/trunk@22032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 02:17:04 +00:00
Andrew Ozz
b28a6c066d Consolidated patch for retina support, props taylorde, props empireoflight, fixes #21019
git-svn-id: http://core.svn.wordpress.org/trunk@22031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 02:12:54 +00:00
Andrew Ozz
3c6ef163d6 Fix background on split buttons, remove redundant !important, remove spacers, a little css cleanup, see #18141
git-svn-id: http://core.svn.wordpress.org/trunk@22025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 00:41:49 +00:00
Bot (Assets)
baaf5c4cf8 Compress scripts/styles: 3.5-alpha-22024.
git-svn-id: http://core.svn.wordpress.org/trunk@22024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 22:58:46 +00:00
Andrew Nacin
1acd8b556f New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: http://core.svn.wordpress.org/trunk@22019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:57:44 +00:00
Andrew Nacin
ad572d63a1 A calmer, less distracting style for the TinyMCE toolbar.
props helenyhou, lessbloat, trepmal, fadingdust.
fixes #18141.



git-svn-id: http://core.svn.wordpress.org/trunk@22016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 18:24:02 +00:00
Andrew Ozz
563c7caac5 Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes #21718
git-svn-id: http://core.svn.wordpress.org/trunk@22007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 03:30:21 +00:00
Bot (Assets)
fabcc374fd Compress scripts/styles: 3.5-alpha-21920.
git-svn-id: http://core.svn.wordpress.org/trunk@21920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 18:59:36 +00:00
Daryl Koopersmith
f7ae81b15d Rename the attachment-thumbnail class in the media modal Attachment view to prevent conflicts with wp_get_attachment_image(). see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 01:10:17 +00:00
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
Bot (Assets)
4a8bb5e3f8 Compress scripts/styles: 3.5-alpha-21879. TinyMCE updated.
git-svn-id: http://core.svn.wordpress.org/trunk@21879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-17 00:59:40 +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
Bot (Assets)
064a570aa7 Compress scripts/styles: 3.5-alpha-21684.
git-svn-id: http://core.svn.wordpress.org/trunk@21684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 06:59:25 +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
Bot (Assets)
e286612fda Compress scripts/styles: 3.5-alpha-21678.
git-svn-id: http://core.svn.wordpress.org/trunk@21678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 21:59:32 +00:00
Andrew Ozz
f44e60e0fa Update the query strings to refresh the toolbar sprites, props ocean90, see #20033
git-svn-id: http://core.svn.wordpress.org/trunk@21677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 21:46:37 +00:00
Bot (Assets)
e0835b5fc4 Compress scripts/styles: 3.5-alpha-21663.
git-svn-id: http://core.svn.wordpress.org/trunk@21663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 04:09:57 +00:00
Andrew Nacin
5f8add5ad2 Fix typo in CSS. props SergeyBiryukov. fixes #20587.
git-svn-id: http://core.svn.wordpress.org/trunk@21661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 03:04:10 +00:00
Andrew Ozz
3980c183a1 More visible :focus style for form elements, props lessbloat, see #21324
git-svn-id: http://core.svn.wordpress.org/trunk@21641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-28 05:48:58 +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
cbacfc849c Compress scripts/styles: 3.5-alpha-21460.
git-svn-id: http://core.svn.wordpress.org/trunk@21460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-06 18:58:29 +00:00
azaozz
853df37fe8 Replace last remaining gradients with css, standardize the gradient css cascade, props ocean90, fixes #16461
git-svn-id: http://core.svn.wordpress.org/trunk@21459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-06 17:21:41 +00:00
bumpbot
f8ce3f7163 Compress scripts/styles: 3.5-alpha-21453.
git-svn-id: http://core.svn.wordpress.org/trunk@21453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-06 00:58:32 +00:00
azaozz
4ef4df2f3e Accessibility: add off-screen Log Out link in the toolbar, tweak the class names of the accessible links in #adminbar, see #21312
git-svn-id: http://core.svn.wordpress.org/trunk@21452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-06 00:34:44 +00:00
bumpbot
fc62ad5e57 Compress scripts/styles: 3.5-alpha-21443.
git-svn-id: http://core.svn.wordpress.org/trunk@21443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-05 22:58:29 +00:00
azaozz
83d04bb82a CSS cleanup: take out -moz-box-shadow, fixes #21482
git-svn-id: http://core.svn.wordpress.org/trunk@21439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-05 22:41:49 +00:00