End of day commit

This commit is contained in:
2013-10-16 18:22:29 +02:00
parent 2f41560591
commit b5a84a2858
26 changed files with 46239 additions and 58 deletions
@@ -13,20 +13,20 @@ root.Qsupplier=
$('.section-table-list-'+order.list_id()).addClass('active_order')
else if(e.event == 'list_needs_help')
if Qsupplier.App and list = Qsupplier.App.List.findCached(e.data.id)
list.set('needs_help', true)
list.markNeedsHelp()
# old stuff
$('#list-needs-help-indicator-'+e.data.id).removeClass('hide')
$('#list-is-helped-button-'+e.data.id).removeClass('hide')
$('.section-table-list-'+e.data.id).addClass('needs_help')
else if(e.event == 'list_needs_payment')
if Qsupplier.App and list = Qsupplier.App.List.findCached(e.data.id)
list.set('needs_payment', true)
list.markNeedsPayment()
# old stuff
$('#list-needs-payment-indicator-'+e.data.id).removeClass('hide')
$('.section-table-list-'+e.data.id).addClass('needs_payment')
else if(e.event == 'list_is_paid')
if list = Qsupplier.App.List.findCached(e.data.id)
list.set('needs_payment', false)
list.markIsPaid()
else if e.event == 'list_update'
Qsupplier.App.List.updateOrAdd(e.data.list) if Qsupplier.App
# old stuff
@@ -43,16 +43,17 @@ root.Qsupplier=
table.addClass('active_order') if list.has_active_orders()
else if e.event == 'list_closed'
if Qsupplier.App and list = Qsupplier.App.List.findCached(e.data.id)
list.close()
list.markClosed()
$('.list-row-'+e.data.id).remove()
$('.of-list-'+e.data.id).remove()
table_list_class = 'section-table-list-'+e.data.id
$('.'+table_list_class).removeClass('occupied needs_help needs_payment active_order').removeClass(table_list_class)
else if e.event == 'order_closed'
order.close() if Qsupplier.App and order = Qsupplier.App.Order.findCached(e.data.id)
order.markClosed() if Qsupplier.App and order = Qsupplier.App.Order.findCached(e.data.id)
else if e.event == 'list_helped'
if Qsupplier.App and list = Qsupplier.App.List.findCached(e.data.id)
list.set('needs_help', false)
list.markHelped()
list_id = e.data.id
$('#list-needs-help-indicator-'+list_id).addClass('hide')
$('#list-is-helped-button-'+list_id).addClass('hide')
@@ -64,6 +65,9 @@ root.Qsupplier=
$('.order-row-'+e.data.id).remove()
$('.section-table-list-'+e.data.list_id).removeClass('active_order')
else if e.event == 'list_changed_table'
Qsupplier.App && Qsupplier.App.List.updateOrAdd(e.data.list)
# old stuff
list = new List(e.data.list)
list_row = $('.list-row-'+list.id())
list_row.find('.table_number').text(list.table_number()).addClass('changed')