Finally got working code for invertSelection. Phew.

This commit is contained in:
Matthias Mees 2014-01-04 14:56:52 +01:00
parent ab2d01ad0c
commit 0fc19d9959

View File

@ -578,10 +578,11 @@ window.log = function f(){ log.history = log.history || []; log.history.push(arg
serendipity.invertSelection = function() { serendipity.invertSelection = function() {
$('#formMultiDelete .multidelete').each(function() { $('#formMultiDelete .multidelete').each(function() {
var $box = $(this); var $box = $(this);
var boxId = $box.attr('id');
if($box.is(':checked')) { if($box.is(':checked')) {
$box.prop('checked', false); $(boxId).prop('checked', false);
} else { } else {
$box.prop('checked', true); $(boxId).prop('checked', true);
} }
$box.trigger('click'); $box.trigger('click');
}); });