Merge pull request #1274 from codecombat/master

Master into production
This commit is contained in:
Michael Schmatz 2014-07-07 20:03:48 -07:00
commit 9dee429e21
22 changed files with 239 additions and 204 deletions

View file

@ -44,7 +44,7 @@ module.exports = class CocoRouter extends Backbone.Router
return @openRoute(args.join('/')) return @openRoute(args.join('/'))
view = new ViewClass({}, slugOrId) view = new ViewClass({}, slugOrId)
view.render() view.render()
if view then @openView(view) else @showNotFound() @openView if view then view else @notFoundView()
cache: {} cache: {}
openRoute: (route) -> openRoute: (route) ->
@ -99,7 +99,7 @@ module.exports = class CocoRouter extends Backbone.Router
return document.location.reload() return document.location.reload()
path = "views/#{path}" path = "views/#{path}"
ViewClass = @tryToLoadModule path ViewClass = @tryToLoadModule path
return @showNotFound() if not ViewClass return @openView @notFoundView() if not ViewClass
view = new ViewClass({}, args...) # options, then any path fragment args view = new ViewClass({}, args...) # options, then any path fragment args
view.render() view.render()
@openView(view) @openView(view)
@ -117,7 +117,7 @@ module.exports = class CocoRouter extends Backbone.Router
break if ViewClass break if ViewClass
split -= 1 split -= 1
return @showNotFound() if not ViewClass return @notFoundView() if not ViewClass
args = pieces[split+1..] args = pieces[split+1..]
view = new ViewClass({}, args...) # options, then any path fragment args view = new ViewClass({}, args...) # options, then any path fragment args
view.render() view.render()
@ -129,7 +129,7 @@ module.exports = class CocoRouter extends Backbone.Router
if error.toString().search('Cannot find module "' + path + '" from') is -1 if error.toString().search('Cannot find module "' + path + '" from') is -1
throw error throw error
showNotFound: -> notFoundView: ->
NotFoundView = require('views/not_found') NotFoundView = require('views/not_found')
view = new NotFoundView() view = new NotFoundView()
view.render() view.render()

View file

@ -12,7 +12,7 @@ init = ->
me.set 'testGroupNumber', Math.floor(Math.random() * 256) me.set 'testGroupNumber', Math.floor(Math.random() * 256)
me.patch() me.patch()
Backbone.listenTo(me, 'sync', Backbone.Mediator.publish('me:synced', {me: me})) Backbone.listenTo(me, 'sync', -> Backbone.Mediator.publish('me:synced', {me: me}))
module.exports.createUser = (userObject, failure=backboneFailure, nextURL=null) -> module.exports.createUser = (userObject, failure=backboneFailure, nextURL=null) ->
user = new User(userObject) user = new User(userObject)

View file

@ -236,7 +236,7 @@
basics_country: "Country" basics_country: "Country"
basics_country_help: "Country you want to work in (or live in now)." basics_country_help: "Country you want to work in (or live in now)."
basics_visa: "US Work Status" basics_visa: "US Work Status"
basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?" basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship? (If you live in Canada or Australia, mark authorized.)"
basics_looking_for: "Looking For" basics_looking_for: "Looking For"
basics_looking_for_full_time: "Full-time" basics_looking_for_full_time: "Full-time"
basics_looking_for_part_time: "Part-time" basics_looking_for_part_time: "Part-time"

View file

@ -3,37 +3,37 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
loading: "A carregar..." loading: "A carregar..."
saving: "A guardar..." saving: "A guardar..."
sending: "A enviar..." sending: "A enviar..."
# send: "Send" send: "Enviar"
cancel: "Cancelar" cancel: "Cancelar"
save: "Guardar" save: "Guardar"
# publish: "Publish" publish: "Publicar"
create: "Create" create: "Criar"
delay_1_sec: "1 segundo" delay_1_sec: "1 segundo"
delay_3_sec: "3 segundos" delay_3_sec: "3 segundos"
delay_5_sec: "5 segundos" delay_5_sec: "5 segundos"
manual: "Manual" manual: "Manual"
fork: "Fork" # fork: "Fork"
play: "Jogar" play: "Jogar"
# retry: "Retry" retry: "Tentar novamente"
# watch: "Watch" # watch: "Watch"
# unwatch: "Unwatch" # unwatch: "Unwatch"
# submit_patch: "Submit Patch" submit_patch: "Submeter Versão"
# units: units:
# second: "second" second: "segundo"
# seconds: "seconds" seconds: "segundos"
# minute: "minute" minute: "minuto"
# minutes: "minutes" minutes: "minutos"
# hour: "hour" hour: "hora"
# hours: "hours" hours: "horas"
# day: "day" day: "dia"
# days: "days" days: "dias"
# week: "week" week: "semana"
# weeks: "weeks" weeks: "semanas"
# month: "month" month: "mês"
# months: "months" months: "meses"
# year: "year" year: "ano"
# years: "years" years: "anos"
modal: modal:
close: "Fechar" close: "Fechar"
@ -43,88 +43,88 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
page_not_found: "Página não encontrada" page_not_found: "Página não encontrada"
nav: nav:
play: "Jogar" play: "Níveis"
# community: "Community" community: "Comunidade"
editor: "Editor" editor: "Editor"
blog: "Blog" blog: "Blog"
forum: "Fórum" forum: "Fórum"
# account: "Account" account: "Conta"
admin: "Administrador" admin: "Administrador"
home: "Início" home: "Início"
contribute: "Contribuir" contribute: "Contribuir"
legal: "Legal" legal: "Legal"
about: "Sobre" about: "Sobre"
contact: "Contacto" contact: "Contacte"
twitter_follow: "Seguir" twitter_follow: "Seguir"
employers: "Patrões" employers: "Empregadores"
versions: versions:
save_version_title: "Guardar Nova Versão" save_version_title: "Guardar Nova Versão"
new_major_version: "Nova Versão Principal" new_major_version: "Nova Versão Principal"
cla_prefix: "Para guardar as alterações, precisas concordar com o nosso" cla_prefix: "Para guardar as alterações, precisa de concordar com o nosso"
cla_url: "CLA" cla_url: "CLA"
cla_suffix: "." cla_suffix: "."
cla_agree: "EU CONCORDO" cla_agree: "EU CONCORDO"
login: login:
sign_up: "Criar conta" sign_up: "Criar Conta"
log_in: "Iniciar sessão" log_in: "Iniciar Sessão"
# logging_in: "Logging In" logging_in: "A Iniciar Sessão"
log_out: "Sair" log_out: "Sair"
recover: "recuperar conta" recover: "recuperar conta"
recover: recover:
recover_account_title: "Recuperar conta" recover_account_title: "Recuperar Conta"
send_password: "Recuperar password" send_password: "Enviar Password de Recuperação"
signup: signup:
create_account_title: "Cria uma conta para guardar o teu progresso." create_account_title: "Criar Conta para Guardar Progresso"
description: "É grátis. Só precisamos de umas coisas e fica tudo pronto:" description: "É grátis. Só são necessárias umas coisas e fica tudo pronto:"
email_announcements: "Receber anúncios por e-mail" email_announcements: "Receber anúncios por e-mail"
coppa: "13+ ou não-EUA " coppa: "13+ ou não-EUA "
coppa_why: "(Porquê?)" coppa_why: "(Porquê?)"
creating: "A criar conta..." creating: "A Criar Conta..."
sign_up: "Registar" sign_up: "Registar"
log_in: "iniciar sessão com palavra-passe" log_in: "iniciar sessão com palavra-passe"
# social_signup: "Or, you can sign up through Facebook or G+:" social_signup: "Ou pode registar-se através do Facebook ou do Google+:"
# required: "You need to log in before you can go that way." required: "Precisa de iniciar sessão antes de prosseguir dessa forma."
home: home:
slogan: "Aprende a Programar ao Jogar um Jogo" slogan: "Aprenda a Programar ao Jogar um Jogo"
no_ie: "O CodeCombat não corre em Internet Explorer 9 ou anterior. Desculpa!" no_ie: "O CodeCombat não funciona no Internet Explorer 9 ou anterior. Desculpe!"
no_mobile: "O CodeCombat não foi desenhado para dispositivos móveis e pode não funcionar!" no_mobile: "O CodeCombat não foi feito para dispositivos móveis e pode não funcionar!"
play: "Jogar" play: "Jogar"
old_browser: "Ups, o teu browser é demasiado antigo para correr o CodeCombat. Desculpa!" old_browser: "Ups, o seu navegador é demasiado antigo para que o CodeCombat funcione. Desculpe!"
old_browser_suffix: "Mesmo assim podes tentar, mas provavelmente não vai funcionar." old_browser_suffix: "Mesmo assim pode tentar, mas provavelmente não irá funcionar."
campaign: "Campanha" campaign: "Campanha"
for_beginners: "Para Iniciantes" for_beginners: "Para Iniciantes"
multiplayer: "Multiplayer" multiplayer: "Multijogador"
for_developers: "Para Programadores" for_developers: "Para Programadores"
play: play:
choose_your_level: "Escolhe o Teu Nível" choose_your_level: "Escolha o Seu Nível"
adventurer_prefix: "Podes saltar para um dos níveis abaixo, ou discutir os níveis " adventurer_prefix: "Pode saltar para um dos níveis abaixo ou discutir os níveis no "
adventurer_forum: "no fórum de Aventureiro" adventurer_forum: "fórum do Aventureiro"
adventurer_suffix: "." adventurer_suffix: "."
campaign_beginner: "Campanha para Iniciantes" campaign_beginner: "Campanha para Iniciantes"
campaign_beginner_description: "... onde aprendes a feitiçaria da programação." campaign_beginner_description: "... onde aprende a feitiçaria da programação."
campaign_dev: "Níveis mais Difíceis" campaign_dev: "Níveis mais Difíceis Aleatórios"
campaign_dev_description: "... onde aprendes a interface enquanto fazes coisas um bocadinho mais difíceis." campaign_dev_description: "... onde aprende a interface enquanto faz coisas um bocadinho mais difíceis."
campaign_multiplayer: "Arenas Multijogador" campaign_multiplayer: "Arenas Multijogador"
campaign_multiplayer_description: "... onde programas frente-a-frente contra outros jogadores." campaign_multiplayer_description: "... onde programa frente-a-frente contra outros jogadores."
campaign_player_created: "Criados por Jogadores" campaign_player_created: "Criados por Jogadores"
campaign_player_created_description: "... onde combates contra a criatividade dos teus colegas <a href=\"/contribute#artisan\">Feiticeiros Artesãos</a>." campaign_player_created_description: "... onde combate contra a criatividade dos seus colegas <a href=\"/contribute#artisan\">Feiticeiros Artesãos</a>."
level_difficulty: "Dificuldade: " level_difficulty: "Dificuldade: "
play_as: "Jogar como " play_as: "Jogar Como"
spectate: "Observar" spectate: "Espectar"
contact: contact:
contact_us: "Contactar o CodeCombat" contact_us: "Contacte o CodeCombat"
welcome: "É bom ter notícias tuas! Usa este formulário para nos enviares um e-mail." welcome: "É bom ter notícias suas! Use este formulário para nos enviar um e-mail. "
contribute_prefix: "Se estás interessado em contribuir, dá uma olhadela à nossa " contribute_prefix: "Se está interessado em contribuir, dê uma olhadela à nossa "
contribute_page: "página de contribuição" contribute_page: "página de contribuição"
contribute_suffix: "!" contribute_suffix: "!"
forum_prefix: "Para algo público, por favor, usa o " forum_prefix: "Para algo público, por favor use o "
forum_page: "nosso fórum" forum_page: "nosso fórum"
forum_suffix: " como alternativa." forum_suffix: " como alternativa."
send: "Enviar Feedback" send: "Enviar Feedback"
@ -132,71 +132,71 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
# recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns." # recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns."
diplomat_suggestion: diplomat_suggestion:
title: "Ajuda a traduzir o CodeCombat!" title: "Ajude a traduzir o CodeCombat!"
sub_heading: "Precisamos das tuas habilidades linguísticas." sub_heading: "Precisamos das suas habilidades linguísticas."
pitch_body: "Desenvolvemos o CodeCombat em Inglês, mas já temos jogadores em todo o mundo. Muitos deles querem jogar em Português e não falam Inglês, por isso, se sabes falar ambas, por favor considera registares-te como Diplomata para ajudares a traduzir o website do CodeCombat e todos os níveis para Português." pitch_body: "Desenvolvemos o CodeCombat em Inglês, mas já temos jogadores em todo o mundo. Muitos deles querem jogar em Português e não falam Inglês, por isso, se sabe falar ambas, por favor considere registar-se como Diplomata para ajudar a traduzir o website do CodeCombat e todos os níveis para Português."
missing_translations: "Enquanto não conseguimos traduzir tudo para Português, irás ver em Inglês o que não estiver disponível em Português." missing_translations: "Enquanto não conseguirmos traduzir tudo para Português, irá ver em Inglês o que não estiver disponível em Português."
learn_more: "Sabe mais sobre ser um Diplomata" learn_more: "Saiba mais sobre ser um Diplomata"
subscribe_as_diplomat: "Subscrever como Diplomata" subscribe_as_diplomat: "Subscreva-se como Diplomata"
wizard_settings: wizard_settings:
title: "Definições do Wizard" title: "Definições do Feiticeiro"
customize_avatar: "Altera o teu Avatar" customize_avatar: "Personalize o Seu Avatar"
# active: "Active" active: "Ativo"
# color: "Color" color: "Cor"
# group: "Group" group: "Grupo"
clothes: "Roupas" clothes: "Roupas"
trim: "Pormenores" trim: "Pormenores"
cloud: "Nuvem" cloud: "Nuvem"
# team: "Team" team: "Equipa"
spell: "Feitiço" spell: "Feitiço"
boots: "Botas" boots: "Botas"
hue: "Matiz" hue: "Tom"
saturation: "Saturação" saturation: "Saturação"
lightness: "Brilho" lightness: "Brilho"
account_settings: account_settings:
title: "Definições da Conta" title: "Definições da Conta"
not_logged_in: "Inicia sessão ou cria uma conta para alterares as tuas definições." not_logged_in: "Inicie sessão ou crie uma conta para alterar as suas definições."
autosave: "As alterações guardam-se automaticamente" autosave: "Alterações Guardam Automaticamente"
me_tab: "Eu" me_tab: "Eu"
picture_tab: "Fotografia" picture_tab: "Fotografia"
# upload_picture: "Upload a picture" upload_picture: "Anexar uma fotografia"
wizard_tab: "Feiticeiro" wizard_tab: "Feiticeiro"
password_tab: "Palavra-passe" password_tab: "Palavra-passe"
emails_tab: "E-mails" emails_tab: "E-mails"
admin: "Admin" admin: "Administrador"
wizard_color: "Cor das roupas do feiticeiro" wizard_color: "Cor das Roupas do Feiticeiro"
new_password: "Nova palavra-passe" new_password: "Nova Palavra-passe"
new_password_verify: "Verificar" new_password_verify: "Verificar"
email_subscriptions: "Subscrições de E-mail" email_subscriptions: "Subscrições de E-mail"
email_announcements: "Anúncios" email_announcements: "Anúncios"
email_announcements_description: "Recebe e-mails sobre as últimas novidades e desenvolvimentos no CodeCombat." email_announcements_description: "Receba e-mails sobre as últimas novidades e desenvolvimentos no CodeCombat."
email_notifications: "Notificações" email_notifications: "Notificações"
# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." # email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
# email_any_notes: "Any Notifications" email_any_notes: "Quaisquer Notificações"
# email_any_notes_description: "Disable to stop all activity notification emails." email_any_notes_description: "Desative para parar de receber todos os e-mails de notificação de atividade."
# email_recruit_notes: "Job Opportunities" email_recruit_notes: "Oportunidades de Emprego"
# email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job." email_recruit_notes_description: "Se joga muito bem, podemos contactá-lo para lhe arranjar um (melhor) emprego."
contributor_emails: "E-mails para Contribuintes" contributor_emails: "Subscrições de E-mail (Contribuintes)"
contribute_prefix: "Estamos à procura de pessoas para se juntarem a nós! Visita a " contribute_prefix: "Estamos à procura de pessoas para se juntarem a nós! Visita a "
contribute_page: "página de contribuição" contribute_page: "página de contribuição"
contribute_suffix: " para mais informação." contribute_suffix: " para mais informações."
email_toggle: "Alternar todos" email_toggle: "Alternar Todos"
error_saving: "Erro ao guardar" error_saving: "Erro ao Guardar"
saved: "Alterações guardadas" saved: "Alterações Guardadas"
password_mismatch: "As palavras-passe não coincidem." password_mismatch: "As palavras-passe não coincidem."
# job_profile: "Job Profile" job_profile: "Perfil de Emprego"
# job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks." job_profile_approved: "O seu perfil de emprego foi aprovado pelo CodeCombat. Os empregadores poderão vê-lo até que o defina como inativo ou não o tenha alterado à 4 semanas."
# job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job." job_profile_explanation: "Olá! Preencha isto e entraremos em contacto consigo sobre encontrar um emprego de desenvolvedor de software para si."
# sample_profile: "See a sample profile" sample_profile: "Veja um exemplo de perfil"
# view_profile: "View Your Profile" view_profile: "Veja o Seu Perfil"
account_profile: account_profile:
# settings: "Settings" settings: "Definições"
# edit_profile: "Edit Profile" edit_profile: "Editar Perfil"
# done_editing: "Done Editing" done_editing: "Concluir a Edição"
profile_for_prefix: "Perfil de " profile_for_prefix: "Perfil para "
profile_for_suffix: "" profile_for_suffix: ""
# featured: "Featured" # featured: "Featured"
# not_featured: "Not Featured" # not_featured: "Not Featured"
@ -282,6 +282,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
# education_description: "Description" # education_description: "Description"
# education_description_help: "Highlight anything about this educational experience. (140 chars; optional)" # education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
# our_notes: "Our Notes" # our_notes: "Our Notes"
# remarks: "Remarks"
# projects: "Projects" # projects: "Projects"
# projects_header: "Add 3 projects" # projects_header: "Add 3 projects"
# projects_header_2: "Projects (Top 3)" # projects_header_2: "Projects (Top 3)"
@ -296,33 +297,38 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
# project_link_help: "Link to the project." # project_link_help: "Link to the project."
# player_code: "Player Code" # player_code: "Player Code"
# employers: employers:
# want_to_hire_our_players: "Hire CodeCombat Players" want_to_hire_our_players: "Contratar Jogadores do CodeCombat"
# what: "What is CodeCombat?" what: "O Que é o CodeCombat?"
# what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io." # what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
# who: "Who Are the Players?" who: "Quem São os Jogadores?"
# who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans." # who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
# how: "How Do We Find Developers?" how: "Como Encontramos Desenvolvedores?"
# how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners." # how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
# why: "Why Hire Through Us?" why: "Porquê Contratar Através de Nós?"
# why_blurb_1: "We will save you time. Every CodeCombateer we feaure is " # why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
# cost: "How much do we charge?"
# cost_blurb: "We charge 15% of first year's salary and offer a 100% money back guarantee for 90 days. We don't charge for candidates who are already actively being interviewed at your company."
# response: "What's the response rate?"
# response_blurb: "Almost every developer you contact on CodeCombat will respond to inquires whether or not they want to interivew. If you would like help finding a candidate for your role, we can make recommendations."
# why_blurb_2: "looking for work" # why_blurb_2: "looking for work"
# why_blurb_3: ", has " # why_blurb_3: ", has "
# why_blurb_4: "demonstrated top notch technical skills" # why_blurb_4: "demonstrated top notch technical skills"
# why_blurb_5: ", and has been " # why_blurb_5: ", and has been "
# why_blurb_6: "personally screened by us" # why_blurb_6: "personally screened by us"
# why_blurb_7: ". Stop screening and start hiring." # why_blurb_7: ". Stop screening and start hiring."
# see_candidates: "Click here to see our candidates" see_candidates: "Clique aqui para ver os nossos candidatos"
# candidate_name: "Name" candidate_name: "Nome"
# candidate_location: "Location" candidate_location: "Localização"
# candidate_looking_for: "Looking For" candidate_looking_for: "À Procura de"
# candidate_role: "Role" candidate_role: "Cargo"
# candidate_top_skills: "Top Skills" candidate_top_skills: "Principais Habilidades"
# candidate_years_experience: "Yrs Exp" candidate_years_experience: "Anos de Experiência"
# candidate_last_updated: "Last Updated" candidate_last_updated: "Última Vez Atualizado"
# featured_developers: "Featured Developers" candidate_who: "Quem"
# other_developers: "Other Developers" featured_developers: "Desenvolvedores em Destaque"
# inactive_developers: "Inactive Developers" other_developers: "Outros Desenvolvedores"
inactive_developers: "Desenvolvedores Inativos"
play_level: play_level:
done: "Concluir" done: "Concluir"

View file

@ -83,7 +83,7 @@ UserSchema = c.object {},
experience: {type: 'integer', title: 'Years of Experience', minimum: 0, description: 'How many years of professional experience (getting paid) developing software do you have?'} experience: {type: 'integer', title: 'Years of Experience', minimum: 0, description: 'How many years of professional experience (getting paid) developing software do you have?'}
shortDescription: {type: 'string', maxLength: 140, title: 'Short Description', description: 'Who are you, and what are you looking for? 140 characters max.', default: 'Programmer seeking to build great software.'} shortDescription: {type: 'string', maxLength: 140, title: 'Short Description', description: 'Who are you, and what are you looking for? 140 characters max.', default: 'Programmer seeking to build great software.'}
longDescription: {type: 'string', maxLength: 600, title: 'Description', description: 'Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max.', format: 'markdown', default: '* I write great code.\n* You need great code?\n* Great!'} longDescription: {type: 'string', maxLength: 600, title: 'Description', description: 'Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max.', format: 'markdown', default: '* I write great code.\n* You need great code?\n* Great!'}
visa: c.shortString {title: 'US Work Status', description: 'Are you authorized to work in the US, or do you need visa sponsorship?', enum: ['Authorized to work in the US', 'Need visa sponsorship'], default: 'Authorized to work in the US'} visa: c.shortString {title: 'US Work Status', description: 'Are you authorized to work in the US, or do you need visa sponsorship? (If you live in Canada or Australia, mark authorized.)', enum: ['Authorized to work in the US', 'Need visa sponsorship'], default: 'Authorized to work in the US'}
work: c.array {title: 'Work Experience', description: 'List your relevant work experience, most recent first.'}, work: c.array {title: 'Work Experience', description: 'List your relevant work experience, most recent first.'},
c.object {title: 'Job', description: 'Some work experience you had.', required: ['employer', 'role', 'duration']}, c.object {title: 'Job', description: 'Some work experience you had.', required: ['employer', 'role', 'duration']},
employer: c.shortString {title: 'Employer', description: 'Name of your employer.'} employer: c.shortString {title: 'Employer', description: 'Name of your employer.'}
@ -142,11 +142,11 @@ UserSchema = c.object {},
roleFilter: roleFilter:
title: 'Role' title: 'Role'
type: 'string' type: 'string'
enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Mobile Developer']
seniorityFilter: seniorityFilter:
title: 'Seniority' title: 'Seniority'
type: 'string' type: 'string'
enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] enum: ['College Student', 'Recent Grad', 'Junior', 'Senior']
featured: featured:
title: 'Featured' title: 'Featured'
type: 'boolean' type: 'boolean'

View file

@ -8,9 +8,13 @@
width: 450px width: 450px
margin: 0 auto margin: 0 auto
label
cursor: pointer
#color-settings table #color-settings table
float: left float: left
width: 250px width: 250px
cursor: pointer
.minicolors-input .minicolors-input
display: none display: none

View file

@ -1,6 +1,6 @@
#employers-view #employers-view
button .employer-button
background: #fce232 /* Old browsers */ background: #fce232 /* Old browsers */
background: -moz-linear-gradient(top, #fce232 0%, #ea8e2b 100%) background: -moz-linear-gradient(top, #fce232 0%, #ea8e2b 100%)
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fce232), color-stop(100%,#ea8e2b)) background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fce232), color-stop(100%,#ea8e2b))
@ -17,15 +17,24 @@
margin-bottom: 10px margin-bottom: 10px
.panel-heading .panel-heading
background-color: darkgrey background-color: darkgrey
cursor: pointer
.panel-body .panel-body
background-color: darkgrey background-color: darkgrey
border-radius: 4px
border-top-left-radius: 0px
border-top-right-radius: 0px
.panel
border: 1px red
border-radius: 0px
#filters #filters
.filter_section .filter_section
width: 16% width: 25%
display: inline-block display: inline-block
vertical-align: top vertical-align: top
margin-bottom: 10px margin-bottom: 10px
label input
margin-right: 10px
.get-started-button .get-started-button
vertical-align: text-bottom vertical-align: text-bottom
margin-left: 10px margin-left: 10px
@ -33,13 +42,13 @@
#filter-button, #create-alert-button #filter-button, #create-alert-button
float: right float: right
#login-link, #logout-button #login-link, #logout-link
float: right float: right
color: #333333 color: #333333
display: inline-block display: inline-block
:visited :visited
color: #333333 color: #333333
#logout-button:hover #logout-link:hover
cursor: pointer cursor: pointer
#tagline, .hiring-call-to-action #tagline, .hiring-call-to-action

View file

@ -155,7 +155,7 @@ block content
select.form-control(name='root[visa]') select.form-control(name='root[visa]')
option(value='Authorized to work in the US', selected=profile.visa == 'Authorized to work in the US') Authorized to work in the US option(value='Authorized to work in the US', selected=profile.visa == 'Authorized to work in the US') Authorized to work in the US
option(value='Need visa sponsorship', selected=profile.visa == 'Need visa sponsorship') Need visa sponsorship option(value='Need visa sponsorship', selected=profile.visa == 'Need visa sponsorship') Need visa sponsorship
p.help-block(data-i18n="account_profile.basics_visa_help") Are you authorized to work in the US, or do you need visa sponsorship? p.help-block(data-i18n="account_profile.basics_visa_help") Are you authorized to work in the US, or do you need visa sponsorship? (If you live in Canada or Australia, mark authorized.)
.form-group .form-group
label.control-label(data-i18n="account_profile.basics_looking_for") Looking For label.control-label(data-i18n="account_profile.basics_looking_for") Looking For
select.form-control(name='root[lookingFor]') select.form-control(name='root[lookingFor]')

View file

@ -1,5 +1,5 @@
#color-settings #color-settings
table.table.table-bordered table.table.table-bordered.table-hover
tr tr
th(data-i18n="wizard_settings.active") Active th(data-i18n="wizard_settings.active") Active
th(data-i18n="wizard_settings.color") Color th(data-i18n="wizard_settings.color") Color

View file

@ -23,6 +23,9 @@ block content
#article-view #article-view
h3 Patches
.patches-view
hr hr
div#error-view div#error-view

View file

@ -7,10 +7,10 @@ block content
if !isEmployer && !me.isAdmin() if !isEmployer && !me.isAdmin()
#tagline #tagline
h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials.
button.btn.get-started-button Get started button.btn.get-started-button.employer-button Get started
else else
if !me.get('anonymous') if !me.get('anonymous')
a#logout-button(data-i18n="login.log_out") Logout a#logout-link(data-i18n="login.log_out") Logout
br br
#filter #filter
.panel-group#filter_panel .panel-group#filter_panel
@ -24,78 +24,66 @@ block content
.panel-collapse.collapse.in#collapseOne .panel-collapse.collapse.in#collapseOne
.panel-body .panel-body
form#filters form#filters
.filter_section#screened_filter
h4 Screened
input(type="checkbox" name="phoneScreenFilter" value="true")
| Phone Screened
br
input(type="checkbox" name="phoneScreenFilter" value="false")
| Not Phone Screened
.filter_section#visa_filter .filter_section#visa_filter
h4 Visa h4 Visa
input(type="checkbox" name="visa" value="Authorized to work in the US") label
| US Authorized input(type="checkbox" name="visa" value="Authorized to work in the US")
| US Authorized
br br
input(type="checkbox" name="visa" value="Need visa sponsorship") label
| Not Authorized input(type="checkbox" name="visa" value="Need visa sponsorship")
| Not Authorized
.filter_section#school_filter .filter_section#school_filter
h4 School h4 School
input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") label
| Top 20 Eng. input(type="checkbox" name="schoolFilter" value="Top 20 Eng.")
| Top 20 Eng.
br br
input(type="checkbox" name="schoolFilter" value="Other US") label
| Other US input(type="checkbox" name="schoolFilter" value="Other US")
| Other US
br br
input(type="checkbox" name="schoolFilter" value="Other Intl.") label
| Other Intl. input(type="checkbox" name="schoolFilter" value="Other Intl.")
.filter_section#location_filter | Other Intl.
h4 Location
input(type="checkbox" name="locationFilter" value="Bay Area")
| Bay Area
br
input(type="checkbox" name="locationFilter" value="New York")
| New York
br
input(type="checkbox" name="locationFilter" value="Other US")
| Other US
br
input(type="checkbox" name="locationFilter" value="International")
| International
.filter_section#role_filter .filter_section#role_filter
h4 Role h4 Role
input(type="checkbox" name="roleFilter" value="Web Developer") label
| Web Developer input(type="checkbox" name="roleFilter" value="Web Developer")
| Web Developer
br br
input(type="checkbox" name="roleFilter" value="Software Developer") label
| Software Developer input(type="checkbox" name="roleFilter" value="Software Developer")
| Software Developer
br br
input(type="checkbox" name="roleFilter" value="iOS Developer") label
| iOS Developer input(type="checkbox" name="roleFilter" value="iOS Developer")
| iOS Developer
br br
input(type="checkbox" name="roleFilter" value="Android Developer") label
| Android Developer input(type="checkbox" name="roleFilter" value="Android Developer")
br | Android Developer
input(type="checkbox" name="roleFilter" value="Project Manager")
| Project Developer
.filter_section#seniority_filter .filter_section#seniority_filter
h4 Seniority h4 Seniority
input(type="checkbox" name="seniorityFilter" value="College Student") label
| College Student input(type="checkbox" name="seniorityFilter" value="Senior")
| Senior
br br
input(type="checkbox" name="seniorityFilter" value="Recent Grad") label
| Recent Grad input(type="checkbox" name="seniorityFilter" value="Junior")
| Junior
br br
input(type="checkbox" name="seniorityFilter" value="Junior") label
| Junior input(type="checkbox" name="seniorityFilter" value="Recent Grad")
| Recent Grad
br br
input(type="checkbox" name="seniorityFilter" value="Senior") label
| Senior input(type="checkbox" name="seniorityFilter" value="College Student")
br | College Student
input(type="checkbox" name="seniorityFilter" value="Management")
| Management
//input#select_all_checkbox(type="checkbox" name="select_all" checked) //input#select_all_checkbox(type="checkbox" name="select_all" checked)
//| Select all //| Select all
button.btn#filter-button Filter button.btn.employer-button#filter-button Filter
p#results #{numberOfCandidates} results p#results #{numberOfCandidates} results
//button.btn#create-alert-button Create Alert //button.btn#create-alert-button Create Alert
if candidates.length if candidates.length
@ -110,9 +98,13 @@ block content
- var curated = profile.curated; - var curated = profile.curated;
tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "")
td(rowspan=2) td(rowspan=3)
.candidate-picture .candidate-picture
img(src=candidate.getPhotoURL(50,false,true), alt=profile.name, title=profile.name, width=50) img(src=candidate.getPhotoURL(50,false,true), alt=profile.name, title=profile.name, width=50)
td
strong
| #{profile.name}
tr.description_row(data-candidate-id=candidate.id)
if curated && curated.shortDescription if curated && curated.shortDescription
td.candidate-description #{curated.shortDescription} td.candidate-description #{curated.shortDescription}
else else
@ -122,7 +114,7 @@ block content
- var workHistory = curated.workHistory.join(","); - var workHistory = curated.workHistory.join(",");
td.tag_column td.tag_column
img(src="/images/pages/employer/tag.png") img(src="/images/pages/employer/tag.png")
| #{curated.mainTag} | #{profile.jobTitle}
td.location_column td.location_column
img(src="/images/pages/employer/location.png") img(src="/images/pages/employer/location.png")
| #{curated.location} | #{curated.location}
@ -133,14 +125,13 @@ block content
if workHistory if workHistory
img(src="/images/pages/employer/briefcase.png") img(src="/images/pages/employer/briefcase.png")
| #{workHistory} | #{workHistory}
else
td Hi
if !isEmployer && !me.isAdmin() if !isEmployer && !me.isAdmin()
div#info_wrapper div#info_wrapper
span.hiring-call-to-action span.hiring-call-to-action
h2#start-hiring(data-i18n="employers.start_hiring") Start hiring. h2#start-hiring(data-i18n="employers.start_hiring") Start hiring.
button.btn.get-started-button Get started button.btn.get-started-button.employer-button Get started
h2#hiring-reasons.hiring-call-to-action(data-i18n="employers.reasons") 3 reasons you should hire through us: h2#hiring-reasons.hiring-call-to-action(data-i18n="employers.reasons") 3 reasons you should hire through us:
.reasons#top_row .reasons#top_row
@ -162,7 +153,7 @@ block content
p(data-i18n="employers.pass_screen_blurb") All of these developers have ranked in our programming competitions. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News. p(data-i18n="employers.pass_screen_blurb") All of these developers have ranked in our programming competitions. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News.
span.hiring-call-to-action span.hiring-call-to-action
h2(data-i18n="employers.make_hiring_easier") Make my hiring easier, please. h2(data-i18n="employers.make_hiring_easier") Make my hiring easier, please.
button.btn.get-started-button Get started button.btn.get-started-button.employer-button Get started
.reasons#bottom_row .reasons#bottom_row
.reason_long .reason_long
img.employer_icon(src="/images/pages/employer/employer_icon1.png") img.employer_icon(src="/images/pages/employer/employer_icon1.png")

View file

@ -17,4 +17,4 @@ block modal-body-wait-content
.progress-bar .progress-bar
block modal-footer-content block modal-footer-content
button.btn.btn-primary.btn-large#wizard-settings-done(type="button") Done button.btn.btn-primary.btn-large#wizard-settings-done(data-dismiss="modal", type="button") Done

View file

@ -11,6 +11,11 @@ module.exports = class WizardSettingsView extends CocoView
startsLoading: true startsLoading: true
events: events:
'click .color-group': (e) ->
return if $(e.target).closest('.minicolors')[0]
return if $(e.target).closest('.color-group-checkbox')[0]
return if $(e.target).closest('label')[0]
$(e.target).closest('.color-group').find('.color-group-checkbox').click()
'change .color-group-checkbox': (e) -> 'change .color-group-checkbox': (e) ->
colorGroup = $(e.target).closest('.color-group') colorGroup = $(e.target).closest('.color-group')
@updateColorSettings(colorGroup) @updateColorSettings(colorGroup)

View file

@ -1,9 +1,9 @@
View = require 'views/kinds/RootView' View = require 'views/kinds/RootView'
VersionHistoryView = require './versions_view' VersionHistoryView = require './versions_view'
ErrorView = require '../../error_view'
template = require 'templates/editor/article/edit' template = require 'templates/editor/article/edit'
Article = require 'models/Article' Article = require 'models/Article'
SaveVersionModal = require 'views/modal/save_version_modal' SaveVersionModal = require 'views/modal/save_version_modal'
PatchesView = require 'views/editor/patches_view'
module.exports = class ArticleEditView extends View module.exports = class ArticleEditView extends View
id: 'editor-article-edit-view' id: 'editor-article-edit-view'
@ -68,13 +68,15 @@ module.exports = class ArticleEditView extends View
getRenderData: (context={}) -> getRenderData: (context={}) ->
context = super(context) context = super(context)
context.article = @article context.article = @article
context.authorized = me.isAdmin() or @article.hasWriteAccess(me) context.authorized = not me.get('anonymous')
context context
afterRender: -> afterRender: ->
super() super()
return if @startsLoading return if @startsLoading
@showReadOnly() if me.get('anonymous') @showReadOnly() if me.get('anonymous')
@patchesView = @insertSubView(new PatchesView(@article), @$el.find('.patches-view'))
@patchesView.load()
openPreview: -> openPreview: ->
@preview = window.open('/editor/article/x/preview', 'preview', 'height=800,width=600') @preview = window.open('/editor/article/x/preview', 'preview', 'height=800,width=600')

View file

@ -58,7 +58,7 @@ module.exports = class ThangTypeEditView extends View
context = super(context) context = super(context)
context.thangType = @thangType context.thangType = @thangType
context.animations = @getAnimationNames() context.animations = @getAnimationNames()
context.authorized = me.isAdmin() or @thangType.hasWriteAccess(me) context.authorized = not me.get('anonymous')
context context
getAnimationNames: -> getAnimationNames: ->
@ -350,7 +350,7 @@ module.exports = class ThangTypeEditView extends View
schema: schema schema: schema
files: @files files: @files
filePath: "db/thang.type/#{@thangType.get('original')}" filePath: "db/thang.type/#{@thangType.get('original')}"
readOnly: true unless me.isAdmin() or @thangType.hasWriteAccess(me) readOnly: me.get('anonymous')
callbacks: callbacks:
change: @pushChangesToPreview change: @pushChangesToPreview
select: @onSelectNode select: @onSelectNode

View file

@ -21,6 +21,7 @@ module.exports = class EmployersView extends View
events: events:
'click tbody tr': 'onCandidateClicked' 'click tbody tr': 'onCandidateClicked'
'click #logout-link': 'logoutAccount'
'change #filters input': 'onFilterChanged' 'change #filters input': 'onFilterChanged'
'click #filter-button': 'applyFilters' 'click #filter-button': 'applyFilters'
'change #select_all_checkbox': 'handleSelectAllChange' 'change #select_all_checkbox': 'handleSelectAllChange'
@ -121,13 +122,18 @@ module.exports = class EmployersView extends View
getRenderData: -> getRenderData: ->
ctx = super() ctx = super()
ctx.isEmployer = @isEmployer() ctx.isEmployer = @isEmployer()
ctx.candidates = _.sortBy @candidates.models, (c) -> -1 * c.get('jobProfile').experience ctx.candidates = _.sortBy @candidates.models, (c) -> c.get('jobProfile').curated?.featured
ctx.candidates = _.sortBy ctx.candidates, (c) -> -1 * c.get('jobProfile').experience
ctx.candidates = _.sortBy ctx.candidates, (c) -> not c.get('jobProfile').curated?
ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active
ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active
ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
unless @isEmployer() or me.isAdmin() unless @isEmployer() or me.isAdmin()
ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated
ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7) ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7)
if me.isAdmin()
ctx.featuredCandidates = ctx.candidates
ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
ctx.remarks = {} ctx.remarks = {}
ctx.remarks[remark.get('user')] = remark for remark in @remarks.models ctx.remarks[remark.get('user')] = remark for remark in @remarks.models

View file

@ -137,12 +137,14 @@ module.exports = class CocoView extends Backbone.View
resourceIndex: r.rid, resourceIndex: r.rid,
responseText: r.jqxhr?.responseText responseText: r.jqxhr?.responseText
})).i18n() })).i18n()
@$el.find('.progress').hide()
onRetryResource: (e) -> onRetryResource: (e) ->
res = @supermodel.getResource($(e.target).data('resource-index')) res = @supermodel.getResource($(e.target).data('resource-index'))
# different views may respond to this call, and not all have the resource to reload # different views may respond to this call, and not all have the resource to reload
return unless res and res.isFailed return unless res and res.isFailed
res.load() res.load()
@$el.find('.progress').show()
$(e.target).closest('.loading-error-alert').remove() $(e.target).closest('.loading-error-alert').remove()
# Modals # Modals

View file

@ -24,7 +24,7 @@ module.exports = class GoldView extends View
unless goldEl.length unless goldEl.length
teamEl = teamTemplate team: e.team teamEl = teamTemplate team: e.team
@$el[if e.team is 'humans' then 'prepend' else 'append'](teamEl) @$el[if e.team is 'humans' then 'prepend' else 'append'](teamEl)
goldEl = $('.gold-amount.team-' + e.team, teamEl) goldEl = @$el.find('.gold-amount.team-' + e.team)
text = '' + e.gold text = '' + e.gold
if e.goldEarned and e.goldEarned > e.gold if e.goldEarned and e.goldEarned > e.gold
text += " (#{e.goldEarned})" text += " (#{e.goldEarned})"
@ -34,7 +34,13 @@ module.exports = class GoldView extends View
@shownOnce = true @shownOnce = true
updateTitle: -> updateTitle: ->
@$el.attr 'title', ("Team '#{team}' has #{gold} now of #{@teamGoldEarned[team]} gold earned." for team, gold of @teamGold).join ' ' strings = []
for team, gold of @teamGold
if @teamGoldEarned[team]
strings.push "Team '#{team}' has #{gold} now of #{@teamGoldEarned[team]} gold earned."
else
strings.push "Team '#{team}' has #{gold} gold."
@$el.attr 'title', strings.join ' '
onSetLetterbox: (e) -> onSetLetterbox: (e) ->
@$el.toggle not e.on if @shownOnce @$el.toggle not e.on if @shownOnce

View file

@ -274,6 +274,7 @@ module.exports = class PlayLevelView extends View
# Once Surface is Loaded #################################################### # Once Surface is Loaded ####################################################
onLevelStarted: -> onLevelStarted: ->
return unless @surface?
@loadingView.showReady() @loadingView.showReady()
if window.currentModal and not window.currentModal.destroyed if window.currentModal and not window.currentModal.destroyed
return Backbone.Mediator.subscribeOnce 'modal-closed', @onLevelStarted, @ return Backbone.Mediator.subscribeOnce 'modal-closed', @onLevelStarted, @

View file

@ -32,7 +32,7 @@
"firepad": "~0.1.2", "firepad": "~0.1.2",
"marked": "~0.3.0", "marked": "~0.3.0",
"moment": "~2.5.0", "moment": "~2.5.0",
"aether": "~0.2.9", "aether": "~0.2.22",
"underscore.string": "~2.3.3", "underscore.string": "~2.3.3",
"firebase": "~1.0.2", "firebase": "~1.0.2",
"catiline": "~2.9.3", "catiline": "~2.9.3",

View file

@ -65,7 +65,7 @@
"redis": "", "redis": "",
"webworker-threads": "~0.4.11", "webworker-threads": "~0.4.11",
"node-gyp": "~0.13.0", "node-gyp": "~0.13.0",
"aether": "~0.2.9", "aether": "~0.2.22",
"JASON": "~0.1.3", "JASON": "~0.1.3",
"JQDeferred": "~2.1.0" "JQDeferred": "~2.1.0"
}, },

View file

@ -22,7 +22,7 @@ LevelComponentHandler = class LevelComponentHandler extends Handler
props props
hasAccess: (req) -> hasAccess: (req) ->
req.method is 'GET' or req.user?.isAdmin() req.method in ['GET', 'PUT'] or req.user?.isAdmin()
module.exports = new LevelComponentHandler() module.exports = new LevelComponentHandler()