Joe McGill
f1dddc6bfb
Media: Restore keyboard navigation of the media grid.
...
This changes the binding of event listeners in the Attachments Browser
to use `on` instead of `listenTo` for the `attachment:keydown:arrow` and
`attachment:details:shift-tab` events. The existing listeners broke
when we upgraded Backbone in [36546].
Props adamsilverstein.
Fixes #36900 .
Built from https://develop.svn.wordpress.org/trunk@37755
git-svn-id: http://core.svn.wordpress.org/trunk@37720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-21 13:35:34 +00:00
Joe McGill
bd3c735c6e
Media: Fix rendering of incorrect toolbar in the Edit view.
...
This switches event binding in `wp.media.controller.EditImage` to use `on`
instead of `listenTo` to restore rendering of the correct toolbar when the
`toolbar:render:edit-image` event fires. The existing listeners broke
when we upgraded Backbone in [36546].
Props adamsilverstein.
Fixes #36861 for trunk.
Built from https://develop.svn.wordpress.org/trunk@37678
git-svn-id: http://core.svn.wordpress.org/trunk@37644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 21:12:29 +00:00
Andrea Fercia
8bd79e49f0
Accessibility: match the visual and tab order in the Media Modal grid.
...
By moving the Details sidebar after the attachments grid, the tab order is
greatly improved for keyboard users and matches the logical and visual order.
Fixes #36909 .
Built from https://develop.svn.wordpress.org/trunk@37610
git-svn-id: http://core.svn.wordpress.org/trunk@37578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-01 17:39:27 +00:00
Aaron Jorbin
262f3f2f7e
Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1
...
This changes every JS file in WordPress, so we need to test everything.
Props netweb.
See #36520 .
Built from https://develop.svn.wordpress.org/trunk@37212
git-svn-id: http://core.svn.wordpress.org/trunk@37178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-15 16:10:37 +00:00
Konstantin Obenland
1edaf1c357
Customize: Respect aspect ratio on cropped images.
...
Takes into account whether the control supports `flex_width` and/or
`flex_height` and adjusts destination measurements accordingly.
Fixes #36318 .
Built from https://develop.svn.wordpress.org/trunk@37113
git-svn-id: http://core.svn.wordpress.org/trunk@37080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-30 15:14:27 +00:00
Weston Ruter
d1ae0642cf
Customize: Add support for flex sizes in CustomizeImageCropper
.
...
Ensures that `$flex_width` and `$flex_height` as specified on `WP_Customize_Cropped_Image_Control` will be honored when a crop is saved.
See #36255 .
Fixes #34851 .
Built from https://develop.svn.wordpress.org/trunk@37042
git-svn-id: http://core.svn.wordpress.org/trunk@37009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-22 03:55:29 +00:00
Weston Ruter
40f6779665
Customize: Fix image cropping when doing live preview of theme switches.
...
Ensure that the Customizer gets bootstrapped with the pre-activated `theme` supplied in the `custom-header-crop` admin ajax requests.
Props faishal, rittesh.patel.
Fixes #32783 .
Built from https://develop.svn.wordpress.org/trunk@36866
git-svn-id: http://core.svn.wordpress.org/trunk@36833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-06 01:45:27 +00:00
Dominik Schilling
71b735974b
Media Library: After [36546] restore the "Add new" functionality.
...
Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone.
Props adamsilverstein.
See #34350 .
Fixes #35853 .
Built from https://develop.svn.wordpress.org/trunk@36575
git-svn-id: http://core.svn.wordpress.org/trunk@36542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:50:26 +00:00
Andrew Ozz
6abb7e6284
Media: when inserting an attachment in the editor and it is not an image, ensure the link is set to something else than none
.
...
Props eherman24, azaozz.
Fizes #35153 for trunk.
Built from https://develop.svn.wordpress.org/trunk@36166
git-svn-id: http://core.svn.wordpress.org/trunk@36132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-04 00:33:28 +00:00
Andrew Ozz
8dd2a31c38
Plupload: update to 2.1.8. Changelog: https://github.com/moxiecode/plupload/releases .
...
Hide the editor uploader overlay on all drop events in the window, not only when dropping on the editor uploader element.
Fixes #34251 , #22403 .
Built from https://develop.svn.wordpress.org/trunk@35019
git-svn-id: http://core.svn.wordpress.org/trunk@34984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 23:50:25 +00:00
Scott Taylor
767dd35a47
Media:
...
When inserting an image into a post, the values in `wp.media.controller.Library` should not default to linking the image when no user settings are present.
The default display setting value for `link` is now `none`. User settings persist and will override or confirm this value based on user actions.
Props liljimmi, janhenckens, eherman24, wonderboymusic.
Fixes #31467 .
Built from https://develop.svn.wordpress.org/trunk@33729
git-svn-id: http://core.svn.wordpress.org/trunk@33697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 12:13:23 +00:00
Konstantin Obenland
3248497cf3
Site Icon: Add crop preview to the media modal.
...
* Monkey patches imgAreaSelect library to support touch events.
* Removes Settings version of Site Icon since it would have been the same flow.
* Removes default value for Customizer setting - there is no default favicon.
Fixes #16434 .
Built from https://develop.svn.wordpress.org/trunk@33329
git-svn-id: http://core.svn.wordpress.org/trunk@33301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 15:57:25 +00:00
Aaron Jorbin
c9307fc95a
Update Grunt dev-dependencies
...
grunt-browserify : minor version update
grunt-contrib-cssmin : minor version update
grunt-contrib-imagemin : patch version update
grunt-contrib-jshint : patch version update
grunt-contrib-uglify : minor version update (causes some changes to minified JS)
grunt-includes : minor version update
grunt-sass : major version update ( underlying libsass update ).
Props wonderboymusic
See #31700
Built from https://develop.svn.wordpress.org/trunk@32988
git-svn-id: http://core.svn.wordpress.org/trunk@32959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-28 14:51:30 +00:00
Scott Taylor
72bf48f0b9
In Media microtemplates after [32467], use <button>
instead of <a>
for several more non-links.
...
Props afercia.
Fixes #26550 .
Built from https://develop.svn.wordpress.org/trunk@32952
git-svn-id: http://core.svn.wordpress.org/trunk@32923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 05:01:24 +00:00
Scott Taylor
b30b08fd92
Refresh attachment links in the media modal are unneeded since bringing the image editor into it in [27445].
...
Props rommelxcastro.
Fixes #32550 .
Built from https://develop.svn.wordpress.org/trunk@32909
git-svn-id: http://core.svn.wordpress.org/trunk@32880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:33:26 +00:00
Scott Taylor
8c7e1b8ac0
In wp.media.view.UploaderStatus.filename()
, don't truncate the filename.
...
Props helen.
Fixes #31216 .
Built from https://develop.svn.wordpress.org/trunk@32908
git-svn-id: http://core.svn.wordpress.org/trunk@32879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:26:26 +00:00
Andrew Ozz
c13cb27c14
Fix error when dropping files for uploading on the editor before the media modal is initialized.
...
Props rommelxcastro, sebastiantiede. Fixes #32527 .
Built from https://develop.svn.wordpress.org/trunk@32894
git-svn-id: http://core.svn.wordpress.org/trunk@32865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 21:08:26 +00:00
Ella Iseulde Van Dorpe
521de0130b
Browserify after [32677]
...
See #30949 .
Built from https://develop.svn.wordpress.org/trunk@32697
git-svn-id: http://core.svn.wordpress.org/trunk@32667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 19:50:29 +00:00
Scott Taylor
2c42a665a2
wp.media.view.Button
should create <button>
s, not <a href="#">
s.
...
Props afercia.
See #32236 .
Built from https://develop.svn.wordpress.org/trunk@32464
git-svn-id: http://core.svn.wordpress.org/trunk@32434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 20:39:27 +00:00
Scott Taylor
a417b2cf1a
In EmbedLink
, a URL needs to be at least 11 chars to be useful.
...
Fixes #32059 .
Built from https://develop.svn.wordpress.org/trunk@32463
git-svn-id: http://core.svn.wordpress.org/trunk@32433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 20:30:26 +00:00
Scott Taylor
b7d4685f3d
When creating an EmbedLink
view, don't add a spinner - it already exists in Embed
.
...
Use the value of `wp.media.controller.Embed.sensitivity` as the sensitivity value for the debounced method in `EmbedLink` to ensure that the spinner toggles don't stutter or overlap.
Fixes #32036 .
Built from https://develop.svn.wordpress.org/trunk@32462
git-svn-id: http://core.svn.wordpress.org/trunk@32432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 20:10:26 +00:00
Scott Taylor
af326241ff
When fetching in media/views/embed/link.js
, call abort()
on any existing XHRs.
...
Use `$.ajax` instead of `wp.ajax.send()` to allow this.
Pass `this` as `context` to the options to remove the need to bind callbacks.
Fixes #32035 .
Built from https://develop.svn.wordpress.org/trunk@32460
git-svn-id: http://core.svn.wordpress.org/trunk@32430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 19:16:25 +00:00
Scott Taylor
31f46f5363
In media/views/embed/link.js
, URLs should have a valid protocol before an attempt to fetch them is made.
...
Fixes #32037 .
Built from https://develop.svn.wordpress.org/trunk@32459
git-svn-id: http://core.svn.wordpress.org/trunk@32429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-08 18:34:28 +00:00
Scott Taylor
2807b7146f
After [32258], restore the parts of [31620] and [31626] that weren't changes to the UI, but were improvements to existing code.
...
* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.
See #31139 .
Built from https://develop.svn.wordpress.org/trunk@32330
git-svn-id: http://core.svn.wordpress.org/trunk@32301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-30 21:40:25 +00:00
Andrew Ozz
60706015e1
Revert editing of video embed parameters in the media modal, [31620] and [31626] for now. Plan on revisiting in 4.3.
...
Props iseulde. Fixes #31139 , fixes #32006 .
Built from https://develop.svn.wordpress.org/trunk@32258
git-svn-id: http://core.svn.wordpress.org/trunk@32229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 22:41:26 +00:00
Helen Hou-Sandí
a581c9851a
Media: Date filtering does not need to be on for all contexts.
...
Affected areas include customizer upload controls and video playlist editing.
props ocean90.
fixes #32004 .
Built from https://develop.svn.wordpress.org/trunk@32228
git-svn-id: http://core.svn.wordpress.org/trunk@32202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 19:49:24 +00:00
Scott Taylor
5e4616039c
Move the built media JS files up a directory to their previous location and naming convention. This fidgets with part of [31373] and will maintain BC for those who were loading those files directly (not using the enqueue system).
...
Props iseulde, ocean90.
Fixes #31912 .
Built from https://develop.svn.wordpress.org/trunk@32125
git-svn-id: http://core.svn.wordpress.org/trunk@32104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-14 15:31:28 +00:00
Scott Taylor
6cb16f7a21
Remove unused media JS files.
...
See #28510 .
Built from https://develop.svn.wordpress.org/trunk@31405
git-svn-id: http://core.svn.wordpress.org/trunk@31386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 22:45:28 +00:00
Andrew Ozz
71885dceca
Media modal: do not attempt to focus the hidden file input field added by Plupload when tabbing. Props afercia, fixes #30392 .
...
Built from https://develop.svn.wordpress.org/trunk@31117
git-svn-id: http://core.svn.wordpress.org/trunk@31098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 21:47:29 +00:00
Sergey Biryukov
e53b581817
Remove non-functional date filter from Edit Selection view in media modal.
...
props tyxla.
fixes #30931 .
Built from https://develop.svn.wordpress.org/trunk@31096
git-svn-id: http://core.svn.wordpress.org/trunk@31077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 18:23:23 +00:00
Scott Taylor
fb454239fb
In Media Views, use this.listenTo( this.model, .... )
instead of this.model.on( .... )
to fix garbage collection and to avoid "ghost views."
...
Fixes #30896 .
Built from https://develop.svn.wordpress.org/trunk@31045
git-svn-id: http://core.svn.wordpress.org/trunk@31026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-04 05:25:22 +00:00
Scott Taylor
e678f9d051
In Media Grid, don't immediately load full size images if the requested size passed to wp.media.view.Attachment.imageSize()
does not exist, look for other suitable sizes.
...
Fixes #30861 .
Built from https://develop.svn.wordpress.org/trunk@31039
git-svn-id: http://core.svn.wordpress.org/trunk@31020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 21:32:23 +00:00
Dominik Schilling
4652717828
Customizer: Remove date filter from the Header/Background Image upload frames.
...
Adds an option to `wp.media.view.AttachmentsBrowser` to hide the date filter added in [29813].
see #30689 .
Built from https://develop.svn.wordpress.org/trunk@30872
git-svn-id: http://core.svn.wordpress.org/trunk@30862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-15 20:27:22 +00:00
Andrew Ozz
31990810f4
Media: ensure the toolbar is shown after leaving iframe-based content. Props mcsf, fixes #30608 .
...
Built from https://develop.svn.wordpress.org/trunk@30780
git-svn-id: http://core.svn.wordpress.org/trunk@30770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 21:12:21 +00:00
Scott Taylor
845e8ab23d
When using the spacebar to select something in "bulk select" mode, don't scroll the page.
...
Props avryl.
Fixes #30622 .
Built from https://develop.svn.wordpress.org/trunk@30777
git-svn-id: http://core.svn.wordpress.org/trunk@30767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 20:11:43 +00:00
John Blackbourn
389811b3ec
Remove the sortable functionality from the selection editing toolbar at the bottom of the media manager.
...
Fixes #29934
See #24352
Props jessepollak
Built from https://develop.svn.wordpress.org/trunk@30686
git-svn-id: http://core.svn.wordpress.org/trunk@30676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 04:18:23 +00:00
Scott Taylor
67e5d4041c
When deleting media grid attachments, wait until the server responds before removing the model from its collection.
...
Props 5um17.
Fixes #30457 .
Built from https://develop.svn.wordpress.org/trunk@30638
git-svn-id: http://core.svn.wordpress.org/trunk@30628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 06:19:23 +00:00
Helen Hou-Sandí
6225c63cf1
Media a11y: Don't set role=checkbox for the attachment details view.
...
Some unnecessary attributes were inherited from the attachment view, which created difficulties with screen readers.
fixes #30390 .
Built from https://develop.svn.wordpress.org/trunk@30483
git-svn-id: http://core.svn.wordpress.org/trunk@30471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 17:15:23 +00:00
Dominik Schilling
12b2ca45ad
Simplify selectors in [30374].
...
props wonderboymusic, adamsilverstein.
see #29326 .
Built from https://develop.svn.wordpress.org/trunk@30461
git-svn-id: http://core.svn.wordpress.org/trunk@30452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 15:37:22 +00:00
John Blackbourn
e2a0c6a86d
Improve keyboard control of Edit Selection mode in the media manager.
...
See #29326
Props adamsilverstein
Built from https://develop.svn.wordpress.org/trunk@30374
git-svn-id: http://core.svn.wordpress.org/trunk@30371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-18 03:34:25 +00:00
Scott Taylor
7eefc4d1e1
JSHint after [30124].
...
Built from https://develop.svn.wordpress.org/trunk@30125
git-svn-id: http://core.svn.wordpress.org/trunk@30125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 20:38:21 +00:00
Scott Taylor
a6cb067481
JSHint after [30120].
...
Built from https://develop.svn.wordpress.org/trunk@30124
git-svn-id: http://core.svn.wordpress.org/trunk@30124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 20:35:22 +00:00
Dominik Schilling
2e76a697f6
Fix JSHint errors introduced in [30120].
...
see #30193 .
Built from https://develop.svn.wordpress.org/trunk@30123
git-svn-id: http://core.svn.wordpress.org/trunk@30123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 20:28:24 +00:00
Scott Taylor
999e0fbd99
Add verbose docs to media-views.js
.
...
Props ericlewis.
See #30193 .
Built from https://develop.svn.wordpress.org/trunk@30120
git-svn-id: http://core.svn.wordpress.org/trunk@30120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-31 15:20:23 +00:00
Scott Taylor
fb019893f9
In wp.Uploader
, when uploader:ready
is triggered, set ready
to true
on the instance. This allows media workflows to check for an existing uploaded instance when opening.
...
Without this check, workflows might wait for `uploader:ready`, which could already have been fired. This would result in an unresponsive editor dropzone.
Fixes #29689 .
Built from https://develop.svn.wordpress.org/trunk@29917
git-svn-id: http://core.svn.wordpress.org/trunk@29669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-16 05:54:18 +00:00
Andrew Ozz
7f2f3dcb5d
Media modal: fix reordering of the thumbnails while creating or editing a gallery, props avryl, fixes #29606 for trunk.
...
Built from https://develop.svn.wordpress.org/trunk@29876
git-svn-id: http://core.svn.wordpress.org/trunk@29633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-11 23:24:23 +00:00
Scott Taylor
821f9f40ec
For attachment-compat
fields, show a spinner while wp.media.model.Attachment.saveCompat()
is firing.
...
Fixes #27028 .
Built from https://develop.svn.wordpress.org/trunk@29831
git-svn-id: http://core.svn.wordpress.org/trunk@29595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-03 18:43:20 +00:00
Scott Taylor
d8c913b3f9
Add the date
filter from media grid to the media modal.
...
Props janhenckens, wonderboymusic.
Fixes #28990 .
Built from https://develop.svn.wordpress.org/trunk@29813
git-svn-id: http://core.svn.wordpress.org/trunk@29579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 04:32:16 +00:00
Scott Taylor
b885885b67
Media Grid/List Table parity: when MEDIA_TRASH
is true
and trash
is the current filter for the grid, add a second bulk action button: "Delete Selected"
...
Fixes #29742 .
Built from https://develop.svn.wordpress.org/trunk@29811
git-svn-id: http://core.svn.wordpress.org/trunk@29577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-02 04:13:16 +00:00
Scott Taylor
f30266acb9
Media Grid:
...
* In Bulk Edit mode, don't attempt to delete or trash an attachment that doesn't have a `delete` nonce. The subsequent `_requery()` will then properly display the attachment still present in the library.
* Remove all updated models from the selection at the same time to avoid async race conditions. The selection is reset when the grid's `select` mode is deactivated, but this allows this view instance to be more portable.
This fix allows users to set caps on individual attachments without confusing the grid's library. This issue was present for bulk actions in general, had nothing to do with `MEDIA_TRASH` specifically.
Fixes #29597 .
Built from https://develop.svn.wordpress.org/trunk@29755
git-svn-id: http://core.svn.wordpress.org/trunk@29527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-21 18:52:16 +00:00