Remove some unused code for ordering worksheets
This commit is contained in:
		
							parent
							
								
									6ef5677dc5
								
							
						
					
					
						commit
						5e879a2d92
					
				
					 3 changed files with 1 additions and 65 deletions
				
			
		|  | @ -11,7 +11,7 @@ | |||
|     $(function() { | ||||
|         % if master.has_worksheet: | ||||
|             $('.load-worksheet').click(function() { | ||||
|                 $(this).button('disable').button('option', 'label', "Working, please wait..."); | ||||
|                 disable_button(this); | ||||
|                 location.href = '${url('{}.worksheet'.format(route_prefix), uuid=batch.uuid)}'; | ||||
|             }); | ||||
|         % endif | ||||
|  |  | |||
|  | @ -1,27 +1,6 @@ | |||
| ## -*- coding: utf-8; -*- | ||||
| <%inherit file="/batch/view.mako" /> | ||||
| 
 | ||||
| <%def name="extra_javascript()"> | ||||
|   ${parent.extra_javascript()} | ||||
|   <script type="text/javascript"> | ||||
|     $(function() { | ||||
| 
 | ||||
|         $('.load-worksheet').click(function() { | ||||
|             % if vendor_cost_count is not Undefined and vendor_cost_threshold is not Undefined and vendor_cost_count > vendor_cost_threshold: | ||||
|                 if (! confirm("This vendor has ${'{:,d}'.format(vendor_cost_count)} cost records.\n\n" + | ||||
|                               "It is not recommended to use Order Form mode for such a large catalog.\n\n" + | ||||
|                               "Are you sure you wish to do it anyway?")) { | ||||
|                     return; | ||||
|                 } | ||||
|             % endif | ||||
|             $(this).button('disable').button('option', 'label', "Working, please wait..."); | ||||
|             location.href = '${url('ordering.worksheet', uuid=batch.uuid)}'; | ||||
|         }); | ||||
| 
 | ||||
|     }); | ||||
|   </script> | ||||
| </%def> | ||||
| 
 | ||||
| <%def name="extra_styles()"> | ||||
|   ${parent.extra_styles()} | ||||
|   ${h.stylesheet_link(request.static_url('tailbone:static/css/purchases.css'))} | ||||
|  |  | |||
|  | @ -1,43 +0,0 @@ | |||
| ## -*- coding: utf-8; -*- | ||||
| <%inherit file="/batch/view.mako" /> | ||||
| 
 | ||||
| <%def name="extra_javascript()"> | ||||
|   ${parent.extra_javascript()} | ||||
|   <script type="text/javascript"> | ||||
|     $(function() { | ||||
| 
 | ||||
|         $('#order-form').click(function() { | ||||
|             % if vendor_cost_count > vendor_cost_threshold: | ||||
|                 if (! confirm("This vendor has ${'{:,d}'.format(vendor_cost_count)} cost records.\n\n" + | ||||
|                               "It is not recommended to use Order Form mode for such a large catalog.\n\n" + | ||||
|                               "Are you sure you wish to do it anyway?")) { | ||||
|                     return; | ||||
|                 } | ||||
|             % endif | ||||
|             $(this).button('disable').button('option', 'label', "Working, please wait..."); | ||||
|             location.href = '${url('purchases.batch.order_form', uuid=batch.uuid)}'; | ||||
|         }); | ||||
| 
 | ||||
|         $('#receive-form').click(function() { | ||||
|             $(this).button('disable').button('option', 'label', "Working, please wait..."); | ||||
|             location.href = '${url('purchases.batch.receiving_form', uuid=batch.uuid)}'; | ||||
|         }); | ||||
| 
 | ||||
|     }); | ||||
|   </script> | ||||
| </%def> | ||||
| 
 | ||||
| <%def name="extra_styles()"> | ||||
|   ${parent.extra_styles()} | ||||
|   ${h.stylesheet_link(request.static_url('tailbone:static/css/purchases.css'))} | ||||
| </%def> | ||||
| 
 | ||||
| <%def name="leading_buttons()"> | ||||
|   % if batch.mode == enum.PURCHASE_BATCH_MODE_ORDERING and not batch.complete and not batch.executed and request.has_perm('purchases.batch.order_form'): | ||||
|       <button type="button" id="order-form">Ordering Form</button> | ||||
|   % elif batch.mode == enum.PURCHASE_BATCH_MODE_RECEIVING and not batch.complete and not batch.executed and request.has_perm('purchases.batch.receiving_form'): | ||||
|       <button type="button" id="receive-form">Receiving Form</button> | ||||
|   % endif | ||||
| </%def> | ||||
| 
 | ||||
| ${parent.body()} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar