Better support for noclickable rows.

This commit is contained in:
Michal Čihař
2005-11-24 10:20:01 +00:00
parent b35ef0b86c
commit e2c2874156
2 changed files with 6 additions and 1 deletions

View File

@@ -473,7 +473,7 @@ function PMA_markRowsInit() {
var rows = document.getElementsByTagName('tr');
for ( var i = 0; i < rows.length; i++ ) {
// ... with the class 'odd' or 'even' ...
if ( 'odd' != rows[i].className && 'even' != rows[i].className ) {
if ( 'odd' != rows[i].className.substr(0,3) && 'even' != rows[i].className.substr(0,4) ) {
continue;
}
// ... add event listeners ...
@@ -487,6 +487,10 @@ function PMA_markRowsInit() {
this.className = this.className.replace( ' hover', '' );
}
}
// Do not set click events if not wanted
if (rows[i].className.search(/noclick/) != -1) {
continue;
}
// ... and to mark the row on click ...
rows[i].onmousedown = function() {
var unique_id;