Commit Graph

2219 Commits

Author SHA1 Message Date
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
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
Andrew Ozz
fb559a8095 TinyMCE: improve the way wpViews work. Add two paragraphs and capture the caret in them on clicking before/after/left/right of a view or moving the caret with the arrow keys, then show a "fake" caret.
This makes it much more "natural" to move the caret with the arrow keys and to add paragraphs before a view when it is the first element or after a view when it's last.

Props avryl, see #28595.
Built from https://develop.svn.wordpress.org/trunk@28994


git-svn-id: http://core.svn.wordpress.org/trunk@28782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 03:59: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
0546378ce8 Make a new file: media-grid.js. This will be way more useful in later commits and help reduce churn and bloat in media-views.js.
See #24716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:18:14 +00:00
Scott Taylor
1637dbe164 The MCE view for galleries needs to read wp.media.galleryDefaults.columns after [28990].
See #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:06:14 +00:00
Scott Taylor
1571d3c47c Allow users to override default gallery settings in JS via wp_localize_script(). This is already possible in PHP by filtering shortcode_atts_gallery.
Fixes #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:03:14 +00:00
Scott Taylor
0510e0e589 Add more docs for media.view.MediaFrame.Select methods.
Props ericlewis.
See #28459.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:43:17 +00:00
Scott Taylor
9181f36b7e Add IE11 to the browser whitelist for MediaElement-based MCE views.
Props azaozz.
Fixes #28742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 01:10:15 +00:00
Andrew Nacin
b35982cbff Simplify the setup-config.php UI flow and load process.
When no configuration file is detected, we now redirect to setup-config.php. This process now uses the WordPress bootstrap, rather than a set of fragile hacks.

fixes #28740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:57:14 +00:00
Andrew Ozz
99c9ef1a59 TinyMCE:
- Update the 'paste' plugin including cb36a78e54
- Better filtering of WebKit inserted &nbsp.
- Remove empty paragraphs and all inline styles on pasting but preserve styles added in the editor. This brings back the WP 3.8 behavior and makes pasting in all browsers work the same.
See #28016
Built from https://develop.svn.wordpress.org/trunk@28932


git-svn-id: http://core.svn.wordpress.org/trunk@28730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 21:55:18 +00:00
Andrew Ozz
5168f9c7c6 Secure embeds in the editor (first run):
- When the user pastes an embeddable http URL, try to get the https embed.
- If an embed provider doesn't support ssl embeds, show a placeholder/error message.
- Revise the way we return error messages.
See #28195, #28507.
Built from https://develop.svn.wordpress.org/trunk@28919


git-svn-id: http://core.svn.wordpress.org/trunk@28718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-30 05:49:16 +00:00
Andrew Ozz
db501d7f72 TinyMCE: force 'font-weight: bold` for <strong> and <b> inside the editor or Chrome and Safari may replace them with spans on pasting. Fixes #28656.
Built from https://develop.svn.wordpress.org/trunk@28866


git-svn-id: http://core.svn.wordpress.org/trunk@28666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-27 03:00:15 +00:00
Scott Taylor
4ad56ce548 Make sure the audio player's time tooltip is visible in the media modal for Audio Details.
Fixes #28453.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 20:29:14 +00:00
Sergey Biryukov
1c227553b9 Fix unexpected replacement of a previous tag when selecting a tag from autosuggest results.
props camdensegal.
fixes #28471.
Built from https://develop.svn.wordpress.org/trunk@28851


git-svn-id: http://core.svn.wordpress.org/trunk@28655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 16:08:14 +00:00
Scott Taylor
6ab2f15b0b Dynamically prepend screen reader text to the attachment filters dropdown and the search box in the media modal.
Props SergeyBiryukov.
Fixes #25102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 01:28:16 +00:00
Scott Taylor
6c3ce75b1c Race conditions can cause .uploader-window to be visible with opacity of 0. It will cause the user to have to refresh the page or inspect the element to hide it. Add a delay in wp.media.view.UploaderWindow.hide() to ensure that the uploader window is indeed hidden.
Props kovshenin.
Fixes #27341.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 01:20:15 +00:00
Andrew Ozz
c8ce9e2815 wpLink: support whole URLs including query/fragment when pre-filling the URL field. Fixes #19992
Built from https://develop.svn.wordpress.org/trunk@28828


git-svn-id: http://core.svn.wordpress.org/trunk@28632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-25 00:37:15 +00:00
Scott Taylor
43320a5825 wp.mce.embedView.fetch() and wp.media.view.EmbedLink.fetch() need to pass the same parameters.
Fixes #28532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-24 00:40:14 +00:00
Andrew Ozz
c936468da1 TinyMCE: revert 158b742410 and 576fa77aa2 as they may cause selection restore problems in old IE. See #28391.
Built from https://develop.svn.wordpress.org/trunk@28795


git-svn-id: http://core.svn.wordpress.org/trunk@28608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-21 01:15:15 +00:00
Scott Taylor
0abf8699f3 Further adjustments after [8364], listen to an editor instance event instead of delegating a body click when attempting to pause all players belonging to a particular MCE view.
Props avryl.
Fixes #27971.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-20 16:30:16 +00:00
Scott Taylor
9834317785 Diambiguate type and shortcode in TinyMCE view classes and their attached view.View class. Has the added feature of not causing JS errors.
See #28532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-18 23:03:15 +00:00
Andrew Ozz
46f17ee039 TinyMCE: update to 4.0.28+. Includes all changes until 09-06-2014: 32cb108d41. Changelog: 32cb108d41/changelog.txt.
See #28391.
Built from https://develop.svn.wordpress.org/trunk@28768


git-svn-id: http://core.svn.wordpress.org/trunk@28581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 23:49:15 +00:00
Andrew Ozz
5b4943bc6a TinyMCE wpView: fix selecting all of view's "text" in Safari, props avryl, fixes #28088
Built from https://develop.svn.wordpress.org/trunk@28755


git-svn-id: http://core.svn.wordpress.org/trunk@28569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-16 00:12:15 +00:00
Andrew Ozz
84f3e30f7b wpView: improve handling of embed errors/error messages, see #28195
Built from https://develop.svn.wordpress.org/trunk@28754


git-svn-id: http://core.svn.wordpress.org/trunk@28568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-15 22:53:16 +00:00
Scott Taylor
46a4208f6b Add "edit" mode for [embed] and URL media previews.
See #28532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-13 21:42:15 +00:00
Sergey Biryukov
8c90ebaec7 wpLink: use simpler expressions to detect email address or URL. We are not validating user input here, just suggesting.
see #19992.
Built from https://develop.svn.wordpress.org/trunk@28751


git-svn-id: http://core.svn.wordpress.org/trunk@28565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-13 21:26:15 +00:00
Andrew Ozz
15c902ea3a wpLink: use the proper instance of the editor when looking at the selection. Move the email and URL regexp to variables. See #19992
Built from https://develop.svn.wordpress.org/trunk@28750


git-svn-id: http://core.svn.wordpress.org/trunk@28564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-13 21:14:16 +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
Scott Taylor
c6d0dcc634 When a plain URL or email address is selected in the editor and "Insert/edit link" is clicked, pre-populate the URL field with the URL or mailto:<email-address>.
Props tillkruess.
Fixes #19992.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-09 15:35:14 +00:00
Sergey Biryukov
5fb95760aa Fix JSHint error.
props avryl.
see #24716.
Built from https://develop.svn.wordpress.org/trunk@28697


git-svn-id: http://core.svn.wordpress.org/trunk@28514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-08 12:33:16 +00:00
Scott Taylor
d8e57f0148 As per @gcorne's suggestion, when calling wp.mce.views.register(), automatically set shortcode equal to the passed type in the set of default args instead of introducing a type property. It is still overrideable by the args that are passed.
See #28458.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 14:22:22 +00:00
Scott Taylor
1bb24133d9 Improve inline doc descriptions in media-views.js.
Props ericlewis.
See #28459.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 14:13:17 +00:00
Andrew Ozz
fbdb89b89a wpView: fix deselecting a view when clicking outside the iframe body. Props avryl, fixes #28268
Built from https://develop.svn.wordpress.org/trunk@28687


git-svn-id: http://core.svn.wordpress.org/trunk@28505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 05:04:14 +00:00
Andrew Ozz
23b0443578 wpView: fire a nodeChanged event after selecting a view so the editor UI gets updated. Props avryl, fixes #28385
Built from https://develop.svn.wordpress.org/trunk@28686


git-svn-id: http://core.svn.wordpress.org/trunk@28504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 04:43:17 +00:00
Andrew Ozz
a59cf45c4d TinyMCE: remove &nbsp from empty paragraphs inside the visual editor, props avryl, fixes #28282
Built from https://develop.svn.wordpress.org/trunk@28685


git-svn-id: http://core.svn.wordpress.org/trunk@28503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 04:20:14 +00:00
Andrew Ozz
60e323d911 wpView: use data-mce-selected instead of adding a class to mark a view as selected. This prevents adding an unneeded undo level. Props avryl, fixes #28313
Built from https://develop.svn.wordpress.org/trunk@28684


git-svn-id: http://core.svn.wordpress.org/trunk@28502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-06 02:12:14 +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
Scott Taylor
ce508e95c2 Simplify the creation of MCE views somewhat:
* Rename the `wp.mce.media` mixin (which was named too ambiguously) to `wp.mce.av`.
* Use the same technique for extending mixins for MCE base classes for views and their base.View property class
* `wp.mce.views.register()` should have default constructor logic if one is not passed.

Props avryl.
See #28458.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 17:27:13 +00:00
Scott Taylor
5d89ee4b3b Media modal documentation:
Add some clarity to default values for controllers.

Props ericlewis.
See #28459.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 14:54:14 +00:00
Scott Taylor
17271702ca In the spirit of [27622], add a few CSS rules to ensure that videos will be responsive, regardless of theme.
Props Funkatronic.
Fixes #28414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-02 00:40:15 +00:00
Scott Taylor
4fd5ffe994 In WPPlaylistView::ended(), at the end of a playlist, set the index to 0 and call ->setCurrent() instead of ->loadCurrent() so that the first track is properly highlighted.
Fixes #28428.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-02 00:27:18 +00:00
Andrew Ozz
15a1f80885 TinyMCE in iOS:
- Fix placing the caret at the bottom of longer posts when the keyboard is open.
- Disable resizing on switching editors and on show/hide the kitchen sink row.
See #28242
Built from https://develop.svn.wordpress.org/trunk@28626


git-svn-id: http://core.svn.wordpress.org/trunk@28446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 02:38:16 +00:00
Andrew Ozz
1e8b5ef008 TinyMCE: remove margins from the image toolbar wrapper, props avryl, fixes #28389
Built from https://develop.svn.wordpress.org/trunk@28624


git-svn-id: http://core.svn.wordpress.org/trunk@28445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 22:59:14 +00:00
Helen Hou-Sandí
207bfa43b3 Fix a jshint error introduced in [28607]. see #23560.
Built from https://develop.svn.wordpress.org/trunk@28617


git-svn-id: http://core.svn.wordpress.org/trunk@28441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 14:25:14 +00:00
Andrew Ozz
e518fda253 Regex should be non-greedy, see #28389
Built from https://develop.svn.wordpress.org/trunk@28615


git-svn-id: http://core.svn.wordpress.org/trunk@28439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 07:56:14 +00:00
Andrew Ozz
500bfe7a54 TinyMCE: fix problems with undo/redo after resizing an image several times. Fixes #28389.
Built from https://develop.svn.wordpress.org/trunk@28614


git-svn-id: http://core.svn.wordpress.org/trunk@28438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 07:51:14 +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
Andrew Ozz
c4243e53d0 TinyMCE: update to 4.0.28. Also includes 43fff5b453. Part-props avryl for the patch on #27941, fixes #28391, #27941.
Built from https://develop.svn.wordpress.org/trunk@28606


git-svn-id: http://core.svn.wordpress.org/trunk@28430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 00:59:15 +00:00
Scott Taylor
987e9905ac When parsing an [embed] shortcode into a TinyMCE view, don't attempt to append any returned <script>s to the editor's <head>. This affects only a few supported endpoints: Issuu and Twitter.
See #28195.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-27 20:00:15 +00:00