blob: b2c5b2a75078efa770d9aa4266ca7504f68a5ae1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
function loadContent(elem, source)
{
var waitForIt = function() {
if (typeof $ === 'undefined') {
setTimeout(waitForIt, 50);
return;
}
$(elem).load(source);
}
waitForIt();
}
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);
}
|