switch to JSONAPI for suppliers

This commit is contained in:
2015-09-09 09:12:30 +02:00
parent 9c1945252d
commit 5cdbe57dec
10 changed files with 58 additions and 11 deletions
@@ -1,8 +1,8 @@
App.THelper = Ember.Helper.helper (params, options)->
path = params[0]
toptions = options
if params.length > 1 and typeof(params[1].serialize) is 'function'
$.extend toptions, params[1].serialize()
if params.length > 1 and typeof(params[1].toJSON) is 'function'
$.extend toptions, params[1].toJSON()
text = t(path, toptions)
tag = if options.bare then text else "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(toptions)}'>#{text}</span>"
tag.htmlSafe()