diff --git a/smash/web/static/js/smash.js b/smash/web/static/js/smash.js index 2529e33d018b78c05c48a794bf52eab8d20ddda3..a82e85dfbf84a19d03d82f8f6a003e1b932377c1 100644 --- a/smash/web/static/js/smash.js +++ b/smash/web/static/js/smash.js @@ -220,6 +220,7 @@ function createTable(params) { var voucher_types_url = params.voucher_types_url; var voucher_partner_url = params.voucher_partner_url; var columnsDefinition = params.columns; + var dom_settings = params.dom_settings; tableElement.appendChild(createHeader(columnsDefinition)); tableElement.appendChild(createFilter(columnsDefinition)); @@ -364,7 +365,9 @@ function createTable(params) { columns: columns, columnDefs: columnDefs, order: [[0, 'desc']], - scrollX: true }); + scrollX: true, + dom: dom_settings //see docs: https://datatables.net/reference/option/dom + }); // Apply the search table.columns().every(function () { diff --git a/smash/web/templates/subjects/index.html b/smash/web/templates/subjects/index.html index 4033c02dd8abdf84127be23da9a6441906c667d4..c6298a85434fd7e7d6963a4ac20f9151778ae8f4 100644 --- a/smash/web/templates/subjects/index.html +++ b/smash/web/templates/subjects/index.html @@ -61,7 +61,8 @@ flying_teams_url: "{% url 'web.api.flying_teams' %}", tableElement: document.getElementById("table"), columns: getColumns(data.columns, getSubjectEditUrl), - checkboxesElement: document.getElementById("visible-column-checkboxes") + checkboxesElement: document.getElementById("visible-column-checkboxes"), + dom_settings: 'lrtip' // show table without search box }) });