codecombat/app/views/editor/thang/home.coffee

24 lines
705 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
SearchView = require 'views/kinds/SearchView'
module.exports = class ThangTypeHomeView extends SearchView
2014-01-06 15:37:35 -05:00
id: 'thang-type-home-view'
2014-01-03 13:32:13 -05:00
modelLabel: 'Thang Type'
model: require 'models/ThangType'
modelURL: '/db/thang.type'
tableTemplate: require 'templates/editor/thang/table'
getRenderData: ->
context = super()
context.currentEditor = 'editor.thang_title'
context.currentNew = 'editor.new_thang_title'
context.currentNewSignup = 'editor.new_thang_title_login'
context.currentSearch = 'editor.thang_search_title'
@$el.i18n()
context
2014-01-03 13:32:13 -05:00
2014-01-06 18:36:35 -05:00
onSearchChange: =>
super()
@$el.find("img").error(-> $(this).hide())
# TODO: do the new thing on click, not just enter