dependency update

This commit is contained in:
2016-06-01 14:18:10 +02:00
parent e69b783eb0
commit 36178526e3
20 changed files with 258 additions and 243 deletions
@@ -1,4 +1,4 @@
App.CurrencyHelper = Ember.Helper.helper (params, options)->
amount = params[0]
amount = 0.0 if isNaN(amount) || amount== '' || amount == null
new Handlebars.SafeString('€ ' + parseFloat(amount).toFixed(2))
"€ #{parseFloat(amount).toFixed(2)}".htmlSafe()
@@ -5,4 +5,4 @@ App.ImageTagHelper = Ember.Helper.helper (params, options)->
extra_attributes = ''
extra_attributes += " width=\"#{options.width}\"" if options.width
extra_attributes += " height=\"#{options.height}\"" if options.height
new Handlebars.SafeString "<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" #{extra_attributes}>"
"<img src=\"#{image_path}\" alt=\"#{alt}\" title=\"#{alt}\" #{extra_attributes}>".htmlSafe()
@@ -1,4 +1,4 @@
App.StateHelper = Ember.Helper.helper (params, options)->
[subject, state] = params
path = "state.#{subject}.#{state}"
new Handlebars.SafeString("<span data-t=\"#{path}\">#{t(path)}</span>")
"<span data-t=\"#{path}\">#{t(path)}</span>".htmlSafe()
@@ -7,4 +7,4 @@ App.TimeHelper = Ember.Helper.helper (params, options)->
else
format_string = ''
tag = if options.bare then iso else $("<span data-time=\"#{iso}\" #{format_string}></span>").text(moment(iso).format(options.format || 'dd D MMM hh:mm')).get(0).outerHTML
new Handlebars.SafeString tag
tag.htmlSafe()
@@ -1,2 +1,2 @@
App.VersionHelper = Ember.Helper.helper (params, options)->
new Handlebars.SafeString $app_version
String($app_version).htmlSafe()
@@ -8,7 +8,7 @@ App.BooleanButtonComponent = Ember.Component.extend
text: Ember.computed 'text_path', ->
return unless text_path = @get('text_path')
new Ember.Handlebars.SafeString(tspan(text_path))
tspan(text_path).htmlSafe()
active: Ember.computed 'value', ->
if @reverse then !@get('value') else !!@get('value')
@@ -21,14 +21,13 @@ App.MenuTimePreviewComponent = Ember.Component.extend
@set 'preview_full_day', true
@set 'active', false
@set 'collapsed', true
daysContent: (->
daysContent: (->
$days.map( (d) -> Ember.Object.create( name: d, text: t("date.day_name.#{d}")) )
).property()
preview_day_text: (->
return "" unless day = @get('preview_day.text')
#day_text = tspan("date.day_name.#{day.get('name')}")
tag = "<h4>#{day}</h4>"
new Ember.Handlebars.SafeString(tag)
"<h4>#{day}</h4>".htmlSafe()
).property('preview_day')
preview_time_text: (->
@@ -38,7 +37,7 @@ App.MenuTimePreviewComponent = Ember.Component.extend
minute = Math.floor(day_minute%60)
hour = "0#{hour}".substr(-2,2)
minute = "0#{minute}".substr(-2,2)
new Ember.Handlebars.SafeString("<span class='time-preview-active-time time'>#{hour}:#{minute}</span>")
"<span class='time-preview-active-time time'>#{hour}:#{minute}</span>".htmlSafe()
).property('preview_full_day', 'preview_minute_of_day')
hasSelection: (->
return true if @get('preview_day')
@@ -25,7 +25,7 @@ App.ProductCategory = DS.Model.extend Ember.Validations.Mixin,
result += "<span class=\"day-names\">#{active_days.map((day) -> tspan("date.day_name.#{day}")).join(", ")}</span> "
unless @get('full_day')
result += "<span class=\"time-range\">#{day_minutes_to_time @get('start_from')} - #{day_minutes_to_time @get('end_on')}</span>"
new Ember.Handlebars.SafeString result
result.htmlSafe()
validations:
name: {presence: true}
@@ -8,14 +8,14 @@
translation_params = {}
if model = @get('model')
translation_params = model.serialize() if model.serialize
return new Ember.Handlebars.SafeString(tspan(@title_path, translation_params)) if @title_path
return tspan(@title_path, translation_params).htmlSafe() if @title_path
# return translated title_path if directly set by options
return new Ember.Handlebars.SafeString(tspan(@get('modal_options.title_path'), translation_params)) if @get('modal_options.title_path')
return tspan(@get('modal_options.title_path'), translation_params).htmlSafe() if @get('modal_options.title_path')
# infer title path based on controller name App.modals.AddSectionController => add_section
underscored = `this.constructor.toString().substr(11).replace(/Controller$/, '').underscore()`
# find translated title or humanize the controller name
if convention_translation = ttry("modal.#{underscored}.title", translation_params)
new Ember.Handlebars.SafeString(tspan(@get("modal.#{underscored}.title"), translation_params))
tspan(@get("modal.#{underscored}.title"), translation_params).htmlSafe()
else
underscored.capitalize().replace(/_/, ' ')
).property('model.id')