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
+3 -3
View File
@@ -1,13 +1,13 @@
= top_bar title: 'active_list.title' do
.pull-right
.table-number
.supplier-name
.action-buttons
= link_to content_tag(:span, t('helpers.links.place_order')), user_list_products_path, class: ['user-top-button'], id: 'place-order-on-list'
span#list-needs-payment-button.user-top-button
span
span#list-needs-help-button.user-top-button
span
.pull-right
.table-number
.supplier-name
.well
table#active-list-table.table
thead
+3 -4
View File
@@ -1,14 +1,13 @@
= top_bar title: 'show_products.title' do
.pull-right
.table-number
.supplier-name
.action-buttons
= link_to content_tag(:span, t('helpers.links.show_active_list'), list: List.model_name.human), user_active_list_path, class: ['user-top-button'], id: 'show-active-list'
span#list-needs-payment-button.user-top-button
span
span#list-needs-help-button.user-top-button
span
.pull-right
.table-number
.supplier-name
.well
table#products-table.table
tbody