fix: sorted list delete button

v1.18.x
psychobunny 4 years ago
parent cdb794888d
commit 20e0cc5cbb

@ -64,10 +64,9 @@ define('settings/sorted-list', ['benchpress', 'jqueryui'], function (benchpress)
}; };
function setupRemoveButton($container, itemUUID) { function setupRemoveButton($container, itemUUID) {
var key = $container.attr('data-sorted-list'); var removeBtn = $container.find('[data-sorted-list-uuid="' + itemUUID + '"] [data-type="remove"]');
var removeBtn = $('[data-sorted-list="' + key + '"] [data-type="remove"]');
removeBtn.on('click', function () { removeBtn.on('click', function () {
console.log(itemUUID);
$('[data-sorted-list-uuid="' + itemUUID + '"]').remove(); $('[data-sorted-list-uuid="' + itemUUID + '"]').remove();
}); });
} }

Loading…
Cancel
Save