Exclude JS for refreshing batch unless it's relevant
This commit is contained in:
		
							parent
							
								
									50d6f1f95a
								
							
						
					
					
						commit
						aa4051a7cd
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
					@ -16,12 +16,14 @@
 | 
				
			||||||
                location.href = '${url('{}.worksheet'.format(route_prefix), uuid=batch.uuid)}';
 | 
					                location.href = '${url('{}.worksheet'.format(route_prefix), uuid=batch.uuid)}';
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        % endif
 | 
					        % endif
 | 
				
			||||||
 | 
					        % if master.batch_refreshable(batch) and request.has_perm('{}.refresh'.format(permission_prefix)):
 | 
				
			||||||
            $('#refresh-data').click(function() {
 | 
					            $('#refresh-data').click(function() {
 | 
				
			||||||
                $(this)
 | 
					                $(this)
 | 
				
			||||||
                    .button('option', 'disabled', true)
 | 
					                    .button('option', 'disabled', true)
 | 
				
			||||||
                    .button('option', 'label', "Working, please wait...");
 | 
					                    .button('option', 'label', "Working, please wait...");
 | 
				
			||||||
                location.href = '${url('{}.refresh'.format(route_prefix), uuid=batch.uuid)}';
 | 
					                location.href = '${url('{}.refresh'.format(route_prefix), uuid=batch.uuid)}';
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					        % endif
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  </script>
 | 
					  </script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue