diff --git a/zephyr/jstemplates/zephyr.html b/zephyr/jstemplates/zephyr.html index 8b08d811dc..5f0c9b85ae 100644 --- a/zephyr/jstemplates/zephyr.html +++ b/zephyr/jstemplates/zephyr.html @@ -4,11 +4,13 @@ all the column widths are computed from the first row; these CSS classes specify the widths for that first, collapsed row. (Otherwise, colspan breaks everything).}} - +{{#include_layout_row}} + +{{/include_layout_row}} {{#each zephyrs}} {{#with this}} diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index cb27cdb41c..cb57f1c450 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -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);