Skip to content
Snippets Groups Projects
Commit 1254d304 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

list of subjects visible in lower resolution

parent 933fcc1d
No related branches found
No related tags found
1 merge request!34Performance of subject list
Pipeline #
...@@ -86,16 +86,16 @@ ...@@ -86,16 +86,16 @@
<script> <script>
$('#table tfoot div[name="string_filter"]').each(function () { $('#table tfoot div[name="string_filter"]').each(function () {
var title = $(this).text(); var title = $(this).text();
$(this).html('<input type="text" placeholder="Search ' + title + '" />'); $(this).html('<input type="text" style="width:80px" placeholder="' + title + '" />');
}); });
$('#table tfoot div[name="yes_no_filter"]').each(function () { $('#table tfoot div[name="yes_no_filter"]').each(function () {
$(this).html('<select ><option value selected="selected">----------</option><option value="true">YES</option><option value="false">NO</option></select>'); $(this).html('<select style="width:60px" ><option value selected="selected">---</option><option value="true">YES</option><option value="false">NO</option></select>');
}); });
$('#table tfoot div[name="location_filter"]').each(function () { $('#table tfoot div[name="location_filter"]').each(function () {
var obj = $(this) var obj = $(this)
obj.html('<select ><option value selected="selected">----------</option></select>'); obj.html('<select style="width:80px"><option value selected="selected">---</option></select>');
$.get("{% url 'web.api.locations' %}", function (data) { $.get("{% url 'web.api.locations' %}", function (data) {
$.each(data.locations, function (index, location) { $.each(data.locations, function (index, location) {
$('select', obj).append('<option value="' + location.id + '">' + location.name + '</option>'); $('select', obj).append('<option value="' + location.id + '">' + location.name + '</option>');
...@@ -107,7 +107,6 @@ ...@@ -107,7 +107,6 @@
var table = $('#table').DataTable({ var table = $('#table').DataTable({
serverSide: true, serverSide: true,
processing: true, processing: true,
defaultContent: "<button>Click!</button>",
ajax: "{% url 'web.api.subjects' list_type %}", ajax: "{% url 'web.api.subjects' list_type %}",
columns: [ columns: [
{"data": "nd_number"}, {"data": "nd_number"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment