Maintain one layout-setting row at the top of each table

(imported from commit b375ea78d79ca39b486d124256d0d4e89558d83a)
This commit is contained in:
Keegan McAllister
2012-10-02 17:19:33 -04:00
parent 1356bd336a
commit 5fe3787ded
2 changed files with 11 additions and 5 deletions

View File

@@ -824,12 +824,16 @@ function add_to_table(zephyrs, table_name, filter_function, where) {
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')
table.prepend(rendered);
else
if (where === 'top') {
table.find('.ztable_layout_row').after(rendered);
} else {
table.append(rendered);
}
$.each(zephyrs_to_render, function (index, zephyr) {
var row = get_zephyr_row(zephyr.id);