mirror of https://github.com/zulip/zulip.git
group_settings: Empty right panel based on the url hash.
This commit adds code to empty the right panel if hash is changed to "#groups/your" or "#groups/all".
This commit is contained in:
parent
c6be850fb9
commit
fc8e6d2aa8
|
@ -379,9 +379,13 @@ export const show_user_group_settings_pane = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function open_right_panel_empty() {
|
function empty_right_panel() {
|
||||||
$(".group-row.active").removeClass("active");
|
$(".group-row.active").removeClass("active");
|
||||||
show_user_group_settings_pane.nothing_selected();
|
show_user_group_settings_pane.nothing_selected();
|
||||||
|
}
|
||||||
|
|
||||||
|
function open_right_panel_empty() {
|
||||||
|
empty_right_panel();
|
||||||
const tab_key = $(".user-groups-container")
|
const tab_key = $(".user-groups-container")
|
||||||
.find("div.ind-tab.selected")
|
.find("div.ind-tab.selected")
|
||||||
.first()
|
.first()
|
||||||
|
@ -566,11 +570,13 @@ export function change_state(section) {
|
||||||
|
|
||||||
if (section === "all") {
|
if (section === "all") {
|
||||||
group_list_toggler.goto("all-groups");
|
group_list_toggler.goto("all-groups");
|
||||||
|
empty_right_panel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (section === "your") {
|
if (section === "your") {
|
||||||
group_list_toggler.goto("your-groups");
|
group_list_toggler.goto("your-groups");
|
||||||
|
empty_right_panel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -595,6 +601,7 @@ export function change_state(section) {
|
||||||
|
|
||||||
blueslip.info("invalid section for groups: " + section);
|
blueslip.info("invalid section for groups: " + section);
|
||||||
group_list_toggler.goto("your-groups");
|
group_list_toggler.goto("your-groups");
|
||||||
|
empty_right_panel();
|
||||||
}
|
}
|
||||||
|
|
||||||
function compare_by_name(a, b) {
|
function compare_by_name(a, b) {
|
||||||
|
|
Loading…
Reference in New Issue