Commit Graph

91 Commits

Author SHA1 Message Date
Andrew Nacin
f5c0ad0115 Theme Installer: Properly call router navigation.
props gcorne.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-16 03:06:16 +00:00
Andrew Nacin
d46037e0b5 Theme Installer: Fixes for browsers without pushState.
props gcorne.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-16 00:04:15 +00:00
Andrew Nacin
9f81d0526e Theme Installer: Revert to proxying through PHP for WordPress.org API requests.
This is to ensure we have valid installation nonces, though we've run into this as a problem previously (see #27639, #27581, #27055).

A tad slower, but we gained speed in 3.9 by simplifying the request made to the API.

props ocean90.
fixes #27798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-15 01:16:14 +00:00
Andrew Nacin
f911d99902 Theme installer: Improve route handling and make ?theme= work.
props matveb.
fixes #27708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 22:06:15 +00:00
Andrew Nacin
cd5f8d517c Theme install: Set a timeout and error message for API responses.
props ocean90.
fixes #27708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-13 19:02:14 +00:00
Andrew Ozz
cc694bac21 Fix TinyMCE Views in IE8 and 7:
- Add fallback background images for dashicons.
- Fix hiding the clipboard while still allowing the contents to be selected.
- Work around lack of border-box in gallery styles.
(Includes precommit cleanup for theme.js)
Props gcorne, fixes 27546
Built from https://develop.svn.wordpress.org/trunk@28062


git-svn-id: http://core.svn.wordpress.org/trunk@27894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-09 00:58:15 +00:00
Andrew Nacin
b631825414 Theme installer keyboard fixes. Updates [28033] and [28036].
props matveb.
see #27521.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 16:24:14 +00:00
Dominik Schilling
f2d874e3db Theme Installer: Prevent default events for "Upload Theme" and "Browse" buttons.
see #27055.
Built from https://develop.svn.wordpress.org/trunk@28047


git-svn-id: http://core.svn.wordpress.org/trunk@27877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 12:35:18 +00:00
Andrew Ozz
fd0ae7e406 Precommit cleanup for theme.js, editor.css amd wpdialogs/plugin.js, See #27055, #26907, #16284
Built from https://develop.svn.wordpress.org/trunk@28045


git-svn-id: http://core.svn.wordpress.org/trunk@27875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 08:29:14 +00:00
Andrew Nacin
9a82e9070e Theme Installer: Show 'Preview' button for installed themes.
props adamsilverstein.
see #27055, see #27708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 04:38:15 +00:00
Andrew Nacin
640d9cb1a1 Theme Installer: Left/right arrow keys in the overlay.
props adamsilverstein.
see #27521.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 04:13:30 +00:00
Andrew Nacin
93d2e831cb Theme Installer: Use 'browse' instead of 'sort' for routes.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 04:13:16 +00:00
Andrew Nacin
658032c9f9 Theme Installer: Disable prev/next buttons on first/last themes, add Esc handling, use IDs.
props adamsilverstein, DH-Shredder.
fixes #27521.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-08 03:57:15 +00:00
Andrew Nacin
56c1deba7c Theme Installer: Handle currently installed themes, add search route, let prev/next refresh collections.
props matveb.
see #27055. fixes #27695.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 23:04:15 +00:00
Andrew Nacin
7cd04f4829 Theme Installer: Separate API from an event handler to avoid issues where a false return value stops the event.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-05 20:46:15 +00:00
Andrew Nacin
9fc1d41ec1 Theme Installer: Use JSONP for api.wordpress.org requests.
fixes #27639.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-05 20:28:14 +00:00
Andrew Nacin
e36c1cbf9e Theme Installer: Fix displaying of errors.
props SergeyBiryukov.
fixes #27640.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-05 19:26:14 +00:00
Andrew Ozz
d4755ebea3 TinyMCE: add image backgrounds for more and nextpage tags (also jshint fix for theme.js). Fixes #27106
Built from https://develop.svn.wordpress.org/trunk@27944


git-svn-id: http://core.svn.wordpress.org/trunk@27774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-04 05:23:14 +00:00
Andrew Nacin
0163a95d79 Theme Installer: Fix sorting, counts, keyboard navigation; add prev/next to previews.
props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 23:53:15 +00:00
Andrew Nacin
d330c402c8 Theme Installer fixes:
* Better more filters section. props sonjanyc for some mockups.
 * Better handling of no results.
 * Use # for hrefs.

props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-01 22:20:14 +00:00
Andrew Nacin
495c73fc1c Theme Installer: Avoid race condition during pagination.
props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 09:09:14 +00:00
Andrew Nacin
6531ed1efc Theme Installer: Remove unused variables and undesired commas.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 08:53:16 +00:00
Andrew Nacin
e96b783f69 Theme Installer: Caching and paginating of API requests.
props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 21:49:14 +00:00
Helen Hou-Sandí
3c72ba4282 Bring keyboard accessibility to the theme install screen and theme action buttons. props jorbin. see #27521.
Built from https://develop.svn.wordpress.org/trunk@27804


git-svn-id: http://core.svn.wordpress.org/trunk@27638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 03:16:15 +00:00
Andrew Nacin
84a4d86536 Themes screens: Bump to 20 items per page so it fills a high resolution display. see #26968.
Built from https://develop.svn.wordpress.org/trunk@27744


git-svn-id: http://core.svn.wordpress.org/trunk@27581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 17:46:16 +00:00
Dominik Schilling
1b2bb74f76 Themes: Improve RegExp pattern for search.
* The replacement of spaces is now done globally.
* The search term is now escaped for RegExp meta characters.

props westonruter for the hint.
fixes #27479.
Built from https://develop.svn.wordpress.org/trunk@27649


git-svn-id: http://core.svn.wordpress.org/trunk@27492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 21:04:15 +00:00
Scott Taylor
4ad3972f74 Fixes for jshint
Built from https://develop.svn.wordpress.org/trunk@27643


git-svn-id: http://core.svn.wordpress.org/trunk@27486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 22:27:15 +00:00
Andrew Nacin
3c15a9c9f2 Theme installer:
* Restore the feature filter.
 * Improve responsiveness.
 * Router updates, fixes.
 * Make "Upload Theme" button more consistent with the admin.
 * Avoid theme-count causing filters to jump.

props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 04:20:15 +00:00
Andrew Nacin
0f32a52afa Themes screens: Lose search input focus when pressing enter.
This allows the keyboard to close on iOS, for example.

props matveb.
fixes #27233.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 05:14:15 +00:00
Andrew Nacin
8e6ec4f72c Use correct variable in themes JS, fixes themes.php.
props SergeyBiryukov.
fixes #27360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-12 00:29:15 +00:00
Andrew Nacin
9aca2a65f8 Bring the theme browsing experience from 3.8 to the theme installer. First pass.
props matveb with assists from me and gcorne.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-11 07:47:15 +00:00
Andrew Nacin
7481fd46d0 Themes screen: Clicking back through history should properly close the overlay.
props gcorne.
fixes #27198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 00:18:13 +00:00
Mark Jaquith
acb65e13c3 Improve pushState, replaceState and routing for Themes page
* Uses `pushState()` generally
* Uses `replaceState()` when updating a search query (so no history cruft from typing)

fixes #27198. props gcorne, adamsilverstein.
Built from https://develop.svn.wordpress.org/trunk@27268


git-svn-id: http://core.svn.wordpress.org/trunk@27124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 19:22:13 +00:00
Sergey Biryukov
51d07be5fc Fix thickbox positioning if toolbar is not present.
fixes #26745.
Built from https://develop.svn.wordpress.org/trunk@27248


git-svn-id: http://core.svn.wordpress.org/trunk@27105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 00:26:13 +00:00
Andrew Nacin
e18a013956 Themes screen: Add aria-describedby attributes to provide better information to screen readers.
props joedolson for initial patch.
fixes #26602 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-22 21:00:11 +00:00
Andrew Nacin
9e942606c8 Keyboard navigation friendliness for themes.php.
props matveb, azaozz, jorbin.
see #26527.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-08 21:35:09 +00:00
Andrew Nacin
56e3b1f46e Themes: Search the theme's slug too.
props matveb.
see #26730 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-08 21:29:10 +00:00
Sergey Biryukov
db094e0f30 Add missing id attribute to "Search Installed Themes" input.
fixes #26599 for trunk.
Built from https://develop.svn.wordpress.org/trunk@26885


git-svn-id: http://core.svn.wordpress.org/trunk@26768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-31 10:44:11 +00:00
Andrew Ozz
4f44dc74b1 Themes: fix overlays and buttons in responsive mode, props matveb, fixes #26481.
Built from https://develop.svn.wordpress.org/trunk@26838


git-svn-id: http://core.svn.wordpress.org/trunk@26725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 19:38:10 +00:00
Andrew Nacin
87265a374b Themes: use explicit 'search installed themes' label and placeholder.
fixes #26496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 07:41:10 +00:00
Andrew Nacin
2530fbbfba Themes: Avoid a JS error in the keyup event handler when the overlay is not yet initialized.
fixes #26497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 07:07:10 +00:00
Andrew Nacin
6d226fb454 Don't set the theme overlay active state in the Theme view, as it overwrites the same work in the Details view.
fixes #26481.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 01:27:10 +00:00
Andrew Nacin
71fa7d8e6c Fix JSHint errors and remove unreachable code. props adamsilverstein. see #25963.
Built from https://develop.svn.wordpress.org/trunk@26778


git-svn-id: http://core.svn.wordpress.org/trunk@26665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-07 07:52:11 +00:00
Ryan Boren
b07b8d4fe8 Make the Backbone routes pushSTate capable with ?theme=themename type urls instead of hashes. Same applies to search queries.
Props adamsilverstein, nacin
fixes #25963

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


git-svn-id: http://core.svn.wordpress.org/trunk@26655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-07 03:11:10 +00:00
Andrew Nacin
51a89c8ae6 Themes: Ensure the image returns a width before checking that it is less than 300px.
see #26459.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-07 01:59:10 +00:00
Andrew Nacin
3964c1f132 Themes: If a theme only has a very-old-school 300px-wide screenshot (or narrower), don't stretch it.
props matveb.
fixes #26459.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 19:42:11 +00:00
Andrew Nacin
32736c45ff Remove screenshotGallery. see #25948.
Built from https://develop.svn.wordpress.org/trunk@26728


git-svn-id: http://core.svn.wordpress.org/trunk@26617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 17:11:10 +00:00
Andrew Nacin
df48cebeb4 No-JavaScript and no-Customizer support for the new Themes screen.
JavaScript is rarely disabled, but graceful degradation is still important. For example, syntax errors can occur, usually with major WP updates that overhaul entire experiences and update external libraries combined with themes or plugins doing weird or old things. If this error is due to their current theme, a user needs to be able to access the themes screen to switch away from the theme. A more subtle issue could make things painful to diagnose.

This commit renders the grid in PHP (the template is duplicated, but it lightweight, fairly mundane, and easy to sync). On Backbone render, the grid is then re-rendered from JavaScript so searches can occur. Customize and Live Preview is disabled if JS fails to kick in. If JS is disabled, old-school "Preview" links are displayed.

No-Customizer support: The customizer is only supported when the browser supports postMessage (IE8+), and if the frontend is a different domain, CORS (IE10+). We use the .hide-if-no-customize class for this. Pre-customize "Preview" links should use .hide-if-customize.

The .load-customize class should be used to declare a link that opens the customizer. This enables customize-loader.js to intercept this link and load the customizer on top of the current window, making for a smoother experience.

fixes #25964.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 16:11:10 +00:00
Andrew Nacin
e509a66071 Themes: Only show author names during a search if it matches 3 or more characters.
props matveb.
fixes #26422.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 19:57:11 +00:00
Andrew Nacin
462d342de1 Themes: when initiating a search, avoid triggering a reset event when it's not necessary.
props matveb.
fixes #26434.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-05 19:15:11 +00:00