Commit Graph

11164 Commits

Author SHA1 Message Date
Ryan Boren 594bbe90df When settting a featured image, move the currently selected image to the beginning of the library if it doesn't exist within the attachments loaded so far.
Props koopersmith
fixes #22494


git-svn-id: https://develop.svn.wordpress.org/trunk@22993 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 07:04:34 +00:00
bumpbot 077dea75f7 Compress scripts/styles: 3.5-RC2-22992.
git-svn-id: https://develop.svn.wordpress.org/trunk@22992 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 06:53:58 +00:00
Ryan Boren 7ad3d2410c Show a spinner when attachment details are saved.
Props koopersmith
see #22613


git-svn-id: https://develop.svn.wordpress.org/trunk@22991 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 06:37:49 +00:00
Ryan Boren c21e4809c3 Show Select Files button the first time the media modal is opened.
Props koopermsith
fixes #22691


git-svn-id: https://develop.svn.wordpress.org/trunk@22990 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 06:32:25 +00:00
Andrew Nacin 8adec7a437 Do not save an initial revision for a post created through the auto-draft mechanism. Prevents a bogus revision, often with the title 'Auto Draft'. Restores pre-auto-draft behavior made obvious by XML-RPC's implementation of both auto-drafts and the subsequent wp.getRevisions method. fixes #22687. see #22686.
git-svn-id: https://develop.svn.wordpress.org/trunk@22989 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 06:28:28 +00:00
bumpbot c164b8e2c4 Compress scripts/styles: 3.5-RC2-22988.
git-svn-id: https://develop.svn.wordpress.org/trunk@22988 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 05:42:30 +00:00
Ryan Boren 9cdc4de444 Add random and reverse sorting options to gallery settings.
Props koopersmith
fixes #22637


git-svn-id: https://develop.svn.wordpress.org/trunk@22987 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 05:32:25 +00:00
Andrew Nacin a347195dca In Firefox, style placeholder text a dark gray since the browser doesn't do it for us. props helenyhou, fixes #22689.
git-svn-id: https://develop.svn.wordpress.org/trunk@22986 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 05:17:23 +00:00
Andrew Nacin 6b0e365fc0 Media: Don't add menu_order to newly uploaded attachments, to match 3.4 behavior. Reverts a bit of [22967]. props koopersmith. fixes #22607.
git-svn-id: https://develop.svn.wordpress.org/trunk@22985 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 04:54:03 +00:00
Ryan Boren 558d134c6b Update gallery editing to work with the modal changes. Add nice handling for default states.
Props koopersmith
see #21776


git-svn-id: https://develop.svn.wordpress.org/trunk@22984 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 04:38:10 +00:00
Andrew Nacin 86a0b9ad45 Media: Prevent the compat view from wrapping around the attachment details. Allow the filename to break-word. props koopersmith, SergeyBiryukov. fixes #22667.
git-svn-id: https://develop.svn.wordpress.org/trunk@22983 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 04:15:32 +00:00
Andrew Nacin f88b538001 Bring Featured Images back into the main media dialog.
Most users don't realize that the Featured Image meta box exists; if they do, few use it.

Restores the old meta box UI, including the admin_post_thumbnail_html filter. If a plugin is using _wp_post_thumbnail_html() in conjunction with Thickbox elsewhere, it will also magically still work.

Specific underlying changes:
 * Converts the modal view to use the view manager, which means that a call to open() will automatically call render and attach if necessary.
 * Doesn't automatically set a state in wp.media, to allow code to customize the states to be added before activation.

props koopersmith.
fixes #21776.



git-svn-id: https://develop.svn.wordpress.org/trunk@22979 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 02:38:10 +00:00
Daryl Koopersmith 8a6d1c5b89 Prevent small thumbnails from being upscaled. props helenyhou. fixes #22681.
git-svn-id: https://develop.svn.wordpress.org/trunk@22978 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 00:42:26 +00:00
Andrew Nacin 8cd2af059b Media templates: Make sure we have a width and height before printing dimensions. We don't calculate dimensions for icons. fixes #22680.
git-svn-id: https://develop.svn.wordpress.org/trunk@22976 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 21:53:45 +00:00
bumpbot 30066d6553 Compress scripts/styles: 3.5-RC2-22975.
git-svn-id: https://develop.svn.wordpress.org/trunk@22975 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 19:49:31 +00:00
Andrew Nacin a83710408f `wp.media` instead of just `media`. props alexkingorg, see #22676.
git-svn-id: https://develop.svn.wordpress.org/trunk@22974 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 19:24:22 +00:00
bumpbot 23f78b14df Compress scripts/styles: 3.5-RC2-22973.
git-svn-id: https://develop.svn.wordpress.org/trunk@22973 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:57:38 +00:00
Andrew Nacin 5c611cde9d Use wp.media, not media, in media-editor.js. see #22676.
git-svn-id: https://develop.svn.wordpress.org/trunk@22972 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:55:58 +00:00
bumpbot dff51dff56 Compress scripts/styles: 3.5-RC2-22971.
git-svn-id: https://develop.svn.wordpress.org/trunk@22971 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:50:10 +00:00
Andrew Nacin f2b9e1a090 SimplePie: Return nothing and throw an error in SimplePie_Sanitize when DOMDocument is disabled.
Note that when SimplePie is used through the WordPress fetch_feed() function, we use kses rather than SimplePie_Sanitize, which removes the dependency on DOMDocument. This change is only for plugins using SimplePie directly.

props rmccue. fixes #21990.



git-svn-id: https://develop.svn.wordpress.org/trunk@22970 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:43:12 +00:00
Andrew Nacin 1839a359b9 Add wp_enqueue_media action to the function of the same name. props koopersmith, fixes #22678.
git-svn-id: https://develop.svn.wordpress.org/trunk@22969 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:33:20 +00:00
Andrew Nacin 7d0efc4012 Avoid leaking the 'media' var into the global JS namespace. props koopersmith, fixes #22676.
git-svn-id: https://develop.svn.wordpress.org/trunk@22968 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:32:47 +00:00
Andrew Nacin d8e714d6e3 Allow the 'Uploaded to this post' view to be sorted, saving the resulting order as menu_order.
This functionality is designed to be backwards compatible with manual querying for attachments by menu_order.

props koopersmith.
see #22607.



git-svn-id: https://develop.svn.wordpress.org/trunk@22967 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:06:31 +00:00
bumpbot 976342549d Compress scripts/styles: 3.5-RC2-22966.
git-svn-id: https://develop.svn.wordpress.org/trunk@22966 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 04:35:23 +00:00
Ryan Boren 14bd848ee5 In the media modal, show the Link To: url.
Props nacin
fixes #22662


git-svn-id: https://develop.svn.wordpress.org/trunk@22965 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 00:43:08 +00:00
bumpbot 5a1ca22cca Compress scripts/styles: 3.5-RC2-22961.
git-svn-id: https://develop.svn.wordpress.org/trunk@22961 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-01 02:56:11 +00:00
Ryan Boren f9b0b72ffc Responsive and RTL css improvements or the media modal.
Props ocean90, koopersmith
see #22615


git-svn-id: https://develop.svn.wordpress.org/trunk@22960 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-01 02:53:53 +00:00
Andrew Nacin 229c5c9be3 Media: Add -webkit-overflow-scrolling for a smoother mobile/iOS experience.
props koopersmith.
fixes #22657.



git-svn-id: https://develop.svn.wordpress.org/trunk@22959 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-01 01:44:15 +00:00
bumpbot ce238d39ef Compress scripts/styles: 3.5-RC2-22958.
git-svn-id: https://develop.svn.wordpress.org/trunk@22958 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 17:41:19 +00:00
Ryan Boren 0996e3d153 Resolve race conditions in Attachments.more().
Props koopersmith
fixes #22656


git-svn-id: https://develop.svn.wordpress.org/trunk@22957 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 16:45:43 +00:00
Ryan Boren 303f2bd2ff Resolve race conditions in Attachments.more(). Provides for smoother refreshes when searching and properly cleans out content components.
Props koopersmith
fixes #22656


git-svn-id: https://develop.svn.wordpress.org/trunk@22956 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 16:41:38 +00:00
bumpbot b80e435481 Compress scripts/styles: 3.5-RC2-22955.
git-svn-id: https://develop.svn.wordpress.org/trunk@22955 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:54:16 +00:00
Ryan Boren 780c0ec85b Properly pass WordPress uploading errors to wp.Uploader.
Props koopersmith
fixes #22655


git-svn-id: https://develop.svn.wordpress.org/trunk@22954 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:40:09 +00:00
bumpbot 98d7fb5e28 Compress scripts/styles: 3.5-RC2-22953. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22953 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:20:51 +00:00
Ryan Boren 06b9663f58 Refine media state machine methods.
* state( id ) becomes setState( id )
* get( id ) becomes state( id )
* state() stays the same
* previous() becomes lastState()

Props koopersmith
fixes #22652


git-svn-id: https://develop.svn.wordpress.org/trunk@22952 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:19:11 +00:00
Ryan Boren d7ec10376b Update the "Uploaded to this post" filter view when uploading new files.
* Add an Attachments collection filter for uploadedTo (post_parent).
* Correct an erroneous map from the non-existent parent prop to post_parent.
* Define default menuOrder and uploadedTo props for uploading attachments.
* Unify filterable props into a single method (improving validation performance for calls to set with multiple properties).

Props koopersmith
fixes #22654


git-svn-id: https://develop.svn.wordpress.org/trunk@22951 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:11:44 +00:00
bumpbot 74f9eabbd0 Compress scripts/styles: 3.5-RC2-22949.
git-svn-id: https://develop.svn.wordpress.org/trunk@22949 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:52:16 +00:00
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Ryan Boren 5178ac86cb RTL fixes for media and color picker.
Props ocean90
see #22453


git-svn-id: https://develop.svn.wordpress.org/trunk@22947 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:34:16 +00:00
Andrew Nacin be096cf4a5 Pressing escape now closes the media modal. props koopersmith, see #22502.
git-svn-id: https://develop.svn.wordpress.org/trunk@22946 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 08:37:17 +00:00
Ryan Boren 17622c2daa Improve switching between browser and upload state.
Props koopersmith
fixes #22628


git-svn-id: https://develop.svn.wordpress.org/trunk@22945 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 06:01:47 +00:00
bumpbot 020dfbc71a Compress scripts/styles: 3.5-RC2-22944.
git-svn-id: https://develop.svn.wordpress.org/trunk@22944 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 05:39:13 +00:00
Ryan Boren 870250e617 Correctly insert images at caret position in IE8/7.
Props lessbloat
fixes #22638


git-svn-id: https://develop.svn.wordpress.org/trunk@22943 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 04:54:09 +00:00
Ryan Boren e746a5dbb5 In the edit image modal, move Title to the advanced section and move Caption above Alt.
Props nacin
fixes #22646


git-svn-id: https://develop.svn.wordpress.org/trunk@22942 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 04:09:17 +00:00
Ryan Boren d34177f831 Remove focus outline from admin bar elements.
Props azaozz, lessbloat, dllh
fixes #22643


git-svn-id: https://develop.svn.wordpress.org/trunk@22941 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 02:29:36 +00:00
Ryan Boren 405868616c ImageOptim for uplaoder icons. see #22610
git-svn-id: https://develop.svn.wordpress.org/trunk@22940 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 02:18:07 +00:00
Ryan Boren b44ab8213f Fix image alignment of the remove (X) icons in the media modal.
Props JerrySarcastic
fixes #22610


git-svn-id: https://develop.svn.wordpress.org/trunk@22939 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 02:17:14 +00:00
Ryan Boren 6b972a4c53 In the media modal, ensure modal events are always fired on its frame. This ensures restoreThickbox() and thus tbRemove() are called properly when clicking the close button of the modal.
Props koopersmith
fixes #22632


git-svn-id: https://develop.svn.wordpress.org/trunk@22938 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 01:55:37 +00:00
Ryan Boren 3c145e0d49 In the add media modal, fallback back to caption if alt is not set. Falback to title if neither caption nor alt are set.
Props koopersmith
see #18984


git-svn-id: https://develop.svn.wordpress.org/trunk@22937 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 01:38:41 +00:00
Ryan Boren cdce6a366e Introduce API to add back the description field in the new media popup.
Props nacin
fixes #22642


git-svn-id: https://develop.svn.wordpress.org/trunk@22929 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-29 23:52:30 +00:00