Adjusted tabulator size to window screen size

This commit is contained in:
Cris
2020-01-28 12:29:18 +01:00
committed by hainberg
parent b270e65d2e
commit 198a3eb2d5
3 changed files with 34 additions and 0 deletions
@@ -93,6 +93,11 @@ function hf_filterStringnumberWithOperator(headerValue, rowValue, rowData){
// Tabulator table format functions
// -----------------------------------------------------------------------------------------------------------------
// Returns relative height (depending on screen size)
function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
@@ -432,6 +437,13 @@ storniert_tooltip = function(cell){
}
$(function() {
// Redraw table on resize to fit tabulators height to windows height
window.addEventListener('resize', function(){
$('#tableWidgetTabulator').tabulator('setHeight', $(window).height() * 0.50);
$('#tableWidgetTabulator').tabulator('redraw', true);
});
// Show all rows
$("#show-all").click(function(){
$('#tableWidgetTabulator').tabulator('clearFilter');
@@ -106,6 +106,11 @@ function func_initialFilter(){
// Tabulator table format functions
// -----------------------------------------------------------------------------------------------------------------
// Returns relative height (depending on screen size)
function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
@@ -492,6 +497,12 @@ akzeptiert_tooltip = function(cell){
}
$(function() {
// Redraw table on resize to fit tabulators height to windows height
window.addEventListener('resize', function(){
$('#tableWidgetTabulator').tabulator('setHeight', $(window).height() * 0.50);
$('#tableWidgetTabulator').tabulator('redraw', true);
});
// Show all rows
$("#show-all").click(function(){
$('#tableWidgetTabulator').tabulator('clearFilter');
@@ -111,6 +111,11 @@ function func_dataLoaded(data, table){
// Tabulator table format functions
// -----------------------------------------------------------------------------------------------------------------
// Returns relative height (depending on screen size)
function func_height(table){
return $(window).height() * 0.50;
}
// Displays text when table is empty
function func_placeholder()
{
@@ -509,6 +514,12 @@ akzeptiert_tooltip = function(cell){
$(function() {
// Redraw table on resize to fit tabulators height to windows height
window.addEventListener('resize', function(){
$('#tableWidgetTabulator').tabulator('setHeight', $(window).height() * 0.50);
$('#tableWidgetTabulator').tabulator('redraw', true);
});
// Show all rows
$("#show-all").click(function(){
$('#tableWidgetTabulator').tabulator('clearFilter');