Commit Graph

239 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90)
da677f34aa Widget Customizer: Move WidgetCustomizer to wp.customize.Widgets. First pass.
see #27690.

git-svn-id: https://develop.svn.wordpress.org/trunk@27985 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-07 09:03:18 +00:00
Dominik Schilling (ocean90)
ab8f7f7afd Widgets: Trigger jQuery events for widget updates.
* `widget-added` when a widget is added to a sidebar
* `widget-updated` when a widget is updated
A jQuery object of the widget is passed along to the event handler. Same events are used in the Widget Customizer, see [27909].

fixes #19675.

git-svn-id: https://develop.svn.wordpress.org/trunk@27969 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-06 19:05:03 +00:00
Andrew Nacin
12f66b9859 Theme Installer: Separate API from an event handler to avoid issues where a false return value stops the event.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27963 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-05 20:45:37 +00:00
Andrew Nacin
ba9e3d2bc3 Theme Installer: Use JSONP for api.wordpress.org requests.
fixes #27639.


git-svn-id: https://develop.svn.wordpress.org/trunk@27961 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-05 20:27:56 +00:00
Andrew Nacin
c4d09e4736 Theme Installer: Fix displaying of errors.
props SergeyBiryukov.
fixes #27640.


git-svn-id: https://develop.svn.wordpress.org/trunk@27958 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-05 19:25:20 +00:00
Andrew Ozz
30cdc10180 When autosaving a new post for the first time after a title was typed, cancel the autosave if the user is submitting the form. (Includes a precommit fix for customize-controls.css.) Props Nessworthy, davidmarichal, fixes #27657
git-svn-id: https://develop.svn.wordpress.org/trunk@27951 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-05 01:28:35 +00:00
Andrew Nacin
96e15acb2e Header images: Handle cropping failures.
props ehg.
see #21785.


git-svn-id: https://develop.svn.wordpress.org/trunk@27946 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-04 15:47:43 +00:00
Andrew Ozz
48269a7c29 TinyMCE: add image backgrounds for more and nextpage tags (also jshint fix for theme.js). Fixes #27106
git-svn-id: https://develop.svn.wordpress.org/trunk@27944 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-04 05:22:47 +00:00
Andrew Ozz
ec18e88dee TinyMCE: better calculation for editor height when switching Text to Visual and back. Add stopping of editor resizing when the mouse leaves the browser window. See #27279
git-svn-id: https://develop.svn.wordpress.org/trunk@27941 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-04 01:30:11 +00:00
Andrew Nacin
b29ccb5656 Theme Installer: Fix sorting, counts, keyboard navigation; add prev/next to previews.
props matveb.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27937 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-03 23:52:45 +00:00
Dominik Schilling (ocean90)
63a83c88f8 Widget Customizer: Restore deferral of previewer-loading class removal until preview is synced.
props westonruter.
fixes #27635.

git-svn-id: https://develop.svn.wordpress.org/trunk@27913 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-02 19:24:18 +00:00
Dominik Schilling (ocean90)
9f3976baf2 Widget Customizer: Improve support for dynamically-created inputs.
* Re-work how and when widget forms get updated.
* Replace ad hoc hooks system with jQuery events,
* Add `widget-updated`/`widget-synced` events for widget soft/hard updates.
* Enter into a non-live form update mode, where the Apply button is restored when a sanitized form does not have the same fields as currently in the form, and so the fields cannot be easily updated to their sanitized values without doing a complete form replacement. Also restores live update mode if sanitized fields are aligned with the existing fields again.

Note: jQuery events are *not* final yet, see #19675.

props westonruter.
see #27491.

git-svn-id: https://develop.svn.wordpress.org/trunk@27909 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-02 18:20:00 +00:00
Dominik Schilling (ocean90)
b5780fa7b8 Widget Customizer: Improve plugin compatibility.
Some plugins are using custom scripts and styles for there widgets. These are available on the Widgets screens, but not in the Customizer yet.
Scripts and styles can be enqueued via: 
* `admin_enqueue_scripts`
* `admin_print_scripts` and `admin_print_scripts-widgets.php`
* `admin_print_styles` and `admin_print_styles-widgets.php`
* `admin_print_footer_scripts` and `admin_footer-widgets.php`
All this hooks are now called in the Customizer too.

Previously we have add the `#widgets-right` ID to a container div via jQuery. Remember: `#widgets-right` exists on the Widgets screen and is used by many plugins to do event delegation from that element.
But since our script files are loaded in the footer, the JavaScript way is a bit late for some plugins.
We have decided to add a `div#widgets-right` container element to customizer. "Less hacky hack."

props westonruter, ocean90. Thanks dpe415 for testing.
fixes #27619.

git-svn-id: https://develop.svn.wordpress.org/trunk@27907 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-02 17:03:14 +00:00
Andrew Nacin
5b4287b991 Theme Installer fixes:
* Better more filters section. props sonjanyc for some mockups.
 * Better handling of no results.
 * Use # for hrefs.

props matveb.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27896 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-01 22:19:51 +00:00
Dominik Schilling (ocean90)
3046451bf7 Cleanup [27892].
git-svn-id: https://develop.svn.wordpress.org/trunk@27893 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-01 15:29:34 +00:00
Dominik Schilling (ocean90)
11f6751d51 Widget Customizer: Use postMessage to highlight widgets in preview or sections/controls in Customizer.
fixes #27622.

git-svn-id: https://develop.svn.wordpress.org/trunk@27892 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-01 15:25:56 +00:00
Dominik Schilling (ocean90)
bb7c7e06c0 Widget Customizer: Remove WidgetCustomizer.showFirstSidebarIfRequested().
It's currently unused and needs another iteration.

see #27290.

git-svn-id: https://develop.svn.wordpress.org/trunk@27891 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-01 12:37:43 +00:00
Dominik Schilling (ocean90)
ab5b649243 Revert [27654] for strings.
props westonruter.
fixes #27485.

git-svn-id: https://develop.svn.wordpress.org/trunk@27890 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-01 11:07:59 +00:00
Andrew Ozz
d6e6560980 Editor:
- Use standard button styles for the Quicktags buttons.
- Better style for the TinyMCE buttons (hover/focus/active/disabled).
- Move the fullscreen (DFW) button to the right.
- Better style for the Visual/Text buttons in DFW.
Props avryl, see #27279

git-svn-id: https://develop.svn.wordpress.org/trunk@27857 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-29 23:57:13 +00:00
Andrew Nacin
3b11bb9e36 Theme Installer: Avoid race condition during pagination.
props matveb.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27845 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-29 09:08:16 +00:00
Andrew Nacin
aff33c3bca Theme Installer: Remove unused variables and undesired commas.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27843 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-29 08:52:30 +00:00
Andrew Nacin
1c3f9e542b Restyle the image editor so it looks way less hideous.
props avryl.
see #27544.


git-svn-id: https://develop.svn.wordpress.org/trunk@27842 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-29 08:50:57 +00:00
Andrew Nacin
363c2b4810 Theme Installer: Caching and paginating of API requests.
props matveb.
see #27055.


git-svn-id: https://develop.svn.wordpress.org/trunk@27830 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-28 21:48:52 +00:00
Dominik Schilling (ocean90)
814b798b0d Widget Customizer: Simplify nonces.
see #27534.

git-svn-id: https://develop.svn.wordpress.org/trunk@27819 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-28 15:34:17 +00:00
Andrew Ozz
e50f30640e Make DFW usable on touch devices: change the toolbar to two rows and keep it and borders visible. See #26907
git-svn-id: https://develop.svn.wordpress.org/trunk@27806 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-28 04:39:04 +00:00
Helen Hou-Sandi
90d45acbf7 Bring keyboard accessibility to the theme install screen and theme action buttons. props jorbin. see #27521.
git-svn-id: https://develop.svn.wordpress.org/trunk@27804 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-28 03:15:30 +00:00
Dominik Schilling (ocean90)
4d57b96fb2 Widget Customizer: Improve behavior of bigger widgets.
* Support widgets which are higher than browsers viewport.
* Use widgets width as max-width.
* Don't animate the width of wide widgets to make them visible, instead fade them in/out.
* Fix Chrome flickerings while updating wide widgets.

props adamsilverstein, westonruter, ocean90.
see #27348.

git-svn-id: https://develop.svn.wordpress.org/trunk@27798 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 23:12:25 +00:00
Andrew Nacin
ccf21196cb Remove unused JS variables after [27770]. see #27013.
git-svn-id: https://develop.svn.wordpress.org/trunk@27783 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 17:31:00 +00:00
nacin
06603dc6cc Fix flyout menus on most mobile devices.
props ocean90.
fixes #26482.


git-svn-id: https://develop.svn.wordpress.org/trunk@27775 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 06:29:03 +00:00
Andrew Ozz
1c0d6827f5 Remove containment of scrolling inside the editor for now. See #27013
git-svn-id: https://develop.svn.wordpress.org/trunk@27770 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 02:34:25 +00:00
Andrew Nacin
28663b08e8 Remove select and input from wpautop()'s HTML blocks list.
props rachelbaker, DH-Shredder.
fixes #22230.


git-svn-id: https://develop.svn.wordpress.org/trunk@27761 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-27 00:00:17 +00:00
Scott Taylor
4b21dcc825 Fix double avatars and JS errors when spamming/trashing comments.
Props avryl, SergeyBiryukov.
Fixes #27329.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@27759 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-26 23:13:43 +00:00
Dominik Schilling (ocean90)
c6c9eae522 Customizer: Improve accessibility.
Prevent the form only from saving when enter is pressed on a select element or an input, which hasn't the button type.

props westonruter, ocean90.
fixes #26633.

git-svn-id: https://develop.svn.wordpress.org/trunk@27757 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-26 22:55:46 +00:00
Andrew Nacin
ed0b146180 Themes screens: Bump to 20 items per page so it fills a high resolution display. see #26968.
git-svn-id: https://develop.svn.wordpress.org/trunk@27744 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-26 17:45:28 +00:00
Andrew Ozz
f2c1fcbb65 Autosave: don't create the temporary permalink if the title field had focus (the user was typing a title) at the time of the last autosave. Fixes #27503
git-svn-id: https://develop.svn.wordpress.org/trunk@27728 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-25 22:21:24 +00:00
Dominik Schilling (ocean90)
e54fff3bb1 Widget Customizer: Fix shift+click issue in Firefox to open a widget.
props westonruter.
see #27358.

git-svn-id: https://develop.svn.wordpress.org/trunk@27701 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-25 11:22:13 +00:00
Scott Taylor
98921c5ca0 Let us pass jshint:core.
git-svn-id: https://develop.svn.wordpress.org/trunk@27693 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-24 23:01:15 +00:00
Dominik Schilling (ocean90)
7ad1e0f1bb Widget Customizer: Use Underscores indexOf for IE8 compatibility.
props adamsilverstein.
see #27485.

git-svn-id: https://develop.svn.wordpress.org/trunk@27654 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-22 21:21:36 +00:00
Dominik Schilling (ocean90)
2a1899e319 Widget Customizer: Fix 'WidgetCustomizerPreview' is undefined error in IE8/9.
* Move `WidgetCustomizerPreview` to `wp.customize.WidgetCustomizerPreview`
* Move `WidgetCustomizerPreview_exports` to export_preview_data()
* Use `_wpWidgetCustomizerPreviewSettings` to transfer settings to `wp.customize.WidgetCustomizerPreview`

see #27485.

git-svn-id: https://develop.svn.wordpress.org/trunk@27653 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-22 21:03:18 +00:00
Dominik Schilling (ocean90)
429a018b9c Widget Customizer: Improve error handling. First pass.
* Replace Widget_Customizer_Exception with WP_Error
* Call Previewer.cheatin() to show the cheating message if a user can't change widgets
* Call Previewer.login() to show the login form if a user is logged out
* Show a generic error message on failures

see #27419.

git-svn-id: https://develop.svn.wordpress.org/trunk@27652 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-22 20:54:17 +00:00
Dominik Schilling (ocean90)
686896998d Widget Customizer: Improve widget search.
* Removes jQuery.liveFilter dependency
* Filters widget collection directly
* Widget's name, ID and description will be searched

fixes #27451.

git-svn-id: https://develop.svn.wordpress.org/trunk@27650 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-21 21:12:32 +00:00
Dominik Schilling (ocean90)
f0abc9b7e0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@27649 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-21 21:03:59 +00:00
Andrew Ozz
4b760ff840 Editing image file: properly refresh the view after restoring the original image or rescaling the image. Props gcorne, see #21811
git-svn-id: https://develop.svn.wordpress.org/trunk@27644 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-20 23:24:43 +00:00
Scott Taylor
39197965e4 Fixes for jshint
git-svn-id: https://develop.svn.wordpress.org/trunk@27643 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-20 22:26:53 +00:00
Andrew Nacin
3217fa545b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@27636 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-20 04:19:55 +00:00
Dominik Schilling (ocean90)
c2a4665966 Widget Customizer: Restore highlighting of widgets in preview.
props westonruter.
see #27358.

git-svn-id: https://develop.svn.wordpress.org/trunk@27584 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-18 15:20:38 +00:00
John Blackbourn
d91dd88edc Remove the "See more" toggle from the At a Glance dashboard widget. Fixes #26614.
git-svn-id: https://develop.svn.wordpress.org/trunk@27583 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-18 12:55:42 +00:00
Andrew Ozz
6d13e3e1ff Restyle the plugin install details modal to match the rest of the admin. Props avryl and paulwilde for initial mockup, see #26952
git-svn-id: https://develop.svn.wordpress.org/trunk@27559 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-16 18:27:38 +00:00
Andrew Nacin
ad650e283b Themes screens: Lose search input focus when pressing enter.
This allows the keyboard to close on iOS, for example.

props matveb.
fixes #27233.


git-svn-id: https://develop.svn.wordpress.org/trunk@27555 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-15 05:13:23 +00:00
Dominik Schilling (ocean90)
cecef45157 Customizer: Introduce a processing state.
The processing state will prevent a save when it doesn't return 0.
Widget Customizer will use the state to prevent a save while a widget is updating, which is an asynchronous process.

props westonruter.
fixes #27390.

git-svn-id: https://develop.svn.wordpress.org/trunk@27540 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-14 19:15:04 +00:00