more tweaks to selection javascript but still has select all bug
This commit is contained in:
		
							parent
							
								
									3dd7468365
								
							
						
					
					
						commit
						4435d957fc
					
				
					 1 changed files with 1 additions and 10 deletions
				
			
		|  | @ -62,10 +62,6 @@ | |||
|                 var options = $.extend({}, $.fn.actions.defaults, opts); | ||||
|                 var actionCheckboxes = $(this); | ||||
|                 checker = function(checked) { | ||||
|                     if (checked) { | ||||
|                     } else { | ||||
|                         reset(); | ||||
|                     } | ||||
|                     $(actionCheckboxes).attr("checked", checked) | ||||
|                         .parent().parent().toggleClass(options.selectedClass, checked); | ||||
|                 } | ||||
|  | @ -81,17 +77,12 @@ | |||
|                         return value; | ||||
|                     }); | ||||
|                 } | ||||
|                 reset = function() { | ||||
|                     $(options.counterContainer).show(); | ||||
|                 } | ||||
|                 // Show counter by default | ||||
|                 $(options.counterContainer).show(); | ||||
|                 // Check state of checkboxes and reinit state if needed | ||||
|                 $(this).filter(":checked").each(function(i) { | ||||
|                     $(this).parent().parent().toggleClass(options.selectedClass); | ||||
|                     updateCounter(); | ||||
|                 }); | ||||
|                 $(options.allToggle).show().click(function() { | ||||
|                 $(options.allToggle).click(function() { | ||||
|                     checker($(this).attr("checked")); | ||||
|                     updateCounter(); | ||||
|                 }); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 James Tauber
						James Tauber