mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
I would like to have split this into several commits, but it's hard to do incrementally, because functions need to be defined before their use in global data. (imported from commit 31533396b236f3b657950b073982c317256f082a)
30 lines
712 B
JavaScript
30 lines
712 B
JavaScript
function get_next_visible(zephyr_row) {
|
|
if (zephyr_row === undefined)
|
|
return [];
|
|
return zephyr_row.nextAll('.zephyr_row:first');
|
|
}
|
|
|
|
function get_prev_visible(zephyr_row) {
|
|
if (zephyr_row === undefined)
|
|
return [];
|
|
return zephyr_row.prevAll('.zephyr_row:first');
|
|
}
|
|
|
|
function get_first_visible() {
|
|
return $('.focused_table .zephyr_row:first');
|
|
}
|
|
|
|
function get_last_visible() {
|
|
return $('.focused_table .zephyr_row:last');
|
|
}
|
|
|
|
function get_id(zephyr_row) {
|
|
return zephyr_row.attr('zid');
|
|
}
|
|
|
|
function get_zephyr_row(zephyr_id, table_name) {
|
|
if (table_name === undefined)
|
|
table_name = (narrowed ? 'zfilt' : 'zhome');
|
|
return $('#' + table_name + zephyr_id);
|
|
}
|