settings: Call maybe_disable_widgets() in set_up() methods.

We now rely on set_up() methods to call their
own module-specific versions of maybe_disable_widgets()
in the codepath for admin_sections.load_admin_section().

And then for live updates, we just explicitly call
all four modules that support maybe_disable_widgets().

This should make switching between sections slightly faster,
and it also reduces the risk of module A messing with
module B's state.  (Granted, we have lots of other ways
that modules can mess with each other's state.)
This commit is contained in:
Steve Howell
2018-12-08 17:16:37 +00:00
committed by Tim Abbott
parent b88a5700f6
commit 0543e8fbc1
8 changed files with 38 additions and 13 deletions

View File

@@ -351,7 +351,11 @@ function set_up_choices_field() {
}
exports.set_up = function () {
exports.build_page();
exports.maybe_disable_widgets();
};
exports.build_page = function () {
// create loading indicators
loading.make_indicator($('#admin_page_profile_fields_loading_indicator'));
// Populate profile_fields table