travis-web/assets/scripts/app/views/flash.coffee
Piotr Sarnacki 66be22af68 Fix actions on views
Almost all actions on views were not properly handled, because they were still
methods directly on a view object rather than in `actions` property. This commit
fixes it.
2014-12-29 18:17:55 +01:00

18 lines
374 B
CoffeeScript

@Travis.reopen
FlashView: Travis.View.extend
classNames: ['flash']
tagName: 'ul'
templateName: 'layouts/flash'
FlashItemView: Travis.View.extend
tagName: 'li'
classNameBindings: ['type']
type: (->
@get('flash.type') || 'broadcast'
).property('flash.type')
actions:
close: ->
@get('controller').close(@get('flash'))