WordPress/wp-admin/js
Weston Ruter 9546303342 Customize: Improve handling of active state for dynamically-created controls/sections/panels.
When a customizer construct (panel, section, control) is not added in PHP, the JS has interpreted this to mean that a given construct should be deactivated (because it is gone). This is problematic for dynamically-created constructs in JS, as it has meant that the construct would also have to be created in PHP to ensure the `active` callback is called, or else a hack would be required to add a `construct.active.validate = function() { return true };` to forcibly prevent the construct from getting deactivated. 

These workarounds can be eliminated by treating constructs differently when they are created dynamically in JS (after page load) as opposed to being created statically in PHP (on the server). Namely, if a construct is dynamically-created then its absence in a preview refresh should not signal that the construct should be deactivated. Rather, a dynamic construct should only have its activation state toggled if it has a corresponding construct created in PHP when the preview refreshes to explicitly indicate its `active` state. Otherwise, the management of the `active` state for a construct created in JS should also be the responsibility of client-side code.

Props westonruter, sayedwp.
Fixes #37270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:22:23 +00:00
..
accordion.js
accordion.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
bookmarklet.js
bookmarklet.min.js Editor: autoresize fixes for text 2016-06-01 10:24:30 +00:00
color-picker.js
color-picker.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
comment.js
comment.min.js
common.js Update/Install: Shiny Updates v2. 2016-06-15 16:37:29 +00:00
common.min.js Update/Install: Shiny Updates v2. 2016-06-15 16:37:29 +00:00
custom-background.js
custom-background.min.js
custom-header.js
customize-controls.js Customize: Improve handling of active state for dynamically-created controls/sections/panels. 2016-08-31 06:22:23 +00:00
customize-controls.min.js Customize: Improve handling of active state for dynamically-created controls/sections/panels. 2016-08-31 06:22:23 +00:00
customize-nav-menus.js Customize: Allow users to more seamlessly create page-based nav menus during customization. 2016-08-29 22:59:28 +00:00
customize-nav-menus.min.js Customize: Allow users to more seamlessly create page-based nav menus during customization. 2016-08-29 22:59:28 +00:00
customize-widgets.js Docs: Fix an incorrect @since comment. 2016-07-06 23:49:30 +00:00
customize-widgets.min.js Customize: Add setting validation model and control notifications to augment setting sanitization. 2016-05-20 21:10:27 +00:00
dashboard.js
dashboard.min.js
edit-comments.js Comments: Keep comments safe in the Edit Post screen. 2016-04-22 21:43:28 +00:00
edit-comments.min.js Comments: Keep comments safe in the Edit Post screen. 2016-04-22 21:43:28 +00:00
editor-expand.js Editor: fix jumpiness on pressing backspace and delete in the Text editor. 2016-08-28 18:40:31 +00:00
editor-expand.min.js Editor: fix jumpiness on pressing backspace and delete in the Text editor. 2016-08-28 18:40:31 +00:00
editor.js TinyMCE: preserve <script> and <style> tags inside the editor. 2016-07-12 22:09:31 +00:00
editor.min.js TinyMCE: preserve <script> and <style> tags inside the editor. 2016-07-12 22:09:31 +00:00
farbtastic.js
gallery.js
gallery.min.js
image-edit.js Media: Improve form validation errors handling when editing images. 2016-07-05 13:37:29 +00:00
image-edit.min.js Media: Improve form validation errors handling when editing images. 2016-07-05 13:37:29 +00:00
inline-edit-post.js Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats. 2016-01-21 22:50:25 +00:00
inline-edit-post.min.js Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats. 2016-01-21 22:50:25 +00:00
inline-edit-tax.js Accessibility: make the tab order match the visual order in the Edit terms screens. 2016-05-16 13:02:29 +00:00
inline-edit-tax.min.js Accessibility: make the tab order match the visual order in the Edit terms screens. 2016-05-16 13:02:29 +00:00
iris.min.js
language-chooser.js
language-chooser.min.js
link.js
link.min.js
media-gallery.js Media: Add some docs to media-gallery.js RIP. 2016-08-20 22:59:29 +00:00
media-gallery.min.js
media-upload.js
media-upload.min.js
media.js Multisite: Change WP_Network id property to an integer. 2016-06-26 14:26:29 +00:00
media.min.js Multisite: Change WP_Network id property to an integer. 2016-06-26 14:26:29 +00:00
nav-menu.js Coding standards after [36510]. 2016-03-10 23:18:26 +00:00
nav-menu.min.js Menus: Allow larger menus to be created in the Edit Menu screen. 2016-02-11 19:08:27 +00:00
password-strength-meter.js Users: Check zxcvbn is defined before calling. 2016-07-01 12:45:29 +00:00
password-strength-meter.min.js Users: Check zxcvbn is defined before calling. 2016-07-01 12:45:29 +00:00
plugin-install.js Plugins: Use install_plugins_upload action to print the upload form. 2016-07-31 18:11:29 +00:00
plugin-install.min.js Plugins: Use install_plugins_upload action to print the upload form. 2016-07-31 18:11:29 +00:00
post.js Editor: Use Beacon API over sync request 2016-08-28 18:29:30 +00:00
post.min.js Editor: Use Beacon API over sync request 2016-08-28 18:29:30 +00:00
postbox.js Editor, editor-expand: adjust the sidebar position when moving a postbox from one column to another. 2016-06-08 22:37:29 +00:00
postbox.min.js Editor, editor-expand: adjust the sidebar position when moving a postbox from one column to another. 2016-06-08 22:37:29 +00:00
press-this.js
press-this.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
revisions.js Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective). 2016-02-25 12:53:27 +00:00
revisions.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
set-post-thumbnail.js
set-post-thumbnail.min.js
svg-painter.js
svg-painter.min.js
tags-box.js
tags-box.min.js Update grunt-contrib-uglify from ~0.10.0 to ~1.0.1 2016-04-15 16:10:37 +00:00
tags.js
tags.min.js
theme.js Updates: Standardize JS Custom Event Names 2016-08-08 22:49:28 +00:00
theme.min.js Updates: Standardize JS Custom Event Names 2016-08-08 22:49:28 +00:00
updates.js Update/Install error messages: do not escape from the template, escape the error message string before inserting it. 2016-08-10 19:03:31 +00:00
updates.min.js Update/Install error messages: do not escape from the template, escape the error message string before inserting it. 2016-08-10 19:03:31 +00:00
user-profile.js Users: Check zxcvbn is defined before calling. 2016-07-01 12:45:29 +00:00
user-profile.min.js Users: Check zxcvbn is defined before calling. 2016-07-01 12:45:29 +00:00
user-suggest.js
user-suggest.min.js
widgets.js
widgets.min.js
word-count.js Editor: improve word-count.js documentation. 2016-08-26 09:25:27 +00:00
word-count.min.js
wp-fullscreen-stub.js Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
wp-fullscreen-stub.min.js
xfn.js
xfn.min.js