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:
Anders Kaseorg
2020-07-14 16:29:15 -07:00
committed by Tim Abbott
parent 06691e1e45
commit f3726db89a
344 changed files with 14425 additions and 14420 deletions

View File

@@ -1,7 +1,7 @@
let is_floating_recipient_bar_showing = false;
function top_offset(elem) {
return elem.offset().top - $('#tab_bar').safeOuterHeight();
return elem.offset().top - $("#tab_bar").safeOuterHeight();
}
exports.first_visible_message = function (bar) {
@@ -11,7 +11,7 @@ exports.first_visible_message = function (bar) {
// displayed, which will always be the first messages whose bottom
// overlaps the floating recipient bar's space (since you ).
const messages = bar.children('.message_row');
const messages = bar.children(".message_row");
const frb_bottom = exports.frb_bottom();
const frb_top = frb_bottom - 25;
let result;
@@ -53,7 +53,7 @@ exports.first_visible_message = function (bar) {
// Important: This will break if we ever have things that are
// not message rows inside a recipient_row block.
message = message.next('.message_row');
message = message.next(".message_row");
if (message.length > 0 && result) {
// Before returning a result, we check whether the next
// message's top is actually below the bottom of the
@@ -119,7 +119,7 @@ exports.relevant_recipient_bars = function () {
let first_elem = exports.candidate_recipient_bar();
if (!first_elem) {
first_elem = $('.focused_table').find('.recipient_row').first();
first_elem = $(".focused_table").find(".recipient_row").first();
}
if (first_elem.length === 0) {
@@ -128,8 +128,8 @@ exports.relevant_recipient_bars = function () {
elems.push(first_elem);
const max_offset = top_offset($('#compose'));
let header_height = first_elem.find('.message_header').safeOuterHeight();
const max_offset = top_offset($("#compose"));
let header_height = first_elem.find(".message_header").safeOuterHeight();
// It's okay to overestimate header_height a bit, as we don't
// really need an FRB for a section that barely shows.
@@ -171,7 +171,7 @@ exports.relevant_recipient_bars = function () {
}
if (elems.length === 0) {
blueslip.warn('Unexpected situation--maybe viewport height is very short.');
blueslip.warn("Unexpected situation--maybe viewport height is very short.");
return [];
}
@@ -183,14 +183,14 @@ exports.relevant_recipient_bars = function () {
date_html = exports.get_date(elem);
need_frb = top_offset(elem) < 0;
} else {
date_html = elem.find('.recipient_row_date').html();
date_html = elem.find(".recipient_row_date").html();
need_frb = false;
}
const date_text = $(date_html).text();
// Add title here to facilitate troubleshooting.
const title = elem.find('.message_label_clickable').last().attr('title');
const title = elem.find(".message_label_clickable").last().attr("title");
const item = {
elem: elem,
@@ -255,7 +255,7 @@ exports.candidate_recipient_bar = function () {
function show_floating_recipient_bar() {
if (!is_floating_recipient_bar_showing) {
$("#floating_recipient_bar").css('visibility', 'visible');
$("#floating_recipient_bar").css("visibility", "visible");
is_floating_recipient_bar_showing = true;
}
}
@@ -280,31 +280,31 @@ function replace_floating_recipient_bar(source_info) {
header = source_recipient_bar.children(".message_header_private_message");
}
new_label.find(".message_header").replaceWith(header.clone());
other_label.css('display', 'none');
new_label.css('display', 'block');
other_label.css("display", "none");
new_label.css("display", "block");
new_label.attr("zid", rows.id(rows.first_message_in_group(source_recipient_bar)));
new_label.toggleClass('message-fade', source_recipient_bar.hasClass('message-fade'));
new_label.toggleClass("message-fade", source_recipient_bar.hasClass("message-fade"));
old_source = source_recipient_bar;
}
const rendered_date = source_info.date_html || '';
const rendered_date = source_info.date_html || "";
$('#floating_recipient_bar').find('.recipient_row_date').html(rendered_date);
$("#floating_recipient_bar").find(".recipient_row_date").html(rendered_date);
show_floating_recipient_bar();
}
exports.hide = function () {
if (is_floating_recipient_bar_showing) {
$("#floating_recipient_bar").css('visibility', 'hidden');
$("#floating_recipient_bar").css("visibility", "hidden");
is_floating_recipient_bar_showing = false;
}
};
exports.de_clutter_dates = function (items) {
for (const item of items) {
item.elem.find('.recipient_row_date').toggle(item.show_date);
item.elem.find(".recipient_row_date").toggle(item.show_date);
}
};