]> wagnertech.de Git - kivitendo-erp.git/blobdiff - js/jquery.checkall.js
jquery.checkall für Mahnungen invertiert
[kivitendo-erp.git] / js / jquery.checkall.js
index cef64ef8bb9ec4097bba2e1ec4bcf65382e93d57..00798d8f3053d2a1ed54b9e3c9982c06d40f2401 100644 (file)
@@ -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'));
     });
   }
 });