ember2 progress deprication smashing

This commit is contained in:
2015-08-26 19:56:44 +02:00
parent 39a21ec705
commit bb22dffef2
48 changed files with 139 additions and 146 deletions
@@ -1,7 +1,8 @@
Ember.Handlebars.helper 't', (path, params..., options)->
toptions = options.hash
if params.length and typeof(params[0].serialize) is 'function'
$.extend toptions, params[0].serialize()
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()
text = t(path, toptions)
tag = if options.hash.bare then text else "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(toptions)}'>#{text}</span>"
tag = if options.bare then text else "<span data-t='#{path}' class='translation' data-t-attributes='#{JSON.stringify(toptions)}'>#{text}</span>"
tag.htmlSafe()