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.
Built from https://develop.svn.wordpress.org/trunk@27909


git-svn-id: http://core.svn.wordpress.org/trunk@27740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2014-04-02 18:20:16 +00:00
parent 92467fbd63
commit 944fba8e2f
6 changed files with 136 additions and 112 deletions

View File

@@ -37,6 +37,14 @@
.customize-control-widget_form.previewer-loading .spinner {
opacity: 1.0;
}
.customize-control-widget_form.widget-form-disabled .widget-content {
opacity: 0.7;
pointer-events: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.customize-control-widget_form .widget {
margin-bottom: 0;

File diff suppressed because one or more lines are too long

View File

@@ -37,6 +37,14 @@
.customize-control-widget_form.previewer-loading .spinner {
opacity: 1.0;
}
.customize-control-widget_form.widget-form-disabled .widget-content {
opacity: 0.7;
pointer-events: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.customize-control-widget_form .widget {
margin-bottom: 0;

File diff suppressed because one or more lines are too long