mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
settings: Add a block comment explaining the auto-discard feature.
This should help make this code more readable (I found it hard to understand while reviewing #13030).
This commit is contained in:
@@ -661,6 +661,12 @@ exports.build_page = function () {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// This event handler detects whether after these input
|
||||
// changes, any fields have different values from the current
|
||||
// official values stored in the database and page_params. If
|
||||
// they do, we transition to the "unsaved" state showing the
|
||||
// save/discard widget; otherwise, we hide that widget (the
|
||||
// "discarded" state).
|
||||
var subsection = $(e.target).closest('.org-subsection-parent');
|
||||
subsection.find('.subsection-failed-status p').hide();
|
||||
subsection.find('.save-button').show();
|
||||
|
||||
Reference in New Issue
Block a user