bug #3057479 wrong number of rows to insert

This commit is contained in:
Marc Delisle
2010-09-04 08:22:32 -04:00
parent 582fe81aa3
commit 30c73aef03
2 changed files with 7 additions and 7 deletions

View File

@@ -358,9 +358,9 @@ $(document).ready(function() {
//Insert/Clone the ignore checkboxes
if(curr_rows == 1 ) {
$('<input id="insert_ignore_check_1" type="checkbox" name="insert_ignore_check_1" checked="checked" />')
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked="checked" />')
.insertBefore(".insertRowTable:last")
.after('<label for="insert_ignore_check_1">' + PMA_messages['strIgnore'] + '</label>');
.after('<label for="insert_ignore_1">' + PMA_messages['strIgnore'] + '</label>');
}
else {
@@ -379,7 +379,7 @@ $(document).ready(function() {
$(last_checkbox)
.clone()
.attr({'id':new_name, 'name': new_name})
.add('label[for^=insert_ignore_check]:last')
.add('label[for^=insert_ignore]:last')
.clone()
.attr('for', new_name)
.before('<br />')
@@ -390,7 +390,7 @@ $(document).ready(function() {
}
else if( curr_rows > target_rows) {
while(curr_rows > target_rows) {
$("input[id^=insert_ignore_check]:last")
$("input[id^=insert_ignore]:last")
.nextUntil("fieldset")
.andSelf()
.remove();

View File

@@ -292,8 +292,8 @@ foreach ($rows as $row_id => $vrow) {
$vresult = (isset($result) && is_array($result) && isset($result[$row_id]) ? $result[$row_id] : $result);
if ($insert_mode && $row_id > 0) {
echo '<input type="checkbox" checked="checked" name="insert_ignore_' . $row_id . '" id="insert_ignore_check_' . $row_id . '" />';
echo '<label for="insert_ignore_check_' . $row_id . '">' . __('Ignore') . '</label><br />' . "\n";
echo '<input type="checkbox" checked="checked" name="insert_ignore_' . $row_id . '" id="insert_ignore_' . $row_id . '" />';
echo '<label for="insert_ignore_' . $row_id . '">' . __('Ignore') . '</label><br />' . "\n";
}
?>
<table class="insertRowTable">