From e2c28741561ea7ca1c5c9ade38af44c721d1e296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 24 Nov 2005 10:20:01 +0000 Subject: [PATCH] Better support for noclickable rows. --- ChangeLog | 1 + js/functions.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4462a17be..d75488b92 100755 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ $Source$ * tbl_query_box.php: Remove unused file. * libraries/tbl_properties.inc.php: Disable clicking events on table creation (bug #1358896). + * js/functions.js: Better support for noclickable rows (see above). 2005-11-24 Sebastian Mendel * themes/original/*, css/phpmyadmin.css.php: diff --git a/js/functions.js b/js/functions.js index dbd78c7b1..7e41f891c 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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;