This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #1204 from muffinresearch/move-checkboxes-only-if-…

…placeholder-921593

Don't move checkbox if no placeholder (bug 921593)
  • Loading branch information...
muffinresearch committed Sep 30, 2013
2 parents 10cdb2d + 7f6ef5c commit 18f7b9feae9efa0852836b1cb962468efaab7fd5
Showing with 12 additions and 7 deletions.
  1. +12 −7 media/js/devreg/payments.js
@@ -192,15 +192,20 @@ define('payments', [], function() {
// Otherwise we need to create a new tableRow and move it into position.
var $chkbox = $regions.find('input:checkbox[value=' + regionId + ']');
var $row = $('#paid-regions tr[data-region=' + regionId + ']');
if ($row.find('td').length) {
$row.find('.lp').text(localPrice);
$row.find('.lm').text(localMethod);
if ($row.length) {
if ($row.find('td').length) {
$row.find('.lp').text(localPrice);
$row.find('.lm').text(localMethod);
} else {
var $tr = createTableRow($chkbox.closest('label'), regionId, localPrice, localMethod);
moveQueue.push([$chkbox.closest('label'), $tr.find('.cb')]);
$chkbox.closest('li').hide(500);
}
seen.push($chkbox[0]);
} else {
var $tr = createTableRow($chkbox.closest('label'), regionId, localPrice, localMethod);
moveQueue.push([$chkbox.closest('label'), $tr.find('.cb')]);
$chkbox.closest('li').hide(500);
console.log('No row found with regionId "' + regionId + '" (noop)');
}
seen.push($chkbox[0]);
}
for (var k=0, l=moveQueue.length; k<l; k++) {

0 comments on commit 18f7b9f

Please sign in to comment.