end of day commit

This commit is contained in:
2013-01-10 01:00:59 +01:00
parent b85bbf1aee
commit 87046c872c
23 changed files with 642 additions and 28 deletions
@@ -98,7 +98,7 @@ root.Qsupplier=
)
load_active_lists: () ->
$.get('/supplier/active_lists.json?section_id='+($('#current_section_selector').val() || ''), (res) =>
$.get('/supplier/active_lists.json?section_id='+($('#section_selector').val() || ''), (res) =>
body = $('#active-lists-table tbody')
body.find('tr').remove()
foot = $('#active-lists-table tfoot')
@@ -113,13 +113,11 @@ root.Qsupplier=
)
load_active_orders: () ->
$.get('/supplier/active_orders.json?section_id='+($('#current_section_selector').val() || ''), (res) =>
$.get('/supplier/active_orders.json?section_id='+($('#section_selector').val() || ''), (res) =>
body = $('#active-orders-table tbody')
body.html('')
foot = $('#active-orders-table tfoot')
if(!res.orders && !res.orders.length)
alert('No orders in list')
return
return unless res.orders
for order in res.orders
ord = new Order(order)
body.append @mustache('#active-order-template', ord)