fixes for communication moving tables and joining them

This commit is contained in:
2012-12-11 14:48:49 +01:00
parent 7a048125d1
commit 9f09d8f10b
3 changed files with 9 additions and 9 deletions
+3 -2
View File
@@ -358,7 +358,7 @@ class Quser
else
## Offer to move table
Qwaiter.confirm(
ok: ->
ok: =>
$.post(data_host + '/user/move_table', $.extend({table_id: table.table_id}, @authentication_object), (res2)->
if res2.occupied
redirect_to 'user_root', {message: 'move_table.cannot_move_to_occupied_tabe'}
@@ -393,7 +393,8 @@ class Quser
cont.html('')
cont.append $($('<img />').attr('src', "#{$asset_path}spinner.gif"))
cont.append $($('<p>').html(t('join_request.waiting_for_confirmation')))
$.post(data_host + '/user/join_occupied_table', $.extend({table_id: table_id}, @authentication_object))
@ensure_token =>
$.post(data_host + '/user/join_occupied_table', $.extend({table_id: table_id}, @authentication_object))
#setInterval('Quser.check_if_can_join_occupied_table("'+table_id+'")', 7500)
add_product: (product_id, count) ->
count ||= 1