2014-11-28 17:49:41 -08:00
|
|
|
RootView = require 'views/core/RootView'
|
2014-11-29 12:46:04 -08:00
|
|
|
template = require 'templates/community-view'
|
2014-07-17 17:16:32 -07:00
|
|
|
|
|
|
|
module.exports = class CommunityView extends RootView
|
|
|
|
id: 'community-view'
|
|
|
|
template: template
|
2014-08-13 20:45:33 -07:00
|
|
|
|
|
|
|
afterRender: ->
|
|
|
|
super()
|
|
|
|
@$el.find('.contribute-classes a').each ->
|
2014-12-21 21:37:59 -08:00
|
|
|
characterClass = $(@).attr('href').split('/')[2]
|
2014-08-13 20:45:33 -07:00
|
|
|
title = $.i18n.t("classes.#{characterClass}_title")
|
|
|
|
titleDescription = $.i18n.t("classes.#{characterClass}_title_description")
|
2014-12-20 09:28:56 +00:00
|
|
|
summary = $.i18n.t("classes.#{characterClass}_summary")
|
2014-08-13 20:45:33 -07:00
|
|
|
explanation = "<h4>#{title} #{titleDescription}</h4>#{summary}"
|
2015-04-07 13:57:54 -07:00
|
|
|
$(@).find('img').popover(placement: 'top', trigger: 'hover', container: 'body', content: explanation, html: true)
|
2014-08-15 09:43:39 -07:00
|
|
|
|
|
|
|
@$el.find('.logo-row img').each ->
|
2015-04-07 13:57:54 -07:00
|
|
|
$(@).popover(placement: 'top', trigger: 'hover', container: 'body')
|