mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
js: Normalize strings to double quotes.
Prettier would do this anyway, but it’s separated out for a more reviewable diff. Generated by ESLint. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
06691e1e45
commit
f3726db89a
@@ -1,4 +1,4 @@
|
||||
const render_stream_specific_notification_row = require('../templates/settings/stream_specific_notification_row.hbs');
|
||||
const render_stream_specific_notification_row = require("../templates/settings/stream_specific_notification_row.hbs");
|
||||
const settings_config = require("./settings_config");
|
||||
|
||||
exports.get_notifications_table_row_data = function (notify_settings) {
|
||||
@@ -47,7 +47,7 @@ function rerender_ui() {
|
||||
|
||||
const unmatched_streams = stream_data.get_unmatched_streams_for_notification_settings();
|
||||
|
||||
unmatched_streams_table.find('.stream-row').remove();
|
||||
unmatched_streams_table.find(".stream-row").remove();
|
||||
|
||||
for (const stream of unmatched_streams) {
|
||||
unmatched_streams_table.append(
|
||||
@@ -70,7 +70,7 @@ function rerender_ui() {
|
||||
function change_notification_setting(setting, setting_data, status_element) {
|
||||
const data = {};
|
||||
data[setting] = JSON.stringify(setting_data);
|
||||
settings_ui.do_settings_change(channel.patch, '/json/settings/notifications', data, status_element);
|
||||
settings_ui.do_settings_change(channel.patch, "/json/settings/notifications", data, status_element);
|
||||
}
|
||||
|
||||
function update_desktop_icon_count_display() {
|
||||
@@ -81,14 +81,14 @@ function update_desktop_icon_count_display() {
|
||||
|
||||
exports.set_enable_digest_emails_visibility = function () {
|
||||
if (page_params.realm_digest_emails_enabled) {
|
||||
$('#enable_digest_emails_label').parent().show();
|
||||
$("#enable_digest_emails_label").parent().show();
|
||||
} else {
|
||||
$('#enable_digest_emails_label').parent().hide();
|
||||
$("#enable_digest_emails_label").parent().hide();
|
||||
}
|
||||
};
|
||||
|
||||
exports.set_up = function () {
|
||||
$('#notification-settings').on('change', 'input, select', function (e) {
|
||||
$("#notification-settings").on("change", "input, select", function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const input_elem = $(e.currentTarget);
|
||||
@@ -99,7 +99,7 @@ exports.set_up = function () {
|
||||
const setting_name = input_elem.attr("name");
|
||||
change_notification_setting(setting_name,
|
||||
settings_org.get_input_element_value(this),
|
||||
input_elem.closest('.subsection-parent').find('.alert-notification'));
|
||||
input_elem.closest(".subsection-parent").find(".alert-notification"));
|
||||
});
|
||||
|
||||
update_desktop_icon_count_display();
|
||||
@@ -132,17 +132,17 @@ exports.set_up = function () {
|
||||
|
||||
exports.update_page = function () {
|
||||
for (const setting of settings_config.all_notification_settings) {
|
||||
if (setting === 'enable_offline_push_notifications'
|
||||
if (setting === "enable_offline_push_notifications"
|
||||
&& !page_params.realm_push_notifications_enabled) {
|
||||
// If push notifications are disabled at the realm level,
|
||||
// we should just leave the checkbox always off.
|
||||
continue;
|
||||
} else if (setting === 'desktop_icon_count_display') {
|
||||
} else if (setting === "desktop_icon_count_display") {
|
||||
update_desktop_icon_count_display();
|
||||
continue;
|
||||
}
|
||||
|
||||
$("#" + setting).prop('checked', page_params[setting]);
|
||||
$("#" + setting).prop("checked", page_params[setting]);
|
||||
}
|
||||
rerender_ui();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user