mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 14:08:23 +00:00
Maintain one layout-setting row at the top of each table
(imported from commit b375ea78d79ca39b486d124256d0d4e89558d83a)
This commit is contained in:
@@ -4,11 +4,13 @@
|
|||||||
all the column widths are computed from the first row;
|
all the column widths are computed from the first row;
|
||||||
these CSS classes specify the widths for that first,
|
these CSS classes specify the widths for that first,
|
||||||
collapsed row. (Otherwise, colspan breaks everything).}}
|
collapsed row. (Otherwise, colspan breaks everything).}}
|
||||||
<tr style="visibility: collapse;">
|
{{#include_layout_row}}
|
||||||
|
<tr style="visibility: collapse;" class="ztable_layout_row">
|
||||||
<td class="ztable_col1" />
|
<td class="ztable_col1" />
|
||||||
<td class="ztable_col2" />
|
<td class="ztable_col2" />
|
||||||
<td class="ztable_col3" />
|
<td class="ztable_col3" />
|
||||||
</tr>
|
</tr>
|
||||||
|
{{/include_layout_row}}
|
||||||
|
|
||||||
{{#each zephyrs}}
|
{{#each zephyrs}}
|
||||||
{{#with this}}
|
{{#with this}}
|
||||||
|
|||||||
@@ -824,12 +824,16 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
|
|||||||
prev = zephyr;
|
prev = zephyr;
|
||||||
});
|
});
|
||||||
|
|
||||||
var rendered = templates.zephyr({zephyrs: zephyrs_to_render});
|
var rendered = templates.zephyr({
|
||||||
|
zephyrs: zephyrs_to_render,
|
||||||
|
include_layout_row: (table.find('tr:first').length == 0)
|
||||||
|
});
|
||||||
|
|
||||||
if (where === 'top')
|
if (where === 'top') {
|
||||||
table.prepend(rendered);
|
table.find('.ztable_layout_row').after(rendered);
|
||||||
else
|
} else {
|
||||||
table.append(rendered);
|
table.append(rendered);
|
||||||
|
}
|
||||||
|
|
||||||
$.each(zephyrs_to_render, function (index, zephyr) {
|
$.each(zephyrs_to_render, function (index, zephyr) {
|
||||||
var row = get_zephyr_row(zephyr.id);
|
var row = get_zephyr_row(zephyr.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user