Commit Graph

126 Commits

Author SHA1 Message Date
Helen Hou-Sandí
485229bc64 Revert styling changes to the Attachment Details modal from [29289]. fixes #28844.
Built from https://develop.svn.wordpress.org/trunk@29436


git-svn-id: http://core.svn.wordpress.org/trunk@29214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 20:32:16 +00:00
Scott Taylor
b053fe2e04 Video: use auto instead of actual height for the responsive wrapper in generated markup.
See #29110.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 06:20:15 +00:00
Scott Taylor
b938bfb7d5 MediaElement upgrade: cleanup for generated markup for videos.
See #29110.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 05:53:15 +00:00
Scott Taylor
582b5144b2 Media Grid: after [28996], use the same cover size for audio/video files that images use for thumbnails.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-06 19:33:14 +00:00
Andrew Ozz
e6b0d0c9ee Media modal/grid: remove thumbnail resizing from JS, only keep setting number of columns. Props avryl, see #27423.
Built from https://develop.svn.wordpress.org/trunk@29376


git-svn-id: http://core.svn.wordpress.org/trunk@29154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-05 05:20:18 +00:00
Andrew Ozz
a8fd1330ae Media modal: use the same classes to hide the "or" that is above the "Select files" button when no drag-drop support. See #28851.
Built from https://develop.svn.wordpress.org/trunk@29373


git-svn-id: http://core.svn.wordpress.org/trunk@29151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-04 21:17:16 +00:00
Dominik Schilling
e6513fe33b Media Modal: Restore uploader view, when no items are found.
see #28963.
Built from https://develop.svn.wordpress.org/trunk@29364


git-svn-id: http://core.svn.wordpress.org/trunk@29140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-02 20:47:16 +00:00
Sergey Biryukov
3f3395a086 Avoid PHP notices in Media Library if an attachment parent post type no longer exists.
Synchronize the 'edit_post' capability check between the list table and the media grid.

fixes #27446.
Built from https://develop.svn.wordpress.org/trunk@29320


git-svn-id: http://core.svn.wordpress.org/trunk@29101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-29 01:41:16 +00:00
Dominik Schilling
a777a561fa Media Grid: Add context for "or" in [29296].
see #28851.
Built from https://develop.svn.wordpress.org/trunk@29303


git-svn-id: http://core.svn.wordpress.org/trunk@29085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-26 14:37:19 +00:00
Scott Taylor
477a823d25 Media Grid: improve uploader styles.
Props michalzuber, ericlewis.
See #28851.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:31:15 +00:00
Scott Taylor
97604df447 Media Grid: change text to "Close Media Panel" to provide context for screen readers.
Props joedolson.
Fixes #28976.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:26:15 +00:00
Scott Taylor
27866228af Media Grid: UI improvements to Attachment modal.
Props ryelle.
See #28844.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 21:55:17 +00:00
Scott Taylor
c83f891d54 Media Grid: remove pencil icon from attachment hover and a bunch of unused CSS.
Fixes #28945.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 21:18:18 +00:00
Scott Taylor
58741e0909 The Underscore templates for Gallery settings should respect defaults when marking an <option> as selected.
See #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 19:35:15 +00:00
Helen Hou-Sandí
6f44e96d70 Set default values for attachment meta and ID3 data when preparing for JS to avoid errors in rendering templates. props ericmann for the initial patch. fixes #29013.
Built from https://develop.svn.wordpress.org/trunk@29281


git-svn-id: http://core.svn.wordpress.org/trunk@29063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 18:04:18 +00:00
Helen Hou-Sandí
448275cce4 Media Grid: Remove fields from showing in the grid itself.
All details are still available within the modal, and less-distinguishable non-image files still show the filename along with the file type icon.

Reverts [29079], [29078], [29077], and [28995]. see #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 05:26:15 +00:00
Helen Hou-Sandí
795c97d08b Add support for attachment_fields_to_edit in the attachment details modal. props ericlewis. fixes #28991, see #24716.
Built from https://develop.svn.wordpress.org/trunk@29278


git-svn-id: http://core.svn.wordpress.org/trunk@29060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-23 22:09:18 +00:00
Scott Taylor
0702527010 Media Grid: general JS cleanup.
Props ericlewis.
See #28965.


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


git-svn-id: http://core.svn.wordpress.org/trunk@29049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 16:21:15 +00:00
Helen Hou-Sandí
89a8316946 Move the "view" link for attachment details to the sidebar and use more specific language. Removes an unnecessary JS handler. fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29263


git-svn-id: http://core.svn.wordpress.org/trunk@29046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 02:20:15 +00:00
Sergey Biryukov
8923bb0c0e Media Grid: Add a View button to Attachment Details modal.
props adamsilverstein.
fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29262


git-svn-id: http://core.svn.wordpress.org/trunk@29045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 01:30:16 +00:00
Helen Hou-Sandí
06f5b5a490 Media Grid:
Instead of a separate bulk selection mode, persistently show a checkbox for each item. Restores the more familiar bulk actions dropdown + action button.

props ericlewis. see #28842.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 20:42:15 +00:00
Scott Taylor
87e14a7ecc After [29106], check for data.meta before attempting to render data.meta.bitrate.
See #28839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 17:42:16 +00:00
Helen Hou-Sandí
b7445ec8a4 Media Grid Attachment Details modal UI improvements:
* Align better visually with the existing media modal and the post image edit modal.
* Add back a link to the full attachment edit screen (post.php).
* Add a title to the modal and move prev/next buttons next to the more-consistent close button.
* Remove mode tabs (metadata vs. image editing) in favor of the Edit Image button.

Still to come: responsive, IE8 testing and targeted CSS (calc() usage), general CSS cleanup.

props ericlewis, helen, melchoyce. see #28844. fixes #28915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 03:55:15 +00:00
Scott Taylor
93fdff3581 Simplify creation of audio, video, and playlist MCE views by placing them in iframe sandboxes.
Wins:
* Eliminates duplication of code between PHP and JS
* Views can load JS without messing with TinyMCE and scope
* MEjs doesn't break when it loads a file plugin-mode. This allows any file type the MEjs supports to play in MCE views.
* YouTube now works as the source for video.
* Users can still style the views, editor stylesheets are included in these sandboxes.
* Audio and Video URLs and `[embed]`s are no longer broken.
* Remove the crazy compat code necessary to determine what file types play in what browser.
* Remove unneeded Underscore templates.
* Remove the compat code for playlists.

See #28905.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-15 22:18:14 +00:00
Dominik Schilling
6ef23ea006 Lists View Switcher: Replace blank image with screen reader text.
props davidakennedy.
fixes #28871.
Built from https://develop.svn.wordpress.org/trunk@29133


git-svn-id: http://core.svn.wordpress.org/trunk@28918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 11:05:15 +00:00
Scott Taylor
e3c39d02cf Media Grid, for audio files: show Bitrate in the Edit Attachments modal a la the Edit Post screen.
See #28839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 21:56:16 +00:00
Scott Taylor
ba688f4ff9 In the Post/Select frames, for audio files:
* Show `artist` and `album` fields in the Attachment Details sidebar
* Sync their values on `change`

See #28839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 21:02:15 +00:00
Scott Taylor
59ffcf668b Media Grid, for audio files:
* Show `artist` and `album` fields in the Edit Attachment modal
* Sync their values on `change`

See #28839.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 20:55:15 +00:00
Scott Taylor
dfd3c19cec Media Grid, in the Edit Attachment modal:
* Label the fields under the attachment a la the Edit Media page
* Move the audio and video previews above the info
* Remove the audio / video icon display. Unnecessary.
* Ensure that `width` and `max-width` are set for `.mejs-container`

See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 06:15:15 +00:00
Scott Taylor
ceff8de594 Media Grid:
* The "Edit Image" link in the attachment modal details is redundant.
* After an attachment is deleted in the modal, automatically move to the next attachment in the library. If there are no attachments left, close the modal.

See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 05:22:14 +00:00
Scott Taylor
9978d473ef Media Grid: make the Uploader closable.
Props ericlewis.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 23:06:15 +00:00
Scott Taylor
a9fb59151b Media Grid: Screen Options for grid have to play nice with Screen Options for list. This was fun.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 21:26:16 +00:00
Scott Taylor
a89060013b Media Grid: Move toggling of visible fields to Screen Options. This moves us in a better direction... but this will probably need to be massaged again.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 21:00:17 +00:00
Scott Taylor
dd9bfea6bb Media Grid: make the edit attachment icon clickable.
Props ericlewis.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 15:56:15 +00:00
Helen Hou-Sandí
89dff37759 Media grid:
* Introduce the concept of bulk editing via a separate mode. Like the list view, only bulk deleting is available. The UI is a little funky, especially with the field display toggles there, but refinements will come.
* Up the max thumbnail size from 120px to 150px.
* Slide-down panel for the add new uploader. Known issue: it doesn't close again.
* Remove the toolbar region in the EditAttachment frame.
* Defer a function call so the grid fills available space.
* Give feedback when no results are found. Also needs styling.

props ericlewis. see #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-10 03:50:17 +00:00
Scott Taylor
53bd731570 Media Grid: JSHint fixes.
See #24716. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@28786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:14:15 +00:00
Scott Taylor
6b377e12a0 Media Grid: Use the proper attachment value for uploadedToTitle.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:04:15 +00:00
Scott Taylor
2938a50a28 Media Grid: for audio and video files with covers, show that instead of the icon. The filename is still present with the extension to identify the type.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 05:00:14 +00:00
Scott Taylor
9a1ac73c34 Make media grid text fields (data) toggle-able. Checking/unchecking is saved in user settings cookie.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 04:48:15 +00:00
Helen Hou-Sandí
63f9cbd02a Media grid, round 2. Expect much more to come.
* Instead of a sidebar for details, utilize a modal. The modal experience allows for a larger preview, editing images, audio/video previews, and previous/next navigation, like the theme browser. Think of it as an attachment browser.
* Show some details in the grid view to more easily distinguish items.

props ericlewis, wonderboymusic, JerrySarcastic. see #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 03:39:15 +00:00
Scott Taylor
54915274fa Use the proper height property when calculating video size in wp_underscore_video_template().
Props Fab1en.
See #28190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 20:35:18 +00:00
Andrew Ozz
f88149c370 wpView:
- Don't wrap single-line URLs in [embed]. Use them directly in generating a view.
- If the embedding HTML contains a script, "sandbox" it in an iframe to prevent it from changing the editor DOM.
- Automatically add toolbar and overlay when needed.
- Try to embed single-line URLs only if they are pasted in an empty paragraph.
Props avryl, see #28195
Built from https://develop.svn.wordpress.org/trunk@28748


git-svn-id: http://core.svn.wordpress.org/trunk@28562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-12 02:49:16 +00:00
Andrew Ozz
d593293556 Fix JS error in tmpl-editor-gallery, 'string'.trim() is not available in IE < 9. See #28089
Built from https://develop.svn.wordpress.org/trunk@28683


git-svn-id: http://core.svn.wordpress.org/trunk@28501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 01:50:16 +00:00
Helen Hou-Sandí
b5ef672c6b Grid view for the media library, first pass. This is alpha; expect imperfection. We will be iterating further.
props ericlewis, shaunandrews, wonderboymusic.
see #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 22:01:18 +00:00
Helen Hou-Sandí
78d90bd443 At long last, improved keyboard accessibility for the media modal.
props lessbloat, grahamarmfield, sharonaustin, bramd.
see #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 03:39:15 +00:00
Scott Taylor
3c1723afd7 When adding a URL in the Insert from URL state in the media modal, attempt to show a preview of the content. Drop the unused width and height fields.
This will probably be iterated upon.

Props helen, jtsternberg, wonderboymusic.
See #15490.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-26 23:57:14 +00:00
Sergey Biryukov
d970ac80c6 Don't include caption tags in gallery template when there is no caption.
props avryl.
fixes #28089.
Built from https://develop.svn.wordpress.org/trunk@28442


git-svn-id: http://core.svn.wordpress.org/trunk@28269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 21:03:15 +00:00
Scott Taylor
558cf6f86d In the Attachment Details section of the media modal, only add box-shadow to images. Other mime-type icons look strange with an arbitrary border.
Props avryl.
Fixes #27949.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-11 06:19:14 +00:00
Scott Taylor
f22beb987c First pass at wpview logic for the [embed] shortcode. URLs on a their own line are parsed as well. The toolbar will appear with the "remove" button when the view is clicked. Edit has not been implemented yet.
Props avryl, wonderboymusic.
See #28195.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-10 23:36:18 +00:00
Scott Taylor
1daa7d6723 Leverage size_format() when displaying max_upload_size:
* In `media_upload_form()` 
* The `uploader-inline` Underscore template in the media modal. 

Replaces 2 buggy inline implementations that could display size units off by one, or size values off by one.

Fixes #25643.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-07 18:25:14 +00:00