Weston Ruter
9b5d71bad0
Widgets: Add dirty state tracking for widgets on admin screen.
...
* Mark a widget as dirty when a field input triggers a `change` or `input` event; clear dirty state when widget is successfully saved.
* Disable Save button and re-label "Saved" when widget not dirty.
* Show AYS dialog when leaving widgets admin screen with unsaved changes.
* When widgets are dirty, expand all unsaved widgets at AYS check and focus on first one.
* Change "Close" link to "Done"; hide link when widget is dirty and reveal when saved.
* The "Done" link persistently appears in the Customizer even after making a change (when the widget is dirty) because changes are autosaved into the changeset.
* Prevent saving widget when form fails `checkValidity`.
* Fix frequency of triggering of `change` event on the rich Text widget's `textarea` limited now to when there are actual changes.
* Add a class of `widget-dirty` to widget containers when the widget has unsaved changes.
Props westonruter, timmydcrawford, melchoyce.
Fixes #41610 , #23120 .
Built from https://develop.svn.wordpress.org/trunk@41352
git-svn-id: http://core.svn.wordpress.org/trunk@41185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 19:11:43 +00:00
..
2017-08-19 20:10:47 +00:00
2017-09-03 16:02:46 +00:00
2017-07-31 19:50:45 +00:00
2017-09-08 18:42:49 +00:00
2017-08-03 21:59:44 +00:00
2017-08-17 23:37:43 +00:00
2017-07-26 16:45:44 +00:00
2017-06-26 18:24:40 +00:00
2017-07-27 00:41:44 +00:00
2017-08-16 21:11:43 +00:00
2017-08-29 16:43:47 +00:00
2017-08-03 16:13:44 +00:00
2017-08-03 15:24:44 +00:00
2017-09-08 15:01:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-21 15:35:46 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-08 18:21:42 +00:00
2017-08-09 21:04:47 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-02 05:35:41 +00:00
2017-07-27 00:41:44 +00:00
2017-09-08 14:03:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-01 16:58:42 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-08-22 11:12:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-03 14:34:44 +00:00
2017-08-22 11:52:48 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-09-04 11:17:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-01 20:44:43 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-07-27 00:41:44 +00:00
2017-08-20 20:13:47 +00:00
2017-07-01 13:36:41 +00:00
2017-07-28 01:15:52 +00:00
2017-06-30 04:54:41 +00:00
2017-07-27 00:41:44 +00:00
2017-08-22 11:52:48 +00:00
2017-08-18 18:31:44 +00:00
2017-08-24 17:53:27 +00:00
2017-08-22 11:52:48 +00:00
2017-07-16 01:15:46 +00:00
2017-08-25 23:28:45 +00:00
2017-08-22 11:52:48 +00:00
2017-08-04 23:01:44 +00:00
2017-06-25 22:06:41 +00:00
2017-06-25 22:16:40 +00:00
2017-08-22 11:52:48 +00:00
2017-08-09 04:07:43 +00:00
2017-07-01 22:13:41 +00:00
2017-08-31 11:17:45 +00:00
2017-09-01 12:28:46 +00:00
2017-09-04 08:16:44 +00:00
2017-08-22 11:52:48 +00:00
2017-08-30 19:53:45 +00:00
2017-08-22 11:52:48 +00:00
2017-07-05 21:31:44 +00:00
2017-08-09 21:04:47 +00:00
2017-08-12 13:11:43 +00:00
2017-08-03 13:21:46 +00:00
2017-08-23 15:52:46 +00:00
2017-08-20 20:03:54 +00:00
2017-06-13 01:11:43 +00:00
2017-08-18 18:19:44 +00:00
2017-08-22 11:12:44 +00:00
2017-07-27 08:19:43 +00:00
2017-08-10 01:38:43 +00:00
2017-09-08 19:11:43 +00:00
2017-08-20 20:38:42 +00:00
2017-07-28 01:15:52 +00:00
2017-08-31 12:26:42 +00:00
2017-06-29 16:05:41 +00:00
2017-09-08 18:21:42 +00:00
2017-08-22 11:52:48 +00:00
2017-06-15 12:05:42 +00:00
2017-09-08 19:11:43 +00:00
2017-09-06 21:32:43 +00:00
2017-08-12 12:48:47 +00:00