Fix #12017 Cannot easily select multiple tables when exporting

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2016-02-23 19:58:18 +11:00
parent b61c787e8f
commit d1ac2a64a5
3 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,7 @@ phpMyAdmin - ChangeLog
- issue #11981 Remove support for Swekey authentication
- issue #11987 Remove code for no longer supported MSIE versions
+ issue #11962 Remove embedded PHP libraries, use composer to install them
+ issue #12017 Cannot easily select multiple tables when exporting
4.6.0.0 (not yet released)
+ issue #11456 Disabled storage engines

View File

@ -90,6 +90,7 @@ foreach (array('table_select', 'table_structure', 'table_data') as $one_key) {
}
}
$odd = true;
foreach ($tables as $each_table) {
if (isset($_GET['table_select']) && is_array($_GET['table_select'])) {
$is_checked = PMA_getCheckedClause(
@ -117,9 +118,9 @@ foreach ($tables as $each_table) {
$data_checked = $is_checked;
}
$table_html = htmlspecialchars($each_table['Name']);
$multi_values .= '<tr>';
$multi_values .= '<tr class="' . ($odd ? 'odd' : 'even') . ' marked">';
$multi_values .= '<td><input type="checkbox" name="table_select[]"'
. ' value="' . $table_html . '"' . $is_checked . ' /></td>';
. ' value="' . $table_html . '"' . $is_checked . ' class="checkall"/></td>';
$multi_values .= '<td class="export_table_name">'
. str_replace(' ', '&nbsp;', $table_html) . '</td>';
$multi_values .= '<td class="export_structure">'
@ -129,6 +130,7 @@ foreach ($tables as $each_table) {
. '<input type="checkbox" name="table_data[]"'
. ' value="' . $table_html . '"' . $data_checked . ' /></td>';
$multi_values .= '</tr>';
$odd = ! $odd;
} // end for
$multi_values .= "\n";

View File

@ -522,10 +522,13 @@ function check_table_selected(row) {
if (data && structure) {
table_select.prop({checked: true, indeterminate: false});
$row.addClass('marked');
} else if (data || structure) {
table_select.prop({checked: true, indeterminate: true});
$row.removeClass('marked');
} else {
table_select.prop({checked: false, indeterminate: false});
$row.removeClass('marked');
}
}
@ -535,8 +538,10 @@ function toggle_table_select(row) {
if (table_selected) {
$row.find('input[type="checkbox"]:not(:disabled)').prop('checked', true);
$row.addClass('marked');
} else {
$row.find('input[type="checkbox"]:not(:disabled)').prop('checked', false);
$row.removeClass('marked');
}
}