Modal refactor

This commit is contained in:
2014-11-21 18:06:20 +01:00
parent a73ceb0df2
commit cc081d373c
36 changed files with 187 additions and 136 deletions
@@ -11,6 +11,9 @@
helpers: <%= I18n.t('helpers', locale: :nl).to_json %>
pagination: <%= I18n.t('views.pagination', locale: :nl).to_json %>
errors: <%= I18n.t('errors', locale: :nl).to_json %>
@ttry = (path, vars={})->
@t(path, $.extend(vars, emptyWhenNotFound: true))
@t = (path, vars={}) ->
#result = undefined
#m = undefined
@@ -24,6 +27,7 @@
result = result[part] for part in parts
catch err
result = parts[parts.length - 1].capitalize()
result = if vars.emptyWhenNotFound then "" else parts[parts.length - 1].capitalize()
return "" if result is ""
return parts[parts.length - 1].capitalize() unless result