Improvements to new menu product category editing and adding new

This commit is contained in:
2014-11-25 13:31:40 +01:00
parent 1707f4d19f
commit a64d3de319
24 changed files with 162 additions and 86 deletions
@@ -17,10 +17,16 @@
@day_minutes_to_time = (minutes)->
return "" unless minutes
[("0" + Math.floor(minutes/60)).substr(-2,2), ("0" + Math.floor(minutes%60)).substr(-2,2)].join(":")
@ttry = (path, vars={})->
@t(path, $.extend(vars, emptyWhenNotFound: true))
# return translation in the form
# <span data-t="models.table">Tafel</span>
@tspan = (path, vars={})->
"<span data-t='#{path}'>#{t(path)}</span>"
@t = (path, vars={}) ->
#result = undefined
#m = undefined