table info buttons fix

This commit is contained in:
2012-12-05 13:42:45 +01:00
parent 5ba5762d9f
commit c438ebb2db
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ class Quser
@populate_products_table('/user/list_products_for_table.json?'+authentication_string+'&table_id='+table_id)
populate_products_table: (src)->
$.getJSON(data_host + src, (res) =>
include_order_buttons = res.my_list
include_order_buttons = res.my_list || !res.table_occupied
$('.table-number').text(res.table_number) if res.table_number
$('.supplier-name').text(res.supplier_name) if res.supplier_name
@@ -1,6 +1,6 @@
@import "bootstrap"
body
padding-top: 60px !important
padding-top: 60px
@import "bootstrap-responsive"
// Set the correct sprite paths
+1 -1
View File
@@ -29,7 +29,7 @@ class ProductCategory
other = product_categories.find(&:other?) || (product_categories << self.other).last # Container for non categorized products
# Initialize base return object
h = {table_number: table.number, supplier_name: table.supplier.name, my_list: list.try(:user_ids).to_a.include?(user.id)}
h = {table_number: table.number, table_occupied: table.occupied?, supplier_name: table.supplier.name, my_list: list.try(:user_ids).to_a.include?(user.id)}
(products - product_categories.map(&:products).flatten).each{ |p| other.add_product(p) }