Add new BatchMasterView for new-style batches.
				
					
				
			This commit is contained in:
		
							parent
							
								
									7338560fc3
								
							
						
					
					
						commit
						62221a1a25
					
				
					 14 changed files with 1112 additions and 93 deletions
				
			
		|  | @ -79,7 +79,7 @@ class Grid(object): | |||
| 
 | ||||
|         self.width = width | ||||
|         self.checkboxes = checkboxes | ||||
|         self.row_attrs = row_attrs | ||||
|         self.row_attrs = row_attrs or {} | ||||
|         self.cell_attrs = cell_attrs | ||||
| 
 | ||||
|     def get_default_filters(self): | ||||
|  | @ -160,10 +160,10 @@ class Grid(object): | |||
|         instance attributes. | ||||
|         """ | ||||
|         # Initial settings come from class defaults. | ||||
|         settings = { | ||||
|             'sortkey':  self.default_sortkey, | ||||
|             'sortdir':  self.default_sortdir, | ||||
|         } | ||||
|         settings = {} | ||||
|         if self.sortable: | ||||
|             settings['sortkey'] = self.default_sortkey | ||||
|             settings['sortdir'] = self.default_sortdir | ||||
|         if self.pageable: | ||||
|             settings['pagesize'] = self.default_pagesize | ||||
|             settings['page'] = self.default_page | ||||
|  | @ -514,6 +514,7 @@ class Grid(object): | |||
|         Render the complete grid, including filters. | ||||
|         """ | ||||
|         kwargs['grid'] = self | ||||
|         kwargs.setdefault('allow_save_defaults', True) | ||||
|         return render(template, kwargs) | ||||
| 
 | ||||
|     def render_grid(self, template='/newgrids/grid.mako', **kwargs): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar