mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
notification_settings: Display streams that differ.
The user has an option for setting global notification settings as well as the same settings for individual streams. Currently the user has to keep track of each unmatched stream and then visit each individual stream whose settings he wants to update. Thus this adds a dedicated UI table allowing the user to view and update the notifications of the specific streams which differs from the global settings. It is located on the same page where the user defined global notification settings can be modified. Fixes #9228.
This commit is contained in:
@@ -328,12 +328,16 @@ function stream_is_muted_clicked(e) {
|
||||
}
|
||||
}
|
||||
|
||||
function stream_setting_clicked(e) {
|
||||
exports.stream_setting_clicked = function (e) {
|
||||
if (e.currentTarget.id === 'sub_is_muted_setting') {
|
||||
return;
|
||||
}
|
||||
|
||||
const checkbox = $(e.currentTarget).find('.sub_setting_control');
|
||||
let checkbox = $(e.currentTarget).find('.sub_setting_control');
|
||||
// sub data is being changed from the notification settings page.
|
||||
if (checkbox.length === 0) {
|
||||
checkbox = $(e.currentTarget);
|
||||
}
|
||||
const sub = get_sub_for_target(e.target);
|
||||
const setting = checkbox.attr('name');
|
||||
if (!sub) {
|
||||
@@ -351,7 +355,7 @@ function stream_setting_clicked(e) {
|
||||
}
|
||||
}
|
||||
exports.set_stream_property(sub, setting, !sub[setting]);
|
||||
}
|
||||
};
|
||||
|
||||
exports.bulk_set_stream_property = function (sub_data) {
|
||||
return channel.post({
|
||||
@@ -548,7 +552,7 @@ exports.initialize = function () {
|
||||
stream_is_muted_clicked);
|
||||
|
||||
$("#subscriptions_table").on("click", ".sub_setting_checkbox",
|
||||
stream_setting_clicked);
|
||||
exports.stream_setting_clicked);
|
||||
|
||||
$("#subscriptions_table").on("submit", ".subscriber_list_add form", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user