From b57e79a5575f6fb8ba5d1b7bfd5874f1427709ea Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Fri, 9 Aug 2019 09:41:32 +0200 Subject: [PATCH] Fix tables (#1963) --- app/assets/javascripts/my_modules/protocols.js | 4 +++- app/assets/javascripts/projects/index.js | 2 +- app/assets/javascripts/protocols/index.js | 4 +++- .../javascripts/repositories/repository_datatable.js.erb | 2 +- app/assets/javascripts/users/settings/teams/show.js | 1 - 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index 56fe44e6e..41c2987b4 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -213,7 +213,9 @@ function initLoadFromRepositoryTable(content) { var datatable = tableEl.DataTable({ order: [[1, 'asc']], - dom: 'RBfltpi', + dom: "RBfl<'row'<'col-sm-12't>><'row'<'col-sm-7'i><'col-sm-5'p>>", + sScrollX: '100%', + sScrollXInner: '100%', buttons: [], processing: true, serverSide: true, diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 0f2c38f09..db1ccb418 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -625,7 +625,7 @@ function dataTableInit() { var TABLE_ID = '#projects-overview-table'; TABLE = $(TABLE_ID).DataTable({ - dom: "R<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>>tpi", + dom: "R<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>><'row'<'col-sm-12't>><'row'<'col-sm-7'i><'col-sm-5'p>>", stateSave: true, stateDuration: 0, processing: true, diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index 319cb8c5c..789c63637 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -28,8 +28,10 @@ function initProtocolsTable() { protocolsDatatable = protocolsTableEl.DataTable({ order: [[1, "asc"]], - dom: "RBfltpi", + dom: "RBfl<'row'<'col-sm-12't>><'row'<'col-sm-7'i><'col-sm-5'p>>", stateSave: true, + sScrollX: '100%', + sScrollXInner: '100%', buttons: [], processing: true, serverSide: true, diff --git a/app/assets/javascripts/repositories/repository_datatable.js.erb b/app/assets/javascripts/repositories/repository_datatable.js.erb index 7122b9c55..ecbd1d606 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js.erb +++ b/app/assets/javascripts/repositories/repository_datatable.js.erb @@ -55,7 +55,7 @@ var RepositoryDatatable = (function(global) { originalHeader = $(TABLE_ID + ' thead').children().clone(); viewAssigned = 'assigned'; TABLE = $(TABLE_ID).DataTable({ - dom: "R<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>>tpi", + dom: "R<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>><'row'<'col-sm-12't>><'row'<'col-sm-7'i><'col-sm-5'p>>", stateSave: true, processing: true, serverSide: true, diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index 5972d1bce..d0e22bc44 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -89,7 +89,6 @@ function initUsersTable() { usersDatatable = $('#users-table').DataTable({ order: [[1, 'asc']], - dom: 'RBfltpi', stateSave: true, buttons: [], processing: true,