2014-11-28 20:49:41 -05:00
|
|
|
RootView = require 'views/core/RootView'
|
2014-07-17 20:16:32 -04:00
|
|
|
template = require 'templates/community'
|
|
|
|
|
|
|
|
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 ->
|
|
|
|
characterClass = $(@).attr('href').split('#')[1]
|
|
|
|
title = $.i18n.t("classes.#{characterClass}_title")
|
|
|
|
titleDescription = $.i18n.t("classes.#{characterClass}_title_description")
|
|
|
|
if characterClass is 'artisan'
|
|
|
|
summary = $.i18n.t("contribute.#{characterClass}_summary_pref") + ' Mondo Bizarro' + $.i18n.t("contribute.#{characterClass}_summary_suf")
|
|
|
|
else if characterClass is 'scribe'
|
|
|
|
summary = $.i18n.t("contribute.#{characterClass}_summary_pref") + 'Mozilla Developer Network' + $.i18n.t("contribute.#{characterClass}_summary_suf")
|
|
|
|
else
|
|
|
|
summary = $.i18n.t("contribute.#{characterClass}_summary")
|
|
|
|
explanation = "<h4>#{title} #{titleDescription}</h4>#{summary}"
|
2014-08-15 12:43:39 -04:00
|
|
|
$(@).find('img').popover(placement: 'bottom', trigger: 'hover', container: 'body', content: explanation, html: true)
|
|
|
|
|
|
|
|
@$el.find('.logo-row img').each ->
|
|
|
|
$(@).popover(placement: 'bottom', trigger: 'hover', container: 'body')
|