I tried to do a whole row to be referenced to another page, but it doesn't work when my table is defined as a bootstraptable
in the javascript.
If it is a simple table, it works correctly.
Maybe the BootstrapTable extension doesn't support it?
I used this question for the implementation
This part from the javascript:
$.ajax({
url: "/virtual_zeros/filterProntos",
type: 'post',
data: {
'id': id
},
success: function(data) {
$('#contentDiv').html(data);
$('#vzTable').bootstrapTable();
},
error: function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
alert(errorThrown);
}
});
This is the relevant part of the .volt
file:
<tbody>
{% if data['someKindOf'] == null %} {% else %} {% for tableData in data['someKindOf'] %}
<tr class="clickable-row" data-url='https://foo.bar.com/foo_contorller/somefunction/id={{tableData['id']}}'>
{% for headerData in data['someKindOf2'] %}
<td>{{tableData[headerData]}}</td>
{% endfor %}
</tr>
{% endfor %} {% endif %}
</tbody>