From 2d54d80730e4fe76a48faccabad969644b65f5ba Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Wed, 1 Mar 2017 20:21:28 +0100 Subject: [PATCH] Make table columns resizable (does not work very well) --- frontend/table/table.css | 10 ++++++++++ frontend/table/table.js | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/table/table.css b/frontend/table/table.css index 2df7a419..d0c39430 100644 --- a/frontend/table/table.css +++ b/frontend/table/table.css @@ -4,4 +4,14 @@ h2[aria-expanded=true] .glyphicon-chevron-right { table.collapse.in { display: table; +} + +table { + table-layout: fixed; + width: auto !important; +} + +th,td { + box-sizing: content-box !important; + overflow: hidden; } \ No newline at end of file diff --git a/frontend/table/table.js b/frontend/table/table.js index 0ca0c8c1..10b34512 100644 --- a/frontend/table/table.js +++ b/frontend/table/table.js @@ -2,6 +2,7 @@ import 'bootstrap'; import $ from 'jquery'; import 'tablesorter/dist/js/jquery.tablesorter'; import 'tablesorter/dist/js/widgets/widget-uitheme.min.js'; +import 'tablesorter/dist/js/widgets/widget-resizable.min.js'; import 'tablesorter/dist/css/theme.bootstrap_3.min.css'; import './table.css'; @@ -22,6 +23,6 @@ $(document).ready(() => { $("table.tablesorter").tablesorter({ theme: "bootstrap", headerTemplate: "{content} {icon}", - widgets: ["uitheme"] + widgets: ["uitheme", "resizable"] }); });