mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Removed level-specific achievements from achievements list. Fixed bug with return type documentation not showing up. Reduced initial first-level arrow delay.
This commit is contained in:
parent
cc1d247014
commit
a65dabad04
4 changed files with 16 additions and 13 deletions
app
templates/user
views
|
@ -36,15 +36,17 @@ block append content
|
|||
th XP
|
||||
each earnedAchievement in earnedAchievements.models
|
||||
- var achievement = earnedAchievement.get('achievement');
|
||||
tr
|
||||
td= achievement.i18nName()
|
||||
td= achievement.i18nDescription()
|
||||
td= moment().format("MMMM Do YYYY", earnedAchievement.get('changed'))
|
||||
if achievement.isRepeatable()
|
||||
td= earnedAchievement.get('achievedAmount')
|
||||
else
|
||||
td
|
||||
td= earnedAchievement.get('earnedPoints')
|
||||
if achievement.get('category')
|
||||
// No level-specific achievements in here.
|
||||
tr
|
||||
td= achievement.i18nName()
|
||||
td= achievement.i18nDescription()
|
||||
td= moment().format("MMMM Do YYYY", earnedAchievement.get('changed'))
|
||||
if achievement.isRepeatable()
|
||||
td= earnedAchievement.get('achievedAmount')
|
||||
else
|
||||
td
|
||||
td= earnedAchievement.get('earnedPoints')
|
||||
else
|
||||
.panel#no-achievements
|
||||
.panel-body(data-i18n="user.no_achievements") No achievements earned yet.
|
||||
|
|
|
@ -97,7 +97,7 @@ module.exports = class WorldMapView extends RootView
|
|||
@$el.find('.level').tooltip()
|
||||
@$el.addClass _.string.slugify @terrain
|
||||
@updateVolume()
|
||||
@highlightElement '.level.next', delay: 8000, duration: 20000, rotation: 0, sides: ['top']
|
||||
@highlightElement '.level.next', delay: 2000, duration: 60000, rotation: 0, sides: ['top']
|
||||
|
||||
onSessionsLoaded: (e) ->
|
||||
for session in @sessions.models
|
||||
|
|
|
@ -83,9 +83,11 @@ module.exports = class DocFormatter
|
|||
@doc.title = if @options.shortenize then @doc.shorterName else @doc.shortName
|
||||
|
||||
# Grab the language-specific documentation for some sub-properties, if we have it.
|
||||
toTranslate = [{obj: @doc, prop: 'description'}, {obj: @doc, prop: 'example'}, {obj: @doc, prop: 'returns'}]
|
||||
toTranslate = [{obj: @doc, prop: 'description'}, {obj: @doc, prop: 'example'}]
|
||||
for arg in (@doc.args ? [])
|
||||
toTranslate.push {obj: arg, prop: 'example'}, {obj: arg, prop: 'description'}
|
||||
if @doc.returns
|
||||
toTranslate.push {obj: @doc.returns, prop: 'example'}, {obj: @doc.returns, prop: 'description'}
|
||||
for {obj, prop} in toTranslate
|
||||
if val = obj[prop]?[@options.language]
|
||||
obj[prop] = val
|
||||
|
|
|
@ -48,9 +48,8 @@ module.exports = class AchievementsView extends UserView
|
|||
# After user is loaded
|
||||
if @user and not @user.isAnonymous()
|
||||
context.earnedAchievements = @earnedAchievements
|
||||
context.achievements = @achievements
|
||||
context.achievementsByCategory = {}
|
||||
for achievement in @achievements.models
|
||||
for achievement in @achievements.models when achievement.get('category')
|
||||
context.achievementsByCategory[achievement.get('category')] ?= []
|
||||
context.achievementsByCategory[achievement.get('category')].push achievement
|
||||
context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue