Commit Graph

460 Commits

Author SHA1 Message Date
Andrew Nacin ee5bc76549 Add comments to time intervals we cannot express with the constants. Fix a comment. props SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@22531 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 18:13:09 +00:00
bumpbot 68f1c2fd82 Compress scripts/styles: 3.5-beta2-22515.
git-svn-id: https://develop.svn.wordpress.org/trunk@22515 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 22:58:35 +00:00
Andrew Nacin 595cd943bf WordPress dialog jQuery UI widget:
* Link to the upstream bug report.
 * No need to specify the default value for an option.
 * Use the new _super() UI method to open the dialog, avoiding a direct reference to the parent.
 * Fix typo in comment.
 * Use public isOpen() method rather than a private property.

props scott.gonzalez.
fixes #22399.



git-svn-id: https://develop.svn.wordpress.org/trunk@22514 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 22:36:35 +00:00
Andrew Nacin e625c90923 Define a custom event prefix in the wpdialog jQuery UI widget to work around a jQuery UI 1.9.1 regression. see #22399.
git-svn-id: https://develop.svn.wordpress.org/trunk@22513 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 21:45:13 +00:00
bumpbot 7ec25963e0 Compress scripts/styles: 3.5-beta2-22438. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22438 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:29:58 +00:00
Mark Jaquith 504b94b1b3 Use ImageOptim to losslessly smush our images. About half a MB in savings! fixes #22381. props waldojaquith
git-svn-id: https://develop.svn.wordpress.org/trunk@22425 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:49:10 +00:00
Andrew Ozz 49d5e725ce Allow commonly used obsolete HTML5 attributes in TinyMCE, table[summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor] and a[name], fixes #22175
git-svn-id: https://develop.svn.wordpress.org/trunk@22411 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:36:10 +00:00
Andrew Ozz 4902853127 Remove the Alt + Shift + G (old fullscreen mode) shortcut from the TinyMCE help popup, props SergeyBiryukov, see #21197
git-svn-id: https://develop.svn.wordpress.org/trunk@22394 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:28:01 +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 c593ca433a TinyMCE: fix showing popup buttons on images in WebKit, fixes #22188
git-svn-id: https://develop.svn.wordpress.org/trunk@22246 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 18:16:29 +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 bf02be2b60 Display gallery and attachment MCE views as inline blocks. Make gallery MCE view wrappers block level. see #21390, #21813, #21815.
git-svn-id: https://develop.svn.wordpress.org/trunk@22221 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:41:38 +00:00
Daryl Koopersmith 18b3efaf52 MCE Views: Add alignment styles for generic views.
Adds `alignnone`, `aligncenter`, `alignleft`, and `alignright` by default.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22219 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:32:12 +00:00
Daryl Koopersmith 60a44a0865 MCE Views: First pass at keystroke and insertion handling.
* When a MCE view is selected, normal keystrokes (those without command/control) are blocked.
* Backspace/delete will successfully remove the view.
* Arrow handling will be added at a later point.
* When a MCE view is selected and content is pasted or injected (e.g. when an attachment is added), the content is added to the first text node after the view. If the view is at the end of the document or the next element is another view, a text node is injected into the DOM immediately after the selected view.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22210 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 03:28:22 +00:00
Daryl Koopersmith 4af634578a MCE Views: Add selection/deselection when a view is clicked.
These methods should be expanded to prevent content from being inserted into the view by blocking and rerouting keystrokes as appropriate as well as repositioning the caret before content is inserted.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22208 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 23:52:09 +00:00
Daryl Koopersmith 6500957bcd Improve styling and markup for gallery and attachment MCE views.
Attachment views can now inherit from the theme's `editor-style.css` — just have any rules that apply to the `img` tag apply to `.editor-attachment` as well.

Adds a non-functional edit button to gallery views.

see #21390, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22154 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 06:47:22 +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 0dd940e0c1 First pass on TinyMCE attachment in-editor UI.
* Adds in-editor UI for image attachments. Most of this UI should be able to migrate to all images in a future commit.
* Removes the wpeditimage TinyMCE plugin from the default plugins array.
* Add `wp.media.fit`, a helper method to constrain dimensions based upon a maximum width and/or height.
* Add html attribute parsing and string generation utilities (currently stored in mce-views).
* Calling `remove` on a TinyMCE views now ensures that the the parent and references are removed as well.
* Fixes a bug where we weren't sending the full array of results to matches in wp.mce.view.

see #21390, #21812, #21813.



git-svn-id: https://develop.svn.wordpress.org/trunk@22012 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 14:12:54 +00:00
Daryl Koopersmith c133581a81 Add JavaScript methods for handling shortcodes.
Adds `wp.shortcode`, a set of methods used for parsing shortcodes out of content. Also adds a default set of shortcode properties to `wp.mce.view`.

fixes #21996, see #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22004 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 01:00:08 +00:00
Andrew Nacin 14592e8dd1 Do not use time constants in files the WP bootstrap is not or may not be loaded. see #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21997 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 07:05:48 +00:00
Andrew Nacin 774a12be83 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:26:19 +00:00
bumpbot 327697fc6d Compress scripts/styles: 3.5-alpha-21964. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21964 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:24:33 +00:00
Andrew Ozz 13148ff6ce DFW: add scroll locking to prevent scrolling to top in WebKit on paste, add auto-resize throttling to 0.5 sec, only compare scrollHeight values (works well in all supported browsers), fixes #21979
git-svn-id: https://develop.svn.wordpress.org/trunk@21963 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:08:31 +00:00
Daryl Koopersmith 0a0732f9ab Makes custom TinyMCE views easier to implement.
For details and examples, see the ticket.

props azaozz, fixes #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@21961 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 00:13:18 +00:00
Andrew Nacin cc6c48b945 Remove ui.css from WP's TinyMCE theme. It was left for back compat with a reference to editor-buttons.css, which was never updated to editor.css and no one noticed.
git-svn-id: https://develop.svn.wordpress.org/trunk@21934 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 03:13:19 +00:00
Andrew Nacin 8aee69730b It is 'Alternative Text', not 'Alternate Text'. props alecrust, RyanJKoehler. fixes #21176.
git-svn-id: https://develop.svn.wordpress.org/trunk@21917 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 16:55:43 +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
Andrew Ozz 2bd5e1830b Switch TinyMCE's schema to 'html5', add 'autofocus' to the attributes map for <input>, part props SergeyBiryukov, fixes #13314
git-svn-id: https://develop.svn.wordpress.org/trunk@21875 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 21:20:35 +00:00
Andrew Nacin db981a3b27 Switch to .min for compressed JS and CSS files.
* This moves our "development" versions from .dev.js to .js (same for css).
 * The compressed version then moves from .js to .min.js (same for css).

By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.

fixes #21633.



git-svn-id: https://develop.svn.wordpress.org/trunk@21592 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 00:04:18 +00:00
bumpbot ebcef178df Compress scripts/styles: 3.5-alpha-21580. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21580 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-22 02:58:28 +00:00
Andrew Ozz ce9a8bdd8e Disable the (fake) image resizing in WebKit and Opera in TinyMCE 3.5.6, fix dragging image with caption in Firefox, see #21173
git-svn-id: https://develop.svn.wordpress.org/trunk@21576 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-22 01:47:53 +00:00
bumpbot 256c792376 Compress scripts/styles: 3.5-alpha-21546. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21546 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-19 00:58:19 +00:00
Andrew Ozz 754c42e71f Update TinyMCE to 3.5.6, see #21173
git-svn-id: https://develop.svn.wordpress.org/trunk@21545 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-18 23:24:27 +00:00
Andrew Ozz ab61b71fd5 Revert [21495]. Discussed in dev-chat: it's better if the themes implement this or something similar.
git-svn-id: https://develop.svn.wordpress.org/trunk@21532 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-15 21:21:51 +00:00
Andrew Ozz d79594b872 Better editor background, take one, see #21536
git-svn-id: https://develop.svn.wordpress.org/trunk@21495 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-10 07:11:03 +00:00
Andrew Ozz 4e712ea44c TinyMCE: fix typo in button tooltips.
git-svn-id: https://develop.svn.wordpress.org/trunk@21468 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-07 03:28:20 +00:00
bumpbot 4e1bc64c80 Compress scripts/styles: 3.5-alpha-21416. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21416 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-03 18:58:19 +00:00
Andrew Ozz ffab659fea TinyMCE: revert Firefox shortcuts to match all other browsers (Alt+Shift+letter), fix the labels for the shortcuts, update description in wp-mce-help, fixes #21197
git-svn-id: https://develop.svn.wordpress.org/trunk@21415 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-03 18:12:45 +00:00
bumpbot 37431ce817 Compress scripts/styles: 3.5-alpha-21360. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21360 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-29 22:58:19 +00:00
Andrew Ozz 23e2a1813c TinyMCE shortcuts: revert to Alt + Shift + letter for WebKit and Ctrl + Alt + letter (Command + Option + letter) in Firefox, see #21197
git-svn-id: https://develop.svn.wordpress.org/trunk@21359 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-29 21:08:58 +00:00
Andrew Ozz 3063d8c886 Bail out themes and plugins that have copied code from core and don't maintain it by requiring class-wp-editor.php in wp-langs.php, fixes #21350 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@21345 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-25 19:59:29 +00:00
Ryan Boren 8ac43209f5 Fix some spelling errors. Props thee17. fixes #21191
git-svn-id: https://develop.svn.wordpress.org/trunk@21333 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-25 18:06:13 +00:00
Andrew Ozz 6e6b727315 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: https://develop.svn.wordpress.org/trunk@21311 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-24 00:15:15 +00:00
bumpbot a95752402e Compress scripts/styles: 3.5-alpha-21301. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21301 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-22 02:58:18 +00:00
Andrew Ozz 446b40235f TinyMCE: fix tabbig in and out of the editor, fixes #20834
git-svn-id: https://develop.svn.wordpress.org/trunk@21300 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-22 02:33:53 +00:00
bumpbot 1879bb5571 Compress scripts/styles: 3.5-alpha-21273. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21273 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-14 02:58:20 +00:00
Andrew Ozz b3fdac2a17 TinyMCE: add the Alt + W shortcut only when DFW is loaded and Alt + G only when MCE fullscreen is loaded, fixes #21197
git-svn-id: https://develop.svn.wordpress.org/trunk@21272 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-14 01:46:54 +00:00
bumpbot 47002c1652 Compress scripts/styles: 3.5-alpha-21269. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21269 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-13 00:58:19 +00:00
Andrew Ozz 9423d09005 TinyMCE: update the keyboard shortcuts: Alt + letter for Firefox and WebKit, Alt + Shift + letter for IE and Opera, add shortcut for DFW (Alt + W), see #21214, fixes #21197, fixes #17992
git-svn-id: https://develop.svn.wordpress.org/trunk@21266 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-13 00:26:49 +00:00
bumpbot 95aac8c091 Compress scripts/styles: 3.5-alpha-21255. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21255 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-10 02:58:25 +00:00