add some styling on tables view

This commit is contained in:
2012-09-11 10:34:54 +02:00
parent 7f8a8e9e26
commit 17b3494033
8 changed files with 79 additions and 37 deletions
@@ -157,3 +157,11 @@ root.Qsupplier=
row.append($('<td></td>').text(order_txts.join(', ')))
row.append($('<td class="currency"></td>').html(currency(order.total_amount)))
foot.append('<tr><td></td><td class="currency"><strong>'+currency(res.total_amount)+'</strong></td></tr>')
update_section_tables_view: (section_id)->
$.get(data_host + '/supplier/sections/'+section_id+'/tables_view.json', (res)->
for table in res.tables
to = $('#section-table-'+table._id)
if table.occupied then to.addClass('occupied') else to.removeClass('occupied')
if table.needs_help then to.addClass('needs_help') else to.removeClass('needs_help')
if table.needs_payment then to.addClass('needs_payment') else to.removeClass('needs_payment')
)