Added ids to some HTML elements on tbl_change.php and modified the
output of tbl_replace.php for Ajax requests.
This commit is contained in:
@@ -113,6 +113,7 @@ if ($GLOBALS['cfg']['ShowPropertyComments']) {
|
||||
/**
|
||||
* used in ./libraries/header.inc.php to load JavaScript library file
|
||||
*/
|
||||
$GLOBALS['js_include'][] = 'functions.js';
|
||||
$GLOBALS['js_include'][] = 'tbl_change.js';
|
||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
|
||||
@@ -244,7 +245,7 @@ if (isset($clause_is_unique)) {
|
||||
?>
|
||||
|
||||
<!-- Insert/Edit form -->
|
||||
<form method="post" action="tbl_replace.php" name="insertForm" <?php if ($is_upload) { echo ' enctype="multipart/form-data"'; } ?>>
|
||||
<form id="insertForm" method="post" action="tbl_replace.php" name="insertForm" <?php if ($is_upload) { echo ' enctype="multipart/form-data"'; } ?>>
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs($_form_params);
|
||||
|
||||
@@ -301,7 +302,7 @@ foreach ($rows as $row_id => $vrow) {
|
||||
echo '<label for="insert_ignore_check_' . $row_id . '">' . __('Ignore') . '</label><br />' . "\n";
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<table class="insertRowTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Column'); ?></th>
|
||||
@@ -1184,7 +1185,7 @@ if (isset($where_clause)) {
|
||||
if ($insert_mode) {
|
||||
?>
|
||||
<!-- Restart insertion form -->
|
||||
<form method="post" action="tbl_replace.php" name="restartForm" >
|
||||
<form id="restartForm" method="post" action="tbl_replace.php" name="restartForm" >
|
||||
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
|
||||
<input type="hidden" name="goto" value="<?php echo htmlspecialchars($GLOBALS['goto']); ?>" />
|
||||
<input type="hidden" name="err_url" value="<?php echo htmlspecialchars($err_url); ?>" />
|
||||
@@ -1195,7 +1196,7 @@ if ($insert_mode) {
|
||||
echo '<input type="hidden" name="where_clause[' . $key_id . ']" value="' . htmlspecialchars(trim($where_clause)) . '" />'. "\n";
|
||||
}
|
||||
}
|
||||
$tmp = '<select name="insert_rows" id="insert_rows" onchange="this.form.submit();" >' . "\n";
|
||||
$tmp = '<select name="insert_rows" id="insert_rows">' . "\n";
|
||||
$option_values = array(1,2,5,10,15,20,30,40);
|
||||
foreach ($option_values as $value) {
|
||||
$tmp .= '<option value="' . $value . '"';
|
||||
|
@@ -421,6 +421,11 @@ if (! empty($error_messages)) {
|
||||
}
|
||||
unset($error_messages, $warning_messages, $total_affected_rows, $last_messages, $last_message);
|
||||
|
||||
if($GLOBALS['is_ajax_request'] == true) {
|
||||
$extra_data['sql_query'] = PMA_showMessage(NULL, $GLOBALS['display_query']);
|
||||
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
|
||||
}
|
||||
|
||||
if (isset($return_to_sql_query)) {
|
||||
$disp_query = $GLOBALS['sql_query'];
|
||||
$disp_message = $message;
|
||||
|
Reference in New Issue
Block a user