settings: Eliminate admin_sections module.

We move all of its logic into settings_sections.

Note that this is slightly more than a refactor.
We are slightly more aggressive about resetting
sections.  For example, if you go into Settings,
then exit the overlay, then go into Manage
Organization, we will now reset sections for both
groups.
This commit is contained in:
Steve Howell
2018-12-08 18:28:26 +00:00
committed by Tim Abbott
parent 0543e8fbc1
commit 7a44d99b96
7 changed files with 51 additions and 127 deletions

View File

@@ -69,16 +69,13 @@ exports.build_page = function () {
$("#id_realm_email_address_visibility").val(page_params.realm_email_address_visibility);
$("#id_realm_default_language").val(page_params.realm_default_language);
// Since we just swapped in a whole new page, we need to
// tell admin_sections nothing is loaded.
admin_sections.reset_sections();
};
exports.launch = function (section) {
settings.build_page();
exports.build_page();
settings_sections.reset_sections();
overlays.open_settings();
settings_panel_menu.org_settings.activate_section(section);