From 4318bd4070dbcb64725e9788145604e318baffd4 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 22 Jun 2015 17:18:34 +0000 Subject: [PATCH] Add a base css class for making tbody of grid widget scrollable --- etemplate/templates/default/etemplate2.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 7b6287e12d..02f5a26fdc 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -932,6 +932,28 @@ table.et2_grid tbody.ui-sortable:not(.ui-sortable-disabled) > tr:not(.th) { cursor: ns-resize; } +.et2_scrollable_tbody { + display: flex; + flex-flow: column; + height: 100%; + width: 100%; +} +.et2_scrollable_tbody thead { + flex: 0 0 auto; + width: calc(100% - 0.9em); + display: table; + table-layout: fixed; +} +.et2_scrollable_tbody tbody > tr{ + width: 100%; + display: table; + table-layout: fixed; +} +.et2_scrollable_tbody tbody { + flex: 1 1 auto; + display: block; + overflow-y: scroll; +} /** * irame & loader */