Commit Graph

1034 Commits

Author SHA1 Message Date
Andrew Nacin f10e3e59c5 Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: https://develop.svn.wordpress.org/trunk@22387 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:17:25 +00:00
Ryan Boren f6d899210a Restore keyboard accessibility to the color picker. Props lessbloat. see #21206
git-svn-id: https://develop.svn.wordpress.org/trunk@22385 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:00:15 +00:00
bumpbot db035ece96 Compress scripts/styles: 3.5-beta2-22326.
git-svn-id: https://develop.svn.wordpress.org/trunk@22326 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 22:58:31 +00:00
Daryl Koopersmith 15c451d2f6 Give media a heart transplant.
Revises the concept of the media controller and workspace views (i.e. two central points of control) to be more granular. The main media object is now the `Frame`, which is a hybrid view and state machine.

The state machine is a collection of states, which are just generic instances of `Backbone.Model`. This circumvents the problem of juggling global parameters when changing states. Each state contains its own event loop. All events are also forwarded to the frame itself (as is the case in all model/collection relationships).

The frame view contains several regions, each of which can be overridden without harming or re-rendering the other regions. These work well when used in conjunction with the state machine events.

This removes the upload sidebar (don't worry, visible upload UI will return). Drag and drop uploading still works. The ability to upload has been abstracted into its own view (instead of being attached to the central workspace view).

Editing galleries is temporarily broken — the gallery creation and editing experiences will be unified in a future patch.

Adds events to detect dragging changes in `wp.Uploader` and adds methods to detect and leverage browser support for CSS3 transitions.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22320 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 23:29:17 +00:00
bumpbot d69a863ac2 Compress scripts/styles: 3.5-beta2-22269.
git-svn-id: https://develop.svn.wordpress.org/trunk@22269 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 22:58:34 +00:00
Andrew Ozz 1380819bfe Improve visible focus in the admin, props lessbloat, fixes #21324
git-svn-id: https://develop.svn.wordpress.org/trunk@22268 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 19:51:51 +00:00
bumpbot b270741ecd Compress scripts/styles: 3.5-beta2-22265.
git-svn-id: https://develop.svn.wordpress.org/trunk@22265 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 22:58:33 +00:00
Andrew Ozz 469a3d226b Make the admin menu and toolbar work well on mobile devices, props georgestephanis, see #20614
git-svn-id: https://develop.svn.wordpress.org/trunk@22262 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 18:31:21 +00:00
bumpbot 7f2fa09f5c Compress scripts/styles: 3.5-beta2-22252. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22252 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 22:58:39 +00:00
Andrew Ozz 2f8193421c Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: https://develop.svn.wordpress.org/trunk@22250 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:38:35 +00:00
Andrew Ozz 7c30ff0dcb Accessibility shortcuts: new looks and fix for the WebKit focus bug, props lessbloat, fixes #21471
git-svn-id: https://develop.svn.wordpress.org/trunk@22249 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:26:59 +00:00
Andrew Nacin bb5d96a722 jQuery Masonry for uploaded custom headers. props zamoose. fixes #20346.
git-svn-id: https://develop.svn.wordpress.org/trunk@22228 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:05:16 +00:00
bumpbot d1b1bdfe8c Compress scripts/styles: 3.5-beta1-22223. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22223 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:58:48 +00:00
Daryl Koopersmith 4966b15409 Properly align MCE attachment views.
* Adds a `$wrapper` property to MCE views to allow them to manipulate the wrapper on render. This should be used sparingly — only for layout changes that cannot be accomplished through altering the wrapper's children — and likely only for adding/removing classes.
* Uses `wp.html.string()` in `wp.mce.view.toView()`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22220 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:36:21 +00:00
bumpbot 936cf22c7a Compress scripts/styles: 3.5-beta1-22204.
git-svn-id: https://develop.svn.wordpress.org/trunk@22204 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 22:58:47 +00:00
Daryl Koopersmith d27568e703 Caption editing in the media modal library.
* Adds a `describe` option to the workflow controller to support inline caption editing.
* For images, descriptions are mapped to the `caption` attribute.
* For other media items, descriptions are mapped to the `title` attribute.
* Descriptions are saved when the textarea's `change` event fires (i.e. when the textarea is blurred).

fixes #21807, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22173 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:32:48 +00:00
bumpbot 2a0622aaba Compress scripts/styles: 3.5-beta1-22172.
git-svn-id: https://develop.svn.wordpress.org/trunk@22172 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 22:58:38 +00:00
Daryl Koopersmith a830567a92 Correctly insert non-image attachments as links.
* Adds `wp.media.string.link( attachment )` for printing attachment links.
* Adds the `link` attribute to `Attachment` models that corresponds to the link to the attachment post.

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22170 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:54:21 +00:00
Daryl Koopersmith a04930b340 Reset the media modal to the library view after inserting a gallery. fixes #22151, see #21390, #21809.
git-svn-id: https://develop.svn.wordpress.org/trunk@22156 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:47:15 +00:00
Daryl Koopersmith db21ce7189 Gallery editing in the media modal.
The edit button on gallery MCE views will open a new instance of the media modal. Images can be removed, uploaded, and reordered. However, the "Add images from media library" button is not yet functional.

see #21390, #21809, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22155 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:31:12 +00:00
bumpbot 9036d1e57b Compress scripts/styles: 3.5-beta1-22130.
git-svn-id: https://develop.svn.wordpress.org/trunk@22130 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:46:14 +00:00
Andrew Nacin 5ecb1e0d87 Pass the screen context directly to get_sample_permalink_html(). see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22129 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:44:30 +00:00
bumpbot 2aab5aa3b0 Compress scripts/styles: 3.5-beta1-22128.
git-svn-id: https://develop.svn.wordpress.org/trunk@22128 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 02:27:48 +00:00
Ryan Boren 3368f400e6 Better UI for doing "Page on Front".
Props SergeyBiryukov, lessbloat, nacin.

see #16379


git-svn-id: https://develop.svn.wordpress.org/trunk@22127 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-06 15:19:29 +00:00
Daryl Koopersmith d43c390e2b Use the new media modal to insert galleries into TinyMCE and the text editor.
'''Galleries'''

* Gallery insertion from the new media modal (into TinyMCE, the text editor, etc).
* Gallery previews in TinyMCE now use the `wp.mce.views` API.
* Disables the TinyMCE `wpgallery` plugin.
* Gallery previews consist of the first image of the gallery and the appearance of a stack. This will later be fleshed out to include more images/functionality (including editing the gallery, gallery properties, and showing the number of images in the gallery).
* Multiple galleries can be added to a single post.
* The gallery MCE view provides a bridge between the `wp.shortcode` and `Attachments` representation of a gallery, which allows the existing collection to persist when a gallery is initially created (preventing a request to the server for the query).


'''Shortcodes'''

* Renames `wp.shortcode.Match` to `wp.shortcode` to better expose the shortcode constructor.
* The `wp.shortcode` constructor now accepts an object of options instead of a `wp.shortcode.regexp()` match.
* A `wp.shortcode` instance can be created from a `wp.shortcode.regexp()` match by calling `wp.shortcode.fromMatch( match )`.
* Adds `wp.shortcode.string()`, which takes a set of shortcode parameters and converts them into a string.* Renames `wp.shortcode.prototype.text()` to `wp.shortcode.prototype.string()`.
* Adds an additional capture group to `wp.shortcode.regexp()` that records whether or not the shortcode has a closing tag. This allows us to improve the accuracy of the syntax used when transforming a shortcode object back into a string.

'''Media Models'''

* Prevents media `Query` models from observing the central `Attachments.all` object when query args without corresponding filters are set (otherwise, queries quickly amass false positives).
* Adds `post__in`, `post__not_in`, and `post_parent` as acceptable JS attachment `Query` args.
* `Attachments.more()` always returns a `$.promise` object.

see #21390, #21809, #21812, #21815, #21817.


git-svn-id: https://develop.svn.wordpress.org/trunk@22120 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 04:23:59 +00:00
Daryl Koopersmith 1758d1aae3 Add QuickPress support for new media workflow.
* Adds the code required to include the new media scripts, styles, and settings to `media_button()`.
* Improves script dependencies, namely making `media-upload` require `media-views`.
* Some CSS tweaks for the making the new button work well with QuickPress.

see #21390, fixes #22021.


git-svn-id: https://develop.svn.wordpress.org/trunk@22072 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 20:04:34 +00:00
bumpbot b4322b3a60 Compress scripts/styles: 3.5-alpha-22071.
git-svn-id: https://develop.svn.wordpress.org/trunk@22071 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 19:21:47 +00:00
Daryl Koopersmith 6fff91f4d1 Media JS: Move the modal box's title from being stored in the modal view to being stored as an attribute on the workflow. Update modal titles for both the post media and featured image workflows. see #21390, #21776.
git-svn-id: https://develop.svn.wordpress.org/trunk@22044 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:20:22 +00:00
Daryl Koopersmith 692d806fff BUTTON.
Add a "Beta Media" button to the post editor. Currently, it is only capable of inserting images. Other attachment types and galleries need not apply... yet.

* Added `wp.media.string.image( attachment, props )` for generating an image as a string from an attachment and relevant attachment display properties.
* Properly localized the gallery workflow.
* Added `Workflow.update()`, which closes the modal, triggers an `update` event, and resets the selection.
* Added `wp.mce.media` to manage the various media workflows for editors.

see #21813, #21814, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22036 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 04:09:43 +00:00
Andrew Nacin 23d545224c Update underlying color picker library. props mattwiebe. see #21206.
git-svn-id: https://develop.svn.wordpress.org/trunk@22033 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 02:18:55 +00:00
Andrew Nacin 4e9d8d363e New color picker, props mattwiebe. see #21206.
Replaces Farbtastic. May change further in response to user testing.



git-svn-id: https://develop.svn.wordpress.org/trunk@22030 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 01:57:38 +00:00
bumpbot 04889ca5f0 Compress scripts/styles: 3.5-alpha-22024.
git-svn-id: https://develop.svn.wordpress.org/trunk@22024 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 22:58:46 +00:00
Andrew Nacin e82d5080b8 New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:57:44 +00:00
Andrew Ozz 6238b3140f Make sure TinyMCE is not disabled before adding the size saving functions, see #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22017 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:35:36 +00:00
Andrew Ozz 5ad7fe8cd6 Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22007 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 03:30:21 +00:00
bumpbot cb220ab2ba Compress scripts/styles: 3.5-alpha-21989.
git-svn-id: https://develop.svn.wordpress.org/trunk@21989 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 22:58:42 +00:00
Andrew Nacin a7175db279 Hitting return when adding a new category from the category meta box should add the new category, not submit the post form. props wojtek.szkutnik, fixes #14312.
git-svn-id: https://develop.svn.wordpress.org/trunk@21970 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 16:25:15 +00:00
bumpbot aa36dd57fe Compress scripts/styles: 3.5-alpha-21950.
git-svn-id: https://develop.svn.wordpress.org/trunk@21950 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:03:04 +00:00
Andrew Nacin c33b88351b Revert JS from [21921] as it breaks saving when no post date fields are present. see #17180.
git-svn-id: https://develop.svn.wordpress.org/trunk@21947 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 22:27:51 +00:00
Andrew Nacin 1c58ef9f33 Updates and fixes to the new button styles. By default, buttons are now the same size as they were in 3.4. Then there is a smaller button (designed for minor elements) and a larger button (designed for things like Publish and Save Changes). Better focus styles. props lessbloat. see #21598.
git-svn-id: https://develop.svn.wordpress.org/trunk@21944 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 19:34:23 +00:00
bumpbot 826daf5daf Compress scripts/styles: 3.5-alpha-21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@21931 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 18:59:45 +00:00
Peter Westwood 59dd4b7d2b Posting: Make it much harder to create posts with invalid dates by enforcing the post date tests in the UI and the backend code.
Previously you could quite easily send a new post into the back of beyond by specifying an invalid date like the 30th Feb and this was very confusing.
Sometimes it would seem to work and sometimes the post would end up very far in the past - depending on the mysql version and other factors.

Fixes #17180 props jkudish.


git-svn-id: https://develop.svn.wordpress.org/trunk@21921 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 21:43:35 +00:00
bumpbot e4b2e030e3 Compress scripts/styles: 3.5-alpha-21895.
git-svn-id: https://develop.svn.wordpress.org/trunk@21895 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:59:37 +00:00
Andrew Nacin 0ed8541439 Replace QuickPress labels with gray prompt texts. Stylish, but also done for localization purposes (string lengths). props ocean90. fixes #21754.
git-svn-id: https://develop.svn.wordpress.org/trunk@21894 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:45:44 +00:00
Andrew Nacin 5869cbc05a Synchronize block-level elements between the JS and PHP versions of wpautop. props SergeyBiryukov. fixes #18534.
git-svn-id: https://develop.svn.wordpress.org/trunk@21888 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 17:32:44 +00:00
bumpbot 4c9bac8206 Compress scripts/styles: 3.5-alpha-21879. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21879 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-17 00:59:40 +00:00
Daryl Koopersmith 1cc9c42bc4 Use JS Attachment models in wp.Uploader. fixes #21868.
Moves the uploading Attachments queue from the media workspace view to the uploader itself. This ensures that all attachments are added to the central attachmnet store.

Updates wp.Uploader to pass Attachment models to callbacks instead of Plupload file objects. Attachments in the process of uploading have a reference to the file object (which can be fetched by calling `attachment.get('file');`).

Also updates the customizer to be compatible with the API changes.


git-svn-id: https://develop.svn.wordpress.org/trunk@21814 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 16:55:58 +00:00
Daryl Koopersmith 7d6e53317c New button styles.
Using the new buttons:

* Button classes are now stackable.
* All buttons should use a base class of "button".
* Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class.
* Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny".

For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes.

get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix).

props lessbloat, helenyhou, trepmal, nacin. see #21598.



git-svn-id: https://develop.svn.wordpress.org/trunk@21789 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-08 04:58:34 +00:00
Andrew Ozz a624cda5c5 Don't try to show the submenu when it's visible (Chrome), part props ericlewis, fixes #21832
git-svn-id: https://develop.svn.wordpress.org/trunk@21787 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 22:34:43 +00:00
bumpbot 04e7435945 Compress scripts/styles: -3.5-21751.
git-svn-id: https://develop.svn.wordpress.org/trunk@21751 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:59:25 +00:00