Skip to content
Snippets Groups Projects
Verified Commit b0574efc authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Seznam shortcutu

parent 54c71ec9
Branches
No related tags found
No related merge requests found
<div class="card elevation-4 space-y-4 mt-2">
<div class="card__body">
<h2>Moje zkratky</h2>
<table id="Shortcuts"
class="table table--bordered"
data-row-style="rowStyle"
data-unique-id="id"
data-url="/api/shortcuts" >
<thead>
<tr>
<th data-field="shortcut" data-width="10" data-width-unit="%" data-sortable="true">Zkratka</th>
<th data-field="url" data-width="90" data-width-unit="%" data-sortable="true">URL</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$('#Shortcuts').bootstrapTable({
ajaxOptions: {
headers: {
'X-Auth-Token': '<%= $c->current_user->token %>'
}
},
sortable: true,
pagination: true,
pageSize: 50,
paginationParts: ['pageInfo', 'pageList'],
sidePagination: 'server',
// onClickCell: function (field, value, row, $element) {
// window.location.href ='/archive/' + row.id;
// },
});
function rowStyle(row, index) {
return {
css: {
cursor: 'pointer'
}
}
}
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment