Merge branch 'master' into production

This commit is contained in:
Matt Lott 2015-02-25 11:41:38 -08:00
commit 8e7183cc51
9 changed files with 49 additions and 40 deletions

View file

@ -103,6 +103,7 @@ module.exports = Lank = class Lank extends CocoClass
setSprite: (newSprite) -> setSprite: (newSprite) ->
if @sprite if @sprite
@sprite.off 'animationend', @playNextAction
@sprite.destroy?() @sprite.destroy?()
if parent = @sprite.parent if parent = @sprite.parent
parent.removeChild @sprite parent.removeChild @sprite

View file

@ -394,32 +394,32 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
# or_subscribe: "Or 3500 gems/mo if you..." # or_subscribe: "Or 3500 gems/mo if you..."
subscribe: subscribe:
# comparison_blurb: "Sharpen your skills with a CodeCombat subscription!" comparison_blurb: "Verbessere deine Fähigkeiten mit einem CodeCombat Abonnement" #"Sharpen your skills with a CodeCombat subscription!"
# feature1: "60+ basic levels across 4 worlds" feature1: "60+ Basislevel in 4 Gebieten" #"60+ basic levels across 4 worlds"
# feature2: "7 powerful <strong>new heroes</strong> with unique skills!" feature2: "7 mächtige <strong>neue Helden</strong> mit einzigartigen Fertigkeiten" #"7 powerful <strong>new heroes</strong> with unique skills!"
# feature3: "30+ bonus levels" feature3: "30+ Bonuslevel" #"30+ bonus levels"
# feature4: "<strong>3500 bonus gems</strong> every month!" feature4: "<strong>3500 Bonusedelsteine</strong> jeden Monat!" #"<strong>3500 bonus gems</strong> every month!"
# feature5: "Video tutorials" feature5: "Videoanleitungen" #"Video tutorials"
# feature6: "Premium email support" feature6: "Premium Emailsupport" #"Premium email support"
free: "Kostenlos" free: "Kostenlos"
month: "Monate" month: "Monate"
subscribe_title: "Abonnieren" subscribe_title: "Abonnieren"
unsubscribe: "Abmelden" unsubscribe: "Abmelden"
# confirm_unsubscribe: "Confirm Unsubscribe" confirm_unsubscribe: "Abmeldung bestätigen" #"Confirm Unsubscribe"
# never_mind: "Never Mind, I Still Love You" never_mind: "Keine Sorge. Ich hab dich trotzdem lieb" #"Never Mind, I Still Love You"
thank_you_months_prefix: "Danke für deine Unterstützung in den letzten" thank_you_months_prefix: "Danke für deine Unterstützung in den letzten"
thank_you_months_suffix: "Monaten." thank_you_months_suffix: "Monaten."
thank_you: "Danke das du CodeCombat unterstützt." thank_you: "Danke das du CodeCombat unterstützt."
# sorry_to_see_you_go: "Sorry to see you go! Please let us know what we could have done better." sorry_to_see_you_go: "Schade, das du gehst! Bitte teile uns mit, was wir hätten besser machen können." #"Sorry to see you go! Please let us know what we could have done better."
# unsubscribe_feedback_placeholder: "O, what have we done?" unsubscribe_feedback_placeholder: "Oh, was haben wir getan?" #"O, what have we done?"
# parent_button: "Ask your parent" parent_button: "Frag deine Eltern" #"Ask your parent"
# parent_email_description: "We'll email them so they can buy you a CodeCombat subscription." parent_email_description: "Wir werden ihnen eine Email senden, damit sie dir ein CodeCombat Abo kaufen können." #"We'll email them so they can buy you a CodeCombat subscription."
# parent_email_input_invalid: "Email address invalid." parent_email_input_invalid: "Emailadresse nicht gültig" #"Email address invalid."
# parent_email_input_label: "Parent email address" parent_email_input_label: "Emailadresse der Eltern" #"Parent email address"
# parent_email_input_placeholder: "Enter parent email" parent_email_input_placeholder: "Emailadresse der Eltern eingeben" #"Enter parent email"
# parent_email_send: "Send Email" parent_email_send: "Sende Email" #"Send Email"
# parent_email_sent: "Email sent!" parent_email_sent: "Email gesendet!" #"Email sent!"
# parent_email_title: "What's your parent's email?" parent_email_title: "Wie lautet die Emailadresse deiner Eltern?" #"What's your parent's email?"
parents: "Für Eltern" parents: "Für Eltern"
parents_title: "Dein Kind lernt zu programmieren." parents_title: "Dein Kind lernt zu programmieren."
parents_blurb1: "Mit CodeCombat, lernt dein Kind richtige Programme zu schreiben. Es fängt mit einfachen Befehlen an, und schreitet ganz unmerklich zu schwierigeren Themen fort." parents_blurb1: "Mit CodeCombat, lernt dein Kind richtige Programme zu schreiben. Es fängt mit einfachen Befehlen an, und schreitet ganz unmerklich zu schwierigeren Themen fort."
@ -427,7 +427,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
parents_blurb3: "Kein Risiko: 100% Geld zurück Garantie, und 1-Klick Abokündigung." parents_blurb3: "Kein Risiko: 100% Geld zurück Garantie, und 1-Klick Abokündigung."
stripe_description: "Monatsabo" stripe_description: "Monatsabo"
subscription_required_to_play: "Leider musst du ein Abo haben um dieses Level spielen zu können." subscription_required_to_play: "Leider musst du ein Abo haben um dieses Level spielen zu können."
# unlock_help_videos: "Subscribe to unlock all video tutorials." unlock_help_videos: "Abonniere, um alle Videoanleitungen freizuschalten." #"Subscribe to unlock all video tutorials."
choose_hero: choose_hero:
choose_hero: "Wähle deinen Helden" choose_hero: "Wähle deinen Helden"

View file

@ -780,6 +780,7 @@
level_completion: "Level Completion" level_completion: "Level Completion"
pop_i18n: "Populate I18N" pop_i18n: "Populate I18N"
tasks: "Tasks" tasks: "Tasks"
clear_storage: "Clear your local changes"
article: article:
edit_btn_preview: "Preview" edit_btn_preview: "Preview"

View file

@ -427,8 +427,7 @@ $gameControlMargin: 30px
&.sorcerer &.sorcerer
background-position: (-12 * $spriteSheetSize) 0 background-position: (-12 * $spriteSheetSize) 0
.campaign-control-button
#volume-button
position: absolute position: absolute
right: 1% right: 1%
top: 1% top: 1%
@ -439,9 +438,12 @@ $gameControlMargin: 30px
@include opacity(1.0) @include opacity(1.0)
.glyphicon .glyphicon
display: none
font-size: 32px font-size: 32px
#volume-button
.glyphicon
display: none
&.vol-up .glyphicon.glyphicon-volume-up &.vol-up .glyphicon.glyphicon-volume-up
display: inline-block display: inline-block
@ -454,20 +456,11 @@ $gameControlMargin: 30px
&.vol-down .glyphicon.glyphicon-volume-down &.vol-down .glyphicon.glyphicon-volume-down
display: inline-block display: inline-block
#back-button #back-button, #clear-storage-button
position: absolute position: absolute
right: 70px right: 70px
right: -webkit-calc(1% + 55px) right: -webkit-calc(1% + 55px)
right: calc(1% + 55px) right: calc(1% + 55px)
top: 1%
padding: 3px 8px
@include opacity(0.75)
&:hover
@include opacity(1.0)
.glyphicon
font-size: 32px
#campaign-status #campaign-status
position: absolute position: absolute

View file

@ -107,15 +107,19 @@ else
button.btn.btn-illustrated.btn-primary(data-i18n="nav.contact", data-toggle="coco-modal", data-target="core/ContactModal") Contact button.btn.btn-illustrated.btn-primary(data-i18n="nav.contact", data-toggle="coco-modal", data-target="core/ContactModal") Contact
button.btn.btn-lg.btn-inverse#volume-button(data-i18n="[title]play.adjust_volume", title="Adjust volume") button.btn.btn-lg.btn-inverse.campaign-control-button#volume-button(data-i18n="[title]play.adjust_volume", title="Adjust volume")
.glyphicon.glyphicon-volume-off .glyphicon.glyphicon-volume-off
.glyphicon.glyphicon-volume-down .glyphicon.glyphicon-volume-down
.glyphicon.glyphicon-volume-up .glyphicon.glyphicon-volume-up
if campaign if campaign && !editorMode
button.btn.btn-lg.btn-inverse#back-button(data-i18n="[title]resources.campaigns", title="Campaigns") button.btn.btn-lg.btn-inverse.campaign-control-button#back-button(data-i18n="[title]resources.campaigns", title="Campaigns")
.glyphicon.glyphicon-globe .glyphicon.glyphicon-globe
if editorMode
button.btn.btn-lg.btn-inverse.campaign-control-button#clear-storage-button(data-i18n="[title]editor.clear_storage", title="Clear your local changes")
.glyphicon.glyphicon-refresh
if campaign && campaign.loaded if campaign && campaign.loaded
h1#campaign-status h1#campaign-status
.campaign-status-background .campaign-status-background

View file

@ -48,6 +48,7 @@ module.exports = class CampaignView extends RootView
'click .level-info-container .view-solutions': 'onClickViewSolutions' 'click .level-info-container .view-solutions': 'onClickViewSolutions'
'click #volume-button': 'onToggleVolume' 'click #volume-button': 'onToggleVolume'
'click #back-button': 'onClickBack' 'click #back-button': 'onClickBack'
'click #clear-storage-button': 'onClickClearStorage'
'click .portal .campaign': 'onClickPortalCampaign' 'click .portal .campaign': 'onClickPortalCampaign'
'mouseenter .portals': 'onMouseEnterPortals' 'mouseenter .portals': 'onMouseEnterPortals'
'mouseleave .portals': 'onMouseLeavePortals' 'mouseleave .portals': 'onMouseLeavePortals'
@ -531,6 +532,15 @@ module.exports = class CampaignView extends RootView
viewClass: CampaignView viewClass: CampaignView
viewArgs: [{supermodel: @supermodel}] viewArgs: [{supermodel: @supermodel}]
onClickClearStorage: (e) ->
localStorage.clear()
noty {
text: 'Local storage cleared. Reload to view the original campaign.'
layout: 'topCenter'
timeout: 5000
type: 'information'
}
updateHero: -> updateHero: ->
return unless hero = me.get('heroConfig')?.thangType return unless hero = me.get('heroConfig')?.thangType
for slug, original of ThangType.heroes when original is hero for slug, original of ThangType.heroes when original is hero

View file

@ -70,6 +70,7 @@ module.exports = class BuyGemsModal extends ModalView
stripeHandler.open({ stripeHandler.open({
description: $.t(product.i18n) description: $.t(product.i18n)
amount: product.amount amount: product.amount
bitcoin: true
}) })
@productBeingPurchased = product @productBeingPurchased = product

View file

@ -109,7 +109,7 @@ class AnalyticsPerDayHandler extends Handler
campaignOriginalSlugs = [] campaignOriginalSlugs = []
for doc in documents for doc in documents
campaignOriginalSlugs.push campaignOriginalSlugs.push
slug: doc.get('name').toLowerCase().replace new RegExp(' ', 'g'), '-' slug: _.str.slugify(doc.get('name'))
original: doc.get('original').toString() original: doc.get('original').toString()
# Sort slugs against original levels from campaign # Sort slugs against original levels from campaign

View file

@ -447,7 +447,8 @@ module.exports = class Handler
docLink = "http://codecombat.com#{editPath}" docLink = "http://codecombat.com#{editPath}"
@sendChangedHipChatMessage creator: editor, target: changedDocument, docLink: docLink @sendChangedHipChatMessage creator: editor, target: changedDocument, docLink: docLink
watchers = changedDocument.get('watchers') or [] watchers = changedDocument.get('watchers') or []
watchers = (w for w in watchers when not w.equals(editor.get('_id'))) # Don't send these emails to the person who submitted the patch, or to Nick, George, or Scott.
watchers = (w for w in watchers when not w.equals(editor.get('_id')) and not (w + '' in ['512ef4805a67a8c507000001', '5162fab9c92b4c751e000274', '51538fdb812dd9af02000001']))
return unless watchers.length return unless watchers.length
User.find({_id:{$in:watchers}}).select({email:1, name:1}).exec (err, watchers) => User.find({_id:{$in:watchers}}).select({email:1, name:1}).exec (err, watchers) =>
for watcher in watchers for watcher in watchers
@ -477,9 +478,7 @@ module.exports = class Handler
watchers = [req.user.get('_id')] watchers = [req.user.get('_id')]
if req.user.isAdmin() # https://github.com/codecombat/codecombat/issues/1105 if req.user.isAdmin() # https://github.com/codecombat/codecombat/issues/1105
nick = mongoose.Types.ObjectId('512ef4805a67a8c507000001') nick = mongoose.Types.ObjectId('512ef4805a67a8c507000001')
scott = mongoose.Types.ObjectId('5162fab9c92b4c751e000274')
watchers.push nick unless _.find watchers, (id) -> id.equals nick watchers.push nick unless _.find watchers, (id) -> id.equals nick
watchers.push scott unless _.find watchers, (id) -> id.equals scott
model.set 'watchers', watchers model.set 'watchers', watchers
model model