mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
22 lines
457 B
CoffeeScript
22 lines
457 B
CoffeeScript
|
CocoView = require 'views/kinds/CocoView'
|
||
|
template = require 'templates/game-menu/item-view'
|
||
|
|
||
|
module.exports = class ItemView extends CocoView
|
||
|
className: 'item-view'
|
||
|
|
||
|
template: template
|
||
|
|
||
|
initialize: (options) ->
|
||
|
super(arguments...)
|
||
|
@item = options.item
|
||
|
@includes = options.includes or {}
|
||
|
|
||
|
getRenderData: ->
|
||
|
c = super()
|
||
|
c.item = @item
|
||
|
c.includes = @includes
|
||
|
c
|
||
|
|
||
|
afterRender: ->
|
||
|
@$el.data('item-id', @item.id)
|