settings: Use separate lists for the two sidebar panels.

The list with the options for normal settings now has
the class normal-settings-list.

The list with the options for org settings now has
the class org-settings-list.

The new markup helps us avoid code like this:

    $(".settings-list li:not(.admin)")

We also have funny hacks in our key handlers related
to the old combined-list approach, which we can
eventually eliminate.
This commit is contained in:
Steve Howell
2018-06-03 11:04:28 +00:00
committed by Tim Abbott
parent 7d250cb2f9
commit db514002ec
6 changed files with 29 additions and 32 deletions

View File

@@ -104,8 +104,10 @@ exports.setup_page = function () {
if (tab) {
exports.launch_page(tab);
settings_toggle.highlight_toggle('organization');
}
$("#id_realm_default_language").val(page_params.realm_default_language);
// Do this after calling the setup_up methods, so that we can
@@ -116,10 +118,6 @@ exports.setup_page = function () {
exports.launch_page = function (tab) {
var $active_tab = $("#settings_overlay_container li[data-section='" + tab + "']");
if ($active_tab.hasClass("admin")) {
settings_toggle.highlight_toggle('organization');
}
overlays.open_settings();
$active_tab.click();
};