From 2e18b36a287ad9b25619f9e2a073dcedf6d620ee Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 18 May 2016 18:04:56 +0200 Subject: MORE WMORK --- modules-available/sysconfig/clientscript.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules-available/sysconfig/clientscript.js (limited to 'modules-available/sysconfig/clientscript.js') diff --git a/modules-available/sysconfig/clientscript.js b/modules-available/sysconfig/clientscript.js new file mode 100644 index 00000000..2a133353 --- /dev/null +++ b/modules-available/sysconfig/clientscript.js @@ -0,0 +1,21 @@ + +function forceTable(t) +{ + var pwidth = t.parent().innerWidth(); + var rows = t.find('tr'); + var row = rows.first(); + pwidth = Math.round(pwidth); + t.width(pwidth); + var sum = 0; + row.find('td').each(function() { + if (!$(this).hasClass('slx-width-ignore')) + sum += $(this).outerWidth(true); + }); + var w = Math.round(pwidth - sum); + do { + rows.find('.slx-dyn-ellipsis').each(function() { + $(this).width(w).css('width', w + 'px').css('max-width', w + 'px'); + }); + w -= 3; + } while (t.width() > pwidth); +} -- cgit v1.2.3-55-g7522