Show the sql_query to the user when dropping Routines, Events and triggers and fix classes in the list.

This commit is contained in:
Rouslan Placella 2011-06-13 15:14:31 +01:00
parent 17b8f21ccd
commit 8db8527337
4 changed files with 17 additions and 4 deletions

View File

@ -240,10 +240,7 @@ $(document).ready(function() {
* @var ct Count of processed rows.
*/
var ct = 0;
$('table.data').find('tr').each(function() {
if ($(this).has('th').length) {
return true;
}
$('table.data').find('tr').has('td').each(function() {
rowclass = (ct % 2 == 0) ? 'even' : 'odd';
$(this).removeClass().addClass(rowclass);
ct++;

View File

@ -2362,8 +2362,22 @@ $(document).ready(function() {
} else {
$curr_row.hide("slow", function () {
$(this).remove();
// Now we have removed the row from the list, but maybe
// some row classes are wrong now. So we will itirate
// throught all rows and assign correct classes to them.
/**
* @var ct Count of processed rows.
*/
var ct = 0;
$table.find('tr').has('td').each(function() {
rowclass = (ct % 2 == 0) ? 'even' : 'odd';
$(this).removeClass().addClass(rowclass);
ct++;
});
});
}
// Show the query that we just executed
$('#js_query_display').html(data.sql_query);
} else {
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
}

View File

@ -51,6 +51,7 @@ if (! empty($_GET['exportevent']) && ! empty($_GET['eventname'])) {
/**
* Display a list of available events
*/
echo "\n\n<span id='js_query_display'></span>\n\n";
echo '<fieldset>' . "\n";
echo ' <legend>' . __('Events') . '</legend>' . "\n";
if (! $events) {

View File

@ -57,6 +57,7 @@ if (! empty($_GET['exporttrigger']) && ! empty($_GET['triggername'])) {
/**
* Display a list of available triggers
*/
echo "\n\n<span id='js_query_display'></span>\n\n";
echo '<fieldset>' . "\n";
echo ' <legend>' . __('Triggers') . '</legend>' . "\n";
if (! $triggers) {