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