User foundation setup

This commit is contained in:
2014-03-26 13:17:34 +01:00
parent 6c2427e082
commit 4e75c72097
87 changed files with 861 additions and 120 deletions
@@ -5,8 +5,8 @@ App.TableController = Ember.ObjectController.extend
actions:
clearProductOrders: ->
@get('product_orders').toArray().forEach (product_order)->
product_order.unloadRecord()
# toArray is needed because without is the iterator is not working properly
@get('product_orders').toArray().invoke 'unloadRecord'
orderProducts: ->
orders = @get('product_orders').toArray()
data = orders.map( (order)->order.serialize() )
@@ -12,11 +12,11 @@ h4
= product_order.quantity
| x
= product_order.product.name
span.currency=currency product_order.product.price
span.currency=currency product_order.total
else
li No products
li= t 'product_orders.no_orders'
li.total
| Total
= t 'product_orders.total'
span.currency=currency orderTotal
if product_orders
a.tiny.button.right{action orderProducts} href="#" = t 'product_orders.order_button'
@@ -8,6 +8,7 @@
#= require js-routes
#= require_directory .
#= require_self
@Qstorage = localStorage
$.extend($translations.en, <%= I18n.t('waiter', locale: :en).to_json %>);
$.extend($translations.nl, <%= I18n.t('waiter', locale: :nl).to_json %>);