TitleBug no more than one sorttable table per page
Date27-Apr-2006 14:37:40 EEST
Version2.3.102
Submitter195.235.160.29
Bug criticalityLightBug
Browser versionFF 1.5.0.2
Bug statusClosedBug
PageProvider used
Servlet Containertomcat 5.0.28
Operating SystemWindows XP
URLsearch page
Java version1.4.2_08

No more than one sorttable table can be placed on a page. This is caused due to a little bug on jspwiki-common.js Sortable.onPageLoad function. It should look like this

Sortable.onPageLoad = function()
{
  var p = document.getElementById( "pagecontent" ); if( !p ) return; 
  var sortables = getElementsByClassName( p, Sortable.ClassName );  if( !sortables ) return;
  for( i=0; i<sortables.length; i++ )
  {
    var table = sortables[i].getElementsByTagName( "table" )[0];
    if( !table ) continue;
    if( table.rows.length < 2 ) continue;
  
    for( var j=0; j < table.rows[0].cells.length; j++ )   // j, not i 
    {
      var c = table.rows[0].cells[j];                     // j, not i
      if( c.nodeName != "TH" ) break;
      c.onclick    = function() { Sortable.sort(this); } ;
      c.title      = this.TitleSort;
      c.className += " " + this.ClassSort;
    }
  }
}

P.d: sorry for the original mis-format didn't notice it
-- Juan Pablo


Thanks heaps! Fixed in 2.4.20.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-6) was last changed on 01-Oct-2008 18:15 by 83.61.2.166