Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/js/contentTableResize/contentTableResize.js between version 1.6 and 1.7

version 1.6, 2004/01/05 11:36:22 version 1.7, 2004/03/09 13:31:10
Line 15 
Line 15 
  * 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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top