input element can not be under tr

This prevented the JS confirmation to work with Chromium, because it
moved the element outside the table.
This commit is contained in:
Michal Čihař
2011-01-28 10:40:23 +01:00
parent 701268fb57
commit 85ab22ddc0
2 changed files with 4 additions and 5 deletions

View File

@@ -199,7 +199,7 @@ $(document).ready(function() {
/** /**
* @var question String containing the question to be asked for confirmation * @var question String containing the question to be asked for confirmation
*/ */
var question = $(curr_proc_row).children('.drop_procedure_sql').val(); var question = $(curr_proc_row).children('td').children('.drop_procedure_sql').val();
$(this).PMA_confirm(question, $(this).attr('href'), function(url) { $(this).PMA_confirm(question, $(this).attr('href'), function(url) {

View File

@@ -65,20 +65,19 @@ if ($routines) {
$sqlDropProc = 'DROP FUNCTION ' . PMA_backquote($routine['SPECIFIC_NAME']); $sqlDropProc = 'DROP FUNCTION ' . PMA_backquote($routine['SPECIFIC_NAME']);
} }
echo sprintf('<tr class="%s"> echo sprintf('<tr class="%s">
<td><strong>%s</strong></td> <td><input type="hidden" class="drop_procedure_sql" value="%s" /><strong>%s</strong></td>
<td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td>
<td>%s</td> <td>%s</td>
<input type="hidden" class="drop_procedure_sql" value="%s" />
</tr>', </tr>',
($ct%2 == 0) ? 'even' : 'odd', ($ct%2 == 0) ? 'even' : 'odd',
$sqlDropProc,
$routine['ROUTINE_NAME'], $routine['ROUTINE_NAME'],
! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;db_query_force=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;', ! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;db_query_force=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;',
'<a class="drop_procedure_anchor" href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDropProc) . '" >' . $titles['Drop'] . '</a>', '<a class="drop_procedure_anchor" href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDropProc) . '" >' . $titles['Drop'] . '</a>',
$routine['ROUTINE_TYPE'], $routine['ROUTINE_TYPE'],
$routine['DTD_IDENTIFIER'], $routine['DTD_IDENTIFIER']);
$sqlDropProc);
$ct++; $ct++;
} }
echo '</table>'; echo '</table>';