mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
Rename zephyrs to messages in various local variables.
(imported from commit 91ac7e47c51fdcaf6559b06f07e36b041aad3e2c)
This commit is contained in:
parent
27b84f7705
commit
2170c7a352
@ -1,4 +1,4 @@
|
||||
{{! Client-side Mustache template for rendering zephyrs.}}
|
||||
{{! Client-side Mustache template for rendering messages.}}
|
||||
|
||||
{{! Because we use table-layout: fixed for the Zephyr table,
|
||||
all the column widths are computed from the first row;
|
||||
@ -12,7 +12,7 @@
|
||||
</tr>
|
||||
{{/include_layout_row}}
|
||||
|
||||
{{#each zephyrs}}
|
||||
{{#each messages}}
|
||||
{{#with this}}
|
||||
{{#include_bookend}}
|
||||
<tr><td /><td /><td class="bookend" /></tr>
|
||||
|
||||
@ -41,7 +41,7 @@ class Command(BaseCommand):
|
||||
dest='num_messages',
|
||||
type='int',
|
||||
default=600,
|
||||
help='The number of zephyrs to create.'),
|
||||
help='The number of messages to create.'),
|
||||
make_option('--extra-users',
|
||||
dest='extra_users',
|
||||
type='int',
|
||||
|
||||
@ -185,7 +185,7 @@ function select_message(next_message, scroll_to) {
|
||||
next_message = $('tr:not(:hidden):first');
|
||||
}
|
||||
if (next_message.length === 0) {
|
||||
// There are no zephyrs!
|
||||
// There are no messages!
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -247,12 +247,12 @@ function add_display_time(zephyr, prev) {
|
||||
zephyr.full_date_str = time.toLocaleString();
|
||||
}
|
||||
|
||||
function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
if (zephyrs.length === 0)
|
||||
function add_to_table(messages, table_name, filter_function, where) {
|
||||
if (messages.length === 0)
|
||||
return;
|
||||
|
||||
var table = $('#' + table_name);
|
||||
var zephyrs_to_render = [];
|
||||
var messages_to_render = [];
|
||||
var ids_where_next_is_same_sender = [];
|
||||
var prev;
|
||||
|
||||
@ -275,7 +275,7 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
get_message_row(id, table_name).remove();
|
||||
top_messages.push(message_dict[id]);
|
||||
});
|
||||
zephyrs = zephyrs.concat(top_messages);
|
||||
messages = messages.concat(top_messages);
|
||||
|
||||
// Delete the leftover recipient label.
|
||||
table.find('.recipient_row:first').remove();
|
||||
@ -283,7 +283,7 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
prev = message_dict[table.find('tr:last-child').attr('zid')];
|
||||
}
|
||||
|
||||
$.each(zephyrs, function (index, zephyr) {
|
||||
$.each(messages, function (index, zephyr) {
|
||||
if (! filter_function(zephyr))
|
||||
return;
|
||||
|
||||
@ -313,7 +313,7 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
|
||||
zephyr.dom_id = table_name + zephyr.id;
|
||||
|
||||
zephyrs_to_render.push(zephyr);
|
||||
messages_to_render.push(zephyr);
|
||||
prev = zephyr;
|
||||
});
|
||||
|
||||
@ -327,7 +327,7 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
}
|
||||
|
||||
var rendered = templates.zephyr({
|
||||
zephyrs: zephyrs_to_render,
|
||||
messages: messages_to_render,
|
||||
include_layout_row: (table.find('tr:first').length === 0)
|
||||
});
|
||||
|
||||
@ -337,7 +337,7 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
||||
table.append(rendered);
|
||||
}
|
||||
|
||||
$.each(zephyrs_to_render, function (index, zephyr) {
|
||||
$.each(messages_to_render, function (index, zephyr) {
|
||||
var row = get_message_row(zephyr.id, table_name);
|
||||
register_onclick(row, zephyr.id);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user