This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
TitleBug no more than one sorttable table per page
Date27-Apr-2006 14:37:40 EEST
Bug criticalityLightBug
Browser versionFF
Bug statusNewBug
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 Santos Rodríguez, 27/04/2006

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 27-Apr-2006 14:40 by