Commit Graph

2630 Commits

Author SHA1 Message Date
Helen Hou-Sandí
bfda508c18 Update more instances of default admin blues and grays.
props hugobaeta.
fixes #31234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 21:20:27 +00:00
Gary Pendergast
5ab25275a7 Emoji: Remove an errant / in Twemoji URLs.
Props tmatsuur.

Fixes #31893.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 07:28:26 +00:00
Andrew Ozz
0186bbcb95 TinyMCE wpView:
- Fix editor undo levels.
- Remove views and markers in the DOM before serialization.
- Unbind views before removing them on hide.
- Empty the content in the timeout, so it doesn't render iframes twice.
Props iseulde. Fixes #31669.
Built from https://develop.svn.wordpress.org/trunk@32022


git-svn-id: http://core.svn.wordpress.org/trunk@32001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-04 23:00:26 +00:00
Helen Hou-Sandí
3ac1a19529 Spinners: Toggle a class instead of show/hide.
Toggling spinners also now uses visibility instead of display, so that the space is always reserved and nothing moves around unexpectedly.

props cdog, MikeHansenMe, valendesigns.
fixes #22839. see #31875, #30725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-03 04:52:27 +00:00
Andrew Ozz
c545c63606 TinyMCE: always focus the editor after using the floated toolbar.
Props iseulde. Fixes #30619.
Built from https://develop.svn.wordpress.org/trunk@31972


git-svn-id: http://core.svn.wordpress.org/trunk@31951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 21:50:27 +00:00
Scott Taylor
3630732523 Remove the JS part of [31619].
Fixes #6820.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 16:34:27 +00:00
Scott Taylor
5855cb0e60 When editing an image from the editor, and the image has a value for alignment (but not for width or caption), don't bail without first checking that the alignment's value is not alignnone. If so, add the class to the <a> before bailing.
See #21848.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 16:04:27 +00:00
Andrew Ozz
e053979219 Emoji:
- Enhance twemoji.js to support passing of additional attributes for the replacement images.
- Use that to add the needed attributes when replacing emoji inside the editor.
Fixes #31627.
Built from https://develop.svn.wordpress.org/trunk@31948


git-svn-id: http://core.svn.wordpress.org/trunk@31927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 02:39:28 +00:00
Andrew Ozz
5fe7be9757 TinyMCE emoji: fix caret position after replacing emoji in Chrome on Windows 8.
See #31627.
Built from https://develop.svn.wordpress.org/trunk@31946


git-svn-id: http://core.svn.wordpress.org/trunk@31925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 23:35:26 +00:00
Dominik Schilling
d775c933c7 Disable body scrolling when session expired log in modal is open.
Fixes also the missing close icon if screen width is less than 380px.

props adamsilverstein, ocean90.
fixes #31610.
Built from https://develop.svn.wordpress.org/trunk@31945


git-svn-id: http://core.svn.wordpress.org/trunk@31924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 22:55:26 +00:00
Scott Taylor
a5478d7adb Let us pray to the gods of backwards compatibility:
* The way that the JS modules for media are currently set up turns the existing global `wp.media` namespace into a read-only API, this is bad.
* For the existing module implementation to work with plugins, those looking to override or extend a class would have to modify their own plugin to use `browserify` - we can't expect this to happen
* Because the general way that plugins override media classes is via machete (resetting them to something else), we cannot use `require( 'module' )` in the internal code for media modules

We CAN continue to use `require( 'fun/js' )` in the manifests for media. 

Future code/projects should carefully consider what is made to be public API. In 3.5, EVERYTHING was made public, so everything shall remain public.

See #31684, #28510.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-31 02:03:29 +00:00
Andrew Ozz
b5643f9a13 TinyMCE wpView: add back the removal of selected views on inserting new content. Was removed when reverting the first fix for embedding of pasted URLs.
Props mattheu. Fixes #31796.
Built from https://develop.svn.wordpress.org/trunk@31931


git-svn-id: http://core.svn.wordpress.org/trunk@31910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 18:22:27 +00:00
Andrew Ozz
8ff664171d Remove unused vars. See #31627.
Built from https://develop.svn.wordpress.org/trunk@31923


git-svn-id: http://core.svn.wordpress.org/trunk@31902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 02:50:27 +00:00
Andrew Ozz
f128f08c2c TinyMCE emoji: catch the inserting of emoji chars with the Windows 8 onscreen keyboard and replace if needed.
Fixes #31627.
Built from https://develop.svn.wordpress.org/trunk@31922


git-svn-id: http://core.svn.wordpress.org/trunk@31901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-30 02:39:28 +00:00
Andrew Ozz
62c3c1d798 Fix initialization of wp-emoji in IE8.
Props pento, azaozz. Fixes #31701.
Built from https://develop.svn.wordpress.org/trunk@31898


git-svn-id: http://core.svn.wordpress.org/trunk@31877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-26 02:40:28 +00:00
Dominik Schilling
de7ecc80d3 Customizer: [31885] actually hasn't fixed the SecurityErrors. This one does.
props mattwiebe.
fixes #31687.
Built from https://develop.svn.wordpress.org/trunk@31893


git-svn-id: http://core.svn.wordpress.org/trunk@31872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 23:36:27 +00:00
Andrew Ozz
1b2d93fbca TinyMCE: make sure the editor is not completely empty before checking if the user clicked above or below a wpView.
Fixes #31765.
Built from https://develop.svn.wordpress.org/trunk@31888


git-svn-id: http://core.svn.wordpress.org/trunk@31867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 18:55:29 +00:00
Dominik Schilling
7925e4c912 Customizer: Avoid SecurityErrors when the Customizer is embedded in an origin other than wp-admin.
props mattwiebe.
fixes #31687.
Built from https://develop.svn.wordpress.org/trunk@31885


git-svn-id: http://core.svn.wordpress.org/trunk@31864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 17:26:26 +00:00
Andrew Ozz
990f1b43a8 TinyMCE: pad empty paragraphs with <br> in Chrome to stop it from inserting non-breaking spaces in them.
Props iseulde. Fixes #31255.
Built from https://develop.svn.wordpress.org/trunk@31878


git-svn-id: http://core.svn.wordpress.org/trunk@31857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-25 01:18:26 +00:00
Gary Pendergast
b53b12ff8c Emoji: Instead of loading the emoji JS files automatically, we now include a small JS shim in the header, to test if the user's browser needs Twemoji. It then loads the emoji JS files only if they're needed.
Props pento, azaozz.

Fixes #31701.


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


git-svn-id: http://core.svn.wordpress.org/trunk@31854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 23:33:32 +00:00
Gary Pendergast
01fd948b90 Emoji: The regex for checking if the current glyph is a flag was checking the incorrect byte range, which was causing the South Korean flag to not be replaced in Firefox.
Built from https://develop.svn.wordpress.org/trunk@31869


git-svn-id: http://core.svn.wordpress.org/trunk@31848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-24 09:58:28 +00:00
Andrew Ozz
4bb5d76abc TinyMCE: when pasting an URL, check if the node it is pasted at is empty and remove any empty inline child elements.
Fixes #31158.
Built from https://develop.svn.wordpress.org/trunk@31856


git-svn-id: http://core.svn.wordpress.org/trunk@31835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-20 20:34:28 +00:00
Andrew Ozz
78f0ca13c5 TinyMCE: revert stripping of tags from pasted URLs on beforeSetContent [31817] and [31819]. Clean up URLs on pastePreProcess.
See #31158.
Built from https://develop.svn.wordpress.org/trunk@31832


git-svn-id: http://core.svn.wordpress.org/trunk@31814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-19 07:08:26 +00:00
Andrew Ozz
8d9fc7e51b TinyMCE emoji: fix highlighting of selected replacement images in Chrome.
Props iseulde. Fixes #31628.
Built from https://develop.svn.wordpress.org/trunk@31822


git-svn-id: http://core.svn.wordpress.org/trunk@31804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 21:54:26 +00:00
Andrew Ozz
aa9e920e57 TinyMCE: small cleanup for stripping of tags from pasted URLs. See #31158.
Built from https://develop.svn.wordpress.org/trunk@31819


git-svn-id: http://core.svn.wordpress.org/trunk@31801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 20:53:27 +00:00
Andrew Ozz
b30d15cd4a TinyMCE: strip tags from pasted URLs before testing if they are embeddable.
Props siobhan, iseulde. Fixes #31158.
Built from https://develop.svn.wordpress.org/trunk@31817


git-svn-id: http://core.svn.wordpress.org/trunk@31799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 20:26:26 +00:00
Gary Pendergast
faac51cad0 Emoji: Move a comment to match the restructure in [31779], and add an extra comment explaining how emoji rendering support is detected.
See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-16 00:06:28 +00:00
Andrew Ozz
c18ef513a0 Emoji: fix few typos. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31787


git-svn-id: http://core.svn.wordpress.org/trunk@31767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:29:26 +00:00
Andrew Ozz
a7fd4a3774 Emoji:
- Add the styling for the replacement images to the admin CSS.
- Revert to using `.emoji` as replacement image class.
- When pasting in the editor, convert emoji images to our format so we can replace them with chars on saving.
- Some more clean up of both the plugin and wp-emoji.js.
See #31242.
Built from https://develop.svn.wordpress.org/trunk@31786


git-svn-id: http://core.svn.wordpress.org/trunk@31766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 23:16:29 +00:00
Andrew Ozz
1fc8c98fd7 Emoji: always export the methods in wp-emoji.js, even when dependencies are missing and we cannot initialize.
See #31242.
Built from https://develop.svn.wordpress.org/trunk@31780


git-svn-id: http://core.svn.wordpress.org/trunk@31760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-15 00:17:27 +00:00
Andrew Ozz
8a402aa701 Emoji:
- Move the TinyMCE plugin CSS to wp-content.css.
- Change the replacement images class to `wp-emoji` inside the editor.
- Clean up both the plugin and wp-emoji.js, abstract and restructure a bit.
See #31242.
Built from https://develop.svn.wordpress.org/trunk@31779


git-svn-id: http://core.svn.wordpress.org/trunk@31759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-14 23:49:30 +00:00
Andrew Ozz
9ef1e2fb2a Emoji: yet another update for Twemoji, to 1.3.2. Props iseulde. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31773


git-svn-id: http://core.svn.wordpress.org/trunk@31753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-13 20:30:27 +00:00
Andrew Ozz
c8129335b5 Emoji: better regex when testing for only char emoji. Props iseulde. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31772


git-svn-id: http://core.svn.wordpress.org/trunk@31752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-13 20:27:26 +00:00
Andrew Ozz
69c08b1b65 Emoji: update Twemoji to 1.3.1. Props iseulde. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31766


git-svn-id: http://core.svn.wordpress.org/trunk@31746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-13 17:20:26 +00:00
Andrew Ozz
731f7c500d TinyMCE: fix emoji parsing in IE typo. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31762


git-svn-id: http://core.svn.wordpress.org/trunk@31743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 23:03:26 +00:00
Andrew Ozz
b20119d92f TinyMCE: fix emoji parsing in IE. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31761


git-svn-id: http://core.svn.wordpress.org/trunk@31742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 23:00:27 +00:00
Dominik Schilling
8fc889b2da Update Twemoji to 1.3.0.
Includes a fix for Firefox: 92d5bea1ab
Since this fix breaks IE 11 we added `modified = false;` after `subnode.parentNode.replaceChild(fragment, subnode)`.

props iseulde.
see #31242.
Built from https://develop.svn.wordpress.org/trunk@31758


git-svn-id: http://core.svn.wordpress.org/trunk@31739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 22:00:28 +00:00
Andrew Ozz
036f131b14 TinyMCE wpViews: fix typos in the conditional checking which stylesheets to import.
Props mattheu. See #31464.
Built from https://develop.svn.wordpress.org/trunk@31757


git-svn-id: http://core.svn.wordpress.org/trunk@31738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 20:08:27 +00:00
Andrew Ozz
e7131def4d Emoji:
- Patch twemoji.js to prevent infinite loop.
- Fix some `undefined` errors in old IE.
Props iseulde. See #31242.
Built from https://develop.svn.wordpress.org/trunk@31756


git-svn-id: http://core.svn.wordpress.org/trunk@31737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 19:53:26 +00:00
Gary Pendergast
b7546d798f Emoji: Instead of having custom hooks for Ajax callbacks, use MutationObserver to re-parse any changed elements in the DOM.
Props iseulde

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 12:52:26 +00:00
Andrew Nacin
78679bfb3f Emoji JS cleanup.
* Filename: emoji.js => wp-emoji.js
 * Script handle: emoji => wp-emoji
 * Object: WPEmoji => wp.emoji
 * Script settings: EmojiSettings => _wpemojiSettings
 * Setting key: base_url => baseUrl
 * Remove executable bit from files

see #31242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 03:17:26 +00:00
Andrew Ozz
04494a6c32 TinyMCE wpViews: always import the non-default editor styles in the sandbox iframe in views.
Props iseulde, mattheu. Fixes #31464.
Built from https://develop.svn.wordpress.org/trunk@31742


git-svn-id: http://core.svn.wordpress.org/trunk@31723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 01:05:54 +00:00
Andrew Ozz
b5f1514b54 TinyMCE: improve setting of the sandboxing iframe inside a view.
Props mattheu, iseulde. Fixes #31412.
Built from https://develop.svn.wordpress.org/trunk@31740


git-svn-id: http://core.svn.wordpress.org/trunk@31721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 23:53:26 +00:00
Andrew Ozz
8b53e5470d TinyMCE: remove blocking of commands on placeholder images. Breaks some execCommand.
Props iseulde. Fixes #31571.
Built from https://develop.svn.wordpress.org/trunk@31738


git-svn-id: http://core.svn.wordpress.org/trunk@31719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 23:33:28 +00:00
Gary Pendergast
46e2a65cf1 Add emoji support, with Twemoji fallback.
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.

Props batmoo, joen and mkaz for the original plugin upon which this is based.

Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:49:28 +00:00
Andrew Ozz
7d2b380330 TinyMCE: initialize the floating toolbars on preinit so we can attach other events on init.
Props iseulde. Fixes #30619.
Built from https://develop.svn.wordpress.org/trunk@31732


git-svn-id: http://core.svn.wordpress.org/trunk@31713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:41:26 +00:00
Andrew Ozz
cb185ed5bc TinyMCE wpViews: use the real attribute value instead of the cached jQuery data. Fixes updating of the wpView text strings.
Props iseulde. Fixes #31601.
Built from https://develop.svn.wordpress.org/trunk@31731


git-svn-id: http://core.svn.wordpress.org/trunk@31712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:40:28 +00:00
Andrew Ozz
9c09d0ea2c TinyMCE, floating toolbars: return early if no selected element in the editor. See #30619.
Built from https://develop.svn.wordpress.org/trunk@31727


git-svn-id: http://core.svn.wordpress.org/trunk@31708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 20:08:27 +00:00
Andrew Ozz
6e14ff9234 TinyMCE:
- Abstract the code for creating floating toolbars.
- Introduce `editor.wp` namespace to hold exported methods from our plugins.
- Create the wpView toolbar(s) with the new method. This makes them work the same as the image toolbar: shortcuts, esc key, etc.
Props iseulde. See #30619.
Built from https://develop.svn.wordpress.org/trunk@31725


git-svn-id: http://core.svn.wordpress.org/trunk@31706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 19:12:28 +00:00
Dominik Schilling
593e062b2e JSHint: Remove an unused variable.
see #28206.
Built from https://develop.svn.wordpress.org/trunk@31724


git-svn-id: http://core.svn.wordpress.org/trunk@31705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 17:40:27 +00:00