Customizer: Improve parity between JS Setting models in preview with JS Setting models in pane.

* Ensure that Setting `Value` objects in preview get initial `_dirty` flag set if values among POST data.
* Upon `saved` event, send `saved` message to preview with the `response` to trigger `saved` event there.
* Reset `_dirty` flag for all setting `Value` objects in preview upon `saved`.
* Continue to create settings synced from pane even after initial bootstrap, and create them as dirty.
* Ensure that `id` property is set for setting `Value` objects in preview.

See #27355.
Fixes #35616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2016-01-26 23:52:25 +00:00
parent 972215f9f9
commit c7923b2c9d
6 changed files with 55 additions and 19 deletions

View File

@@ -3345,6 +3345,8 @@
value._dirty = false;
} );
api.previewer.send( 'saved', response );
api.trigger( 'saved', response );
} );
};