X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/87e65e6c1cc64bfb2d73b6914ed2ef136861dd42..ada964d139eb652502bbdec96adf8634e49d8872:/js/jquery.checkall.js diff --git a/js/jquery.checkall.js b/js/jquery.checkall.js index cef64ef8b..00798d8f3 100644 --- a/js/jquery.checkall.js +++ b/js/jquery.checkall.js @@ -7,11 +7,11 @@ ;(function($) { $.fn.extend({ - checkall: function(target, property) { + checkall: function(target, property, inverted) { if (property == null) property = 'checked'; return $(this).click(function() { - $(target).prop(property, $(this).prop('checked')); + $(target).prop(property, inverted ? !$(this).prop('checked') : $(this).prop('checked')); }); } });