Theme Customizer: Migrate to an ajax-based solution for refreshing the preview and saving. see #20507, #19910.

* Use ajax-based saving, add saving indicator.
* Use ajax-based refreshing instead of form targets.
* Instead of using hidden inputs with prefixed names to track the canonical data, use the values stored in wp.customize. Encode the values as JSON before sending to avoid bugs with ids that contain square brackets (PHP mangles POST values with nested brackets).
* Use wp.customize.Previewer solely for the purpose of previewing; move the postMessage connection with the parent frame and other unrelated code snippets into the 'ready' handler.


git-svn-id: https://develop.svn.wordpress.org/trunk@20645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-04-30 15:46:17 +00:00
parent 307f568a64
commit 3540b301af
6 changed files with 136 additions and 98 deletions

View File

@@ -128,6 +128,16 @@ body {
margin: 0;
}
#customize-footer-actions img {
display: none;
position: absolute;
top: 18px;
margin-left: 4px;
}
.saving #customize-footer-actions img {
display: inline;
}
.customize-control {
float: left;
clear: both;