Improve no data UI messages on empty tables.

This commit is contained in:
Roman Vynar 2018-08-14 15:16:21 +03:00
parent 0f6bf65015
commit 734afe56b5
3 changed files with 16 additions and 6 deletions

View File

@ -6,7 +6,10 @@
$('#datatable').DataTable({ $('#datatable').DataTable({
"pageLength": 10, "pageLength": 10,
"order": [[ 4, 'desc' ]], "order": [[ 4, 'desc' ]],
"stateSave": true "stateSave": true,
"language": {
"emptyTable": "No events."
}
}); });
}); });
</script> </script>

View File

@ -3,10 +3,6 @@
{{block head()}} {{block head()}}
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
$('#datatable').DataTable({
"pageLength": 25,
"stateSave": true
});
$('#namespace').on('change', function (e) { $('#namespace').on('change', function (e) {
window.location = '{{ basePath }}/' + this.value; window.location = '{{ basePath }}/' + this.value;
}); });
@ -18,6 +14,14 @@
namespace = namespace.split('/')[1] namespace = namespace.split('/')[1]
} }
$('#namespace').val(namespace); $('#namespace').val(namespace);
$('#datatable').DataTable({
"pageLength": 25,
"stateSave": true,
"language": {
"emptyTable": "No repositories in \"" + namespace + "\" namespace."
}
});
}); });
</script> </script>
{{end}} {{end}}

View File

@ -11,7 +11,10 @@
"stateSave": true, "stateSave": true,
columnDefs: [ columnDefs: [
{ type: 'natural', targets: 0 } { type: 'natural', targets: 0 }
] ],
"language": {
"emptyTable": "No tags in this repository."
}
}) })
function populateConfirmation() { function populateConfirmation() {
$('[data-toggle=confirmation]').confirmation({ $('[data-toggle=confirmation]').confirmation({