| version 1.6, 2004/01/05 11:36:22 |
version 1.7, 2004/03/09 13:31:10 |
|
|
| * http://platon.sk/projects/scripts/ |
* http://platon.sk/projects/scripts/ |
| */ |
*/ |
| |
|
| /* $Platon: scripts/js/contentTableResize/contentTableResize.js,v 1.4 2003/12/25 12:06:50 nepto Exp $ */ |
/* $Platon: scripts/js/contentTableResize/contentTableResize.js,v 1.6 2004/01/05 11:36:22 nepto Exp $ */ |
| |
|
| // Default values (edit if needed) |
// Default values (edit if needed) |
| |
|
| Line 101 function contentTableResize() |
|
| Line 101 function contentTableResize() |
|
| if (contentTablesOriginalWidth == null) |
if (contentTablesOriginalWidth == null) |
| contentTablesOriginalWidth = new Array(); |
contentTablesOriginalWidth = new Array(); |
| |
|
| if (contentTablesOriginalWidth[i] == null) { |
if (contentTablesOriginalWidth[i] != null) { |
| |
origWidth = contentTablesOriginalWidth[i]; |
| |
} else { |
| origWidth = contentTables[i].getAttribute('width'); |
origWidth = contentTables[i].getAttribute('width'); |
| if (percentageBase > 0 && |
|
| origWidth.charAt(origWidth.length - 1) == "%") { |
|
| mulFactor = origWidth.substr(0, origWidth.length - 1); |
|
| mulFactor *= (100 / percentageBase); |
|
| mulFactor /= 100; |
|
| } else { |
|
| mulFactor = 1; |
|
| } |
|
| contentTablesOriginalWidth[i] = origWidth; |
contentTablesOriginalWidth[i] = origWidth; |
| } |
} |
| |
|
| |
if (percentageBase > 0 |
| |
&& origWidth.charAt(origWidth.length - 1) == "%") { |
| |
mulFactor = origWidth.substr(0, origWidth.length - 1); |
| |
mulFactor *= (100 / percentageBase); |
| |
mulFactor /= 100; |
| |
} else { |
| |
mulFactor = 1; |
| |
} |
| |
|
| contentTables[i].setAttribute('width', newWidth * mulFactor); |
contentTables[i].setAttribute('width', newWidth * mulFactor); |
| |
|
| if (contentTableDebug != null && contentTableDebug) { |
if (contentTableDebug != null && contentTableDebug) { |
| Line 122 function contentTableResize() |
|
| Line 125 function contentTableResize() |
|
| + document.body.clientWidth |
+ document.body.clientWidth |
| + ".\nMaximal allowed width is " |
+ ".\nMaximal allowed width is " |
| + maxClientWidth |
+ maxClientWidth |
| + ".\nChanging content table width to " |
+ ".\nChanging content table width from " |
| |
+ origWidth |
| |
+ " to " |
| + contentTables[i].width |
+ contentTables[i].width |
| + ".\nMul factor is " |
+ ".\nMul factor is " |
| + mulFactor |
+ mulFactor |