Title | Bug no more than one sorttable table per page |
Date | 27-Apr-2006 14:37:40 EEST |
Version | 2.3.102 |
Submitter | 195.235.160.29 |
Bug criticality | LightBug |
Browser version | FF 1.5.0.2 |
Bug status | ClosedBug |
PageProvider used | |
Servlet Container | tomcat 5.0.28 |
Operating System | Windows XP |
URL | search page |
Java version | 1.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
Thanks heaps! Fixed in 2.4.20.
Add new attachment
Only authorized users are allowed to upload new attachments.