patch #2812070 [interface] Allow selecting a range of rows by holding shift, thanks to Joolee
This commit is contained in:
@@ -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,
|
||||
|
@@ -836,9 +836,13 @@ 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' ) {
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user