Mixed commit, user facebook issues

This commit is contained in:
2014-08-11 17:54:43 +02:00
parent 28192f8e39
commit 031e2bedea
19 changed files with 95 additions and 77 deletions
@@ -1,4 +1,7 @@
Ember.Handlebars.registerBoundHelper 'image_tag', (path, params..., options={})->
alt = options.hash.alt ||= ''
Ember.Handlebars.helper 'image_tag', (path, options={})->
alt = options.hash.alt || ''
image_path = if path.substring(0,4) == 'http' then path else "/assets/#{path}"
new Handlebars.SafeString "<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" >"
extra_attributes = ''
extra_attributes += " width=\"#{options.hash.width}\"" if options.hash.width
extra_attributes += " height=\"#{options.hash.height}\"" if options.hash.height
new Handlebars.SafeString "<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" #{extra_attributes}>"