Require explicit opt-in for "clicking grid row checks box" feature
sometimes it makes sense *not* to enable that, in which case disabled probably should be the default
This commit is contained in:
		
							parent
							
								
									a881b310bc
								
							
						
					
					
						commit
						3cf4c0f8e4
					
				
					 3 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -73,6 +73,10 @@ class MasterView(View):
 | 
			
		|||
    pageable = True
 | 
			
		||||
    checkboxes = False
 | 
			
		||||
 | 
			
		||||
    # set to True to allow user to click "anywhere" in a row in order
 | 
			
		||||
    # to toggle its checkbox
 | 
			
		||||
    clicking_row_checks_box = False
 | 
			
		||||
 | 
			
		||||
    # set to True in order to encode search values as utf-8
 | 
			
		||||
    use_byte_string_filters = False
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -399,6 +403,7 @@ class MasterView(View):
 | 
			
		|||
            'url': lambda obj: self.get_action_url('view', obj),
 | 
			
		||||
            'checkboxes': checkboxes,
 | 
			
		||||
            'checked': self.checked,
 | 
			
		||||
            'clicking_row_checks_box': self.clicking_row_checks_box,
 | 
			
		||||
            'assume_local_times': self.has_local_times,
 | 
			
		||||
        }
 | 
			
		||||
        if 'main_actions' not in kwargs and 'more_actions' not in kwargs:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue