table numbering

This commit is contained in:
2012-08-30 15:36:14 +02:00
parent 52b8db73fa
commit 6696992320
6 changed files with 16 additions and 5 deletions
+8 -3
View File
@@ -6,9 +6,11 @@ window.Quser=
return
window.active_list = res
callback.call() if callback
Quser.handle_active_list_default_actions()
Quser.handle_active_list_default_actions(res)
)
handle_active_list_default_actions: ->
handle_active_list_default_actions: (response)->
if typeof(response) == 'object' && response.table_number
$('.table-number').text(response.table_number)
Quser.list_needs_payment_default_action()
Quser.list_needs_help_default_action()
list_needs_help_default_action: ->
@@ -37,7 +39,7 @@ window.Quser=
unless res.list_active
window.location = '/user/list_history/'+res._id + '?list_closed=true'
return
Quser.handle_active_list_default_actions()
Quser.handle_active_list_default_actions(res)
body = $('#active-list-table tbody')
foot = $('#active-list-table tfoot')
body.find('tr').remove()
@@ -97,6 +99,9 @@ window.Quser=
populate_products_table: (src, include_order_buttons)->
$.get(src, (res) ->
body = $('#products-table tbody')
if res.table_number
$('.table-number').text(res.table_number)
delete(res['table_number'])
for category, products of res
body.append('<tr><td colspan="4"><h4>'+category+'<h4></td></tr>')
for product in products
@@ -17,3 +17,6 @@ body
margin-bottom: 0
.order-count-cell
white-space: nowrap
.page-header
.table-number
float: right