Commit Graph

1968 Commits

Author SHA1 Message Date
Scott Taylor
ba27ced46b Add a loading indicator to the Media Library.
Props kadamwhite, gcorne, kovshenin.
Fixes #24859.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 17:46:15 +00:00
Scott Taylor
01c0b48822 Make widget customizer code pass JSHint.
Fixes #27298.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 16:45:15 +00:00
Scott Taylor
bc9838f86f We shall pledge to run jshint before committing.
Props nacin for the nudge.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 16:06:14 +00:00
Andrew Ozz
f0bfa77a4a TinyMCE: add the <hr> plugin and button, see #27159
Built from https://develop.svn.wordpress.org/trunk@27428


git-svn-id: http://core.svn.wordpress.org/trunk@27275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:54:14 +00:00
Andrew Ozz
79441fc1c1 TinyMCE: remove border-radius and padding from placeholder images, props avryl, see #27106
Built from https://develop.svn.wordpress.org/trunk@27427


git-svn-id: http://core.svn.wordpress.org/trunk@27274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:29:15 +00:00
Andrew Ozz
62d68cc992 TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103
Built from https://develop.svn.wordpress.org/trunk@27426


git-svn-id: http://core.svn.wordpress.org/trunk@27273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:13:14 +00:00
Scott Taylor
9aa05f8681 Add a timestamp to the urls passed to <audio> and <video> in the modal to ensure that cached view instances aren't referenced by MEjs. Pause the player when closing the controller's modal.
See #27016, #26779.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 21:37:13 +00:00
Andrew Nacin
e853a9cc57 Add widget management to the customizer.
This brings in the Widget Customizer plugin: https://wordpress.org/plugins/widget-customizer/.

props westonruter, shaunandrews, michael-arestad, johnregan3, akeda, topher1kenobe, topquarky, bobbravo2, ricardocorreia. And for good measure, props westonruter.
see #27112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 20:41:14 +00:00
Scott Taylor
09d8606428 Add some missing JSDoc blocks to media-related code.
See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 18:37:15 +00:00
Scott Taylor
0ccc1d52ac Audio doesn't have the same quirks as video in the media modal. We don't have to aggressively destroy the mejs instance.
See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 18:32:14 +00:00
Scott Taylor
ff8844deae Add TinyMCE placeholders for audio and video shortcodes.
* Add `wp.media.mixin`.
* Add `wp.media.audio` and `wp.media.video`.
* Add `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Add `wp.media.controller.AudioDetails` and `wp.media.controller.VideoDetails`.
* Add `wp.media.controller.ReplaceAudio` and `wp.media.controller.ReplaceVideo`.
* Add `wp.media.view.MediaFrame.AudioDetails` and `wp.media.view.MediaFrame.VideoDetails`.
* Add `wp.media.view.AudioDetails` and `wp.media.view.VideoDetails`.
* Update the `wpgallery` TinyMCE plugin.
* Display audio and video players in the media modal when shortcode is clicked.
* Provide a UI to edit shortcode attributes in the media modal.
* Provide a UI to replace the `src` media file in an `audio` or `video` shortcode.

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 15:06:14 +00:00
Andrew Ozz
6074dfa272 Update mce-view.js and the wpview TinyMCE plugin, and use them to show gallery previews in the Visual editor, props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27408


git-svn-id: http://core.svn.wordpress.org/trunk@27255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:01:14 +00:00
Andrew Ozz
7121bb490d Restyles the modal for attaching media to posts, take II (also some autoprefixer and imagemin). Props avryl, see #26952.
Built from https://develop.svn.wordpress.org/trunk@27403


git-svn-id: http://core.svn.wordpress.org/trunk@27250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 03:54:15 +00:00
Andrew Nacin
3028e6e7fb Add jquery.masonry.min.js. fixes #25351.
Built from https://develop.svn.wordpress.org/trunk@27389


git-svn-id: http://core.svn.wordpress.org/trunk@27237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 02:20:14 +00:00
Andrew Ozz
5525f32fd8 TinyMCE: update to 4.0.18, see #24067
Built from https://develop.svn.wordpress.org/trunk@27387


git-svn-id: http://core.svn.wordpress.org/trunk@27235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 01:57:15 +00:00
Andrew Nacin
70d23fc559 Support multiple editor instances when drag-and-drop-uploading onto them.
Also reduces z-index to below the toolbar, and adds a comment.

props kovshenin.
see #19845.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 17:44:16 +00:00
Andrew Nacin
420afb81de TinyMCE: Propagate the dragover event outside the editor so drag-and-drop uploads can catch it.
props kovshenin.
see #19845.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 15:54:21 +00:00
Andrew Ozz
cab6362f2b Editor: throttle scrolling of the main window when the editor is active and is being scrolled with the mouse wheel or a trackpad, see #27013
Built from https://develop.svn.wordpress.org/trunk@27368


git-svn-id: http://core.svn.wordpress.org/trunk@27218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:14 +00:00
Scott Taylor
cbe89d6710 Adjust the priority of the separator in the Edit Playlist and Edit Video Playlist menus to match the structure of the Edit Gallery menu.
Props gcorne.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:13:14 +00:00
Scott Taylor
c0a9ee8452 Make CollectionEdit and CollectionAdd less dynamically quirky. Rename some instance properties for disambiguation. Pass some properties from options when creating instances in wp.media.view.MediaFrame.Post.
See #26631.
Props gcorne.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:11:14 +00:00
Scott Taylor
330f27f095 Add some braces for jshint in media-views.js.
See #26631.
Props gcorne.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:07:15 +00:00
Sergey Biryukov
f01dc328c5 Remove extra comma. props jorbin. see #19845.
Built from https://develop.svn.wordpress.org/trunk@27352


git-svn-id: http://core.svn.wordpress.org/trunk@27203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 19:01:13 +00:00
Andrew Ozz
cd0552a810 TinyMCE: remove box-shadow from the "more" and "nextpage" placeholder images, props avryl, see #24067
Built from https://develop.svn.wordpress.org/trunk@27345


git-svn-id: http://core.svn.wordpress.org/trunk@27197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 22:36:14 +00:00
Andrew Nacin
482856e2e1 Add the ability to drag and drop files directly onto the editor.
The file will then begin to upload and the media manager will open.

props kovshenin.
see #19845.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 21:34:17 +00:00
Andrew Ozz
8d670f0862 Plupload: remove the (old) plupload.silverlight.xap, remove the "executable" prop from Moxie.xap, see #25663
Built from https://develop.svn.wordpress.org/trunk@27340


git-svn-id: http://core.svn.wordpress.org/trunk@27192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 07:37:13 +00:00
Scott Taylor
3dc901a92a Rather than extending media.controller.CollectionAdd 3 times, make it a constructor that dynamically extends media.controller.Library and use instances of it instead.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 23:04:13 +00:00
Scott Taylor
2ea01e110b Restore / re-tools some docs after [27313].
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 21:51:14 +00:00
Scott Taylor
db1a8785b5 Some playlist cleanup:
* Check properties against the `window` object when using `_.isUndefined()` on globals
* Fix a typo for `$safe_type` introduced in [27311]

See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 21:38:17 +00:00
Andrew Ozz
21b74a037d Remove debugging cruft, see #25663
Built from https://develop.svn.wordpress.org/trunk@27318


git-svn-id: http://core.svn.wordpress.org/trunk@27170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:15:16 +00:00
Scott Taylor
cf1d899cc8 In media-editor.js, use _.isUndefined() when available.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:11:14 +00:00
Andrew Ozz
d896fa2487 Upgrade Plupload to 2.1.1, props kovshenin, see #25663
Built from https://develop.svn.wordpress.org/trunk@27316


git-svn-id: http://core.svn.wordpress.org/trunk@27168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:01:16 +00:00
Scott Taylor
baeecbe763 This comment was pasted and does not apply to specified code block.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 19:51:14 +00:00
Scott Taylor
45e748e57e wp.media.collection should be its own civilized instantiable class, not a wrapper/factory. The class shall contain no reference to specific instances, and shall not try to grab static properties of itself. self, meet this.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 19:22:14 +00:00
Scott Taylor
abebb1fde2 Correct a misspelled property name in a media-views.js annotation.
Props kovshenin.
See #26870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 03:07:14 +00:00
Scott Taylor
8a4ef32f7a Populate playlist setting values with their default value if they don't exist while parsing shortcode attributes.
Props kovshenin.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 02:55:13 +00:00
Andrew Nacin
c4545fbbf4 Remove unnecessary quotes from urls in CSS.
props TobiasBg.
fixes #22476.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:23:13 +00:00
Andrew Ozz
511f12f793 When closing the various "edit" media modals, remove the related views elements from the DOM. Props gcorne, fixes #27204.
Built from https://develop.svn.wordpress.org/trunk@27276


git-svn-id: http://core.svn.wordpress.org/trunk@27132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 21:03:15 +00:00
Andrew Nacin
1cb9788f1b Update the Masonry JavaScript library to version 3.
The new script handle is 'masonry'. The old 'jquery-masonry' handle is the official shiv that sits on top of the v3 library. While v3 no longer depends on jQuery, a theme or plugin may have bee
n implicitly loading jQuery though Masonry, rather than additionally declaring it as a dependency for themselves. Thus, the shiv is separate.

Themes should switch to 'masonry' and declare jQuery as a dependency on their own if they need it. Upgrade guide: http://masonry.desandro.com/appendix.html#upgrading-from-v2. imagesLoaded remai
ns included with Masonry here.

props shelob9.
fixes #25351.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 19:53:15 +00:00
Andrew Nacin
74f2a32f52 Fixed mixed spaces and tabs. Also remove trailing comma. see #26631.
Built from https://develop.svn.wordpress.org/trunk@27266


git-svn-id: http://core.svn.wordpress.org/trunk@27123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:32:14 +00:00
Scott Taylor
4b66e01e6d Remove a few unnecessary jQuery selectors added in [27239]. Playlists don't exist in some older contexts that galleries do.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 20:49:14 +00:00
Scott Taylor
c0379aaafc Load default settings state when creating a new playlist in the media modal. Add a few missing inline @this annotations in media-editor.js.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 20:26:14 +00:00
Scott Taylor
943f295d2e Add core support for Playlists and Video Playlists.
* Playlists operate like galleries in the admin. 
* Provide default UI and JS support in themes using MediaElement and Backbone. 
* The shortcodes are clickable, editable, and configurable using the media modal. 
* Playlists support images for each item, whether or not the current theme supports images for `attachment:audio` and `attachment:video`
* Playlists respond to `$content_width` and resize videos accordingly.
* All playlist data is included inline, using a script tag with `type="application/json"`, allowing anyone to unenqueue the WP playlist JS and roll their own.
* Playlist styles are minimal and work out of the box in the last 5 default themes. They inherit and adapt to the current theme's font styles, and their rules are easily overrideable.

See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 18:08:16 +00:00
Scott Taylor
5d15ed5202 Access class directly instead of using this in the shortcodeAttrs method of any factory-generated wp.media.collection.
Fixes #27183.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 13:01:14 +00:00
Dominik Schilling
4dd8be2568 Update Backbone to version 1.1.2.
props gcorne.
fixes #27182.
Built from https://develop.svn.wordpress.org/trunk@27233


git-svn-id: http://core.svn.wordpress.org/trunk@27090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-22 15:42:14 +00:00
Scott Taylor
f319feb524 Register wp.media.controller.GalleryEdit and wp.media.controller.GalleryAdd using the new wp.media.controller.Collection* abstraction code.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-20 18:34:12 +00:00
Scott Taylor
4193c7f6c3 In media-views.js, add wp.media.controller.CollectionAdd and wp.media.controller.CollectionEdit to provide an abstraction for Add and Edit screens in the media modal for collection-type things.
There are currently no instances of this. Those will be forthcoming.

See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-20 18:25:14 +00:00
Scott Taylor
911442cdab Replace the current wp.media.gallery instance in media-editor.js with one that leverages wp.media.collection.
See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-20 18:13:14 +00:00
Scott Taylor
08b1c1b0f5 Add an abstraction of the gallery code in media-editor.js called wp.media.collection. This will be the basis for parsing [gallery]-like shortcodes in the media editor (thing playlists, collections of PDFs, etc).
There are currently no instances of this. Those will be forthcoming.

See #26631.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-20 18:07:12 +00:00
Andrew Ozz
d7db798635 TinyMCE: style the modals to match WordPress admin (first-run). Fix couple of IE problems in tiny_mce_popup.js. Props avryl, see #26952, see #24067
Built from https://develop.svn.wordpress.org/trunk@27190


git-svn-id: http://core.svn.wordpress.org/trunk@27049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-18 06:32:14 +00:00
Andrew Ozz
4aeae869dd TinyMCE: when clicking on a character in the Charmap modal, don't close it if the Crtl key is pressed. Makes it possible to insert several special chars in a row. See #27107.
Built from https://develop.svn.wordpress.org/trunk@27179


git-svn-id: http://core.svn.wordpress.org/trunk@27041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-14 19:20:13 +00:00