diff --git a/ChangeLog b/ChangeLog index ecba38243..f12405aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + rfe #2862575 [status] Order query statistics by % desc, skip rows with 0 + rfe #2823686 [interface] Increase default height of query window + rfe #2129902 [structure] Don't hide indexes ++ patch #2812070 [interface] Allow selecting a range of rows by holding shift, thanks to Joolee 3.2.5.0 (not yet released) - patch #2903400 [bookmarks] Status of bookmark table, diff --git a/js/functions.js b/js/functions.js index a190d1bca..8c924e033 100644 --- a/js/functions.js +++ b/js/functions.js @@ -836,10 +836,14 @@ function PMA_markRowsInit() { continue; } // ... and to mark the row on click ... - rows[i].onmousedown = function() { + rows[i].onmousedown = function(event) { var unique_id; var checkbox; + var table; + // Somehow IE8 has this not set + if (!event) var event = window.event + checkbox = this.getElementsByTagName( 'input' )[0]; if ( checkbox && checkbox.type == 'checkbox' ) { unique_id = checkbox.name + checkbox.value; @@ -863,6 +867,36 @@ function PMA_markRowsInit() { if ( checkbox && checkbox.disabled == false ) { checkbox.checked = marked_row[unique_id]; + if (typeof(event) == 'object') { + table = this.parentNode; + i = 0; + while (table.tagName.toLowerCase() != 'table' && i < 20) { + i++; + table = table.parentNode; + } + + if (event.shiftKey == true && table.lastClicked != undefined) { + if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } + i = table.lastClicked; + + if (i < this.rowIndex) { + i++; + } else { + i--; + } + + while (i != this.rowIndex) { + table.rows[i].onmousedown(); + if (i < this.rowIndex) { + i++; + } else { + i--; + } + } + } + + table.lastClicked = this.rowIndex; + } } }