Commit Graph

2411 Commits

Author SHA1 Message Date
Dominik Schilling
32030a073f RTL: Fix modal alignments.
* Prevent horizontal scrollbars in Chrome.
* URL fields should be always LTR.
* Force the plugin details to be LTR for all screens, see #19778.

fixes #29352.
Built from https://develop.svn.wordpress.org/trunk@29623


git-svn-id: http://core.svn.wordpress.org/trunk@29397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 12:55:16 +00:00
Scott Taylor
149346ff6e MCE View sandboxes:
* Use a `MutationObserver` to listen to the `body` class of the parent editor frame.
* In `wpview_media_sandbox_styles()`, only return the MEjs stylesheets.
* In `wp_ajax_parse_media_shortcode()` and `wp_ajax_parse_embed()`, return an object instead of an HTML blob to allow passing `body` and `head` separately	

Props avryl, azaozz.
Fixes #29048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 04:46:15 +00:00
Scott Taylor
80bda02c0f Media Modal:
* the Image Details frame does not have a menu, indicate that by setting `menu: false` when adding states.
* mimic the default router rendering by toggling a `hide-menu` class on the frame when the region for menu is `null`
* remove the dead render code for the Image Details frame

See #29339.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 04:22:16 +00:00
Helen Hou-Sandí
60c6399d1c Media Grid: Show upload errors above the grid rather than as a popup.
props pento, stephdau, helen. fixes #29141.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 04:18:17 +00:00
Andrew Ozz
04e28b468c Media modal: fix the progress bar in the attachment thumbnail. Props gcorne, fixes #29367
Built from https://develop.svn.wordpress.org/trunk@29609


git-svn-id: http://core.svn.wordpress.org/trunk@29383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 22:45:16 +00:00
Andrew Ozz
a2ad27c03e TinyMCE wpView: exclude more non-printable keyCodes in isSpecialKey(), fixes #29115
Built from https://develop.svn.wordpress.org/trunk@29606


git-svn-id: http://core.svn.wordpress.org/trunk@29380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 20:41:16 +00:00
Andrew Ozz
d0a76f284f Media modal: when inserting content, prefer the editor id passed while opening the modal. wpActiveEditor can change in the background. (Includes some precommit prefixed selectors.) Fixes #28173
Built from https://develop.svn.wordpress.org/trunk@29603


git-svn-id: http://core.svn.wordpress.org/trunk@29377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 19:37:16 +00:00
Scott Taylor
d869fe0603 Media: cleanup recent changes to media.view.FocusManager.
* Adjusts the focus method to target the menu for the current modal
* Refactor the FocusManager so that the method names and the functionality matches more closely with how it currently works. The changes in 4.0 to the FocusManager change the purpose of the focus manager entirely — instead of being a way to save and restore focus state, the new FocusManager is about constraining keyboard navigation via the tab key to inside the modal. 

Props gcorne.
See #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 18:23:16 +00:00
Scott Taylor
db0b4c5b4d Media: when activating a mode after [29056], don't trigger the {mode}:activate event twice in a row.
See #29366.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 18:07:15 +00:00
Scott Taylor
32e896f5b8 Media Grid: exit selection mode when Esc is pressed.
Fixes #29366.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 17:45:17 +00:00
Scott Taylor
1335ff3e40 Media Grid: Don't make checkboxes tabbable when in bulk select media grid mode, fixes tabbing in bulk select mode.
Props adamsilverstein.
See #28822.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 16:55:15 +00:00
Scott Taylor
d5d0b37c35 Media Grid: restore focus to the selected item when shift-tab away from the attachment details sidebar.
Fixes #29303.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 16:43:16 +00:00
Helen Hou-Sandí
8a545bf05e Media: Only fire keyboard events for the Attachments view once.
Firing them twice was breaking arrow key navigation in media attachment grids.

props gcorne.
fixes #29304.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 16:17:16 +00:00
Andrew Ozz
61292620c5 Editor scrolling:
- Pin the TinyMCE statusbar (elements path) to the bottom.
- Add support for pinning the menu when present.
- Add borders from CSS.
- Optimize getting most elements outerHeight.
Part props avryl, fixes #29293, see #28328.
Built from https://develop.svn.wordpress.org/trunk@29579


git-svn-id: http://core.svn.wordpress.org/trunk@29353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 05:11:16 +00:00
Andrew Ozz
42258a6d89 TinyMCE wpView: fix showing errors for non-embeddable URLs, no-ssl or no items. Props avryl, fixes #29114, see #29268.
Built from https://develop.svn.wordpress.org/trunk@29577


git-svn-id: http://core.svn.wordpress.org/trunk@29351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-22 18:55:15 +00:00
Andrew Ozz
f2c881cf3b TinyMCE: update to 4.1.4-20140822. Changes:
- Fixed bug where sometimes the resize rectangles wouldn't properly render on images on WebKit/Blink. 9a2d01cc14
- Fixed nodeChanged selection issue where the image selection wouldn't be removed if you clicked right after/before it. dd729c67e0
- Fixed bug in list plugin where delete/backspace would merge empty LI elements in lists incorrectly. caadfb05dd
See #29310
Built from https://develop.svn.wordpress.org/trunk@29576


git-svn-id: http://core.svn.wordpress.org/trunk@29350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-22 17:44:16 +00:00
Andrew Ozz
3d60d9f875 Autosave: prevent setting multiple stale wp-saving-post-* cookies when the browser disregards "session cookies" expiration on quit:
- Add expiration time of 24 hours for these cookies.
- Rename them to `wp-saving-post` (no post_id) so there is never more than one cookie per domain.
Fixes #29294.
Built from https://develop.svn.wordpress.org/trunk@29572


git-svn-id: http://core.svn.wordpress.org/trunk@29346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-22 00:25:16 +00:00
Andrew Ozz
5545f24b4f TinyMCE wpView: prevent errors when pasting multiple non-embeddable URLs, props avryl, fixes #29268
Built from https://develop.svn.wordpress.org/trunk@29571


git-svn-id: http://core.svn.wordpress.org/trunk@29345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-22 00:14:17 +00:00
Andrew Ozz
c3c20549c5 TinyMCE: update to 4.1.4. Changelog: http://www.tinymce.com/develop/changelog/?type=tinymce. Fixes #29310
Built from https://develop.svn.wordpress.org/trunk@29570


git-svn-id: http://core.svn.wordpress.org/trunk@29344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 23:53:18 +00:00
Scott Taylor
31e599943d Media Grid: after [29566], account for Trash and Delete.
See #28842.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 04:42:16 +00:00
Scott Taylor
7029af94e7 Media Grid: after completing a Bulk action, switch from select to edit mode.
Fixes #28842.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 04:20:16 +00:00
Scott Taylor
ca180e2544 Media Grid: don't auto-select attachments upon upload.
Props ocean90.
See #28842.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 03:54:14 +00:00
Scott Taylor
d6213d64a5 After [29543], the iframe sandboxes for media need to load Open Sans. Playlists look aggressively bad without it. Adds font styles for the body.
See #29048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 03:36:16 +00:00
Scott Taylor
8f810cbaa4 media.view.Attachment: set all of the view attributes in the same hash.
See [29299], #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 02:53:14 +00:00
Scott Taylor
6352d703a0 Media Grid/Modal Keyboard navigation improvements:
* Add focus to arrows on Next/Previous in the grid's modal on left/right keypress, and add the necessary CSS for `:focus`
* When in a disabled input in the grid modal, allow the left/right keys to work
* Make the image editor return a `$.Deferred` so that there isn't a race condition with UI loading. 
* Assign focus when the edit image mode is rendered so that the modal can be closed on Esc press

Props wonderboymusic, adamsilverstein (for the initial patch).
See #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-21 02:35:17 +00:00
Scott Taylor
557861446f Cleanup after [29220]:
`media.controller.Library` is State/Backbone Model and should not touch views.

See #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 20:00:16 +00:00
Scott Taylor
a43cfb4f96 Cleanup after [29220]:
* `media.view.Attachment` should not reach outside itself with global jQuery selectors
* `media.view.Attachment.Details` will re-render when `media.view.Attachment`'s single status changes. Add a `ready` callback to apply initial input focus

See #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 19:29:17 +00:00
Scott Taylor
31bb46d0fc Initial cleanup after [29220]:
* Alter/remove some jQuery global selectors, views should only manage themselves
* Trigger an event for attachments when arrow keys are pressed: `attachment:keydown:arrow`
* `media.view.Attachments` should listen for `attachment:keydown:arrow`
* Favor scoped selectors over globals

See #23560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 19:14:15 +00:00
Dominik Schilling
9f91625fb6 Insert Media: Don't select a model if it's already selected.
props avryl, adamsilverstein.
fixes #29152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 17:20:15 +00:00
Scott Taylor
2808d5c523 Media Grid: Cleanup toggling of Next/Previous in Edit modal.
Fixes #29264.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 17:11:15 +00:00
Dominik Schilling
6e0ab38b9e Media Library: Set max value of columns to 12.
fixes #29275.
Built from https://develop.svn.wordpress.org/trunk@29547


git-svn-id: http://core.svn.wordpress.org/trunk@29323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-20 16:17:19 +00:00
Andrew Ozz
342a8ce6a6 TinyMCE wpView: scale iframes to 100% width and ensure they have transparent background. See #29048.
Built from https://develop.svn.wordpress.org/trunk@29545


git-svn-id: http://core.svn.wordpress.org/trunk@29321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 22:43:16 +00:00
Andrew Ozz
51b307bcd3 TinyMCE wpView: add sandbox iframe body styling to get proper height when resizing the iframe, fixes #29270.
Built from https://develop.svn.wordpress.org/trunk@29544


git-svn-id: http://core.svn.wordpress.org/trunk@29320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 22:20:15 +00:00
Andrew Ozz
afdb25bd56 TinyMCE wpView sandbox iframes:
- Make them transparent.
- Don't load tons of unrelated styles that can break them. This could result in minimal styling mismatch to the front-end, but keeps the views working well and looking good.
Props avryl, fixes #29048.
Built from https://develop.svn.wordpress.org/trunk@29543


git-svn-id: http://core.svn.wordpress.org/trunk@29319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 21:53:15 +00:00
Andrew Ozz
228c77ca2f TinyMCE: fix the keycode check when removing the Edit/Delete toolbar from images on keydown, see #28705
Built from https://develop.svn.wordpress.org/trunk@29541


git-svn-id: http://core.svn.wordpress.org/trunk@29317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 19:14:16 +00:00
Andrew Ozz
28bcbcb972 Fix typo in the 'wpeditimage' plugin, see #28705
Built from https://develop.svn.wordpress.org/trunk@29540


git-svn-id: http://core.svn.wordpress.org/trunk@29316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 18:43:20 +00:00
Andrew Ozz
542e56ac3f TinyMCE wpView: remove CSS transition for the fake caret. Can have very annoying side effect: the whole page shifts a bit. See #28595.
Built from https://develop.svn.wordpress.org/trunk@29536


git-svn-id: http://core.svn.wordpress.org/trunk@29312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 03:57:17 +00:00
Andrew Ozz
74f6ddc816 TinyMCE wpView: ignore more keys when the caret is around a view. Part props avryl, fixes #29115.
Built from https://develop.svn.wordpress.org/trunk@29535


git-svn-id: http://core.svn.wordpress.org/trunk@29311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 03:27:17 +00:00
Andrew Ozz
c0fef55a47 DFW: revert applying the Visual editor body color and background-color for now. Set the color to #333 and the background to transparent. Fixes #28330.
Built from https://develop.svn.wordpress.org/trunk@29533


git-svn-id: http://core.svn.wordpress.org/trunk@29309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 18:23:16 +00:00
Dominik Schilling
a28bc71819 Media Modal: Restore to the previous filter and search error message.
fixes #28963.
Built from https://develop.svn.wordpress.org/trunk@29532


git-svn-id: http://core.svn.wordpress.org/trunk@29308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 16:28:19 +00:00
Scott Taylor
a0f2fe6599 After [29507], move unreachable code from _requery() to Query.get().
Built from https://develop.svn.wordpress.org/trunk@29531


git-svn-id: http://core.svn.wordpress.org/trunk@29307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 04:08:15 +00:00
Scott Taylor
36e4e9917b wpviews: whenever a view is updated or inserted, don't refresh ALL of the views.
Props avryl.
Fixes #28788.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 03:59:17 +00:00
Scott Taylor
29a73daa74 Media Grid: Don't show attachment details in the "sidebar" for errors.
Props ocean90.
Fixes #29037.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 02:26:16 +00:00
Scott Taylor
6d342e812f Media Grid: improve the design of upload errors.
Props celloexpressions.
See #29141.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 02:22:17 +00:00
Scott Taylor
5aee14e9a1 Media Grid: on page load with ?item= in the URL, if the model is not in the library: fetch it. Defer the triggering of edit:attachment until the model has been fetched.
Fixes #29052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 02:13:16 +00:00
Andrew Ozz
aff2892646 TinyMCE: fix the edit image and wpview buttons on touch screen PCs, fixes #29235.
Built from https://develop.svn.wordpress.org/trunk@29521


git-svn-id: http://core.svn.wordpress.org/trunk@29297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-17 20:11:15 +00:00
Dominik Schilling
4dc4277a60 Media Grid: Improve position of fixed toolbar at small-screen sizes.
see #28842.
Built from https://develop.svn.wordpress.org/trunk@29517


git-svn-id: http://core.svn.wordpress.org/trunk@29293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-17 14:03:14 +00:00
Andrew Ozz
ac463e5c71 TinyMCE wpView: add small delay before inserting wpview sandbox iframes into the DOM. Fixes a problem in Firefox that may prevent rendering them. Fixes #29241.
Built from https://develop.svn.wordpress.org/trunk@29513


git-svn-id: http://core.svn.wordpress.org/trunk@29290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-17 03:43:18 +00:00
Scott Taylor
4d20246173 Media Grid: $.when expects a splat. Disambiguation: change cache to refresh as the arg name for _requery().
See [29490], #29145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-15 19:00:16 +00:00
Andrew Ozz
81815c4d03 Some pre-commit cleanup of media-grid.js and media-views.js
Built from https://develop.svn.wordpress.org/trunk@29494


git-svn-id: http://core.svn.wordpress.org/trunk@29272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-15 01:13:16 +00:00