Commit Graph

1933 Commits

Author SHA1 Message Date
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
Andrew Ozz
f2f6d60624 TinyMCE: add support for audio and video shortcodes without closing, fix jshint warning, see #27016.
Built from https://develop.svn.wordpress.org/trunk@27177


git-svn-id: http://core.svn.wordpress.org/trunk@27039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 20:13:13 +00:00
Andrew Nacin
fae539978e Optimize 69 images (of 127) using the new Grunt task. (See [27172].)
fixes #25169.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 08:03:14 +00:00
Andrew Nacin
ca4a29c002 Update media-views and wp.Backbone.View for Backbone 1.1.
* Collection set/add/remove/reset methods now return models, not `this`, so they can no longer be chained.
 * Options passed to Backbone.View's constructor are no longer attached automatically. wp.Backbone.View now does this automatically.

See [27170] for Backbone 1.1 itself.

props gcorne.
fixes #26799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 07:36:13 +00:00
Andrew Nacin
07adb0640f Update Backbone from 1.0 to 1.1.
Also update Underscore to 1.6. Includes the development versions of both, which are not included in the build.

Here is Backbone's changelog:
 * Made the return values of Collection’s `set`, `add`, `remove`, and `reset` more useful. Instead of returning `this`, they now return the changed (added, removed or updated) model or list of 
models. (This means they can no longer be chained.)
 * Backbone Views no longer automatically attach options passed to the constructor as `this.options` and Backbone Models no longer attach `url` and `urlRoot` options, but you can do it yourself if you prefer. (But if you extend `wp.Backbone.View`, options will be attached for you.)
 * All `"invalid"` events now pass consistent arguments. First the model in question, then the error object, then options.
 * You are no longer permitted to change the id of your model during `parse`. Use `idAttribute` instead.
 * On the other hand, `parse` is now an excellent place to extract and vivify incoming nested JSON into associated submodels.

See [27171] (next commit) for changes made to WordPress to be compatible with Backbone 1.1.

props gcorne, georgestephanis.
see #26799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 07:34:13 +00:00
Andrew Ozz
a6b4307422 TinyMCE: add image based placeholders for audio and video shortcodes. Props wonderboymusic, see #27016.
Built from https://develop.svn.wordpress.org/trunk@27169


git-svn-id: http://core.svn.wordpress.org/trunk@27034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-13 05:10:11 +00:00
Andrew Ozz
20fe8f026e TinyMCE: fix styling in the Charmap modal so the click targets are as large as the table cells. Remove the "Close" button and close the modal after inserting the special char. Fixes #27107.
Built from https://develop.svn.wordpress.org/trunk@27165


git-svn-id: http://core.svn.wordpress.org/trunk@27031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-11 23:33:14 +00:00
Dominik Schilling
5d0f6bd98a Use jQuery.prop('checked') instead of jQuery.attr('checked'), which is deprecated.
Built from https://develop.svn.wordpress.org/trunk@27164


git-svn-id: http://core.svn.wordpress.org/trunk@27030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-11 21:13:14 +00:00
Andrew Ozz
c908c8f708 Edit image in TinyMCE:
- Add a "toolbar" at the top of the image with two buttons: Edit and Delete.
- Don't open the edit modal on second click on the image. Makes the "edit" button somewhat pointless and can sometimes trigger after resizing the image.
- When the image has caption: attempt to prevent IE11 from making the caption element resizable and wrapping it in thick border.
- When the caret is inside a caption next to the image, pressing Enter will create a new <p> tag above the caption.
- Hide the image toolbar on drag, cut, align.
Props gcorne, see #24409.
Built from https://develop.svn.wordpress.org/trunk@27159


git-svn-id: http://core.svn.wordpress.org/trunk@27025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 23:48:12 +00:00
Andrew Nacin
6adabc6e4d Various JSHint fixes. see #26446.
Built from https://develop.svn.wordpress.org/trunk@27131


git-svn-id: http://core.svn.wordpress.org/trunk@26998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:52:12 +00:00
Scott Taylor
f1fff8a2e9 Add some inline docs to media-views.js and remove some unnecessary comments from a few super calls.
Props gcorne.
See #26870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 20:21:12 +00:00
Andrew Ozz
5ea367cfe1 Fix scrolling inside the Visual editor on MacOS, add the same functionality to the Text editor, see #27013
Built from https://develop.svn.wordpress.org/trunk@27110


git-svn-id: http://core.svn.wordpress.org/trunk@26977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 19:34:12 +00:00
Andrew Nacin
6169e8662b JSHint fixes for media-views and Gruntfile.
props gcorne.
fixes #27032, #27033.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 05:32:12 +00:00
Andrew Ozz
c4f8dede57 TinyMCE: set the proper caption width when clicking image resize handle on image with caption. Props gcorne, fixes #27009, see #24067.
Built from https://develop.svn.wordpress.org/trunk@27098


git-svn-id: http://core.svn.wordpress.org/trunk@26969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 02:07:13 +00:00
Andrew Ozz
5e08452f49 TinyMCE: don't scroll the main window when scrolling the editor content with a mouse wheel or trackpad and reaching the end. Fixes #27013.
Built from https://develop.svn.wordpress.org/trunk@27095


git-svn-id: http://core.svn.wordpress.org/trunk@26967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 01:10:13 +00:00
Andrew Nacin
9edfc740fd Autosave: Fix typo in event namespace. props avryl, see #25272.
Built from https://develop.svn.wordpress.org/trunk@27092


git-svn-id: http://core.svn.wordpress.org/trunk@26964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-04 16:07:12 +00:00
Andrew Ozz
93d3e3efb6 Minor cleanup (jshint) of wp-fullscreen.js and /wordpress/plugin.js, see #24067
Built from https://develop.svn.wordpress.org/trunk@27085


git-svn-id: http://core.svn.wordpress.org/trunk@26958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 21:31:13 +00:00
Andrew Ozz
2726713764 Add back missing var definition in wplink.js, props TobiasBg, see #24067
Built from https://develop.svn.wordpress.org/trunk@27084


git-svn-id: http://core.svn.wordpress.org/trunk@26957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 21:27:12 +00:00
Andrew Ozz
12b6085865 TinyMCE: don't replace <i> with <em> and <b> with <strong> and don't remove them when empty, see #24067, see #23037.
Built from https://develop.svn.wordpress.org/trunk@27083


git-svn-id: http://core.svn.wordpress.org/trunk@26956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 20:26:12 +00:00
Sergey Biryukov
e35d675558 Add braces around conditionals. props TobiasBg. fixes #25704.
Built from https://develop.svn.wordpress.org/trunk@27082


git-svn-id: http://core.svn.wordpress.org/trunk@26955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 20:17:11 +00:00
Andrew Ozz
2f6d9d37cc Consolidate "close on Escape" in the media modal, DFW, wpLink and Thickbox. Props kovshenin, fixes #26854.
Built from https://develop.svn.wordpress.org/trunk@27080


git-svn-id: http://core.svn.wordpress.org/trunk@26953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 05:31:14 +00:00
Andrew Ozz
28cd7371c4 WP_Link: convert < > and " to HTML entities when setting link title for the Text editor. Fixes #25704.
Built from https://develop.svn.wordpress.org/trunk@27071


git-svn-id: http://core.svn.wordpress.org/trunk@26944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 21:12:12 +00:00
Andrew Ozz
7b4b508b91 TinyMCE: update to 4.0.16, see #24067.
Built from https://develop.svn.wordpress.org/trunk@27062


git-svn-id: http://core.svn.wordpress.org/trunk@26935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-31 18:58:15 +00:00
Andrew Ozz
314f9569e5 TinyMCE: update to 4.0.14. Remove the fix for using init.setup in old plugins, now fixed upstream. See #24067.
Built from https://develop.svn.wordpress.org/trunk@27060


git-svn-id: http://core.svn.wordpress.org/trunk@26933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-31 00:06:12 +00:00
Scott Taylor
79ad468c61 Upgrade MediaElement to 2.13.2 from 2.13.0. For a full list of changes: https://github.com/johndyer/mediaelement/compare/2.13.0...2.13.2
Fixes #26954.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-29 18:24:11 +00:00
Scott Taylor
0347a8944e Update the versions of several devDependencies in package.json. grunt-cssjanus has been updated to 0.2.2, we no longer need the fork. Run npm install to receive updates for node_modules in the project root.
Props yoavf, TobiasBg.
Fixes #26073.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-29 04:43:30 +00:00
Andrew Ozz
6f25a990d0 TinyMCE: fix Ctrl + s shortcut (trigger autosave), see #24067.
Built from https://develop.svn.wordpress.org/trunk@27052


git-svn-id: http://core.svn.wordpress.org/trunk@26926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-28 23:29:12 +00:00
Scott Taylor
e1759d668a For starters, [27050] is rad. This just cleans up some extra new lines that were littered about, updates *some* of the inline docs (needs more), moves wp.media.controller.ImageDetails closer to its parent class, and de-dupes some code in media-template.php.
See #24409.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-28 23:21:13 +00:00
Andrew Ozz
33eedc570b Introduce Edit Image (single mode) in the media modal and use it to edit images inserted in the editor. Adds new feature: replace an image in the editor. Props gcorne, see #24409.
Built from https://develop.svn.wordpress.org/trunk@27050


git-svn-id: http://core.svn.wordpress.org/trunk@26924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-28 21:17:12 +00:00
Andrew Ozz
864ab9ae56 Autosave:
- Move the 'Saving post' and 'Draft saved at...' strings from autosaveL10n to postL10n as they are used only there.
- Use the custom jQuery events 'before-autosave' and 'after-autosave' to show these messages.
- Separate autosave.suspend() for local and server so local autosaves can continue while server autosaves are suspended.
- Remove the recently added autosave.server.disable() and use autosave.server.suspend() instead.
- Bring back .button.disabled, button-primary.disabled and use .disabled to prevent multiple form submissions.
See #25272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-27 00:28:13 +00:00
Andrew Ozz
07ae13e432 TinyMCE: do not run preventDefault() on the tab key when Ctrl, Alt or Command key is also pressed. Ctrl + Tab is used to switch between browser tabs. See #24067, fixes #17261.
Built from https://develop.svn.wordpress.org/trunk@27034


git-svn-id: http://core.svn.wordpress.org/trunk@26910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-26 00:29:12 +00:00
Scott Taylor
7ef7a7cb47 Add some inline docs to methods in media-models.js - particularly around @param and @returns.
See #26870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-25 08:56:12 +00:00
Scott Taylor
bf09d042eb Add some JSDoc annotations to media-models.js to disambiguate instance properties and static class properties/methods in the base media Models.
See #26870.


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


git-svn-id: http://core.svn.wordpress.org/trunk@26907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-25 07:39:11 +00:00
Andrew Ozz
ed3145ec3d TinyMCE: fix the compat3x plugin appending 'en.' to button titles. Set charset to UTF-8 in html_entity_decode() for translated strings. See #24067, see #26875.
Built from https://develop.svn.wordpress.org/trunk@27030


git-svn-id: http://core.svn.wordpress.org/trunk@26906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-25 01:21:13 +00:00
Dominik Schilling
2d9bf68585 Update to jQuery UI 1.10.4. fixes #26884.
Built from https://develop.svn.wordpress.org/trunk@27028


git-svn-id: http://core.svn.wordpress.org/trunk@26904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 17:44:12 +00:00
Dominik Schilling
91f7d8e1b7 Update to jQuery 1.11.0. fixes #26926.
Built from https://develop.svn.wordpress.org/trunk@27027


git-svn-id: http://core.svn.wordpress.org/trunk@26903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 17:40:13 +00:00