mirror of https://github.com/zulip/zulip.git
subs: Move show_stream_row earlier in file.
This commit is contained in:
parent
a7610c8b7e
commit
9347fc4742
|
@ -1176,6 +1176,20 @@ $(function () {
|
|||
hash_util.encodeHashComponent(sub.name);
|
||||
}
|
||||
|
||||
function show_stream_row(node, show_settings) {
|
||||
$(".display-type #add_new_stream_title").hide();
|
||||
$(".display-type #stream_settings_title, .right .settings").show();
|
||||
$(".stream-row.active").removeClass("active");
|
||||
if (show_settings) {
|
||||
show_subs_pane.settings();
|
||||
|
||||
$(node).addClass("active");
|
||||
exports.show_settings_for(get_stream_id(node));
|
||||
} else {
|
||||
show_subs_pane.nothing_selected();
|
||||
}
|
||||
}
|
||||
|
||||
$("#subscriptions_table").on("click", ".sub_unsub_button", function (e) {
|
||||
var sub = get_sub_for_target(e.target);
|
||||
exports.sub_or_unsub(sub);
|
||||
|
@ -1278,20 +1292,6 @@ $(function () {
|
|||
exports.invite_user_to_stream(principal, sub, invite_success, invite_failure);
|
||||
});
|
||||
|
||||
function show_stream_row(node, show_settings) {
|
||||
$(".display-type #add_new_stream_title").hide();
|
||||
$(".display-type #stream_settings_title, .right .settings").show();
|
||||
$(".stream-row.active").removeClass("active");
|
||||
if (show_settings) {
|
||||
show_subs_pane.settings();
|
||||
|
||||
$(node).addClass("active");
|
||||
exports.show_settings_for(get_stream_id(node));
|
||||
} else {
|
||||
show_subs_pane.nothing_selected();
|
||||
}
|
||||
}
|
||||
|
||||
$("#subscriptions_table").on("click", ".stream-row", function (e) {
|
||||
if ($(e.target).closest(".check, .subscription_settings").length === 0) {
|
||||
show_stream_row(this, true);
|
||||
|
|
Loading…
Reference in New Issue