table numbering
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user