using authentication for app

This commit is contained in:
2012-10-25 16:11:49 +02:00
parent 5479d3760b
commit 28ec047f1d
14 changed files with 429 additions and 40 deletions
+5 -5
View File
@@ -304,19 +304,19 @@ window.Quser=
else if res.supplier_closed
redirect_to 'user_root', {message: 'supplier_is_closed'}
else
#TODO Offer to move table
## Offer to move table
Qwaiter.confirm(
ok: ->
$.post(data_host + '/user/move_table', $.extend({table_id: table.table_id}, authentication_object), (res2)->
if res2.occupied
alert('Cannot move to occupied table')
redirect_to 'user_root', {message: 'move_table.cannot_move_to_occupied_tabe'}
else
redirect_to 'list_products', {message: 'moved_to_another_table'}
redirect_to 'list_products', {message: 'move_table.moved_to_another_table'}
)
cancel: ->
redirect_to 'list_products'
title: t('confirmations.move_to_another_table_title')
content: t('confirmations.move_to_another_table')
title: t('move_table.confirmation_title')
content: t('move_table.confirmation_body')
)
else
if res.occupied